diff --git a/assets/docs/js/mermaid.js b/assets/docs/js/mermaid.js
new file mode 100644
index 00000000..b5417542
--- /dev/null
+++ b/assets/docs/js/mermaid.js
@@ -0,0 +1,173026 @@
+(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$r(type2) {
+ return (input, init2) => text$3(input, init2).then((text2) => new DOMParser().parseFromString(text2, type2));
+ }
+ var svg$2 = parser$r("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 millisecond$1 = 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 utcSecond = 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 = [
+ [utcSecond, 1, durationSecond],
+ [utcSecond, 5, 5 * durationSecond],
+ [utcSecond, 15, 15 * durationSecond],
+ [utcSecond, 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 millisecond$1.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, utcSecond, 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(text2) {
+ let cleanedText = text2;
+ if (text2.split("~").length - 1 >= 2) {
+ let newCleanedText = cleanedText;
+ do {
+ cleanedText = newCleanedText;
+ newCleanedText = cleanedText.replace(/~([^\s,:;]+)~/, "<$1>");
+ } while (newCleanedText != cleanedText);
+ return parseGenericTypes(newCleanedText);
+ } else {
+ return cleanedText;
+ }
+ };
+ 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 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);
+ ["config"].forEach((prop) => {
+ 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) {
+ result.push({ type: text2, args: null });
+ }
+ return result.length === 1 ? result[0] : result;
+ } catch (error) {
+ log$1.error(
+ `ERROR: ${error.message} - Unable to parse directive
+ ${type2 !== null ? " type:" + type2 : ""} based on the text:${text2}`
+ );
+ return { type: null, args: null };
+ }
+ };
+ 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) {
+ 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) {
+ return;
+ }
+ }
+ obj[fnName](...params);
+ };
+ function distance(p1, p2) {
+ return p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;
+ }
+ function traverseEdge(points) {
+ let prevPoint;
+ let totalDistance = 0;
+ points.forEach((point2) => {
+ totalDistance += distance(point2, prevPoint);
+ prevPoint = point2;
+ });
+ let remainingDistance = totalDistance / 2;
+ let center2 = void 0;
+ prevPoint = void 0;
+ points.forEach((point2) => {
+ if (prevPoint && !center2) {
+ const vectorDistance = distance(point2, prevPoint);
+ if (vectorDistance < remainingDistance) {
+ remainingDistance -= vectorDistance;
+ } else {
+ const distanceRatio = remainingDistance / vectorDistance;
+ if (distanceRatio <= 0) {
+ center2 = prevPoint;
+ }
+ if (distanceRatio >= 1) {
+ center2 = { x: point2.x, y: point2.y };
+ }
+ if (distanceRatio > 0 && distanceRatio < 1) {
+ center2 = {
+ x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point2.x,
+ y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point2.y
+ };
+ }
+ }
+ }
+ prevPoint = point2;
+ });
+ return center2;
+ }
+ function calcLabelPosition(points) {
+ if (points.length === 1) {
+ return points[0];
+ }
+ return traverseEdge(points);
+ }
+ const calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => {
+ let prevPoint;
+ log$1.info(`our points ${JSON.stringify(points)}`);
+ if (points[0] !== initialPosition) {
+ points = points.reverse();
+ }
+ const distanceToCardinalityPoint = 25;
+ let remainingDistance = distanceToCardinalityPoint;
+ let center2;
+ prevPoint = void 0;
+ points.forEach((point2) => {
+ if (prevPoint && !center2) {
+ const vectorDistance = distance(point2, prevPoint);
+ if (vectorDistance < remainingDistance) {
+ remainingDistance -= vectorDistance;
+ } else {
+ const distanceRatio = remainingDistance / vectorDistance;
+ if (distanceRatio <= 0) {
+ center2 = prevPoint;
+ }
+ if (distanceRatio >= 1) {
+ center2 = { x: point2.x, y: point2.y };
+ }
+ if (distanceRatio > 0 && distanceRatio < 1) {
+ center2 = {
+ x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point2.x,
+ y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point2.y
+ };
+ }
+ }
+ }
+ prevPoint = point2;
+ });
+ 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) {
+ let points = JSON.parse(JSON.stringify(_points));
+ let prevPoint;
+ log$1.info("our points", points);
+ if (position2 !== "start_left" && position2 !== "start_right") {
+ points = points.reverse();
+ }
+ points.forEach((point2) => {
+ prevPoint = point2;
+ });
+ const distanceToCardinalityPoint = 25 + terminalMarkerSize;
+ let remainingDistance = distanceToCardinalityPoint;
+ let center2;
+ prevPoint = void 0;
+ points.forEach((point2) => {
+ if (prevPoint && !center2) {
+ const vectorDistance = distance(point2, prevPoint);
+ if (vectorDistance < remainingDistance) {
+ remainingDistance -= vectorDistance;
+ } else {
+ const distanceRatio = remainingDistance / vectorDistance;
+ if (distanceRatio <= 0) {
+ center2 = prevPoint;
+ }
+ if (distanceRatio >= 1) {
+ center2 = { x: point2.x, y: point2.y };
+ }
+ if (distanceRatio > 0 && distanceRatio < 1) {
+ center2 = {
+ x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point2.x,
+ y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point2.y
+ };
+ }
+ }
+ }
+ prevPoint = point2;
+ });
+ 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 };
+ cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center2.x) / 2;
+ cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center2.y) / 2;
+ 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;
+ }
+ 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;
+ }
+ 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;
+ }
+ 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 makeid(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 makeid(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
+ };
+ };
+ 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) {
+ config2 = Object.assign(
+ { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 15 },
+ config2
+ );
+ return calculateTextDimensions(text2, config2).height;
+ }
+ function calculateTextWidth(text2, config2) {
+ config2 = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, config2);
+ return calculateTextDimensions(text2, config2).width;
+ }
+ const calculateTextDimensions = memoize(
+ (text2, config2) => {
+ config2 = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial" }, config2);
+ const { fontSize, fontFamily, fontWeight } = 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}`
+ );
+ const initIdGenerator = class iterator {
+ constructor(deterministic, seed) {
+ this.deterministic = deterministic;
+ this.seed = seed;
+ this.count = seed ? seed.length : 0;
+ }
+ next() {
+ if (!this.deterministic) {
+ return Date.now();
+ }
+ return this.count++;
+ }
+ };
+ 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);
+ };
+ 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;
+ };
+ function isDetailedError(error) {
+ return "str" in error;
+ }
+ const insertTitle = (parent, cssClass, titleTopMargin, title2) => {
+ if (!title2) {
+ return;
+ }
+ const bounds2 = parent.node().getBBox();
+ 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,
+ initIdGenerator,
+ sanitizeDirective,
+ sanitizeCss,
+ insertTitle,
+ parseFontSize
+ };
+ 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.4.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$d = { draw: draw$k };
+ const errorRenderer = renderer$d;
+ const diagram$k = {
+ db: {},
+ renderer: renderer$d,
+ 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 title$1 = "";
+ let diagramTitle = "";
+ let description = "";
+ const sanitizeText$5 = (txt) => sanitizeText$6(txt, getConfig$2());
+ const clear$l = function() {
+ title$1 = "";
+ description = "";
+ diagramTitle = "";
+ };
+ const setAccTitle = function(txt) {
+ title$1 = sanitizeText$5(txt).replace(/^\s+/g, "");
+ };
+ const getAccTitle = function() {
+ return title$1 || diagramTitle;
+ };
+ const setAccDescription = function(txt) {
+ description = sanitizeText$5(txt).replace(/\n\s+/g, "\n");
+ };
+ const getAccDescription = function() {
+ return description;
+ };
+ const setDiagramTitle = function(txt) {
+ diagramTitle = sanitizeText$5(txt);
+ };
+ const getDiagramTitle = function() {
+ return diagramTitle;
+ };
+ const commonDb = {
+ getAccTitle,
+ setAccTitle,
+ getDiagramTitle,
+ setDiagramTitle,
+ getAccDescription,
+ setAccDescription,
+ clear: clear$l
+ };
+ const commonDb$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
+ __proto__: null,
+ clear: clear$l,
+ default: commonDb,
+ getAccDescription,
+ getAccTitle,
+ getDiagramTitle,
+ setAccDescription,
+ setAccTitle,
+ setDiagramTitle
+ }, Symbol.toStringTag, { value: "Module" }));
+ let currentDirective = {};
+ const parseDirective$e = function(p, statement, context, type2) {
+ log$1.debug("parseDirective is being called", statement, context, type2);
+ try {
+ if (statement !== void 0) {
+ statement = statement.trim();
+ switch (context) {
+ case "open_directive":
+ currentDirective = {};
+ break;
+ case "type_directive":
+ if (!currentDirective) {
+ throw new Error("currentDirective is undefined");
+ }
+ currentDirective.type = statement.toLowerCase();
+ break;
+ case "arg_directive":
+ if (!currentDirective) {
+ throw new Error("currentDirective is undefined");
+ }
+ currentDirective.args = JSON.parse(statement);
+ break;
+ case "close_directive":
+ handleDirective(p, currentDirective, type2);
+ currentDirective = void 0;
+ break;
+ }
+ }
+ } catch (error) {
+ log$1.error(
+ `Error while rendering sequenceDiagram directive: ${statement} jison context: ${context}`
+ );
+ log$1.error(error.message);
+ }
+ };
+ const handleDirective = function(p, directive, type2) {
+ log$1.info(`Directive type=${directive.type} with args:`, directive.args);
+ switch (directive.type) {
+ case "init":
+ case "initialize": {
+ ["config"].forEach((prop) => {
+ if (directive.args[prop] !== void 0) {
+ if (type2 === "flowchart-v2") {
+ type2 = "flowchart";
+ }
+ directive.args[type2] = directive.args[prop];
+ delete directive.args[prop];
+ }
+ });
+ addDirective(directive.args);
+ break;
+ }
+ case "wrap":
+ case "nowrap":
+ if (p && p["setWrap"]) {
+ p.setWrap(directive.type === "wrap");
+ }
+ break;
+ case "themeCss":
+ log$1.warn("themeCss encountered");
+ break;
+ default:
+ log$1.warn(
+ `Unhandled directive: source: '%%{${directive.type}: ${JSON.stringify(
+ directive.args ? directive.args : {}
+ )}}%%`,
+ directive
+ );
+ break;
+ }
+ };
+ 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$1;
+ };
+ const parseDirective$d = (p, statement, context, type2) => parseDirective$e(p, statement, context, type2);
+ const diagrams = {};
+ const registerDiagram = (id2, diagram2, detector2) => {
+ if (diagrams[id2]) {
+ throw new Error(`Diagram ${id2} already registered.`);
+ }
+ diagrams[id2] = diagram2;
+ if (detector2) {
+ addDetector(id2, detector2);
+ }
+ addStylesForDiagram(id2, diagram2.styles);
+ if (diagram2.injectUtils) {
+ diagram2.injectUtils(
+ log,
+ setLogLevel,
+ getConfig$1,
+ sanitizeText$4,
+ setupGraphViewbox,
+ getCommonDb$1(),
+ parseDirective$d
+ );
+ }
+ };
+ 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: {},
+ // should never be used
+ 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
+ );
+ };
+ /*! 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, db2, setDiagramConfig) {
+ var _a, _b;
+ const matches = text2.match(frontMatterRegex);
+ if (!matches) {
+ return text2;
+ }
+ const parsed = load(matches[1], {
+ // To support config, we need JSON schema.
+ // https://www.yaml.org/spec/1.2/spec.html#id2803231
+ schema: JSON_SCHEMA
+ });
+ if (parsed == null ? void 0 : parsed.title) {
+ (_a = db2.setDiagramTitle) == null ? void 0 : _a.call(db2, parsed.title.toString());
+ }
+ if (parsed == null ? void 0 : parsed.displayMode) {
+ (_b = db2.setDisplayMode) == null ? void 0 : _b.call(db2, parsed.displayMode.toString());
+ }
+ if (parsed == null ? void 0 : parsed.config) {
+ setDiagramConfig == null ? void 0 : setDiagramConfig(parsed.config);
+ }
+ return text2.slice(matches[0].length);
+ }
+ const cleanupComments = (text2) => {
+ return text2.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm, "");
+ };
+ class Diagram {
+ constructor(text2) {
+ this.text = text2;
+ 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;
+ const originalParse2 = this.parser.parse.bind(this.parser);
+ this.parser.parse = (text22) => originalParse2(cleanupComments(extractFrontMatter(text22, this.db, addDirective)));
+ this.parser.parser.yy = this.db;
+ this.init = diagram2.init;
+ this.parse();
+ }
+ parse() {
+ var _a, _b, _c;
+ if (this.detectError) {
+ throw this.detectError;
+ }
+ (_b = (_a = this.db).clear) == null ? void 0 : _b.call(_a);
+ (_c = this.init) == null ? void 0 : _c.call(this, getConfig$2());
+ 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) => {
+ 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);
+ };
+ 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 CLASSDEF_DIAGRAMS = [
+ "graph",
+ "flowchart",
+ "flowchart-v2",
+ "flowchart-elk",
+ "stateDiagram",
+ "stateDiagram-v2"
+ ];
+ 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"];
+ async function parse$3(text2, parseOptions) {
+ addDiagrams();
+ 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, graphType, 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) && CLASSDEF_DIAGRAMS.includes(graphType)) {
+ 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, graphType, 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;
+ addDiagrams();
+ reset();
+ extractFrontMatter(text2, {}, addDirective);
+ const graphInit = utils.detectInit(text2);
+ if (graphInit) {
+ addDirective(graphInit);
+ }
+ const config2 = getConfig$2();
+ log$1.debug(config2);
+ if (text2.length > ((config2 == null ? void 0 : config2.maxTextSize) ?? MAX_TEXTLENGTH)) {
+ text2 = MAX_TEXTLENGTH_EXCEEDED_MSG;
+ }
+ text2 = text2.replace(/\r\n?/g, "\n");
+ text2 = text2.replace(
+ /<(\w+)([^>]*)>/g,
+ (match, tag, attributes) => "<" + tag + attributes.replace(/="([^"]*)"/g, "='$1'") + ">"
+ );
+ 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);
+ } 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 = CLASSDEF_DIAGRAMS.includes(diagramType) ? diag.renderer.getClasses(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 = (_b = (_a = diag.db).getAccTitle) == null ? void 0 : _b.call(_a);
+ const a11yDescr = (_d = (_c = diag.db).getAccDescription) == null ? void 0 : _d.call(_c);
+ 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,
+ parseDirective: parseDirective$e,
+ 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, 6], $V1 = [1, 7], $V2 = [1, 8], $V3 = [1, 9], $V4 = [1, 16], $V5 = [1, 11], $V6 = [1, 12], $V7 = [1, 13], $V8 = [1, 14], $V9 = [1, 15], $Va = [1, 27], $Vb = [1, 33], $Vc = [1, 34], $Vd = [1, 35], $Ve = [1, 36], $Vf = [1, 37], $Vg = [1, 72], $Vh = [1, 73], $Vi = [1, 74], $Vj = [1, 75], $Vk = [1, 76], $Vl = [1, 77], $Vm = [1, 78], $Vn = [1, 38], $Vo = [1, 39], $Vp = [1, 40], $Vq = [1, 41], $Vr = [1, 42], $Vs = [1, 43], $Vt = [1, 44], $Vu = [1, 45], $Vv = [1, 46], $Vw = [1, 47], $Vx = [1, 48], $Vy = [1, 49], $Vz = [1, 50], $VA = [1, 51], $VB = [1, 52], $VC = [1, 53], $VD = [1, 54], $VE = [1, 55], $VF = [1, 56], $VG = [1, 57], $VH = [1, 59], $VI = [1, 60], $VJ = [1, 61], $VK = [1, 62], $VL = [1, 63], $VM = [1, 64], $VN = [1, 65], $VO = [1, 66], $VP = [1, 67], $VQ = [1, 68], $VR = [1, 69], $VS = [24, 52], $VT = [24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 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], $VU = [15, 24, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 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], $VV = [1, 94], $VW = [1, 95], $VX = [1, 96], $VY = [1, 97], $VZ = [15, 24, 52], $V_ = [7, 8, 9, 10, 18, 22, 25, 26, 27, 28], $V$ = [15, 24, 43, 52], $V01 = [15, 24, 43, 52, 86, 87, 89, 90], $V11 = [15, 43], $V21 = [44, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 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];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "directive": 6, "direction_tb": 7, "direction_bt": 8, "direction_rl": 9, "direction_lr": 10, "graphConfig": 11, "openDirective": 12, "typeDirective": 13, "closeDirective": 14, "NEWLINE": 15, ":": 16, "argDirective": 17, "open_directive": 18, "type_directive": 19, "arg_directive": 20, "close_directive": 21, "C4_CONTEXT": 22, "statements": 23, "EOF": 24, "C4_CONTAINER": 25, "C4_COMPONENT": 26, "C4_DYNAMIC": 27, "C4_DEPLOYMENT": 28, "otherStatements": 29, "diagramStatements": 30, "otherStatement": 31, "title": 32, "accDescription": 33, "acc_title": 34, "acc_title_value": 35, "acc_descr": 36, "acc_descr_value": 37, "acc_descr_multiline_value": 38, "boundaryStatement": 39, "boundaryStartStatement": 40, "boundaryStopStatement": 41, "boundaryStart": 42, "LBRACE": 43, "ENTERPRISE_BOUNDARY": 44, "attributes": 45, "SYSTEM_BOUNDARY": 46, "BOUNDARY": 47, "CONTAINER_BOUNDARY": 48, "NODE": 49, "NODE_L": 50, "NODE_R": 51, "RBRACE": 52, "diagramStatement": 53, "PERSON": 54, "PERSON_EXT": 55, "SYSTEM": 56, "SYSTEM_DB": 57, "SYSTEM_QUEUE": 58, "SYSTEM_EXT": 59, "SYSTEM_EXT_DB": 60, "SYSTEM_EXT_QUEUE": 61, "CONTAINER": 62, "CONTAINER_DB": 63, "CONTAINER_QUEUE": 64, "CONTAINER_EXT": 65, "CONTAINER_EXT_DB": 66, "CONTAINER_EXT_QUEUE": 67, "COMPONENT": 68, "COMPONENT_DB": 69, "COMPONENT_QUEUE": 70, "COMPONENT_EXT": 71, "COMPONENT_EXT_DB": 72, "COMPONENT_EXT_QUEUE": 73, "REL": 74, "BIREL": 75, "REL_U": 76, "REL_D": 77, "REL_L": 78, "REL_R": 79, "REL_B": 80, "REL_INDEX": 81, "UPDATE_EL_STYLE": 82, "UPDATE_REL_STYLE": 83, "UPDATE_LAYOUT_CONFIG": 84, "attribute": 85, "STR": 86, "STR_KEY": 87, "STR_VALUE": 88, "ATTRIBUTE": 89, "ATTRIBUTE_EMPTY": 90, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 7: "direction_tb", 8: "direction_bt", 9: "direction_rl", 10: "direction_lr", 15: "NEWLINE", 16: ":", 18: "open_directive", 19: "type_directive", 20: "arg_directive", 21: "close_directive", 22: "C4_CONTEXT", 24: "EOF", 25: "C4_CONTAINER", 26: "C4_COMPONENT", 27: "C4_DYNAMIC", 28: "C4_DEPLOYMENT", 32: "title", 33: "accDescription", 34: "acc_title", 35: "acc_title_value", 36: "acc_descr", 37: "acc_descr_value", 38: "acc_descr_multiline_value", 43: "LBRACE", 44: "ENTERPRISE_BOUNDARY", 46: "SYSTEM_BOUNDARY", 47: "BOUNDARY", 48: "CONTAINER_BOUNDARY", 49: "NODE", 50: "NODE_L", 51: "NODE_R", 52: "RBRACE", 54: "PERSON", 55: "PERSON_EXT", 56: "SYSTEM", 57: "SYSTEM_DB", 58: "SYSTEM_QUEUE", 59: "SYSTEM_EXT", 60: "SYSTEM_EXT_DB", 61: "SYSTEM_EXT_QUEUE", 62: "CONTAINER", 63: "CONTAINER_DB", 64: "CONTAINER_QUEUE", 65: "CONTAINER_EXT", 66: "CONTAINER_EXT_DB", 67: "CONTAINER_EXT_QUEUE", 68: "COMPONENT", 69: "COMPONENT_DB", 70: "COMPONENT_QUEUE", 71: "COMPONENT_EXT", 72: "COMPONENT_EXT_DB", 73: "COMPONENT_EXT_QUEUE", 74: "REL", 75: "BIREL", 76: "REL_U", 77: "REL_D", 78: "REL_L", 79: "REL_R", 80: "REL_B", 81: "REL_INDEX", 82: "UPDATE_EL_STYLE", 83: "UPDATE_REL_STYLE", 84: "UPDATE_LAYOUT_CONFIG", 86: "STR", 87: "STR_KEY", 88: "STR_VALUE", 89: "ATTRIBUTE", 90: "ATTRIBUTE_EMPTY" },
+ productions_: [0, [3, 1], [3, 1], [3, 2], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [6, 4], [6, 6], [12, 1], [13, 1], [17, 1], [14, 1], [11, 4], [11, 4], [11, 4], [11, 4], [11, 4], [23, 1], [23, 1], [23, 2], [29, 1], [29, 2], [29, 3], [31, 1], [31, 1], [31, 2], [31, 2], [31, 1], [39, 3], [40, 3], [40, 3], [40, 4], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [42, 2], [41, 1], [30, 1], [30, 2], [30, 3], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 1], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [53, 2], [45, 1], [45, 2], [85, 1], [85, 2], [85, 1], [85, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 4:
+ yy.setDirection("TB");
+ break;
+ case 5:
+ yy.setDirection("BT");
+ break;
+ case 6:
+ yy.setDirection("RL");
+ break;
+ case 7:
+ yy.setDirection("LR");
+ break;
+ case 11:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 12:
+ break;
+ case 13:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 14:
+ yy.parseDirective("}%%", "close_directive", "c4Context");
+ break;
+ case 15:
+ case 16:
+ case 17:
+ case 18:
+ case 19:
+ yy.setC4Type($$[$0 - 3]);
+ break;
+ case 26:
+ yy.setTitle($$[$0].substring(6));
+ this.$ = $$[$0].substring(6);
+ break;
+ case 27:
+ yy.setAccDescription($$[$0].substring(15));
+ this.$ = $$[$0].substring(15);
+ break;
+ case 28:
+ this.$ = $$[$0].trim();
+ yy.setTitle(this.$);
+ break;
+ case 29:
+ case 30:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 35:
+ case 36:
+ $$[$0].splice(2, 0, "ENTERPRISE");
+ yy.addPersonOrSystemBoundary(...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 37:
+ yy.addPersonOrSystemBoundary(...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 38:
+ $$[$0].splice(2, 0, "CONTAINER");
+ yy.addContainerBoundary(...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 39:
+ yy.addDeploymentNode("node", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 40:
+ yy.addDeploymentNode("nodeL", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 41:
+ yy.addDeploymentNode("nodeR", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 42:
+ yy.popBoundaryParseStack();
+ break;
+ case 46:
+ yy.addPersonOrSystem("person", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 47:
+ yy.addPersonOrSystem("external_person", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 48:
+ yy.addPersonOrSystem("system", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 49:
+ yy.addPersonOrSystem("system_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 50:
+ yy.addPersonOrSystem("system_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 51:
+ yy.addPersonOrSystem("external_system", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 52:
+ yy.addPersonOrSystem("external_system_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 53:
+ yy.addPersonOrSystem("external_system_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 54:
+ yy.addContainer("container", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 55:
+ yy.addContainer("container_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 56:
+ yy.addContainer("container_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 57:
+ yy.addContainer("external_container", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 58:
+ yy.addContainer("external_container_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 59:
+ yy.addContainer("external_container_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 60:
+ yy.addComponent("component", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 61:
+ yy.addComponent("component_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 62:
+ yy.addComponent("component_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 63:
+ yy.addComponent("external_component", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 64:
+ yy.addComponent("external_component_db", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 65:
+ yy.addComponent("external_component_queue", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 67:
+ yy.addRel("rel", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 68:
+ yy.addRel("birel", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 69:
+ yy.addRel("rel_u", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 70:
+ yy.addRel("rel_d", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 71:
+ yy.addRel("rel_l", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 72:
+ yy.addRel("rel_r", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 73:
+ yy.addRel("rel_b", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 74:
+ $$[$0].splice(0, 1);
+ yy.addRel("rel", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 75:
+ yy.updateElStyle("update_el_style", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 76:
+ yy.updateRelStyle("update_rel_style", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 77:
+ yy.updateLayoutConfig("update_layout_config", ...$$[$0]);
+ this.$ = $$[$0];
+ break;
+ case 78:
+ this.$ = [$$[$0]];
+ break;
+ case 79:
+ $$[$0].unshift($$[$0 - 1]);
+ this.$ = $$[$0];
+ break;
+ case 80:
+ case 82:
+ this.$ = $$[$0].trim();
+ break;
+ case 81:
+ let kv = {};
+ kv[$$[$0 - 1].trim()] = $$[$0].trim();
+ this.$ = kv;
+ break;
+ case 83:
+ this.$ = "";
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: $V0, 8: $V1, 9: $V2, 10: $V3, 11: 5, 12: 10, 18: $V4, 22: $V5, 25: $V6, 26: $V7, 27: $V8, 28: $V9 }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 3: 17, 4: 2, 5: 3, 6: 4, 7: $V0, 8: $V1, 9: $V2, 10: $V3, 11: 5, 12: 10, 18: $V4, 22: $V5, 25: $V6, 26: $V7, 27: $V8, 28: $V9 }, { 1: [2, 8] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 1: [2, 7] }, { 13: 18, 19: [1, 19] }, { 15: [1, 20] }, { 15: [1, 21] }, { 15: [1, 22] }, { 15: [1, 23] }, { 15: [1, 24] }, { 19: [2, 11] }, { 1: [2, 3] }, { 14: 25, 16: [1, 26], 21: $Va }, o([16, 21], [2, 12]), { 23: 28, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 79, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 80, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 81, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 23: 82, 29: 29, 30: 30, 31: 31, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 15: [1, 83] }, { 17: 84, 20: [1, 85] }, { 15: [2, 14] }, { 24: [1, 86] }, o($VS, [2, 20], { 53: 32, 39: 58, 40: 70, 42: 71, 30: 87, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }), o($VS, [2, 21]), o($VT, [2, 23], { 15: [1, 88] }), o($VS, [2, 43], { 15: [1, 89] }), o($VU, [2, 26]), o($VU, [2, 27]), { 35: [1, 90] }, { 37: [1, 91] }, o($VU, [2, 30]), { 45: 92, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 98, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 99, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 100, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 101, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 102, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 103, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 104, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 105, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 106, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 107, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 108, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 109, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 110, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 111, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 112, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 113, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 114, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 115, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 116, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, o($VZ, [2, 66]), { 45: 117, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 118, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 119, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 120, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 121, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 122, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 123, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 124, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 125, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 126, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 127, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 30: 128, 39: 58, 40: 70, 42: 71, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 53: 32, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }, { 15: [1, 130], 43: [1, 129] }, { 45: 131, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 132, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 133, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 134, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 135, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 136, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 45: 137, 85: 93, 86: $VV, 87: $VW, 89: $VX, 90: $VY }, { 24: [1, 138] }, { 24: [1, 139] }, { 24: [1, 140] }, { 24: [1, 141] }, o($V_, [2, 9]), { 14: 142, 21: $Va }, { 21: [2, 13] }, { 1: [2, 15] }, o($VS, [2, 22]), o($VT, [2, 24], { 31: 31, 29: 143, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf }), o($VS, [2, 44], { 29: 29, 30: 30, 31: 31, 53: 32, 39: 58, 40: 70, 42: 71, 23: 144, 32: $Vb, 33: $Vc, 34: $Vd, 36: $Ve, 38: $Vf, 44: $Vg, 46: $Vh, 47: $Vi, 48: $Vj, 49: $Vk, 50: $Vl, 51: $Vm, 54: $Vn, 55: $Vo, 56: $Vp, 57: $Vq, 58: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 63: $Vw, 64: $Vx, 65: $Vy, 66: $Vz, 67: $VA, 68: $VB, 69: $VC, 70: $VD, 71: $VE, 72: $VF, 73: $VG, 74: $VH, 75: $VI, 76: $VJ, 77: $VK, 78: $VL, 79: $VM, 80: $VN, 81: $VO, 82: $VP, 83: $VQ, 84: $VR }), o($VU, [2, 28]), o($VU, [2, 29]), o($VZ, [2, 46]), o($V$, [2, 78], { 85: 93, 45: 145, 86: $VV, 87: $VW, 89: $VX, 90: $VY }), o($V01, [2, 80]), { 88: [1, 146] }, o($V01, [2, 82]), o($V01, [2, 83]), o($VZ, [2, 47]), o($VZ, [2, 48]), o($VZ, [2, 49]), o($VZ, [2, 50]), o($VZ, [2, 51]), o($VZ, [2, 52]), o($VZ, [2, 53]), o($VZ, [2, 54]), o($VZ, [2, 55]), o($VZ, [2, 56]), o($VZ, [2, 57]), o($VZ, [2, 58]), o($VZ, [2, 59]), o($VZ, [2, 60]), o($VZ, [2, 61]), o($VZ, [2, 62]), o($VZ, [2, 63]), o($VZ, [2, 64]), o($VZ, [2, 65]), o($VZ, [2, 67]), o($VZ, [2, 68]), o($VZ, [2, 69]), o($VZ, [2, 70]), o($VZ, [2, 71]), o($VZ, [2, 72]), o($VZ, [2, 73]), o($VZ, [2, 74]), o($VZ, [2, 75]), o($VZ, [2, 76]), o($VZ, [2, 77]), { 41: 147, 52: [1, 148] }, { 15: [1, 149] }, { 43: [1, 150] }, o($V11, [2, 35]), o($V11, [2, 36]), o($V11, [2, 37]), o($V11, [2, 38]), o($V11, [2, 39]), o($V11, [2, 40]), o($V11, [2, 41]), { 1: [2, 16] }, { 1: [2, 17] }, { 1: [2, 18] }, { 1: [2, 19] }, { 15: [1, 151] }, o($VT, [2, 25]), o($VS, [2, 45]), o($V$, [2, 79]), o($V01, [2, 81]), o($VZ, [2, 31]), o($VZ, [2, 42]), o($V21, [2, 32]), o($V21, [2, 33], { 15: [1, 152] }), o($V_, [2, 10]), o($V21, [2, 34])],
+ defaultActions: { 2: [2, 1], 3: [2, 2], 5: [2, 8], 6: [2, 4], 7: [2, 5], 8: [2, 6], 9: [2, 7], 16: [2, 11], 17: [2, 3], 27: [2, 14], 85: [2, 13], 86: [2, 15], 138: [2, 16], 139: [2, 17], 140: [2, 18], 141: [2, 19] },
+ 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("open_directive");
+ return 18;
+ case 1:
+ return 7;
+ case 2:
+ return 8;
+ case 3:
+ return 9;
+ case 4:
+ return 10;
+ case 5:
+ this.begin("type_directive");
+ return 19;
+ case 6:
+ this.popState();
+ this.begin("arg_directive");
+ return 16;
+ case 7:
+ this.popState();
+ this.popState();
+ return 21;
+ case 8:
+ return 20;
+ case 9:
+ return 32;
+ case 10:
+ return 33;
+ case 11:
+ this.begin("acc_title");
+ return 34;
+ case 12:
+ this.popState();
+ return "acc_title_value";
+ case 13:
+ this.begin("acc_descr");
+ return 36;
+ case 14:
+ this.popState();
+ return "acc_descr_value";
+ case 15:
+ this.begin("acc_descr_multiline");
+ break;
+ case 16:
+ this.popState();
+ break;
+ case 17:
+ return "acc_descr_multiline_value";
+ case 18:
+ break;
+ case 19:
+ c;
+ break;
+ case 20:
+ return 15;
+ case 21:
+ break;
+ case 22:
+ return 22;
+ case 23:
+ return 25;
+ case 24:
+ return 26;
+ case 25:
+ return 27;
+ case 26:
+ return 28;
+ case 27:
+ this.begin("person_ext");
+ return 55;
+ case 28:
+ this.begin("person");
+ return 54;
+ case 29:
+ this.begin("system_ext_queue");
+ return 61;
+ case 30:
+ this.begin("system_ext_db");
+ return 60;
+ case 31:
+ this.begin("system_ext");
+ return 59;
+ case 32:
+ this.begin("system_queue");
+ return 58;
+ case 33:
+ this.begin("system_db");
+ return 57;
+ case 34:
+ this.begin("system");
+ return 56;
+ case 35:
+ this.begin("boundary");
+ return 47;
+ case 36:
+ this.begin("enterprise_boundary");
+ return 44;
+ case 37:
+ this.begin("system_boundary");
+ return 46;
+ case 38:
+ this.begin("container_ext_queue");
+ return 67;
+ case 39:
+ this.begin("container_ext_db");
+ return 66;
+ case 40:
+ this.begin("container_ext");
+ return 65;
+ case 41:
+ this.begin("container_queue");
+ return 64;
+ case 42:
+ this.begin("container_db");
+ return 63;
+ case 43:
+ this.begin("container");
+ return 62;
+ case 44:
+ this.begin("container_boundary");
+ return 48;
+ case 45:
+ this.begin("component_ext_queue");
+ return 73;
+ case 46:
+ this.begin("component_ext_db");
+ return 72;
+ case 47:
+ this.begin("component_ext");
+ return 71;
+ case 48:
+ this.begin("component_queue");
+ return 70;
+ case 49:
+ this.begin("component_db");
+ return 69;
+ case 50:
+ this.begin("component");
+ return 68;
+ case 51:
+ this.begin("node");
+ return 49;
+ case 52:
+ this.begin("node");
+ return 49;
+ case 53:
+ this.begin("node_l");
+ return 50;
+ case 54:
+ this.begin("node_r");
+ return 51;
+ case 55:
+ this.begin("rel");
+ return 74;
+ case 56:
+ this.begin("birel");
+ return 75;
+ case 57:
+ this.begin("rel_u");
+ return 76;
+ case 58:
+ this.begin("rel_u");
+ return 76;
+ case 59:
+ this.begin("rel_d");
+ return 77;
+ case 60:
+ this.begin("rel_d");
+ return 77;
+ case 61:
+ this.begin("rel_l");
+ return 78;
+ case 62:
+ this.begin("rel_l");
+ return 78;
+ case 63:
+ this.begin("rel_r");
+ return 79;
+ case 64:
+ this.begin("rel_r");
+ return 79;
+ case 65:
+ this.begin("rel_b");
+ return 80;
+ case 66:
+ this.begin("rel_index");
+ return 81;
+ case 67:
+ this.begin("update_el_style");
+ return 82;
+ case 68:
+ this.begin("update_rel_style");
+ return 83;
+ case 69:
+ this.begin("update_layout_config");
+ return 84;
+ case 70:
+ return "EOF_IN_STRUCT";
+ case 71:
+ this.begin("attribute");
+ return "ATTRIBUTE_EMPTY";
+ case 72:
+ this.begin("attribute");
+ break;
+ case 73:
+ this.popState();
+ this.popState();
+ break;
+ case 74:
+ return 90;
+ case 75:
+ break;
+ case 76:
+ return 90;
+ case 77:
+ this.begin("string");
+ break;
+ case 78:
+ this.popState();
+ break;
+ case 79:
+ return "STR";
+ case 80:
+ this.begin("string_kv");
+ break;
+ case 81:
+ this.begin("string_kv_key");
+ return "STR_KEY";
+ case 82:
+ this.popState();
+ this.begin("string_kv_value");
+ break;
+ case 83:
+ return "STR_VALUE";
+ case 84:
+ this.popState();
+ this.popState();
+ break;
+ case 85:
+ return "STR";
+ case 86:
+ return "LBRACE";
+ case 87:
+ return "RBRACE";
+ case 88:
+ return "SPACE";
+ case 89:
+ return "EOL";
+ case 90:
+ return 24;
+ }
+ },
+ rules: [/^(?:%%\{)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\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": [16, 17], "inclusive": false }, "acc_descr": { "rules": [14], "inclusive": false }, "acc_title": { "rules": [12], "inclusive": false }, "close_directive": { "rules": [], "inclusive": false }, "arg_directive": { "rules": [7, 8], "inclusive": false }, "type_directive": { "rules": [6, 7], "inclusive": false }, "open_directive": { "rules": [5], "inclusive": false }, "string_kv_value": { "rules": [83, 84], "inclusive": false }, "string_kv_key": { "rules": [82], "inclusive": false }, "string_kv": { "rules": [81], "inclusive": false }, "string": { "rules": [78, 79], "inclusive": false }, "attribute": { "rules": [73, 74, 75, 76, 77, 80, 85], "inclusive": false }, "update_layout_config": { "rules": [70, 71, 72, 73], "inclusive": false }, "update_rel_style": { "rules": [70, 71, 72, 73], "inclusive": false }, "update_el_style": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_b": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_r": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_l": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_d": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_u": { "rules": [70, 71, 72, 73], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [70, 71, 72, 73], "inclusive": false }, "node_r": { "rules": [70, 71, 72, 73], "inclusive": false }, "node_l": { "rules": [70, 71, 72, 73], "inclusive": false }, "node": { "rules": [70, 71, 72, 73], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [70, 71, 72, 73], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "component_ext": { "rules": [70, 71, 72, 73], "inclusive": false }, "component_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "component_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "component": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_boundary": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_ext_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_ext_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_ext": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "container_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "container": { "rules": [70, 71, 72, 73], "inclusive": false }, "birel": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_boundary": { "rules": [70, 71, 72, 73], "inclusive": false }, "enterprise_boundary": { "rules": [70, 71, 72, 73], "inclusive": false }, "boundary": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_ext_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_ext_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_ext": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_queue": { "rules": [70, 71, 72, 73], "inclusive": false }, "system_db": { "rules": [70, 71, 72, 73], "inclusive": false }, "system": { "rules": [70, 71, 72, 73], "inclusive": false }, "person_ext": { "rules": [70, 71, 72, 73], "inclusive": false }, "person": { "rules": [70, 71, 72, 73], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 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, 65, 66, 67, 68, 69, 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$q.parser = parser$q;
+ const c4Parser = 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 parseDirective$c = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ 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 c4Db = {
+ 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,
+ parseDirective: parseDirective$c,
+ 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 = c4Db;
+ 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 c4Renderer = {
+ drawPersonOrSystemArray: drawC4ShapeArray,
+ drawBoundary,
+ setConf: setConf$9,
+ draw: draw$j
+ };
+ const getStyles$d = (options2) => `.person {
+ stroke: ${options2.personBorder};
+ fill: ${options2.personBkg};
+ }
+`;
+ const c4Styles = getStyles$d;
+ const diagram$j = {
+ parser: c4Parser,
+ db: c4Db,
+ renderer: c4Renderer,
+ styles: c4Styles,
+ init: (cnf) => {
+ c4Renderer.setConf(cnf.c4);
+ }
+ };
+ 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, 9], $V1 = [1, 7], $V2 = [1, 6], $V3 = [1, 8], $V4 = [1, 20, 21, 22, 23, 38, 45, 47, 49, 53, 69, 92, 93, 94, 95, 96, 97, 110, 113, 114, 117, 119, 122, 123, 124, 129, 130, 131, 132], $V5 = [2, 10], $V6 = [1, 20], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 23], $Va = [1, 30], $Vb = [1, 32], $Vc = [1, 33], $Vd = [1, 34], $Ve = [1, 56], $Vf = [1, 55], $Vg = [1, 36], $Vh = [1, 37], $Vi = [1, 38], $Vj = [1, 39], $Vk = [1, 40], $Vl = [1, 51], $Vm = [1, 53], $Vn = [1, 49], $Vo = [1, 54], $Vp = [1, 50], $Vq = [1, 57], $Vr = [1, 52], $Vs = [1, 58], $Vt = [1, 59], $Vu = [1, 41], $Vv = [1, 42], $Vw = [1, 43], $Vx = [1, 44], $Vy = [1, 62], $Vz = [1, 67], $VA = [1, 20, 21, 22, 23, 38, 43, 45, 47, 49, 53, 69, 92, 93, 94, 95, 96, 97, 110, 113, 114, 117, 119, 122, 123, 124, 129, 130, 131, 132], $VB = [1, 71], $VC = [1, 70], $VD = [1, 72], $VE = [20, 21, 23, 84, 86], $VF = [1, 98], $VG = [1, 103], $VH = [1, 102], $VI = [1, 99], $VJ = [1, 95], $VK = [1, 101], $VL = [1, 97], $VM = [1, 104], $VN = [1, 100], $VO = [1, 105], $VP = [1, 96], $VQ = [20, 21, 22, 23, 84, 86], $VR = [20, 21, 22, 23, 55, 84, 86], $VS = [20, 21, 22, 23, 40, 53, 55, 57, 59, 61, 63, 65, 67, 69, 72, 74, 76, 77, 79, 84, 86, 97, 110, 113, 114, 117, 119, 122, 123, 124], $VT = [20, 21, 23], $VU = [20, 21, 23, 53, 69, 84, 86, 97, 110, 113, 114, 117, 119, 122, 123, 124], $VV = [1, 12, 20, 21, 22, 23, 24, 38, 43, 45, 47, 49, 53, 69, 92, 93, 94, 95, 96, 97, 110, 113, 114, 117, 119, 122, 123, 124, 129, 130, 131, 132], $VW = [53, 69, 97, 110, 113, 114, 117, 119, 122, 123, 124], $VX = [1, 134], $VY = [1, 133], $VZ = [1, 141], $V_ = [1, 155], $V$ = [1, 156], $V01 = [1, 157], $V11 = [1, 158], $V21 = [1, 143], $V31 = [1, 145], $V41 = [1, 149], $V51 = [1, 150], $V61 = [1, 151], $V71 = [1, 152], $V81 = [1, 153], $V91 = [1, 154], $Va1 = [1, 159], $Vb1 = [1, 160], $Vc1 = [1, 139], $Vd1 = [1, 140], $Ve1 = [1, 147], $Vf1 = [1, 142], $Vg1 = [1, 146], $Vh1 = [1, 144], $Vi1 = [20, 21, 22, 23, 38, 43, 45, 47, 49, 53, 69, 92, 93, 94, 95, 96, 97, 110, 113, 114, 117, 119, 122, 123, 124, 129, 130, 131, 132], $Vj1 = [1, 162], $Vk1 = [20, 21, 22, 23, 26, 53, 69, 97, 113, 114, 117, 119, 122, 123, 124], $Vl1 = [1, 182], $Vm1 = [1, 178], $Vn1 = [1, 179], $Vo1 = [1, 183], $Vp1 = [1, 180], $Vq1 = [1, 181], $Vr1 = [12, 21, 22, 24], $Vs1 = [86, 124, 127], $Vt1 = [20, 21, 22, 23, 24, 26, 38, 40, 43, 53, 69, 84, 92, 93, 94, 95, 96, 97, 98, 113, 117, 119, 122, 123, 124], $Vu1 = [22, 114], $Vv1 = [42, 58, 60, 62, 64, 66, 71, 73, 75, 76, 78, 80, 124, 125, 126], $Vw1 = [1, 250], $Vx1 = [1, 248], $Vy1 = [1, 252], $Vz1 = [1, 246], $VA1 = [1, 247], $VB1 = [1, 249], $VC1 = [1, 251], $VD1 = [1, 253], $VE1 = [1, 270], $VF1 = [20, 21, 23, 114], $VG1 = [20, 21, 22, 23, 69, 92, 113, 114, 117, 118, 119, 120];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "directive": 5, "openDirective": 6, "typeDirective": 7, "closeDirective": 8, "separator": 9, ":": 10, "argDirective": 11, "open_directive": 12, "type_directive": 13, "arg_directive": 14, "close_directive": 15, "graphConfig": 16, "document": 17, "line": 18, "statement": 19, "SEMI": 20, "NEWLINE": 21, "SPACE": 22, "EOF": 23, "GRAPH": 24, "NODIR": 25, "DIR": 26, "FirstStmtSeperator": 27, "ending": 28, "endToken": 29, "spaceList": 30, "spaceListNewline": 31, "verticeStatement": 32, "styleStatement": 33, "linkStyleStatement": 34, "classDefStatement": 35, "classStatement": 36, "clickStatement": 37, "subgraph": 38, "textNoTags": 39, "SQS": 40, "text": 41, "SQE": 42, "end": 43, "direction": 44, "acc_title": 45, "acc_title_value": 46, "acc_descr": 47, "acc_descr_value": 48, "acc_descr_multiline_value": 49, "link": 50, "node": 51, "styledVertex": 52, "AMP": 53, "vertex": 54, "STYLE_SEPARATOR": 55, "idString": 56, "DOUBLECIRCLESTART": 57, "DOUBLECIRCLEEND": 58, "PS": 59, "PE": 60, "(-": 61, "-)": 62, "STADIUMSTART": 63, "STADIUMEND": 64, "SUBROUTINESTART": 65, "SUBROUTINEEND": 66, "VERTEX_WITH_PROPS_START": 67, "NODE_STRING[field]": 68, "COLON": 69, "NODE_STRING[value]": 70, "PIPE": 71, "CYLINDERSTART": 72, "CYLINDEREND": 73, "DIAMOND_START": 74, "DIAMOND_STOP": 75, "TAGEND": 76, "TRAPSTART": 77, "TRAPEND": 78, "INVTRAPSTART": 79, "INVTRAPEND": 80, "linkStatement": 81, "arrowText": 82, "TESTSTR": 83, "START_LINK": 84, "edgeText": 85, "LINK": 86, "edgeTextToken": 87, "STR": 88, "MD_STR": 89, "textToken": 90, "keywords": 91, "STYLE": 92, "LINKSTYLE": 93, "CLASSDEF": 94, "CLASS": 95, "CLICK": 96, "DOWN": 97, "UP": 98, "textNoTagsToken": 99, "stylesOpt": 100, "idString[vertex]": 101, "idString[class]": 102, "CALLBACKNAME": 103, "CALLBACKARGS": 104, "HREF": 105, "LINK_TARGET": 106, "STR[link]": 107, "STR[tooltip]": 108, "alphaNum": 109, "DEFAULT": 110, "numList": 111, "INTERPOLATE": 112, "NUM": 113, "COMMA": 114, "style": 115, "styleComponent": 116, "NODE_STRING": 117, "UNIT": 118, "BRKT": 119, "PCT": 120, "idStringToken": 121, "MINUS": 122, "MULT": 123, "UNICODE_TEXT": 124, "TEXT": 125, "TAGSTART": 126, "EDGE_TEXT": 127, "alphaNumToken": 128, "direction_tb": 129, "direction_bt": 130, "direction_rl": 131, "direction_lr": 132, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 10: ":", 12: "open_directive", 13: "type_directive", 14: "arg_directive", 15: "close_directive", 20: "SEMI", 21: "NEWLINE", 22: "SPACE", 23: "EOF", 24: "GRAPH", 25: "NODIR", 26: "DIR", 38: "subgraph", 40: "SQS", 42: "SQE", 43: "end", 45: "acc_title", 46: "acc_title_value", 47: "acc_descr", 48: "acc_descr_value", 49: "acc_descr_multiline_value", 53: "AMP", 55: "STYLE_SEPARATOR", 57: "DOUBLECIRCLESTART", 58: "DOUBLECIRCLEEND", 59: "PS", 60: "PE", 61: "(-", 62: "-)", 63: "STADIUMSTART", 64: "STADIUMEND", 65: "SUBROUTINESTART", 66: "SUBROUTINEEND", 67: "VERTEX_WITH_PROPS_START", 68: "NODE_STRING[field]", 69: "COLON", 70: "NODE_STRING[value]", 71: "PIPE", 72: "CYLINDERSTART", 73: "CYLINDEREND", 74: "DIAMOND_START", 75: "DIAMOND_STOP", 76: "TAGEND", 77: "TRAPSTART", 78: "TRAPEND", 79: "INVTRAPSTART", 80: "INVTRAPEND", 83: "TESTSTR", 84: "START_LINK", 86: "LINK", 88: "STR", 89: "MD_STR", 92: "STYLE", 93: "LINKSTYLE", 94: "CLASSDEF", 95: "CLASS", 96: "CLICK", 97: "DOWN", 98: "UP", 101: "idString[vertex]", 102: "idString[class]", 103: "CALLBACKNAME", 104: "CALLBACKARGS", 105: "HREF", 106: "LINK_TARGET", 107: "STR[link]", 108: "STR[tooltip]", 110: "DEFAULT", 112: "INTERPOLATE", 113: "NUM", 114: "COMMA", 117: "NODE_STRING", 118: "UNIT", 119: "BRKT", 120: "PCT", 122: "MINUS", 123: "MULT", 124: "UNICODE_TEXT", 125: "TEXT", 126: "TAGSTART", 127: "EDGE_TEXT", 129: "direction_tb", 130: "direction_bt", 131: "direction_rl", 132: "direction_lr" },
+ productions_: [0, [3, 1], [3, 2], [5, 4], [5, 6], [6, 1], [7, 1], [11, 1], [8, 1], [4, 2], [17, 0], [17, 2], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [16, 2], [16, 2], [16, 2], [16, 3], [28, 2], [28, 1], [29, 1], [29, 1], [29, 1], [27, 1], [27, 1], [27, 2], [31, 2], [31, 2], [31, 1], [31, 1], [30, 2], [30, 1], [19, 2], [19, 2], [19, 2], [19, 2], [19, 2], [19, 2], [19, 9], [19, 6], [19, 4], [19, 1], [19, 2], [19, 2], [19, 1], [9, 1], [9, 1], [9, 1], [32, 3], [32, 4], [32, 2], [32, 1], [51, 1], [51, 5], [52, 1], [52, 3], [54, 4], [54, 4], [54, 6], [54, 4], [54, 4], [54, 4], [54, 8], [54, 4], [54, 4], [54, 4], [54, 6], [54, 4], [54, 4], [54, 4], [54, 4], [54, 4], [54, 1], [50, 2], [50, 3], [50, 3], [50, 1], [50, 3], [85, 1], [85, 2], [85, 1], [85, 1], [81, 1], [82, 3], [41, 1], [41, 2], [41, 1], [41, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [39, 1], [39, 2], [39, 1], [39, 1], [35, 5], [36, 5], [37, 2], [37, 4], [37, 3], [37, 5], [37, 3], [37, 5], [37, 5], [37, 7], [37, 2], [37, 4], [37, 2], [37, 4], [37, 4], [37, 6], [33, 5], [34, 5], [34, 5], [34, 9], [34, 9], [34, 7], [34, 7], [111, 1], [111, 3], [100, 1], [100, 3], [115, 1], [115, 2], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [116, 1], [121, 1], [121, 1], [121, 1], [121, 1], [121, 1], [121, 1], [121, 1], [121, 1], [121, 1], [121, 1], [121, 1], [90, 1], [90, 1], [90, 1], [90, 1], [99, 1], [99, 1], [99, 1], [99, 1], [99, 1], [99, 1], [99, 1], [99, 1], [99, 1], [99, 1], [99, 1], [87, 1], [87, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [128, 1], [56, 1], [56, 2], [109, 1], [109, 2], [44, 1], [44, 1], [44, 1], [44, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 5:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 6:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 7:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 8:
+ yy.parseDirective("}%%", "close_directive", "flowchart");
+ break;
+ case 10:
+ this.$ = [];
+ break;
+ case 11:
+ if (!Array.isArray($$[$0]) || $$[$0].length > 0) {
+ $$[$0 - 1].push($$[$0]);
+ }
+ this.$ = $$[$0 - 1];
+ break;
+ case 12:
+ case 184:
+ this.$ = $$[$0];
+ break;
+ case 19:
+ yy.setDirection("TB");
+ this.$ = "TB";
+ break;
+ case 20:
+ yy.setDirection($$[$0 - 1]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 35:
+ this.$ = $$[$0 - 1].nodes;
+ break;
+ case 36:
+ case 37:
+ case 38:
+ case 39:
+ case 40:
+ this.$ = [];
+ break;
+ case 41:
+ this.$ = yy.addSubGraph($$[$0 - 6], $$[$0 - 1], $$[$0 - 4]);
+ break;
+ case 42:
+ this.$ = yy.addSubGraph($$[$0 - 3], $$[$0 - 1], $$[$0 - 3]);
+ break;
+ case 43:
+ this.$ = yy.addSubGraph(void 0, $$[$0 - 1], void 0);
+ break;
+ case 45:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 46:
+ case 47:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 51:
+ yy.addLink($$[$0 - 2].stmt, $$[$0], $$[$0 - 1]);
+ this.$ = { stmt: $$[$0], nodes: $$[$0].concat($$[$0 - 2].nodes) };
+ break;
+ case 52:
+ yy.addLink($$[$0 - 3].stmt, $$[$0 - 1], $$[$0 - 2]);
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1].concat($$[$0 - 3].nodes) };
+ break;
+ case 53:
+ this.$ = { stmt: $$[$0 - 1], nodes: $$[$0 - 1] };
+ break;
+ case 54:
+ this.$ = { stmt: $$[$0], nodes: $$[$0] };
+ break;
+ case 55:
+ this.$ = [$$[$0]];
+ break;
+ case 56:
+ this.$ = $$[$0 - 4].concat($$[$0]);
+ break;
+ case 57:
+ this.$ = $$[$0];
+ break;
+ case 58:
+ this.$ = $$[$0 - 2];
+ yy.setClass($$[$0 - 2], $$[$0]);
+ break;
+ case 59:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "square");
+ break;
+ case 60:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "doublecircle");
+ break;
+ case 61:
+ this.$ = $$[$0 - 5];
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "circle");
+ break;
+ case 62:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "ellipse");
+ break;
+ case 63:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "stadium");
+ break;
+ case 64:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "subroutine");
+ break;
+ case 65:
+ this.$ = $$[$0 - 7];
+ yy.addVertex($$[$0 - 7], $$[$0 - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[$$[$0 - 5], $$[$0 - 3]]]));
+ break;
+ case 66:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "cylinder");
+ break;
+ case 67:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "round");
+ break;
+ case 68:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "diamond");
+ break;
+ case 69:
+ this.$ = $$[$0 - 5];
+ yy.addVertex($$[$0 - 5], $$[$0 - 2], "hexagon");
+ break;
+ case 70:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "odd");
+ break;
+ case 71:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "trapezoid");
+ break;
+ case 72:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "inv_trapezoid");
+ break;
+ case 73:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_right");
+ break;
+ case 74:
+ this.$ = $$[$0 - 3];
+ yy.addVertex($$[$0 - 3], $$[$0 - 1], "lean_left");
+ break;
+ case 75:
+ this.$ = $$[$0];
+ yy.addVertex($$[$0]);
+ break;
+ case 76:
+ $$[$0 - 1].text = $$[$0];
+ this.$ = $$[$0 - 1];
+ break;
+ case 77:
+ case 78:
+ $$[$0 - 2].text = $$[$0 - 1];
+ this.$ = $$[$0 - 2];
+ break;
+ case 79:
+ this.$ = $$[$0];
+ break;
+ case 80:
+ var inf = yy.destructLink($$[$0], $$[$0 - 2]);
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length, "text": $$[$0 - 1] };
+ break;
+ case 81:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 82:
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
+ break;
+ case 83:
+ this.$ = { text: $$[$0], type: "string" };
+ break;
+ case 84:
+ this.$ = { text: $$[$0], type: "markdown" };
+ break;
+ case 85:
+ var inf = yy.destructLink($$[$0]);
+ this.$ = { "type": inf.type, "stroke": inf.stroke, "length": inf.length };
+ break;
+ case 86:
+ this.$ = $$[$0 - 1];
+ break;
+ case 87:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 88:
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
+ break;
+ case 89:
+ this.$ = { text: $$[$0], type: "string" };
+ break;
+ case 90:
+ case 105:
+ this.$ = { text: $$[$0], type: "markdown" };
+ break;
+ case 102:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 103:
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
+ break;
+ case 104:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 106:
+ this.$ = $$[$0 - 4];
+ yy.addClass($$[$0 - 2], $$[$0]);
+ break;
+ case 107:
+ this.$ = $$[$0 - 4];
+ yy.setClass($$[$0 - 2], $$[$0]);
+ break;
+ case 108:
+ case 116:
+ this.$ = $$[$0 - 1];
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
+ break;
+ case 109:
+ case 117:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 110:
+ this.$ = $$[$0 - 2];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 111:
+ this.$ = $$[$0 - 4];
+ yy.setClickEvent($$[$0 - 4], $$[$0 - 3], $$[$0 - 2]);
+ yy.setTooltip($$[$0 - 4], $$[$0]);
+ break;
+ case 112:
+ this.$ = $$[$0 - 2];
+ yy.setLink($$[$0 - 2], $$[$0]);
+ break;
+ case 113:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 4], $$[$0 - 2]);
+ yy.setTooltip($$[$0 - 4], $$[$0]);
+ break;
+ case 114:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
+ break;
+ case 115:
+ this.$ = $$[$0 - 6];
+ yy.setLink($$[$0 - 6], $$[$0 - 4], $$[$0]);
+ yy.setTooltip($$[$0 - 6], $$[$0 - 2]);
+ break;
+ case 118:
+ this.$ = $$[$0 - 1];
+ yy.setLink($$[$0 - 1], $$[$0]);
+ break;
+ case 119:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 120:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
+ break;
+ case 121:
+ this.$ = $$[$0 - 5];
+ yy.setLink($$[$0 - 5], $$[$0 - 4], $$[$0]);
+ yy.setTooltip($$[$0 - 5], $$[$0 - 2]);
+ break;
+ case 122:
+ this.$ = $$[$0 - 4];
+ yy.addVertex($$[$0 - 2], void 0, void 0, $$[$0]);
+ break;
+ case 123:
+ this.$ = $$[$0 - 4];
+ yy.updateLink([$$[$0 - 2]], $$[$0]);
+ break;
+ case 124:
+ this.$ = $$[$0 - 4];
+ yy.updateLink($$[$0 - 2], $$[$0]);
+ break;
+ case 125:
+ this.$ = $$[$0 - 8];
+ yy.updateLinkInterpolate([$$[$0 - 6]], $$[$0 - 2]);
+ yy.updateLink([$$[$0 - 6]], $$[$0]);
+ break;
+ case 126:
+ this.$ = $$[$0 - 8];
+ yy.updateLinkInterpolate($$[$0 - 6], $$[$0 - 2]);
+ yy.updateLink($$[$0 - 6], $$[$0]);
+ break;
+ case 127:
+ this.$ = $$[$0 - 6];
+ yy.updateLinkInterpolate([$$[$0 - 4]], $$[$0]);
+ break;
+ case 128:
+ this.$ = $$[$0 - 6];
+ yy.updateLinkInterpolate($$[$0 - 4], $$[$0]);
+ break;
+ case 129:
+ case 131:
+ this.$ = [$$[$0]];
+ break;
+ case 130:
+ case 132:
+ $$[$0 - 2].push($$[$0]);
+ this.$ = $$[$0 - 2];
+ break;
+ case 134:
+ this.$ = $$[$0 - 1] + $$[$0];
+ break;
+ case 182:
+ this.$ = $$[$0];
+ break;
+ case 183:
+ this.$ = $$[$0 - 1] + "" + $$[$0];
+ break;
+ case 185:
+ this.$ = $$[$0 - 1] + "" + $$[$0];
+ break;
+ case 186:
+ this.$ = { stmt: "dir", value: "TB" };
+ break;
+ case 187:
+ this.$ = { stmt: "dir", value: "BT" };
+ break;
+ case 188:
+ this.$ = { stmt: "dir", value: "RL" };
+ break;
+ case 189:
+ this.$ = { stmt: "dir", value: "LR" };
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: 3, 6: 5, 12: $V0, 16: 4, 21: $V1, 22: $V2, 24: $V3 }, { 1: [3] }, { 1: [2, 1] }, { 3: 10, 4: 2, 5: 3, 6: 5, 12: $V0, 16: 4, 21: $V1, 22: $V2, 24: $V3 }, o($V4, $V5, { 17: 11 }), { 7: 12, 13: [1, 13] }, { 16: 14, 21: $V1, 22: $V2, 24: $V3 }, { 16: 15, 21: $V1, 22: $V2, 24: $V3 }, { 25: [1, 16], 26: [1, 17] }, { 13: [2, 5] }, { 1: [2, 2] }, { 1: [2, 9], 18: 18, 19: 19, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: $Va, 44: 31, 45: $Vb, 47: $Vc, 49: $Vd, 51: 35, 52: 45, 53: $Ve, 54: 46, 56: 47, 69: $Vf, 92: $Vg, 93: $Vh, 94: $Vi, 95: $Vj, 96: $Vk, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt, 129: $Vu, 130: $Vv, 131: $Vw, 132: $Vx }, { 8: 60, 10: [1, 61], 15: $Vy }, o([10, 15], [2, 6]), o($V4, [2, 17]), o($V4, [2, 18]), o($V4, [2, 19]), { 20: [1, 64], 21: [1, 65], 22: $Vz, 27: 63, 30: 66 }, o($VA, [2, 11]), o($VA, [2, 12]), o($VA, [2, 13]), o($VA, [2, 14]), o($VA, [2, 15]), o($VA, [2, 16]), { 9: 68, 20: $VB, 21: $VC, 23: $VD, 50: 69, 81: 73, 84: [1, 74], 86: [1, 75] }, { 9: 76, 20: $VB, 21: $VC, 23: $VD }, { 9: 77, 20: $VB, 21: $VC, 23: $VD }, { 9: 78, 20: $VB, 21: $VC, 23: $VD }, { 9: 79, 20: $VB, 21: $VC, 23: $VD }, { 9: 80, 20: $VB, 21: $VC, 23: $VD }, { 9: 82, 20: $VB, 21: $VC, 22: [1, 81], 23: $VD }, o($VA, [2, 44]), { 46: [1, 83] }, { 48: [1, 84] }, o($VA, [2, 47]), o($VE, [2, 54], { 30: 85, 22: $Vz }), { 22: [1, 86] }, { 22: [1, 87] }, { 22: [1, 88] }, { 22: [1, 89] }, { 26: $VF, 53: $VG, 69: $VH, 88: [1, 93], 97: $VI, 103: [1, 90], 105: [1, 91], 109: 92, 113: $VJ, 114: $VK, 117: $VL, 119: $VM, 122: $VN, 123: $VO, 124: $VP, 128: 94 }, o($VA, [2, 186]), o($VA, [2, 187]), o($VA, [2, 188]), o($VA, [2, 189]), o($VQ, [2, 55]), o($VQ, [2, 57], { 55: [1, 106] }), o($VR, [2, 75], { 121: 119, 40: [1, 107], 53: $Ve, 57: [1, 108], 59: [1, 109], 61: [1, 110], 63: [1, 111], 65: [1, 112], 67: [1, 113], 69: $Vf, 72: [1, 114], 74: [1, 115], 76: [1, 116], 77: [1, 117], 79: [1, 118], 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 122: $Vr, 123: $Vs, 124: $Vt }), o($VS, [2, 182]), o($VS, [2, 143]), o($VS, [2, 144]), o($VS, [2, 145]), o($VS, [2, 146]), o($VS, [2, 147]), o($VS, [2, 148]), o($VS, [2, 149]), o($VS, [2, 150]), o($VS, [2, 151]), o($VS, [2, 152]), o($VS, [2, 153]), { 9: 120, 20: $VB, 21: $VC, 23: $VD }, { 11: 121, 14: [1, 122] }, o($VT, [2, 8]), o($V4, [2, 20]), o($V4, [2, 26]), o($V4, [2, 27]), { 21: [1, 123] }, o($VU, [2, 34], { 30: 124, 22: $Vz }), o($VA, [2, 35]), { 51: 125, 52: 45, 53: $Ve, 54: 46, 56: 47, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt }, o($VV, [2, 48]), o($VV, [2, 49]), o($VV, [2, 50]), o($VW, [2, 79], { 82: 126, 71: [1, 128], 83: [1, 127] }), { 85: 129, 87: 130, 88: [1, 131], 89: [1, 132], 124: $VX, 127: $VY }, o([53, 69, 71, 83, 97, 110, 113, 114, 117, 119, 122, 123, 124], [2, 85]), o($VA, [2, 36]), o($VA, [2, 37]), o($VA, [2, 38]), o($VA, [2, 39]), o($VA, [2, 40]), { 22: $VZ, 24: $V_, 26: $V$, 38: $V01, 39: 135, 43: $V11, 53: $V21, 69: $V31, 84: $V41, 88: [1, 137], 89: [1, 138], 91: 148, 92: $V51, 93: $V61, 94: $V71, 95: $V81, 96: $V91, 97: $Va1, 98: $Vb1, 99: 136, 113: $Vc1, 117: $Vd1, 119: $Ve1, 122: $Vf1, 123: $Vg1, 124: $Vh1 }, o($Vi1, $V5, { 17: 161 }), o($VA, [2, 45]), o($VA, [2, 46]), o($VE, [2, 53], { 53: $Vj1 }), { 53: $Ve, 56: 163, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt }, { 110: [1, 164], 111: 165, 113: [1, 166] }, { 53: $Ve, 56: 167, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt }, { 53: $Ve, 56: 168, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt }, o($VT, [2, 108], { 22: [1, 169], 104: [1, 170] }), { 88: [1, 171] }, o($VT, [2, 116], { 128: 173, 22: [1, 172], 26: $VF, 53: $VG, 69: $VH, 97: $VI, 113: $VJ, 114: $VK, 117: $VL, 119: $VM, 122: $VN, 123: $VO, 124: $VP }), o($VT, [2, 118], { 22: [1, 174] }), o($Vk1, [2, 184]), o($Vk1, [2, 171]), o($Vk1, [2, 172]), o($Vk1, [2, 173]), o($Vk1, [2, 174]), o($Vk1, [2, 175]), o($Vk1, [2, 176]), o($Vk1, [2, 177]), o($Vk1, [2, 178]), o($Vk1, [2, 179]), o($Vk1, [2, 180]), o($Vk1, [2, 181]), { 53: $Ve, 56: 175, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt }, { 41: 176, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 184, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 186, 59: [1, 185], 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 187, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 188, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 189, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 117: [1, 190] }, { 41: 191, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 192, 74: [1, 193], 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 194, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 195, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 196, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, o($VS, [2, 183]), o($Vr1, [2, 3]), { 8: 197, 15: $Vy }, { 15: [2, 7] }, o($V4, [2, 28]), o($VU, [2, 33]), o($VE, [2, 51], { 30: 198, 22: $Vz }), o($VW, [2, 76], { 22: [1, 199] }), { 22: [1, 200] }, { 41: 201, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 86: [1, 202], 87: 203, 124: $VX, 127: $VY }, o($Vs1, [2, 81]), o($Vs1, [2, 83]), o($Vs1, [2, 84]), o($Vs1, [2, 169]), o($Vs1, [2, 170]), { 9: 205, 20: $VB, 21: $VC, 22: $VZ, 23: $VD, 24: $V_, 26: $V$, 38: $V01, 40: [1, 204], 43: $V11, 53: $V21, 69: $V31, 84: $V41, 91: 148, 92: $V51, 93: $V61, 94: $V71, 95: $V81, 96: $V91, 97: $Va1, 98: $Vb1, 99: 206, 113: $Vc1, 117: $Vd1, 119: $Ve1, 122: $Vf1, 123: $Vg1, 124: $Vh1 }, o($Vt1, [2, 102]), o($Vt1, [2, 104]), o($Vt1, [2, 105]), o($Vt1, [2, 158]), o($Vt1, [2, 159]), o($Vt1, [2, 160]), o($Vt1, [2, 161]), o($Vt1, [2, 162]), o($Vt1, [2, 163]), o($Vt1, [2, 164]), o($Vt1, [2, 165]), o($Vt1, [2, 166]), o($Vt1, [2, 167]), o($Vt1, [2, 168]), o($Vt1, [2, 91]), o($Vt1, [2, 92]), o($Vt1, [2, 93]), o($Vt1, [2, 94]), o($Vt1, [2, 95]), o($Vt1, [2, 96]), o($Vt1, [2, 97]), o($Vt1, [2, 98]), o($Vt1, [2, 99]), o($Vt1, [2, 100]), o($Vt1, [2, 101]), { 18: 18, 19: 19, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: $Va, 43: [1, 207], 44: 31, 45: $Vb, 47: $Vc, 49: $Vd, 51: 35, 52: 45, 53: $Ve, 54: 46, 56: 47, 69: $Vf, 92: $Vg, 93: $Vh, 94: $Vi, 95: $Vj, 96: $Vk, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt, 129: $Vu, 130: $Vv, 131: $Vw, 132: $Vx }, { 22: $Vz, 30: 208 }, { 22: [1, 209], 53: $Ve, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 119, 122: $Vr, 123: $Vs, 124: $Vt }, { 22: [1, 210] }, { 22: [1, 211], 114: [1, 212] }, o($Vu1, [2, 129]), { 22: [1, 213], 53: $Ve, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 119, 122: $Vr, 123: $Vs, 124: $Vt }, { 22: [1, 214], 53: $Ve, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 119, 122: $Vr, 123: $Vs, 124: $Vt }, { 88: [1, 215] }, o($VT, [2, 110], { 22: [1, 216] }), o($VT, [2, 112], { 22: [1, 217] }), { 88: [1, 218] }, o($Vk1, [2, 185]), { 88: [1, 219], 106: [1, 220] }, o($VQ, [2, 58], { 121: 119, 53: $Ve, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 122: $Vr, 123: $Vs, 124: $Vt }), { 42: [1, 221], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, o($Vv1, [2, 87]), o($Vv1, [2, 89]), o($Vv1, [2, 90]), o($Vv1, [2, 154]), o($Vv1, [2, 155]), o($Vv1, [2, 156]), o($Vv1, [2, 157]), { 58: [1, 223], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 224, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 60: [1, 225], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 62: [1, 226], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 64: [1, 227], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 66: [1, 228], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 69: [1, 229] }, { 73: [1, 230], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 75: [1, 231], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 41: 232, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 42: [1, 233], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 76: $Vl1, 78: [1, 234], 80: [1, 235], 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 76: $Vl1, 78: [1, 237], 80: [1, 236], 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 9: 238, 20: $VB, 21: $VC, 23: $VD }, o($VE, [2, 52], { 53: $Vj1 }), o($VW, [2, 78]), o($VW, [2, 77]), { 71: [1, 239], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, o($VW, [2, 80]), o($Vs1, [2, 82]), { 41: 240, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, o($Vi1, $V5, { 17: 241 }), o($Vt1, [2, 103]), o($VA, [2, 43]), { 52: 242, 53: $Ve, 54: 46, 56: 47, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt }, { 22: $Vw1, 69: $Vx1, 92: $Vy1, 100: 243, 113: $Vz1, 115: 244, 116: 245, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }, { 22: $Vw1, 69: $Vx1, 92: $Vy1, 100: 254, 112: [1, 255], 113: $Vz1, 115: 244, 116: 245, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }, { 22: $Vw1, 69: $Vx1, 92: $Vy1, 100: 256, 112: [1, 257], 113: $Vz1, 115: 244, 116: 245, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }, { 113: [1, 258] }, { 22: $Vw1, 69: $Vx1, 92: $Vy1, 100: 259, 113: $Vz1, 115: 244, 116: 245, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }, { 53: $Ve, 56: 260, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt }, o($VT, [2, 109]), { 88: [1, 261] }, { 88: [1, 262], 106: [1, 263] }, o($VT, [2, 117]), o($VT, [2, 119], { 22: [1, 264] }), o($VT, [2, 120]), o($VR, [2, 59]), o($Vv1, [2, 88]), o($VR, [2, 60]), { 60: [1, 265], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, o($VR, [2, 67]), o($VR, [2, 62]), o($VR, [2, 63]), o($VR, [2, 64]), { 117: [1, 266] }, o($VR, [2, 66]), o($VR, [2, 68]), { 75: [1, 267], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, o($VR, [2, 70]), o($VR, [2, 71]), o($VR, [2, 73]), o($VR, [2, 72]), o($VR, [2, 74]), o($Vr1, [2, 4]), o([22, 53, 69, 97, 110, 113, 114, 117, 119, 122, 123, 124], [2, 86]), { 42: [1, 268], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 18: 18, 19: 19, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: $Va, 43: [1, 269], 44: 31, 45: $Vb, 47: $Vc, 49: $Vd, 51: 35, 52: 45, 53: $Ve, 54: 46, 56: 47, 69: $Vf, 92: $Vg, 93: $Vh, 94: $Vi, 95: $Vj, 96: $Vk, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt, 129: $Vu, 130: $Vv, 131: $Vw, 132: $Vx }, o($VQ, [2, 56]), o($VT, [2, 122], { 114: $VE1 }), o($VF1, [2, 131], { 116: 271, 22: $Vw1, 69: $Vx1, 92: $Vy1, 113: $Vz1, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }), o($VG1, [2, 133]), o($VG1, [2, 135]), o($VG1, [2, 136]), o($VG1, [2, 137]), o($VG1, [2, 138]), o($VG1, [2, 139]), o($VG1, [2, 140]), o($VG1, [2, 141]), o($VG1, [2, 142]), o($VT, [2, 123], { 114: $VE1 }), { 22: [1, 272] }, o($VT, [2, 124], { 114: $VE1 }), { 22: [1, 273] }, o($Vu1, [2, 130]), o($VT, [2, 106], { 114: $VE1 }), o($VT, [2, 107], { 121: 119, 53: $Ve, 69: $Vf, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 122: $Vr, 123: $Vs, 124: $Vt }), o($VT, [2, 111]), o($VT, [2, 113], { 22: [1, 274] }), o($VT, [2, 114]), { 106: [1, 275] }, { 60: [1, 276] }, { 71: [1, 277] }, { 75: [1, 278] }, { 9: 279, 20: $VB, 21: $VC, 23: $VD }, o($VA, [2, 42]), { 22: $Vw1, 69: $Vx1, 92: $Vy1, 113: $Vz1, 115: 280, 116: 245, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }, o($VG1, [2, 134]), { 26: $VF, 53: $VG, 69: $VH, 97: $VI, 109: 281, 113: $VJ, 114: $VK, 117: $VL, 119: $VM, 122: $VN, 123: $VO, 124: $VP, 128: 94 }, { 26: $VF, 53: $VG, 69: $VH, 97: $VI, 109: 282, 113: $VJ, 114: $VK, 117: $VL, 119: $VM, 122: $VN, 123: $VO, 124: $VP, 128: 94 }, { 106: [1, 283] }, o($VT, [2, 121]), o($VR, [2, 61]), { 41: 284, 76: $Vl1, 88: $Vm1, 89: $Vn1, 90: 177, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, o($VR, [2, 69]), o($Vi1, $V5, { 17: 285 }), o($VF1, [2, 132], { 116: 271, 22: $Vw1, 69: $Vx1, 92: $Vy1, 113: $Vz1, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }), o($VT, [2, 127], { 128: 173, 22: [1, 286], 26: $VF, 53: $VG, 69: $VH, 97: $VI, 113: $VJ, 114: $VK, 117: $VL, 119: $VM, 122: $VN, 123: $VO, 124: $VP }), o($VT, [2, 128], { 128: 173, 22: [1, 287], 26: $VF, 53: $VG, 69: $VH, 97: $VI, 113: $VJ, 114: $VK, 117: $VL, 119: $VM, 122: $VN, 123: $VO, 124: $VP }), o($VT, [2, 115]), { 42: [1, 288], 76: $Vl1, 90: 222, 124: $Vo1, 125: $Vp1, 126: $Vq1 }, { 18: 18, 19: 19, 20: $V6, 21: $V7, 22: $V8, 23: $V9, 32: 24, 33: 25, 34: 26, 35: 27, 36: 28, 37: 29, 38: $Va, 43: [1, 289], 44: 31, 45: $Vb, 47: $Vc, 49: $Vd, 51: 35, 52: 45, 53: $Ve, 54: 46, 56: 47, 69: $Vf, 92: $Vg, 93: $Vh, 94: $Vi, 95: $Vj, 96: $Vk, 97: $Vl, 110: $Vm, 113: $Vn, 114: $Vo, 117: $Vp, 119: $Vq, 121: 48, 122: $Vr, 123: $Vs, 124: $Vt, 129: $Vu, 130: $Vv, 131: $Vw, 132: $Vx }, { 22: $Vw1, 69: $Vx1, 92: $Vy1, 100: 290, 113: $Vz1, 115: 244, 116: 245, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }, { 22: $Vw1, 69: $Vx1, 92: $Vy1, 100: 291, 113: $Vz1, 115: 244, 116: 245, 117: $VA1, 118: $VB1, 119: $VC1, 120: $VD1 }, o($VR, [2, 65]), o($VA, [2, 41]), o($VT, [2, 125], { 114: $VE1 }), o($VT, [2, 126], { 114: $VE1 })],
+ defaultActions: { 2: [2, 1], 9: [2, 5], 10: [2, 2], 122: [2, 7] },
+ 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("open_directive");
+ return 12;
+ case 1:
+ this.begin("type_directive");
+ return 13;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 10;
+ case 3:
+ this.popState();
+ this.popState();
+ return 15;
+ case 4:
+ return 14;
+ case 5:
+ this.begin("acc_title");
+ return 45;
+ case 6:
+ this.popState();
+ return "acc_title_value";
+ case 7:
+ this.begin("acc_descr");
+ return 47;
+ case 8:
+ this.popState();
+ return "acc_descr_value";
+ case 9:
+ this.begin("acc_descr_multiline");
+ break;
+ case 10:
+ this.popState();
+ break;
+ case 11:
+ return "acc_descr_multiline_value";
+ case 12:
+ this.begin("callbackname");
+ break;
+ case 13:
+ this.popState();
+ break;
+ case 14:
+ this.popState();
+ this.begin("callbackargs");
+ break;
+ case 15:
+ return 103;
+ case 16:
+ this.popState();
+ break;
+ case 17:
+ return 104;
+ case 18:
+ return "MD_STR";
+ case 19:
+ this.popState();
+ break;
+ case 20:
+ this.begin("md_string");
+ break;
+ case 21:
+ return "STR";
+ case 22:
+ this.popState();
+ break;
+ case 23:
+ this.pushState("string");
+ break;
+ case 24:
+ return 92;
+ case 25:
+ return 110;
+ case 26:
+ return 93;
+ case 27:
+ return 112;
+ case 28:
+ return 94;
+ case 29:
+ return 95;
+ case 30:
+ return 105;
+ case 31:
+ this.begin("click");
+ break;
+ case 32:
+ this.popState();
+ break;
+ case 33:
+ return 96;
+ case 34:
+ if (yy.lex.firstGraph()) {
+ this.begin("dir");
+ }
+ return 24;
+ case 35:
+ if (yy.lex.firstGraph()) {
+ this.begin("dir");
+ }
+ return 24;
+ case 36:
+ if (yy.lex.firstGraph()) {
+ this.begin("dir");
+ }
+ return 24;
+ case 37:
+ return 38;
+ case 38:
+ return 43;
+ case 39:
+ return 106;
+ case 40:
+ return 106;
+ case 41:
+ return 106;
+ case 42:
+ return 106;
+ case 43:
+ this.popState();
+ return 25;
+ case 44:
+ this.popState();
+ return 26;
+ case 45:
+ this.popState();
+ return 26;
+ case 46:
+ this.popState();
+ return 26;
+ case 47:
+ this.popState();
+ return 26;
+ case 48:
+ this.popState();
+ return 26;
+ case 49:
+ this.popState();
+ return 26;
+ case 50:
+ this.popState();
+ return 26;
+ case 51:
+ this.popState();
+ return 26;
+ case 52:
+ this.popState();
+ return 26;
+ case 53:
+ this.popState();
+ return 26;
+ case 54:
+ return 129;
+ case 55:
+ return 130;
+ case 56:
+ return 131;
+ case 57:
+ return 132;
+ case 58:
+ return 113;
+ case 59:
+ return 119;
+ case 60:
+ return 55;
+ case 61:
+ return 69;
+ case 62:
+ return 53;
+ case 63:
+ return 20;
+ case 64:
+ return 114;
+ case 65:
+ return 123;
+ case 66:
+ this.popState();
+ return 86;
+ case 67:
+ this.pushState("edgeText");
+ return 84;
+ case 68:
+ return 127;
+ case 69:
+ this.popState();
+ return 86;
+ case 70:
+ this.pushState("thickEdgeText");
+ return 84;
+ case 71:
+ return 127;
+ case 72:
+ this.popState();
+ return 86;
+ case 73:
+ this.pushState("dottedEdgeText");
+ return 84;
+ case 74:
+ return 127;
+ case 75:
+ return 86;
+ case 76:
+ this.popState();
+ return 62;
+ case 77:
+ return "TEXT";
+ case 78:
+ this.pushState("ellipseText");
+ return 61;
+ case 79:
+ this.popState();
+ return 64;
+ case 80:
+ this.pushState("text");
+ return 63;
+ case 81:
+ this.popState();
+ return 66;
+ case 82:
+ this.pushState("text");
+ return 65;
+ case 83:
+ return 67;
+ case 84:
+ this.pushState("text");
+ return 76;
+ case 85:
+ this.popState();
+ return 73;
+ case 86:
+ this.pushState("text");
+ return 72;
+ case 87:
+ this.popState();
+ return 58;
+ case 88:
+ this.pushState("text");
+ return 57;
+ case 89:
+ this.popState();
+ return 78;
+ case 90:
+ this.popState();
+ return 80;
+ case 91:
+ return 125;
+ case 92:
+ this.pushState("trapText");
+ return 77;
+ case 93:
+ this.pushState("trapText");
+ return 79;
+ case 94:
+ return 126;
+ case 95:
+ return 76;
+ case 96:
+ return 98;
+ case 97:
+ return "SEP";
+ case 98:
+ return 97;
+ case 99:
+ return 123;
+ case 100:
+ return 119;
+ case 101:
+ return 53;
+ case 102:
+ return 117;
+ case 103:
+ return 122;
+ case 104:
+ return 124;
+ case 105:
+ this.popState();
+ return 71;
+ case 106:
+ this.pushState("text");
+ return 71;
+ case 107:
+ this.popState();
+ return 60;
+ case 108:
+ this.pushState("text");
+ return 59;
+ case 109:
+ this.popState();
+ return 42;
+ case 110:
+ this.pushState("text");
+ return 40;
+ case 111:
+ this.popState();
+ return 75;
+ case 112:
+ this.pushState("text");
+ return 74;
+ case 113:
+ return "TEXT";
+ case 114:
+ return "QUOTE";
+ case 115:
+ return 21;
+ case 116:
+ return 22;
+ case 117:
+ return 23;
+ }
+ },
+ rules: [/^(?:%%\{)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\n)*))/, /^(?: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: { "close_directive": { "rules": [20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "arg_directive": { "rules": [3, 4, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "type_directive": { "rules": [2, 3, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "open_directive": { "rules": [1, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "callbackargs": { "rules": [16, 17, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "callbackname": { "rules": [13, 14, 15, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "href": { "rules": [20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "click": { "rules": [20, 23, 32, 33, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "dottedEdgeText": { "rules": [20, 23, 72, 74, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "thickEdgeText": { "rules": [20, 23, 69, 71, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "edgeText": { "rules": [20, 23, 66, 68, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "trapText": { "rules": [20, 23, 75, 78, 80, 82, 86, 88, 89, 90, 91, 92, 93, 106, 108, 110, 112], "inclusive": false }, "ellipseText": { "rules": [20, 23, 75, 76, 77, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "text": { "rules": [20, 23, 75, 78, 79, 80, 81, 82, 85, 86, 87, 88, 92, 93, 105, 106, 107, 108, 109, 110, 111, 112, 113], "inclusive": false }, "vertex": { "rules": [20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "dir": { "rules": [20, 23, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "acc_descr_multiline": { "rules": [10, 11, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "acc_descr": { "rules": [8, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "acc_title": { "rules": [6, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "md_string": { "rules": [18, 19, 20, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "string": { "rules": [20, 21, 22, 23, 75, 78, 80, 82, 86, 88, 92, 93, 106, 108, 110, 112], "inclusive": false }, "INITIAL": { "rules": [0, 5, 7, 9, 12, 20, 23, 24, 25, 26, 27, 28, 29, 30, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 69, 70, 72, 73, 75, 78, 80, 82, 83, 84, 86, 88, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 106, 108, 110, 112, 114, 115, 116, 117], "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 parseDirective$b = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ 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 = "RL";
+ }
+ if (direction$3.match(/.*\^/)) {
+ direction$3 = "BT";
+ }
+ 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 = {
+ parseDirective: parseDirective$b,
+ 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,
+ parseDirective: parseDirective$b,
+ 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", type2 + "-extensionStart").attr("class", "marker extension " + type2).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", type2 + "-extensionEnd").attr("class", "marker extension " + type2).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");
+ };
+ const composition = (elem, type2) => {
+ elem.append("defs").append("marker").attr("id", type2 + "-compositionStart").attr("class", "marker composition " + type2).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", type2 + "-compositionEnd").attr("class", "marker composition " + type2).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");
+ };
+ const aggregation = (elem, type2) => {
+ elem.append("defs").append("marker").attr("id", type2 + "-aggregationStart").attr("class", "marker aggregation " + type2).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", type2 + "-aggregationEnd").attr("class", "marker aggregation " + type2).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");
+ };
+ const dependency = (elem, type2) => {
+ elem.append("defs").append("marker").attr("id", type2 + "-dependencyStart").attr("class", "marker dependency " + type2).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", type2 + "-dependencyEnd").attr("class", "marker dependency " + type2).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 lollipop = (elem, type2) => {
+ elem.append("defs").append("marker").attr("id", type2 + "-lollipopStart").attr("class", "marker lollipop " + type2).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "white").attr("cx", 6).attr("cy", 7).attr("r", 6);
+ };
+ const point$2 = (elem, type2) => {
+ elem.append("marker").attr("id", type2 + "-pointEnd").attr("class", "marker " + type2).attr("viewBox", "0 0 10 10").attr("refX", 10).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", type2 + "-pointStart").attr("class", "marker " + type2).attr("viewBox", "0 0 10 10").attr("refX", 0).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) => {
+ elem.append("marker").attr("id", 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", 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) => {
+ elem.append("marker").attr("id", 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", 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) => {
+ elem.append("defs").append("marker").attr("id", 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 = JSON.parse(JSON.stringify(edge));
+ const edge2 = JSON.parse(JSON.stringify(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;
+ 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;
+ const 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;
+ });
+ const membersBox = members.node().getBBox();
+ const 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);
+ }
+ membersLine.attr("x2", rectWidth);
+ 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 += "<" + classDef.type + ">";
+ }
+ return classTitleString;
+ };
+ const drawNote$2 = 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 parseMember = function(text2) {
+ let displayText = "";
+ let cssStyle = "";
+ let returnType = "";
+ let visibility = "";
+ let firstChar = text2.substring(0, 1);
+ let lastChar = text2.substring(text2.length - 1, text2.length);
+ if (firstChar.match(/[#+~-]/)) {
+ visibility = firstChar;
+ }
+ let noClassifierRe = /[\s\w)~]/;
+ if (!lastChar.match(noClassifierRe)) {
+ cssStyle = parseClassifier(lastChar);
+ }
+ const startIndex = visibility === "" ? 0 : 1;
+ let endIndex = cssStyle === "" ? text2.length : text2.length - 1;
+ text2 = text2.substring(startIndex, endIndex);
+ const methodStart = text2.indexOf("(");
+ const methodEnd = text2.indexOf(")");
+ const isMethod = methodStart > 1 && methodEnd > methodStart && methodEnd <= text2.length;
+ if (isMethod) {
+ let methodName = text2.substring(0, methodStart).trim();
+ const parameters = text2.substring(methodStart + 1, methodEnd);
+ displayText = visibility + methodName + "(" + parseGenericTypes(parameters.trim()) + ")";
+ if (methodEnd < text2.length) {
+ let potentialClassifier = text2.substring(methodEnd + 1, methodEnd + 2);
+ if (cssStyle === "" && !potentialClassifier.match(noClassifierRe)) {
+ cssStyle = parseClassifier(potentialClassifier);
+ returnType = text2.substring(methodEnd + 2).trim();
+ } else {
+ returnType = text2.substring(methodEnd + 1).trim();
+ }
+ if (returnType !== "") {
+ if (returnType.charAt(0) === ":") {
+ returnType = returnType.substring(1).trim();
+ }
+ returnType = " : " + parseGenericTypes(returnType);
+ displayText += returnType;
+ }
+ }
+ } else {
+ displayText = visibility + parseGenericTypes(text2);
+ }
+ return {
+ displayText,
+ cssStyle
+ };
+ };
+ const addTspan = function(textEl, txt, isFirst, conf2) {
+ let member = parseMember(txt);
+ const tSpan = textEl.append("tspan").attr("x", conf2.padding).text(member.displayText);
+ if (member.cssStyle !== "") {
+ tSpan.attr("style", member.cssStyle);
+ }
+ if (!isFirst) {
+ tSpan.attr("dy", conf2.textHeight);
+ }
+ };
+ const parseClassifier = function(classifier) {
+ switch (classifier) {
+ case "*":
+ return "font-style:italic;";
+ case "$":
+ return "text-decoration:underline;";
+ default:
+ return "";
+ }
+ };
+ const svgDraw$4 = {
+ getClassTitleString,
+ drawClass,
+ drawEdge: drawEdge$2,
+ drawNote: drawNote$2,
+ parseMember
+ };
+ 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((str2) => {
+ const parsedInfo = parseMember(str2);
+ 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((str2) => {
+ const parsedInfo = parseMember(str2);
+ 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 = {};
+ };
+ 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) {
+ 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;
+ if (diagramType === "graph" || diagramType === "flowchart") {
+ curve = edge.curve || curveBasis;
+ } else {
+ curve = curveBasis;
+ }
+ const lineFunction = line$1().x(function(d) {
+ return d.x;
+ }).y(function(d) {
+ return d.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$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 + "#" + diagramType + "-crossStart)");
+ break;
+ case "arrow_point":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-pointStart)");
+ break;
+ case "arrow_barb":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-barbStart)");
+ break;
+ case "arrow_circle":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-circleStart)");
+ break;
+ case "aggregation":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-aggregationStart)");
+ break;
+ case "extension":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-extensionStart)");
+ break;
+ case "composition":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-compositionStart)");
+ break;
+ case "dependency":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-dependencyStart)");
+ break;
+ case "lollipop":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-lollipopStart)");
+ break;
+ }
+ switch (edge.arrowTypeEnd) {
+ case "arrow_cross":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-crossEnd)");
+ break;
+ case "arrow_point":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-pointEnd)");
+ break;
+ case "arrow_barb":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-barbEnd)");
+ break;
+ case "arrow_circle":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-circleEnd)");
+ break;
+ case "aggregation":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-aggregationEnd)");
+ break;
+ case "extension":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-extensionEnd)");
+ break;
+ case "composition":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-compositionEnd)");
+ break;
+ case "dependency":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-dependencyEnd)");
+ break;
+ case "lollipop":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-lollipopEnd)");
+ break;
+ }
+ let paths = {};
+ if (pointsHasChanged) {
+ paths.updatedPath = points;
+ }
+ paths.originalPath = edge.points;
+ return paths;
+ };
+ const recursiveRender = async (_elem, graph, diagramtype, 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, 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);
+ 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:", write(graph));
+ adjustClustersAndEdges(graph);
+ log$1.warn("Graph after:", write(graph));
+ await recursiveRender(elem, graph, diagramtype);
+ };
+ 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 = [1, 2], $V1 = [1, 5], $V2 = [6, 9, 11, 23, 25, 27, 29, 30, 31, 52], $V3 = [1, 17], $V4 = [1, 18], $V5 = [1, 19], $V6 = [1, 20], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 25], $Va = [1, 30], $Vb = [1, 31], $Vc = [1, 32], $Vd = [1, 33], $Ve = [1, 34], $Vf = [6, 9, 11, 15, 20, 23, 25, 27, 29, 30, 31, 44, 45, 46, 47, 48, 52], $Vg = [1, 46], $Vh = [30, 31, 49, 50], $Vi = [4, 6, 9, 11, 23, 25, 27, 29, 30, 31, 52], $Vj = [44, 45, 46, 47, 48], $Vk = [22, 37], $Vl = [1, 66], $Vm = [1, 65], $Vn = [22, 37, 39, 41];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "ER_DIAGRAM": 4, "document": 5, "EOF": 6, "directive": 7, "line": 8, "SPACE": 9, "statement": 10, "NEWLINE": 11, "openDirective": 12, "typeDirective": 13, "closeDirective": 14, ":": 15, "argDirective": 16, "entityName": 17, "relSpec": 18, "role": 19, "BLOCK_START": 20, "attributes": 21, "BLOCK_STOP": 22, "title": 23, "title_value": 24, "acc_title": 25, "acc_title_value": 26, "acc_descr": 27, "acc_descr_value": 28, "acc_descr_multiline_value": 29, "ALPHANUM": 30, "ENTITY_NAME": 31, "attribute": 32, "attributeType": 33, "attributeName": 34, "attributeKeyTypeList": 35, "attributeComment": 36, "ATTRIBUTE_WORD": 37, "attributeKeyType": 38, "COMMA": 39, "ATTRIBUTE_KEY": 40, "COMMENT": 41, "cardinality": 42, "relType": 43, "ZERO_OR_ONE": 44, "ZERO_OR_MORE": 45, "ONE_OR_MORE": 46, "ONLY_ONE": 47, "MD_PARENT": 48, "NON_IDENTIFYING": 49, "IDENTIFYING": 50, "WORD": 51, "open_directive": 52, "type_directive": 53, "arg_directive": 54, "close_directive": 55, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 20: "BLOCK_START", 22: "BLOCK_STOP", 23: "title", 24: "title_value", 25: "acc_title", 26: "acc_title_value", 27: "acc_descr", 28: "acc_descr_value", 29: "acc_descr_multiline_value", 30: "ALPHANUM", 31: "ENTITY_NAME", 37: "ATTRIBUTE_WORD", 39: "COMMA", 40: "ATTRIBUTE_KEY", 41: "COMMENT", 44: "ZERO_OR_ONE", 45: "ZERO_OR_MORE", 46: "ONE_OR_MORE", 47: "ONLY_ONE", 48: "MD_PARENT", 49: "NON_IDENTIFYING", 50: "IDENTIFYING", 51: "WORD", 52: "open_directive", 53: "type_directive", 54: "arg_directive", 55: "close_directive" },
+ productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 5], [10, 4], [10, 3], [10, 1], [10, 2], [10, 2], [10, 2], [10, 1], [17, 1], [17, 1], [21, 1], [21, 2], [32, 2], [32, 3], [32, 3], [32, 4], [33, 1], [34, 1], [35, 1], [35, 3], [38, 1], [36, 1], [18, 3], [42, 1], [42, 1], [42, 1], [42, 1], [42, 1], [43, 1], [43, 1], [19, 1], [19, 1], [19, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 1:
+ break;
+ case 3:
+ this.$ = [];
+ break;
+ case 4:
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 5:
+ case 6:
+ this.$ = $$[$0];
+ break;
+ case 7:
+ case 8:
+ this.$ = [];
+ break;
+ case 12:
+ yy.addEntity($$[$0 - 4]);
+ yy.addEntity($$[$0 - 2]);
+ yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]);
+ break;
+ case 13:
+ yy.addEntity($$[$0 - 3]);
+ yy.addAttributes($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 14:
+ yy.addEntity($$[$0 - 2]);
+ break;
+ case 15:
+ yy.addEntity($$[$0]);
+ break;
+ case 16:
+ case 17:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 18:
+ case 19:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 20:
+ case 44:
+ this.$ = $$[$0];
+ break;
+ case 21:
+ case 42:
+ case 43:
+ this.$ = $$[$0].replace(/"/g, "");
+ break;
+ case 22:
+ case 30:
+ this.$ = [$$[$0]];
+ break;
+ case 23:
+ $$[$0].push($$[$0 - 1]);
+ this.$ = $$[$0];
+ break;
+ case 24:
+ this.$ = { attributeType: $$[$0 - 1], attributeName: $$[$0] };
+ break;
+ case 25:
+ this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeKeyTypeList: $$[$0] };
+ break;
+ case 26:
+ this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeComment: $$[$0] };
+ break;
+ case 27:
+ this.$ = { attributeType: $$[$0 - 3], attributeName: $$[$0 - 2], attributeKeyTypeList: $$[$0 - 1], attributeComment: $$[$0] };
+ break;
+ case 28:
+ case 29:
+ case 32:
+ this.$ = $$[$0];
+ break;
+ case 31:
+ $$[$0 - 2].push($$[$0]);
+ this.$ = $$[$0 - 2];
+ break;
+ case 33:
+ this.$ = $$[$0].replace(/"/g, "");
+ break;
+ case 34:
+ this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] };
+ break;
+ case 35:
+ this.$ = yy.Cardinality.ZERO_OR_ONE;
+ break;
+ case 36:
+ this.$ = yy.Cardinality.ZERO_OR_MORE;
+ break;
+ case 37:
+ this.$ = yy.Cardinality.ONE_OR_MORE;
+ break;
+ case 38:
+ this.$ = yy.Cardinality.ONLY_ONE;
+ break;
+ case 39:
+ this.$ = yy.Cardinality.MD_PARENT;
+ break;
+ case 40:
+ this.$ = yy.Identification.NON_IDENTIFYING;
+ break;
+ case 41:
+ this.$ = yy.Identification.IDENTIFYING;
+ break;
+ case 45:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 46:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 47:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 48:
+ yy.parseDirective("}%%", "close_directive", "er");
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: $V0, 7: 3, 12: 4, 52: $V1 }, { 1: [3] }, o($V2, [2, 3], { 5: 6 }), { 3: 7, 4: $V0, 7: 3, 12: 4, 52: $V1 }, { 13: 8, 53: [1, 9] }, { 53: [2, 45] }, { 6: [1, 10], 7: 15, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: 16, 23: $V3, 25: $V4, 27: $V5, 29: $V6, 30: $V7, 31: $V8, 52: $V1 }, { 1: [2, 2] }, { 14: 23, 15: [1, 24], 55: $V9 }, o([15, 55], [2, 46]), o($V2, [2, 8], { 1: [2, 1] }), o($V2, [2, 4]), { 7: 15, 10: 26, 12: 4, 17: 16, 23: $V3, 25: $V4, 27: $V5, 29: $V6, 30: $V7, 31: $V8, 52: $V1 }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 11]), o($V2, [2, 15], { 18: 27, 42: 29, 20: [1, 28], 44: $Va, 45: $Vb, 46: $Vc, 47: $Vd, 48: $Ve }), { 24: [1, 35] }, { 26: [1, 36] }, { 28: [1, 37] }, o($V2, [2, 19]), o($Vf, [2, 20]), o($Vf, [2, 21]), { 11: [1, 38] }, { 16: 39, 54: [1, 40] }, { 11: [2, 48] }, o($V2, [2, 5]), { 17: 41, 30: $V7, 31: $V8 }, { 21: 42, 22: [1, 43], 32: 44, 33: 45, 37: $Vg }, { 43: 47, 49: [1, 48], 50: [1, 49] }, o($Vh, [2, 35]), o($Vh, [2, 36]), o($Vh, [2, 37]), o($Vh, [2, 38]), o($Vh, [2, 39]), o($V2, [2, 16]), o($V2, [2, 17]), o($V2, [2, 18]), o($Vi, [2, 9]), { 14: 50, 55: $V9 }, { 55: [2, 47] }, { 15: [1, 51] }, { 22: [1, 52] }, o($V2, [2, 14]), { 21: 53, 22: [2, 22], 32: 44, 33: 45, 37: $Vg }, { 34: 54, 37: [1, 55] }, { 37: [2, 28] }, { 42: 56, 44: $Va, 45: $Vb, 46: $Vc, 47: $Vd, 48: $Ve }, o($Vj, [2, 40]), o($Vj, [2, 41]), { 11: [1, 57] }, { 19: 58, 30: [1, 61], 31: [1, 60], 51: [1, 59] }, o($V2, [2, 13]), { 22: [2, 23] }, o($Vk, [2, 24], { 35: 62, 36: 63, 38: 64, 40: $Vl, 41: $Vm }), o([22, 37, 40, 41], [2, 29]), o([30, 31], [2, 34]), o($Vi, [2, 10]), o($V2, [2, 12]), o($V2, [2, 42]), o($V2, [2, 43]), o($V2, [2, 44]), o($Vk, [2, 25], { 36: 67, 39: [1, 68], 41: $Vm }), o($Vk, [2, 26]), o($Vn, [2, 30]), o($Vk, [2, 33]), o($Vn, [2, 32]), o($Vk, [2, 27]), { 38: 69, 40: $Vl }, o($Vn, [2, 31])],
+ defaultActions: { 5: [2, 45], 7: [2, 2], 25: [2, 48], 40: [2, 47], 46: [2, 28], 53: [2, 23] },
+ 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 25;
+ case 1:
+ this.popState();
+ return "acc_title_value";
+ case 2:
+ this.begin("acc_descr");
+ return 27;
+ 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("open_directive");
+ return 52;
+ case 8:
+ this.begin("type_directive");
+ return 53;
+ case 9:
+ this.popState();
+ this.begin("arg_directive");
+ return 15;
+ case 10:
+ this.popState();
+ this.popState();
+ return 55;
+ case 11:
+ return 54;
+ case 12:
+ return 11;
+ case 13:
+ break;
+ case 14:
+ return 9;
+ case 15:
+ return 31;
+ case 16:
+ return 51;
+ case 17:
+ return 4;
+ case 18:
+ this.begin("block");
+ return 20;
+ case 19:
+ return 39;
+ case 20:
+ break;
+ case 21:
+ return 40;
+ case 22:
+ return 37;
+ case 23:
+ return 37;
+ case 24:
+ return 41;
+ case 25:
+ break;
+ case 26:
+ this.popState();
+ return 22;
+ case 27:
+ return yy_.yytext[0];
+ case 28:
+ return 44;
+ case 29:
+ return 46;
+ case 30:
+ return 46;
+ case 31:
+ return 46;
+ case 32:
+ return 44;
+ case 33:
+ return 44;
+ case 34:
+ return 45;
+ case 35:
+ return 45;
+ case 36:
+ return 45;
+ case 37:
+ return 45;
+ case 38:
+ return 45;
+ case 39:
+ return 46;
+ case 40:
+ return 45;
+ case 41:
+ return 46;
+ case 42:
+ return 47;
+ case 43:
+ return 47;
+ case 44:
+ return 47;
+ case 45:
+ return 47;
+ case 46:
+ return 44;
+ case 47:
+ return 45;
+ case 48:
+ return 46;
+ case 49:
+ return 48;
+ case 50:
+ return 49;
+ case 51:
+ return 50;
+ case 52:
+ return 50;
+ case 53:
+ return 49;
+ case 54:
+ return 49;
+ case 55:
+ return 49;
+ case 56:
+ return 30;
+ case 57:
+ return yy_.yytext[0];
+ case 58:
+ return 6;
+ }
+ },
+ rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/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, /^(?: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 }, "open_directive": { "rules": [8], "inclusive": false }, "type_directive": { "rules": [9, 10], "inclusive": false }, "arg_directive": { "rules": [10, 11], "inclusive": false }, "block": { "rules": [19, 20, 21, 22, 23, 24, 25, 26, 27], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 12, 13, 14, 15, 16, 17, 18, 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], "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 parseDirective$a = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ const addEntity = function(name2) {
+ if (entities[name2] === void 0) {
+ entities[name2] = { attributes: [] };
+ log$1.info("Added new 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,
+ parseDirective: parseDirective$a,
+ 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(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, 4], $V1 = [1, 7], $V2 = [1, 5], $V3 = [1, 9], $V4 = [1, 6], $V5 = [2, 6], $V6 = [1, 16], $V7 = [6, 8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40, 50, 55], $V8 = [8, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], $V9 = [8, 13, 14, 20, 22, 24, 25, 27, 29, 32, 37, 40], $Va = [1, 26], $Vb = [6, 8, 14, 50, 55], $Vc = [8, 14, 55], $Vd = [1, 53], $Ve = [1, 52], $Vf = [8, 14, 30, 33, 35, 38, 55], $Vg = [1, 67], $Vh = [1, 68], $Vi = [1, 69], $Vj = [8, 14, 33, 35, 42, 55];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "eol": 4, "directive": 5, "GG": 6, "document": 7, "EOF": 8, ":": 9, "DIR": 10, "options": 11, "body": 12, "OPT": 13, "NL": 14, "line": 15, "statement": 16, "commitStatement": 17, "mergeStatement": 18, "cherryPickStatement": 19, "acc_title": 20, "acc_title_value": 21, "acc_descr": 22, "acc_descr_value": 23, "acc_descr_multiline_value": 24, "section": 25, "branchStatement": 26, "CHECKOUT": 27, "ref": 28, "BRANCH": 29, "ORDER": 30, "NUM": 31, "CHERRY_PICK": 32, "COMMIT_ID": 33, "STR": 34, "COMMIT_TAG": 35, "EMPTYSTR": 36, "MERGE": 37, "COMMIT_TYPE": 38, "commitType": 39, "COMMIT": 40, "commit_arg": 41, "COMMIT_MSG": 42, "NORMAL": 43, "REVERSE": 44, "HIGHLIGHT": 45, "openDirective": 46, "typeDirective": 47, "closeDirective": 48, "argDirective": 49, "open_directive": 50, "type_directive": 51, "arg_directive": 52, "close_directive": 53, "ID": 54, ";": 55, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 6: "GG", 8: "EOF", 9: ":", 10: "DIR", 13: "OPT", 14: "NL", 20: "acc_title", 21: "acc_title_value", 22: "acc_descr", 23: "acc_descr_value", 24: "acc_descr_multiline_value", 25: "section", 27: "CHECKOUT", 29: "BRANCH", 30: "ORDER", 31: "NUM", 32: "CHERRY_PICK", 33: "COMMIT_ID", 34: "STR", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 50: "open_directive", 51: "type_directive", 52: "arg_directive", 53: "close_directive", 54: "ID", 55: ";" },
+ productions_: [0, [3, 2], [3, 2], [3, 3], [3, 4], [3, 5], [7, 0], [7, 2], [11, 2], [11, 1], [12, 0], [12, 2], [15, 2], [15, 1], [16, 1], [16, 1], [16, 1], [16, 2], [16, 2], [16, 1], [16, 1], [16, 1], [16, 2], [26, 2], [26, 4], [19, 3], [19, 5], [19, 5], [19, 5], [19, 5], [18, 2], [18, 4], [18, 4], [18, 4], [18, 6], [18, 6], [18, 6], [18, 6], [18, 6], [18, 6], [18, 8], [18, 8], [18, 8], [18, 8], [18, 8], [18, 8], [17, 2], [17, 3], [17, 3], [17, 5], [17, 5], [17, 3], [17, 5], [17, 5], [17, 5], [17, 5], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 3], [17, 5], [17, 5], [17, 5], [17, 5], [17, 5], [17, 5], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 7], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [17, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [5, 3], [5, 5], [46, 1], [47, 1], [49, 1], [48, 1], [28, 1], [28, 1], [4, 1], [4, 1], [4, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 3:
+ return $$[$0];
+ case 4:
+ return $$[$0 - 1];
+ case 5:
+ yy.setDirection($$[$0 - 3]);
+ return $$[$0 - 1];
+ case 7:
+ yy.setOptions($$[$0 - 1]);
+ this.$ = $$[$0];
+ break;
+ case 8:
+ $$[$0 - 1] += $$[$0];
+ this.$ = $$[$0 - 1];
+ break;
+ case 10:
+ this.$ = [];
+ break;
+ case 11:
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 12:
+ this.$ = $$[$0 - 1];
+ break;
+ case 17:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 18:
+ case 19:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 20:
+ yy.addSection($$[$0].substr(8));
+ this.$ = $$[$0].substr(8);
+ break;
+ case 22:
+ yy.checkout($$[$0]);
+ break;
+ case 23:
+ yy.branch($$[$0]);
+ break;
+ case 24:
+ yy.branch($$[$0 - 2], $$[$0]);
+ break;
+ case 25:
+ yy.cherryPick($$[$0], "", void 0);
+ break;
+ case 26:
+ yy.cherryPick($$[$0 - 2], "", $$[$0]);
+ break;
+ case 27:
+ case 29:
+ yy.cherryPick($$[$0 - 2], "", "");
+ break;
+ case 28:
+ yy.cherryPick($$[$0], "", $$[$0 - 2]);
+ break;
+ case 30:
+ yy.merge($$[$0], "", "", "");
+ break;
+ case 31:
+ yy.merge($$[$0 - 2], $$[$0], "", "");
+ break;
+ case 32:
+ yy.merge($$[$0 - 2], "", $$[$0], "");
+ break;
+ case 33:
+ yy.merge($$[$0 - 2], "", "", $$[$0]);
+ break;
+ case 34:
+ yy.merge($$[$0 - 4], $$[$0], "", $$[$0 - 2]);
+ break;
+ case 35:
+ yy.merge($$[$0 - 4], "", $$[$0], $$[$0 - 2]);
+ 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 - 2], "", $$[$0]);
+ break;
+ case 39:
+ yy.merge($$[$0 - 4], $$[$0], $$[$0 - 2], "");
+ break;
+ case 40:
+ yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]);
+ break;
+ case 41:
+ yy.merge($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]);
+ break;
+ case 42:
+ yy.merge($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]);
+ break;
+ case 43:
+ yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]);
+ break;
+ case 44:
+ yy.merge($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]);
+ break;
+ case 45:
+ yy.merge($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]);
+ break;
+ case 46:
+ yy.commit($$[$0]);
+ break;
+ case 47:
+ yy.commit("", "", yy.commitType.NORMAL, $$[$0]);
+ break;
+ case 48:
+ yy.commit("", "", $$[$0], "");
+ break;
+ case 49:
+ yy.commit("", "", $$[$0], $$[$0 - 2]);
+ break;
+ case 50:
+ yy.commit("", "", $$[$0 - 2], $$[$0]);
+ break;
+ case 51:
+ yy.commit("", $$[$0], yy.commitType.NORMAL, "");
+ break;
+ case 52:
+ yy.commit("", $$[$0 - 2], yy.commitType.NORMAL, $$[$0]);
+ break;
+ case 53:
+ yy.commit("", $$[$0], yy.commitType.NORMAL, $$[$0 - 2]);
+ break;
+ case 54:
+ yy.commit("", $$[$0 - 2], $$[$0], "");
+ break;
+ case 55:
+ yy.commit("", $$[$0], $$[$0 - 2], "");
+ break;
+ case 56:
+ yy.commit("", $$[$0 - 4], $$[$0 - 2], $$[$0]);
+ break;
+ case 57:
+ yy.commit("", $$[$0 - 4], $$[$0], $$[$0 - 2]);
+ break;
+ case 58:
+ yy.commit("", $$[$0 - 2], $$[$0 - 4], $$[$0]);
+ break;
+ case 59:
+ yy.commit("", $$[$0], $$[$0 - 4], $$[$0 - 2]);
+ break;
+ case 60:
+ yy.commit("", $$[$0], $$[$0 - 2], $$[$0 - 4]);
+ break;
+ case 61:
+ yy.commit("", $$[$0 - 2], $$[$0], $$[$0 - 4]);
+ break;
+ case 62:
+ yy.commit($$[$0], "", yy.commitType.NORMAL, "");
+ break;
+ case 63:
+ yy.commit($$[$0], "", yy.commitType.NORMAL, $$[$0 - 2]);
+ break;
+ case 64:
+ yy.commit($$[$0 - 2], "", yy.commitType.NORMAL, $$[$0]);
+ break;
+ case 65:
+ yy.commit($$[$0 - 2], "", $$[$0], "");
+ break;
+ case 66:
+ yy.commit($$[$0], "", $$[$0 - 2], "");
+ break;
+ case 67:
+ yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, "");
+ break;
+ case 68:
+ yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, "");
+ break;
+ case 69:
+ yy.commit($$[$0 - 4], "", $$[$0 - 2], $$[$0]);
+ break;
+ case 70:
+ yy.commit($$[$0 - 4], "", $$[$0], $$[$0 - 2]);
+ break;
+ case 71:
+ yy.commit($$[$0 - 2], "", $$[$0 - 4], $$[$0]);
+ break;
+ case 72:
+ yy.commit($$[$0], "", $$[$0 - 4], $$[$0 - 2]);
+ break;
+ case 73:
+ yy.commit($$[$0], "", $$[$0 - 2], $$[$0 - 4]);
+ break;
+ case 74:
+ yy.commit($$[$0 - 2], "", $$[$0], $$[$0 - 4]);
+ break;
+ case 75:
+ yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], "");
+ break;
+ case 76:
+ yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], "");
+ break;
+ case 77:
+ yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], "");
+ break;
+ case 78:
+ yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], "");
+ break;
+ case 79:
+ yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], "");
+ break;
+ case 80:
+ yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], "");
+ break;
+ case 81:
+ yy.commit($$[$0 - 4], $$[$0], yy.commitType.NORMAL, $$[$0 - 2]);
+ break;
+ case 82:
+ yy.commit($$[$0 - 4], $$[$0 - 2], yy.commitType.NORMAL, $$[$0]);
+ break;
+ case 83:
+ yy.commit($$[$0 - 2], $$[$0], yy.commitType.NORMAL, $$[$0 - 4]);
+ break;
+ case 84:
+ yy.commit($$[$0], $$[$0 - 2], yy.commitType.NORMAL, $$[$0 - 4]);
+ break;
+ case 85:
+ yy.commit($$[$0], $$[$0 - 4], yy.commitType.NORMAL, $$[$0 - 2]);
+ break;
+ case 86:
+ yy.commit($$[$0 - 2], $$[$0 - 4], yy.commitType.NORMAL, $$[$0]);
+ break;
+ case 87:
+ yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0 - 2], $$[$0]);
+ break;
+ case 88:
+ yy.commit($$[$0 - 6], $$[$0 - 4], $$[$0], $$[$0 - 2]);
+ break;
+ case 89:
+ yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0 - 4], $$[$0]);
+ break;
+ case 90:
+ yy.commit($$[$0 - 6], $$[$0], $$[$0 - 4], $$[$0 - 2]);
+ break;
+ case 91:
+ yy.commit($$[$0 - 6], $$[$0 - 2], $$[$0], $$[$0 - 4]);
+ break;
+ case 92:
+ yy.commit($$[$0 - 6], $$[$0], $$[$0 - 2], $$[$0 - 4]);
+ break;
+ case 93:
+ yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0 - 2], $$[$0]);
+ break;
+ case 94:
+ yy.commit($$[$0 - 4], $$[$0 - 6], $$[$0], $$[$0 - 2]);
+ break;
+ case 95:
+ yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0 - 4], $$[$0]);
+ break;
+ case 96:
+ yy.commit($$[$0], $$[$0 - 6], $$[$0 - 4], $$[$0 - 2]);
+ break;
+ case 97:
+ yy.commit($$[$0 - 2], $$[$0 - 6], $$[$0], $$[$0 - 4]);
+ break;
+ case 98:
+ yy.commit($$[$0], $$[$0 - 6], $$[$0 - 2], $$[$0 - 4]);
+ break;
+ case 99:
+ yy.commit($$[$0], $$[$0 - 4], $$[$0 - 2], $$[$0 - 6]);
+ break;
+ case 100:
+ yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0], $$[$0 - 6]);
+ break;
+ case 101:
+ yy.commit($$[$0], $$[$0 - 2], $$[$0 - 4], $$[$0 - 6]);
+ break;
+ case 102:
+ yy.commit($$[$0 - 2], $$[$0], $$[$0 - 4], $$[$0 - 6]);
+ break;
+ case 103:
+ yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0], $$[$0 - 6]);
+ break;
+ case 104:
+ yy.commit($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 6]);
+ break;
+ case 105:
+ yy.commit($$[$0 - 2], $$[$0 - 4], $$[$0 - 6], $$[$0]);
+ break;
+ case 106:
+ yy.commit($$[$0], $$[$0 - 4], $$[$0 - 6], $$[$0 - 2]);
+ break;
+ case 107:
+ yy.commit($$[$0 - 2], $$[$0], $$[$0 - 6], $$[$0 - 4]);
+ break;
+ case 108:
+ yy.commit($$[$0], $$[$0 - 2], $$[$0 - 6], $$[$0 - 4]);
+ break;
+ case 109:
+ yy.commit($$[$0 - 4], $$[$0 - 2], $$[$0 - 6], $$[$0]);
+ break;
+ case 110:
+ yy.commit($$[$0 - 4], $$[$0], $$[$0 - 6], $$[$0 - 2]);
+ break;
+ case 111:
+ this.$ = "";
+ break;
+ case 112:
+ this.$ = $$[$0];
+ break;
+ case 113:
+ this.$ = yy.commitType.NORMAL;
+ break;
+ case 114:
+ this.$ = yy.commitType.REVERSE;
+ break;
+ case 115:
+ this.$ = yy.commitType.HIGHLIGHT;
+ break;
+ case 118:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 119:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 120:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 121:
+ yy.parseDirective("}%%", "close_directive", "gitGraph");
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: 3, 6: $V0, 8: $V1, 14: $V2, 46: 8, 50: $V3, 55: $V4 }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: $V0, 8: $V1, 14: $V2, 46: 8, 50: $V3, 55: $V4 }, { 3: 11, 4: 2, 5: 3, 6: $V0, 8: $V1, 14: $V2, 46: 8, 50: $V3, 55: $V4 }, { 7: 12, 8: $V5, 9: [1, 13], 10: [1, 14], 11: 15, 14: $V6 }, o($V7, [2, 124]), o($V7, [2, 125]), o($V7, [2, 126]), { 47: 17, 51: [1, 18] }, { 51: [2, 118] }, { 1: [2, 1] }, { 1: [2, 2] }, { 8: [1, 19] }, { 7: 20, 8: $V5, 11: 15, 14: $V6 }, { 9: [1, 21] }, o($V8, [2, 10], { 12: 22, 13: [1, 23] }), o($V9, [2, 9]), { 9: [1, 25], 48: 24, 53: $Va }, o([9, 53], [2, 119]), { 1: [2, 3] }, { 8: [1, 27] }, { 7: 28, 8: $V5, 11: 15, 14: $V6 }, { 8: [2, 7], 14: [1, 31], 15: 29, 16: 30, 17: 32, 18: 33, 19: 34, 20: [1, 35], 22: [1, 36], 24: [1, 37], 25: [1, 38], 26: 39, 27: [1, 40], 29: [1, 44], 32: [1, 43], 37: [1, 42], 40: [1, 41] }, o($V9, [2, 8]), o($Vb, [2, 116]), { 49: 45, 52: [1, 46] }, o($Vb, [2, 121]), { 1: [2, 4] }, { 8: [1, 47] }, o($V8, [2, 11]), { 4: 48, 8: $V1, 14: $V2, 55: $V4 }, o($V8, [2, 13]), o($Vc, [2, 14]), o($Vc, [2, 15]), o($Vc, [2, 16]), { 21: [1, 49] }, { 23: [1, 50] }, o($Vc, [2, 19]), o($Vc, [2, 20]), o($Vc, [2, 21]), { 28: 51, 34: $Vd, 54: $Ve }, o($Vc, [2, 111], { 41: 54, 33: [1, 57], 34: [1, 59], 35: [1, 55], 38: [1, 56], 42: [1, 58] }), { 28: 60, 34: $Vd, 54: $Ve }, { 33: [1, 61], 35: [1, 62] }, { 28: 63, 34: $Vd, 54: $Ve }, { 48: 64, 53: $Va }, { 53: [2, 120] }, { 1: [2, 5] }, o($V8, [2, 12]), o($Vc, [2, 17]), o($Vc, [2, 18]), o($Vc, [2, 22]), o($Vf, [2, 122]), o($Vf, [2, 123]), o($Vc, [2, 46]), { 34: [1, 65] }, { 39: 66, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 70] }, { 34: [1, 71] }, o($Vc, [2, 112]), o($Vc, [2, 30], { 33: [1, 72], 35: [1, 74], 38: [1, 73] }), { 34: [1, 75] }, { 34: [1, 76], 36: [1, 77] }, o($Vc, [2, 23], { 30: [1, 78] }), o($Vb, [2, 117]), o($Vc, [2, 47], { 33: [1, 80], 38: [1, 79], 42: [1, 81] }), o($Vc, [2, 48], { 33: [1, 83], 35: [1, 82], 42: [1, 84] }), o($Vj, [2, 113]), o($Vj, [2, 114]), o($Vj, [2, 115]), o($Vc, [2, 51], { 35: [1, 85], 38: [1, 86], 42: [1, 87] }), o($Vc, [2, 62], { 33: [1, 90], 35: [1, 88], 38: [1, 89] }), { 34: [1, 91] }, { 39: 92, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 93] }, o($Vc, [2, 25], { 35: [1, 94] }), { 33: [1, 95] }, { 33: [1, 96] }, { 31: [1, 97] }, { 39: 98, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 99] }, { 34: [1, 100] }, { 34: [1, 101] }, { 34: [1, 102] }, { 34: [1, 103] }, { 34: [1, 104] }, { 39: 105, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 106] }, { 34: [1, 107] }, { 39: 108, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 109] }, o($Vc, [2, 31], { 35: [1, 111], 38: [1, 110] }), o($Vc, [2, 32], { 33: [1, 113], 35: [1, 112] }), o($Vc, [2, 33], { 33: [1, 114], 38: [1, 115] }), { 34: [1, 116], 36: [1, 117] }, { 34: [1, 118] }, { 34: [1, 119] }, o($Vc, [2, 24]), o($Vc, [2, 49], { 33: [1, 120], 42: [1, 121] }), o($Vc, [2, 53], { 38: [1, 122], 42: [1, 123] }), o($Vc, [2, 63], { 33: [1, 125], 38: [1, 124] }), o($Vc, [2, 50], { 33: [1, 126], 42: [1, 127] }), o($Vc, [2, 55], { 35: [1, 128], 42: [1, 129] }), o($Vc, [2, 66], { 33: [1, 131], 35: [1, 130] }), o($Vc, [2, 52], { 38: [1, 132], 42: [1, 133] }), o($Vc, [2, 54], { 35: [1, 134], 42: [1, 135] }), o($Vc, [2, 67], { 35: [1, 137], 38: [1, 136] }), o($Vc, [2, 64], { 33: [1, 139], 38: [1, 138] }), o($Vc, [2, 65], { 33: [1, 141], 35: [1, 140] }), o($Vc, [2, 68], { 35: [1, 143], 38: [1, 142] }), { 39: 144, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 145] }, { 34: [1, 146] }, { 34: [1, 147] }, { 34: [1, 148] }, { 39: 149, 43: $Vg, 44: $Vh, 45: $Vi }, o($Vc, [2, 26]), o($Vc, [2, 27]), o($Vc, [2, 28]), o($Vc, [2, 29]), { 34: [1, 150] }, { 34: [1, 151] }, { 39: 152, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 153] }, { 39: 154, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 155] }, { 34: [1, 156] }, { 34: [1, 157] }, { 34: [1, 158] }, { 34: [1, 159] }, { 34: [1, 160] }, { 34: [1, 161] }, { 39: 162, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 163] }, { 34: [1, 164] }, { 34: [1, 165] }, { 39: 166, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 167] }, { 39: 168, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 169] }, { 34: [1, 170] }, { 34: [1, 171] }, { 39: 172, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 173] }, o($Vc, [2, 37], { 35: [1, 174] }), o($Vc, [2, 38], { 38: [1, 175] }), o($Vc, [2, 36], { 33: [1, 176] }), o($Vc, [2, 39], { 35: [1, 177] }), o($Vc, [2, 34], { 38: [1, 178] }), o($Vc, [2, 35], { 33: [1, 179] }), o($Vc, [2, 60], { 42: [1, 180] }), o($Vc, [2, 73], { 33: [1, 181] }), o($Vc, [2, 61], { 42: [1, 182] }), o($Vc, [2, 84], { 38: [1, 183] }), o($Vc, [2, 74], { 33: [1, 184] }), o($Vc, [2, 83], { 38: [1, 185] }), o($Vc, [2, 59], { 42: [1, 186] }), o($Vc, [2, 72], { 33: [1, 187] }), o($Vc, [2, 58], { 42: [1, 188] }), o($Vc, [2, 78], { 35: [1, 189] }), o($Vc, [2, 71], { 33: [1, 190] }), o($Vc, [2, 77], { 35: [1, 191] }), o($Vc, [2, 57], { 42: [1, 192] }), o($Vc, [2, 85], { 38: [1, 193] }), o($Vc, [2, 56], { 42: [1, 194] }), o($Vc, [2, 79], { 35: [1, 195] }), o($Vc, [2, 80], { 35: [1, 196] }), o($Vc, [2, 86], { 38: [1, 197] }), o($Vc, [2, 70], { 33: [1, 198] }), o($Vc, [2, 81], { 38: [1, 199] }), o($Vc, [2, 69], { 33: [1, 200] }), o($Vc, [2, 75], { 35: [1, 201] }), o($Vc, [2, 76], { 35: [1, 202] }), o($Vc, [2, 82], { 38: [1, 203] }), { 34: [1, 204] }, { 39: 205, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 206] }, { 34: [1, 207] }, { 39: 208, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 209] }, { 34: [1, 210] }, { 34: [1, 211] }, { 34: [1, 212] }, { 39: 213, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 214] }, { 39: 215, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 216] }, { 34: [1, 217] }, { 34: [1, 218] }, { 34: [1, 219] }, { 34: [1, 220] }, { 34: [1, 221] }, { 34: [1, 222] }, { 39: 223, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 224] }, { 34: [1, 225] }, { 34: [1, 226] }, { 39: 227, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 228] }, { 39: 229, 43: $Vg, 44: $Vh, 45: $Vi }, { 34: [1, 230] }, { 34: [1, 231] }, { 34: [1, 232] }, { 39: 233, 43: $Vg, 44: $Vh, 45: $Vi }, o($Vc, [2, 40]), o($Vc, [2, 42]), o($Vc, [2, 41]), o($Vc, [2, 43]), o($Vc, [2, 45]), o($Vc, [2, 44]), o($Vc, [2, 101]), o($Vc, [2, 102]), o($Vc, [2, 99]), o($Vc, [2, 100]), o($Vc, [2, 104]), o($Vc, [2, 103]), o($Vc, [2, 108]), o($Vc, [2, 107]), o($Vc, [2, 106]), o($Vc, [2, 105]), o($Vc, [2, 110]), o($Vc, [2, 109]), o($Vc, [2, 98]), o($Vc, [2, 97]), o($Vc, [2, 96]), o($Vc, [2, 95]), o($Vc, [2, 93]), o($Vc, [2, 94]), o($Vc, [2, 92]), o($Vc, [2, 91]), o($Vc, [2, 90]), o($Vc, [2, 89]), o($Vc, [2, 87]), o($Vc, [2, 88])],
+ defaultActions: { 9: [2, 118], 10: [2, 1], 11: [2, 2], 19: [2, 3], 27: [2, 4], 46: [2, 120], 47: [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: { "case-insensitive": true },
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
+ switch ($avoiding_name_collisions) {
+ case 0:
+ this.begin("open_directive");
+ return 50;
+ case 1:
+ this.begin("type_directive");
+ return 51;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 9;
+ case 3:
+ this.popState();
+ this.popState();
+ return 53;
+ case 4:
+ return 52;
+ case 5:
+ this.begin("acc_title");
+ return 20;
+ case 6:
+ this.popState();
+ return "acc_title_value";
+ case 7:
+ this.begin("acc_descr");
+ return 22;
+ case 8:
+ this.popState();
+ return "acc_descr_value";
+ case 9:
+ this.begin("acc_descr_multiline");
+ break;
+ case 10:
+ this.popState();
+ break;
+ case 11:
+ return "acc_descr_multiline_value";
+ case 12:
+ return 14;
+ case 13:
+ break;
+ case 14:
+ break;
+ case 15:
+ return 6;
+ case 16:
+ return 40;
+ case 17:
+ return 33;
+ case 18:
+ return 38;
+ case 19:
+ return 42;
+ case 20:
+ return 43;
+ case 21:
+ return 44;
+ case 22:
+ return 45;
+ case 23:
+ return 35;
+ case 24:
+ return 29;
+ case 25:
+ return 30;
+ case 26:
+ return 37;
+ case 27:
+ return 32;
+ case 28:
+ return 27;
+ case 29:
+ return 10;
+ case 30:
+ return 10;
+ case 31:
+ return 9;
+ case 32:
+ return "CARET";
+ case 33:
+ this.begin("options");
+ break;
+ case 34:
+ this.popState();
+ break;
+ case 35:
+ return 13;
+ case 36:
+ return 36;
+ case 37:
+ this.begin("string");
+ break;
+ case 38:
+ this.popState();
+ break;
+ case 39:
+ return 34;
+ case 40:
+ return 31;
+ case 41:
+ return 54;
+ case 42:
+ return 8;
+ }
+ },
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\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, /^(?:#[^\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": [10, 11], "inclusive": false }, "acc_descr": { "rules": [8], "inclusive": false }, "acc_title": { "rules": [6], "inclusive": false }, "close_directive": { "rules": [], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "open_directive": { "rules": [1], "inclusive": false }, "options": { "rules": [34, 35], "inclusive": false }, "string": { "rules": [38, 39], "inclusive": false }, "INITIAL": { "rules": [0, 5, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 36, 37, 40, 41, 42, 43], "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 });
+ }
+ const parseDirective$9 = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ 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 = {
+ parseDirective: parseDirective$9,
+ 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 = [1, 3], $V1 = [1, 5], $V2 = [7, 9, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 36, 43, 48], $V3 = [1, 32], $V4 = [1, 33], $V5 = [1, 34], $V6 = [1, 35], $V7 = [1, 36], $V8 = [1, 37], $V9 = [1, 38], $Va = [1, 15], $Vb = [1, 16], $Vc = [1, 17], $Vd = [1, 18], $Ve = [1, 19], $Vf = [1, 20], $Vg = [1, 21], $Vh = [1, 22], $Vi = [1, 24], $Vj = [1, 25], $Vk = [1, 26], $Vl = [1, 27], $Vm = [1, 28], $Vn = [1, 30], $Vo = [1, 39], $Vp = [1, 42], $Vq = [5, 7, 9, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 33, 34, 36, 43, 48];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "directive": 4, "gantt": 5, "document": 6, "EOF": 7, "line": 8, "SPACE": 9, "statement": 10, "NL": 11, "weekday": 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": 34, "clickStatement": 35, "taskTxt": 36, "taskData": 37, "openDirective": 38, "typeDirective": 39, "closeDirective": 40, ":": 41, "argDirective": 42, "click": 43, "callbackname": 44, "callbackargs": 45, "href": 46, "clickStatementDebug": 47, "open_directive": 48, "type_directive": 49, "arg_directive": 50, "close_directive": 51, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 5: "gantt", 7: "EOF", 9: "SPACE", 11: "NL", 13: "weekday_monday", 14: "weekday_tuesday", 15: "weekday_wednesday", 16: "weekday_thursday", 17: "weekday_friday", 18: "weekday_saturday", 19: "weekday_sunday", 20: "dateFormat", 21: "inclusiveEndDates", 22: "topAxis", 23: "axisFormat", 24: "tickInterval", 25: "excludes", 26: "includes", 27: "todayMarker", 28: "title", 29: "acc_title", 30: "acc_title_value", 31: "acc_descr", 32: "acc_descr_value", 33: "acc_descr_multiline_value", 34: "section", 36: "taskTxt", 37: "taskData", 41: ":", 43: "click", 44: "callbackname", 45: "callbackargs", 46: "href", 48: "open_directive", 49: "type_directive", 50: "arg_directive", 51: "close_directive" },
+ productions_: [0, [3, 2], [3, 3], [6, 0], [6, 2], [8, 2], [8, 1], [8, 1], [8, 1], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 2], [10, 1], [4, 4], [4, 6], [35, 2], [35, 3], [35, 3], [35, 4], [35, 3], [35, 4], [35, 2], [47, 2], [47, 3], [47, 3], [47, 4], [47, 3], [47, 4], [47, 2], [38, 1], [39, 1], [42, 1], [40, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 2:
+ return $$[$0 - 1];
+ case 3:
+ this.$ = [];
+ break;
+ case 4:
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 5:
+ case 6:
+ this.$ = $$[$0];
+ break;
+ case 7:
+ case 8:
+ this.$ = [];
+ break;
+ case 9:
+ yy.setWeekday("monday");
+ break;
+ case 10:
+ yy.setWeekday("tuesday");
+ break;
+ case 11:
+ yy.setWeekday("wednesday");
+ break;
+ case 12:
+ yy.setWeekday("thursday");
+ break;
+ case 13:
+ yy.setWeekday("friday");
+ break;
+ case 14:
+ yy.setWeekday("saturday");
+ break;
+ case 15:
+ yy.setWeekday("sunday");
+ break;
+ case 16:
+ yy.setDateFormat($$[$0].substr(11));
+ this.$ = $$[$0].substr(11);
+ break;
+ case 17:
+ yy.enableInclusiveEndDates();
+ this.$ = $$[$0].substr(18);
+ break;
+ case 18:
+ yy.TopAxis();
+ this.$ = $$[$0].substr(8);
+ break;
+ case 19:
+ yy.setAxisFormat($$[$0].substr(11));
+ this.$ = $$[$0].substr(11);
+ break;
+ case 20:
+ yy.setTickInterval($$[$0].substr(13));
+ this.$ = $$[$0].substr(13);
+ break;
+ case 21:
+ yy.setExcludes($$[$0].substr(9));
+ this.$ = $$[$0].substr(9);
+ break;
+ case 22:
+ yy.setIncludes($$[$0].substr(9));
+ this.$ = $$[$0].substr(9);
+ break;
+ case 23:
+ yy.setTodayMarker($$[$0].substr(12));
+ this.$ = $$[$0].substr(12);
+ break;
+ case 25:
+ yy.setDiagramTitle($$[$0].substr(6));
+ this.$ = $$[$0].substr(6);
+ break;
+ case 26:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 27:
+ case 28:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 29:
+ yy.addSection($$[$0].substr(8));
+ this.$ = $$[$0].substr(8);
+ break;
+ case 31:
+ yy.addTask($$[$0 - 1], $$[$0]);
+ this.$ = "task";
+ break;
+ case 35:
+ this.$ = $$[$0 - 1];
+ yy.setClickEvent($$[$0 - 1], $$[$0], null);
+ break;
+ case 36:
+ this.$ = $$[$0 - 2];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 37:
+ this.$ = $$[$0 - 2];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], null);
+ yy.setLink($$[$0 - 2], $$[$0]);
+ break;
+ case 38:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
+ yy.setLink($$[$0 - 3], $$[$0]);
+ break;
+ case 39:
+ this.$ = $$[$0 - 2];
+ yy.setClickEvent($$[$0 - 2], $$[$0], null);
+ yy.setLink($$[$0 - 2], $$[$0 - 1]);
+ break;
+ case 40:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 1], $$[$0]);
+ yy.setLink($$[$0 - 3], $$[$0 - 2]);
+ break;
+ case 41:
+ this.$ = $$[$0 - 1];
+ yy.setLink($$[$0 - 1], $$[$0]);
+ break;
+ case 42:
+ case 48:
+ this.$ = $$[$0 - 1] + " " + $$[$0];
+ break;
+ case 43:
+ case 44:
+ case 46:
+ this.$ = $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
+ break;
+ case 45:
+ case 47:
+ this.$ = $$[$0 - 3] + " " + $$[$0 - 2] + " " + $$[$0 - 1] + " " + $$[$0];
+ break;
+ case 49:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 50:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 51:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 52:
+ yy.parseDirective("}%%", "close_directive", "gantt");
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: $V0, 38: 4, 48: $V1 }, { 1: [3] }, { 3: 6, 4: 2, 5: $V0, 38: 4, 48: $V1 }, o($V2, [2, 3], { 6: 7 }), { 39: 8, 49: [1, 9] }, { 49: [2, 49] }, { 1: [2, 1] }, { 4: 31, 7: [1, 10], 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 23, 13: $V3, 14: $V4, 15: $V5, 16: $V6, 17: $V7, 18: $V8, 19: $V9, 20: $Va, 21: $Vb, 22: $Vc, 23: $Vd, 24: $Ve, 25: $Vf, 26: $Vg, 27: $Vh, 28: $Vi, 29: $Vj, 31: $Vk, 33: $Vl, 34: $Vm, 35: 29, 36: $Vn, 38: 4, 43: $Vo, 48: $V1 }, { 40: 40, 41: [1, 41], 51: $Vp }, o([41, 51], [2, 50]), o($V2, [2, 8], { 1: [2, 2] }), o($V2, [2, 4]), { 4: 31, 10: 43, 12: 23, 13: $V3, 14: $V4, 15: $V5, 16: $V6, 17: $V7, 18: $V8, 19: $V9, 20: $Va, 21: $Vb, 22: $Vc, 23: $Vd, 24: $Ve, 25: $Vf, 26: $Vg, 27: $Vh, 28: $Vi, 29: $Vj, 31: $Vk, 33: $Vl, 34: $Vm, 35: 29, 36: $Vn, 38: 4, 43: $Vo, 48: $V1 }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 16]), o($V2, [2, 17]), o($V2, [2, 18]), o($V2, [2, 19]), o($V2, [2, 20]), o($V2, [2, 21]), o($V2, [2, 22]), o($V2, [2, 23]), o($V2, [2, 24]), o($V2, [2, 25]), { 30: [1, 44] }, { 32: [1, 45] }, o($V2, [2, 28]), o($V2, [2, 29]), o($V2, [2, 30]), { 37: [1, 46] }, o($V2, [2, 32]), o($V2, [2, 9]), o($V2, [2, 10]), o($V2, [2, 11]), o($V2, [2, 12]), o($V2, [2, 13]), o($V2, [2, 14]), o($V2, [2, 15]), { 44: [1, 47], 46: [1, 48] }, { 11: [1, 49] }, { 42: 50, 50: [1, 51] }, { 11: [2, 52] }, o($V2, [2, 5]), o($V2, [2, 26]), o($V2, [2, 27]), o($V2, [2, 31]), o($V2, [2, 35], { 45: [1, 52], 46: [1, 53] }), o($V2, [2, 41], { 44: [1, 54] }), o($Vq, [2, 33]), { 40: 55, 51: $Vp }, { 51: [2, 51] }, o($V2, [2, 36], { 46: [1, 56] }), o($V2, [2, 37]), o($V2, [2, 39], { 45: [1, 57] }), { 11: [1, 58] }, o($V2, [2, 38]), o($V2, [2, 40]), o($Vq, [2, 34])],
+ defaultActions: { 5: [2, 49], 6: [2, 1], 42: [2, 52], 51: [2, 51] },
+ 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 48;
+ case 1:
+ this.begin("type_directive");
+ return 49;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 41;
+ case 3:
+ this.popState();
+ this.popState();
+ return 51;
+ case 4:
+ return 50;
+ case 5:
+ this.begin("acc_title");
+ return 29;
+ case 6:
+ this.popState();
+ return "acc_title_value";
+ case 7:
+ this.begin("acc_descr");
+ return 31;
+ case 8:
+ this.popState();
+ return "acc_descr_value";
+ case 9:
+ this.begin("acc_descr_multiline");
+ break;
+ case 10:
+ this.popState();
+ break;
+ case 11:
+ return "acc_descr_multiline_value";
+ case 12:
+ break;
+ case 13:
+ break;
+ case 14:
+ break;
+ case 15:
+ return 11;
+ case 16:
+ break;
+ case 17:
+ break;
+ case 18:
+ break;
+ case 19:
+ this.begin("href");
+ break;
+ case 20:
+ this.popState();
+ break;
+ case 21:
+ return 46;
+ case 22:
+ this.begin("callbackname");
+ break;
+ case 23:
+ this.popState();
+ break;
+ case 24:
+ this.popState();
+ this.begin("callbackargs");
+ break;
+ case 25:
+ return 44;
+ case 26:
+ this.popState();
+ break;
+ case 27:
+ return 45;
+ case 28:
+ this.begin("click");
+ break;
+ case 29:
+ this.popState();
+ break;
+ case 30:
+ return 43;
+ case 31:
+ return 5;
+ case 32:
+ return 20;
+ case 33:
+ return 21;
+ case 34:
+ return 22;
+ case 35:
+ return 23;
+ case 36:
+ return 24;
+ case 37:
+ return 26;
+ case 38:
+ return 25;
+ case 39:
+ return 27;
+ case 40:
+ return 13;
+ case 41:
+ return 14;
+ case 42:
+ return 15;
+ case 43:
+ return 16;
+ case 44:
+ return 17;
+ case 45:
+ return 18;
+ case 46:
+ return 19;
+ case 47:
+ return "date";
+ case 48:
+ return 28;
+ case 49:
+ return "accDescription";
+ case 50:
+ return 34;
+ case 51:
+ return 36;
+ case 52:
+ return 37;
+ case 53:
+ return 41;
+ case 54:
+ return 7;
+ case 55:
+ return "INVALID";
+ }
+ },
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/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": [10, 11], "inclusive": false }, "acc_descr": { "rules": [8], "inclusive": false }, "acc_title": { "rules": [6], "inclusive": false }, "close_directive": { "rules": [], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "open_directive": { "rules": [1], "inclusive": false }, "callbackargs": { "rules": [26, 27], "inclusive": false }, "callbackname": { "rules": [23, 24, 25], "inclusive": false }, "href": { "rules": [20, 21], "inclusive": false }, "click": { "rules": [29, 30], "inclusive": false }, "INITIAL": { "rules": [0, 5, 7, 9, 12, 13, 14, 15, 16, 17, 18, 19, 22, 28, 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$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 parseDirective$8 = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ 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 = {
+ parseDirective: parseDirective$8,
+ 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) {
+ const minTime = tasks2.reduce(
+ (min2, { startTime }) => min2 ? Math.min(min2, startTime) : startTime,
+ 0
+ );
+ const maxTime = tasks2.reduce((max2, { endTime }) => max2 ? Math.max(max2, endTime) : endTime, 0);
+ const dateFormat2 = diagObj.db.getDateFormat();
+ if (!minTime || !maxTime) {
+ return;
+ }
+ 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*)(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 "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 "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, 4], $V1 = [1, 5], $V2 = [1, 6], $V3 = [1, 7], $V4 = [1, 9], $V5 = [1, 11, 13, 15, 17, 19, 20, 26, 27, 28, 29], $V6 = [2, 5], $V7 = [1, 6, 11, 13, 15, 17, 19, 20, 26, 27, 28, 29], $V8 = [26, 27, 28], $V9 = [2, 8], $Va = [1, 18], $Vb = [1, 19], $Vc = [1, 20], $Vd = [1, 21], $Ve = [1, 22], $Vf = [1, 23], $Vg = [1, 28], $Vh = [6, 26, 27, 28, 29];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "eol": 4, "directive": 5, "PIE": 6, "document": 7, "showData": 8, "line": 9, "statement": 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, "openDirective": 21, "typeDirective": 22, "closeDirective": 23, ":": 24, "argDirective": 25, "NEWLINE": 26, ";": 27, "EOF": 28, "open_directive": 29, "type_directive": 30, "arg_directive": 31, "close_directive": 32, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 6: "PIE", 8: "showData", 11: "txt", 12: "value", 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", 24: ":", 26: "NEWLINE", 27: ";", 28: "EOF", 29: "open_directive", 30: "type_directive", 31: "arg_directive", 32: "close_directive" },
+ productions_: [0, [3, 2], [3, 2], [3, 2], [3, 3], [7, 0], [7, 2], [9, 2], [10, 0], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [5, 3], [5, 5], [4, 1], [4, 1], [4, 1], [21, 1], [22, 1], [25, 1], [23, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 4:
+ yy.setShowData(true);
+ break;
+ case 7:
+ this.$ = $$[$0 - 1];
+ break;
+ case 9:
+ yy.addSection($$[$0 - 1], yy.cleanupValue($$[$0]));
+ break;
+ case 10:
+ this.$ = $$[$0].trim();
+ yy.setDiagramTitle(this.$);
+ break;
+ case 11:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 12:
+ case 13:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 14:
+ yy.addSection($$[$0].substr(8));
+ this.$ = $$[$0].substr(8);
+ break;
+ case 21:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 22:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 23:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 24:
+ yy.parseDirective("}%%", "close_directive", "pie");
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: 3, 6: $V0, 21: 8, 26: $V1, 27: $V2, 28: $V3, 29: $V4 }, { 1: [3] }, { 3: 10, 4: 2, 5: 3, 6: $V0, 21: 8, 26: $V1, 27: $V2, 28: $V3, 29: $V4 }, { 3: 11, 4: 2, 5: 3, 6: $V0, 21: 8, 26: $V1, 27: $V2, 28: $V3, 29: $V4 }, o($V5, $V6, { 7: 12, 8: [1, 13] }), o($V7, [2, 18]), o($V7, [2, 19]), o($V7, [2, 20]), { 22: 14, 30: [1, 15] }, { 30: [2, 21] }, { 1: [2, 1] }, { 1: [2, 2] }, o($V8, $V9, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 3], 11: $Va, 13: $Vb, 15: $Vc, 17: $Vd, 19: $Ve, 20: $Vf, 29: $V4 }), o($V5, $V6, { 7: 25 }), { 23: 26, 24: [1, 27], 32: $Vg }, o([24, 32], [2, 22]), o($V5, [2, 6]), { 4: 29, 26: $V1, 27: $V2, 28: $V3 }, { 12: [1, 30] }, { 14: [1, 31] }, { 16: [1, 32] }, { 18: [1, 33] }, o($V8, [2, 13]), o($V8, [2, 14]), o($V8, [2, 15]), o($V8, $V9, { 21: 8, 9: 16, 10: 17, 5: 24, 1: [2, 4], 11: $Va, 13: $Vb, 15: $Vc, 17: $Vd, 19: $Ve, 20: $Vf, 29: $V4 }), o($Vh, [2, 16]), { 25: 34, 31: [1, 35] }, o($Vh, [2, 24]), o($V5, [2, 7]), o($V8, [2, 9]), o($V8, [2, 10]), o($V8, [2, 11]), o($V8, [2, 12]), { 23: 36, 32: $Vg }, { 32: [2, 23] }, o($Vh, [2, 17])],
+ defaultActions: { 9: [2, 21], 10: [2, 1], 11: [2, 2], 35: [2, 23] },
+ 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 29;
+ case 1:
+ this.begin("type_directive");
+ return 30;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 24;
+ case 3:
+ this.popState();
+ this.popState();
+ return 32;
+ case 4:
+ return 31;
+ case 5:
+ break;
+ case 6:
+ break;
+ case 7:
+ return 26;
+ case 8:
+ break;
+ case 9:
+ break;
+ case 10:
+ this.begin("title");
+ return 13;
+ case 11:
+ this.popState();
+ return "title_value";
+ case 12:
+ this.begin("acc_title");
+ return 15;
+ case 13:
+ this.popState();
+ return "acc_title_value";
+ case 14:
+ this.begin("acc_descr");
+ return 17;
+ case 15:
+ this.popState();
+ return "acc_descr_value";
+ case 16:
+ this.begin("acc_descr_multiline");
+ break;
+ case 17:
+ this.popState();
+ break;
+ case 18:
+ return "acc_descr_multiline_value";
+ case 19:
+ this.begin("string");
+ break;
+ case 20:
+ this.popState();
+ break;
+ case 21:
+ return "txt";
+ case 22:
+ return 6;
+ case 23:
+ return 8;
+ case 24:
+ return "value";
+ case 25:
+ return 28;
+ }
+ },
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%%(?!\{)[^\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": [17, 18], "inclusive": false }, "acc_descr": { "rules": [15], "inclusive": false }, "acc_title": { "rules": [13], "inclusive": false }, "close_directive": { "rules": [], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "open_directive": { "rules": [1], "inclusive": false }, "title": { "rules": [11], "inclusive": false }, "string": { "rules": [20, 21], "inclusive": false }, "INITIAL": { "rules": [0, 5, 6, 7, 8, 9, 10, 12, 14, 16, 19, 22, 23, 24, 25], "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 parseDirective$7 = (statement, context, type2) => {
+ parseDirective$e(void 0, statement, context, type2);
+ };
+ 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,
+ parseDirective: parseDirective$7,
+ 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]
+ };
+ }
+ );
+ 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, 5], $V2 = [1, 6], $V3 = [1, 7], $V4 = [1, 8], $V5 = [1, 10], $V6 = [1, 5, 14, 16, 18, 20, 21, 26, 28, 29, 30, 31, 32, 38, 39, 40, 41, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60], $V7 = [1, 5, 7, 14, 16, 18, 20, 21, 26, 28, 29, 30, 31, 32, 38, 39, 40, 41, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60], $V8 = [38, 39, 40], $V9 = [2, 8], $Va = [1, 19], $Vb = [1, 23], $Vc = [1, 24], $Vd = [1, 25], $Ve = [1, 26], $Vf = [1, 27], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 37], $Vn = [1, 38], $Vo = [1, 39], $Vp = [1, 40], $Vq = [1, 41], $Vr = [1, 42], $Vs = [1, 43], $Vt = [1, 44], $Vu = [1, 45], $Vv = [1, 46], $Vw = [1, 47], $Vx = [1, 48], $Vy = [1, 49], $Vz = [1, 52], $VA = [1, 67], $VB = [1, 68], $VC = [5, 23, 27, 38, 39, 40, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61], $VD = [5, 7, 38, 39, 40, 41];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "eol": 4, "SPACE": 5, "directive": 6, "QUADRANT": 7, "document": 8, "line": 9, "statement": 10, "axisDetails": 11, "quadrantDetails": 12, "points": 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": 21, "text": 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, "openDirective": 33, "typeDirective": 34, "closeDirective": 35, ":": 36, "argDirective": 37, "NEWLINE": 38, "SEMI": 39, "EOF": 40, "open_directive": 41, "type_directive": 42, "arg_directive": 43, "close_directive": 44, "alphaNumToken": 45, "textNoTagsToken": 46, "STR": 47, "MD_STR": 48, "alphaNum": 49, "PUNCTUATION": 50, "AMP": 51, "NUM": 52, "ALPHA": 53, "COMMA": 54, "PLUS": 55, "EQUALS": 56, "MULT": 57, "DOT": 58, "BRKT": 59, "UNDERSCORE": 60, "MINUS": 61, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 5: "SPACE", 7: "QUADRANT", 14: "title", 15: "title_value", 16: "acc_title", 17: "acc_title_value", 18: "acc_descr", 19: "acc_descr_value", 20: "acc_descr_multiline_value", 21: "section", 23: "point_start", 24: "point_x", 25: "point_y", 26: "X-AXIS", 27: "AXIS-TEXT-DELIMITER", 28: "Y-AXIS", 29: "QUADRANT_1", 30: "QUADRANT_2", 31: "QUADRANT_3", 32: "QUADRANT_4", 36: ":", 38: "NEWLINE", 39: "SEMI", 40: "EOF", 41: "open_directive", 42: "type_directive", 43: "arg_directive", 44: "close_directive", 47: "STR", 48: "MD_STR", 50: "PUNCTUATION", 51: "AMP", 52: "NUM", 53: "ALPHA", 54: "COMMA", 55: "PLUS", 56: "EQUALS", 57: "MULT", 58: "DOT", 59: "BRKT", 60: "UNDERSCORE", 61: "MINUS" },
+ productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [10, 0], [10, 2], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [13, 4], [11, 4], [11, 3], [11, 2], [11, 4], [11, 3], [11, 2], [12, 2], [12, 2], [12, 2], [12, 2], [6, 3], [6, 5], [4, 1], [4, 1], [4, 1], [33, 1], [34, 1], [37, 1], [35, 1], [22, 1], [22, 2], [22, 1], [22, 1], [49, 1], [49, 2], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [45, 1], [46, 1], [46, 1], [46, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 13:
+ this.$ = $$[$0].trim();
+ yy.setDiagramTitle(this.$);
+ break;
+ case 14:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 15:
+ case 16:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 17:
+ yy.addSection($$[$0].substr(8));
+ this.$ = $$[$0].substr(8);
+ break;
+ case 19:
+ yy.addPoint($$[$0 - 3], $$[$0 - 1], $$[$0]);
+ break;
+ case 20:
+ yy.setXAxisLeftText($$[$0 - 2]);
+ yy.setXAxisRightText($$[$0]);
+ break;
+ case 21:
+ $$[$0 - 1].text += " ⟶ ";
+ yy.setXAxisLeftText($$[$0 - 1]);
+ break;
+ case 22:
+ yy.setXAxisLeftText($$[$0]);
+ break;
+ case 23:
+ yy.setYAxisBottomText($$[$0 - 2]);
+ yy.setYAxisTopText($$[$0]);
+ break;
+ case 24:
+ $$[$0 - 1].text += " ⟶ ";
+ yy.setYAxisBottomText($$[$0 - 1]);
+ break;
+ case 25:
+ yy.setYAxisBottomText($$[$0]);
+ break;
+ case 26:
+ yy.setQuadrant1Text($$[$0]);
+ break;
+ case 27:
+ yy.setQuadrant2Text($$[$0]);
+ break;
+ case 28:
+ yy.setQuadrant3Text($$[$0]);
+ break;
+ case 29:
+ yy.setQuadrant4Text($$[$0]);
+ break;
+ case 35:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 36:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 37:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 38:
+ yy.parseDirective("}%%", "close_directive", "quadrantChart");
+ break;
+ case 39:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 40:
+ this.$ = { text: $$[$0 - 1].text + "" + $$[$0], type: $$[$0 - 1].type };
+ break;
+ case 41:
+ this.$ = { text: $$[$0], type: "text" };
+ break;
+ case 42:
+ this.$ = { text: $$[$0], type: "markdown" };
+ break;
+ case 43:
+ this.$ = $$[$0];
+ break;
+ case 44:
+ this.$ = $$[$0 - 1] + "" + $$[$0];
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: $V0, 6: 4, 7: $V1, 33: 9, 38: $V2, 39: $V3, 40: $V4, 41: $V5 }, { 1: [3] }, { 3: 11, 4: 2, 5: $V0, 6: 4, 7: $V1, 33: 9, 38: $V2, 39: $V3, 40: $V4, 41: $V5 }, { 3: 12, 4: 2, 5: $V0, 6: 4, 7: $V1, 33: 9, 38: $V2, 39: $V3, 40: $V4, 41: $V5 }, { 3: 13, 4: 2, 5: $V0, 6: 4, 7: $V1, 33: 9, 38: $V2, 39: $V3, 40: $V4, 41: $V5 }, o($V6, [2, 5], { 8: 14 }), o($V7, [2, 32]), o($V7, [2, 33]), o($V7, [2, 34]), { 34: 15, 42: [1, 16] }, { 42: [2, 35] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($V8, $V9, { 33: 9, 9: 17, 10: 18, 11: 20, 12: 21, 13: 22, 6: 28, 22: 35, 45: 36, 1: [2, 4], 5: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 20: $Ve, 21: $Vf, 26: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 32: $Vl, 41: $V5, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }), { 35: 50, 36: [1, 51], 44: $Vz }, o([36, 44], [2, 36]), o($V6, [2, 6]), { 4: 53, 38: $V2, 39: $V3, 40: $V4 }, o($V8, $V9, { 33: 9, 11: 20, 12: 21, 13: 22, 6: 28, 22: 35, 45: 36, 10: 54, 5: $Va, 14: $Vb, 16: $Vc, 18: $Vd, 20: $Ve, 21: $Vf, 26: $Vg, 28: $Vh, 29: $Vi, 30: $Vj, 31: $Vk, 32: $Vl, 41: $V5, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }), o($V8, [2, 10]), o($V8, [2, 11]), o($V8, [2, 12]), { 15: [1, 55] }, { 17: [1, 56] }, { 19: [1, 57] }, o($V8, [2, 16]), o($V8, [2, 17]), o($V8, [2, 18]), { 22: 58, 45: 36, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }, { 22: 59, 45: 36, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }, { 22: 60, 45: 36, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }, { 22: 61, 45: 36, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }, { 22: 62, 45: 36, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }, { 22: 63, 45: 36, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }, { 5: $VA, 23: [1, 64], 45: 66, 46: 65, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }, o($VC, [2, 39]), o($VC, [2, 41]), o($VC, [2, 42]), o($VC, [2, 45]), o($VC, [2, 46]), o($VC, [2, 47]), o($VC, [2, 48]), o($VC, [2, 49]), o($VC, [2, 50]), o($VC, [2, 51]), o($VC, [2, 52]), o($VC, [2, 53]), o($VC, [2, 54]), o($VC, [2, 55]), o($VD, [2, 30]), { 37: 69, 43: [1, 70] }, o($VD, [2, 38]), o($V6, [2, 7]), o($V8, [2, 9]), o($V8, [2, 13]), o($V8, [2, 14]), o($V8, [2, 15]), o($V8, [2, 22], { 46: 65, 45: 66, 5: $VA, 27: [1, 71], 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }), o($V8, [2, 25], { 46: 65, 45: 66, 5: $VA, 27: [1, 72], 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }), o($V8, [2, 26], { 46: 65, 45: 66, 5: $VA, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }), o($V8, [2, 27], { 46: 65, 45: 66, 5: $VA, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }), o($V8, [2, 28], { 46: 65, 45: 66, 5: $VA, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }), o($V8, [2, 29], { 46: 65, 45: 66, 5: $VA, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }), { 24: [1, 73] }, o($VC, [2, 40]), o($VC, [2, 56]), o($VC, [2, 57]), o($VC, [2, 58]), { 35: 74, 44: $Vz }, { 44: [2, 37] }, o($V8, [2, 21], { 45: 36, 22: 75, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }), o($V8, [2, 24], { 45: 36, 22: 76, 47: $Vm, 48: $Vn, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy }), { 25: [1, 77] }, o($VD, [2, 31]), o($V8, [2, 20], { 46: 65, 45: 66, 5: $VA, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }), o($V8, [2, 23], { 46: 65, 45: 66, 5: $VA, 50: $Vo, 51: $Vp, 52: $Vq, 53: $Vr, 54: $Vs, 55: $Vt, 56: $Vu, 57: $Vv, 58: $Vw, 59: $Vx, 60: $Vy, 61: $VB }), o($V8, [2, 19])],
+ defaultActions: { 10: [2, 35], 11: [2, 1], 12: [2, 2], 13: [2, 3], 70: [2, 37] },
+ 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 41;
+ case 1:
+ this.begin("type_directive");
+ return 42;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 36;
+ case 3:
+ this.popState();
+ this.popState();
+ return 44;
+ case 4:
+ return 43;
+ case 5:
+ break;
+ case 6:
+ break;
+ case 7:
+ return 38;
+ case 8:
+ break;
+ case 9:
+ this.begin("title");
+ return 14;
+ case 10:
+ this.popState();
+ return "title_value";
+ case 11:
+ this.begin("acc_title");
+ return 16;
+ case 12:
+ this.popState();
+ return "acc_title_value";
+ case 13:
+ this.begin("acc_descr");
+ return 18;
+ case 14:
+ this.popState();
+ return "acc_descr_value";
+ case 15:
+ this.begin("acc_descr_multiline");
+ break;
+ case 16:
+ this.popState();
+ break;
+ case 17:
+ return "acc_descr_multiline_value";
+ case 18:
+ return 26;
+ case 19:
+ return 28;
+ case 20:
+ return 27;
+ case 21:
+ return 29;
+ case 22:
+ return 30;
+ case 23:
+ return 31;
+ case 24:
+ return 32;
+ case 25:
+ this.begin("md_string");
+ break;
+ case 26:
+ return "MD_STR";
+ case 27:
+ this.popState();
+ break;
+ case 28:
+ this.begin("string");
+ break;
+ case 29:
+ this.popState();
+ break;
+ case 30:
+ return "STR";
+ case 31:
+ this.begin("point_start");
+ return 23;
+ case 32:
+ this.begin("point_x");
+ return 24;
+ case 33:
+ this.popState();
+ break;
+ case 34:
+ this.popState();
+ this.begin("point_y");
+ break;
+ case 35:
+ this.popState();
+ return 25;
+ case 36:
+ return 7;
+ case 37:
+ return 53;
+ case 38:
+ return "COLON";
+ case 39:
+ return 55;
+ case 40:
+ return 54;
+ case 41:
+ return 56;
+ case 42:
+ return 56;
+ case 43:
+ return 57;
+ case 44:
+ return 59;
+ case 45:
+ return 60;
+ case 46:
+ return 58;
+ case 47:
+ return 51;
+ case 48:
+ return 61;
+ case 49:
+ return 52;
+ case 50:
+ return 5;
+ case 51:
+ return 39;
+ case 52:
+ return 50;
+ case 53:
+ return 40;
+ }
+ },
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%%(?!\{)[^\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": [35], "inclusive": false }, "point_x": { "rules": [34], "inclusive": false }, "point_start": { "rules": [32, 33], "inclusive": false }, "acc_descr_multiline": { "rules": [16, 17], "inclusive": false }, "acc_descr": { "rules": [14], "inclusive": false }, "acc_title": { "rules": [12], "inclusive": false }, "close_directive": { "rules": [], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "open_directive": { "rules": [1], "inclusive": false }, "title": { "rules": [10], "inclusive": false }, "md_string": { "rules": [26, 27], "inclusive": false }, "string": { "rules": [29, 30], "inclusive": false }, "INITIAL": { "rules": [0, 5, 6, 7, 8, 9, 11, 13, 15, 18, 19, 20, 21, 22, 23, 24, 25, 28, 31, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53], "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 parseDirective$6 = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ const clear$8 = function() {
+ quadrantBuilder.clear();
+ clear$l();
+ };
+ const db$7 = {
+ setWidth,
+ setHeight,
+ setQuadrant1Text,
+ setQuadrant2Text,
+ setQuadrant3Text,
+ setQuadrant4Text,
+ setXAxisLeftText,
+ setXAxisRightText,
+ setYAxisTopText,
+ setYAxisBottomText,
+ addPoint,
+ getQuadrantData,
+ parseDirective: parseDirective$6,
+ 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, 5], $V2 = [1, 6], $V3 = [1, 7], $V4 = [1, 8], $V5 = [5, 6, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72], $V6 = [1, 22], $V7 = [2, 13], $V8 = [1, 26], $V9 = [1, 27], $Va = [1, 28], $Vb = [1, 29], $Vc = [1, 30], $Vd = [1, 31], $Ve = [1, 24], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 36], $Vi = [71, 72], $Vj = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 60, 62, 71, 72], $Vk = [1, 56], $Vl = [1, 57], $Vm = [1, 58], $Vn = [1, 59], $Vo = [1, 60], $Vp = [1, 61], $Vq = [1, 62], $Vr = [62, 63], $Vs = [1, 74], $Vt = [1, 70], $Vu = [1, 71], $Vv = [1, 72], $Vw = [1, 73], $Vx = [1, 75], $Vy = [1, 79], $Vz = [1, 80], $VA = [1, 77], $VB = [1, 78], $VC = [5, 8, 14, 16, 18, 19, 40, 41, 42, 43, 44, 45, 53, 71, 72];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "directive": 4, "NEWLINE": 5, "RD": 6, "diagram": 7, "EOF": 8, "openDirective": 9, "typeDirective": 10, "closeDirective": 11, ":": 12, "argDirective": 13, "acc_title": 14, "acc_title_value": 15, "acc_descr": 16, "acc_descr_value": 17, "acc_descr_multiline_value": 18, "open_directive": 19, "type_directive": 20, "arg_directive": 21, "close_directive": 22, "requirementDef": 23, "elementDef": 24, "relationshipDef": 25, "requirementType": 26, "requirementName": 27, "STRUCT_START": 28, "requirementBody": 29, "ID": 30, "COLONSEP": 31, "id": 32, "TEXT": 33, "text": 34, "RISK": 35, "riskLevel": 36, "VERIFYMTHD": 37, "verifyType": 38, "STRUCT_STOP": 39, "REQUIREMENT": 40, "FUNCTIONAL_REQUIREMENT": 41, "INTERFACE_REQUIREMENT": 42, "PERFORMANCE_REQUIREMENT": 43, "PHYSICAL_REQUIREMENT": 44, "DESIGN_CONSTRAINT": 45, "LOW_RISK": 46, "MED_RISK": 47, "HIGH_RISK": 48, "VERIFY_ANALYSIS": 49, "VERIFY_DEMONSTRATION": 50, "VERIFY_INSPECTION": 51, "VERIFY_TEST": 52, "ELEMENT": 53, "elementName": 54, "elementBody": 55, "TYPE": 56, "type": 57, "DOCREF": 58, "ref": 59, "END_ARROW_L": 60, "relationship": 61, "LINE": 62, "END_ARROW_R": 63, "CONTAINS": 64, "COPIES": 65, "DERIVES": 66, "SATISFIES": 67, "VERIFIES": 68, "REFINES": 69, "TRACES": 70, "unqString": 71, "qString": 72, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 5: "NEWLINE", 6: "RD", 8: "EOF", 12: ":", 14: "acc_title", 15: "acc_title_value", 16: "acc_descr", 17: "acc_descr_value", 18: "acc_descr_multiline_value", 19: "open_directive", 20: "type_directive", 21: "arg_directive", 22: "close_directive", 28: "STRUCT_START", 30: "ID", 31: "COLONSEP", 33: "TEXT", 35: "RISK", 37: "VERIFYMTHD", 39: "STRUCT_STOP", 40: "REQUIREMENT", 41: "FUNCTIONAL_REQUIREMENT", 42: "INTERFACE_REQUIREMENT", 43: "PERFORMANCE_REQUIREMENT", 44: "PHYSICAL_REQUIREMENT", 45: "DESIGN_CONSTRAINT", 46: "LOW_RISK", 47: "MED_RISK", 48: "HIGH_RISK", 49: "VERIFY_ANALYSIS", 50: "VERIFY_DEMONSTRATION", 51: "VERIFY_INSPECTION", 52: "VERIFY_TEST", 53: "ELEMENT", 56: "TYPE", 58: "DOCREF", 60: "END_ARROW_L", 62: "LINE", 63: "END_ARROW_R", 64: "CONTAINS", 65: "COPIES", 66: "DERIVES", 67: "SATISFIES", 68: "VERIFIES", 69: "REFINES", 70: "TRACES", 71: "unqString", 72: "qString" },
+ productions_: [0, [3, 3], [3, 2], [3, 4], [4, 3], [4, 5], [4, 2], [4, 2], [4, 1], [9, 1], [10, 1], [13, 1], [11, 1], [7, 0], [7, 2], [7, 2], [7, 2], [7, 2], [7, 2], [23, 5], [29, 5], [29, 5], [29, 5], [29, 5], [29, 2], [29, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [26, 1], [36, 1], [36, 1], [36, 1], [38, 1], [38, 1], [38, 1], [38, 1], [24, 5], [55, 5], [55, 5], [55, 2], [55, 1], [25, 5], [25, 5], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [27, 1], [27, 1], [32, 1], [32, 1], [34, 1], [34, 1], [54, 1], [54, 1], [57, 1], [57, 1], [59, 1], [59, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 6:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 7:
+ case 8:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 9:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 10:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 11:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 12:
+ yy.parseDirective("}%%", "close_directive", "pie");
+ break;
+ case 13:
+ this.$ = [];
+ break;
+ case 19:
+ yy.addRequirement($$[$0 - 3], $$[$0 - 4]);
+ break;
+ case 20:
+ yy.setNewReqId($$[$0 - 2]);
+ break;
+ case 21:
+ yy.setNewReqText($$[$0 - 2]);
+ break;
+ case 22:
+ yy.setNewReqRisk($$[$0 - 2]);
+ break;
+ case 23:
+ yy.setNewReqVerifyMethod($$[$0 - 2]);
+ break;
+ case 26:
+ this.$ = yy.RequirementType.REQUIREMENT;
+ break;
+ case 27:
+ this.$ = yy.RequirementType.FUNCTIONAL_REQUIREMENT;
+ break;
+ case 28:
+ this.$ = yy.RequirementType.INTERFACE_REQUIREMENT;
+ break;
+ case 29:
+ this.$ = yy.RequirementType.PERFORMANCE_REQUIREMENT;
+ break;
+ case 30:
+ this.$ = yy.RequirementType.PHYSICAL_REQUIREMENT;
+ break;
+ case 31:
+ this.$ = yy.RequirementType.DESIGN_CONSTRAINT;
+ break;
+ case 32:
+ this.$ = yy.RiskLevel.LOW_RISK;
+ break;
+ case 33:
+ this.$ = yy.RiskLevel.MED_RISK;
+ break;
+ case 34:
+ this.$ = yy.RiskLevel.HIGH_RISK;
+ break;
+ case 35:
+ this.$ = yy.VerifyType.VERIFY_ANALYSIS;
+ break;
+ case 36:
+ this.$ = yy.VerifyType.VERIFY_DEMONSTRATION;
+ break;
+ case 37:
+ this.$ = yy.VerifyType.VERIFY_INSPECTION;
+ break;
+ case 38:
+ this.$ = yy.VerifyType.VERIFY_TEST;
+ break;
+ case 39:
+ yy.addElement($$[$0 - 3]);
+ break;
+ case 40:
+ yy.setNewElementType($$[$0 - 2]);
+ break;
+ case 41:
+ yy.setNewElementDocRef($$[$0 - 2]);
+ break;
+ case 44:
+ yy.addRelationship($$[$0 - 2], $$[$0], $$[$0 - 4]);
+ break;
+ case 45:
+ yy.addRelationship($$[$0 - 2], $$[$0 - 4], $$[$0]);
+ break;
+ case 46:
+ this.$ = yy.Relationships.CONTAINS;
+ break;
+ case 47:
+ this.$ = yy.Relationships.COPIES;
+ break;
+ case 48:
+ this.$ = yy.Relationships.DERIVES;
+ break;
+ case 49:
+ this.$ = yy.Relationships.SATISFIES;
+ break;
+ case 50:
+ this.$ = yy.Relationships.VERIFIES;
+ break;
+ case 51:
+ this.$ = yy.Relationships.REFINES;
+ break;
+ case 52:
+ this.$ = yy.Relationships.TRACES;
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 6: $V0, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4 }, { 1: [3] }, { 3: 10, 4: 2, 5: [1, 9], 6: $V0, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4 }, { 5: [1, 11] }, { 10: 12, 20: [1, 13] }, { 15: [1, 14] }, { 17: [1, 15] }, o($V5, [2, 8]), { 20: [2, 9] }, { 3: 16, 4: 2, 6: $V0, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4 }, { 1: [2, 2] }, { 4: 21, 5: $V6, 7: 17, 8: $V7, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: $V8, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 53: $Ve, 71: $Vf, 72: $Vg }, { 11: 34, 12: [1, 35], 22: $Vh }, o([12, 22], [2, 10]), o($V5, [2, 6]), o($V5, [2, 7]), { 1: [2, 1] }, { 8: [1, 37] }, { 4: 21, 5: $V6, 7: 38, 8: $V7, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: $V8, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 53: $Ve, 71: $Vf, 72: $Vg }, { 4: 21, 5: $V6, 7: 39, 8: $V7, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: $V8, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 53: $Ve, 71: $Vf, 72: $Vg }, { 4: 21, 5: $V6, 7: 40, 8: $V7, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: $V8, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 53: $Ve, 71: $Vf, 72: $Vg }, { 4: 21, 5: $V6, 7: 41, 8: $V7, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: $V8, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 53: $Ve, 71: $Vf, 72: $Vg }, { 4: 21, 5: $V6, 7: 42, 8: $V7, 9: 4, 14: $V1, 16: $V2, 18: $V3, 19: $V4, 23: 18, 24: 19, 25: 20, 26: 23, 32: 25, 40: $V8, 41: $V9, 42: $Va, 43: $Vb, 44: $Vc, 45: $Vd, 53: $Ve, 71: $Vf, 72: $Vg }, { 27: 43, 71: [1, 44], 72: [1, 45] }, { 54: 46, 71: [1, 47], 72: [1, 48] }, { 60: [1, 49], 62: [1, 50] }, o($Vi, [2, 26]), o($Vi, [2, 27]), o($Vi, [2, 28]), o($Vi, [2, 29]), o($Vi, [2, 30]), o($Vi, [2, 31]), o($Vj, [2, 55]), o($Vj, [2, 56]), o($V5, [2, 4]), { 13: 51, 21: [1, 52] }, o($V5, [2, 12]), { 1: [2, 3] }, { 8: [2, 14] }, { 8: [2, 15] }, { 8: [2, 16] }, { 8: [2, 17] }, { 8: [2, 18] }, { 28: [1, 53] }, { 28: [2, 53] }, { 28: [2, 54] }, { 28: [1, 54] }, { 28: [2, 59] }, { 28: [2, 60] }, { 61: 55, 64: $Vk, 65: $Vl, 66: $Vm, 67: $Vn, 68: $Vo, 69: $Vp, 70: $Vq }, { 61: 63, 64: $Vk, 65: $Vl, 66: $Vm, 67: $Vn, 68: $Vo, 69: $Vp, 70: $Vq }, { 11: 64, 22: $Vh }, { 22: [2, 11] }, { 5: [1, 65] }, { 5: [1, 66] }, { 62: [1, 67] }, o($Vr, [2, 46]), o($Vr, [2, 47]), o($Vr, [2, 48]), o($Vr, [2, 49]), o($Vr, [2, 50]), o($Vr, [2, 51]), o($Vr, [2, 52]), { 63: [1, 68] }, o($V5, [2, 5]), { 5: $Vs, 29: 69, 30: $Vt, 33: $Vu, 35: $Vv, 37: $Vw, 39: $Vx }, { 5: $Vy, 39: $Vz, 55: 76, 56: $VA, 58: $VB }, { 32: 81, 71: $Vf, 72: $Vg }, { 32: 82, 71: $Vf, 72: $Vg }, o($VC, [2, 19]), { 31: [1, 83] }, { 31: [1, 84] }, { 31: [1, 85] }, { 31: [1, 86] }, { 5: $Vs, 29: 87, 30: $Vt, 33: $Vu, 35: $Vv, 37: $Vw, 39: $Vx }, o($VC, [2, 25]), o($VC, [2, 39]), { 31: [1, 88] }, { 31: [1, 89] }, { 5: $Vy, 39: $Vz, 55: 90, 56: $VA, 58: $VB }, o($VC, [2, 43]), o($VC, [2, 44]), o($VC, [2, 45]), { 32: 91, 71: $Vf, 72: $Vg }, { 34: 92, 71: [1, 93], 72: [1, 94] }, { 36: 95, 46: [1, 96], 47: [1, 97], 48: [1, 98] }, { 38: 99, 49: [1, 100], 50: [1, 101], 51: [1, 102], 52: [1, 103] }, o($VC, [2, 24]), { 57: 104, 71: [1, 105], 72: [1, 106] }, { 59: 107, 71: [1, 108], 72: [1, 109] }, o($VC, [2, 42]), { 5: [1, 110] }, { 5: [1, 111] }, { 5: [2, 57] }, { 5: [2, 58] }, { 5: [1, 112] }, { 5: [2, 32] }, { 5: [2, 33] }, { 5: [2, 34] }, { 5: [1, 113] }, { 5: [2, 35] }, { 5: [2, 36] }, { 5: [2, 37] }, { 5: [2, 38] }, { 5: [1, 114] }, { 5: [2, 61] }, { 5: [2, 62] }, { 5: [1, 115] }, { 5: [2, 63] }, { 5: [2, 64] }, { 5: $Vs, 29: 116, 30: $Vt, 33: $Vu, 35: $Vv, 37: $Vw, 39: $Vx }, { 5: $Vs, 29: 117, 30: $Vt, 33: $Vu, 35: $Vv, 37: $Vw, 39: $Vx }, { 5: $Vs, 29: 118, 30: $Vt, 33: $Vu, 35: $Vv, 37: $Vw, 39: $Vx }, { 5: $Vs, 29: 119, 30: $Vt, 33: $Vu, 35: $Vv, 37: $Vw, 39: $Vx }, { 5: $Vy, 39: $Vz, 55: 120, 56: $VA, 58: $VB }, { 5: $Vy, 39: $Vz, 55: 121, 56: $VA, 58: $VB }, o($VC, [2, 20]), o($VC, [2, 21]), o($VC, [2, 22]), o($VC, [2, 23]), o($VC, [2, 40]), o($VC, [2, 41])],
+ defaultActions: { 8: [2, 9], 10: [2, 2], 16: [2, 1], 37: [2, 3], 38: [2, 14], 39: [2, 15], 40: [2, 16], 41: [2, 17], 42: [2, 18], 44: [2, 53], 45: [2, 54], 47: [2, 59], 48: [2, 60], 52: [2, 11], 93: [2, 57], 94: [2, 58], 96: [2, 32], 97: [2, 33], 98: [2, 34], 100: [2, 35], 101: [2, 36], 102: [2, 37], 103: [2, 38], 105: [2, 61], 106: [2, 62], 108: [2, 63], 109: [2, 64] },
+ 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 19;
+ case 1:
+ this.begin("type_directive");
+ return 20;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 12;
+ case 3:
+ this.popState();
+ this.popState();
+ return 22;
+ case 4:
+ return 21;
+ case 5:
+ return "title";
+ case 6:
+ this.begin("acc_title");
+ return 14;
+ case 7:
+ this.popState();
+ return "acc_title_value";
+ case 8:
+ this.begin("acc_descr");
+ return 16;
+ 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 5;
+ case 14:
+ break;
+ case 15:
+ break;
+ case 16:
+ break;
+ case 17:
+ return 8;
+ case 18:
+ return 6;
+ case 19:
+ return 28;
+ case 20:
+ return 39;
+ case 21:
+ return 31;
+ case 22:
+ return 30;
+ case 23:
+ return 33;
+ case 24:
+ return 35;
+ case 25:
+ return 37;
+ case 26:
+ return 40;
+ case 27:
+ return 41;
+ case 28:
+ return 42;
+ case 29:
+ return 43;
+ case 30:
+ return 44;
+ case 31:
+ return 45;
+ case 32:
+ return 46;
+ case 33:
+ return 47;
+ case 34:
+ return 48;
+ case 35:
+ return 49;
+ case 36:
+ return 50;
+ case 37:
+ return 51;
+ case 38:
+ return 52;
+ case 39:
+ return 53;
+ case 40:
+ return 64;
+ case 41:
+ return 65;
+ case 42:
+ return 66;
+ case 43:
+ return 67;
+ case 44:
+ return 68;
+ case 45:
+ return 69;
+ case 46:
+ return 70;
+ case 47:
+ return 56;
+ case 48:
+ return 58;
+ case 49:
+ return 60;
+ case 50:
+ return 63;
+ case 51:
+ return 62;
+ case 52:
+ this.begin("string");
+ break;
+ case 53:
+ this.popState();
+ break;
+ case 54:
+ return "qString";
+ case 55:
+ yy_.yytext = yy_.yytext.trim();
+ return 71;
+ }
+ },
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\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, /^(?:(\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": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "close_directive": { "rules": [], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "open_directive": { "rules": [1], "inclusive": false }, "unqString": { "rules": [], "inclusive": false }, "token": { "rules": [], "inclusive": false }, "string": { "rules": [53, 54], "inclusive": false }, "INITIAL": { "rules": [0, 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, 55], "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 parseDirective$5 = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ 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,
+ parseDirective: parseDirective$5,
+ 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, 5], $V3 = [1, 7], $V4 = [2, 5], $V5 = [1, 15], $V6 = [1, 17], $V7 = [1, 19], $V8 = [1, 20], $V9 = [1, 22], $Va = [1, 23], $Vb = [1, 24], $Vc = [1, 30], $Vd = [1, 31], $Ve = [1, 32], $Vf = [1, 33], $Vg = [1, 34], $Vh = [1, 35], $Vi = [1, 36], $Vj = [1, 37], $Vk = [1, 38], $Vl = [1, 39], $Vm = [1, 40], $Vn = [1, 41], $Vo = [1, 42], $Vp = [1, 44], $Vq = [1, 45], $Vr = [1, 46], $Vs = [1, 48], $Vt = [1, 49], $Vu = [1, 50], $Vv = [1, 51], $Vw = [1, 52], $Vx = [1, 53], $Vy = [1, 56], $Vz = [1, 4, 5, 19, 20, 22, 24, 27, 29, 35, 36, 37, 39, 41, 42, 43, 44, 45, 47, 49, 50, 52, 53, 54, 55, 56, 58, 59, 60, 65, 66, 67, 68, 76, 86], $VA = [4, 5, 22, 56, 58, 59], $VB = [4, 5, 19, 20, 22, 24, 27, 29, 35, 36, 37, 39, 41, 42, 43, 44, 45, 47, 49, 50, 52, 56, 58, 59, 60, 65, 66, 67, 68, 76, 86], $VC = [4, 5, 19, 20, 22, 24, 27, 29, 35, 36, 37, 39, 41, 42, 43, 44, 45, 47, 49, 50, 52, 55, 56, 58, 59, 60, 65, 66, 67, 68, 76, 86], $VD = [4, 5, 19, 20, 22, 24, 27, 29, 35, 36, 37, 39, 41, 42, 43, 44, 45, 47, 49, 50, 52, 54, 56, 58, 59, 60, 65, 66, 67, 68, 76, 86], $VE = [4, 5, 19, 20, 22, 24, 27, 29, 35, 36, 37, 39, 41, 42, 43, 44, 45, 47, 49, 50, 52, 53, 56, 58, 59, 60, 65, 66, 67, 68, 76, 86], $VF = [74, 75, 76], $VG = [1, 133], $VH = [1, 4, 5, 7, 19, 20, 22, 24, 27, 29, 35, 36, 37, 39, 41, 42, 43, 44, 45, 47, 49, 50, 52, 53, 54, 55, 56, 58, 59, 60, 65, 66, 67, 68, 76, 86];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "SPACE": 4, "NEWLINE": 5, "directive": 6, "SD": 7, "document": 8, "line": 9, "statement": 10, "box_section": 11, "box_line": 12, "participant_statement": 13, "openDirective": 14, "typeDirective": 15, "closeDirective": 16, ":": 17, "argDirective": 18, "create": 19, "box": 20, "restOfLine": 21, "end": 22, "signal": 23, "autonumber": 24, "NUM": 25, "off": 26, "activate": 27, "actor": 28, "deactivate": 29, "note_statement": 30, "links_statement": 31, "link_statement": 32, "properties_statement": 33, "details_statement": 34, "title": 35, "legacy_title": 36, "acc_title": 37, "acc_title_value": 38, "acc_descr": 39, "acc_descr_value": 40, "acc_descr_multiline_value": 41, "loop": 42, "rect": 43, "opt": 44, "alt": 45, "else_sections": 46, "par": 47, "par_sections": 48, "par_over": 49, "critical": 50, "option_sections": 51, "break": 52, "option": 53, "and": 54, "else": 55, "participant": 56, "AS": 57, "participant_actor": 58, "destroy": 59, "note": 60, "placement": 61, "text2": 62, "over": 63, "actor_pair": 64, "links": 65, "link": 66, "properties": 67, "details": 68, "spaceList": 69, ",": 70, "left_of": 71, "right_of": 72, "signaltype": 73, "+": 74, "-": 75, "ACTOR": 76, "SOLID_OPEN_ARROW": 77, "DOTTED_OPEN_ARROW": 78, "SOLID_ARROW": 79, "DOTTED_ARROW": 80, "SOLID_CROSS": 81, "DOTTED_CROSS": 82, "SOLID_POINT": 83, "DOTTED_POINT": 84, "TXT": 85, "open_directive": 86, "type_directive": 87, "arg_directive": 88, "close_directive": 89, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 7: "SD", 17: ":", 19: "create", 20: "box", 21: "restOfLine", 22: "end", 24: "autonumber", 25: "NUM", 26: "off", 27: "activate", 29: "deactivate", 35: "title", 36: "legacy_title", 37: "acc_title", 38: "acc_title_value", 39: "acc_descr", 40: "acc_descr_value", 41: "acc_descr_multiline_value", 42: "loop", 43: "rect", 44: "opt", 45: "alt", 47: "par", 49: "par_over", 50: "critical", 52: "break", 53: "option", 54: "and", 55: "else", 56: "participant", 57: "AS", 58: "participant_actor", 59: "destroy", 60: "note", 63: "over", 65: "links", 66: "link", 67: "properties", 68: "details", 70: ",", 71: "left_of", 72: "right_of", 74: "+", 75: "-", 76: "ACTOR", 77: "SOLID_OPEN_ARROW", 78: "DOTTED_OPEN_ARROW", 79: "SOLID_ARROW", 80: "DOTTED_ARROW", 81: "SOLID_CROSS", 82: "DOTTED_CROSS", 83: "SOLID_POINT", 84: "DOTTED_POINT", 85: "TXT", 86: "open_directive", 87: "type_directive", 88: "arg_directive", 89: "close_directive" },
+ productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [11, 0], [11, 2], [12, 2], [12, 1], [12, 1], [6, 4], [6, 6], [10, 1], [10, 2], [10, 4], [10, 2], [10, 4], [10, 3], [10, 3], [10, 2], [10, 3], [10, 3], [10, 2], [10, 2], [10, 2], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [10, 1], [51, 1], [51, 4], [48, 1], [48, 4], [46, 1], [46, 4], [13, 5], [13, 3], [13, 5], [13, 3], [13, 3], [30, 4], [30, 4], [31, 3], [32, 3], [33, 3], [34, 3], [69, 2], [69, 1], [64, 3], [64, 1], [61, 1], [61, 1], [23, 5], [23, 5], [23, 4], [28, 1], [73, 1], [73, 1], [73, 1], [73, 1], [73, 1], [73, 1], [73, 1], [73, 1], [62, 1], [14, 1], [15, 1], [18, 1], [16, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 4:
+ yy.apply($$[$0]);
+ return $$[$0];
+ case 5:
+ case 10:
+ this.$ = [];
+ break;
+ case 6:
+ case 11:
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 7:
+ case 8:
+ case 12:
+ case 13:
+ this.$ = $$[$0];
+ break;
+ case 9:
+ case 14:
+ this.$ = [];
+ break;
+ case 18:
+ $$[$0].type = "createParticipant";
+ this.$ = $$[$0];
+ break;
+ case 19:
+ $$[$0 - 1].unshift({ type: "boxStart", boxData: yy.parseBoxData($$[$0 - 2]) });
+ $$[$0 - 1].push({ type: "boxEnd", boxText: $$[$0 - 2] });
+ this.$ = $$[$0 - 1];
+ break;
+ case 21:
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 22:
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 23:
+ this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 24:
+ this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 25:
+ this.$ = { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] };
+ break;
+ case 26:
+ this.$ = { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] };
+ break;
+ case 32:
+ yy.setDiagramTitle($$[$0].substring(6));
+ this.$ = $$[$0].substring(6);
+ break;
+ case 33:
+ yy.setDiagramTitle($$[$0].substring(7));
+ this.$ = $$[$0].substring(7);
+ break;
+ case 34:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 35:
+ case 36:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 37:
+ $$[$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 38:
+ $$[$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 39:
+ $$[$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 40:
+ $$[$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 41:
+ $$[$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 42:
+ $$[$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 43:
+ $$[$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 44:
+ $$[$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 47:
+ this.$ = $$[$0 - 3].concat([{ type: "option", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]);
+ break;
+ case 49:
+ this.$ = $$[$0 - 3].concat([{ type: "and", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]);
+ break;
+ case 51:
+ this.$ = $$[$0 - 3].concat([{ type: "else", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]);
+ break;
+ case 52:
+ $$[$0 - 3].draw = "participant";
+ $$[$0 - 3].type = "addParticipant";
+ $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);
+ this.$ = $$[$0 - 3];
+ break;
+ case 53:
+ $$[$0 - 1].draw = "participant";
+ $$[$0 - 1].type = "addParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 54:
+ $$[$0 - 3].draw = "actor";
+ $$[$0 - 3].type = "addParticipant";
+ $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);
+ this.$ = $$[$0 - 3];
+ break;
+ case 55:
+ $$[$0 - 1].draw = "actor";
+ $$[$0 - 1].type = "addParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 56:
+ $$[$0 - 1].type = "destroyParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 57:
+ this.$ = [$$[$0 - 1], { type: "addNote", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 58:
+ $$[$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 59:
+ this.$ = [$$[$0 - 1], { type: "addLinks", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 60:
+ this.$ = [$$[$0 - 1], { type: "addALink", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 61:
+ this.$ = [$$[$0 - 1], { type: "addProperties", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 62:
+ this.$ = [$$[$0 - 1], { type: "addDetails", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 65:
+ this.$ = [$$[$0 - 2], $$[$0]];
+ break;
+ case 66:
+ this.$ = $$[$0];
+ break;
+ case 67:
+ this.$ = yy.PLACEMENT.LEFTOF;
+ break;
+ case 68:
+ this.$ = yy.PLACEMENT.RIGHTOF;
+ break;
+ case 69:
+ this.$ = [
+ $$[$0 - 4],
+ $$[$0 - 1],
+ { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] },
+ { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }
+ ];
+ break;
+ case 70:
+ 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 71:
+ this.$ = [$$[$0 - 3], $$[$0 - 1], { type: "addMessage", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }];
+ break;
+ case 72:
+ this.$ = { type: "addParticipant", actor: $$[$0] };
+ break;
+ case 73:
+ this.$ = yy.LINETYPE.SOLID_OPEN;
+ break;
+ case 74:
+ this.$ = yy.LINETYPE.DOTTED_OPEN;
+ break;
+ case 75:
+ this.$ = yy.LINETYPE.SOLID;
+ break;
+ case 76:
+ this.$ = yy.LINETYPE.DOTTED;
+ break;
+ case 77:
+ this.$ = yy.LINETYPE.SOLID_CROSS;
+ break;
+ case 78:
+ this.$ = yy.LINETYPE.DOTTED_CROSS;
+ break;
+ case 79:
+ this.$ = yy.LINETYPE.SOLID_POINT;
+ break;
+ case 80:
+ this.$ = yy.LINETYPE.DOTTED_POINT;
+ break;
+ case 81:
+ this.$ = yy.parseMessage($$[$0].trim().substring(1));
+ break;
+ case 82:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 83:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 84:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 85:
+ yy.parseDirective("}%%", "close_directive", "sequence");
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: $V0, 5: $V1, 6: 4, 7: $V2, 14: 6, 86: $V3 }, { 1: [3] }, { 3: 8, 4: $V0, 5: $V1, 6: 4, 7: $V2, 14: 6, 86: $V3 }, { 3: 9, 4: $V0, 5: $V1, 6: 4, 7: $V2, 14: 6, 86: $V3 }, { 3: 10, 4: $V0, 5: $V1, 6: 4, 7: $V2, 14: 6, 86: $V3 }, o([1, 4, 5, 19, 20, 24, 27, 29, 35, 36, 37, 39, 41, 42, 43, 44, 45, 47, 49, 50, 52, 56, 58, 59, 60, 65, 66, 67, 68, 76, 86], $V4, { 8: 11 }), { 15: 12, 87: [1, 13] }, { 87: [2, 82] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: $V5, 5: $V6, 6: 43, 9: 14, 10: 16, 13: 18, 14: 6, 19: $V7, 20: $V8, 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, { 16: 54, 17: [1, 55], 89: $Vy }, o([17, 89], [2, 83]), o($Vz, [2, 6]), { 6: 43, 10: 57, 13: 18, 14: 6, 19: $V7, 20: $V8, 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, o($Vz, [2, 8]), o($Vz, [2, 9]), o($Vz, [2, 17]), { 13: 58, 56: $Vp, 58: $Vq, 59: $Vr }, { 21: [1, 59] }, { 5: [1, 60] }, { 5: [1, 63], 25: [1, 61], 26: [1, 62] }, { 28: 64, 76: $Vx }, { 28: 65, 76: $Vx }, { 5: [1, 66] }, { 5: [1, 67] }, { 5: [1, 68] }, { 5: [1, 69] }, { 5: [1, 70] }, o($Vz, [2, 32]), o($Vz, [2, 33]), { 38: [1, 71] }, { 40: [1, 72] }, o($Vz, [2, 36]), { 21: [1, 73] }, { 21: [1, 74] }, { 21: [1, 75] }, { 21: [1, 76] }, { 21: [1, 77] }, { 21: [1, 78] }, { 21: [1, 79] }, { 21: [1, 80] }, o($Vz, [2, 45]), { 28: 81, 76: $Vx }, { 28: 82, 76: $Vx }, { 28: 83, 76: $Vx }, { 73: 84, 77: [1, 85], 78: [1, 86], 79: [1, 87], 80: [1, 88], 81: [1, 89], 82: [1, 90], 83: [1, 91], 84: [1, 92] }, { 61: 93, 63: [1, 94], 71: [1, 95], 72: [1, 96] }, { 28: 97, 76: $Vx }, { 28: 98, 76: $Vx }, { 28: 99, 76: $Vx }, { 28: 100, 76: $Vx }, o([5, 57, 70, 77, 78, 79, 80, 81, 82, 83, 84, 85], [2, 72]), { 5: [1, 101] }, { 18: 102, 88: [1, 103] }, { 5: [2, 85] }, o($Vz, [2, 7]), o($Vz, [2, 18]), o($VA, [2, 10], { 11: 104 }), o($Vz, [2, 20]), { 5: [1, 106], 25: [1, 105] }, { 5: [1, 107] }, o($Vz, [2, 24]), { 5: [1, 108] }, { 5: [1, 109] }, o($Vz, [2, 27]), o($Vz, [2, 28]), o($Vz, [2, 29]), o($Vz, [2, 30]), o($Vz, [2, 31]), o($Vz, [2, 34]), o($Vz, [2, 35]), o($VB, $V4, { 8: 110 }), o($VB, $V4, { 8: 111 }), o($VB, $V4, { 8: 112 }), o($VC, $V4, { 46: 113, 8: 114 }), o($VD, $V4, { 48: 115, 8: 116 }), o($VD, $V4, { 8: 116, 48: 117 }), o($VE, $V4, { 51: 118, 8: 119 }), o($VB, $V4, { 8: 120 }), { 5: [1, 122], 57: [1, 121] }, { 5: [1, 124], 57: [1, 123] }, { 5: [1, 125] }, { 28: 128, 74: [1, 126], 75: [1, 127], 76: $Vx }, o($VF, [2, 73]), o($VF, [2, 74]), o($VF, [2, 75]), o($VF, [2, 76]), o($VF, [2, 77]), o($VF, [2, 78]), o($VF, [2, 79]), o($VF, [2, 80]), { 28: 129, 76: $Vx }, { 28: 131, 64: 130, 76: $Vx }, { 76: [2, 67] }, { 76: [2, 68] }, { 62: 132, 85: $VG }, { 62: 134, 85: $VG }, { 62: 135, 85: $VG }, { 62: 136, 85: $VG }, o($VH, [2, 15]), { 16: 137, 89: $Vy }, { 89: [2, 84] }, { 4: [1, 140], 5: [1, 142], 12: 139, 13: 141, 22: [1, 138], 56: $Vp, 58: $Vq, 59: $Vr }, { 5: [1, 143] }, o($Vz, [2, 22]), o($Vz, [2, 23]), o($Vz, [2, 25]), o($Vz, [2, 26]), { 4: $V5, 5: $V6, 6: 43, 9: 14, 10: 16, 13: 18, 14: 6, 19: $V7, 20: $V8, 22: [1, 144], 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, { 4: $V5, 5: $V6, 6: 43, 9: 14, 10: 16, 13: 18, 14: 6, 19: $V7, 20: $V8, 22: [1, 145], 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, { 4: $V5, 5: $V6, 6: 43, 9: 14, 10: 16, 13: 18, 14: 6, 19: $V7, 20: $V8, 22: [1, 146], 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, { 22: [1, 147] }, { 4: $V5, 5: $V6, 6: 43, 9: 14, 10: 16, 13: 18, 14: 6, 19: $V7, 20: $V8, 22: [2, 50], 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 55: [1, 148], 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, { 22: [1, 149] }, { 4: $V5, 5: $V6, 6: 43, 9: 14, 10: 16, 13: 18, 14: 6, 19: $V7, 20: $V8, 22: [2, 48], 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 54: [1, 150], 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, { 22: [1, 151] }, { 22: [1, 152] }, { 4: $V5, 5: $V6, 6: 43, 9: 14, 10: 16, 13: 18, 14: 6, 19: $V7, 20: $V8, 22: [2, 46], 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 53: [1, 153], 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, { 4: $V5, 5: $V6, 6: 43, 9: 14, 10: 16, 13: 18, 14: 6, 19: $V7, 20: $V8, 22: [1, 154], 23: 21, 24: $V9, 27: $Va, 28: 47, 29: $Vb, 30: 25, 31: 26, 32: 27, 33: 28, 34: 29, 35: $Vc, 36: $Vd, 37: $Ve, 39: $Vf, 41: $Vg, 42: $Vh, 43: $Vi, 44: $Vj, 45: $Vk, 47: $Vl, 49: $Vm, 50: $Vn, 52: $Vo, 56: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 65: $Vt, 66: $Vu, 67: $Vv, 68: $Vw, 76: $Vx, 86: $V3 }, { 21: [1, 155] }, o($Vz, [2, 53]), { 21: [1, 156] }, o($Vz, [2, 55]), o($Vz, [2, 56]), { 28: 157, 76: $Vx }, { 28: 158, 76: $Vx }, { 62: 159, 85: $VG }, { 62: 160, 85: $VG }, { 62: 161, 85: $VG }, { 70: [1, 162], 85: [2, 66] }, { 5: [2, 59] }, { 5: [2, 81] }, { 5: [2, 60] }, { 5: [2, 61] }, { 5: [2, 62] }, { 5: [1, 163] }, o($Vz, [2, 19]), o($VA, [2, 11]), { 13: 164, 56: $Vp, 58: $Vq, 59: $Vr }, o($VA, [2, 13]), o($VA, [2, 14]), o($Vz, [2, 21]), o($Vz, [2, 37]), o($Vz, [2, 38]), o($Vz, [2, 39]), o($Vz, [2, 40]), { 21: [1, 165] }, o($Vz, [2, 41]), { 21: [1, 166] }, o($Vz, [2, 42]), o($Vz, [2, 43]), { 21: [1, 167] }, o($Vz, [2, 44]), { 5: [1, 168] }, { 5: [1, 169] }, { 62: 170, 85: $VG }, { 62: 171, 85: $VG }, { 5: [2, 71] }, { 5: [2, 57] }, { 5: [2, 58] }, { 28: 172, 76: $Vx }, o($VH, [2, 16]), o($VA, [2, 12]), o($VC, $V4, { 8: 114, 46: 173 }), o($VD, $V4, { 8: 116, 48: 174 }), o($VE, $V4, { 8: 119, 51: 175 }), o($Vz, [2, 52]), o($Vz, [2, 54]), { 5: [2, 69] }, { 5: [2, 70] }, { 85: [2, 65] }, { 22: [2, 51] }, { 22: [2, 49] }, { 22: [2, 47] }],
+ defaultActions: { 7: [2, 82], 8: [2, 1], 9: [2, 2], 10: [2, 3], 56: [2, 85], 95: [2, 67], 96: [2, 68], 103: [2, 84], 132: [2, 59], 133: [2, 81], 134: [2, 60], 135: [2, 61], 136: [2, 62], 159: [2, 71], 160: [2, 57], 161: [2, 58], 170: [2, 69], 171: [2, 70], 172: [2, 65], 173: [2, 51], 174: [2, 49], 175: [2, 47] },
+ 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 86;
+ case 1:
+ this.begin("type_directive");
+ return 87;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 17;
+ case 3:
+ this.popState();
+ this.popState();
+ return 89;
+ case 4:
+ return 88;
+ case 5:
+ return 5;
+ case 6:
+ break;
+ case 7:
+ break;
+ case 8:
+ break;
+ case 9:
+ break;
+ case 10:
+ break;
+ case 11:
+ return 25;
+ case 12:
+ this.begin("LINE");
+ return 20;
+ case 13:
+ this.begin("ID");
+ return 56;
+ case 14:
+ this.begin("ID");
+ return 58;
+ case 15:
+ return 19;
+ case 16:
+ this.begin("ID");
+ return 59;
+ case 17:
+ yy_.yytext = yy_.yytext.trim();
+ this.begin("ALIAS");
+ return 76;
+ case 18:
+ this.popState();
+ this.popState();
+ this.begin("LINE");
+ return 57;
+ case 19:
+ this.popState();
+ this.popState();
+ return 5;
+ case 20:
+ this.begin("LINE");
+ return 42;
+ case 21:
+ this.begin("LINE");
+ return 43;
+ case 22:
+ this.begin("LINE");
+ return 44;
+ case 23:
+ this.begin("LINE");
+ return 45;
+ case 24:
+ this.begin("LINE");
+ return 55;
+ case 25:
+ this.begin("LINE");
+ return 47;
+ case 26:
+ this.begin("LINE");
+ return 49;
+ case 27:
+ this.begin("LINE");
+ return 54;
+ case 28:
+ this.begin("LINE");
+ return 50;
+ case 29:
+ this.begin("LINE");
+ return 53;
+ case 30:
+ this.begin("LINE");
+ return 52;
+ case 31:
+ this.popState();
+ return 21;
+ case 32:
+ return 22;
+ case 33:
+ return 71;
+ case 34:
+ return 72;
+ case 35:
+ return 65;
+ case 36:
+ return 66;
+ case 37:
+ return 67;
+ case 38:
+ return 68;
+ case 39:
+ return 63;
+ case 40:
+ return 60;
+ case 41:
+ this.begin("ID");
+ return 27;
+ case 42:
+ this.begin("ID");
+ return 29;
+ case 43:
+ return 35;
+ case 44:
+ return 36;
+ case 45:
+ this.begin("acc_title");
+ return 37;
+ case 46:
+ this.popState();
+ return "acc_title_value";
+ case 47:
+ this.begin("acc_descr");
+ return 39;
+ case 48:
+ this.popState();
+ return "acc_descr_value";
+ case 49:
+ this.begin("acc_descr_multiline");
+ break;
+ case 50:
+ this.popState();
+ break;
+ case 51:
+ return "acc_descr_multiline_value";
+ case 52:
+ return 7;
+ case 53:
+ return 24;
+ case 54:
+ return 26;
+ case 55:
+ return 70;
+ case 56:
+ return 5;
+ case 57:
+ yy_.yytext = yy_.yytext.trim();
+ return 76;
+ case 58:
+ return 79;
+ case 59:
+ return 80;
+ case 60:
+ return 77;
+ case 61:
+ return 78;
+ case 62:
+ return 81;
+ case 63:
+ return 82;
+ case 64:
+ return 83;
+ case 65:
+ return 84;
+ case 66:
+ return 85;
+ case 67:
+ return 74;
+ case 68:
+ return 75;
+ case 69:
+ return 5;
+ case 70:
+ return "INVALID";
+ }
+ },
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:[\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": [50, 51], "inclusive": false }, "acc_descr": { "rules": [48], "inclusive": false }, "acc_title": { "rules": [46], "inclusive": false }, "open_directive": { "rules": [1, 8], "inclusive": false }, "type_directive": { "rules": [2, 3, 8], "inclusive": false }, "arg_directive": { "rules": [3, 4, 8], "inclusive": false }, "ID": { "rules": [7, 8, 17], "inclusive": false }, "ALIAS": { "rules": [7, 8, 18, 19], "inclusive": false }, "LINE": { "rules": [7, 8, 31], "inclusive": false }, "INITIAL": { "rules": [0, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 47, 49, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70], "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 parseDirective$4 = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ 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, description2, 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 && description2 == null) {
+ return;
+ }
+ }
+ if (description2 == null || description2.text == null) {
+ description2 = { text: name2, wrap: null, type: type2 };
+ }
+ if (type2 == null || description2.text == null) {
+ description2 = { text: name2, wrap: null, type: type2 };
+ }
+ actors$1[id2] = {
+ box: assignedBox,
+ name: name2,
+ description: description2.text,
+ wrap: description2.wrap === void 0 && autoWrap() || !!description2.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) {
+ 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
+ });
+ 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);
+ 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,
+ parseDirective: parseDirective$4,
+ 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", 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", 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 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", 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$3 = {
+ 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$3.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$1 = 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$3.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$3.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$3.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$3.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);
+ const right2 = activations.reduce(function(acc, activation) {
+ return common$1.getMax(acc, activation.stopx);
+ }, actorObj.x + actorObj.width / 2);
+ 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$3.insertComputerIcon(diagram2);
+ svgDraw$3.insertDatabaseIcon(diagram2);
+ svgDraw$3.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$3.insertArrowHead(diagram2);
+ svgDraw$3.insertArrowCrossHead(diagram2);
+ svgDraw$3.insertArrowFilledHead(diagram2);
+ svgDraw$3.insertSequenceNumber(diagram2);
+ function activeEnd(msg, verticalPos) {
+ const activationData = bounds$1.endActivation(msg);
+ if (activationData.starty + 18 > verticalPos) {
+ activationData.starty = verticalPos - 6;
+ verticalPos += 12;
+ }
+ svgDraw$3.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$1(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$3.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$3.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$3.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$3.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$3.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$3.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$3.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$3.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) {
+ let process = false;
+ 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)) {
+ process = true;
+ }
+ if (!process) {
+ return {};
+ }
+ const fromBounds = activationBounds(msg.from, actors2);
+ const toBounds = activationBounds(msg.to, actors2);
+ const fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;
+ const toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;
+ const allBounds = [...fromBounds, ...toBounds];
+ const boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]);
+ 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: fromBounds[fromIdx],
+ stopx: toBounds[toIdx],
+ 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
+ };
+ 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, 34], $V1 = [1, 35], $V2 = [1, 36], $V3 = [1, 37], $V4 = [1, 9], $V5 = [1, 8], $V6 = [1, 19], $V7 = [1, 20], $V8 = [1, 21], $V9 = [1, 40], $Va = [1, 41], $Vb = [1, 27], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 32], $Vf = [1, 33], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 30], $Vj = [1, 31], $Vk = [1, 45], $Vl = [1, 42], $Vm = [1, 43], $Vn = [1, 44], $Vo = [1, 46], $Vp = [1, 24], $Vq = [1, 16, 24], $Vr = [1, 60], $Vs = [1, 61], $Vt = [1, 62], $Vu = [1, 63], $Vv = [1, 64], $Vw = [1, 65], $Vx = [1, 66], $Vy = [1, 16, 24, 52], $Vz = [1, 77], $VA = [1, 16, 24, 27, 28, 36, 50, 52, 55, 68, 69, 70, 71, 72, 73, 74, 79, 81], $VB = [1, 16, 24, 27, 28, 34, 36, 50, 52, 55, 59, 68, 69, 70, 71, 72, 73, 74, 79, 81, 94, 96, 97, 98, 99], $VC = [1, 86], $VD = [28, 94, 96, 97, 98, 99], $VE = [28, 73, 74, 94, 96, 97, 98, 99], $VF = [28, 68, 69, 70, 71, 72, 94, 96, 97, 98, 99], $VG = [1, 99], $VH = [1, 16, 24, 50, 52, 55], $VI = [1, 16, 24, 36], $VJ = [8, 9, 10, 11, 19, 23, 44, 46, 48, 53, 57, 58, 60, 61, 63, 65, 75, 76, 78, 82, 94, 96, 97, 98, 99];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "directive": 5, "statements": 6, "direction": 7, "direction_tb": 8, "direction_bt": 9, "direction_rl": 10, "direction_lr": 11, "graphConfig": 12, "openDirective": 13, "typeDirective": 14, "closeDirective": 15, "NEWLINE": 16, ":": 17, "argDirective": 18, "open_directive": 19, "type_directive": 20, "arg_directive": 21, "close_directive": 22, "CLASS_DIAGRAM": 23, "EOF": 24, "statement": 25, "classLabel": 26, "SQS": 27, "STR": 28, "SQE": 29, "namespaceName": 30, "alphaNumToken": 31, "className": 32, "classLiteralName": 33, "GENERICTYPE": 34, "relationStatement": 35, "LABEL": 36, "namespaceStatement": 37, "classStatement": 38, "methodStatement": 39, "annotationStatement": 40, "clickStatement": 41, "cssClassStatement": 42, "noteStatement": 43, "acc_title": 44, "acc_title_value": 45, "acc_descr": 46, "acc_descr_value": 47, "acc_descr_multiline_value": 48, "namespaceIdentifier": 49, "STRUCT_START": 50, "classStatements": 51, "STRUCT_STOP": 52, "NAMESPACE": 53, "classIdentifier": 54, "STYLE_SEPARATOR": 55, "members": 56, "CLASS": 57, "ANNOTATION_START": 58, "ANNOTATION_END": 59, "MEMBER": 60, "SEPARATOR": 61, "relation": 62, "NOTE_FOR": 63, "noteText": 64, "NOTE": 65, "relationType": 66, "lineType": 67, "AGGREGATION": 68, "EXTENSION": 69, "COMPOSITION": 70, "DEPENDENCY": 71, "LOLLIPOP": 72, "LINE": 73, "DOTTED_LINE": 74, "CALLBACK": 75, "LINK": 76, "LINK_TARGET": 77, "CLICK": 78, "CALLBACK_NAME": 79, "CALLBACK_ARGS": 80, "HREF": 81, "CSSCLASS": 82, "commentToken": 83, "textToken": 84, "graphCodeTokens": 85, "textNoTagsToken": 86, "TAGSTART": 87, "TAGEND": 88, "==": 89, "--": 90, "PCT": 91, "DEFAULT": 92, "SPACE": 93, "MINUS": 94, "keywords": 95, "UNICODE_TEXT": 96, "NUM": 97, "ALPHA": 98, "BQUOTE_STR": 99, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 8: "direction_tb", 9: "direction_bt", 10: "direction_rl", 11: "direction_lr", 16: "NEWLINE", 17: ":", 19: "open_directive", 20: "type_directive", 21: "arg_directive", 22: "close_directive", 23: "CLASS_DIAGRAM", 24: "EOF", 27: "SQS", 28: "STR", 29: "SQE", 34: "GENERICTYPE", 36: "LABEL", 44: "acc_title", 45: "acc_title_value", 46: "acc_descr", 47: "acc_descr_value", 48: "acc_descr_multiline_value", 50: "STRUCT_START", 52: "STRUCT_STOP", 53: "NAMESPACE", 55: "STYLE_SEPARATOR", 57: "CLASS", 58: "ANNOTATION_START", 59: "ANNOTATION_END", 60: "MEMBER", 61: "SEPARATOR", 63: "NOTE_FOR", 65: "NOTE", 68: "AGGREGATION", 69: "EXTENSION", 70: "COMPOSITION", 71: "DEPENDENCY", 72: "LOLLIPOP", 73: "LINE", 74: "DOTTED_LINE", 75: "CALLBACK", 76: "LINK", 77: "LINK_TARGET", 78: "CLICK", 79: "CALLBACK_NAME", 80: "CALLBACK_ARGS", 81: "HREF", 82: "CSSCLASS", 85: "graphCodeTokens", 87: "TAGSTART", 88: "TAGEND", 89: "==", 90: "--", 91: "PCT", 92: "DEFAULT", 93: "SPACE", 94: "MINUS", 95: "keywords", 96: "UNICODE_TEXT", 97: "NUM", 98: "ALPHA", 99: "BQUOTE_STR" },
+ productions_: [0, [3, 1], [3, 2], [3, 1], [7, 1], [7, 1], [7, 1], [7, 1], [4, 1], [5, 4], [5, 6], [13, 1], [14, 1], [18, 1], [15, 1], [12, 4], [6, 1], [6, 2], [6, 3], [26, 3], [30, 1], [30, 2], [32, 1], [32, 1], [32, 2], [32, 2], [32, 2], [25, 1], [25, 2], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 1], [25, 2], [25, 2], [25, 1], [37, 4], [37, 5], [49, 2], [51, 1], [51, 2], [51, 3], [38, 1], [38, 3], [38, 4], [38, 6], [54, 2], [54, 3], [40, 4], [56, 1], [56, 2], [39, 1], [39, 2], [39, 1], [39, 1], [35, 3], [35, 4], [35, 4], [35, 5], [43, 3], [43, 2], [62, 3], [62, 2], [62, 2], [62, 1], [66, 1], [66, 1], [66, 1], [66, 1], [66, 1], [67, 1], [67, 1], [41, 3], [41, 4], [41, 3], [41, 4], [41, 4], [41, 5], [41, 3], [41, 4], [41, 4], [41, 5], [41, 4], [41, 5], [41, 5], [41, 6], [42, 3], [83, 1], [83, 1], [84, 1], [84, 1], [84, 1], [84, 1], [84, 1], [84, 1], [84, 1], [86, 1], [86, 1], [86, 1], [86, 1], [31, 1], [31, 1], [31, 1], [31, 1], [33, 1], [64, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 4:
+ yy.setDirection("TB");
+ break;
+ case 5:
+ yy.setDirection("BT");
+ break;
+ case 6:
+ yy.setDirection("RL");
+ break;
+ case 7:
+ yy.setDirection("LR");
+ break;
+ case 11:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 12:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 13:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 14:
+ yy.parseDirective("}%%", "close_directive", "class");
+ break;
+ case 19:
+ this.$ = $$[$0 - 1];
+ break;
+ case 20:
+ case 22:
+ case 23:
+ this.$ = $$[$0];
+ break;
+ case 21:
+ case 24:
+ this.$ = $$[$0 - 1] + $$[$0];
+ break;
+ case 25:
+ case 26:
+ this.$ = $$[$0 - 1] + "~" + $$[$0] + "~";
+ break;
+ case 27:
+ yy.addRelation($$[$0]);
+ break;
+ case 28:
+ $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
+ yy.addRelation($$[$0 - 1]);
+ break;
+ case 37:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 38:
+ case 39:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 40:
+ yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 41:
+ yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]);
+ break;
+ case 42:
+ this.$ = $$[$0];
+ yy.addNamespace($$[$0]);
+ break;
+ case 43:
+ this.$ = [$$[$0]];
+ break;
+ case 44:
+ this.$ = [$$[$0 - 1]];
+ break;
+ case 45:
+ $$[$0].unshift($$[$0 - 2]);
+ this.$ = $$[$0];
+ break;
+ case 47:
+ yy.setCssClass($$[$0 - 2], $$[$0]);
+ break;
+ case 48:
+ yy.addMembers($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 49:
+ yy.setCssClass($$[$0 - 5], $$[$0 - 3]);
+ yy.addMembers($$[$0 - 5], $$[$0 - 1]);
+ break;
+ case 50:
+ this.$ = $$[$0];
+ yy.addClass($$[$0]);
+ break;
+ case 51:
+ this.$ = $$[$0 - 1];
+ yy.addClass($$[$0 - 1]);
+ yy.setClassLabel($$[$0 - 1], $$[$0]);
+ break;
+ case 52:
+ yy.addAnnotation($$[$0], $$[$0 - 2]);
+ break;
+ case 53:
+ this.$ = [$$[$0]];
+ break;
+ case 54:
+ $$[$0].push($$[$0 - 1]);
+ this.$ = $$[$0];
+ break;
+ case 55:
+ break;
+ case 56:
+ yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
+ break;
+ case 57:
+ break;
+ case 58:
+ break;
+ case 59:
+ this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" };
+ break;
+ case 60:
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" };
+ break;
+ case 61:
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] };
+ break;
+ case 62:
+ this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };
+ break;
+ case 63:
+ yy.addNote($$[$0], $$[$0 - 1]);
+ break;
+ case 64:
+ yy.addNote($$[$0]);
+ break;
+ case 65:
+ this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };
+ break;
+ case 66:
+ this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] };
+ break;
+ case 67:
+ this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] };
+ break;
+ case 68:
+ this.$ = { type1: "none", type2: "none", lineType: $$[$0] };
+ break;
+ case 69:
+ this.$ = yy.relationType.AGGREGATION;
+ break;
+ case 70:
+ this.$ = yy.relationType.EXTENSION;
+ break;
+ case 71:
+ this.$ = yy.relationType.COMPOSITION;
+ break;
+ case 72:
+ this.$ = yy.relationType.DEPENDENCY;
+ break;
+ case 73:
+ this.$ = yy.relationType.LOLLIPOP;
+ break;
+ case 74:
+ this.$ = yy.lineType.LINE;
+ break;
+ case 75:
+ this.$ = yy.lineType.DOTTED_LINE;
+ break;
+ case 76:
+ case 82:
+ this.$ = $$[$0 - 2];
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
+ break;
+ case 77:
+ case 83:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 2], $$[$0]);
+ break;
+ case 78:
+ this.$ = $$[$0 - 2];
+ yy.setLink($$[$0 - 1], $$[$0]);
+ break;
+ case 79:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 80:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 2], $$[$0]);
+ break;
+ case 81:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
+ yy.setTooltip($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 84:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 85:
+ this.$ = $$[$0 - 4];
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 86:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0]);
+ break;
+ case 87:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]);
+ break;
+ case 88:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 89:
+ this.$ = $$[$0 - 5];
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
+ yy.setTooltip($$[$0 - 4], $$[$0 - 1]);
+ break;
+ case 90:
+ yy.setCssClass($$[$0 - 1], $$[$0]);
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: 18, 8: $V0, 9: $V1, 10: $V2, 11: $V3, 12: 5, 13: 6, 19: $V4, 23: $V5, 25: 7, 31: 38, 32: 22, 33: 39, 35: 10, 37: 11, 38: 12, 39: 13, 40: 14, 41: 15, 42: 16, 43: 17, 44: $V6, 46: $V7, 48: $V8, 49: 23, 53: $V9, 54: 24, 57: $Va, 58: $Vb, 60: $Vc, 61: $Vd, 63: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 1: [3] }, { 1: [2, 1] }, { 3: 47, 4: 2, 5: 3, 6: 4, 7: 18, 8: $V0, 9: $V1, 10: $V2, 11: $V3, 12: 5, 13: 6, 19: $V4, 23: $V5, 25: 7, 31: 38, 32: 22, 33: 39, 35: 10, 37: 11, 38: 12, 39: 13, 40: 14, 41: 15, 42: 16, 43: 17, 44: $V6, 46: $V7, 48: $V8, 49: 23, 53: $V9, 54: 24, 57: $Va, 58: $Vb, 60: $Vc, 61: $Vd, 63: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 1: [2, 3] }, { 1: [2, 8] }, { 14: 48, 20: [1, 49] }, o($Vp, [2, 16], { 16: [1, 50] }), { 16: [1, 51] }, { 20: [2, 11] }, o($Vq, [2, 27], { 36: [1, 52] }), o($Vq, [2, 29]), o($Vq, [2, 30]), o($Vq, [2, 31]), o($Vq, [2, 32]), o($Vq, [2, 33]), o($Vq, [2, 34]), o($Vq, [2, 35]), o($Vq, [2, 36]), { 45: [1, 53] }, { 47: [1, 54] }, o($Vq, [2, 39]), o($Vq, [2, 55], { 62: 55, 66: 58, 67: 59, 28: [1, 56], 36: [1, 57], 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }), { 50: [1, 67] }, o($Vy, [2, 46], { 50: [1, 69], 55: [1, 68] }), o($Vq, [2, 57]), o($Vq, [2, 58]), { 31: 70, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, { 31: 38, 32: 71, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 31: 38, 32: 72, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 31: 38, 32: 73, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 28: [1, 74] }, { 31: 38, 32: 75, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 28: $Vz, 64: 76 }, o($Vq, [2, 4]), o($Vq, [2, 5]), o($Vq, [2, 6]), o($Vq, [2, 7]), o($VA, [2, 22], { 31: 38, 33: 39, 32: 78, 34: [1, 79], 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }), o($VA, [2, 23], { 34: [1, 80] }), { 30: 81, 31: 82, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, { 31: 38, 32: 83, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($VB, [2, 104]), o($VB, [2, 105]), o($VB, [2, 106]), o($VB, [2, 107]), o([1, 16, 24, 27, 28, 34, 36, 50, 52, 55, 68, 69, 70, 71, 72, 73, 74, 79, 81], [2, 108]), { 1: [2, 2] }, { 15: 84, 17: [1, 85], 22: $VC }, o([17, 22], [2, 12]), o($Vp, [2, 17], { 25: 7, 35: 10, 37: 11, 38: 12, 39: 13, 40: 14, 41: 15, 42: 16, 43: 17, 7: 18, 32: 22, 49: 23, 54: 24, 31: 38, 33: 39, 6: 87, 8: $V0, 9: $V1, 10: $V2, 11: $V3, 44: $V6, 46: $V7, 48: $V8, 53: $V9, 57: $Va, 58: $Vb, 60: $Vc, 61: $Vd, 63: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }), { 6: 88, 7: 18, 8: $V0, 9: $V1, 10: $V2, 11: $V3, 25: 7, 31: 38, 32: 22, 33: 39, 35: 10, 37: 11, 38: 12, 39: 13, 40: 14, 41: 15, 42: 16, 43: 17, 44: $V6, 46: $V7, 48: $V8, 49: 23, 53: $V9, 54: 24, 57: $Va, 58: $Vb, 60: $Vc, 61: $Vd, 63: $Ve, 65: $Vf, 75: $Vg, 76: $Vh, 78: $Vi, 82: $Vj, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($Vq, [2, 28]), o($Vq, [2, 37]), o($Vq, [2, 38]), { 28: [1, 90], 31: 38, 32: 89, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 62: 91, 66: 58, 67: 59, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv, 73: $Vw, 74: $Vx }, o($Vq, [2, 56]), { 67: 92, 73: $Vw, 74: $Vx }, o($VD, [2, 68], { 66: 93, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VE, [2, 69]), o($VE, [2, 70]), o($VE, [2, 71]), o($VE, [2, 72]), o($VE, [2, 73]), o($VF, [2, 74]), o($VF, [2, 75]), { 16: [1, 95], 38: 96, 51: 94, 54: 24, 57: $Va }, { 31: 97, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, { 56: 98, 60: $VG }, { 59: [1, 100] }, { 28: [1, 101] }, { 28: [1, 102] }, { 79: [1, 103], 81: [1, 104] }, { 31: 105, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, { 28: $Vz, 64: 106 }, o($Vq, [2, 64]), o($Vq, [2, 109]), o($VA, [2, 24]), o($VA, [2, 25]), o($VA, [2, 26]), { 50: [2, 42] }, { 30: 107, 31: 82, 50: [2, 20], 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn }, o($VH, [2, 50], { 26: 108, 27: [1, 109] }), { 16: [1, 110] }, { 18: 111, 21: [1, 112] }, { 16: [2, 14] }, o($Vp, [2, 18]), { 24: [1, 113] }, o($VI, [2, 59]), { 31: 38, 32: 114, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, { 28: [1, 116], 31: 38, 32: 115, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($VD, [2, 67], { 66: 117, 68: $Vr, 69: $Vs, 70: $Vt, 71: $Vu, 72: $Vv }), o($VD, [2, 66]), { 52: [1, 118] }, { 38: 96, 51: 119, 54: 24, 57: $Va }, { 16: [1, 120], 52: [2, 43] }, o($Vy, [2, 47], { 50: [1, 121] }), { 52: [1, 122] }, { 52: [2, 53], 56: 123, 60: $VG }, { 31: 38, 32: 124, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($Vq, [2, 76], { 28: [1, 125] }), o($Vq, [2, 78], { 28: [1, 127], 77: [1, 126] }), o($Vq, [2, 82], { 28: [1, 128], 80: [1, 129] }), { 28: [1, 130] }, o($Vq, [2, 90]), o($Vq, [2, 63]), { 50: [2, 21] }, o($VH, [2, 51]), { 28: [1, 131] }, o($VJ, [2, 9]), { 15: 132, 22: $VC }, { 22: [2, 13] }, { 1: [2, 15] }, o($VI, [2, 61]), o($VI, [2, 60]), { 31: 38, 32: 133, 33: 39, 94: $Vk, 96: $Vl, 97: $Vm, 98: $Vn, 99: $Vo }, o($VD, [2, 65]), o($Vq, [2, 40]), { 52: [1, 134] }, { 38: 96, 51: 135, 52: [2, 44], 54: 24, 57: $Va }, { 56: 136, 60: $VG }, o($Vy, [2, 48]), { 52: [2, 54] }, o($Vq, [2, 52]), o($Vq, [2, 77]), o($Vq, [2, 79]), o($Vq, [2, 80], { 77: [1, 137] }), o($Vq, [2, 83]), o($Vq, [2, 84], { 28: [1, 138] }), o($Vq, [2, 86], { 28: [1, 140], 77: [1, 139] }), { 29: [1, 141] }, { 16: [1, 142] }, o($VI, [2, 62]), o($Vq, [2, 41]), { 52: [2, 45] }, { 52: [1, 143] }, o($Vq, [2, 81]), o($Vq, [2, 85]), o($Vq, [2, 87]), o($Vq, [2, 88], { 77: [1, 144] }), o($VH, [2, 19]), o($VJ, [2, 10]), o($Vy, [2, 49]), o($Vq, [2, 89])],
+ defaultActions: { 2: [2, 1], 4: [2, 3], 5: [2, 8], 9: [2, 11], 47: [2, 2], 81: [2, 42], 86: [2, 14], 107: [2, 21], 112: [2, 13], 113: [2, 15], 123: [2, 54], 135: [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: {},
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
+ switch ($avoiding_name_collisions) {
+ case 0:
+ this.begin("open_directive");
+ return 19;
+ case 1:
+ return 8;
+ case 2:
+ return 9;
+ case 3:
+ return 10;
+ case 4:
+ return 11;
+ case 5:
+ this.begin("type_directive");
+ return 20;
+ case 6:
+ this.popState();
+ this.begin("arg_directive");
+ return 17;
+ case 7:
+ this.popState();
+ this.popState();
+ return 22;
+ case 8:
+ return 21;
+ case 9:
+ break;
+ case 10:
+ break;
+ case 11:
+ this.begin("acc_title");
+ return 44;
+ case 12:
+ this.popState();
+ return "acc_title_value";
+ case 13:
+ this.begin("acc_descr");
+ return 46;
+ case 14:
+ this.popState();
+ return "acc_descr_value";
+ case 15:
+ this.begin("acc_descr_multiline");
+ break;
+ case 16:
+ this.popState();
+ break;
+ case 17:
+ return "acc_descr_multiline_value";
+ case 18:
+ return 16;
+ case 19:
+ break;
+ case 20:
+ return 23;
+ case 21:
+ return 23;
+ case 22:
+ return "EDGE_STATE";
+ case 23:
+ this.begin("callback_name");
+ break;
+ case 24:
+ this.popState();
+ break;
+ case 25:
+ this.popState();
+ this.begin("callback_args");
+ break;
+ case 26:
+ return 79;
+ case 27:
+ this.popState();
+ break;
+ case 28:
+ return 80;
+ case 29:
+ this.popState();
+ break;
+ case 30:
+ return "STR";
+ case 31:
+ this.begin("string");
+ break;
+ case 32:
+ this.begin("namespace");
+ return 53;
+ case 33:
+ this.popState();
+ return 16;
+ case 34:
+ break;
+ case 35:
+ this.begin("namespace-body");
+ return 50;
+ case 36:
+ this.popState();
+ return 52;
+ case 37:
+ return "EOF_IN_STRUCT";
+ case 38:
+ return 16;
+ case 39:
+ break;
+ case 40:
+ return "EDGE_STATE";
+ case 41:
+ this.begin("class");
+ return 57;
+ case 42:
+ this.popState();
+ return 16;
+ case 43:
+ break;
+ case 44:
+ this.popState();
+ this.popState();
+ return 52;
+ case 45:
+ this.begin("class-body");
+ return 50;
+ case 46:
+ this.popState();
+ return 52;
+ case 47:
+ return "EOF_IN_STRUCT";
+ case 48:
+ return "EDGE_STATE";
+ case 49:
+ return "OPEN_IN_STRUCT";
+ case 50:
+ break;
+ case 51:
+ return "MEMBER";
+ case 52:
+ return 82;
+ case 53:
+ return 75;
+ case 54:
+ return 76;
+ case 55:
+ return 78;
+ case 56:
+ return 63;
+ case 57:
+ return 65;
+ case 58:
+ return 58;
+ case 59:
+ return 59;
+ case 60:
+ return 81;
+ case 61:
+ this.popState();
+ break;
+ case 62:
+ return "GENERICTYPE";
+ case 63:
+ this.begin("generic");
+ break;
+ case 64:
+ this.popState();
+ break;
+ case 65:
+ return "BQUOTE_STR";
+ case 66:
+ this.begin("bqstring");
+ break;
+ case 67:
+ return 77;
+ case 68:
+ return 77;
+ case 69:
+ return 77;
+ case 70:
+ return 77;
+ case 71:
+ return 69;
+ case 72:
+ return 69;
+ case 73:
+ return 71;
+ case 74:
+ return 71;
+ case 75:
+ return 70;
+ case 76:
+ return 68;
+ case 77:
+ return 72;
+ case 78:
+ return 73;
+ case 79:
+ return 74;
+ case 80:
+ return 36;
+ case 81:
+ return 55;
+ case 82:
+ return 94;
+ case 83:
+ return "DOT";
+ case 84:
+ return "PLUS";
+ case 85:
+ return 91;
+ case 86:
+ return "EQUALS";
+ case 87:
+ return "EQUALS";
+ case 88:
+ return 98;
+ case 89:
+ return 27;
+ case 90:
+ return 29;
+ case 91:
+ return "PUNCTUATION";
+ case 92:
+ return 97;
+ case 93:
+ return 96;
+ case 94:
+ return 93;
+ case 95:
+ return 24;
+ }
+ },
+ rules: [/^(?:%%\{)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:((?:(?!\}%%)[^:.])*))/, /^(?::)/, /^(?:\}%%)/, /^(?:((?:(?!\}%%).|\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": [31, 36, 37, 38, 39, 40, 41, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "namespace": { "rules": [31, 32, 33, 34, 35, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "class-body": { "rules": [31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "class": { "rules": [31, 42, 43, 44, 45, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "acc_descr_multiline": { "rules": [16, 17, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "acc_descr": { "rules": [14, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "acc_title": { "rules": [12, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "arg_directive": { "rules": [7, 8, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "type_directive": { "rules": [6, 7, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "open_directive": { "rules": [5, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "callback_args": { "rules": [27, 28, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "callback_name": { "rules": [24, 25, 26, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "href": { "rules": [31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "struct": { "rules": [31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "generic": { "rules": [31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "bqstring": { "rules": [31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 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, 91, 92, 93, 94, 95], "inclusive": false }, "string": { "rules": [29, 30, 31, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 9, 10, 11, 13, 15, 18, 19, 20, 21, 22, 23, 31, 32, 41, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 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, 91, 92, 93, 94, 95], "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 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 parseDirective$3 = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ const splitClassNameAndType = function(id2) {
+ 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(id2, label) {
+ if (label) {
+ label = sanitizeText$2(label);
+ }
+ const { className } = splitClassNameAndType(id2);
+ classes$1[className].label = label;
+ };
+ const addClass = function(id2) {
+ const classId = splitClassNameAndType(id2);
+ if (classes$1[classId.className] !== void 0) {
+ return;
+ }
+ classes$1[classId.className] = {
+ id: classId.className,
+ type: classId.type,
+ label: classId.className,
+ cssClasses: [],
+ methods: [],
+ members: [],
+ annotations: [],
+ domId: MERMAID_DOM_ID_PREFIX + classId.className + "-" + classCounter
+ };
+ classCounter++;
+ };
+ const lookUpDomId = function(id2) {
+ 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) {
+ 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(sanitizeText$2(memberString));
+ } else if (memberString) {
+ theClass.members.push(sanitizeText$2(memberString));
+ }
+ }
+ };
+ 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 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 = {
+ parseDirective: parseDirective$3,
+ 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: ${options2.mainBkg} !important;
+ stroke: ${options2.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionEnd, .extension {
+ fill: ${options2.mainBkg} !important;
+ stroke: ${options2.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationStart, .aggregation {
+ fill: ${options2.mainBkg} !important;
+ stroke: ${options2.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationEnd, .aggregation {
+ fill: ${options2.mainBkg} !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 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$4.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$4.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$4.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, 5], $V3 = [1, 7], $V4 = [2, 5], $V5 = [1, 15], $V6 = [1, 17], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 23], $Va = [1, 24], $Vb = [1, 37], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 32], $Vi = [1, 33], $Vj = [1, 34], $Vk = [1, 35], $Vl = [1, 36], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 38], $Vr = [1, 45], $Vs = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], $Vt = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], $Vu = [1, 4, 5, 7, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], $Vv = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "SPACE": 4, "NL": 5, "directive": 6, "SD": 7, "document": 8, "line": 9, "statement": 10, "classDefStatement": 11, "cssClassStatement": 12, "idStatement": 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": 29, "notePosition": 30, "NOTE_TEXT": 31, "direction": 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, "openDirective": 45, "typeDirective": 46, "closeDirective": 47, ":": 48, "argDirective": 49, "direction_tb": 50, "direction_bt": 51, "direction_rl": 52, "direction_lr": 53, "eol": 54, ";": 55, "EDGE_STATE": 56, "STYLE_SEPARATOR": 57, "left_of": 58, "right_of": 59, "open_directive": 60, "type_directive": 61, "arg_directive": 62, "close_directive": 63, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 4: "SPACE", 5: "NL", 7: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "classDef", 39: "CLASSDEF_ID", 40: "CLASSDEF_STYLEOPTS", 41: "DEFAULT", 42: "class", 43: "CLASSENTITY_IDS", 44: "STYLECLASS", 48: ":", 50: "direction_tb", 51: "direction_bt", 52: "direction_rl", 53: "direction_lr", 55: ";", 56: "EDGE_STATE", 57: "STYLE_SEPARATOR", 58: "left_of", 59: "right_of", 60: "open_directive", 61: "type_directive", 62: "arg_directive", 63: "close_directive" },
+ productions_: [0, [3, 2], [3, 2], [3, 2], [3, 2], [8, 0], [8, 2], [9, 2], [9, 1], [9, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 3], [10, 4], [10, 1], [10, 2], [10, 1], [10, 4], [10, 3], [10, 6], [10, 1], [10, 1], [10, 1], [10, 1], [10, 4], [10, 4], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [11, 3], [11, 3], [12, 3], [6, 3], [6, 5], [32, 1], [32, 1], [32, 1], [32, 1], [54, 1], [54, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1], [45, 1], [46, 1], [49, 1], [47, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 4:
+ yy.setRootDoc($$[$0]);
+ return $$[$0];
+ case 5:
+ this.$ = [];
+ break;
+ case 6:
+ if ($$[$0] != "nl") {
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ }
+ break;
+ case 7:
+ case 8:
+ this.$ = $$[$0];
+ break;
+ case 9:
+ this.$ = "nl";
+ break;
+ case 12:
+ this.$ = $$[$0];
+ break;
+ case 13:
+ const stateStmt = $$[$0 - 1];
+ stateStmt.description = yy.trimColon($$[$0]);
+ this.$ = stateStmt;
+ break;
+ case 14:
+ this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] };
+ break;
+ case 15:
+ const relDescription = yy.trimColon($$[$0]);
+ this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription };
+ break;
+ case 19:
+ this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] };
+ break;
+ case 20:
+ var id2 = $$[$0];
+ var description2 = $$[$0 - 2].trim();
+ if ($$[$0].match(":")) {
+ var parts = $$[$0].split(":");
+ id2 = parts[0];
+ description2 = [description2, parts[1]];
+ }
+ this.$ = { stmt: "state", id: id2, type: "default", description: description2 };
+ break;
+ case 21:
+ this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] };
+ break;
+ case 22:
+ this.$ = { stmt: "state", id: $$[$0], type: "fork" };
+ break;
+ case 23:
+ this.$ = { stmt: "state", id: $$[$0], type: "join" };
+ break;
+ case 24:
+ this.$ = { stmt: "state", id: $$[$0], type: "choice" };
+ break;
+ case 25:
+ this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" };
+ break;
+ case 26:
+ this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } };
+ break;
+ case 30:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 31:
+ case 32:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 33:
+ case 34:
+ this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() };
+ break;
+ case 35:
+ this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() };
+ break;
+ case 38:
+ yy.setDirection("TB");
+ this.$ = { stmt: "dir", value: "TB" };
+ break;
+ case 39:
+ yy.setDirection("BT");
+ this.$ = { stmt: "dir", value: "BT" };
+ break;
+ case 40:
+ yy.setDirection("RL");
+ this.$ = { stmt: "dir", value: "RL" };
+ break;
+ case 41:
+ yy.setDirection("LR");
+ this.$ = { stmt: "dir", value: "LR" };
+ break;
+ case 44:
+ case 45:
+ this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" };
+ break;
+ case 46:
+ this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" };
+ break;
+ case 47:
+ this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" };
+ break;
+ case 50:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 51:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 52:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 53:
+ yy.parseDirective("}%%", "close_directive", "state");
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: $V0, 5: $V1, 6: 4, 7: $V2, 45: 6, 60: $V3 }, { 1: [3] }, { 3: 8, 4: $V0, 5: $V1, 6: 4, 7: $V2, 45: 6, 60: $V3 }, { 3: 9, 4: $V0, 5: $V1, 6: 4, 7: $V2, 45: 6, 60: $V3 }, { 3: 10, 4: $V0, 5: $V1, 6: 4, 7: $V2, 45: 6, 60: $V3 }, o([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 50, 51, 52, 53, 56, 60], $V4, { 8: 11 }), { 46: 12, 61: [1, 13] }, { 61: [2, 50] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, { 1: [2, 4], 4: $V5, 5: $V6, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: $V7, 17: $V8, 19: $V9, 22: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 29: $Vg, 32: 31, 33: $Vh, 35: $Vi, 37: $Vj, 38: $Vk, 42: $Vl, 45: 6, 50: $Vm, 51: $Vn, 52: $Vo, 53: $Vp, 56: $Vq, 60: $V3 }, { 47: 43, 48: [1, 44], 63: $Vr }, o([48, 63], [2, 51]), o($Vs, [2, 6]), { 6: 30, 10: 46, 11: 18, 12: 19, 13: 20, 16: $V7, 17: $V8, 19: $V9, 22: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 29: $Vg, 32: 31, 33: $Vh, 35: $Vi, 37: $Vj, 38: $Vk, 42: $Vl, 45: 6, 50: $Vm, 51: $Vn, 52: $Vo, 53: $Vp, 56: $Vq, 60: $V3 }, o($Vs, [2, 8]), o($Vs, [2, 9]), o($Vs, [2, 10]), o($Vs, [2, 11]), o($Vs, [2, 12], { 14: [1, 47], 15: [1, 48] }), o($Vs, [2, 16]), { 18: [1, 49] }, o($Vs, [2, 18], { 20: [1, 50] }), { 23: [1, 51] }, o($Vs, [2, 22]), o($Vs, [2, 23]), o($Vs, [2, 24]), o($Vs, [2, 25]), { 30: 52, 31: [1, 53], 58: [1, 54], 59: [1, 55] }, o($Vs, [2, 28]), o($Vs, [2, 29]), { 34: [1, 56] }, { 36: [1, 57] }, o($Vs, [2, 32]), { 39: [1, 58], 41: [1, 59] }, { 43: [1, 60] }, o($Vt, [2, 44], { 57: [1, 61] }), o($Vt, [2, 45], { 57: [1, 62] }), o($Vs, [2, 38]), o($Vs, [2, 39]), o($Vs, [2, 40]), o($Vs, [2, 41]), o($Vu, [2, 36]), { 49: 63, 62: [1, 64] }, o($Vu, [2, 53]), o($Vs, [2, 7]), o($Vs, [2, 13]), { 13: 65, 24: $Vb, 56: $Vq }, o($Vs, [2, 17]), o($Vv, $V4, { 8: 66 }), { 24: [1, 67] }, { 24: [1, 68] }, { 23: [1, 69] }, { 24: [2, 48] }, { 24: [2, 49] }, o($Vs, [2, 30]), o($Vs, [2, 31]), { 40: [1, 70] }, { 40: [1, 71] }, { 44: [1, 72] }, { 24: [1, 73] }, { 24: [1, 74] }, { 47: 75, 63: $Vr }, { 63: [2, 52] }, o($Vs, [2, 14], { 14: [1, 76] }), { 4: $V5, 5: $V6, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: $V7, 17: $V8, 19: $V9, 21: [1, 77], 22: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 29: $Vg, 32: 31, 33: $Vh, 35: $Vi, 37: $Vj, 38: $Vk, 42: $Vl, 45: 6, 50: $Vm, 51: $Vn, 52: $Vo, 53: $Vp, 56: $Vq, 60: $V3 }, o($Vs, [2, 20], { 20: [1, 78] }), { 31: [1, 79] }, { 24: [1, 80] }, o($Vs, [2, 33]), o($Vs, [2, 34]), o($Vs, [2, 35]), o($Vt, [2, 46]), o($Vt, [2, 47]), o($Vu, [2, 37]), o($Vs, [2, 15]), o($Vs, [2, 19]), o($Vv, $V4, { 8: 81 }), o($Vs, [2, 26]), o($Vs, [2, 27]), { 4: $V5, 5: $V6, 6: 30, 9: 14, 10: 16, 11: 18, 12: 19, 13: 20, 16: $V7, 17: $V8, 19: $V9, 21: [1, 82], 22: $Va, 24: $Vb, 25: $Vc, 26: $Vd, 27: $Ve, 28: $Vf, 29: $Vg, 32: 31, 33: $Vh, 35: $Vi, 37: $Vj, 38: $Vk, 42: $Vl, 45: 6, 50: $Vm, 51: $Vn, 52: $Vo, 53: $Vp, 56: $Vq, 60: $V3 }, o($Vs, [2, 21])],
+ defaultActions: { 7: [2, 50], 8: [2, 1], 9: [2, 2], 10: [2, 3], 54: [2, 48], 55: [2, 49], 64: [2, 52] },
+ 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 41;
+ case 1:
+ return 50;
+ case 2:
+ return 51;
+ case 3:
+ return 52;
+ case 4:
+ return 53;
+ case 5:
+ this.begin("open_directive");
+ return 60;
+ case 6:
+ this.begin("type_directive");
+ return 61;
+ case 7:
+ this.popState();
+ this.begin("arg_directive");
+ return 48;
+ case 8:
+ this.popState();
+ this.popState();
+ return 63;
+ case 9:
+ return 62;
+ case 10:
+ break;
+ case 11:
+ break;
+ case 12:
+ return 5;
+ case 13:
+ break;
+ case 14:
+ break;
+ case 15:
+ break;
+ case 16:
+ break;
+ case 17:
+ this.pushState("SCALE");
+ return 17;
+ case 18:
+ return 18;
+ case 19:
+ this.popState();
+ break;
+ case 20:
+ this.begin("acc_title");
+ return 33;
+ case 21:
+ this.popState();
+ return "acc_title_value";
+ case 22:
+ this.begin("acc_descr");
+ return 35;
+ case 23:
+ this.popState();
+ return "acc_descr_value";
+ case 24:
+ this.begin("acc_descr_multiline");
+ break;
+ case 25:
+ this.popState();
+ break;
+ case 26:
+ return "acc_descr_multiline_value";
+ case 27:
+ this.pushState("CLASSDEF");
+ return 38;
+ case 28:
+ this.popState();
+ this.pushState("CLASSDEFID");
+ return "DEFAULT_CLASSDEF_ID";
+ case 29:
+ this.popState();
+ this.pushState("CLASSDEFID");
+ return 39;
+ case 30:
+ this.popState();
+ return 40;
+ case 31:
+ this.pushState("CLASS");
+ return 42;
+ case 32:
+ this.popState();
+ this.pushState("CLASS_STYLE");
+ return 43;
+ case 33:
+ this.popState();
+ return 44;
+ case 34:
+ this.pushState("SCALE");
+ return 17;
+ case 35:
+ return 18;
+ case 36:
+ this.popState();
+ break;
+ case 37:
+ this.pushState("STATE");
+ break;
+ case 38:
+ this.popState();
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
+ return 25;
+ case 39:
+ this.popState();
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
+ return 26;
+ case 40:
+ this.popState();
+ yy_.yytext = yy_.yytext.slice(0, -10).trim();
+ return 27;
+ case 41:
+ this.popState();
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
+ return 25;
+ case 42:
+ this.popState();
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
+ return 26;
+ case 43:
+ this.popState();
+ yy_.yytext = yy_.yytext.slice(0, -10).trim();
+ return 27;
+ case 44:
+ return 50;
+ case 45:
+ return 51;
+ case 46:
+ return 52;
+ case 47:
+ return 53;
+ case 48:
+ this.pushState("STATE_STRING");
+ break;
+ case 49:
+ this.pushState("STATE_ID");
+ return "AS";
+ case 50:
+ this.popState();
+ return "ID";
+ case 51:
+ this.popState();
+ break;
+ case 52:
+ return "STATE_DESCR";
+ case 53:
+ return 19;
+ case 54:
+ this.popState();
+ break;
+ case 55:
+ this.popState();
+ this.pushState("struct");
+ return 20;
+ case 56:
+ break;
+ case 57:
+ this.popState();
+ return 21;
+ case 58:
+ break;
+ case 59:
+ this.begin("NOTE");
+ return 29;
+ case 60:
+ this.popState();
+ this.pushState("NOTE_ID");
+ return 58;
+ case 61:
+ this.popState();
+ this.pushState("NOTE_ID");
+ return 59;
+ case 62:
+ this.popState();
+ this.pushState("FLOATING_NOTE");
+ break;
+ case 63:
+ this.popState();
+ this.pushState("FLOATING_NOTE_ID");
+ return "AS";
+ case 64:
+ break;
+ case 65:
+ return "NOTE_TEXT";
+ case 66:
+ this.popState();
+ return "ID";
+ case 67:
+ this.popState();
+ this.pushState("NOTE_TEXT");
+ return 24;
+ case 68:
+ this.popState();
+ yy_.yytext = yy_.yytext.substr(2).trim();
+ return 31;
+ case 69:
+ this.popState();
+ yy_.yytext = yy_.yytext.slice(0, -8).trim();
+ return 31;
+ case 70:
+ return 7;
+ case 71:
+ return 7;
+ case 72:
+ return 16;
+ case 73:
+ return 56;
+ case 74:
+ return 24;
+ case 75:
+ yy_.yytext = yy_.yytext.trim();
+ return 14;
+ case 76:
+ return 15;
+ case 77:
+ return 28;
+ case 78:
+ return 57;
+ case 79:
+ return 5;
+ case 80:
+ 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, /^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\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": [14, 15], "inclusive": false }, "close_directive": { "rules": [14, 15], "inclusive": false }, "arg_directive": { "rules": [8, 9, 14, 15], "inclusive": false }, "type_directive": { "rules": [7, 8, 14, 15], "inclusive": false }, "open_directive": { "rules": [6, 14, 15], "inclusive": false }, "struct": { "rules": [14, 15, 27, 31, 37, 44, 45, 46, 47, 56, 57, 58, 59, 73, 74, 75, 76, 77], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [66], "inclusive": false }, "FLOATING_NOTE": { "rules": [63, 64, 65], "inclusive": false }, "NOTE_TEXT": { "rules": [68, 69], "inclusive": false }, "NOTE_ID": { "rules": [67], "inclusive": false }, "NOTE": { "rules": [60, 61, 62], "inclusive": false }, "CLASS_STYLE": { "rules": [33], "inclusive": false }, "CLASS": { "rules": [32], "inclusive": false }, "CLASSDEFID": { "rules": [30], "inclusive": false }, "CLASSDEF": { "rules": [28, 29], "inclusive": false }, "acc_descr_multiline": { "rules": [25, 26], "inclusive": false }, "acc_descr": { "rules": [23], "inclusive": false }, "acc_title": { "rules": [21], "inclusive": false }, "SCALE": { "rules": [18, 19, 35, 36], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [50], "inclusive": false }, "STATE_STRING": { "rules": [51, 52], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [14, 15, 38, 39, 40, 41, 42, 43, 48, 49, 53, 54, 55], "inclusive": false }, "ID": { "rules": [14, 15], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 10, 11, 12, 13, 15, 16, 17, 20, 22, 24, 27, 31, 34, 37, 55, 59, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80], "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 parseDirective$2 = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ 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 = {
+ parseDirective: parseDirective$2,
+ 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 description2 = 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(description2, 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 = description2.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 = [1, 2], $V1 = [1, 5], $V2 = [6, 9, 11, 17, 18, 20, 22, 23, 24, 26], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 17], $V6 = [1, 18], $V7 = [1, 19], $V8 = [1, 20], $V9 = [1, 24], $Va = [4, 6, 9, 11, 17, 18, 20, 22, 23, 24, 26];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "journey": 4, "document": 5, "EOF": 6, "directive": 7, "line": 8, "SPACE": 9, "statement": 10, "NEWLINE": 11, "openDirective": 12, "typeDirective": 13, "closeDirective": 14, ":": 15, "argDirective": 16, "title": 17, "acc_title": 18, "acc_title_value": 19, "acc_descr": 20, "acc_descr_value": 21, "acc_descr_multiline_value": 22, "section": 23, "taskName": 24, "taskData": 25, "open_directive": 26, "type_directive": 27, "arg_directive": 28, "close_directive": 29, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 4: "journey", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 24: "taskName", 25: "taskData", 26: "open_directive", 27: "type_directive", 28: "arg_directive", 29: "close_directive" },
+ productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 2], [10, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 1:
+ return $$[$0 - 1];
+ case 3:
+ this.$ = [];
+ break;
+ case 4:
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 5:
+ case 6:
+ this.$ = $$[$0];
+ break;
+ case 7:
+ case 8:
+ this.$ = [];
+ break;
+ case 11:
+ yy.setDiagramTitle($$[$0].substr(6));
+ this.$ = $$[$0].substr(6);
+ break;
+ case 12:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 13:
+ case 14:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 15:
+ yy.addSection($$[$0].substr(8));
+ this.$ = $$[$0].substr(8);
+ break;
+ case 16:
+ yy.addTask($$[$0 - 1], $$[$0]);
+ this.$ = "task";
+ break;
+ case 18:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 19:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 20:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 21:
+ yy.parseDirective("}%%", "close_directive", "journey");
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: $V0, 7: 3, 12: 4, 26: $V1 }, { 1: [3] }, o($V2, [2, 3], { 5: 6 }), { 3: 7, 4: $V0, 7: 3, 12: 4, 26: $V1 }, { 13: 8, 27: [1, 9] }, { 27: [2, 18] }, { 6: [1, 10], 7: 21, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: $V3, 18: $V4, 20: $V5, 22: $V6, 23: $V7, 24: $V8, 26: $V1 }, { 1: [2, 2] }, { 14: 22, 15: [1, 23], 29: $V9 }, o([15, 29], [2, 19]), o($V2, [2, 8], { 1: [2, 1] }), o($V2, [2, 4]), { 7: 21, 10: 25, 12: 4, 17: $V3, 18: $V4, 20: $V5, 22: $V6, 23: $V7, 24: $V8, 26: $V1 }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 11]), { 19: [1, 26] }, { 21: [1, 27] }, o($V2, [2, 14]), o($V2, [2, 15]), { 25: [1, 28] }, o($V2, [2, 17]), { 11: [1, 29] }, { 16: 30, 28: [1, 31] }, { 11: [2, 21] }, o($V2, [2, 5]), o($V2, [2, 12]), o($V2, [2, 13]), o($V2, [2, 16]), o($Va, [2, 9]), { 14: 32, 29: $V9 }, { 29: [2, 20] }, { 11: [1, 33] }, o($Va, [2, 10])],
+ defaultActions: { 5: [2, 18], 7: [2, 2], 24: [2, 21], 31: [2, 20] },
+ 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 26;
+ case 1:
+ this.begin("type_directive");
+ return 27;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 15;
+ case 3:
+ this.popState();
+ this.popState();
+ return 29;
+ case 4:
+ return 28;
+ case 5:
+ break;
+ case 6:
+ break;
+ case 7:
+ return 11;
+ case 8:
+ break;
+ case 9:
+ break;
+ case 10:
+ return 4;
+ case 11:
+ return 17;
+ case 12:
+ this.begin("acc_title");
+ return 18;
+ case 13:
+ this.popState();
+ return "acc_title_value";
+ case 14:
+ this.begin("acc_descr");
+ return 20;
+ case 15:
+ this.popState();
+ return "acc_descr_value";
+ case 16:
+ this.begin("acc_descr_multiline");
+ break;
+ case 17:
+ this.popState();
+ break;
+ case 18:
+ return "acc_descr_multiline_value";
+ case 19:
+ return 23;
+ case 20:
+ return 24;
+ case 21:
+ return 25;
+ case 22:
+ return 15;
+ case 23:
+ return 6;
+ case 24:
+ return "INVALID";
+ }
+ },
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\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: { "open_directive": { "rules": [1], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "acc_descr_multiline": { "rules": [17, 18], "inclusive": false }, "acc_descr": { "rules": [15], "inclusive": false }, "acc_title": { "rules": [13], "inclusive": false }, "INITIAL": { "rules": [0, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 20, 21, 22, 23, 24], "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 parseDirective$1 = function(statement, context, type2) {
+ mermaidAPI.parseDirective(this, statement, context, type2);
+ };
+ 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 = {
+ parseDirective: parseDirective$1,
+ 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) {
+ 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 + "#" + diagramType + "-crossStart)");
+ break;
+ case "arrow_point":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-pointStart)");
+ break;
+ case "arrow_barb":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-barbStart)");
+ break;
+ case "arrow_circle":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-circleStart)");
+ break;
+ case "aggregation":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-aggregationStart)");
+ break;
+ case "extension":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-extensionStart)");
+ break;
+ case "composition":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-compositionStart)");
+ break;
+ case "dependency":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-dependencyStart)");
+ break;
+ case "lollipop":
+ svgPath.attr("marker-start", "url(" + url + "#" + diagramType + "-lollipopStart)");
+ break;
+ }
+ switch (edgeData.arrowTypeEnd) {
+ case "arrow_cross":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-crossEnd)");
+ break;
+ case "arrow_point":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-pointEnd)");
+ break;
+ case "arrow_barb":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-barbEnd)");
+ break;
+ case "arrow_circle":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-circleEnd)");
+ break;
+ case "aggregation":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-aggregationEnd)");
+ break;
+ case "extension":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-extensionEnd)");
+ break;
+ case "composition":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-compositionEnd)");
+ break;
+ case "dependency":
+ svgPath.attr("marker-end", "url(" + url + "#" + diagramType + "-dependencyEnd)");
+ break;
+ case "lollipop":
+ svgPath.attr("marker-end", "url(" + url + "#" + 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) {
+ 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 curve = line$1().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);
+ };
+ 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, diagObj.arrowMarkerAbsolute);
+ 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);
+ });
+ 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 = [1, 2], $V1 = [1, 5], $V2 = [6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 17], $V6 = [1, 18], $V7 = [1, 19], $V8 = [1, 23], $V9 = [1, 24], $Va = [1, 27], $Vb = [4, 6, 9, 11, 17, 18, 20, 22, 23, 26, 27, 28];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "timeline": 4, "document": 5, "EOF": 6, "directive": 7, "line": 8, "SPACE": 9, "statement": 10, "NEWLINE": 11, "openDirective": 12, "typeDirective": 13, "closeDirective": 14, ":": 15, "argDirective": 16, "title": 17, "acc_title": 18, "acc_title_value": 19, "acc_descr": 20, "acc_descr_value": 21, "acc_descr_multiline_value": 22, "section": 23, "period_statement": 24, "event_statement": 25, "period": 26, "event": 27, "open_directive": 28, "type_directive": 29, "arg_directive": 30, "close_directive": 31, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 4: "timeline", 6: "EOF", 9: "SPACE", 11: "NEWLINE", 15: ":", 17: "title", 18: "acc_title", 19: "acc_title_value", 20: "acc_descr", 21: "acc_descr_value", 22: "acc_descr_multiline_value", 23: "section", 26: "period", 27: "event", 28: "open_directive", 29: "type_directive", 30: "arg_directive", 31: "close_directive" },
+ productions_: [0, [3, 3], [3, 2], [5, 0], [5, 2], [8, 2], [8, 1], [8, 1], [8, 1], [7, 4], [7, 6], [10, 1], [10, 2], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [24, 1], [25, 1], [12, 1], [13, 1], [16, 1], [14, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 1:
+ return $$[$0 - 1];
+ case 3:
+ this.$ = [];
+ break;
+ case 4:
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 5:
+ case 6:
+ this.$ = $$[$0];
+ break;
+ case 7:
+ case 8:
+ this.$ = [];
+ break;
+ case 11:
+ yy.getCommonDb().setDiagramTitle($$[$0].substr(6));
+ this.$ = $$[$0].substr(6);
+ break;
+ case 12:
+ this.$ = $$[$0].trim();
+ yy.getCommonDb().setAccTitle(this.$);
+ break;
+ case 13:
+ case 14:
+ this.$ = $$[$0].trim();
+ yy.getCommonDb().setAccDescription(this.$);
+ break;
+ case 15:
+ yy.addSection($$[$0].substr(8));
+ this.$ = $$[$0].substr(8);
+ break;
+ case 19:
+ yy.addTask($$[$0], 0, "");
+ this.$ = $$[$0];
+ break;
+ case 20:
+ yy.addEvent($$[$0].substr(2));
+ this.$ = $$[$0];
+ break;
+ case 21:
+ yy.parseDirective("%%{", "open_directive");
+ break;
+ case 22:
+ yy.parseDirective($$[$0], "type_directive");
+ break;
+ case 23:
+ $$[$0] = $$[$0].trim().replace(/'/g, '"');
+ yy.parseDirective($$[$0], "arg_directive");
+ break;
+ case 24:
+ yy.parseDirective("}%%", "close_directive", "timeline");
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: $V0, 7: 3, 12: 4, 28: $V1 }, { 1: [3] }, o($V2, [2, 3], { 5: 6 }), { 3: 7, 4: $V0, 7: 3, 12: 4, 28: $V1 }, { 13: 8, 29: [1, 9] }, { 29: [2, 21] }, { 6: [1, 10], 7: 22, 8: 11, 9: [1, 12], 10: 13, 11: [1, 14], 12: 4, 17: $V3, 18: $V4, 20: $V5, 22: $V6, 23: $V7, 24: 20, 25: 21, 26: $V8, 27: $V9, 28: $V1 }, { 1: [2, 2] }, { 14: 25, 15: [1, 26], 31: $Va }, o([15, 31], [2, 22]), o($V2, [2, 8], { 1: [2, 1] }), o($V2, [2, 4]), { 7: 22, 10: 28, 12: 4, 17: $V3, 18: $V4, 20: $V5, 22: $V6, 23: $V7, 24: 20, 25: 21, 26: $V8, 27: $V9, 28: $V1 }, o($V2, [2, 6]), o($V2, [2, 7]), o($V2, [2, 11]), { 19: [1, 29] }, { 21: [1, 30] }, o($V2, [2, 14]), o($V2, [2, 15]), o($V2, [2, 16]), o($V2, [2, 17]), o($V2, [2, 18]), o($V2, [2, 19]), o($V2, [2, 20]), { 11: [1, 31] }, { 16: 32, 30: [1, 33] }, { 11: [2, 24] }, o($V2, [2, 5]), o($V2, [2, 12]), o($V2, [2, 13]), o($Vb, [2, 9]), { 14: 34, 31: $Va }, { 31: [2, 23] }, { 11: [1, 35] }, o($Vb, [2, 10])],
+ defaultActions: { 5: [2, 21], 7: [2, 2], 27: [2, 24], 33: [2, 23] },
+ 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 28;
+ case 1:
+ this.begin("type_directive");
+ return 29;
+ case 2:
+ this.popState();
+ this.begin("arg_directive");
+ return 15;
+ case 3:
+ this.popState();
+ this.popState();
+ return 31;
+ case 4:
+ return 30;
+ case 5:
+ break;
+ case 6:
+ break;
+ case 7:
+ return 11;
+ case 8:
+ break;
+ case 9:
+ break;
+ case 10:
+ return 4;
+ case 11:
+ return 17;
+ case 12:
+ this.begin("acc_title");
+ return 18;
+ case 13:
+ this.popState();
+ return "acc_title_value";
+ case 14:
+ this.begin("acc_descr");
+ return 20;
+ case 15:
+ this.popState();
+ return "acc_descr_value";
+ case 16:
+ this.begin("acc_descr_multiline");
+ break;
+ case 17:
+ this.popState();
+ break;
+ case 18:
+ return "acc_descr_multiline_value";
+ case 19:
+ return 23;
+ case 20:
+ return 27;
+ case 21:
+ return 26;
+ case 22:
+ return 6;
+ case 23:
+ return "INVALID";
+ }
+ },
+ rules: [/^(?:%%\{)/i, /^(?:((?:(?!\}%%)[^:.])*))/i, /^(?::)/i, /^(?:\}%%)/i, /^(?:((?:(?!\}%%).|\n)*))/i, /^(?:%(?!\{)[^\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: { "open_directive": { "rules": [1], "inclusive": false }, "type_directive": { "rules": [2, 3], "inclusive": false }, "arg_directive": { "rules": [3, 4], "inclusive": false }, "acc_descr_multiline": { "rules": [17, 18], "inclusive": false }, "acc_descr": { "rules": [15], "inclusive": false }, "acc_title": { "rules": [13], "inclusive": false }, "INITIAL": { "rules": [0, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 19, 20, 21, 22, 23], "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$1;
+ const parseDirective = (statement, context, type2) => {
+ parseDirective$e(globalThis, statement, context, type2);
+ };
+ 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,
+ parseDirective
+ };
+ const db$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
+ __proto__: null,
+ addEvent,
+ addSection,
+ addTask,
+ addTaskOrg,
+ clear: clear$2,
+ default: timelineDb,
+ getCommonDb,
+ getSections,
+ getTasks,
+ parseDirective
+ }, 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 description2 = node2.descr.replace(/(
)/g, "\n");
+ createText(textElem, description2, {
+ 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/layouts/docs/single.html b/layouts/docs/single.html
index 45a86e50..fedd41bd 100644
--- a/layouts/docs/single.html
+++ b/layouts/docs/single.html
@@ -10,8 +10,12 @@
{{ end -}}
{{ if .Page.Store.Get "hasMermaid" }}
-
+