From 1076a42d52cedf8c4b183e481c0bed503aaf03a7 Mon Sep 17 00:00:00 2001 From: Freymaurer Date: Fri, 28 Jul 2023 07:52:20 +0000 Subject: [PATCH] =?UTF-8?q?Update=20@nfdi4plants/web-components=20&=20Nfdi?= =?UTF-8?q?4Plants.Fornax=20=E2=AC=86=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 14 +- package.json | 2 +- src/js/bundle.js | 2799 ++++++++++++++++++++++++++++++++------------- 3 files changed, 2030 insertions(+), 785 deletions(-) diff --git a/package-lock.json b/package-lock.json index 948f00f80..05dbd7ca5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "license": "ISC", "dependencies": { - "@nfdi4plants/web-components": "^1.1.0", + "@nfdi4plants/web-components": "^1.0.2", "bulma": "^0.9.2" }, "devDependencies": { @@ -40,9 +40,9 @@ "integrity": "sha512-ukelZ49tzUqgOAEbVujl/U62JNK3wdn5kKtXVqrjKND4QvHACZOMOYaZI6/5Jd8vsg+Fq9HDwiib70FBLydOiQ==" }, "node_modules/@nfdi4plants/web-components": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@nfdi4plants/web-components/-/web-components-1.1.0.tgz", - "integrity": "sha512-CBRcc4X4zp6m8CGzIcY0zqxWFaOLaQu1FKuEOCn9WNLwLnbWP67I1W2rx3ePzKj4C+FigwAQfsTAFEQ3Q+uR/g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@nfdi4plants/web-components/-/web-components-1.0.2.tgz", + "integrity": "sha512-LIYxL7fHhbBkJUKU8GDsBabiFKUHiNzLXl1UP1m7aFJ9D6BUKBbYYgsxU/xYdcq5D4AGKov/Zl/HMgNeTzwHnw==", "dependencies": { "lit": "^2.0.2", "mermaid": "^10.1.0", @@ -1011,9 +1011,9 @@ "integrity": "sha512-ukelZ49tzUqgOAEbVujl/U62JNK3wdn5kKtXVqrjKND4QvHACZOMOYaZI6/5Jd8vsg+Fq9HDwiib70FBLydOiQ==" }, "@nfdi4plants/web-components": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@nfdi4plants/web-components/-/web-components-1.1.0.tgz", - "integrity": "sha512-CBRcc4X4zp6m8CGzIcY0zqxWFaOLaQu1FKuEOCn9WNLwLnbWP67I1W2rx3ePzKj4C+FigwAQfsTAFEQ3Q+uR/g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@nfdi4plants/web-components/-/web-components-1.0.2.tgz", + "integrity": "sha512-LIYxL7fHhbBkJUKU8GDsBabiFKUHiNzLXl1UP1m7aFJ9D6BUKBbYYgsxU/xYdcq5D4AGKov/Zl/HMgNeTzwHnw==", "requires": { "lit": "^2.0.2", "mermaid": "^10.1.0", diff --git a/package.json b/package.json index eb01ee719..20f7c22a1 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "homepage": "https://github.com/Freymaurer/nfdi4plants-fornax-template#readme", "dependencies": { - "@nfdi4plants/web-components": "^1.1.0", + "@nfdi4plants/web-components": "^1.0.2", "bulma": "^0.9.2" }, "devDependencies": { diff --git a/src/js/bundle.js b/src/js/bundle.js index 04205ae2b..ca9ee08bd 100644 --- a/src/js/bundle.js +++ b/src/js/bundle.js @@ -72,25 +72,6 @@ const t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},e * SPDX-License-Identifier: BSD-3-Clause */class e extends i$1{constructor(i){if(super(i),this.it=w$1,i.type!==t.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===w$1||null==r)return this.ft=void 0,this.it=r;if(r===b)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this.ft;this.it=r;const s=[r];return s.raw=s,this.ft={_$litType$:this.constructor.resultType,strings:s,values:[]}}}e.directiveName="unsafeHTML",e.resultType=1;const o=e$1(e); -var __defProp$2 = Object.defineProperty; -var __defProps$1 = Object.defineProperties; -var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols; -var __hasOwnProp$2 = Object.prototype.hasOwnProperty; -var __propIsEnum$2 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$2 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$2.call(b, prop)) - __defNormalProp$2(a, prop, b[prop]); - if (__getOwnPropSymbols$2) - for (var prop of __getOwnPropSymbols$2(b)) { - if (__propIsEnum$2.call(b, prop)) - __defNormalProp$2(a, prop, b[prop]); - } - return a; -}; -var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b)); const nfdiMint = r$2`#1FC2A7`; const nfdiMintLighter20 = r$2`#4cceb9`; const nfdiMintDarker20 = r$2`#199b86`; @@ -10830,6 +10811,7 @@ const knowledgeBaseUrl = "https://nfdi4plants.org/nfdi4plants.knowledgebase/"; const gitlabBaseUrl = "https://git.nfdi4plants.org/"; const gitlabBioDatenUrl = "https://gitlab.nfdi4plants.de/"; const dataPLANGeneratorUrl = "https://dmpg.nfdi4plants.org"; +const arcsearchUrl = "https://arcregistry.nfdi4plants.org/arcsearch"; var __defProp$8 = Object.defineProperty; var __getOwnPropDesc$8 = Object.getOwnPropertyDescriptor; var __decorateClass$8 = (decorators, target, key, kind) => { @@ -10901,7 +10883,7 @@ let Navbar = class extends s$1 { @@ -11102,6 +11088,13 @@ let Footer = class extends s$1 {
+
  • + + ARC Search + +
  • +
    +
  • DataPLAN @@ -11637,7 +11630,11 @@ function createInPageId(innerHtml) { } let H1 = class extends s$1 { render() { - return headerTemplate(i$2("h1"), toInDOMHref(this.textId), this.text); + return headerTemplate( + i$2("h1"), + toInDOMHref(this.textId), + this.text + ); } connectedCallback() { super.connectedCallback(); @@ -11665,7 +11662,11 @@ H1 = __decorateClass$3([ ], H1); let H2 = class extends s$1 { render() { - return headerTemplate(i$2("h2"), toInDOMHref(this.textId), this.text); + return headerTemplate( + i$2("h2"), + toInDOMHref(this.textId), + this.text + ); } connectedCallback() { super.connectedCallback(); @@ -11693,7 +11694,11 @@ H2 = __decorateClass$3([ ], H2); let H3 = class extends s$1 { render() { - return headerTemplate(i$2("h3"), toInDOMHref(this.textId), this.text); + return headerTemplate( + i$2("h3"), + toInDOMHref(this.textId), + this.text + ); } connectedCallback() { super.connectedCallback(); @@ -11721,7 +11726,11 @@ H3 = __decorateClass$3([ ], H3); let H4 = class extends s$1 { render() { - return headerTemplate(i$2("h4"), toInDOMHref(this.textId), this.text); + return headerTemplate( + i$2("h4"), + toInDOMHref(this.textId), + this.text + ); } connectedCallback() { super.connectedCallback(); @@ -11749,7 +11758,11 @@ H4 = __decorateClass$3([ ], H4); let H5 = class extends s$1 { render() { - return headerTemplate(i$2("h5"), toInDOMHref(this.textId), this.text); + return headerTemplate( + i$2("h5"), + toInDOMHref(this.textId), + this.text + ); } connectedCallback() { super.connectedCallback(); @@ -11777,7 +11790,11 @@ H5 = __decorateClass$3([ ], H5); let H6 = class extends s$1 { render() { - return headerTemplate(i$2("h6"), toInDOMHref(this.textId), this.text); + return headerTemplate( + i$2("h6"), + toInDOMHref(this.textId), + this.text + ); } connectedCallback() { super.connectedCallback(); @@ -11964,17 +11981,25 @@ function isLight$2(color2) { b = color2[3]; } else if (typeof c != "undefined") { color2 = c; - color2 = +("0x" + color2.slice(1).replace(color2.length < 5 && /./g, "$&$&")); + color2 = +("0x" + color2.slice(1).replace( + color2.length < 5 && /./g, + "$&$&" + )); r = color2 >> 16; g = color2 >> 8 & 255; b = color2 & 255; } else { - color2 = +("0x" + color2.slice(1).replace(color2.length < 5 && /./g, "$&$&")); + color2 = +("0x" + color2.slice(1).replace( + color2.length < 5 && /./g, + "$&$&" + )); r = color2 >> 16; g = color2 >> 8 & 255; b = color2 & 255; } - hsp = Math.sqrt(0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b)); + hsp = Math.sqrt( + 0.299 * (r * r) + 0.587 * (g * g) + 0.114 * (b * b) + ); if (hsp > 127.5) { return true; } else { @@ -12650,7 +12675,10 @@ var prism = { exports: {} }; Object.defineProperty(Prism2.languages.markup.tag, "addAttribute", { value: function(attrName, lang2) { Prism2.languages.markup.tag.inside["special-attr"].push({ - pattern: RegExp(/(^|["'\s])/.source + "(?:" + attrName + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, "i"), + pattern: RegExp( + /(^|["'\s])/.source + "(?:" + attrName + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, + "i" + ), lookbehind: true, inside: { "attr-name": /^[^\s=]+/, @@ -12791,7 +12819,9 @@ var prism = { exports: {} }; ], "function": /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, "number": { - pattern: RegExp(/(^|[^\w$])/.source + "(?:" + (/NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source), + pattern: RegExp( + /(^|[^\w$])/.source + "(?:" + (/NaN|Infinity/.source + "|" + /0[bB][01]+(?:_[01]+)*n?/.source + "|" + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + "|" + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + "|" + /\d+(?:_\d+)*n/.source + "|" + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source) + ")" + /(?![\w$])/.source + ), lookbehind: true }, "operator": /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ @@ -12799,7 +12829,9 @@ var prism = { exports: {} }; Prism2.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/; Prism2.languages.insertBefore("javascript", "keyword", { "regex": { - pattern: RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source), + pattern: RegExp( + /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source + /\//.source + "(?:" + /(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source + "|" + /(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source + ")" + /(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source + ), lookbehind: true, greedy: true, inside: { @@ -12885,7 +12917,10 @@ var prism = { exports: {} }; }); if (Prism2.languages.markup) { Prism2.languages.markup.tag.addInlined("script", "javascript"); - Prism2.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, "javascript"); + Prism2.languages.markup.tag.addAttribute( + /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, + "javascript" + ); } Prism2.languages.js = Prism2.languages.javascript; (function() { @@ -12972,32 +13007,36 @@ var prism = { exports: {} }; if (autoloader) { autoloader.loadLanguages(language); } - loadFile(src, function(text2) { - pre.setAttribute(STATUS_ATTR, STATUS_LOADED); - var range = parseRange(pre.getAttribute("data-range")); - if (range) { - var lines = text2.split(/\r\n?|\n/g); - var start2 = range[0]; - var end = range[1] == null ? lines.length : range[1]; - if (start2 < 0) { - start2 += lines.length; - } - start2 = Math.max(0, Math.min(start2 - 1, lines.length)); - if (end < 0) { - end += lines.length; - } - end = Math.max(0, Math.min(end, lines.length)); - text2 = lines.slice(start2, end).join("\n"); - if (!pre.hasAttribute("data-start")) { - pre.setAttribute("data-start", String(start2 + 1)); - } - } - code.textContent = text2; - Prism2.highlightElement(code); - }, function(error) { - pre.setAttribute(STATUS_ATTR, STATUS_FAILED); - code.textContent = error; - }); + loadFile( + src, + function(text2) { + pre.setAttribute(STATUS_ATTR, STATUS_LOADED); + var range = parseRange(pre.getAttribute("data-range")); + if (range) { + var lines = text2.split(/\r\n?|\n/g); + var start2 = range[0]; + var end = range[1] == null ? lines.length : range[1]; + if (start2 < 0) { + start2 += lines.length; + } + start2 = Math.max(0, Math.min(start2 - 1, lines.length)); + if (end < 0) { + end += lines.length; + } + end = Math.max(0, Math.min(end, lines.length)); + text2 = lines.slice(start2, end).join("\n"); + if (!pre.hasAttribute("data-start")) { + pre.setAttribute("data-start", String(start2 + 1)); + } + } + code.textContent = text2; + Prism2.highlightElement(code); + }, + function(error) { + pre.setAttribute(STATUS_ATTR, STATUS_FAILED); + code.textContent = error; + } + ); } }); Prism2.plugins.fileHighlight = { @@ -13028,7 +13067,11 @@ var prism = { exports: {} }; }, "builtin": /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/ }); - Prism2.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/, /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, /\btype\b(?=\s*(?:[\{*]|$))/); + Prism2.languages.typescript.keyword.push( + /\b(?:abstract|declare|is|keyof|readonly|require)\b/, + /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, + /\btype\b(?=\s*(?:[\{*]|$))/ + ); delete Prism2.languages.typescript["parameter"]; delete Prism2.languages.typescript["literal-property"]; var typeInside = Prism2.languages.extend("typescript", {}); @@ -13777,7 +13820,10 @@ Prism.languages.insertBefore("fsharp", "string", { } }, "type-list": { - pattern: re(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source, [typeDeclarationKeywords, genericName, name, typeExpression, keywords.source, nestedRound, /\bnew\s*\(\s*\)/.source]), + pattern: re( + /\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source, + [typeDeclarationKeywords, genericName, name, typeExpression, keywords.source, nestedRound, /\bnew\s*\(\s*\)/.source] + ), lookbehind: true, inside: { "record-arguments": { @@ -14087,10 +14133,10 @@ function dedent(templ) { /*! @license DOMPurify 2.4.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.5/LICENSE */ function _typeof(obj) { "@babel/helpers - typeof"; - return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) { + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { return typeof obj2; } : function(obj2) { - return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; }, _typeof(obj); } function _setPrototypeOf(o, p) { @@ -14281,9 +14327,13 @@ var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm); var TMPLIT_EXPR = seal(/\${[\w\W]*}/gm); var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]/); var ARIA_ATTR = seal(/^aria-[\-\w]+$/); -var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i); +var IS_ALLOWED_URI = seal( + /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i +); var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i); -var ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g); +var ATTR_WHITESPACE = seal( + /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g +); var DOCTYPE_NAME = seal(/^html$/i); var getGlobal = function getGlobal2() { return typeof window === "undefined" ? null : window; @@ -14428,8 +14478,16 @@ function createDOMPurify() { 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), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES; - DATA_URI_TAGS = "ADD_DATA_URI_TAGS" in cfg ? addToSet(clone$2(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS; + URI_SAFE_ATTRIBUTES = "ADD_URI_SAFE_ATTR" in cfg ? addToSet( + clone$2(DEFAULT_URI_SAFE_ATTRIBUTES), + cfg.ADD_URI_SAFE_ATTR, + transformCaseFunc + ) : DEFAULT_URI_SAFE_ATTRIBUTES; + DATA_URI_TAGS = "ADD_DATA_URI_TAGS" in cfg ? addToSet( + clone$2(DEFAULT_DATA_URI_TAGS), + cfg.ADD_DATA_URI_TAGS, + transformCaseFunc + ) : 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) : {}; @@ -14655,7 +14713,13 @@ function createDOMPurify() { return WHOLE_DOCUMENT ? doc.documentElement : body; }; var _createIterator = function _createIterator2(root2) { - return createNodeIterator.call(root2.ownerDocument || root2, root2, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false); + return createNodeIterator.call( + root2.ownerDocument || root2, + root2, + NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, + null, + false + ); }; var _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"); @@ -15038,7 +15102,7 @@ var dayjs_min = { exports: {} }; }, p: function(t2) { return { M: f, y: c, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: h }[t2] || String(t2 || "").toLowerCase().replace(/s$/, ""); }, u: function(t2) { - return t2 === void 0; + return void 0 === t2; } }, g = "en", D = {}; D[g] = M; var p = function(t2) { @@ -15047,7 +15111,7 @@ var dayjs_min = { exports: {} }; var i2; if (!e2) return g; - if (typeof e2 == "string") { + if ("string" == typeof e2) { var s2 = e2.toLowerCase(); D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2); var u2 = e2.split("-"); @@ -15061,7 +15125,7 @@ var dayjs_min = { exports: {} }; }, w = function(t2, e2) { if (p(t2)) return t2.clone(); - var n2 = typeof e2 == "object" ? e2 : {}; + var n2 = "object" == typeof e2 ? e2 : {}; return n2.date = t2, n2.args = arguments, new _2(n2); }, O = v; O.l = S, O.i = p, O.w = function(t2, e2) { @@ -15075,13 +15139,13 @@ var dayjs_min = { exports: {} }; return m2.parse = function(t2) { this.$d = function(t3) { var e2 = t3.date, n2 = t3.utc; - if (e2 === null) + if (null === e2) return new Date(NaN); if (O.u(e2)) return new Date(); if (e2 instanceof Date) return new Date(e2); - if (typeof e2 == "string" && !/Z$/i.test(e2)) { + if ("string" == typeof e2 && !/Z$/i.test(e2)) { var r2 = e2.match($); if (r2) { var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3); @@ -15905,22 +15969,22 @@ const setLogLevel$1 = function(level = "fatal") { 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, "", format$1("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, "", format$1("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, ``, format$1("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, "", format$1("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, "", format$1("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, "", format$1("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) => { @@ -17831,7 +17895,10 @@ const updateCurrentConfig = (siteCfg, _directives) => { 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); + const themeVariables = assignWithDepth$1( + tmpConfigFromInitialize.themeVariables || {}, + sumOfDirectives.themeVariables + ); if (cfg.theme && cfg.theme in theme) { cfg.themeVariables = theme[cfg.theme].getThemeVariables(themeVariables); } @@ -18039,7 +18106,7 @@ Dispatch.prototype = dispatch.prototype = { var _2 = this._, T = parseTypenames$1(typename + "", _2), t, i = -1, n = T.length; if (arguments.length < 2) { while (++i < n) - if ((t = (typename = T[i]).type) && (t = get$1$1(_2[t], typename.name))) + if ((t = (typename = T[i]).type) && (t = get$1(_2[t], typename.name))) return t; return; } @@ -18076,7 +18143,7 @@ Dispatch.prototype = dispatch.prototype = { t[i].value.apply(that, args); } }; -function get$1$1(type2, name) { +function get$1(type2, name) { for (var i = 0, n = type2.length, c; i < n; ++i) { if ((c = type2[i]).name === name) { return c.value; @@ -18271,7 +18338,7 @@ function bindIndex(parent, group, enter, update, exit, data) { } } function bindKey(parent, group, enter, update, exit, data, key) { - var i, node2, nodeByKeyValue = new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; + var i, node2, nodeByKeyValue = /* @__PURE__ */ new Map(), groupLength = group.length, dataLength = data.length, keyValues = new Array(groupLength), keyValue; for (i = 0; i < groupLength; ++i) { if (node2 = group[i]) { keyValues[i] = keyValue = key.call(node2, node2.__data__, i, group) + ""; @@ -19154,7 +19221,12 @@ define(Hsl, hsl, extend$1(Color, { }, 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); + 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)); @@ -20258,7 +20330,14 @@ function bumpY(context) { function noop$2() { } function point$3(that, x, y) { - that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6); + that._context.bezierCurveTo( + (2 * that._x0 + that._x1) / 3, + (2 * that._y0 + that._y1) / 3, + (that._x0 + 2 * that._x1) / 3, + (that._y0 + 2 * that._y1) / 3, + (that._x0 + 4 * that._x1 + x) / 6, + (that._y0 + 4 * that._y1 + y) / 6 + ); } function Basis(context) { this._context = context; @@ -20430,7 +20509,10 @@ Bundle.prototype = { var x0 = x[0], y0 = y[0], dx = x[j] - x0, dy = y[j] - y0, i = -1, t; while (++i <= j) { t = i / j; - this._basis.point(this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)); + this._basis.point( + this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), + this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) + ); } } this._x = this._y = null; @@ -20451,7 +20533,14 @@ var curveBundle = function custom(beta) { return bundle; }(0.85); function point$2(that, x, y) { - that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2); + that._context.bezierCurveTo( + that._x1 + that._k * (that._x2 - that._x0), + that._y1 + that._k * (that._y2 - that._y0), + that._x2 + that._k * (that._x1 - x), + that._y2 + that._k * (that._y1 - y), + that._x2, + that._y2 + ); } function Cardinal(context, tension) { this._context = context; @@ -21145,7 +21234,9 @@ var reIsHostCtor = /^\[object .+?Constructor\]$/; var funcProto$2 = Function.prototype, objectProto$6$1 = Object.prototype; var funcToString$2 = funcProto$2.toString; var hasOwnProperty$5$1 = objectProto$6$1.hasOwnProperty; -var reIsNative = RegExp("^" + funcToString$2.call(hasOwnProperty$5$1).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); +var reIsNative = RegExp( + "^" + funcToString$2.call(hasOwnProperty$5$1).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" +); function baseIsNative(value) { if (!isObject$1(value) || isMasked(value)) { return false; @@ -21468,7 +21559,13 @@ function makeSnippet(mark, options) { for (i = 1; i <= options.linesBefore; i++) { if (foundLineNo - i < 0) break; - line2 = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength); + line2 = getLine( + mark.buffer, + lineStarts[foundLineNo - i], + lineEnds[foundLineNo - i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), + maxLineLength + ); result = common.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result; } line2 = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength); @@ -21477,7 +21574,13 @@ function makeSnippet(mark, options) { for (i = 1; i <= options.linesAfter; i++) { if (foundLineNo + i >= lineEnds.length) break; - line2 = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength); + line2 = getLine( + mark.buffer, + lineStarts[foundLineNo + i], + lineEnds[foundLineNo + i], + mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), + maxLineLength + ); result += common.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + "\n"; } return result.replace(/\n$/, ""); @@ -21841,7 +21944,9 @@ var int = new type("tag:yaml.org,2002:int", { hexadecimal: [16, "hex"] } }); -var YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"); +var YAML_FLOAT_PATTERN = new RegExp( + "^(?:[-+]?(?:[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; @@ -21920,8 +22025,12 @@ var json = failsafe.extend({ ] }); 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]))?))?$"); +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; @@ -22147,7 +22256,7 @@ function resolveYamlSet(data) { function constructYamlSet(data) { return data !== null ? data : {}; } -var set$3 = new type("tag:yaml.org,2002:set", { +var set = new type("tag:yaml.org,2002:set", { kind: "mapping", resolve: resolveYamlSet, construct: constructYamlSet @@ -22161,7 +22270,7 @@ var _default = core.extend({ binary, omap, pairs, - set$3 + set ] }); var _hasOwnProperty$1 = Object.prototype.hasOwnProperty; @@ -22222,13 +22331,16 @@ function fromDecimalCode(c) { return -1; } function simpleEscapeSequence(c) { - return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; + return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : ""; } function charFromCodepoint(c) { if (c <= 65535) { return String.fromCharCode(c); } - return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320); + return String.fromCharCode( + (c - 65536 >> 10) + 55296, + (c - 65536 & 1023) + 56320 + ); } var simpleEscapeCheck = new Array(256); var simpleEscapeMap = new Array(256); @@ -23468,7 +23580,9 @@ const parseDirective$1$1 = function(p, statement, context, type2) { } } } catch (error) { - log$1.error(`Error while rendering sequenceDiagram directive: ${statement} jison context: ${context}`); + log$1.error( + `Error while rendering sequenceDiagram directive: ${statement} jison context: ${context}` + ); log$1.error(error.message); } }; @@ -23502,7 +23616,12 @@ const handleDirective = function(p, directive2, type2) { log$1.warn("themeCss encountered"); break; default: - log$1.warn(`Unhandled directive: source: '%%{${directive2.type}: ${JSON.stringify(directive2.args ? directive2.args : {})}}%%`, directive2); + log$1.warn( + `Unhandled directive: source: '%%{${directive2.type}: ${JSON.stringify( + directive2.args ? directive2.args : {} + )}}%%`, + directive2 + ); break; } }; @@ -23526,7 +23645,15 @@ const registerDiagram = (id2, diagram2, detector2) => { } addStylesForDiagram(id2, diagram2.styles); if (diagram2.injectUtils) { - diagram2.injectUtils(log, setLogLevel, getConfig, sanitizeText$5, setupGraphViewbox, getCommonDb$1(), parseDirective$c); + diagram2.injectUtils( + log, + setLogLevel, + getConfig, + sanitizeText$5, + setupGraphViewbox, + getCommonDb$1(), + parseDirective$c + ); } }; const getDiagram = (name) => { @@ -23552,7 +23679,9 @@ const detectType = function(text2, config2) { return key; } } - throw new UnknownDiagramError(`No diagram type detected matching given configuration for text: ${text2}`); + 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) { @@ -23561,22 +23690,24 @@ const registerLazyLoadedDiagrams = (...diagrams2) => { }; 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) { + const results = await Promise.allSettled( + Object.entries(detectors).map(async ([key, { detector: detector2, loader: loader2 }]) => { + if (loader2) { 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; + 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`); @@ -23647,10 +23778,15 @@ const detectInit = function(text2, config2) { }; const detectDirective = function(text2, type2 = null) { try { - const commentWithoutDirectives = new RegExp(`[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).* -`, "ig"); + 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}`); + log$1.debug( + `Detecting diagram directive${type2 !== null ? " type:" + type2 : ""} based on the text:${text2}` + ); let match; const result = []; while ((match = directive.exec(text2)) !== null) { @@ -23668,8 +23804,10 @@ const detectDirective = function(text2, type2 = 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}`); + log$1.error( + `ERROR: ${error.message} - Unable to parse directive + ${type2 !== null ? " type:" + type2 : ""} based on the text:${text2}` + ); return { type: null, args: null }; } }; @@ -23916,103 +24054,121 @@ const drawSimpleText = function(elem, textData) { span.text(nText); return textElem; }; -const wrapLabel = memoize((label, maxWidth, config2) => { - if (!label) { - return label; - } - config2 = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
    " }, config2); - if (common$1.lineBreakRegex.test(label)) { - return label; - } - const words = label.split(" "); - const completedLines = []; - let nextLine = ""; - words.forEach((word, index) => { - const wordLength = calculateTextWidth(`${word} `, config2); - const nextLineLength = calculateTextWidth(nextLine, config2); - if (wordLength > maxWidth) { - const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config2); - completedLines.push(nextLine, ...hyphenatedStrings); - nextLine = remainingWord; - } else if (nextLineLength + wordLength >= maxWidth) { - completedLines.push(nextLine); - nextLine = word; - } else { - nextLine = [nextLine, word].filter(Boolean).join(" "); - } - const currentWord = index + 1; - const isLastWord = currentWord === words.length; - if (isLastWord) { - completedLines.push(nextLine); - } - }); - return completedLines.filter((line2) => line2 !== "").join(config2.joinWith); -}, (label, maxWidth, config2) => `${label}${maxWidth}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}${config2.joinWith}`); -const breakString = memoize((word, maxWidth, hyphenCharacter = "-", config2) => { - config2 = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 }, config2); - const characters2 = [...word]; - const lines = []; - let currentLine = ""; - characters2.forEach((character2, index) => { - const nextLine = `${currentLine}${character2}`; - const lineWidth = calculateTextWidth(nextLine, config2); - if (lineWidth >= maxWidth) { - const currentCharacter = index + 1; - const isLastLine = characters2.length === currentCharacter; - const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`; - lines.push(isLastLine ? nextLine : hyphenatedNextLine); - currentLine = ""; - } else { - currentLine = nextLine; - } - }); - return { hyphenatedStrings: lines, remainingWord: currentLine }; -}, (word, maxWidth, hyphenCharacter = "-", config2) => `${word}${maxWidth}${hyphenCharacter}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}`); +const wrapLabel = memoize( + (label, maxWidth, config2) => { + if (!label) { + return label; + } + config2 = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", joinWith: "
    " }, + config2 + ); + if (common$1.lineBreakRegex.test(label)) { + return label; + } + const words = label.split(" "); + const completedLines = []; + let nextLine = ""; + words.forEach((word, index) => { + const wordLength = calculateTextWidth(`${word} `, config2); + const nextLineLength = calculateTextWidth(nextLine, config2); + if (wordLength > maxWidth) { + const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, "-", config2); + completedLines.push(nextLine, ...hyphenatedStrings); + nextLine = remainingWord; + } else if (nextLineLength + wordLength >= maxWidth) { + completedLines.push(nextLine); + nextLine = word; + } else { + nextLine = [nextLine, word].filter(Boolean).join(" "); + } + const currentWord = index + 1; + const isLastWord = currentWord === words.length; + if (isLastWord) { + completedLines.push(nextLine); + } + }); + return completedLines.filter((line2) => line2 !== "").join(config2.joinWith); + }, + (label, maxWidth, config2) => `${label}${maxWidth}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}${config2.joinWith}` +); +const breakString = memoize( + (word, maxWidth, hyphenCharacter = "-", config2) => { + config2 = Object.assign( + { fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 0 }, + config2 + ); + const characters2 = [...word]; + const lines = []; + let currentLine = ""; + characters2.forEach((character2, index) => { + const nextLine = `${currentLine}${character2}`; + const lineWidth = calculateTextWidth(nextLine, config2); + if (lineWidth >= maxWidth) { + const currentCharacter = index + 1; + const isLastLine = characters2.length === currentCharacter; + const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`; + lines.push(isLastLine ? nextLine : hyphenatedNextLine); + currentLine = ""; + } else { + currentLine = nextLine; + } + }); + return { hyphenatedStrings: lines, remainingWord: currentLine }; + }, + (word, maxWidth, hyphenCharacter = "-", config2) => `${word}${maxWidth}${hyphenCharacter}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` +); function calculateTextHeight(text2, config2) { - config2 = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: "Arial", margin: 15 }, 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 = select("body"); - if (!body.remove) { - return { width: 0, height: 0, lineHeight: 0 }; - } - const g = body.append("svg"); - for (const fontFamily2 of fontFamilies) { - let cheight = 0; - const dim = { width: 0, height: 0, lineHeight: 0 }; - for (const line2 of lines) { - const textObj = getTextObj$3(); - textObj.text = line2; - const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2); - const bBox = (textElem._groups || textElem)[0][0].getBBox(); - if (bBox.width === 0 && bBox.height === 0) { - throw new Error("svg element not in render tree"); - } - dim.width = Math.round(Math.max(dim.width, bBox.width)); - cheight = Math.round(bBox.height); - dim.height += cheight; - dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight)); - } - dims.push(dim); - } - g.remove(); - const index = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1; - return dims[index]; -}, (text2, config2) => `${text2}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}`); +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 = select("body"); + if (!body.remove) { + return { width: 0, height: 0, lineHeight: 0 }; + } + const g = body.append("svg"); + for (const fontFamily2 of fontFamilies) { + let cheight = 0; + const dim = { width: 0, height: 0, lineHeight: 0 }; + for (const line2 of lines) { + const textObj = getTextObj$3(); + textObj.text = line2; + const textElem = drawSimpleText(g, textObj).style("font-size", _fontSizePx).style("font-weight", fontWeight).style("font-family", fontFamily2); + const bBox = (textElem._groups || textElem)[0][0].getBBox(); + if (bBox.width === 0 && bBox.height === 0) { + throw new Error("svg element not in render tree"); + } + dim.width = Math.round(Math.max(dim.width, bBox.width)); + cheight = Math.round(bBox.height); + dim.height += cheight; + dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight)); + } + dims.push(dim); + } + g.remove(); + const index = isNaN(dims[1].height) || isNaN(dims[1].width) || isNaN(dims[1].lineHeight) || dims[0].height > dims[1].height && dims[0].width > dims[1].width && dims[0].lineHeight > dims[1].lineHeight ? 0 : 1; + return dims[index]; + }, + (text2, config2) => `${text2}${config2.fontSize}${config2.fontWeight}${config2.fontFamily}` +); const initIdGenerator = class iterator { constructor(deterministic, seed) { this.deterministic = deterministic; @@ -24553,8 +24709,8 @@ function stubFalse() { 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 Buffer2 = moduleExports$1 ? root$1.Buffer : void 0; -var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; +var Buffer$1 = moduleExports$1 ? root$1.Buffer : void 0; +var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0; var isBuffer = nativeIsBuffer || stubFalse; var isBuffer$1 = isBuffer; var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$2 = "[object Function]", mapTag$1$1 = "[object Map]", numberTag$3 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$1$1 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]"; @@ -24865,12 +25021,30 @@ const draw$i = (_text, id2, mermaidVersion) => { log$1.debug("Renering svg for syntax error\n"); const svg2 = select("#" + id2); 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("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 " + mermaidVersion); svg2.attr("height", 100); @@ -24956,24 +25130,49 @@ const addDiagrams = () => { registerDiagram("error", errorDiagram, (text2) => { return text2.toLowerCase().trim() === "error"; }); - registerDiagram("---", { - db: { - clear: () => { - } - }, - styles: {}, - renderer: {}, - 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"); - } + registerDiagram( + "---", + { + db: { + clear: () => { + } + }, + styles: {}, + renderer: {}, + 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 }, - init: () => null - }, (text2) => { - return text2.toLowerCase().trimStart().startsWith("---"); - }); - registerLazyLoadedDiagrams(c4, classDiagramV2, classDiagram, er, gantt, info$1, pie$1, requirement, sequence, flowchartElk, flowchartV2, flowchart, mindmap, timeline, git, stateV2, state, journey); + (text2) => { + return text2.toLowerCase().trimStart().startsWith("---"); + } + ); + registerLazyLoadedDiagrams( + c4, + classDiagramV2, + classDiagram, + er, + gantt, + info$1, + pie$1, + requirement, + sequence, + flowchartElk, + flowchartV2, + flowchart, + mindmap, + timeline, + git, + stateV2, + state, + journey + ); }; const cleanupComments = (text2) => { return text2.trimStart().replace(/^\s*%%(?!{)[^\n]+\n?/gm, ""); @@ -25279,7 +25478,12 @@ const render$1$1 = async function(id2, text2, svgContainingElement) { const svg2 = element.firstChild; const firstChild = svg2.firstChild; const diagramClassDefs = CLASSDEF_DIAGRAMS.includes(graphType) ? diag.renderer.getClasses(text2, diag) : {}; - const rules = createUserStyles(config2, graphType, diagramClassDefs, idSelector); + const rules = createUserStyles( + config2, + graphType, + diagramClassDefs, + idSelector + ); const style1 = document.createElement("style"); style1.innerHTML = rules; svg2.insertBefore(style1, firstChild); @@ -25330,7 +25534,9 @@ function initialize$1(options = {}) { } saveConfigFromInitialize(options); if ((options == null ? void 0 : options.theme) && options.theme in theme) { - options.themeVariables = theme[options.theme].getThemeVariables(options.themeVariables); + options.themeVariables = theme[options.theme].getThemeVariables( + options.themeVariables + ); } else if (options) { options.themeVariables = theme.default.getThemeVariables(options.themeVariables); } @@ -25368,7 +25574,7 @@ const handleError = (error, errors, parseError) => { if (parseError) { parseError(error.str, error.hash); } - errors.push(__spreadProps$1(__spreadValues$2({}, error), { message: error.str, error })); + errors.push({ ...error, message: error.str, error }); } else { if (parseError) { parseError(error); @@ -25520,16 +25726,19 @@ const executeQueue = async () => { const parse$3 = 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); - }); + 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); @@ -25538,16 +25747,19 @@ const parse$3 = async (text2, parseOptions) => { 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); - }); + 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); @@ -25567,7 +25779,7 @@ const mermaid = { setParseErrorHandler, detectType }; -var __defProp$2$1 = Object.defineProperty; +var __defProp$2 = Object.defineProperty; var __getOwnPropDesc$2 = Object.getOwnPropertyDescriptor; var __decorateClass$2 = (decorators, target, key, kind) => { var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$2(target, key) : target; @@ -25575,7 +25787,7 @@ var __decorateClass$2 = (decorators, target, key, kind) => { if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result; if (kind && result) - __defProp$2$1(target, key, result); + __defProp$2(target, key, result); return result; }; const code_id = "code"; @@ -25767,7 +25979,7 @@ function nest(currentHeaders) { return updatedH; }); } -var __defProp$1$1 = Object.defineProperty; +var __defProp$1 = Object.defineProperty; var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor; var __decorateClass$1 = (decorators, target, key, kind) => { var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc$1(target, key) : target; @@ -25775,7 +25987,7 @@ var __decorateClass$1 = (decorators, target, key, kind) => { if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result; if (kind && result) - __defProp$1$1(target, key, result); + __defProp$1(target, key, result); return result; }; function headerToHtml(header) { @@ -25803,7 +26015,9 @@ let TOC = class extends s$1 { return $`
      - ${this.foundHeaders.map((item) => headerToHtml(item))} + ${this.foundHeaders.map( + (item) => headerToHtml(item) + )}
    `; @@ -25850,7 +26064,7 @@ __decorateClass$1([ TOC = __decorateClass$1([ n$2("nfdi-toc") ], TOC); -var __defProp2 = Object.defineProperty; +var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __decorateClass = (decorators, target, key, kind) => { var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target; @@ -25858,7 +26072,7 @@ var __decorateClass = (decorators, target, key, kind) => { if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result; if (kind && result) - __defProp2(target, key, result); + __defProp(target, key, result); return result; }; let SidebarTitle = class extends s$1 { @@ -27915,7 +28129,13 @@ const drawRels$1 = (elem, rels2, conf2) => { i = -1; } else { let line = relsElem.append("path"); - line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr("d", "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll("controlx", rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y)); + line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr( + "d", + "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll( + "controlx", + rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4 + ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y) + ); if (rel.type !== "rel_b") { line.attr("marker-end", "url(" + url + "#arrowhead)"); } @@ -27924,10 +28144,28 @@ const drawRels$1 = (elem, rels2, conf2) => { } } 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); + _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); + _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 + ); } } }; @@ -27956,17 +28194,44 @@ const drawBoundary$1 = function(elem, boundary, conf2) { 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); + _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); + _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); + _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) { @@ -28012,8 +28277,14 @@ const drawC4Shape = function(elem, c4Shape, conf2) { 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)); + 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": @@ -28021,8 +28292,14 @@ const drawC4Shape = function(elem, c4Shape, conf2) { 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)); + 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); @@ -28030,36 +28307,88 @@ const drawC4Shape = function(elem, c4Shape, conf2) { switch (c4Shape.typeC4Shape.text) { case "person": case "external_person": - drawImage$1(c4ShapeElem, 48, 48, c4Shape.x + c4Shape.width / 2 - 24, c4Shape.y + c4Shape.image.Y, personImg); + drawImage$1( + 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); + _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); + _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); + _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); + _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"); + 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"); + 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"); + 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"); @@ -28280,7 +28609,10 @@ function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLim c4Shape[textType].height = 0; c4Shape[textType].width = 0; for (const line of lines) { - c4Shape[textType].width = Math.max(calculateTextWidth(line, textConf), c4Shape[textType].width); + c4Shape[textType].width = Math.max( + calculateTextWidth(line, textConf), + c4Shape[textType].width + ); lineHeight = calculateTextHeight(line, textConf); c4Shape[textType].height = c4Shape[textType].height + lineHeight; } @@ -28308,7 +28640,10 @@ const drawC4ShapeArray = function(currentBounds, diagram2, c4ShapeArray2, c4Shap const c4Shape = c4ShapeArray2[c4ShapeKey]; let c4ShapeTypeConf = c4ShapeFont(conf$a, c4Shape.typeC4Shape.text); c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2; - c4Shape.typeC4Shape.width = calculateTextWidth("<<" + c4Shape.typeC4Shape.text + ">>", c4ShapeTypeConf); + c4Shape.typeC4Shape.width = calculateTextWidth( + "<<" + c4Shape.typeC4Shape.text + ">>", + c4ShapeTypeConf + ); c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2; c4Shape.typeC4Shape.Y = conf$a.c4ShapePadding; Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4; @@ -28399,13 +28734,19 @@ let getIntersectPoint = function(fromNode, endPoint) { 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); + 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); + returnPoint = new Point$1( + fromCenterX + dx / dy * fromNode.height / 2, + y1 + fromNode.height + ); } } else if (x1 < x2 && y1 > y2) { if (fromDYX >= tanDYX) { @@ -28476,20 +28817,38 @@ function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, current let currentBoundaryLabelConf = boundaryFont(conf$a); currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2; currentBoundaryLabelConf.fontWeight = "bold"; - calcC4ShapeTextWH("label", currentBoundary, currentBoundaryTextWrap, currentBoundaryLabelConf, currentBounds.data.widthLimit); + 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$a); - calcC4ShapeTextWH("type", currentBoundary, currentBoundaryTextWrap, currentBoundaryTypeConf, currentBounds.data.widthLimit); + 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$a); currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2; - calcC4ShapeTextWH("descr", currentBoundary, currentBoundaryTextWrap, currentBoundaryDescrConf, currentBounds.data.widthLimit); + calcC4ShapeTextWH( + "descr", + currentBoundary, + currentBoundaryTextWrap, + currentBoundaryDescrConf, + currentBounds.data.widthLimit + ); currentBoundary["descr"].Y = Y + 20; Y = currentBoundary["descr"].Y + currentBoundary["descr"].height; } @@ -28506,18 +28865,35 @@ function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, current let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias); let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias); if (currentPersonOrSystemKeys.length > 0) { - drawC4ShapeArray(currentBounds, diagram2, currentPersonOrSystemArray, currentPersonOrSystemKeys); + drawC4ShapeArray( + currentBounds, + diagram2, + currentPersonOrSystemArray, + currentPersonOrSystemKeys + ); } parentBoundaryAlias = currentBoundary.alias; let nextCurrentBoundarys = diagObj.db.getBoundarys(parentBoundaryAlias); if (nextCurrentBoundarys.length > 0) { - drawInsideBoundary(diagram2, parentBoundaryAlias, currentBounds, nextCurrentBoundarys, diagObj); + drawInsideBoundary( + diagram2, + parentBoundaryAlias, + currentBounds, + nextCurrentBoundarys, + diagObj + ); } if (currentBoundary.alias !== "global") { drawBoundary(diagram2, currentBoundary, currentBounds); } - parentBounds.data.stopy = Math.max(currentBounds.data.stopy + conf$a.c4ShapeMargin, parentBounds.data.stopy); - parentBounds.data.stopx = Math.max(currentBounds.data.stopx + conf$a.c4ShapeMargin, parentBounds.data.stopx); + parentBounds.data.stopy = Math.max( + currentBounds.data.stopy + conf$a.c4ShapeMargin, + parentBounds.data.stopy + ); + parentBounds.data.stopx = Math.max( + currentBounds.data.stopx + conf$a.c4ShapeMargin, + parentBounds.data.stopx + ); globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx); globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy); } @@ -28540,7 +28916,12 @@ const draw$h = function(_text, id, _version, diagObj) { svgDraw$5.insertDatabaseIcon(diagram2); svgDraw$5.insertClockIcon(diagram2); let screenBounds = new Bounds(diagObj); - screenBounds.setData(conf$a.diagramMarginX, conf$a.diagramMarginX, conf$a.diagramMarginY, conf$a.diagramMarginY); + screenBounds.setData( + conf$a.diagramMarginX, + conf$a.diagramMarginX, + conf$a.diagramMarginY, + conf$a.diagramMarginY + ); screenBounds.data.widthLimit = screen.availWidth; globalBoundaryMaxX = conf$a.diagramMarginX; globalBoundaryMaxY = conf$a.diagramMarginY; @@ -28564,7 +28945,10 @@ const draw$h = function(_text, id, _version, diagObj) { } configureSvgSize(diagram2, height, width, conf$a.useMaxWidth); const extraVertForTitle = title2 ? 60 : 0; - diagram2.attr("viewBox", box.startx - conf$a.diagramMarginX + " -" + (conf$a.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)); + diagram2.attr( + "viewBox", + box.startx - conf$a.diagramMarginX + " -" + (conf$a.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) + ); log$1.debug(`models:`, box); }; const c4Renderer = { @@ -29834,9 +30218,13 @@ const setClickFun$1 = function(id, functionName, functionArgs) { funs$1.push(function() { const elem = document.querySelector(`[id="${domId}"]`); if (elem !== null) { - elem.addEventListener("click", function() { - utils.runFunc(functionName, ...argList); - }, false); + elem.addEventListener( + "click", + function() { + utils.runFunc(functionName, ...argList); + }, + false + ); } }); } @@ -30542,7 +30930,7 @@ function arrayLikeKeys(value, inherited) { } return result; } -function keys$1(object) { +function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } function nativeKeysIn(object) { @@ -30631,7 +31019,7 @@ function baseGet(object, path) { } return index && index == length ? object : void 0; } -function get$1(object, path, defaultValue) { +function get(object, path, defaultValue) { var result = object == null ? void 0 : baseGet(object, path); return result === void 0 ? defaultValue : result; } @@ -30740,7 +31128,7 @@ Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; function baseAssign(object, source) { - return object && copyObject(source, keys$1(source), object); + return object && copyObject(source, keys(source), object); } function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); @@ -30804,7 +31192,7 @@ function baseGetAllKeys(object, keysFunc, symbolsFunc) { return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object)); } function getAllKeys(object) { - return baseGetAllKeys(object, keys$1, getSymbols$1); + return baseGetAllKeys(object, keys, getSymbols$1); } function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn$1); @@ -30951,7 +31339,7 @@ function baseClone(value, bitmask, customizer, key, object, stack) { result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack)); }); } - var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys$1; + var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys; var props = isArr ? void 0 : keysFunc(value); arrayEach(props || value, function(subValue, key2) { if (props) { @@ -31228,7 +31616,7 @@ function isStrictComparable(value) { return value === value && !isObject$1(value); } function getMatchData(object) { - var result = keys$1(object), length = result.length; + var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; @@ -31280,7 +31668,7 @@ function baseMatchesProperty(path, srcValue) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { - var objValue = get$1(object, path); + var objValue = get(object, path); return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } @@ -31324,7 +31712,7 @@ function createBaseFor(fromRight) { var baseFor = createBaseFor(); var baseFor$1 = baseFor; function baseForOwn(object, iteratee) { - return object && baseFor$1(object, iteratee, keys$1); + return object && baseFor$1(object, iteratee, keys); } function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { @@ -31493,7 +31881,7 @@ function createFind(findIndexFunc) { var iterable = Object(collection); if (!isArrayLike(collection)) { var iteratee = baseIteratee(predicate); - collection = keys$1(collection); + collection = keys(collection); predicate = function(key) { return iteratee(iterable[key], key, iterable); }; @@ -31550,7 +31938,7 @@ function baseValues(object, props) { }); } function values(object) { - return object == null ? [] : baseValues(object, keys$1(object)); + return object == null ? [] : baseValues(object, keys(object)); } function isUndefined(value) { return value === void 0; @@ -31858,7 +32246,7 @@ class Graph { return this._nodeCount; } nodes() { - return keys$1(this._nodes); + return keys(this._nodes); } sources() { var self = this; @@ -31925,10 +32313,10 @@ class Graph { }); delete this._children[v]; } - forEach(keys$1(this._in[v]), removeEdge); + forEach(keys(this._in[v]), removeEdge); delete this._in[v]; delete this._preds[v]; - forEach(keys$1(this._out[v]), removeEdge); + forEach(keys(this._out[v]), removeEdge); delete this._out[v]; delete this._sucs[v]; --this._nodeCount; @@ -31974,7 +32362,7 @@ class Graph { if (this._isCompound) { var children = this._children[v]; if (children) { - return keys$1(children); + return keys(children); } } else if (v === GRAPH_NODE) { return this.nodes(); @@ -31985,13 +32373,13 @@ class Graph { predecessors(v) { var predsV = this._preds[v]; if (predsV) { - return keys$1(predsV); + return keys(predsV); } } successors(v) { var sucsV = this._sucs[v]; if (sucsV) { - return keys$1(sucsV); + return keys(sucsV); } } neighbors(v) { @@ -32272,9 +32660,11 @@ function greedyFAS(g, weightFn) { } var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); - return flatten(map$1(results, function(e) { - return g.outEdges(e.v, e.w); - })); + return flatten( + map$1(results, function(e) { + return g.outEdges(e.v, e.w); + }) + ); } function doGreedyFAS(g, buckets, zeroIdx) { var results = []; @@ -32479,9 +32869,11 @@ function buildLayerMatrix(g) { return layering; } function normalizeRanks(g) { - var min$1$1 = min$1(map$1(g.nodes(), function(v) { - return g.node(v).rank; - })); + var min$1$1 = min$1( + map$1(g.nodes(), function(v) { + return g.node(v).rank; + }) + ); forEach(g.nodes(), function(v) { var node = g.node(v); if (has(node, "rank")) { @@ -32490,9 +32882,11 @@ function normalizeRanks(g) { }); } function removeEmptyRanks(g) { - var offset = min$1(map$1(g.nodes(), function(v) { - return g.node(v).rank; - })); + var offset = min$1( + map$1(g.nodes(), function(v) { + return g.node(v).rank; + }) + ); var layers = []; forEach(g.nodes(), function(v) { var rank2 = g.node(v).rank - offset; @@ -32525,12 +32919,14 @@ function addBorderNode$1(g, prefix, rank2, order2) { return addDummyNode(g, "border", node, prefix); } function maxRank(g) { - return max$1(map$1(g.nodes(), function(v) { - var rank2 = g.node(v).rank; - if (!isUndefined(rank2)) { - return rank2; - } - })); + return max$1( + map$1(g.nodes(), function(v) { + var rank2 = g.node(v).rank; + if (!isUndefined(rank2)) { + return rank2; + } + }) + ); } function partition(collection, fn) { var result = { lhs: [], rhs: [] }; @@ -32714,9 +33110,11 @@ function longestPath(g) { return label.rank; } visited[v] = true; - var rank2 = min$1(map$1(g.outEdges(v), function(e) { - return dfs2(e.w) - g.edge(e).minlen; - })); + var rank2 = min$1( + map$1(g.outEdges(v), function(e) { + return dfs2(e.w) - g.edge(e).minlen; + }) + ); if (rank2 === Number.POSITIVE_INFINITY || rank2 === void 0 || rank2 === null) { rank2 = 0; } @@ -33028,9 +33426,13 @@ function treeDepths(g) { return depths; } function sumWeights(g) { - return reduce(g.edges(), function(acc, e) { - return acc + g.edge(e).weight; - }, 0); + return reduce( + g.edges(), + function(acc, e) { + return acc + g.edge(e).weight; + }, + 0 + ); } function cleanup(g) { var graphLabel = g.graph(); @@ -33101,14 +33503,22 @@ function crossCount(g, layering) { return cc; } function twoLayerCrossCount(g, northLayer, southLayer) { - var southPos = zipObject(southLayer, map$1(southLayer, function(v, i) { - return i; - })); - var southEntries = flatten(map$1(northLayer, function(v) { - return sortBy$1(map$1(g.outEdges(v), function(e) { - return { pos: southPos[e.w], weight: g.edge(e).weight }; - }), "pos"); - })); + var southPos = zipObject( + southLayer, + map$1(southLayer, function(v, i) { + return i; + }) + ); + var southEntries = flatten( + map$1(northLayer, function(v) { + return sortBy$1( + map$1(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; @@ -33118,19 +33528,21 @@ function twoLayerCrossCount(g, northLayer, southLayer) { return 0; }); var cc = 0; - forEach(southEntries.forEach(function(entry) { - var index = entry.pos + firstIndex; - tree[index] += entry.weight; - var weightSum = 0; - while (index > 0) { - if (index % 2) { - weightSum += tree[index + 1]; - } - index = index - 1 >> 1; + forEach( + southEntries.forEach(function(entry) { + var index = entry.pos + firstIndex; tree[index] += entry.weight; - } - cc += entry.weight * weightSum; - })); + var weightSum = 0; + while (index > 0) { + if (index % 2) { + weightSum += tree[index + 1]; + } + index = index - 1 >> 1; + tree[index] += entry.weight; + } + cc += entry.weight * weightSum; + }) + ); return cc; } function initOrder(g) { @@ -33138,9 +33550,11 @@ function initOrder(g) { var simpleNodes = filter(g.nodes(), function(v) { return !g.children(v).length; }); - var maxRank2 = max$1(map$1(simpleNodes, function(v) { - return g.node(v).rank; - })); + var maxRank2 = max$1( + map$1(simpleNodes, function(v) { + return g.node(v).rank; + }) + ); var layers = map$1(range$1(maxRank2 + 1), function() { return []; }); @@ -33164,13 +33578,17 @@ function barycenter(g, movable) { 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 }); + 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, @@ -33233,11 +33651,14 @@ function doResolveConflicts(sourceSet) { forEach(entry["in"].reverse(), handleIn(entry)); forEach(entry.out, handleOut(entry)); } - return map$1(filter(entries, function(entry2) { - return !entry2.merged; - }), function(entry2) { - return pick$1(entry2, ["vs", "i", "barycenter", "weight"]); - }); + return map$1( + filter(entries, function(entry2) { + return !entry2.merged; + }), + function(entry2) { + return pick$1(entry2, ["vs", "i", "barycenter", "weight"]); + } + ); } function mergeEntries(target, source) { var sum = 0; @@ -33338,12 +33759,14 @@ function sortSubgraph(g, v, cg, biasRight) { } function expandSubgraphs(entries, subgraphs) { forEach(entries, function(entry) { - entry.vs = flatten(entry.vs.map(function(v) { - if (subgraphs[v]) { - return subgraphs[v].vs; - } - return v; - })); + entry.vs = flatten( + entry.vs.map(function(v) { + if (subgraphs[v]) { + return subgraphs[v].vs; + } + return v; + }) + ); }); } function mergeBarycenters(target, other) { @@ -33751,9 +34174,11 @@ function positionY(g) { var rankSep = g.graph().ranksep; var prevY = 0; forEach(layering, function(layer) { - var maxHeight = max$1(map$1(layer, function(v) { - return g.node(v).height; - })); + var maxHeight = max$1( + map$1(layer, function(v) { + return g.node(v).height; + }) + ); forEach(layer, function(v) { g.node(v).y = prevY + maxHeight / 2; }); @@ -33900,7 +34325,9 @@ var edgeAttrs = ["labelpos"]; function buildLayoutGraph(inputGraph) { var g = new Graph({ multigraph: true, compound: true }); var graph = canonicalize(inputGraph.graph()); - g.setGraph(merge$1$1({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick$1(graph, graphAttrs))); + g.setGraph( + merge$1$1({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), pick$1(graph, graphAttrs)) + ); forEach(inputGraph.nodes(), function(v) { var node = canonicalize(inputGraph.node(v)); g.setNode(v, defaults$1(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); @@ -33908,7 +34335,10 @@ function buildLayoutGraph(inputGraph) { }); forEach(inputGraph.edges(), function(e) { var edge = canonicalize(inputGraph.edge(e)); - g.setEdge(e, merge$1$1({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick$1(edge, edgeAttrs))); + g.setEdge( + e, + merge$1$1({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), pick$1(edge, edgeAttrs)) + ); }); return g; } @@ -34093,14 +34523,19 @@ function insertSelfEdges(g) { var node = g.node(v); node.order = i + orderShift; forEach(node.selfEdges, function(selfEdge) { - addDummyNode(g, "selfedge", { - width: selfEdge.label.width, - height: selfEdge.label.height, - rank: node.rank, - order: i + ++orderShift, - e: selfEdge.e, - label: selfEdge.label - }, "_se"); + addDummyNode( + g, + "selfedge", + { + width: selfEdge.label.width, + height: selfEdge.label.height, + rank: node.rank, + order: i + ++orderShift, + e: selfEdge.e, + label: selfEdge.label + }, + "_se" + ); }); delete node.selfEdges; }); @@ -35047,7 +35482,9 @@ var defaultRules = { }, reflink: { order: currOrder++, - match: inlineRegex(new RegExp("^\\[(" + LINK_INSIDE + ")\\]\\s*\\[([^\\]]*)\\]")), + match: inlineRegex(new RegExp( + "^\\[(" + LINK_INSIDE + ")\\]\\s*\\[([^\\]]*)\\]" + )), parse: function(_parse14) { function parse2(_x40, _x41, _x42) { return _parse14.apply(this, arguments); @@ -35067,7 +35504,9 @@ var defaultRules = { }, refimage: { order: currOrder++, - match: inlineRegex(new RegExp("^!\\[(" + LINK_INSIDE + ")\\]\\s*\\[([^\\]]*)\\]")), + match: inlineRegex(new RegExp( + "^!\\[(" + LINK_INSIDE + ")\\]\\s*\\[([^\\]]*)\\]" + )), parse: function(_parse15) { function parse2(_x43, _x44, _x45) { return _parse15.apply(this, arguments); @@ -35087,7 +35526,9 @@ var defaultRules = { }, em: { order: currOrder, - match: inlineRegex(new RegExp("^\\b_((?:__|\\\\[\\s\\S]|[^\\\\_])+?)_\\b|^\\*(?=\\S)((?:\\*\\*|\\\\[\\s\\S]|\\s+(?:\\\\[\\s\\S]|[^\\s\\*\\\\]|\\*\\*)|[^\\s\\*\\\\])+?)\\*(?!\\*)")), + match: inlineRegex(new RegExp( + "^\\b_((?:__|\\\\[\\s\\S]|[^\\\\_])+?)_\\b|^\\*(?=\\S)((?:\\*\\*|\\\\[\\s\\S]|\\s+(?:\\\\[\\s\\S]|[^\\s\\*\\\\]|\\*\\*)|[^\\s\\*\\\\])+?)\\*(?!\\*)" + )), quality: function quality(capture) { return capture[0].length + 0.2; }, @@ -35436,7 +35877,9 @@ function addHtmlSpan(element, node, width, classes) { const div = fo.append("xhtml:div"); const label = node.label; const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html(`" + label + ""); + div.html( + `" + label + "" + ); applyStyle$2(div, node.labelStyle); div.style("display", "table-cell"); div.style("white-space", "nowrap"); @@ -35516,7 +35959,10 @@ const createText = (el, text = "", { const htmlText = markdownToHTML(text); const node = { isNode, - label: decodeEntities(htmlText).replace(/fa[blrs]?:fa-[\w-]+/g, (s) => ``), + label: decodeEntities(htmlText).replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ), labelStyle: style.replace("fill:", "color:") }; let vertexNode = addHtmlSpan(el, node, width, classes); @@ -35739,10 +36185,16 @@ const drawEdge$2 = function(elem, path, relation, conf, diagObj) { svgPath.attr("class", "relation dotted-line"); } if (relation.relation.type1 !== "none") { - svgPath.attr("marker-start", "url(" + url + "#" + getRelationType(relation.relation.type1) + "Start)"); + 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)"); + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(relation.relation.type2) + "End)" + ); } let x, y; const l = path.points.length; @@ -35752,8 +36204,16 @@ const drawEdge$2 = function(elem, path, relation, conf, diagObj) { let p1_card_x, p1_card_y; let p2_card_x, p2_card_y; if (l % 2 !== 0 && l > 1) { - let cardinality_1_point = utils.calcCardinalityPosition(relation.relation.type1 !== "none", path.points, path.points[0]); - let cardinality_2_point = utils.calcCardinalityPosition(relation.relation.type2 !== "none", path.points, path.points[l - 1]); + let cardinality_1_point = utils.calcCardinalityPosition( + relation.relation.type1 !== "none", + path.points, + path.points[0] + ); + let cardinality_2_point = utils.calcCardinalityPosition( + relation.relation.type2 !== "none", + path.points, + path.points[l - 1] + ); log$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; @@ -35863,7 +36323,10 @@ const drawNote$2 = function(elem, note, conf, diagObj) { text.append("tspan").text(line2).attr("class", "title").attr("dy", conf.textHeight); }); const noteBox = g.node().getBBox(); - const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr("height", noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin); + const rect = g.insert("rect", ":first-child").attr("x", 0).attr("y", 0).attr("width", noteBox.width + 2 * conf.padding).attr( + "height", + noteBox.height + lines.length * conf.textHeight + conf.padding + 0.5 * conf.dividerMargin + ); const rectWidth = rect.node().getBBox().width; text.node().childNodes.forEach(function(x) { x.setAttribute("x", (rectWidth - x.getBBox().width) / 2); @@ -36049,7 +36512,9 @@ function addHtmlLabel$1(node) { const div = fo.append("xhtml:div"); const label = node.label; const labelClass = node.isNode ? "nodeLabel" : "edgeLabel"; - div.html('" + label + ""); + div.html( + '" + label + "" + ); applyStyle$1(div, node.labelStyle); div.style("display", "inline-block"); div.style("white-space", "nowrap"); @@ -36066,7 +36531,10 @@ const createLabel = (_vertexText, style, isTitle, isNode) => { log$1.info("vertexText" + vertexText); const node = { isNode, - label: decodeEntities(vertexText).replace(/fa[blrs]?:fa-[\w-]+/g, (s) => ``), + label: decodeEntities(vertexText).replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ), labelStyle: style.replace("fill:", "color:") }; let vertexNode = addHtmlLabel$1(node); @@ -36124,7 +36592,14 @@ const labelHelper = (parent, node, _classes, isNode) => { classes: "markdown-node-label" }); } else { - text = textNode.appendChild(createLabel$1(sanitizeText$1$1(decodeEntities(labelText), getConfig$1()), node.labelStyle, false, isNode)); + text = textNode.appendChild( + createLabel$1( + sanitizeText$1$1(decodeEntities(labelText), getConfig$1()), + node.labelStyle, + false, + isNode + ) + ); } let bbox = text.getBBox(); if (evaluate(getConfig$1().flowchart.htmlLabels)) { @@ -36152,9 +36627,12 @@ const updateNodeBounds = (node, element) => { node.height = bbox.height; }; function insertPolygonShape$2(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr("points", points.map(function(d) { - return d.x + "," + d.y; - }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); } function intersectNode$1(node, point2) { return node.intersect(point2); @@ -36233,7 +36711,12 @@ function intersectPolygon$1(node, polyPoints, point2) { for (var i = 0; i < polyPoints.length; i++) { var p1 = polyPoints[i]; var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect2 = intersectLine$1(node, point2, { x: left + p1.x, y: top + p1.y }, { x: left + p2.x, y: top + p2.y }); + var intersect2 = intersectLine$1( + node, + point2, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); if (intersect2) { intersections.push(intersect2); } @@ -36331,9 +36814,12 @@ const choice = (parent, node) => { { 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(" ")); + const choice2 = shapeSvg.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ); choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28); node.width = 28; node.height = 28; @@ -36613,7 +37099,9 @@ const rectWithTitle = (parent, node) => { log$1.info("Text 2", text2); const textRows = text2.slice(1, text2.length); let titleBox = text.getBBox(); - const descr = label.node().appendChild(createLabel$1(textRows.join ? textRows.join("
    ") : textRows, node.labelStyle, true, true)); + const descr = label.node().appendChild( + createLabel$1(textRows.join ? textRows.join("
    ") : textRows, node.labelStyle, true, true) + ); if (evaluate(getConfig$1().flowchart.htmlLabels)) { const div = descr.children[0]; const dv = select(descr); @@ -36622,10 +37110,19 @@ const rectWithTitle = (parent, node) => { dv.attr("height", bbox.height); } const halfPadding = node.padding / 2; - select(descr).attr("transform", "translate( " + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")"); - select(text).attr("transform", "translate( " + (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", " + 0 + ")"); + select(descr).attr( + "transform", + "translate( " + (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")" + ); + select(text).attr( + "transform", + "translate( " + (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) + ")"); + label.attr( + "transform", + "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")" + ); rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding); innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding); updateNodeBounds(node, rect2); @@ -36798,7 +37295,14 @@ const class_box = (parent, node) => { if (getConfig$1().flowchart.htmlLabels) { parsedText = parsedText.replace(//g, ">"); } - const lbl = labelContainer.node().appendChild(createLabel$1(parsedText, parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, true, true)); + const lbl = labelContainer.node().appendChild( + createLabel$1( + parsedText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); let bbox = lbl.getBBox(); if (evaluate(getConfig$1().flowchart.htmlLabels)) { const div = lbl.children[0]; @@ -36821,7 +37325,14 @@ const class_box = (parent, node) => { if (getConfig$1().flowchart.htmlLabels) { displayText = displayText.replace(//g, ">"); } - const lbl = labelContainer.node().appendChild(createLabel$1(displayText, parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, true, true)); + const lbl = labelContainer.node().appendChild( + createLabel$1( + displayText, + parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle, + true, + true + ) + ); let bbox = lbl.getBBox(); if (evaluate(getConfig$1().flowchart.htmlLabels)) { const div = lbl.children[0]; @@ -36839,23 +37350,35 @@ const class_box = (parent, node) => { maxHeight += lineHeight; if (hasInterface) { let diffX2 = (maxWidth - interfaceBBox.width) / 2; - select(interfaceLabel).attr("transform", "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")"); + select(interfaceLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")" + ); verticalPos = interfaceBBox.height + rowPadding; } let diffX = (maxWidth - classTitleBBox.width) / 2; - select(classTitleLabel).attr("transform", "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"); + select(classTitleLabel).attr( + "transform", + "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); verticalPos += classTitleBBox.height + rowPadding; topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); verticalPos += lineHeight; classAttributes.forEach((lbl) => { - select(lbl).attr("transform", "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")"); + select(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")" + ); verticalPos += classTitleBBox.height + rowPadding; }); verticalPos += lineHeight; bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos); verticalPos += lineHeight; classMethods.forEach((lbl) => { - select(lbl).attr("transform", "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"); + select(lbl).attr( + "transform", + "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")" + ); verticalPos += classTitleBBox.height + rowPadding; }); rect2.attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding); @@ -36928,11 +37451,19 @@ const clear$1$3 = () => { }; const positionNode$1 = (node) => { const el = nodeElems[node.id]; - log$1.trace("Transforming node", node.diff, node, "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")"); + log$1.trace( + "Transforming node", + node.diff, + node, + "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")" + ); const padding = 8; const diff = node.diff || 0; if (node.clusterNode) { - el.attr("transform", "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")"); + el.attr( + "transform", + "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")" + ); } else { el.attr("transform", "translate(" + node.x + ", " + node.y + ")"); } @@ -37040,7 +37571,17 @@ const positionEdgeLabel = (edge, paths) => { let y = edge.y; if (path) { const pos = utils.calcLabelPosition(path); - log$1.info("Moving label " + edge.label + " from (", x, ",", y, ") to (", pos.x, ",", pos.y, ") abc78"); + log$1.info( + "Moving label " + edge.label + " from (", + x, + ",", + y, + ") to (", + pos.x, + ",", + pos.y, + ") abc78" + ); if (paths.updatedPath) { x = pos.x; y = pos.y; @@ -37064,7 +37605,11 @@ const positionEdgeLabel = (edge, paths) => { let x = edge.x; let y = edge.y; if (path) { - const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_right", path); + const pos = utils.calcTerminalLabelPosition( + edge.arrowTypeStart ? 10 : 0, + "start_right", + path + ); x = pos.x; y = pos.y; } @@ -37201,7 +37746,12 @@ const insertEdge$1 = function(elem, e, edge, clusterDb, diagramType, graph) { if (head.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], head, head.intersect(points[points.length - 1])); + log$1.info( + "Last point", + points[points.length - 1], + head, + head.intersect(points[points.length - 1]) + ); points.push(head.intersect(points[points.length - 1])); } if (edge.toCluster) { @@ -37403,7 +37953,15 @@ const edgeInCluster = (edge, clusterId) => { return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w); }; const copy$1 = (clusterId, graph, newGraph, rootId) => { - log$1.warn("Copying children of ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); + log$1.warn( + "Copying children of ", + clusterId, + "root", + rootId, + "data", + graph.node(clusterId), + rootId + ); const nodes = graph.children(clusterId) || []; if (clusterId !== rootId) { nodes.push(clusterId); @@ -37425,7 +37983,14 @@ const copy$1 = (clusterId, graph, newGraph, rootId) => { newGraph.setParent(node, clusterId); } else { log$1.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId); - log$1.debug("Not Setting parent for node=", node, "cluster!==rootId", clusterId !== rootId, "node!==clusterId", node !== clusterId); + log$1.debug( + "Not Setting parent for node=", + node, + "cluster!==rootId", + clusterId !== rootId, + "node!==clusterId", + node !== clusterId + ); } const edges = graph.edges(node); log$1.debug("Copying Edges", edges); @@ -37439,7 +38004,16 @@ const copy$1 = (clusterId, graph, newGraph, rootId) => { 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); + log$1.info( + "Skipping copy of edge ", + edge.v, + "-->", + edge.w, + " rootId: ", + rootId, + " clusterId:", + clusterId + ); } } catch (e) { log$1.error(e); @@ -37497,7 +38071,12 @@ const adjustClustersAndEdges = (graph, depth) => { graph.nodes().forEach(function(id) { const children = graph.children(id); if (children.length > 0) { - log$1.warn("Cluster identified", id, " Replacement id in edges: ", findNonClusterChild(id, graph)); + log$1.warn( + "Cluster identified", + id, + " Replacement id in edges: ", + findNonClusterChild(id, graph) + ); descendants[id] = extractDescendants(id, graph); clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) }; } @@ -37528,7 +38107,17 @@ const adjustClustersAndEdges = (graph, depth) => { log$1.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e))); let v = e.v; let w = e.w; - log$1.warn("Fix XXX", clusterDb, "ids:", e.v, e.w, "Translating: ", clusterDb[e.v], " --- ", clusterDb[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); @@ -37591,11 +38180,25 @@ const extractor = (graph, depth) => { } log$1.debug("Nodes = ", nodes, depth); for (const node of nodes) { - log$1.debug("Extracting node", node, clusterDb, clusterDb[node] && !clusterDb[node].externalConnections, !graph.parent(node), graph.node(node), graph.children("D"), " Depth ", depth); + log$1.debug( + "Extracting node", + node, + clusterDb, + clusterDb[node] && !clusterDb[node].externalConnections, + !graph.parent(node), + graph.node(node), + graph.children("D"), + " Depth ", + depth + ); if (!clusterDb[node]) { log$1.debug("Not a cluster", node, depth); } else if (!clusterDb[node].externalConnections && graph.children(node) && graph.children(node).length > 0) { - log$1.warn("Cluster without external connections, without a parent and with children", node, depth); + log$1.warn( + "Cluster without external connections, without a parent and with children", + node, + depth + ); const graphSettings = graph.graph(); let dir = graphSettings.rankdir === "TB" ? "LR" : "TB"; if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) { @@ -37626,7 +38229,18 @@ const extractor = (graph, depth) => { log$1.warn("New graph after copy node: (", node, ")", write(clusterGraph)); log$1.debug("Old graph after copy", write(graph)); } else { - log$1.warn("Cluster ** ", node, " **not meeting the criteria !externalConnections:", !clusterDb[node].externalConnections, " no parent: ", !graph.parent(node), " children ", graph.children(node) && graph.children(node).length > 0, graph.children("D"), depth); + log$1.warn( + "Cluster ** ", + node, + " **not meeting the criteria !externalConnections:", + !clusterDb[node].externalConnections, + " no parent: ", + !graph.parent(node), + " children ", + graph.children(node) && graph.children(node).length > 0, + graph.children("D"), + depth + ); log$1.debug(clusterDb); } } @@ -37679,9 +38293,15 @@ const rect$1 = (parent, node) => { log$1.trace("Data ", node, JSON.stringify(node)); rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding); if (useHtmlLabels) { - label.attr("transform", "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2) + ")"); + label.attr( + "transform", + "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2) + ")" + ); } else { - label.attr("transform", "translate(" + node.x + ", " + (node.y - node.height / 2) + ")"); + label.attr( + "transform", + "translate(" + node.x + ", " + (node.y - node.height / 2) + ")" + ); } const rectBox = rect2.node().getBBox(); node.width = rectBox.width; @@ -37730,7 +38350,10 @@ const roundedWithTitle = (parent, node) => { } rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding); innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3); - label.attr("transform", "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2 - node.padding / 3 + (evaluate(getConfig$1().flowchart.htmlLabels) ? 5 : 3)) + ")"); + label.attr( + "transform", + "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2 - node.padding / 3 + (evaluate(getConfig$1().flowchart.htmlLabels) ? 5 : 3)) + ")" + ); const rectBox = rect2.node().getBBox(); node.height = rectBox.height; node.intersect = function(point) { @@ -37832,7 +38455,14 @@ const recursiveRender = (_elem, graph, diagramtype, parentCluster) => { sortNodesByHierarchy(graph).forEach(function(v) { const node = graph.node(v); log$1.info("Position " + v + ": " + JSON.stringify(graph.node(v))); - log$1.info("Position " + v + ": (" + node.x, "," + node.y, ") width: ", node.width, " height: ", node.height); + log$1.info( + "Position " + v + ": (" + node.x, + "," + node.y, + ") width: ", + node.width, + " height: ", + node.height + ); if (node && node.clusterNode) { positionNode$1(node); } else { @@ -37955,7 +38585,10 @@ const addVertices$2 = function(vert, g, svgId, root, doc, diagObj) { } else { if (evaluate(getConfig$1().flowchart.htmlLabels)) { const node = { - label: vertexText.replace(/fa[blrs]?:fa-[\w-]+/g, (s) => ``) + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) }; vertexNode = addHtmlLabel(svg, node).node(); vertexNode.parentNode.removeChild(vertexNode); @@ -38232,7 +38865,14 @@ const draw$g = function(text, id, _version, diagObj) { for (let i2 = subGraphs.length - 1; i2 >= 0; i2--) { subG = subGraphs[i2]; log$1.info("Subgraph - ", subG); - diagObj.db.addVertex(subG.id, { text: subG.title, type: subG.labelType }, "group", void 0, subG.classes, subG.dir); + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); } const vert = diagObj.db.getVertices(); const edges = diagObj.db.getEdges(); @@ -38602,7 +39242,11 @@ var createEdgePaths = function(selection, g, arrows2) { if (edge.id) { domEdge.attr("id", edge.id); } - applyClass(domEdge, edge["class"], (domEdge.classed("update") ? "update " : "") + "edgePath"); + applyClass( + domEdge, + edge["class"], + (domEdge.classed("update") ? "update " : "") + "edgePath" + ); }); svgPaths.selectAll("path.path").each(function(e) { var edge = g.edge(e); @@ -38683,7 +39327,11 @@ var createNodes = function(selection, g, shapes2) { svgNodes.each(function(v) { var node = g.node(v); var thisGroup = select(this); - applyClass(thisGroup, node["class"], (thisGroup.classed("update") ? "update " : "") + "node"); + applyClass( + thisGroup, + node["class"], + (thisGroup.classed("update") ? "update " : "") + "node" + ); thisGroup.select("g.label").remove(); var labelGroup = thisGroup.append("g").attr("class", "label"); var labelDom = addLabel(labelGroup, node); @@ -38704,7 +39352,10 @@ var createNodes = function(selection, g, shapes2) { } bbox.width += node.paddingLeft + node.paddingRight; bbox.height += node.paddingTop + node.paddingBottom; - labelGroup.attr("transform", "translate(" + (node.paddingLeft - node.paddingRight) / 2 + "," + (node.paddingTop - node.paddingBottom) / 2 + ")"); + labelGroup.attr( + "transform", + "translate(" + (node.paddingLeft - node.paddingRight) / 2 + "," + (node.paddingTop - node.paddingBottom) / 2 + ")" + ); var root = select(this); root.select(".label-container").remove(); var shapeSvg = shape(root, bbox, node).classed("label-container", true); @@ -38838,7 +39489,12 @@ function intersectPolygon(node, polyPoints, point) { for (var i = 0; i < polyPoints.length; i++) { var p1 = polyPoints[i]; var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0]; - var intersect = intersectLine(node, point, { x: left + p1.x, y: top + p1.y }, { x: left + p2.x, y: top + p2.y }); + var intersect = intersectLine( + node, + point, + { x: left + p1.x, y: top + p1.y }, + { x: left + p2.x, y: top + p2.y } + ); if (intersect) { intersections.push(intersect); } @@ -38925,9 +39581,12 @@ function diamond(parent, bbox, node) { { x: 0, y: h }, { x: w, y: 0 } ]; - var shapeSvg = parent.insert("polygon", ":first-child").attr("points", points.map(function(p) { - return p.x + "," + p.y; - }).join(" ")); + var shapeSvg = parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(p) { + return p.x + "," + p.y; + }).join(" ") + ); node.intersect = function(p) { return intersectPolygon(node, points, p); }; @@ -39278,9 +39937,12 @@ function addToRenderV2(addShape) { addShape({ rect_right_inv_arrow }); } function insertPolygonShape$1(parent, w, h, points) { - return parent.insert("polygon", ":first-child").attr("points", points.map(function(d) { - return d.x + "," + d.y; - }).join(" ")).attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")"); } const flowChartShapes = { addToRender, @@ -39308,7 +39970,10 @@ const addVertices$1 = function(vert, g, svgId, root, _doc, diagObj) { let vertexNode; if (evaluate(getConfig$1().flowchart.htmlLabels)) { const node = { - label: vertexText.replace(/fa[blrs]?:fa-[\w-]+/g, (s) => ``) + label: vertexText.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + ) }; vertexNode = addHtmlLabel(svg2, node).node(); vertexNode.parentNode.removeChild(vertexNode); @@ -39458,7 +40123,10 @@ const addEdges$1 = function(edges, g, diagObj) { edgeData.labelpos = "c"; if (evaluate(getConfig$1().flowchart.htmlLabels)) { edgeData.labelType = "html"; - edgeData.label = `${edge.text.replace(/fa[blrs]?:fa-[\w-]+/g, (s) => ``)}`; + edgeData.label = `${edge.text.replace( + /fa[blrs]?:fa-[\w-]+/g, + (s) => `` + )}`; } else { edgeData.labelType = "text"; edgeData.label = edge.text.replace(common$1.lineBreakRegex, "\n"); @@ -39532,7 +40200,12 @@ const draw$f = function(text2, id, _version, diagObj) { subG = subGraphs[i]; 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)); + 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)); } } @@ -39559,8 +40232,12 @@ const draw$f = function(text2, id, _version, diagObj) { for (i = 0; i < subGraphs.length; i++) { subG = subGraphs[i]; if (subG.title !== "undefined") { - const clusterRects = doc.querySelectorAll("#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"] rect'); - const clusterEl = doc.querySelectorAll("#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"]'); + const clusterRects = doc.querySelectorAll( + "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"] rect' + ); + const clusterEl = doc.querySelectorAll( + "#" + id + ' [id="' + diagObj.db.lookUpDomId(subG.id) + '"]' + ); const xPos = clusterRects[0].x.baseVal.value; const yPos = clusterRects[0].y.baseVal.value; const _width = clusterRects[0].width.baseVal.value; @@ -40683,12 +41360,24 @@ const drawAttributes = (groupNode, entityTextNode, attributes) => { } const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth; const bBox = { - width: Math.max(conf$7.minEntityWidth, Math.max(labelBBox.width + conf$7.entityPadding * 2, maxWidth + widthPadding * widthPaddingFactor)), + width: Math.max( + conf$7.minEntityWidth, + Math.max( + labelBBox.width + conf$7.entityPadding * 2, + maxWidth + widthPadding * widthPaddingFactor + ) + ), height: attributes.length > 0 ? cumulativeHeight : Math.max(conf$7.minEntityHeight, labelBBox.height + conf$7.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) + ")"); + 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) => { @@ -40696,16 +41385,25 @@ const drawAttributes = (groupNode, entityTextNode, attributes) => { 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 + ")"); + 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 + ")"); + 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 + ")"); + 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; @@ -40727,7 +41425,11 @@ const drawEntities = function(svgNode, entities2, graph) { 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$1().fontFamily).style("font-size", conf$7.fontSize + "px").text(entityName); - const { width: entityWidth, height: entityHeight } = drawAttributes(groupNode, textNode, entities2[entityName].attributes); + 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, { @@ -40742,7 +41444,10 @@ const drawEntities = function(svgNode, entities2, graph) { const adjustEntities$1 = function(svgNode, graph) { graph.nodes().forEach(function(v) { if (v !== void 0 && graph.node(v) !== void 0) { - svgNode.select("#" + v).attr("transform", "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )"); + svgNode.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); } }); }; @@ -40751,14 +41456,23 @@ const getEdgeName = function(rel) { }; const addRelationships$1 = function(relationships2, g) { relationships2.forEach(function(r) { - g.setEdge(entityNameIds.get(r.entityA), entityNameIds.get(r.entityB), { relationship: r }, getEdgeName(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(svg, rel, g, insert, diagObj) { relCnt$1++; - const edge = g.edge(entityNameIds.get(rel.entityA), entityNameIds.get(rel.entityB), getEdgeName(rel)); + const edge = g.edge( + entityNameIds.get(rel.entityA), + entityNameIds.get(rel.entityB), + getEdgeName(rel) + ); const lineFunction = line().x(function(d) { return d.x; }).y(function(d) { @@ -40790,13 +41504,22 @@ const drawRelationshipFromLayout$1 = function(svg, rel, g, insert, diagObj) { } switch (rel.relSpec.cardB) { case diagObj.db.Cardinality.ZERO_OR_ONE: - svgPath.attr("marker-start", "url(" + url + "#" + erMarkers.ERMarkers.ZERO_OR_ONE_START + ")"); + 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 + ")"); + 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 + ")"); + 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 + ")"); @@ -40853,7 +41576,10 @@ const draw$e = function(text, id, _version, diagObj) { const MERMAID_ERDIAGRAM_UUID = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c"; function generateId(str = "", prefix = "") { const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, ""); - return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${v5$1(str, MERMAID_ERDIAGRAM_UUID)}`; + return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${v5$1( + str, + MERMAID_ERDIAGRAM_UUID + )}`; } function strWithHyphen(str = "") { return str.length > 0 ? `${str}-` : ""; @@ -40910,25 +41636,6 @@ var erDiagram20cc9db4 = /*#__PURE__*/Object.freeze({ diagram: diagram$e }); -var __defProp$1 = Object.defineProperty; -var __defProps = Object.defineProperties; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; -var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols; -var __hasOwnProp$1 = Object.prototype.hasOwnProperty; -var __propIsEnum$1 = Object.prototype.propertyIsEnumerable; -var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues$1 = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp$1.call(b, prop)) - __defNormalProp$1(a, prop, b[prop]); - if (__getOwnPropSymbols$1) - for (var prop of __getOwnPropSymbols$1(b)) { - if (__propIsEnum$1.call(b, prop)) - __defNormalProp$1(a, prop, b[prop]); - } - return a; -}; -var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); var parser$a = function() { var o = function(k, v, o2, l) { for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) @@ -41874,7 +42581,9 @@ const branch = function(name, order) { checkout(name); 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 ' + name + '")'); + let error = new Error( + 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + name + '")' + ); error.hash = { text: "branch " + name, token: "branch " + name, @@ -41901,7 +42610,9 @@ const merge = function(otherBranch, custom_id, override_type, custom_tag) { }; throw error; } else if (currentCommit === void 0 || !currentCommit) { - let error = new Error('Incorrect usage of "merge". Current branch (' + curBranch + ")has no commits"); + let error = new Error( + 'Incorrect usage of "merge". Current branch (' + curBranch + ")has no commits" + ); error.hash = { text: "merge " + otherBranch, token: "merge " + otherBranch, @@ -41911,7 +42622,9 @@ const merge = function(otherBranch, custom_id, override_type, custom_tag) { }; throw error; } else if (branches[otherBranch] === void 0) { - let error = new Error('Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist"); + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") does not exist" + ); error.hash = { text: "merge " + otherBranch, token: "merge " + otherBranch, @@ -41921,7 +42634,9 @@ const merge = function(otherBranch, custom_id, override_type, custom_tag) { }; throw error; } else if (otherCommit === void 0 || !otherCommit) { - let error = new Error('Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits"); + let error = new Error( + 'Incorrect usage of "merge". Branch to be merged (' + otherBranch + ") has no commits" + ); error.hash = { text: "merge " + otherBranch, token: "merge " + otherBranch, @@ -41941,7 +42656,9 @@ const merge = function(otherBranch, custom_id, override_type, custom_tag) { }; 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"); + 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, @@ -41976,7 +42693,9 @@ const cherryPick = function(sourceId, targetId, tag) { targetId = common$1.sanitizeText(targetId, getConfig$1()); tag = common$1.sanitizeText(tag, getConfig$1()); if (!sourceId || commits[sourceId] === void 0) { - let error = new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided'); + 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, @@ -41989,7 +42708,9 @@ const cherryPick = function(sourceId, targetId, tag) { 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'); + 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, @@ -42001,7 +42722,9 @@ const cherryPick = function(sourceId, targetId, tag) { } if (!targetId || commits[targetId] === void 0) { if (sourceCommitBranch === curBranch) { - let error = new Error('Incorrect usage of "cherryPick". Source commit is already on current branch'); + 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, @@ -42013,7 +42736,9 @@ const cherryPick = function(sourceId, targetId, tag) { } 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"); + 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, @@ -42042,7 +42767,9 @@ const cherryPick = function(sourceId, targetId, tag) { const checkout = function(branch2) { branch2 = common$1.sanitizeText(branch2, getConfig$1()); if (branches[branch2] === void 0) { - let error = new Error('Trying to checkout branch which is not yet created. (Help try using "branch ' + branch2 + '")'); + 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, @@ -42123,9 +42850,10 @@ const getBranchesAsObjArray = function() { if (branchConfig.order !== null) { return branchConfig; } - return __spreadProps(__spreadValues$1({}, branchConfig), { + return { + ...branchConfig, order: parseFloat(`0.${i}`, 10) - }); + }; }).sort((a, b) => a.order - b.order).map(({ name }) => ({ name })); return branchesArray; }; @@ -42271,8 +42999,14 @@ const drawCommits = (svg, commits2, modifyGraph) => { circle.attr("y", y - 10); circle.attr("height", 20); circle.attr("width", 20); - circle.attr("class", `commit ${commit2.id} commit-highlight${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-outer`); - gBullets.append("rect").attr("x", x - 6).attr("y", y - 6).attr("height", 12).attr("width", 12).attr("class", `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-inner`); + circle.attr( + "class", + `commit ${commit2.id} commit-highlight${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-outer` + ); + gBullets.append("rect").attr("x", x - 6).attr("y", y - 6).attr("height", 12).attr("width", 12).attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT} ${typeClass}-inner` + ); } else if (commitSymbolType === commitType.CHERRY_PICK) { gBullets.append("circle").attr("cx", x).attr("cy", y).attr("r", 10).attr("class", `commit ${commit2.id} ${typeClass}`); gBullets.append("circle").attr("cx", x - 3).attr("cy", y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${commit2.id} ${typeClass}`); @@ -42284,17 +43018,26 @@ const drawCommits = (svg, commits2, modifyGraph) => { circle.attr("cx", x); circle.attr("cy", y); circle.attr("r", commit2.type === commitType.MERGE ? 9 : 10); - circle.attr("class", `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}`); + circle.attr( + "class", + `commit ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); if (commitSymbolType === commitType.MERGE) { const circle2 = gBullets.append("circle"); circle2.attr("cx", x); circle2.attr("cy", y); circle2.attr("r", 6); - circle2.attr("class", `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}`); + circle2.attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); } if (commitSymbolType === commitType.REVERSE) { const cross = gBullets.append("path"); - cross.attr("d", `M ${x - 5},${y - 5}L${x + 5},${y + 5}M${x - 5},${y + 5}L${x + 5},${y - 5}`).attr("class", `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}`); + cross.attr("d", `M ${x - 5},${y - 5}L${x + 5},${y + 5}M${x - 5},${y + 5}L${x + 5},${y - 5}`).attr( + "class", + `commit ${typeClass} ${commit2.id} commit${branchPos[commit2.branch].index % THEME_COLOR_LIMIT}` + ); } } } @@ -42312,7 +43055,10 @@ const drawCommits = (svg, commits2, modifyGraph) => { if (gitGraphConfig.rotateCommitLabel) { let r_x = -7.5 - (bbox.width + 10) / 25 * 9.5; let r_y = 10 + bbox.width / 25 * 8.5; - wrapper.attr("transform", "translate(" + r_x + ", " + r_y + ") rotate(" + -45 + ", " + pos + ", " + y + ")"); + wrapper.attr( + "transform", + "translate(" + r_x + ", " + r_y + ") rotate(" + -45 + ", " + pos + ", " + y + ")" + ); } } if (commit2.tag) { @@ -42323,13 +43069,16 @@ const drawCommits = (svg, commits2, modifyGraph) => { tag.attr("x", pos + 10 - tagBbox.width / 2); const h2 = tagBbox.height / 2; const ly = y - 19.2; - rect.attr("class", "tag-label-bkg").attr("points", ` + rect.attr("class", "tag-label-bkg").attr( + "points", + ` ${pos - tagBbox.width / 2 - px / 2},${ly + py} ${pos - tagBbox.width / 2 - px / 2},${ly - py} ${pos + 10 - tagBbox.width / 2 - px},${ly - h2 - py} ${pos + 10 + tagBbox.width / 2 + px},${ly - h2 - py} ${pos + 10 + tagBbox.width / 2 + px},${ly + h2 + py} - ${pos + 10 - tagBbox.width / 2 - px},${ly + h2 + py}`); + ${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"); } } @@ -42435,7 +43184,10 @@ const drawBranches = (svg, branches2) => { 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) + ")"); + label.attr( + "transform", + "translate(" + (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)) + ", " + (pos - bbox.height / 2 - 1) + ")" + ); bkg.attr("transform", "translate(" + -19 + ", " + (pos - bbox.height / 2) + ")"); }); }; @@ -42459,8 +43211,18 @@ const draw$d = function(txt, id, ver, diagObj) { } drawArrows(diagram2, allCommitsDict); drawCommits(diagram2, allCommitsDict, true); - utils.insertTitle(diagram2, "gitTitleText", gitGraphConfig.titleTopMargin, diagObj.db.getDiagramTitle()); - setupGraphViewbox(void 0, diagram2, gitGraphConfig.diagramPadding, (_a = gitGraphConfig.useMaxWidth) != null ? _a : conf.useMaxWidth); + utils.insertTitle( + diagram2, + "gitTitleText", + gitGraphConfig.titleTopMargin, + diagObj.db.getDiagramTitle() + ); + setupGraphViewbox( + void 0, + diagram2, + gitGraphConfig.diagramPadding, + (_a = gitGraphConfig.useMaxWidth) != null ? _a : conf.useMaxWidth + ); }; const gitGraphRenderer = { draw: draw$d @@ -42474,13 +43236,15 @@ const getStyles$b = (options2) => ` font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); } - ${[0, 1, 2, 3, 4, 5, 6, 7].map((i) => ` + ${[0, 1, 2, 3, 4, 5, 6, 7].map( + (i) => ` .branch-label${i} { fill: ${options2["gitBranchLabel" + i]}; } .commit${i} { stroke: ${options2["git" + i]}; fill: ${options2["git" + i]}; } .commit-highlight${i} { stroke: ${options2["gitInv" + i]}; fill: ${options2["gitInv" + i]}; } .label${i} { fill: ${options2["git" + i]}; } .arrow${i} { stroke: ${options2["git" + i]}; } - `).join("\n")} + ` +).join("\n")} .branch { stroke-width: 1; @@ -42836,7 +43600,12 @@ define(Lab, lab, extend$1(Color, { x = Xn * lab2xyz(x); y = Yn * lab2xyz(y); z = Zn * lab2xyz(z); - return new Rgb(lrgb2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.033454 * z), lrgb2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z), this.opacity); + return new Rgb( + lrgb2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), + lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.033454 * z), + lrgb2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z), + this.opacity + ); } })); function xyz2lab(t) { @@ -43509,7 +44278,12 @@ timeInterval((date2) => { }, (date2) => { return date2.getUTCHours(); }); -const timeDay = timeInterval((date2) => date2.setHours(0, 0, 0, 0), (date2, step) => date2.setDate(date2.getDate() + step), (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, (date2) => date2.getDate() - 1); +const timeDay = timeInterval( + (date2) => date2.setHours(0, 0, 0, 0), + (date2, step) => date2.setDate(date2.getDate() + step), + (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, + (date2) => date2.getDate() - 1 +); const utcDay = timeInterval((date2) => { date2.setUTCHours(0, 0, 0, 0); }, (date2, step) => { @@ -44292,7 +45066,7 @@ var isoWeek = { exports: {} }; var n = d.startOf; d.startOf = function(e3, t4) { var i2 = this.$utils(), s2 = !!i2.u(t4) || t4; - return i2.p(e3) === "isoweek" ? 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); + return "isoweek" === i2.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); }; }; }); @@ -44314,10 +45088,10 @@ var customParseFormat = { exports: {} }; (this.zone || (this.zone = {})).offset = function(e4) { if (!e4) return 0; - if (e4 === "Z") + if ("Z" === e4) return 0; var t4 = e4.match(/([+-]|\d\d)/g), n2 = 60 * t4[1] + (+t4[2] || 0); - return n2 === 0 ? 0 : t4[0] === "+" ? -n2 : n2; + return 0 === n2 ? 0 : "+" === t4[0] ? -n2 : n2; }(e3); }], h = function(e3) { var t4 = o[e3]; @@ -44378,7 +45152,7 @@ var customParseFormat = { exports: {} }; return function(e3) { for (var t4 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) { var i3 = s2[n3]; - if (typeof i3 == "string") + if ("string" == typeof i3) r3 += i3.length; else { var o2 = i3.regex, f3 = i3.parser, h3 = e3.slice(r3), u3 = o2.exec(h3)[0]; @@ -44387,9 +45161,9 @@ var customParseFormat = { exports: {} }; } return function(e4) { var t5 = e4.afternoon; - if (t5 !== void 0) { + if (void 0 !== t5) { var n4 = e4.hours; - t5 ? n4 < 12 && (e4.hours += 12) : n4 === 12 && (e4.hours = 0), delete e4.afternoon; + t5 ? n4 < 12 && (e4.hours += 12) : 12 === n4 && (e4.hours = 0), delete e4.afternoon; } }(t4), t4; }; @@ -44401,12 +45175,12 @@ var customParseFormat = { exports: {} }; var t5 = e4.date, r3 = e4.utc, s2 = e4.args; this.$u = r3; var a2 = s2[1]; - if (typeof a2 == "string") { - var f2 = s2[2] === true, h2 = s2[3] === true, u2 = f2 || h2, d2 = s2[2]; + if ("string" == typeof a2) { + var f2 = true === s2[2], h2 = true === s2[3], u2 = f2 || h2, d2 = s2[2]; h2 && (d2 = s2[2]), o = this.$locale(), !f2 && d2 && (o = n2.Ls[d2]), this.$d = function(e6, t6, n3) { try { if (["x", "X"].indexOf(t6) > -1) - return new Date((t6 === "X" ? 1e3 : 1) * e6); + return new Date(("X" === t6 ? 1e3 : 1) * e6); var r4 = c(t6)(e6), i3 = r4.year, o2 = r4.month, s3 = r4.day, a3 = r4.hours, f3 = r4.minutes, h3 = r4.seconds, u3 = r4.milliseconds, d3 = r4.zone, l2 = new Date(), m2 = s3 || (i3 || o2 ? 1 : l2.getDate()), M2 = i3 || l2.getFullYear(), Y = 0; i3 && !o2 || (Y = o2 > 0 ? o2 - 1 : l2.getMonth()); var p = a3 || 0, v = f3 || 0, D = h3 || 0, g = u3 || 0; @@ -44414,7 +45188,7 @@ var customParseFormat = { exports: {} }; } catch (e7) { return new Date(""); } - }(t5, a2, r3), this.init(), d2 && d2 !== true && (this.$L = this.locale(d2).$L), u2 && t5 != this.format(a2) && (this.$d = new Date("")), o = {}; + }(t5, a2, r3), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t5 != this.format(a2) && (this.$d = new Date("")), o = {}; } else if (a2 instanceof Array) for (var l = a2.length, m = 1; m <= l; m += 1) { s2[1] = a2[m - 1]; @@ -44457,13 +45231,13 @@ var advancedFormat = { exports: {} }; return r2.ordinal(t4.week(), "W"); case "w": case "ww": - return s.s(t4.week(), e4 === "w" ? 1 : 2, "0"); + return s.s(t4.week(), "w" === e4 ? 1 : 2, "0"); case "W": case "WW": - return s.s(t4.isoWeek(), e4 === "W" ? 1 : 2, "0"); + return s.s(t4.isoWeek(), "W" === e4 ? 1 : 2, "0"); case "k": case "kk": - return s.s(String(t4.$H === 0 ? 24 : t4.$H), e4 === "k" ? 1 : 2, "0"); + 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": @@ -45317,7 +46091,13 @@ const checkTaskDates = function(task, dateFormat2, excludes2, includes2) { } else { originalEndTime = dayjs(task.endTime, dateFormat2, true); } - const [fixedEndTime, renderEndTime] = fixTaskDates(startTime, originalEndTime, dateFormat2, excludes2, includes2); + const [fixedEndTime, renderEndTime] = fixTaskDates( + startTime, + originalEndTime, + dateFormat2, + excludes2, + includes2 + ); task.endTime = fixedEndTime.toDate(); task.renderEndTime = renderEndTime; }; @@ -45565,10 +46345,19 @@ const compileTasks$2 = function() { break; } if (rawTasks$2[pos].startTime) { - rawTasks$2[pos].endTime = getEndDate(rawTasks$2[pos].startTime, dateFormat, rawTasks$2[pos].raw.endTime.data, inclusiveEndDates); + 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(); + rawTasks$2[pos].manualEndTime = dayjs( + rawTasks$2[pos].raw.endTime.data, + "YYYY-MM-DD", + true + ).isValid(); checkTaskDates(rawTasks$2[pos], dateFormat, excludes, includes); } } @@ -45634,21 +46423,24 @@ const setClickFun = function(id, functionName, functionArgs) { } }; const pushFun = function(id, callbackFunction) { - funs.push(function() { - const elem = document.querySelector(`[id="${id}"]`); - if (elem !== null) { - elem.addEventListener("click", function() { - callbackFunction(); - }); - } - }, function() { - const elem = document.querySelector(`[id="${id}-text"]`); - if (elem !== null) { - elem.addEventListener("click", function() { - callbackFunction(); - }); + funs.push( + function() { + const elem = document.querySelector(`[id="${id}"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } + }, + function() { + const elem = document.querySelector(`[id="${id}-text"]`); + if (elem !== null) { + elem.addEventListener("click", function() { + callbackFunction(); + }); + } } - }); + ); }; const setClickEvent$1 = function(ids, functionName, functionArgs) { ids.split(",").forEach(function(id) { @@ -45817,7 +46609,16 @@ const draw$c = function(text, id, version, diagObj) { const topPadding = conf.topPadding; const leftPadding = conf.leftPadding; const colorScale = linear().domain([0, categories.length]).range(["#00B9FA", "#F95002"]).interpolate(interpolateHcl); - drawExcludeDays(gap, topPadding, leftPadding, pageWidth, pageHeight, tasks2, diagObj.db.getExcludes(), diagObj.db.getIncludes()); + 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); @@ -45995,7 +46796,10 @@ const draw$c = function(text, id, version, diagObj) { } } function drawExcludeDays(theGap, theTopPad, theSidePad, w2, h2, tasks2, excludes2, includes2) { - const minTime = tasks2.reduce((min2, { startTime }) => min2 ? Math.min(min2, startTime) : startTime, 0); + 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) { @@ -46037,7 +46841,9 @@ const draw$c = function(text, id, version, diagObj) { function makeGrid(theSidePad, theTopPad, w2, h2) { let bottomXAxis = axisBottom(timeScale).tickSize(-h2 + theTopPad + conf.gridLineStartPadding).tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || "%Y-%m-%d")); const reTickInterval = /^([1-9]\d*)(minute|hour|day|week|month)$/; - const resultTickInterval = reTickInterval.exec(diagObj.db.getTickInterval() || conf.tickInterval); + const resultTickInterval = reTickInterval.exec( + diagObj.db.getTickInterval() || conf.tickInterval + ); if (resultTickInterval !== null) { const every = resultTickInterval[1]; const interval = resultTickInterval[2]; @@ -47090,7 +47896,7 @@ function arc() { class InternMap extends Map { constructor(entries, key = keyof) { super(); - Object.defineProperties(this, { _intern: { value: new Map() }, _key: { value: key } }); + Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } }); if (entries != null) for (const [key2, value] of entries) this.set(key2, value); @@ -48838,10 +49644,13 @@ const insertLineEndings = (parentNode, conf2) => { 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 + 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); + L0,${conf2.line_height}` + ).attr("stroke-width", 1); }; const markers = { ReqMarkers, @@ -48918,10 +49727,16 @@ const drawRelationshipFromLayout = function(svg, rel, g, insert, diagObj) { }); const svgPath = svg.insert("path", "#" + insert).attr("class", "er relationshipLine").attr("d", lineFunction(edge.points)).attr("fill", "none"); if (rel.type == diagObj.db.Relationships.CONTAINS) { - svgPath.attr("marker-start", "url(" + common$1.getUrl(conf$5.arrowMarkerAbsolute) + "#" + rel.type + "_line_ending)"); + 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)"); + svgPath.attr( + "marker-end", + "url(" + common$1.getUrl(conf$5.arrowMarkerAbsolute) + "#" + markers.ReqMarkers.ARROW + "_line_ending)" + ); } addEdgeLabel(svg, svgPath, conf$5, `<<${rel.type}>>`); return; @@ -48938,12 +49753,17 @@ const drawReqs = (reqs, graph, svgNode) => { `<<${req.type}>>`, `${req.name}` ]); - newBodyNode(groupNode, reqName + "_body", [ - `Id: ${req.id}`, - `Text: ${req.text}`, - `Risk: ${req.risk}`, - `Verification: ${req.verifyMethod}` - ], titleNodeInfo.y); + 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, @@ -48961,7 +49781,12 @@ const drawElements = (els, graph, svgNode) => { const textId = "element-" + id; const rectNode = newRectNode(groupNode, textId); let titleNodeInfo = newTitleNode(groupNode, textId + "_title", [`<>`, `${elName}`]); - newBodyNode(groupNode, textId + "_body", [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`], titleNodeInfo.y); + newBodyNode( + groupNode, + textId + "_body", + [`Type: ${el.type || "Not Specified"}`, `Doc Ref: ${el.docRef || "None"}`], + titleNodeInfo.y + ); const rectBBox = rectNode.node().getBBox(); graph.setNode(id, { width: rectBBox.width, @@ -48983,7 +49808,10 @@ const adjustEntities = function(svgNode, graph) { graph.nodes().forEach(function(v) { if (v !== void 0 && graph.node(v) !== void 0) { svgNode.select("#" + v); - svgNode.select("#" + v).attr("transform", "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )"); + svgNode.select("#" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )" + ); } }); return; @@ -49905,7 +50733,9 @@ const addActor = function(id, name, description, type) { const old = actors$1[id]; if (old) { if (currentBox && old.box && currentBox !== old.box) { - throw new Error("A same participant should only be defined in one Box: " + old.name + " can't be in '" + old.box.name + "' and in '" + currentBox.name + "' at the same time."); + 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; @@ -50535,7 +51365,16 @@ const drawPopup = function(elem, actor, minMenuWidth, textAttrs, forceMenus) { var sanitizedLink = sanitizeUrl_1(links[key]); linkElem.attr("xlink:href", sanitizedLink); linkElem.attr("target", "_blank"); - _drawMenuItemTextCandidateFunc(textAttrs)(key, linkElem, rectData.x + 10, rectData.height + linkY, menuWidth, 20, { class: "actor" }, textAttrs); + _drawMenuItemTextCandidateFunc(textAttrs)( + key, + linkElem, + rectData.x + 10, + rectData.height + linkY, + menuWidth, + 20, + { class: "actor" }, + textAttrs + ); linkY += 30; } } @@ -50593,7 +51432,9 @@ const drawText$2 = function(elem, textData) { break; case "bottom": case "end": - yfunc = () => Math.round(textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin); + yfunc = () => Math.round( + textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin + ); break; } } @@ -50727,7 +51568,16 @@ const drawActorTypeParticipant = function(elem, actor, conf2, isFooter) { drawImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc); } } - _drawTextCandidateFunc$2(conf2)(actor.description, g, rect.x, rect.y, rect.width, rect.height, { class: "actor" }, conf2); + _drawTextCandidateFunc$2(conf2)( + actor.description, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "actor" }, + conf2 + ); let height = actor.height; if (rectElem.node) { const bounds2 = rectElem.node().getBBox(); @@ -50766,7 +51616,16 @@ const drawActorTypeActor = function(elem, actor, conf2, isFooter) { circle.attr("height", actor.height); const bounds2 = actElem.node().getBBox(); actor.height = bounds2.height; - _drawTextCandidateFunc$2(conf2)(actor.description, actElem, rect.x, rect.y + 35, rect.width, rect.height, { class: "actor" }, conf2); + _drawTextCandidateFunc$2(conf2)( + actor.description, + actElem, + rect.x, + rect.y + 35, + rect.width, + rect.height, + { class: "actor" }, + conf2 + ); return actor.height; }; const drawActor = function(elem, actor, conf2, isFooter) { @@ -50782,7 +51641,16 @@ const drawBox = function(elem, box, conf2) { 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); + _drawTextCandidateFunc$2(conf2)( + box.name, + g, + box.x, + box.y + (box.textMaxHeight || 0) / 2, + box.width, + 0, + { class: "text" }, + conf2 + ); } g.lower(); }; @@ -50819,7 +51687,10 @@ const drawLoop = function(elem, loopModel, labelText, conf2) { 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"); + drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style( + "stroke-dasharray", + "3, 3" + ); }); } let txt = getTextObj$2(); @@ -50865,7 +51736,9 @@ const drawLoop = function(elem, loopModel, labelText, conf2) { 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)); + 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); } }); @@ -50886,13 +51759,22 @@ const drawBackgroundRect$2 = function(elem, bounds2) { rectElem.lower(); }; 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"); + 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"); + 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"); + 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"); @@ -51048,7 +51930,10 @@ const bounds$1 = { 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)); + 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 = []; @@ -51225,7 +52110,9 @@ const drawNote$1 = function(elem, noteModel) { 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)); + 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); @@ -51274,7 +52161,12 @@ function boundMessage(_diagram, msgModel) { } totalOffset += 30; const dx = Math.max(textWidth / 2, conf$4.width / 2); - bounds$1.insert(startx - dx, bounds$1.getVerticalPos() - 10 + totalOffset, stopx + dx, bounds$1.getVerticalPos() + 30 + totalOffset); + 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; @@ -51308,9 +52200,15 @@ const drawMessage = function(diagram2, msgModel, lineStartY, diagObj) { let line; if (startx === stopx) { if (conf$4.rightAngles) { - line = diagram2.append("path").attr("d", `M ${startx},${lineStartY} H ${startx + Math.max(conf$4.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}`); + line = diagram2.append("path").attr( + "d", + `M ${startx},${lineStartY} H ${startx + Math.max(conf$4.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}` + ); } else { - line = diagram2.append("path").attr("d", "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20)); + line = diagram2.append("path").attr( + "d", + "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20) + ); } } else { line = diagram2.append("line"); @@ -51404,7 +52302,14 @@ const drawActorsPopup = function(diagram2, actors2, actorKeys, doc) { 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); + const menuDimensions = svgDraw$3.drawPopup( + diagram2, + actor, + minMenuWidth, + conf$4, + conf$4.forceMenus, + doc + ); if (menuDimensions.height > maxHeight) { maxHeight = menuDimensions.height; } @@ -51503,7 +52408,13 @@ const draw$8 = function(_text, id, _version, diagObj) { activationData.starty = verticalPos - 6; verticalPos += 12; } - svgDraw$3.drawActivation(diagram2, activationData, verticalPos, conf$4, actorActivations(msg.from.actor).length); + 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; @@ -51523,7 +52434,13 @@ const draw$8 = function(_text, id, _version, diagObj) { 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)); + 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(); @@ -51532,7 +52449,13 @@ const draw$8 = function(_text, id, _version, diagObj) { 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)); + 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(); @@ -51541,7 +52464,13 @@ const draw$8 = function(_text, id, _version, diagObj) { 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)); + 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(); @@ -51550,10 +52479,22 @@ const draw$8 = function(_text, id, _version, diagObj) { 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)); + 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)); + 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(); @@ -51562,10 +52503,22 @@ const draw$8 = function(_text, id, _version, diagObj) { bounds$1.models.addLoop(loopModel); break; case diagObj.db.LINETYPE.PAR_START: - adjustLoopHeightForWrap(loopWidths, msg, conf$4.boxMargin, conf$4.boxMargin + conf$4.boxTextMargin, (message) => bounds$1.newLoop(message)); + adjustLoopHeightForWrap( + loopWidths, + msg, + conf$4.boxMargin, + conf$4.boxMargin + conf$4.boxTextMargin, + (message) => bounds$1.newLoop(message) + ); break; case diagObj.db.LINETYPE.PAR_AND: - adjustLoopHeightForWrap(loopWidths, msg, conf$4.boxMargin + conf$4.boxTextMargin, conf$4.boxMargin, (message) => bounds$1.addSectionToLoop(message)); + 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(); @@ -51583,10 +52536,22 @@ const draw$8 = function(_text, id, _version, diagObj) { } break; case diagObj.db.LINETYPE.CRITICAL_START: - adjustLoopHeightForWrap(loopWidths, msg, conf$4.boxMargin, conf$4.boxMargin + conf$4.boxTextMargin, (message) => bounds$1.newLoop(message)); + 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)); + 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(); @@ -51595,7 +52560,13 @@ const draw$8 = function(_text, id, _version, diagObj) { 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)); + 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(); @@ -51672,7 +52643,10 @@ const draw$8 = function(_text, id, _version, diagObj) { } configureSvgSize(diagram2, height, width, conf$4.useMaxWidth); const extraVertForTitle = title ? 40 : 0; - diagram2.attr("viewBox", box.startx - conf$4.diagramMarginX + " -" + (conf$4.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)); + diagram2.attr( + "viewBox", + box.startx - conf$4.diagramMarginX + " -" + (conf$4.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle) + ); log$1.debug(`models:`, bounds$1.models); }; function getMaxMessageWidthPerActor(actors2, messages2, diagObj) { @@ -51693,22 +52667,46 @@ function getMaxMessageWidthPerActor(actors2, messages2, diagObj) { const messageDimensions = utils.calculateTextDimensions(wrappedMessage, textFont); const messageWidth = messageDimensions.width + 2 * conf$4.wrapPadding; if (isMessage && msg.from === actor.nextActor) { - maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth); + maxMessageWidthPerActor[msg.to] = Math.max( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth + ); } else if (isMessage && msg.from === actor.prevActor) { - maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth); + maxMessageWidthPerActor[msg.from] = Math.max( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); } else if (isMessage && msg.from === msg.to) { - maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2); - maxMessageWidthPerActor[msg.to] = Math.max(maxMessageWidthPerActor[msg.to] || 0, messageWidth / 2); + maxMessageWidthPerActor[msg.from] = Math.max( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); + maxMessageWidthPerActor[msg.to] = Math.max( + maxMessageWidthPerActor[msg.to] || 0, + messageWidth / 2 + ); } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { - maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth); + maxMessageWidthPerActor[msg.from] = Math.max( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth + ); } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) { - maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth); + maxMessageWidthPerActor[actor.prevActor] = Math.max( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth + ); } else if (msg.placement === diagObj.db.PLACEMENT.OVER) { if (actor.prevActor) { - maxMessageWidthPerActor[actor.prevActor] = Math.max(maxMessageWidthPerActor[actor.prevActor] || 0, messageWidth / 2); + maxMessageWidthPerActor[actor.prevActor] = Math.max( + maxMessageWidthPerActor[actor.prevActor] || 0, + messageWidth / 2 + ); } if (actor.nextActor) { - maxMessageWidthPerActor[msg.from] = Math.max(maxMessageWidthPerActor[msg.from] || 0, messageWidth / 2); + maxMessageWidthPerActor[msg.from] = Math.max( + maxMessageWidthPerActor[msg.from] || 0, + messageWidth / 2 + ); } } } @@ -51733,7 +52731,11 @@ function calculateActorMargins(actors2, actorToMessageWidth, boxes2) { 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)); + 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 : Math.max(conf$4.width, actDims.width + 2 * conf$4.wrapPadding); @@ -51782,7 +52784,10 @@ 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)); + 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 : Math.max(conf$4.width, textDimensions.width + 2 * conf$4.noteMargin), height: 0, @@ -51793,13 +52798,22 @@ const buildNoteModel = function(msg, actors2, diagObj) { message: msg.message }; if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) { - noteModel.width = shouldWrap ? Math.max(conf$4.width, textDimensions.width) : Math.max(actors2[msg.from].width / 2 + actors2[msg.to].width / 2, textDimensions.width + 2 * conf$4.noteMargin); + noteModel.width = shouldWrap ? Math.max(conf$4.width, textDimensions.width) : Math.max( + 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 ? Math.max(conf$4.width, textDimensions.width + 2 * conf$4.noteMargin) : Math.max(actors2[msg.from].width / 2 + actors2[msg.to].width / 2, textDimensions.width + 2 * conf$4.noteMargin); + noteModel.width = shouldWrap ? Math.max(conf$4.width, textDimensions.width + 2 * conf$4.noteMargin) : Math.max( + 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, Math.max(conf$4.width, actors2[msg.from].width), noteFont(conf$4)) : msg.message, noteFont(conf$4)); + textDimensions = utils.calculateTextDimensions( + shouldWrap ? utils.wrapLabel(msg.message, Math.max(conf$4.width, actors2[msg.from].width), noteFont(conf$4)) : msg.message, + noteFont(conf$4) + ); noteModel.width = shouldWrap ? Math.max(conf$4.width, actors2[msg.from].width) : Math.max(actors2[msg.from].width, conf$4.width, textDimensions.width + 2 * conf$4.noteMargin); noteModel.startx = startx + (actors2[msg.from].width - noteModel.width) / 2; } else { @@ -51807,9 +52821,15 @@ const buildNoteModel = function(msg, actors2, diagObj) { 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}]`); + 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) { @@ -51836,11 +52856,19 @@ const buildMessageModel = function(msg, actors2, diagObj) { const allBounds = [...fromBounds, ...toBounds]; const boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]); if (msg.wrap && msg.message) { - msg.message = utils.wrapLabel(msg.message, Math.max(boundedWidth + 2 * conf$4.wrapPadding, conf$4.width), messageFont(conf$4)); + msg.message = utils.wrapLabel( + msg.message, + Math.max(boundedWidth + 2 * conf$4.wrapPadding, conf$4.width), + messageFont(conf$4) + ); } const msgDims = utils.calculateTextDimensions(msg.message, messageFont(conf$4)); return { - width: Math.max(msg.wrap ? 0 : msgDims.width + 2 * conf$4.wrapPadding, boundedWidth + 2 * conf$4.wrapPadding, conf$4.width), + width: Math.max( + 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], @@ -51933,7 +52961,11 @@ const calculateLoopBounds = function(messages2, actors2, _maxWidthPerActor, diag if (msgModel.startx === msgModel.stopx) { const from = actors2[msg.from]; const to = actors2[msg.to]; - current.from = Math.min(from.x - msgModel.width / 2, from.x - from.width / 2, current.from); + current.from = Math.min( + from.x - msgModel.width / 2, + from.x - from.width / 2, + current.from + ); current.to = Math.max(to.x + msgModel.width / 2, to.x + from.width / 2, current.to); current.width = Math.max(current.width, Math.abs(current.to - current.from)) - conf$4.labelBoxWidth; } else { @@ -52873,8 +53905,14 @@ const addRelation$1 = function(relation) { addClass(relation.id2); relation.id1 = splitClassNameAndType(relation.id1).className; relation.id2 = splitClassNameAndType(relation.id2).className; - relation.relationTitle1 = common$1.sanitizeText(relation.relationTitle1.trim(), getConfig$1()); - relation.relationTitle2 = common$1.sanitizeText(relation.relationTitle2.trim(), getConfig$1()); + relation.relationTitle1 = common$1.sanitizeText( + relation.relationTitle1.trim(), + getConfig$1() + ); + relation.relationTitle2 = common$1.sanitizeText( + relation.relationTitle2.trim(), + getConfig$1() + ); relations.push(relation); }; const addAnnotation = function(className, annotation) { @@ -52991,9 +54029,13 @@ const setClickFunc = function(domId, functionName, functionArgs) { functions.push(function() { const elem = document.querySelector(`[id="${elemId}"]`); if (elem !== null) { - elem.addEventListener("click", function() { - utils.runFunc(functionName, ...argList); - }, false); + elem.addEventListener( + "click", + function() { + utils.runFunc(functionName, ...argList); + }, + false + ); } }); } @@ -53235,10 +54277,10 @@ g.classGroup line { `; const styles$4 = getStyles$5; -let idCache$2 = {}; +let idCache = {}; const padding = 20; const getGraphId = function(label) { - const foundEntry = Object.entries(idCache$2).find((entry) => entry[1].label === label); + const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label); if (foundEntry) { return foundEntry[0]; } @@ -53255,7 +54297,7 @@ const insertMarkers$1 = function(elem) { }; const draw$7 = function(text, id, _version, diagObj) { const conf = getConfig$1().class; - idCache$2 = {}; + idCache = {}; log$1.info("Rendering diagram " + text); const securityLevel = getConfig$1().securityLevel; let sandboxElement; @@ -53279,42 +54321,57 @@ const draw$7 = function(text, id, _version, diagObj) { for (const key of keys) { const classDef = classes[key]; const node = svgDraw$4.drawClass(diagram2, classDef, conf, diagObj); - idCache$2[node.id] = node; + idCache[node.id] = node; g.setNode(node.id, node); log$1.info("Org height: " + node.height); } const relations = diagObj.db.getRelations(); relations.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"); + 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 notes = diagObj.db.getNotes(); notes.forEach(function(note) { log$1.debug(`Adding note: ${JSON.stringify(note)}`); const node = svgDraw$4.drawNote(diagram2, note, conf, diagObj); - idCache$2[node.id] = node; + idCache[node.id] = node; g.setNode(node.id, node); if (note.class && note.class in classes) { - g.setEdge(note.id, getGraphId(note.class), { - relation: { - id1: note.id, - id2: note.class, + g.setEdge( + note.id, + getGraphId(note.class), + { relation: { - type1: "none", - type2: "none", - lineType: 10 + id1: note.id, + id2: note.class, + relation: { + type1: "none", + type2: "none", + lineType: 10 + } } - } - }, "DEFAULT"); + }, + "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))); - root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr("transform", "translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )"); + root.select("#" + (diagObj.db.lookUpDomId(v) || v)).attr( + "transform", + "translate(" + (g.node(v).x - g.node(v).width / 2) + "," + (g.node(v).y - g.node(v).height / 2) + " )" + ); } }); g.edges().forEach(function(e) { @@ -53353,22 +54410,6 @@ var classDiagram634fc78b = /*#__PURE__*/Object.freeze({ diagram: diagram$7 }); -var __defProp = Object.defineProperty; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; const sanitizeText$1 = (txt) => common$1.sanitizeText(txt, getConfig$1()); let conf$3 = { dividerMargin: 10, @@ -53512,7 +54553,10 @@ const addRelations = function(relations, g) { }); }; const setConf$3 = function(cnf) { - conf$3 = __spreadValues(__spreadValues({}, conf$3), cnf); + conf$3 = { + ...conf$3, + ...cnf + }; }; const draw$6 = function(text, id, _version, diagObj) { var _a, _b, _c, _d; @@ -53548,7 +54592,13 @@ const draw$6 = function(text, id, _version, diagObj) { const root = securityLevel === "sandbox" ? select(sandboxElement.nodes()[0].contentDocument.body) : select("body"); const svg = root.select(`[id="${id}"]`); const element = root.select("#" + id + " g"); - render$1(element, g, ["aggregation", "extension", "composition", "dependency", "lollipop"], "classDiagram", id); + render$1( + element, + g, + ["aggregation", "extension", "composition", "dependency", "lollipop"], + "classDiagram", + id + ); utils.insertTitle(svg, "classTitleText", (_d = conf2 == null ? void 0 : conf2.titleTopMargin) != null ? _d : 5, diagObj.db.getDiagramTitle()); setupGraphViewbox$1(g, svg, conf2 == null ? void 0 : conf2.diagramPadding, conf2 == null ? void 0 : conf2.useMaxWidth); if (!(conf2 == null ? void 0 : conf2.htmlLabels)) { @@ -54509,7 +55559,16 @@ const 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); + 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); @@ -54556,7 +55615,10 @@ const addState = function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = nul } if (note) { currentDocument.states[trimmedId].note = note; - currentDocument.states[trimmedId].note.text = common$1.sanitizeText(currentDocument.states[trimmedId].note.text, getConfig$1()); + currentDocument.states[trimmedId].note.text = common$1.sanitizeText( + currentDocument.states[trimmedId].note.text, + getConfig$1() + ); } if (classes2) { log$1.info("Setting state classes", trimmedId, classes2); @@ -54624,8 +55686,26 @@ function addRelationObjs(item1, item2, relationTitle) { 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); + 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, @@ -54949,19 +56029,6 @@ g.stateGroup line { `; 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$1().state.sizeUnit).attr("cx", getConfig$1().state.padding + getConfig$1().state.sizeUnit).attr("cy", getConfig$1().state.padding + getConfig$1().state.sizeUnit); const drawDivider = (g) => g.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", getConfig$1().state.textHeight).attr("class", "divider").attr("x2", getConfig$1().state.textHeight * 2).attr("y1", 0).attr("y2", 0); const drawSimpleState = (g, stateDef) => { @@ -54980,7 +56047,10 @@ const drawDescrState = (g, stateDef) => { const title = g.append("text").attr("x", 2 * getConfig$1().state.padding).attr("y", getConfig$1().state.textHeight + 1.3 * getConfig$1().state.padding).attr("font-size", getConfig$1().state.fontSize).attr("class", "state-title").text(stateDef.descriptions[0]); const titleBox = title.node().getBBox(); const titleHeight = titleBox.height; - const description = g.append("text").attr("x", getConfig$1().state.padding).attr("y", titleHeight + getConfig$1().state.padding * 0.4 + getConfig$1().state.dividerMargin + getConfig$1().state.textHeight).attr("class", "state-description"); + const description = g.append("text").attr("x", getConfig$1().state.padding).attr( + "y", + titleHeight + getConfig$1().state.padding * 0.4 + getConfig$1().state.dividerMargin + getConfig$1().state.textHeight + ).attr("class", "state-description"); let isFirst = true; let isSecond = true; stateDef.descriptions.forEach(function(descr) { @@ -55022,17 +56092,32 @@ const addTitleAndBox = (g, stateDef, altBkg) => { startX = orgX - (titleWidth - orgWidth) / 2; } const lineY = 1 - getConfig$1().state.textHeight; - g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width).attr("height", graphBox.height + getConfig$1().state.textHeight + getConfig$1().state.titleShift + 1).attr("rx", "0"); + g.insert("rect", ":first-child").attr("x", startX).attr("y", lineY).attr("class", altBkg ? "alt-composit" : "composit").attr("width", width).attr( + "height", + graphBox.height + getConfig$1().state.textHeight + getConfig$1().state.titleShift + 1 + ).attr("rx", "0"); title.attr("x", startX + pad); if (titleWidth <= orgWidth) { title.attr("x", orgX + (width - dblPad) / 2 - titleWidth / 2 + pad); } - g.insert("rect", ":first-child").attr("x", startX).attr("y", getConfig$1().state.titleShift - getConfig$1().state.textHeight - getConfig$1().state.padding).attr("width", width).attr("height", getConfig$1().state.textHeight * 3).attr("rx", getConfig$1().state.radius); - g.insert("rect", ":first-child").attr("x", startX).attr("y", getConfig$1().state.titleShift - getConfig$1().state.textHeight - getConfig$1().state.padding).attr("width", width).attr("height", graphBox.height + 3 + 2 * getConfig$1().state.textHeight).attr("rx", getConfig$1().state.radius); + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + getConfig$1().state.titleShift - getConfig$1().state.textHeight - getConfig$1().state.padding + ).attr("width", width).attr("height", getConfig$1().state.textHeight * 3).attr("rx", getConfig$1().state.radius); + g.insert("rect", ":first-child").attr("x", startX).attr( + "y", + getConfig$1().state.titleShift - getConfig$1().state.textHeight - getConfig$1().state.padding + ).attr("width", width).attr("height", graphBox.height + 3 + 2 * getConfig$1().state.textHeight).attr("rx", getConfig$1().state.radius); return g; }; const drawEndState = (g) => { - g.append("circle").attr("class", "end-state-outer").attr("r", getConfig$1().state.sizeUnit + getConfig$1().state.miniPadding).attr("cx", getConfig$1().state.padding + getConfig$1().state.sizeUnit + getConfig$1().state.miniPadding).attr("cy", getConfig$1().state.padding + getConfig$1().state.sizeUnit + getConfig$1().state.miniPadding); + g.append("circle").attr("class", "end-state-outer").attr("r", getConfig$1().state.sizeUnit + getConfig$1().state.miniPadding).attr( + "cx", + getConfig$1().state.padding + getConfig$1().state.sizeUnit + getConfig$1().state.miniPadding + ).attr( + "cy", + getConfig$1().state.padding + getConfig$1().state.sizeUnit + getConfig$1().state.miniPadding + ); return g.append("circle").attr("class", "end-state-inner").attr("r", getConfig$1().state.sizeUnit).attr("cx", getConfig$1().state.padding + getConfig$1().state.sizeUnit + 2).attr("cy", getConfig$1().state.padding + getConfig$1().state.sizeUnit + 2); }; const drawForkJoinState = (g, stateDef) => { @@ -55112,7 +56197,6 @@ const drawState = function(elem, stateDef) { const stateBox = g.node().getBBox(); stateInfo.width = stateBox.width + 2 * getConfig$1().state.padding; stateInfo.height = stateBox.height + 2 * getConfig$1().state.padding; - idCache$1.set(id, stateInfo); return stateInfo; }; let edgeCount = 0; @@ -55143,7 +56227,10 @@ const drawEdge$1 = function(elem, path, relation) { url = url.replace(/\(/g, "\\("); url = url.replace(/\)/g, "\\)"); } - svgPath.attr("marker-end", "url(" + url + "#" + getRelationType(db$2.relationType.DEPENDENCY) + "End)"); + svgPath.attr( + "marker-end", + "url(" + url + "#" + getRelationType(db$2.relationType.DEPENDENCY) + "End)" + ); if (relation.title !== void 0) { const label = elem.append("g").attr("class", "stateLabel"); const { x, y } = utils.calcLabelPosition(path.points); @@ -55212,7 +56299,10 @@ const draw$5 = function(text, id, _version, diagObj) { const height = bounds.height + padding * 2; const svgWidth = width * 1.75; configureSvgSize(diagram2, height, svgWidth, conf$2.useMaxWidth); - diagram2.attr("viewBox", `${bounds.x - conf$2.padding} ${bounds.y - conf$2.padding} ` + width + " " + height); + diagram2.attr( + "viewBox", + `${bounds.x - conf$2.padding} ${bounds.y - conf$2.padding} ` + width + " " + height + ); }; const getLabelWidth = (text) => { return text ? text.length * conf$2.fontSizeFactor : 1; @@ -55303,12 +56393,17 @@ const renderDoc = (doc, diagram2, parentId, altBkg, root, domDocument, diagObj) relations.forEach(function(relation) { cnt++; 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" + cnt); + graph.setEdge( + relation.id1, + relation.id2, + { + relation, + width: getLabelWidth(relation.title), + height: conf$2.labelHeight * common$1.getRows(relation.title).length, + labelpos: "c" + }, + "id" + cnt + ); }); layout(graph); log$1.debug("Graph after layout", graph.nodes()); @@ -55316,7 +56411,10 @@ const renderDoc = (doc, diagram2, parentId, altBkg, root, domDocument, diagObj) graph.nodes().forEach(function(v) { if (v !== void 0 && graph.node(v) !== void 0) { log$1.warn("Node " + v + ": " + JSON.stringify(graph.node(v))); - root.select("#" + svgElem.id + " #" + v).attr("transform", "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )"); + root.select("#" + svgElem.id + " #" + v).attr( + "transform", + "translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y + (transformationLog[v] ? transformationLog[v].y : 0) - graph.node(v).height / 2) + " )" + ); root.select("#" + svgElem.id + " #" + v).attr("data-x-shift", graph.node(v).x - graph.node(v).width / 2); const dividers = domDocument.querySelectorAll("#" + svgElem.id + " #" + v + " .divider"); dividers.forEach((divider) => { @@ -56582,7 +57680,17 @@ const drawSection$1 = function(elem, section, conf2) { rect.rx = 3; rect.ry = 3; drawRect$1(g, rect); - _drawTextCandidateFunc$1(conf2)(section.text, g, rect.x, rect.y, rect.width, rect.height, { class: "journey-section section-type-" + section.num }, conf2, section.colour); + _drawTextCandidateFunc$1(conf2)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf2, + section.colour + ); }; let taskCount$1 = -1; const drawTask$1 = function(elem, task, conf2) { @@ -56621,7 +57729,17 @@ const drawTask$1 = function(elem, task, conf2) { drawCircle$1(g, circle); xPos += 10; }); - _drawTextCandidateFunc$1(conf2)(task.task, g, rect.x, rect.y, rect.width, rect.height, { class: "task" }, conf2, task.colour); + _drawTextCandidateFunc$1(conf2)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf2, + task.colour + ); }; const drawBackgroundRect$1 = function(elem, bounds2) { const rectElem = drawRect$1(elem, { @@ -56943,7 +58061,7 @@ var elk_bundled = { exports: {} }; function o(i2, f) { if (!n[i2]) { if (!e[i2]) { - var c = typeof commonjsRequire == "function" && commonjsRequire; + var c = "function" == typeof commonjsRequire && commonjsRequire; if (!f && c) return c(i2, true); if (u) @@ -56959,7 +58077,7 @@ var elk_bundled = { exports: {} }; } return n[i2].exports; } - for (var u = typeof commonjsRequire == "function" && commonjsRequire, i = 0; i < t.length; i++) + for (var u = "function" == typeof commonjsRequire && commonjsRequire, i = 0; i < t.length; i++) o(t[i]); return o; } @@ -71880,7 +72998,7 @@ var elk_bundled = { exports: {} }; 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 || b == 0 || isNaN(0) && isNaN(b) ? 0 : a / b; + return Iy(), My(ple), $wnd.Math.abs(0 - b) <= ple || 0 == b || isNaN(0) && isNaN(b) ? 0 : a / b; } function Rrc() { Orc(); @@ -81605,7 +82723,7 @@ var elk_bundled = { exports: {} }; function yrb() { function b() { try { - return new Map().entries().next().done; + return (/* @__PURE__ */ new Map()).entries().next().done; } catch (a) { return false; } @@ -93163,7 +94281,7 @@ var elk_bundled = { exports: {} }; return false; } var a = "__proto__"; - var b = Object.create(null); + var b = /* @__PURE__ */ Object.create(null); if (b[a] !== void 0) { return false; } @@ -106821,12 +107939,12 @@ var elk_bundled = { exports: {} }; e = p * r - n * t; Iy(); My(Jqe); - if ($wnd.Math.abs(0 - e) <= Jqe || e == 0 || isNaN(0) && isNaN(e)) { + if ($wnd.Math.abs(0 - e) <= Jqe || 0 == e || isNaN(0) && isNaN(e)) { return false; } g = 1 / e * ((m - o2) * r - (q - s) * n); h = 1 / e * -(-(m - o2) * t + (q - s) * p); - f = (My(Jqe), ($wnd.Math.abs(0 - g) <= Jqe || g == 0 || 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 || h == 0 || 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)); + f = (My(Jqe), ($wnd.Math.abs(0 - g) <= Jqe || 0 == g || isNaN(0) && isNaN(g) ? 0 : 0 < g ? -1 : 0 > g ? 1 : Ny(isNaN(0), isNaN(g))) < 0 && (My(Jqe), ($wnd.Math.abs(g - 1) <= Jqe || g == 1 || isNaN(g) && isNaN(1) ? 0 : g < 1 ? -1 : g > 1 ? 1 : Ny(isNaN(g), isNaN(1))) < 0) && (My(Jqe), ($wnd.Math.abs(0 - h) <= Jqe || 0 == h || isNaN(0) && isNaN(h) ? 0 : 0 < h ? -1 : 0 > h ? 1 : Ny(isNaN(0), isNaN(h))) < 0) && (My(Jqe), ($wnd.Math.abs(h - 1) <= Jqe || h == 1 || isNaN(h) && isNaN(1) ? 0 : h < 1 ? -1 : h > 1 ? 1 : Ny(isNaN(h), isNaN(1))) < 0)); return f; } function z6d(a) { @@ -109227,7 +110345,7 @@ var elk_bundled = { exports: {} }; this.obj = this.createObject(); } e.prototype.createObject = function(a) { - return Object.create(null); + return /* @__PURE__ */ Object.create(null); }; e.prototype.get = function(a) { return this.obj[a]; @@ -145981,9 +147099,17 @@ const getNextPort = (node, edgeDirection, graphDirection) => { } const result = edgeDirection === "in" ? portPos[node].inPosition : portPos[node].outPosition; if (edgeDirection === "in") { - portPos[node].inPosition = getNextPosition(portPos[node].inPosition, edgeDirection, graphDirection); + portPos[node].inPosition = getNextPosition( + portPos[node].inPosition, + edgeDirection, + graphDirection + ); } else { - portPos[node].outPosition = getNextPosition(portPos[node].outPosition, edgeDirection, graphDirection); + portPos[node].outPosition = getNextPosition( + portPos[node].outPosition, + edgeDirection, + graphDirection + ); } return result; }; @@ -146262,7 +147388,10 @@ const insertEdge = function(edgesEl, edge, edgeData, diagObj, parentLookupDb) { 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})`); + 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) => { @@ -146330,7 +147459,14 @@ const draw$2 = async function(text, id, _version, diagObj) { log$1.info("Subgraphs - ", subGraphs); for (let i = subGraphs.length - 1; i >= 0; i--) { subG = subGraphs[i]; - diagObj.db.addVertex(subG.id, { text: subG.title, type: subG.labelType }, "group", void 0, subG.classes, subG.dir); + diagObj.db.addVertex( + subG.id, + { text: subG.title, type: subG.labelType }, + "group", + void 0, + subG.classes, + subG.dir + ); } const subGraphsEl = svg.insert("g").attr("class", "subgraphs"); const parentLookupDb = addSubGraphs(diagObj.db); @@ -146389,12 +147525,18 @@ const drawNodes$1 = (relX, relY, nodeArray, svg, subgraphsEl, diagObj, depth) => subgraphEl.insert("rect").attr("class", "subgraph subgraph-lvl-" + depth % 5 + " node").attr("x", node.x + relX).attr("y", node.y + relY).attr("width", node.width).attr("height", node.height); const label = subgraphEl.insert("g").attr("class", "label"); const labelCentering = getConfig$1().flowchart.htmlLabels ? node.labelData.width / 2 : 0; - label.attr("transform", `translate(${node.labels[0].x + relX + node.x + labelCentering}, ${node.labels[0].y + relY + node.y + 3})`); + label.attr( + "transform", + `translate(${node.labels[0].x + relX + node.x + labelCentering}, ${node.labels[0].y + relY + node.y + 3})` + ); label.node().appendChild(node.labelData.labelNode); log$1.info("Id (UGH)= ", node.type, node.labels); } else { log$1.info("Id (UGH)= ", node.id); - node.el.attr("transform", `translate(${node.x + relX + node.width / 2}, ${node.y + relY + node.height / 2})`); + node.el.attr( + "transform", + `translate(${node.x + relX + node.width / 2}, ${node.y + relY + node.height / 2})` + ); } } }); @@ -147301,7 +148443,17 @@ const drawSection = function(elem, section, conf) { rect.rx = 3; rect.ry = 3; drawRect(g, rect); - _drawTextCandidateFunc(conf)(section.text, g, rect.x, rect.y, rect.width, rect.height, { class: "journey-section section-type-" + section.num }, conf, section.colour); + _drawTextCandidateFunc(conf)( + section.text, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "journey-section section-type-" + section.num }, + conf, + section.colour + ); }; let taskCount = -1; const drawTask = function(elem, task, conf) { @@ -147326,7 +148478,17 @@ const drawTask = function(elem, task, conf) { rect.ry = 3; drawRect(g, rect); task.x + 14; - _drawTextCandidateFunc(conf)(task.task, g, rect.x, rect.y, rect.width, rect.height, { class: "task" }, conf, task.colour); + _drawTextCandidateFunc(conf)( + task.task, + g, + rect.x, + rect.y, + rect.width, + rect.height, + { class: "task" }, + conf, + task.colour + ); }; const drawBackgroundRect = function(elem, bounds) { const rectElem = drawRect(elem, { @@ -147425,7 +148587,10 @@ const drawNode$1 = function(elem, node, fullSection, conf) { const section = fullSection % MAX_SECTIONS$1 - 1; const nodeElem = elem.append("g"); node.section = section; - nodeElem.attr("class", (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section)); + nodeElem.attr( + "class", + (node.class ? node.class + " " : "") + "timeline-node " + ("section-" + section) + ); const bkgElem = nodeElem.append("g"); const textElem = nodeElem.append("g"); const txt = textElem.append("text").text(node.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(wrap, node.width); @@ -147448,7 +148613,10 @@ const getVirtualNodeHeight = function(elem, node, conf) { }; const defaultBkg$1 = function(elem, node, section) { const rd = 5; - elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr("d", `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z`); + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + node.type).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); }; const svgDraw$1 = { @@ -147560,7 +148728,19 @@ const draw$1 = function(text, id, version, diagObj) { sectionNodeWrapper.attr("transform", `translate(${masterX}, ${sectionBeginY})`); masterY += maxSectionHeight + 50; if (tasksForSection.length > 0) { - drawTasks(svg, tasksForSection, sectionNumber, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, false); + drawTasks( + svg, + tasksForSection, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + false + ); } masterX += 200 * Math.max(tasksForSection.length, 1); masterY = sectionBeginY; @@ -147568,7 +148748,19 @@ const draw$1 = function(text, id, version, diagObj) { }); } else { hasSections = false; - drawTasks(svg, tasks2, sectionNumber, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, true); + drawTasks( + svg, + tasks2, + sectionNumber, + masterX, + masterY, + maxTaskHeight, + conf, + maxEventCount, + maxEventLineLength, + maxSectionHeight, + true + ); } const box = svg.node().getBBox(); log$1.debug("bounds", box); @@ -147578,7 +148770,12 @@ const draw$1 = function(text, id, version, diagObj) { depthY = hasSections ? maxSectionHeight + maxTaskHeight + 150 : maxTaskHeight + 100; const lineWrapper = svg.append("g").attr("class", "lineWrapper"); lineWrapper.append("line").attr("x1", LEFT_MARGIN).attr("y1", depthY).attr("x2", box.width + 3 * LEFT_MARGIN).attr("y2", depthY).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"); - setupGraphViewbox$1(void 0, svg, (_b2 = (_c = conf.timeline) == null ? void 0 : _c.padding) != null ? _b2 : 50, (_c2 = (_d = conf.timeline) == null ? void 0 : _d.useMaxWidth) != null ? _c2 : false); + setupGraphViewbox$1( + void 0, + svg, + (_b2 = (_c = conf.timeline) == null ? void 0 : _c.padding) != null ? _b2 : 50, + (_c2 = (_d = conf.timeline) == null ? void 0 : _d.useMaxWidth) != null ? _c2 : false + ); }; const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, maxTaskHeight, conf, maxEventCount, maxEventLineLength, maxSectionHeight, isWithoutSections) { var _a; @@ -147604,7 +148801,10 @@ const drawTasks = function(diagram2, tasks2, sectionColor, masterX, masterY, max masterY += 100; lineLength = lineLength + drawEvents(diagram2, task.events, sectionColor, masterX, masterY, conf); masterY -= 100; - lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr("y2", masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); + lineWrapper.append("line").attr("x1", masterX + 190 / 2).attr("y1", masterY + maxTaskHeight).attr("x2", masterX + 190 / 2).attr( + "y2", + masterY + maxTaskHeight + (isWithoutSections ? maxTaskHeight : maxSectionHeight) + maxEventLineLength + 120 + ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"); } masterX = masterX + 200; if (isWithoutSections && !((_a = conf.timeline) == null ? void 0 : _a.disableMulticolor)) { @@ -147734,10 +148934,10 @@ var cytoscape_umd = { exports: {} }; })(commonjsGlobal, function() { function _typeof(obj) { "@babel/helpers - typeof"; - return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) { + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) { return typeof obj2; } : function(obj2) { - return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; }, _typeof(obj); } function _classCallCheck(instance2, Constructor) { @@ -147869,10 +149069,10 @@ var cytoscape_umd = { exports: {} }; return number$1(obj) && Math.floor(obj) === obj; }; var htmlElement = function htmlElement2(obj) { - if (typeofhtmlele === "undefined") { + if ("undefined" === typeofhtmlele) { return void 0; } else { - return obj != null && obj instanceof HTMLElement; + return null != obj && obj instanceof HTMLElement; } }; var elementOrCollection = function elementOrCollection2(obj) { @@ -148760,7 +149960,7 @@ var cytoscape_umd = { exports: {} }; var ObjectSet = /* @__PURE__ */ function() { function ObjectSet2(arrayOrObjectSet) { _classCallCheck(this, ObjectSet2); - this._obj = Object.create(null); + this._obj = /* @__PURE__ */ Object.create(null); this.size = 0; if (arrayOrObjectSet != null) { var arr; @@ -148800,7 +150000,7 @@ var cytoscape_umd = { exports: {} }; }, { key: "clear", value: function clear2() { - this._obj = Object.create(null); + this._obj = /* @__PURE__ */ Object.create(null); } }, { key: "has", @@ -152819,20 +154019,24 @@ var cytoscape_umd = { exports: {} }; if (typeof then === "function") { var resolved = false; try { - then.call(x, function(y) { - if (resolved) - return; - resolved = true; - if (y === x) - promise2.reject(new TypeError("circular thenable chain")); - else - resolve2(promise2, y); - }, function(r) { - if (resolved) - return; - resolved = true; - promise2.reject(r); - }); + then.call( + x, + function(y) { + if (resolved) + return; + resolved = true; + if (y === x) + promise2.reject(new TypeError("circular thenable chain")); + else + resolve2(promise2, y); + }, + function(r) { + if (resolved) + return; + resolved = true; + promise2.reject(r); + } + ); } catch (e) { if (!resolved) promise2.reject(e); @@ -153312,7 +154516,9 @@ var cytoscape_umd = { exports: {} }; var funcProto = Function.prototype, objectProto$3 = Object.prototype; var funcToString = funcProto.toString; var hasOwnProperty$3 = objectProto$3.hasOwnProperty; - var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty$3).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); function baseIsNative(value) { if (!isObject_1(value) || _isMasked(value)) { return false; @@ -164094,7 +165300,7 @@ var cytoscape_umd = { exports: {} }; layout: layout2 }); } - if (options.debug === true) { + if (true === options.debug) { DEBUG = true; } else { DEBUG = false; @@ -164109,7 +165315,7 @@ var cytoscape_umd = { exports: {} }; var startTime = performanceNow(); var refresh = function refresh2() { refreshPositions(layoutInfo, cy, options); - if (options.fit === true) { + if (true === options.fit) { cy.fit(options.padding); } }; @@ -164249,7 +165455,7 @@ var cytoscape_umd = { exports: {} }; for (var i2 = 0; i2 < layoutInfo.nodeSize; i2++) { var n = layoutInfo.layoutNodes[i2]; var p_id = n.parentId; - if (p_id != null) { + if (null != p_id) { layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id); } else { queue[++end] = n.id; @@ -164293,12 +165499,12 @@ var cytoscape_umd = { exports: {} }; var lcaGraph = layoutInfo.graphSet[lca]; var depth = 0; var tempNode = layoutInfo.layoutNodes[sourceIx]; - while (lcaGraph.indexOf(tempNode.id) === -1) { + while (-1 === lcaGraph.indexOf(tempNode.id)) { tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; depth++; } tempNode = layoutInfo.layoutNodes[targetIx]; - while (lcaGraph.indexOf(tempNode.id) === -1) { + while (-1 === lcaGraph.indexOf(tempNode.id)) { tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; depth++; } @@ -164331,16 +165537,16 @@ var cytoscape_umd = { exports: {} }; var nodeId = graph[i2]; var nodeIx = layoutInfo.idToIndex[nodeId]; var children = layoutInfo.layoutNodes[nodeIx].children; - if (children.length === 0) { + if (0 === children.length) { continue; } var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]]; var result = findLCA_aux2(node1, node2, childGraphIx, layoutInfo); - if (result.count === 0) { + if (0 === result.count) { continue; - } else if (result.count === 1) { + } else if (1 === result.count) { c++; - if (c === 2) { + if (2 === c) { break; } } else { @@ -164358,7 +165564,7 @@ var cytoscape_umd = { exports: {} }; var height = layoutInfo.clientHeight; for (var i2 = 0; i2 < layoutInfo.nodeSize; i2++) { var n = layoutInfo.layoutNodes[i2]; - if (n.children.length === 0 && !n.isLocked) { + if (0 === n.children.length && !n.isLocked) { n.positionX = Math.random() * width; n.positionY = Math.random() * height; } @@ -164405,7 +165611,7 @@ var cytoscape_umd = { exports: {} }; var nodes2 = options.eles.nodes(); var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes2); nodes2.positions(getScaledPos); - if (layoutInfo.ready !== true) { + if (true !== layoutInfo.ready) { layoutInfo.ready = true; layout2.one("layoutready", options.ready); layout2.emit({ @@ -164446,7 +165652,7 @@ var cytoscape_umd = { exports: {} }; var directionX = node2.positionX - node1.positionX; var directionY = node2.positionY - node1.positionY; var maxRandDist = 1; - if (directionX === 0 && directionY === 0) { + if (0 === directionX && 0 === directionY) { directionX = randomDistance(maxRandDist); directionY = randomDistance(maxRandDist); } @@ -164502,12 +165708,12 @@ var cytoscape_umd = { exports: {} }; var dirSlope = dY / dX; var nodeSlope = H / W; var res = {}; - if (dX === 0 && 0 < dY) { + if (0 === dX && 0 < dY) { res.x = X; res.y = Y + H / 2; return res; } - if (dX === 0 && 0 > dY) { + if (0 === dX && 0 > dY) { res.x = X; res.y = Y + H / 2; return res; @@ -164543,7 +165749,7 @@ var cytoscape_umd = { exports: {} }; var target = layoutInfo.layoutNodes[targetIx]; var directionX = target.positionX - source.positionX; var directionY = target.positionY - source.positionY; - if (directionX === 0 && directionY === 0) { + if (0 === directionX && 0 === directionY) { continue; } var point1 = findClippingPoint(source, directionX, directionY); @@ -164552,7 +165758,7 @@ var cytoscape_umd = { exports: {} }; 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 (l !== 0) { + if (0 !== l) { var forceX = force * lx / l; var forceY = force * ly / l; } else { @@ -164577,7 +165783,7 @@ var cytoscape_umd = { exports: {} }; for (var i2 = 0; i2 < layoutInfo.graphSet.length; i2++) { var graph = layoutInfo.graphSet[i2]; var numNodes = graph.length; - if (i2 === 0) { + if (0 === i2) { var centerX = layoutInfo.clientHeight / 2; var centerY = layoutInfo.clientWidth / 2; } else { @@ -164681,24 +165887,24 @@ var cytoscape_umd = { exports: {} }; }; var updateAncestryBoundaries = function updateAncestryBoundaries2(node, layoutInfo) { var parentId = node.parentId; - if (parentId == null) { + if (null == parentId) { return; } var p2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]]; var flag = false; - if (p2.maxX == null || node.maxX + p2.padRight > p2.maxX) { + if (null == p2.maxX || node.maxX + p2.padRight > p2.maxX) { p2.maxX = node.maxX + p2.padRight; flag = true; } - if (p2.minX == null || node.minX - p2.padLeft < p2.minX) { + if (null == p2.minX || node.minX - p2.padLeft < p2.minX) { p2.minX = node.minX - p2.padLeft; flag = true; } - if (p2.maxY == null || node.maxY + p2.padBottom > p2.maxY) { + if (null == p2.maxY || node.maxY + p2.padBottom > p2.maxY) { p2.maxY = node.maxY + p2.padBottom; flag = true; } - if (p2.minY == null || node.minY - p2.padTop < p2.minY) { + if (null == p2.minY || node.minY - p2.padTop < p2.minY) { p2.minY = node.minY - p2.padTop; flag = true; } @@ -171376,7 +172582,7 @@ var cytoscape_umd = { exports: {} }; var smooth = getIndexedStyle(node, "background-image-smoothing", "value", index); var imgW = img.width || img.cachedW; var imgH = img.height || img.cachedH; - if (imgW == null || imgH == null) { + if (null == imgW || null == imgH) { document.body.appendChild(img); imgW = img.cachedW = img.width || img.offsetWidth; imgH = img.cachedH = img.height || img.offsetHeight; @@ -172547,7 +173753,17 @@ var cytoscape_umd = { exports: {} }; mbclear(cxt2, 0, 0, r.canvasWidth, r.canvasHeight); } var pxr = mbPxRatio; - cxt2.drawImage(txt, 0, 0, r.canvasWidth * pxr, r.canvasHeight * pxr, 0, 0, r.canvasWidth, r.canvasHeight); + cxt2.drawImage( + txt, + 0, + 0, + r.canvasWidth * pxr, + r.canvasHeight * pxr, + 0, + 0, + r.canvasWidth, + r.canvasHeight + ); }; if (needDraw[r.NODE] || needMbClear[r.NODE]) { drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]); @@ -173768,7 +174984,7 @@ var layoutBase = { exports: {} }; return edgeList; }; LNode.prototype.getNeighborsList = function() { - var neighbors = new Set(); + var neighbors = /* @__PURE__ */ new Set(); var self2 = this; self2.edges.forEach(function(edge) { if (edge.source == self2) { @@ -173783,7 +174999,7 @@ var layoutBase = { exports: {} }; return neighbors; }; LNode.prototype.withChildren = function() { - var withNeighborsList = new Set(); + var withNeighborsList = /* @__PURE__ */ new Set(); var childNode; var children; withNeighborsList.add(this); @@ -174244,7 +175460,7 @@ var layoutBase = { exports: {} }; return; } var queue = new LinkedList(); - var visited = new Set(); + var visited = /* @__PURE__ */ new Set(); var currentNode = this.nodes[0]; var neighborEdges; var currentNeighbor; @@ -175320,7 +176536,7 @@ var layoutBase = { exports: {} }; UniqueIDGeneretor.getString = function(id) { if (id == null) id = UniqueIDGeneretor.lastID; - return "Object#" + id + ""; + return "Object#" + id; }; UniqueIDGeneretor.isPrimitive = function(arg) { var type = typeof arg === "undefined" ? "undefined" : _typeof(arg); @@ -175356,7 +176572,7 @@ var layoutBase = { exports: {} }; this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; - this.edgeToDummyNodes = new Map(); + this.edgeToDummyNodes = /* @__PURE__ */ new Map(); this.graphManager = new LGraphManager(this); this.isLayoutFinished = false; this.isSubLayout = false; @@ -175541,9 +176757,9 @@ var layoutBase = { exports: {} }; if (!isFlat) { return flatForest; } - var visited = new Set(); + var visited = /* @__PURE__ */ new Set(); var toBeVisited = []; - var parents = new Map(); + var parents = /* @__PURE__ */ new Map(); var unProcessedNodes = []; unProcessedNodes = unProcessedNodes.concat(allNodes); while (unProcessedNodes.length > 0 && isForest) { @@ -175578,8 +176794,8 @@ var layoutBase = { exports: {} }; unProcessedNodes.splice(index, 1); } } - visited = new Set(); - parents = new Map(); + visited = /* @__PURE__ */ new Set(); + parents = /* @__PURE__ */ new Map(); } } return flatForest; @@ -175654,7 +176870,7 @@ var layoutBase = { exports: {} }; var list = []; list = list.concat(nodes2); var removedNodes = []; - var remainingDegrees = new Map(); + var remainingDegrees = /* @__PURE__ */ new Map(); var foundCenter = false; var centerNode = null; if (list.length == 1 || list.length == 2) { @@ -175922,7 +177138,7 @@ var layoutBase = { exports: {} }; if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { this.updateGrid(); } - processedNodeSet = new Set(); + processedNodeSet = /* @__PURE__ */ new Set(); for (i = 0; i < lNodes.length; i++) { nodeA = lNodes[i]; this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); @@ -176132,7 +177348,7 @@ var layoutBase = { exports: {} }; }; FDLayout.prototype.calculateRepulsionForceOfANode = function(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { - var surrounding = new Set(); + var surrounding = /* @__PURE__ */ new Set(); nodeA.surrounding = new Array(); var nodeB; var grid = this.grid; @@ -177023,7 +178239,7 @@ var layoutBase = { exports: {} }; CoSELayout.prototype.createBendpoints = function() { var edges = []; edges = edges.concat(this.graphManager.getAllEdges()); - var visited = new Set(); + var visited = /* @__PURE__ */ new Set(); var i; for (i = 0; i < edges.length; i++) { var edge = edges[i]; @@ -178665,7 +179881,9 @@ const addNode = (level, id, descr, type) => { if (nodes.length === 0) { nodes.push(node); } else { - let error = new Error('There can be only one root. No parent could be found for ("' + node.descr + '")'); + let error = new Error( + 'There can be only one root. No parent could be found for ("' + node.descr + '")' + ); error.hash = { text: "branch " + name, token: "branch " + name, @@ -178767,7 +179985,10 @@ const mindmapDb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePro const MAX_SECTIONS = 12; const defaultBkg = function(elem, node, section) { const rd = 5; - elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("d", `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z`); + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 ${node.height - rd} v${-node.height + 2 * rd} q0,-5 5,-5 h${node.width - 2 * rd} q5,0 5,5 v${node.height - rd} H0 Z` + ); elem.append("line").attr("class", "node-line-" + section).attr("x1", 0).attr("y1", node.height).attr("x2", node.width).attr("y2", node.height); }; const rectBkg = function(elem, node) { @@ -178780,7 +180001,9 @@ const cloudBkg = function(elem, node) { const r2 = 0.25 * w; const r3 = 0.35 * w; const r4 = 0.2 * w; - elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("d", `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1} + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1} a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1} a${r2},${r2} 1 0,1 ${w * 0.35},${1 * w * 0.2} @@ -178794,13 +180017,16 @@ const cloudBkg = function(elem, node) { a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35} a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65} - H0 V0 Z`); + H0 V0 Z` + ); }; const bangBkg = function(elem, node) { const w = node.width; const h = node.height; const r = 0.15 * w; - elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("d", `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1} + elem.append("path").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr( + "d", + `M0 0 a${r},${r} 1 0,0 ${w * 0.25},${-1 * h * 0.1} a${r},${r} 1 0,0 ${w * 0.25},${0} a${r},${r} 1 0,0 ${w * 0.25},${0} a${r},${r} 1 0,0 ${w * 0.25},${1 * h * 0.1} @@ -178818,15 +180044,19 @@ const bangBkg = function(elem, node) { a${r * 0.8},${r * 0.8} 1 0,0 ${0},${-1 * h * 0.34} a${r},${r} 1 0,0 ${w * 0.1},${-1 * h * 0.33} - H0 V0 Z`); + H0 V0 Z` + ); }; const circleBkg = function(elem, node) { elem.append("circle").attr("id", "node-" + node.id).attr("class", "node-bkg node-" + type2Str(node.type)).attr("r", node.width / 2); }; function insertPolygonShape(parent, w, h, points, node) { - return parent.insert("polygon", ":first-child").attr("points", points.map(function(d) { - return d.x + "," + d.y; - }).join(" ")).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")"); + return parent.insert("polygon", ":first-child").attr( + "points", + points.map(function(d) { + return d.x + "," + d.y; + }).join(" ") + ).attr("transform", "translate(" + (node.width - w) / 2 + ", " + h + ")"); } const hexagonBkg = function(elem, node) { const h = node.height; @@ -178877,7 +180107,10 @@ const drawNode = function(elem, node, fullSection, conf) { node.width += 50; const icon = nodeElem.append("foreignObject").attr("height", "50px").attr("width", node.width).attr("style", "text-align: center;"); icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); - textElem.attr("transform", "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")"); + textElem.attr( + "transform", + "translate(" + node.width / 2 + ", " + (node.height / 2 - 1.5 * node.padding) + ")" + ); } else { node.width += 50; const orgHeight = node.height; @@ -178885,7 +180118,10 @@ const drawNode = function(elem, node, fullSection, conf) { const heightDiff = Math.abs(node.height - orgHeight); const icon = nodeElem.append("foreignObject").attr("width", "60px").attr("height", node.height).attr("style", "text-align: center;margin-top:" + heightDiff / 2 + "px;"); icon.append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + section + " " + node.icon); - textElem.attr("transform", "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")"); + textElem.attr( + "transform", + "translate(" + (25 + node.width / 2) + ", " + (heightDiff / 2 + node.padding / 2) + ")" + ); } } else { if (!htmlLabels) { @@ -178935,7 +180171,10 @@ const drawEdge = function drawEdge2(edgesElem, mindmap, parent, depth, fullSecti 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); + edgesElem.append("path").attr( + "d", + parent.direction === "TB" || parent.direction === "BT" ? `M${sx},${sy} Q${sx},${qy} ${mx},${my} T${ex},${ey}` : `M${sx},${sy} Q${qx},${sy} ${mx},${my} T${ex},${ey}` + ).attr("class", "edge section-edge-" + section + " edge-depth-" + depth); }; const positionNode = function(node) { const nodeElem = getElementById(node.id); @@ -178959,7 +180198,10 @@ function drawEdges(edgesEl, cy) { if (edge[0]._private.bodyBounds) { const bounds = edge[0]._private.rscratch; log$1.trace("Edge: ", id, data); - edgesEl.insert("path").attr("d", `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} `).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); + edgesEl.insert("path").attr( + "d", + `M ${bounds.startX},${bounds.startY} L ${bounds.midX},${bounds.midY} L${bounds.endX},${bounds.endY} ` + ).attr("class", "edge section-edge-" + data.section + " edge-depth-" + data.depth); } }); } @@ -179039,7 +180281,10 @@ function positionNodes(cy) { svgDraw.positionNode(data); const el = getElementById(data.nodeId); log$1.info("Id:", id, "Position: (", node.position().x, ", ", node.position().y, ")", data); - el.attr("transform", `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})`); + el.attr( + "transform", + `translate(${node.position().x - data.width / 2}, ${node.position().y - data.height / 2})` + ); el.attr("attr", `apa-${id})`); }); }