{"version":3,"file":"mermaid.core.mjs","sources":["../src/logger.ts","../src/diagrams/common/common.ts","../src/themes/theme-helpers.js","../src/themes/erDiagram-oldHardcodedValues.ts","../src/themes/theme-base.js","../src/themes/theme-dark.js","../src/themes/theme-default.js","../src/themes/theme-forest.js","../src/themes/theme-neutral.js","../src/themes/index.js","../src/defaultConfig.ts","../src/diagram-api/detectType.ts","../src/assignWithDepth.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js","../src/utils.ts","../src/config.ts","../src/setupGraphViewbox.js","../src/diagrams/class/styles.js","../src/diagrams/er/styles.js","../src/diagrams/error/styles.js","../src/diagrams/flowchart/styles.ts","../src/diagrams/gantt/styles.js","../src/diagrams/info/styles.js","../src/diagrams/pie/styles.js","../src/diagrams/requirement/styles.js","../src/diagrams/sequence/styles.js","../src/diagrams/state/styles.js","../src/diagrams/user-journey/styles.js","../src/diagrams/c4/styles.js","../src/styles.ts","../src/diagram-api/diagramAPI.ts","../src/diagrams/git/parser/gitGraph.jison","../src/diagrams/git/gitGraphDetector.ts","../src/commonDb.ts","../src/diagrams/git/gitGraphAst.js","../src/accessibility.js","../src/diagrams/git/gitGraphRenderer.js","../src/diagrams/git/styles.js","../src/diagrams/c4/parser/c4Diagram.jison","../src/diagrams/c4/c4Detector.ts","../src/diagrams/c4/c4Db.js","../src/diagrams/c4/svgDraw.js","../src/diagrams/c4/c4Renderer.js","../src/diagrams/class/parser/classDiagram.jison","../src/diagrams/class/classDetector.ts","../src/diagrams/class/classDetector-V2.ts","../src/diagrams/class/classDb.js","../src/diagrams/class/svgDraw.js","../src/diagrams/class/classRenderer.js","../src/dagre-wrapper/markers.js","../src/dagre-wrapper/createLabel.js","../src/dagre-wrapper/shapes/util.js","../src/dagre-wrapper/mermaid-graphlib.js","../src/dagre-wrapper/intersect/intersect-node.js","../src/dagre-wrapper/intersect/intersect-ellipse.js","../src/dagre-wrapper/intersect/intersect-circle.js","../src/dagre-wrapper/intersect/intersect-line.js","../src/dagre-wrapper/intersect/intersect-polygon.js","../src/dagre-wrapper/intersect/intersect-rect.js","../src/dagre-wrapper/intersect/index.js","../src/dagre-wrapper/shapes/note.js","../src/dagre-wrapper/nodes.js","../src/dagre-wrapper/clusters.js","../src/dagre-wrapper/edges.js","../src/dagre-wrapper/index.js","../src/diagrams/class/classRenderer-v2.js","../src/diagrams/er/parser/erDiagram.jison","../src/diagrams/er/erDetector.ts","../src/diagrams/er/erDb.js","../src/diagrams/er/erMarkers.js","../src/diagrams/er/erRenderer.js","../src/diagrams/flowchart/parser/flow.jison","../src/diagrams/flowchart/flowDetector.ts","../src/diagrams/flowchart/flowDetector-v2.ts","../src/diagrams/flowchart/flowDb.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_apply.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overRest.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/constant.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSetToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_shortOut.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRest.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIterateeCall.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeysIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeysIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keysIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/defaults.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayEach.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseEach.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseEach.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castFunction.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/forEach.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/each.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getPrototype.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePickBy.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePick.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isFlattenable.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFlatten.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/flatten.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_flatRest.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/pick.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHas.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/has.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseRange.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_trimmedEndIndex.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTrim.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toNumber.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toFinite.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createRange.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/range.js","../../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/uniqueId.js","../../../node_modules/.pnpm/dagre-d3@0.6.4/node_modules/dagre-d3/lib/lodash.js","../../../node_modules/.pnpm/dagre-d3@0.6.4/node_modules/dagre-d3/lib/util.js","../../../node_modules/.pnpm/dagre-d3@0.6.4/node_modules/dagre-d3/lib/label/add-html-label.js","../src/diagrams/flowchart/flowChartShapes.js","../src/diagrams/flowchart/flowRenderer.js","../src/diagrams/flowchart/flowRenderer-v2.js","../src/diagrams/gantt/parser/gantt.jison","../src/diagrams/gantt/ganttDetector.ts","../src/diagrams/gantt/ganttDb.js","../src/diagrams/gantt/ganttRenderer.js","../src/diagrams/info/parser/info.jison","../src/diagrams/info/infoDb.js","../src/diagrams/info/infoRenderer.js","../src/diagrams/info/infoDetector.ts","../src/diagrams/pie/parser/pie.jison","../src/diagrams/pie/pieDetector.ts","../src/diagrams/pie/pieDb.js","../src/diagrams/pie/pieRenderer.js","../src/diagrams/requirement/parser/requirementDiagram.jison","../src/diagrams/requirement/requirementDetector.ts","../src/diagrams/requirement/requirementDb.js","../src/diagrams/requirement/requirementMarkers.js","../src/diagrams/requirement/requirementRenderer.js","../src/diagrams/sequence/parser/sequenceDiagram.jison","../src/diagrams/sequence/sequenceDetector.ts","../src/diagrams/sequence/sequenceDb.js","../src/interactionDb.ts","../src/diagrams/sequence/svgDraw.js","../src/diagrams/sequence/sequenceRenderer.ts","../src/diagrams/state/parser/stateDiagram.jison","../src/diagrams/state/stateDetector.ts","../src/diagrams/state/stateDetector-V2.ts","../src/diagrams/state/stateDb.js","../src/diagrams/state/shapes.js","../src/diagrams/state/stateRenderer.js","../src/diagrams/state/stateRenderer-v2.js","../src/diagrams/user-journey/parser/journey.jison","../src/diagrams/user-journey/journeyDetector.ts","../src/diagrams/user-journey/journeyDb.js","../src/diagrams/user-journey/svgDraw.js","../src/diagrams/user-journey/journeyRenderer.ts","../src/diagrams/error/errorRenderer.ts","../src/diagram-api/diagram-orchestration.ts","../src/Diagram.ts","../src/mermaidAPI.ts","../src/mermaid.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable no-console */\nimport moment from 'moment-mini';\n\nexport type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';\n\nexport const LEVELS: Record = {\n trace: 0,\n debug: 1,\n info: 2,\n warn: 3,\n error: 4,\n fatal: 5,\n};\n\nexport const log: Record = {\n trace: (..._args: any[]) => {},\n debug: (..._args: any[]) => {},\n info: (..._args: any[]) => {},\n warn: (..._args: any[]) => {},\n error: (..._args: any[]) => {},\n fatal: (..._args: any[]) => {},\n};\n\n/**\n * Sets a log level\n *\n * @param {LogLevel} [level=\"fatal\"] The level to set the logging to. Default is `\"fatal\"`\n */\nexport const setLogLevel = function (level: keyof typeof LEVELS | number | string = 'fatal') {\n // TODO: Even if we call initialize with loglevel 0, many initial logs are skipped as LL is set to 5 initially.\n\n let numericLevel: number = LEVELS.fatal;\n if (typeof level === 'string') {\n level = level.toLowerCase();\n if (level in LEVELS) {\n numericLevel = LEVELS[level as keyof typeof LEVELS];\n }\n } else if (typeof level === 'number') {\n numericLevel = level;\n }\n\n log.trace = () => {};\n log.debug = () => {};\n log.info = () => {};\n log.warn = () => {};\n log.error = () => {};\n log.fatal = () => {};\n\n if (numericLevel <= LEVELS.fatal) {\n log.fatal = console.error\n ? console.error.bind(console, format('FATAL'), 'color: orange')\n : console.log.bind(console, '\\x1b[35m', format('FATAL'));\n }\n if (numericLevel <= LEVELS.error) {\n log.error = console.error\n ? console.error.bind(console, format('ERROR'), 'color: orange')\n : console.log.bind(console, '\\x1b[31m', format('ERROR'));\n }\n if (numericLevel <= LEVELS.warn) {\n log.warn = console.warn\n ? console.warn.bind(console, format('WARN'), 'color: orange')\n : console.log.bind(console, `\\x1b[33m`, format('WARN'));\n }\n if (numericLevel <= LEVELS.info) {\n log.info = console.info\n ? console.info.bind(console, format('INFO'), 'color: lightblue')\n : console.log.bind(console, '\\x1b[34m', format('INFO'));\n }\n if (numericLevel <= LEVELS.debug) {\n log.debug = console.debug\n ? console.debug.bind(console, format('DEBUG'), 'color: lightgreen')\n : console.log.bind(console, '\\x1b[32m', format('DEBUG'));\n }\n if (numericLevel <= LEVELS.trace) {\n log.trace = console.debug\n ? console.debug.bind(console, format('TRACE'), 'color: lightgreen')\n : console.log.bind(console, '\\x1b[32m', format('TRACE'));\n }\n};\n\n/**\n * Returns a format with the timestamp and the log level\n *\n * @param {LogLevel} level The level for the log format\n * @returns {string} The format with the timestamp and log level\n */\nconst format = (level: string): string => {\n const time = moment().format('ss.SSS');\n return `%c${time} : ${level} : `;\n};\n","import DOMPurify from 'dompurify';\nimport { MermaidConfig } from '../../config.type';\n\n/**\n * Gets the rows of lines in a string\n *\n * @param {string | undefined} s The string to check the lines for\n * @returns {string[]} The rows in that string\n */\nexport const getRows = (s?: string): string[] => {\n if (!s) return [''];\n const str = breakToPlaceholder(s).replace(/\\\\n/g, '#br#');\n return str.split('#br#');\n};\n\n/**\n * Removes script tags from a text\n *\n * @param {string} txt The text to sanitize\n * @returns {string} The safer text\n */\nexport const removeScript = (txt: string): string => {\n return DOMPurify.sanitize(txt);\n};\n\nconst sanitizeMore = (text: string, config: MermaidConfig) => {\n if (config.flowchart?.htmlLabels !== false) {\n const level = config.securityLevel;\n if (level === 'antiscript' || level === 'strict') {\n text = removeScript(text);\n } else if (level !== 'loose') {\n text = breakToPlaceholder(text);\n text = text.replace(//g, '>');\n text = text.replace(/=/g, '=');\n text = placeholderToBreak(text);\n }\n }\n return text;\n};\n\nexport const sanitizeText = (text: string, config: MermaidConfig): string => {\n if (!text) return text;\n if (config.dompurifyConfig) {\n text = DOMPurify.sanitize(sanitizeMore(text, config), config.dompurifyConfig).toString();\n } else {\n text = DOMPurify.sanitize(sanitizeMore(text, config));\n }\n return text;\n};\n\nexport const sanitizeTextOrArray = (\n a: string | string[] | string[][],\n config: MermaidConfig\n): string | string[] => {\n if (typeof a === 'string') return sanitizeText(a, config);\n // TODO: Refactor to avoid flat.\n return a.flat().map((x: string) => sanitizeText(x, config));\n};\n\nexport const lineBreakRegex = //gi;\n\n/**\n * Whether or not a text has any linebreaks\n *\n * @param {string} text The text to test\n * @returns {boolean} Whether or not the text has breaks\n */\nexport const hasBreaks = (text: string): boolean => {\n return lineBreakRegex.test(text);\n};\n\n/**\n * Splits on
tags\n *\n * @param {string} text Text to split\n * @returns {string[]} List of lines as strings\n */\nexport const splitBreaks = (text: string): string[] => {\n return text.split(lineBreakRegex);\n};\n\n/**\n * Converts placeholders to linebreaks in HTML\n *\n * @param {string} s HTML with placeholders\n * @returns {string} HTML with breaks instead of placeholders\n */\nconst placeholderToBreak = (s: string): string => {\n return s.replace(/#br#/g, '
');\n};\n\n/**\n * Opposite of `placeholderToBreak`, converts breaks to placeholders\n *\n * @param {string} s HTML string\n * @returns {string} String with placeholders\n */\nconst breakToPlaceholder = (s: string): string => {\n return s.replace(lineBreakRegex, '#br#');\n};\n\n/**\n * Gets the current URL\n *\n * @param {boolean} useAbsolute Whether to return the absolute URL or not\n * @returns {string} The current URL\n */\nconst getUrl = (useAbsolute: boolean): string => {\n let url = '';\n if (useAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replaceAll(/\\(/g, '\\\\(');\n url = url.replaceAll(/\\)/g, '\\\\)');\n }\n\n return url;\n};\n\n/**\n * Converts a string/boolean into a boolean\n *\n * @param {string | boolean} val String or boolean to convert\n * @returns {boolean} The result from the input\n */\nexport const evaluate = (val?: string | boolean): boolean =>\n val === false || ['false', 'null', '0'].includes(String(val).trim().toLowerCase()) ? false : true;\n\n/**\n * Makes generics in typescript syntax\n *\n * @example Array of array of strings in typescript syntax\n * // returns \"Array>\"\n * parseGenericTypes('Array~Array~string~~');\n *\n * @param {string} text The text to convert\n * @returns {string} The converted string\n */\nexport const parseGenericTypes = function (text: string): string {\n let cleanedText = text;\n\n if (text.indexOf('~') !== -1) {\n cleanedText = cleanedText.replace(/~([^~].*)/, '<$1');\n cleanedText = cleanedText.replace(/~([^~]*)$/, '>$1');\n\n return parseGenericTypes(cleanedText);\n } else {\n return cleanedText;\n }\n};\n\nexport default {\n getRows,\n sanitizeText,\n sanitizeTextOrArray,\n hasBreaks,\n splitBreaks,\n lineBreakRegex,\n removeScript,\n getUrl,\n evaluate,\n};\n","import { adjust } from 'khroma';\n\nexport const mkBorder = (col, darkMode) =>\n darkMode ? adjust(col, { s: -40, l: 10 }) : adjust(col, { s: -40, l: -10 });\n","/**\n * @file Values that have been hardcoded in src/diagrams/er/styles.js. These can be used by\n * theme-_._ files to maintain display styles until themes, styles, renderers are revised. --\n * 2022-09-22\n */\nexport const oldAttributeBackgroundColorOdd = '#ffffff';\nexport const oldAttributeBackgroundColorEven = '#f2f2f2';\n","import { darken, lighten, adjust, invert } from 'khroma';\nimport { mkBorder } from './theme-helpers';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues';\n\nclass Theme {\n constructor() {\n /** # Base variables */\n /**\n * - Background - used to know what the background color is of the diagram. This is used for\n * deducing colors for instance line color. Default value is #f4f4f4.\n */\n this.background = '#f4f4f4';\n this.darkMode = false;\n\n this.primaryColor = '#fff4dd';\n\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = '#333';\n\n this.THEME_COLOR_LIMIT = 12;\n\n // dark\n\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n }\n updateColors() {\n // The || is to make sure that if the variable has been defined by a user override that value is to be used\n\n /* Main */\n this.primaryTextColor = this.primaryTextColor || (this.darkMode ? '#eee' : '#333'); // invert(this.primaryColor);\n this.secondaryColor = this.secondaryColor || adjust(this.primaryColor, { h: -120 });\n this.tertiaryColor = this.tertiaryColor || adjust(this.primaryColor, { h: 180, l: 5 });\n\n this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor =\n this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor =\n this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode);\n this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode);\n this.noteBkgColor = this.noteBkgColor || '#fff5ad';\n this.noteTextColor = this.noteTextColor || '#333';\n\n this.secondaryTextColor = this.secondaryTextColor || invert(this.secondaryColor);\n this.tertiaryTextColor = this.tertiaryTextColor || invert(this.tertiaryColor);\n this.lineColor = this.lineColor || invert(this.background);\n this.textColor = this.textColor || this.primaryTextColor;\n\n /* Flowchart variables */\n this.nodeBkg = this.nodeBkg || this.primaryColor;\n this.mainBkg = this.mainBkg || this.primaryColor;\n this.nodeBorder = this.nodeBorder || this.primaryBorderColor;\n this.clusterBkg = this.clusterBkg || this.tertiaryColor;\n this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor;\n this.defaultLinkColor = this.defaultLinkColor || this.lineColor;\n this.titleColor = this.titleColor || this.tertiaryTextColor;\n this.edgeLabelBackground =\n this.edgeLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.nodeTextColor = this.nodeTextColor || this.primaryTextColor;\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = this.actorBorder || this.primaryBorderColor;\n this.actorBkg = this.actorBkg || this.mainBkg;\n this.actorTextColor = this.actorTextColor || this.primaryTextColor;\n this.actorLineColor = this.actorLineColor || 'grey';\n this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg;\n this.signalColor = this.signalColor || this.textColor;\n this.signalTextColor = this.signalTextColor || this.textColor;\n this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder;\n this.labelTextColor = this.labelTextColor || this.actorTextColor;\n this.loopTextColor = this.loopTextColor || this.actorTextColor;\n this.activationBorderColor = this.activationBorderColor || darken(this.secondaryColor, 10);\n this.activationBkgColor = this.activationBkgColor || this.secondaryColor;\n this.sequenceNumberColor = this.sequenceNumberColor || invert(this.lineColor);\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor;\n this.altSectionBkgColor = this.altSectionBkgColor || 'white';\n this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor;\n this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor;\n this.excludeBkgColor = this.excludeBkgColor || '#eeeeee';\n this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;\n this.taskBkgColor = this.taskBkgColor || this.primaryColor;\n this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor;\n this.activeTaskBkgColor = this.activeTaskBkgColor || lighten(this.primaryColor, 23);\n this.gridColor = this.gridColor || 'lightgrey';\n this.doneTaskBkgColor = this.doneTaskBkgColor || 'lightgrey';\n this.doneTaskBorderColor = this.doneTaskBorderColor || 'grey';\n this.critBorderColor = this.critBorderColor || '#ff8888';\n this.critBkgColor = this.critBkgColor || 'red';\n this.todayLineColor = this.todayLineColor || 'red';\n this.taskTextColor = this.taskTextColor || this.textColor;\n this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor;\n this.taskTextLightColor = this.taskTextLightColor || this.textColor;\n this.taskTextColor = this.taskTextColor || this.primaryTextColor;\n this.taskTextDarkColor = this.taskTextDarkColor || this.textColor;\n this.taskTextClickableColor = this.taskTextClickableColor || '#003163';\n\n /* Sequence Diagram variables */\n\n this.personBorder = this.personBorder || this.primaryBorderColor;\n this.personBkg = this.personBkg || this.mainBkg;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n /* The color of the text tables of the states*/\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || this.tertiaryColor;\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.nodeBorder;\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n this.specialStateColor = this.lineColor;\n\n /* Color Scale */\n /* Each color-set will have a background, a forgroupnd and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210, l: 150 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n if (this.darkMode) {\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScale' + i] = darken(this['cScale' + i], 75);\n }\n } else {\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScale' + i] = darken(this['cScale' + i], 25);\n }\n }\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n if (this.darkMode) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n } else {\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 10);\n }\n }\n\n // Setup teh label color for the set\n this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n /* class */\n this.classText = this.classText || this.textColor;\n\n /* user-journey */\n this.fillType0 = this.fillType0 || this.primaryColor;\n this.fillType1 = this.fillType1 || this.secondaryColor;\n this.fillType2 = this.fillType2 || adjust(this.primaryColor, { h: 64 });\n this.fillType3 = this.fillType3 || adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = this.fillType4 || adjust(this.primaryColor, { h: -64 });\n this.fillType5 = this.fillType5 || adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = this.fillType6 || adjust(this.primaryColor, { h: 128 });\n this.fillType7 = this.fillType7 || adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || this.tertiaryColor;\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -10 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -10 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -20 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -20 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -10 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground =\n this.relationLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.branchLabelColor =\n this.branchLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor;\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor;\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { invert, lighten, darken, rgba, adjust } from 'khroma';\nimport { mkBorder } from './theme-helpers';\n\nclass Theme {\n constructor() {\n this.background = '#333';\n this.primaryColor = '#1f2020';\n this.secondaryColor = lighten(this.primaryColor, 16);\n\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = invert(this.background);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n this.mainBkg = '#1f2020';\n this.secondBkg = 'calculated';\n this.mainContrastColor = 'lightgrey';\n this.darkTextColor = lighten(invert('#323D47'), 10);\n this.lineColor = 'calculated';\n this.border1 = '#81B1DB';\n this.border2 = rgba(255, 255, 255, 0.25);\n this.arrowheadColor = 'calculated';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.labelBackground = '#181818';\n this.textColor = '#ccc';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#F9FFFE';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = 'calculated';\n this.activationBkgColor = 'calculated';\n this.sequenceNumberColor = 'black';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = darken('#EAE8D9', 30);\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = '#EAE8D9';\n this.taskBorderColor = rgba(255, 255, 255, 70);\n this.taskBkgColor = 'calculated';\n this.taskTextColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = rgba(255, 255, 255, 50);\n this.activeTaskBkgColor = '#81B1DB';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#E83737';\n this.critBkgColor = '#E83737';\n this.taskTextDarkColor = 'calculated';\n this.todayLineColor = '#DB5757';\n\n /* C4 Context Diagram variables */\n\n this.personBorder = 'calculated';\n this.personBkg = 'calculated';\n\n /* state colors */\n this.labelColor = 'calculated';\n\n this.errorBkgColor = '#a44141';\n this.errorTextColor = '#ddd';\n }\n updateColors() {\n this.secondBkg = lighten(this.mainBkg, 16);\n this.lineColor = this.mainContrastColor;\n this.arrowheadColor = this.mainContrastColor;\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.edgeLabelBackground = lighten(this.labelBackground, 25);\n\n /* Sequence Diagram variables */\n\n this.actorBorder = this.border1;\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.mainContrastColor;\n this.actorLineColor = this.mainContrastColor;\n this.signalColor = this.mainContrastColor;\n this.signalTextColor = this.mainContrastColor;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.mainContrastColor;\n this.loopTextColor = this.mainContrastColor;\n this.noteBorderColor = this.secondaryBorderColor;\n this.noteBkgColor = this.secondBkg;\n this.noteTextColor = this.secondaryTextColor;\n this.activationBorderColor = this.border1;\n this.activationBkgColor = this.secondBkg;\n\n /* Gantt chart variables */\n\n this.altSectionBkgColor = this.background;\n this.taskBkgColor = lighten(this.mainBkg, 23);\n this.taskTextColor = this.darkTextColor;\n this.taskTextLightColor = this.mainContrastColor;\n this.taskTextOutsideColor = this.taskTextLightColor;\n this.gridColor = this.mainContrastColor;\n this.doneTaskBkgColor = this.mainContrastColor;\n this.taskTextDarkColor = this.darkTextColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#555';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = '#f4f4f4'; // this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* cScale */\n this.cScale1 = this.cScale1 || '#0b0000';\n this.cScale2 = this.cScale2 || '#4d1037';\n this.cScale3 = this.cScale3 || '#3f5258';\n this.cScale4 = this.cScale4 || '#4f2f1b';\n this.cScale5 = this.cScale5 || '#6e0a0a';\n this.cScale6 = this.cScale6 || '#3b0048';\n this.cScale7 = this.cScale7 || '#995a01';\n this.cScale8 = this.cScale8 || '#154706';\n this.cScale9 = this.cScale9 || '#161722';\n this.cScale10 = this.cScale10 || '#00296f';\n this.cScale11 = this.cScale11 || '#01629c';\n this.cScale12 = this.cScale12 || '#010029';\n\n /* Color Scale */\n /* Each color-set will have a background, a forgroupnd and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n }\n\n // Setup teh label color for the set\n this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n /* Pie diagram */\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['pie' + i] = this['cScale' + i];\n }\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* class */\n this.classText = this.primaryTextColor;\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground =\n this.relationLabelBackground ||\n (this.darkMode ? darken(this.secondaryColor, 30) : this.secondaryColor);\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = lighten(this.secondaryColor, 20);\n this.git1 = lighten(this.pie2 || this.secondaryColor, 20);\n this.git2 = lighten(this.pie3 || this.tertiaryColor, 20);\n this.git3 = lighten(this.pie4 || adjust(this.primaryColor, { h: -30 }), 20);\n this.git4 = lighten(this.pie5 || adjust(this.primaryColor, { h: -60 }), 20);\n this.git5 = lighten(this.pie6 || adjust(this.primaryColor, { h: -90 }), 10);\n this.git6 = lighten(this.pie7 || adjust(this.primaryColor, { h: +60 }), 10);\n this.git7 = lighten(this.pie8 || adjust(this.primaryColor, { h: +120 }), 20);\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || lighten(this.background, 12);\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || lighten(this.background, 2);\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { invert, lighten, rgba, adjust, darken } from 'khroma';\nimport { mkBorder } from './theme-helpers';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues';\n\nclass Theme {\n constructor() {\n /* Base variables */\n this.background = '#f4f4f4';\n this.primaryColor = '#ECECFF';\n\n this.secondaryColor = adjust(this.primaryColor, { h: 120 });\n this.secondaryColor = '#ffffde';\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n this.background = 'white';\n this.mainBkg = '#ECECFF';\n this.secondBkg = '#ffffde';\n this.lineColor = '#333333';\n this.border1 = '#9370DB';\n this.border2 = '#aaaa33';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.labelBackground = '#e8e8e8';\n this.textColor = '#333';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'calculated';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'calculated';\n this.sectionBkgColor2 = 'calculated';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'calculated';\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.taskTextClickableColor = 'calculated';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n this.sectionBkgColor = rgba(102, 102, 255, 0.49);\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#fff400';\n this.taskBorderColor = '#534fbc';\n this.taskBkgColor = '#8a90dd';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = '#534fbc';\n this.activeTaskBkgColor = '#bfc7ff';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* C4 Context Diagram variables */\n\n this.personBorder = 'calculated';\n this.personBkg = 'calculated';\n\n /* state colors */\n this.labelColor = 'black';\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n this.updateColors();\n }\n updateColors() {\n /* Color Scale */\n /* Each color-set will have a background, a forgroupnd and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n this['cScalePeer' + 1] = this['cScalePeer' + 1] || darken(this.secondaryColor, 45);\n this['cScalePeer' + 2] = this['cScalePeer' + 2] || darken(this.tertiaryColor, 40);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n // Setup the peer color for the set, useful for borders\n this['cScale' + i] = darken(this['cScale' + i], 10);\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 25);\n }\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });\n }\n\n // Setup the label color for the set\n this.scaleLabelColor =\n this.scaleLabelColor !== 'calculated' && this.scaleLabelColor\n ? this.scaleLabelColor\n : this.labelTextColor;\n\n if (this.labelTextColor !== 'calculated') {\n this.cScaleLabel0 = this.cScaleLabel0 || invert(this.labelTextColor);\n this.cScaleLabel3 = this.cScaleLabel3 || invert(this.labelTextColor);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.labelTextColor;\n }\n }\n\n /* Flowchart variables */\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1; // border 1\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.textColor;\n this.edgeLabelBackground = this.labelBackground;\n\n /* Sequence Diagram variables */\n\n // this.actorBorder = lighten(this.border1, 0.5);\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.signalColor = this.textColor;\n this.signalTextColor = this.textColor;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n\n /* Gantt chart variables */\n\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f0f0f0';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.nodeBorder;\n this.specialStateColor = this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || adjust(this.tertiaryColor, { l: -40 });\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -10 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { l: -20 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -20 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -40 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: -40 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -40 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -90, l: -40 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -30 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.labelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || darken(invert(this.git0), 25);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n this.gitBranchLabel0 = this.gitBranchLabel0 || invert(this.labelTextColor);\n this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;\n this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;\n this.gitBranchLabel3 = this.gitBranchLabel3 || invert(this.labelTextColor);\n this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;\n this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;\n this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;\n this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { darken, lighten, adjust, invert } from 'khroma';\nimport { mkBorder } from './theme-helpers';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues';\n\nclass Theme {\n constructor() {\n /* Base vales */\n this.background = '#f4f4f4';\n this.primaryColor = '#cde498';\n this.secondaryColor = '#cdffb2';\n this.background = 'white';\n this.mainBkg = '#cde498';\n this.secondBkg = '#cdffb2';\n this.lineColor = 'green';\n this.border1 = '#13540c';\n this.border2 = '#6eaa49';\n this.arrowheadColor = 'green';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n\n this.tertiaryColor = lighten('#cde498', 10);\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.primaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = '#333';\n this.edgeLabelBackground = '#e8e8e8';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'black';\n this.actorLineColor = 'grey';\n this.signalColor = '#333';\n this.signalTextColor = '#333';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = '#326932';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = '#fff5ad';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = '#6eaa49';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = '#6eaa49';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = '#487e3a';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'black';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'lightgrey';\n this.doneTaskBkgColor = 'lightgrey';\n this.doneTaskBorderColor = 'grey';\n this.critBorderColor = '#ff8888';\n this.critBkgColor = 'red';\n this.todayLineColor = 'red';\n\n /* C4 Context Diagram variables */\n\n this.personBorder = 'calculated';\n this.personBkg = 'calculated';\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n /* Each color-set will have a background, a forgroupnd and a border color */\n this.cScale0 = this.cScale0 || this.primaryColor;\n this.cScale1 = this.cScale1 || this.secondaryColor;\n this.cScale2 = this.cScale2 || this.tertiaryColor;\n this.cScale3 = this.cScale3 || adjust(this.primaryColor, { h: 30 });\n this.cScale4 = this.cScale4 || adjust(this.primaryColor, { h: 60 });\n this.cScale5 = this.cScale5 || adjust(this.primaryColor, { h: 90 });\n this.cScale6 = this.cScale6 || adjust(this.primaryColor, { h: 120 });\n this.cScale7 = this.cScale7 || adjust(this.primaryColor, { h: 150 });\n this.cScale8 = this.cScale8 || adjust(this.primaryColor, { h: 210 });\n this.cScale9 = this.cScale9 || adjust(this.primaryColor, { h: 270 });\n this.cScale10 = this.cScale10 || adjust(this.primaryColor, { h: 300 });\n this.cScale11 = this.cScale11 || adjust(this.primaryColor, { h: 330 });\n this['cScalePeer' + 1] = this['cScalePeer' + 1] || darken(this.secondaryColor, 45);\n this['cScalePeer' + 2] = this['cScalePeer' + 2] || darken(this.tertiaryColor, 40);\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n // Setup the peer color for the set, useful for borders\n this['cScale' + i] = darken(this['cScale' + i], 10);\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 25);\n }\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || adjust(this['cScale' + i], { h: 180 });\n }\n\n // Setup teh label color for the set\n this.scaleLabelColor =\n this.scaleLabelColor !== 'calculated' && this.scaleLabelColor\n ? this.scaleLabelColor\n : this.labelTextColor;\n\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n\n /* Sequence Diagram variables */\n\n this.actorBorder = darken(this.mainBkg, 20);\n this.actorBkg = this.mainBkg;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelTextColor = this.actorTextColor;\n this.loopTextColor = this.actorTextColor;\n this.noteBorderColor = this.border2;\n this.noteTextColor = this.actorTextColor;\n\n /* Gantt chart variables */\n\n this.taskBorderColor = this.border1;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n\n /* state colors */\n this.transitionColor = this.transitionColor || this.lineColor;\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f0f0f0';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.compositeBorder = this.compositeBorder || this.nodeBorder;\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = this.lineColor;\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n this.transitionColor = this.transitionColor || this.lineColor;\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n /* pie */\n this.pie1 = this.pie1 || this.primaryColor;\n this.pie2 = this.pie2 || this.secondaryColor;\n this.pie3 = this.pie3 || this.tertiaryColor;\n this.pie4 = this.pie4 || adjust(this.primaryColor, { l: -30 });\n this.pie5 = this.pie5 || adjust(this.secondaryColor, { l: -30 });\n this.pie6 = this.pie6 || adjust(this.tertiaryColor, { h: +40, l: -40 });\n this.pie7 = this.pie7 || adjust(this.primaryColor, { h: +60, l: -10 });\n this.pie8 = this.pie8 || adjust(this.primaryColor, { h: -60, l: -10 });\n this.pie9 = this.pie9 || adjust(this.primaryColor, { h: 120, l: 0 });\n this.pie10 = this.pie10 || adjust(this.primaryColor, { h: +60, l: -50 });\n this.pie11 = this.pie11 || adjust(this.primaryColor, { h: -60, l: -50 });\n this.pie12 = this.pie12 || adjust(this.primaryColor, { h: 120, l: -50 });\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = this.git0 || this.primaryColor;\n this.git1 = this.git1 || this.secondaryColor;\n this.git2 = this.git2 || this.tertiaryColor;\n this.git3 = this.git3 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.git4 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.git5 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.git6 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.git7 || adjust(this.primaryColor, { h: +120 });\n if (this.darkMode) {\n this.git0 = lighten(this.git0, 25);\n this.git1 = lighten(this.git1, 25);\n this.git2 = lighten(this.git2, 25);\n this.git3 = lighten(this.git3, 25);\n this.git4 = lighten(this.git4, 25);\n this.git5 = lighten(this.git5, 25);\n this.git6 = lighten(this.git6, 25);\n this.git7 = lighten(this.git7, 25);\n } else {\n this.git0 = darken(this.git0, 25);\n this.git1 = darken(this.git1, 25);\n this.git2 = darken(this.git2, 25);\n this.git3 = darken(this.git3, 25);\n this.git4 = darken(this.git4, 25);\n this.git5 = darken(this.git5, 25);\n this.git6 = darken(this.git6, 25);\n this.git7 = darken(this.git7, 25);\n }\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { invert, darken, lighten, adjust } from 'khroma';\nimport { mkBorder } from './theme-helpers';\nimport {\n oldAttributeBackgroundColorEven,\n oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues';\n\n// const Color = require ( 'khroma/dist/color' ).default\n// Color.format.hex.stringify(Color.parse('hsl(210, 66.6666666667%, 95%)')); // => \"#EAF2FB\"\n\nclass Theme {\n constructor() {\n this.primaryColor = '#eee';\n this.contrast = '#707070';\n this.secondaryColor = lighten(this.contrast, 55);\n this.background = '#ffffff';\n\n // this.secondaryColor = adjust(this.primaryColor, { h: 120 });\n this.tertiaryColor = adjust(this.primaryColor, { h: -160 });\n this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);\n this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);\n // this.noteBorderColor = mkBorder(this.noteBkgColor, this.darkMode);\n\n this.primaryTextColor = invert(this.primaryColor);\n this.secondaryTextColor = invert(this.secondaryColor);\n this.tertiaryTextColor = invert(this.tertiaryColor);\n this.lineColor = invert(this.background);\n this.textColor = invert(this.background);\n\n // this.altBackground = lighten(this.contrast, 55);\n this.mainBkg = '#eee';\n this.secondBkg = 'calculated';\n this.lineColor = '#666';\n this.border1 = '#999';\n this.border2 = 'calculated';\n this.note = '#ffa';\n this.text = '#333';\n this.critical = '#d42';\n this.done = '#bbb';\n this.arrowheadColor = '#333333';\n this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n this.fontSize = '16px';\n this.THEME_COLOR_LIMIT = 12;\n\n /* Flowchart variables */\n\n this.nodeBkg = 'calculated';\n this.nodeBorder = 'calculated';\n this.clusterBkg = 'calculated';\n this.clusterBorder = 'calculated';\n this.defaultLinkColor = 'calculated';\n this.titleColor = 'calculated';\n this.edgeLabelBackground = 'white';\n\n /* Sequence Diagram variables */\n\n this.actorBorder = 'calculated';\n this.actorBkg = 'calculated';\n this.actorTextColor = 'calculated';\n this.actorLineColor = 'calculated';\n this.signalColor = 'calculated';\n this.signalTextColor = 'calculated';\n this.labelBoxBkgColor = 'calculated';\n this.labelBoxBorderColor = 'calculated';\n this.labelTextColor = 'calculated';\n this.loopTextColor = 'calculated';\n this.noteBorderColor = 'calculated';\n this.noteBkgColor = 'calculated';\n this.noteTextColor = 'calculated';\n this.activationBorderColor = '#666';\n this.activationBkgColor = '#f4f4f4';\n this.sequenceNumberColor = 'white';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = 'calculated';\n this.altSectionBkgColor = 'white';\n this.sectionBkgColor2 = 'calculated';\n this.excludeBkgColor = '#eeeeee';\n this.taskBorderColor = 'calculated';\n this.taskBkgColor = 'calculated';\n this.taskTextLightColor = 'white';\n this.taskTextColor = 'calculated';\n this.taskTextDarkColor = 'calculated';\n this.taskTextOutsideColor = 'calculated';\n this.taskTextClickableColor = '#003163';\n this.activeTaskBorderColor = 'calculated';\n this.activeTaskBkgColor = 'calculated';\n this.gridColor = 'calculated';\n this.doneTaskBkgColor = 'calculated';\n this.doneTaskBorderColor = 'calculated';\n this.critBkgColor = 'calculated';\n this.critBorderColor = 'calculated';\n this.todayLineColor = 'calculated';\n\n /* C4 Context Diagram variables */\n\n this.personBorder = 'calculated';\n this.personBkg = 'calculated';\n\n /* state colors */\n this.labelColor = 'black';\n\n this.errorBkgColor = '#552222';\n this.errorTextColor = '#552222';\n }\n updateColors() {\n this.secondBkg = lighten(this.contrast, 55);\n this.border2 = this.contrast;\n\n /* Color Scale */\n /* Each color-set will have a background, a forgroupnd and a border color */\n\n this.cScale0 = this.cScale0 || '#555';\n this.cScale1 = this.cScale1 || '#F4F4F4';\n this.cScale2 = this.cScale2 || '#555';\n this.cScale3 = this.cScale3 || '#BBB';\n this.cScale4 = this.cScale4 || '#777';\n this.cScale5 = this.cScale5 || '#999';\n this.cScale6 = this.cScale6 || '#DDD';\n this.cScale7 = this.cScale7 || '#FFF';\n this.cScale8 = this.cScale8 || '#DDD';\n this.cScale9 = this.cScale9 || '#BBB';\n this.cScale10 = this.cScale10 || '#999';\n this.cScale11 = this.cScale11 || '#777';\n\n // Setup the inverted color for the set\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleInv' + i] = this['cScaleInv' + i] || invert(this['cScale' + i]);\n }\n // Setup the peer color for the set, useful for borders\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n if (this.darkMode) {\n this['cScalePeer' + i] = this['cScalePeer' + i] || lighten(this['cScale' + i], 10);\n } else {\n this['cScalePeer' + i] = this['cScalePeer' + i] || darken(this['cScale' + i], 10);\n }\n }\n\n // Setup the label color for the set\n this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? 'black' : this.labelTextColor);\n\n this['cScaleLabel0'] = this['cScaleLabel0'] || this.cScale1;\n this['cScaleLabel2'] = this['cScaleLabel2'] || this.cScale1;\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n }\n\n /* Flowchart variables */\n\n this.nodeBkg = this.mainBkg;\n this.nodeBorder = this.border1;\n this.clusterBkg = this.secondBkg;\n this.clusterBorder = this.border2;\n this.defaultLinkColor = this.lineColor;\n this.titleColor = this.text;\n\n /* Sequence Diagram variables */\n\n this.actorBorder = lighten(this.border1, 23);\n this.actorBkg = this.mainBkg;\n this.actorTextColor = this.text;\n this.actorLineColor = this.lineColor;\n this.signalColor = this.text;\n this.signalTextColor = this.text;\n this.labelBoxBkgColor = this.actorBkg;\n this.labelBoxBorderColor = this.actorBorder;\n this.labelTextColor = this.text;\n this.loopTextColor = this.text;\n this.noteBorderColor = '#999';\n this.noteBkgColor = '#666';\n this.noteTextColor = '#fff';\n\n /* Gantt chart variables */\n\n this.sectionBkgColor = lighten(this.contrast, 30);\n this.sectionBkgColor2 = lighten(this.contrast, 30);\n\n this.taskBorderColor = darken(this.contrast, 10);\n\n this.taskBkgColor = this.contrast;\n this.taskTextColor = this.taskTextLightColor;\n this.taskTextDarkColor = this.text;\n this.taskTextOutsideColor = this.taskTextDarkColor;\n this.activeTaskBorderColor = this.taskBorderColor;\n this.activeTaskBkgColor = this.mainBkg;\n this.gridColor = lighten(this.border1, 30);\n\n this.doneTaskBkgColor = this.done;\n this.doneTaskBorderColor = this.lineColor;\n this.critBkgColor = this.critical;\n this.critBorderColor = darken(this.critBkgColor, 10);\n\n this.todayLineColor = this.critBkgColor;\n\n /* state colors */\n this.transitionColor = this.transitionColor || '#000';\n this.transitionLabelColor = this.transitionLabelColor || this.textColor;\n this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;\n\n this.stateBkg = this.stateBkg || this.mainBkg;\n this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;\n this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;\n this.altBackground = this.altBackground || '#f4f4f4';\n this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;\n this.stateBorder = this.stateBorder || '#000';\n this.innerEndBackground = this.primaryBorderColor;\n this.specialStateColor = '#222';\n\n this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;\n this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;\n\n /* class */\n this.classText = this.primaryTextColor;\n /* journey */\n this.fillType0 = this.primaryColor;\n this.fillType1 = this.secondaryColor;\n this.fillType2 = adjust(this.primaryColor, { h: 64 });\n this.fillType3 = adjust(this.secondaryColor, { h: 64 });\n this.fillType4 = adjust(this.primaryColor, { h: -64 });\n this.fillType5 = adjust(this.secondaryColor, { h: -64 });\n this.fillType6 = adjust(this.primaryColor, { h: 128 });\n this.fillType7 = adjust(this.secondaryColor, { h: 128 });\n\n // /* pie */\n /* Pie diagram */\n for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n this['pie' + i] = this['cScale' + i];\n }\n this.pie12 = this.pie0;\n this.pieTitleTextSize = this.pieTitleTextSize || '25px';\n this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;\n this.pieSectionTextSize = this.pieSectionTextSize || '17px';\n this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;\n this.pieLegendTextSize = this.pieLegendTextSize || '17px';\n this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;\n this.pieStrokeColor = this.pieStrokeColor || 'black';\n this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n this.pieOpacity = this.pieOpacity || '0.7';\n\n /* requirement-diagram */\n this.requirementBackground = this.requirementBackground || this.primaryColor;\n this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n this.requirementBorderSize = this.requirementBorderSize || this.primaryBorderColor;\n this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;\n this.relationColor = this.relationColor || this.lineColor;\n this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;\n this.relationLabelColor = this.relationLabelColor || this.actorTextColor;\n\n /* git */\n this.git0 = darken(this.pie1, 25) || this.primaryColor;\n this.git1 = this.pie2 || this.secondaryColor;\n this.git2 = this.pie3 || this.tertiaryColor;\n this.git3 = this.pie4 || adjust(this.primaryColor, { h: -30 });\n this.git4 = this.pie5 || adjust(this.primaryColor, { h: -60 });\n this.git5 = this.pie6 || adjust(this.primaryColor, { h: -90 });\n this.git6 = this.pie7 || adjust(this.primaryColor, { h: +60 });\n this.git7 = this.pie8 || adjust(this.primaryColor, { h: +120 });\n\n this.gitInv0 = this.gitInv0 || invert(this.git0);\n this.gitInv1 = this.gitInv1 || invert(this.git1);\n this.gitInv2 = this.gitInv2 || invert(this.git2);\n this.gitInv3 = this.gitInv3 || invert(this.git3);\n this.gitInv4 = this.gitInv4 || invert(this.git4);\n this.gitInv5 = this.gitInv5 || invert(this.git5);\n this.gitInv6 = this.gitInv6 || invert(this.git6);\n this.gitInv7 = this.gitInv7 || invert(this.git7);\n\n this.branchLabelColor = this.branchLabelColor || this.labelTextColor;\n this.gitBranchLabel0 = this.branchLabelColor;\n this.gitBranchLabel1 = 'white';\n this.gitBranchLabel2 = this.branchLabelColor;\n this.gitBranchLabel3 = 'white';\n this.gitBranchLabel4 = this.branchLabelColor;\n this.gitBranchLabel5 = this.branchLabelColor;\n this.gitBranchLabel6 = this.branchLabelColor;\n this.gitBranchLabel7 = this.branchLabelColor;\n\n this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;\n this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;\n this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;\n this.tagLabelFontSize = this.tagLabelFontSize || '10px';\n this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;\n this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;\n this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n\n /* -------------------------------------------------- */\n /* EntityRelationship diagrams */\n\n this.attributeBackgroundColorOdd =\n this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n this.attributeBackgroundColorEven =\n this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n /* -------------------------------------------------- */\n }\n calculate(overrides) {\n if (typeof overrides !== 'object') {\n // Calculate colors form base colors\n this.updateColors();\n return;\n }\n\n const keys = Object.keys(overrides);\n\n // Copy values from overrides, this is mainly for base colors\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n\n // Calculate colors form base colors\n this.updateColors();\n // Copy values from overrides again in case of an override of derived value\n keys.forEach((k) => {\n this[k] = overrides[k];\n });\n }\n}\n\nexport const getThemeVariables = (userOverrides) => {\n const theme = new Theme();\n theme.calculate(userOverrides);\n return theme;\n};\n","import { getThemeVariables as baseThemeVariables } from './theme-base';\nimport { getThemeVariables as darkThemeVariables } from './theme-dark';\nimport { getThemeVariables as defaultThemeVariables } from './theme-default';\nimport { getThemeVariables as forestThemeVariables } from './theme-forest';\nimport { getThemeVariables as neutralThemeVariables } from './theme-neutral';\n\nexport default {\n base: {\n getThemeVariables: baseThemeVariables,\n },\n dark: {\n getThemeVariables: darkThemeVariables,\n },\n default: {\n getThemeVariables: defaultThemeVariables,\n },\n forest: {\n getThemeVariables: forestThemeVariables,\n },\n neutral: {\n getThemeVariables: neutralThemeVariables,\n },\n};\n","import theme from './themes';\nimport { MermaidConfig } from './config.type';\n/**\n * **Configuration methods in Mermaid version 8.6.0 have been updated, to learn more[[click\n * here](8.6.0_docs.md)].**\n *\n * ## **What follows are config instructions for older versions**\n *\n * These are the default options which can be overridden with the initialization call like so:\n *\n * **Example 1:**
 mermaid.initialize({ flowchart:{ htmlLabels: false } }); 
\n *\n * **Example 2:**
  
\n *\n * A summary of all options and their defaults is found [here](#mermaidapi-configuration-defaults).\n * A description of each option follows below.\n *\n * @name Configuration\n */\nconst config: Partial = {\n /**\n * Theme , the CSS style sheet\n *\n * | Parameter | Description | Type | Required | Values |\n * | --------- | --------------- | ------ | -------- | ---------------------------------------------- |\n * | theme | Built in Themes | string | Optional | 'default', 'forest', 'dark', 'neutral', 'null' |\n *\n * **Notes:** To disable any pre-defined mermaid theme, use \"null\".
 \"theme\": \"forest\",\n   * \"themeCSS\": \".node rect { fill: red; }\" 
\n */\n theme: 'default',\n themeVariables: theme['default'].getThemeVariables(),\n themeCSS: undefined,\n /* **maxTextSize** - The maximum allowed size of the users text diagram */\n maxTextSize: 50000,\n darkMode: false,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ---------- | ------------------------------------------------------ | ------ | -------- | --------------------------- |\n * | fontFamily | specifies the font to be used in the rendered diagrams | string | Required | Any Possible CSS FontFamily |\n *\n * **Notes:** Default value: '\"trebuchet ms\", verdana, arial, sans-serif;'.\n */\n fontFamily: '\"trebuchet ms\", verdana, arial, sans-serif;',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ----------------------------------------------------- | ---------------- | -------- | --------------------------------------------- |\n * | logLevel | This option decides the amount of logging to be used. | string \\| number | Required | 'trace','debug','info','warn','error','fatal' |\n *\n * **Notes:**\n *\n * - Trace: 0\n * - Debug: 1\n * - Info: 2\n * - Warn: 3\n * - Error: 4\n * - Fatal: 5 (default)\n */\n logLevel: 5,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------- | --------------------------------- | ------ | -------- | ------------------------------------------ |\n * | securityLevel | Level of trust for parsed diagram | string | Required | 'sandbox', 'strict', 'loose', 'antiscript' |\n *\n * **Notes**:\n *\n * - **strict**: (**default**) tags in text are encoded, click functionality is disabled\n * - **loose**: tags in text are allowed, click functionality is enabled\n * - **antiscript**: html tags in text are allowed, (only script element is removed), click\n * functionality is enabled\n * - **sandbox**: With this security level all rendering takes place in a sandboxed iframe. This\n * prevent any JavaScript from running in the context. This may hinder interactive functionality\n * of the diagram like scripts, popups in sequence diagram or links to other tabs/targets etc.\n */\n securityLevel: 'strict',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | -------------------------------------------- | ------- | -------- | ----------- |\n * | startOnLoad | Dictates whether mermaid starts on Page load | boolean | Required | true, false |\n *\n * **Notes:** Default value: true\n */\n startOnLoad: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------------- | ---------------------------------------------------------------------------- | ------- | -------- | ----------- |\n * | arrowMarkerAbsolute | Controls whether or arrow markers in html code are absolute paths or anchors | boolean | Required | true, false |\n *\n * **Notes**:\n *\n * This matters if you are using base tag settings.\n *\n * Default value: false\n */\n arrowMarkerAbsolute: false,\n\n /**\n * This option controls which currentConfig keys are considered _secure_ and can only be changed\n * via call to mermaidAPI.initialize. Calls to mermaidAPI.reinitialize cannot make changes to the\n * `secure` keys in the current currentConfig. This prevents malicious graph directives from\n * overriding a site's default security.\n *\n * **Notes**:\n *\n * Default value: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize']\n */\n secure: ['secure', 'securityLevel', 'startOnLoad', 'maxTextSize'],\n lazyLoadedDiagrams: [],\n /**\n * This option controls if the generated ids of nodes in the SVG are generated randomly or based\n * on a seed. If set to false, the IDs are generated based on the current date and thus are not\n * deterministic. This is the default behaviour.\n *\n * **Notes**:\n *\n * This matters if your files are checked into sourcecontrol e.g. git and should not change unless\n * content is changed.\n *\n * Default value: false\n */\n deterministicIds: false,\n\n /**\n * This option is the optional seed for deterministic ids. if set to undefined but\n * deterministicIds is true, a simple number iterator is used. You can set this attribute to base\n * the seed on a static string.\n */\n deterministicIDSeed: undefined,\n\n /** The object containing configurations specific for flowcharts */\n flowchart: {\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ----------------------------------------------- | ------- | -------- | ------------------ |\n * | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n *\n * The amount of padding around the diagram as a whole so that embedded diagrams have margins,\n * expressed in pixels\n *\n * Default value: 8\n */\n diagramPadding: 8,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ---------- | -------------------------------------------------------------------------------------------- | ------- | -------- | ----------- |\n * | htmlLabels | Flag for setting whether or not a html tag should be used for rendering labels on the edges. | boolean | Required | true, false |\n *\n * **Notes:** Default value: true.\n */\n htmlLabels: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | --------------------------------------------------- | ------- | -------- | ------------------- |\n * | nodeSpacing | Defines the spacing between nodes on the same level | Integer | Required | Any positive Number |\n *\n * **Notes:**\n *\n * Pertains to horizontal spacing for TB (top to bottom) or BT (bottom to top) graphs, and the\n * vertical spacing for LR as well as RL graphs.**\n *\n * Default value: 50\n */\n nodeSpacing: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------------------------------------------------- | ------- | -------- | ------------------- |\n * | rankSpacing | Defines the spacing between nodes on different levels | Integer | Required | Any Positive Number |\n *\n * **Notes**:\n *\n * Pertains to vertical spacing for TB (top to bottom) or BT (bottom to top), and the horizontal\n * spacing for LR as well as RL graphs.\n *\n * Default value 50\n */\n rankSpacing: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | -------------------------------------------------- | ------ | -------- | ----------------------------- |\n * | curve | Defines how mermaid renders curves for flowcharts. | string | Required | 'basis', 'linear', 'cardinal' |\n *\n * **Notes:**\n *\n * Default Value: 'basis'\n */\n curve: 'basis',\n // Only used in new experimental rendering\n // represents the padding between the labels and the shape\n padding: 15,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ----------- | ------- | -------- | ----------------------- |\n * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n *\n * **Notes:**\n *\n * Decides which rendering engine that is to be used for the rendering. Legal values are:\n * dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid\n *\n * Default value: 'dagre-wrapper'\n */\n defaultRenderer: 'dagre-wrapper',\n },\n\n /** The object containing configurations specific for sequence diagrams */\n sequence: {\n hideUnusedParticipants: false,\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ---------------------------- | ------- | -------- | ------------------ |\n * | activationWidth | Width of the activation rect | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value :10\n */\n activationWidth: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ---------------------------------------------------- | ------- | -------- | ------------------ |\n * | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 50\n */\n diagramMarginX: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ------------------------------------------------- | ------- | -------- | ------------------ |\n * | diagramMarginY | Margin to the over and under the sequence diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n diagramMarginY: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | --------------------- | ------- | -------- | ------------------ |\n * | actorMargin | Margin between actors | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 50\n */\n actorMargin: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | -------------------- | ------- | -------- | ------------------ |\n * | width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 150\n */\n width: 150,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | --------------------- | ------- | -------- | ------------------ |\n * | height | Height of actor boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 65\n */\n height: 65,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ------------------------ | ------- | -------- | ------------------ |\n * | boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n boxMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------- | -------------------------------------------- | ------- | -------- | ------------------ |\n * | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 5\n */\n boxTextMargin: 5,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ---------- | ------------------- | ------- | -------- | ------------------ |\n * | noteMargin | margin around notes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n noteMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------- | ---------------------- | ------- | -------- | ------------------ |\n * | messageMargin | Space between messages | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 35\n */\n messageMargin: 35,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------ | --------------------------- | ------ | -------- | ------------------------- |\n * | messageAlign | Multiline message alignment | string | Required | 'left', 'center', 'right' |\n *\n * **Notes:** Default value: 'center'\n */\n messageAlign: 'center',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------ | --------------------------- | ------- | -------- | ----------- |\n * | mirrorActors | Mirror actors under diagram | boolean | Required | true, false |\n *\n * **Notes:** Default value: true\n */\n mirrorActors: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ---------- | ----------------------------------------------------------------------- | ------- | -------- | ----------- |\n * | forceMenus | forces actor popup menus to always be visible (to support E2E testing). | Boolean | Required | True, False |\n *\n * **Notes:**\n *\n * Default value: false.\n */\n forceMenus: false,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ------------------------------------------ | ------- | -------- | ------------------ |\n * | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n *\n * Depending on css styling this might need adjustment.\n *\n * Default value: 1\n */\n bottomMarginAdj: 1,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:** When this flag is set to true, the height and width is set to 100% and is then\n * scaling with the available space. If set to false, the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ------------------------------------ | ------- | -------- | ----------- |\n * | rightAngles | display curve arrows as right angles | boolean | Required | true, false |\n *\n * **Notes:**\n *\n * This will display arrows that start and begin at the same node as right angles, rather than a\n * curve\n *\n * Default value: false\n */\n rightAngles: false,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------------- | ------------------------------- | ------- | -------- | ----------- |\n * | showSequenceNumbers | This will show the node numbers | boolean | Required | true, false |\n *\n * **Notes:** Default value: false\n */\n showSequenceNumbers: false,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------- | -------------------------------------------------- | ------- | -------- | ------------------ |\n * | actorFontSize | This sets the font size of the actor's description | Integer | Require | Any Positive Value |\n *\n * **Notes:** **Default value 14**..\n */\n actorFontSize: 14,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ---------------------------------------------------- | ------ | -------- | --------------------------- |\n * | actorFontFamily | This sets the font family of the actor's description | string | Required | Any Possible CSS FontFamily |\n *\n * **Notes:** Default value: \"'Open Sans\", sans-serif'\n */\n actorFontFamily: '\"Open Sans\", sans-serif',\n\n /**\n * This sets the font weight of the actor's description\n *\n * **Notes:** Default value: 400.\n */\n actorFontWeight: 400,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------ | ----------------------------------------------- | ------- | -------- | ------------------ |\n * | noteFontSize | This sets the font size of actor-attached notes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 14\n */\n noteFontSize: 14,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | -------------------------------------------------- | ------ | -------- | --------------------------- |\n * | noteFontFamily | This sets the font family of actor-attached notes. | string | Required | Any Possible CSS FontFamily |\n *\n * **Notes:** Default value: ''\"trebuchet ms\", verdana, arial, sans-serif'\n */\n noteFontFamily: '\"trebuchet ms\", verdana, arial, sans-serif',\n\n /**\n * This sets the font weight of the note's description\n *\n * **Notes:** Default value: 400\n */\n noteFontWeight: 400,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ---------------------------------------------------- | ------ | -------- | ------------------------- |\n * | noteAlign | This sets the text alignment of actor-attached notes | string | required | 'left', 'center', 'right' |\n *\n * **Notes:** Default value: 'center'\n */\n noteAlign: 'center',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ----------------------------------------- | ------- | -------- | ------------------- |\n * | messageFontSize | This sets the font size of actor messages | Integer | Required | Any Positive Number |\n *\n * **Notes:** Default value: 16\n */\n messageFontSize: 16,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------------- | ------------------------------------------- | ------ | -------- | --------------------------- |\n * | messageFontFamily | This sets the font family of actor messages | string | Required | Any Possible CSS FontFamily |\n *\n * **Notes:** Default value: '\"trebuchet ms\", verdana, arial, sans-serif'\n */\n messageFontFamily: '\"trebuchet ms\", verdana, arial, sans-serif',\n\n /**\n * This sets the font weight of the message's description\n *\n * **Notes:** Default value: 400.\n */\n messageFontWeight: 400,\n\n /**\n * This sets the auto-wrap state for the diagram\n *\n * **Notes:** Default value: false.\n */\n wrap: false,\n\n /**\n * This sets the auto-wrap padding for the diagram (sides only)\n *\n * **Notes:** Default value: 0.\n */\n wrapPadding: 10,\n\n /**\n * This sets the width of the loop-box (loop, alt, opt, par)\n *\n * **Notes:** Default value: 50.\n */\n labelBoxWidth: 50,\n\n /**\n * This sets the height of the loop-box (loop, alt, opt, par)\n *\n * **Notes:** Default value: 20.\n */\n labelBoxHeight: 20,\n\n messageFont: function () {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight,\n };\n },\n noteFont: function () {\n return {\n fontFamily: this.noteFontFamily,\n fontSize: this.noteFontSize,\n fontWeight: this.noteFontWeight,\n };\n },\n actorFont: function () {\n return {\n fontFamily: this.actorFontFamily,\n fontSize: this.actorFontSize,\n fontWeight: this.actorFontWeight,\n };\n },\n },\n\n /** The object containing configurations specific for gantt diagrams */\n gantt: {\n /**\n * ### titleTopMargin\n *\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ---------------------------------------------- | ------- | -------- | ------------------ |\n * | titleTopMargin | Margin top for the text over the gantt diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 25\n */\n titleTopMargin: 25,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ----------------------------------- | ------- | -------- | ------------------ |\n * | barHeight | The height of the bars in the graph | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 20\n */\n barHeight: 20,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ---------------------------------------------------------------- | ------- | -------- | ------------------ |\n * | barGap | The margin between the different activities in the gantt diagram | Integer | Optional | Any Positive Value |\n *\n * **Notes:** Default value: 4\n */\n barGap: 4,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ---------- | -------------------------------------------------------------------------- | ------- | -------- | ------------------ |\n * | topPadding | Margin between title and gantt diagram and between axis and gantt diagram. | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 50\n */\n topPadding: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------ | ----------------------------------------------------------------------- | ------- | -------- | ------------------ |\n * | rightPadding | The space allocated for the section name to the right of the activities | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 75\n */\n rightPadding: 75,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ---------------------------------------------------------------------- | ------- | -------- | ------------------ |\n * | leftPadding | The space allocated for the section name to the left of the activities | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 75\n */\n leftPadding: 75,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------------- | -------------------------------------------- | ------- | -------- | ------------------ |\n * | gridLineStartPadding | Vertical starting position of the grid lines | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 35\n */\n gridLineStartPadding: 35,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ----------- | ------- | -------- | ------------------ |\n * | fontSize | Font size | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 11\n */\n fontSize: 11,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ---------------------- | ------- | -------- | ------------------ |\n * | sectionFontSize | Font size for sections | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 11\n */\n sectionFontSize: 11,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------------- | ---------------------------------------- | ------- | -------- | ------------------ |\n * | numberSectionStyles | The number of alternating section styles | Integer | 4 | Any Positive Value |\n *\n * **Notes:** Default value: 4\n */\n numberSectionStyles: 4,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ---------- | --------------------------- | ---- | -------- | ---------------- |\n * | axisFormat | Datetime format of the axis | 3 | Required | Date in yy-mm-dd |\n *\n * **Notes:**\n *\n * This might need adjustment to match your locale and preferences\n *\n * Default value: '%Y-%m-%d'.\n */\n axisFormat: '%Y-%m-%d',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ----------- | ------- | -------- | ----------- |\n * | topAxis | See notes | Boolean | 4 | True, False |\n *\n * **Notes:** when this flag is set date labels will be added to the top of the chart\n *\n * **Default value false**.\n */\n topAxis: false,\n\n useWidth: undefined,\n },\n\n /** The object containing configurations specific for journey diagrams */\n journey: {\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ---------------------------------------------------- | ------- | -------- | ------------------ |\n * | diagramMarginX | Margin to the right and left of the sequence diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 50\n */\n diagramMarginX: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | -------------------------------------------------- | ------- | -------- | ------------------ |\n * | diagramMarginY | Margin to the over and under the sequence diagram. | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n diagramMarginY: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | --------------------- | ------- | -------- | ------------------ |\n * | actorMargin | Margin between actors | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 50\n */\n leftMargin: 150,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | -------------------- | ------- | -------- | ------------------ |\n * | width | Width of actor boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 150\n */\n width: 150,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | --------------------- | ------- | -------- | ------------------ |\n * | height | Height of actor boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 65\n */\n height: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ------------------------ | ------- | -------- | ------------------ |\n * | boxMargin | Margin around loop boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n boxMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------- | -------------------------------------------- | ------- | -------- | ------------------ |\n * | boxTextMargin | Margin around the text in loop/alt/opt boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 5\n */\n boxTextMargin: 5,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ---------- | ------------------- | ------- | -------- | ------------------ |\n * | noteMargin | Margin around notes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n noteMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------- | ----------------------- | ------- | -------- | ------------------ |\n * | messageMargin | Space between messages. | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n *\n * Space between messages.\n *\n * Default value: 35\n */\n messageMargin: 35,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------ | --------------------------- | ---- | -------- | ------------------------- |\n * | messageAlign | Multiline message alignment | 3 | 4 | 'left', 'center', 'right' |\n *\n * **Notes:** Default value: 'center'\n */\n messageAlign: 'center',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ------------------------------------------ | ------- | -------- | ------------------ |\n * | bottomMarginAdj | Prolongs the edge of the diagram downwards | Integer | 4 | Any Positive Value |\n *\n * **Notes:**\n *\n * Depending on css styling this might need adjustment.\n *\n * Default value: 1\n */\n bottomMarginAdj: 1,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | --------------------------------- | ---- | -------- | ----------- |\n * | rightAngles | Curved Arrows become Right Angles | 3 | 4 | true, false |\n *\n * **Notes:**\n *\n * This will display arrows that start and begin at the same node as right angles, rather than a\n * curves\n *\n * Default value: false\n */\n rightAngles: false,\n taskFontSize: 14,\n taskFontFamily: '\"Open Sans\", sans-serif',\n taskMargin: 50,\n // width of activation box\n activationWidth: 10,\n\n // text placement as: tspan | fo | old only text as before\n textPlacement: 'fo',\n actorColours: ['#8FBC8F', '#7CFC00', '#00FFFF', '#20B2AA', '#B0E0E6', '#FFFFE0'],\n\n sectionFills: ['#191970', '#8B008B', '#4B0082', '#2F4F4F', '#800000', '#8B4513', '#00008B'],\n sectionColours: ['#fff'],\n },\n class: {\n arrowMarkerAbsolute: false,\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ----------- | ------- | -------- | ----------------------- |\n * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n *\n * **Notes**:\n *\n * Decides which rendering engine that is to be used for the rendering. Legal values are:\n * dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid\n *\n * Default value: 'dagre-d3'\n */\n defaultRenderer: 'dagre-wrapper',\n },\n state: {\n dividerMargin: 10,\n sizeUnit: 5,\n padding: 8,\n textHeight: 10,\n titleShift: -15,\n noteMargin: 10,\n forkWidth: 70,\n forkHeight: 7,\n // Used\n miniPadding: 2,\n // Font size factor, this is used to guess the width of the edges labels before rendering by dagre\n // layout. This might need updating if/when switching font\n fontSizeFactor: 5.02,\n fontSize: 24,\n labelHeight: 16,\n edgeLengthFactor: '20',\n compositTitleSize: 35,\n radius: 5,\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See notes | boolean | 4 | true, false |\n *\n * **Notes:**\n *\n * When this flag is set the height and width is set to 100% and is then scaling with the\n * available space if not the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ----------- | ------- | -------- | ----------------------- |\n * | defaultRenderer | See notes | boolean | 4 | dagre-d3, dagre-wrapper |\n *\n * **Notes:**\n *\n * Decides which rendering engine that is to be used for the rendering. Legal values are:\n * dagre-d3 dagre-wrapper - wrapper for dagre implemented in mermaid\n *\n * Default value: 'dagre-d3'\n */\n defaultRenderer: 'dagre-wrapper',\n },\n\n /** The object containing configurations specific for entity relationship diagrams */\n er: {\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ----------------------------------------------- | ------- | -------- | ------------------ |\n * | diagramPadding | Amount of padding around the diagram as a whole | Integer | Required | Any Positive Value |\n *\n * **Notes:**\n *\n * The amount of padding around the diagram as a whole so that embedded diagrams have margins,\n * expressed in pixels\n *\n * Default value: 20\n */\n diagramPadding: 20,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ---------------------------------------- | ------ | -------- | ---------------------- |\n * | layoutDirection | Directional bias for layout of entities. | string | Required | \"TB\", \"BT\", \"LR\", \"RL\" |\n *\n * **Notes:**\n *\n * 'TB' for Top-Bottom, 'BT'for Bottom-Top, 'LR' for Left-Right, or 'RL' for Right to Left.\n *\n * T = top, B = bottom, L = left, and R = right.\n *\n * Default value: 'TB'\n */\n layoutDirection: 'TB',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ---------------------------------- | ------- | -------- | ------------------ |\n * | minEntityWidth | The minimum width of an entity box | Integer | Required | Any Positive Value |\n *\n * **Notes:** Expressed in pixels. Default value: 100\n */\n minEntityWidth: 100,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ----------------------------------- | ------- | -------- | ------------------ |\n * | minEntityHeight | The minimum height of an entity box | Integer | 4 | Any Positive Value |\n *\n * **Notes:** Expressed in pixels Default value: 75\n */\n minEntityHeight: 75,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------- | ------------------------------------------------------------ | ------- | -------- | ------------------ |\n * | entityPadding | Minimum internal padding between text in box and box borders | Integer | 4 | Any Positive Value |\n *\n * **Notes:**\n *\n * The minimum internal padding between text in an entity box and the enclosing box borders,\n * expressed in pixels.\n *\n * Default value: 15\n */\n entityPadding: 15,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ----------------------------------- | ------ | -------- | -------------------- |\n * | stroke | Stroke color of box edges and lines | string | 4 | Any recognized color |\n *\n * **Notes:** Default value: 'gray'\n */\n stroke: 'gray',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | -------------------------- | ------ | -------- | -------------------- |\n * | fill | Fill color of entity boxes | string | 4 | Any recognized color |\n *\n * **Notes:** Default value: 'honeydew'\n */\n fill: 'honeydew',\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ------------------- | ------- | -------- | ------------------ |\n * | fontSize | Font Size in pixels | Integer | | Any Positive Value |\n *\n * **Notes:**\n *\n * Font size (expressed as an integer representing a number of pixels) Default value: 12\n */\n fontSize: 12,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:**\n *\n * When this flag is set to true, the diagram width is locked to 100% and scaled based on\n * available space. If set to false, the diagram reserves its absolute width.\n *\n * Default value: true\n */\n useMaxWidth: true,\n },\n\n /** The object containing configurations specific for pie diagrams */\n pie: {\n useWidth: undefined,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:**\n *\n * When this flag is set to true, the diagram width is locked to 100% and scaled based on\n * available space. If set to false, the diagram reserves its absolute width.\n *\n * Default value: true\n */\n useMaxWidth: true,\n },\n\n /** The object containing configurations specific for req diagrams */\n requirement: {\n useWidth: undefined,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:**\n *\n * When this flag is set to true, the diagram width is locked to 100% and scaled based on\n * available space. If set to false, the diagram reserves its absolute width.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n rect_fill: '#f9f9f9',\n text_color: '#333',\n rect_border_size: '0.5px',\n rect_border_color: '#bbb',\n rect_min_width: 200,\n rect_min_height: 200,\n fontSize: 14,\n rect_padding: 10,\n line_height: 20,\n },\n gitGraph: {\n diagramPadding: 8,\n nodeLabel: {\n width: 75,\n height: 100,\n x: -25,\n y: 0,\n },\n mainBranchName: 'main',\n mainBranchOrder: 0,\n showCommitLabel: true,\n showBranches: true,\n rotateCommitLabel: true,\n },\n\n /** The object containing configurations specific for c4 diagrams */\n c4: {\n useWidth: undefined,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ---------------------------------------------- | ------- | -------- | ------------------ |\n * | diagramMarginX | Margin to the right and left of the c4 diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 50\n */\n diagramMarginX: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ------------------------------------------- | ------- | -------- | ------------------ |\n * | diagramMarginY | Margin to the over and under the c4 diagram | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n diagramMarginY: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------- | --------------------- | ------- | -------- | ------------------ |\n * | c4ShapeMargin | Margin between shapes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 50\n */\n c4ShapeMargin: 50,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | -------------- | ---------------------- | ------- | -------- | ------------------ |\n * | c4ShapePadding | Padding between shapes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 20\n */\n c4ShapePadding: 20,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | --------------------- | ------- | -------- | ------------------ |\n * | width | Width of person boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 216\n */\n width: 216,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ---------------------- | ------- | -------- | ------------------ |\n * | height | Height of person boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 60\n */\n height: 60,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------- | ------------------- | ------- | -------- | ------------------ |\n * | boxMargin | Margin around boxes | Integer | Required | Any Positive Value |\n *\n * **Notes:** Default value: 10\n */\n boxMargin: 10,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ----------- | ----------- | ------- | -------- | ----------- |\n * | useMaxWidth | See Notes | boolean | Required | true, false |\n *\n * **Notes:** When this flag is set to true, the height and width is set to 100% and is then\n * scaling with the available space. If set to false, the absolute space required is used.\n *\n * Default value: true\n */\n useMaxWidth: true,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | ------------ | ----------- | ------- | -------- | ------------------ |\n * | c4ShapeInRow | See Notes | Integer | Required | Any Positive Value |\n *\n * **Notes:** How many shapes to place in each row.\n *\n * Default value: 4\n */\n c4ShapeInRow: 4,\n\n nextLinePaddingX: 0,\n\n /**\n * | Parameter | Description | Type | Required | Values |\n * | --------------- | ----------- | ------- | -------- | ------------------ |\n * | c4BoundaryInRow | See Notes | Integer | Required | Any Positive Value |\n *\n * **Notes:** How many boundarys to place in each row.\n *\n * Default value: 2\n */\n c4BoundaryInRow: 2,\n\n /**\n * This sets the font size of Person shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n personFontSize: 14,\n /**\n * This sets the font family of Person shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n personFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Person shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n personFontWeight: 'normal',\n\n /**\n * This sets the font size of External Person shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_personFontSize: 14,\n /**\n * This sets the font family of External Person shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_personFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External Person shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_personFontWeight: 'normal',\n\n /**\n * This sets the font size of System shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n systemFontSize: 14,\n /**\n * This sets the font family of System shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n systemFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of System shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n systemFontWeight: 'normal',\n\n /**\n * This sets the font size of External System shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_systemFontSize: 14,\n /**\n * This sets the font family of External System shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_systemFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External System shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_systemFontWeight: 'normal',\n\n /**\n * This sets the font size of System DB shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n system_dbFontSize: 14,\n /**\n * This sets the font family of System DB shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n system_dbFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of System DB shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n system_dbFontWeight: 'normal',\n\n /**\n * This sets the font size of External System DB shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_system_dbFontSize: 14,\n /**\n * This sets the font family of External System DB shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_system_dbFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External System DB shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_system_dbFontWeight: 'normal',\n\n /**\n * This sets the font size of System Queue shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n system_queueFontSize: 14,\n /**\n * This sets the font family of System Queue shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n system_queueFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of System Queue shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n system_queueFontWeight: 'normal',\n\n /**\n * This sets the font size of External System Queue shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_system_queueFontSize: 14,\n /**\n * This sets the font family of External System Queue shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_system_queueFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External System Queue shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_system_queueFontWeight: 'normal',\n\n /**\n * This sets the font size of Boundary shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n boundaryFontSize: 14,\n /**\n * This sets the font family of Boundary shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n boundaryFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Boundary shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n boundaryFontWeight: 'normal',\n\n /**\n * This sets the font size of Message shape for the diagram\n *\n * **Notes:** Default value: 12.\n */\n messageFontSize: 12,\n /**\n * This sets the font family of Message shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n messageFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Message shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n messageFontWeight: 'normal',\n\n /**\n * This sets the font size of Container shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n containerFontSize: 14,\n /**\n * This sets the font family of Container shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n containerFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Container shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n containerFontWeight: 'normal',\n\n /**\n * This sets the font size of External Container shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_containerFontSize: 14,\n /**\n * This sets the font family of External Container shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_containerFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External Container shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_containerFontWeight: 'normal',\n\n /**\n * This sets the font size of Container DB shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n container_dbFontSize: 14,\n /**\n * This sets the font family of Container DB shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n container_dbFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Container DB shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n container_dbFontWeight: 'normal',\n\n /**\n * This sets the font size of External Container DB shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_container_dbFontSize: 14,\n /**\n * This sets the font family of External Container DB shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_container_dbFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External Container DB shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_container_dbFontWeight: 'normal',\n\n /**\n * This sets the font size of Container Queue shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n container_queueFontSize: 14,\n /**\n * This sets the font family of Container Queue shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n container_queueFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Container Queue shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n container_queueFontWeight: 'normal',\n\n /**\n * This sets the font size of External Container Queue shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_container_queueFontSize: 14,\n /**\n * This sets the font family of External Container Queue shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_container_queueFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External Container Queue shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_container_queueFontWeight: 'normal',\n\n /**\n * This sets the font size of Component shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n componentFontSize: 14,\n /**\n * This sets the font family of Component shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n componentFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Component shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n componentFontWeight: 'normal',\n\n /**\n * This sets the font size of External Component shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_componentFontSize: 14,\n /**\n * This sets the font family of External Component shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_componentFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External Component shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_componentFontWeight: 'normal',\n\n /**\n * This sets the font size of Component DB shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n component_dbFontSize: 14,\n /**\n * This sets the font family of Component DB shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n component_dbFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Component DB shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n component_dbFontWeight: 'normal',\n\n /**\n * This sets the font size of External Component DB shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_component_dbFontSize: 14,\n /**\n * This sets the font family of External Component DB shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_component_dbFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External Component DB shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_component_dbFontWeight: 'normal',\n\n /**\n * This sets the font size of Component Queue shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n component_queueFontSize: 14,\n /**\n * This sets the font family of Component Queue shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n component_queueFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of Component Queue shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n component_queueFontWeight: 'normal',\n\n /**\n * This sets the font size of External Component Queue shape for the diagram\n *\n * **Notes:** Default value: 14.\n */\n external_component_queueFontSize: 14,\n /**\n * This sets the font family of External Component Queue shape for the diagram\n *\n * **Notes:** Default value: \"Open Sans\", sans-serif.\n */\n external_component_queueFontFamily: '\"Open Sans\", sans-serif',\n /**\n * This sets the font weight of External Component Queue shape for the diagram\n *\n * **Notes:** Default value: normal.\n */\n external_component_queueFontWeight: 'normal',\n\n /**\n * This sets the auto-wrap state for the diagram\n *\n * **Notes:** Default value: true.\n */\n wrap: true,\n\n /**\n * This sets the auto-wrap padding for the diagram (sides only)\n *\n * **Notes:** Default value: 0.\n */\n wrapPadding: 10,\n\n personFont: function () {\n return {\n fontFamily: this.personFontFamily,\n fontSize: this.personFontSize,\n fontWeight: this.personFontWeight,\n };\n },\n\n external_personFont: function () {\n return {\n fontFamily: this.external_personFontFamily,\n fontSize: this.external_personFontSize,\n fontWeight: this.external_personFontWeight,\n };\n },\n\n systemFont: function () {\n return {\n fontFamily: this.systemFontFamily,\n fontSize: this.systemFontSize,\n fontWeight: this.systemFontWeight,\n };\n },\n\n external_systemFont: function () {\n return {\n fontFamily: this.external_systemFontFamily,\n fontSize: this.external_systemFontSize,\n fontWeight: this.external_systemFontWeight,\n };\n },\n\n system_dbFont: function () {\n return {\n fontFamily: this.system_dbFontFamily,\n fontSize: this.system_dbFontSize,\n fontWeight: this.system_dbFontWeight,\n };\n },\n\n external_system_dbFont: function () {\n return {\n fontFamily: this.external_system_dbFontFamily,\n fontSize: this.external_system_dbFontSize,\n fontWeight: this.external_system_dbFontWeight,\n };\n },\n\n system_queueFont: function () {\n return {\n fontFamily: this.system_queueFontFamily,\n fontSize: this.system_queueFontSize,\n fontWeight: this.system_queueFontWeight,\n };\n },\n\n external_system_queueFont: function () {\n return {\n fontFamily: this.external_system_queueFontFamily,\n fontSize: this.external_system_queueFontSize,\n fontWeight: this.external_system_queueFontWeight,\n };\n },\n\n containerFont: function () {\n return {\n fontFamily: this.containerFontFamily,\n fontSize: this.containerFontSize,\n fontWeight: this.containerFontWeight,\n };\n },\n\n external_containerFont: function () {\n return {\n fontFamily: this.external_containerFontFamily,\n fontSize: this.external_containerFontSize,\n fontWeight: this.external_containerFontWeight,\n };\n },\n\n container_dbFont: function () {\n return {\n fontFamily: this.container_dbFontFamily,\n fontSize: this.container_dbFontSize,\n fontWeight: this.container_dbFontWeight,\n };\n },\n\n external_container_dbFont: function () {\n return {\n fontFamily: this.external_container_dbFontFamily,\n fontSize: this.external_container_dbFontSize,\n fontWeight: this.external_container_dbFontWeight,\n };\n },\n\n container_queueFont: function () {\n return {\n fontFamily: this.container_queueFontFamily,\n fontSize: this.container_queueFontSize,\n fontWeight: this.container_queueFontWeight,\n };\n },\n\n external_container_queueFont: function () {\n return {\n fontFamily: this.external_container_queueFontFamily,\n fontSize: this.external_container_queueFontSize,\n fontWeight: this.external_container_queueFontWeight,\n };\n },\n\n componentFont: function () {\n return {\n fontFamily: this.componentFontFamily,\n fontSize: this.componentFontSize,\n fontWeight: this.componentFontWeight,\n };\n },\n\n external_componentFont: function () {\n return {\n fontFamily: this.external_componentFontFamily,\n fontSize: this.external_componentFontSize,\n fontWeight: this.external_componentFontWeight,\n };\n },\n\n component_dbFont: function () {\n return {\n fontFamily: this.component_dbFontFamily,\n fontSize: this.component_dbFontSize,\n fontWeight: this.component_dbFontWeight,\n };\n },\n\n external_component_dbFont: function () {\n return {\n fontFamily: this.external_component_dbFontFamily,\n fontSize: this.external_component_dbFontSize,\n fontWeight: this.external_component_dbFontWeight,\n };\n },\n\n component_queueFont: function () {\n return {\n fontFamily: this.component_queueFontFamily,\n fontSize: this.component_queueFontSize,\n fontWeight: this.component_queueFontWeight,\n };\n },\n\n external_component_queueFont: function () {\n return {\n fontFamily: this.external_component_queueFontFamily,\n fontSize: this.external_component_queueFontSize,\n fontWeight: this.external_component_queueFontWeight,\n };\n },\n\n boundaryFont: function () {\n return {\n fontFamily: this.boundaryFontFamily,\n fontSize: this.boundaryFontSize,\n fontWeight: this.boundaryFontWeight,\n };\n },\n\n messageFont: function () {\n return {\n fontFamily: this.messageFontFamily,\n fontSize: this.messageFontSize,\n fontWeight: this.messageFontWeight,\n };\n },\n\n // ' Colors\n // ' ##################################\n person_bg_color: '#08427B',\n person_border_color: '#073B6F',\n external_person_bg_color: '#686868',\n external_person_border_color: '#8A8A8A',\n system_bg_color: '#1168BD',\n system_border_color: '#3C7FC0',\n system_db_bg_color: '#1168BD',\n system_db_border_color: '#3C7FC0',\n system_queue_bg_color: '#1168BD',\n system_queue_border_color: '#3C7FC0',\n external_system_bg_color: '#999999',\n external_system_border_color: '#8A8A8A',\n external_system_db_bg_color: '#999999',\n external_system_db_border_color: '#8A8A8A',\n external_system_queue_bg_color: '#999999',\n external_system_queue_border_color: '#8A8A8A',\n container_bg_color: '#438DD5',\n container_border_color: '#3C7FC0',\n container_db_bg_color: '#438DD5',\n container_db_border_color: '#3C7FC0',\n container_queue_bg_color: '#438DD5',\n container_queue_border_color: '#3C7FC0',\n external_container_bg_color: '#B3B3B3',\n external_container_border_color: '#A6A6A6',\n external_container_db_bg_color: '#B3B3B3',\n external_container_db_border_color: '#A6A6A6',\n external_container_queue_bg_color: '#B3B3B3',\n external_container_queue_border_color: '#A6A6A6',\n component_bg_color: '#85BBF0',\n component_border_color: '#78A8D8',\n component_db_bg_color: '#85BBF0',\n component_db_border_color: '#78A8D8',\n component_queue_bg_color: '#85BBF0',\n component_queue_border_color: '#78A8D8',\n external_component_bg_color: '#CCCCCC',\n external_component_border_color: '#BFBFBF',\n external_component_db_bg_color: '#CCCCCC',\n external_component_db_border_color: '#BFBFBF',\n external_component_queue_bg_color: '#CCCCCC',\n external_component_queue_border_color: '#BFBFBF',\n },\n mindmap: {\n useMaxWidth: true,\n padding: 10,\n maxNodeWidth: 200,\n },\n fontSize: 16,\n};\n\nif (config.class) config.class.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\nif (config.gitGraph) config.gitGraph.arrowMarkerAbsolute = config.arrowMarkerAbsolute;\n\nconst keyify = (obj: any, prefix = ''): string[] =>\n Object.keys(obj).reduce((res: string[], el): string[] => {\n if (Array.isArray(obj[el])) {\n return res;\n } else if (typeof obj[el] === 'object' && obj[el] !== null) {\n return [...res, prefix + el, ...keyify(obj[el], '')];\n }\n return [...res, prefix + el];\n }, []);\n\nexport const configKeys: string[] = keyify(config, '');\nexport default config;\n","import { MermaidConfig } from '../config.type';\nimport { log } from '../logger';\nimport { DetectorRecord, DiagramDetector, DiagramLoader } from './types';\n\nconst directive =\n /[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nconst anyComment = /\\s*%%.*\\n/gm;\n\nconst detectors: Record = {};\n\n/**\n * @function detectType Detects the type of the graph text. Takes into consideration the possible\n * existence of an %%init directive\n *\n * ```mermaid\n * %%{initialize: {\"startOnLoad\": true, logLevel: \"fatal\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n * @param {string} text The text defining the graph\n * @param {{\n * class: { defaultRenderer: string } | undefined;\n * state: { defaultRenderer: string } | undefined;\n * flowchart: { defaultRenderer: string } | undefined;\n * }} [config]\n * @returns {string} A graph definition key\n */\nexport const detectType = function (text: string, config?: MermaidConfig): string {\n text = text.replace(directive, '').replace(anyComment, '\\n');\n for (const [key, { detector }] of Object.entries(detectors)) {\n const diagram = detector(text, config);\n if (diagram) {\n return key;\n }\n }\n\n throw new Error(`No diagram type detected for text: ${text}`);\n};\n\nexport const addDetector = (key: string, detector: DiagramDetector, loader?: DiagramLoader) => {\n if (detectors[key]) {\n throw new Error(`Detector with key ${key} already exists`);\n }\n detectors[key] = { detector, loader };\n log.debug(`Detector with key ${key} added${loader ? ' with loader' : ''}`);\n};\n\nexport const getDiagramLoader = (key: string) => detectors[key].loader;\n","'use strict';\n/**\n * @function assignWithDepth Extends the functionality of {@link ObjectConstructor.assign} with the\n * ability to merge arbitrary-depth objects For each key in src with path `k` (recursively)\n * performs an Object.assign(dst[`k`], src[`k`]) with a slight change from the typical handling of\n * undefined for dst[`k`]: instead of raising an error, dst[`k`] is auto-initialized to {} and\n * effectively merged with src[`k`]

Additionally, dissimilar types will not clobber unless the\n * config.clobber parameter === true. Example:\n *\n * ```js\n * let config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * let config_1 = { foo: 'foo', bar: 'bar' };\n * let result = assignWithDepth(config_0, config_1);\n * console.log(result);\n * //-> result: { foo: { bar: 'bar' }, bar: 'bar' }\n * ```\n *\n * Traditional Object.assign would have clobbered foo in config_0 with foo in config_1. If src is a\n * destructured array of objects and dst is not an array, assignWithDepth will apply each element\n * of src to dst in order.\n * @param {any} dst - The destination of the merge\n * @param {any} src - The source object(s) to merge into destination\n * @param {{ depth: number; clobber: boolean }} [config={ depth: 2, clobber: false }] - Depth: depth\n * to traverse within src and dst for merging - clobber: should dissimilar types clobber (default:\n * { depth: 2, clobber: false }). Default is `{ depth: 2, clobber: false }`\n * @returns {any}\n */\nconst assignWithDepth = function (dst, src, config) {\n const { depth, clobber } = Object.assign({ depth: 2, clobber: false }, config);\n if (Array.isArray(src) && !Array.isArray(dst)) {\n src.forEach((s) => assignWithDepth(dst, s, config));\n return dst;\n } else if (Array.isArray(src) && Array.isArray(dst)) {\n src.forEach((s) => {\n if (dst.indexOf(s) === -1) {\n dst.push(s);\n }\n });\n return dst;\n }\n if (typeof dst === 'undefined' || depth <= 0) {\n if (dst !== undefined && dst !== null && typeof dst === 'object' && typeof src === 'object') {\n return Object.assign(dst, src);\n } else {\n return src;\n }\n }\n if (typeof src !== 'undefined' && typeof dst === 'object' && typeof src === 'object') {\n Object.keys(src).forEach((key) => {\n if (\n typeof src[key] === 'object' &&\n (dst[key] === undefined || typeof dst[key] === 'object')\n ) {\n if (dst[key] === undefined) {\n dst[key] = Array.isArray(src[key]) ? [] : {};\n }\n dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber });\n } else if (clobber || (typeof dst[key] !== 'object' && typeof src[key] !== 'object')) {\n dst[key] = src[key];\n }\n });\n }\n return dst;\n};\n\nexport default assignWithDepth;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","// @ts-nocheck : TODO Fix ts errors\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport {\n curveBasis,\n curveBasisClosed,\n curveBasisOpen,\n curveLinear,\n curveLinearClosed,\n curveMonotoneX,\n curveMonotoneY,\n curveNatural,\n curveStep,\n curveStepAfter,\n curveStepBefore,\n select,\n} from 'd3';\nimport common from './diagrams/common/common';\nimport { configKeys } from './defaultConfig';\nimport { log } from './logger';\nimport { detectType } from './diagram-api/detectType';\nimport assignWithDepth from './assignWithDepth';\nimport { MermaidConfig } from './config.type';\nimport memoize from 'lodash/memoize';\n\n// Effectively an enum of the supported curve types, accessible by name\nconst d3CurveTypes = {\n curveBasis: curveBasis,\n curveBasisClosed: curveBasisClosed,\n curveBasisOpen: curveBasisOpen,\n curveLinear: curveLinear,\n curveLinearClosed: curveLinearClosed,\n curveMonotoneX: curveMonotoneX,\n curveMonotoneY: curveMonotoneY,\n curveNatural: curveNatural,\n curveStep: curveStep,\n curveStepAfter: curveStepAfter,\n curveStepBefore: curveStepBefore,\n};\nconst directive =\n /[%]{2}[{]\\s*(?:(?:(\\w+)\\s*:|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\nconst directiveWithoutOpen =\n /\\s*(?:(?:(\\w+)(?=:):|(\\w+))\\s*(?:(?:(\\w+))|((?:(?![}][%]{2}).|\\r?\\n)*))?\\s*)(?:[}][%]{2})?/gi;\n\n/**\n * @function detectInit Detects the init config object from the text\n * @param config\n *\n * ```mermaid\n *\n * %%{init: {\"theme\": \"debug\", \"logLevel\": 1 }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n *\n * Or\n *\n * ```mermaid\n * %%{initialize: {\"theme\": \"dark\", logLevel: \"debug\" }}%%\n * graph LR\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n * @param {string} text The text defining the graph\n * @returns {object} The json object representing the init passed to mermaid.initialize()\n */\nexport const detectInit = function (text: string, config?: MermaidConfig): MermaidConfig {\n const inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n let results = {};\n\n if (Array.isArray(inits)) {\n const args = inits.map((init) => init.args);\n directiveSanitizer(args);\n\n results = assignWithDepth(results, [...args]);\n } else {\n results = inits.args;\n }\n if (results) {\n let type = detectType(text, config);\n ['config'].forEach((prop) => {\n if (typeof results[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n results[type] = results[prop];\n delete results[prop];\n }\n });\n }\n\n // Todo: refactor this, these results are never used\n return results;\n};\n\n/**\n * @function detectDirective Detects the directive from the text. Text can be single line or\n * multiline. If type is null or omitted the first directive encountered in text will be returned\n *\n * ```mermaid\n * graph LR\n * %%{somedirective}%%\n * a-->b\n * b-->c\n * c-->d\n * d-->e\n * e-->f\n * f-->g\n * g-->h\n * ```\n * @param {string} text The text defining the graph\n * @param {string | RegExp} type The directive to return (default: null)\n * @returns {object | Array} An object or Array representing the directive(s): { type: string, args:\n * object|null } matched by the input type if a single directive was found, that directive object\n * will be returned.\n */\nexport const detectDirective = function (text, type = null) {\n try {\n const commentWithoutDirectives = new RegExp(\n `[%]{2}(?![{]${directiveWithoutOpen.source})(?=[}][%]{2}).*\\n`,\n 'ig'\n );\n text = text.trim().replace(commentWithoutDirectives, '').replace(/'/gm, '\"');\n log.debug(\n `Detecting diagram directive${type !== null ? ' type:' + type : ''} based on the text:${text}`\n );\n let match;\n const result = [];\n while ((match = directive.exec(text)) !== null) {\n // This is necessary to avoid infinite loops with zero-width matches\n if (match.index === directive.lastIndex) {\n directive.lastIndex++;\n }\n if (\n (match && !type) ||\n (type && match[1] && match[1].match(type)) ||\n (type && match[2] && match[2].match(type))\n ) {\n const type = match[1] ? match[1] : match[2];\n const args = match[3] ? match[3].trim() : match[4] ? JSON.parse(match[4].trim()) : null;\n result.push({ type, args });\n }\n }\n if (result.length === 0) {\n result.push({ type: text, args: null });\n }\n\n return result.length === 1 ? result[0] : result;\n } catch (error) {\n log.error(\n `ERROR: ${error.message} - Unable to parse directive\n ${type !== null ? ' type:' + type : ''} based on the text:${text}`\n );\n return { type: null, args: null };\n }\n};\n\n/**\n * @function isSubstringInArray Detects whether a substring in present in a given array\n * @param {string} str The substring to detect\n * @param {Array} arr The array to search\n * @returns {number} The array index containing the substring or -1 if not present\n */\nexport const isSubstringInArray = function (str, arr) {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i].match(str)) return i;\n }\n return -1;\n};\n\n/**\n * Returns a d3 curve given a curve name\n *\n * @param {string | undefined} interpolate The interpolation name\n * @param {any} defaultCurve The default curve to return\n * @returns {import('d3-shape').CurveFactory} The curve factory to use\n */\nexport const interpolateToCurve = (interpolate, defaultCurve) => {\n if (!interpolate) {\n return defaultCurve;\n }\n const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;\n return d3CurveTypes[curveName] || defaultCurve;\n};\n\n/**\n * Formats a URL string\n *\n * @param {string} linkStr String of the URL\n * @param {{ securityLevel: string }} config Configuration passed to MermaidJS\n * @returns {string | undefined} The formatted URL\n */\nexport const formatUrl = (linkStr, config) => {\n const url = linkStr.trim();\n\n if (url) {\n if (config.securityLevel !== 'loose') {\n return sanitizeUrl(url);\n }\n\n return url;\n }\n};\n\n/**\n * Runs a function\n *\n * @param {string} functionName A dot seperated path to the function relative to the `window`\n * @param {...any} params Parameters to pass to the function\n */\nexport const runFunc = (functionName, ...params) => {\n const arrPaths = functionName.split('.');\n\n const len = arrPaths.length - 1;\n const fnName = arrPaths[len];\n\n let obj = window;\n for (let i = 0; i < len; i++) {\n obj = obj[arrPaths[i]];\n if (!obj) return;\n }\n\n obj[fnName](...params);\n};\n\n/**\n * @typedef {object} Point A (x, y) point\n * @property {number} x The x value\n * @property {number} y The y value\n */\n\n/**\n * Finds the distance between two points using the Distance Formula\n *\n * @param {Point} p1 The first point\n * @param {Point} p2 The second point\n * @returns {number} The distance\n */\nconst distance = (p1, p2) =>\n p1 && p2 ? Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2)) : 0;\n\n/**\n * @param {Point[]} points List of points\n * @returns {Point}\n * @todo Give this a description\n */\nconst traverseEdge = (points) => {\n let prevPoint;\n let totalDistance = 0;\n\n points.forEach((point) => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse half of total distance along points\n let remainingDistance = totalDistance / 2;\n let center = undefined;\n prevPoint = undefined;\n points.forEach((point) => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y,\n };\n }\n }\n }\n prevPoint = point;\n });\n return center;\n};\n\n/**\n * Alias for `traverseEdge`\n *\n * @param {Point[]} points List of points\n * @returns {Point} Return result of `transverseEdge`\n */\nconst calcLabelPosition = (points) => {\n if (points.length === 1) {\n return points[0];\n }\n return traverseEdge(points);\n};\n\nconst calcCardinalityPosition = (isRelationTypePresent, points, initialPosition) => {\n let prevPoint;\n log.info('our points', points);\n if (points[0] !== initialPosition) {\n points = points.reverse();\n }\n points.forEach((point) => {\n totalDistance += distance(point, prevPoint);\n prevPoint = point;\n });\n\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25;\n\n let remainingDistance = distanceToCardinalityPoint;\n let center;\n prevPoint = undefined;\n points.forEach((point) => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y,\n };\n }\n }\n }\n prevPoint = point;\n });\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n const d = isRelationTypePresent ? 10 : 5;\n //Calculate Angle for x and y axis\n const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n const cardinalityPosition = { x: 0, y: 0 };\n //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n return cardinalityPosition;\n};\n\n/**\n * Position ['start_left', 'start_right', 'end_left', 'end_right']\n *\n * @param {any} terminalMarkerSize\n * @param {any} position\n * @param {any} _points\n * @returns {any}\n */\nconst calcTerminalLabelPosition = (terminalMarkerSize, position, _points) => {\n // Todo looking to faster cloning method\n let points = JSON.parse(JSON.stringify(_points));\n let prevPoint;\n log.info('our points', points);\n if (position !== 'start_left' && position !== 'start_right') {\n points = points.reverse();\n }\n\n points.forEach((point) => {\n prevPoint = point;\n });\n\n // Traverse only 25 total distance along points to find cardinality point\n const distanceToCardinalityPoint = 25 + terminalMarkerSize;\n\n let remainingDistance = distanceToCardinalityPoint;\n let center;\n prevPoint = undefined;\n points.forEach((point) => {\n if (prevPoint && !center) {\n const vectorDistance = distance(point, prevPoint);\n if (vectorDistance < remainingDistance) {\n remainingDistance -= vectorDistance;\n } else {\n // The point is remainingDistance from prevPoint in the vector between prevPoint and point\n // Calculate the coordinates\n const distanceRatio = remainingDistance / vectorDistance;\n if (distanceRatio <= 0) center = prevPoint;\n if (distanceRatio >= 1) center = { x: point.x, y: point.y };\n if (distanceRatio > 0 && distanceRatio < 1) {\n center = {\n x: (1 - distanceRatio) * prevPoint.x + distanceRatio * point.x,\n y: (1 - distanceRatio) * prevPoint.y + distanceRatio * point.y,\n };\n }\n }\n }\n prevPoint = point;\n });\n // if relation is present (Arrows will be added), change cardinality point off-set distance (d)\n const d = 10 + terminalMarkerSize * 0.5;\n //Calculate Angle for x and y axis\n const angle = Math.atan2(points[0].y - center.y, points[0].x - center.x);\n\n const cardinalityPosition = { x: 0, y: 0 };\n\n //Calculation cardinality position using angle, center point on the line/curve but pendicular and with offset-distance\n\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2;\n if (position === 'start_left') {\n cardinalityPosition.x = Math.sin(angle + Math.PI) * d + (points[0].x + center.x) / 2;\n cardinalityPosition.y = -Math.cos(angle + Math.PI) * d + (points[0].y + center.y) / 2;\n }\n if (position === 'end_right') {\n cardinalityPosition.x = Math.sin(angle - Math.PI) * d + (points[0].x + center.x) / 2 - 5;\n cardinalityPosition.y = -Math.cos(angle - Math.PI) * d + (points[0].y + center.y) / 2 - 5;\n }\n if (position === 'end_left') {\n cardinalityPosition.x = Math.sin(angle) * d + (points[0].x + center.x) / 2 - 5;\n cardinalityPosition.y = -Math.cos(angle) * d + (points[0].y + center.y) / 2 - 5;\n }\n return cardinalityPosition;\n};\n\n/**\n * Gets styles from an array of declarations\n *\n * @param {string[]} arr Declarations\n * @returns {{ style: string; labelStyle: string }} The styles grouped as strings\n */\nexport const getStylesFromArray = (arr) => {\n let style = '';\n let labelStyle = '';\n\n for (let i = 0; i < arr.length; i++) {\n if (typeof arr[i] !== 'undefined') {\n // add text properties to label style definition\n if (arr[i].startsWith('color:') || arr[i].startsWith('text-align:')) {\n labelStyle = labelStyle + arr[i] + ';';\n } else {\n style = style + arr[i] + ';';\n }\n }\n }\n\n return { style: style, labelStyle: labelStyle };\n};\n\nlet cnt = 0;\nexport const generateId = () => {\n cnt++;\n return 'id-' + Math.random().toString(36).substr(2, 12) + '-' + cnt;\n};\n\n/**\n * @param {any} length\n * @returns {any}\n */\nfunction makeid(length) {\n let result = '';\n const characters = '0123456789abcdef';\n const charactersLength = characters.length;\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n\nexport const random = (options) => {\n return makeid(options.length);\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: 'start',\n style: '#666',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n valign: undefined,\n };\n};\n\n/**\n * Adds text to an element\n *\n * @param {SVGElement} elem Element to add text to\n * @param {{\n * text: string;\n * x: number;\n * y: number;\n * anchor: 'start' | 'middle' | 'end';\n * fontFamily: string;\n * fontSize: string | number;\n * fontWeight: string | number;\n * fill: string;\n * class: string | undefined;\n * textMargin: number;\n * }} textData\n * @returns {SVGTextElement} Text element with given styling and content\n */\nexport const drawSimpleText = function (elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.style('font-family', textData.fontFamily);\n textElem.style('font-size', textData.fontSize);\n textElem.style('font-weight', textData.fontWeight);\n textElem.attr('fill', textData.fill);\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\nexport const wrapLabel = memoize(\n (label, maxWidth, config) => {\n if (!label) {\n return label;\n }\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', joinWith: '
' },\n config\n );\n if (common.lineBreakRegex.test(label)) {\n return label;\n }\n const words = label.split(' ');\n const completedLines = [];\n let nextLine = '';\n words.forEach((word, index) => {\n const wordLength = calculateTextWidth(`${word} `, config);\n const nextLineLength = calculateTextWidth(nextLine, config);\n if (wordLength > maxWidth) {\n const { hyphenatedStrings, remainingWord } = breakString(word, maxWidth, '-', config);\n completedLines.push(nextLine, ...hyphenatedStrings);\n nextLine = remainingWord;\n } else if (nextLineLength + wordLength >= maxWidth) {\n completedLines.push(nextLine);\n nextLine = word;\n } else {\n nextLine = [nextLine, word].filter(Boolean).join(' ');\n }\n const currentWord = index + 1;\n const isLastWord = currentWord === words.length;\n if (isLastWord) {\n completedLines.push(nextLine);\n }\n });\n return completedLines.filter((line) => line !== '').join(config.joinWith);\n },\n (label, maxWidth, config) =>\n `${label}${maxWidth}${config.fontSize}${config.fontWeight}${config.fontFamily}${config.joinWith}`\n);\n\nconst breakString = memoize(\n (word, maxWidth, hyphenCharacter = '-', config) => {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 0 },\n config\n );\n const characters = word.split('');\n const lines = [];\n let currentLine = '';\n characters.forEach((character, index) => {\n const nextLine = `${currentLine}${character}`;\n const lineWidth = calculateTextWidth(nextLine, config);\n if (lineWidth >= maxWidth) {\n const currentCharacter = index + 1;\n const isLastLine = characters.length === currentCharacter;\n const hyphenatedNextLine = `${nextLine}${hyphenCharacter}`;\n lines.push(isLastLine ? nextLine : hyphenatedNextLine);\n currentLine = '';\n } else {\n currentLine = nextLine;\n }\n });\n return { hyphenatedStrings: lines, remainingWord: currentLine };\n },\n (word, maxWidth, hyphenCharacter = '-', config) =>\n `${word}${maxWidth}${hyphenCharacter}${config.fontSize}${config.fontWeight}${config.fontFamily}`\n);\n\n/**\n * This calculates the text's height, taking into account the wrap breaks and both the statically\n * configured height, width, and the length of the text (in pixels).\n *\n * If the wrapped text text has greater height, we extend the height, so it's value won't overflow.\n *\n * @param {any} text The text to measure\n * @param {any} config - The config for fontSize, fontFamily, and fontWeight all impacting the\n * resulting size\n * @returns {any} - The height for the given text\n */\nexport const calculateTextHeight = function (text, config) {\n config = Object.assign(\n { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 15 },\n config\n );\n return calculateTextDimensions(text, config).height;\n};\n\n/**\n * This calculates the width of the given text, font size and family.\n *\n * @param {any} text - The text to calculate the width of\n * @param {any} config - The config for fontSize, fontFamily, and fontWeight all impacting the\n * resulting size\n * @returns {any} - The width for the given text\n */\nexport const calculateTextWidth = function (text, config) {\n config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);\n return calculateTextDimensions(text, config).width;\n};\n\n/**\n * This calculates the dimensions of the given text, font size, font family, font weight, and\n * margins.\n *\n * @param {any} text - The text to calculate the width of\n * @param {any} config - The config for fontSize, fontFamily, fontWeight, and margin all impacting\n * the resulting size\n * @returns - The width for the given text\n */\nexport const calculateTextDimensions = memoize(\n function (text, config) {\n config = Object.assign({ fontSize: 12, fontWeight: 400, fontFamily: 'Arial' }, config);\n const { fontSize, fontFamily, fontWeight } = config;\n if (!text) {\n return { width: 0, height: 0 };\n }\n\n // We can't really know if the user supplied font family will render on the user agent;\n // thus, we'll take the max width between the user supplied font family, and a default\n // of sans-serif.\n const fontFamilies = ['sans-serif', fontFamily];\n const lines = text.split(common.lineBreakRegex);\n const dims = [];\n\n const body = select('body');\n // We don't want to leak DOM elements - if a removal operation isn't available\n // for any reason, do not continue.\n if (!body.remove) {\n return { width: 0, height: 0, lineHeight: 0 };\n }\n\n const g = body.append('svg');\n\n for (const fontFamily of fontFamilies) {\n let cheight = 0;\n const dim = { width: 0, height: 0, lineHeight: 0 };\n for (const line of lines) {\n const textObj = getTextObj();\n textObj.text = line;\n const textElem = drawSimpleText(g, textObj)\n .style('font-size', fontSize)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n\n const bBox = (textElem._groups || textElem)[0][0].getBBox();\n dim.width = Math.round(Math.max(dim.width, bBox.width));\n cheight = Math.round(bBox.height);\n dim.height += cheight;\n dim.lineHeight = Math.round(Math.max(dim.lineHeight, cheight));\n }\n dims.push(dim);\n }\n\n g.remove();\n\n const index =\n isNaN(dims[1].height) ||\n isNaN(dims[1].width) ||\n isNaN(dims[1].lineHeight) ||\n (dims[0].height > dims[1].height &&\n dims[0].width > dims[1].width &&\n dims[0].lineHeight > dims[1].lineHeight)\n ? 0\n : 1;\n return dims[index];\n },\n (text, config) => `${text}${config.fontSize}${config.fontWeight}${config.fontFamily}`\n);\n\nexport const initIdGenerator = class iterator {\n constructor(deterministic, seed) {\n this.deterministic = deterministic;\n // TODO: Seed is only used for length?\n this.seed = seed;\n\n this.count = seed ? seed.length : 0;\n }\n\n next() {\n if (!this.deterministic) return Date.now();\n\n return this.count++;\n }\n};\n\nlet decoder;\n\n/**\n * Decodes HTML, source: {@link https://github.com/shrpne/entity-decode/blob/v2.0.1/browser.js}\n *\n * @param {string} html HTML as a string\n * @returns {string} Unescaped HTML\n */\nexport const entityDecode = function (html) {\n decoder = decoder || document.createElement('div');\n // Escape HTML before decoding for HTML Entities\n html = escape(html).replace(/%26/g, '&').replace(/%23/g, '#').replace(/%3B/g, ';');\n // decoding\n decoder.innerHTML = html;\n return unescape(decoder.textContent);\n};\n\n/**\n * Sanitizes directive objects\n *\n * @param {object} args Directive's JSON\n */\nexport const directiveSanitizer = (args) => {\n log.debug('directiveSanitizer called with', args);\n if (typeof args === 'object') {\n // check for array\n if (args.length) {\n args.forEach((arg) => directiveSanitizer(arg));\n } else {\n // This is an object\n Object.keys(args).forEach((key) => {\n log.debug('Checking key', key);\n if (key.indexOf('__') === 0) {\n log.debug('sanitize deleting __ option', key);\n delete args[key];\n }\n\n if (key.indexOf('proto') >= 0) {\n log.debug('sanitize deleting proto option', key);\n delete args[key];\n }\n\n if (key.indexOf('constr') >= 0) {\n log.debug('sanitize deleting constr option', key);\n delete args[key];\n }\n\n if (key.indexOf('themeCSS') >= 0) {\n log.debug('sanitizing themeCss option');\n args[key] = sanitizeCss(args[key]);\n }\n if (key.indexOf('fontFamily') >= 0) {\n log.debug('sanitizing fontFamily option');\n args[key] = sanitizeCss(args[key]);\n }\n if (key.indexOf('altFontFamily') >= 0) {\n log.debug('sanitizing altFontFamily option');\n args[key] = sanitizeCss(args[key]);\n }\n if (configKeys.indexOf(key) < 0) {\n log.debug('sanitize deleting option', key);\n delete args[key];\n } else {\n if (typeof args[key] === 'object') {\n log.debug('sanitize deleting object', key);\n directiveSanitizer(args[key]);\n }\n }\n });\n }\n }\n if (args.themeVariables) {\n const kArr = Object.keys(args.themeVariables);\n for (let i = 0; i < kArr.length; i++) {\n const k = kArr[i];\n const val = args.themeVariables[k];\n if (val && val.match && !val.match(/^[a-zA-Z0-9#,\";()%. ]+$/)) {\n args.themeVariables[k] = '';\n }\n }\n }\n log.debug('After sanitization', args);\n};\nexport const sanitizeCss = (str) => {\n let startCnt = 0;\n let endCnt = 0;\n\n for (let i = 0; i < str.length; i++) {\n if (startCnt < endCnt) {\n return '{ /* ERROR: Unbalanced CSS */ }';\n }\n if (str[i] === '{') {\n startCnt++;\n } else if (str[i] === '}') {\n endCnt++;\n }\n }\n if (startCnt !== endCnt) {\n return '{ /* ERROR: Unbalanced CSS */ }';\n }\n // Todo add more checks here\n return str;\n};\n\nexport interface DetailedError {\n str: string;\n hash: any;\n error?: any;\n message?: string;\n}\n\n/** @param error */\nexport function isDetailedError(error: unknown): error is DetailedError {\n return 'str' in error;\n}\n\n/** @param error */\nexport function getErrorMessage(error: unknown): string {\n if (error instanceof Error) return error.message;\n return String(error);\n}\n\nexport default {\n assignWithDepth,\n wrapLabel,\n calculateTextHeight,\n calculateTextWidth,\n calculateTextDimensions,\n detectInit,\n detectDirective,\n isSubstringInArray,\n interpolateToCurve,\n calcLabelPosition,\n calcCardinalityPosition,\n calcTerminalLabelPosition,\n formatUrl,\n getStylesFromArray,\n generateId,\n random,\n runFunc,\n entityDecode,\n initIdGenerator: initIdGenerator,\n directiveSanitizer,\n sanitizeCss,\n};\n","import assignWithDepth from './assignWithDepth';\nimport { log } from './logger';\nimport theme from './themes';\nimport config from './defaultConfig';\nimport type { MermaidConfig } from './config.type';\n\nexport const defaultConfig: MermaidConfig = Object.freeze(config);\n\nlet siteConfig: MermaidConfig = assignWithDepth({}, defaultConfig);\nlet configFromInitialize: MermaidConfig;\nlet directives: any[] = [];\nlet currentConfig: MermaidConfig = assignWithDepth({}, defaultConfig);\n\nexport const updateCurrentConfig = (siteCfg: MermaidConfig, _directives: any[]) => {\n // start with config being the siteConfig\n let cfg: MermaidConfig = assignWithDepth({}, siteCfg);\n // let sCfg = assignWithDepth(defaultConfig, siteConfigDelta);\n\n // Join directives\n let sumOfDirectives: MermaidConfig = {};\n for (let i = 0; i < _directives.length; i++) {\n const d = _directives[i];\n sanitize(d);\n\n // Apply the data from the directive where the the overrides the themeVariables\n sumOfDirectives = assignWithDepth(sumOfDirectives, d);\n }\n\n cfg = assignWithDepth(cfg, sumOfDirectives);\n\n if (sumOfDirectives.theme && sumOfDirectives.theme in theme) {\n const tmpConfigFromInitialize = assignWithDepth({}, configFromInitialize);\n const themeVariables = assignWithDepth(\n tmpConfigFromInitialize.themeVariables || {},\n sumOfDirectives.themeVariables\n );\n if (cfg.theme && cfg.theme in theme) {\n cfg.themeVariables = theme[cfg.theme as keyof typeof theme].getThemeVariables(themeVariables);\n }\n }\n\n currentConfig = cfg;\n return cfg;\n};\n\n/**\n * ## setSiteConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------- | ----------- | --------------------------------------- |\n * | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |\n *\n * **Notes:** Sets the siteConfig. The siteConfig is a protected configuration for repeat use. Calls\n * to reset() will reset the currentConfig to siteConfig. Calls to reset(configApi.defaultConfig)\n * will reset siteConfig and currentConfig to the defaultConfig Note: currentConfig is set in this\n * function _Default value: At default, will mirror Global Config_\n *\n * @param conf - The base currentConfig to use as siteConfig\n * @returns {object} - The siteConfig\n */\nexport const setSiteConfig = (conf: MermaidConfig): MermaidConfig => {\n siteConfig = assignWithDepth({}, defaultConfig);\n siteConfig = assignWithDepth(siteConfig, conf);\n\n // @ts-ignore: TODO Fix ts errors\n if (conf.theme && theme[conf.theme]) {\n // @ts-ignore: TODO Fix ts errors\n siteConfig.themeVariables = theme[conf.theme].getThemeVariables(conf.themeVariables);\n }\n\n currentConfig = updateCurrentConfig(siteConfig, directives);\n return siteConfig;\n};\n\nexport const saveConfigFromInitialize = (conf: MermaidConfig): void => {\n configFromInitialize = assignWithDepth({}, conf);\n};\n\nexport const updateSiteConfig = (conf: MermaidConfig): MermaidConfig => {\n siteConfig = assignWithDepth(siteConfig, conf);\n updateCurrentConfig(siteConfig, directives);\n\n return siteConfig;\n};\n/**\n * ## getSiteConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------------------- | ----------- | -------------------------------- |\n * | setSiteConfig | Returns the current siteConfig base configuration | Get Request | Returns Any Values in siteConfig |\n *\n * **Notes**: Returns **any** values in siteConfig.\n *\n * @returns {object} - The siteConfig\n */\nexport const getSiteConfig = (): MermaidConfig => {\n return assignWithDepth({}, siteConfig);\n};\n/**\n * ## setConfig\n *\n * | Function | Description | Type | Values |\n * | ------------- | ------------------------------------- | ----------- | --------------------------------------- |\n * | setSiteConfig | Sets the siteConfig to desired values | Put Request | Any Values, except ones in secure array |\n *\n * **Notes**: Sets the currentConfig. The parameter conf is sanitized based on the siteConfig.secure\n * keys. Any values found in conf with key found in siteConfig.secure will be replaced with the\n * corresponding siteConfig value.\n *\n * @param {any} conf - The potential currentConfig\n * @returns {any} - The currentConfig merged with the sanitized conf\n */\nexport const setConfig = (conf: MermaidConfig): MermaidConfig => {\n // sanitize(conf);\n // Object.keys(conf).forEach(key => {\n // const manipulator = manipulators[key];\n // conf[key] = manipulator ? manipulator(conf[key]) : conf[key];\n // });\n\n assignWithDepth(currentConfig, conf);\n\n return getConfig();\n};\n\n/**\n * ## getConfig\n *\n * | Function | Description | Type | Return Values |\n * | --------- | ------------------------- | ----------- | ------------------------------ |\n * | getConfig | Obtains the currentConfig | Get Request | Any Values from current Config |\n *\n * **Notes**: Returns **any** the currentConfig\n *\n * @returns {any} - The currentConfig\n */\nexport const getConfig = (): MermaidConfig => {\n return assignWithDepth({}, currentConfig);\n};\n/**\n * ## sanitize\n *\n * | Function | Description | Type | Values |\n * | -------- | -------------------------------------- | ----------- | ------ |\n * | sanitize | Sets the siteConfig to desired values. | Put Request | None |\n *\n * Ensures options parameter does not attempt to override siteConfig secure keys **Notes**: modifies\n * options in-place\n *\n * @param {any} options - The potential setConfig parameter\n */\nexport const sanitize = (options: any) => {\n // Checking that options are not in the list of excluded options\n ['secure', ...(siteConfig.secure ?? [])].forEach((key) => {\n if (typeof options[key] !== 'undefined') {\n // DO NOT attempt to print options[key] within `${}` as a malicious script\n // can exploit the logger's attempt to stringify the value and execute arbitrary code\n log.debug(`Denied attempt to modify a secure key ${key}`, options[key]);\n delete options[key];\n }\n });\n\n // Check that there no attempts of prototype pollution\n Object.keys(options).forEach((key) => {\n if (key.indexOf('__') === 0) {\n delete options[key];\n }\n });\n // Check that there no attempts of xss, there should be no tags at all in the directive\n // blocking data urls as base64 urls can contain svgs with inline script tags\n Object.keys(options).forEach((key) => {\n if (typeof options[key] === 'string') {\n if (\n options[key].indexOf('<') > -1 ||\n options[key].indexOf('>') > -1 ||\n options[key].indexOf('url(data:') > -1\n ) {\n delete options[key];\n }\n }\n if (typeof options[key] === 'object') {\n sanitize(options[key]);\n }\n });\n};\n\n/**\n * Pushes in a directive to the configuration\n *\n * @param {object} directive The directive to push in\n */\nexport const addDirective = (directive: any) => {\n if (directive.fontFamily) {\n if (!directive.themeVariables) {\n directive.themeVariables = { fontFamily: directive.fontFamily };\n } else {\n if (!directive.themeVariables.fontFamily) {\n directive.themeVariables = { fontFamily: directive.fontFamily };\n }\n }\n }\n directives.push(directive);\n updateCurrentConfig(siteConfig, directives);\n};\n\n/**\n * ## reset\n *\n * | Function | Description | Type | Required | Values |\n * | -------- | ---------------------------- | ----------- | -------- | ------ |\n * | reset | Resets currentConfig to conf | Put Request | Required | None |\n *\n * ## conf\n *\n * | Parameter | Description | Type | Required | Values |\n * | --------- | -------------------------------------------------------------- | ---------- | -------- | -------------------------------------------- |\n * | conf | base set of values, which currentConfig could be **reset** to. | Dictionary | Required | Any Values, with respect to the secure Array |\n *\n * **Notes**: (default: current siteConfig ) (optional, default `getSiteConfig()`)\n *\n * @param config\n */\nexport const reset = (config = siteConfig): void => {\n // Replace current config with siteConfig\n directives = [];\n updateCurrentConfig(config, directives);\n};\n","import { log } from './logger';\n\n/**\n * Applys d3 attributes\n *\n * @param {any} d3Elem D3 Element to apply the attributes onto\n * @param {[string, string][]} attrs Object.keys equivalent format of key to value mapping of attributes\n */\nconst d3Attrs = function (d3Elem, attrs) {\n for (let attr of attrs) {\n d3Elem.attr(attr[0], attr[1]);\n }\n};\n\n/**\n * Gives attributes for an SVG's size given arguments\n *\n * @param {number} height The height of the SVG\n * @param {number} width The width of the SVG\n * @param {boolean} useMaxWidth Whether or not to use max-width and set width to 100%\n * @returns {Map<'height' | 'width' | 'style', string>} Attributes for the SVG\n */\nexport const calculateSvgSizeAttrs = function (height, width, useMaxWidth) {\n let attrs = new Map();\n if (useMaxWidth) {\n attrs.set('width', '100%');\n attrs.set('style', `max-width: ${width}px;`);\n } else {\n attrs.set('width', width);\n }\n return attrs;\n};\n\n/**\n * Applies attributes from `calculateSvgSizeAttrs`\n *\n * @param {SVGSVGElement} svgElem The SVG Element to configure\n * @param {number} height The height of the SVG\n * @param {number} width The width of the SVG\n * @param {boolean} useMaxWidth Whether or not to use max-width and set width to 100%\n */\nexport const configureSvgSize = function (svgElem, height, width, useMaxWidth) {\n const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth);\n d3Attrs(svgElem, attrs);\n};\nexport const setupGraphViewbox = function (graph, svgElem, padding, useMaxWidth) {\n const svgBounds = svgElem.node().getBBox();\n const sWidth = svgBounds.width;\n const sHeight = svgBounds.height;\n\n log.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds);\n\n let width = 0;\n let height = 0;\n log.info(`Graph bounds: ${width}x${height}`, graph);\n\n // let tx = 0;\n // let ty = 0;\n // if (sWidth > width) {\n // tx = (sWidth - width) / 2 + padding;\n width = sWidth + padding * 2;\n // } else {\n // if (Math.abs(sWidth - width) >= 2 * padding + 1) {\n // width = width - padding;\n // }\n // }\n // if (sHeight > height) {\n // ty = (sHeight - height) / 2 + padding;\n height = sHeight + padding * 2;\n // }\n\n // width =\n log.info(`Calculated bounds: ${width}x${height}`);\n configureSvgSize(svgElem, height, width, useMaxWidth);\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n // const vBox = `0 0 ${width} ${height}`;\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${\n svgBounds.width + 2 * padding\n } ${svgBounds.height + 2 * padding}`;\n\n svgElem.attr('viewBox', vBox);\n};\n","const getStyles = (options) =>\n `g.classGroup text {\n fill: ${options.nodeBorder};\n fill: ${options.classText};\n stroke: none;\n font-family: ${options.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${options.classText};\n}\n.edgeLabel .label rect {\n fill: ${options.mainBkg};\n}\n.label text {\n fill: ${options.classText};\n}\n.edgeLabel .label span {\n background: ${options.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${options.nodeBorder};\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${options.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${options.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${options.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ${options.lineColor} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${options.mainBkg} !important;\n stroke: ${options.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n`;\n\nexport default getStyles;\n","const getStyles = (options) =>\n `\n .entityBox {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${options.attributeBackgroundColorOdd};\n stroke: ${options.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${options.attributeBackgroundColorEven};\n stroke: ${options.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${options.tertiaryColor};\n opacity: 0.7;\n background-color: ${options.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${options.lineColor};\n }\n`;\n\nexport default getStyles;\n","const getStyles = () => ``;\n\nexport default getStyles;\n","/** Returns the styles given options */\nexport interface FlowChartStyleOptions {\n arrowheadColor: string;\n border2: string;\n clusterBkg: string;\n clusterBorder: string;\n edgeLabelBackground: string;\n fontFamily: string;\n lineColor: string;\n mainBkg: string;\n nodeBorder: string;\n nodeTextColor: string;\n tertiaryColor: string;\n textColor: string;\n titleColor: string;\n}\n\nconst getStyles = (options: FlowChartStyleOptions) =>\n `.label {\n font-family: ${options.fontFamily};\n color: ${options.nodeTextColor || options.textColor};\n }\n .cluster-label text {\n fill: ${options.titleColor};\n }\n .cluster-label span {\n color: ${options.titleColor};\n }\n\n .label text,span {\n fill: ${options.nodeTextColor || options.textColor};\n color: ${options.nodeTextColor || options.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${options.edgeLabelBackground};\n fill: ${options.edgeLabelBackground};\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ${options.clusterBkg};\n stroke: ${options.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n .cluster span {\n color: ${options.titleColor};\n }\n /* .cluster div {\n color: ${options.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${options.fontFamily};\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n`;\n\nexport default getStyles;\n","const getStyles = (options) =>\n `\n .mermaid-main-font {\n font-family: \"trebuchet ms\", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: ${options.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${options.sectionBkgColor};\n }\n\n .section2 {\n fill: ${options.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${options.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${options.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ${options.ganttFontSize};\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${options.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ${options.fontFamily};\n fill: ${options.textColor};\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${options.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ${options.ganttFontSize};\n // }\n\n .taskTextOutsideRight {\n fill: ${options.taskTextDarkColor};\n text-anchor: start;\n // font-size: ${options.ganttFontSize};\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ${options.taskTextDarkColor};\n text-anchor: end;\n // font-size: ${options.ganttFontSize};\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${options.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${options.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${options.taskBkgColor};\n stroke: ${options.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${options.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${options.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${options.activeTaskBkgColor};\n stroke: ${options.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${options.doneTaskBorderColor};\n fill: ${options.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${options.critBorderColor};\n fill: ${options.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${options.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${options.textColor} ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n`;\n\nexport default getStyles;\n","const getStyles = () => ``;\n\nexport default getStyles;\n","const getStyles = (options) =>\n `\n .pieCircle{\n stroke: ${options.pieStrokeColor};\n stroke-width : ${options.pieStrokeWidth};\n opacity : ${options.pieOpacity};\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${options.pieTitleTextSize};\n fill: ${options.pieTitleTextColor};\n font-family: ${options.fontFamily};\n }\n .slice {\n font-family: ${options.fontFamily};\n fill: ${options.pieSectionTextColor};\n font-size:${options.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${options.pieLegendTextColor};\n font-family: ${options.fontFamily};\n font-size: ${options.pieLegendTextSize};\n }\n`;\n\nexport default getStyles;\n","const getStyles = (options) => `\n\n marker {\n fill: ${options.relationColor};\n stroke: ${options.relationColor};\n }\n\n marker.cross {\n stroke: ${options.lineColor};\n }\n\n svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n\n .reqBox {\n fill: ${options.requirementBackground};\n fill-opacity: 100%;\n stroke: ${options.requirementBorderColor};\n stroke-width: ${options.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${options.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${options.relationLabelBackground};\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ${options.requirementBorderColor};\n stroke-width: ${options.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${options.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${options.relationLabelColor};\n }\n\n`;\n// fill', conf.rect_fill)\nexport default getStyles;\n","const getStyles = (options) =>\n `.actor {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${options.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${options.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${options.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${options.signalColor};\n }\n\n #arrowhead path {\n fill: ${options.signalColor};\n stroke: ${options.signalColor};\n }\n\n .sequenceNumber {\n fill: ${options.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${options.signalColor};\n }\n\n #crosshead path {\n fill: ${options.signalColor};\n stroke: ${options.signalColor};\n }\n\n .messageText {\n fill: ${options.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${options.labelBoxBorderColor};\n fill: ${options.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${options.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${options.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${options.labelBoxBorderColor};\n fill: ${options.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${options.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .activation1 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .activation2 {\n fill: ${options.activationBkgColor};\n stroke: ${options.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${options.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${options.actorBorder};\n fill: ${options.actorBkg};\n stroke-width: 2px;\n }\n`;\n\nexport default getStyles;\n","const getStyles = (options) =>\n `\ndefs #statediagram-barbEnd {\n fill: ${options.transitionColor};\n stroke: ${options.transitionColor};\n }\ng.stateGroup text {\n fill: ${options.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${options.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${options.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${options.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${options.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${options.noteBorderColor};\n fill: ${options.noteBkgColor};\n\n text {\n fill: ${options.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${options.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${options.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ${options.transitionLabelColor || options.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${options.transitionLabelColor || options.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${options.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${options.specialStateColor};\n stroke: ${options.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${options.specialStateColor};\n stroke: ${options.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${options.innerEndBackground};\n stroke: ${options.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${options.compositeBackground || options.background};\n // stroke: ${options.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${options.stateBkg || options.mainBkg};\n stroke: ${options.stateBorder || options.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${options.mainBkg};\n stroke: ${options.stateBorder || options.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${options.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${options.compositeTitleBackground};\n stroke: ${options.stateBorder || options.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${options.stateLabelColor};\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${options.stateBorder || options.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${options.compositeBackground || options.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${options.altBackground ? options.altBackground : '#efefef'};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${options.noteBkgColor};\n stroke: ${options.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${options.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${options.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${options.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${options.lineColor};\n stroke: ${options.lineColor};\n stroke-width: 1;\n}\n`;\n\nexport default getStyles;\n","const getStyles = (options) =>\n `.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${options.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${options.textColor}\n }\n\n .legend {\n fill: ${options.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${options.textColor}\n }\n\n .face {\n ${options.faceColor ? `fill: ${options.faceColor}` : 'fill: #FFF8DC'};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${options.mainBkg};\n stroke: ${options.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${options.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${options.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${options.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${options.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${options.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${options.tertiaryColor};\n border: 1px solid ${options.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${options.fillType0 ? `fill: ${options.fillType0}` : ''};\n }\n .task-type-1, .section-type-1 {\n ${options.fillType0 ? `fill: ${options.fillType1}` : ''};\n }\n .task-type-2, .section-type-2 {\n ${options.fillType0 ? `fill: ${options.fillType2}` : ''};\n }\n .task-type-3, .section-type-3 {\n ${options.fillType0 ? `fill: ${options.fillType3}` : ''};\n }\n .task-type-4, .section-type-4 {\n ${options.fillType0 ? `fill: ${options.fillType4}` : ''};\n }\n .task-type-5, .section-type-5 {\n ${options.fillType0 ? `fill: ${options.fillType5}` : ''};\n }\n .task-type-6, .section-type-6 {\n ${options.fillType0 ? `fill: ${options.fillType6}` : ''};\n }\n .task-type-7, .section-type-7 {\n ${options.fillType0 ? `fill: ${options.fillType7}` : ''};\n }\n\n .actor-0 {\n ${options.actor0 ? `fill: ${options.actor0}` : ''};\n }\n .actor-1 {\n ${options.actor1 ? `fill: ${options.actor1}` : ''};\n }\n .actor-2 {\n ${options.actor2 ? `fill: ${options.actor2}` : ''};\n }\n .actor-3 {\n ${options.actor3 ? `fill: ${options.actor3}` : ''};\n }\n .actor-4 {\n ${options.actor4 ? `fill: ${options.actor4}` : ''};\n }\n .actor-5 {\n ${options.actor5 ? `fill: ${options.actor5}` : ''};\n }\n`;\n\nexport default getStyles;\n","const getStyles = (options) =>\n `.person {\n stroke: ${options.personBorder};\n fill: ${options.personBkg};\n }\n`;\n\nexport default getStyles;\n","import classDiagram from './diagrams/class/styles';\nimport er from './diagrams/er/styles';\nimport error from './diagrams/error/styles';\nimport flowchart from './diagrams/flowchart/styles';\nimport gantt from './diagrams/gantt/styles';\n// import gitGraph from './diagrams/git/styles';\nimport info from './diagrams/info/styles';\nimport pie from './diagrams/pie/styles';\nimport requirement from './diagrams/requirement/styles';\nimport sequence from './diagrams/sequence/styles';\nimport stateDiagram from './diagrams/state/styles';\nimport journey from './diagrams/user-journey/styles';\nimport c4 from './diagrams/c4/styles';\nimport { FlowChartStyleOptions } from './diagrams/flowchart/styles';\nimport { log } from './logger';\n\n// TODO @knut: Inject from registerDiagram.\nconst themes: Record = {\n flowchart,\n 'flowchart-v2': flowchart,\n sequence,\n gantt,\n classDiagram,\n 'classDiagram-v2': classDiagram,\n class: classDiagram,\n stateDiagram,\n state: stateDiagram,\n // gitGraph,\n info,\n pie,\n er,\n error,\n journey,\n requirement,\n c4,\n};\n\nconst getStyles = (\n type: string,\n userStyles: string,\n options: {\n fontFamily: string;\n fontSize: string;\n textColor: string;\n errorBkgColor: string;\n errorTextColor: string;\n lineColor: string;\n } & FlowChartStyleOptions\n) => {\n let diagramStyles = '';\n if (type in themes && themes[type as keyof typeof themes]) {\n diagramStyles = themes[type as keyof typeof themes](options);\n } else {\n log.warn(`No theme found for ${type}`);\n }\n return ` {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n fill: ${options.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ${options.errorBkgColor};\n }\n .error-text {\n fill: ${options.errorTextColor};\n stroke: ${options.errorTextColor};\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ${options.lineColor};\n stroke: ${options.lineColor};\n }\n .marker.cross {\n stroke: ${options.lineColor};\n }\n\n svg {\n font-family: ${options.fontFamily};\n font-size: ${options.fontSize};\n }\n\n ${diagramStyles}\n\n ${userStyles}\n`;\n};\n\nexport const addStylesForDiagram = (type: string, diagramTheme: unknown): void => {\n themes[type] = diagramTheme;\n};\n\nexport default getStyles;\n","import { addDetector } from './detectType';\nimport { log as _log, setLogLevel as _setLogLevel } from '../logger';\nimport { getConfig as _getConfig } from '../config';\nimport { sanitizeText as _sanitizeText } from '../diagrams/common/common';\nimport { setupGraphViewbox as _setupGraphViewbox } from '../setupGraphViewbox';\nimport { addStylesForDiagram } from '../styles';\nimport { DiagramDefinition, DiagramDetector } from './types';\n\n/*\n Packaging and exposing resources for externa diagrams so that they can import\n diagramAPI and have access to selct parts of mermaid common code reqiored to\n create diagrams worling like the internal diagrams.\n*/\nexport const log = _log;\nexport const setLogLevel = _setLogLevel;\nexport const getConfig = _getConfig;\nexport const sanitizeText = (text: string) => _sanitizeText(text, getConfig());\nexport const setupGraphViewbox = _setupGraphViewbox;\n\nconst diagrams: Record = {};\nexport interface Detectors {\n [key: string]: DiagramDetector;\n}\n\nexport const registerDiagram = (\n id: string,\n diagram: DiagramDefinition,\n detector?: DiagramDetector,\n callback?: (\n _log: any,\n _setLogLevel: any,\n _getConfig: any,\n _sanitizeText: any,\n _setupGraphViewbox: any\n ) => void\n) => {\n log.debug(`Registering diagram ${id}`);\n if (diagrams[id]) {\n log.warn(`Diagram ${id} already registered.`);\n // The error throw is commented out to as it breaks pages where you have multiple diagrams,\n // it can happen that rendering of the same type of diagram is initiated while the previous\n // one is still being imported. import deals with this and only one diagram is imported in\n // the end.\n // throw new Error(`Diagram ${id} already registered.`);\n }\n diagrams[id] = diagram;\n if (detector) {\n addDetector(id, detector);\n }\n addStylesForDiagram(id, diagram.styles);\n if (typeof callback !== 'undefined') {\n callback(log, setLogLevel, getConfig, sanitizeText, setupGraphViewbox);\n }\n log.debug(`Registered diagram ${id}. ${Object.keys(diagrams).join(', ')} diagrams registered.`);\n};\n\nexport const getDiagram = (name: string): DiagramDefinition => {\n log.debug(`Getting diagram ${name}. ${Object.keys(diagrams).join(', ')} diagrams registered.`);\n if (name in diagrams) {\n return diagrams[name];\n }\n throw new DiagramNotFoundError(name);\n};\n\nexport class DiagramNotFoundError extends Error {\n constructor(message: string) {\n super(`Diagram ${message} not found.`);\n }\n}\n","/*\n * Parse following\n * gitGraph:\n * commit\n * commit\n * branch\n */\n%lex\n\n%x string\n%x options\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%options case-insensitive\n\n\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n[\\}] { this.popState(); }\n[^\\}]* return \"acc_descr_multiline_value\";\n(\\r?\\n)+ /*{console.log('New line');return 'NL';}*/ return 'NL';\n\\#[^\\n]* /* skip comments */\n\\%%[^\\n]* /* skip comments */\n\"gitGraph\" return 'GG';\ncommit(?=\\s|$) return 'COMMIT';\n\"id:\" return 'COMMIT_ID';\n\"type:\" return 'COMMIT_TYPE';\n\"msg:\" return 'COMMIT_MSG';\n\"NORMAL\" return 'NORMAL';\n\"REVERSE\" return 'REVERSE';\n\"HIGHLIGHT\" return 'HIGHLIGHT';\n\"tag:\" return 'COMMIT_TAG';\nbranch(?=\\s|$) return 'BRANCH';\n\"order:\" return 'ORDER';\nmerge(?=\\s|$) return 'MERGE';\ncherry\\-pick(?=\\s|$) return 'CHERRY_PICK';\n// \"reset\" return 'RESET';\ncheckout(?=\\s|$) return 'CHECKOUT';\n\"LR\" return 'DIR';\n\"BT\" return 'DIR';\n\":\" return ':';\n\"^\" return 'CARET'\n\"options\"\\r?\\n this.begin(\"options\"); //\n[ \\r\\n\\t]+\"end\" this.popState(); // not used anymore in the renderer, fixed for backward compatibility\n[\\s\\S]+(?=[ \\r\\n\\t]+\"end\") return 'OPT'; //\n[\"][\"] return 'EMPTYSTR';\n[\"] this.begin(\"string\");\n[\"] this.popState();\n[^\"]* return 'STR';\n[0-9]+(?=\\s|$) return 'NUM';\n\\w([-\\./\\w]*[-\\w])? return 'ID'; // only a subset of https://git-scm.com/docs/git-check-ref-format\n<> return 'EOF';\n\\s+ /* skip all whitespace */ // lowest priority so we can use lookaheads in earlier regex\n\n/lex\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n : eol start\n | directive start\n | GG document EOF{ return $3; }\n | GG ':' document EOF{ return $3; }\n | GG DIR ':' document EOF {yy.setDirection($2); return $4;}\n ;\n\n\ndocument\n : /*empty*/\n | options body { yy.setOptions($1); $$ = $2}\n ;\n\noptions\n : options OPT {$1 +=$2; $$=$1}\n | NL\n ;\nbody\n : /*emmpty*/ {$$ = []}\n | body line {$1.push($2); $$=$1;}\n ;\nline\n : statement eol {$$ =$1}\n | NL\n ;\n\nstatement\n : commitStatement\n | mergeStatement\n | cherryPickStatement\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}\n | branchStatement\n | CHECKOUT ID {yy.checkout($2)}\n // | RESET reset_arg {yy.reset($2)}\n ;\nbranchStatement\n : BRANCH ID {yy.branch($2)}\n | BRANCH ID ORDER NUM {yy.branch($2, $4)}\n ;\n\ncherryPickStatement\n : CHERRY_PICK COMMIT_ID STR {yy.cherryPick($3, '', undefined)}\n | CHERRY_PICK COMMIT_ID STR COMMIT_TAG STR {yy.cherryPick($3, '', $5)}\n | CHERRY_PICK COMMIT_ID STR COMMIT_TAG EMPTYSTR {yy.cherryPick($3, '', '')}\n | CHERRY_PICK COMMIT_TAG STR COMMIT_ID STR {yy.cherryPick($5, '', $3)}\n | CHERRY_PICK COMMIT_TAG EMPTYSTR COMMIT_ID STR {yy.cherryPick($3, '', '')}\n ;\n\nmergeStatement\n : MERGE ID {yy.merge($2,'','','')}\n | MERGE ID COMMIT_ID STR {yy.merge($2, $4,'','')}\n | MERGE ID COMMIT_TYPE commitType {yy.merge($2,'', $4,'')}\n | MERGE ID COMMIT_TAG STR {yy.merge($2, '','',$4)}\n | MERGE ID COMMIT_TAG STR COMMIT_ID STR {yy.merge($2, $6,'', $4)}\n | MERGE ID COMMIT_TAG STR COMMIT_TYPE commitType {yy.merge($2, '',$6, $4)}\n | MERGE ID COMMIT_TYPE commitType COMMIT_TAG STR {yy.merge($2, '',$4, $6)}\n | MERGE ID COMMIT_ID STR COMMIT_TYPE commitType {yy.merge($2, $4, $6, '')}\n | MERGE ID COMMIT_ID STR COMMIT_TAG STR {yy.merge($2, $4, '', $6)}\n | MERGE ID COMMIT_TYPE commitType COMMIT_ID STR {yy.merge($2, $6,$4, '')}\n | MERGE ID COMMIT_ID STR COMMIT_TYPE commitType COMMIT_TAG STR {yy.merge($2, $4, $6, $8)}\n | MERGE ID COMMIT_TYPE commitType COMMIT_TAG STR COMMIT_ID STR {yy.merge($2, $8, $4, $6)}\n | MERGE ID COMMIT_ID STR COMMIT_TAG STR COMMIT_TYPE commitType {yy.merge($2, $4, $8, $6)}\n | MERGE ID COMMIT_TYPE commitType COMMIT_ID STR COMMIT_TAG STR {yy.merge($2, $6, $4, $8)}\n | MERGE ID COMMIT_TAG STR COMMIT_TYPE commitType COMMIT_ID STR {yy.merge($2, $8, $6, $4)}\n | MERGE ID COMMIT_TAG STR COMMIT_ID STR COMMIT_TYPE commitType {yy.merge($2, $6, $8, $4)}\n ;\n\ncommitStatement\n : COMMIT commit_arg {yy.commit($2)}\n | COMMIT COMMIT_TAG STR {yy.commit('','',yy.commitType.NORMAL,$3)}\n | COMMIT COMMIT_TYPE commitType {yy.commit('','',$3,'')}\n | COMMIT COMMIT_TAG STR COMMIT_TYPE commitType {yy.commit('','',$5,$3)}\n | COMMIT COMMIT_TYPE commitType COMMIT_TAG STR {yy.commit('','',$3,$5)}\n | COMMIT COMMIT_ID STR {yy.commit('',$3,yy.commitType.NORMAL,'')}\n | COMMIT COMMIT_ID STR COMMIT_TAG STR {yy.commit('',$3,yy.commitType.NORMAL,$5)}\n | COMMIT COMMIT_TAG STR COMMIT_ID STR {yy.commit('',$5,yy.commitType.NORMAL,$3)}\n | COMMIT COMMIT_ID STR COMMIT_TYPE commitType {yy.commit('',$3,$5,'')}\n | COMMIT COMMIT_TYPE commitType COMMIT_ID STR {yy.commit('',$5,$3,'')}\n | COMMIT COMMIT_ID STR COMMIT_TYPE commitType COMMIT_TAG STR {yy.commit('',$3,$5,$7)}\n | COMMIT COMMIT_ID STR COMMIT_TAG STR COMMIT_TYPE commitType {yy.commit('',$3,$7,$5)}\n | COMMIT COMMIT_TYPE commitType COMMIT_ID STR COMMIT_TAG STR {yy.commit('',$5,$3,$7)}\n | COMMIT COMMIT_TYPE commitType COMMIT_TAG STR COMMIT_ID STR {yy.commit('',$7,$3,$5)}\n | COMMIT COMMIT_TAG STR COMMIT_TYPE commitType COMMIT_ID STR {yy.commit('',$7,$5,$3)}\n | COMMIT COMMIT_TAG STR COMMIT_ID STR COMMIT_TYPE commitType {yy.commit('',$5,$7,$3)}\n | COMMIT COMMIT_MSG STR {yy.commit($3,'',yy.commitType.NORMAL,'')}\n | COMMIT COMMIT_TAG STR COMMIT_MSG STR {yy.commit($5,'',yy.commitType.NORMAL,$3)}\n | COMMIT COMMIT_MSG STR COMMIT_TAG STR {yy.commit($3,'',yy.commitType.NORMAL,$5)}\n | COMMIT COMMIT_MSG STR COMMIT_TYPE commitType {yy.commit($3,'',$5,'')}\n | COMMIT COMMIT_TYPE commitType COMMIT_MSG STR {yy.commit($5,'',$3,'')}\n | COMMIT COMMIT_ID STR COMMIT_MSG STR {yy.commit($5,$3,yy.commitType.NORMAL,'')}\n | COMMIT COMMIT_MSG STR COMMIT_ID STR {yy.commit($3,$5,yy.commitType.NORMAL,'')}\n\n | COMMIT COMMIT_MSG STR COMMIT_TYPE commitType COMMIT_TAG STR {yy.commit($3,'',$5,$7)}\n | COMMIT COMMIT_MSG STR COMMIT_TAG STR COMMIT_TYPE commitType {yy.commit($3,'',$7,$5)}\n | COMMIT COMMIT_TYPE commitType COMMIT_MSG STR COMMIT_TAG STR {yy.commit($5,'',$3,$7)}\n | COMMIT COMMIT_TYPE commitType COMMIT_TAG STR COMMIT_MSG STR {yy.commit($7,'',$3,$5)}\n | COMMIT COMMIT_TAG STR COMMIT_TYPE commitType COMMIT_MSG STR {yy.commit($7,'',$5,$3)}\n | COMMIT COMMIT_TAG STR COMMIT_MSG STR COMMIT_TYPE commitType {yy.commit($5,'',$7,$3)}\n\n | COMMIT COMMIT_MSG STR COMMIT_TYPE commitType COMMIT_ID STR {yy.commit($3,$7,$5,'')}\n | COMMIT COMMIT_MSG STR COMMIT_ID STR COMMIT_TYPE commitType {yy.commit($3,$5,$7,'')}\n | COMMIT COMMIT_TYPE commitType COMMIT_MSG STR COMMIT_ID STR {yy.commit($5,$7,$3,'')}\n | COMMIT COMMIT_TYPE commitType COMMIT_ID STR COMMIT_MSG STR {yy.commit($7,$5,$3,'')}\n | COMMIT COMMIT_ID STR COMMIT_TYPE commitType COMMIT_MSG STR {yy.commit($7,$3,$5,'')}\n | COMMIT COMMIT_ID STR COMMIT_MSG STR COMMIT_TYPE commitType {yy.commit($5,$3,$7,'')}\n\n | COMMIT COMMIT_MSG STR COMMIT_TAG STR COMMIT_ID STR {yy.commit($3,$7,yy.commitType.NORMAL,$5)}\n | COMMIT COMMIT_MSG STR COMMIT_ID STR COMMIT_TAG STR {yy.commit($3,$5,yy.commitType.NORMAL,$7)}\n | COMMIT COMMIT_TAG STR COMMIT_MSG STR COMMIT_ID STR {yy.commit($5,$7,yy.commitType.NORMAL,$3)}\n | COMMIT COMMIT_TAG STR COMMIT_ID STR COMMIT_MSG STR {yy.commit($7,$5,yy.commitType.NORMAL,$3)}\n | COMMIT COMMIT_ID STR COMMIT_TAG STR COMMIT_MSG STR {yy.commit($7,$3,yy.commitType.NORMAL,$5)}\n | COMMIT COMMIT_ID STR COMMIT_MSG STR COMMIT_TAG STR {yy.commit($5,$3,yy.commitType.NORMAL,$7)}\n\n | COMMIT COMMIT_MSG STR COMMIT_ID STR COMMIT_TYPE commitType COMMIT_TAG STR {yy.commit($3,$5,$7,$9)}\n | COMMIT COMMIT_MSG STR COMMIT_ID STR COMMIT_TAG STR COMMIT_TYPE commitType {yy.commit($3,$5,$9,$7)}\n | COMMIT COMMIT_MSG STR COMMIT_TYPE commitType COMMIT_ID STR COMMIT_TAG STR {yy.commit($3,$7,$5,$9)}\n | COMMIT COMMIT_MSG STR COMMIT_TYPE commitType COMMIT_TAG STR COMMIT_ID STR {yy.commit($3,$9,$5,$7)}\n | COMMIT COMMIT_MSG STR COMMIT_TAG STR COMMIT_ID STR COMMIT_TYPE commitType {yy.commit($3,$7,$9,$5)}\n | COMMIT COMMIT_MSG STR COMMIT_TAG STR COMMIT_TYPE commitType COMMIT_ID STR {yy.commit($3,$9,$7,$5)}\n\n | COMMIT COMMIT_ID STR COMMIT_MSG STR COMMIT_TYPE commitType COMMIT_TAG STR {yy.commit($5,$3,$7,$9)}\n | COMMIT COMMIT_ID STR COMMIT_MSG STR COMMIT_TAG STR COMMIT_TYPE commitType {yy.commit($5,$3,$9,$7)}\n | COMMIT COMMIT_ID STR COMMIT_TYPE commitType COMMIT_MSG STR COMMIT_TAG STR {yy.commit($7,$3,$5,$9)}\n | COMMIT COMMIT_ID STR COMMIT_TYPE commitType COMMIT_TAG STR COMMIT_MSG STR {yy.commit($9,$3,$5,$7)}\n | COMMIT COMMIT_ID STR COMMIT_TAG STR COMMIT_MSG STR COMMIT_TYPE commitType {yy.commit($7,$3,$9,$5)}\n | COMMIT COMMIT_ID STR COMMIT_TAG STR COMMIT_TYPE commitType COMMIT_MSG STR {yy.commit($9,$3,$7,$5)}\n\n | COMMIT COMMIT_TAG STR COMMIT_ID STR COMMIT_TYPE commitType COMMIT_MSG STR {yy.commit($9,$5,$7,$3)}\n | COMMIT COMMIT_TAG STR COMMIT_ID STR COMMIT_MSG STR COMMIT_TYPE commitType {yy.commit($7,$5,$9,$3)}\n | COMMIT COMMIT_TAG STR COMMIT_TYPE commitType COMMIT_ID STR COMMIT_MSG STR {yy.commit($9,$7,$5,$3)}\n | COMMIT COMMIT_TAG STR COMMIT_TYPE commitType COMMIT_MSG STR COMMIT_ID STR {yy.commit($7,$9,$5,$3)}\n | COMMIT COMMIT_TAG STR COMMIT_MSG STR COMMIT_ID STR COMMIT_TYPE commitType {yy.commit($5,$7,$9,$3)}\n | COMMIT COMMIT_TAG STR COMMIT_MSG STR COMMIT_TYPE commitType COMMIT_ID STR {yy.commit($5,$9,$7,$3)}\n\n | COMMIT COMMIT_TYPE commitType COMMIT_ID STR COMMIT_MSG STR COMMIT_TAG STR {yy.commit($7,$5,$3,$9)}\n | COMMIT COMMIT_TYPE commitType COMMIT_ID STR COMMIT_TAG STR COMMIT_MSG STR {yy.commit($9,$5,$3,$7)}\n | COMMIT COMMIT_TYPE commitType COMMIT_TAG STR COMMIT_MSG STR COMMIT_ID STR {yy.commit($7,$9,$3,$5)}\n | COMMIT COMMIT_TYPE commitType COMMIT_TAG STR COMMIT_ID STR COMMIT_MSG STR {yy.commit($9,$7,$3,$5)}\n | COMMIT COMMIT_TYPE commitType COMMIT_MSG STR COMMIT_ID STR COMMIT_TAG STR {yy.commit($5,$7,$3,$9)}\n | COMMIT COMMIT_TYPE commitType COMMIT_MSG STR COMMIT_TAG STR COMMIT_ID STR {yy.commit($5,$9,$3,$7)}\n\n\n // | COMMIT COMMIT_ID STR {yy.commit('',$3,yy.commitType.NORMAL,'')}\n // | COMMIT COMMIT_TYPE commitType {yy.commit('','',$3,'')}\n // | COMMIT COMMIT_TAG STR {yy.commit('','',yy.commitType.NORMAL,$3)}\n // | COMMIT COMMIT_MSG STR {yy.commit($3,'',yy.commitType.NORMAL,'')}\n // | COMMIT COMMIT_TAG STR COMMIT_TYPE commitType {yy.commit('','',$5,$3)}\n // | COMMIT COMMIT_TYPE commitType COMMIT_TAG STR {yy.commit('','',$3,$5)}\n // | COMMIT COMMIT_ID STR COMMIT_TYPE commitType {yy.commit('',$3,$5,'')}\n // | COMMIT COMMIT_ID STR COMMIT_TAG STR {yy.commit('',$3,yy.commitType.NORMAL,$5)}\n // | COMMIT COMMIT_ID STR COMMIT_TYPE commitType COMMIT_TAG STR {yy.commit('',$3,$5,$7)}\n // | COMMIT COMMIT_ID STR COMMIT_TAG STR COMMIT_TYPE commitType {yy.commit('',$3,$7,$5)}\n ;\ncommit_arg\n : /* empty */ {$$ = \"\"}\n | STR {$$=$1}\n ;\ncommitType\n : NORMAL { $$=yy.commitType.NORMAL;}\n | REVERSE { $$=yy.commitType.REVERSE;}\n | HIGHLIGHT { $$=yy.commitType.HIGHLIGHT;}\n ;\n\ndirective\n : openDirective typeDirective closeDirective\n | openDirective typeDirective ':' argDirective closeDirective\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'gitGraph'); }\n ;\n\neol\n : NL\n | ';'\n | EOF\n ;\n// reset_arg\n// : 'HEAD' reset_parents{$$ = $1+ \":\" + $2 }\n// | ID reset_parents{$$ = $1+ \":\" + yy.count; yy.count = 0}\n// ;\n// reset_parents\n// : /* empty */ {yy.count = 0}\n// | CARET reset_parents { yy.count += 1 }\n// ;\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const gitGraphDetector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*gitGraph/) !== null;\n};\n","import { sanitizeText as _sanitizeText } from './diagrams/common/common';\nimport { getConfig } from './config';\nlet title = '';\nlet diagramTitle = '';\nlet description = '';\nconst sanitizeText = (txt: string): string => _sanitizeText(txt, getConfig());\n\nexport const clear = function (): void {\n title = '';\n description = '';\n diagramTitle = '';\n};\n\nexport const setAccTitle = function (txt: string): void {\n title = sanitizeText(txt).replace(/^\\s+/g, '');\n};\n\nexport const getAccTitle = function (): string {\n return title || diagramTitle;\n};\n\nexport const setAccDescription = function (txt: string): void {\n description = sanitizeText(txt).replace(/\\n\\s+/g, '\\n');\n};\n\nexport const getAccDescription = function (): string {\n return description;\n};\n\nexport const setDiagramTitle = function (txt: string): void {\n diagramTitle = sanitizeText(txt);\n};\n\nexport const getDiagramTitle = function (): string {\n return diagramTitle;\n};\n\nexport default {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle: getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear,\n};\n","import { log } from '../../logger';\nimport { random } from '../../utils';\nimport mermaidAPI from '../../mermaidAPI';\nimport * as configApi from '../../config';\nimport { getConfig } from '../../config';\nimport common from '../common/common';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nlet mainBranchName = getConfig().gitGraph.mainBranchName;\nlet mainBranchOrder = getConfig().gitGraph.mainBranchOrder;\nlet commits = {};\nlet head = null;\nlet branchesConfig = {};\nbranchesConfig[mainBranchName] = { name: mainBranchName, order: mainBranchOrder };\nlet branches = {};\nbranches[mainBranchName] = head;\nlet curBranch = mainBranchName;\nlet direction = 'LR';\nlet seq = 0;\n\n/**\n *\n */\nfunction getId() {\n return random({ length: 7 });\n}\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\n// /**\n// * @param currentCommit\n// * @param otherCommit\n// */\n// function isfastforwardable(currentCommit, otherCommit) {\n// log.debug('Entering isfastforwardable:', currentCommit.id, otherCommit.id);\n// let cnt = 0;\n// while (currentCommit.seq <= otherCommit.seq && currentCommit !== otherCommit && cnt < 1000) {\n// cnt++;\n// // only if other branch has more commits\n// if (otherCommit.parent == null) break;\n// if (Array.isArray(otherCommit.parent)) {\n// log.debug('In merge commit:', otherCommit.parent);\n// return (\n// isfastforwardable(currentCommit, commits[otherCommit.parent[0]]) ||\n// isfastforwardable(currentCommit, commits[otherCommit.parent[1]])\n// );\n// } else {\n// otherCommit = commits[otherCommit.parent];\n// }\n// }\n// log.debug(currentCommit.id, otherCommit.id);\n// return currentCommit.id === otherCommit.id;\n// }\n\n/**\n * @param currentCommit\n * @param otherCommit\n */\n// function isReachableFrom(currentCommit, otherCommit) {\n// const currentSeq = currentCommit.seq;\n// const otherSeq = otherCommit.seq;\n// if (currentSeq > otherSeq) return isfastforwardable(otherCommit, currentCommit);\n// return false;\n// }\n\n/**\n * @param list\n * @param fn\n */\nfunction uniqBy(list, fn) {\n const recordMap = Object.create(null);\n return list.reduce((out, item) => {\n const key = fn(item);\n if (!recordMap[key]) {\n recordMap[key] = true;\n out.push(item);\n }\n return out;\n }, []);\n}\n\nexport const setDirection = function (dir) {\n direction = dir;\n};\nlet options = {};\nexport const setOptions = function (rawOptString) {\n log.debug('options str', rawOptString);\n rawOptString = rawOptString && rawOptString.trim();\n rawOptString = rawOptString || '{}';\n try {\n options = JSON.parse(rawOptString);\n } catch (e) {\n log.error('error while parsing gitGraph options', e.message);\n }\n};\n\nexport const getOptions = function () {\n return options;\n};\n\nexport const commit = function (msg, id, type, tag) {\n log.debug('Entering commit:', msg, id, type, tag);\n id = common.sanitizeText(id, configApi.getConfig());\n msg = common.sanitizeText(msg, configApi.getConfig());\n tag = common.sanitizeText(tag, configApi.getConfig());\n const commit = {\n id: id ? id : seq + '-' + getId(),\n message: msg,\n seq: seq++,\n type: type ? type : commitType.NORMAL,\n tag: tag ? tag : '',\n parents: head == null ? [] : [head.id],\n branch: curBranch,\n };\n head = commit;\n commits[commit.id] = commit;\n branches[curBranch] = commit.id;\n log.debug('in pushCommit ' + commit.id);\n};\n\nexport const branch = function (name, order) {\n name = common.sanitizeText(name, configApi.getConfig());\n if (typeof branches[name] === 'undefined') {\n branches[name] = head != null ? head.id : null;\n branchesConfig[name] = { name, order: order ? parseInt(order, 10) : null };\n checkout(name);\n log.debug('in createBranch');\n } else {\n let error = new Error(\n 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using \"checkout ' +\n name +\n '\")'\n );\n error.hash = {\n text: 'branch ' + name,\n token: 'branch ' + name,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['\"checkout ' + name + '\"'],\n };\n throw error;\n }\n};\n\nexport const merge = function (otherBranch, custom_id, override_type, custom_tag) {\n otherBranch = common.sanitizeText(otherBranch, configApi.getConfig());\n custom_id = common.sanitizeText(custom_id, configApi.getConfig());\n\n const currentCommit = commits[branches[curBranch]];\n const otherCommit = commits[branches[otherBranch]];\n if (curBranch === otherBranch) {\n let error = new Error('Incorrect usage of \"merge\". Cannot merge a branch to itself');\n error.hash = {\n text: 'merge ' + otherBranch,\n token: 'merge ' + otherBranch,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['branch abc'],\n };\n throw error;\n } else if (typeof currentCommit === 'undefined' || !currentCommit) {\n let error = new Error(\n 'Incorrect usage of \"merge\". Current branch (' + curBranch + ')has no commits'\n );\n error.hash = {\n text: 'merge ' + otherBranch,\n token: 'merge ' + otherBranch,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['commit'],\n };\n throw error;\n } else if (typeof branches[otherBranch] === 'undefined') {\n let error = new Error(\n 'Incorrect usage of \"merge\". Branch to be merged (' + otherBranch + ') does not exist'\n );\n error.hash = {\n text: 'merge ' + otherBranch,\n token: 'merge ' + otherBranch,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['branch ' + otherBranch],\n };\n throw error;\n } else if (typeof otherCommit === 'undefined' || !otherCommit) {\n let error = new Error(\n 'Incorrect usage of \"merge\". Branch to be merged (' + otherBranch + ') has no commits'\n );\n error.hash = {\n text: 'merge ' + otherBranch,\n token: 'merge ' + otherBranch,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['\"commit\"'],\n };\n throw error;\n } else if (currentCommit === otherCommit) {\n let error = new Error('Incorrect usage of \"merge\". Both branches have same head');\n error.hash = {\n text: 'merge ' + otherBranch,\n token: 'merge ' + otherBranch,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['branch abc'],\n };\n throw error;\n } else if (custom_id && typeof commits[custom_id] !== 'undefined') {\n let error = new Error(\n 'Incorrect usage of \"merge\". Commit with id:' +\n custom_id +\n ' already exists, use different custom Id'\n );\n error.hash = {\n text: 'merge ' + otherBranch + custom_id + override_type + custom_tag,\n token: 'merge ' + otherBranch + custom_id + override_type + custom_tag,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: [\n 'merge ' + otherBranch + ' ' + custom_id + '_UNIQUE ' + override_type + ' ' + custom_tag,\n ],\n };\n\n throw error;\n }\n // if (isReachableFrom(currentCommit, otherCommit)) {\n // log.debug('Already merged');\n // return;\n // }\n // if (isfastforwardable(currentCommit, otherCommit)) {\n // branches[curBranch] = branches[otherBranch];\n // head = commits[branches[curBranch]];\n // } else {\n // create merge commit\n const commit = {\n id: custom_id ? custom_id : seq + '-' + getId(),\n message: 'merged branch ' + otherBranch + ' into ' + curBranch,\n seq: seq++,\n parents: [head == null ? null : head.id, branches[otherBranch]],\n branch: curBranch,\n type: commitType.MERGE,\n customType: override_type,\n customId: custom_id ? true : false,\n tag: custom_tag ? custom_tag : '',\n };\n head = commit;\n commits[commit.id] = commit;\n branches[curBranch] = commit.id;\n // }\n log.debug(branches);\n log.debug('in mergeBranch');\n};\n\nexport const cherryPick = function (sourceId, targetId, tag) {\n log.debug('Entering cherryPick:', sourceId, targetId, tag);\n sourceId = common.sanitizeText(sourceId, configApi.getConfig());\n targetId = common.sanitizeText(targetId, configApi.getConfig());\n tag = common.sanitizeText(tag, configApi.getConfig());\n\n if (!sourceId || typeof commits[sourceId] === 'undefined') {\n let error = new Error(\n 'Incorrect usage of \"cherryPick\". Source commit id should exist and provided'\n );\n error.hash = {\n text: 'cherryPick ' + sourceId + ' ' + targetId,\n token: 'cherryPick ' + sourceId + ' ' + targetId,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n\n let sourceCommit = commits[sourceId];\n let sourceCommitBranch = sourceCommit.branch;\n if (sourceCommit.type === commitType.MERGE) {\n let error = new Error(\n 'Incorrect usage of \"cherryPick\". Source commit should not be a merge commit'\n );\n error.hash = {\n text: 'cherryPick ' + sourceId + ' ' + targetId,\n token: 'cherryPick ' + sourceId + ' ' + targetId,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n if (!targetId || typeof commits[targetId] === 'undefined') {\n // cherry-pick source commit to current branch\n\n if (sourceCommitBranch === curBranch) {\n let error = new Error(\n 'Incorrect usage of \"cherryPick\". Source commit is already on current branch'\n );\n error.hash = {\n text: 'cherryPick ' + sourceId + ' ' + targetId,\n token: 'cherryPick ' + sourceId + ' ' + targetId,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n const currentCommit = commits[branches[curBranch]];\n if (typeof currentCommit === 'undefined' || !currentCommit) {\n let error = new Error(\n 'Incorrect usage of \"cherry-pick\". Current branch (' + curBranch + ')has no commits'\n );\n error.hash = {\n text: 'cherryPick ' + sourceId + ' ' + targetId,\n token: 'cherryPick ' + sourceId + ' ' + targetId,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['cherry-pick abc'],\n };\n throw error;\n }\n const commit = {\n id: seq + '-' + getId(),\n message: 'cherry-picked ' + sourceCommit + ' into ' + curBranch,\n seq: seq++,\n parents: [head == null ? null : head.id, sourceCommit.id],\n branch: curBranch,\n type: commitType.CHERRY_PICK,\n tag: tag ?? 'cherry-pick:' + sourceCommit.id,\n };\n head = commit;\n commits[commit.id] = commit;\n branches[curBranch] = commit.id;\n log.debug(branches);\n log.debug('in cherryPick');\n }\n};\nexport const checkout = function (branch) {\n branch = common.sanitizeText(branch, configApi.getConfig());\n if (typeof branches[branch] === 'undefined') {\n let error = new Error(\n 'Trying to checkout branch which is not yet created. (Help try using \"branch ' + branch + '\")'\n );\n error.hash = {\n text: 'checkout ' + branch,\n token: 'checkout ' + branch,\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: ['\"branch ' + branch + '\"'],\n };\n throw error;\n //branches[branch] = head != null ? head.id : null;\n //log.debug('in createBranch');\n } else {\n curBranch = branch;\n const id = branches[curBranch];\n head = commits[id];\n }\n};\n\n// export const reset = function (commitRef) {\n// log.debug('in reset', commitRef);\n// const ref = commitRef.split(':')[0];\n// let parentCount = parseInt(commitRef.split(':')[1]);\n// let commit = ref === 'HEAD' ? head : commits[branches[ref]];\n// log.debug(commit, parentCount);\n// while (parentCount > 0) {\n// commit = commits[commit.parent];\n// parentCount--;\n// if (!commit) {\n// const err = 'Critical error - unique parent commit not found during reset';\n// log.error(err);\n// throw err;\n// }\n// }\n// head = commit;\n// branches[curBranch] = commit.id;\n// };\n\n/**\n * @param arr\n * @param key\n * @param newval\n */\nfunction upsert(arr, key, newval) {\n const index = arr.indexOf(key);\n if (index === -1) {\n arr.push(newval);\n } else {\n arr.splice(index, 1, newval);\n }\n}\n\n/** @param commitArr */\nfunction prettyPrintCommitHistory(commitArr) {\n const commit = commitArr.reduce((out, commit) => {\n if (out.seq > commit.seq) return out;\n return commit;\n }, commitArr[0]);\n let line = '';\n commitArr.forEach(function (c) {\n if (c === commit) {\n line += '\\t*';\n } else {\n line += '\\t|';\n }\n });\n const label = [line, commit.id, commit.seq];\n for (let branch in branches) {\n if (branches[branch] === commit.id) label.push(branch);\n }\n log.debug(label.join(' '));\n if (commit.parents && commit.parents.length == 2) {\n const newCommit = commits[commit.parents[0]];\n upsert(commitArr, commit, newCommit);\n commitArr.push(commits[commit.parents[1]]);\n } else if (commit.parents.length == 0) {\n return;\n } else {\n const nextCommit = commits[commit.parents];\n upsert(commitArr, commit, nextCommit);\n }\n commitArr = uniqBy(commitArr, (c) => c.id);\n prettyPrintCommitHistory(commitArr);\n}\n\nexport const prettyPrint = function () {\n log.debug(commits);\n const node = getCommitsArray()[0];\n prettyPrintCommitHistory([node]);\n};\n\nexport const clear = function () {\n commits = {};\n head = null;\n let mainBranch = getConfig().gitGraph.mainBranchName;\n let mainBranchOrder = getConfig().gitGraph.mainBranchOrder;\n branches = {};\n branches[mainBranch] = null;\n branchesConfig = {};\n branchesConfig[mainBranch] = { name: mainBranch, order: mainBranchOrder };\n curBranch = mainBranch;\n seq = 0;\n commonClear();\n};\n\nexport const getBranchesAsObjArray = function () {\n const branchesArray = Object.values(branchesConfig)\n .map((branchConfig, i) => {\n if (branchConfig.order !== null) return branchConfig;\n return {\n ...branchConfig,\n order: parseFloat(`0.${i}`, 10),\n };\n })\n .sort((a, b) => a.order - b.order)\n .map(({ name }) => ({ name }));\n\n return branchesArray;\n};\n\nexport const getBranches = function () {\n return branches;\n};\nexport const getCommits = function () {\n return commits;\n};\nexport const getCommitsArray = function () {\n const commitArr = Object.keys(commits).map(function (key) {\n return commits[key];\n });\n commitArr.forEach(function (o) {\n log.debug(o.id);\n });\n commitArr.sort((a, b) => a.seq - b.seq);\n return commitArr;\n};\nexport const getCurrentBranch = function () {\n return curBranch;\n};\nexport const getDirection = function () {\n return direction;\n};\nexport const getHead = function () {\n return head;\n};\n\nexport const commitType = {\n NORMAL: 0,\n REVERSE: 1,\n HIGHLIGHT: 2,\n MERGE: 3,\n CHERRY_PICK: 4,\n};\n\nexport default {\n parseDirective,\n getConfig: () => configApi.getConfig().gitGraph,\n setDirection,\n setOptions,\n getOptions,\n commit,\n branch,\n merge,\n cherryPick,\n checkout,\n //reset,\n prettyPrint,\n clear,\n getBranchesAsObjArray,\n getBranches,\n getCommits,\n getCommitsArray,\n getCurrentBranch,\n getDirection,\n getHead,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n commitType,\n};\n","/**\n * This method will add a basic title and description element to a chart. The yy parser will need to\n * respond to getAccTitle and getAccDescription, where the title is the title element on the chart,\n * which is generally not displayed and the accDescription is the description element on the chart,\n * which is never displayed.\n *\n * The following charts display their title as a visual and accessibility element: gantt\n *\n * @param yy_parser\n * @param svg\n * @param id\n */\nexport default function addSVGAccessibilityFields(yy_parser, svg, id) {\n if (typeof svg.insert === 'undefined') {\n return;\n }\n\n let title_string = yy_parser.getAccTitle();\n let description = yy_parser.getAccDescription();\n svg.attr('role', 'img').attr('aria-labelledby', 'chart-title-' + id + ' chart-desc-' + id);\n svg\n .insert('desc', ':first-child')\n .attr('id', 'chart-desc-' + id)\n .text(description);\n svg\n .insert('title', ':first-child')\n .attr('id', 'chart-title-' + id)\n .text(title_string);\n}\n","import { select } from 'd3';\nimport { getConfig, setupGraphViewbox } from '../../diagram-api/diagramAPI';\nimport { log } from '../../logger';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nlet allCommitsDict = {};\n\nconst commitType = {\n NORMAL: 0,\n REVERSE: 1,\n HIGHLIGHT: 2,\n MERGE: 3,\n CHERRY_PICK: 4,\n};\n\nconst THEME_COLOR_LIMIT = 8;\n\nlet branchPos = {};\nlet commitPos = {};\nlet lanes = [];\nlet maxPos = 0;\nconst clear = () => {\n branchPos = {};\n commitPos = {};\n allCommitsDict = {};\n maxPos = 0;\n lanes = [];\n};\n\n/**\n * Draws a text, used for labels of the branches\n *\n * @param {string} txt The text\n * @returns {SVGElement}\n */\nconst drawText = (txt) => {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n let rows = [];\n\n // Handling of new lines in the label\n if (typeof txt === 'string') {\n rows = txt.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(txt)) {\n rows = txt;\n } else {\n rows = [];\n }\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n tspan.setAttribute('class', 'row');\n tspan.textContent = rows[j].trim();\n svgLabel.appendChild(tspan);\n }\n /**\n * @param svg\n * @param selector\n */\n return svgLabel;\n};\n\n/**\n * Draws the commits with its symbol and labels. The function has two modes, one which only\n * calculates the positions and one that does the actual drawing. This for a simple way getting the\n * vertical layering correct in the graph.\n *\n * @param {any} svg\n * @param {any} commits\n * @param {any} modifyGraph\n */\nconst drawCommits = (svg, commits, modifyGraph) => {\n const gitGraphConfig = getConfig().gitGraph;\n const gBullets = svg.append('g').attr('class', 'commit-bullets');\n const gLabels = svg.append('g').attr('class', 'commit-labels');\n let pos = 0;\n\n const keys = Object.keys(commits);\n const sortedKeys = keys.sort((a, b) => {\n return commits[a].seq - commits[b].seq;\n });\n sortedKeys.forEach((key) => {\n const commit = commits[key];\n\n const y = branchPos[commit.branch].pos;\n const x = pos + 10;\n // Don't draw the commits now but calculate the positioning which is used by the branch lines etc.\n if (modifyGraph) {\n let typeClass;\n let commitSymbolType =\n typeof commit.customType !== 'undefined' && commit.customType !== ''\n ? commit.customType\n : commit.type;\n switch (commitSymbolType) {\n case commitType.NORMAL:\n typeClass = 'commit-normal';\n break;\n case commitType.REVERSE:\n typeClass = 'commit-reverse';\n break;\n case commitType.HIGHLIGHT:\n typeClass = 'commit-highlight';\n break;\n case commitType.MERGE:\n typeClass = 'commit-merge';\n break;\n case commitType.CHERRY_PICK:\n typeClass = 'commit-cherry-pick';\n break;\n default:\n typeClass = 'commit-normal';\n }\n\n if (commitSymbolType === commitType.HIGHLIGHT) {\n const circle = gBullets.append('rect');\n circle.attr('x', x - 10);\n circle.attr('y', y - 10);\n circle.attr('height', 20);\n circle.attr('width', 20);\n circle.attr(\n 'class',\n `commit ${commit.id} commit-highlight${\n branchPos[commit.branch].index % THEME_COLOR_LIMIT\n } ${typeClass}-outer`\n );\n gBullets\n .append('rect')\n .attr('x', x - 6)\n .attr('y', y - 6)\n .attr('height', 12)\n .attr('width', 12)\n .attr(\n 'class',\n `commit ${commit.id} commit${\n branchPos[commit.branch].index % THEME_COLOR_LIMIT\n } ${typeClass}-inner`\n );\n } else if (commitSymbolType === commitType.CHERRY_PICK) {\n gBullets\n .append('circle')\n .attr('cx', x)\n .attr('cy', y)\n .attr('r', 10)\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('circle')\n .attr('cx', x - 3)\n .attr('cy', y + 2)\n .attr('r', 2.75)\n .attr('fill', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('circle')\n .attr('cx', x + 3)\n .attr('cy', y + 2)\n .attr('r', 2.75)\n .attr('fill', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('line')\n .attr('x1', x + 3)\n .attr('y1', y + 1)\n .attr('x2', x)\n .attr('y2', y - 5)\n .attr('stroke', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n gBullets\n .append('line')\n .attr('x1', x - 3)\n .attr('y1', y + 1)\n .attr('x2', x)\n .attr('y2', y - 5)\n .attr('stroke', '#fff')\n .attr('class', `commit ${commit.id} ${typeClass}`);\n } else {\n const circle = gBullets.append('circle');\n circle.attr('cx', x);\n circle.attr('cy', y);\n circle.attr('r', commit.type === commitType.MERGE ? 9 : 10);\n circle.attr(\n 'class',\n `commit ${commit.id} commit${branchPos[commit.branch].index % THEME_COLOR_LIMIT}`\n );\n if (commitSymbolType === commitType.MERGE) {\n const circle2 = gBullets.append('circle');\n circle2.attr('cx', x);\n circle2.attr('cy', y);\n circle2.attr('r', 6);\n circle2.attr(\n 'class',\n `commit ${typeClass} ${commit.id} commit${\n branchPos[commit.branch].index % THEME_COLOR_LIMIT\n }`\n );\n }\n if (commitSymbolType === commitType.REVERSE) {\n const cross = gBullets.append('path');\n cross\n .attr('d', `M ${x - 5},${y - 5}L${x + 5},${y + 5}M${x - 5},${y + 5}L${x + 5},${y - 5}`)\n .attr(\n 'class',\n `commit ${typeClass} ${commit.id} commit${\n branchPos[commit.branch].index % THEME_COLOR_LIMIT\n }`\n );\n }\n }\n }\n commitPos[commit.id] = { x: pos + 10, y: y };\n\n // The first iteration over the commits are for positioning purposes, this\n // is required for drawing the lines. The circles and labels is drawn after the labels\n // placing them on top of the lines.\n if (modifyGraph) {\n const px = 4;\n const py = 2;\n // Draw the commit label\n if (\n commit.type !== commitType.CHERRY_PICK &&\n ((commit.customId && commit.type === commitType.MERGE) ||\n commit.type !== commitType.MERGE) &&\n gitGraphConfig.showCommitLabel\n ) {\n const wrapper = gLabels.append('g');\n const labelBkg = wrapper.insert('rect').attr('class', 'commit-label-bkg');\n\n const text = wrapper\n .append('text')\n .attr('x', pos)\n .attr('y', y + 25)\n .attr('class', 'commit-label')\n .text(commit.id);\n let bbox = text.node().getBBox();\n\n // Now we have the label, lets position the background\n labelBkg\n .attr('x', pos + 10 - bbox.width / 2 - py)\n .attr('y', y + 13.5)\n .attr('width', bbox.width + 2 * py)\n .attr('height', bbox.height + 2 * py);\n text.attr('x', pos + 10 - bbox.width / 2);\n if (gitGraphConfig.rotateCommitLabel) {\n let r_x = -7.5 - ((bbox.width + 10) / 25) * 9.5;\n let r_y = 10 + (bbox.width / 25) * 8.5;\n wrapper.attr(\n 'transform',\n 'translate(' + r_x + ', ' + r_y + ') rotate(' + -45 + ', ' + pos + ', ' + y + ')'\n );\n }\n }\n if (commit.tag) {\n const rect = gLabels.insert('polygon');\n const hole = gLabels.append('circle');\n const tag = gLabels\n .append('text')\n // Note that we are delaying setting the x position until we know the width of the text\n .attr('y', y - 16)\n .attr('class', 'tag-label')\n .text(commit.tag);\n let tagBbox = tag.node().getBBox();\n tag.attr('x', pos + 10 - tagBbox.width / 2);\n\n const h2 = tagBbox.height / 2;\n const ly = y - 19.2;\n rect.attr('class', 'tag-label-bkg').attr(\n 'points',\n `\n ${pos - tagBbox.width / 2 - px / 2},${ly + py}\n ${pos - tagBbox.width / 2 - px / 2},${ly - py}\n ${pos + 10 - tagBbox.width / 2 - px},${ly - h2 - py}\n ${pos + 10 + tagBbox.width / 2 + px},${ly - h2 - py}\n ${pos + 10 + tagBbox.width / 2 + px},${ly + h2 + py}\n ${pos + 10 - tagBbox.width / 2 - px},${ly + h2 + py}`\n );\n\n hole\n .attr('cx', pos - tagBbox.width / 2 + px / 2)\n .attr('cy', ly)\n .attr('r', 1.5)\n .attr('class', 'tag-hole');\n }\n }\n pos += 50;\n if (pos > maxPos) {\n maxPos = pos;\n }\n });\n};\n\n/**\n * Detect if there are other commits between commit1's x-position and commit2's x-position on the\n * same branch as commit2.\n *\n * @param {any} commit1\n * @param {any} commit2\n * @param allCommits\n * @returns {boolean} If there are commits between commit1's x-position and commit2's x-position\n */\nconst hasOverlappingCommits = (commit1, commit2, allCommits) => {\n // Find commits on the same branch as commit2\n const keys = Object.keys(allCommits);\n const overlappingComits = keys.filter((key) => {\n return (\n allCommits[key].branch === commit2.branch &&\n allCommits[key].seq > commit1.seq &&\n allCommits[key].seq < commit2.seq\n );\n });\n\n return overlappingComits.length > 0;\n};\n\n/**\n * This function find a lane in the y-axis that is not overlapping with any other lanes. This is\n * used for drawing the lines between commits.\n *\n * @param {any} y1\n * @param {any} y2\n * @param {any} _depth\n * @returns {number} Y value between y1 and y2\n */\nconst findLane = (y1, y2, _depth) => {\n const depth = _depth || 0;\n\n const candidate = y1 + Math.abs(y1 - y2) / 2;\n if (depth > 5) {\n return candidate;\n }\n\n let ok = true;\n for (let i = 0; i < lanes.length; i++) {\n if (Math.abs(lanes[i] - candidate) < 10) {\n ok = false;\n }\n }\n if (ok) {\n lanes.push(candidate);\n return candidate;\n }\n const diff = Math.abs(y1 - y2);\n return findLane(y1, y2 - diff / 5, depth + 1);\n};\n\n/**\n * Draw the lines between the commits. They were arrows initially.\n *\n * @param {any} svg\n * @param {any} commit1\n * @param {any} commit2\n * @param {any} allCommits\n */\nconst drawArrow = (svg, commit1, commit2, allCommits) => {\n const p1 = commitPos[commit1.id];\n const p2 = commitPos[commit2.id];\n const overlappingCommits = hasOverlappingCommits(commit1, commit2, allCommits);\n // log.debug('drawArrow', p1, p2, overlappingCommits, commit1.id, commit2.id);\n\n let arc = '';\n let arc2 = '';\n let radius = 0;\n let offset = 0;\n let colorClassNum = branchPos[commit2.branch].index;\n let lineDef;\n if (overlappingCommits) {\n arc = 'A 10 10, 0, 0, 0,';\n arc2 = 'A 10 10, 0, 0, 1,';\n radius = 10;\n offset = 10;\n // Figure out the color of the arrow,arrows going down take the color from the destination branch\n colorClassNum = branchPos[commit2.branch].index;\n\n const lineY = p1.y < p2.y ? findLane(p1.y, p2.y) : findLane(p2.y, p1.y);\n\n if (p1.y < p2.y) {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY - radius} ${arc} ${p1.x + offset} ${lineY} L ${\n p2.x - radius\n } ${lineY} ${arc2} ${p2.x} ${lineY + offset} L ${p2.x} ${p2.y}`;\n } else {\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${lineY + radius} ${arc2} ${\n p1.x + offset\n } ${lineY} L ${p2.x - radius} ${lineY} ${arc} ${p2.x} ${lineY - offset} L ${p2.x} ${p2.y}`;\n }\n } else {\n if (p1.y < p2.y) {\n arc = 'A 20 20, 0, 0, 0,';\n radius = 20;\n offset = 20;\n\n // Figure out the color of the arrow,arrows going down take the color from the destination branch\n colorClassNum = branchPos[commit2.branch].index;\n\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${\n p2.x\n } ${p2.y}`;\n }\n if (p1.y > p2.y) {\n arc = 'A 20 20, 0, 0, 0,';\n radius = 20;\n offset = 20;\n\n // Arrows going up take the color from the source branch\n colorClassNum = branchPos[commit1.branch].index;\n lineDef = `M ${p1.x} ${p1.y} L ${p2.x - radius} ${p1.y} ${arc} ${p2.x} ${p1.y - offset} L ${\n p2.x\n } ${p2.y}`;\n }\n\n if (p1.y === p2.y) {\n colorClassNum = branchPos[commit1.branch].index;\n lineDef = `M ${p1.x} ${p1.y} L ${p1.x} ${p2.y - radius} ${arc} ${p1.x + offset} ${p2.y} L ${\n p2.x\n } ${p2.y}`;\n }\n }\n svg\n .append('path')\n .attr('d', lineDef)\n .attr('class', 'arrow arrow' + (colorClassNum % THEME_COLOR_LIMIT));\n};\n\nconst drawArrows = (svg, commits) => {\n const gArrows = svg.append('g').attr('class', 'commit-arrows');\n Object.keys(commits).forEach((key) => {\n const commit = commits[key];\n if (commit.parents && commit.parents.length > 0) {\n commit.parents.forEach((parent) => {\n drawArrow(gArrows, commits[parent], commit, commits);\n });\n }\n });\n};\n\n/**\n * Adds the branches and the branches' labels to the svg.\n *\n * @param svg\n * @param branches\n */\nconst drawBranches = (svg, branches) => {\n const gitGraphConfig = getConfig().gitGraph;\n const g = svg.append('g');\n branches.forEach((branch, index) => {\n const adjustIndexForTheme = index % THEME_COLOR_LIMIT;\n\n const pos = branchPos[branch.name].pos;\n const line = g.append('line');\n line.attr('x1', 0);\n line.attr('y1', pos);\n line.attr('x2', maxPos);\n line.attr('y2', pos);\n line.attr('class', 'branch branch' + adjustIndexForTheme);\n\n lanes.push(pos);\n\n let name = branch.name;\n\n // Create the actual text element\n const labelElement = drawText(name);\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const bkg = g.insert('rect');\n const branchLabel = g.insert('g').attr('class', 'branchLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = branchLabel.insert('g').attr('class', 'label branch-label' + adjustIndexForTheme);\n label.node().appendChild(labelElement);\n let bbox = labelElement.getBBox();\n bkg\n .attr('class', 'branchLabelBkg label' + adjustIndexForTheme)\n .attr('rx', 4)\n .attr('ry', 4)\n .attr('x', -bbox.width - 4 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0))\n .attr('y', -bbox.height / 2 + 8)\n .attr('width', bbox.width + 18)\n .attr('height', bbox.height + 4);\n\n label.attr(\n 'transform',\n 'translate(' +\n (-bbox.width - 14 - (gitGraphConfig.rotateCommitLabel === true ? 30 : 0)) +\n ', ' +\n (pos - bbox.height / 2 - 1) +\n ')'\n );\n bkg.attr('transform', 'translate(' + -19 + ', ' + (pos - bbox.height / 2) + ')');\n });\n};\n\n/**\n * @param txt\n * @param id\n * @param ver\n * @param diagObj\n */\nexport const draw = function (txt, id, ver, diagObj) {\n clear();\n const conf = getConfig();\n const gitGraphConfig = getConfig().gitGraph;\n // try {\n log.debug('in gitgraph renderer', txt + '\\n', 'id:', id, ver);\n\n allCommitsDict = diagObj.db.getCommits();\n const branches = diagObj.db.getBranchesAsObjArray();\n\n // Position branches vertically\n let pos = 0;\n branches.forEach((branch, index) => {\n branchPos[branch.name] = { pos, index };\n pos += 50 + (gitGraphConfig.rotateCommitLabel ? 40 : 0);\n });\n\n const diagram = select(`[id=\"${id}\"]`);\n\n // Adds title and description to the flow chart\n addSVGAccessibilityFields(diagObj.db, diagram, id);\n\n drawCommits(diagram, allCommitsDict, false);\n if (gitGraphConfig.showBranches) {\n drawBranches(diagram, branches);\n }\n drawArrows(diagram, allCommitsDict);\n drawCommits(diagram, allCommitsDict, true);\n\n // Setup the view box and size of the svg element\n setupGraphViewbox(undefined, diagram, gitGraphConfig.diagramPadding, conf.useMaxWidth);\n};\n\nexport default {\n draw,\n};\n","const getStyles = (options) =>\n `\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0, 1, 2, 3, 4, 5, 6, 7]\n .map(\n (i) =>\n `\n .branch-label${i} { fill: ${options['gitBranchLabel' + i]}; }\n .commit${i} { stroke: ${options['git' + i]}; fill: ${options['git' + i]}; }\n .commit-highlight${i} { stroke: ${options['gitInv' + i]}; fill: ${options['gitInv' + i]}; }\n .label${i} { fill: ${options['git' + i]}; }\n .arrow${i} { stroke: ${options['git' + i]}; }\n `\n )\n .join('\\n')}\n\n .branch {\n stroke-width: 1;\n stroke: ${options.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${options.commitLabelFontSize}; fill: ${options.commitLabelColor};}\n .commit-label-bkg { font-size: ${options.commitLabelFontSize}; fill: ${\n options.commitLabelBackground\n }; opacity: 0.5; }\n .tag-label { font-size: ${options.tagLabelFontSize}; fill: ${options.tagLabelColor};}\n .tag-label-bkg { fill: ${options.tagLabelBackground}; stroke: ${options.tagLabelBorder}; }\n .tag-hole { fill: ${options.textColor}; }\n\n .commit-merge {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n }\n .commit-reverse {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${options.primaryColor};\n fill: ${options.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n }\n`;\n\nexport default getStyles;\n","/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2022 mzhx.meng@gmail.com\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n\n/* context */\n%x person\n%x person_ext\n%x system\n%x system_db\n%x system_queue\n%x system_ext\n%x system_ext_db\n%x system_ext_queue\n%x boundary\n%x enterprise_boundary\n%x system_boundary\n%x rel\n%x birel\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n\n/* container */\n%x container\n%x container_db\n%x container_queue\n%x container_ext\n%x container_ext_db\n%x container_ext_queue\n%x container_boundary\n\n/* component */\n%x component\n%x component_db\n%x component_queue\n%x component_ext\n%x component_ext_db\n%x component_ext_queue\n\n/* Dynamic diagram */\n%x rel_index\n%x index\n\n/* Deployment diagram */\n%x node\n%x node_l\n%x node_r\n\n/* Relationship Types */\n%x rel\n%x rel_bi\n%x rel_u\n%x rel_d\n%x rel_l\n%x rel_r\n%x rel_b\n\n/* Custom tags/stereotypes */\n%x update_el_style\n%x update_rel_style\n%x update_layout_config\n\n%x attribute\n%x string\n%x string_kv\n%x string_kv_key\n%x string_kv_value\n\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n[\\}] { this.popState(); }\n[^\\}]* return \"acc_descr_multiline_value\";\n\n\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* c /* skip comments */\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"C4Context\" return 'C4_CONTEXT';\n\"C4Container\" return 'C4_CONTAINER';\n\"C4Component\" return 'C4_COMPONENT';\n\"C4Dynamic\" return 'C4_DYNAMIC';\n\"C4Deployment\" return 'C4_DEPLOYMENT';\n\n\"Person_Ext\" { this.begin(\"person_ext\"); return 'PERSON_EXT';}\n\"Person\" { this.begin(\"person\"); return 'PERSON';}\n\"SystemQueue_Ext\" { this.begin(\"system_ext_queue\"); return 'SYSTEM_EXT_QUEUE';}\n\"SystemDb_Ext\" { this.begin(\"system_ext_db\"); return 'SYSTEM_EXT_DB';}\n\"System_Ext\" { this.begin(\"system_ext\"); return 'SYSTEM_EXT';}\n\"SystemQueue\" { this.begin(\"system_queue\"); return 'SYSTEM_QUEUE';}\n\"SystemDb\" { this.begin(\"system_db\"); return 'SYSTEM_DB';}\n\"System\" { this.begin(\"system\"); return 'SYSTEM';}\n\n\"Boundary\" { this.begin(\"boundary\"); return 'BOUNDARY';}\n\"Enterprise_Boundary\" { this.begin(\"enterprise_boundary\"); return 'ENTERPRISE_BOUNDARY';}\n\"System_Boundary\" { this.begin(\"system_boundary\"); return 'SYSTEM_BOUNDARY';}\n\n\"ContainerQueue_Ext\" { this.begin(\"container_ext_queue\"); return 'CONTAINER_EXT_QUEUE';}\n\"ContainerDb_Ext\" { this.begin(\"container_ext_db\"); return 'CONTAINER_EXT_DB';}\n\"Container_Ext\" { this.begin(\"container_ext\"); return 'CONTAINER_EXT';}\n\"ContainerQueue\" { this.begin(\"container_queue\"); return 'CONTAINER_QUEUE';}\n\"ContainerDb\" { this.begin(\"container_db\"); return 'CONTAINER_DB';}\n\"Container\" { this.begin(\"container\"); return 'CONTAINER';}\n\n\"Container_Boundary\" { this.begin(\"container_boundary\"); return 'CONTAINER_BOUNDARY';}\n\n\"ComponentQueue_Ext\" { this.begin(\"component_ext_queue\"); return 'COMPONENT_EXT_QUEUE';}\n\"ComponentDb_Ext\" { this.begin(\"component_ext_db\"); return 'COMPONENT_EXT_DB';}\n\"Component_Ext\" { this.begin(\"component_ext\"); return 'COMPONENT_EXT';}\n\"ComponentQueue\" { this.begin(\"component_queue\"); return 'COMPONENT_QUEUE';}\n\"ComponentDb\" { this.begin(\"component_db\"); return 'COMPONENT_DB';}\n\"Component\" { this.begin(\"component\"); return 'COMPONENT';}\n\n\"Deployment_Node\" { this.begin(\"node\"); return 'NODE';}\n\"Node\" { this.begin(\"node\"); return 'NODE';}\n\"Node_L\" { this.begin(\"node_l\"); return 'NODE_L';}\n\"Node_R\" { this.begin(\"node_r\"); return 'NODE_R';}\n\n\n\"Rel\" { this.begin(\"rel\"); return 'REL';} \n\"BiRel\" { this.begin(\"birel\"); return 'BIREL';} \n\"Rel_Up\" { this.begin(\"rel_u\"); return 'REL_U';} \n\"Rel_U\" { this.begin(\"rel_u\"); return 'REL_U';} \n\"Rel_Down\" { this.begin(\"rel_d\"); return 'REL_D';} \n\"Rel_D\" { this.begin(\"rel_d\"); return 'REL_D';} \n\"Rel_Left\" { this.begin(\"rel_l\"); return 'REL_L';} \n\"Rel_L\" { this.begin(\"rel_l\"); return 'REL_L';} \n\"Rel_Right\" { this.begin(\"rel_r\"); return 'REL_R';} \n\"Rel_R\" { this.begin(\"rel_r\"); return 'REL_R';} \n\"Rel_Back\" { this.begin(\"rel_b\"); return 'REL_B';} \n\"RelIndex\" { this.begin(\"rel_index\"); return 'REL_INDEX';} \n\n\"UpdateElementStyle\" { this.begin(\"update_el_style\"); return 'UPDATE_EL_STYLE';} \n\"UpdateRelStyle\" { this.begin(\"update_rel_style\"); return 'UPDATE_REL_STYLE';} \n\"UpdateLayoutConfig\" { this.begin(\"update_layout_config\"); return 'UPDATE_LAYOUT_CONFIG';} \n\n<> return \"EOF_IN_STRUCT\";\n[(][ ]*[,] { this.begin(\"attribute\"); return \"ATTRIBUTE_EMPTY\";}\n[(] { this.begin(\"attribute\"); }\n[)] { this.popState();this.popState();}\n\n\",,\" { return 'ATTRIBUTE_EMPTY';}\n\",\" { }\n[ ]*[\"][\"] { return 'ATTRIBUTE_EMPTY';}\n[ ]*[\"] { this.begin(\"string\");}\n[\"] { this.popState(); }\n[^\"]* { return \"STR\";}\n\n[ ]*[\\$] { this.begin(\"string_kv\");}\n[^=]* { this.begin(\"string_kv_key\"); return \"STR_KEY\";}\n[=][ ]*[\"] { this.popState(); this.begin(\"string_kv_value\"); }\n[^\"]+ { return \"STR_VALUE\";}\n[\"] { this.popState(); this.popState(); }\n\n[^,]+ { return \"STR\";}\n\n'{' { /* this.begin(\"lbrace\"); */ return \"LBRACE\";}\n'}' { /* this.popState(); */ return \"RBRACE\";}\n \n[\\s]+ return 'SPACE';\n[\\n\\r]+ return 'EOL';\n<> return 'EOF';\n\n/lex\n\n/* operator associations and precedence */\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n : mermaidDoc\n | direction\n | directive start\n ;\n\ndirection\n : direction_tb\n { yy.setDirection('TB');}\n | direction_bt\n { yy.setDirection('BT');}\n | direction_rl\n { yy.setDirection('RL');}\n | direction_lr\n { yy.setDirection('LR');}\n ;\n\nmermaidDoc\n : graphConfig\n ;\n\ndirective\n : openDirective typeDirective closeDirective NEWLINE\n | openDirective typeDirective ':' argDirective closeDirective NEWLINE\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'c4Context'); }\n ;\n\ngraphConfig\n : C4_CONTEXT NEWLINE statements EOF {yy.setC4Type($1)}\n | C4_CONTAINER NEWLINE statements EOF {yy.setC4Type($1)}\n | C4_COMPONENT NEWLINE statements EOF {yy.setC4Type($1)}\n | C4_DYNAMIC NEWLINE statements EOF {yy.setC4Type($1)}\n | C4_DEPLOYMENT NEWLINE statements EOF {yy.setC4Type($1)}\n ;\n\nstatements\n : otherStatements\n | diagramStatements\n | otherStatements diagramStatements \n ;\n\notherStatements\n : otherStatement\n | otherStatement NEWLINE\n | otherStatement NEWLINE otherStatements\n ;\n\notherStatement\n : title {yy.setTitle($1.substring(6));$$=$1.substring(6);}\n | accDescription {yy.setAccDescription($1.substring(15));$$=$1.substring(15);} \n | acc_title acc_title_value { $$=$2.trim();yy.setTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } \n ;\n\nboundaryStatement\n : boundaryStartStatement diagramStatements boundaryStopStatement\n ;\n\nboundaryStartStatement\n : boundaryStart LBRACE NEWLINE\n | boundaryStart NEWLINE LBRACE\n | boundaryStart NEWLINE LBRACE NEWLINE\n ;\n\nboundaryStart\n : ENTERPRISE_BOUNDARY attributes {$2.splice(2, 0, 'ENTERPRISE'); yy.addPersonOrSystemBoundary(...$2); $$=$2;}\n | SYSTEM_BOUNDARY attributes {$2.splice(2, 0, 'ENTERPRISE'); yy.addPersonOrSystemBoundary(...$2); $$=$2;}\n | BOUNDARY attributes {yy.addPersonOrSystemBoundary(...$2); $$=$2;}\n | CONTAINER_BOUNDARY attributes {$2.splice(2, 0, 'CONTAINER'); yy.addContainerBoundary(...$2); $$=$2;}\n | NODE attributes {yy.addDeploymentNode('node', ...$2); $$=$2;}\n | NODE_L attributes {yy.addDeploymentNode('nodeL', ...$2); $$=$2;}\n | NODE_R attributes {yy.addDeploymentNode('nodeR', ...$2); $$=$2;}\n ;\n\nboundaryStopStatement\n : RBRACE { yy.popBoundaryParseStack() }\n ;\n\ndiagramStatements\n : diagramStatement\n | diagramStatement NEWLINE\n | diagramStatement NEWLINE statements \n ;\n\ndiagramStatement\n : PERSON attributes {yy.addPersonOrSystem('person', ...$2); $$=$2;}\n | PERSON_EXT attributes {yy.addPersonOrSystem('external_person', ...$2); $$=$2;}\n | SYSTEM attributes {yy.addPersonOrSystem('system', ...$2); $$=$2;}\n | SYSTEM_DB attributes {yy.addPersonOrSystem('system_db', ...$2); $$=$2;}\n | SYSTEM_QUEUE attributes {yy.addPersonOrSystem('system_queue', ...$2); $$=$2;}\n | SYSTEM_EXT attributes {yy.addPersonOrSystem('external_system', ...$2); $$=$2;}\n | SYSTEM_EXT_DB attributes {yy.addPersonOrSystem('external_system_db', ...$2); $$=$2;}\n | SYSTEM_EXT_QUEUE attributes {yy.addPersonOrSystem('external_system_queue', ...$2); $$=$2;} \n | CONTAINER attributes {yy.addContainer('container', ...$2); $$=$2;}\n | CONTAINER_DB attributes {yy.addContainer('container_db', ...$2); $$=$2;}\n | CONTAINER_QUEUE attributes {yy.addContainer('container_queue', ...$2); $$=$2;}\n | CONTAINER_EXT attributes {yy.addContainer('external_container', ...$2); $$=$2;}\n | CONTAINER_EXT_DB attributes {yy.addContainer('external_container_db', ...$2); $$=$2;}\n | CONTAINER_EXT_QUEUE attributes {yy.addContainer('external_container_queue', ...$2); $$=$2;} \n | COMPONENT attributes {yy.addComponent('component', ...$2); $$=$2;}\n | COMPONENT_DB attributes {yy.addComponent('component_db', ...$2); $$=$2;}\n | COMPONENT_QUEUE attributes {yy.addComponent('component_queue', ...$2); $$=$2;}\n | COMPONENT_EXT attributes {yy.addComponent('external_component', ...$2); $$=$2;}\n | COMPONENT_EXT_DB attributes {yy.addComponent('external_component_db', ...$2); $$=$2;}\n | COMPONENT_EXT_QUEUE attributes {yy.addComponent('external_component_queue', ...$2); $$=$2;} \n | boundaryStatement\n | REL attributes {yy.addRel('rel', ...$2); $$=$2;}\n | BIREL attributes {yy.addRel('birel', ...$2); $$=$2;}\n | REL_U attributes {yy.addRel('rel_u', ...$2); $$=$2;}\n | REL_D attributes {yy.addRel('rel_d', ...$2); $$=$2;}\n | REL_L attributes {yy.addRel('rel_l', ...$2); $$=$2;}\n | REL_R attributes {yy.addRel('rel_r', ...$2); $$=$2;}\n | REL_B attributes {yy.addRel('rel_b', ...$2); $$=$2;}\n | REL_INDEX attributes {$2.splice(0, 1); yy.addRel('rel', ...$2); $$=$2;}\n | UPDATE_EL_STYLE attributes {yy.updateElStyle('update_el_style', ...$2); $$=$2;}\n | UPDATE_REL_STYLE attributes {yy.updateRelStyle('update_rel_style', ...$2); $$=$2;}\n | UPDATE_LAYOUT_CONFIG attributes {yy.updateLayoutConfig('update_layout_config', ...$2); $$=$2;}\n ;\n\nattributes\n : attribute { $$ = [$1]; }\n | attribute attributes { $2.unshift($1); $$=$2;}\n ;\n\nattribute\n : STR { $$ = $1.trim(); }\n | STR_KEY STR_VALUE { let kv={}; kv[$1.trim()]=$2.trim(); $$=kv; }\n | ATTRIBUTE { $$ = $1.trim(); }\n | ATTRIBUTE_EMPTY { $$ = \"\"; }\n ;\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const c4Detector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/) !== null;\n};\n","import mermaidAPI from '../../mermaidAPI';\nimport * as configApi from '../../config';\nimport { sanitizeText } from '../common/common';\nimport { setAccTitle, getAccTitle, getAccDescription, setAccDescription } from '../../commonDb';\n\nlet c4ShapeArray = [];\nlet boundaryParseStack = [''];\nlet currentBoundaryParse = 'global';\nlet parentBoundaryParse = '';\nlet boundarys = [\n {\n alias: 'global',\n label: { text: 'global' },\n type: { text: 'global' },\n tags: null,\n link: null,\n parentBoundary: '',\n },\n];\nlet rels = [];\nlet title = '';\nlet wrapEnabled = false;\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\nvar c4Type;\n\nexport const getC4Type = function () {\n return c4Type;\n};\n\nexport const setC4Type = function (c4TypeParam) {\n let sanitizedText = sanitizeText(c4TypeParam, configApi.getConfig());\n c4Type = sanitizedText;\n};\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\n//type, from, to, label, ?techn, ?descr, ?sprite, ?tags, $link\nexport const addRel = function (type, from, to, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (\n type === undefined ||\n type === null ||\n from === undefined ||\n from === null ||\n to === undefined ||\n to === null ||\n label === undefined ||\n label === null\n )\n return;\n\n let rel = {};\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old) {\n rel = old;\n } else {\n rels.push(rel);\n }\n\n rel.type = type;\n rel.from = from;\n rel.to = to;\n rel.label = { text: label };\n\n if (techn === undefined || techn === null) {\n rel.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n rel[key] = { text: value };\n } else {\n rel.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n rel.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n rel[key] = { text: value };\n } else {\n rel.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n rel[key] = value;\n } else {\n rel.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n rel[key] = value;\n } else {\n rel.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n rel[key] = value;\n } else {\n rel.link = link;\n }\n rel.wrap = autoWrap();\n};\n\n//type, alias, label, ?descr, ?sprite, ?tags, $link\nexport const addPersonOrSystem = function (typeC4Shape, alias, label, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) return;\n\n let personOrSystem = {};\n const old = c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n if (old && alias === old.alias) {\n personOrSystem = old;\n } else {\n personOrSystem.alias = alias;\n c4ShapeArray.push(personOrSystem);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n personOrSystem.label = { text: '' };\n } else {\n personOrSystem.label = { text: label };\n }\n\n if (descr === undefined || descr === null) {\n personOrSystem.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n personOrSystem[key] = { text: value };\n } else {\n personOrSystem.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n personOrSystem[key] = value;\n } else {\n personOrSystem.link = link;\n }\n personOrSystem.typeC4Shape = { text: typeC4Shape };\n personOrSystem.parentBoundary = currentBoundaryParse;\n personOrSystem.wrap = autoWrap();\n};\n\n//type, alias, label, ?techn, ?descr ?sprite, ?tags, $link\nexport const addContainer = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) return;\n\n let container = {};\n const old = c4ShapeArray.find((container) => container.alias === alias);\n if (old && alias === old.alias) {\n container = old;\n } else {\n container.alias = alias;\n c4ShapeArray.push(container);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n container.label = { text: '' };\n } else {\n container.label = { text: label };\n }\n\n if (techn === undefined || techn === null) {\n container.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n container[key] = { text: value };\n } else {\n container.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n container.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n container[key] = { text: value };\n } else {\n container.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n container[key] = value;\n } else {\n container.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n container[key] = value;\n } else {\n container.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n container[key] = value;\n } else {\n container.link = link;\n }\n container.wrap = autoWrap();\n container.typeC4Shape = { text: typeC4Shape };\n container.parentBoundary = currentBoundaryParse;\n};\n\n//type, alias, label, ?techn, ?descr ?sprite, ?tags, $link\nexport const addComponent = function (typeC4Shape, alias, label, techn, descr, sprite, tags, link) {\n // Don't allow label nulling\n if (alias === null || label === null) return;\n\n let component = {};\n const old = c4ShapeArray.find((component) => component.alias === alias);\n if (old && alias === old.alias) {\n component = old;\n } else {\n component.alias = alias;\n c4ShapeArray.push(component);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n component.label = { text: '' };\n } else {\n component.label = { text: label };\n }\n\n if (techn === undefined || techn === null) {\n component.techn = { text: '' };\n } else {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n component[key] = { text: value };\n } else {\n component.techn = { text: techn };\n }\n }\n\n if (descr === undefined || descr === null) {\n component.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n component[key] = { text: value };\n } else {\n component.descr = { text: descr };\n }\n }\n\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n component[key] = value;\n } else {\n component.sprite = sprite;\n }\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n component[key] = value;\n } else {\n component.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n component[key] = value;\n } else {\n component.link = link;\n }\n component.wrap = autoWrap();\n component.typeC4Shape = { text: typeC4Shape };\n component.parentBoundary = currentBoundaryParse;\n};\n\n//alias, label, ?type, ?tags, $link\nexport const addPersonOrSystemBoundary = function (alias, label, type, tags, link) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) return;\n\n let boundary = {};\n const old = boundarys.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'system' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//alias, label, ?type, ?tags, $link\nexport const addContainerBoundary = function (alias, label, type, tags, link) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) return;\n\n let boundary = {};\n const old = boundarys.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'container' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//alias, label, ?type, ?descr, ?sprite, ?tags, $link\nexport const addDeploymentNode = function (\n nodeType,\n alias,\n label,\n type,\n descr,\n sprite,\n tags,\n link\n) {\n // if (parentBoundary === null) return;\n\n // Don't allow label nulling\n if (alias === null || label === null) return;\n\n let boundary = {};\n const old = boundarys.find((boundary) => boundary.alias === alias);\n if (old && alias === old.alias) {\n boundary = old;\n } else {\n boundary.alias = alias;\n boundarys.push(boundary);\n }\n\n // Don't allow null labels, either\n if (label === undefined || label === null) {\n boundary.label = { text: '' };\n } else {\n boundary.label = { text: label };\n }\n\n if (type === undefined || type === null) {\n boundary.type = { text: 'node' };\n } else {\n if (typeof type === 'object') {\n let [key, value] = Object.entries(type)[0];\n boundary[key] = { text: value };\n } else {\n boundary.type = { text: type };\n }\n }\n\n if (descr === undefined || descr === null) {\n boundary.descr = { text: '' };\n } else {\n if (typeof descr === 'object') {\n let [key, value] = Object.entries(descr)[0];\n boundary[key] = { text: value };\n } else {\n boundary.descr = { text: descr };\n }\n }\n\n if (typeof tags === 'object') {\n let [key, value] = Object.entries(tags)[0];\n boundary[key] = value;\n } else {\n boundary.tags = tags;\n }\n if (typeof link === 'object') {\n let [key, value] = Object.entries(link)[0];\n boundary[key] = value;\n } else {\n boundary.link = link;\n }\n boundary.nodeType = nodeType;\n boundary.parentBoundary = currentBoundaryParse;\n boundary.wrap = autoWrap();\n\n parentBoundaryParse = currentBoundaryParse;\n currentBoundaryParse = alias;\n boundaryParseStack.push(parentBoundaryParse);\n};\n\nexport const popBoundaryParseStack = function () {\n currentBoundaryParse = parentBoundaryParse;\n boundaryParseStack.pop();\n parentBoundaryParse = boundaryParseStack.pop();\n boundaryParseStack.push(parentBoundaryParse);\n};\n\n//elementName, ?bgColor, ?fontColor, ?borderColor, ?shadowing, ?shape, ?sprite, ?techn, ?legendText, ?legendSprite\nexport const updateElStyle = function (\n typeC4Shape,\n elementName,\n bgColor,\n fontColor,\n borderColor,\n shadowing,\n shape,\n sprite,\n techn,\n legendText,\n legendSprite\n) {\n let old = c4ShapeArray.find((element) => element.alias === elementName);\n if (old === undefined) {\n old = boundarys.find((element) => element.alias === elementName);\n if (old === undefined) {\n return;\n }\n }\n if (bgColor !== undefined && bgColor !== null) {\n if (typeof bgColor === 'object') {\n let [key, value] = Object.entries(bgColor)[0];\n old[key] = value;\n } else {\n old.bgColor = bgColor;\n }\n }\n if (fontColor !== undefined && fontColor !== null) {\n if (typeof fontColor === 'object') {\n let [key, value] = Object.entries(fontColor)[0];\n old[key] = value;\n } else {\n old.fontColor = fontColor;\n }\n }\n if (borderColor !== undefined && borderColor !== null) {\n if (typeof borderColor === 'object') {\n let [key, value] = Object.entries(borderColor)[0];\n old[key] = value;\n } else {\n old.borderColor = borderColor;\n }\n }\n if (shadowing !== undefined && shadowing !== null) {\n if (typeof shadowing === 'object') {\n let [key, value] = Object.entries(shadowing)[0];\n old[key] = value;\n } else {\n old.shadowing = shadowing;\n }\n }\n if (shape !== undefined && shape !== null) {\n if (typeof shape === 'object') {\n let [key, value] = Object.entries(shape)[0];\n old[key] = value;\n } else {\n old.shape = shape;\n }\n }\n if (sprite !== undefined && sprite !== null) {\n if (typeof sprite === 'object') {\n let [key, value] = Object.entries(sprite)[0];\n old[key] = value;\n } else {\n old.sprite = sprite;\n }\n }\n if (techn !== undefined && techn !== null) {\n if (typeof techn === 'object') {\n let [key, value] = Object.entries(techn)[0];\n old[key] = value;\n } else {\n old.techn = techn;\n }\n }\n if (legendText !== undefined && legendText !== null) {\n if (typeof legendText === 'object') {\n let [key, value] = Object.entries(legendText)[0];\n old[key] = value;\n } else {\n old.legendText = legendText;\n }\n }\n if (legendSprite !== undefined && legendSprite !== null) {\n if (typeof legendSprite === 'object') {\n let [key, value] = Object.entries(legendSprite)[0];\n old[key] = value;\n } else {\n old.legendSprite = legendSprite;\n }\n }\n};\n\n//textColor, lineColor, ?offsetX, ?offsetY\nexport const updateRelStyle = function (\n typeC4Shape,\n from,\n to,\n textColor,\n lineColor,\n offsetX,\n offsetY\n) {\n const old = rels.find((rel) => rel.from === from && rel.to === to);\n if (old === undefined) {\n return;\n }\n if (textColor !== undefined && textColor !== null) {\n if (typeof textColor === 'object') {\n let [key, value] = Object.entries(textColor)[0];\n old[key] = value;\n } else {\n old.textColor = textColor;\n }\n }\n if (lineColor !== undefined && lineColor !== null) {\n if (typeof lineColor === 'object') {\n let [key, value] = Object.entries(lineColor)[0];\n old[key] = value;\n } else {\n old.lineColor = lineColor;\n }\n }\n if (offsetX !== undefined && offsetX !== null) {\n if (typeof offsetX === 'object') {\n let [key, value] = Object.entries(offsetX)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetX = parseInt(offsetX);\n }\n }\n if (offsetY !== undefined && offsetY !== null) {\n if (typeof offsetY === 'object') {\n let [key, value] = Object.entries(offsetY)[0];\n old[key] = parseInt(value);\n } else {\n old.offsetY = parseInt(offsetY);\n }\n }\n};\n\n//?c4ShapeInRow, ?c4BoundaryInRow\nexport const updateLayoutConfig = function (typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {\n let c4ShapeInRowValue = c4ShapeInRow;\n let c4BoundaryInRowValue = c4BoundaryInRow;\n\n if (typeof c4ShapeInRowParam === 'object') {\n const value = Object.values(c4ShapeInRowParam)[0];\n c4ShapeInRowValue = parseInt(value);\n } else {\n c4ShapeInRowValue = parseInt(c4ShapeInRowParam);\n }\n if (typeof c4BoundaryInRowParam === 'object') {\n const value = Object.values(c4BoundaryInRowParam)[0];\n c4BoundaryInRowValue = parseInt(value);\n } else {\n c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);\n }\n\n if (c4ShapeInRowValue >= 1) c4ShapeInRow = c4ShapeInRowValue;\n if (c4BoundaryInRowValue >= 1) c4BoundaryInRow = c4BoundaryInRowValue;\n};\n\nexport const getC4ShapeInRow = function () {\n return c4ShapeInRow;\n};\nexport const getC4BoundaryInRow = function () {\n return c4BoundaryInRow;\n};\nexport const getCurrentBoundaryParse = function () {\n return currentBoundaryParse;\n};\n\nexport const getParentBoundaryParse = function () {\n return parentBoundaryParse;\n};\n\nexport const getC4ShapeArray = function (parentBoundary) {\n if (parentBoundary === undefined || parentBoundary === null) return c4ShapeArray;\n else\n return c4ShapeArray.filter((personOrSystem) => {\n return personOrSystem.parentBoundary === parentBoundary;\n });\n};\nexport const getC4Shape = function (alias) {\n return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);\n};\nexport const getC4ShapeKeys = function (parentBoundary) {\n return Object.keys(getC4ShapeArray(parentBoundary));\n};\n\nexport const getBoundarys = function (parentBoundary) {\n if (parentBoundary === undefined || parentBoundary === null) return boundarys;\n else return boundarys.filter((boundary) => boundary.parentBoundary === parentBoundary);\n};\n\nexport const getRels = function () {\n return rels;\n};\n\nexport const getTitle = function () {\n return title;\n};\n\nexport const setWrap = function (wrapSetting) {\n wrapEnabled = wrapSetting;\n};\n\nexport const autoWrap = function () {\n return wrapEnabled;\n};\n\nexport const clear = function () {\n c4ShapeArray = [];\n boundarys = [\n {\n alias: 'global',\n label: { text: 'global' },\n type: { text: 'global' },\n tags: null,\n link: null,\n parentBoundary: '',\n },\n ];\n parentBoundaryParse = '';\n currentBoundaryParse = 'global';\n boundaryParseStack = [''];\n rels = [];\n\n boundaryParseStack = [''];\n title = '';\n wrapEnabled = false;\n c4ShapeInRow = 4;\n c4BoundaryInRow = 2;\n};\n\nexport const LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25,\n};\n\nexport const ARROWTYPE = {\n FILLED: 0,\n OPEN: 1,\n};\n\nexport const PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2,\n};\n\nexport const setTitle = function (txt) {\n let sanitizedText = sanitizeText(txt, configApi.getConfig());\n title = sanitizedText;\n};\n\nexport default {\n addPersonOrSystem,\n addPersonOrSystemBoundary,\n addContainer,\n addContainerBoundary,\n addComponent,\n addDeploymentNode,\n popBoundaryParseStack,\n addRel,\n updateElStyle,\n updateRelStyle,\n updateLayoutConfig,\n autoWrap,\n setWrap,\n getC4ShapeArray,\n getC4Shape,\n getC4ShapeKeys,\n getBoundarys,\n getCurrentBoundaryParse,\n getParentBoundaryParse,\n getRels,\n getTitle,\n getC4Type,\n getC4ShapeInRow,\n getC4BoundaryInRow,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n parseDirective,\n getConfig: () => configApi.getConfig().c4,\n clear,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n setTitle,\n setC4Type,\n // apply,\n};\n","import common from '../common/common';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n\nexport const drawRect = function (elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (rectData.attrs !== 'undefined' && rectData.attrs !== null) {\n for (let attrKey in rectData.attrs) rectElem.attr(attrKey, rectData.attrs[attrKey]);\n }\n\n if (rectData.class !== 'undefined') {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\nexport const drawImage = function (elem, width, height, x, y, link) {\n const imageElem = elem.append('image');\n imageElem.attr('width', width);\n imageElem.attr('height', height);\n imageElem.attr('x', x);\n imageElem.attr('y', y);\n let sanitizedLink = link.startsWith('data:image/png;base64') ? link : sanitizeUrl(link);\n imageElem.attr('xlink:href', sanitizedLink);\n};\n\nexport const drawEmbeddedImage = function (elem, x, y, link) {\n const imageElem = elem.append('use');\n imageElem.attr('x', x);\n imageElem.attr('y', y);\n var sanitizedLink = sanitizeUrl(link);\n imageElem.attr('xlink:href', '#' + sanitizedLink);\n};\n\nexport const drawText = function (elem, textData) {\n let prevTextHeight = 0,\n textHeight = 0;\n const lines = textData.text.split(common.lineBreakRegex);\n\n let textElems = [];\n let dy = 0;\n let yfunc = () => textData.y;\n if (\n typeof textData.valign !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin > 0\n ) {\n switch (textData.valign) {\n case 'top':\n case 'start':\n yfunc = () => Math.round(textData.y + textData.textMargin);\n break;\n case 'middle':\n case 'center':\n yfunc = () =>\n Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);\n break;\n case 'bottom':\n case 'end':\n yfunc = () =>\n Math.round(\n textData.y +\n (prevTextHeight + textHeight + 2 * textData.textMargin) -\n textData.textMargin\n );\n break;\n }\n }\n if (\n typeof textData.anchor !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n typeof textData.width !== 'undefined'\n ) {\n switch (textData.anchor) {\n case 'left':\n case 'start':\n textData.x = Math.round(textData.x + textData.textMargin);\n textData.anchor = 'start';\n textData.dominantBaseline = 'text-after-edge';\n textData.alignmentBaseline = 'middle';\n break;\n case 'middle':\n case 'center':\n textData.x = Math.round(textData.x + textData.width / 2);\n textData.anchor = 'middle';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n case 'right':\n case 'end':\n textData.x = Math.round(textData.x + textData.width - textData.textMargin);\n textData.anchor = 'end';\n textData.dominantBaseline = 'text-before-edge';\n textData.alignmentBaseline = 'middle';\n break;\n }\n }\n for (let i = 0; i < lines.length; i++) {\n let line = lines[i];\n if (\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin === 0 &&\n typeof textData.fontSize !== 'undefined'\n ) {\n dy = i * textData.fontSize;\n }\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', yfunc());\n if (typeof textData.anchor !== 'undefined') {\n textElem\n .attr('text-anchor', textData.anchor)\n .attr('dominant-baseline', textData.dominantBaseline)\n .attr('alignment-baseline', textData.alignmentBaseline);\n }\n if (typeof textData.fontFamily !== 'undefined') {\n textElem.style('font-family', textData.fontFamily);\n }\n if (typeof textData.fontSize !== 'undefined') {\n textElem.style('font-size', textData.fontSize);\n }\n if (typeof textData.fontWeight !== 'undefined') {\n textElem.style('font-weight', textData.fontWeight);\n }\n if (typeof textData.fill !== 'undefined') {\n textElem.attr('fill', textData.fill);\n }\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n if (typeof textData.dy !== 'undefined') {\n textElem.attr('dy', textData.dy);\n } else if (dy !== 0) {\n textElem.attr('dy', dy);\n }\n\n if (textData.tspan) {\n const span = textElem.append('tspan');\n span.attr('x', textData.x);\n if (typeof textData.fill !== 'undefined') {\n span.attr('fill', textData.fill);\n }\n span.text(line);\n } else {\n textElem.text(line);\n }\n if (\n typeof textData.valign !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin > 0\n ) {\n textHeight += (textElem._groups || textElem)[0][0].getBBox().height;\n prevTextHeight = textHeight;\n }\n\n textElems.push(textElem);\n }\n\n return textElems;\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n * @returns {any}\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.height / 2;\n\n drawText(elem, txtObject);\n return polygon;\n};\n\nexport const drawRels = (elem, rels, conf) => {\n const relsElem = elem.append('g');\n let i = 0;\n for (let rel of rels) {\n let textColor = rel.textColor ? rel.textColor : '#444444';\n let strokeColor = rel.lineColor ? rel.lineColor : '#444444';\n let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;\n let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;\n\n let url = '';\n if (i === 0) {\n let line = relsElem.append('line');\n line.attr('x1', rel.startPoint.x);\n line.attr('y1', rel.startPoint.y);\n line.attr('x2', rel.endPoint.x);\n line.attr('y2', rel.endPoint.y);\n\n line.attr('stroke-width', '1');\n line.attr('stroke', strokeColor);\n line.style('fill', 'none');\n if (rel.type !== 'rel_b') line.attr('marker-end', 'url(' + url + '#arrowhead)');\n if (rel.type === 'birel' || rel.type === 'rel_b')\n line.attr('marker-start', 'url(' + url + '#arrowend)');\n i = -1;\n } else {\n let line = relsElem.append('path');\n line\n .attr('fill', 'none')\n .attr('stroke-width', '1')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,starty Qcontrolx,controly stopx,stopy '\n .replaceAll('startx', rel.startPoint.x)\n .replaceAll('starty', rel.startPoint.y)\n .replaceAll(\n 'controlx',\n rel.startPoint.x +\n (rel.endPoint.x - rel.startPoint.x) / 2 -\n (rel.endPoint.x - rel.startPoint.x) / 4\n )\n .replaceAll('controly', rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2)\n .replaceAll('stopx', rel.endPoint.x)\n .replaceAll('stopy', rel.endPoint.y)\n );\n if (rel.type !== 'rel_b') line.attr('marker-end', 'url(' + url + '#arrowhead)');\n if (rel.type === 'birel' || rel.type === 'rel_b')\n line.attr('marker-start', 'url(' + url + '#arrowend)');\n }\n\n let messageConf = conf.messageFont();\n _drawTextCandidateFunc(conf)(\n rel.label.text,\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) +\n Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 +\n offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) +\n Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 +\n offsetY,\n rel.label.width,\n rel.label.height,\n { fill: textColor },\n messageConf\n );\n\n if (rel.techn && rel.techn.text !== '') {\n messageConf = conf.messageFont();\n _drawTextCandidateFunc(conf)(\n '[' + rel.techn.text + ']',\n relsElem,\n Math.min(rel.startPoint.x, rel.endPoint.x) +\n Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 +\n offsetX,\n Math.min(rel.startPoint.y, rel.endPoint.y) +\n Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 +\n conf.messageFontSize +\n 5 +\n offsetY,\n Math.max(rel.label.width, rel.techn.width),\n rel.techn.height,\n { fill: textColor, 'font-style': 'italic' },\n messageConf\n );\n }\n }\n};\n\n/**\n * Draws an boundary in the diagram\n *\n * @param {any} elem - The diagram we'll draw to.\n * @param {any} boundary - The boundary to draw.\n * @param {any} conf - DrawText implementation discriminator object\n */\nconst drawBoundary = function (elem, boundary, conf) {\n const boundaryElem = elem.append('g');\n\n let fillColor = boundary.bgColor ? boundary.bgColor : 'none';\n let strokeColor = boundary.borderColor ? boundary.borderColor : '#444444';\n let fontColor = boundary.fontColor ? boundary.fontColor : 'black';\n\n let attrsValue = { 'stroke-width': 1.0, 'stroke-dasharray': '7.0,7.0' };\n if (boundary.nodeType) attrsValue = { 'stroke-width': 1.0 };\n let rectData = {\n x: boundary.x,\n y: boundary.y,\n fill: fillColor,\n stroke: strokeColor,\n width: boundary.width,\n height: boundary.height,\n rx: 2.5,\n ry: 2.5,\n attrs: attrsValue,\n };\n\n drawRect(boundaryElem, rectData);\n\n // draw label\n let boundaryConf = conf.boundaryFont();\n boundaryConf.fontWeight = 'bold';\n boundaryConf.fontSize = boundaryConf.fontSize + 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.label.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.label.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n\n // draw type\n if (boundary.type && boundary.type.text !== '') {\n boundaryConf = conf.boundaryFont();\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.type.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.type.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n }\n\n // draw descr\n if (boundary.descr && boundary.descr.text !== '') {\n boundaryConf = conf.boundaryFont();\n boundaryConf.fontSize = boundaryConf.fontSize - 2;\n boundaryConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n boundary.descr.text,\n boundaryElem,\n boundary.x,\n boundary.y + boundary.descr.Y,\n boundary.width,\n boundary.height,\n { fill: '#444444' },\n boundaryConf\n );\n }\n};\n\nexport const drawC4Shape = function (elem, c4Shape, conf) {\n let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf[c4Shape.typeC4Shape.text + '_bg_color'];\n let strokeColor = c4Shape.borderColor\n ? c4Shape.borderColor\n : conf[c4Shape.typeC4Shape.text + '_border_color'];\n let fontColor = c4Shape.fontColor ? c4Shape.fontColor : '#FFFFFF';\n\n let personImg =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=';\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n personImg =\n 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7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Q1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=';\n break;\n }\n\n const c4ShapeElem = elem.append('g');\n c4ShapeElem.attr('class', 'person-man');\n\n // \n // draw rect of c4Shape\n const rect = getNoteRect();\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n case 'system':\n case 'external_system':\n case 'container':\n case 'external_container':\n case 'component':\n case 'external_component':\n rect.x = c4Shape.x;\n rect.y = c4Shape.y;\n rect.fill = fillColor;\n rect.width = c4Shape.width;\n rect.height = c4Shape.height;\n rect.style = 'stroke:' + strokeColor + ';stroke-width:0.5;';\n rect.rx = 2.5;\n rect.ry = 2.5;\n drawRect(c4ShapeElem, rect);\n break;\n case 'system_db':\n case 'external_system_db':\n case 'container_db':\n case 'external_container_db':\n case 'component_db':\n case 'external_component_db':\n c4ShapeElem\n .append('path')\n .attr('fill', fillColor)\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.width / 2)\n .replaceAll('height', c4Shape.height)\n );\n c4ShapeElem\n .append('path')\n .attr('fill', 'none')\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.width / 2)\n );\n break;\n case 'system_queue':\n case 'external_system_queue':\n case 'container_queue':\n case 'external_container_queue':\n case 'component_queue':\n case 'external_component_queue':\n c4ShapeElem\n .append('path')\n .attr('fill', fillColor)\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n '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'\n .replaceAll('startx', c4Shape.x)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('width', c4Shape.width)\n .replaceAll('half', c4Shape.height / 2)\n );\n c4ShapeElem\n .append('path')\n .attr('fill', 'none')\n .attr('stroke-width', '0.5')\n .attr('stroke', strokeColor)\n .attr(\n 'd',\n 'Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half'\n .replaceAll('startx', c4Shape.x + c4Shape.width)\n .replaceAll('starty', c4Shape.y)\n .replaceAll('half', c4Shape.height / 2)\n );\n break;\n }\n\n // draw type of c4Shape\n let c4ShapeFontConf = getC4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeElem\n .append('text')\n .attr('fill', fontColor)\n .attr('font-family', c4ShapeFontConf.fontFamily)\n .attr('font-size', c4ShapeFontConf.fontSize - 2)\n .attr('font-style', 'italic')\n .attr('lengthAdjust', 'spacing')\n .attr('textLength', c4Shape.typeC4Shape.width)\n .attr('x', c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2)\n .attr('y', c4Shape.y + c4Shape.typeC4Shape.Y)\n .text('<<' + c4Shape.typeC4Shape.text + '>>');\n\n // draw image/sprite\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n drawImage(\n c4ShapeElem,\n 48,\n 48,\n c4Shape.x + c4Shape.width / 2 - 24,\n c4Shape.y + c4Shape.image.Y,\n personImg\n );\n break;\n }\n\n // draw label\n let textFontConf = conf[c4Shape.typeC4Shape.text + 'Font']();\n textFontConf.fontWeight = 'bold';\n textFontConf.fontSize = textFontConf.fontSize + 2;\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n c4Shape.label.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.label.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n\n // draw techn/type\n textFontConf = conf[c4Shape.typeC4Shape.text + 'Font']();\n textFontConf.fontColor = fontColor;\n\n if (c4Shape.thchn && c4Shape.thchn.text !== '') {\n _drawTextCandidateFunc(conf)(\n c4Shape.thchn.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.thchn.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, 'font-style': 'italic' },\n textFontConf\n );\n } else if (c4Shape.type && c4Shape.type.text !== '') {\n _drawTextCandidateFunc(conf)(\n c4Shape.type.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.type.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor, 'font-style': 'italic' },\n textFontConf\n );\n }\n\n // draw descr\n if (c4Shape.descr && c4Shape.descr.text !== '') {\n textFontConf = conf.personFont();\n textFontConf.fontColor = fontColor;\n _drawTextCandidateFunc(conf)(\n c4Shape.descr.text,\n c4ShapeElem,\n c4Shape.x,\n c4Shape.y + c4Shape.descr.Y,\n c4Shape.width,\n c4Shape.height,\n { fill: fontColor },\n textFontConf\n );\n }\n\n return c4Shape.height;\n};\n\nexport const insertDatabaseIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'database')\n .attr('fill-rule', 'evenodd')\n .attr('clip-rule', 'evenodd')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n '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'\n );\n};\n\nexport const insertComputerIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'computer')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n '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'\n );\n};\n\nexport const insertClockIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'clock')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n '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'\n );\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param elem\n */\nexport const insertArrowHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n};\nexport const insertArrowEnd = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowend')\n .attr('refX', 1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 10 0 L 0 5 L 10 10 z'); // this is actual shape for arrowhead\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowFilledHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'filled-head')\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n/**\n * Setup node number. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertDynamicNumber = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'sequencenumber')\n .attr('refX', 15)\n .attr('refY', 15)\n .attr('markerWidth', 60)\n .attr('markerHeight', 40)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', 15)\n .attr('cy', 15)\n .attr('r', 6);\n // .style(\"fill\", '#f00');\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowCrossHead = function (elem) {\n const defs = elem.append('defs');\n const marker = defs\n .append('marker')\n .attr('id', 'crosshead')\n .attr('markerWidth', 15)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .attr('refX', 16)\n .attr('refY', 4);\n\n // The arrow\n marker\n .append('path')\n .attr('fill', 'black')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 9,2 V 6 L16,4 Z');\n\n // The cross\n marker\n .append('path')\n .attr('fill', 'none')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7');\n // this is actual shape for arrowhead\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: undefined,\n style: '#666',\n width: undefined,\n height: undefined,\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true,\n valign: undefined,\n };\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n fill: '#EDF2AE',\n stroke: '#666',\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst getC4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + 'FontFamily'],\n fontSize: cnf[typeC4Shape + 'FontSize'],\n fontWeight: cnf[typeC4Shape + 'FontWeight'],\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { fontSize, fontFamily, fontWeight } = conf;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * fontSize - (fontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .style('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .style('font-size', fontSize)\n .style('font-weight', fontWeight)\n .style('font-family', fontFamily);\n text\n .append('tspan')\n // .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i])\n // .attr('y', y + height / 2)\n .attr('alignment-baseline', 'mathematical');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nexport default {\n drawRect,\n drawText,\n drawLabel,\n drawBoundary,\n drawC4Shape,\n drawRels,\n drawImage,\n drawEmbeddedImage,\n insertArrowHead,\n insertArrowEnd,\n insertArrowFilledHead,\n insertDynamicNumber,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon,\n getTextObj,\n getNoteRect,\n sanitizeUrl,\n};\n","import { select } from 'd3';\nimport svgDraw from './svgDraw';\nimport { log } from '../../logger';\nimport { parser } from './parser/c4Diagram';\nimport common from '../common/common';\nimport c4Db from './c4Db';\nimport * as configApi from '../../config';\nimport assignWithDepth from '../../assignWithDepth';\nimport { wrapLabel, calculateTextWidth, calculateTextHeight } from '../../utils';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nlet globalBoundaryMaxX = 0,\n globalBoundaryMaxY = 0;\n\nlet c4ShapeInRow = 4;\nlet c4BoundaryInRow = 2;\n\nparser.yy = c4Db;\n\nlet conf = {};\n\nclass Bounds {\n constructor(diagObj) {\n this.name = '';\n this.data = {};\n this.data.startx = undefined;\n this.data.stopx = undefined;\n this.data.starty = undefined;\n this.data.stopy = undefined;\n this.data.widthLimit = undefined;\n\n this.nextData = {};\n this.nextData.startx = undefined;\n this.nextData.stopx = undefined;\n this.nextData.starty = undefined;\n this.nextData.stopy = undefined;\n this.nextData.cnt = 0;\n\n setConf(diagObj.db.getConfig());\n }\n\n setData(startx, stopx, starty, stopy) {\n this.nextData.startx = this.data.startx = startx;\n this.nextData.stopx = this.data.stopx = stopx;\n this.nextData.starty = this.data.starty = starty;\n this.nextData.stopy = this.data.stopy = stopy;\n }\n\n updateVal(obj, key, val, fun) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n }\n\n insert(c4Shape) {\n this.nextData.cnt = this.nextData.cnt + 1;\n let _startx =\n this.nextData.startx === this.nextData.stopx\n ? this.nextData.stopx + c4Shape.margin\n : this.nextData.stopx + c4Shape.margin * 2;\n let _stopx = _startx + c4Shape.width;\n let _starty = this.nextData.starty + c4Shape.margin * 2;\n let _stopy = _starty + c4Shape.height;\n if (\n _startx >= this.data.widthLimit ||\n _stopx >= this.data.widthLimit ||\n this.nextData.cnt > c4ShapeInRow\n ) {\n _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;\n _starty = this.nextData.stopy + c4Shape.margin * 2;\n\n this.nextData.stopx = _stopx = _startx + c4Shape.width;\n this.nextData.starty = this.nextData.stopy;\n this.nextData.stopy = _stopy = _starty + c4Shape.height;\n this.nextData.cnt = 1;\n }\n\n c4Shape.x = _startx;\n c4Shape.y = _starty;\n\n this.updateVal(this.data, 'startx', _startx, Math.min);\n this.updateVal(this.data, 'starty', _starty, Math.min);\n this.updateVal(this.data, 'stopx', _stopx, Math.max);\n this.updateVal(this.data, 'stopy', _stopy, Math.max);\n\n this.updateVal(this.nextData, 'startx', _startx, Math.min);\n this.updateVal(this.nextData, 'starty', _starty, Math.min);\n this.updateVal(this.nextData, 'stopx', _stopx, Math.max);\n this.updateVal(this.nextData, 'stopy', _stopy, Math.max);\n }\n\n init(diagObj) {\n this.name = '';\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n widthLimit: undefined,\n };\n this.nextData = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n cnt: 0,\n };\n setConf(diagObj.db.getConfig());\n }\n\n bumpLastMargin(margin) {\n this.data.stopx += margin;\n this.data.stopy += margin;\n }\n}\n\nexport const setConf = function (cnf) {\n assignWithDepth(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\n\nconst c4ShapeFont = (cnf, typeC4Shape) => {\n return {\n fontFamily: cnf[typeC4Shape + 'FontFamily'],\n fontSize: cnf[typeC4Shape + 'FontSize'],\n fontWeight: cnf[typeC4Shape + 'FontWeight'],\n };\n};\n\nconst boundaryFont = (cnf) => {\n return {\n fontFamily: cnf.boundaryFontFamily,\n fontSize: cnf.boundaryFontSize,\n fontWeight: cnf.boundaryFontWeight,\n };\n};\n\nconst messageFont = (cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight,\n };\n};\n\n/**\n * @param textType\n * @param c4Shape\n * @param c4ShapeTextWrap\n * @param textConf\n * @param textLimitWidth\n */\nfunction calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {\n if (!c4Shape[textType].width) {\n if (c4ShapeTextWrap) {\n c4Shape[textType].text = wrapLabel(c4Shape[textType].text, textLimitWidth, textConf);\n c4Shape[textType].textLines = c4Shape[textType].text.split(common.lineBreakRegex).length;\n // c4Shape[textType].width = calculateTextWidth(c4Shape[textType].text, textConf);\n c4Shape[textType].width = textLimitWidth;\n // c4Shape[textType].height = c4Shape[textType].textLines * textConf.fontSize;\n c4Shape[textType].height = calculateTextHeight(c4Shape[textType].text, textConf);\n } else {\n let lines = c4Shape[textType].text.split(common.lineBreakRegex);\n c4Shape[textType].textLines = lines.length;\n let lineHeight = 0;\n c4Shape[textType].height = 0;\n c4Shape[textType].width = 0;\n for (let i = 0; i < lines.length; i++) {\n c4Shape[textType].width = Math.max(\n calculateTextWidth(lines[i], textConf),\n c4Shape[textType].width\n );\n lineHeight = calculateTextHeight(lines[i], textConf);\n c4Shape[textType].height = c4Shape[textType].height + lineHeight;\n }\n // c4Shapes[textType].height = c4Shapes[textType].textLines * textConf.fontSize;\n }\n }\n}\n\nexport const drawBoundary = function (diagram, boundary, bounds) {\n boundary.x = bounds.data.startx;\n boundary.y = bounds.data.starty;\n boundary.width = bounds.data.stopx - bounds.data.startx;\n boundary.height = bounds.data.stopy - bounds.data.starty;\n\n boundary.label.y = conf.c4ShapeMargin - 35;\n\n let boundaryTextWrap = boundary.wrap && conf.wrap;\n let boundaryLabelConf = boundaryFont(conf);\n boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;\n boundaryLabelConf.fontWeight = 'bold';\n let textLimitWidth = calculateTextWidth(boundary.label.text, boundaryLabelConf);\n calcC4ShapeTextWH('label', boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);\n\n svgDraw.drawBoundary(diagram, boundary, conf);\n};\n\nexport const drawC4ShapeArray = function (currentBounds, diagram, c4ShapeArray, c4ShapeKeys) {\n // Upper Y is relative point\n let Y = 0;\n // Draw the c4ShapeArray\n for (let i = 0; i < c4ShapeKeys.length; i++) {\n Y = 0;\n const c4Shape = c4ShapeArray[c4ShapeKeys[i]];\n\n // calc c4 shape type width and height\n\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;\n c4Shape.typeC4Shape.width = calculateTextWidth(\n '<<' + c4Shape.typeC4Shape.text + '>>',\n c4ShapeTypeConf\n );\n c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;\n c4Shape.typeC4Shape.Y = conf.c4ShapePadding;\n Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;\n\n // set image width and height c4Shape.x + c4Shape.width / 2 - 24, c4Shape.y + 28\n // let imageWidth = 0,\n // imageHeight = 0,\n // imageY = 0;\n //\n c4Shape.image = { width: 0, height: 0, Y: 0 };\n switch (c4Shape.typeC4Shape.text) {\n case 'person':\n case 'external_person':\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n break;\n }\n if (c4Shape.sprite) {\n c4Shape.image.width = 48;\n c4Shape.image.height = 48;\n c4Shape.image.Y = Y;\n Y = c4Shape.image.Y + c4Shape.image.height;\n }\n\n // Y = conf.c4ShapePadding + c4Shape.image.height;\n\n let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;\n let textLimitWidth = conf.width - conf.c4ShapePadding * 2;\n\n let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;\n c4ShapeLabelConf.fontWeight = 'bold';\n calcC4ShapeTextWH('label', c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);\n c4Shape['label'].Y = Y + 8;\n Y = c4Shape['label'].Y + c4Shape['label'].height;\n\n if (c4Shape.type && c4Shape.type.text !== '') {\n c4Shape.type.text = '[' + c4Shape.type.text + ']';\n let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH('type', c4Shape, c4ShapeTextWrap, c4ShapeTypeConf, textLimitWidth);\n c4Shape['type'].Y = Y + 5;\n Y = c4Shape['type'].Y + c4Shape['type'].height;\n } else if (c4Shape.techn && c4Shape.techn.text !== '') {\n c4Shape.techn.text = '[' + c4Shape.techn.text + ']';\n let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);\n calcC4ShapeTextWH('techn', c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);\n c4Shape['techn'].Y = Y + 5;\n Y = c4Shape['techn'].Y + c4Shape['techn'].height;\n }\n\n let rectHeight = Y;\n let rectWidth = c4Shape.label.width;\n\n if (c4Shape.descr && c4Shape.descr.text !== '') {\n let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);\n calcC4ShapeTextWH('descr', c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);\n c4Shape['descr'].Y = Y + 20;\n Y = c4Shape['descr'].Y + c4Shape['descr'].height;\n\n rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);\n rectHeight = Y - c4Shape['descr'].textLines * 5;\n }\n\n rectWidth = rectWidth + conf.c4ShapePadding;\n // let rectHeight =\n\n c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);\n c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);\n c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;\n\n currentBounds.insert(c4Shape);\n\n svgDraw.drawC4Shape(diagram, c4Shape, conf);\n }\n\n currentBounds.bumpLastMargin(conf.c4ShapeMargin);\n};\n\nclass Point {\n constructor(x, y) {\n this.x = x;\n this.y = y;\n }\n}\n\n/* * *\n * Get the intersection of the line between the center point of a rectangle and a point outside the rectangle.\n * Algorithm idea.\n * Using a point outside the rectangle as the coordinate origin, the graph is divided into four quadrants, and each quadrant is divided into two cases, with separate treatment on the coordinate axes\n * 1. The case of coordinate axes.\n * 1. The case of the negative x-axis\n * 2. The case of the positive x-axis\n * 3. The case of the positive y-axis\n * 4. The negative y-axis case\n * 2. Quadrant cases.\n * 2.1. first quadrant: the case where the line intersects the left side of the rectangle; the case where it intersects the lower side of the rectangle\n * 2.2. second quadrant: the case where the line intersects the right side of the rectangle; the case where it intersects the lower edge of the rectangle\n * 2.3. third quadrant: the case where the line intersects the right side of the rectangle; the case where it intersects the upper edge of the rectangle\n * 2.4. fourth quadrant: the case where the line intersects the left side of the rectangle; the case where it intersects the upper side of the rectangle\n *\n */\nlet getIntersectPoint = function (fromNode, endPoint) {\n let x1 = fromNode.x;\n\n let y1 = fromNode.y;\n\n let x2 = endPoint.x;\n\n let y2 = endPoint.y;\n\n let fromCenterX = x1 + fromNode.width / 2;\n\n let fromCenterY = y1 + fromNode.height / 2;\n\n let dx = Math.abs(x1 - x2);\n\n let dy = Math.abs(y1 - y2);\n\n let tanDYX = dy / dx;\n\n let fromDYX = fromNode.height / fromNode.width;\n\n let returnPoint = null;\n\n if (y1 == y2 && x1 < x2) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY);\n } else if (y1 == y2 && x1 > x2) {\n returnPoint = new Point(x1, fromCenterY);\n } else if (x1 == x2 && y1 < y2) {\n returnPoint = new Point(fromCenterX, y1 + fromNode.height);\n } else if (x1 == x2 && y1 > y2) {\n returnPoint = new Point(fromCenterX, y1);\n }\n\n if (x1 > x2 && y1 < y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY + (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(\n fromCenterX - ((dx / dy) * fromNode.height) / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 < y2) {\n //\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY + (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(\n fromCenterX + ((dx / dy) * fromNode.height) / 2,\n y1 + fromNode.height\n );\n }\n } else if (x1 < x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1 + fromNode.width, fromCenterY - (tanDYX * fromNode.width) / 2);\n } else {\n returnPoint = new Point(fromCenterX + ((fromNode.height / 2) * dx) / dy, y1);\n }\n } else if (x1 > x2 && y1 > y2) {\n if (fromDYX >= tanDYX) {\n returnPoint = new Point(x1, fromCenterY - (fromNode.width / 2) * tanDYX);\n } else {\n returnPoint = new Point(fromCenterX - ((fromNode.height / 2) * dx) / dy, y1);\n }\n }\n return returnPoint;\n};\n\nlet getIntersectPoints = function (fromNode, endNode) {\n let endIntersectPoint = { x: 0, y: 0 };\n endIntersectPoint.x = endNode.x + endNode.width / 2;\n endIntersectPoint.y = endNode.y + endNode.height / 2;\n let startPoint = getIntersectPoint(fromNode, endIntersectPoint);\n\n endIntersectPoint.x = fromNode.x + fromNode.width / 2;\n endIntersectPoint.y = fromNode.y + fromNode.height / 2;\n let endPoint = getIntersectPoint(endNode, endIntersectPoint);\n return { startPoint: startPoint, endPoint: endPoint };\n};\n\nexport const drawRels = function (diagram, rels, getC4ShapeObj, diagObj) {\n let i = 0;\n for (let rel of rels) {\n i = i + 1;\n let relTextWrap = rel.wrap && conf.wrap;\n let relConf = messageFont(conf);\n let diagramType = diagObj.db.getC4Type();\n if (diagramType === 'C4Dynamic') rel.label.text = i + ': ' + rel.label.text;\n let textLimitWidth = calculateTextWidth(rel.label.text, relConf);\n calcC4ShapeTextWH('label', rel, relTextWrap, relConf, textLimitWidth);\n\n if (rel.techn && rel.techn.text !== '') {\n textLimitWidth = calculateTextWidth(rel.techn.text, relConf);\n calcC4ShapeTextWH('techn', rel, relTextWrap, relConf, textLimitWidth);\n }\n\n if (rel.descr && rel.descr.text !== '') {\n textLimitWidth = calculateTextWidth(rel.descr.text, relConf);\n calcC4ShapeTextWH('descr', rel, relTextWrap, relConf, textLimitWidth);\n }\n\n let fromNode = getC4ShapeObj(rel.from);\n let endNode = getC4ShapeObj(rel.to);\n let points = getIntersectPoints(fromNode, endNode);\n rel.startPoint = points.startPoint;\n rel.endPoint = points.endPoint;\n }\n svgDraw.drawRels(diagram, rels, conf);\n};\n\n/**\n * @param diagram\n * @param parentBoundaryAlias\n * @param parentBounds\n * @param currentBoundarys\n * @param diagObj\n */\nfunction drawInsideBoundary(diagram, parentBoundaryAlias, parentBounds, currentBoundarys, diagObj) {\n let currentBounds = new Bounds(diagObj);\n // Calculate the width limit of the boundar. label/type 的长度,\n currentBounds.data.widthLimit =\n parentBounds.data.widthLimit / Math.min(c4BoundaryInRow, currentBoundarys.length);\n // Math.min(\n // conf.width * conf.c4ShapeInRow + conf.c4ShapeMargin * conf.c4ShapeInRow * 2,\n // parentBounds.data.widthLimit / Math.min(conf.c4BoundaryInRow, currentBoundarys.length)\n // );\n for (let i = 0; i < currentBoundarys.length; i++) {\n let currentBoundary = currentBoundarys[i];\n let Y = 0;\n currentBoundary.image = { width: 0, height: 0, Y: 0 };\n if (currentBoundary.sprite) {\n currentBoundary.image.width = 48;\n currentBoundary.image.height = 48;\n currentBoundary.image.Y = Y;\n Y = currentBoundary.image.Y + currentBoundary.image.height;\n }\n\n let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;\n\n let currentBoundaryLabelConf = boundaryFont(conf);\n currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;\n currentBoundaryLabelConf.fontWeight = 'bold';\n calcC4ShapeTextWH(\n 'label',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryLabelConf,\n currentBounds.data.widthLimit\n );\n currentBoundary['label'].Y = Y + 8;\n Y = currentBoundary['label'].Y + currentBoundary['label'].height;\n\n if (currentBoundary.type && currentBoundary.type.text !== '') {\n currentBoundary.type.text = '[' + currentBoundary.type.text + ']';\n let currentBoundaryTypeConf = boundaryFont(conf);\n calcC4ShapeTextWH(\n 'type',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryTypeConf,\n currentBounds.data.widthLimit\n );\n currentBoundary['type'].Y = Y + 5;\n Y = currentBoundary['type'].Y + currentBoundary['type'].height;\n }\n\n if (currentBoundary.descr && currentBoundary.descr.text !== '') {\n let currentBoundaryDescrConf = boundaryFont(conf);\n currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;\n calcC4ShapeTextWH(\n 'descr',\n currentBoundary,\n currentBoundaryTextWrap,\n currentBoundaryDescrConf,\n currentBounds.data.widthLimit\n );\n currentBoundary['descr'].Y = Y + 20;\n Y = currentBoundary['descr'].Y + currentBoundary['descr'].height;\n }\n\n if (i == 0 || i % c4BoundaryInRow === 0) {\n // Calculate the drawing start point of the currentBoundarys.\n let _x = parentBounds.data.startx + conf.diagramMarginX;\n let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;\n\n currentBounds.setData(_x, _x, _y, _y);\n } else {\n // Calculate the drawing start point of the currentBoundarys.\n let _x =\n currentBounds.data.stopx !== currentBounds.data.startx\n ? currentBounds.data.stopx + conf.diagramMarginX\n : currentBounds.data.startx;\n let _y = currentBounds.data.starty;\n\n currentBounds.setData(_x, _x, _y, _y);\n }\n currentBounds.name = currentBoundary.alias;\n let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);\n let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);\n\n if (currentPersonOrSystemKeys.length > 0) {\n drawC4ShapeArray(\n currentBounds,\n diagram,\n currentPersonOrSystemArray,\n currentPersonOrSystemKeys\n );\n }\n parentBoundaryAlias = currentBoundary.alias;\n let nextCurrentBoundarys = diagObj.db.getBoundarys(parentBoundaryAlias);\n\n if (nextCurrentBoundarys.length > 0) {\n // draw boundary inside currentBoundary\n // bounds.init();\n // parentBoundaryWidthLimit = bounds.data.stopx - bounds.startx;\n drawInsideBoundary(\n diagram,\n parentBoundaryAlias,\n currentBounds,\n nextCurrentBoundarys,\n diagObj\n );\n }\n // draw boundary\n if (currentBoundary.alias !== 'global') drawBoundary(diagram, currentBoundary, currentBounds);\n parentBounds.data.stopy = Math.max(\n currentBounds.data.stopy + conf.c4ShapeMargin,\n parentBounds.data.stopy\n );\n parentBounds.data.stopx = Math.max(\n currentBounds.data.stopx + conf.c4ShapeMargin,\n parentBounds.data.stopx\n );\n globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);\n globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);\n }\n}\n\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n *\n * @param {any} _text\n * @param {any} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (_text, id, _version, diagObj) {\n conf = configApi.getConfig().c4;\n const securityLevel = configApi.getConfig().securityLevel;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n let db = diagObj.db;\n\n diagObj.db.setWrap(conf.wrap);\n\n c4ShapeInRow = db.getC4ShapeInRow();\n c4BoundaryInRow = db.getC4BoundaryInRow();\n\n log.debug(`C:${JSON.stringify(conf, null, 2)}`);\n\n const diagram =\n securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n\n svgDraw.insertComputerIcon(diagram);\n svgDraw.insertDatabaseIcon(diagram);\n svgDraw.insertClockIcon(diagram);\n\n let screenBounds = new Bounds(diagObj);\n\n screenBounds.setData(\n conf.diagramMarginX,\n conf.diagramMarginX,\n conf.diagramMarginY,\n conf.diagramMarginY\n );\n\n screenBounds.data.widthLimit = screen.availWidth;\n globalBoundaryMaxX = conf.diagramMarginX;\n globalBoundaryMaxY = conf.diagramMarginY;\n\n const title = diagObj.db.getTitle();\n let currentBoundarys = diagObj.db.getBoundarys('');\n // switch (c4type) {\n // case 'C4Context':\n drawInsideBoundary(diagram, '', screenBounds, currentBoundarys, diagObj);\n // break;\n // }\n\n // The arrow head definition is attached to the svg once\n svgDraw.insertArrowHead(diagram);\n svgDraw.insertArrowEnd(diagram);\n svgDraw.insertArrowCrossHead(diagram);\n svgDraw.insertArrowFilledHead(diagram);\n\n drawRels(diagram, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);\n\n screenBounds.data.stopx = globalBoundaryMaxX;\n screenBounds.data.stopy = globalBoundaryMaxY;\n\n const box = screenBounds.data;\n\n // Make sure the height of the diagram supports long menus.\n let boxHeight = box.stopy - box.starty;\n\n let height = boxHeight + 2 * conf.diagramMarginY;\n\n // Make sure the width of the diagram supports wide menus.\n let boxWidth = box.stopx - box.startx;\n const width = boxWidth + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX)\n .attr('y', box.starty + conf.diagramMarginY);\n }\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n const extraVertForTitle = title ? 60 : 0;\n diagram.attr(\n 'viewBox',\n box.startx -\n conf.diagramMarginX +\n ' -' +\n (conf.diagramMarginY + extraVertForTitle) +\n ' ' +\n width +\n ' ' +\n (height + extraVertForTitle)\n );\n\n addSVGAccessibilityFields(parser.yy, diagram, id);\n log.debug(`models:`, box);\n};\n\nexport default {\n drawPersonOrSystemArray: drawC4ShapeArray,\n drawBoundary,\n setConf,\n draw,\n};\n","/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n%x string\n%x bqstring\n%x generic\n%x struct\n%x href\n%x callback_name\n%x callback_args\n%x open_directive\n%x type_directive\n%x arg_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%\\%(?!\\{)*[^\\n]*(\\r?\\n?)+ /* skip comments */\n\\%\\%[^\\n]*(\\r?\\n)* /* skip comments */\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n[\\}] { this.popState(); }\n[^\\}]* return \"acc_descr_multiline_value\";\n\n\\s*(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\"classDiagram-v2\" return 'CLASS_DIAGRAM';\n\"classDiagram\" return 'CLASS_DIAGRAM';\n[{] { this.begin(\"struct\"); /*console.log('Starting struct');*/ return 'STRUCT_START';}\n\"[*]\" { /*console.log('EDGE_STATE=',yytext);*/ return 'EDGE_STATE';}\n<> return \"EOF_IN_STRUCT\";\n[{] return \"OPEN_IN_STRUCT\";\n[}] { /*console.log('Ending struct');*/this.popState(); return 'STRUCT_STOP';}}\n[\\n] /* nothing */\n[^{}\\n]* { /*console.log('lex-member: ' + yytext);*/ return \"MEMBER\";}\n\n\"class\" return 'CLASS';\n\"cssClass\" return 'CSSCLASS';\n\"callback\" return 'CALLBACK';\n\"link\" return 'LINK';\n\"click\" return 'CLICK';\n\"<<\" return 'ANNOTATION_START';\n\">>\" return 'ANNOTATION_END';\n[~] this.begin(\"generic\");\n[~] this.popState();\n[^~]* return \"GENERICTYPE\";\n[\"] this.begin(\"string\");\n[\"] this.popState();\n[^\"]* return \"STR\";\n\n[`] this.begin(\"bqstring\");\n[`] this.popState();\n[^`]+ return \"BQUOTE_STR\";\n\n/*\n---interactivity command---\n'href' adds a link to the specified node. 'href' can only be specified when the\nline was introduced with 'click'.\n'href \"\"' attaches the specified link to the node that was specified by 'click'.\n*/\n\"href\"[\\s]+[\"] this.begin(\"href\");\n[\"] this.popState();\n[^\"]* return 'HREF';\n\n/*\n---interactivity command---\n'call' adds a callback to the specified node. 'call' can only be specified when\nthe line was introduced with 'click'.\n'call ()' attaches the function 'callback_name' with the specified\narguments to the node that was specified by 'click'.\nFunction arguments are optional: 'call ()' simply executes 'callback_name' without any arguments.\n*/\n\"call\"[\\s]+ this.begin(\"callback_name\");\n\\([\\s]*\\) this.popState();\n\\( this.popState(); this.begin(\"callback_args\");\n[^(]* return 'CALLBACK_NAME';\n\\) this.popState();\n[^)]* return 'CALLBACK_ARGS';\n\n\"_self\" return 'LINK_TARGET';\n\"_blank\" return 'LINK_TARGET';\n\"_parent\" return 'LINK_TARGET';\n\"_top\" return 'LINK_TARGET';\n\n\\s*\\<\\| return 'EXTENSION';\n\\s*\\|\\> return 'EXTENSION';\n\\s*\\> return 'DEPENDENCY';\n\\s*\\< return 'DEPENDENCY';\n\\s*\\* return 'COMPOSITION';\n\\s*o return 'AGGREGATION';\n\\s*\\(\\) return 'LOLLIPOP';\n\\-\\- return 'LINE';\n\\.\\. return 'DOTTED_LINE';\n\":\"{1}[^:\\n;]+ return 'LABEL';\n\":\"{3} return 'STYLE_SEPARATOR';\n\\- return 'MINUS';\n\".\" return 'DOT';\n\\+ return 'PLUS';\n\\% return 'PCT';\n\"=\" return 'EQUALS';\n\\= return 'EQUALS';\n\\w+ return 'ALPHA';\n[!\"#$%&'*+,-.`?\\\\/] return 'PUNCTUATION';\n[0-9]+ return 'NUM';\n[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|\n[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|\n[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|\n[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|\n[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|\n[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|\n[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|\n[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|\n[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|\n[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|\n[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|\n[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|\n[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|\n[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|\n[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|\n[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|\n[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|\n[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|\n[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|\n[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|\n[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|\n[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|\n[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|\n[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|\n[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|\n[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|\n[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|\n[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|\n[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|\n[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|\n[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|\n[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|\n[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|\n[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|\n[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|\n[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|\n[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|\n[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|\n[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|\n[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|\n[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|\n[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|\n[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|\n[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|\n[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|\n[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|\n[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|\n[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|\n[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|\n[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|\n[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|\n[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|\n[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|\n[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|\n[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|\n[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|\n[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|\n[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|\n[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\n[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|\n[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]\n return 'UNICODE_TEXT';\n\\s return 'SPACE';\n<> return 'EOF';\n\n/lex\n\n/* operator associations and precedence */\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n : mermaidDoc\n | statments\n | direction\n | directive start\n ;\n\ndirection\n : direction_tb\n { yy.setDirection('TB');}\n | direction_bt\n { yy.setDirection('BT');}\n | direction_rl\n { yy.setDirection('RL');}\n | direction_lr\n { yy.setDirection('LR');}\n ;\n\nmermaidDoc\n : graphConfig\n ;\n\ndirective\n : openDirective typeDirective closeDirective NEWLINE\n | openDirective typeDirective ':' argDirective closeDirective NEWLINE\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'class'); }\n ;\n\ngraphConfig\n : CLASS_DIAGRAM NEWLINE statements EOF\n ;\n\nstatements\n : statement\n | statement NEWLINE\n | statement NEWLINE statements\n ;\n\nclassName\n : alphaNumToken { $$=$1; }\n | classLiteralName { $$=$1; }\n | alphaNumToken className { $$=$1+$2; }\n | alphaNumToken GENERICTYPE { $$=$1+'~'+$2; }\n | classLiteralName GENERICTYPE { $$=$1+'~'+$2; }\n ;\n\nstatement\n : relationStatement { yy.addRelation($1); }\n | relationStatement LABEL { $1.title = yy.cleanupLabel($2); yy.addRelation($1); }\n | classStatement\n | methodStatement\n | annotationStatement\n | clickStatement\n | cssClassStatement\n | directive\n | direction\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }\n ;\n\nclassStatement\n : CLASS className {yy.addClass($2);}\n | CLASS className STYLE_SEPARATOR alphaNumToken {yy.addClass($2);yy.setCssClass($2, $4);}\n | CLASS className STRUCT_START members STRUCT_STOP {/*console.log($2,JSON.stringify($4));*/yy.addClass($2);yy.addMembers($2,$4);}\n | CLASS className STYLE_SEPARATOR alphaNumToken STRUCT_START members STRUCT_STOP {yy.addClass($2);yy.setCssClass($2, $4);yy.addMembers($2,$6);}\n ;\n\nannotationStatement\n :ANNOTATION_START alphaNumToken ANNOTATION_END className { yy.addAnnotation($4,$2); }\n ;\n\nmembers\n : MEMBER { $$ = [$1]; }\n | MEMBER members { $2.push($1);$$=$2;}\n ;\n\nmethodStatement\n : className {/*console.log('Rel found',$1);*/}\n | className LABEL {yy.addMember($1,yy.cleanupLabel($2));}\n | MEMBER {/*console.warn('Member',$1);*/}\n | SEPARATOR {/*console.log('sep found',$1);*/}\n ;\n\nrelationStatement\n : className relation className { $$ = {'id1':$1,'id2':$3, relation:$2, relationTitle1:'none', relationTitle2:'none'}; }\n | className STR relation className { $$ = {id1:$1, id2:$4, relation:$3, relationTitle1:$2, relationTitle2:'none'}}\n | className relation STR className { $$ = {id1:$1, id2:$4, relation:$2, relationTitle1:'none', relationTitle2:$3}; }\n | className STR relation STR className { $$ = {id1:$1, id2:$5, relation:$3, relationTitle1:$2, relationTitle2:$4} }\n ;\n\nrelation\n : relationType lineType relationType { $$={type1:$1,type2:$3,lineType:$2}; }\n | lineType relationType { $$={type1:'none',type2:$2,lineType:$1}; }\n | relationType lineType { $$={type1:$1,type2:'none',lineType:$2}; }\n | lineType { $$={type1:'none',type2:'none',lineType:$1}; }\n ;\n\nrelationType\n : AGGREGATION { $$=yy.relationType.AGGREGATION;}\n | EXTENSION { $$=yy.relationType.EXTENSION;}\n | COMPOSITION { $$=yy.relationType.COMPOSITION;}\n | DEPENDENCY { $$=yy.relationType.DEPENDENCY;}\n | LOLLIPOP { $$=yy.relationType.LOLLIPOP;}\n ;\n\nlineType\n : LINE {$$=yy.lineType.LINE;}\n | DOTTED_LINE {$$=yy.lineType.DOTTED_LINE;}\n ;\n\nclickStatement\n : CALLBACK className STR {$$ = $1;yy.setClickEvent($2, $3);}\n | CALLBACK className STR STR {$$ = $1;yy.setClickEvent($2, $3);yy.setTooltip($2, $4);}\n | LINK className STR {$$ = $1;yy.setLink($2, $3);}\n | LINK className STR LINK_TARGET {$$ = $1;yy.setLink($2, $3,$4);}\n | LINK className STR STR {$$ = $1;yy.setLink($2, $3);yy.setTooltip($2, $4);}\n | LINK className STR STR LINK_TARGET {$$ = $1;yy.setLink($2, $3, $5);yy.setTooltip($2, $4);}\n | CLICK className CALLBACK_NAME {$$ = $1;yy.setClickEvent($2, $3);}\n | CLICK className CALLBACK_NAME STR {$$ = $1;yy.setClickEvent($2, $3);yy.setTooltip($2, $4);}\n | CLICK className CALLBACK_NAME CALLBACK_ARGS {$$ = $1;yy.setClickEvent($2, $3, $4);}\n | CLICK className CALLBACK_NAME CALLBACK_ARGS STR {$$ = $1;yy.setClickEvent($2, $3, $4);yy.setTooltip($2, $5);}\n | CLICK className HREF {$$ = $1;yy.setLink($2, $3);}\n | CLICK className HREF LINK_TARGET {$$ = $1;yy.setLink($2, $3, $4);}\n | CLICK className HREF STR {$$ = $1;yy.setLink($2, $3);yy.setTooltip($2, $4);}\n | CLICK className HREF STR LINK_TARGET {$$ = $1;yy.setLink($2, $3, $5);yy.setTooltip($2, $4);}\n ;\n\ncssClassStatement\n : CSSCLASS STR alphaNumToken {yy.setCssClass($2, $3);}\n ;\n\ncommentToken : textToken | graphCodeTokens ;\n\ntextToken : textNoTagsToken | TAGSTART | TAGEND | '==' | '--' | PCT | DEFAULT;\n\ntextNoTagsToken: alphaNumToken | SPACE | MINUS | keywords ;\n\nalphaNumToken : UNICODE_TEXT | NUM | ALPHA;\n\nclassLiteralName : BQUOTE_STR;\n\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const classDetector: DiagramDetector = (txt, config) => {\n // If we have confgured to use dagre-wrapper then we should never return true in this function\n if (config?.class?.defaultRenderer === 'dagre-wrapper') return false;\n // We have not opted to use the new renderer so we should return true if we detect a class diagram\n return txt.match(/^\\s*classDiagram/) !== null;\n};\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const classDetectorV2: DiagramDetector = (txt, config) => {\n // If we have confgured to use dagre-wrapper then we should return true in this function for classDiagram code thus making it use the new class diagram\n if (txt.match(/^\\s*classDiagram/) !== null && config?.class?.defaultRenderer === 'dagre-wrapper')\n return true;\n // We have not opted to use the new renderer so we should return true if we detect a class diagram\n return txt.match(/^\\s*classDiagram-v2/) !== null;\n};\n","import { select } from 'd3';\nimport { log } from '../../logger';\nimport * as configApi from '../../config';\nimport common from '../common/common';\nimport utils from '../../utils';\nimport mermaidAPI from '../../mermaidAPI';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nconst MERMAID_DOM_ID_PREFIX = 'classid-';\n\nlet relations = [];\nlet classes = {};\nlet classCounter = 0;\n\nlet funs = [];\n\nconst sanitizeText = (txt) => common.sanitizeText(txt, configApi.getConfig());\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nconst splitClassNameAndType = function (id) {\n let genericType = '';\n let className = id;\n\n if (id.indexOf('~') > 0) {\n let split = id.split('~');\n className = split[0];\n\n genericType = common.sanitizeText(split[1], configApi.getConfig());\n }\n\n return { className: className, type: genericType };\n};\n\n/**\n * Function called by parser when a node definition has been found.\n *\n * @param id\n * @public\n */\nexport const addClass = function (id) {\n let classId = splitClassNameAndType(id);\n // Only add class if not exists\n if (typeof classes[classId.className] !== 'undefined') return;\n\n classes[classId.className] = {\n id: classId.className,\n type: classId.type,\n cssClasses: [],\n methods: [],\n members: [],\n annotations: [],\n domId: MERMAID_DOM_ID_PREFIX + classId.className + '-' + classCounter,\n };\n\n classCounter++;\n};\n\n/**\n * Function to lookup domId from id in the graph definition.\n *\n * @param id\n * @public\n */\nexport const lookUpDomId = function (id) {\n const classKeys = Object.keys(classes);\n for (let i = 0; i < classKeys.length; i++) {\n if (classes[classKeys[i]].id === id) {\n return classes[classKeys[i]].domId;\n }\n }\n};\n\nexport const clear = function () {\n relations = [];\n classes = {};\n funs = [];\n funs.push(setupToolTips);\n commonClear();\n};\n\nexport const getClass = function (id) {\n return classes[id];\n};\nexport const getClasses = function () {\n return classes;\n};\n\nexport const getRelations = function () {\n return relations;\n};\n\nexport const addRelation = function (relation) {\n log.debug('Adding relation: ' + JSON.stringify(relation));\n addClass(relation.id1);\n addClass(relation.id2);\n\n relation.id1 = splitClassNameAndType(relation.id1).className;\n relation.id2 = splitClassNameAndType(relation.id2).className;\n\n relation.relationTitle1 = common.sanitizeText(\n relation.relationTitle1.trim(),\n configApi.getConfig()\n );\n\n relation.relationTitle2 = common.sanitizeText(\n relation.relationTitle2.trim(),\n configApi.getConfig()\n );\n\n relations.push(relation);\n};\n\n/**\n * Adds an annotation to the specified class Annotations mark special properties of the given type\n * (like 'interface' or 'service')\n *\n * @param className The class name\n * @param annotation The name of the annotation without any brackets\n * @public\n */\nexport const addAnnotation = function (className, annotation) {\n const validatedClassName = splitClassNameAndType(className).className;\n classes[validatedClassName].annotations.push(annotation);\n};\n\n/**\n * Adds a member to the specified class\n *\n * @param className The class name\n * @param member The full name of the member. If the member is enclosed in <> it is\n * treated as an annotation If the member is ending with a closing bracket ) it is treated as a\n * method Otherwise the member will be treated as a normal property\n * @public\n */\nexport const addMember = function (className, member) {\n const validatedClassName = splitClassNameAndType(className).className;\n const theClass = classes[validatedClassName];\n\n if (typeof member === 'string') {\n // Member can contain white spaces, we trim them out\n const memberString = member.trim();\n\n if (memberString.startsWith('<<') && memberString.endsWith('>>')) {\n // Remove leading and trailing brackets\n // theClass.annotations.push(memberString.substring(2, memberString.length - 2));\n theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2)));\n } else if (memberString.indexOf(')') > 0) {\n theClass.methods.push(sanitizeText(memberString));\n } else if (memberString) {\n theClass.members.push(sanitizeText(memberString));\n }\n }\n};\n\nexport const addMembers = function (className, members) {\n if (Array.isArray(members)) {\n members.reverse();\n members.forEach((member) => addMember(className, member));\n }\n};\n\nexport const cleanupLabel = function (label) {\n if (label.substring(0, 1) === ':') {\n return common.sanitizeText(label.substr(1).trim(), configApi.getConfig());\n } else {\n return sanitizeText(label.trim());\n }\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n *\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\nexport const setCssClass = function (ids, className) {\n ids.split(',').forEach(function (_id) {\n let id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (typeof classes[id] !== 'undefined') {\n classes[id].cssClasses.push(className);\n }\n });\n};\n\n/**\n * Called by parser when a tooltip is found, e.g. a clickable element.\n *\n * @param ids Comma separated list of ids\n * @param tooltip Tooltip to add\n */\nconst setTooltip = function (ids, tooltip) {\n const config = configApi.getConfig();\n ids.split(',').forEach(function (id) {\n if (typeof tooltip !== 'undefined') {\n classes[id].tooltip = common.sanitizeText(tooltip, config);\n }\n });\n};\nexport const getTooltip = function (id) {\n return classes[id].tooltip;\n};\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n * @param target Target of the link, _blank by default as originally defined in the svgDraw.js file\n */\nexport const setLink = function (ids, linkStr, target) {\n const config = configApi.getConfig();\n ids.split(',').forEach(function (_id) {\n let id = _id;\n if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (typeof classes[id] !== 'undefined') {\n classes[id].link = utils.formatUrl(linkStr, config);\n if (config.securityLevel === 'sandbox') {\n classes[id].linkTarget = '_top';\n } else if (typeof target === 'string') {\n classes[id].linkTarget = sanitizeText(target);\n } else {\n classes[id].linkTarget = '_blank';\n }\n }\n });\n setCssClass(ids, 'clickable');\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\nexport const setClickEvent = function (ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFunc(id, functionName, functionArgs);\n classes[id].haveCallback = true;\n });\n setCssClass(ids, 'clickable');\n};\n\nconst setClickFunc = function (domId, functionName, functionArgs) {\n const config = configApi.getConfig();\n let id = domId;\n let elemId = lookUpDomId(id);\n\n if (config.securityLevel !== 'loose') {\n return;\n }\n if (typeof functionName === 'undefined') {\n return;\n }\n if (typeof classes[id] !== 'undefined') {\n let argList = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(elemId);\n }\n\n funs.push(function () {\n const elem = document.querySelector(`[id=\"${elemId}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n 'click',\n function () {\n utils.runFunc(functionName, ...argList);\n },\n false\n );\n }\n });\n }\n};\n\nexport const bindFunctions = function (element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n};\n\nexport const lineType = {\n LINE: 0,\n DOTTED_LINE: 1,\n};\n\nexport const relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3,\n LOLLIPOP: 4,\n};\n\nconst setupToolTips = function (element) {\n let tooltipElem = select('.mermaidTooltip');\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n tooltipElem = select('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n const svg = select(element).select('svg');\n\n const nodes = svg.selectAll('g.node');\n nodes\n .on('mouseover', function () {\n const el = select(this);\n const title = el.attr('title');\n // Dont try to draw a tooltip if no data is provided\n if (title === null) {\n return;\n }\n const rect = this.getBoundingClientRect();\n\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem\n .text(el.attr('title'))\n .style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')\n .style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n tooltipElem.html(tooltipElem.html().replace(/<br\\/>/g, '
'));\n el.classed('hover', true);\n })\n .on('mouseout', function () {\n tooltipElem.transition().duration(500).style('opacity', 0);\n const el = select(this);\n el.classed('hover', false);\n });\n};\nfuns.push(setupToolTips);\n\nlet direction = 'TB';\nconst getDirection = () => direction;\nconst setDirection = (dir) => {\n direction = dir;\n};\n\nexport default {\n parseDirective,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n getConfig: () => configApi.getConfig().class,\n addClass,\n bindFunctions,\n clear,\n getClass,\n getClasses,\n addAnnotation,\n getRelations,\n addRelation,\n getDirection,\n setDirection,\n addMember,\n addMembers,\n cleanupLabel,\n lineType,\n relationType,\n setClickEvent,\n setCssClass,\n setLink,\n getTooltip,\n setTooltip,\n lookUpDomId,\n};\n","import { line, curveBasis } from 'd3';\nimport utils from '../../utils';\nimport { log } from '../../logger';\nimport { parseGenericTypes } from '../common/common';\n\nlet edgeCount = 0;\nexport const drawEdge = function (elem, path, relation, conf, diagObj) {\n const getRelationType = function (type) {\n switch (type) {\n case diagObj.db.relationType.AGGREGATION:\n return 'aggregation';\n case diagObj.db.EXTENSION:\n return 'extension';\n case diagObj.db.COMPOSITION:\n return 'composition';\n case diagObj.db.DEPENDENCY:\n return 'dependency';\n case diagObj.db.LOLLIPOP:\n return 'lollipop';\n }\n };\n\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n\n // The data for our line\n const lineData = path.points;\n\n // This is the accessor function we talked about above\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', 'edge' + edgeCount)\n .attr('class', 'relation');\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n if (relation.relation.lineType == 1) {\n svgPath.attr('class', 'relation dashed-line');\n }\n if (relation.relation.type1 !== 'none') {\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + getRelationType(relation.relation.type1) + 'Start' + ')'\n );\n }\n if (relation.relation.type2 !== 'none') {\n svgPath.attr(\n 'marker-end',\n 'url(' + url + '#' + getRelationType(relation.relation.type2) + 'End' + ')'\n );\n }\n\n let x, y;\n const l = path.points.length;\n // Calculate Label position\n let labelPosition = utils.calcLabelPosition(path.points);\n x = labelPosition.x;\n y = labelPosition.y;\n\n let p1_card_x, p1_card_y;\n let p2_card_x, p2_card_y;\n\n if (l % 2 !== 0 && l > 1) {\n let cardinality_1_point = utils.calcCardinalityPosition(\n relation.relation.type1 !== 'none',\n path.points,\n path.points[0]\n );\n let cardinality_2_point = utils.calcCardinalityPosition(\n relation.relation.type2 !== 'none',\n path.points,\n path.points[l - 1]\n );\n\n log.debug('cardinality_1_point ' + JSON.stringify(cardinality_1_point));\n log.debug('cardinality_2_point ' + JSON.stringify(cardinality_2_point));\n\n p1_card_x = cardinality_1_point.x;\n p1_card_y = cardinality_1_point.y;\n p2_card_x = cardinality_2_point.x;\n p2_card_y = cardinality_2_point.y;\n }\n\n if (typeof relation.title !== 'undefined') {\n const g = elem.append('g').attr('class', 'classLabel');\n const label = g\n .append('text')\n .attr('class', 'label')\n .attr('x', x)\n .attr('y', y)\n .attr('fill', 'red')\n .attr('text-anchor', 'middle')\n .text(relation.title);\n\n window.label = label;\n const bounds = label.node().getBBox();\n\n g.insert('rect', ':first-child')\n .attr('class', 'box')\n .attr('x', bounds.x - conf.padding / 2)\n .attr('y', bounds.y - conf.padding / 2)\n .attr('width', bounds.width + conf.padding)\n .attr('height', bounds.height + conf.padding);\n }\n\n log.info('Rendering relation ' + JSON.stringify(relation));\n if (typeof relation.relationTitle1 !== 'undefined' && relation.relationTitle1 !== 'none') {\n const g = elem.append('g').attr('class', 'cardinality');\n g.append('text')\n .attr('class', 'type1')\n .attr('x', p1_card_x)\n .attr('y', p1_card_y)\n .attr('fill', 'black')\n .attr('font-size', '6')\n .text(relation.relationTitle1);\n }\n if (typeof relation.relationTitle2 !== 'undefined' && relation.relationTitle2 !== 'none') {\n const g = elem.append('g').attr('class', 'cardinality');\n g.append('text')\n .attr('class', 'type2')\n .attr('x', p2_card_x)\n .attr('y', p2_card_y)\n .attr('fill', 'black')\n .attr('font-size', '6')\n .text(relation.relationTitle2);\n }\n\n edgeCount++;\n};\n\n/**\n * Renders a class diagram\n *\n * @param {SVGSVGElement} elem The element to draw it into\n * @param classDef\n * @param conf\n * @param diagObj\n * @todo Add more information in the JSDOC here\n */\nexport const drawClass = function (elem, classDef, conf, diagObj) {\n log.debug('Rendering class ', classDef, conf);\n\n const id = classDef.id;\n const classInfo = {\n id: id,\n label: classDef.id,\n width: 0,\n height: 0,\n };\n\n // add class group\n const g = elem.append('g').attr('id', diagObj.db.lookUpDomId(id)).attr('class', 'classGroup');\n\n // add title\n let title;\n if (classDef.link) {\n title = g\n .append('svg:a')\n .attr('xlink:href', classDef.link)\n .attr('target', classDef.linkTarget)\n .append('text')\n .attr('y', conf.textHeight + conf.padding)\n .attr('x', 0);\n } else {\n title = g\n .append('text')\n .attr('y', conf.textHeight + conf.padding)\n .attr('x', 0);\n }\n\n // add annotations\n let isFirst = true;\n classDef.annotations.forEach(function (member) {\n const titleText2 = title.append('tspan').text('«' + member + '»');\n if (!isFirst) titleText2.attr('dy', conf.textHeight);\n isFirst = false;\n });\n\n let classTitleString = classDef.id;\n\n if (classDef.type !== undefined && classDef.type !== '') {\n classTitleString += '<' + classDef.type + '>';\n }\n\n const classTitle = title.append('tspan').text(classTitleString).attr('class', 'title');\n\n // If class has annotations the title needs to have an offset of the text height\n if (!isFirst) classTitle.attr('dy', conf.textHeight);\n\n const titleHeight = title.node().getBBox().height;\n\n const membersLine = g\n .append('line') // text label for the x axis\n .attr('x1', 0)\n .attr('y1', conf.padding + titleHeight + conf.dividerMargin / 2)\n .attr('y2', conf.padding + titleHeight + conf.dividerMargin / 2);\n\n const members = g\n .append('text') // text label for the x axis\n .attr('x', conf.padding)\n .attr('y', titleHeight + conf.dividerMargin + conf.textHeight)\n .attr('fill', 'white')\n .attr('class', 'classText');\n\n isFirst = true;\n classDef.members.forEach(function (member) {\n addTspan(members, member, isFirst, conf);\n isFirst = false;\n });\n\n const membersBox = members.node().getBBox();\n\n const methodsLine = g\n .append('line') // text label for the x axis\n .attr('x1', 0)\n .attr('y1', conf.padding + titleHeight + conf.dividerMargin + membersBox.height)\n .attr('y2', conf.padding + titleHeight + conf.dividerMargin + membersBox.height);\n\n const methods = g\n .append('text') // text label for the x axis\n .attr('x', conf.padding)\n .attr('y', titleHeight + 2 * conf.dividerMargin + membersBox.height + conf.textHeight)\n .attr('fill', 'white')\n .attr('class', 'classText');\n\n isFirst = true;\n\n classDef.methods.forEach(function (method) {\n addTspan(methods, method, isFirst, conf);\n isFirst = false;\n });\n\n const classBox = g.node().getBBox();\n var cssClassStr = ' ';\n\n if (classDef.cssClasses.length > 0) {\n cssClassStr = cssClassStr + classDef.cssClasses.join(' ');\n }\n\n const rect = g\n .insert('rect', ':first-child')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', classBox.width + 2 * conf.padding)\n .attr('height', classBox.height + conf.padding + 0.5 * conf.dividerMargin)\n .attr('class', cssClassStr);\n\n const rectWidth = rect.node().getBBox().width;\n\n // Center title\n // We subtract the width of each text element from the class box width and divide it by 2\n title.node().childNodes.forEach(function (x) {\n x.setAttribute('x', (rectWidth - x.getBBox().width) / 2);\n });\n\n if (classDef.tooltip) {\n title.insert('title').text(classDef.tooltip);\n }\n\n membersLine.attr('x2', rectWidth);\n methodsLine.attr('x2', rectWidth);\n\n classInfo.width = rectWidth;\n classInfo.height = classBox.height + conf.padding + 0.5 * conf.dividerMargin;\n\n return classInfo;\n};\n\nexport const parseMember = function (text) {\n const fieldRegEx = /^(\\+|-|~|#)?(\\w+)(~\\w+~|\\[\\])?\\s+(\\w+) *(\\*|\\$)?$/;\n const methodRegEx = /^([+|\\-|~|#])?(\\w+) *\\( *(.*)\\) *(\\*|\\$)? *(\\w*[~|[\\]]*\\s*\\w*~?)$/;\n\n let fieldMatch = text.match(fieldRegEx);\n let methodMatch = text.match(methodRegEx);\n\n if (fieldMatch && !methodMatch) {\n return buildFieldDisplay(fieldMatch);\n } else if (methodMatch) {\n return buildMethodDisplay(methodMatch);\n } else {\n return buildLegacyDisplay(text);\n }\n};\n\nconst buildFieldDisplay = function (parsedText) {\n let cssStyle = '';\n let displayText = '';\n\n try {\n let visibility = parsedText[1] ? parsedText[1].trim() : '';\n let fieldType = parsedText[2] ? parsedText[2].trim() : '';\n let genericType = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : '';\n let fieldName = parsedText[4] ? parsedText[4].trim() : '';\n let classifier = parsedText[5] ? parsedText[5].trim() : '';\n\n displayText = visibility + fieldType + genericType + ' ' + fieldName;\n cssStyle = parseClassifier(classifier);\n } catch (err) {\n displayText = parsedText;\n }\n\n return {\n displayText: displayText,\n cssStyle: cssStyle,\n };\n};\n\nconst buildMethodDisplay = function (parsedText) {\n let cssStyle = '';\n let displayText = '';\n\n try {\n let visibility = parsedText[1] ? parsedText[1].trim() : '';\n let methodName = parsedText[2] ? parsedText[2].trim() : '';\n let parameters = parsedText[3] ? parseGenericTypes(parsedText[3].trim()) : '';\n let classifier = parsedText[4] ? parsedText[4].trim() : '';\n let returnType = parsedText[5] ? ' : ' + parseGenericTypes(parsedText[5]).trim() : '';\n\n displayText = visibility + methodName + '(' + parameters + ')' + returnType;\n cssStyle = parseClassifier(classifier);\n } catch (err) {\n displayText = parsedText;\n }\n\n return {\n displayText: displayText,\n cssStyle: cssStyle,\n };\n};\n\nconst buildLegacyDisplay = function (text) {\n // if for some reason we dont have any match, use old format to parse text\n let displayText = '';\n let cssStyle = '';\n let memberText = '';\n let returnType = '';\n let methodStart = text.indexOf('(');\n let methodEnd = text.indexOf(')');\n\n if (methodStart > 1 && methodEnd > methodStart && methodEnd <= text.length) {\n let visibility = '';\n let methodName = '';\n\n let firstChar = text.substring(0, 1);\n if (firstChar.match(/\\w/)) {\n methodName = text.substring(0, methodStart).trim();\n } else {\n if (firstChar.match(/\\+|-|~|#/)) {\n visibility = firstChar;\n }\n\n methodName = text.substring(1, methodStart).trim();\n }\n\n const parameters = text.substring(methodStart + 1, methodEnd);\n const classifier = text.substring(methodEnd + 1, 1);\n cssStyle = parseClassifier(text.substring(methodEnd + 1, methodEnd + 2));\n\n displayText = visibility + methodName + '(' + parseGenericTypes(parameters.trim()) + ')';\n\n if (methodEnd < text.length) {\n returnType = text.substring(methodEnd + 2).trim();\n if (returnType !== '') {\n returnType = ' : ' + parseGenericTypes(returnType);\n displayText += returnType;\n }\n }\n } else {\n // finally - if all else fails, just send the text back as written (other than parsing for generic types)\n displayText = parseGenericTypes(text);\n }\n\n return {\n displayText,\n cssStyle,\n };\n};\n/**\n * Adds a for a member in a diagram\n *\n * @param {SVGElement} textEl The element to append to\n * @param {string} txt The member\n * @param {boolean} isFirst\n * @param {{ padding: string; textHeight: string }} conf The configuration for the member\n */\nconst addTspan = function (textEl, txt, isFirst, conf) {\n let member = parseMember(txt);\n\n const tSpan = textEl.append('tspan').attr('x', conf.padding).text(member.displayText);\n\n if (member.cssStyle !== '') {\n tSpan.attr('style', member.cssStyle);\n }\n\n if (!isFirst) {\n tSpan.attr('dy', conf.textHeight);\n }\n};\n\n/**\n * Gives the styles for a classifier\n *\n * @param {'+' | '-' | '#' | '~' | '*' | '$'} classifier The classifier string\n * @returns {string} Styling for the classifier\n */\nconst parseClassifier = function (classifier) {\n switch (classifier) {\n case '*':\n return 'font-style:italic;';\n case '$':\n return 'text-decoration:underline;';\n default:\n return '';\n }\n};\n\nexport default {\n drawClass,\n drawEdge,\n parseMember,\n};\n","import { select } from 'd3';\nimport dagre from 'dagre';\nimport graphlib from 'graphlib';\nimport { log } from '../../logger';\nimport svgDraw from './svgDraw';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport { getConfig } from '../../config';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nlet idCache = {};\nconst padding = 20;\n\n/**\n * Gets the ID with the same label as in the cache\n *\n * @param {string} label The label to look for\n * @returns {string} The resulting ID\n */\nconst getGraphId = function (label) {\n const foundEntry = Object.entries(idCache).find((entry) => entry[1].label === label);\n\n if (foundEntry) {\n return foundEntry[0];\n }\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {SVGSVGElement} elem The SVG element to append to\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'extensionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'compositionEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'aggregationEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyStart')\n .attr('class', 'extension')\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param {any} _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n const conf = getConfig().class;\n idCache = {};\n // diagObj.db.clear();\n // diagObj.parser.parse(text);\n\n log.info('Rendering diagram ' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const g = new graphlib.Graph({\n multigraph: true,\n });\n\n // Set an object for the graph label\n g.setGraph({\n isMultiGraph: true,\n });\n\n // Default to assigning a new object as a label for each new edge.\n g.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const classes = diagObj.db.getClasses();\n const keys = Object.keys(classes);\n\n for (let i = 0; i < keys.length; i++) {\n const classDef = classes[keys[i]];\n const node = svgDraw.drawClass(diagram, classDef, conf, diagObj);\n idCache[node.id] = node;\n\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n g.setNode(node.id, node);\n\n log.info('Org height: ' + node.height);\n }\n\n const relations = diagObj.db.getRelations();\n relations.forEach(function (relation) {\n log.info(\n 'tjoho' + getGraphId(relation.id1) + getGraphId(relation.id2) + JSON.stringify(relation)\n );\n g.setEdge(\n getGraphId(relation.id1),\n getGraphId(relation.id2),\n {\n relation: relation,\n },\n relation.title || 'DEFAULT'\n );\n });\n\n dagre.layout(g);\n g.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof g.node(v) !== 'undefined') {\n log.debug('Node ' + v + ': ' + JSON.stringify(g.node(v)));\n root\n .select('#' + diagObj.db.lookUpDomId(v))\n .attr(\n 'transform',\n 'translate(' +\n (g.node(v).x - g.node(v).width / 2) +\n ',' +\n (g.node(v).y - g.node(v).height / 2) +\n ' )'\n );\n }\n });\n\n g.edges().forEach(function (e) {\n if (typeof e !== 'undefined' && typeof g.edge(e) !== 'undefined') {\n log.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(g.edge(e)));\n svgDraw.drawEdge(diagram, g.edge(e), g.edge(e).relation, conf, diagObj);\n }\n });\n\n const svgBounds = diagram.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n log.debug(`viewBox ${vBox}`);\n diagram.attr('viewBox', vBox);\n addSVGAccessibilityFields(diagObj.db, diagram, id);\n};\n\nexport default {\n draw,\n};\n","/** Setup arrow head and define the marker. The result is appended to the svg. */\n\nimport { log } from '../logger';\n\n// Only add the number of markers that the diagram needs\nconst insertMarkers = (elem, markerArray, type, id) => {\n markerArray.forEach((markerName) => {\n markers[markerName](elem, type, id);\n });\n};\n\nconst extension = (elem, type, id) => {\n log.trace('Making markers for ', id);\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-extensionStart')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,7 L18,13 V 1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-extensionEnd')\n .attr('class', 'marker extension ' + type)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 1,1 V 13 L18,7 Z'); // this is actual shape for arrowhead\n};\n\nconst composition = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-compositionStart')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-compositionEnd')\n .attr('class', 'marker composition ' + type)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst aggregation = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-aggregationStart')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-aggregationEnd')\n .attr('class', 'marker aggregation ' + type)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L1,7 L9,1 Z');\n};\nconst dependency = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-dependencyStart')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 5,7 L9,13 L1,7 L9,1 Z');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-dependencyEnd')\n .attr('class', 'marker dependency ' + type)\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\nconst lollipop = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-lollipopStart')\n .attr('class', 'marker lollipop ' + type)\n .attr('refX', 0)\n .attr('refY', 7)\n .attr('markerWidth', 190)\n .attr('markerHeight', 240)\n .attr('orient', 'auto')\n .append('circle')\n .attr('stroke', 'black')\n .attr('fill', 'white')\n .attr('cx', 6)\n .attr('cy', 7)\n .attr('r', 6);\n};\nconst point = (elem, type) => {\n elem\n .append('marker')\n .attr('id', type + '-pointEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 10)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n elem\n .append('marker')\n .attr('id', type + '-pointStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 0)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 5 L 10 10 L 10 0 z')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst circle = (elem, type) => {\n elem\n .append('marker')\n .attr('id', type + '-circleEnd')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 11)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', type + '-circleStart')\n .attr('class', 'marker ' + type)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', -1)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', '5')\n .attr('cy', '5')\n .attr('r', '5')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n};\nconst cross = (elem, type) => {\n elem\n .append('marker')\n .attr('id', type + '-crossEnd')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', 12)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n\n elem\n .append('marker')\n .attr('id', type + '-crossStart')\n .attr('class', 'marker cross ' + type)\n .attr('viewBox', '0 0 11 11')\n .attr('refX', -1)\n .attr('refY', 5.2)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 11)\n .attr('markerHeight', 11)\n .attr('orient', 'auto')\n .append('path')\n // .attr('stroke', 'black')\n .attr('d', 'M 1,1 l 9,9 M 10,1 l -9,9')\n .attr('class', 'arrowMarkerPath')\n .style('stroke-width', 2)\n .style('stroke-dasharray', '1,0');\n};\nconst barb = (elem, type) => {\n elem\n .append('defs')\n .append('marker')\n .attr('id', type + '-barbEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 14)\n .attr('markerUnits', 'strokeWidth')\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n// TODO rename the class diagram markers to something shape descriptive and semantic free\nconst markers = {\n extension,\n composition,\n aggregation,\n dependency,\n lollipop,\n point,\n circle,\n cross,\n barb,\n};\nexport default insertMarkers;\n","import { select } from 'd3';\nimport { log } from '../logger';\nimport { getConfig } from '../config';\nimport { evaluate } from '../diagrams/common/common';\nimport { decodeEntities } from '../mermaidAPI';\n\n/**\n * @param dom\n * @param styleFn\n */\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr('style', styleFn);\n }\n}\n\n/**\n * @param {any} node\n * @returns {SVGForeignObjectElement} Node\n */\nfunction addHtmlLabel(node) {\n const fo = select(document.createElementNS('http://www.w3.org/2000/svg', 'foreignObject'));\n const div = fo.append('xhtml:div');\n\n const label = node.label;\n const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n div.html(\n '' +\n label +\n ''\n );\n\n applyStyle(div, node.labelStyle);\n div.style('display', 'inline-block');\n // Fix for firefox\n div.style('white-space', 'nowrap');\n div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n return fo.node();\n}\n\nconst createLabel = (_vertexText, style, isTitle, isNode) => {\n let vertexText = _vertexText || '';\n if (typeof vertexText === 'object') vertexText = vertexText[0];\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n vertexText = vertexText.replace(/\\\\n|\\n/g, '
');\n log.info('vertexText' + vertexText);\n const node = {\n isNode,\n label: decodeEntities(vertexText).replace(\n /fa[lrsb]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n labelStyle: style.replace('fill:', 'color:'),\n };\n let vertexNode = addHtmlLabel(node);\n // vertexNode.parentNode.removeChild(vertexNode);\n return vertexNode;\n } else {\n const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', style.replace('color:', 'fill:'));\n let rows = [];\n if (typeof vertexText === 'string') {\n rows = vertexText.split(/\\\\n|\\n|/gi);\n } else if (Array.isArray(vertexText)) {\n rows = vertexText;\n } else {\n rows = [];\n }\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '0');\n if (isTitle) {\n tspan.setAttribute('class', 'title-row');\n } else {\n tspan.setAttribute('class', 'row');\n }\n tspan.textContent = rows[j].trim();\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n }\n};\n\nexport default createLabel;\n","import createLabel from '../createLabel';\nimport { getConfig } from '../../config';\nimport { decodeEntities } from '../../mermaidAPI';\nimport { select } from 'd3';\nimport { evaluate, sanitizeText } from '../../diagrams/common/common';\nexport const labelHelper = (parent, node, _classes, isNode) => {\n let classes;\n if (!_classes) {\n classes = 'node default';\n } else {\n classes = _classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);\n\n // Replace labelText with default value if undefined\n let labelText;\n if (typeof node.labelText === 'undefined') {\n labelText = '';\n } else {\n labelText = typeof node.labelText === 'string' ? node.labelText : node.labelText[0];\n }\n\n const text = label\n .node()\n .appendChild(\n createLabel(\n sanitizeText(decodeEntities(labelText), getConfig()),\n node.labelStyle,\n false,\n isNode\n )\n );\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const halfPadding = node.padding / 2;\n\n // Center the label\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n return { shapeSvg, bbox, halfPadding, label };\n};\n\nexport const updateNodeBounds = (node, element) => {\n const bbox = element.node().getBBox();\n node.width = bbox.width;\n node.height = bbox.height;\n};\n\n/**\n * @param parent\n * @param w\n * @param h\n * @param points\n */\nexport function insertPolygonShape(parent, w, h, points) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('class', 'label-container')\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n","/** Decorates with functions required by mermaids dagre-wrapper. */\nimport { log } from '../logger';\nimport graphlib from 'graphlib';\n\nexport let clusterDb = {};\nlet decendants = {};\nlet parents = {};\n\nexport const clear = () => {\n decendants = {};\n parents = {};\n clusterDb = {};\n};\n\nconst isDecendant = (id, ancenstorId) => {\n // if (id === ancenstorId) return true;\n\n log.trace(\n 'In isDecendant',\n ancenstorId,\n ' ',\n id,\n ' = ',\n decendants[ancenstorId].indexOf(id) >= 0\n );\n if (decendants[ancenstorId].indexOf(id) >= 0) return true;\n\n return false;\n};\n\nconst edgeInCluster = (edge, clusterId) => {\n log.info('Decendants of ', clusterId, ' is ', decendants[clusterId]);\n log.info('Edge is ', edge);\n // Edges to/from the cluster is not in the cluster, they are in the parent\n if (edge.v === clusterId) return false;\n if (edge.w === clusterId) return false;\n\n if (!decendants[clusterId]) {\n log.debug('Tilt, ', clusterId, ',not in decendants');\n return false;\n }\n if (decendants[clusterId].indexOf(edge.v) >= 0) return true;\n if (isDecendant(edge.v, clusterId)) return true;\n if (isDecendant(edge.w, clusterId)) return true;\n if (decendants[clusterId].indexOf(edge.w) >= 0) return true;\n\n return false;\n};\n\nconst copy = (clusterId, graph, newGraph, rootId) => {\n log.warn(\n 'Copying children of ',\n clusterId,\n 'root',\n rootId,\n 'data',\n graph.node(clusterId),\n rootId\n );\n const nodes = graph.children(clusterId) || [];\n\n // Include cluster node if it is not the root\n if (clusterId !== rootId) {\n nodes.push(clusterId);\n }\n\n log.warn('Copying (nodes) clusterId', clusterId, 'nodes', nodes);\n\n nodes.forEach((node) => {\n if (graph.children(node).length > 0) {\n copy(node, graph, newGraph, rootId);\n } else {\n const data = graph.node(node);\n log.info('cp ', node, ' to ', rootId, ' with parent ', clusterId); //,node, data, ' parent is ', clusterId);\n newGraph.setNode(node, data);\n if (rootId !== graph.parent(node)) {\n log.warn('Setting parent', node, graph.parent(node));\n newGraph.setParent(node, graph.parent(node));\n }\n\n if (clusterId !== rootId && node !== clusterId) {\n log.debug('Setting parent', node, clusterId);\n newGraph.setParent(node, clusterId);\n } else {\n log.info('In copy ', clusterId, 'root', rootId, 'data', graph.node(clusterId), rootId);\n log.debug(\n 'Not Setting parent for node=',\n node,\n 'cluster!==rootId',\n clusterId !== rootId,\n 'node!==clusterId',\n node !== clusterId\n );\n }\n const edges = graph.edges(node);\n log.debug('Copying Edges', edges);\n edges.forEach((edge) => {\n log.info('Edge', edge);\n const data = graph.edge(edge.v, edge.w, edge.name);\n log.info('Edge data', data, rootId);\n try {\n // Do not copy edges in and out of the root cluster, they belong to the parent graph\n if (edgeInCluster(edge, rootId)) {\n log.info('Copying as ', edge.v, edge.w, data, edge.name);\n newGraph.setEdge(edge.v, edge.w, data, edge.name);\n log.info('newGraph edges ', newGraph.edges(), newGraph.edge(newGraph.edges()[0]));\n } else {\n log.info(\n 'Skipping copy of edge ',\n edge.v,\n '-->',\n edge.w,\n ' rootId: ',\n rootId,\n ' clusterId:',\n clusterId\n );\n }\n } catch (e) {\n log.error(e);\n }\n });\n }\n log.debug('Removing node', node);\n graph.removeNode(node);\n });\n};\nexport const extractDecendants = (id, graph) => {\n // log.debug('Extracting ', id);\n const children = graph.children(id);\n let res = [].concat(children);\n\n for (let i = 0; i < children.length; i++) {\n parents[children[i]] = id;\n res = res.concat(extractDecendants(children[i], graph));\n }\n\n return res;\n};\n\n/**\n * Validates the graph, checking that all parent child relation points to existing nodes and that\n * edges between nodes also ia correct. When not correct the function logs the discrepancies.\n *\n * @param graph\n */\nexport const validate = (graph) => {\n const edges = graph.edges();\n log.trace('Edges: ', edges);\n for (let i = 0; i < edges.length; i++) {\n if (graph.children(edges[i].v).length > 0) {\n log.trace('The node ', edges[i].v, ' is part of and edge even though it has children');\n return false;\n }\n if (graph.children(edges[i].w).length > 0) {\n log.trace('The node ', edges[i].w, ' is part of and edge even though it has children');\n return false;\n }\n }\n return true;\n};\n\n/**\n * Finds a child that is not a cluster. When faking an edge between a node and a cluster.\n *\n * @param id\n * @param {any} graph\n */\nexport const findNonClusterChild = (id, graph) => {\n // const node = graph.node(id);\n log.trace('Searching', id);\n // const children = graph.children(id).reverse();\n const children = graph.children(id); //.reverse();\n log.trace('Searching children of id ', id, children);\n if (children.length < 1) {\n log.trace('This is a valid node', id);\n return id;\n }\n for (let i = 0; i < children.length; i++) {\n const _id = findNonClusterChild(children[i], graph);\n if (_id) {\n log.trace('Found replacement for', id, ' => ', _id);\n return _id;\n }\n }\n};\n\nconst getAnchorId = (id) => {\n if (!clusterDb[id]) {\n return id;\n }\n // If the cluster has no external connections\n if (!clusterDb[id].externalConnections) {\n return id;\n }\n\n // Return the replacement node\n if (clusterDb[id]) {\n return clusterDb[id].id;\n }\n return id;\n};\n\nexport const adjustClustersAndEdges = (graph, depth) => {\n if (!graph || depth > 10) {\n log.debug('Opting out, no graph ');\n return;\n } else {\n log.debug('Opting in, graph ');\n }\n // Go through the nodes and for each cluster found, save a replacement node, this can be used when\n // faking a link to a cluster\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n if (children.length > 0) {\n log.warn(\n 'Cluster identified',\n id,\n ' Replacement id in edges: ',\n findNonClusterChild(id, graph)\n );\n decendants[id] = extractDecendants(id, graph);\n clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) };\n }\n });\n\n // Check incoming and outgoing edges for each cluster\n graph.nodes().forEach(function (id) {\n const children = graph.children(id);\n const edges = graph.edges();\n if (children.length > 0) {\n log.debug('Cluster identified', id, decendants);\n edges.forEach((edge) => {\n // log.debug('Edge, decendants: ', edge, decendants[id]);\n\n // Check if any edge leaves the cluster (not the actual cluster, that's a link from the box)\n if (edge.v !== id && edge.w !== id) {\n // Any edge where either the one of the nodes is decending to the cluster but not the other\n // if (decendants[id].indexOf(edge.v) < 0 && decendants[id].indexOf(edge.w) < 0) {\n\n const d1 = isDecendant(edge.v, id);\n const d2 = isDecendant(edge.w, id);\n\n // d1 xor d2 - if either d1 is true and d2 is false or the other way around\n if (d1 ^ d2) {\n log.warn('Edge: ', edge, ' leaves cluster ', id);\n log.warn('Decendants of XXX ', id, ': ', decendants[id]);\n clusterDb[id].externalConnections = true;\n }\n }\n });\n } else {\n log.debug('Not a cluster ', id, decendants);\n }\n });\n\n // For clusters with incoming and/or outgoing edges translate those edges to a real node\n // in the cluster in order to fake the edge\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.warn('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n\n let v = e.v;\n let w = e.w;\n // Check if link is either from or to a cluster\n log.warn(\n 'Fix XXX',\n clusterDb,\n 'ids:',\n e.v,\n e.w,\n 'Translateing: ',\n clusterDb[e.v],\n ' --- ',\n clusterDb[e.w]\n );\n if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) {\n log.warn('Fixing and trixing link to self - removing XXX', e.v, e.w, e.name);\n log.warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n const specialId = e.w + '---' + e.v;\n graph.setNode(specialId, {\n domId: specialId,\n id: specialId,\n labelStyle: '',\n labelText: edge.label,\n padding: 0,\n shape: 'labelRect',\n style: '',\n });\n const edge1 = JSON.parse(JSON.stringify(edge));\n const edge2 = JSON.parse(JSON.stringify(edge));\n edge1.label = '';\n edge1.arrowTypeEnd = 'none';\n edge2.label = '';\n edge1.fromCluster = e.v;\n edge2.toCluster = e.v;\n\n graph.setEdge(v, specialId, edge1, e.name + '-cyclic-special');\n graph.setEdge(specialId, w, edge2, e.name + '-cyclic-special');\n } else if (clusterDb[e.v] || clusterDb[e.w]) {\n log.warn('Fixing and trixing - removing XXX', e.v, e.w, e.name);\n v = getAnchorId(e.v);\n w = getAnchorId(e.w);\n graph.removeEdge(e.v, e.w, e.name);\n if (v !== e.v) edge.fromCluster = e.v;\n if (w !== e.w) edge.toCluster = e.w;\n log.warn('Fix Replacing with XXX', v, w, e.name);\n graph.setEdge(v, w, edge, e.name);\n }\n });\n log.warn('Adjusted Graph', graphlib.json.write(graph));\n extractor(graph, 0);\n\n log.trace(clusterDb);\n\n // Remove references to extracted cluster\n // graph.edges().forEach(edge => {\n // if (isDecendant(edge.v, clusterId) || isDecendant(edge.w, clusterId)) {\n // graph.removeEdge(edge);\n // }\n // });\n};\n\nexport const extractor = (graph, depth) => {\n log.warn('extractor - ', depth, graphlib.json.write(graph), graph.children('D'));\n if (depth > 10) {\n log.error('Bailing out');\n return;\n }\n // For clusters without incoming and/or outgoing edges, create a new cluster-node\n // containing the nodes and edges in the custer in a new graph\n // for (let i = 0;)\n let nodes = graph.nodes();\n let hasChildren = false;\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const children = graph.children(node);\n hasChildren = hasChildren || children.length > 0;\n }\n\n if (!hasChildren) {\n log.debug('Done, no node has children', graph.nodes());\n return;\n }\n // const clusters = Object.keys(clusterDb);\n // clusters.forEach(clusterId => {\n log.debug('Nodes = ', nodes, depth);\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n\n log.debug(\n 'Extracting node',\n node,\n clusterDb,\n clusterDb[node] && !clusterDb[node].externalConnections,\n !graph.parent(node),\n graph.node(node),\n graph.children('D'),\n ' Depth ',\n depth\n );\n // Note that the node might have been removed after the Object.keys call so better check\n // that it still is in the game\n if (!clusterDb[node]) {\n // Skip if the node is not a cluster\n log.debug('Not a cluster', node, depth);\n // break;\n } else if (\n !clusterDb[node].externalConnections &&\n // !graph.parent(node) &&\n graph.children(node) &&\n graph.children(node).length > 0\n ) {\n log.warn(\n 'Cluster without external connections, without a parent and with children',\n node,\n depth\n );\n\n const graphSettings = graph.graph();\n let dir = graphSettings.rankdir === 'TB' ? 'LR' : 'TB';\n if (clusterDb[node]) {\n if (clusterDb[node].clusterData && clusterDb[node].clusterData.dir) {\n dir = clusterDb[node].clusterData.dir;\n log.warn('Fixing dir', clusterDb[node].clusterData.dir, dir);\n }\n }\n\n const clusterGraph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir, // Todo: set proper spacing\n nodesep: 50,\n ranksep: 50,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n log.warn('Old graph before copy', graphlib.json.write(graph));\n copy(node, graph, clusterGraph, node);\n graph.setNode(node, {\n clusterNode: true,\n id: node,\n clusterData: clusterDb[node].clusterData,\n labelText: clusterDb[node].labelText,\n graph: clusterGraph,\n });\n log.warn('New graph after copy node: (', node, ')', graphlib.json.write(clusterGraph));\n log.debug('Old graph after copy', graphlib.json.write(graph));\n } else {\n log.warn(\n 'Cluster ** ',\n node,\n ' **not meeting the criteria !externalConnections:',\n !clusterDb[node].externalConnections,\n ' no parent: ',\n !graph.parent(node),\n ' children ',\n graph.children(node) && graph.children(node).length > 0,\n graph.children('D'),\n depth\n );\n log.debug(clusterDb);\n }\n }\n\n nodes = graph.nodes();\n log.warn('New list of nodes', nodes);\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n const data = graph.node(node);\n log.warn(' Now next level', node, data);\n if (data.clusterNode) {\n extractor(data.graph, depth + 1);\n }\n }\n};\n\nconst sorter = (graph, nodes) => {\n if (nodes.length === 0) return [];\n let result = Object.assign(nodes);\n nodes.forEach((node) => {\n const children = graph.children(node);\n const sorted = sorter(graph, children);\n result = result.concat(sorted);\n });\n\n return result;\n};\n\nexport const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());\n","/**\n * @param node\n * @param point\n */\nfunction intersectNode(node, point) {\n // console.info('Intersect Node');\n return node.intersect(point);\n}\n\nexport default intersectNode;\n","/**\n * @param node\n * @param rx\n * @param ry\n * @param point\n */\nfunction intersectEllipse(node, rx, ry, point) {\n // Formulae from: https://mathworld.wolfram.com/Ellipse-LineIntersection.html\n\n var cx = node.x;\n var cy = node.y;\n\n var px = cx - point.x;\n var py = cy - point.y;\n\n var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);\n\n var dx = Math.abs((rx * ry * px) / det);\n if (point.x < cx) {\n dx = -dx;\n }\n var dy = Math.abs((rx * ry * py) / det);\n if (point.y < cy) {\n dy = -dy;\n }\n\n return { x: cx + dx, y: cy + dy };\n}\n\nexport default intersectEllipse;\n","import intersectEllipse from './intersect-ellipse';\n\n/**\n * @param node\n * @param rx\n * @param point\n */\nfunction intersectCircle(node, rx, point) {\n return intersectEllipse(node, rx, rx, point);\n}\n\nexport default intersectCircle;\n","/**\n * Returns the point at which two lines, p and q, intersect or returns undefined if they do not intersect.\n *\n * @param p1\n * @param p2\n * @param q1\n * @param q2\n */\nfunction intersectLine(p1, p2, q1, q2) {\n // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n // p7 and p473.\n\n var a1, a2, b1, b2, c1, c2;\n var r1, r2, r3, r4;\n var denom, offset, num;\n var x, y;\n\n // Compute a1, b1, c1, where line joining points 1 and 2 is F(x,y) = a1 x +\n // b1 y + c1 = 0.\n a1 = p2.y - p1.y;\n b1 = p1.x - p2.x;\n c1 = p2.x * p1.y - p1.x * p2.y;\n\n // Compute r3 and r4.\n r3 = a1 * q1.x + b1 * q1.y + c1;\n r4 = a1 * q2.x + b1 * q2.y + c1;\n\n // Check signs of r3 and r4. If both point 3 and point 4 lie on\n // same side of line 1, the line segments do not intersect.\n if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {\n return /*DONT_INTERSECT*/;\n }\n\n // Compute a2, b2, c2 where line joining points 3 and 4 is G(x,y) = a2 x + b2 y + c2 = 0\n a2 = q2.y - q1.y;\n b2 = q1.x - q2.x;\n c2 = q2.x * q1.y - q1.x * q2.y;\n\n // Compute r1 and r2\n r1 = a2 * p1.x + b2 * p1.y + c2;\n r2 = a2 * p2.x + b2 * p2.y + c2;\n\n // Check signs of r1 and r2. If both point 1 and point 2 lie\n // on same side of second line segment, the line segments do\n // not intersect.\n if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {\n return /*DONT_INTERSECT*/;\n }\n\n // Line segments intersect: compute intersection point.\n denom = a1 * b2 - a2 * b1;\n if (denom === 0) {\n return /*COLLINEAR*/;\n }\n\n offset = Math.abs(denom / 2);\n\n // The denom/2 is to get rounding instead of truncating. It\n // is added or subtracted to the numerator, depending upon the\n // sign of the numerator.\n num = b1 * c2 - b2 * c1;\n x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n num = a2 * c1 - a1 * c2;\n y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n return { x: x, y: y };\n}\n\n/**\n * @param r1\n * @param r2\n */\nfunction sameSign(r1, r2) {\n return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n","/* eslint \"no-console\": off */\n\nimport intersectLine from './intersect-line';\n\nexport default intersectPolygon;\n\n/**\n * Returns the point ({x, y}) at which the point argument intersects with the node argument assuming\n * that it has the shape specified by polygon.\n *\n * @param node\n * @param polyPoints\n * @param point\n */\nfunction intersectPolygon(node, polyPoints, point) {\n var x1 = node.x;\n var y1 = node.y;\n\n var intersections = [];\n\n var minX = Number.POSITIVE_INFINITY;\n var minY = Number.POSITIVE_INFINITY;\n if (typeof polyPoints.forEach === 'function') {\n polyPoints.forEach(function (entry) {\n minX = Math.min(minX, entry.x);\n minY = Math.min(minY, entry.y);\n });\n } else {\n minX = Math.min(minX, polyPoints.x);\n minY = Math.min(minY, polyPoints.y);\n }\n\n var left = x1 - node.width / 2 - minX;\n var top = y1 - node.height / 2 - minY;\n\n for (var i = 0; i < polyPoints.length; i++) {\n var p1 = polyPoints[i];\n var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n var intersect = intersectLine(\n node,\n point,\n { x: left + p1.x, y: top + p1.y },\n { x: left + p2.x, y: top + p2.y }\n );\n if (intersect) {\n intersections.push(intersect);\n }\n }\n\n if (!intersections.length) {\n // console.log('NO INTERSECTION FOUND, RETURN NODE CENTER', node);\n return node;\n }\n\n if (intersections.length > 1) {\n // More intersections, find the one nearest to edge end point\n intersections.sort(function (p, q) {\n var pdx = p.x - point.x;\n var pdy = p.y - point.y;\n var distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n var qdx = q.x - point.x;\n var qdy = q.y - point.y;\n var distq = Math.sqrt(qdx * qdx + qdy * qdy);\n\n return distp < distq ? -1 : distp === distq ? 0 : 1;\n });\n }\n return intersections[0];\n}\n","const intersectRect = (node, point) => {\n var x = node.x;\n var y = node.y;\n\n // Rectangle intersection algorithm from:\n // https://math.stackexchange.com/questions/108113/find-edge-between-two-boxes\n var dx = point.x - x;\n var dy = point.y - y;\n var w = node.width / 2;\n var h = node.height / 2;\n\n var sx, sy;\n if (Math.abs(dy) * w > Math.abs(dx) * h) {\n // Intersection is top or bottom of rect.\n if (dy < 0) {\n h = -h;\n }\n sx = dy === 0 ? 0 : (h * dx) / dy;\n sy = h;\n } else {\n // Intersection is left or right of rect.\n if (dx < 0) {\n w = -w;\n }\n sx = w;\n sy = dx === 0 ? 0 : (w * dy) / dx;\n }\n\n return { x: x + sx, y: y + sy };\n};\n\nexport default intersectRect;\n","/*\n * Borrowed with love from from dagrge-d3. Many thanks to cpettitt!\n */\n\nimport node from './intersect-node.js';\nimport circle from './intersect-circle.js';\nimport ellipse from './intersect-ellipse.js';\nimport polygon from './intersect-polygon.js';\nimport rect from './intersect-rect.js';\n\nexport default {\n node,\n circle,\n ellipse,\n polygon,\n rect,\n};\n","import { updateNodeBounds, labelHelper } from './util';\nimport { log } from '../../logger';\nimport intersect from '../intersect/index.js';\n\nconst note = (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes, true);\n\n log.info('Classes = ', node.classes);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nexport default note;\n","import { select } from 'd3';\nimport { log } from '../logger';\nimport { labelHelper, updateNodeBounds, insertPolygonShape } from './shapes/util';\nimport { getConfig } from '../config';\nimport intersect from './intersect/index.js';\nimport createLabel from './createLabel';\nimport note from './shapes/note';\nimport { parseMember } from '../diagrams/class/svgDraw';\nimport { evaluate } from '../diagrams/common/common';\n\nconst question = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const s = w + h;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n\n log.info('Question main (Circle)');\n\n const questionElem = insertPolygonShape(shapeSvg, s, s, points);\n questionElem.attr('style', node.style);\n updateNodeBounds(node, questionElem);\n\n node.intersect = function (point) {\n log.warn('Intersect called');\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst choice = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n const s = 28;\n const points = [\n { x: 0, y: s / 2 },\n { x: s / 2, y: 0 },\n { x: 0, y: -s / 2 },\n { x: -s / 2, y: 0 },\n ];\n\n const choice = shapeSvg.insert('polygon', ':first-child').attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n );\n // center the circle around its coordinate\n choice.attr('class', 'state-start').attr('r', 7).attr('width', 28).attr('height', 28);\n node.width = 28;\n node.height = 28;\n\n node.intersect = function (point) {\n return intersect.circle(node, 14, point);\n };\n\n return shapeSvg;\n};\n\nconst hexagon = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const f = 4;\n const h = bbox.height + node.padding;\n const m = h / f;\n const w = bbox.width + 2 * m + node.padding;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const hex = insertPolygonShape(shapeSvg, w, h, points);\n hex.attr('style', node.style);\n updateNodeBounds(node, hex);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_left_inv_arrow = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n\n node.width = w + h;\n node.height = h;\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_right = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst lean_left = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst trapezoid = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst inv_trapezoid = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst rect_right_inv_arrow = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst cylinder = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry + node.padding;\n\n const shape =\n 'M 0,' +\n ry +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n -w +\n ' 0 l 0,' +\n h +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 l 0,' +\n -h;\n\n const el = shapeSvg\n .attr('label-offset-y', ry)\n .insert('path', ':first-child')\n .attr('style', node.style)\n .attr('d', shape)\n .attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n const pos = intersect.rect(node, point);\n const x = pos.x - node.x;\n\n if (\n rx != 0 &&\n (Math.abs(x) < node.width / 2 ||\n (Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry))\n ) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjustion value for pos.y\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y != 0) y = Math.sqrt(y);\n y = ry - y;\n if (point.y - node.y > 0) y = -y;\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n};\n\nconst rect = (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes, true);\n\n log.trace('Classes = ', node.classes);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const totalWidth = bbox.width + node.padding;\n const totalHeight = bbox.height + node.padding;\n rect\n .attr('class', 'basic label-container')\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', totalWidth)\n .attr('height', totalHeight);\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst labelRect = (parent, node) => {\n const { shapeSvg } = labelHelper(parent, node, 'label', true);\n\n log.trace('Classes = ', node.classes);\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Hide the rect we are only after the label\n const totalWidth = 0;\n const totalHeight = 0;\n rect.attr('width', totalWidth).attr('height', totalHeight);\n shapeSvg.attr('class', 'label edgeLabel');\n\n if (node.props) {\n const propKeys = new Set(Object.keys(node.props));\n if (node.props.borders) {\n applyNodePropertyBorders(rect, node.props.borders, totalWidth, totalHeight);\n propKeys.delete('borders');\n }\n propKeys.forEach((propKey) => {\n log.warn(`Unknown node property ${propKey}`);\n });\n }\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * @param rect\n * @param borders\n * @param totalWidth\n * @param totalHeight\n */\nfunction applyNodePropertyBorders(rect, borders, totalWidth, totalHeight) {\n const strokeDashArray = [];\n const addBorder = (length) => {\n strokeDashArray.push(length);\n strokeDashArray.push(0);\n };\n const skipBorder = (length) => {\n strokeDashArray.push(0);\n strokeDashArray.push(length);\n };\n if (borders.includes('t')) {\n log.debug('add top border');\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes('r')) {\n log.debug('add right border');\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n if (borders.includes('b')) {\n log.debug('add bottom border');\n addBorder(totalWidth);\n } else {\n skipBorder(totalWidth);\n }\n if (borders.includes('l')) {\n log.debug('add left border');\n addBorder(totalHeight);\n } else {\n skipBorder(totalHeight);\n }\n rect.attr('stroke-dasharray', strokeDashArray.join(' '));\n}\n\nconst rectWithTitle = (parent, node) => {\n // const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, 'node ' + node.classes);\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n // const innerRect = shapeSvg.insert('rect');\n const innerLine = shapeSvg.insert('line');\n\n const label = shapeSvg.insert('g').attr('class', 'label');\n\n const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;\n // const text2 = typeof text2prim === 'object' ? text2prim[0] : text2prim;\n\n let title = '';\n if (typeof text2 === 'object') {\n title = text2[0];\n } else {\n title = text2;\n }\n log.info('Label text abc79', title, text2, typeof text2 === 'object');\n\n const text = label.node().appendChild(createLabel(title, node.labelStyle, true, true));\n let bbox = { width: 0, height: 0 };\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n log.info('Text 2', text2);\n const textRows = text2.slice(1, text2.length);\n let titleBox = text.getBBox();\n const descr = label\n .node()\n .appendChild(\n createLabel(textRows.join ? textRows.join('
') : textRows, node.labelStyle, true, true)\n );\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = descr.children[0];\n const dv = select(descr);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n // bbox = label.getBBox();\n // log.info(descr);\n const halfPadding = node.padding / 2;\n select(descr).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n ', ' +\n (titleBox.height + halfPadding + 5) +\n ')'\n );\n select(text).attr(\n 'transform',\n 'translate( ' +\n // (titleBox.width - bbox.width) / 2 +\n (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n ', ' +\n 0 +\n ')'\n );\n // Get the size of the label\n\n // Bounding box for title and text\n bbox = label.node().getBBox();\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n );\n\n rect\n .attr('class', 'outer title-state')\n .attr('x', -bbox.width / 2 - halfPadding)\n .attr('y', -bbox.height / 2 - halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n innerLine\n .attr('class', 'divider')\n .attr('x1', -bbox.width / 2 - halfPadding)\n .attr('x2', bbox.width / 2 + halfPadding)\n .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst stadium = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const h = bbox.height + node.padding;\n const w = bbox.width + h / 4 + node.padding;\n\n // add the rect\n const rect = shapeSvg\n .insert('rect', ':first-child')\n .attr('style', node.style)\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst circle = (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, undefined, true);\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('Circle main');\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n log.info('Circle intersect', node, bbox.width / 2 + halfPadding, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding, point);\n };\n\n return shapeSvg;\n};\n\nconst doublecircle = (parent, node) => {\n const { shapeSvg, bbox, halfPadding } = labelHelper(parent, node, undefined, true);\n const gap = 5;\n const circleGroup = shapeSvg.insert('g', ':first-child');\n const outerCircle = circleGroup.insert('circle');\n const innerCircle = circleGroup.insert('circle');\n\n // center the circle around its coordinate\n outerCircle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding + gap)\n .attr('width', bbox.width + node.padding + gap * 2)\n .attr('height', bbox.height + node.padding + gap * 2);\n\n innerCircle\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('r', bbox.width / 2 + halfPadding)\n .attr('width', bbox.width + node.padding)\n .attr('height', bbox.height + node.padding);\n\n log.info('DoubleCircle main');\n\n updateNodeBounds(node, outerCircle);\n\n node.intersect = function (point) {\n log.info('DoubleCircle intersect', node, bbox.width / 2 + halfPadding + gap, point);\n return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point);\n };\n\n return shapeSvg;\n};\n\nconst subroutine = (parent, node) => {\n const { shapeSvg, bbox } = labelHelper(parent, node, undefined, true);\n\n const w = bbox.width + node.padding;\n const h = bbox.height + node.padding;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n\n const el = insertPolygonShape(shapeSvg, w, h, points);\n el.attr('style', node.style);\n updateNodeBounds(node, el);\n\n node.intersect = function (point) {\n return intersect.polygon(node, points, point);\n };\n\n return shapeSvg;\n};\n\nconst start = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const circle = shapeSvg.insert('circle', ':first-child');\n\n // center the circle around its coordinate\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst forkJoin = (parent, node, dir) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n\n let width = 70;\n let height = 10;\n\n if (dir === 'LR') {\n width = 10;\n height = 70;\n }\n\n const shape = shapeSvg\n .append('rect')\n .attr('x', (-1 * width) / 2)\n .attr('y', (-1 * height) / 2)\n .attr('width', width)\n .attr('height', height)\n .attr('class', 'fork-join');\n\n updateNodeBounds(node, shape);\n node.height = node.height + node.padding / 2;\n node.width = node.width + node.padding / 2;\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst end = (parent, node) => {\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'node default')\n .attr('id', node.domId || node.id);\n const innerCircle = shapeSvg.insert('circle', ':first-child');\n const circle = shapeSvg.insert('circle', ':first-child');\n\n circle.attr('class', 'state-start').attr('r', 7).attr('width', 14).attr('height', 14);\n\n innerCircle.attr('class', 'state-end').attr('r', 5).attr('width', 10).attr('height', 10);\n\n updateNodeBounds(node, circle);\n\n node.intersect = function (point) {\n return intersect.circle(node, 7, point);\n };\n\n return shapeSvg;\n};\n\nconst class_box = (parent, node) => {\n const halfPadding = node.padding / 2;\n const rowPadding = 4;\n const lineHeight = 8;\n\n let classes;\n if (!node.classes) {\n classes = 'node default';\n } else {\n classes = 'node ' + node.classes;\n }\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', classes)\n .attr('id', node.domId || node.id);\n\n // Create the title label and insert it after the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n const topLine = shapeSvg.insert('line');\n const bottomLine = shapeSvg.insert('line');\n let maxWidth = 0;\n let maxHeight = rowPadding;\n\n const labelContainer = shapeSvg.insert('g').attr('class', 'label');\n let verticalPos = 0;\n const hasInterface = node.classData.annotations && node.classData.annotations[0];\n\n // 1. Create the labels\n const interfaceLabelText = node.classData.annotations[0]\n ? '«' + node.classData.annotations[0] + '»'\n : '';\n const interfaceLabel = labelContainer\n .node()\n .appendChild(createLabel(interfaceLabelText, node.labelStyle, true, true));\n let interfaceBBox = interfaceLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = interfaceLabel.children[0];\n const dv = select(interfaceLabel);\n interfaceBBox = div.getBoundingClientRect();\n dv.attr('width', interfaceBBox.width);\n dv.attr('height', interfaceBBox.height);\n }\n if (node.classData.annotations[0]) {\n maxHeight += interfaceBBox.height + rowPadding;\n maxWidth += interfaceBBox.width;\n }\n\n let classTitleString = node.classData.id;\n\n if (node.classData.type !== undefined && node.classData.type !== '') {\n if (getConfig().flowchart.htmlLabels) {\n classTitleString += '<' + node.classData.type + '>';\n } else {\n classTitleString += '<' + node.classData.type + '>';\n }\n }\n const classTitleLabel = labelContainer\n .node()\n .appendChild(createLabel(classTitleString, node.labelStyle, true, true));\n select(classTitleLabel).attr('class', 'classTitle');\n let classTitleBBox = classTitleLabel.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = classTitleLabel.children[0];\n const dv = select(classTitleLabel);\n classTitleBBox = div.getBoundingClientRect();\n dv.attr('width', classTitleBBox.width);\n dv.attr('height', classTitleBBox.height);\n }\n maxHeight += classTitleBBox.height + rowPadding;\n if (classTitleBBox.width > maxWidth) {\n maxWidth = classTitleBBox.width;\n }\n const classAttributes = [];\n node.classData.members.forEach((str) => {\n const parsedInfo = parseMember(str);\n let parsedText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n parsedText = parsedText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n parsedText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n classAttributes.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n const classMethods = [];\n node.classData.methods.forEach((str) => {\n const parsedInfo = parseMember(str);\n let displayText = parsedInfo.displayText;\n if (getConfig().flowchart.htmlLabels) {\n displayText = displayText.replace(//g, '>');\n }\n const lbl = labelContainer\n .node()\n .appendChild(\n createLabel(\n displayText,\n parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,\n true,\n true\n )\n );\n let bbox = lbl.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = lbl.children[0];\n const dv = select(lbl);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n if (bbox.width > maxWidth) {\n maxWidth = bbox.width;\n }\n maxHeight += bbox.height + rowPadding;\n\n classMethods.push(lbl);\n });\n\n maxHeight += lineHeight;\n\n // 2. Position the labels\n\n // position the interface label\n if (hasInterface) {\n let diffX = (maxWidth - interfaceBBox.width) / 2;\n select(interfaceLabel).attr(\n 'transform',\n 'translate( ' + ((-1 * maxWidth) / 2 + diffX) + ', ' + (-1 * maxHeight) / 2 + ')'\n );\n verticalPos = interfaceBBox.height + rowPadding;\n }\n // Position the class title label\n let diffX = (maxWidth - classTitleBBox.width) / 2;\n select(classTitleLabel).attr(\n 'transform',\n 'translate( ' +\n ((-1 * maxWidth) / 2 + diffX) +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos) +\n ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n\n topLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classAttributes.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' +\n -maxWidth / 2 +\n ', ' +\n ((-1 * maxHeight) / 2 + verticalPos + lineHeight / 2) +\n ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n });\n\n verticalPos += lineHeight;\n bottomLine\n .attr('class', 'divider')\n .attr('x1', -maxWidth / 2 - halfPadding)\n .attr('x2', maxWidth / 2 + halfPadding)\n .attr('y1', -maxHeight / 2 - halfPadding + lineHeight + verticalPos)\n .attr('y2', -maxHeight / 2 - halfPadding + lineHeight + verticalPos);\n\n verticalPos += lineHeight;\n\n classMethods.forEach((lbl) => {\n select(lbl).attr(\n 'transform',\n 'translate( ' + -maxWidth / 2 + ', ' + ((-1 * maxHeight) / 2 + verticalPos) + ')'\n );\n verticalPos += classTitleBBox.height + rowPadding;\n });\n //\n // let bbox;\n // if (evaluate(getConfig().flowchart.htmlLabels)) {\n // const div = interfaceLabel.children[0];\n // const dv = select(interfaceLabel);\n // bbox = div.getBoundingClientRect();\n // dv.attr('width', bbox.width);\n // dv.attr('height', bbox.height);\n // }\n // bbox = labelContainer.getBBox();\n\n // log.info('Text 2', text2);\n // const textRows = text2.slice(1, text2.length);\n // let titleBox = text.getBBox();\n // const descr = label\n // .node()\n // .appendChild(createLabel(textRows.join('
'), node.labelStyle, true, true));\n\n // if (evaluate(getConfig().flowchart.htmlLabels)) {\n // const div = descr.children[0];\n // const dv = select(descr);\n // bbox = div.getBoundingClientRect();\n // dv.attr('width', bbox.width);\n // dv.attr('height', bbox.height);\n // }\n // // bbox = label.getBBox();\n // // log.info(descr);\n // select(descr).attr(\n // 'transform',\n // 'translate( ' +\n // // (titleBox.width - bbox.width) / 2 +\n // (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) +\n // ', ' +\n // (titleBox.height + halfPadding + 5) +\n // ')'\n // );\n // select(text).attr(\n // 'transform',\n // 'translate( ' +\n // // (titleBox.width - bbox.width) / 2 +\n // (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) +\n // ', ' +\n // 0 +\n // ')'\n // );\n // // Get the size of the label\n\n // // Bounding box for title and text\n // bbox = label.node().getBBox();\n\n // // Center the label\n // label.attr(\n // 'transform',\n // 'translate(' + -bbox.width / 2 + ', ' + (-bbox.height / 2 - halfPadding + 3) + ')'\n // );\n\n rect\n .attr('class', 'outer title-state')\n .attr('x', -maxWidth / 2 - halfPadding)\n .attr('y', -(maxHeight / 2) - halfPadding)\n .attr('width', maxWidth + node.padding)\n .attr('height', maxHeight + node.padding);\n\n // innerLine\n // .attr('class', 'divider')\n // .attr('x1', -bbox.width / 2 - halfPadding)\n // .attr('x2', bbox.width / 2 + halfPadding)\n // .attr('y1', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding)\n // .attr('y2', -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);\n\n updateNodeBounds(node, rect);\n\n node.intersect = function (point) {\n return intersect.rect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = {\n question,\n rect,\n labelRect,\n rectWithTitle,\n choice,\n circle,\n doublecircle,\n stadium,\n hexagon,\n rect_left_inv_arrow,\n lean_right,\n lean_left,\n trapezoid,\n inv_trapezoid,\n rect_right_inv_arrow,\n cylinder,\n start,\n end,\n note,\n subroutine,\n fork: forkJoin,\n join: forkJoin,\n class_box,\n};\n\nlet nodeElems = {};\n\nexport const insertNode = (elem, node, dir) => {\n let newEl;\n let el;\n\n // Add link when appropriate\n if (node.link) {\n let target;\n if (getConfig().securityLevel === 'sandbox') {\n target = '_top';\n } else if (node.linkTarget) {\n target = node.linkTarget || '_blank';\n }\n newEl = elem.insert('svg:a').attr('xlink:href', node.link).attr('target', target);\n el = shapes[node.shape](newEl, node, dir);\n } else {\n el = shapes[node.shape](elem, node, dir);\n newEl = el;\n }\n if (node.tooltip) {\n el.attr('title', node.tooltip);\n }\n if (node.class) {\n el.attr('class', 'node default ' + node.class);\n }\n\n nodeElems[node.id] = newEl;\n\n if (node.haveCallback) {\n nodeElems[node.id].attr('class', nodeElems[node.id].attr('class') + ' clickable');\n }\n};\nexport const setNodeElem = (elem, node) => {\n nodeElems[node.id] = elem;\n};\nexport const clear = () => {\n nodeElems = {};\n};\n\nexport const positionNode = (node) => {\n const el = nodeElems[node.id];\n log.trace(\n 'Transforming node',\n node.diff,\n node,\n 'translate(' + (node.x - node.width / 2 - 5) + ', ' + node.width / 2 + ')'\n );\n const padding = 8;\n const diff = node.diff || 0;\n if (node.clusterNode) {\n el.attr(\n 'transform',\n 'translate(' +\n (node.x + diff - node.width / 2) +\n ', ' +\n (node.y - node.height / 2 - padding) +\n ')'\n );\n } else {\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n }\n return diff;\n};\n","import intersectRect from './intersect/intersect-rect';\nimport { log } from '../logger';\nimport createLabel from './createLabel';\nimport { select } from 'd3';\nimport { getConfig } from '../config';\nimport { evaluate } from '../diagrams/common/common';\n\nconst rect = (parent, node) => {\n log.trace('Creating subgraph rect for ', node.id, node);\n\n // Add outer g element\n const shapeSvg = parent\n .insert('g')\n .attr('class', 'cluster' + (node.class ? ' ' + node.class : ''))\n .attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width;\n if (node.width <= bbox.width + padding) {\n node.diff = (bbox.width - node.width) / 2 - node.padding / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n\n log.trace('Data ', node, JSON.stringify(node));\n // center the rect around its coordinate\n rect\n .attr('style', node.style)\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - width / 2)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', width)\n .attr('height', node.height + padding);\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' +\n (node.x - bbox.width / 2) +\n ', ' +\n (node.y - node.height / 2 + node.padding / 3) +\n ')'\n );\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\n/**\n * Non visible cluster where the note is group with its\n *\n * @param {any} parent\n * @param {any} node\n * @returns {any} ShapeSvg\n */\nconst noteGroup = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', 'note-cluster').attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('rx', node.rx)\n .attr('ry', node.ry)\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding)\n .attr('fill', 'none');\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\nconst roundedWithTitle = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n // Create the label and insert it after the rect\n const label = shapeSvg.insert('g').attr('class', 'cluster-label');\n const innerRect = shapeSvg.append('rect');\n\n const text = label\n .node()\n .appendChild(createLabel(node.labelText, node.labelStyle, undefined, true));\n\n // Get the size of the label\n let bbox = text.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = text.children[0];\n const dv = select(text);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n bbox = text.getBBox();\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;\n if (node.width <= bbox.width + node.padding) {\n node.diff = (bbox.width + node.padding * 0 - node.width) / 2;\n } else {\n node.diff = -node.padding / 2;\n }\n\n // center the rect around its coordinate\n rect\n .attr('class', 'outer')\n .attr('x', node.x - width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding)\n .attr('width', width + padding)\n .attr('height', node.height + padding);\n innerRect\n .attr('class', 'inner')\n .attr('x', node.x - width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2 - halfPadding + bbox.height - 1)\n .attr('width', width + padding)\n .attr('height', node.height + padding - bbox.height - 3);\n\n // Center the label\n label.attr(\n 'transform',\n 'translate(' +\n (node.x - bbox.width / 2) +\n ', ' +\n (node.y -\n node.height / 2 -\n node.padding / 3 +\n (evaluate(getConfig().flowchart.htmlLabels) ? 5 : 3)) +\n ')'\n );\n\n const rectBox = rect.node().getBBox();\n node.height = rectBox.height;\n\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst divider = (parent, node) => {\n // Add outer g element\n const shapeSvg = parent.insert('g').attr('class', node.classes).attr('id', node.id);\n\n // add the rect\n const rect = shapeSvg.insert('rect', ':first-child');\n\n const padding = 0 * node.padding;\n const halfPadding = padding / 2;\n\n // center the rect around its coordinate\n rect\n .attr('class', 'divider')\n .attr('x', node.x - node.width / 2 - halfPadding)\n .attr('y', node.y - node.height / 2)\n .attr('width', node.width + padding)\n .attr('height', node.height + padding);\n\n const rectBox = rect.node().getBBox();\n node.width = rectBox.width;\n node.height = rectBox.height;\n node.diff = -node.padding / 2;\n node.intersect = function (point) {\n return intersectRect(node, point);\n };\n\n return shapeSvg;\n};\n\nconst shapes = { rect, roundedWithTitle, noteGroup, divider };\n\nlet clusterElems = {};\n\nexport const insertCluster = (elem, node) => {\n log.trace('Inserting cluster');\n const shape = node.shape || 'rect';\n clusterElems[node.id] = shapes[shape](elem, node);\n};\nexport const getClusterTitleWidth = (elem, node) => {\n const label = createLabel(node.labelText, node.labelStyle, undefined, true);\n elem.node().appendChild(label);\n const width = label.getBBox().width;\n elem.node().removeChild(label);\n return width;\n};\n\nexport const clear = () => {\n clusterElems = {};\n};\n\nexport const positionCluster = (node) => {\n log.info('Position cluster (' + node.id + ', ' + node.x + ', ' + node.y + ')');\n const el = clusterElems[node.id];\n\n el.attr('transform', 'translate(' + node.x + ', ' + node.y + ')');\n};\n","import { log } from '../logger';\nimport createLabel from './createLabel';\nimport { line, curveBasis, select } from 'd3';\nimport { getConfig } from '../config';\nimport utils from '../utils';\nimport { evaluate } from '../diagrams/common/common';\n\nlet edgeLabels = {};\nlet terminalLabels = {};\n\nexport const clear = () => {\n edgeLabels = {};\n terminalLabels = {};\n};\n\nexport const insertEdgeLabel = (elem, edge) => {\n // Create the actual text element\n const labelElement = createLabel(edge.label, edge.labelStyle);\n\n // Create outer g, edgeLabel, this will be positioned after graph layout\n const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');\n\n // Create inner g, label, this will be positioned now for centering the text\n const label = edgeLabel.insert('g').attr('class', 'label');\n label.node().appendChild(labelElement);\n\n // Center the label\n let bbox = labelElement.getBBox();\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n const div = labelElement.children[0];\n const dv = select(labelElement);\n bbox = div.getBoundingClientRect();\n dv.attr('width', bbox.width);\n dv.attr('height', bbox.height);\n }\n label.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n\n // Make element accessible by id for positioning\n edgeLabels[edge.id] = edgeLabel;\n\n // Update the abstract data of the edge with the new information about its width and height\n edge.width = bbox.width;\n edge.height = bbox.height;\n\n let fo;\n if (edge.startLabelLeft) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelLeft, edge.labelStyle);\n const startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startLeft = startEdgeLabelLeft;\n setTerminalWidth(fo, edge.startLabelLeft);\n }\n if (edge.startLabelRight) {\n // Create the actual text element\n const startLabelElement = createLabel(edge.startLabelRight, edge.labelStyle);\n const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n fo = startEdgeLabelRight.node().appendChild(startLabelElement);\n inner.node().appendChild(startLabelElement);\n const slBox = startLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].startRight = startEdgeLabelRight;\n setTerminalWidth(fo, edge.startLabelRight);\n }\n if (edge.endLabelLeft) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelLeft, edge.labelStyle);\n const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelLeft.node().appendChild(endLabelElement);\n\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endLeft = endEdgeLabelLeft;\n setTerminalWidth(fo, edge.endLabelLeft);\n }\n if (edge.endLabelRight) {\n // Create the actual text element\n const endLabelElement = createLabel(edge.endLabelRight, edge.labelStyle);\n const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n fo = inner.node().appendChild(endLabelElement);\n const slBox = endLabelElement.getBBox();\n inner.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n\n endEdgeLabelRight.node().appendChild(endLabelElement);\n if (!terminalLabels[edge.id]) {\n terminalLabels[edge.id] = {};\n }\n terminalLabels[edge.id].endRight = endEdgeLabelRight;\n setTerminalWidth(fo, edge.endLabelRight);\n }\n};\n\n/**\n * @param {any} fo\n * @param {any} value\n */\nfunction setTerminalWidth(fo, value) {\n if (getConfig().flowchart.htmlLabels && fo) {\n fo.style.width = value.length * 9 + 'px';\n fo.style.height = '12px';\n }\n}\n\nexport const positionEdgeLabel = (edge, paths) => {\n log.info('Moving label abc78 ', edge.id, edge.label, edgeLabels[edge.id]);\n let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n if (edge.label) {\n const el = edgeLabels[edge.id];\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // // debugger;\n const pos = utils.calcLabelPosition(path);\n log.info('Moving label from (', x, ',', y, ') to (', pos.x, ',', pos.y, ') abc78');\n // x = pos.x;\n // y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n\n //let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n if (edge.startLabelLeft) {\n const el = terminalLabels[edge.id].startLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, 'start_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n if (edge.startLabelRight) {\n const el = terminalLabels[edge.id].startRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(\n edge.arrowTypeStart ? 10 : 0,\n 'start_right',\n path\n );\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n if (edge.endLabelLeft) {\n const el = terminalLabels[edge.id].endLeft;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_left', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n if (edge.endLabelRight) {\n const el = terminalLabels[edge.id].endRight;\n let x = edge.x;\n let y = edge.y;\n if (path) {\n // debugger;\n const pos = utils.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, 'end_right', path);\n x = pos.x;\n y = pos.y;\n }\n el.attr('transform', 'translate(' + x + ', ' + y + ')');\n }\n};\n\nconst outsideNode = (node, point) => {\n // log.warn('Checking bounds ', node, point);\n const x = node.x;\n const y = node.y;\n const dx = Math.abs(point.x - x);\n const dy = Math.abs(point.y - y);\n const w = node.width / 2;\n const h = node.height / 2;\n if (dx >= w || dy >= h) {\n return true;\n }\n return false;\n};\n\nexport const intersection = (node, outsidePoint, insidePoint) => {\n log.warn(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(outsidePoint)}\n insidePoint : ${JSON.stringify(insidePoint)}\n node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);\n const x = node.x;\n const y = node.y;\n\n const dx = Math.abs(x - insidePoint.x);\n // const dy = Math.abs(y - insidePoint.y);\n const w = node.width / 2;\n let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n const h = node.height / 2;\n\n // const edges = {\n // x1: x - w,\n // x2: x + w,\n // y1: y - h,\n // y2: y + h\n // };\n\n // if (\n // outsidePoint.x === edges.x1 ||\n // outsidePoint.x === edges.x2 ||\n // outsidePoint.y === edges.y1 ||\n // outsidePoint.y === edges.y2\n // ) {\n // log.warn('abc89 calc equals on edge', outsidePoint, edges);\n // return outsidePoint;\n // }\n\n const Q = Math.abs(outsidePoint.y - insidePoint.y);\n const R = Math.abs(outsidePoint.x - insidePoint.x);\n // log.warn();\n if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {\n // Intersection is top or bottom of rect.\n // let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;\n r = (R * q) / Q;\n const res = {\n x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,\n y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q,\n };\n\n if (r === 0) {\n res.x = outsidePoint.x;\n res.y = outsidePoint.y;\n }\n if (R === 0) {\n res.x = outsidePoint.x;\n }\n if (Q === 0) {\n res.y = outsidePoint.y;\n }\n\n log.warn(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);\n\n return res;\n } else {\n // Intersection onn sides of rect\n if (insidePoint.x < outsidePoint.x) {\n r = outsidePoint.x - w - x;\n } else {\n // r = outsidePoint.x - w - x;\n r = x - w - outsidePoint.x;\n }\n let q = (Q * r) / R;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x + dx - w;\n // OK let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n // let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : outsidePoint.x + r;\n let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n log.warn(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });\n if (r === 0) {\n _x = outsidePoint.x;\n _y = outsidePoint.y;\n }\n if (R === 0) {\n _x = outsidePoint.x;\n }\n if (Q === 0) {\n _y = outsidePoint.y;\n }\n\n return { x: _x, y: _y };\n }\n};\n/**\n * This function will page a path and node where the last point(s) in the path is inside the node\n * and return an update path ending by the border of the node.\n *\n * @param {Array} _points\n * @param {any} boundryNode\n * @returns {Array} Points\n */\nconst cutPathAtIntersect = (_points, boundryNode) => {\n log.warn('abc88 cutPathAtIntersect', _points, boundryNode);\n let points = [];\n let lastPointOutside = _points[0];\n let isInside = false;\n _points.forEach((point) => {\n // const node = clusterDb[edge.toCluster].node;\n log.info('abc88 checking point', point, boundryNode);\n\n // check if point is inside the boundry rect\n if (!outsideNode(boundryNode, point) && !isInside) {\n // First point inside the rect found\n // Calc the intersection coord between the point anf the last point outside the rect\n const inter = intersection(boundryNode, lastPointOutside, point);\n log.warn('abc88 inside', point, lastPointOutside, inter);\n log.warn('abc88 intersection', inter);\n\n // // Check case where the intersection is the same as the last point\n let pointPresent = false;\n points.forEach((p) => {\n pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n });\n // // if (!pointPresent) {\n if (!points.find((e) => e.x === inter.x && e.y === inter.y)) {\n points.push(inter);\n } else {\n log.warn('abc88 no intersect', inter, points);\n }\n // points.push(inter);\n isInside = true;\n } else {\n // Outside\n log.warn('abc88 outside', point, lastPointOutside);\n lastPointOutside = point;\n // points.push(point);\n if (!isInside) points.push(point);\n }\n });\n log.warn('abc88 returning points', points);\n return points;\n};\n\n//(edgePaths, e, edge, clusterDb, diagramtype, graph)\nexport const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph) {\n let points = edge.points;\n let pointsHasChanged = false;\n const tail = graph.node(e.v);\n var head = graph.node(e.w);\n\n log.info('abc88 InsertEdge: ', edge);\n if (head.intersect && tail.intersect) {\n points = points.slice(1, edge.points.length - 1);\n points.unshift(tail.intersect(points[0]));\n log.info(\n 'Last point',\n points[points.length - 1],\n head,\n head.intersect(points[points.length - 1])\n );\n points.push(head.intersect(points[points.length - 1]));\n }\n if (edge.toCluster) {\n log.info('to cluster abc88', clusterDb[edge.toCluster]);\n points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);\n // log.trace('edge', edge);\n // points = [];\n // let lastPointOutside; // = edge.points[0];\n // let isInside = false;\n // edge.points.forEach(point => {\n // const node = clusterDb[edge.toCluster].node;\n // log.warn('checking from', edge.fromCluster, point, node);\n\n // if (!outsideNode(node, point) && !isInside) {\n // log.trace('inside', edge.toCluster, point, lastPointOutside);\n\n // // First point inside the rect\n // const inter = intersection(node, lastPointOutside, point);\n\n // let pointPresent = false;\n // points.forEach(p => {\n // pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n // });\n // // if (!pointPresent) {\n // if (!points.find(e => e.x === inter.x && e.y === inter.y)) {\n // points.push(inter);\n // } else {\n // log.warn('no intersect', inter, points);\n // }\n // isInside = true;\n // } else {\n // // outside\n // lastPointOutside = point;\n // if (!isInside) points.push(point);\n // }\n // });\n pointsHasChanged = true;\n }\n\n if (edge.fromCluster) {\n log.info('from cluster abc88', clusterDb[edge.fromCluster]);\n points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();\n\n pointsHasChanged = true;\n }\n\n // The data for our line\n const lineData = points.filter((p) => !Number.isNaN(p.y));\n\n // This is the accessor function we talked about above\n let curve;\n // Currently only flowcharts get the curve from the settings, perhaps this should\n // be expanded to a common setting? Restricting it for now in order not to cause side-effects that\n // have not been thought through\n if (diagramType === 'graph' || diagramType === 'flowchart') {\n curve = edge.curve || curveBasis;\n } else {\n curve = curveBasis;\n }\n // curve = curveLinear;\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curve);\n\n // Contruct stroke classes based on properties\n let strokeClasses;\n switch (edge.thickness) {\n case 'normal':\n strokeClasses = 'edge-thickness-normal';\n break;\n case 'thick':\n strokeClasses = 'edge-thickness-thick';\n break;\n case 'invisible':\n strokeClasses = 'edge-thickness-thick';\n break;\n default:\n strokeClasses = '';\n }\n switch (edge.pattern) {\n case 'solid':\n strokeClasses += ' edge-pattern-solid';\n break;\n case 'dotted':\n strokeClasses += ' edge-pattern-dotted';\n break;\n case 'dashed':\n strokeClasses += ' edge-pattern-dashed';\n break;\n }\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', edge.id)\n .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))\n .attr('style', edge.style);\n\n // DEBUG code, adds a red circle at each edge coordinate\n // edge.points.forEach(point => {\n // elem\n // .append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n\n let url = '';\n // // TODO: Can we load this config only from the rendered graph type?\n if (getConfig().flowchart.arrowMarkerAbsolute || getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n log.info('arrowTypeStart', edge.arrowTypeStart);\n log.info('arrowTypeEnd', edge.arrowTypeEnd);\n\n switch (edge.arrowTypeStart) {\n case 'arrow_cross':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-crossStart' + ')');\n break;\n case 'arrow_point':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-pointStart' + ')');\n break;\n case 'arrow_barb':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-barbStart' + ')');\n break;\n case 'arrow_circle':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-circleStart' + ')');\n break;\n case 'aggregation':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-aggregationStart' + ')');\n break;\n case 'extension':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-extensionStart' + ')');\n break;\n case 'composition':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-compositionStart' + ')');\n break;\n case 'dependency':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-dependencyStart' + ')');\n break;\n case 'lollipop':\n svgPath.attr('marker-start', 'url(' + url + '#' + diagramType + '-lollipopStart' + ')');\n break;\n default:\n }\n switch (edge.arrowTypeEnd) {\n case 'arrow_cross':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-crossEnd' + ')');\n break;\n case 'arrow_point':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-pointEnd' + ')');\n break;\n case 'arrow_barb':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-barbEnd' + ')');\n break;\n case 'arrow_circle':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-circleEnd' + ')');\n break;\n case 'aggregation':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-aggregationEnd' + ')');\n break;\n case 'extension':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-extensionEnd' + ')');\n break;\n case 'composition':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-compositionEnd' + ')');\n break;\n case 'dependency':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-dependencyEnd' + ')');\n break;\n case 'lollipop':\n svgPath.attr('marker-end', 'url(' + url + '#' + diagramType + '-lollipopEnd' + ')');\n break;\n default:\n }\n let paths = {};\n if (pointsHasChanged) {\n paths.updatedPath = points;\n }\n paths.originalPath = edge.points;\n return paths;\n};\n","import dagre from 'dagre';\nimport graphlib from 'graphlib';\nimport insertMarkers from './markers';\nimport { updateNodeBounds } from './shapes/util';\nimport {\n clear as clearGraphlib,\n clusterDb,\n adjustClustersAndEdges,\n findNonClusterChild,\n sortNodesByHierarchy,\n} from './mermaid-graphlib';\nimport { insertNode, positionNode, clear as clearNodes, setNodeElem } from './nodes';\nimport { insertCluster, clear as clearClusters } from './clusters';\nimport { insertEdgeLabel, positionEdgeLabel, insertEdge, clear as clearEdges } from './edges';\nimport { log } from '../logger';\n\nconst recursiveRender = (_elem, graph, diagramtype, parentCluster) => {\n log.info('Graph in recursive render: XXX', graphlib.json.write(graph), parentCluster);\n const dir = graph.graph().rankdir;\n log.trace('Dir in recursive render - dir:', dir);\n\n const elem = _elem.insert('g').attr('class', 'root');\n if (!graph.nodes()) {\n log.info('No nodes found for', graph);\n } else {\n log.info('Recursive render XXX', graph.nodes());\n }\n if (graph.edges().length > 0) {\n log.trace('Recursive edges', graph.edge(graph.edges()[0]));\n }\n const clusters = elem.insert('g').attr('class', 'clusters');\n const edgePaths = elem.insert('g').attr('class', 'edgePaths');\n const edgeLabels = elem.insert('g').attr('class', 'edgeLabels');\n const nodes = elem.insert('g').attr('class', 'nodes');\n\n // Insert nodes, this will insert them into the dom and each node will get a size. The size is updated\n // to the abstract node and is later used by dagre for the layout\n graph.nodes().forEach(function (v) {\n const node = graph.node(v);\n if (typeof parentCluster !== 'undefined') {\n const data = JSON.parse(JSON.stringify(parentCluster.clusterData));\n // data.clusterPositioning = true;\n log.info('Setting data for cluster XXX (', v, ') ', data, parentCluster);\n graph.setNode(parentCluster.id, data);\n if (!graph.parent(v)) {\n log.trace('Setting parent', v, parentCluster.id);\n graph.setParent(v, parentCluster.id, data);\n }\n }\n log.info('(Insert) Node XXX' + v + ': ' + JSON.stringify(graph.node(v)));\n if (node && node.clusterNode) {\n // const children = graph.children(v);\n log.info('Cluster identified', v, node.width, graph.node(v));\n const o = recursiveRender(nodes, node.graph, diagramtype, graph.node(v));\n const newEl = o.elem;\n updateNodeBounds(node, newEl);\n node.diff = o.diff || 0;\n log.info('Node bounds (abc123)', v, node, node.width, node.x, node.y);\n setNodeElem(newEl, node);\n\n log.warn('Recursive render complete ', newEl, node);\n } else {\n if (graph.children(v).length > 0) {\n // This is a cluster but not to be rendered recursively\n // Render as before\n log.info('Cluster - the non recursive path XXX', v, node.id, node, graph);\n log.info(findNonClusterChild(node.id, graph));\n clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node };\n // insertCluster(clusters, graph.node(v));\n } else {\n log.info('Node - the non recursive path', v, node.id, node);\n insertNode(nodes, graph.node(v), dir);\n }\n }\n });\n\n // Insert labels, this will insert them into the dom so that the width can be calculated\n // Also figure out which edges point to/from clusters and adjust them accordingly\n // Edges from/to clusters really points to the first child in the cluster.\n // TODO: pick optimal child in the cluster to us as link anchor\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e.v, e.w, e.name);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ', e, ' ', JSON.stringify(graph.edge(e)));\n\n // Check if link is either from or to a cluster\n log.info('Fix', clusterDb, 'ids:', e.v, e.w, 'Translateing: ', clusterDb[e.v], clusterDb[e.w]);\n insertEdgeLabel(edgeLabels, edge);\n });\n\n graph.edges().forEach(function (e) {\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(e));\n });\n log.info('#############################################');\n log.info('### Layout ###');\n log.info('#############################################');\n log.info(graph);\n dagre.layout(graph);\n log.info('Graph after layout:', graphlib.json.write(graph));\n // Move the nodes to the correct place\n let diff = 0;\n sortNodesByHierarchy(graph).forEach(function (v) {\n const node = graph.node(v);\n log.info('Position ' + v + ': ' + JSON.stringify(graph.node(v)));\n log.info(\n 'Position ' + v + ': (' + node.x,\n ',' + node.y,\n ') width: ',\n node.width,\n ' height: ',\n node.height\n );\n if (node && node.clusterNode) {\n // clusterDb[node.id].node = node;\n\n positionNode(node);\n } else {\n // Non cluster node\n if (graph.children(v).length > 0) {\n // A cluster in the non-recursive way\n // positionCluster(node);\n insertCluster(clusters, node);\n clusterDb[node.id].node = node;\n } else {\n positionNode(node);\n }\n }\n });\n\n // Move the edge labels to the correct place after layout\n graph.edges().forEach(function (e) {\n const edge = graph.edge(e);\n log.info('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(edge), edge);\n\n const paths = insertEdge(edgePaths, e, edge, clusterDb, diagramtype, graph);\n positionEdgeLabel(edge, paths);\n });\n\n graph.nodes().forEach(function (v) {\n const n = graph.node(v);\n log.info(v, n.type, n.diff);\n if (n.type === 'group') {\n diff = n.diff;\n }\n });\n return { elem, diff };\n};\n\nexport const render = (elem, graph, markers, diagramtype, id) => {\n insertMarkers(elem, markers, diagramtype, id);\n clearNodes();\n clearEdges();\n clearClusters();\n clearGraphlib();\n\n log.warn('Graph at first:', graphlib.json.write(graph));\n adjustClustersAndEdges(graph);\n log.warn('Graph after:', graphlib.json.write(graph));\n // log.warn('Graph ever after:', graphlib.json.write(graph.node('A').graph));\n recursiveRender(elem, graph, diagramtype);\n};\n\n// const shapeDefinitions = {};\n// export const addShape = ({ shapeType: fun }) => {\n// shapeDefinitions[shapeType] = fun;\n// };\n\n// const arrowDefinitions = {};\n// export const addArrow = ({ arrowType: fun }) => {\n// arrowDefinitions[arrowType] = fun;\n// };\n","import { select } from 'd3';\nimport graphlib from 'graphlib';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\nimport { curveLinear } from 'd3';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nlet idCache = {};\n\nconst sanitizeText = (txt) => common.sanitizeText(txt, getConfig());\n\nlet conf = {\n dividerMargin: 10,\n padding: 5,\n textHeight: 10,\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param {Object<\n * string,\n * { cssClasses: string[]; text: string; id: string; type: string; domId: string }\n * >} classes\n * Object containing the vertices.\n * @param {SVGGElement} g The graph that is to be drawn.\n * @param _id\n * @param diagObj\n */\nexport const addClasses = function (classes, g, _id, diagObj) {\n // const svg = select(`[id=\"${svgId}\"]`);\n const keys = Object.keys(classes);\n log.info('keys:', keys);\n log.info(classes);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = classes[id];\n\n /**\n * Variable for storing the classes for the vertex\n *\n * @type {string}\n */\n let cssClassStr = '';\n if (vertex.cssClasses.length > 0) {\n cssClassStr = cssClassStr + ' ' + vertex.cssClasses.join(' ');\n }\n // if (vertex.classes.length > 0) {\n // classStr = vertex.classes.join(' ');\n // }\n\n const styles = { labelStyle: '' }; //getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n let vertexText = vertex.text !== undefined ? vertex.text : vertex.id;\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n // let vertexNode;\n // if (evaluate(getConfig().flowchart.htmlLabels)) {\n // const node = {\n // label: vertexText.replace(\n // /fa[lrsb]?:fa-[\\w-]+/g,\n // s => ``\n // )\n // };\n // vertexNode = addHtmlLabel(svg, node).node();\n // vertexNode.parentNode.removeChild(vertexNode);\n // } else {\n // const svgLabel = document.createElementNS('http://www.w3.org/2000/svg', 'text');\n // svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n // const rows = vertexText.split(common.lineBreakRegex);\n\n // for (let j = 0; j < rows.length; j++) {\n // const tspan = document.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n // tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n // tspan.setAttribute('dy', '1em');\n // tspan.setAttribute('x', '1');\n // tspan.textContent = rows[j];\n // svgLabel.appendChild(tspan);\n // }\n // vertexNode = svgLabel;\n // }\n\n let radious = 0;\n let _shape = '';\n // Set the shape based parameters\n switch (vertex.type) {\n case 'class':\n _shape = 'class_box';\n break;\n default:\n _shape = 'class_box';\n }\n // Add the node\n g.setNode(vertex.id, {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: sanitizeText(vertexText),\n classData: vertex,\n rx: radious,\n ry: radious,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n domId: vertex.domId,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n haveCallback: vertex.haveCallback,\n link: vertex.link,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: getConfig().flowchart.padding,\n });\n\n log.info('setNode', {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n class: cssClassStr,\n style: styles.style,\n id: vertex.id,\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n padding: getConfig().flowchart.padding,\n });\n });\n};\n\n/**\n * Add edges to graph based on parsed graph definition\n *\n * @param relations\n * @param {object} g The graph object\n */\nexport const addRelations = function (relations, g) {\n const conf = getConfig().flowchart;\n let cnt = 0;\n\n let defaultStyle;\n let defaultLabelStyle;\n\n // if (typeof relations.defaultStyle !== 'undefined') {\n // const defaultStyles = getStylesFromArray(relations.defaultStyle);\n // defaultStyle = defaultStyles.style;\n // defaultLabelStyle = defaultStyles.labelStyle;\n // }\n\n relations.forEach(function (edge) {\n cnt++;\n const edgeData = {};\n //Set relationship style and line type\n edgeData.classes = 'relation';\n edgeData.pattern = edge.relation.lineType == 1 ? 'dashed' : 'solid';\n\n edgeData.id = 'id' + cnt;\n // Set link type for rendering\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n log.info(edgeData, edge);\n //Set edge extra labels\n //edgeData.startLabelLeft = edge.relationTitle1;\n edgeData.startLabelRight = edge.relationTitle1 === 'none' ? '' : edge.relationTitle1;\n edgeData.endLabelLeft = edge.relationTitle2 === 'none' ? '' : edge.relationTitle2;\n //edgeData.endLabelRight = edge.relationTitle2;\n\n //Set relation arrow types\n edgeData.arrowTypeStart = getArrowMarker(edge.relation.type1);\n edgeData.arrowTypeEnd = getArrowMarker(edge.relation.type2);\n let style = '';\n let labelStyle = '';\n\n if (typeof edge.style !== 'undefined') {\n const styles = getStylesFromArray(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n } else {\n style = 'fill:none';\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n }\n\n edgeData.style = style;\n edgeData.labelStyle = labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear);\n } else if (typeof relations.defaultInterpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(relations.defaultInterpolate, curveLinear);\n } else {\n edgeData.curve = interpolateToCurve(conf.curve, curveLinear);\n }\n\n edge.text = edge.title;\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n if (getConfig().flowchart.htmlLabels) {\n edgeData.labelType = 'html';\n edgeData.label = '' + edge.text + '';\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n }\n // Add the edge to the graph\n g.setEdge(edge.id1, edge.id2, edgeData, cnt);\n });\n};\n\n/**\n * Merges the value of `conf` with the passed `cnf`\n *\n * @param {object} cnf Config to merge\n */\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {string} text\n * @param {string} id\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n log.info('Drawing class - ', id);\n // diagObj.db.clear();\n // const parser = diagObj.db.parser;\n // parser.yy = classDb;\n\n // Parse the graph definition\n // try {\n // parser.parse(text);\n // } catch (err) {\n // log.debug('Parsing failed');\n // }\n\n // Fetch the default direction, use TD if none was found\n //let dir = 'TD';\n\n const conf = getConfig().flowchart;\n const securityLevel = getConfig().securityLevel;\n log.info('config:', conf);\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: diagObj.db.getDirection(),\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n // let subG;\n // const subGraphs = flowDb.getSubGraphs();\n // log.info('Subgraphs - ', subGraphs);\n // for (let i = subGraphs.length - 1; i >= 0; i--) {\n // subG = subGraphs[i];\n // log.info('Subgraph - ', subG);\n // flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n // }\n\n // Fetch the vertices/nodes and edges/links from the parsed graph definition\n const classes = diagObj.db.getClasses();\n const relations = diagObj.db.getRelations();\n\n log.info(relations);\n addClasses(classes, g, id, diagObj);\n addRelations(relations, g);\n\n // Add custom shapes\n // flowChartShapes.addToRenderV2(addShape);\n\n // Set up an SVG group so that we can translate the final graph.\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n const element = root.select('#' + id + ' g');\n render(\n element,\n g,\n ['aggregation', 'extension', 'composition', 'dependency', 'lollipop'],\n 'classDiagram',\n id\n );\n\n setupGraphViewbox(g, svg, conf.diagramPadding, conf.useMaxWidth);\n\n // Add label rects for non html labels\n if (!conf.htmlLabels) {\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n const labels = doc.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (let k = 0; k < labels.length; k++) {\n const label = labels[k];\n\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = doc.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n // rect.setAttribute('style', 'fill:#e8e8e8;');\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n\n addSVGAccessibilityFields(diagObj.db, svg, id);\n // If node has a link, wrap it in an anchor SVG object.\n // const keys = Object.keys(classes);\n // keys.forEach(function(key) {\n // const vertex = classes[key];\n\n // if (vertex.link) {\n // const node = select('#' + id + ' [id=\"' + key + '\"]');\n // if (node) {\n // const link = document.createElementNS('http://www.w3.org/2000/svg', 'a');\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n // link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n\n // const linkNode = node.insert(function() {\n // return link;\n // }, ':first-child');\n\n // const shape = node.select('.label-container');\n // if (shape) {\n // linkNode.append(function() {\n // return shape.node();\n // });\n // }\n\n // const label = node.select('.label');\n // if (label) {\n // linkNode.append(function() {\n // return label.node();\n // });\n // }\n // }\n // }\n // });\n};\n\n/**\n * Gets the arrow marker for a type index\n *\n * @param {number} type The type to look for\n * @returns {'aggregation' | 'extension' | 'composition' | 'dependency'} The arrow marker\n */\nfunction getArrowMarker(type) {\n let marker;\n switch (type) {\n case 0:\n marker = 'aggregation';\n break;\n case 1:\n marker = 'extension';\n break;\n case 2:\n marker = 'composition';\n break;\n case 3:\n marker = 'dependency';\n break;\n case 4:\n marker = 'lollipop';\n break;\n default:\n marker = 'none';\n }\n return marker;\n}\n\nexport default {\n setConf,\n draw,\n};\n","%lex\n\n%options case-insensitive\n%x open_directive type_directive arg_directive block\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n%%\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n[\\}] { this.popState(); }\n[^\\}]* return \"acc_descr_multiline_value\";\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\n[\\n]+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n[\\s]+ return 'SPACE';\n\\\"[^\"%\\r\\n\\v\\b\\\\]+\\\" return 'ENTITY_NAME';\n\\\"[^\"]*\\\" return 'WORD';\n\"erDiagram\" return 'ER_DIAGRAM';\n\"{\" { this.begin(\"block\"); return 'BLOCK_START'; }\n\\s+ /* skip whitespace in block */\n\\b((?:PK)|(?:FK))\\b return 'ATTRIBUTE_KEY'\n(.*?)[~](.*?)*[~] return 'ATTRIBUTE_WORD';\n[A-Za-z][A-Za-z0-9\\-_\\[\\]]* return 'ATTRIBUTE_WORD'\n\\\"[^\"]*\\\" return 'COMMENT';\n[\\n]+ /* nothing */\n\"}\" { this.popState(); return 'BLOCK_STOP'; }\n. return yytext[0];\n\\|o return 'ZERO_OR_ONE';\n\\}o return 'ZERO_OR_MORE';\n\\}\\| return 'ONE_OR_MORE';\n\\|\\| return 'ONLY_ONE';\no\\| return 'ZERO_OR_ONE';\no\\{ return 'ZERO_OR_MORE';\n\\|\\{ return 'ONE_OR_MORE';\n\\.\\. return 'NON_IDENTIFYING';\n\\-\\- return 'IDENTIFYING';\n\\.\\- return 'NON_IDENTIFYING';\n\\-\\. return 'NON_IDENTIFYING';\n[A-Za-z][A-Za-z0-9\\-_]* return 'ALPHANUM';\n. return yytext[0];\n<> return 'EOF';\n\n/lex\n\n%start start\n%% /* language grammar */\n\nstart\n : 'ER_DIAGRAM' document 'EOF' { /*console.log('finished parsing');*/ }\n \t| directive start\n ;\n\ndocument\n\t: /* empty */ { $$ = [] }\n\t| document line {$1.push($2);$$ = $1}\n\t;\n\nline\n\t: SPACE statement { $$ = $2 }\n\t| statement { $$ = $1 }\n\t| NEWLINE { $$=[];}\n\t| EOF { $$=[];}\n\t;\n\ndirective\n : openDirective typeDirective closeDirective 'NEWLINE'\n | openDirective typeDirective ':' argDirective closeDirective 'NEWLINE'\n ;\n\nstatement\n : directive\n | entityName relSpec entityName ':' role\n {\n yy.addEntity($1);\n yy.addEntity($3);\n yy.addRelationship($1, $5, $3, $2);\n /*console.log($1 + $2 + $3 + ':' + $5);*/\n }\n | entityName BLOCK_START attributes BLOCK_STOP\n {\n /* console.log('detected block'); */\n yy.addEntity($1);\n yy.addAttributes($1, $3);\n /* console.log('handled block'); */\n }\n | entityName BLOCK_START BLOCK_STOP { yy.addEntity($1); }\n | entityName { yy.addEntity($1); }\n | title title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }\n ;\n\nentityName\n : 'ALPHANUM' { $$ = $1; }\n | 'ENTITY_NAME' { $$ = $1.replace(/\"/g, ''); }\n ;\n\nattributes\n : attribute { $$ = [$1]; }\n | attribute attributes { $2.push($1); $$=$2; }\n ;\n\nattribute\n : attributeType attributeName { $$ = { attributeType: $1, attributeName: $2 }; }\n | attributeType attributeName attributeKeyType { $$ = { attributeType: $1, attributeName: $2, attributeKeyType: $3 }; }\n | attributeType attributeName attributeComment { $$ = { attributeType: $1, attributeName: $2, attributeComment: $3 }; }\n | attributeType attributeName attributeKeyType attributeComment { $$ = { attributeType: $1, attributeName: $2, attributeKeyType: $3, attributeComment: $4 }; }\n ;\n\nattributeType\n : ATTRIBUTE_WORD { $$=$1; }\n ;\n\nattributeName\n : ATTRIBUTE_WORD { $$=$1; }\n ;\n\nattributeKeyType\n : ATTRIBUTE_KEY { $$=$1; }\n ;\n\nattributeComment\n : COMMENT { $$=$1.replace(/\"/g, ''); }\n ;\n\nrelSpec\n : cardinality relType cardinality\n {\n $$ = { cardA: $3, relType: $2, cardB: $1 };\n /*console.log('relSpec: ' + $3 + $2 + $1);*/\n }\n ;\n\ncardinality\n : 'ZERO_OR_ONE' { $$ = yy.Cardinality.ZERO_OR_ONE; }\n | 'ZERO_OR_MORE' { $$ = yy.Cardinality.ZERO_OR_MORE; }\n | 'ONE_OR_MORE' { $$ = yy.Cardinality.ONE_OR_MORE; }\n | 'ONLY_ONE' { $$ = yy.Cardinality.ONLY_ONE; }\n ;\n\nrelType\n : 'NON_IDENTIFYING' { $$ = yy.Identification.NON_IDENTIFYING; }\n | 'IDENTIFYING' { $$ = yy.Identification.IDENTIFYING; }\n ;\n\nrole\n : 'WORD' { $$ = $1.replace(/\"/g, ''); }\n | 'ENTITY_NAME' { $$ = $1.replace(/\"/g, ''); }\n | 'ALPHANUM' { $$ = $1; }\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'er'); }\n ;\n\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const erDetector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*erDiagram/) !== null;\n};\n","import { log } from '../../logger';\nimport mermaidAPI from '../../mermaidAPI';\nimport * as configApi from '../../config';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nlet entities = {};\nlet relationships = [];\n\nconst Cardinality = {\n ZERO_OR_ONE: 'ZERO_OR_ONE',\n ZERO_OR_MORE: 'ZERO_OR_MORE',\n ONE_OR_MORE: 'ONE_OR_MORE',\n ONLY_ONE: 'ONLY_ONE',\n};\n\nconst Identification = {\n NON_IDENTIFYING: 'NON_IDENTIFYING',\n IDENTIFYING: 'IDENTIFYING',\n};\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nconst addEntity = function (name) {\n if (typeof entities[name] === 'undefined') {\n entities[name] = { attributes: [] };\n log.info('Added new entity :', name);\n }\n\n return entities[name];\n};\n\nconst getEntities = () => entities;\n\nconst addAttributes = function (entityName, attribs) {\n let entity = addEntity(entityName); // May do nothing (if entity has already been added)\n\n // Process attribs in reverse order due to effect of recursive construction (last attribute is first)\n let i;\n for (i = attribs.length - 1; i >= 0; i--) {\n entity.attributes.push(attribs[i]);\n log.debug('Added attribute ', attribs[i].attributeName);\n }\n};\n\n/**\n * Add a relationship\n *\n * @param entA The first entity in the relationship\n * @param rolA The role played by the first entity in relation to the second\n * @param entB The second entity in the relationship\n * @param rSpec The details of the relationship between the two entities\n */\nconst addRelationship = function (entA, rolA, entB, rSpec) {\n let rel = {\n entityA: entA,\n roleA: rolA,\n entityB: entB,\n relSpec: rSpec,\n };\n\n relationships.push(rel);\n log.debug('Added new relationship :', rel);\n};\n\nconst getRelationships = () => relationships;\n\nconst clear = function () {\n entities = {};\n relationships = [];\n commonClear();\n};\n\nexport default {\n Cardinality,\n Identification,\n parseDirective,\n getConfig: () => configApi.getConfig().er,\n addEntity,\n addAttributes,\n getEntities,\n addRelationship,\n getRelationships,\n clear,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n};\n","const ERMarkers = {\n ONLY_ONE_START: 'ONLY_ONE_START',\n ONLY_ONE_END: 'ONLY_ONE_END',\n ZERO_OR_ONE_START: 'ZERO_OR_ONE_START',\n ZERO_OR_ONE_END: 'ZERO_OR_ONE_END',\n ONE_OR_MORE_START: 'ONE_OR_MORE_START',\n ONE_OR_MORE_END: 'ONE_OR_MORE_END',\n ZERO_OR_MORE_START: 'ZERO_OR_MORE_START',\n ZERO_OR_MORE_END: 'ZERO_OR_MORE_END',\n};\n\n/**\n * Put the markers into the svg DOM for later use with edge paths\n *\n * @param elem\n * @param conf\n */\nconst insertMarkers = function (elem, conf) {\n let marker;\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONLY_ONE_START)\n .attr('refX', 0)\n .attr('refY', 9)\n .attr('markerWidth', 18)\n .attr('markerHeight', 18)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M9,0 L9,18 M15,0 L15,18');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONLY_ONE_END)\n .attr('refX', 18)\n .attr('refY', 9)\n .attr('markerWidth', 18)\n .attr('markerHeight', 18)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M3,0 L3,18 M9,0 L9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_ONE_START)\n .attr('refX', 0)\n .attr('refY', 9)\n .attr('markerWidth', 30)\n .attr('markerHeight', 18)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 21)\n .attr('cy', 9)\n .attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M9,0 L9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_ONE_END)\n .attr('refX', 30)\n .attr('refY', 9)\n .attr('markerWidth', 30)\n .attr('markerHeight', 18)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 9)\n .attr('cy', 9)\n .attr('r', 6);\n marker.append('path').attr('stroke', conf.stroke).attr('fill', 'none').attr('d', 'M21,0 L21,18');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONE_OR_MORE_START)\n .attr('refX', 18)\n .attr('refY', 18)\n .attr('markerWidth', 45)\n .attr('markerHeight', 36)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27');\n\n elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ONE_OR_MORE_END)\n .attr('refX', 27)\n .attr('refY', 18)\n .attr('markerWidth', 45)\n .attr('markerHeight', 36)\n .attr('orient', 'auto')\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_MORE_START)\n .attr('refX', 18)\n .attr('refY', 18)\n .attr('markerWidth', 57)\n .attr('markerHeight', 36)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 48)\n .attr('cy', 18)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M0,18 Q18,0 36,18 Q18,36 0,18');\n\n marker = elem\n .append('defs')\n .append('marker')\n .attr('id', ERMarkers.ZERO_OR_MORE_END)\n .attr('refX', 39)\n .attr('refY', 18)\n .attr('markerWidth', 57)\n .attr('markerHeight', 36)\n .attr('orient', 'auto');\n marker\n .append('circle')\n .attr('stroke', conf.stroke)\n .attr('fill', 'white')\n .attr('cx', 9)\n .attr('cy', 18)\n .attr('r', 6);\n marker\n .append('path')\n .attr('stroke', conf.stroke)\n .attr('fill', 'none')\n .attr('d', 'M21,18 Q39,0 57,18 Q39,36 21,18');\n\n return;\n};\n\nexport default {\n ERMarkers,\n insertMarkers,\n};\n","import graphlib from 'graphlib';\nimport { line, curveBasis, select } from 'd3';\nimport dagre from 'dagre';\nimport { getConfig } from '../../config';\nimport { log } from '../../logger';\nimport erMarkers from './erMarkers';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport addSVGAccessibilityFields from '../../accessibility';\nimport { parseGenericTypes } from '../common/common';\nimport { v4 as uuid4 } from 'uuid';\n\n/** Regex used to remove chars from the entity name so the result can be used in an id */\nconst BAD_ID_CHARS_REGEXP = /[^A-Za-z0-9]([\\W])*/g;\n\n// Configuration\nlet conf = {};\n\n// Map so we can look up the id of an entity based on the name\nlet entityNameIds = new Map();\n\n/**\n * Allows the top-level API module to inject config specific to this renderer, storing it in the\n * local conf object. Note that generic config still needs to be retrieved using getConfig()\n * imported from the config module\n *\n * @param cnf\n */\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n for (let i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n};\n\n/**\n * Draw attributes for an entity\n *\n * @param groupNode The svg group node for the entity\n * @param entityTextNode The svg node for the entity label text\n * @param attributes An array of attributes defined for the entity (each attribute has a type and a\n * name)\n * @returns {object} The bounding box of the entity, after attributes have been added. The bounding\n * box has a .width and .height\n */\nconst drawAttributes = (groupNode, entityTextNode, attributes) => {\n const heightPadding = conf.entityPadding / 3; // Padding internal to attribute boxes\n const widthPadding = conf.entityPadding / 3; // Ditto\n const attrFontSize = conf.fontSize * 0.85;\n const labelBBox = entityTextNode.node().getBBox();\n const attributeNodes = []; // Intermediate storage for attribute nodes created so that we can do a second pass\n let hasKeyType = false;\n let hasComment = false;\n let maxTypeWidth = 0;\n let maxNameWidth = 0;\n let maxKeyWidth = 0;\n let maxCommentWidth = 0;\n let cumulativeHeight = labelBBox.height + heightPadding * 2;\n let attrNum = 1;\n\n // Check to see if any of the attributes has a key or a comment\n attributes.forEach((item) => {\n if (item.attributeKeyType !== undefined) {\n hasKeyType = true;\n }\n\n if (item.attributeComment !== undefined) {\n hasComment = true;\n }\n });\n\n attributes.forEach((item) => {\n const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`;\n let nodeHeight = 0;\n\n const attributeType = parseGenericTypes(item.attributeType);\n\n // Add a text node for the attribute type\n const typeNode = groupNode\n .append('text')\n .attr('class', 'er entityLabel')\n .attr('id', `${attrPrefix}-type`)\n .attr('x', 0)\n .attr('y', 0)\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'left')\n .attr(\n 'style',\n 'font-family: ' + getConfig().fontFamily + '; font-size: ' + attrFontSize + 'px'\n )\n .text(attributeType);\n\n // Add a text node for the attribute name\n const nameNode = groupNode\n .append('text')\n .attr('class', 'er entityLabel')\n .attr('id', `${attrPrefix}-name`)\n .attr('x', 0)\n .attr('y', 0)\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'left')\n .attr(\n 'style',\n 'font-family: ' + getConfig().fontFamily + '; font-size: ' + attrFontSize + 'px'\n )\n .text(item.attributeName);\n\n const attributeNode = {};\n attributeNode.tn = typeNode;\n attributeNode.nn = nameNode;\n\n const typeBBox = typeNode.node().getBBox();\n const nameBBox = nameNode.node().getBBox();\n maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width);\n maxNameWidth = Math.max(maxNameWidth, nameBBox.width);\n\n nodeHeight = Math.max(typeBBox.height, nameBBox.height);\n\n if (hasKeyType) {\n const keyTypeNode = groupNode\n .append('text')\n .attr('class', 'er entityLabel')\n .attr('id', `${attrPrefix}-key`)\n .attr('x', 0)\n .attr('y', 0)\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'left')\n .attr(\n 'style',\n 'font-family: ' + getConfig().fontFamily + '; font-size: ' + attrFontSize + 'px'\n )\n .text(item.attributeKeyType || '');\n\n attributeNode.kn = keyTypeNode;\n const keyTypeBBox = keyTypeNode.node().getBBox();\n maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width);\n nodeHeight = Math.max(nodeHeight, keyTypeBBox.height);\n }\n\n if (hasComment) {\n const commentNode = groupNode\n .append('text')\n .attr('class', 'er entityLabel')\n .attr('id', `${attrPrefix}-comment`)\n .attr('x', 0)\n .attr('y', 0)\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'left')\n .attr(\n 'style',\n 'font-family: ' + getConfig().fontFamily + '; font-size: ' + attrFontSize + 'px'\n )\n .text(item.attributeComment || '');\n\n attributeNode.cn = commentNode;\n const commentNodeBBox = commentNode.node().getBBox();\n maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width);\n nodeHeight = Math.max(nodeHeight, commentNodeBBox.height);\n }\n\n attributeNode.height = nodeHeight;\n // Keep a reference to the nodes so that we can iterate through them later\n attributeNodes.push(attributeNode);\n cumulativeHeight += nodeHeight + heightPadding * 2;\n attrNum += 1;\n });\n\n let widthPaddingFactor = 4;\n if (hasKeyType) {\n widthPaddingFactor += 2;\n }\n if (hasComment) {\n widthPaddingFactor += 2;\n }\n\n const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth;\n\n // Calculate the new bounding box of the overall entity, now that attributes have been added\n const bBox = {\n width: Math.max(\n conf.minEntityWidth,\n Math.max(\n labelBBox.width + conf.entityPadding * 2,\n maxWidth + widthPadding * widthPaddingFactor\n )\n ),\n height:\n attributes.length > 0\n ? cumulativeHeight\n : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2),\n };\n\n if (attributes.length > 0) {\n // There might be some spare width for padding out attributes if the entity name is very long\n const spareColumnWidth = Math.max(\n 0,\n (bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2)\n );\n\n // Position the entity label near the top of the entity bounding box\n entityTextNode.attr(\n 'transform',\n 'translate(' + bBox.width / 2 + ',' + (heightPadding + labelBBox.height / 2) + ')'\n );\n\n // Add rectangular boxes for the attribute types/names\n let heightOffset = labelBBox.height + heightPadding * 2; // Start at the bottom of the entity label\n let attribStyle = 'attributeBoxOdd'; // We will flip the style on alternate rows to achieve a banded effect\n\n attributeNodes.forEach((attributeNode) => {\n // Calculate the alignment y co-ordinate for the type/name of the attribute\n const alignY = heightOffset + heightPadding + attributeNode.height / 2;\n\n // Position the type attribute\n attributeNode.tn.attr('transform', 'translate(' + widthPadding + ',' + alignY + ')');\n\n // TODO Handle spareWidth in attr('width')\n // Insert a rectangle for the type\n const typeRect = groupNode\n .insert('rect', '#' + attributeNode.tn.node().id)\n .attr('class', `er ${attribStyle}`)\n .attr('fill', conf.fill)\n .attr('fill-opacity', '100%')\n .attr('stroke', conf.stroke)\n .attr('x', 0)\n .attr('y', heightOffset)\n .attr('width', maxTypeWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n const nameXOffset = parseFloat(typeRect.attr('x')) + parseFloat(typeRect.attr('width'));\n\n // Position the name attribute\n attributeNode.nn.attr(\n 'transform',\n 'translate(' + (nameXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the name\n const nameRect = groupNode\n .insert('rect', '#' + attributeNode.nn.node().id)\n .attr('class', `er ${attribStyle}`)\n .attr('fill', conf.fill)\n .attr('fill-opacity', '100%')\n .attr('stroke', conf.stroke)\n .attr('x', nameXOffset)\n .attr('y', heightOffset)\n .attr('width', maxNameWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n let keyTypeAndCommentXOffset =\n parseFloat(nameRect.attr('x')) + parseFloat(nameRect.attr('width'));\n\n if (hasKeyType) {\n // Position the key type attribute\n attributeNode.kn.attr(\n 'transform',\n 'translate(' + (keyTypeAndCommentXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the key type\n const keyTypeRect = groupNode\n .insert('rect', '#' + attributeNode.kn.node().id)\n .attr('class', `er ${attribStyle}`)\n .attr('fill', conf.fill)\n .attr('fill-opacity', '100%')\n .attr('stroke', conf.stroke)\n .attr('x', keyTypeAndCommentXOffset)\n .attr('y', heightOffset)\n .attr('width', maxKeyWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n\n keyTypeAndCommentXOffset =\n parseFloat(keyTypeRect.attr('x')) + parseFloat(keyTypeRect.attr('width'));\n }\n\n if (hasComment) {\n // Position the comment attribute\n attributeNode.cn.attr(\n 'transform',\n 'translate(' + (keyTypeAndCommentXOffset + widthPadding) + ',' + alignY + ')'\n );\n\n // Insert a rectangle for the comment\n groupNode\n .insert('rect', '#' + attributeNode.cn.node().id)\n .attr('class', `er ${attribStyle}`)\n .attr('fill', conf.fill)\n .attr('fill-opacity', '100%')\n .attr('stroke', conf.stroke)\n .attr('x', keyTypeAndCommentXOffset)\n .attr('y', heightOffset)\n .attr('width', maxCommentWidth + widthPadding * 2 + spareColumnWidth)\n .attr('height', attributeNode.height + heightPadding * 2);\n }\n\n // Increment the height offset to move to the next row\n heightOffset += attributeNode.height + heightPadding * 2;\n\n // Flip the attribute style for row banding\n attribStyle = attribStyle === 'attributeBoxOdd' ? 'attributeBoxEven' : 'attributeBoxOdd';\n });\n } else {\n // Ensure the entity box is a decent size without any attributes\n bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight);\n\n // Position the entity label in the middle of the box\n entityTextNode.attr('transform', 'translate(' + bBox.width / 2 + ',' + bBox.height / 2 + ')');\n }\n\n return bBox;\n};\n\n/**\n * Use D3 to construct the svg elements for the entities\n *\n * @param svgNode The svg node that contains the diagram\n * @param entities The entities to be drawn\n * @param graph The graph that contains the vertex and edge definitions post-layout\n * @returns {object} The first entity that was inserted\n */\nconst drawEntities = function (svgNode, entities, graph) {\n const keys = Object.keys(entities);\n let firstOne;\n\n keys.forEach(function (entityName) {\n const entityId = generateId(entityName, 'entity');\n entityNameIds.set(entityName, entityId);\n\n // Create a group for each entity\n const groupNode = svgNode.append('g').attr('id', entityId);\n\n firstOne = firstOne === undefined ? entityId : firstOne;\n\n // Label the entity - this is done first so that we can get the bounding box\n // which then determines the size of the rectangle\n const textId = 'text-' + entityId;\n const textNode = groupNode\n .append('text')\n .attr('class', 'er entityLabel')\n .attr('id', textId)\n .attr('x', 0)\n .attr('y', 0)\n .attr('dominant-baseline', 'middle')\n .attr('text-anchor', 'middle')\n .attr(\n 'style',\n 'font-family: ' + getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n )\n .text(entityName);\n\n const { width: entityWidth, height: entityHeight } = drawAttributes(\n groupNode,\n textNode,\n entities[entityName].attributes\n );\n\n // Draw the rectangle - insert it before the text so that the text is not obscured\n const rectNode = groupNode\n .insert('rect', '#' + textId)\n .attr('class', 'er entityBox')\n .attr('fill', conf.fill)\n .attr('fill-opacity', '100%')\n .attr('stroke', conf.stroke)\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', entityWidth)\n .attr('height', entityHeight);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph using the entityId\n graph.setNode(entityId, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: entityId,\n });\n });\n return firstOne;\n}; // drawEntities\n\nconst adjustEntities = function (svgNode, graph) {\n graph.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n svgNode\n .select('#' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y - graph.node(v).height / 2) +\n ' )'\n );\n }\n });\n};\n\n/**\n * Construct a name for an edge based on the names of the 2 entities and the role (relationship)\n * between them. Remove any spaces from it\n *\n * @param rel - A (parsed) relationship (e.g. one of the objects in the list returned by\n * erDb.getRelationships)\n * @returns {string}\n */\nconst getEdgeName = function (rel) {\n return (rel.entityA + rel.roleA + rel.entityB).replace(/\\s/g, '');\n};\n\n/**\n * Add each relationship to the graph\n *\n * @param relationships The relationships to be added\n * @param {Graph} g The graph\n * @returns {Array} The array of relationships\n */\nconst addRelationships = function (relationships, g) {\n relationships.forEach(function (r) {\n g.setEdge(\n entityNameIds.get(r.entityA),\n entityNameIds.get(r.entityB),\n { relationship: r },\n getEdgeName(r)\n );\n });\n return relationships;\n}; // addRelationships\n\nlet relCnt = 0;\n/**\n * Draw a relationship using edge information from the graph\n *\n * @param svg The svg node\n * @param rel The relationship to draw in the svg\n * @param g The graph containing the edge information\n * @param insert The insertion point in the svg DOM (because relationships have markers that need to\n * sit 'behind' opaque entity boxes)\n * @param diagObj\n */\nconst drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {\n relCnt++;\n\n // Find the edge relating to this relationship\n const edge = g.edge(\n entityNameIds.get(rel.entityA),\n entityNameIds.get(rel.entityB),\n getEdgeName(rel)\n );\n\n // Get a function that will generate the line path\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n // Insert the line at the right place\n const svgPath = svg\n .insert('path', '#' + insert)\n .attr('class', 'er relationshipLine')\n .attr('d', lineFunction(edge.points))\n .attr('stroke', conf.stroke)\n .attr('fill', 'none');\n\n // ...and with dashes if necessary\n if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) {\n svgPath.attr('stroke-dasharray', '8,8');\n }\n\n // TODO: Understand this better\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n // Decide which start and end markers it needs. It may be possible to be more concise here\n // by reversing a start marker to make an end marker...but this will do for now\n\n // Note that the 'A' entity's marker is at the end of the relationship and the 'B' entity's marker is at the start\n switch (rel.relSpec.cardA) {\n case diagObj.db.Cardinality.ZERO_OR_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_ONE_END + ')');\n break;\n case diagObj.db.Cardinality.ZERO_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_MORE_END + ')');\n break;\n case diagObj.db.Cardinality.ONE_OR_MORE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ONE_OR_MORE_END + ')');\n break;\n case diagObj.db.Cardinality.ONLY_ONE:\n svgPath.attr('marker-end', 'url(' + url + '#' + erMarkers.ERMarkers.ONLY_ONE_END + ')');\n break;\n }\n\n switch (rel.relSpec.cardB) {\n case diagObj.db.Cardinality.ZERO_OR_ONE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_ONE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ZERO_OR_MORE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ZERO_OR_MORE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ONE_OR_MORE:\n svgPath.attr(\n 'marker-start',\n 'url(' + url + '#' + erMarkers.ERMarkers.ONE_OR_MORE_START + ')'\n );\n break;\n case diagObj.db.Cardinality.ONLY_ONE:\n svgPath.attr('marker-start', 'url(' + url + '#' + erMarkers.ERMarkers.ONLY_ONE_START + ')');\n break;\n }\n\n // Now label the relationship\n\n // Find the half-way point\n const len = svgPath.node().getTotalLength();\n const labelPoint = svgPath.node().getPointAtLength(len * 0.5);\n\n // Append a text node containing the label\n const labelId = 'rel' + relCnt;\n\n const labelNode = svg\n .append('text')\n .attr('class', 'er relationshipLabel')\n .attr('id', labelId)\n .attr('x', labelPoint.x)\n .attr('y', labelPoint.y)\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n .attr(\n 'style',\n 'font-family: ' + getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n )\n .text(rel.roleA);\n\n // Figure out how big the opaque 'container' rectangle needs to be\n const labelBBox = labelNode.node().getBBox();\n\n // Insert the opaque rectangle before the text label\n svg\n .insert('rect', '#' + labelId)\n .attr('class', 'er relationshipLabelBox')\n .attr('x', labelPoint.x - labelBBox.width / 2)\n .attr('y', labelPoint.y - labelBBox.height / 2)\n .attr('width', labelBBox.width)\n .attr('height', labelBBox.height)\n .attr('fill', 'white')\n .attr('fill-opacity', '85%');\n};\n\n/**\n * Draw en E-R diagram in the tag with id: id based on the text definition of the diagram\n *\n * @param text The text of the diagram\n * @param id The unique id of the DOM node that contains the diagram\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n conf = getConfig().er;\n log.info('Drawing ER diagram');\n // diag.db.clear();\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n // const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // Parse the text to populate erDb\n // try {\n // parser.parse(text);\n // } catch (err) {\n // log.debug('Parsing failed');\n // }\n\n // Get a reference to the svg node that contains the text\n const svg = root.select(`[id='${id}']`);\n\n // Add cardinality marker definitions to the svg\n erMarkers.insertMarkers(svg, conf);\n\n // Now we have to construct the diagram in a specific way:\n // ---\n // 1. Create all the entities in the svg node at 0,0, but with the correct dimensions (allowing for text content)\n // 2. Make sure they are all added to the graph\n // 3. Add all the edges (relationships) to the graph as well\n // 4. Let dagre do its magic to lay out the graph. This assigns:\n // - the centre co-ordinates for each node, bearing in mind the dimensions and edge relationships\n // - the path co-ordinates for each edge\n // But it has no impact on the svg child nodes - the diagram remains with every entity rooted at 0,0\n // 5. Now assign a transform to each entity in the svg node so that it gets drawn in the correct place, as determined by\n // its centre point, which is obtained from the graph, and it's width and height\n // 6. And finally, create all the edges in the svg node using information from the graph\n // ---\n\n // Create the graph\n let g;\n\n // TODO: Explore directed vs undirected graphs, and how the layout is affected\n // An E-R diagram could be said to be undirected, but there is merit in setting\n // the direction from parent to child in a one-to-many as this influences graphlib to\n // put the parent above the child (does it?), which is intuitive. Most relationships\n // in ER diagrams are one-to-many.\n g = new graphlib.Graph({\n multigraph: true,\n directed: true,\n compound: false,\n })\n .setGraph({\n rankdir: conf.layoutDirection,\n marginx: 20,\n marginy: 20,\n nodesep: 100,\n edgesep: 100,\n ranksep: 100,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n // Draw the entities (at 0,0), returning the first svg node that got\n // inserted - this represents the insertion point for relationship paths\n const firstEntity = drawEntities(svg, diagObj.db.getEntities(), g);\n\n // TODO: externalise the addition of entities to the graph - it's a bit 'buried' in the above\n\n // Add all the relationships to the graph\n const relationships = addRelationships(diagObj.db.getRelationships(), g);\n\n dagre.layout(g); // Node and edge positions will be updated\n\n // Adjust the positions of the entities so that they adhere to the layout\n adjustEntities(svg, g);\n\n // Draw the relationships\n relationships.forEach(function (rel) {\n drawRelationshipFromLayout(svg, rel, g, firstEntity, diagObj);\n });\n\n const padding = conf.diagramPadding;\n\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(svg, height, width, conf.useMaxWidth);\n\n svg.attr('viewBox', `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);\n\n addSVGAccessibilityFields(diagObj.db, svg, id);\n}; // draw\n\n/**\n * Return a unique id based on the given string. Start with the prefix, then a hyphen, then the\n * simplified str, then a hyphen, then a unique uuid. (Hyphens are only included if needed.)\n * Although the official XML standard for ids says that many more characters are valid in the id,\n * this keeps things simple by accepting only A-Za-z0-9.\n *\n * @param {string} [str?=''] Given string to use as the basis for the id. Default is `''`\n * @param {string} [prefix?=''] String to put at the start, followed by '-'. Default is `''`\n * @param str\n * @param prefix\n * @returns {string}\n * @see https://www.w3.org/TR/xml/#NT-Name\n */\nexport function generateId(str = '', prefix = '') {\n const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, '');\n return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${uuid4()}`;\n}\n\n/**\n * Append a hyphen to a string only if the string isn't empty\n *\n * @param {string} str\n * @returns {string}\n * @todo This could be moved into a string utility file/class.\n */\nfunction strWithHyphen(str = '') {\n return str.length > 0 ? `${str}-` : '';\n}\n\nexport default {\n setConf,\n draw,\n};\n","/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n\n/* lexical grammar */\n%lex\n%x string\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%x dir\n%x vertex\n%x click\n%x href\n%x callbackname\n%x callbackargs\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%\\%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n[\\}] { this.popState(); }\n[^\\}]* return \"acc_descr_multiline_value\";\n// .*[^\\n]* { return \"acc_descr_line\"}\n[\"] this.begin(\"string\");\n[\"] this.popState();\n[^\"]* return \"STR\";\n\"style\" return 'STYLE';\n\"default\" return 'DEFAULT';\n\"linkStyle\" return 'LINKSTYLE';\n\"interpolate\" return 'INTERPOLATE';\n\"classDef\" return 'CLASSDEF';\n\"class\" return 'CLASS';\n\n/*\n---interactivity command---\n'href' adds a link to the specified node. 'href' can only be specified when the\nline was introduced with 'click'.\n'href \"\"' attaches the specified link to the node that was specified by 'click'.\n*/\n\"href\"[\\s]+[\"] this.begin(\"href\");\n[\"] this.popState();\n[^\"]* return 'HREF';\n\n/*\n---interactivity command---\n'call' adds a callback to the specified node. 'call' can only be specified when\nthe line was introduced with 'click'.\n'call ()' attaches the function 'callbackname' with the specified\narguments to the node that was specified by 'click'.\nFunction arguments are optional: 'call ()' simply executes 'callbackname' without any arguments.\n*/\n\"call\"[\\s]+ this.begin(\"callbackname\");\n\\([\\s]*\\) this.popState();\n\\( this.popState(); this.begin(\"callbackargs\");\n[^(]* return 'CALLBACKNAME';\n\\) this.popState();\n[^)]* return 'CALLBACKARGS';\n\n/*\n'click' is the keyword to introduce a line that contains interactivity commands.\n'click' must be followed by an existing node-id. All commands are attached to\nthat id.\n'click ' can be followed by href or call commands in any desired order\n*/\n\"click\"[\\s]+ this.begin(\"click\");\n[\\s\\n] this.popState();\n[^\\s\\n]* return 'CLICK';\n\n\"graph\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"flowchart\" {if(yy.lex.firstGraph()){this.begin(\"dir\");} return 'GRAPH';}\n\"subgraph\" return 'subgraph';\n\"end\"\\b\\s* return 'end';\n\n\"_self\" return 'LINK_TARGET';\n\"_blank\" return 'LINK_TARGET';\n\"_parent\" return 'LINK_TARGET';\n\"_top\" return 'LINK_TARGET';\n\n

(\\r?\\n)*\\s*\\n { this.popState(); return 'NODIR'; }\n\\s*\"LR\" { this.popState(); return 'DIR'; }\n\\s*\"RL\" { this.popState(); return 'DIR'; }\n\\s*\"TB\" { this.popState(); return 'DIR'; }\n\\s*\"BT\" { this.popState(); return 'DIR'; }\n\\s*\"TD\" { this.popState(); return 'DIR'; }\n\\s*\"BR\" { this.popState(); return 'DIR'; }\n\\s*\"<\" { this.popState(); return 'DIR'; }\n\\s*\">\" { this.popState(); return 'DIR'; }\n\\s*\"^\" { this.popState(); return 'DIR'; }\n\\s*\"v\" { this.popState(); return 'DIR'; }\n\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n\n[0-9]+ { return 'NUM';}\n\\# return 'BRKT';\n\":::\" return 'STYLE_SEPARATOR';\n\":\" return 'COLON';\n\"&\" return 'AMP';\n\";\" return 'SEMI';\n\",\" return 'COMMA';\n\"*\" return 'MULT';\n\\s*[xo<]?\\-\\-+[-xo>]\\s* return 'LINK';\n\\s*[xo<]?\\=\\=+[=xo>]\\s* return 'LINK';\n\\s*[xo<]?\\-?\\.+\\-[xo>]?\\s* return 'LINK';\n\\s*\\~\\~[\\~]+\\s* return 'LINK';\n\\s*[xo<]?\\-\\-\\s* return 'START_LINK';\n\\s*[xo<]?\\=\\=\\s* return 'START_LINK';\n\\s*[xo<]?\\-\\.\\s* return 'START_LINK';\n\"(-\" return '(-';\n\"-)\" return '-)';\n\"([\" return 'STADIUMSTART';\n\"])\" return 'STADIUMEND';\n\"[[\" return 'SUBROUTINESTART';\n\"]]\" return 'SUBROUTINEEND';\n\"[|\" return 'VERTEX_WITH_PROPS_START';\n\"[(\" return 'CYLINDERSTART';\n\")]\" return 'CYLINDEREND';\n\"(((\" return 'DOUBLECIRCLESTART';\n\")))\" return 'DOUBLECIRCLEEND';\n\\- return 'MINUS';\n\".\" return 'DOT';\n[\\_] return 'UNDERSCORE';\n\\+ return 'PLUS';\n\\% return 'PCT';\n\"=\" return 'EQUALS';\n\\= return 'EQUALS';\n\"<\" return 'TAGSTART';\n\">\" return 'TAGEND';\n\"^\" return 'UP';\n\"\\|\" return 'SEP';\n\"v\" return 'DOWN';\n[A-Za-z]+ return 'ALPHA';\n\"\\\\]\" return 'TRAPEND';\n\"[/\" return 'TRAPSTART';\n\"/]\" return 'INVTRAPEND';\n\"[\\\\\" return 'INVTRAPSTART';\n[!\"#$%&'*+,-.`?\\\\_/] return 'PUNCTUATION';\n[\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6]|\n[\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377]|\n[\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5]|\n[\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA]|\n[\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE]|\n[\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA]|\n[\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0]|\n[\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977]|\n[\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2]|\n[\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A]|\n[\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39]|\n[\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8]|\n[\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C]|\n[\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C]|\n[\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99]|\n[\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0]|\n[\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D]|\n[\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3]|\n[\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10]|\n[\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1]|\n[\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81]|\n[\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3]|\n[\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6]|\n[\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A]|\n[\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081]|\n[\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D]|\n[\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0]|\n[\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310]|\n[\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C]|\n[\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711]|\n[\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7]|\n[\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C]|\n[\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16]|\n[\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF]|\n[\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC]|\n[\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D]|\n[\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D]|\n[\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3]|\n[\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F]|\n[\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128]|\n[\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184]|\n[\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3]|\n[\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6]|\n[\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE]|\n[\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C]|\n[\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D]|\n[\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC]|\n[\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B]|\n[\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788]|\n[\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805]|\n[\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB]|\n[\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28]|\n[\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5]|\n[\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4]|\n[\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E]|\n[\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D]|\n[\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36]|\n[\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D]|\n[\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC]|\n[\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF]|\n[\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]\n return 'UNICODE_TEXT';\n\"|\" return 'PIPE';\n\"(\" return 'PS';\n\")\" return 'PE';\n\"[\" return 'SQS';\n\"]\" return 'SQE';\n\"{\" return 'DIAMOND_START'\n\"}\" return 'DIAMOND_STOP'\n\"\\\"\" return 'QUOTE';\n(\\r?\\n)+ return 'NEWLINE';\n\\s return 'SPACE';\n<> return 'EOF';\n\n/lex\n\n/* operator associations and precedence */\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n : mermaidDoc\n | directive start\n ;\n\ndirective\n : openDirective typeDirective closeDirective separator\n | openDirective typeDirective ':' argDirective closeDirective separator\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'flowchart'); }\n ;\n\nmermaidDoc\n : graphConfig document\n ;\n\ndocument\n\t: /* empty */\n\t{ $$ = [];}\n\t| document line\n\t{\n\t if(!Array.isArray($2) || $2.length > 0){\n\t $1.push($2);\n\t }\n\t $$=$1;}\n\t;\n\nline\n\t: statement\n\t{$$=$1;}\n\t| SEMI\n\t| NEWLINE\n\t| SPACE\n\t| EOF\n\t;\n\ngraphConfig\n : SPACE graphConfig\n | NEWLINE graphConfig\n | GRAPH NODIR\n { yy.setDirection('TB');$$ = 'TB';}\n | GRAPH DIR FirstStmtSeperator\n { yy.setDirection($2);$$ = $2;}\n // | GRAPH SPACE TAGEND FirstStmtSeperator\n // { yy.setDirection(\"LR\");$$ = $3;}\n // | GRAPH SPACE TAGSTART FirstStmtSeperator\n // { yy.setDirection(\"RL\");$$ = $3;}\n // | GRAPH SPACE UP FirstStmtSeperator\n // { yy.setDirection(\"BT\");$$ = $3;}\n // | GRAPH SPACE DOWN FirstStmtSeperator\n // { yy.setDirection(\"TB\");$$ = $3;}\n ;\n\nending: endToken ending\n | endToken\n ;\n\nendToken: NEWLINE | SPACE | EOF;\n\nFirstStmtSeperator\n : SEMI | NEWLINE | spaceList NEWLINE ;\n\n\nspaceListNewline\n : SPACE spaceListNewline\n | NEWLINE spaceListNewline\n | NEWLINE\n | SPACE\n ;\n\n\nspaceList\n : SPACE spaceList\n | SPACE\n ;\n\nstatement\n : verticeStatement separator\n { /* console.warn('finat vs', $1.nodes); */ $$=$1.nodes}\n | styleStatement separator\n {$$=[];}\n | linkStyleStatement separator\n {$$=[];}\n | classDefStatement separator\n {$$=[];}\n | classStatement separator\n {$$=[];}\n | clickStatement separator\n {$$=[];}\n | subgraph SPACE text SQS text SQE separator document end\n {$$=yy.addSubGraph($3,$8,$5);}\n | subgraph SPACE text separator document end\n {$$=yy.addSubGraph($3,$5,$3);}\n // | subgraph SPACE text separator document end\n // {$$=yy.addSubGraph($3,$5,$3);}\n | subgraph separator document end\n {$$=yy.addSubGraph(undefined,$3,undefined);}\n | direction\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }\n ;\n\nseparator: NEWLINE | SEMI | EOF ;\n\n\nverticeStatement: verticeStatement link node\n { /* console.warn('vs',$1.stmt,$3); */ yy.addLink($1.stmt,$3,$2); $$ = { stmt: $3, nodes: $3.concat($1.nodes) } }\n | verticeStatement link node spaceList\n { /* console.warn('vs',$1.stmt,$3); */ yy.addLink($1.stmt,$3,$2); $$ = { stmt: $3, nodes: $3.concat($1.nodes) } }\n |node spaceList {/*console.warn('noda', $1);*/ $$ = {stmt: $1, nodes:$1 }}\n |node { /*console.warn('noda', $1);*/ $$ = {stmt: $1, nodes:$1 }}\n ;\n\nnode: vertex\n { /* console.warn('nod', $1); */ $$ = [$1];}\n | node spaceList AMP spaceList vertex\n { $$ = $1.concat($5); /* console.warn('pip', $1[0], $5, $$); */ }\n | vertex STYLE_SEPARATOR idString\n {$$ = [$1];yy.setClass($1,$3)}\n ;\n\nvertex: idString SQS text SQE\n {$$ = $1;yy.addVertex($1,$3,'square');}\n | idString DOUBLECIRCLESTART text DOUBLECIRCLEEND\n {$$ = $1;yy.addVertex($1,$3,'doublecircle');}\n | idString PS PS text PE PE\n {$$ = $1;yy.addVertex($1,$4,'circle');}\n | idString '(-' text '-)'\n {$$ = $1;yy.addVertex($1,$3,'ellipse');}\n | idString STADIUMSTART text STADIUMEND\n {$$ = $1;yy.addVertex($1,$3,'stadium');}\n | idString SUBROUTINESTART text SUBROUTINEEND\n {$$ = $1;yy.addVertex($1,$3,'subroutine');}\n | idString VERTEX_WITH_PROPS_START ALPHA COLON ALPHA PIPE text SQE\n {$$ = $1;yy.addVertex($1,$7,'rect',undefined,undefined,undefined, Object.fromEntries([[$3, $5]]));}\n | idString CYLINDERSTART text CYLINDEREND\n {$$ = $1;yy.addVertex($1,$3,'cylinder');}\n | idString PS text PE\n {$$ = $1;yy.addVertex($1,$3,'round');}\n | idString DIAMOND_START text DIAMOND_STOP\n {$$ = $1;yy.addVertex($1,$3,'diamond');}\n | idString DIAMOND_START DIAMOND_START text DIAMOND_STOP DIAMOND_STOP\n {$$ = $1;yy.addVertex($1,$4,'hexagon');}\n | idString TAGEND text SQE\n {$$ = $1;yy.addVertex($1,$3,'odd');}\n | idString TRAPSTART text TRAPEND\n {$$ = $1;yy.addVertex($1,$3,'trapezoid');}\n | idString INVTRAPSTART text INVTRAPEND\n {$$ = $1;yy.addVertex($1,$3,'inv_trapezoid');}\n | idString TRAPSTART text INVTRAPEND\n {$$ = $1;yy.addVertex($1,$3,'lean_right');}\n | idString INVTRAPSTART text TRAPEND\n {$$ = $1;yy.addVertex($1,$3,'lean_left');}\n | idString\n { /*console.warn('h: ', $1);*/$$ = $1;yy.addVertex($1);}\n ;\n\n\n\nlink: linkStatement arrowText\n {$1.text = $2;$$ = $1;}\n | linkStatement TESTSTR SPACE\n {$1.text = $2;$$ = $1;}\n | linkStatement arrowText SPACE\n {$1.text = $2;$$ = $1;}\n | linkStatement\n {$$ = $1;}\n | START_LINK text LINK\n {var inf = yy.destructLink($3, $1); $$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"length\":inf.length,\"text\":$2};}\n ;\n\nlinkStatement: LINK\n {var inf = yy.destructLink($1);$$ = {\"type\":inf.type,\"stroke\":inf.stroke,\"length\":inf.length};}\n ;\n\narrowText:\n PIPE text PIPE\n {$$ = $2;}\n ;\n\ntext: textToken\n {$$=$1;}\n | text textToken\n {$$=$1+''+$2;}\n | STR\n {$$=$1;}\n ;\n\n\n\nkeywords\n : STYLE | LINKSTYLE | CLASSDEF | CLASS | CLICK | GRAPH | DIR | subgraph | end | DOWN | UP;\n\n\ntextNoTags: textNoTagsToken\n {$$=$1;}\n | textNoTags textNoTagsToken\n {$$=$1+''+$2;}\n ;\n\n\nclassDefStatement:CLASSDEF SPACE DEFAULT SPACE stylesOpt\n {$$ = $1;yy.addClass($3,$5);}\n | CLASSDEF SPACE alphaNum SPACE stylesOpt\n {$$ = $1;yy.addClass($3,$5);}\n ;\n\nclassStatement:CLASS SPACE alphaNum SPACE alphaNum\n {$$ = $1;yy.setClass($3, $5);}\n ;\n\nclickStatement\n : CLICK CALLBACKNAME {$$ = $1;yy.setClickEvent($1, $2);}\n | CLICK CALLBACKNAME SPACE STR {$$ = $1;yy.setClickEvent($1, $2);yy.setTooltip($1, $4);}\n | CLICK CALLBACKNAME CALLBACKARGS {$$ = $1;yy.setClickEvent($1, $2, $3);}\n | CLICK CALLBACKNAME CALLBACKARGS SPACE STR {$$ = $1;yy.setClickEvent($1, $2, $3);yy.setTooltip($1, $5);}\n | CLICK HREF {$$ = $1;yy.setLink($1, $2);}\n | CLICK HREF SPACE STR {$$ = $1;yy.setLink($1, $2);yy.setTooltip($1, $4);}\n | CLICK HREF SPACE LINK_TARGET {$$ = $1;yy.setLink($1, $2, $4);}\n | CLICK HREF SPACE STR SPACE LINK_TARGET {$$ = $1;yy.setLink($1, $2, $6);yy.setTooltip($1, $4);}\n | CLICK alphaNum {$$ = $1;yy.setClickEvent($1, $2);}\n | CLICK alphaNum SPACE STR {$$ = $1;yy.setClickEvent($1, $2);yy.setTooltip($1, $4);}\n | CLICK STR {$$ = $1;yy.setLink($1, $2);}\n | CLICK STR SPACE STR {$$ = $1;yy.setLink($1, $2);yy.setTooltip($1, $4);}\n | CLICK STR SPACE LINK_TARGET {$$ = $1;yy.setLink($1, $2, $4);}\n | CLICK STR SPACE STR SPACE LINK_TARGET {$$ = $1;yy.setLink($1, $2, $6);yy.setTooltip($1, $4);}\n ;\n\nstyleStatement:STYLE SPACE alphaNum SPACE stylesOpt\n {$$ = $1;yy.addVertex($3,undefined,undefined,$5);}\n | STYLE SPACE HEX SPACE stylesOpt\n {$$ = $1;yy.updateLink($3,$5);}\n ;\n\nlinkStyleStatement\n : LINKSTYLE SPACE DEFAULT SPACE stylesOpt\n {$$ = $1;yy.updateLink([$3],$5);}\n | LINKSTYLE SPACE numList SPACE stylesOpt\n {$$ = $1;yy.updateLink($3,$5);}\n | LINKSTYLE SPACE DEFAULT SPACE INTERPOLATE SPACE alphaNum SPACE stylesOpt\n {$$ = $1;yy.updateLinkInterpolate([$3],$7);yy.updateLink([$3],$9);}\n | LINKSTYLE SPACE numList SPACE INTERPOLATE SPACE alphaNum SPACE stylesOpt\n {$$ = $1;yy.updateLinkInterpolate($3,$7);yy.updateLink($3,$9);}\n | LINKSTYLE SPACE DEFAULT SPACE INTERPOLATE SPACE alphaNum\n {$$ = $1;yy.updateLinkInterpolate([$3],$7);}\n | LINKSTYLE SPACE numList SPACE INTERPOLATE SPACE alphaNum\n {$$ = $1;yy.updateLinkInterpolate($3,$7);}\n ;\n\nnumList: NUM\n {$$ = [$1]}\n | numList COMMA NUM\n {$1.push($3);$$ = $1;}\n ;\n\nstylesOpt: style\n {$$ = [$1]}\n | stylesOpt COMMA style\n {$1.push($3);$$ = $1;}\n ;\n\nstyle: styleComponent\n |style styleComponent\n {$$ = $1 + $2;}\n ;\n\nstyleComponent: ALPHA | COLON | MINUS | NUM | UNIT | SPACE | HEX | BRKT | DOT | STYLE | PCT ;\n\n/* Token lists */\n\ntextToken : textNoTagsToken | TAGSTART | TAGEND | START_LINK | PCT | DEFAULT;\n\ntextNoTagsToken: alphaNumToken | SPACE | MINUS | keywords ;\n\nidString\n :idStringToken\n {$$=$1}\n | idString idStringToken\n {$$=$1+''+$2}\n ;\n\nalphaNum\n : alphaNumStatement\n {$$=$1;}\n | alphaNum alphaNumStatement\n {$$=$1+''+$2;}\n ;\n\nalphaNumStatement\n : DIR\n {$$=$1;}\n | alphaNumToken\n {$$=$1;}\n | DOWN\n {$$='v';}\n | MINUS\n {$$='-';}\n ;\n\ndirection\n : direction_tb\n { $$={stmt:'dir', value:'TB'};}\n | direction_bt\n { $$={stmt:'dir', value:'BT'};}\n | direction_rl\n { $$={stmt:'dir', value:'RL'};}\n | direction_lr\n { $$={stmt:'dir', value:'LR'};}\n ;\n\nalphaNumToken : PUNCTUATION | AMP | UNICODE_TEXT | NUM| ALPHA | COLON | COMMA | PLUS | EQUALS | MULT | DOT | BRKT| UNDERSCORE ;\n\nidStringToken : ALPHA|UNDERSCORE |UNICODE_TEXT | NUM| COLON | COMMA | PLUS | MINUS | DOWN |EQUALS | MULT | BRKT | DOT | PUNCTUATION | AMP | DEFAULT;\n\ngraphCodeTokens: STADIUMSTART | STADIUMEND | SUBROUTINESTART | SUBROUTINEEND | VERTEX_WITH_PROPS_START | CYLINDERSTART | CYLINDEREND | TRAPSTART | TRAPEND | INVTRAPSTART | INVTRAPEND | PIPE | PS | PE | SQS | SQE | DIAMOND_START | DIAMOND_STOP | TAGSTART | TAGEND | ARROW_CROSS | ARROW_POINT | ARROW_CIRCLE | ARROW_OPEN | QUOTE | SEMI;\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const flowDetector: DiagramDetector = (txt, config) => {\n // If we have confired to only use new flow charts this function shohuld always return false\n // as in not signalling true for a legacy flowchart\n if (config?.flowchart?.defaultRenderer === 'dagre-wrapper') return false;\n return txt.match(/^\\s*graph/) !== null;\n};\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const flowDetectorV2: DiagramDetector = (txt, config) => {\n // If we have confgured to use dagre-wrapper then we should return true in this function for graph code thus making it use the new flowchart diagram\n if (config?.flowchart?.defaultRenderer === 'dagre-wrapper' && txt.match(/^\\s*graph/) !== null)\n return true;\n return txt.match(/^\\s*flowchart/) !== null;\n};\n","import { select } from 'd3';\nimport utils from '../../utils';\nimport * as configApi from '../../config';\nimport common from '../common/common';\nimport mermaidAPI from '../../mermaidAPI';\nimport { log } from '../../logger';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nconst MERMAID_DOM_ID_PREFIX = 'flowchart-';\nlet vertexCounter = 0;\nlet config = configApi.getConfig();\nlet vertices = {};\nlet edges = [];\nlet classes = [];\nlet subGraphs = [];\nlet subGraphLookup = {};\nlet tooltips = {};\nlet subCount = 0;\nlet firstGraphFlag = true;\nlet direction;\n\nlet version; // As in graph\n\n// Functions to be run after graph rendering\nlet funs = [];\n\nconst sanitizeText = (txt) => common.sanitizeText(txt, config);\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\n/**\n * Function to lookup domId from id in the graph definition.\n *\n * @param id\n * @public\n */\nexport const lookUpDomId = function (id) {\n const veritceKeys = Object.keys(vertices);\n for (let i = 0; i < veritceKeys.length; i++) {\n if (vertices[veritceKeys[i]].id === id) {\n return vertices[veritceKeys[i]].domId;\n }\n }\n return id;\n};\n\n/**\n * Function called by parser when a node definition has been found\n *\n * @param _id\n * @param text\n * @param type\n * @param style\n * @param classes\n * @param dir\n * @param props\n */\nexport const addVertex = function (_id, text, type, style, classes, dir, props = {}) {\n let txt;\n let id = _id;\n if (typeof id === 'undefined') {\n return;\n }\n if (id.trim().length === 0) {\n return;\n }\n\n // if (id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n\n if (typeof vertices[id] === 'undefined') {\n vertices[id] = {\n id: id,\n domId: MERMAID_DOM_ID_PREFIX + id + '-' + vertexCounter,\n styles: [],\n classes: [],\n };\n }\n vertexCounter++;\n if (typeof text !== 'undefined') {\n config = configApi.getConfig();\n txt = sanitizeText(text.trim());\n\n // strip quotes if string starts and ends with a quote\n if (txt[0] === '\"' && txt[txt.length - 1] === '\"') {\n txt = txt.substring(1, txt.length - 1);\n }\n\n vertices[id].text = txt;\n } else {\n if (typeof vertices[id].text === 'undefined') {\n vertices[id].text = _id;\n }\n }\n if (typeof type !== 'undefined') {\n vertices[id].type = type;\n }\n if (typeof style !== 'undefined') {\n if (style !== null) {\n style.forEach(function (s) {\n vertices[id].styles.push(s);\n });\n }\n }\n if (typeof classes !== 'undefined') {\n if (classes !== null) {\n classes.forEach(function (s) {\n vertices[id].classes.push(s);\n });\n }\n }\n if (typeof dir !== 'undefined') {\n vertices[id].dir = dir;\n }\n vertices[id].props = props;\n};\n\n/**\n * Function called by parser when a link/edge definition has been found\n *\n * @param _start\n * @param _end\n * @param type\n * @param linktext\n */\nexport const addSingleLink = function (_start, _end, type, linktext) {\n let start = _start;\n let end = _end;\n // if (start[0].match(/\\d/)) start = MERMAID_DOM_ID_PREFIX + start;\n // if (end[0].match(/\\d/)) end = MERMAID_DOM_ID_PREFIX + end;\n // log.info('Got edge...', start, end);\n\n const edge = { start: start, end: end, type: undefined, text: '' };\n linktext = type.text;\n\n if (typeof linktext !== 'undefined') {\n edge.text = sanitizeText(linktext.trim());\n\n // strip quotes if string starts and exnds with a quote\n if (edge.text[0] === '\"' && edge.text[edge.text.length - 1] === '\"') {\n edge.text = edge.text.substring(1, edge.text.length - 1);\n }\n }\n\n if (typeof type !== 'undefined') {\n edge.type = type.type;\n edge.stroke = type.stroke;\n edge.length = type.length;\n }\n edges.push(edge);\n};\nexport const addLink = function (_start, _end, type, linktext) {\n let i, j;\n for (i = 0; i < _start.length; i++) {\n for (j = 0; j < _end.length; j++) {\n addSingleLink(_start[i], _end[j], type, linktext);\n }\n }\n};\n\n/**\n * Updates a link's line interpolation algorithm\n *\n * @param positions\n * @param interp\n */\nexport const updateLinkInterpolate = function (positions, interp) {\n positions.forEach(function (pos) {\n if (pos === 'default') {\n edges.defaultInterpolate = interp;\n } else {\n edges[pos].interpolate = interp;\n }\n });\n};\n\n/**\n * Updates a link with a style\n *\n * @param positions\n * @param style\n */\nexport const updateLink = function (positions, style) {\n positions.forEach(function (pos) {\n if (pos === 'default') {\n edges.defaultStyle = style;\n } else {\n if (utils.isSubstringInArray('fill', style) === -1) {\n style.push('fill:none');\n }\n edges[pos].style = style;\n }\n });\n};\n\nexport const addClass = function (id, style) {\n if (typeof classes[id] === 'undefined') {\n classes[id] = { id: id, styles: [], textStyles: [] };\n }\n\n if (typeof style !== 'undefined') {\n if (style !== null) {\n style.forEach(function (s) {\n if (s.match('color')) {\n const newStyle1 = s.replace('fill', 'bgFill');\n const newStyle2 = newStyle1.replace('color', 'fill');\n classes[id].textStyles.push(newStyle2);\n }\n classes[id].styles.push(s);\n });\n }\n }\n};\n\n/**\n * Called by parser when a graph definition is found, stores the direction of the chart.\n *\n * @param dir\n */\nexport const setDirection = function (dir) {\n direction = dir;\n if (direction.match(/.*/)) {\n direction = 'LR';\n }\n if (direction.match(/.*v/)) {\n direction = 'TB';\n }\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n *\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\nexport const setClass = function (ids, className) {\n ids.split(',').forEach(function (_id) {\n // let id = version === 'gen-2' ? lookUpDomId(_id) : _id;\n let id = _id;\n // if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (typeof vertices[id] !== 'undefined') {\n vertices[id].classes.push(className);\n }\n\n if (typeof subGraphLookup[id] !== 'undefined') {\n subGraphLookup[id].classes.push(className);\n }\n });\n};\n\nconst setTooltip = function (ids, tooltip) {\n ids.split(',').forEach(function (id) {\n if (typeof tooltip !== 'undefined') {\n tooltips[version === 'gen-1' ? lookUpDomId(id) : id] = sanitizeText(tooltip);\n }\n });\n};\n\nconst setClickFun = function (id, functionName, functionArgs) {\n let domId = lookUpDomId(id);\n // if (_id[0].match(/\\d/)) id = MERMAID_DOM_ID_PREFIX + id;\n if (configApi.getConfig().securityLevel !== 'loose') {\n return;\n }\n if (typeof functionName === 'undefined') {\n return;\n }\n let argList = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(id);\n }\n\n if (typeof vertices[id] !== 'undefined') {\n vertices[id].haveCallback = true;\n funs.push(function () {\n const elem = document.querySelector(`[id=\"${domId}\"]`);\n if (elem !== null) {\n elem.addEventListener(\n 'click',\n function () {\n utils.runFunc(functionName, ...argList);\n },\n false\n );\n }\n });\n }\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids Comma separated list of ids\n * @param linkStr URL to create a link for\n * @param target\n */\nexport const setLink = function (ids, linkStr, target) {\n ids.split(',').forEach(function (id) {\n if (typeof vertices[id] !== 'undefined') {\n vertices[id].link = utils.formatUrl(linkStr, config);\n vertices[id].linkTarget = target;\n }\n });\n setClass(ids, 'clickable');\n};\nexport const getTooltip = function (id) {\n return tooltips[id];\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs\n */\nexport const setClickEvent = function (ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n};\n\nexport const bindFunctions = function (element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n};\nexport const getDirection = function () {\n return direction.trim();\n};\n/**\n * Retrieval function for fetching the found nodes after parsing has completed.\n *\n * @returns {{} | any | vertices}\n */\nexport const getVertices = function () {\n return vertices;\n};\n\n/**\n * Retrieval function for fetching the found links after parsing has completed.\n *\n * @returns {{} | any | edges}\n */\nexport const getEdges = function () {\n return edges;\n};\n\n/**\n * Retrieval function for fetching the found class definitions after parsing has completed.\n *\n * @returns {{} | any | classes}\n */\nexport const getClasses = function () {\n return classes;\n};\n\nconst setupToolTips = function (element) {\n let tooltipElem = select('.mermaidTooltip');\n if ((tooltipElem._groups || tooltipElem)[0][0] === null) {\n tooltipElem = select('body').append('div').attr('class', 'mermaidTooltip').style('opacity', 0);\n }\n\n const svg = select(element).select('svg');\n\n const nodes = svg.selectAll('g.node');\n nodes\n .on('mouseover', function () {\n const el = select(this);\n const title = el.attr('title');\n\n // Dont try to draw a tooltip if no data is provided\n if (title === null) {\n return;\n }\n const rect = this.getBoundingClientRect();\n\n tooltipElem.transition().duration(200).style('opacity', '.9');\n tooltipElem\n .text(el.attr('title'))\n .style('left', window.scrollX + rect.left + (rect.right - rect.left) / 2 + 'px')\n .style('top', window.scrollY + rect.top - 14 + document.body.scrollTop + 'px');\n tooltipElem.html(tooltipElem.html().replace(/<br\\/>/g, '
'));\n el.classed('hover', true);\n })\n .on('mouseout', function () {\n tooltipElem.transition().duration(500).style('opacity', 0);\n const el = select(this);\n el.classed('hover', false);\n });\n};\nfuns.push(setupToolTips);\n\n/**\n * Clears the internal graph db so that a new graph can be parsed.\n *\n * @param ver\n */\nexport const clear = function (ver = 'gen-1') {\n vertices = {};\n classes = {};\n edges = [];\n funs = [setupToolTips];\n subGraphs = [];\n subGraphLookup = {};\n subCount = 0;\n tooltips = [];\n firstGraphFlag = true;\n version = ver;\n commonClear();\n};\nexport const setGen = (ver) => {\n version = ver || 'gen-1';\n};\n/** @returns {string} */\nexport const defaultStyle = function () {\n return 'fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;';\n};\n\n/**\n * Clears the internal graph db so that a new graph can be parsed.\n *\n * @param _id\n * @param list\n * @param _title\n */\nexport const addSubGraph = function (_id, list, _title) {\n // console.log('addSubGraph', _id, list, _title);\n let id = _id.trim();\n let title = _title.trim();\n if (id === title && title.match(/\\s/)) {\n id = undefined;\n }\n /** @param a */\n function uniq(a) {\n const prims = { boolean: {}, number: {}, string: {} };\n const objs = [];\n\n let dir; // = undefined; direction.trim();\n const nodeList = a.filter(function (item) {\n const type = typeof item;\n if (item.stmt && item.stmt === 'dir') {\n dir = item.value;\n return false;\n }\n if (item.trim() === '') {\n return false;\n }\n if (type in prims) {\n return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);\n } else {\n return objs.indexOf(item) >= 0 ? false : objs.push(item);\n }\n });\n return { nodeList, dir };\n }\n\n let nodeList = [];\n\n const { nodeList: nl, dir } = uniq(nodeList.concat.apply(nodeList, list));\n nodeList = nl;\n if (version === 'gen-1') {\n for (let i = 0; i < nodeList.length; i++) {\n nodeList[i] = lookUpDomId(nodeList[i]);\n }\n }\n\n id = id || 'subGraph' + subCount;\n // if (id[0].match(/\\d/)) id = lookUpDomId(id);\n title = title || '';\n title = sanitizeText(title);\n subCount = subCount + 1;\n const subGraph = { id: id, nodes: nodeList, title: title.trim(), classes: [], dir };\n\n log.info('Adding', subGraph.id, subGraph.nodes, subGraph.dir);\n\n /** Deletes an id from all subgraphs */\n // const del = _id => {\n // subGraphs.forEach(sg => {\n // const pos = sg.nodes.indexOf(_id);\n // if (pos >= 0) {\n // sg.nodes.splice(pos, 1);\n // }\n // });\n // };\n\n // // Removes the members of this subgraph from any other subgraphs, a node only belong to one subgraph\n // subGraph.nodes.forEach(_id => del(_id));\n\n // Remove the members in the new subgraph if they already belong to another subgraph\n subGraph.nodes = makeUniq(subGraph, subGraphs).nodes;\n subGraphs.push(subGraph);\n subGraphLookup[id] = subGraph;\n return id;\n};\n\nconst getPosForId = function (id) {\n for (let i = 0; i < subGraphs.length; i++) {\n if (subGraphs[i].id === id) {\n return i;\n }\n }\n return -1;\n};\nlet secCount = -1;\nconst posCrossRef = [];\nconst indexNodes2 = function (id, pos) {\n const nodes = subGraphs[pos].nodes;\n secCount = secCount + 1;\n if (secCount > 2000) {\n return;\n }\n posCrossRef[secCount] = pos;\n // Check if match\n if (subGraphs[pos].id === id) {\n return {\n result: true,\n count: 0,\n };\n }\n\n let count = 0;\n let posCount = 1;\n while (count < nodes.length) {\n const childPos = getPosForId(nodes[count]);\n // Ignore regular nodes (pos will be -1)\n if (childPos >= 0) {\n const res = indexNodes2(id, childPos);\n if (res.result) {\n return {\n result: true,\n count: posCount + res.count,\n };\n } else {\n posCount = posCount + res.count;\n }\n }\n count = count + 1;\n }\n\n return {\n result: false,\n count: posCount,\n };\n};\n\nexport const getDepthFirstPos = function (pos) {\n return posCrossRef[pos];\n};\nexport const indexNodes = function () {\n secCount = -1;\n if (subGraphs.length > 0) {\n indexNodes2('none', subGraphs.length - 1, 0);\n }\n};\n\nexport const getSubGraphs = function () {\n return subGraphs;\n};\n\nexport const firstGraph = () => {\n if (firstGraphFlag) {\n firstGraphFlag = false;\n return true;\n }\n return false;\n};\n\nconst destructStartLink = (_str) => {\n let str = _str.trim();\n let type = 'arrow_open';\n\n switch (str[0]) {\n case '<':\n type = 'arrow_point';\n str = str.slice(1);\n break;\n case 'x':\n type = 'arrow_cross';\n str = str.slice(1);\n break;\n case 'o':\n type = 'arrow_circle';\n str = str.slice(1);\n break;\n }\n\n let stroke = 'normal';\n\n if (str.indexOf('=') !== -1) {\n stroke = 'thick';\n }\n\n if (str.indexOf('.') !== -1) {\n stroke = 'dotted';\n }\n\n return { type, stroke };\n};\n\nconst countChar = (char, str) => {\n const length = str.length;\n let count = 0;\n for (let i = 0; i < length; ++i) {\n if (str[i] === char) {\n ++count;\n }\n }\n return count;\n};\n\nconst destructEndLink = (_str) => {\n const str = _str.trim();\n let line = str.slice(0, -1);\n let type = 'arrow_open';\n\n switch (str.slice(-1)) {\n case 'x':\n type = 'arrow_cross';\n if (str[0] === 'x') {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n case '>':\n type = 'arrow_point';\n if (str[0] === '<') {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n case 'o':\n type = 'arrow_circle';\n if (str[0] === 'o') {\n type = 'double_' + type;\n line = line.slice(1);\n }\n break;\n }\n\n let stroke = 'normal';\n let length = line.length - 1;\n\n if (line[0] === '=') {\n stroke = 'thick';\n }\n\n if (line[0] === '~') {\n stroke = 'invisible';\n }\n\n let dots = countChar('.', line);\n\n if (dots) {\n stroke = 'dotted';\n length = dots;\n }\n\n return { type, stroke, length };\n};\n\nconst destructLink = (_str, _startStr) => {\n const info = destructEndLink(_str);\n let startInfo;\n if (_startStr) {\n startInfo = destructStartLink(_startStr);\n\n if (startInfo.stroke !== info.stroke) {\n return { type: 'INVALID', stroke: 'INVALID' };\n }\n\n if (startInfo.type === 'arrow_open') {\n // -- xyz --> - take arrow type from ending\n startInfo.type = info.type;\n } else {\n // x-- xyz --> - not supported\n if (startInfo.type !== info.type) return { type: 'INVALID', stroke: 'INVALID' };\n\n startInfo.type = 'double_' + startInfo.type;\n }\n\n if (startInfo.type === 'double_arrow') {\n startInfo.type = 'double_arrow_point';\n }\n\n startInfo.length = info.length;\n return startInfo;\n }\n\n return info;\n};\n\n// Todo optimizer this by caching existing nodes\nconst exists = (allSgs, _id) => {\n let res = false;\n allSgs.forEach((sg) => {\n const pos = sg.nodes.indexOf(_id);\n if (pos >= 0) {\n res = true;\n }\n });\n return res;\n};\n/**\n * Deletes an id from all subgraphs\n *\n * @param sg\n * @param allSubgraphs\n */\nconst makeUniq = (sg, allSubgraphs) => {\n const res = [];\n sg.nodes.forEach((_id, pos) => {\n if (!exists(allSubgraphs, _id)) {\n res.push(sg.nodes[pos]);\n }\n });\n return { nodes: res };\n};\n\nexport default {\n parseDirective,\n defaultConfig: () => configApi.defaultConfig.flowchart,\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n addVertex,\n lookUpDomId,\n addLink,\n updateLinkInterpolate,\n updateLink,\n addClass,\n setDirection,\n setClass,\n setTooltip,\n getTooltip,\n setClickEvent,\n setLink,\n bindFunctions,\n getDirection,\n getVertices,\n getEdges,\n getClasses,\n clear,\n setGen,\n defaultStyle,\n addSubGraph,\n getDepthFirstPos,\n indexNodes,\n getSubGraphs,\n destructLink,\n lex: {\n firstGraph,\n },\n exists,\n makeUniq,\n};\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var baseRest = require('./_baseRest'),\n eq = require('./eq'),\n isIterateeCall = require('./_isIterateeCall'),\n keysIn = require('./keysIn');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns own and inherited enumerable string keyed properties of source\n * objects to the destination object for all destination properties that\n * resolve to `undefined`. Source objects are applied from left to right.\n * Once a property is set, additional values of the same property are ignored.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @see _.defaultsDeep\n * @example\n *\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\n * // => { 'a': 1, 'b': 2 }\n */\nvar defaults = baseRest(function(object, sources) {\n object = Object(object);\n\n var index = -1;\n var length = sources.length;\n var guard = length > 2 ? sources[2] : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n length = 1;\n }\n\n while (++index < length) {\n var source = sources[index];\n var props = keysIn(source);\n var propsIndex = -1;\n var propsLength = props.length;\n\n while (++propsIndex < propsLength) {\n var key = props[propsIndex];\n var value = object[key];\n\n if (value === undefined ||\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\n object[key] = source[key];\n }\n }\n }\n\n return object;\n});\n\nmodule.exports = defaults;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var identity = require('./identity');\n\n/**\n * Casts `value` to `identity` if it's not a function.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Function} Returns cast function.\n */\nfunction castFunction(value) {\n return typeof value == 'function' ? value : identity;\n}\n\nmodule.exports = castFunction;\n","var arrayEach = require('./_arrayEach'),\n baseEach = require('./_baseEach'),\n castFunction = require('./_castFunction'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\n * The iteratee is invoked with three arguments: (value, index|key, collection).\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\n * or `_.forOwn` for object iteration.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @alias each\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n * @see _.forEachRight\n * @example\n *\n * _.forEach([1, 2], function(value) {\n * console.log(value);\n * });\n * // => Logs `1` then `2`.\n *\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\n * console.log(key);\n * });\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\n */\nfunction forEach(collection, iteratee) {\n var func = isArray(collection) ? arrayEach : baseEach;\n return func(collection, castFunction(iteratee));\n}\n\nmodule.exports = forEach;\n","module.exports = require('./forEach');\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.has` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHas(object, key) {\n return object != null && hasOwnProperty.call(object, key);\n}\n\nmodule.exports = baseHas;\n","var baseHas = require('./_baseHas'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct property of `object`.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = { 'a': { 'b': 2 } };\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.has(object, 'a');\n * // => true\n *\n * _.has(object, 'a.b');\n * // => true\n *\n * _.has(object, ['a', 'b']);\n * // => true\n *\n * _.has(other, 'a');\n * // => false\n */\nfunction has(object, path) {\n return object != null && hasPath(object, path, baseHas);\n}\n\nmodule.exports = has;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","var toString = require('./toString');\n\n/** Used to generate unique IDs. */\nvar idCounter = 0;\n\n/**\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {string} [prefix=''] The value to prefix the ID with.\n * @returns {string} Returns the unique ID.\n * @example\n *\n * _.uniqueId('contact_');\n * // => 'contact_104'\n *\n * _.uniqueId();\n * // => '105'\n */\nfunction uniqueId(prefix) {\n var id = ++idCounter;\n return toString(prefix) + id;\n}\n\nmodule.exports = uniqueId;\n","/* global window */\n\nvar lodash;\n\nif (typeof require === \"function\") {\n try {\n lodash = {\n defaults: require(\"lodash/defaults\"),\n each: require(\"lodash/each\"),\n isFunction: require(\"lodash/isFunction\"),\n isPlainObject: require(\"lodash/isPlainObject\"),\n pick: require(\"lodash/pick\"),\n has: require(\"lodash/has\"),\n range: require(\"lodash/range\"),\n uniqueId: require(\"lodash/uniqueId\")\n };\n }\n catch (e) {\n // continue regardless of error\n }\n}\n\nif (!lodash) {\n lodash = window._;\n}\n\nmodule.exports = lodash;\n","var _ = require(\"./lodash\");\n\n// Public utility functions\nmodule.exports = {\n isSubgraph: isSubgraph,\n edgeToId: edgeToId,\n applyStyle: applyStyle,\n applyClass: applyClass,\n applyTransition: applyTransition\n};\n\n/*\n * Returns true if the specified node in the graph is a subgraph node. A\n * subgraph node is one that contains other nodes.\n */\nfunction isSubgraph(g, v) {\n return !!g.children(v).length;\n}\n\nfunction edgeToId(e) {\n return escapeId(e.v) + \":\" + escapeId(e.w) + \":\" + escapeId(e.name);\n}\n\nvar ID_DELIM = /:/g;\nfunction escapeId(str) {\n return str ? String(str).replace(ID_DELIM, \"\\\\:\") : \"\";\n}\n\nfunction applyStyle(dom, styleFn) {\n if (styleFn) {\n dom.attr(\"style\", styleFn);\n }\n}\n\nfunction applyClass(dom, classFn, otherClasses) {\n if (classFn) {\n dom\n .attr(\"class\", classFn)\n .attr(\"class\", otherClasses + \" \" + dom.attr(\"class\"));\n }\n}\n\nfunction applyTransition(selection, g) {\n var graph = g.graph();\n\n if (_.isPlainObject(graph)) {\n var transition = graph.transition;\n if (_.isFunction(transition)) {\n return transition(selection);\n }\n }\n\n return selection;\n}\n","var util = require(\"../util\");\n\nmodule.exports = addHtmlLabel;\n\nfunction addHtmlLabel(root, node) {\n var fo = root\n .append(\"foreignObject\")\n .attr(\"width\", \"100000\");\n\n var div = fo\n .append(\"xhtml:div\");\n div.attr(\"xmlns\", \"http://www.w3.org/1999/xhtml\");\n\n var label = node.label;\n switch(typeof label) {\n case \"function\":\n div.insert(label);\n break;\n case \"object\":\n // Currently we assume this is a DOM object.\n div.insert(function() { return label; });\n break;\n default: div.html(label);\n }\n\n util.applyStyle(div, node.labelStyle);\n div.style(\"display\", \"inline-block\");\n // Fix for firefox\n div.style(\"white-space\", \"nowrap\");\n\n var client = div.node().getBoundingClientRect();\n fo\n .attr(\"width\", client.width)\n .attr(\"height\", client.height); \n\n return fo;\n}\n","import dagreD3 from 'dagre-d3';\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction question(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const s = (w + h) * 0.9;\n const points = [\n { x: s / 2, y: 0 },\n { x: s, y: -s / 2 },\n { x: s / 2, y: -s },\n { x: 0, y: -s / 2 },\n ];\n const shapeSvg = insertPolygonShape(parent, s, s, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction hexagon(parent, bbox, node) {\n const f = 4;\n const h = bbox.height;\n const m = h / f;\n const w = bbox.width + 2 * m;\n const points = [\n { x: m, y: 0 },\n { x: w - m, y: 0 },\n { x: w, y: -h / 2 },\n { x: w - m, y: -h },\n { x: m, y: -h },\n { x: 0, y: -h / 2 },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction rect_left_inv_arrow(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: -h / 2, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: -h / 2, y: -h },\n { x: 0, y: -h / 2 },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction lean_right(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction lean_left(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (2 * h) / 6, y: 0 },\n { x: w + h / 6, y: 0 },\n { x: w - (2 * h) / 6, y: -h },\n { x: -h / 6, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction trapezoid(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: (-2 * h) / 6, y: 0 },\n { x: w + (2 * h) / 6, y: 0 },\n { x: w - h / 6, y: -h },\n { x: h / 6, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction inv_trapezoid(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: h / 6, y: 0 },\n { x: w - h / 6, y: 0 },\n { x: w + (2 * h) / 6, y: -h },\n { x: (-2 * h) / 6, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction rect_right_inv_arrow(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: w + h / 2, y: 0 },\n { x: w, y: -h / 2 },\n { x: w + h / 2, y: -h },\n { x: 0, y: -h },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction stadium(parent, bbox, node) {\n const h = bbox.height;\n const w = bbox.width + h / 4;\n\n const shapeSvg = parent\n .insert('rect', ':first-child')\n .attr('rx', h / 2)\n .attr('ry', h / 2)\n .attr('x', -w / 2)\n .attr('y', -h / 2)\n .attr('width', w)\n .attr('height', h);\n\n node.intersect = function (point) {\n return dagreD3.intersect.rect(node, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction subroutine(parent, bbox, node) {\n const w = bbox.width;\n const h = bbox.height;\n const points = [\n { x: 0, y: 0 },\n { x: w, y: 0 },\n { x: w, y: -h },\n { x: 0, y: -h },\n { x: 0, y: 0 },\n { x: -8, y: 0 },\n { x: w + 8, y: 0 },\n { x: w + 8, y: -h },\n { x: -8, y: -h },\n { x: -8, y: 0 },\n ];\n const shapeSvg = insertPolygonShape(parent, w, h, points);\n node.intersect = function (point) {\n return dagreD3.intersect.polygon(node, points, point);\n };\n return shapeSvg;\n}\n\n/**\n * @param parent\n * @param bbox\n * @param node\n */\nfunction cylinder(parent, bbox, node) {\n const w = bbox.width;\n const rx = w / 2;\n const ry = rx / (2.5 + w / 50);\n const h = bbox.height + ry;\n\n const shape =\n 'M 0,' +\n ry +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n -w +\n ' 0 l 0,' +\n h +\n ' a ' +\n rx +\n ',' +\n ry +\n ' 0,0,0 ' +\n w +\n ' 0 l 0,' +\n -h;\n\n const shapeSvg = parent\n .attr('label-offset-y', ry)\n .insert('path', ':first-child')\n .attr('d', shape)\n .attr('transform', 'translate(' + -w / 2 + ',' + -(h / 2 + ry) + ')');\n\n node.intersect = function (point) {\n const pos = dagreD3.intersect.rect(node, point);\n const x = pos.x - node.x;\n\n if (\n rx != 0 &&\n (Math.abs(x) < node.width / 2 ||\n (Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry))\n ) {\n // ellipsis equation: x*x / a*a + y*y / b*b = 1\n // solve for y to get adjustion value for pos.y\n let y = ry * ry * (1 - (x * x) / (rx * rx));\n if (y != 0) y = Math.sqrt(y);\n y = ry - y;\n if (point.y - node.y > 0) y = -y;\n\n pos.y += y;\n }\n\n return pos;\n };\n\n return shapeSvg;\n}\n\n/** @param render */\nexport function addToRender(render) {\n render.shapes().question = question;\n render.shapes().hexagon = hexagon;\n render.shapes().stadium = stadium;\n render.shapes().subroutine = subroutine;\n render.shapes().cylinder = cylinder;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().rect_left_inv_arrow = rect_left_inv_arrow;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().lean_right = lean_right;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().lean_left = lean_left;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().trapezoid = trapezoid;\n\n // Add custom shape for box with inverted arrow on left side\n render.shapes().inv_trapezoid = inv_trapezoid;\n\n // Add custom shape for box with inverted arrow on right side\n render.shapes().rect_right_inv_arrow = rect_right_inv_arrow;\n}\n\n/** @param addShape */\nexport function addToRenderV2(addShape) {\n addShape({ question });\n addShape({ hexagon });\n addShape({ stadium });\n addShape({ subroutine });\n addShape({ cylinder });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ rect_left_inv_arrow });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ lean_right });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ lean_left });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ trapezoid });\n\n // Add custom shape for box with inverted arrow on left side\n addShape({ inv_trapezoid });\n\n // Add custom shape for box with inverted arrow on right side\n addShape({ rect_right_inv_arrow });\n}\n\n/**\n * @param parent\n * @param w\n * @param h\n * @param points\n */\nfunction insertPolygonShape(parent, w, h, points) {\n return parent\n .insert('polygon', ':first-child')\n .attr(\n 'points',\n points\n .map(function (d) {\n return d.x + ',' + d.y;\n })\n .join(' ')\n )\n .attr('transform', 'translate(' + -w / 2 + ',' + h / 2 + ')');\n}\n\nexport default {\n addToRender,\n addToRenderV2,\n};\n","import graphlib from 'graphlib';\nimport { select, curveLinear, selectAll } from 'd3';\nimport { getConfig } from '../../config';\nimport dagreD3 from 'dagre-d3';\nimport addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';\nimport { log } from '../../logger';\nimport common, { evaluate } from '../common/common';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport flowChartShapes from './flowChartShapes';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nconst conf = {};\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n for (let i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n};\n\n/**\n * Function that adds the vertices found in the graph definition to the graph to be rendered.\n *\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n * @param svgId\n * @param root\n * @param _doc\n * @param diagObj\n */\nexport const addVertices = function (vert, g, svgId, root, _doc, diagObj) {\n const svg = !root ? select(`[id=\"${svgId}\"]`) : root.select(`[id=\"${svgId}\"]`);\n const doc = !_doc ? document : _doc;\n const keys = Object.keys(vert);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = vert[id];\n\n /**\n * Variable for storing the classes for the vertex\n *\n * @type {string}\n */\n let classStr = 'default';\n if (vertex.classes.length > 0) {\n classStr = vertex.classes.join(' ');\n }\n\n const styles = getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n let vertexText = vertex.text !== undefined ? vertex.text : vertex.id;\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n let vertexNode;\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n const node = {\n label: vertexText.replace(\n /fa[lrsb]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n };\n vertexNode = addHtmlLabel(svg, node).node();\n vertexNode.parentNode.removeChild(vertexNode);\n } else {\n const svgLabel = doc.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n const rows = vertexText.split(common.lineBreakRegex);\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = doc.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '1');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n vertexNode = svgLabel;\n }\n\n let radious = 0;\n let _shape = '';\n // Set the shape based parameters\n switch (vertex.type) {\n case 'round':\n radious = 5;\n _shape = 'rect';\n break;\n case 'square':\n _shape = 'rect';\n break;\n case 'diamond':\n _shape = 'question';\n break;\n case 'hexagon':\n _shape = 'hexagon';\n break;\n case 'odd':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'lean_right':\n _shape = 'lean_right';\n break;\n case 'lean_left':\n _shape = 'lean_left';\n break;\n case 'trapezoid':\n _shape = 'trapezoid';\n break;\n case 'inv_trapezoid':\n _shape = 'inv_trapezoid';\n break;\n case 'odd_right':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'circle':\n _shape = 'circle';\n break;\n case 'ellipse':\n _shape = 'ellipse';\n break;\n case 'stadium':\n _shape = 'stadium';\n break;\n case 'subroutine':\n _shape = 'subroutine';\n break;\n case 'cylinder':\n _shape = 'cylinder';\n break;\n case 'group':\n _shape = 'rect';\n break;\n default:\n _shape = 'rect';\n }\n // Add the node\n log.warn('Adding node', vertex.id, vertex.domId);\n g.setNode(diagObj.db.lookUpDomId(vertex.id), {\n labelType: 'svg',\n labelStyle: styles.labelStyle,\n shape: _shape,\n label: vertexNode,\n rx: radious,\n ry: radious,\n class: classStr,\n style: styles.style,\n id: diagObj.db.lookUpDomId(vertex.id),\n });\n });\n};\n\n/**\n * Add edges to graph based on parsed graph definition\n *\n * @param {object} edges The edges to add to the graph\n * @param {object} g The graph object\n * @param diagObj\n */\nexport const addEdges = function (edges, g, diagObj) {\n let cnt = 0;\n\n let defaultStyle;\n let defaultLabelStyle;\n\n if (typeof edges.defaultStyle !== 'undefined') {\n const defaultStyles = getStylesFromArray(edges.defaultStyle);\n defaultStyle = defaultStyles.style;\n defaultLabelStyle = defaultStyles.labelStyle;\n }\n\n edges.forEach(function (edge) {\n cnt++;\n\n // Identify Link\n var linkId = 'L-' + edge.start + '-' + edge.end;\n var linkNameStart = 'LS-' + edge.start;\n var linkNameEnd = 'LE-' + edge.end;\n\n const edgeData = {};\n\n // Set link type for rendering\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n let style = '';\n let labelStyle = '';\n\n if (typeof edge.style !== 'undefined') {\n const styles = getStylesFromArray(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n } else {\n switch (edge.stroke) {\n case 'normal':\n style = 'fill:none';\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n break;\n case 'dotted':\n style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';\n break;\n case 'thick':\n style = ' stroke-width: 3.5px;fill:none';\n break;\n }\n }\n\n edgeData.style = style;\n edgeData.labelStyle = labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear);\n } else if (typeof edges.defaultInterpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear);\n } else {\n edgeData.curve = interpolateToCurve(conf.curve, curveLinear);\n }\n\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n edgeData.labelType = 'html';\n edgeData.label = `${edge.text.replace(\n /fa[lrsb]?:fa-[\\w-]+/g,\n (s) => ``\n )}`;\n } else {\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n }\n }\n\n edgeData.id = linkId;\n edgeData.class = linkNameStart + ' ' + linkNameEnd;\n edgeData.minlen = edge.length || 1;\n\n // Add the edge to the graph\n g.setEdge(diagObj.db.lookUpDomId(edge.start), diagObj.db.lookUpDomId(edge.end), edgeData, cnt);\n });\n};\n\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n *\n * @param text\n * @param diagObj\n * @returns {object} ClassDef styles\n */\nexport const getClasses = function (text, diagObj) {\n log.info('Extracting classes');\n diagObj.db.clear();\n try {\n // Parse the graph definition\n diagObj.parse(text);\n return diagObj.db.getClasses();\n } catch (e) {\n return;\n }\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param text\n * @param id\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n log.info('Drawing flowchart');\n diagObj.db.clear();\n const { securityLevel, flowchart: conf } = getConfig();\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // Parse the graph definition\n try {\n diagObj.parser.parse(text);\n } catch (err) {\n log.debug('Parsing failed');\n }\n\n // Fetch the default direction, use TD if none was found\n let dir = diagObj.db.getDirection();\n if (typeof dir === 'undefined') {\n dir = 'TD';\n }\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n let subG;\n const subGraphs = diagObj.db.getSubGraphs();\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n diagObj.db.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);\n }\n\n // Fetch the vertices/nodes and edges/links from the parsed graph definition\n const vert = diagObj.db.getVertices();\n log.warn('Get vertices', vert);\n\n const edges = diagObj.db.getEdges();\n\n let i = 0;\n for (i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n\n selectAll('cluster').append('text');\n\n for (let j = 0; j < subG.nodes.length; j++) {\n log.warn(\n 'Setting subgraph',\n subG.nodes[j],\n diagObj.db.lookUpDomId(subG.nodes[j]),\n diagObj.db.lookUpDomId(subG.id)\n );\n g.setParent(diagObj.db.lookUpDomId(subG.nodes[j]), diagObj.db.lookUpDomId(subG.id));\n }\n }\n addVertices(vert, g, id, root, doc, diagObj);\n addEdges(edges, g, diagObj);\n\n // Create the renderer\n const Render = dagreD3.render;\n const render = new Render();\n\n // Add custom shapes\n flowChartShapes.addToRender(render);\n\n // Add our custom arrow - an empty arrowhead\n render.arrows().none = function normal(parent, id, edge, type) {\n const marker = parent\n .append('marker')\n .attr('id', id)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'strokeWidth')\n .attr('markerWidth', 8)\n .attr('markerHeight', 6)\n .attr('orient', 'auto');\n\n const path = marker.append('path').attr('d', 'M 0 0 L 0 0 L 0 0 z');\n dagreD3.util.applyStyle(path, edge[type + 'Style']);\n };\n\n // Override normal arrowhead defined in d3. Remove style & add class to allow css styling.\n render.arrows().normal = function normal(parent, id) {\n const marker = parent\n .append('marker')\n .attr('id', id)\n .attr('viewBox', '0 0 10 10')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'strokeWidth')\n .attr('markerWidth', 8)\n .attr('markerHeight', 6)\n .attr('orient', 'auto');\n\n marker\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z')\n .attr('class', 'arrowheadPath')\n .style('stroke-width', 1)\n .style('stroke-dasharray', '1,0');\n };\n\n // Set up an SVG group so that we can translate the final graph.\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Adds title and description to the flow chart\n addSVGAccessibilityFields(diagObj.db, svg, id);\n\n // Run the renderer. This is what draws the final graph.\n const element = root.select('#' + id + ' g');\n render(element, g);\n\n element.selectAll('g.node').attr('title', function () {\n return diagObj.db.getTooltip(this.id);\n });\n\n // Index nodes\n diagObj.db.indexNodes('subGraph' + i);\n\n // reposition labels\n for (i = 0; i < subGraphs.length; i++) {\n subG = subGraphs[i];\n if (subG.title !== 'undefined') {\n const clusterRects = doc.querySelectorAll(\n '#' + id + ' [id=\"' + diagObj.db.lookUpDomId(subG.id) + '\"] rect'\n );\n const clusterEl = doc.querySelectorAll(\n '#' + id + ' [id=\"' + diagObj.db.lookUpDomId(subG.id) + '\"]'\n );\n\n const xPos = clusterRects[0].x.baseVal.value;\n const yPos = clusterRects[0].y.baseVal.value;\n const _width = clusterRects[0].width.baseVal.value;\n const cluster = select(clusterEl[0]);\n const te = cluster.select('.label');\n te.attr('transform', `translate(${xPos + _width / 2}, ${yPos + 14})`);\n te.attr('id', id + 'Text');\n\n for (let j = 0; j < subG.classes.length; j++) {\n clusterEl[0].classList.add(subG.classes[j]);\n }\n }\n }\n\n // Add label rects for non html labels\n if (!conf.htmlLabels) {\n const labels = doc.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (let k = 0; k < labels.length; k++) {\n const label = labels[k];\n\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = doc.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n // rect.setAttribute('style', 'fill:#e8e8e8;');\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n setupGraphViewbox(g, svg, conf.diagramPadding, conf.useMaxWidth);\n\n // If node has a link, wrap it in an anchor SVG object.\n const keys = Object.keys(vert);\n keys.forEach(function (key) {\n const vertex = vert[key];\n\n if (vertex.link) {\n const node = root.select('#' + id + ' [id=\"' + diagObj.db.lookUpDomId(key) + '\"]');\n if (node) {\n const link = doc.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n if (securityLevel === 'sandbox') {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', '_top');\n } else if (vertex.linkTarget) {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n }\n\n const linkNode = node.insert(function () {\n return link;\n }, ':first-child');\n\n const shape = node.select('.label-container');\n if (shape) {\n linkNode.append(function () {\n return shape.node();\n });\n }\n\n const label = node.select('.label');\n if (label) {\n linkNode.append(function () {\n return label.node();\n });\n }\n }\n }\n });\n};\n\nexport default {\n setConf,\n addVertices,\n addEdges,\n getClasses,\n draw,\n};\n","import graphlib from 'graphlib';\nimport { select, curveLinear, selectAll } from 'd3';\n\nimport flowDb from './flowDb';\nimport { getConfig } from '../../config';\n\nimport { render } from '../../dagre-wrapper/index.js';\nimport addHtmlLabel from 'dagre-d3/lib/label/add-html-label.js';\nimport { log } from '../../logger';\nimport common, { evaluate } from '../common/common';\nimport { interpolateToCurve, getStylesFromArray } from '../../utils';\nimport { setupGraphViewbox } from '../../setupGraphViewbox';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nconst conf = {};\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n for (let i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n};\n\n/**\n * Function that adds the vertices found during parsing to the graph to be rendered.\n *\n * @param vert Object containing the vertices.\n * @param g The graph that is to be drawn.\n * @param svgId\n * @param root\n * @param doc\n * @param diagObj\n */\nexport const addVertices = function (vert, g, svgId, root, doc, diagObj) {\n const svg = root.select(`[id=\"${svgId}\"]`);\n const keys = Object.keys(vert);\n\n // Iterate through each item in the vertex object (containing all the vertices found) in the graph definition\n keys.forEach(function (id) {\n const vertex = vert[id];\n\n /**\n * Variable for storing the classes for the vertex\n *\n * @type {string}\n */\n let classStr = 'default';\n if (vertex.classes.length > 0) {\n classStr = vertex.classes.join(' ');\n }\n\n const styles = getStylesFromArray(vertex.styles);\n\n // Use vertex id as text in the box if no text is provided by the graph definition\n let vertexText = vertex.text !== undefined ? vertex.text : vertex.id;\n\n // We create a SVG label, either by delegating to addHtmlLabel or manually\n let vertexNode;\n if (evaluate(getConfig().flowchart.htmlLabels)) {\n // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n const node = {\n label: vertexText.replace(\n /fa[lrsb]?:fa-[\\w-]+/g,\n (s) => ``\n ),\n };\n vertexNode = addHtmlLabel(svg, node).node();\n vertexNode.parentNode.removeChild(vertexNode);\n } else {\n const svgLabel = doc.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('style', styles.labelStyle.replace('color:', 'fill:'));\n\n const rows = vertexText.split(common.lineBreakRegex);\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = doc.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');\n tspan.setAttribute('dy', '1em');\n tspan.setAttribute('x', '1');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n vertexNode = svgLabel;\n }\n\n let radious = 0;\n let _shape = '';\n // Set the shape based parameters\n switch (vertex.type) {\n case 'round':\n radious = 5;\n _shape = 'rect';\n break;\n case 'square':\n _shape = 'rect';\n break;\n case 'diamond':\n _shape = 'question';\n break;\n case 'hexagon':\n _shape = 'hexagon';\n break;\n case 'odd':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'lean_right':\n _shape = 'lean_right';\n break;\n case 'lean_left':\n _shape = 'lean_left';\n break;\n case 'trapezoid':\n _shape = 'trapezoid';\n break;\n case 'inv_trapezoid':\n _shape = 'inv_trapezoid';\n break;\n case 'odd_right':\n _shape = 'rect_left_inv_arrow';\n break;\n case 'circle':\n _shape = 'circle';\n break;\n case 'ellipse':\n _shape = 'ellipse';\n break;\n case 'stadium':\n _shape = 'stadium';\n break;\n case 'subroutine':\n _shape = 'subroutine';\n break;\n case 'cylinder':\n _shape = 'cylinder';\n break;\n case 'group':\n _shape = 'rect';\n break;\n case 'doublecircle':\n _shape = 'doublecircle';\n break;\n default:\n _shape = 'rect';\n }\n // Add the node\n g.setNode(vertex.id, {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n link: vertex.link,\n linkTarget: vertex.linkTarget,\n tooltip: diagObj.db.getTooltip(vertex.id) || '',\n domId: diagObj.db.lookUpDomId(vertex.id),\n haveCallback: vertex.haveCallback,\n width: vertex.type === 'group' ? 500 : undefined,\n dir: vertex.dir,\n type: vertex.type,\n props: vertex.props,\n padding: getConfig().flowchart.padding,\n });\n\n log.info('setNode', {\n labelStyle: styles.labelStyle,\n shape: _shape,\n labelText: vertexText,\n rx: radious,\n ry: radious,\n class: classStr,\n style: styles.style,\n id: vertex.id,\n domId: diagObj.db.lookUpDomId(vertex.id),\n width: vertex.type === 'group' ? 500 : undefined,\n type: vertex.type,\n dir: vertex.dir,\n props: vertex.props,\n padding: getConfig().flowchart.padding,\n });\n });\n};\n\n/**\n * Add edges to graph based on parsed graph definition\n *\n * @param {object} edges The edges to add to the graph\n * @param {object} g The graph object\n * @param diagObj\n */\nexport const addEdges = function (edges, g, diagObj) {\n log.info('abc78 edges = ', edges);\n let cnt = 0;\n let linkIdCnt = {};\n\n let defaultStyle;\n let defaultLabelStyle;\n\n if (typeof edges.defaultStyle !== 'undefined') {\n const defaultStyles = getStylesFromArray(edges.defaultStyle);\n defaultStyle = defaultStyles.style;\n defaultLabelStyle = defaultStyles.labelStyle;\n }\n\n edges.forEach(function (edge) {\n cnt++;\n\n // Identify Link\n var linkIdBase = 'L-' + edge.start + '-' + edge.end;\n // count the links from+to the same node to give unique id\n if (typeof linkIdCnt[linkIdBase] === 'undefined') {\n linkIdCnt[linkIdBase] = 0;\n log.info('abc78 new entry', linkIdBase, linkIdCnt[linkIdBase]);\n } else {\n linkIdCnt[linkIdBase]++;\n log.info('abc78 new entry', linkIdBase, linkIdCnt[linkIdBase]);\n }\n let linkId = linkIdBase + '-' + linkIdCnt[linkIdBase];\n log.info('abc78 new link id to be used is', linkIdBase, linkId, linkIdCnt[linkIdBase]);\n var linkNameStart = 'LS-' + edge.start;\n var linkNameEnd = 'LE-' + edge.end;\n\n const edgeData = { style: '', labelStyle: '' };\n edgeData.minlen = edge.length || 1;\n //edgeData.id = 'id' + cnt;\n\n // Set link type for rendering\n if (edge.type === 'arrow_open') {\n edgeData.arrowhead = 'none';\n } else {\n edgeData.arrowhead = 'normal';\n }\n\n // Check of arrow types, placed here in order not to break old rendering\n edgeData.arrowTypeStart = 'arrow_open';\n edgeData.arrowTypeEnd = 'arrow_open';\n\n /* eslint-disable no-fallthrough */\n switch (edge.type) {\n case 'double_arrow_cross':\n edgeData.arrowTypeStart = 'arrow_cross';\n case 'arrow_cross':\n edgeData.arrowTypeEnd = 'arrow_cross';\n break;\n case 'double_arrow_point':\n edgeData.arrowTypeStart = 'arrow_point';\n case 'arrow_point':\n edgeData.arrowTypeEnd = 'arrow_point';\n break;\n case 'double_arrow_circle':\n edgeData.arrowTypeStart = 'arrow_circle';\n case 'arrow_circle':\n edgeData.arrowTypeEnd = 'arrow_circle';\n break;\n }\n\n let style = '';\n let labelStyle = '';\n\n switch (edge.stroke) {\n case 'normal':\n style = 'fill:none;';\n if (typeof defaultStyle !== 'undefined') {\n style = defaultStyle;\n }\n if (typeof defaultLabelStyle !== 'undefined') {\n labelStyle = defaultLabelStyle;\n }\n edgeData.thickness = 'normal';\n edgeData.pattern = 'solid';\n break;\n case 'dotted':\n edgeData.thickness = 'normal';\n edgeData.pattern = 'dotted';\n edgeData.style = 'fill:none;stroke-width:2px;stroke-dasharray:3;';\n break;\n case 'thick':\n edgeData.thickness = 'thick';\n edgeData.pattern = 'solid';\n edgeData.style = 'stroke-width: 3.5px;fill:none;';\n break;\n case 'invisible':\n edgeData.thickness = 'invisible';\n edgeData.pattern = 'solid';\n edgeData.style = 'stroke-width: 0;fill:none;';\n break;\n }\n if (typeof edge.style !== 'undefined') {\n const styles = getStylesFromArray(edge.style);\n style = styles.style;\n labelStyle = styles.labelStyle;\n }\n\n edgeData.style = edgeData.style += style;\n edgeData.labelStyle = edgeData.labelStyle += labelStyle;\n\n if (typeof edge.interpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edge.interpolate, curveLinear);\n } else if (typeof edges.defaultInterpolate !== 'undefined') {\n edgeData.curve = interpolateToCurve(edges.defaultInterpolate, curveLinear);\n } else {\n edgeData.curve = interpolateToCurve(conf.curve, curveLinear);\n }\n\n if (typeof edge.text === 'undefined') {\n if (typeof edge.style !== 'undefined') {\n edgeData.arrowheadStyle = 'fill: #333';\n }\n } else {\n edgeData.arrowheadStyle = 'fill: #333';\n edgeData.labelpos = 'c';\n }\n\n edgeData.labelType = 'text';\n edgeData.label = edge.text.replace(common.lineBreakRegex, '\\n');\n\n if (typeof edge.style === 'undefined') {\n edgeData.style = edgeData.style || 'stroke: #333; stroke-width: 1.5px;fill:none;';\n }\n\n edgeData.labelStyle = edgeData.labelStyle.replace('color:', 'fill:');\n\n edgeData.id = linkId;\n edgeData.classes = 'flowchart-link ' + linkNameStart + ' ' + linkNameEnd;\n\n // Add the edge to the graph\n g.setEdge(edge.start, edge.end, edgeData, cnt);\n });\n};\n\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n *\n * @param text\n * @param diagObj\n * @returns {object} ClassDef styles\n */\nexport const getClasses = function (text, diagObj) {\n log.info('Extracting classes');\n diagObj.db.clear();\n try {\n // Parse the graph definition\n diagObj.parse(text);\n return diagObj.db.getClasses();\n } catch (e) {\n return;\n }\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param text\n * @param id\n */\n\nexport const draw = function (text, id, _version, diagObj) {\n log.info('Drawing flowchart');\n diagObj.db.clear();\n flowDb.setGen('gen-2');\n // Parse the graph definition\n diagObj.parser.parse(text);\n\n // Fetch the default direction, use TD if none was found\n let dir = diagObj.db.getDirection();\n if (typeof dir === 'undefined') {\n dir = 'TD';\n }\n\n const { securityLevel, flowchart: conf } = getConfig();\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n // Handle root and document for when rendering in sandbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: dir,\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 0,\n marginy: 0,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n let subG;\n const subGraphs = diagObj.db.getSubGraphs();\n log.info('Subgraphs - ', subGraphs);\n for (let i = subGraphs.length - 1; i >= 0; i--) {\n subG = subGraphs[i];\n log.info('Subgraph - ', subG);\n diagObj.db.addVertex(subG.id, subG.title, 'group', undefined, subG.classes, subG.dir);\n }\n\n // Fetch the vertices/nodes and edges/links from the parsed graph definition\n const vert = diagObj.db.getVertices();\n\n const edges = diagObj.db.getEdges();\n\n log.info(edges);\n let i = 0;\n for (i = subGraphs.length - 1; i >= 0; i--) {\n // for (let i = 0; i < subGraphs.length; i++) {\n subG = subGraphs[i];\n\n selectAll('cluster').append('text');\n\n for (let j = 0; j < subG.nodes.length; j++) {\n log.info('Setting up subgraphs', subG.nodes[j], subG.id);\n g.setParent(subG.nodes[j], subG.id);\n }\n }\n addVertices(vert, g, id, root, doc, diagObj);\n addEdges(edges, g, diagObj);\n\n // Add custom shapes\n // flowChartShapes.addToRenderV2(addShape);\n\n // Set up an SVG group so that we can translate the final graph.\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Adds title and description to the flow chart\n addSVGAccessibilityFields(diagObj.db, svg, id);\n\n // Run the renderer. This is what draws the final graph.\n const element = root.select('#' + id + ' g');\n render(element, g, ['point', 'circle', 'cross'], 'flowchart', id);\n\n setupGraphViewbox(g, svg, conf.diagramPadding, conf.useMaxWidth);\n\n // Index nodes\n diagObj.db.indexNodes('subGraph' + i);\n\n // Add label rects for non html labels\n if (!conf.htmlLabels) {\n const labels = doc.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (let k = 0; k < labels.length; k++) {\n const label = labels[k];\n\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = doc.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n\n label.insertBefore(rect, label.firstChild);\n }\n }\n\n // If node has a link, wrap it in an anchor SVG object.\n const keys = Object.keys(vert);\n keys.forEach(function (key) {\n const vertex = vert[key];\n\n if (vertex.link) {\n const node = select('#' + id + ' [id=\"' + key + '\"]');\n if (node) {\n const link = doc.createElementNS('http://www.w3.org/2000/svg', 'a');\n link.setAttributeNS('http://www.w3.org/2000/svg', 'class', vertex.classes.join(' '));\n link.setAttributeNS('http://www.w3.org/2000/svg', 'href', vertex.link);\n link.setAttributeNS('http://www.w3.org/2000/svg', 'rel', 'noopener');\n if (securityLevel === 'sandbox') {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', '_top');\n } else if (vertex.linkTarget) {\n link.setAttributeNS('http://www.w3.org/2000/svg', 'target', vertex.linkTarget);\n }\n\n const linkNode = node.insert(function () {\n return link;\n }, ':first-child');\n\n const shape = node.select('.label-container');\n if (shape) {\n linkNode.append(function () {\n return shape.node();\n });\n }\n\n const label = node.select('.label');\n if (label) {\n linkNode.append(function () {\n return label.node();\n });\n }\n }\n }\n });\n};\n\nexport default {\n setConf,\n addVertices,\n addEdges,\n getClasses,\n draw,\n};\n","/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n%lex\n\n%options case-insensitive\n\n%x click\n%x href\n%x callbackname\n%x callbackargs\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n[\\}] { this.popState(); }\n[^\\}]* return \"acc_descr_multiline_value\";\n\n\\%\\%(?!\\{)*[^\\n]* /* skip comments */\n[^\\}]\\%\\%*[^\\n]* /* skip comments */\n\\%\\%*[^\\n]*[\\n]* /* do nothing */\n\n[\\n]+ return 'NL';\n\\s+ /* skip whitespace */\n\\#[^\\n]* /* skip comments */\n\\%%[^\\n]* /* skip comments */\n\n/*\n---interactivity command---\n'href' adds a link to the specified task. 'href' can only be specified when the\nline was introduced with 'click'.\n'href \"\"' attaches the specified link to the task that was specified by 'click'.\n*/\n\"href\"[\\s]+[\"] this.begin(\"href\");\n[\"] this.popState();\n[^\"]* return 'href';\n\n/*\n---interactivity command---\n'call' adds a callback to the specified task. 'call' can only be specified when\nthe line was introdcued with 'click'.\n'call ()' attaches the function 'callbackname' with the specified\narguments to the task that was specified by 'click'.\nFunction arguments are optional: 'call ()' simply executes 'callbackname' without any arguments.\n*/\n\"call\"[\\s]+ this.begin(\"callbackname\");\n\\([\\s]*\\) this.popState();\n\\( this.popState(); this.begin(\"callbackargs\");\n[^(]* return 'callbackname';\n\\) this.popState();\n[^)]* return 'callbackargs';\n\n/*\n'click' is the keyword to introduce a line that contains interactivity commands.\n'click' must be followed by an existing task-id. All commands are attached to\nthat id.\n'click ' can be followed by href or call commands in any desired order\n*/\n\"click\"[\\s]+ this.begin(\"click\");\n[\\s\\n] this.popState();\n[^\\s\\n]* return 'click';\n\n\"gantt\" return 'gantt';\n\"dateFormat\"\\s[^#\\n;]+ return 'dateFormat';\n\"inclusiveEndDates\" return 'inclusiveEndDates';\n\"topAxis\" return 'topAxis';\n\"axisFormat\"\\s[^#\\n;]+ return 'axisFormat';\n\"includes\"\\s[^#\\n;]+ return 'includes';\n\"excludes\"\\s[^#\\n;]+ return 'excludes';\n\"todayMarker\"\\s[^\\n;]+ return 'todayMarker';\n\\d\\d\\d\\d\"-\"\\d\\d\"-\"\\d\\d return 'date';\n\"title\"\\s[^#\\n;]+ return 'title';\n\"accDescription\"\\s[^#\\n;]+ return 'accDescription'\n\"section\"\\s[^#:\\n;]+ return 'section';\n[^#:\\n;]+ return 'taskTxt';\n\":\"[^#\\n;]+ return 'taskData';\n\":\" return ':';\n<> return 'EOF';\n. return 'INVALID';\n\n/lex\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n\t: directive start\n\t| gantt document 'EOF' { return $2; }\n\t;\n\ndocument\n\t: /* empty */ { $$ = [] }\n\t| document line {$1.push($2);$$ = $1}\n\t;\n\nline\n\t: SPACE statement { $$ = $2 }\n\t| statement { $$ = $1 }\n\t| NL { $$=[];}\n\t| EOF { $$=[];}\n\t;\n\nstatement\n : dateFormat {yy.setDateFormat($1.substr(11));$$=$1.substr(11);}\n | inclusiveEndDates {yy.enableInclusiveEndDates();$$=$1.substr(18);}\n | topAxis {yy.TopAxis();$$=$1.substr(8);}\n | axisFormat {yy.setAxisFormat($1.substr(11));$$=$1.substr(11);}\n | excludes {yy.setExcludes($1.substr(9));$$=$1.substr(9);}\n | includes {yy.setIncludes($1.substr(9));$$=$1.substr(9);}\n | todayMarker {yy.setTodayMarker($1.substr(12));$$=$1.substr(12);}\n | title {yy.setDiagramTitle($1.substr(6));$$=$1.substr(6);}\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}\n | clickStatement\n | taskTxt taskData {yy.addTask($1,$2);$$='task';}\n | directive\n ;\n\ndirective\n : openDirective typeDirective closeDirective 'NL'\n | openDirective typeDirective ':' argDirective closeDirective 'NL'\n ;\n\n/*\nclick allows any combination of href and call.\n*/\nclickStatement\n : click callbackname {$$ = $1;yy.setClickEvent($1, $2, null);}\n | click callbackname callbackargs {$$ = $1;yy.setClickEvent($1, $2, $3);}\n\n | click callbackname href {$$ = $1;yy.setClickEvent($1, $2, null);yy.setLink($1,$3);}\n | click callbackname callbackargs href {$$ = $1;yy.setClickEvent($1, $2, $3);yy.setLink($1,$4);}\n\n | click href callbackname {$$ = $1;yy.setClickEvent($1, $3, null);yy.setLink($1,$2);}\n | click href callbackname callbackargs {$$ = $1;yy.setClickEvent($1, $3, $4);yy.setLink($1,$2);}\n\n | click href {$$ = $1;yy.setLink($1, $2);}\n ;\n\nclickStatementDebug\n : click callbackname {$$=$1 + ' ' + $2;}\n | click callbackname href {$$=$1 + ' ' + $2 + ' ' + $3;}\n\n | click callbackname callbackargs {$$=$1 + ' ' + $2 + ' ' + $3;}\n | click callbackname callbackargs href {$$=$1 + ' ' + $2 + ' ' + $3 + ' ' + $4;}\n\n | click href callbackname {$$=$1 + ' ' + $2 + ' ' + $3;}\n | click href callbackname callbackargs {$$=$1 + ' ' + $2 + ' ' + $3 + ' ' + $4;}\n\n | click href {$$=$1 + ' ' + $2;}\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'gantt'); }\n ;\n\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const ganttDetector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*gantt/) !== null;\n};\n","import moment from 'moment-mini';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\nimport { log } from '../../logger';\nimport * as configApi from '../../config';\nimport utils from '../../utils';\nimport mermaidAPI from '../../mermaidAPI';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n setDiagramTitle,\n getDiagramTitle,\n} from '../../commonDb';\n\nlet dateFormat = '';\nlet axisFormat = '';\nlet todayMarker = '';\nlet includes = [];\nlet excludes = [];\nlet links = {};\nlet sections = [];\nlet tasks = [];\nlet currentSection = '';\nconst tags = ['active', 'done', 'crit', 'milestone'];\nlet funs = [];\nlet inclusiveEndDates = false;\nlet topAxis = false;\n\n// The serial order of the task in the script\nlet lastOrder = 0;\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nexport const clear = function () {\n sections = [];\n tasks = [];\n currentSection = '';\n funs = [];\n taskCnt = 0;\n lastTask = undefined;\n lastTaskID = undefined;\n rawTasks = [];\n dateFormat = '';\n axisFormat = '';\n todayMarker = '';\n includes = [];\n excludes = [];\n inclusiveEndDates = false;\n topAxis = false;\n lastOrder = 0;\n links = {};\n commonClear();\n};\n\nexport const setAxisFormat = function (txt) {\n axisFormat = txt;\n};\n\nexport const getAxisFormat = function () {\n return axisFormat;\n};\n\nexport const setTodayMarker = function (txt) {\n todayMarker = txt;\n};\n\nexport const getTodayMarker = function () {\n return todayMarker;\n};\n\nexport const setDateFormat = function (txt) {\n dateFormat = txt;\n};\n\nexport const enableInclusiveEndDates = function () {\n inclusiveEndDates = true;\n};\n\nexport const endDatesAreInclusive = function () {\n return inclusiveEndDates;\n};\n\nexport const enableTopAxis = function () {\n topAxis = true;\n};\n\nexport const topAxisEnabled = function () {\n return topAxis;\n};\n\nexport const getDateFormat = function () {\n return dateFormat;\n};\n\nexport const setIncludes = function (txt) {\n includes = txt.toLowerCase().split(/[\\s,]+/);\n};\n\nexport const getIncludes = function () {\n return includes;\n};\nexport const setExcludes = function (txt) {\n excludes = txt.toLowerCase().split(/[\\s,]+/);\n};\n\nexport const getExcludes = function () {\n return excludes;\n};\n\nexport const getLinks = function () {\n return links;\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsPricessed = compileTasks();\n const maxDepth = 10;\n let iterationCount = 0;\n while (!allItemsPricessed && iterationCount < maxDepth) {\n allItemsPricessed = compileTasks();\n iterationCount++;\n }\n\n tasks = rawTasks;\n\n return tasks;\n};\n\nexport const isInvalidDate = function (date, dateFormat, excludes, includes) {\n if (includes.indexOf(date.format(dateFormat.trim())) >= 0) {\n return false;\n }\n if (date.isoWeekday() >= 6 && excludes.indexOf('weekends') >= 0) {\n return true;\n }\n if (excludes.indexOf(date.format('dddd').toLowerCase()) >= 0) {\n return true;\n }\n return excludes.indexOf(date.format(dateFormat.trim())) >= 0;\n};\n\nconst checkTaskDates = function (task, dateFormat, excludes, includes) {\n if (!excludes.length || task.manualEndTime) return;\n let startTime = moment(task.startTime, dateFormat, true);\n startTime.add(1, 'd');\n let endTime = moment(task.endTime, dateFormat, true);\n let renderEndTime = fixTaskDates(startTime, endTime, dateFormat, excludes, includes);\n task.endTime = endTime.toDate();\n task.renderEndTime = renderEndTime;\n};\n\nconst fixTaskDates = function (startTime, endTime, dateFormat, excludes, includes) {\n let invalid = false;\n let renderEndTime = null;\n while (startTime <= endTime) {\n if (!invalid) {\n renderEndTime = endTime.toDate();\n }\n invalid = isInvalidDate(startTime, dateFormat, excludes, includes);\n if (invalid) {\n endTime.add(1, 'd');\n }\n startTime.add(1, 'd');\n }\n return renderEndTime;\n};\n\nconst getStartDate = function (prevTime, dateFormat, str) {\n str = str.trim();\n\n // Test for after\n const re = /^after\\s+([\\d\\w- ]+)/;\n const afterStatement = re.exec(str.trim());\n\n if (afterStatement !== null) {\n // check all after ids and take the latest\n let latestEndingTask = null;\n afterStatement[1].split(' ').forEach(function (id) {\n let task = findTaskById(id);\n if (typeof task !== 'undefined') {\n if (!latestEndingTask) {\n latestEndingTask = task;\n } else {\n if (task.endTime > latestEndingTask.endTime) {\n latestEndingTask = task;\n }\n }\n }\n });\n\n if (!latestEndingTask) {\n const dt = new Date();\n dt.setHours(0, 0, 0, 0);\n return dt;\n } else {\n return latestEndingTask.endTime;\n }\n }\n\n // Check for actual date set\n let mDate = moment(str, dateFormat.trim(), true);\n if (mDate.isValid()) {\n return mDate.toDate();\n } else {\n log.debug('Invalid date:' + str);\n log.debug('With date format:' + dateFormat.trim());\n const d = new Date(str);\n if (typeof d === 'undefined' || isNaN(d.getTime())) {\n throw new Error('Invalid date:' + str);\n }\n return d;\n }\n};\n\n/**\n * Parse a string as a moment duration.\n *\n * The string have to be compound by a value and a shorthand duration unit. For example `5d`\n * representes 5 days.\n *\n * Shorthand unit supported are:\n *\n * - `y` for years\n * - `M` for months\n * - `w` for weeks\n * - `d` for days\n * - `h` for hours\n * - `s` for seconds\n * - `ms` for milliseconds\n *\n * @param {string} str - A string representing the duration.\n * @returns {moment.Duration} A moment duration, including an invalid moment for invalid input\n * string.\n */\nconst parseDuration = function (str) {\n const statement = /^(\\d+(?:\\.\\d+)?)([yMwdhms]|ms)$/.exec(str.trim());\n if (statement !== null) {\n return moment.duration(Number.parseFloat(statement[1]), statement[2]);\n }\n return moment.duration.invalid();\n};\n\nconst getEndDate = function (prevTime, dateFormat, str, inclusive) {\n inclusive = inclusive || false;\n str = str.trim();\n\n // Check for actual date\n let mDate = moment(str, dateFormat.trim(), true);\n if (mDate.isValid()) {\n if (inclusive) {\n mDate.add(1, 'd');\n }\n return mDate.toDate();\n }\n\n const endTime = moment(prevTime);\n const duration = parseDuration(str);\n if (duration.isValid()) {\n endTime.add(duration);\n }\n return endTime.toDate();\n};\n\nlet taskCnt = 0;\nconst parseId = function (idStr) {\n if (typeof idStr === 'undefined') {\n taskCnt = taskCnt + 1;\n return 'task' + taskCnt;\n }\n return idStr;\n};\n// id, startDate, endDate\n// id, startDate, length\n// id, after x, endDate\n// id, after x, length\n// startDate, endDate\n// startDate, length\n// after x, endDate\n// after x, length\n// endDate\n// length\n\nconst compileData = function (prevTask, dataStr) {\n let ds;\n\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n const data = ds.split(',');\n\n const task = {};\n\n // Get tags like active, done, crit and milestone\n getTaskTags(data, task, tags);\n\n for (let i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n let endTimeData = '';\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = prevTask.endTime;\n endTimeData = data[0];\n break;\n case 2:\n task.id = parseId();\n task.startTime = getStartDate(undefined, dateFormat, data[0]);\n endTimeData = data[1];\n break;\n case 3:\n task.id = parseId(data[0]);\n task.startTime = getStartDate(undefined, dateFormat, data[1]);\n endTimeData = data[2];\n break;\n default:\n }\n\n if (endTimeData) {\n task.endTime = getEndDate(task.startTime, dateFormat, endTimeData, inclusiveEndDates);\n task.manualEndTime = moment(endTimeData, 'YYYY-MM-DD', true).isValid();\n checkTaskDates(task, dateFormat, excludes, includes);\n }\n\n return task;\n};\n\nconst parseData = function (prevTaskId, dataStr) {\n let ds;\n if (dataStr.substr(0, 1) === ':') {\n ds = dataStr.substr(1, dataStr.length);\n } else {\n ds = dataStr;\n }\n\n const data = ds.split(',');\n\n const task = {};\n\n // Get tags like active, done, crit and milestone\n getTaskTags(data, task, tags);\n\n for (let i = 0; i < data.length; i++) {\n data[i] = data[i].trim();\n }\n\n switch (data.length) {\n case 1:\n task.id = parseId();\n task.startTime = {\n type: 'prevTaskEnd',\n id: prevTaskId,\n };\n task.endTime = {\n data: data[0],\n };\n break;\n case 2:\n task.id = parseId();\n task.startTime = {\n type: 'getStartDate',\n startData: data[0],\n };\n task.endTime = {\n data: data[1],\n };\n break;\n case 3:\n task.id = parseId(data[0]);\n task.startTime = {\n type: 'getStartDate',\n startData: data[1],\n };\n task.endTime = {\n data: data[2],\n };\n break;\n default:\n }\n\n return task;\n};\n\nlet lastTask;\nlet lastTaskID;\nlet rawTasks = [];\nconst taskDb = {};\nexport const addTask = function (descr, data) {\n const rawTask = {\n section: currentSection,\n type: currentSection,\n processed: false,\n manualEndTime: false,\n renderEndTime: null,\n raw: { data: data },\n task: descr,\n classes: [],\n };\n const taskInfo = parseData(lastTaskID, data);\n rawTask.raw.startTime = taskInfo.startTime;\n rawTask.raw.endTime = taskInfo.endTime;\n rawTask.id = taskInfo.id;\n rawTask.prevTaskId = lastTaskID;\n rawTask.active = taskInfo.active;\n rawTask.done = taskInfo.done;\n rawTask.crit = taskInfo.crit;\n rawTask.milestone = taskInfo.milestone;\n rawTask.order = lastOrder;\n\n lastOrder++;\n\n const pos = rawTasks.push(rawTask);\n\n lastTaskID = rawTask.id;\n // Store cross ref\n taskDb[rawTask.id] = pos - 1;\n};\n\nexport const findTaskById = function (id) {\n const pos = taskDb[id];\n return rawTasks[pos];\n};\n\nexport const addTaskOrg = function (descr, data) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n const taskInfo = compileData(lastTask, data);\n newTask.startTime = taskInfo.startTime;\n newTask.endTime = taskInfo.endTime;\n newTask.id = taskInfo.id;\n newTask.active = taskInfo.active;\n newTask.done = taskInfo.done;\n newTask.crit = taskInfo.crit;\n newTask.milestone = taskInfo.milestone;\n lastTask = newTask;\n tasks.push(newTask);\n};\n\nconst compileTasks = function () {\n const compileTask = function (pos) {\n const task = rawTasks[pos];\n let startTime = '';\n switch (rawTasks[pos].raw.startTime.type) {\n case 'prevTaskEnd': {\n const prevTask = findTaskById(task.prevTaskId);\n task.startTime = prevTask.endTime;\n break;\n }\n case 'getStartDate':\n startTime = getStartDate(undefined, dateFormat, rawTasks[pos].raw.startTime.startData);\n if (startTime) {\n rawTasks[pos].startTime = startTime;\n }\n break;\n }\n\n if (rawTasks[pos].startTime) {\n rawTasks[pos].endTime = getEndDate(\n rawTasks[pos].startTime,\n dateFormat,\n rawTasks[pos].raw.endTime.data,\n inclusiveEndDates\n );\n if (rawTasks[pos].endTime) {\n rawTasks[pos].processed = true;\n rawTasks[pos].manualEndTime = moment(\n rawTasks[pos].raw.endTime.data,\n 'YYYY-MM-DD',\n true\n ).isValid();\n checkTaskDates(rawTasks[pos], dateFormat, excludes, includes);\n }\n }\n\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (let i = 0; i < rawTasks.length; i++) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTasks[i].processed;\n }\n return allProcessed;\n};\n\n/**\n * Called by parser when a link is found. Adds the URL to the vertex data.\n *\n * @param ids Comma separated list of ids\n * @param _linkStr URL to create a link for\n */\nexport const setLink = function (ids, _linkStr) {\n let linkStr = _linkStr;\n if (configApi.getConfig().securityLevel !== 'loose') {\n linkStr = sanitizeUrl(_linkStr);\n }\n ids.split(',').forEach(function (id) {\n let rawTask = findTaskById(id);\n if (typeof rawTask !== 'undefined') {\n pushFun(id, () => {\n window.open(linkStr, '_self');\n });\n links[id] = linkStr;\n }\n });\n setClass(ids, 'clickable');\n};\n\n/**\n * Called by parser when a special node is found, e.g. a clickable element.\n *\n * @param ids Comma separated list of ids\n * @param className Class to add\n */\nexport const setClass = function (ids, className) {\n ids.split(',').forEach(function (id) {\n let rawTask = findTaskById(id);\n if (typeof rawTask !== 'undefined') {\n rawTask.classes.push(className);\n }\n });\n};\n\nconst setClickFun = function (id, functionName, functionArgs) {\n if (configApi.getConfig().securityLevel !== 'loose') {\n return;\n }\n if (typeof functionName === 'undefined') {\n return;\n }\n\n let argList = [];\n if (typeof functionArgs === 'string') {\n /* Splits functionArgs by ',', ignoring all ',' in double quoted strings */\n argList = functionArgs.split(/,(?=(?:(?:[^\"]*\"){2})*[^\"]*$)/);\n for (let i = 0; i < argList.length; i++) {\n let item = argList[i].trim();\n /* Removes all double quotes at the start and end of an argument */\n /* This preserves all starting and ending whitespace inside */\n if (item.charAt(0) === '\"' && item.charAt(item.length - 1) === '\"') {\n item = item.substr(1, item.length - 2);\n }\n argList[i] = item;\n }\n }\n\n /* if no arguments passed into callback, default to passing in id */\n if (argList.length === 0) {\n argList.push(id);\n }\n\n let rawTask = findTaskById(id);\n if (typeof rawTask !== 'undefined') {\n pushFun(id, () => {\n utils.runFunc(functionName, ...argList);\n });\n }\n};\n\n/**\n * The callbackFunction is executed in a click event bound to the task with the specified id or the\n * task's assigned text\n *\n * @param id The task's id\n * @param callbackFunction A function to be executed when clicked on the task or the task's text\n */\nconst pushFun = function (id, callbackFunction) {\n funs.push(function () {\n // const elem = d3.select(element).select(`[id=\"${id}\"]`)\n const elem = document.querySelector(`[id=\"${id}\"]`);\n if (elem !== null) {\n elem.addEventListener('click', function () {\n callbackFunction();\n });\n }\n });\n funs.push(function () {\n // const elem = d3.select(element).select(`[id=\"${id}-text\"]`)\n const elem = document.querySelector(`[id=\"${id}-text\"]`);\n if (elem !== null) {\n elem.addEventListener('click', function () {\n callbackFunction();\n });\n }\n });\n};\n\n/**\n * Called by parser when a click definition is found. Registers an event handler.\n *\n * @param ids Comma separated list of ids\n * @param functionName Function to be called on click\n * @param functionArgs Function args the function should be called with\n */\nexport const setClickEvent = function (ids, functionName, functionArgs) {\n ids.split(',').forEach(function (id) {\n setClickFun(id, functionName, functionArgs);\n });\n setClass(ids, 'clickable');\n};\n\n/**\n * Binds all functions previously added to fun (specified through click) to the element\n *\n * @param element\n */\nexport const bindFunctions = function (element) {\n funs.forEach(function (fun) {\n fun(element);\n });\n};\n\nexport default {\n parseDirective,\n getConfig: () => configApi.getConfig().gantt,\n clear,\n setDateFormat,\n getDateFormat,\n enableInclusiveEndDates,\n endDatesAreInclusive,\n enableTopAxis,\n topAxisEnabled,\n setAxisFormat,\n getAxisFormat,\n setTodayMarker,\n getTodayMarker,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n getTasks,\n addTask,\n findTaskById,\n addTaskOrg,\n setIncludes,\n getIncludes,\n setExcludes,\n getExcludes,\n setClickEvent,\n setLink,\n getLinks,\n bindFunctions,\n parseDuration,\n isInvalidDate,\n};\n\n/**\n * @param data\n * @param task\n * @param tags\n */\nfunction getTaskTags(data, task, tags) {\n let matchFound = true;\n while (matchFound) {\n matchFound = false;\n tags.forEach(function (t) {\n const pattern = '^\\\\s*' + t + '\\\\s*$';\n const regex = new RegExp(pattern);\n if (data[0].match(regex)) {\n task[t] = true;\n data.shift(1);\n matchFound = true;\n }\n });\n }\n}\n","import moment from 'moment-mini';\nimport { log } from '../../logger';\nimport {\n select,\n scaleTime,\n min,\n max,\n scaleLinear,\n interpolateHcl,\n axisBottom,\n axisTop,\n timeFormat,\n} from 'd3';\nimport common from '../common/common';\nimport { getConfig } from '../../config';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nexport const setConf = function () {\n log.debug('Something is calling, setConf, remove the call');\n};\n\nlet w;\nexport const draw = function (text, id, version, diagObj) {\n const conf = getConfig().gantt;\n // diagObj.db.clear();\n // parser.parse(text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n const elem = doc.getElementById(id);\n w = elem.parentElement.offsetWidth;\n\n if (typeof w === 'undefined') {\n w = 1200;\n }\n\n if (typeof conf.useWidth !== 'undefined') {\n w = conf.useWidth;\n }\n\n const taskArray = diagObj.db.getTasks();\n\n // Set height based on number of tasks\n const h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding;\n\n // Set viewBox\n elem.setAttribute('viewBox', '0 0 ' + w + ' ' + h);\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Set timescale\n const timeScale = scaleTime()\n .domain([\n min(taskArray, function (d) {\n return d.startTime;\n }),\n max(taskArray, function (d) {\n return d.endTime;\n }),\n ])\n .rangeRound([0, w - conf.leftPadding - conf.rightPadding]);\n\n let categories = [];\n\n for (let i = 0; i < taskArray.length; i++) {\n categories.push(taskArray[i].type);\n }\n\n const catsUnfiltered = categories; // for vert labels\n\n categories = checkUnique(categories);\n\n /**\n * @param a\n * @param b\n */\n function taskCompare(a, b) {\n const taskA = a.startTime;\n const taskB = b.startTime;\n let result = 0;\n if (taskA > taskB) {\n result = 1;\n } else if (taskA < taskB) {\n result = -1;\n }\n return result;\n }\n\n // Sort the task array using the above taskCompare() so that\n // tasks are created based on their order of startTime\n taskArray.sort(taskCompare);\n\n makeGant(taskArray, w, h);\n\n configureSvgSize(svg, h, w, conf.useMaxWidth);\n\n svg\n .append('text')\n .text(diagObj.db.getDiagramTitle())\n .attr('x', w / 2)\n .attr('y', conf.titleTopMargin)\n .attr('class', 'titleText');\n\n addSVGAccessibilityFields(diagObj.db, svg, id);\n\n /**\n * @param tasks\n * @param pageWidth\n * @param pageHeight\n */\n function makeGant(tasks, pageWidth, pageHeight) {\n const barHeight = conf.barHeight;\n const gap = barHeight + conf.barGap;\n const topPadding = conf.topPadding;\n const leftPadding = conf.leftPadding;\n\n const colorScale = scaleLinear()\n .domain([0, categories.length])\n .range(['#00B9FA', '#F95002'])\n .interpolate(interpolateHcl);\n\n drawExcludeDays(\n gap,\n topPadding,\n leftPadding,\n pageWidth,\n pageHeight,\n tasks,\n diagObj.db.getExcludes(),\n diagObj.db.getIncludes()\n );\n makeGrid(leftPadding, topPadding, pageWidth, pageHeight);\n drawRects(tasks, gap, topPadding, leftPadding, barHeight, colorScale, pageWidth, pageHeight);\n vertLabels(gap, topPadding, leftPadding, barHeight, colorScale);\n drawToday(leftPadding, topPadding, pageWidth, pageHeight);\n }\n\n /**\n * @param theArray\n * @param theGap\n * @param theTopPad\n * @param theSidePad\n * @param theBarHeight\n * @param theColorScale\n * @param w\n */\n function drawRects(theArray, theGap, theTopPad, theSidePad, theBarHeight, theColorScale, w) {\n // Draw background rects covering the entire width of the graph, these form the section rows.\n svg\n .append('g')\n .selectAll('rect')\n .data(theArray)\n .enter()\n .append('rect')\n .attr('x', 0)\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad - 2;\n })\n .attr('width', function () {\n return w - conf.rightPadding / 2;\n })\n .attr('height', theGap)\n .attr('class', function (d) {\n for (let i = 0; i < categories.length; i++) {\n if (d.type === categories[i]) {\n return 'section section' + (i % conf.numberSectionStyles);\n }\n }\n return 'section section0';\n });\n\n // Draw the rects representing the tasks\n const rectangles = svg.append('g').selectAll('rect').data(theArray).enter();\n\n const links = diagObj.db.getLinks();\n\n // Render the tasks with links\n // Render the other tasks\n rectangles\n .append('rect')\n .attr('id', function (d) {\n return d.id;\n })\n .attr('rx', 3)\n .attr('ry', 3)\n .attr('x', function (d) {\n if (d.milestone) {\n return (\n timeScale(d.startTime) +\n theSidePad +\n 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) -\n 0.5 * theBarHeight\n );\n }\n return timeScale(d.startTime) + theSidePad;\n })\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + theTopPad;\n })\n .attr('width', function (d) {\n if (d.milestone) {\n return theBarHeight;\n }\n return timeScale(d.renderEndTime || d.endTime) - timeScale(d.startTime);\n })\n .attr('height', theBarHeight)\n .attr('transform-origin', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n\n return (\n (\n timeScale(d.startTime) +\n theSidePad +\n 0.5 * (timeScale(d.endTime) - timeScale(d.startTime))\n ).toString() +\n 'px ' +\n (i * theGap + theTopPad + 0.5 * theBarHeight).toString() +\n 'px'\n );\n })\n .attr('class', function (d) {\n const res = 'task';\n\n let classStr = '';\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n let secNum = 0;\n for (let i = 0; i < categories.length; i++) {\n if (d.type === categories[i]) {\n secNum = i % conf.numberSectionStyles;\n }\n }\n\n let taskClass = '';\n if (d.active) {\n if (d.crit) {\n taskClass += ' activeCrit';\n } else {\n taskClass = ' active';\n }\n } else if (d.done) {\n if (d.crit) {\n taskClass = ' doneCrit';\n } else {\n taskClass = ' done';\n }\n } else {\n if (d.crit) {\n taskClass += ' crit';\n }\n }\n\n if (taskClass.length === 0) {\n taskClass = ' task';\n }\n\n if (d.milestone) {\n taskClass = ' milestone ' + taskClass;\n }\n\n taskClass += secNum;\n\n taskClass += ' ' + classStr;\n\n return res + taskClass;\n });\n\n // Append task labels\n rectangles\n .append('text')\n .attr('id', function (d) {\n return d.id + '-text';\n })\n .text(function (d) {\n return d.task;\n })\n .attr('font-size', conf.fontSize)\n .attr('x', function (d) {\n let startX = timeScale(d.startTime);\n let endX = timeScale(d.renderEndTime || d.endTime);\n if (d.milestone) {\n startX += 0.5 * (timeScale(d.endTime) - timeScale(d.startTime)) - 0.5 * theBarHeight;\n }\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n const textWidth = this.getBBox().width;\n\n // Check id text width > width of rectangle\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return startX + theSidePad - 5;\n } else {\n return endX + theSidePad + 5;\n }\n } else {\n return (endX - startX) / 2 + startX + theSidePad;\n }\n })\n .attr('y', function (d, i) {\n // Ignore the incoming i value and use our order instead\n i = d.order;\n return i * theGap + conf.barHeight / 2 + (conf.fontSize / 2 - 2) + theTopPad;\n })\n .attr('text-height', theBarHeight)\n .attr('class', function (d) {\n const startX = timeScale(d.startTime);\n let endX = timeScale(d.endTime);\n if (d.milestone) {\n endX = startX + theBarHeight;\n }\n const textWidth = this.getBBox().width;\n\n let classStr = '';\n if (d.classes.length > 0) {\n classStr = d.classes.join(' ');\n }\n\n let secNum = 0;\n for (let i = 0; i < categories.length; i++) {\n if (d.type === categories[i]) {\n secNum = i % conf.numberSectionStyles;\n }\n }\n\n let taskType = '';\n if (d.active) {\n if (d.crit) {\n taskType = 'activeCritText' + secNum;\n } else {\n taskType = 'activeText' + secNum;\n }\n }\n\n if (d.done) {\n if (d.crit) {\n taskType = taskType + ' doneCritText' + secNum;\n } else {\n taskType = taskType + ' doneText' + secNum;\n }\n } else {\n if (d.crit) {\n taskType = taskType + ' critText' + secNum;\n }\n }\n\n if (d.milestone) {\n taskType += ' milestoneText';\n }\n\n // Check id text width > width of rectangle\n if (textWidth > endX - startX) {\n if (endX + textWidth + 1.5 * conf.leftPadding > w) {\n return classStr + ' taskTextOutsideLeft taskTextOutside' + secNum + ' ' + taskType;\n } else {\n return (\n classStr +\n ' taskTextOutsideRight taskTextOutside' +\n secNum +\n ' ' +\n taskType +\n ' width-' +\n textWidth\n );\n }\n } else {\n return classStr + ' taskText taskText' + secNum + ' ' + taskType + ' width-' + textWidth;\n }\n });\n\n const securityLevel = getConfig().securityLevel;\n\n // Wrap the tasks in an a tag for working links without javascript\n if (securityLevel === 'sandbox') {\n let sandboxElement;\n sandboxElement = select('#i' + id);\n const doc = sandboxElement.nodes()[0].contentDocument;\n\n rectangles\n .filter(function (d) {\n return typeof links[d.id] !== 'undefined';\n })\n .each(function (o) {\n var taskRect = doc.querySelector('#' + o.id);\n var taskText = doc.querySelector('#' + o.id + '-text');\n const oldParent = taskRect.parentNode;\n var Link = doc.createElement('a');\n Link.setAttribute('xlink:href', links[o.id]);\n Link.setAttribute('target', '_top');\n oldParent.appendChild(Link);\n Link.appendChild(taskRect);\n Link.appendChild(taskText);\n });\n }\n }\n /**\n * @param theGap\n * @param theTopPad\n * @param theSidePad\n * @param w\n * @param h\n * @param tasks\n * @param excludes\n * @param includes\n */\n function drawExcludeDays(theGap, theTopPad, theSidePad, w, h, tasks, excludes, includes) {\n const minTime = tasks.reduce(\n (min, { startTime }) => (min ? Math.min(min, startTime) : startTime),\n 0\n );\n const maxTime = tasks.reduce((max, { endTime }) => (max ? Math.max(max, endTime) : endTime), 0);\n const dateFormat = diagObj.db.getDateFormat();\n if (!minTime || !maxTime) return;\n\n const excludeRanges = [];\n let range = null;\n let d = moment(minTime);\n while (d.valueOf() <= maxTime) {\n if (diagObj.db.isInvalidDate(d, dateFormat, excludes, includes)) {\n if (!range) {\n range = {\n start: d.clone(),\n end: d.clone(),\n };\n } else {\n range.end = d.clone();\n }\n } else {\n if (range) {\n excludeRanges.push(range);\n range = null;\n }\n }\n d.add(1, 'd');\n }\n\n const rectangles = svg.append('g').selectAll('rect').data(excludeRanges).enter();\n\n rectangles\n .append('rect')\n .attr('id', function (d) {\n return 'exclude-' + d.start.format('YYYY-MM-DD');\n })\n .attr('x', function (d) {\n return timeScale(d.start) + theSidePad;\n })\n .attr('y', conf.gridLineStartPadding)\n .attr('width', function (d) {\n const renderEnd = d.end.clone().add(1, 'day');\n return timeScale(renderEnd) - timeScale(d.start);\n })\n .attr('height', h - theTopPad - conf.gridLineStartPadding)\n .attr('transform-origin', function (d, i) {\n return (\n (\n timeScale(d.start) +\n theSidePad +\n 0.5 * (timeScale(d.end) - timeScale(d.start))\n ).toString() +\n 'px ' +\n (i * theGap + 0.5 * h).toString() +\n 'px'\n );\n })\n .attr('class', 'exclude-range');\n }\n\n /**\n * @param theSidePad\n * @param theTopPad\n * @param w\n * @param h\n */\n function makeGrid(theSidePad, theTopPad, w, h) {\n let bottomXAxis = axisBottom(timeScale)\n .tickSize(-h + theTopPad + conf.gridLineStartPadding)\n .tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n\n svg\n .append('g')\n .attr('class', 'grid')\n .attr('transform', 'translate(' + theSidePad + ', ' + (h - 50) + ')')\n .call(bottomXAxis)\n .selectAll('text')\n .style('text-anchor', 'middle')\n .attr('fill', '#000')\n .attr('stroke', 'none')\n .attr('font-size', 10)\n .attr('dy', '1em');\n\n if (diagObj.db.topAxisEnabled() || conf.topAxis) {\n let topXAxis = axisTop(timeScale)\n .tickSize(-h + theTopPad + conf.gridLineStartPadding)\n .tickFormat(timeFormat(diagObj.db.getAxisFormat() || conf.axisFormat || '%Y-%m-%d'));\n\n svg\n .append('g')\n .attr('class', 'grid')\n .attr('transform', 'translate(' + theSidePad + ', ' + theTopPad + ')')\n .call(topXAxis)\n .selectAll('text')\n .style('text-anchor', 'middle')\n .attr('fill', '#000')\n .attr('stroke', 'none')\n .attr('font-size', 10);\n // .attr('dy', '1em');\n }\n }\n\n /**\n * @param theGap\n * @param theTopPad\n */\n function vertLabels(theGap, theTopPad) {\n const numOccurances = [];\n let prevGap = 0;\n\n for (let i = 0; i < categories.length; i++) {\n numOccurances[i] = [categories[i], getCount(categories[i], catsUnfiltered)];\n }\n\n svg\n .append('g') // without doing this, impossible to put grid lines behind text\n .selectAll('text')\n .data(numOccurances)\n .enter()\n .append(function (d) {\n const rows = d[0].split(common.lineBreakRegex);\n const dy = -(rows.length - 1) / 2;\n\n const svgLabel = doc.createElementNS('http://www.w3.org/2000/svg', 'text');\n svgLabel.setAttribute('dy', dy + 'em');\n\n for (let j = 0; j < rows.length; j++) {\n const tspan = doc.createElementNS('http://www.w3.org/2000/svg', 'tspan');\n tspan.setAttribute('alignment-baseline', 'central');\n tspan.setAttribute('x', '10');\n if (j > 0) tspan.setAttribute('dy', '1em');\n tspan.textContent = rows[j];\n svgLabel.appendChild(tspan);\n }\n return svgLabel;\n })\n .attr('x', 10)\n .attr('y', function (d, i) {\n if (i > 0) {\n for (let j = 0; j < i; j++) {\n prevGap += numOccurances[i - 1][1];\n return (d[1] * theGap) / 2 + prevGap * theGap + theTopPad;\n }\n } else {\n return (d[1] * theGap) / 2 + theTopPad;\n }\n })\n .attr('font-size', conf.sectionFontSize)\n .attr('font-size', conf.sectionFontSize)\n .attr('class', function (d) {\n for (let i = 0; i < categories.length; i++) {\n if (d[0] === categories[i]) {\n return 'sectionTitle sectionTitle' + (i % conf.numberSectionStyles);\n }\n }\n return 'sectionTitle';\n });\n }\n\n /**\n * @param theSidePad\n * @param theTopPad\n * @param w\n * @param h\n */\n function drawToday(theSidePad, theTopPad, w, h) {\n const todayMarker = diagObj.db.getTodayMarker();\n if (todayMarker === 'off') {\n return;\n }\n\n const todayG = svg.append('g').attr('class', 'today');\n const today = new Date();\n const todayLine = todayG.append('line');\n\n todayLine\n .attr('x1', timeScale(today) + theSidePad)\n .attr('x2', timeScale(today) + theSidePad)\n .attr('y1', conf.titleTopMargin)\n .attr('y2', h - conf.titleTopMargin)\n .attr('class', 'today');\n\n if (todayMarker !== '') {\n todayLine.attr('style', todayMarker.replace(/,/g, ';'));\n }\n }\n\n /**\n * From this stackexchange question:\n * http://stackoverflow.com/questions/1890203/unique-for-arrays-in-javascript\n *\n * @param arr\n */\n function checkUnique(arr) {\n const hash = {};\n const result = [];\n for (let i = 0, l = arr.length; i < l; ++i) {\n if (!Object.prototype.hasOwnProperty.call(hash, arr[i])) {\n // it works with objects! in FF, at least\n hash[arr[i]] = true;\n result.push(arr[i]);\n }\n }\n return result;\n }\n\n /**\n * From this stackexchange question:\n * http://stackoverflow.com/questions/14227981/count-how-many-strings-in-an-array-have-duplicates-in-the-same-array\n *\n * @param arr\n */\n function getCounts(arr) {\n let i = arr.length; // const to loop over\n const obj = {}; // obj to store results\n while (i) {\n obj[arr[--i]] = (obj[arr[i]] || 0) + 1; // count occurrences\n }\n return obj;\n }\n\n /**\n * Get specific from everything\n *\n * @param word\n * @param arr\n */\n function getCount(word, arr) {\n return getCounts(arr)[word] || 0;\n }\n};\n\nexport default {\n setConf,\n draw,\n};\n","/** mermaid\n * https://knsv.github.io/mermaid\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n%lex\n\n%options case-insensitive\n\n%{\n\t// Pre-lexer code can go here\n%}\n\n%%\n\n\"info\"\t\t return 'info' ;\n[\\s\\n\\r]+ return 'NL' ;\n[\\s]+ \t\t return 'space';\n\"showInfo\"\t\t return 'showInfo';\n<> return 'EOF' ;\n. return 'TXT' ;\n\n/lex\n\n%start start\n\n%% /* language grammar */\n\nstart\n// %{\t: info document 'EOF' { return yy; } }\n\t: info document 'EOF' { return yy; }\n\t;\n\ndocument\n\t: /* empty */\n\t| document line\n\t;\n\nline\n\t: statement { }\n\t| 'NL'\n\t;\n\nstatement\n\t: showInfo { yy.setInfo(true); }\n\t;\n\n%%\n","/** Created by knut on 15-01-14. */\nimport { log } from '../../logger';\nimport { clear } from '../../commonDb';\n\nvar message = '';\nvar info = false;\n\nexport const setMessage = (txt) => {\n log.debug('Setting message to: ' + txt);\n message = txt;\n};\n\nexport const getMessage = () => {\n return message;\n};\n\nexport const setInfo = (inf) => {\n info = inf;\n};\n\nexport const getInfo = () => {\n return info;\n};\n\n// export const parseError = (err, hash) => {\n// global.mermaidAPI.parseError(err, hash)\n// }\n\nexport default {\n setMessage,\n getMessage,\n setInfo,\n getInfo,\n clear,\n // parseError\n};\n","/** Created by knut on 14-12-11. */\nimport { select } from 'd3';\nimport { log } from '../../logger';\nimport { getConfig } from '../../config';\n\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n *\n * @param {any} text\n * @param {any} id\n * @param {any} version\n * @param diagObj\n */\nexport const draw = (text, id, version, diagObj) => {\n try {\n // const parser = infoParser.parser;\n // parser.yy = db;\n log.debug('Rendering info diagram\\n' + text);\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n // Parse the graph definition\n // parser.parse(text);\n // log.debug('Parsed info diagram');\n // Fetch the default direction, use TD if none was found\n const svg = root.select('#' + id);\n\n const g = svg.append('g');\n\n g.append('text') // text label for the x axis\n .attr('x', 100)\n .attr('y', 40)\n .attr('class', 'version')\n .attr('font-size', '32px')\n .style('text-anchor', 'middle')\n .text('v ' + version);\n\n svg.attr('height', 100);\n svg.attr('width', 400);\n // svg.attr('viewBox', '0 0 300 150');\n } catch (e) {\n log.error('Error while rendering info diagram');\n log.error(e.message);\n }\n};\n\nexport default {\n draw,\n};\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const infoDetector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*info/) !== null;\n};\n","/** mermaid\n * https://knsv.github.io/mermaid\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n%lex\n%options case-insensitive\n\n%x string\n%x title\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%\\%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */{ /*console.log('');*/ }\n[\\n\\r]+ return 'NEWLINE';\n\\%\\%[^\\n]* /* do nothing */\n[\\s]+ \t\t /* ignore */\ntitle { this.begin(\"title\");return 'title'; }\n(?!\\n|;|#)*[^\\n]* { this.popState(); return \"title_value\"; }\n\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n[\"] { this.begin(\"string\"); }\n<string>[\"] { this.popState(); }\n<string>[^\"]* { return \"txt\"; }\n\"pie\"\t\t return 'PIE';\n\"showData\" return 'showData';\n\":\"[\\s]*[\\d]+(?:\\.[\\d]+)? return \"value\";\n<<EOF>> return 'EOF';\n\n/lex\n\n%start start\n\n%% /* language grammar */\n\nstart\n : eol start\n | directive start\n\t| PIE document\n | PIE showData document {yy.setShowData(true);}\n\t;\n\ndocument\n\t: /* empty */\n\t| document line\n\t;\n\nline\n\t: statement eol { $$ = $1 }\n\t;\n\nstatement\n :\n\t| txt value { yy.addSection($1,yy.cleanupValue($2)); }\n\t| title title_value { $$=$2.trim();yy.setDiagramTitle($$); }\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } | section {yy.addSection($1.substr(8));$$=$1.substr(8);}\n\t| directive\n\t;\n\ndirective\n : openDirective typeDirective closeDirective\n | openDirective typeDirective ':' argDirective closeDirective\n ;\n\neol\n : NEWLINE\n | ';'\n | EOF\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'pie'); }\n ;\n\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const pieDetector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*pie/) !== null;\n};\n","import { log } from '../../logger';\nimport mermaidAPI from '../../mermaidAPI';\nimport * as configApi from '../../config';\nimport common from '../common/common';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nlet sections = {};\nlet showData = false;\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nconst addSection = function (id, value) {\n id = common.sanitizeText(id, configApi.getConfig());\n if (typeof sections[id] === 'undefined') {\n sections[id] = value;\n log.debug('Added new section :', id);\n }\n};\nconst getSections = () => sections;\n\nconst setShowData = function (toggle) {\n showData = toggle;\n};\n\nconst getShowData = function () {\n return showData;\n};\n\nconst cleanupValue = function (value) {\n if (value.substring(0, 1) === ':') {\n value = value.substring(1).trim();\n return Number(value.trim());\n } else {\n return Number(value.trim());\n }\n};\n\nconst clear = function () {\n sections = {};\n showData = false;\n commonClear();\n};\n\nexport default {\n parseDirective,\n getConfig: () => configApi.getConfig().pie,\n addSection,\n getSections,\n cleanupValue,\n clear,\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n setShowData,\n getShowData,\n getAccDescription,\n setAccDescription,\n};\n","/** Created by AshishJ on 11-09-2019. */\nimport { select, scaleOrdinal, pie as d3pie, arc } from 'd3';\nimport { log } from '../../logger';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport * as configApi from '../../config';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nlet conf = configApi.getConfig();\n\n/**\n * Draws a Pie Chart with the data given in text.\n *\n * @param text\n * @param id\n */\nlet width;\nconst height = 450;\nexport const draw = (txt, id, _version, diagObj) => {\n try {\n conf = configApi.getConfig();\n log.debug('Rendering info diagram\\n' + txt);\n\n const securityLevel = configApi.getConfig().securityLevel;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // Parse the Pie Chart definition\n diagObj.db.clear();\n diagObj.parser.parse(txt);\n log.debug('Parsed info diagram');\n const elem = doc.getElementById(id);\n width = elem.parentElement.offsetWidth;\n\n if (typeof width === 'undefined') {\n width = 1200;\n }\n\n if (typeof conf.useWidth !== 'undefined') {\n width = conf.useWidth;\n }\n if (typeof conf.pie.useWidth !== 'undefined') {\n width = conf.pie.useWidth;\n }\n\n const diagram = root.select('#' + id);\n configureSvgSize(diagram, height, width, conf.pie.useMaxWidth);\n\n addSVGAccessibilityFields(diagObj.db, diagram, id);\n // Set viewBox\n elem.setAttribute('viewBox', '0 0 ' + width + ' ' + height);\n\n // Fetch the default direction, use TD if none was found\n var margin = 40;\n var legendRectSize = 18;\n var legendSpacing = 4;\n\n var radius = Math.min(width, height) / 2 - margin;\n\n var svg = diagram\n .append('g')\n .attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')');\n\n var data = diagObj.db.getSections();\n var sum = 0;\n Object.keys(data).forEach(function (key) {\n sum += data[key];\n });\n\n const themeVariables = conf.themeVariables;\n var myGeneratedColors = [\n themeVariables.pie1,\n themeVariables.pie2,\n themeVariables.pie3,\n themeVariables.pie4,\n themeVariables.pie5,\n themeVariables.pie6,\n themeVariables.pie7,\n themeVariables.pie8,\n themeVariables.pie9,\n themeVariables.pie10,\n themeVariables.pie11,\n themeVariables.pie12,\n ];\n\n // Set the color scale\n var color = scaleOrdinal().range(myGeneratedColors);\n\n // Compute the position of each group on the pie:\n var pie = d3pie().value(function (d) {\n return d[1];\n });\n var dataReady = pie(Object.entries(data));\n\n // Shape helper to build arcs:\n var arcGenerator = arc().innerRadius(0).outerRadius(radius);\n\n // Build the pie chart: each part of the pie is a path that we build using the arc function.\n svg\n .selectAll('mySlices')\n .data(dataReady)\n .enter()\n .append('path')\n .attr('d', arcGenerator)\n .attr('fill', function (d) {\n return color(d.data[0]);\n })\n .attr('class', 'pieCircle');\n\n // Now add the percentage.\n // Use the centroid method to get the best coordinates.\n svg\n .selectAll('mySlices')\n .data(dataReady)\n .enter()\n .append('text')\n .text(function (d) {\n return ((d.data[1] / sum) * 100).toFixed(0) + '%';\n })\n .attr('transform', function (d) {\n return 'translate(' + arcGenerator.centroid(d) + ')';\n })\n .style('text-anchor', 'middle')\n .attr('class', 'slice');\n\n svg\n .append('text')\n .text(diagObj.db.getDiagramTitle())\n .attr('x', 0)\n .attr('y', -(height - 50) / 2)\n .attr('class', 'pieTitleText');\n\n // Add the legends/annotations for each section\n var legend = svg\n .selectAll('.legend')\n .data(color.domain())\n .enter()\n .append('g')\n .attr('class', 'legend')\n .attr('transform', function (d, i) {\n var height = legendRectSize + legendSpacing;\n var offset = (height * color.domain().length) / 2;\n var horz = 12 * legendRectSize;\n var vert = i * height - offset;\n return 'translate(' + horz + ',' + vert + ')';\n });\n\n legend\n .append('rect')\n .attr('width', legendRectSize)\n .attr('height', legendRectSize)\n .style('fill', color)\n .style('stroke', color);\n\n legend\n .data(dataReady)\n .append('text')\n .attr('x', legendRectSize + legendSpacing)\n .attr('y', legendRectSize - legendSpacing)\n .text(function (d) {\n if (diagObj.db.getShowData() || conf.showData || conf.pie.showData) {\n return d.data[0] + ' [' + d.data[1] + ']';\n } else {\n return d.data[0];\n }\n });\n } catch (e) {\n log.error('Error while rendering info diagram');\n log.error(e);\n }\n};\n\nexport default {\n draw,\n};\n","/** mermaid\n * https://knsv.github.io/mermaid\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n%lex\n%options case-insensitive\n\n%x string\n%x token\n%x unqString\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%%\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\n\"title\"\\s[^#\\n;]+ return 'title';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n(\\r?\\n)+ return 'NEWLINE';\n\\s+ /* skip all whitespace */\n\\#[^\\n]* /* skip comments */\n\\%%[^\\n]* /* skip comments */\n<<EOF>> return 'EOF';\n\n\"requirementDiagram\" return 'RD';\n\n\"{\" return 'STRUCT_START';\n\"}\" return 'STRUCT_STOP';\n\":\" return 'COLONSEP';\n\n\"id\" return 'ID';\n\"text\" return 'TEXT';\n\"risk\" return 'RISK';\n\"verifyMethod\" return 'VERIFYMTHD';\n\n\"requirement\" return 'REQUIREMENT';\n\"functionalRequirement\" return 'FUNCTIONAL_REQUIREMENT';\n\"interfaceRequirement\" return 'INTERFACE_REQUIREMENT';\n\"performanceRequirement\" return 'PERFORMANCE_REQUIREMENT';\n\"physicalRequirement\" return 'PHYSICAL_REQUIREMENT';\n\"designConstraint\" return 'DESIGN_CONSTRAINT';\n\n\"low\" return 'LOW_RISK';\n\"medium\" return 'MED_RISK';\n\"high\" return 'HIGH_RISK';\n\n\"analysis\" return 'VERIFY_ANALYSIS';\n\"demonstration\" return 'VERIFY_DEMONSTRATION';\n\"inspection\" return 'VERIFY_INSPECTION';\n\"test\" return 'VERIFY_TEST';\n\n\"element\" return 'ELEMENT';\n\n\"contains\" return 'CONTAINS';\n\"copies\" return 'COPIES';\n\"derives\" return 'DERIVES';\n\"satisfies\" return 'SATISFIES';\n\"verifies\" return 'VERIFIES';\n\"refines\" return 'REFINES';\n\"traces\" return 'TRACES';\n\n\"type\" return 'TYPE';\n\"docref\" return 'DOCREF';\n\n\"<-\" return 'END_ARROW_L';\n\"->\" {return 'END_ARROW_R';}\n\"-\" {return 'LINE';}\n\n[\"] { this.begin(\"string\"); }\n<string>[\"] { this.popState(); }\n<string>[^\"]* { return \"qString\"; }\n\n[\\w][^\\r\\n\\{\\<\\>\\-\\=]* { yytext = yytext.trim(); return 'unqString';}\n\n/lex\n\n%start start\n\n%% /* language grammar */\n\nstart\n : directive NEWLINE start\n | directive start\n | RD NEWLINE diagram EOF;\n\ndirective\n : openDirective typeDirective closeDirective\n | openDirective typeDirective ':' argDirective closeDirective\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }\n ;\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); };\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); };\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); };\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'pie'); };\n\ndiagram\n : /* empty */ { $$ = [] }\n | requirementDef diagram\n | elementDef diagram\n | relationshipDef diagram\n | directive diagram\n | NEWLINE diagram;\n\nrequirementDef\n : requirementType requirementName STRUCT_START NEWLINE requirementBody\n { yy.addRequirement($2, $1) };\n\nrequirementBody\n : ID COLONSEP id NEWLINE requirementBody\n { yy.setNewReqId($3); }\n | TEXT COLONSEP text NEWLINE requirementBody\n { yy.setNewReqText($3); }\n | RISK COLONSEP riskLevel NEWLINE requirementBody\n { yy.setNewReqRisk($3); }\n | VERIFYMTHD COLONSEP verifyType NEWLINE requirementBody\n { yy.setNewReqVerifyMethod($3); }\n | NEWLINE requirementBody\n | STRUCT_STOP;\n\nrequirementType\n : REQUIREMENT\n { $$=yy.RequirementType.REQUIREMENT;}\n | FUNCTIONAL_REQUIREMENT\n { $$=yy.RequirementType.FUNCTIONAL_REQUIREMENT;}\n | INTERFACE_REQUIREMENT\n { $$=yy.RequirementType.INTERFACE_REQUIREMENT;}\n | PERFORMANCE_REQUIREMENT\n { $$=yy.RequirementType.PERFORMANCE_REQUIREMENT;}\n | PHYSICAL_REQUIREMENT\n { $$=yy.RequirementType.PHYSICAL_REQUIREMENT;}\n | DESIGN_CONSTRAINT\n { $$=yy.RequirementType.DESIGN_CONSTRAINT;};\n\nriskLevel\n : LOW_RISK { $$=yy.RiskLevel.LOW_RISK;}\n | MED_RISK { $$=yy.RiskLevel.MED_RISK;}\n | HIGH_RISK { $$=yy.RiskLevel.HIGH_RISK;};\n\nverifyType\n : VERIFY_ANALYSIS\n { $$=yy.VerifyType.VERIFY_ANALYSIS;}\n | VERIFY_DEMONSTRATION\n { $$=yy.VerifyType.VERIFY_DEMONSTRATION;}\n | VERIFY_INSPECTION\n { $$=yy.VerifyType.VERIFY_INSPECTION;}\n | VERIFY_TEST\n { $$=yy.VerifyType.VERIFY_TEST;};\n\nelementDef\n : ELEMENT elementName STRUCT_START NEWLINE elementBody\n { yy.addElement($2) };\n\nelementBody\n : TYPE COLONSEP type NEWLINE elementBody\n { yy.setNewElementType($3); }\n | DOCREF COLONSEP ref NEWLINE elementBody\n { yy.setNewElementDocRef($3); }\n | NEWLINE elementBody\n | STRUCT_STOP;\n\nrelationshipDef\n : id END_ARROW_L relationship LINE id\n { yy.addRelationship($3, $5, $1) }\n | id LINE relationship END_ARROW_R id\n { yy.addRelationship($3, $1, $5) };\n\nrelationship\n : CONTAINS\n { $$=yy.Relationships.CONTAINS;}\n | COPIES\n { $$=yy.Relationships.COPIES;}\n | DERIVES\n { $$=yy.Relationships.DERIVES;}\n | SATISFIES\n { $$=yy.Relationships.SATISFIES;}\n | VERIFIES\n { $$=yy.Relationships.VERIFIES;}\n | REFINES\n { $$=yy.Relationships.REFINES;}\n | TRACES\n { $$=yy.Relationships.TRACES;};\n\n\nrequirementName: unqString | qString;\nid : unqString | qString;\ntext : unqString | qString;\nelementName : unqString | qString;\ntype : unqString | qString;\nref : unqString | qString;\n\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const requirementDetector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*requirement(Diagram)?/) !== null;\n};\n","import * as configApi from '../../config';\nimport { log } from '../../logger';\nimport mermaidAPI from '../../mermaidAPI';\n\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nlet relations = [];\nlet latestRequirement = {};\nlet requirements = {};\nlet latestElement = {};\nlet elements = {};\n\nconst RequirementType = {\n REQUIREMENT: 'Requirement',\n FUNCTIONAL_REQUIREMENT: 'Functional Requirement',\n INTERFACE_REQUIREMENT: 'Interface Requirement',\n PERFORMANCE_REQUIREMENT: 'Performance Requirement',\n PHYSICAL_REQUIREMENT: 'Physical Requirement',\n DESIGN_CONSTRAINT: 'Design Constraint',\n};\n\nconst RiskLevel = {\n LOW_RISK: 'Low',\n MED_RISK: 'Medium',\n HIGH_RISK: 'High',\n};\n\nconst VerifyType = {\n VERIFY_ANALYSIS: 'Analysis',\n VERIFY_DEMONSTRATION: 'Demonstration',\n VERIFY_INSPECTION: 'Inspection',\n VERIFY_TEST: 'Test',\n};\n\nconst Relationships = {\n CONTAINS: 'contains',\n COPIES: 'copies',\n DERIVES: 'derives',\n SATISFIES: 'satisfies',\n VERIFIES: 'verifies',\n REFINES: 'refines',\n TRACES: 'traces',\n};\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nconst addRequirement = (name, type) => {\n if (typeof requirements[name] === 'undefined') {\n requirements[name] = {\n name,\n type,\n\n id: latestRequirement.id,\n text: latestRequirement.text,\n risk: latestRequirement.risk,\n verifyMethod: latestRequirement.verifyMethod,\n };\n }\n latestRequirement = {};\n\n return requirements[name];\n};\n\nconst getRequirements = () => requirements;\n\nconst setNewReqId = (id) => {\n if (typeof latestRequirement != 'undefined') {\n latestRequirement.id = id;\n }\n};\n\nconst setNewReqText = (text) => {\n if (typeof latestRequirement != 'undefined') {\n latestRequirement.text = text;\n }\n};\n\nconst setNewReqRisk = (risk) => {\n if (typeof latestRequirement != 'undefined') {\n latestRequirement.risk = risk;\n }\n};\n\nconst setNewReqVerifyMethod = (verifyMethod) => {\n if (typeof latestRequirement != 'undefined') {\n latestRequirement.verifyMethod = verifyMethod;\n }\n};\n\nconst addElement = (name) => {\n if (typeof elements[name] === 'undefined') {\n elements[name] = {\n name,\n\n type: latestElement.type,\n docRef: latestElement.docRef,\n };\n log.info('Added new requirement: ', name);\n }\n latestElement = {};\n\n return elements[name];\n};\n\nconst getElements = () => elements;\n\nconst setNewElementType = (type) => {\n if (typeof latestElement != 'undefined') {\n latestElement.type = type;\n }\n};\n\nconst setNewElementDocRef = (docRef) => {\n if (typeof latestElement != 'undefined') {\n latestElement.docRef = docRef;\n }\n};\n\nconst addRelationship = (type, src, dst) => {\n relations.push({\n type,\n src,\n dst,\n });\n};\n\nconst getRelationships = () => relations;\n\nconst clear = () => {\n relations = [];\n latestRequirement = {};\n requirements = {};\n latestElement = {};\n elements = {};\n commonClear();\n};\n\nexport default {\n RequirementType,\n RiskLevel,\n VerifyType,\n Relationships,\n\n parseDirective,\n getConfig: () => configApi.getConfig().req,\n\n addRequirement,\n getRequirements,\n setNewReqId,\n setNewReqText,\n setNewReqRisk,\n setNewReqVerifyMethod,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n\n addElement,\n getElements,\n setNewElementType,\n setNewElementDocRef,\n\n addRelationship,\n getRelationships,\n\n clear,\n};\n","const ReqMarkers = {\n CONTAINS: 'contains',\n ARROW: 'arrow',\n};\n\nconst insertLineEndings = (parentNode, conf) => {\n let containsNode = parentNode\n .append('defs')\n .append('marker')\n .attr('id', ReqMarkers.CONTAINS + '_line_ending')\n .attr('refX', 0)\n .attr('refY', conf.line_height / 2)\n .attr('markerWidth', conf.line_height)\n .attr('markerHeight', conf.line_height)\n .attr('orient', 'auto')\n .append('g');\n\n containsNode\n .append('circle')\n .attr('cx', conf.line_height / 2)\n .attr('cy', conf.line_height / 2)\n .attr('r', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n // .attr('stroke-width', 1)\n .attr('fill', 'none');\n\n containsNode\n .append('line')\n .attr('x1', 0)\n .attr('x2', conf.line_height)\n .attr('y1', conf.line_height / 2)\n .attr('y2', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n .attr('stroke-width', 1);\n\n containsNode\n .append('line')\n .attr('y1', 0)\n .attr('y2', conf.line_height)\n .attr('x1', conf.line_height / 2)\n .attr('x2', conf.line_height / 2)\n // .attr('stroke', conf.rect_border_color)\n .attr('stroke-width', 1);\n\n parentNode\n .append('defs')\n .append('marker')\n .attr('id', ReqMarkers.ARROW + '_line_ending')\n .attr('refX', conf.line_height)\n .attr('refY', 0.5 * conf.line_height)\n .attr('markerWidth', conf.line_height)\n .attr('markerHeight', conf.line_height)\n .attr('orient', 'auto')\n .append('path')\n .attr(\n 'd',\n `M0,0\n L${conf.line_height},${conf.line_height / 2}\n M${conf.line_height},${conf.line_height / 2}\n L0,${conf.line_height}`\n )\n .attr('stroke-width', 1);\n // .attr('stroke', conf.rect_border_color);\n};\n\nexport default {\n ReqMarkers,\n insertLineEndings,\n};\n","import { line, select } from 'd3';\nimport dagre from 'dagre';\nimport graphlib from 'graphlib';\nimport { log } from '../../logger';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport markers from './requirementMarkers';\nimport { getConfig } from '../../config';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nlet conf = {};\nlet relCnt = 0;\n\nconst newRectNode = (parentNode, id) => {\n return parentNode\n .insert('rect', '#' + id)\n .attr('class', 'req reqBox')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', conf.rect_min_width + 'px')\n .attr('height', conf.rect_min_height + 'px');\n};\n\nconst newTitleNode = (parentNode, id, txts) => {\n let x = conf.rect_min_width / 2;\n\n let title = parentNode\n .append('text')\n .attr('class', 'req reqLabel reqTitle')\n .attr('id', id)\n .attr('x', x)\n .attr('y', conf.rect_padding)\n .attr('dominant-baseline', 'hanging');\n // .attr(\n // 'style',\n // 'font-family: ' + configApi.getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n // )\n let i = 0;\n txts.forEach((textStr) => {\n if (i == 0) {\n title\n .append('tspan')\n .attr('text-anchor', 'middle')\n .attr('x', conf.rect_min_width / 2)\n .attr('dy', 0)\n .text(textStr);\n } else {\n title\n .append('tspan')\n .attr('text-anchor', 'middle')\n .attr('x', conf.rect_min_width / 2)\n .attr('dy', conf.line_height * 0.75)\n .text(textStr);\n }\n i++;\n });\n\n let yPadding = 1.5 * conf.rect_padding;\n let linePadding = i * conf.line_height * 0.75;\n let totalY = yPadding + linePadding;\n\n parentNode\n .append('line')\n .attr('class', 'req-title-line')\n .attr('x1', '0')\n .attr('x2', conf.rect_min_width)\n .attr('y1', totalY)\n .attr('y2', totalY);\n\n return {\n titleNode: title,\n y: totalY,\n };\n};\n\nconst newBodyNode = (parentNode, id, txts, yStart) => {\n let body = parentNode\n .append('text')\n .attr('class', 'req reqLabel')\n .attr('id', id)\n .attr('x', conf.rect_padding)\n .attr('y', yStart)\n .attr('dominant-baseline', 'hanging');\n // .attr(\n // 'style',\n // 'font-family: ' + configApi.getConfig().fontFamily + '; font-size: ' + conf.fontSize + 'px'\n // );\n\n let currentRow = 0;\n const charLimit = 30;\n let wrappedTxts = [];\n txts.forEach((textStr) => {\n let currentTextLen = textStr.length;\n while (currentTextLen > charLimit && currentRow < 3) {\n let firstPart = textStr.substring(0, charLimit);\n textStr = textStr.substring(charLimit, textStr.length);\n currentTextLen = textStr.length;\n wrappedTxts[wrappedTxts.length] = firstPart;\n currentRow++;\n }\n if (currentRow == 3) {\n let lastStr = wrappedTxts[wrappedTxts.length - 1];\n wrappedTxts[wrappedTxts.length - 1] = lastStr.substring(0, lastStr.length - 4) + '...';\n } else {\n wrappedTxts[wrappedTxts.length] = textStr;\n }\n currentRow = 0;\n });\n\n wrappedTxts.forEach((textStr) => {\n body.append('tspan').attr('x', conf.rect_padding).attr('dy', conf.line_height).text(textStr);\n });\n\n return body;\n};\n\nconst addEdgeLabel = (parentNode, svgPath, conf, txt) => {\n // Find the half-way point\n const len = svgPath.node().getTotalLength();\n const labelPoint = svgPath.node().getPointAtLength(len * 0.5);\n\n // Append a text node containing the label\n const labelId = 'rel' + relCnt;\n relCnt++;\n\n const labelNode = parentNode\n .append('text')\n .attr('class', 'req relationshipLabel')\n .attr('id', labelId)\n .attr('x', labelPoint.x)\n .attr('y', labelPoint.y)\n .attr('text-anchor', 'middle')\n .attr('dominant-baseline', 'middle')\n // .attr('style', 'font-family: ' + conf.fontFamily + '; font-size: ' + conf.fontSize + 'px')\n .text(txt);\n\n // Figure out how big the opaque 'container' rectangle needs to be\n const labelBBox = labelNode.node().getBBox();\n\n // Insert the opaque rectangle before the text label\n parentNode\n .insert('rect', '#' + labelId)\n .attr('class', 'req reqLabelBox')\n .attr('x', labelPoint.x - labelBBox.width / 2)\n .attr('y', labelPoint.y - labelBBox.height / 2)\n .attr('width', labelBBox.width)\n .attr('height', labelBBox.height)\n .attr('fill', 'white')\n .attr('fill-opacity', '85%');\n};\n\nconst drawRelationshipFromLayout = function (svg, rel, g, insert, diagObj) {\n // Find the edge relating to this relationship\n const edge = g.edge(elementString(rel.src), elementString(rel.dst));\n\n // Get a function that will generate the line path\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n });\n\n // Insert the line at the right place\n const svgPath = svg\n .insert('path', '#' + insert)\n .attr('class', 'er relationshipLine')\n .attr('d', lineFunction(edge.points))\n .attr('fill', 'none');\n\n if (rel.type == diagObj.db.Relationships.CONTAINS) {\n svgPath.attr(\n 'marker-start',\n 'url(' + common.getUrl(conf.arrowMarkerAbsolute) + '#' + rel.type + '_line_ending' + ')'\n );\n } else {\n svgPath.attr('stroke-dasharray', '10,7');\n svgPath.attr(\n 'marker-end',\n 'url(' +\n common.getUrl(conf.arrowMarkerAbsolute) +\n '#' +\n markers.ReqMarkers.ARROW +\n '_line_ending' +\n ')'\n );\n }\n\n addEdgeLabel(svg, svgPath, conf, `<<${rel.type}>>`);\n\n return;\n};\n\nexport const drawReqs = (reqs, graph, svgNode) => {\n Object.keys(reqs).forEach((reqName) => {\n let req = reqs[reqName];\n reqName = elementString(reqName);\n log.info('Added new requirement: ', reqName);\n\n const groupNode = svgNode.append('g').attr('id', reqName);\n const textId = 'req-' + reqName;\n const rectNode = newRectNode(groupNode, textId);\n\n let nodes = [];\n\n let titleNodeInfo = newTitleNode(groupNode, reqName + '_title', [\n `<<${req.type}>>`,\n `${req.name}`,\n ]);\n\n nodes.push(titleNodeInfo.titleNode);\n\n let bodyNode = newBodyNode(\n groupNode,\n reqName + '_body',\n [\n `Id: ${req.id}`,\n `Text: ${req.text}`,\n `Risk: ${req.risk}`,\n `Verification: ${req.verifyMethod}`,\n ],\n titleNodeInfo.y\n );\n\n nodes.push(bodyNode);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph\n graph.setNode(reqName, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: reqName,\n });\n });\n};\n\nexport const drawElements = (els, graph, svgNode) => {\n Object.keys(els).forEach((elName) => {\n let el = els[elName];\n const id = elementString(elName);\n\n const groupNode = svgNode.append('g').attr('id', id);\n const textId = 'element-' + id;\n const rectNode = newRectNode(groupNode, textId);\n\n let nodes = [];\n\n let titleNodeInfo = newTitleNode(groupNode, textId + '_title', [`<<Element>>`, `${elName}`]);\n\n nodes.push(titleNodeInfo.titleNode);\n\n let bodyNode = newBodyNode(\n groupNode,\n textId + '_body',\n [`Type: ${el.type || 'Not Specified'}`, `Doc Ref: ${el.docRef || 'None'}`],\n titleNodeInfo.y\n );\n\n nodes.push(bodyNode);\n\n const rectBBox = rectNode.node().getBBox();\n\n // Add the entity to the graph\n graph.setNode(id, {\n width: rectBBox.width,\n height: rectBBox.height,\n shape: 'rect',\n id: id,\n });\n });\n};\n\nconst addRelationships = (relationships, g) => {\n relationships.forEach(function (r) {\n let src = elementString(r.src);\n let dst = elementString(r.dst);\n g.setEdge(src, dst, { relationship: r });\n });\n return relationships;\n};\n\nconst adjustEntities = function (svgNode, graph) {\n graph.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n svgNode.select('#' + v);\n svgNode\n .select('#' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y - graph.node(v).height / 2) +\n ' )'\n );\n }\n });\n return;\n};\n\nconst elementString = (str) => {\n return str.replace(/\\s/g, '').replace(/\\./g, '_');\n};\n\nexport const draw = (text, id, _version, diagObj) => {\n conf = getConfig().requirement;\n diagObj.db.clear();\n diagObj.parser.parse(text);\n\n const securityLevel = conf.securityLevel;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n\n const svg = root.select(`[id='${id}']`);\n markers.insertLineEndings(svg, conf);\n\n const g = new graphlib.Graph({\n multigraph: false,\n compound: false,\n directed: true,\n })\n .setGraph({\n rankdir: conf.layoutDirection,\n marginx: 20,\n marginy: 20,\n nodesep: 100,\n edgesep: 100,\n ranksep: 100,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n let requirements = diagObj.db.getRequirements();\n let elements = diagObj.db.getElements();\n let relationships = diagObj.db.getRelationships();\n\n drawReqs(requirements, g, svg);\n drawElements(elements, g, svg);\n addRelationships(relationships, g);\n dagre.layout(g);\n adjustEntities(svg, g);\n\n relationships.forEach(function (rel) {\n drawRelationshipFromLayout(svg, rel, g, id, diagObj);\n });\n\n const padding = conf.rect_padding;\n const svgBounds = svg.node().getBBox();\n const width = svgBounds.width + padding * 2;\n const height = svgBounds.height + padding * 2;\n\n configureSvgSize(svg, height, width, conf.useMaxWidth);\n\n svg.attr('viewBox', `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);\n // Adds title and description to the requirements diagram\n addSVGAccessibilityFields(diagObj.db, svg, id);\n};\n\nexport default {\n draw,\n};\n","/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2014-2015 Knut Sveidqvist\n * MIT license.\n *\n * Based on js sequence diagrams jison grammr\n * https://bramp.github.io/js-sequence-diagrams/\n * (c) 2012-2013 Andrew Brampton (bramp.net)\n * Simplified BSD license.\n */\n%lex\n\n%options case-insensitive\n\n// Special states for recognizing aliases\n// A special state for grabbing text up to the first comment/newline\n%x ID ALIAS LINE\n\n// Directive states\n%x open_directive type_directive arg_directive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n[\\n]+ return 'NEWLINE';\n\\s+ /* skip all whitespace */\n<ID,ALIAS,LINE>((?!\\n)\\s)+ /* skip same-line whitespace */\n<INITIAL,ID,ALIAS,LINE,arg_directive,type_directive,open_directive>\\#[^\\n]* /* skip comments */\n\\%%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\n[0-9]+(?=[ \\n]+) \t\t\t\t\t\t\t\t\t\t\treturn 'NUM';\n\"participant\" { this.begin('ID'); return 'participant'; }\n\"actor\" \t{ this.begin('ID'); return 'participant_actor'; }\n<ID>[^\\->:\\n,;]+?([\\-]*[^\\->:\\n,;]+?)*?(?=((?!\\n)\\s)+\"as\"(?!\\n)\\s|[#\\n;]|$) { yytext = yytext.trim(); this.begin('ALIAS'); return 'ACTOR'; }\n<ALIAS>\"as\" { this.popState(); this.popState(); this.begin('LINE'); return 'AS'; }\n<ALIAS>(?:) { this.popState(); this.popState(); return 'NEWLINE'; }\n\"loop\" { this.begin('LINE'); return 'loop'; }\n\"rect\" { this.begin('LINE'); return 'rect'; }\n\"opt\" { this.begin('LINE'); return 'opt'; }\n\"alt\" { this.begin('LINE'); return 'alt'; }\n\"else\" { this.begin('LINE'); return 'else'; }\n\"par\" { this.begin('LINE'); return 'par'; }\n\"and\" { this.begin('LINE'); return 'and'; }\n\"critical\" { this.begin('LINE'); return 'critical'; }\n\"option\" { this.begin('LINE'); return 'option'; }\n\"break\" { this.begin('LINE'); return 'break'; }\n<LINE>(?:[:]?(?:no)?wrap:)?[^#\\n;]* { this.popState(); return 'restOfLine'; }\n\"end\" return 'end';\n\"left of\" return 'left_of';\n\"right of\" return 'right_of';\n\"links\" return 'links';\n\"link\" return 'link';\n\"properties\" return 'properties';\n\"details\" return 'details';\n\"over\" return 'over';\n\"note\" return 'note';\n\"activate\" { this.begin('ID'); return 'activate'; }\n\"deactivate\" { this.begin('ID'); return 'deactivate'; }\n\"title\"\\s[^#\\n;]+ return 'title';\n\"title:\"\\s[^#\\n;]+ return 'legacy_title';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\"sequenceDiagram\" return 'SD';\n\"autonumber\" return 'autonumber';\n\"off\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn 'off';\n\",\" return ',';\n\";\" return 'NEWLINE';\n[^\\+\\->:\\n,;]+((?!(\\-x|\\-\\-x|\\-\\)|\\-\\-\\)))[\\-]*[^\\+\\->:\\n,;]+)* { yytext = yytext.trim(); return 'ACTOR'; }\n\"->>\" return 'SOLID_ARROW';\n\"-->>\" return 'DOTTED_ARROW';\n\"->\" return 'SOLID_OPEN_ARROW';\n\"-->\" return 'DOTTED_OPEN_ARROW';\n\\-[x] return 'SOLID_CROSS';\n\\-\\-[x] return 'DOTTED_CROSS';\n\\-[\\)] return 'SOLID_POINT';\n\\-\\-[\\)] return 'DOTTED_POINT';\n\":\"(?:(?:no)?wrap:)?[^#\\n;]+ return 'TXT';\n\"+\" return '+';\n\"-\" return '-';\n<<EOF>> return 'NEWLINE';\n. return 'INVALID';\n\n/lex\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n\t: SPACE start\n\t| NEWLINE start\n\t| directive start\n\t| SD document { yy.apply($2);return $2; }\n\t;\n\ndocument\n\t: /* empty */ { $$ = [] }\n\t| document line {$1.push($2);$$ = $1}\n\t;\n\nline\n\t: SPACE statement { $$ = $2 }\n\t| statement { $$ = $1 }\n\t| NEWLINE { $$=[]; }\n\t;\n\ndirective\n : openDirective typeDirective closeDirective 'NEWLINE'\n | openDirective typeDirective ':' argDirective closeDirective 'NEWLINE'\n ;\n\nstatement\n\t: 'participant' actor 'AS' restOfLine 'NEWLINE' {$2.type='addParticipant';$2.description=yy.parseMessage($4); $$=$2;}\n\t| 'participant' actor 'NEWLINE' {$2.type='addParticipant';$$=$2;}\n\t| 'participant_actor' actor 'AS' restOfLine 'NEWLINE' {$2.type='addActor';$2.description=yy.parseMessage($4); $$=$2;}\n\t| 'participant_actor' actor 'NEWLINE' {$2.type='addActor'; $$=$2;}\n\t| signal 'NEWLINE'\n\t| autonumber NUM NUM 'NEWLINE' { $$= {type:'sequenceIndex',sequenceIndex: Number($2), sequenceIndexStep:Number($3), sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER};}\n\t| autonumber NUM 'NEWLINE' { $$ = {type:'sequenceIndex',sequenceIndex: Number($2), sequenceIndexStep:1, sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER};}\n\t| autonumber off 'NEWLINE' { $$ = {type:'sequenceIndex', sequenceVisible:false, signalType:yy.LINETYPE.AUTONUMBER};}\n\t| autonumber 'NEWLINE' {$$ = {type:'sequenceIndex', sequenceVisible:true, signalType:yy.LINETYPE.AUTONUMBER}; }\n\t| 'activate' actor 'NEWLINE' {$$={type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $2};}\n\t| 'deactivate' actor 'NEWLINE' {$$={type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $2};}\n\t| note_statement 'NEWLINE'\n\t| links_statement 'NEWLINE'\n\t| link_statement 'NEWLINE'\n\t| properties_statement 'NEWLINE'\n\t| details_statement 'NEWLINE'\n\t| title {yy.setDiagramTitle($1.substring(6));$$=$1.substring(6);}\n\t| legacy_title {yy.setDiagramTitle($1.substring(7));$$=$1.substring(7);}\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }\n\t| 'loop' restOfLine document end\n\t{\n\t\t$3.unshift({type: 'loopStart', loopText:yy.parseMessage($2), signalType: yy.LINETYPE.LOOP_START});\n\t\t$3.push({type: 'loopEnd', loopText:$2, signalType: yy.LINETYPE.LOOP_END});\n\t\t$$=$3;}\n\t| 'rect' restOfLine document end\n\t{\n\t\t$3.unshift({type: 'rectStart', color:yy.parseMessage($2), signalType: yy.LINETYPE.RECT_START });\n\t\t$3.push({type: 'rectEnd', color:yy.parseMessage($2), signalType: yy.LINETYPE.RECT_END });\n\t\t$$=$3;}\n\t| opt restOfLine document end\n\t{\n\t\t$3.unshift({type: 'optStart', optText:yy.parseMessage($2), signalType: yy.LINETYPE.OPT_START});\n\t\t$3.push({type: 'optEnd', optText:yy.parseMessage($2), signalType: yy.LINETYPE.OPT_END});\n\t\t$$=$3;}\n\t| alt restOfLine else_sections end\n\t{\n\t\t// Alt start\n\t\t$3.unshift({type: 'altStart', altText:yy.parseMessage($2), signalType: yy.LINETYPE.ALT_START});\n\t\t// Content in alt is already in $3\n\t\t// End\n\t\t$3.push({type: 'altEnd', signalType: yy.LINETYPE.ALT_END});\n\t\t$$=$3;}\n\t| par restOfLine par_sections end\n\t{\n\t\t// Parallel start\n\t\t$3.unshift({type: 'parStart', parText:yy.parseMessage($2), signalType: yy.LINETYPE.PAR_START});\n\t\t// Content in par is already in $3\n\t\t// End\n\t\t$3.push({type: 'parEnd', signalType: yy.LINETYPE.PAR_END});\n\t\t$$=$3;}\n\t| critical restOfLine option_sections end\n\t{\n\t\t// critical start\n\t\t$3.unshift({type: 'criticalStart', criticalText:yy.parseMessage($2), signalType: yy.LINETYPE.CRITICAL_START});\n\t\t// Content in critical is already in $3\n\t\t// critical end\n\t\t$3.push({type: 'criticalEnd', signalType: yy.LINETYPE.CRITICAL_END});\n\t\t$$=$3;}\n\t| break restOfLine document end\n\t{\n\t\t$3.unshift({type: 'breakStart', breakText:yy.parseMessage($2), signalType: yy.LINETYPE.BREAK_START});\n\t\t$3.push({type: 'breakEnd', optText:yy.parseMessage($2), signalType: yy.LINETYPE.BREAK_END});\n\t\t$$=$3;}\n | directive\n\t;\n\noption_sections\n\t: document\n\t| document option restOfLine option_sections\n\t{ $$ = $1.concat([{type: 'option', optionText:yy.parseMessage($3), signalType: yy.LINETYPE.CRITICAL_OPTION}, $4]); }\n\t;\n\npar_sections\n\t: document\n\t| document and restOfLine par_sections\n\t{ $$ = $1.concat([{type: 'and', parText:yy.parseMessage($3), signalType: yy.LINETYPE.PAR_AND}, $4]); }\n\t;\n\nelse_sections\n\t: document\n\t| document else restOfLine else_sections\n\t{ $$ = $1.concat([{type: 'else', altText:yy.parseMessage($3), signalType: yy.LINETYPE.ALT_ELSE}, $4]); }\n\t;\n\nnote_statement\n\t: 'note' placement actor text2\n\t{\n\t\t$$ = [$3, {type:'addNote', placement:$2, actor:$3.actor, text:$4}];}\n\t| 'note' 'over' actor_pair text2\n\t{\n\t\t// Coerce actor_pair into a [to, from, ...] array\n\t\t$2 = [].concat($3, $3).slice(0, 2);\n\t\t$2[0] = $2[0].actor;\n\t\t$2[1] = $2[1].actor;\n\t\t$$ = [$3, {type:'addNote', placement:yy.PLACEMENT.OVER, actor:$2.slice(0, 2), text:$4}];}\n\t;\n\nlinks_statement\n\t: 'links' actor text2\n\t{\n\t\t$$ = [$2, {type:'addLinks', actor:$2.actor, text:$3}];\n }\n\t;\n\nlink_statement\n\t: 'link' actor text2\n\t{\n\t\t$$ = [$2, {type:'addALink', actor:$2.actor, text:$3}];\n }\n\t;\n\nproperties_statement\n\t: 'properties' actor text2\n\t{\n\t\t$$ = [$2, {type:'addProperties', actor:$2.actor, text:$3}];\n }\n\t;\n\ndetails_statement\n\t: 'details' actor text2\n\t{\n\t\t$$ = [$2, {type:'addDetails', actor:$2.actor, text:$3}];\n }\n\t;\n\nspaceList\n : SPACE spaceList\n | SPACE\n ;\nactor_pair\n\t: actor ',' actor { $$ = [$1, $3]; }\n\t| actor { $$ = $1; }\n\t;\n\nplacement\n\t: 'left_of' { $$ = yy.PLACEMENT.LEFTOF; }\n\t| 'right_of' { $$ = yy.PLACEMENT.RIGHTOF; }\n\t;\n\nsignal\n\t: actor signaltype '+' actor text2\n\t{ $$ = [$1,$4,{type: 'addMessage', from:$1.actor, to:$4.actor, signalType:$2, msg:$5},\n\t {type: 'activeStart', signalType: yy.LINETYPE.ACTIVE_START, actor: $4}\n\t ]}\n\t| actor signaltype '-' actor text2\n\t{ $$ = [$1,$4,{type: 'addMessage', from:$1.actor, to:$4.actor, signalType:$2, msg:$5},\n\t {type: 'activeEnd', signalType: yy.LINETYPE.ACTIVE_END, actor: $1}\n\t ]}\n\t| actor signaltype actor text2\n\t{ $$ = [$1,$3,{type: 'addMessage', from:$1.actor, to:$3.actor, signalType:$2, msg:$4}]}\n\t;\n\n// actor\n// \t: actor_participant\n// \t| actor_actor\n// \t;\n\nactor: ACTOR {$$={ type: 'addParticipant', actor:$1}};\n// actor_actor: ACTOR {$$={type: 'addActor', actor:$1}};\n\nsignaltype\n\t: SOLID_OPEN_ARROW { $$ = yy.LINETYPE.SOLID_OPEN; }\n\t| DOTTED_OPEN_ARROW { $$ = yy.LINETYPE.DOTTED_OPEN; }\n\t| SOLID_ARROW { $$ = yy.LINETYPE.SOLID; }\n\t| DOTTED_ARROW { $$ = yy.LINETYPE.DOTTED; }\n\t| SOLID_CROSS { $$ = yy.LINETYPE.SOLID_CROSS; }\n\t| DOTTED_CROSS { $$ = yy.LINETYPE.DOTTED_CROSS; }\n\t| SOLID_POINT { $$ = yy.LINETYPE.SOLID_POINT; }\n\t| DOTTED_POINT { $$ = yy.LINETYPE.DOTTED_POINT; }\n\t;\n\ntext2\n : TXT {$$ = yy.parseMessage($1.trim().substring(1)) }\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'sequence'); }\n ;\n\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const sequenceDetector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*sequenceDiagram/) !== null;\n};\n","import mermaidAPI from '../../mermaidAPI';\nimport * as configApi from '../../config';\nimport { log } from '../../logger';\nimport { sanitizeText } from '../common/common';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nlet prevActor = undefined;\nlet actors = {};\nlet messages = [];\nconst notes = [];\nlet sequenceNumbersEnabled = false;\nlet wrapEnabled;\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nexport const addActor = function (id, name, description, type) {\n // Don't allow description nulling\n const old = actors[id];\n if (old && name === old.name && description == null) return;\n\n // Don't allow null descriptions, either\n if (description == null || description.text == null) {\n description = { text: name, wrap: null, type };\n }\n if (type == null || description.text == null) {\n description = { text: name, wrap: null, type };\n }\n\n actors[id] = {\n name: name,\n description: description.text,\n wrap: (description.wrap === undefined && autoWrap()) || !!description.wrap,\n prevActor: prevActor,\n links: {},\n properties: {},\n actorCnt: null,\n rectData: null,\n type: type || 'participant',\n };\n if (prevActor && actors[prevActor]) {\n actors[prevActor].nextActor = id;\n }\n\n prevActor = id;\n};\n\nconst activationCount = (part) => {\n let i;\n let count = 0;\n for (i = 0; i < messages.length; i++) {\n if (messages[i].type === LINETYPE.ACTIVE_START) {\n if (messages[i].from.actor === part) {\n count++;\n }\n }\n if (messages[i].type === LINETYPE.ACTIVE_END) {\n if (messages[i].from.actor === part) {\n count--;\n }\n }\n }\n return count;\n};\n\nexport const addMessage = function (idFrom, idTo, message, answer) {\n messages.push({\n from: idFrom,\n to: idTo,\n message: message.text,\n wrap: (message.wrap === undefined && autoWrap()) || !!message.wrap,\n answer: answer,\n });\n};\n\nexport const addSignal = function (\n idFrom,\n idTo,\n message = { text: undefined, wrap: undefined },\n messageType\n) {\n if (messageType === LINETYPE.ACTIVE_END) {\n const cnt = activationCount(idFrom.actor);\n if (cnt < 1) {\n // Bail out as there is an activation signal from an inactive participant\n let error = new Error('Trying to inactivate an inactive participant (' + idFrom.actor + ')');\n error.hash = {\n text: '->>-',\n token: '->>-',\n line: '1',\n loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },\n expected: [\"'ACTIVE_PARTICIPANT'\"],\n };\n throw error;\n }\n }\n messages.push({\n from: idFrom,\n to: idTo,\n message: message.text,\n wrap: (message.wrap === undefined && autoWrap()) || !!message.wrap,\n type: messageType,\n });\n return true;\n};\n\nexport const getMessages = function () {\n return messages;\n};\n\nexport const getActors = function () {\n return actors;\n};\nexport const getActor = function (id) {\n return actors[id];\n};\nexport const getActorKeys = function () {\n return Object.keys(actors);\n};\nexport const enableSequenceNumbers = function () {\n sequenceNumbersEnabled = true;\n};\nexport const disableSequenceNumbers = function () {\n sequenceNumbersEnabled = false;\n};\nexport const showSequenceNumbers = () => sequenceNumbersEnabled;\n\nexport const setWrap = function (wrapSetting) {\n wrapEnabled = wrapSetting;\n};\n\nexport const autoWrap = () => {\n // if setWrap has been called, use that value, otherwise use the value from the config\n // TODO: refactor, always use the config value let setWrap update the config value\n if (typeof wrapEnabled !== 'undefined') {\n return wrapEnabled;\n }\n return configApi.getConfig().sequence.wrap;\n};\n\nexport const clear = function () {\n actors = {};\n messages = [];\n sequenceNumbersEnabled = false;\n commonClear();\n};\n\nexport const parseMessage = function (str) {\n const _str = str.trim();\n const message = {\n text: _str.replace(/^[:]?(?:no)?wrap:/, '').trim(),\n wrap:\n _str.match(/^[:]?wrap:/) !== null\n ? true\n : _str.match(/^[:]?nowrap:/) !== null\n ? false\n : undefined,\n };\n log.debug('parseMessage:', message);\n return message;\n};\n\nexport const LINETYPE = {\n SOLID: 0,\n DOTTED: 1,\n NOTE: 2,\n SOLID_CROSS: 3,\n DOTTED_CROSS: 4,\n SOLID_OPEN: 5,\n DOTTED_OPEN: 6,\n LOOP_START: 10,\n LOOP_END: 11,\n ALT_START: 12,\n ALT_ELSE: 13,\n ALT_END: 14,\n OPT_START: 15,\n OPT_END: 16,\n ACTIVE_START: 17,\n ACTIVE_END: 18,\n PAR_START: 19,\n PAR_AND: 20,\n PAR_END: 21,\n RECT_START: 22,\n RECT_END: 23,\n SOLID_POINT: 24,\n DOTTED_POINT: 25,\n AUTONUMBER: 26,\n CRITICAL_START: 27,\n CRITICAL_OPTION: 28,\n CRITICAL_END: 29,\n BREAK_START: 30,\n BREAK_END: 31,\n};\n\nexport const ARROWTYPE = {\n FILLED: 0,\n OPEN: 1,\n};\n\nexport const PLACEMENT = {\n LEFTOF: 0,\n RIGHTOF: 1,\n OVER: 2,\n};\n\nexport const addNote = function (actor, placement, message) {\n const note = {\n actor: actor,\n placement: placement,\n message: message.text,\n wrap: (message.wrap === undefined && autoWrap()) || !!message.wrap,\n };\n\n // Coerce actor into a [to, from, ...] array\n const actors = [].concat(actor, actor);\n\n notes.push(note);\n messages.push({\n from: actors[0],\n to: actors[1],\n message: message.text,\n wrap: (message.wrap === undefined && autoWrap()) || !!message.wrap,\n type: LINETYPE.NOTE,\n placement: placement,\n });\n};\n\nexport const addLinks = function (actorId, text) {\n // find the actor\n const actor = getActor(actorId);\n // JSON.parse the text\n try {\n let sanitizedText = sanitizeText(text.text, configApi.getConfig());\n sanitizedText = sanitizedText.replace(/&/g, '&');\n sanitizedText = sanitizedText.replace(/=/g, '=');\n const links = JSON.parse(sanitizedText);\n // add the deserialized text to the actor's links field.\n insertLinks(actor, links);\n } catch (e) {\n log.error('error while parsing actor link text', e);\n }\n};\n\nexport const addALink = function (actorId, text) {\n // find the actor\n const actor = getActor(actorId);\n try {\n const links = {};\n let sanitizedText = sanitizeText(text.text, configApi.getConfig());\n var sep = sanitizedText.indexOf('@');\n sanitizedText = sanitizedText.replace(/&/g, '&');\n sanitizedText = sanitizedText.replace(/=/g, '=');\n var label = sanitizedText.slice(0, sep - 1).trim();\n var link = sanitizedText.slice(sep + 1).trim();\n\n links[label] = link;\n // add the deserialized text to the actor's links field.\n insertLinks(actor, links);\n } catch (e) {\n log.error('error while parsing actor link text', e);\n }\n};\n\n/**\n * @param {any} actor\n * @param {any} links\n */\nfunction insertLinks(actor, links) {\n if (actor.links == null) {\n actor.links = links;\n } else {\n for (let key in links) {\n actor.links[key] = links[key];\n }\n }\n}\n\nexport const addProperties = function (actorId, text) {\n // find the actor\n const actor = getActor(actorId);\n // JSON.parse the text\n try {\n let sanitizedText = sanitizeText(text.text, configApi.getConfig());\n const properties = JSON.parse(sanitizedText);\n // add the deserialized text to the actor's property field.\n insertProperties(actor, properties);\n } catch (e) {\n log.error('error while parsing actor properties text', e);\n }\n};\n\n/**\n * @param {any} actor\n * @param {any} properties\n */\nfunction insertProperties(actor, properties) {\n if (actor.properties == null) {\n actor.properties = properties;\n } else {\n for (let key in properties) {\n actor.properties[key] = properties[key];\n }\n }\n}\n\nexport const addDetails = function (actorId, text) {\n // find the actor\n const actor = getActor(actorId);\n const elem = document.getElementById(text.text);\n\n // JSON.parse the text\n try {\n const text = elem.innerHTML;\n const details = JSON.parse(text);\n // add the deserialized text to the actor's property field.\n if (details['properties']) {\n insertProperties(actor, details['properties']);\n }\n\n if (details['links']) {\n insertLinks(actor, details['links']);\n }\n } catch (e) {\n log.error('error while parsing actor details text', e);\n }\n};\n\nexport const getActorProperty = function (actor, key) {\n if (typeof actor !== 'undefined' && typeof actor.properties !== 'undefined') {\n return actor.properties[key];\n }\n\n return undefined;\n};\n\nexport const apply = function (param) {\n if (param instanceof Array) {\n param.forEach(function (item) {\n apply(item);\n });\n } else {\n switch (param.type) {\n case 'sequenceIndex':\n messages.push({\n from: undefined,\n to: undefined,\n message: {\n start: param.sequenceIndex,\n step: param.sequenceIndexStep,\n visible: param.sequenceVisible,\n },\n wrap: false,\n type: param.signalType,\n });\n break;\n case 'addParticipant':\n addActor(param.actor, param.actor, param.description, 'participant');\n break;\n case 'addActor':\n addActor(param.actor, param.actor, param.description, 'actor');\n break;\n case 'activeStart':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n case 'activeEnd':\n addSignal(param.actor, undefined, undefined, param.signalType);\n break;\n case 'addNote':\n addNote(param.actor, param.placement, param.text);\n break;\n case 'addLinks':\n addLinks(param.actor, param.text);\n break;\n case 'addALink':\n addALink(param.actor, param.text);\n break;\n case 'addProperties':\n addProperties(param.actor, param.text);\n break;\n case 'addDetails':\n addDetails(param.actor, param.text);\n break;\n case 'addMessage':\n addSignal(param.from, param.to, param.msg, param.signalType);\n break;\n case 'loopStart':\n addSignal(undefined, undefined, param.loopText, param.signalType);\n break;\n case 'loopEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'rectStart':\n addSignal(undefined, undefined, param.color, param.signalType);\n break;\n case 'rectEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'optStart':\n addSignal(undefined, undefined, param.optText, param.signalType);\n break;\n case 'optEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'altStart':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n case 'else':\n addSignal(undefined, undefined, param.altText, param.signalType);\n break;\n case 'altEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'setAccTitle':\n setAccTitle(param.text);\n break;\n case 'parStart':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n case 'and':\n addSignal(undefined, undefined, param.parText, param.signalType);\n break;\n case 'parEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'criticalStart':\n addSignal(undefined, undefined, param.criticalText, param.signalType);\n break;\n case 'option':\n addSignal(undefined, undefined, param.optionText, param.signalType);\n break;\n case 'criticalEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n case 'breakStart':\n addSignal(undefined, undefined, param.breakText, param.signalType);\n break;\n case 'breakEnd':\n addSignal(undefined, undefined, undefined, param.signalType);\n break;\n }\n }\n};\n\nexport default {\n addActor,\n addMessage,\n addSignal,\n addLinks,\n addDetails,\n addProperties,\n autoWrap,\n setWrap,\n enableSequenceNumbers,\n disableSequenceNumbers,\n showSequenceNumbers,\n getMessages,\n getActors,\n getActor,\n getActorKeys,\n getActorProperty,\n getAccTitle,\n getDiagramTitle,\n setDiagramTitle,\n parseDirective,\n getConfig: () => configApi.getConfig().sequence,\n clear,\n parseMessage,\n LINETYPE,\n ARROWTYPE,\n PLACEMENT,\n addNote,\n setAccTitle,\n apply,\n setAccDescription,\n getAccDescription,\n};\n","let interactionFunctions: (() => void)[] = [];\nexport const addFunction = (func: () => void) => {\n interactionFunctions.push(func);\n};\nexport const attachFunctions = () => {\n interactionFunctions.forEach((f) => {\n f();\n });\n interactionFunctions = [];\n};\n","import common from '../common/common';\nimport { addFunction } from '../../interactionDb';\nimport { sanitizeUrl } from '@braintree/sanitize-url';\n\nexport const drawRect = function (elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (typeof rectData.class !== 'undefined') {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\n// const sanitizeUrl = function (s) {\n// return s\n// .replace(/&/g, '&')\n// .replace(/</g, '<')\n// .replace(/javascript:/g, '');\n// };\n\nconst addPopupInteraction = (id, actorCnt) => {\n addFunction(() => {\n const arr = document.querySelectorAll(id);\n // This will be the case when running in sandboxed mode\n if (arr.length === 0) return;\n arr[0].addEventListener('mouseover', function () {\n popupMenuUpFunc('actor' + actorCnt + '_popup');\n });\n arr[0].addEventListener('mouseout', function () {\n popupMenuDownFunc('actor' + actorCnt + '_popup');\n });\n });\n};\nexport const drawPopup = function (elem, actor, minMenuWidth, textAttrs, forceMenus) {\n if (actor.links === undefined || actor.links === null || Object.keys(actor.links).length === 0) {\n return { height: 0, width: 0 };\n }\n\n const links = actor.links;\n const actorCnt = actor.actorCnt;\n const rectData = actor.rectData;\n\n var displayValue = 'none';\n if (forceMenus) {\n displayValue = 'block !important';\n }\n\n const g = elem.append('g');\n g.attr('id', 'actor' + actorCnt + '_popup');\n g.attr('class', 'actorPopupMenu');\n g.attr('display', displayValue);\n addPopupInteraction('#actor' + actorCnt + '_popup', actorCnt);\n var actorClass = '';\n if (typeof rectData.class !== 'undefined') {\n actorClass = ' ' + rectData.class;\n }\n\n let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth;\n\n const rectElem = g.append('rect');\n rectElem.attr('class', 'actorPopupMenuPanel' + actorClass);\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.height);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', menuWidth);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n if (links != null) {\n var linkY = 20;\n for (let key in links) {\n var linkElem = g.append('a');\n var sanitizedLink = sanitizeUrl(links[key]);\n linkElem.attr('xlink:href', sanitizedLink);\n linkElem.attr('target', '_blank');\n\n _drawMenuItemTextCandidateFunc(textAttrs)(\n key,\n linkElem,\n rectData.x + 10,\n rectData.height + linkY,\n menuWidth,\n 20,\n { class: 'actor' },\n textAttrs\n );\n\n linkY += 30;\n }\n }\n\n rectElem.attr('height', linkY);\n\n return { height: rectData.height + linkY, width: menuWidth };\n};\n\nexport const drawImage = function (elem, x, y, link) {\n const imageElem = elem.append('image');\n imageElem.attr('x', x);\n imageElem.attr('y', y);\n var sanitizedLink = sanitizeUrl(link);\n imageElem.attr('xlink:href', sanitizedLink);\n};\n\nexport const drawEmbeddedImage = function (elem, x, y, link) {\n const imageElem = elem.append('use');\n imageElem.attr('x', x);\n imageElem.attr('y', y);\n var sanitizedLink = sanitizeUrl(link);\n imageElem.attr('xlink:href', '#' + sanitizedLink);\n};\n\nexport const popupMenu = function (popid) {\n return (\n \"var pu = document.getElementById('\" +\n popid +\n \"'); if (pu != null) { pu.style.display = 'block'; }\"\n );\n};\n\nexport const popdownMenu = function (popid) {\n return (\n \"var pu = document.getElementById('\" +\n popid +\n \"'); if (pu != null) { pu.style.display = 'none'; }\"\n );\n};\n\nconst popupMenuUpFunc = function (popupId) {\n var pu = document.getElementById(popupId);\n if (pu != null) {\n pu.style.display = 'block';\n }\n};\n\nconst popupMenuDownFunc = function (popupId) {\n var pu = document.getElementById(popupId);\n if (pu != null) {\n pu.style.display = 'none';\n }\n};\nexport const drawText = function (elem, textData) {\n let prevTextHeight = 0,\n textHeight = 0;\n const lines = textData.text.split(common.lineBreakRegex);\n\n let textElems = [];\n let dy = 0;\n let yfunc = () => textData.y;\n if (\n typeof textData.valign !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin > 0\n ) {\n switch (textData.valign) {\n case 'top':\n case 'start':\n yfunc = () => Math.round(textData.y + textData.textMargin);\n break;\n case 'middle':\n case 'center':\n yfunc = () =>\n Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);\n break;\n case 'bottom':\n case 'end':\n yfunc = () =>\n Math.round(\n textData.y +\n (prevTextHeight + textHeight + 2 * textData.textMargin) -\n textData.textMargin\n );\n break;\n }\n }\n if (\n typeof textData.anchor !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n typeof textData.width !== 'undefined'\n ) {\n switch (textData.anchor) {\n case 'left':\n case 'start':\n textData.x = Math.round(textData.x + textData.textMargin);\n textData.anchor = 'start';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n case 'middle':\n case 'center':\n textData.x = Math.round(textData.x + textData.width / 2);\n textData.anchor = 'middle';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n case 'right':\n case 'end':\n textData.x = Math.round(textData.x + textData.width - textData.textMargin);\n textData.anchor = 'end';\n textData.dominantBaseline = 'middle';\n textData.alignmentBaseline = 'middle';\n break;\n }\n }\n for (let i = 0; i < lines.length; i++) {\n let line = lines[i];\n if (\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin === 0 &&\n typeof textData.fontSize !== 'undefined'\n ) {\n dy = i * textData.fontSize;\n }\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', yfunc());\n if (typeof textData.anchor !== 'undefined') {\n textElem\n .attr('text-anchor', textData.anchor)\n .attr('dominant-baseline', textData.dominantBaseline)\n .attr('alignment-baseline', textData.alignmentBaseline);\n }\n if (typeof textData.fontFamily !== 'undefined') {\n textElem.style('font-family', textData.fontFamily);\n }\n if (typeof textData.fontSize !== 'undefined') {\n textElem.style('font-size', textData.fontSize);\n }\n if (typeof textData.fontWeight !== 'undefined') {\n textElem.style('font-weight', textData.fontWeight);\n }\n if (typeof textData.fill !== 'undefined') {\n textElem.attr('fill', textData.fill);\n }\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n if (typeof textData.dy !== 'undefined') {\n textElem.attr('dy', textData.dy);\n } else if (dy !== 0) {\n textElem.attr('dy', dy);\n }\n\n if (textData.tspan) {\n const span = textElem.append('tspan');\n span.attr('x', textData.x);\n if (typeof textData.fill !== 'undefined') {\n span.attr('fill', textData.fill);\n }\n span.text(line);\n } else {\n textElem.text(line);\n }\n if (\n typeof textData.valign !== 'undefined' &&\n typeof textData.textMargin !== 'undefined' &&\n textData.textMargin > 0\n ) {\n textHeight += (textElem._groups || textElem)[0][0].getBBox().height;\n prevTextHeight = textHeight;\n }\n\n textElems.push(textElem);\n }\n\n return textElems;\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n * @returns {any}\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.height / 2;\n\n drawText(elem, txtObject);\n return polygon;\n};\n\nlet actorCnt = -1;\n\nexport const fixLifeLineHeights = (diagram, bounds) => {\n if (!diagram.selectAll) return;\n diagram\n .selectAll('.actor-line')\n .attr('class', '200')\n .attr('y2', bounds - 55);\n};\n\n/**\n * Draws an actor in the diagram with the attached line\n *\n * @param {any} elem - The diagram we'll draw to.\n * @param {any} actor - The actor to draw.\n * @param {any} conf - DrawText implementation discriminator object\n */\nconst drawActorTypeParticipant = function (elem, actor, conf) {\n const center = actor.x + actor.width / 2;\n\n const boxpluslineGroup = elem.append('g');\n var g = boxpluslineGroup;\n\n if (actor.y === 0) {\n actorCnt++;\n g.append('line')\n .attr('id', 'actor' + actorCnt)\n .attr('x1', center)\n .attr('y1', 5)\n .attr('x2', center)\n .attr('y2', 2000)\n .attr('class', 'actor-line')\n .attr('stroke-width', '0.5px')\n .attr('stroke', '#999');\n\n g = boxpluslineGroup.append('g');\n actor.actorCnt = actorCnt;\n\n if (actor.links != null) {\n g.attr('id', 'root-' + actorCnt);\n addPopupInteraction('#root-' + actorCnt, actorCnt);\n }\n }\n\n const rect = getNoteRect();\n var cssclass = 'actor';\n if (actor.properties != null && actor.properties['class']) {\n cssclass = actor.properties['class'];\n } else {\n rect.fill = '#eaeaea';\n }\n rect.x = actor.x;\n rect.y = actor.y;\n rect.width = actor.width;\n rect.height = actor.height;\n rect.class = cssclass;\n rect.rx = 3;\n rect.ry = 3;\n const rectElem = drawRect(g, rect);\n actor.rectData = rect;\n\n if (actor.properties != null && actor.properties['icon']) {\n const iconSrc = actor.properties['icon'].trim();\n if (iconSrc.charAt(0) === '@') {\n drawEmbeddedImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1));\n } else {\n drawImage(g, rect.x + rect.width - 20, rect.y + 10, iconSrc);\n }\n }\n\n _drawTextCandidateFunc(conf)(\n actor.description,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'actor' },\n conf\n );\n\n let height = actor.height;\n if (rectElem.node) {\n const bounds = rectElem.node().getBBox();\n actor.height = bounds.height;\n height = bounds.height;\n }\n\n return height;\n};\n\nconst drawActorTypeActor = function (elem, actor, conf) {\n const center = actor.x + actor.width / 2;\n\n if (actor.y === 0) {\n actorCnt++;\n elem\n .append('line')\n .attr('id', 'actor' + actorCnt)\n .attr('x1', center)\n .attr('y1', 80)\n .attr('x2', center)\n .attr('y2', 2000)\n .attr('class', 'actor-line')\n .attr('stroke-width', '0.5px')\n .attr('stroke', '#999');\n }\n const actElem = elem.append('g');\n actElem.attr('class', 'actor-man');\n\n const rect = getNoteRect();\n rect.x = actor.x;\n rect.y = actor.y;\n rect.fill = '#eaeaea';\n rect.width = actor.width;\n rect.height = actor.height;\n rect.class = 'actor';\n rect.rx = 3;\n rect.ry = 3;\n // drawRect(actElem, rect);\n\n actElem\n .append('line')\n .attr('id', 'actor-man-torso' + actorCnt)\n .attr('x1', center)\n .attr('y1', actor.y + 25)\n .attr('x2', center)\n .attr('y2', actor.y + 45);\n\n actElem\n .append('line')\n .attr('id', 'actor-man-arms' + actorCnt)\n .attr('x1', center - 18)\n .attr('y1', actor.y + 33)\n .attr('x2', center + 18)\n .attr('y2', actor.y + 33);\n actElem\n .append('line')\n .attr('x1', center - 18)\n .attr('y1', actor.y + 60)\n .attr('x2', center)\n .attr('y2', actor.y + 45);\n actElem\n .append('line')\n .attr('x1', center)\n .attr('y1', actor.y + 45)\n .attr('x2', center + 16)\n .attr('y2', actor.y + 60);\n\n const circle = actElem.append('circle');\n circle.attr('cx', actor.x + actor.width / 2);\n circle.attr('cy', actor.y + 10);\n circle.attr('r', 15);\n circle.attr('width', actor.width);\n circle.attr('height', actor.height);\n\n const bounds = actElem.node().getBBox();\n actor.height = bounds.height;\n\n _drawTextCandidateFunc(conf)(\n actor.description,\n actElem,\n rect.x,\n rect.y + 35,\n rect.width,\n rect.height,\n { class: 'actor' },\n conf\n );\n\n return actor.height;\n};\n\nexport const drawActor = function (elem, actor, conf) {\n switch (actor.type) {\n case 'actor':\n return drawActorTypeActor(elem, actor, conf);\n case 'participant':\n return drawActorTypeParticipant(elem, actor, conf);\n }\n};\n\nexport const anchorElement = function (elem) {\n return elem.append('g');\n};\n/**\n * Draws an activation in the diagram\n *\n * @param {any} elem - Element to append activation rect.\n * @param {any} bounds - Activation box bounds.\n * @param {any} verticalPos - Precise y cooridnate of bottom activation box edge.\n * @param {any} conf - Sequence diagram config object.\n * @param {any} actorActivations - Number of activations on the actor.\n */\nexport const drawActivation = function (elem, bounds, verticalPos, conf, actorActivations) {\n const rect = getNoteRect();\n const g = bounds.anchored;\n rect.x = bounds.startx;\n rect.y = bounds.starty;\n rect.class = 'activation' + (actorActivations % 3); // Will evaluate to 0, 1 or 2\n rect.width = bounds.stopx - bounds.startx;\n rect.height = verticalPos - bounds.starty;\n drawRect(g, rect);\n};\n\n/**\n * Draws a loop in the diagram\n *\n * @param {any} elem - Elemenet to append the loop to.\n * @param {any} loopModel - LoopModel of the given loop.\n * @param {any} labelText - Text within the loop.\n * @param {any} conf - Diagrom configuration\n * @returns {any}\n */\nexport const drawLoop = function (elem, loopModel, labelText, conf) {\n const {\n boxMargin,\n boxTextMargin,\n labelBoxHeight,\n labelBoxWidth,\n messageFontFamily: fontFamily,\n messageFontSize: fontSize,\n messageFontWeight: fontWeight,\n } = conf;\n const g = elem.append('g');\n const drawLoopLine = function (startx, starty, stopx, stopy) {\n return g\n .append('line')\n .attr('x1', startx)\n .attr('y1', starty)\n .attr('x2', stopx)\n .attr('y2', stopy)\n .attr('class', 'loopLine');\n };\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);\n drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);\n drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);\n if (typeof loopModel.sections !== 'undefined') {\n loopModel.sections.forEach(function (item) {\n drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style(\n 'stroke-dasharray',\n '3, 3'\n );\n });\n }\n\n let txt = getTextObj();\n txt.text = labelText;\n txt.x = loopModel.startx;\n txt.y = loopModel.starty;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.width = labelBoxWidth || 50;\n txt.height = labelBoxHeight || 20;\n txt.textMargin = boxTextMargin;\n txt.class = 'labelText';\n\n drawLabel(g, txt);\n txt = getTextObj();\n txt.text = loopModel.title;\n txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.starty + boxMargin + boxTextMargin;\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.textMargin = boxTextMargin;\n txt.class = 'loopText';\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = true;\n\n let textElem = drawText(g, txt);\n\n if (typeof loopModel.sectionTitles !== 'undefined') {\n loopModel.sectionTitles.forEach(function (item, idx) {\n if (item.message) {\n txt.text = item.message;\n txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;\n txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;\n txt.class = 'loopText';\n txt.anchor = 'middle';\n txt.valign = 'middle';\n txt.tspan = false;\n txt.fontFamily = fontFamily;\n txt.fontSize = fontSize;\n txt.fontWeight = fontWeight;\n txt.wrap = loopModel.wrap;\n textElem = drawText(g, txt);\n let sectionHeight = Math.round(\n textElem\n .map((te) => (te._groups || te)[0][0].getBBox().height)\n .reduce((acc, curr) => acc + curr)\n );\n loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);\n }\n });\n }\n\n loopModel.height = Math.round(loopModel.stopy - loopModel.starty);\n return g;\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem Diagram (reference for bounds)\n * @param {any} bounds Shape of the rectangle\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n const rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n class: 'rect',\n });\n rectElem.lower();\n};\n\nexport const insertDatabaseIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'database')\n .attr('fill-rule', 'evenodd')\n .attr('clip-rule', 'evenodd')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n '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'\n );\n};\n\nexport const insertComputerIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'computer')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n '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'\n );\n};\n\nexport const insertClockIcon = function (elem) {\n elem\n .append('defs')\n .append('symbol')\n .attr('id', 'clock')\n .attr('width', '24')\n .attr('height', '24')\n .append('path')\n .attr('transform', 'scale(.5)')\n .attr(\n 'd',\n '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'\n );\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param elem\n */\nexport const insertArrowHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 9)\n .attr('refY', 5)\n .attr('markerUnits', 'userSpaceOnUse')\n .attr('markerWidth', 12)\n .attr('markerHeight', 12)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0 0 L 10 5 L 0 10 z'); // this is actual shape for arrowhead\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowFilledHead = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'filled-head')\n .attr('refX', 18)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 18,7 L9,13 L14,7 L9,1 Z');\n};\n/**\n * Setup node number. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertSequenceNumber = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'sequencenumber')\n .attr('refX', 15)\n .attr('refY', 15)\n .attr('markerWidth', 60)\n .attr('markerHeight', 40)\n .attr('orient', 'auto')\n .append('circle')\n .attr('cx', 15)\n .attr('cy', 15)\n .attr('r', 6);\n // .style(\"fill\", '#f00');\n};\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nexport const insertArrowCrossHead = function (elem) {\n const defs = elem.append('defs');\n const marker = defs\n .append('marker')\n .attr('id', 'crosshead')\n .attr('markerWidth', 15)\n .attr('markerHeight', 8)\n .attr('orient', 'auto')\n .attr('refX', 16)\n .attr('refY', 4);\n\n // The arrow\n marker\n .append('path')\n .attr('fill', 'black')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 9,2 V 6 L16,4 Z');\n\n // The cross\n marker\n .append('path')\n .attr('fill', 'none')\n .attr('stroke', '#000000')\n .style('stroke-dasharray', '0, 0')\n .attr('stroke-width', '1px')\n .attr('d', 'M 0,1 L 6,7 M 6,1 L 0,7');\n // this is actual shape for arrowhead\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n anchor: undefined,\n style: '#666',\n width: undefined,\n height: undefined,\n textMargin: 0,\n rx: 0,\n ry: 0,\n tspan: true,\n valign: undefined,\n };\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n fill: '#EDF2AE',\n stroke: '#666',\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { actorFontSize, actorFontFamily, actorFontWeight } = conf;\n\n let _actorFontSize =\n actorFontSize && actorFontSize.replace ? actorFontSize.replace('px', '') : actorFontSize;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * _actorFontSize - (_actorFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .style('text-anchor', 'middle')\n .style('font-size', actorFontSize)\n .style('font-weight', actorFontWeight)\n .style('font-family', actorFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst _drawMenuItemTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n */\n function byText(content, g, x, y, width, height, textAttrs) {\n const text = g\n .append('text')\n .attr('x', x)\n .attr('y', y)\n .style('text-anchor', 'start')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf) {\n const { actorFontSize, actorFontFamily, actorFontWeight } = conf;\n\n const lines = content.split(common.lineBreakRegex);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * actorFontSize - (actorFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x)\n .attr('y', y)\n .style('text-anchor', 'start')\n .style('font-size', actorFontSize)\n .style('font-weight', actorFontWeight)\n .style('font-family', actorFontFamily);\n text.append('tspan').attr('x', x).attr('dy', dy).text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const s = g.append('switch');\n const f = s\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height);\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, s, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (fromTextAttrsDict.hasOwnProperty(key)) {\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nexport default {\n drawRect,\n drawText,\n drawLabel,\n drawActor,\n drawPopup,\n drawImage,\n drawEmbeddedImage,\n anchorElement,\n drawActivation,\n drawLoop,\n drawBackgroundRect,\n insertArrowHead,\n insertArrowFilledHead,\n insertSequenceNumber,\n insertArrowCrossHead,\n insertDatabaseIcon,\n insertComputerIcon,\n insertClockIcon,\n getTextObj,\n getNoteRect,\n popupMenu,\n popdownMenu,\n fixLifeLineHeights,\n sanitizeUrl,\n};\n","// @ts-nocheck TODO: fix file\nimport { select, selectAll } from 'd3';\nimport svgDraw, { drawText, fixLifeLineHeights } from './svgDraw';\nimport { log } from '../../logger';\n// import { parser } from './parser/sequenceDiagram';\nimport common from '../common/common';\n// import sequenceDb from './sequenceDb';\nimport * as configApi from '../../config';\nimport assignWithDepth from '../../assignWithDepth';\nimport utils from '../../utils';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nlet conf = {};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n },\n verticalPos: 0,\n sequenceItems: [],\n activations: [],\n models: {\n getHeight: function () {\n return (\n Math.max.apply(\n null,\n this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0)\n ) +\n (this.loops.length === 0\n ? 0\n : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) +\n (this.messages.length === 0\n ? 0\n : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) +\n (this.notes.length === 0\n ? 0\n : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h))\n );\n },\n clear: function () {\n this.actors = [];\n this.loops = [];\n this.messages = [];\n this.notes = [];\n },\n addActor: function (actorModel) {\n this.actors.push(actorModel);\n },\n addLoop: function (loopModel) {\n this.loops.push(loopModel);\n },\n addMessage: function (msgModel) {\n this.messages.push(msgModel);\n },\n addNote: function (noteModel) {\n this.notes.push(noteModel);\n },\n lastActor: function () {\n return this.actors[this.actors.length - 1];\n },\n lastLoop: function () {\n return this.loops[this.loops.length - 1];\n },\n lastMessage: function () {\n return this.messages[this.messages.length - 1];\n },\n lastNote: function () {\n return this.notes[this.notes.length - 1];\n },\n actors: [],\n loops: [],\n messages: [],\n notes: [],\n },\n init: function () {\n this.sequenceItems = [];\n this.activations = [];\n this.models.clear();\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n };\n this.verticalPos = 0;\n setConf(configApi.getConfig());\n },\n updateVal: function (obj, key, val, fun) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function (startx, starty, stopx, stopy) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _self = this;\n let cnt = 0;\n /** @param {any} type */\n function updateFn(type) {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n this.activations.forEach(updateFn('activation'));\n },\n insert: function (startx, starty, stopx, stopy) {\n const _startx = Math.min(startx, stopx);\n const _stopx = Math.max(startx, stopx);\n const _starty = Math.min(starty, stopy);\n const _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n newActivation: function (message, diagram, actors) {\n const actorRect = actors[message.from.actor];\n const stackedSize = actorActivations(message.from.actor).length || 0;\n const x = actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;\n this.activations.push({\n startx: x,\n starty: this.verticalPos + 2,\n stopx: x + conf.activationWidth,\n stopy: undefined,\n actor: message.from.actor,\n anchored: svgDraw.anchorElement(diagram),\n });\n },\n endActivation: function (message) {\n // find most recent activation for given actor\n const lastActorActivationIdx = this.activations\n .map(function (activation) {\n return activation.actor;\n })\n .lastIndexOf(message.from.actor);\n return this.activations.splice(lastActorActivationIdx, 1)[0];\n },\n createLoop: function (title = { message: undefined, wrap: false, width: undefined }, fill) {\n return {\n startx: undefined,\n starty: this.verticalPos,\n stopx: undefined,\n stopy: undefined,\n title: title.message,\n wrap: title.wrap,\n width: title.width,\n height: 0,\n fill: fill,\n };\n },\n newLoop: function (title = { message: undefined, wrap: false, width: undefined }, fill) {\n this.sequenceItems.push(this.createLoop(title, fill));\n },\n endLoop: function () {\n return this.sequenceItems.pop();\n },\n addSectionToLoop: function (message) {\n const loop = this.sequenceItems.pop();\n loop.sections = loop.sections || [];\n loop.sectionTitles = loop.sectionTitles || [];\n loop.sections.push({ y: bounds.getVerticalPos(), height: 0 });\n loop.sectionTitles.push(message);\n this.sequenceItems.push(loop);\n },\n bumpVerticalPos: function (bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function () {\n return this.verticalPos;\n },\n getBounds: function () {\n return { bounds: this.data, models: this.models };\n },\n};\n\n/**\n * Draws an note in the diagram with the attached line\n *\n * @param {any} elem - The diagram to draw to.\n * @param {{ x: number; y: number; message: string; width: number }} noteModel - Startx: x axis\n * start position, verticalPos: y axis position, messsage: the message to be shown, width: Set\n * this with a custom width to override the default configured width.\n */\nconst drawNote = function (elem, noteModel) {\n bounds.bumpVerticalPos(conf.boxMargin);\n noteModel.height = conf.boxMargin;\n noteModel.starty = bounds.getVerticalPos();\n const rect = svgDraw.getNoteRect();\n rect.x = noteModel.startx;\n rect.y = noteModel.starty;\n rect.width = noteModel.width || conf.width;\n rect.class = 'note';\n\n const g = elem.append('g');\n const rectElem = svgDraw.drawRect(g, rect);\n const textObj = svgDraw.getTextObj();\n textObj.x = noteModel.startx;\n textObj.y = noteModel.starty;\n textObj.width = rect.width;\n textObj.dy = '1em';\n textObj.text = noteModel.message;\n textObj.class = 'noteText';\n textObj.fontFamily = conf.noteFontFamily;\n textObj.fontSize = conf.noteFontSize;\n textObj.fontWeight = conf.noteFontWeight;\n textObj.anchor = conf.noteAlign;\n textObj.textMargin = conf.noteMargin;\n textObj.valign = 'center';\n\n const textElem = drawText(g, textObj);\n\n const textHeight = Math.round(\n textElem\n .map((te) => (te._groups || te)[0][0].getBBox().height)\n .reduce((acc, curr) => acc + curr)\n );\n\n rectElem.attr('height', textHeight + 2 * conf.noteMargin);\n noteModel.height += textHeight + 2 * conf.noteMargin;\n bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);\n noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;\n noteModel.stopx = noteModel.startx + rect.width;\n bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);\n bounds.models.addNote(noteModel);\n};\n\nconst messageFont = (cnf) => {\n return {\n fontFamily: cnf.messageFontFamily,\n fontSize: cnf.messageFontSize,\n fontWeight: cnf.messageFontWeight,\n };\n};\nconst noteFont = (cnf) => {\n return {\n fontFamily: cnf.noteFontFamily,\n fontSize: cnf.noteFontSize,\n fontWeight: cnf.noteFontWeight,\n };\n};\nconst actorFont = (cnf) => {\n return {\n fontFamily: cnf.actorFontFamily,\n fontSize: cnf.actorFontSize,\n fontWeight: cnf.actorFontWeight,\n };\n};\n\n/**\n * Process a message by adding its dimensions to the bound. It returns the Y coordinate of the\n * message so it can be drawn later. We do not draw the message at this point so the arrowhead can\n * be on top of the activation box.\n *\n * @param {any} diagram - The parent of the message element\n * @param {any} msgModel - The model containing fields describing a message\n * @returns {number} LineStarty - The Y coordinate at which the message line starts\n */\nconst boundMessage = function (diagram, msgModel) {\n bounds.bumpVerticalPos(10);\n const { startx, stopx, message } = msgModel;\n const lines = common.splitBreaks(message).length;\n const textDims = utils.calculateTextDimensions(message, messageFont(conf));\n const lineHeight = textDims.height / lines;\n msgModel.height += lineHeight;\n\n bounds.bumpVerticalPos(lineHeight);\n\n let lineStarty;\n let totalOffset = textDims.height - 10;\n const textWidth = textDims.width;\n\n if (startx === stopx) {\n lineStarty = bounds.getVerticalPos() + totalOffset;\n if (!conf.rightAngles) {\n totalOffset += conf.boxMargin;\n lineStarty = bounds.getVerticalPos() + totalOffset;\n }\n totalOffset += 30;\n const dx = Math.max(textWidth / 2, conf.width / 2);\n bounds.insert(\n startx - dx,\n bounds.getVerticalPos() - 10 + totalOffset,\n stopx + dx,\n bounds.getVerticalPos() + 30 + totalOffset\n );\n } else {\n totalOffset += conf.boxMargin;\n lineStarty = bounds.getVerticalPos() + totalOffset;\n bounds.insert(startx, lineStarty - 10, stopx, lineStarty);\n }\n bounds.bumpVerticalPos(totalOffset);\n msgModel.height += totalOffset;\n msgModel.stopy = msgModel.starty + msgModel.height;\n bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);\n\n return lineStarty;\n};\n\n/**\n * Draws a message. Note that the bounds have previously been updated by boundMessage.\n *\n * @param {any} diagram - The parent of the message element\n * @param {any} msgModel - The model containing fields describing a message\n * @param {number} lineStarty - The Y coordinate at which the message line starts\n * @param diagObj\n */\nconst drawMessage = function (diagram, msgModel, lineStarty, diagObj) {\n const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel;\n const textDims = utils.calculateTextDimensions(message, messageFont(conf));\n const textObj = svgDraw.getTextObj();\n textObj.x = startx;\n textObj.y = starty + 10;\n textObj.width = stopx - startx;\n textObj.class = 'messageText';\n textObj.dy = '1em';\n textObj.text = message;\n textObj.fontFamily = conf.messageFontFamily;\n textObj.fontSize = conf.messageFontSize;\n textObj.fontWeight = conf.messageFontWeight;\n textObj.anchor = conf.messageAlign;\n textObj.valign = 'center';\n textObj.textMargin = conf.wrapPadding;\n textObj.tspan = false;\n\n drawText(diagram, textObj);\n\n const textWidth = textDims.width;\n\n let line;\n if (startx === stopx) {\n if (conf.rightAngles) {\n line = diagram\n .append('path')\n .attr(\n 'd',\n `M ${startx},${lineStarty} H ${startx + Math.max(conf.width / 2, textWidth / 2)} V ${\n lineStarty + 25\n } H ${startx}`\n );\n } else {\n line = diagram\n .append('path')\n .attr(\n 'd',\n 'M ' +\n startx +\n ',' +\n lineStarty +\n ' C ' +\n (startx + 60) +\n ',' +\n (lineStarty - 10) +\n ' ' +\n (startx + 60) +\n ',' +\n (lineStarty + 30) +\n ' ' +\n startx +\n ',' +\n (lineStarty + 20)\n );\n }\n } else {\n line = diagram.append('line');\n line.attr('x1', startx);\n line.attr('y1', lineStarty);\n line.attr('x2', stopx);\n line.attr('y2', lineStarty);\n }\n // Make an SVG Container\n // Draw the line\n if (\n type === diagObj.db.LINETYPE.DOTTED ||\n type === diagObj.db.LINETYPE.DOTTED_CROSS ||\n type === diagObj.db.LINETYPE.DOTTED_POINT ||\n type === diagObj.db.LINETYPE.DOTTED_OPEN\n ) {\n line.style('stroke-dasharray', '3, 3');\n line.attr('class', 'messageLine1');\n } else {\n line.attr('class', 'messageLine0');\n }\n\n let url = '';\n if (conf.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n line.attr('stroke-width', 2);\n line.attr('stroke', 'none'); // handled by theme/css anyway\n line.style('fill', 'none'); // remove any fill colour\n if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) {\n line.attr('marker-end', 'url(' + url + '#arrowhead)');\n }\n if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) {\n line.attr('marker-end', 'url(' + url + '#filled-head)');\n }\n\n if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) {\n line.attr('marker-end', 'url(' + url + '#crosshead)');\n }\n\n // add node number\n if (sequenceVisible || conf.showSequenceNumbers) {\n line.attr('marker-start', 'url(' + url + '#sequencenumber)');\n diagram\n .append('text')\n .attr('x', startx)\n .attr('y', lineStarty + 4)\n .attr('font-family', 'sans-serif')\n .attr('font-size', '12px')\n .attr('text-anchor', 'middle')\n .attr('class', 'sequenceNumber')\n .text(sequenceIndex);\n }\n};\n\nexport const drawActors = function (\n diagram,\n actors,\n actorKeys,\n verticalPos,\n configuration,\n messages\n) {\n if (configuration.hideUnusedParticipants === true) {\n const newActors = new Set();\n messages.forEach((message) => {\n newActors.add(message.from);\n newActors.add(message.to);\n });\n actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey));\n }\n\n // Draw the actors\n let prevWidth = 0;\n let prevMargin = 0;\n let maxHeight = 0;\n for (let i = 0; i < actorKeys.length; i++) {\n const actor = actors[actorKeys[i]];\n\n // Add some rendering data to the object\n actor.width = actor.width || conf.width;\n actor.height = Math.max(actor.height || conf.height, conf.height);\n actor.margin = actor.margin || conf.actorMargin;\n\n actor.x = prevWidth + prevMargin;\n actor.y = verticalPos;\n\n // Draw the box with the attached line\n const height = svgDraw.drawActor(diagram, actor, conf);\n maxHeight = Math.max(maxHeight, height);\n bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);\n\n prevWidth += actor.width;\n prevMargin += actor.margin;\n bounds.models.addActor(actor);\n }\n\n // Add a margin between the actor boxes and the first arrow\n bounds.bumpVerticalPos(maxHeight);\n};\n\nexport const drawActorsPopup = function (diagram, actors, actorKeys, doc) {\n let maxHeight = 0;\n let maxWidth = 0;\n for (let i = 0; i < actorKeys.length; i++) {\n const actor = actors[actorKeys[i]];\n const minMenuWidth = getRequiredPopupWidth(actor);\n const menuDimensions = svgDraw.drawPopup(\n diagram,\n actor,\n minMenuWidth,\n conf,\n conf.forceMenus,\n doc\n );\n if (menuDimensions.height > maxHeight) {\n maxHeight = menuDimensions.height;\n }\n if (menuDimensions.width + actor.x > maxWidth) {\n maxWidth = menuDimensions.width + actor.x;\n }\n }\n\n return { maxHeight: maxHeight, maxWidth: maxWidth };\n};\n\nexport const setConf = function (cnf) {\n assignWithDepth(conf, cnf);\n\n if (cnf.fontFamily) {\n conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;\n }\n if (cnf.fontSize) {\n conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;\n }\n if (cnf.fontWeight) {\n conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;\n }\n};\n\nconst actorActivations = function (actor) {\n return bounds.activations.filter(function (activation) {\n return activation.actor === actor;\n });\n};\n\nconst activationBounds = function (actor, actors) {\n // handle multiple stacked activations for same actor\n const actorObj = actors[actor];\n const activations = actorActivations(actor);\n\n const left = activations.reduce(function (acc, activation) {\n return Math.min(acc, activation.startx);\n }, actorObj.x + actorObj.width / 2);\n const right = activations.reduce(function (acc, activation) {\n return Math.max(acc, activation.stopx);\n }, actorObj.x + actorObj.width / 2);\n return [left, right];\n};\n\n/**\n * @param {any} loopWidths\n * @param {any} msg\n * @param {any} preMargin\n * @param {any} postMargin\n * @param {any} addLoopFn\n */\nfunction adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {\n bounds.bumpVerticalPos(preMargin);\n let heightAdjust = postMargin;\n if (msg.id && msg.message && loopWidths[msg.id]) {\n const loopWidth = loopWidths[msg.id].width;\n const textConf = messageFont(conf);\n msg.message = utils.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf);\n msg.width = loopWidth;\n msg.wrap = true;\n\n // const lines = common.splitBreaks(msg.message).length;\n const textDims = utils.calculateTextDimensions(msg.message, textConf);\n const totalOffset = Math.max(textDims.height, conf.labelBoxHeight);\n heightAdjust = postMargin + totalOffset;\n log.debug(`${totalOffset} - ${msg.message}`);\n }\n addLoopFn(msg);\n bounds.bumpVerticalPos(heightAdjust);\n}\n\n/**\n * Draws a sequenceDiagram in the tag with id: id based on the graph definition in text.\n *\n * @param {any} _text The text of the diagram\n * @param {any} id The id of the diagram which will be used as a DOM element id¨\n * @param {any} _version Mermaid version from package.json\n * @param {any} diagObj A stanard diagram containing the db and the text and type etc of the diagram\n */\nexport const draw = function (_text, id, _version, diagObj) {\n const { securityLevel, sequence } = configApi.getConfig();\n conf = sequence;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n bounds.init();\n log.debug(diagObj.db);\n\n const diagram =\n securityLevel === 'sandbox' ? root.select(`[id=\"${id}\"]`) : select(`[id=\"${id}\"]`);\n\n // Fetch data from the parsing\n const actors = diagObj.db.getActors();\n const actorKeys = diagObj.db.getActorKeys();\n const messages = diagObj.db.getMessages();\n const title = diagObj.db.getDiagramTitle();\n\n const maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors, messages, diagObj);\n conf.height = calculateActorMargins(actors, maxMessageWidthPerActor);\n\n svgDraw.insertComputerIcon(diagram);\n svgDraw.insertDatabaseIcon(diagram);\n svgDraw.insertClockIcon(diagram);\n\n drawActors(diagram, actors, actorKeys, 0, conf, messages);\n const loopWidths = calculateLoopBounds(messages, actors, maxMessageWidthPerActor, diagObj);\n\n // The arrow head definition is attached to the svg once\n svgDraw.insertArrowHead(diagram);\n svgDraw.insertArrowCrossHead(diagram);\n svgDraw.insertArrowFilledHead(diagram);\n svgDraw.insertSequenceNumber(diagram);\n\n /**\n * @param {any} msg\n * @param {any} verticalPos\n */\n function activeEnd(msg, verticalPos) {\n const activationData = bounds.endActivation(msg);\n if (activationData.starty + 18 > verticalPos) {\n activationData.starty = verticalPos - 6;\n verticalPos += 12;\n }\n svgDraw.drawActivation(\n diagram,\n activationData,\n verticalPos,\n conf,\n actorActivations(msg.from.actor).length\n );\n\n bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);\n }\n\n // Draw the messages/signals\n let sequenceIndex = 1;\n let sequenceIndexStep = 1;\n const messagesToDraw = [];\n messages.forEach(function (msg) {\n let loopModel, noteModel, msgModel;\n\n switch (msg.type) {\n case diagObj.db.LINETYPE.NOTE:\n noteModel = msg.noteModel;\n drawNote(diagram, noteModel);\n break;\n case diagObj.db.LINETYPE.ACTIVE_START:\n bounds.newActivation(msg, diagram, actors);\n break;\n case diagObj.db.LINETYPE.ACTIVE_END:\n activeEnd(msg, bounds.getVerticalPos());\n break;\n case diagObj.db.LINETYPE.LOOP_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.LOOP_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'loop', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.RECT_START:\n adjustLoopHeightForWrap(loopWidths, msg, conf.boxMargin, conf.boxMargin, (message) =>\n bounds.newLoop(undefined, message.message)\n );\n break;\n case diagObj.db.LINETYPE.RECT_END:\n loopModel = bounds.endLoop();\n svgDraw.drawBackgroundRect(diagram, loopModel);\n bounds.models.addLoop(loopModel);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n break;\n case diagObj.db.LINETYPE.OPT_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.OPT_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'opt', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.ALT_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.ALT_ELSE:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.ALT_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'alt', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.PAR_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.PAR_AND:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.PAR_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'par', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.AUTONUMBER:\n sequenceIndex = msg.message.start || sequenceIndex;\n sequenceIndexStep = msg.message.step || sequenceIndexStep;\n if (msg.message.visible) diagObj.db.enableSequenceNumbers();\n else diagObj.db.disableSequenceNumbers();\n break;\n case diagObj.db.LINETYPE.CRITICAL_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.CRITICAL_OPTION:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin + conf.boxTextMargin,\n conf.boxMargin,\n (message) => bounds.addSectionToLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.CRITICAL_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'critical', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n case diagObj.db.LINETYPE.BREAK_START:\n adjustLoopHeightForWrap(\n loopWidths,\n msg,\n conf.boxMargin,\n conf.boxMargin + conf.boxTextMargin,\n (message) => bounds.newLoop(message)\n );\n break;\n case diagObj.db.LINETYPE.BREAK_END:\n loopModel = bounds.endLoop();\n svgDraw.drawLoop(diagram, loopModel, 'break', conf);\n bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());\n bounds.models.addLoop(loopModel);\n break;\n default:\n try {\n // lastMsg = msg\n msgModel = msg.msgModel;\n msgModel.starty = bounds.getVerticalPos();\n msgModel.sequenceIndex = sequenceIndex;\n msgModel.sequenceVisible = diagObj.db.showSequenceNumbers();\n const lineStarty = boundMessage(diagram, msgModel);\n messagesToDraw.push({ messageModel: msgModel, lineStarty: lineStarty });\n bounds.models.addMessage(msgModel);\n } catch (e) {\n log.error('error while drawing message', e);\n }\n }\n\n // Increment sequence counter if msg.type is a line (and not another event like activation or note, etc)\n if (\n [\n diagObj.db.LINETYPE.SOLID_OPEN,\n diagObj.db.LINETYPE.DOTTED_OPEN,\n diagObj.db.LINETYPE.SOLID,\n diagObj.db.LINETYPE.DOTTED,\n diagObj.db.LINETYPE.SOLID_CROSS,\n diagObj.db.LINETYPE.DOTTED_CROSS,\n diagObj.db.LINETYPE.SOLID_POINT,\n diagObj.db.LINETYPE.DOTTED_POINT,\n ].includes(msg.type)\n ) {\n sequenceIndex = sequenceIndex + sequenceIndexStep;\n }\n });\n\n messagesToDraw.forEach((e) => drawMessage(diagram, e.messageModel, e.lineStarty, diagObj));\n\n if (conf.mirrorActors) {\n // Draw actors below diagram\n bounds.bumpVerticalPos(conf.boxMargin * 2);\n drawActors(diagram, actors, actorKeys, bounds.getVerticalPos(), conf, messages);\n bounds.bumpVerticalPos(conf.boxMargin);\n fixLifeLineHeights(diagram, bounds.getVerticalPos());\n }\n\n // only draw popups for the top row of actors.\n const requiredBoxSize = drawActorsPopup(diagram, actors, actorKeys, doc);\n\n const { bounds: box } = bounds.getBounds();\n\n // Adjust line height of actor lines now that the height of the diagram is known\n log.debug('For line height fix Querying: #' + id + ' .actor-line');\n const actorLines = selectAll('#' + id + ' .actor-line');\n actorLines.attr('y2', box.stopy);\n\n // Make sure the height of the diagram supports long menus.\n let boxHeight = box.stopy - box.starty;\n if (boxHeight < requiredBoxSize.maxHeight) {\n boxHeight = requiredBoxSize.maxHeight;\n }\n\n let height = boxHeight + 2 * conf.diagramMarginY;\n if (conf.mirrorActors) {\n height = height - conf.boxMargin + conf.bottomMarginAdj;\n }\n\n // Make sure the width of the diagram supports wide menus.\n let boxWidth = box.stopx - box.startx;\n if (boxWidth < requiredBoxSize.maxWidth) {\n boxWidth = requiredBoxSize.maxWidth;\n }\n const width = boxWidth + 2 * conf.diagramMarginX;\n\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX)\n .attr('y', -25);\n }\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n const extraVertForTitle = title ? 40 : 0;\n diagram.attr(\n 'viewBox',\n box.startx -\n conf.diagramMarginX +\n ' -' +\n (conf.diagramMarginY + extraVertForTitle) +\n ' ' +\n width +\n ' ' +\n (height + extraVertForTitle)\n );\n\n addSVGAccessibilityFields(diagObj.db, diagram, id);\n log.debug(`models:`, bounds.models);\n};\n\n/**\n * Retrieves the max message width of each actor, supports signals (messages, loops) and notes.\n *\n * It will enumerate each given message, and will determine its text width, in relation to the actor\n * it originates from, and destined to.\n *\n * @param {any} actors - The actors map\n * @param {Array} messages - A list of message objects to iterate\n * @param diagObj\n * @returns {any}\n */\nconst getMaxMessageWidthPerActor = function (actors, messages, diagObj) {\n const maxMessageWidthPerActor = {};\n\n messages.forEach(function (msg) {\n if (actors[msg.to] && actors[msg.from]) {\n const actor = actors[msg.to];\n\n // If this is the first actor, and the message is left of it, no need to calculate the margin\n if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) {\n return;\n }\n\n // If this is the last actor, and the message is right of it, no need to calculate the margin\n if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) {\n return;\n }\n\n const isNote = msg.placement !== undefined;\n const isMessage = !isNote;\n\n const textFont = isNote ? noteFont(conf) : messageFont(conf);\n const wrappedMessage = msg.wrap\n ? utils.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont)\n : msg.message;\n const messageDimensions = utils.calculateTextDimensions(wrappedMessage, textFont);\n const messageWidth = messageDimensions.width + 2 * conf.wrapPadding;\n\n /*\n * The following scenarios should be supported:\n *\n * - There's a message (non-note) between fromActor and toActor\n * - If fromActor is on the right and toActor is on the left, we should\n * define the toActor's margin\n * - If fromActor is on the left and toActor is on the right, we should\n * define the fromActor's margin\n * - There's a note, in which case fromActor == toActor\n * - If the note is to the left of the actor, we should define the previous actor\n * margin\n * - If the note is on the actor, we should define both the previous and next actor\n * margins, each being the half of the note size\n * - If the note is on the right of the actor, we should define the current actor\n * margin\n */\n if (isMessage && msg.from === actor.nextActor) {\n maxMessageWidthPerActor[msg.to] = Math.max(\n maxMessageWidthPerActor[msg.to] || 0,\n messageWidth\n );\n } else if (isMessage && msg.from === actor.prevActor) {\n maxMessageWidthPerActor[msg.from] = Math.max(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth\n );\n } else if (isMessage && msg.from === msg.to) {\n maxMessageWidthPerActor[msg.from] = Math.max(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth / 2\n );\n\n maxMessageWidthPerActor[msg.to] = Math.max(\n maxMessageWidthPerActor[msg.to] || 0,\n messageWidth / 2\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {\n maxMessageWidthPerActor[msg.from] = Math.max(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {\n maxMessageWidthPerActor[actor.prevActor] = Math.max(\n maxMessageWidthPerActor[actor.prevActor] || 0,\n messageWidth\n );\n } else if (msg.placement === diagObj.db.PLACEMENT.OVER) {\n if (actor.prevActor) {\n maxMessageWidthPerActor[actor.prevActor] = Math.max(\n maxMessageWidthPerActor[actor.prevActor] || 0,\n messageWidth / 2\n );\n }\n\n if (actor.nextActor) {\n maxMessageWidthPerActor[msg.from] = Math.max(\n maxMessageWidthPerActor[msg.from] || 0,\n messageWidth / 2\n );\n }\n }\n }\n });\n\n log.debug('maxMessageWidthPerActor:', maxMessageWidthPerActor);\n return maxMessageWidthPerActor;\n};\n\nconst getRequiredPopupWidth = function (actor) {\n let requiredPopupWidth = 0;\n const textFont = actorFont(conf);\n for (const key in actor.links) {\n const labelDimensions = utils.calculateTextDimensions(key, textFont);\n const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin;\n if (requiredPopupWidth < labelWidth) {\n requiredPopupWidth = labelWidth;\n }\n }\n\n return requiredPopupWidth;\n};\n\n/**\n * This will calculate the optimal margin for each given actor, for a given actor->messageWidth map.\n *\n * An actor's margin is determined by the width of the actor, the width of the largest message that\n * originates from it, and the configured conf.actorMargin.\n *\n * @param {any} actors - The actors map to calculate margins for\n * @param {any} actorToMessageWidth - A map of actor key -> max message width it holds\n */\nconst calculateActorMargins = function (actors, actorToMessageWidth) {\n let maxHeight = 0;\n Object.keys(actors).forEach((prop) => {\n const actor = actors[prop];\n if (actor.wrap) {\n actor.description = utils.wrapLabel(\n actor.description,\n conf.width - 2 * conf.wrapPadding,\n actorFont(conf)\n );\n }\n const actDims = utils.calculateTextDimensions(actor.description, actorFont(conf));\n actor.width = actor.wrap\n ? conf.width\n : Math.max(conf.width, actDims.width + 2 * conf.wrapPadding);\n\n actor.height = actor.wrap ? Math.max(actDims.height, conf.height) : conf.height;\n maxHeight = Math.max(maxHeight, actor.height);\n });\n\n for (const actorKey in actorToMessageWidth) {\n const actor = actors[actorKey];\n\n if (!actor) {\n continue;\n }\n\n const nextActor = actors[actor.nextActor];\n\n // No need to space out an actor that doesn't have a next link\n if (!nextActor) {\n continue;\n }\n\n const messageWidth = actorToMessageWidth[actorKey];\n const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;\n\n actor.margin = Math.max(actorWidth, conf.actorMargin);\n }\n\n return Math.max(maxHeight, conf.height);\n};\n\nconst buildNoteModel = function (msg, actors, diagObj) {\n const startx = actors[msg.from].x;\n const stopx = actors[msg.to].x;\n const shouldWrap = msg.wrap && msg.message;\n\n let textDimensions = utils.calculateTextDimensions(\n shouldWrap ? utils.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message,\n noteFont(conf)\n );\n const noteModel = {\n width: shouldWrap\n ? conf.width\n : Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin),\n height: 0,\n startx: actors[msg.from].x,\n stopx: 0,\n starty: 0,\n stopy: 0,\n message: msg.message,\n };\n if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {\n noteModel.width = shouldWrap\n ? Math.max(conf.width, textDimensions.width)\n : Math.max(\n actors[msg.from].width / 2 + actors[msg.to].width / 2,\n textDimensions.width + 2 * conf.noteMargin\n );\n noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2;\n } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {\n noteModel.width = shouldWrap\n ? Math.max(conf.width, textDimensions.width + 2 * conf.noteMargin)\n : Math.max(\n actors[msg.from].width / 2 + actors[msg.to].width / 2,\n textDimensions.width + 2 * conf.noteMargin\n );\n noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2;\n } else if (msg.to === msg.from) {\n textDimensions = utils.calculateTextDimensions(\n shouldWrap\n ? utils.wrapLabel(msg.message, Math.max(conf.width, actors[msg.from].width), noteFont(conf))\n : msg.message,\n noteFont(conf)\n );\n noteModel.width = shouldWrap\n ? Math.max(conf.width, actors[msg.from].width)\n : Math.max(actors[msg.from].width, conf.width, textDimensions.width + 2 * conf.noteMargin);\n noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2;\n } else {\n noteModel.width =\n Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) +\n conf.actorMargin;\n noteModel.startx =\n startx < stopx\n ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2\n : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2;\n }\n if (shouldWrap) {\n noteModel.message = utils.wrapLabel(\n msg.message,\n noteModel.width - 2 * conf.wrapPadding,\n noteFont(conf)\n );\n }\n log.debug(\n `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]`\n );\n return noteModel;\n};\n\nconst buildMessageModel = function (msg, actors, diagObj) {\n let process = false;\n if (\n [\n diagObj.db.LINETYPE.SOLID_OPEN,\n diagObj.db.LINETYPE.DOTTED_OPEN,\n diagObj.db.LINETYPE.SOLID,\n diagObj.db.LINETYPE.DOTTED,\n diagObj.db.LINETYPE.SOLID_CROSS,\n diagObj.db.LINETYPE.DOTTED_CROSS,\n diagObj.db.LINETYPE.SOLID_POINT,\n diagObj.db.LINETYPE.DOTTED_POINT,\n ].includes(msg.type)\n ) {\n process = true;\n }\n if (!process) {\n return {};\n }\n const fromBounds = activationBounds(msg.from, actors);\n const toBounds = activationBounds(msg.to, actors);\n const fromIdx = fromBounds[0] <= toBounds[0] ? 1 : 0;\n const toIdx = fromBounds[0] < toBounds[0] ? 0 : 1;\n const allBounds = fromBounds.concat(toBounds);\n const boundedWidth = Math.abs(toBounds[toIdx] - fromBounds[fromIdx]);\n if (msg.wrap && msg.message) {\n msg.message = utils.wrapLabel(\n msg.message,\n Math.max(boundedWidth + 2 * conf.wrapPadding, conf.width),\n messageFont(conf)\n );\n }\n const msgDims = utils.calculateTextDimensions(msg.message, messageFont(conf));\n\n return {\n width: Math.max(\n msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding,\n boundedWidth + 2 * conf.wrapPadding,\n conf.width\n ),\n height: 0,\n startx: fromBounds[fromIdx],\n stopx: toBounds[toIdx],\n starty: 0,\n stopy: 0,\n message: msg.message,\n type: msg.type,\n wrap: msg.wrap,\n fromBounds: Math.min.apply(null, allBounds),\n toBounds: Math.max.apply(null, allBounds),\n };\n};\n\nconst calculateLoopBounds = function (messages, actors, _maxWidthPerActor, diagObj) {\n const loops = {};\n const stack = [];\n let current, noteModel, msgModel;\n\n messages.forEach(function (msg) {\n msg.id = utils.random({ length: 10 });\n switch (msg.type) {\n case diagObj.db.LINETYPE.LOOP_START:\n case diagObj.db.LINETYPE.ALT_START:\n case diagObj.db.LINETYPE.OPT_START:\n case diagObj.db.LINETYPE.PAR_START:\n case diagObj.db.LINETYPE.CRITICAL_START:\n case diagObj.db.LINETYPE.BREAK_START:\n stack.push({\n id: msg.id,\n msg: msg.message,\n from: Number.MAX_SAFE_INTEGER,\n to: Number.MIN_SAFE_INTEGER,\n width: 0,\n });\n break;\n case diagObj.db.LINETYPE.ALT_ELSE:\n case diagObj.db.LINETYPE.PAR_AND:\n case diagObj.db.LINETYPE.CRITICAL_OPTION:\n if (msg.message) {\n current = stack.pop();\n loops[current.id] = current;\n loops[msg.id] = current;\n stack.push(current);\n }\n break;\n case diagObj.db.LINETYPE.LOOP_END:\n case diagObj.db.LINETYPE.ALT_END:\n case diagObj.db.LINETYPE.OPT_END:\n case diagObj.db.LINETYPE.PAR_END:\n case diagObj.db.LINETYPE.CRITICAL_END:\n case diagObj.db.LINETYPE.BREAK_END:\n current = stack.pop();\n loops[current.id] = current;\n break;\n case diagObj.db.LINETYPE.ACTIVE_START:\n {\n const actorRect = actors[msg.from ? msg.from.actor : msg.to.actor];\n const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length;\n const x =\n actorRect.x + actorRect.width / 2 + ((stackedSize - 1) * conf.activationWidth) / 2;\n const toAdd = {\n startx: x,\n stopx: x + conf.activationWidth,\n actor: msg.from.actor,\n enabled: true,\n };\n bounds.activations.push(toAdd);\n }\n break;\n case diagObj.db.LINETYPE.ACTIVE_END:\n {\n const lastActorActivationIdx = bounds.activations\n .map((a) => a.actor)\n .lastIndexOf(msg.from.actor);\n delete bounds.activations.splice(lastActorActivationIdx, 1)[0];\n }\n break;\n }\n const isNote = msg.placement !== undefined;\n if (isNote) {\n noteModel = buildNoteModel(msg, actors, diagObj);\n msg.noteModel = noteModel;\n stack.forEach((stk) => {\n current = stk;\n current.from = Math.min(current.from, noteModel.startx);\n current.to = Math.max(current.to, noteModel.startx + noteModel.width);\n current.width =\n Math.max(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;\n });\n } else {\n msgModel = buildMessageModel(msg, actors, diagObj);\n msg.msgModel = msgModel;\n if (msgModel.startx && msgModel.stopx && stack.length > 0) {\n stack.forEach((stk) => {\n current = stk;\n if (msgModel.startx === msgModel.stopx) {\n const from = actors[msg.from];\n const to = actors[msg.to];\n current.from = Math.min(\n from.x - msgModel.width / 2,\n from.x - from.width / 2,\n current.from\n );\n current.to = Math.max(to.x + msgModel.width / 2, to.x + from.width / 2, current.to);\n current.width =\n Math.max(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth;\n } else {\n current.from = Math.min(msgModel.startx, current.from);\n current.to = Math.max(msgModel.stopx, current.to);\n current.width = Math.max(current.width, msgModel.width) - conf.labelBoxWidth;\n }\n });\n }\n }\n });\n bounds.activations = [];\n log.debug('Loop type widths:', loops);\n return loops;\n};\n\nexport default {\n bounds,\n drawActors,\n drawActorsPopup,\n setConf,\n draw,\n};\n","/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2014-2021 Knut Sveidqvist\n * MIT license.\n *\n * Based on js sequence diagrams jison grammr\n * https://bramp.github.io/js-sequence-diagrams/\n * (c) 2012-2013 Andrew Brampton (bramp.net)\n * Simplified BSD license.\n */\n%lex\n\n%options case-insensitive\n\n// Special states for recognizing aliases\n%x ID\n%x STATE\n%x FORK_STATE\n%x STATE_STRING\n%x STATE_ID\n%x ALIAS\n%x SCALE\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n%x NOTE\n%x NOTE_ID\n%x NOTE_TEXT\n%x FLOATING_NOTE\n%x FLOATING_NOTE_ID\n%x struct\n%x open_directive\n%x type_directive\n%x arg_directive\n%x close_directive\n\n// A special state for grabbing text up to the first comment/newline\n%x LINE\n\n%%\n\n.*direction\\s+TB[^\\n]* return 'direction_tb';\n.*direction\\s+BT[^\\n]* return 'direction_bt';\n.*direction\\s+RL[^\\n]* return 'direction_rl';\n.*direction\\s+LR[^\\n]* return 'direction_lr';\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%\\%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */{ /*console.log('Crap after close');*/ }\n\n[\\n]+ return 'NL';\n[\\s]+ /* skip all whitespace */\n<ID,STATE,struct,LINE,open_directive,type_directive,arg_directive,close_directive>((?!\\n)\\s)+ /* skip same-line whitespace */\n<INITIAL,ID,STATE,struct,LINE,open_directive,type_directive,arg_directive,close_directive>\\#[^\\n]* /* skip comments */\n\\%%[^\\n]* /* skip comments */\n\"scale\"\\s+ { this.pushState('SCALE'); /* console.log('Got scale', yytext);*/ return 'scale'; }\n<SCALE>\\d+ return 'WIDTH';\n<SCALE>\\s+\"width\" {this.popState();}\n\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\n<INITIAL,struct>\"state\"\\s+ { /*console.log('Starting STATE zxzx'+yy.getDirection());*/this.pushState('STATE'); }\n<STATE>.*\"<<fork>>\" {this.popState();yytext=yytext.slice(0,-8).trim(); /*console.warn('Fork Fork: ',yytext);*/return 'FORK';}\n<STATE>.*\"<<join>>\" {this.popState();yytext=yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yytext);*/return 'JOIN';}\n<STATE>.*\"<<choice>>\" {this.popState();yytext=yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yytext);*/return 'CHOICE';}\n<STATE>.*\"[[fork]]\" {this.popState();yytext=yytext.slice(0,-8).trim();/*console.warn('Fork Fork: ',yytext);*/return 'FORK';}\n<STATE>.*\"[[join]]\" {this.popState();yytext=yytext.slice(0,-8).trim();/*console.warn('Fork Join: ',yytext);*/return 'JOIN';}\n<STATE>.*\"[[choice]]\" {this.popState();yytext=yytext.slice(0,-10).trim();/*console.warn('Fork Join: ',yytext);*/return 'CHOICE';}\n<struct>.*direction\\s+TB[^\\n]* { return 'direction_tb';}\n<struct>.*direction\\s+BT[^\\n]* { return 'direction_bt';}\n<struct>.*direction\\s+RL[^\\n]* { return 'direction_rl';}\n<struct>.*direction\\s+LR[^\\n]* { return 'direction_lr';}\n\n<STATE>[\"] { /*console.log('Starting STATE_STRING zxzx');*/this.begin(\"STATE_STRING\");}\n<STATE>\\s*\"as\"\\s+ {this.popState();this.pushState('STATE_ID');return \"AS\";}\n<STATE_ID>[^\\n\\{]* {this.popState();/* console.log('STATE_ID', yytext);*/return \"ID\";}\n<STATE_STRING>[\"] this.popState();\n<STATE_STRING>[^\"]* { /*console.log('Long description:', yytext);*/return \"STATE_DESCR\";}\n<STATE>[^\\n\\s\\{]+ {/*console.log('COMPOSIT_STATE', yytext);*/return 'COMPOSIT_STATE';}\n<STATE>\\n {this.popState();}\n<INITIAL,STATE>\\{ {this.popState();this.pushState('struct'); /*console.log('begin struct', yytext);*/return 'STRUCT_START';}\n<struct>\\} { /*console.log('Ending struct');*/ this.popState(); return 'STRUCT_STOP';}}\n<struct>[\\n] /* nothing */\n\n<INITIAL,struct>\"note\"\\s+ { this.begin('NOTE'); return 'note'; }\n<NOTE>\"left of\" { this.popState();this.pushState('NOTE_ID');return 'left_of';}\n<NOTE>\"right of\" { this.popState();this.pushState('NOTE_ID');return 'right_of';}\n<NOTE>\\\" { this.popState();this.pushState('FLOATING_NOTE');}\n<FLOATING_NOTE>\\s*\"as\"\\s* {this.popState();this.pushState('FLOATING_NOTE_ID');return \"AS\";}\n<FLOATING_NOTE>[\"] /**/\n<FLOATING_NOTE>[^\"]* { /*console.log('Floating note text: ', yytext);*/return \"NOTE_TEXT\";}\n<FLOATING_NOTE_ID>[^\\n]* {this.popState();/*console.log('Floating note ID', yytext);*/return \"ID\";}\n<NOTE_ID>\\s*[^:\\n\\s\\-]+ { this.popState();this.pushState('NOTE_TEXT');/*console.log('Got ID for note', yytext);*/return 'ID';}\n<NOTE_TEXT>\\s*\":\"[^:\\n;]+ { this.popState();/*console.log('Got NOTE_TEXT for note',yytext);*/yytext = yytext.substr(2).trim();return 'NOTE_TEXT';}\n<NOTE_TEXT>[\\s\\S]*?\"end note\" { this.popState();/*console.log('Got NOTE_TEXT for note',yytext);*/yytext = yytext.slice(0,-8).trim();return 'NOTE_TEXT';}\n\n\"stateDiagram\"\\s+ { /*console.log('Got state diagram', yytext,'#');*/return 'SD'; }\n\"stateDiagram-v2\"\\s+ { /*console.log('Got state diagram', yytext,'#');*/return 'SD'; }\n\"hide empty description\" { /*console.log('HIDE_EMPTY', yytext,'#');*/return 'HIDE_EMPTY'; }\n<INITIAL,struct>\"[*]\" { /*console.log('EDGE_STATE=',yytext);*/ return 'EDGE_STATE';}\n<INITIAL,struct>[^:\\n\\s\\-\\{]+ { /*console.log('=>ID=',yytext);*/ return 'ID';}\n// <INITIAL,struct>\\s*\":\"[^\\+\\->:\\n;]+ { yytext = yytext.trim(); /*console.log('Descr = ', yytext);*/ return 'DESCR'; }\n<INITIAL,struct>\\s*\":\"[^:\\n;]+ { yytext = yytext.trim(); /*console.log('Descr = ', yytext);*/ return 'DESCR'; }\n<INITIAL,struct>\"-->\" return '-->';\n<struct>\"--\" return 'CONCURRENT';\n<<EOF>> return 'NL';\n. return 'INVALID';\n\n/lex\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n\t: SPACE start\n\t| NL start\n\t| directive start\n\t| SD document { /*console.warn('Root document', $2);*/ yy.setRootDoc($2);return $2; }\n\t;\n\ndocument\n\t: /* empty */ { $$ = [] }\n\t| document line {\n if($2!='nl'){\n $1.push($2);$$ = $1\n }\n // console.warn('Got document',$1, $2);\n }\n\t;\n\nline\n\t: SPACE statement { $$ = $2 }\n\t| statement { $$ = $1 }\n\t| NL { $$='nl';}\n\t;\n\nstatement\n\t: idStatement { /*console.warn('got id and descr', $1);*/$$={ stmt: 'state', id: $1, type: 'default', description: ''};}\n\t| idStatement DESCR { /*console.warn('got id and descr', $1, $2.trim());*/$$={ stmt: 'state', id: $1, type: 'default', description: yy.trimColon($2)};}\n\t| idStatement '-->' idStatement\n {\n /*console.warn('got id', $1);yy.addRelation($1, $3);*/\n $$={ stmt: 'relation', state1: { stmt: 'state', id: $1, type: 'default', description: '' }, state2:{ stmt: 'state', id: $3 ,type: 'default', description: ''}};\n }\n\t| idStatement '-->' idStatement DESCR\n {\n /*yy.addRelation($1, $3, $4.substr(1).trim());*/\n $$={ stmt: 'relation', state1: { stmt: 'state', id: $1, type: 'default', description: '' }, state2:{ stmt: 'state', id: $3 ,type: 'default', description: ''}, description: $4.substr(1).trim()};\n }\n | HIDE_EMPTY\n | scale WIDTH\n | COMPOSIT_STATE\n | COMPOSIT_STATE STRUCT_START document STRUCT_STOP\n {\n /* console.warn('Adding document for state without id ', $1);*/\n $$={ stmt: 'state', id: $1, type: 'default', description: '', doc: $3 }\n }\n | STATE_DESCR AS ID {\n var id=$3;\n var description = $1.trim();\n if($3.match(':')){\n var parts = $3.split(':');\n id=parts[0];\n description = [description, parts[1]];\n }\n $$={stmt: 'state', id: id, type: 'default', description: description};\n\n }\n | STATE_DESCR AS ID STRUCT_START document STRUCT_STOP\n {\n // console.warn('Adding document for state with id zxzx', $3, $4, yy.getDirection()); yy.addDocument($3);\n $$={ stmt: 'state', id: $3, type: 'default', description: $1, doc: $5 }\n }\n | FORK {\n $$={ stmt: 'state', id: $1, type: 'fork' }\n }\n | JOIN {\n $$={ stmt: 'state', id: $1, type: 'join' }\n }\n | CHOICE {\n $$={ stmt: 'state', id: $1, type: 'choice' }\n }\n | CONCURRENT {\n $$={ stmt: 'state', id: yy.getDividerId(), type: 'divider' }\n }\n | note notePosition ID NOTE_TEXT\n {\n /* console.warn('got NOTE, position: ', $2.trim(), 'id = ', $3.trim(), 'note: ', $4);*/\n $$={ stmt: 'state', id: $3.trim(), note:{position: $2.trim(), text: $4.trim()}};\n }\n | note NOTE_TEXT AS ID\n \t| directive\n | direction\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); } ;\n\ndirective\n : openDirective typeDirective closeDirective\n | openDirective typeDirective ':' argDirective closeDirective\n ;\ndirection\n : direction_tb\n { yy.setDirection('TB');$$={stmt:'dir', value:'TB'};}\n | direction_bt\n { yy.setDirection('BT');$$={stmt:'dir', value:'BT'};}\n | direction_rl\n { yy.setDirection('RL'); $$={stmt:'dir', value:'RL'};}\n | direction_lr\n { yy.setDirection('LR');$$={stmt:'dir', value:'LR'};}\n ;\n\neol\n : NL\n | ';'\n ;\n\nidStatement\n : ID {$$=$1;}\n | EDGE_STATE {$$=$1;}\n ;\n\nnotePosition\n : left_of\n | right_of\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'state'); }\n ;\n\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const stateDetector: DiagramDetector = (txt, config) => {\n // If we have confired to only use new state diagrams this function should always return false\n // as in not signalling true for a legacy state diagram\n if (config?.state?.defaultRenderer === 'dagre-wrapper') return false;\n return txt.match(/^\\s*stateDiagram/) !== null;\n};\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const stateDetectorV2: DiagramDetector = (text, config) => {\n if (text.match(/^\\s*stateDiagram-v2/) !== null) return true;\n if (text.match(/^\\s*stateDiagram/) && config?.state?.defaultRenderer === 'dagre-wrapper')\n return true;\n return false;\n};\n","import { log } from '../../logger';\nimport { generateId } from '../../utils';\nimport mermaidAPI from '../../mermaidAPI';\nimport common from '../common/common';\nimport * as configApi from '../../config';\nimport {\n setAccTitle,\n getAccTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nconst clone = (o) => JSON.parse(JSON.stringify(o));\nlet rootDoc = [];\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nconst setRootDoc = (o) => {\n log.info('Setting root doc', o);\n // rootDoc = { id: 'root', doc: o };\n rootDoc = o;\n};\n\nconst getRootDoc = () => rootDoc;\n\nconst docTranslator = (parent, node, first) => {\n if (node.stmt === 'relation') {\n docTranslator(parent, node.state1, true);\n docTranslator(parent, node.state2, false);\n } else {\n if (node.stmt === 'state') {\n if (node.id === '[*]') {\n node.id = first ? parent.id + '_start' : parent.id + '_end';\n node.start = first;\n }\n }\n\n if (node.doc) {\n const doc = [];\n // Check for concurrency\n let i = 0;\n let currentDoc = [];\n for (i = 0; i < node.doc.length; i++) {\n if (node.doc[i].type === 'divider') {\n // debugger;\n const newNode = clone(node.doc[i]);\n newNode.doc = clone(currentDoc);\n doc.push(newNode);\n currentDoc = [];\n } else {\n currentDoc.push(node.doc[i]);\n }\n }\n\n // If any divider was encountered\n if (doc.length > 0 && currentDoc.length > 0) {\n const newNode = {\n stmt: 'state',\n id: generateId(),\n type: 'divider',\n doc: clone(currentDoc),\n };\n doc.push(clone(newNode));\n node.doc = doc;\n }\n\n node.doc.forEach((docNode) => docTranslator(node, docNode, true));\n }\n }\n};\nconst getRootDocV2 = () => {\n docTranslator({ id: 'root' }, { id: 'root', doc: rootDoc }, true);\n return { id: 'root', doc: rootDoc };\n // Here\n};\n\nconst extract = (_doc) => {\n // const res = { states: [], relations: [] };\n let doc;\n if (_doc.doc) {\n doc = _doc.doc;\n } else {\n doc = _doc;\n }\n // let doc = root.doc;\n // if (!doc) {\n // doc = root;\n // }\n log.info(doc);\n clear(true);\n\n log.info('Extract', doc);\n\n doc.forEach((item) => {\n if (item.stmt === 'state') {\n addState(item.id, item.type, item.doc, item.description, item.note);\n }\n if (item.stmt === 'relation') {\n addRelation(item.state1.id, item.state2.id, item.description);\n }\n });\n};\n\nconst newDoc = () => {\n return {\n relations: [],\n states: {},\n documents: {},\n };\n};\n\nlet documents = {\n root: newDoc(),\n};\n\nlet currentDocument = documents.root;\n\nlet startCnt = 0;\n\n/**\n * Function called by parser when a node definition has been found.\n *\n * @param {any} id\n * @param {any} type\n * @param {any} doc\n * @param {any} descr\n * @param {any} note\n */\nexport const addState = function (id, type, doc, descr, note) {\n if (typeof currentDocument.states[id] === 'undefined') {\n currentDocument.states[id] = {\n id: id,\n descriptions: [],\n type,\n doc,\n note,\n };\n } else {\n if (!currentDocument.states[id].doc) {\n currentDocument.states[id].doc = doc;\n }\n if (!currentDocument.states[id].type) {\n currentDocument.states[id].type = type;\n }\n }\n if (descr) {\n log.info('Adding state ', id, descr);\n if (typeof descr === 'string') addDescription(id, descr.trim());\n\n if (typeof descr === 'object') {\n descr.forEach((des) => addDescription(id, des.trim()));\n }\n }\n\n if (note) {\n currentDocument.states[id].note = note;\n currentDocument.states[id].note.text = common.sanitizeText(\n currentDocument.states[id].note.text,\n configApi.getConfig()\n );\n }\n};\n\nexport const clear = function (saveCommon) {\n documents = {\n root: newDoc(),\n };\n currentDocument = documents.root;\n\n currentDocument = documents.root;\n\n startCnt = 0;\n classes = [];\n if (!saveCommon) {\n commonClear();\n }\n};\n\nexport const getState = function (id) {\n return currentDocument.states[id];\n};\n\nexport const getStates = function () {\n return currentDocument.states;\n};\nexport const logDocuments = function () {\n log.info('Documents = ', documents);\n};\nexport const getRelations = function () {\n return currentDocument.relations;\n};\n\nexport const addRelation = function (_id1, _id2, title) {\n let id1 = _id1;\n let id2 = _id2;\n let type1 = 'default';\n let type2 = 'default';\n if (_id1 === '[*]') {\n startCnt++;\n id1 = 'start' + startCnt;\n type1 = 'start';\n }\n if (_id2 === '[*]') {\n id2 = 'end' + startCnt;\n type2 = 'end';\n }\n addState(id1, type1);\n addState(id2, type2);\n currentDocument.relations.push({\n id1,\n id2,\n title: common.sanitizeText(title, configApi.getConfig()),\n });\n};\n\nconst addDescription = function (id, _descr) {\n const theState = currentDocument.states[id];\n let descr = _descr;\n if (descr[0] === ':') {\n descr = descr.substr(1).trim();\n }\n theState.descriptions.push(common.sanitizeText(descr, configApi.getConfig()));\n};\n\nexport const cleanupLabel = function (label) {\n if (label.substring(0, 1) === ':') {\n return label.substr(2).trim();\n } else {\n return label.trim();\n }\n};\n\nexport const lineType = {\n LINE: 0,\n DOTTED_LINE: 1,\n};\n\nlet dividerCnt = 0;\nconst getDividerId = () => {\n dividerCnt++;\n return 'divider-id-' + dividerCnt;\n};\n\nlet classes = [];\n\nconst getClasses = () => classes;\n\nlet direction = 'TB';\nconst getDirection = () => direction;\nconst setDirection = (dir) => {\n direction = dir;\n};\n\nexport const relationType = {\n AGGREGATION: 0,\n EXTENSION: 1,\n COMPOSITION: 2,\n DEPENDENCY: 3,\n};\n\nconst trimColon = (str) => (str && str[0] === ':' ? str.substr(1).trim() : str.trim());\n\nexport default {\n parseDirective,\n getConfig: () => configApi.getConfig().state,\n addState,\n clear,\n getState,\n getStates,\n getRelations,\n getClasses,\n getDirection,\n addRelation,\n getDividerId,\n setDirection,\n cleanupLabel,\n lineType,\n relationType,\n logDocuments,\n getRootDoc,\n setRootDoc,\n getRootDocV2,\n extract,\n trimColon,\n getAccTitle,\n setAccTitle,\n getAccDescription,\n setAccDescription,\n};\n","import { line, curveBasis } from 'd3';\nimport idCache from './id-cache.js';\nimport stateDb from './stateDb';\nimport utils from '../../utils';\nimport common from '../common/common';\nimport { getConfig } from '../../config';\nimport { log } from '../../logger';\n\n/**\n * Draws a start state as a black circle\n *\n * @param {any} g\n */\nexport const drawStartState = (g) =>\n g\n .append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'black')\n .attr('class', 'start-state')\n .attr('r', getConfig().state.sizeUnit)\n .attr('cx', getConfig().state.padding + getConfig().state.sizeUnit)\n .attr('cy', getConfig().state.padding + getConfig().state.sizeUnit);\n\n/**\n * Draws a start state as a black circle\n *\n * @param {any} g\n */\nexport const drawDivider = (g) =>\n g\n .append('line')\n .style('stroke', 'grey')\n .style('stroke-dasharray', '3')\n .attr('x1', getConfig().state.textHeight)\n .attr('class', 'divider')\n .attr('x2', getConfig().state.textHeight * 2)\n .attr('y1', 0)\n .attr('y2', 0);\n\n/**\n * Draws a an end state as a black circle\n *\n * @param {any} g\n * @param {any} stateDef\n */\nexport const drawSimpleState = (g, stateDef) => {\n const state = g\n .append('text')\n .attr('x', 2 * getConfig().state.padding)\n .attr('y', getConfig().state.textHeight + 2 * getConfig().state.padding)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.id);\n\n const classBox = state.node().getBBox();\n g.insert('rect', ':first-child')\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding)\n .attr('width', classBox.width + 2 * getConfig().state.padding)\n .attr('height', classBox.height + 2 * getConfig().state.padding)\n .attr('rx', getConfig().state.radius);\n\n return state;\n};\n\n/**\n * Draws a state with descriptions\n *\n * @param {any} g The d3 svg object to add the state to\n * @param {any} stateDef\n * @returns {any} The d3 svg state\n */\nexport const drawDescrState = (g, stateDef) => {\n const addTspan = function (textEl, txt, isFirst) {\n const tSpan = textEl\n .append('tspan')\n .attr('x', 2 * getConfig().state.padding)\n .text(txt);\n if (!isFirst) {\n tSpan.attr('dy', getConfig().state.textHeight);\n }\n };\n const title = g\n .append('text')\n .attr('x', 2 * getConfig().state.padding)\n .attr('y', getConfig().state.textHeight + 1.3 * getConfig().state.padding)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.descriptions[0]);\n\n const titleBox = title.node().getBBox();\n const titleHeight = titleBox.height;\n\n const description = g\n .append('text') // text label for the x axis\n .attr('x', getConfig().state.padding)\n .attr(\n 'y',\n titleHeight +\n getConfig().state.padding * 0.4 +\n getConfig().state.dividerMargin +\n getConfig().state.textHeight\n )\n .attr('class', 'state-description');\n\n let isFirst = true;\n let isSecond = true;\n stateDef.descriptions.forEach(function (descr) {\n if (!isFirst) {\n addTspan(description, descr, isSecond);\n isSecond = false;\n }\n isFirst = false;\n });\n\n const descrLine = g\n .append('line') // text label for the x axis\n .attr('x1', getConfig().state.padding)\n .attr('y1', getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2)\n .attr('y2', getConfig().state.padding + titleHeight + getConfig().state.dividerMargin / 2)\n .attr('class', 'descr-divider');\n const descrBox = description.node().getBBox();\n const width = Math.max(descrBox.width, titleBox.width);\n\n descrLine.attr('x2', width + 3 * getConfig().state.padding);\n // const classBox = title.node().getBBox();\n\n g.insert('rect', ':first-child')\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding)\n .attr('width', width + 2 * getConfig().state.padding)\n .attr('height', descrBox.height + titleHeight + 2 * getConfig().state.padding)\n .attr('rx', getConfig().state.radius);\n\n return g;\n};\n\n/** Adds the creates a box around the existing content and adds a panel for the id on top of the content. */\n/**\n * Function that creates an title row and a frame around a substate for a composit state diagram.\n * The function returns a new d3 svg object with updated width and height properties;\n *\n * @param {any} g The d3 svg object for the substate to framed\n * @param {any} stateDef The info about the\n * @param {any} altBkg\n */\nexport const addTitleAndBox = (g, stateDef, altBkg) => {\n const pad = getConfig().state.padding;\n const dblPad = 2 * getConfig().state.padding;\n const orgBox = g.node().getBBox();\n const orgWidth = orgBox.width;\n const orgX = orgBox.x;\n\n const title = g\n .append('text')\n .attr('x', 0)\n .attr('y', getConfig().state.titleShift)\n .attr('font-size', getConfig().state.fontSize)\n .attr('class', 'state-title')\n .text(stateDef.id);\n\n const titleBox = title.node().getBBox();\n const titleWidth = titleBox.width + dblPad;\n let width = Math.max(titleWidth, orgWidth); // + dblPad;\n if (width === orgWidth) {\n width = width + dblPad;\n }\n let startX;\n // const lineY = 1 - getConfig().state.textHeight;\n // const descrLine = g\n // .append('line') // text label for the x axis\n // .attr('x1', 0)\n // .attr('y1', lineY)\n // .attr('y2', lineY)\n // .attr('class', 'descr-divider');\n\n const graphBox = g.node().getBBox();\n // descrLine.attr('x2', graphBox.width + getConfig().state.padding);\n\n if (stateDef.doc) {\n // cnsole.warn(\n // stateDef.id,\n // 'orgX: ',\n // orgX,\n // 'width: ',\n // width,\n // 'titleWidth: ',\n // titleWidth,\n // 'orgWidth: ',\n // orgWidth,\n // 'width',\n // width\n // );\n }\n\n startX = orgX - pad;\n if (titleWidth > orgWidth) {\n startX = (orgWidth - width) / 2 + pad;\n }\n if (Math.abs(orgX - graphBox.x) < pad) {\n if (titleWidth > orgWidth) {\n startX = orgX - (titleWidth - orgWidth) / 2;\n }\n }\n\n const lineY = 1 - getConfig().state.textHeight;\n // White color\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr('y', lineY)\n .attr('class', altBkg ? 'alt-composit' : 'composit')\n .attr('width', width)\n .attr(\n 'height',\n graphBox.height + getConfig().state.textHeight + getConfig().state.titleShift + 1\n )\n .attr('rx', '0');\n\n title.attr('x', startX + pad);\n if (titleWidth <= orgWidth) title.attr('x', orgX + (width - dblPad) / 2 - titleWidth / 2 + pad);\n\n // Title background\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr(\n 'y',\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n )\n .attr('width', width)\n // Just needs to be higher then the descr line, will be clipped by the white color box\n .attr('height', getConfig().state.textHeight * 3)\n .attr('rx', getConfig().state.radius);\n\n // Full background\n g.insert('rect', ':first-child')\n .attr('x', startX)\n .attr(\n 'y',\n getConfig().state.titleShift - getConfig().state.textHeight - getConfig().state.padding\n )\n .attr('width', width)\n .attr('height', graphBox.height + 3 + 2 * getConfig().state.textHeight)\n .attr('rx', getConfig().state.radius);\n\n return g;\n};\n\nconst drawEndState = (g) => {\n g.append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'white')\n .attr('class', 'end-state-outer')\n .attr('r', getConfig().state.sizeUnit + getConfig().state.miniPadding)\n .attr(\n 'cx',\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n )\n .attr(\n 'cy',\n getConfig().state.padding + getConfig().state.sizeUnit + getConfig().state.miniPadding\n );\n\n return (\n g\n .append('circle')\n // .style('stroke', 'black')\n // .style('fill', 'black')\n .attr('class', 'end-state-inner')\n .attr('r', getConfig().state.sizeUnit)\n .attr('cx', getConfig().state.padding + getConfig().state.sizeUnit + 2)\n .attr('cy', getConfig().state.padding + getConfig().state.sizeUnit + 2)\n );\n};\nconst drawForkJoinState = (g, stateDef) => {\n let width = getConfig().state.forkWidth;\n let height = getConfig().state.forkHeight;\n\n if (stateDef.parentId) {\n let tmp = width;\n width = height;\n height = tmp;\n }\n return g\n .append('rect')\n .style('stroke', 'black')\n .style('fill', 'black')\n .attr('width', width)\n .attr('height', height)\n .attr('x', getConfig().state.padding)\n .attr('y', getConfig().state.padding);\n};\n\nexport const drawText = function (elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.style('text-anchor', textData.anchor);\n textElem.attr('fill', textData.fill);\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.attr('fill', textData.fill);\n span.text(nText);\n\n return textElem;\n};\n\nconst _drawLongText = (_text, x, y, g) => {\n let textHeight = 0;\n\n const textElem = g.append('text');\n textElem.style('text-anchor', 'start');\n textElem.attr('class', 'noteText');\n\n let text = _text.replace(/\\r\\n/g, '<br/>');\n text = text.replace(/\\n/g, '<br/>');\n const lines = text.split(common.lineBreakRegex);\n\n let tHeight = 1.25 * getConfig().state.noteMargin;\n for (const line of lines) {\n const txt = line.trim();\n\n if (txt.length > 0) {\n const span = textElem.append('tspan');\n span.text(txt);\n if (tHeight === 0) {\n const textBounds = span.node().getBBox();\n tHeight += textBounds.height;\n }\n textHeight += tHeight;\n span.attr('x', x + getConfig().state.noteMargin);\n span.attr('y', y + textHeight + 1.25 * getConfig().state.noteMargin);\n }\n }\n return { textWidth: textElem.node().getBBox().width, textHeight };\n};\n\n/**\n * Draws a note to the diagram\n *\n * @param text - The text of the given note.\n * @param g - The element the note is attached to.\n */\n\nexport const drawNote = (text, g) => {\n g.attr('class', 'state-note');\n const note = g.append('rect').attr('x', 0).attr('y', getConfig().state.padding);\n const rectElem = g.append('g');\n\n const { textWidth, textHeight } = _drawLongText(text, 0, 0, rectElem);\n note.attr('height', textHeight + 2 * getConfig().state.noteMargin);\n note.attr('width', textWidth + getConfig().state.noteMargin * 2);\n\n return note;\n};\n\n/**\n * Starting point for drawing a state. The function finds out the specifics about the state and\n * renders with appropriate function.\n *\n * @param {any} elem\n * @param {any} stateDef\n */\n\nexport const drawState = function (elem, stateDef) {\n const id = stateDef.id;\n const stateInfo = {\n id: id,\n label: stateDef.id,\n width: 0,\n height: 0,\n };\n\n const g = elem.append('g').attr('id', id).attr('class', 'stateGroup');\n\n if (stateDef.type === 'start') drawStartState(g);\n if (stateDef.type === 'end') drawEndState(g);\n if (stateDef.type === 'fork' || stateDef.type === 'join') drawForkJoinState(g, stateDef);\n if (stateDef.type === 'note') drawNote(stateDef.note.text, g);\n if (stateDef.type === 'divider') drawDivider(g);\n if (stateDef.type === 'default' && stateDef.descriptions.length === 0)\n drawSimpleState(g, stateDef);\n if (stateDef.type === 'default' && stateDef.descriptions.length > 0) drawDescrState(g, stateDef);\n\n const stateBox = g.node().getBBox();\n stateInfo.width = stateBox.width + 2 * getConfig().state.padding;\n stateInfo.height = stateBox.height + 2 * getConfig().state.padding;\n\n idCache.set(id, stateInfo);\n // stateCnt++;\n return stateInfo;\n};\n\nlet edgeCount = 0;\nexport const drawEdge = function (elem, path, relation) {\n const getRelationType = function (type) {\n switch (type) {\n case stateDb.relationType.AGGREGATION:\n return 'aggregation';\n case stateDb.relationType.EXTENSION:\n return 'extension';\n case stateDb.relationType.COMPOSITION:\n return 'composition';\n case stateDb.relationType.DEPENDENCY:\n return 'dependency';\n }\n };\n\n path.points = path.points.filter((p) => !Number.isNaN(p.y));\n\n // The data for our line\n const lineData = path.points;\n\n // This is the accessor function we talked about above\n const lineFunction = line()\n .x(function (d) {\n return d.x;\n })\n .y(function (d) {\n return d.y;\n })\n .curve(curveBasis);\n\n const svgPath = elem\n .append('path')\n .attr('d', lineFunction(lineData))\n .attr('id', 'edge' + edgeCount)\n .attr('class', 'transition');\n let url = '';\n if (getConfig().state.arrowMarkerAbsolute) {\n url =\n window.location.protocol +\n '//' +\n window.location.host +\n window.location.pathname +\n window.location.search;\n url = url.replace(/\\(/g, '\\\\(');\n url = url.replace(/\\)/g, '\\\\)');\n }\n\n svgPath.attr(\n 'marker-end',\n 'url(' + url + '#' + getRelationType(stateDb.relationType.DEPENDENCY) + 'End' + ')'\n );\n\n if (typeof relation.title !== 'undefined') {\n const label = elem.append('g').attr('class', 'stateLabel');\n\n const { x, y } = utils.calcLabelPosition(path.points);\n\n const rows = common.getRows(relation.title);\n\n let titleHeight = 0;\n const titleRows = [];\n let maxWidth = 0;\n let minX = 0;\n\n for (let i = 0; i <= rows.length; i++) {\n const title = label\n .append('text')\n .attr('text-anchor', 'middle')\n .text(rows[i])\n .attr('x', x)\n .attr('y', y + titleHeight);\n\n const boundstmp = title.node().getBBox();\n maxWidth = Math.max(maxWidth, boundstmp.width);\n minX = Math.min(minX, boundstmp.x);\n\n log.info(boundstmp.x, x, y + titleHeight);\n\n if (titleHeight === 0) {\n const titleBox = title.node().getBBox();\n titleHeight = titleBox.height;\n log.info('Title height', titleHeight, y);\n }\n titleRows.push(title);\n }\n\n let boxHeight = titleHeight * rows.length;\n if (rows.length > 1) {\n const heightAdj = (rows.length - 1) * titleHeight * 0.5;\n\n titleRows.forEach((title, i) => title.attr('y', y + i * titleHeight - heightAdj));\n boxHeight = titleHeight * rows.length;\n }\n\n const bounds = label.node().getBBox();\n\n label\n .insert('rect', ':first-child')\n .attr('class', 'box')\n .attr('x', x - maxWidth / 2 - getConfig().state.padding / 2)\n .attr('y', y - boxHeight / 2 - getConfig().state.padding / 2 - 3.5)\n .attr('width', maxWidth + getConfig().state.padding)\n .attr('height', boxHeight + getConfig().state.padding);\n\n log.info(bounds);\n\n //label.attr('transform', '0 -' + (bounds.y / 2));\n\n // Debug points\n // path.points.forEach(point => {\n // g.append('circle')\n // .style('stroke', 'red')\n // .style('fill', 'red')\n // .attr('r', 1)\n // .attr('cx', point.x)\n // .attr('cy', point.y);\n // });\n // g.append('circle')\n // .style('stroke', 'blue')\n // .style('fill', 'blue')\n // .attr('r', 1)\n // .attr('cx', x)\n // .attr('cy', y);\n }\n\n edgeCount++;\n};\n","import { select } from 'd3';\nimport dagre from 'dagre';\nimport graphlib from 'graphlib';\nimport { log } from '../../logger';\nimport common from '../common/common';\nimport { drawState, addTitleAndBox, drawEdge } from './shapes';\nimport { getConfig } from '../../config';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport addSVGAccessibilityFields from '../../accessibility';\n\n// TODO Move conf object to main conf in mermaidAPI\nlet conf;\n\nconst transformationLog = {};\n\nexport const setConf = function () {\n //no-op\n};\n\n/**\n * Setup arrow head and define the marker. The result is appended to the svg.\n *\n * @param {any} elem\n */\nconst insertMarkers = function (elem) {\n elem\n .append('defs')\n .append('marker')\n .attr('id', 'dependencyEnd')\n .attr('refX', 19)\n .attr('refY', 7)\n .attr('markerWidth', 20)\n .attr('markerHeight', 28)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 19,7 L9,13 L14,7 L9,1 Z');\n};\n\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {any} text\n * @param {any} id\n * @param _version\n * @param diagObj\n */\nexport const draw = function (text, id, _version, diagObj) {\n conf = getConfig().state;\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n // diagObj.db.clear();\n // parser.parse(text);\n log.debug('Rendering diagram ' + text);\n\n // Fetch the default direction, use TD if none was found\n const diagram = root.select(`[id='${id}']`);\n insertMarkers(diagram);\n\n // Layout graph, Create a new directed graph\n const graph = new graphlib.Graph({\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n rankdir: 'RL',\n // ranksep: '20'\n });\n\n // Default to assigning a new object as a label for each new edge.\n graph.setDefaultEdgeLabel(function () {\n return {};\n });\n\n const rootDoc = diagObj.db.getRootDoc();\n renderDoc(rootDoc, diagram, undefined, false, root, doc, diagObj);\n\n const padding = conf.padding;\n const bounds = diagram.node().getBBox();\n\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n\n // zoom in a bit\n const svgWidth = width * 1.75;\n configureSvgSize(diagram, height, svgWidth, conf.useMaxWidth);\n\n diagram.attr(\n 'viewBox',\n `${bounds.x - conf.padding} ${bounds.y - conf.padding} ` + width + ' ' + height\n );\n addSVGAccessibilityFields(diagObj.db, diagram, id);\n};\nconst getLabelWidth = (text) => {\n return text ? text.length * conf.fontSizeFactor : 1;\n};\n\nconst renderDoc = (doc, diagram, parentId, altBkg, root, domDocument, diagObj) => {\n // Layout graph, Create a new directed graph\n const graph = new graphlib.Graph({\n compound: true,\n multigraph: true,\n });\n\n let i;\n let edgeFreeDoc = true;\n for (i = 0; i < doc.length; i++) {\n if (doc[i].stmt === 'relation') {\n edgeFreeDoc = false;\n break;\n }\n }\n\n // Set an object for the graph label\n if (parentId)\n graph.setGraph({\n rankdir: 'LR',\n multigraph: true,\n compound: true,\n // acyclicer: 'greedy',\n ranker: 'tight-tree',\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n isMultiGraph: true,\n // ranksep: 5,\n // nodesep: 1\n });\n else {\n graph.setGraph({\n rankdir: 'TB',\n multigraph: true,\n compound: true,\n // isCompound: true,\n // acyclicer: 'greedy',\n // ranker: 'longest-path'\n ranksep: edgeFreeDoc ? 1 : conf.edgeLengthFactor,\n nodeSep: edgeFreeDoc ? 1 : 50,\n ranker: 'tight-tree',\n // ranker: 'network-simplex'\n isMultiGraph: true,\n });\n }\n\n // Default to assigning a new object as a label for each new edge.\n graph.setDefaultEdgeLabel(function () {\n return {};\n });\n\n diagObj.db.extract(doc);\n const states = diagObj.db.getStates();\n const relations = diagObj.db.getRelations();\n\n const keys = Object.keys(states);\n\n let first = true;\n\n for (let i = 0; i < keys.length; i++) {\n const stateDef = states[keys[i]];\n\n if (parentId) {\n stateDef.parentId = parentId;\n }\n\n let node;\n if (stateDef.doc) {\n let sub = diagram.append('g').attr('id', stateDef.id).attr('class', 'stateGroup');\n node = renderDoc(stateDef.doc, sub, stateDef.id, !altBkg, root, domDocument, diagObj);\n\n if (first) {\n // first = false;\n sub = addTitleAndBox(sub, stateDef, altBkg);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height + conf.padding / 2;\n transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n } else {\n // sub = addIdAndBox(sub, stateDef);\n let boxBounds = sub.node().getBBox();\n node.width = boxBounds.width;\n node.height = boxBounds.height;\n // transformationLog[stateDef.id] = { y: conf.compositTitleSize };\n }\n } else {\n node = drawState(diagram, stateDef, graph);\n }\n\n if (stateDef.note) {\n // Draw note note\n const noteDef = {\n descriptions: [],\n id: stateDef.id + '-note',\n note: stateDef.note,\n type: 'note',\n };\n const note = drawState(diagram, noteDef, graph);\n\n // graph.setNode(node.id, node);\n if (stateDef.note.position === 'left of') {\n graph.setNode(node.id + '-note', note);\n graph.setNode(node.id, node);\n } else {\n graph.setNode(node.id, node);\n graph.setNode(node.id + '-note', note);\n }\n // graph.setNode(node.id);\n graph.setParent(node.id, node.id + '-group');\n graph.setParent(node.id + '-note', node.id + '-group');\n } else {\n // Add nodes to the graph. The first argument is the node id. The second is\n // metadata about the node. In this case we're going to add labels to each of\n // our nodes.\n graph.setNode(node.id, node);\n }\n }\n\n log.debug('Count=', graph.nodeCount(), graph);\n let cnt = 0;\n relations.forEach(function (relation) {\n cnt++;\n log.debug('Setting edge', relation);\n graph.setEdge(\n relation.id1,\n relation.id2,\n {\n relation: relation,\n width: getLabelWidth(relation.title),\n height: conf.labelHeight * common.getRows(relation.title).length,\n labelpos: 'c',\n },\n 'id' + cnt\n );\n });\n\n dagre.layout(graph);\n\n log.debug('Graph after layout', graph.nodes());\n const svgElem = diagram.node();\n\n graph.nodes().forEach(function (v) {\n if (typeof v !== 'undefined' && typeof graph.node(v) !== 'undefined') {\n log.warn('Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n root\n .select('#' + svgElem.id + ' #' + v)\n .attr(\n 'transform',\n 'translate(' +\n (graph.node(v).x - graph.node(v).width / 2) +\n ',' +\n (graph.node(v).y +\n (transformationLog[v] ? transformationLog[v].y : 0) -\n graph.node(v).height / 2) +\n ' )'\n );\n root\n .select('#' + svgElem.id + ' #' + v)\n .attr('data-x-shift', graph.node(v).x - graph.node(v).width / 2);\n const dividers = domDocument.querySelectorAll('#' + svgElem.id + ' #' + v + ' .divider');\n dividers.forEach((divider) => {\n const parent = divider.parentElement;\n let pWidth = 0;\n let pShift = 0;\n if (parent) {\n if (parent.parentElement) pWidth = parent.parentElement.getBBox().width;\n pShift = parseInt(parent.getAttribute('data-x-shift'), 10);\n if (Number.isNaN(pShift)) {\n pShift = 0;\n }\n }\n divider.setAttribute('x1', 0 - pShift + 8);\n divider.setAttribute('x2', pWidth - pShift - 8);\n });\n } else {\n log.debug('No Node ' + v + ': ' + JSON.stringify(graph.node(v)));\n }\n });\n\n let stateBox = svgElem.getBBox();\n\n graph.edges().forEach(function (e) {\n if (typeof e !== 'undefined' && typeof graph.edge(e) !== 'undefined') {\n log.debug('Edge ' + e.v + ' -> ' + e.w + ': ' + JSON.stringify(graph.edge(e)));\n drawEdge(diagram, graph.edge(e), graph.edge(e).relation);\n }\n });\n\n stateBox = svgElem.getBBox();\n\n const stateInfo = {\n id: parentId ? parentId : 'root',\n label: parentId ? parentId : 'root',\n width: 0,\n height: 0,\n };\n\n stateInfo.width = stateBox.width + 2 * conf.padding;\n stateInfo.height = stateBox.height + 2 * conf.padding;\n\n log.debug('Doc rendered', stateInfo, graph);\n return stateInfo;\n};\n\nexport default {\n setConf,\n draw,\n};\n","import graphlib from 'graphlib';\nimport { select } from 'd3';\nimport { getConfig } from '../../config';\nimport { render } from '../../dagre-wrapper/index.js';\nimport { log } from '../../logger';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport common from '../common/common';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nconst conf = {};\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n for (let i = 0; i < keys.length; i++) {\n conf[keys[i]] = cnf[keys[i]];\n }\n};\n\nlet nodeDb = {};\n\n/**\n * Returns the all the styles from classDef statements in the graph definition.\n *\n * @param {any} text\n * @param diag\n * @returns {object} ClassDef styles\n */\nexport const getClasses = function (text, diag) {\n log.trace('Extracting classes');\n diag.sb.clear();\n\n // Parse the graph definition\n diag.parser.parse(text);\n return diag.sb.getClasses();\n};\n\nconst setupNode = (g, parent, node, altFlag) => {\n // Add the node\n if (node.id !== 'root') {\n let shape = 'rect';\n if (node.start === true) {\n shape = 'start';\n }\n if (node.start === false) {\n shape = 'end';\n }\n if (node.type !== 'default') {\n shape = node.type;\n }\n\n if (!nodeDb[node.id]) {\n nodeDb[node.id] = {\n id: node.id,\n shape,\n description: common.sanitizeText(node.id, getConfig()),\n classes: 'statediagram-state',\n };\n }\n\n // Build of the array of description strings accordinging\n if (node.description) {\n if (Array.isArray(nodeDb[node.id].description)) {\n // There already is an array of strings,add to it\n nodeDb[node.id].shape = 'rectWithTitle';\n nodeDb[node.id].description.push(node.description);\n } else {\n if (nodeDb[node.id].description.length > 0) {\n // if there is a description already transformit to an array\n nodeDb[node.id].shape = 'rectWithTitle';\n if (nodeDb[node.id].description === node.id) {\n // If the previous description was the is, remove it\n nodeDb[node.id].description = [node.description];\n } else {\n nodeDb[node.id].description = [nodeDb[node.id].description, node.description];\n }\n } else {\n nodeDb[node.id].shape = 'rect';\n nodeDb[node.id].description = node.description;\n }\n }\n nodeDb[node.id].description = common.sanitizeTextOrArray(\n nodeDb[node.id].description,\n getConfig()\n );\n }\n\n //\n if (nodeDb[node.id].description.length === 1 && nodeDb[node.id].shape === 'rectWithTitle') {\n nodeDb[node.id].shape = 'rect';\n }\n\n // Save data for description and group so that for instance a statement without description overwrites\n // one with description\n\n // group\n if (!nodeDb[node.id].type && node.doc) {\n log.info('Setting cluster for ', node.id, getDir(node));\n nodeDb[node.id].type = 'group';\n nodeDb[node.id].dir = getDir(node);\n nodeDb[node.id].shape = node.type === 'divider' ? 'divider' : 'roundedWithTitle';\n nodeDb[node.id].classes =\n nodeDb[node.id].classes +\n ' ' +\n (altFlag ? 'statediagram-cluster statediagram-cluster-alt' : 'statediagram-cluster');\n }\n\n const nodeData = {\n labelStyle: '',\n shape: nodeDb[node.id].shape,\n labelText: nodeDb[node.id].description,\n // typeof nodeDb[node.id].description === 'object'\n // ? nodeDb[node.id].description[0]\n // : nodeDb[node.id].description,\n classes: nodeDb[node.id].classes, //classStr,\n style: '', //styles.style,\n id: node.id,\n dir: nodeDb[node.id].dir,\n domId: 'state-' + node.id + '-' + cnt,\n type: nodeDb[node.id].type,\n padding: 15, //getConfig().flowchart.padding\n };\n\n if (node.note) {\n // Todo: set random id\n const noteData = {\n labelStyle: '',\n shape: 'note',\n labelText: node.note.text,\n classes: 'statediagram-note', //classStr,\n style: '', //styles.style,\n id: node.id + '----note-' + cnt,\n domId: 'state-' + node.id + '----note-' + cnt,\n type: nodeDb[node.id].type,\n padding: 15, //getConfig().flowchart.padding\n };\n const groupData = {\n labelStyle: '',\n shape: 'noteGroup',\n labelText: node.note.text,\n classes: nodeDb[node.id].classes, //classStr,\n style: '', //styles.style,\n id: node.id + '----parent',\n domId: 'state-' + node.id + '----parent-' + cnt,\n type: 'group',\n padding: 0, //getConfig().flowchart.padding\n };\n cnt++;\n\n g.setNode(node.id + '----parent', groupData);\n\n g.setNode(noteData.id, noteData);\n g.setNode(node.id, nodeData);\n\n g.setParent(node.id, node.id + '----parent');\n g.setParent(noteData.id, node.id + '----parent');\n\n let from = node.id;\n let to = noteData.id;\n\n if (node.note.position === 'left of') {\n from = noteData.id;\n to = node.id;\n }\n g.setEdge(from, to, {\n arrowhead: 'none',\n arrowType: '',\n style: 'fill:none',\n labelStyle: '',\n classes: 'transition note-edge',\n arrowheadStyle: 'fill: #333',\n labelpos: 'c',\n labelType: 'text',\n thickness: 'normal',\n });\n } else {\n g.setNode(node.id, nodeData);\n }\n }\n\n if (parent) {\n if (parent.id !== 'root') {\n log.trace('Setting node ', node.id, ' to be child of its parent ', parent.id);\n g.setParent(node.id, parent.id);\n }\n }\n if (node.doc) {\n log.trace('Adding nodes children ');\n setupDoc(g, node, node.doc, !altFlag);\n }\n};\nlet cnt = 0;\nconst setupDoc = (g, parent, doc, altFlag) => {\n // cnt = 0;\n log.trace('items', doc);\n doc.forEach((item) => {\n if (item.stmt === 'state' || item.stmt === 'default') {\n setupNode(g, parent, item, altFlag);\n } else if (item.stmt === 'relation') {\n setupNode(g, parent, item.state1, altFlag);\n setupNode(g, parent, item.state2, altFlag);\n const edgeData = {\n id: 'edge' + cnt,\n arrowhead: 'normal',\n arrowTypeEnd: 'arrow_barb',\n style: 'fill:none',\n labelStyle: '',\n label: common.sanitizeText(item.description, getConfig()),\n arrowheadStyle: 'fill: #333',\n labelpos: 'c',\n labelType: 'text',\n thickness: 'normal',\n classes: 'transition',\n };\n let startId = item.state1.id;\n let endId = item.state2.id;\n\n g.setEdge(startId, endId, edgeData, cnt);\n cnt++;\n }\n });\n};\nconst getDir = (nodes, defaultDir) => {\n let dir = defaultDir || 'TB';\n if (nodes.doc) {\n for (let i = 0; i < nodes.doc.length; i++) {\n const node = nodes.doc[i];\n if (node.stmt === 'dir') {\n dir = node.value;\n }\n }\n }\n return dir;\n};\n/**\n * Draws a flowchart in the tag with id: id based on the graph definition in text.\n *\n * @param {any} text\n * @param {any} id\n * @param _version\n * @param diag\n */\nexport const draw = function (text, id, _version, diag) {\n log.info('Drawing state diagram (v2)', id);\n // diag.sb.clear();\n nodeDb = {};\n // Fetch the default direction, use TD if none was found\n let dir = diag.db.getDirection();\n if (typeof dir === 'undefined') {\n dir = 'LR';\n }\n\n const { securityLevel, state: conf } = getConfig();\n const nodeSpacing = conf.nodeSpacing || 50;\n const rankSpacing = conf.rankSpacing || 50;\n\n log.info(diag.db.getRootDocV2());\n diag.db.extract(diag.db.getRootDocV2());\n log.info(diag.db.getRootDocV2());\n\n // Create the input mermaid.graph\n const g = new graphlib.Graph({\n multigraph: true,\n compound: true,\n })\n .setGraph({\n rankdir: getDir(diag.db.getRootDocV2()),\n nodesep: nodeSpacing,\n ranksep: rankSpacing,\n marginx: 8,\n marginy: 8,\n })\n .setDefaultEdgeLabel(function () {\n return {};\n });\n\n setupNode(g, undefined, diag.db.getRootDocV2(), true);\n\n // Set up an SVG group so that we can translate the final graph.\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n const svg = root.select(`[id=\"${id}\"]`);\n\n // Run the renderer. This is what draws the final graph.\n\n const element = root.select('#' + id + ' g');\n render(element, g, ['barb'], 'statediagram', id);\n\n const padding = 8;\n\n const bounds = svg.node().getBBox();\n\n const width = bounds.width + padding * 2;\n const height = bounds.height + padding * 2;\n\n // Zoom in a bit\n svg.attr('class', 'statediagram');\n\n const svgBounds = svg.node().getBBox();\n\n configureSvgSize(svg, height, width, conf.useMaxWidth);\n\n // Ensure the viewBox includes the whole svgBounds area with extra space for padding\n const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`;\n log.debug(`viewBox ${vBox}`);\n svg.attr('viewBox', vBox);\n\n // Add label rects for non html labels\n // if (!evaluate(conf.htmlLabels) || true) {\n const labels = document.querySelectorAll('[id=\"' + id + '\"] .edgeLabel .label');\n for (let k = 0; k < labels.length; k++) {\n const label = labels[k];\n\n // Get dimensions of label\n const dim = label.getBBox();\n\n const rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect');\n rect.setAttribute('rx', 0);\n rect.setAttribute('ry', 0);\n rect.setAttribute('width', dim.width);\n rect.setAttribute('height', dim.height);\n\n label.insertBefore(rect, label.firstChild);\n // }\n }\n addSVGAccessibilityFields(diag.db, svg, id);\n};\n\nexport default {\n setConf,\n getClasses,\n draw,\n};\n","/** mermaid\n * https://mermaidjs.github.io/\n * (c) 2015 Knut Sveidqvist\n * MIT license.\n */\n%lex\n%options case-insensitive\n%x acc_title\n%x acc_descr\n%x acc_descr_multiline\n\n// Directive states\n%x open_directive type_directive arg_directive\n\n\n%%\n\n\\%\\%\\{ { this.begin('open_directive'); return 'open_directive'; }\n<open_directive>((?:(?!\\}\\%\\%)[^:.])*) { this.begin('type_directive'); return 'type_directive'; }\n<type_directive>\":\" { this.popState(); this.begin('arg_directive'); return ':'; }\n<type_directive,arg_directive>\\}\\%\\% { this.popState(); this.popState(); return 'close_directive'; }\n<arg_directive>((?:(?!\\}\\%\\%).|\\n)*) return 'arg_directive';\n\\%%(?!\\{)[^\\n]* /* skip comments */\n[^\\}]\\%\\%[^\\n]* /* skip comments */\n[\\n]+ return 'NEWLINE';\n\\s+ /* skip whitespace */\n\\#[^\\n]* /* skip comments */\n\n\"journey\" return 'journey';\n\"title\"\\s[^#\\n;]+ return 'title';\naccTitle\\s*\":\"\\s* { this.begin(\"acc_title\");return 'acc_title'; }\n<acc_title>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_title_value\"; }\naccDescr\\s*\":\"\\s* { this.begin(\"acc_descr\");return 'acc_descr'; }\n<acc_descr>(?!\\n|;|#)*[^\\n]* { this.popState(); return \"acc_descr_value\"; }\naccDescr\\s*\"{\"\\s* { this.begin(\"acc_descr_multiline\");}\n<acc_descr_multiline>[\\}] { this.popState(); }\n<acc_descr_multiline>[^\\}]* return \"acc_descr_multiline_value\";\n\"section\"\\s[^#:\\n;]+ return 'section';\n[^#:\\n;]+ return 'taskName';\n\":\"[^#\\n;]+ return 'taskData';\n\":\" return ':';\n<<EOF>> return 'EOF';\n. return 'INVALID';\n\n/lex\n\n%left '^'\n\n%start start\n\n%% /* language grammar */\n\nstart\n\t: journey document 'EOF' { return $2; }\n\t| directive start\n\t;\n\ndocument\n\t: /* empty */ { $$ = [] }\n\t| document line {$1.push($2);$$ = $1}\n\t;\n\nline\n\t: SPACE statement { $$ = $2 }\n\t| statement { $$ = $1 }\n\t| NEWLINE { $$=[];}\n\t| EOF { $$=[];}\n\t;\n\ndirective\n : openDirective typeDirective closeDirective 'NEWLINE'\n | openDirective typeDirective ':' argDirective closeDirective 'NEWLINE'\n ;\n\nstatement\n : title {yy.setDiagramTitle($1.substr(6));$$=$1.substr(6);}\n | acc_title acc_title_value { $$=$2.trim();yy.setAccTitle($$); }\n | acc_descr acc_descr_value { $$=$2.trim();yy.setAccDescription($$); }\n | acc_descr_multiline_value { $$=$1.trim();yy.setAccDescription($$); }\n | section {yy.addSection($1.substr(8));$$=$1.substr(8);}\n | taskName taskData {yy.addTask($1, $2);$$='task';}\n | directive\n ;\n\nopenDirective\n : open_directive { yy.parseDirective('%%{', 'open_directive'); }\n ;\n\ntypeDirective\n : type_directive { yy.parseDirective($1, 'type_directive'); }\n ;\n\nargDirective\n : arg_directive { $1 = $1.trim().replace(/'/g, '\"'); yy.parseDirective($1, 'arg_directive'); }\n ;\n\ncloseDirective\n : close_directive { yy.parseDirective('}%%', 'close_directive', 'journey'); }\n ;\n\n%%\n","import type { DiagramDetector } from '../../diagram-api/types';\n\nexport const journeyDetector: DiagramDetector = (txt) => {\n return txt.match(/^\\s*journey/) !== null;\n};\n","import mermaidAPI from '../../mermaidAPI';\nimport * as configApi from '../../config';\nimport {\n setAccTitle,\n getAccTitle,\n setDiagramTitle,\n getDiagramTitle,\n getAccDescription,\n setAccDescription,\n clear as commonClear,\n} from '../../commonDb';\n\nlet currentSection = '';\n\nconst sections = [];\nconst tasks = [];\nconst rawTasks = [];\n\nexport const parseDirective = function (statement, context, type) {\n mermaidAPI.parseDirective(this, statement, context, type);\n};\n\nexport const clear = function () {\n sections.length = 0;\n tasks.length = 0;\n currentSection = '';\n rawTasks.length = 0;\n commonClear();\n};\n\nexport const addSection = function (txt) {\n currentSection = txt;\n sections.push(txt);\n};\n\nexport const getSections = function () {\n return sections;\n};\n\nexport const getTasks = function () {\n let allItemsProcessed = compileTasks();\n const maxDepth = 100;\n let iterationCount = 0;\n while (!allItemsProcessed && iterationCount < maxDepth) {\n allItemsProcessed = compileTasks();\n iterationCount++;\n }\n\n tasks.push(...rawTasks);\n\n return tasks;\n};\n\nconst updateActors = function () {\n const tempActors = [];\n tasks.forEach((task) => {\n if (task.people) {\n tempActors.push(...task.people);\n }\n });\n\n const unique = new Set(tempActors);\n return [...unique].sort();\n};\n\nexport const addTask = function (descr, taskData) {\n const pieces = taskData.substr(1).split(':');\n\n let score = 0;\n let peeps = [];\n if (pieces.length === 1) {\n score = Number(pieces[0]);\n peeps = [];\n } else {\n score = Number(pieces[0]);\n peeps = pieces[1].split(',');\n }\n const peopleList = peeps.map((s) => s.trim());\n\n const rawTask = {\n section: currentSection,\n type: currentSection,\n people: peopleList,\n task: descr,\n score,\n };\n\n rawTasks.push(rawTask);\n};\n\nexport const addTaskOrg = function (descr) {\n const newTask = {\n section: currentSection,\n type: currentSection,\n description: descr,\n task: descr,\n classes: [],\n };\n tasks.push(newTask);\n};\n\nconst compileTasks = function () {\n const compileTask = function (pos) {\n return rawTasks[pos].processed;\n };\n\n let allProcessed = true;\n for (let i = 0; i < rawTasks.length; i++) {\n compileTask(i);\n\n allProcessed = allProcessed && rawTasks[i].processed;\n }\n return allProcessed;\n};\n\nconst getActors = function () {\n return updateActors();\n};\n\nexport default {\n parseDirective,\n getConfig: () => configApi.getConfig().journey,\n clear,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n getTasks,\n addTask,\n addTaskOrg,\n getActors,\n};\n","import { arc as d3arc } from 'd3';\n\nexport const drawRect = function (elem, rectData) {\n const rectElem = elem.append('rect');\n rectElem.attr('x', rectData.x);\n rectElem.attr('y', rectData.y);\n rectElem.attr('fill', rectData.fill);\n rectElem.attr('stroke', rectData.stroke);\n rectElem.attr('width', rectData.width);\n rectElem.attr('height', rectData.height);\n rectElem.attr('rx', rectData.rx);\n rectElem.attr('ry', rectData.ry);\n\n if (typeof rectData.class !== 'undefined') {\n rectElem.attr('class', rectData.class);\n }\n\n return rectElem;\n};\n\nexport const drawFace = function (element, faceData) {\n const radius = 15;\n const circleElement = element\n .append('circle')\n .attr('cx', faceData.cx)\n .attr('cy', faceData.cy)\n .attr('class', 'face')\n .attr('r', radius)\n .attr('stroke-width', 2)\n .attr('overflow', 'visible');\n\n const face = element.append('g');\n\n //left eye\n face\n .append('circle')\n .attr('cx', faceData.cx - radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n //right eye\n face\n .append('circle')\n .attr('cx', faceData.cx + radius / 3)\n .attr('cy', faceData.cy - radius / 3)\n .attr('r', 1.5)\n .attr('stroke-width', 2)\n .attr('fill', '#666')\n .attr('stroke', '#666');\n\n /** @param {any} face */\n function smile(face) {\n const arc = d3arc()\n .startAngle(Math.PI / 2)\n .endAngle(3 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 2) + ')');\n }\n\n /** @param {any} face */\n function sad(face) {\n const arc = d3arc()\n .startAngle((3 * Math.PI) / 2)\n .endAngle(5 * (Math.PI / 2))\n .innerRadius(radius / 2)\n .outerRadius(radius / 2.2);\n //mouth\n face\n .append('path')\n .attr('class', 'mouth')\n .attr('d', arc)\n .attr('transform', 'translate(' + faceData.cx + ',' + (faceData.cy + 7) + ')');\n }\n\n /** @param {any} face */\n function ambivalent(face) {\n face\n .append('line')\n .attr('class', 'mouth')\n .attr('stroke', 2)\n .attr('x1', faceData.cx - 5)\n .attr('y1', faceData.cy + 7)\n .attr('x2', faceData.cx + 5)\n .attr('y2', faceData.cy + 7)\n .attr('class', 'mouth')\n .attr('stroke-width', '1px')\n .attr('stroke', '#666');\n }\n\n if (faceData.score > 3) {\n smile(face);\n } else if (faceData.score < 3) {\n sad(face);\n } else {\n ambivalent(face);\n }\n\n return circleElement;\n};\n\nexport const drawCircle = function (element, circleData) {\n const circleElement = element.append('circle');\n circleElement.attr('cx', circleData.cx);\n circleElement.attr('cy', circleData.cy);\n circleElement.attr('class', 'actor-' + circleData.pos);\n circleElement.attr('fill', circleData.fill);\n circleElement.attr('stroke', circleData.stroke);\n circleElement.attr('r', circleData.r);\n\n if (typeof circleElement.class !== 'undefined') {\n circleElement.attr('class', circleElement.class);\n }\n\n if (typeof circleData.title !== 'undefined') {\n circleElement.append('title').text(circleData.title);\n }\n\n return circleElement;\n};\n\nexport const drawText = function (elem, textData) {\n // Remove and ignore br:s\n const nText = textData.text.replace(/<br\\s*\\/?>/gi, ' ');\n\n const textElem = elem.append('text');\n textElem.attr('x', textData.x);\n textElem.attr('y', textData.y);\n textElem.attr('class', 'legend');\n\n textElem.style('text-anchor', textData.anchor);\n\n if (typeof textData.class !== 'undefined') {\n textElem.attr('class', textData.class);\n }\n\n const span = textElem.append('tspan');\n span.attr('x', textData.x + textData.textMargin * 2);\n span.text(nText);\n\n return textElem;\n};\n\nexport const drawLabel = function (elem, txtObject) {\n /**\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} cut\n */\n function genPoints(x, y, width, height, cut) {\n return (\n x +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n y +\n ' ' +\n (x + width) +\n ',' +\n (y + height - cut) +\n ' ' +\n (x + width - cut * 1.2) +\n ',' +\n (y + height) +\n ' ' +\n x +\n ',' +\n (y + height)\n );\n }\n const polygon = elem.append('polygon');\n polygon.attr('points', genPoints(txtObject.x, txtObject.y, 50, 20, 7));\n polygon.attr('class', 'labelBox');\n\n txtObject.y = txtObject.y + txtObject.labelMargin;\n txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;\n drawText(elem, txtObject);\n};\n\nexport const drawSection = function (elem, section, conf) {\n const g = elem.append('g');\n\n const rect = getNoteRect();\n rect.x = section.x;\n rect.y = section.y;\n rect.fill = section.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'journey-section section-type-' + section.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n _drawTextCandidateFunc(conf)(\n section.text,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'journey-section section-type-' + section.num },\n conf,\n section.colour\n );\n};\n\nlet taskCount = -1;\n/**\n * Draws an actor in the diagram with the attaced line\n *\n * @param {any} elem The HTML element\n * @param {any} task The task to render\n * @param {any} conf The global configuration\n */\nexport const drawTask = function (elem, task, conf) {\n const center = task.x + conf.width / 2;\n const g = elem.append('g');\n taskCount++;\n const maxHeight = 300 + 5 * 30;\n g.append('line')\n .attr('id', 'task' + taskCount)\n .attr('x1', center)\n .attr('y1', task.y)\n .attr('x2', center)\n .attr('y2', maxHeight)\n .attr('class', 'task-line')\n .attr('stroke-width', '1px')\n .attr('stroke-dasharray', '4 2')\n .attr('stroke', '#666');\n\n drawFace(g, {\n cx: center,\n cy: 300 + (5 - task.score) * 30,\n score: task.score,\n });\n\n const rect = getNoteRect();\n rect.x = task.x;\n rect.y = task.y;\n rect.fill = task.fill;\n rect.width = conf.width;\n rect.height = conf.height;\n rect.class = 'task task-type-' + task.num;\n rect.rx = 3;\n rect.ry = 3;\n drawRect(g, rect);\n\n let xPos = task.x + 14;\n task.people.forEach((person) => {\n const colour = task.actors[person].color;\n\n const circle = {\n cx: xPos,\n cy: task.y,\n r: 7,\n fill: colour,\n stroke: '#000',\n title: person,\n pos: task.actors[person].position,\n };\n\n drawCircle(g, circle);\n xPos += 10;\n });\n\n _drawTextCandidateFunc(conf)(\n task.task,\n g,\n rect.x,\n rect.y,\n rect.width,\n rect.height,\n { class: 'task' },\n conf,\n task.colour\n );\n};\n\n/**\n * Draws a background rectangle\n *\n * @param {any} elem The html element\n * @param {any} bounds The bounds of the drawing\n */\nexport const drawBackgroundRect = function (elem, bounds) {\n const rectElem = drawRect(elem, {\n x: bounds.startx,\n y: bounds.starty,\n width: bounds.stopx - bounds.startx,\n height: bounds.stopy - bounds.starty,\n fill: bounds.fill,\n class: 'rect',\n });\n rectElem.lower();\n};\n\nexport const getTextObj = function () {\n return {\n x: 0,\n y: 0,\n fill: undefined,\n 'text-anchor': 'start',\n width: 100,\n height: 100,\n textMargin: 0,\n rx: 0,\n ry: 0,\n };\n};\n\nexport const getNoteRect = function () {\n return {\n x: 0,\n y: 0,\n width: 100,\n anchor: 'start',\n height: 100,\n rx: 0,\n ry: 0,\n };\n};\n\nconst _drawTextCandidateFunc = (function () {\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} colour\n */\n function byText(content, g, x, y, width, height, textAttrs, colour) {\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y + height / 2 + 5)\n .style('font-color', colour)\n .style('text-anchor', 'middle')\n .text(content);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n * @param {any} colour\n */\n function byTspan(content, g, x, y, width, height, textAttrs, conf, colour) {\n const { taskFontSize, taskFontFamily } = conf;\n\n const lines = content.split(/<br\\s*\\/?>/gi);\n for (let i = 0; i < lines.length; i++) {\n const dy = i * taskFontSize - (taskFontSize * (lines.length - 1)) / 2;\n const text = g\n .append('text')\n .attr('x', x + width / 2)\n .attr('y', y)\n .attr('fill', colour)\n .style('text-anchor', 'middle')\n .style('font-size', taskFontSize)\n .style('font-family', taskFontFamily);\n text\n .append('tspan')\n .attr('x', x + width / 2)\n .attr('dy', dy)\n .text(lines[i]);\n\n text\n .attr('y', y + height / 2.0)\n .attr('dominant-baseline', 'central')\n .attr('alignment-baseline', 'central');\n\n _setTextAttrs(text, textAttrs);\n }\n }\n\n /**\n * @param {any} content\n * @param {any} g\n * @param {any} x\n * @param {any} y\n * @param {any} width\n * @param {any} height\n * @param {any} textAttrs\n * @param {any} conf\n */\n function byFo(content, g, x, y, width, height, textAttrs, conf) {\n const body = g.append('switch');\n const f = body\n .append('foreignObject')\n .attr('x', x)\n .attr('y', y)\n .attr('width', width)\n .attr('height', height)\n .attr('position', 'fixed');\n\n const text = f\n .append('xhtml:div')\n .style('display', 'table')\n .style('height', '100%')\n .style('width', '100%');\n\n text\n .append('div')\n .attr('class', 'label')\n .style('display', 'table-cell')\n .style('text-align', 'center')\n .style('vertical-align', 'middle')\n .text(content);\n\n byTspan(content, body, x, y, width, height, textAttrs, conf);\n _setTextAttrs(text, textAttrs);\n }\n\n /**\n * @param {any} toText\n * @param {any} fromTextAttrsDict\n */\n function _setTextAttrs(toText, fromTextAttrsDict) {\n for (const key in fromTextAttrsDict) {\n if (key in fromTextAttrsDict) {\n // noinspection JSUnfilteredForInLoop\n toText.attr(key, fromTextAttrsDict[key]);\n }\n }\n }\n\n return function (conf) {\n return conf.textPlacement === 'fo' ? byFo : conf.textPlacement === 'old' ? byText : byTspan;\n };\n})();\n\nconst initGraphics = function (graphics) {\n graphics\n .append('defs')\n .append('marker')\n .attr('id', 'arrowhead')\n .attr('refX', 5)\n .attr('refY', 2)\n .attr('markerWidth', 6)\n .attr('markerHeight', 4)\n .attr('orient', 'auto')\n .append('path')\n .attr('d', 'M 0,0 V 4 L6,2 Z'); // this is actual shape for arrowhead\n};\n\nexport default {\n drawRect,\n drawCircle,\n drawSection,\n drawText,\n drawLabel,\n drawTask,\n drawBackgroundRect,\n getTextObj,\n getNoteRect,\n initGraphics,\n};\n","// @ts-nocheck TODO: fix file\nimport { select } from 'd3';\nimport svgDraw from './svgDraw';\nimport { getConfig } from '../../config';\nimport { configureSvgSize } from '../../setupGraphViewbox';\nimport addSVGAccessibilityFields from '../../accessibility';\n\nexport const setConf = function (cnf) {\n const keys = Object.keys(cnf);\n\n keys.forEach(function (key) {\n conf[key] = cnf[key];\n });\n};\n\nconst actors = {};\n\n/** @param {any} diagram */\nfunction drawActorLegend(diagram) {\n const conf = getConfig().journey;\n // Draw the actors\n let yPos = 60;\n Object.keys(actors).forEach((person) => {\n const colour = actors[person].color;\n\n const circleData = {\n cx: 20,\n cy: yPos,\n r: 7,\n fill: colour,\n stroke: '#000',\n pos: actors[person].position,\n };\n svgDraw.drawCircle(diagram, circleData);\n\n const labelData = {\n x: 40,\n y: yPos + 7,\n fill: '#666',\n text: person,\n textMargin: conf.boxTextMargin | 5,\n };\n svgDraw.drawText(diagram, labelData);\n\n yPos += 20;\n });\n}\n// TODO: Cleanup?\nconst conf = getConfig().journey;\nconst LEFT_MARGIN = conf.leftMargin;\nexport const draw = function (text, id, version, diagObj) {\n const conf = getConfig().journey;\n diagObj.db.clear();\n diagObj.parser.parse(text + '\\n');\n\n const securityLevel = getConfig().securityLevel;\n // Handle root and Document for when rendering in sanbox mode\n let sandboxElement;\n if (securityLevel === 'sandbox') {\n sandboxElement = select('#i' + id);\n }\n const root =\n securityLevel === 'sandbox'\n ? select(sandboxElement.nodes()[0].contentDocument.body)\n : select('body');\n // const doc = securityLevel === 'sandbox' ? sandboxElement.nodes()[0].contentDocument : document;\n\n bounds.init();\n const diagram = root.select('#' + id);\n\n svgDraw.initGraphics(diagram);\n\n const tasks = diagObj.db.getTasks();\n const title = diagObj.db.getDiagramTitle();\n\n const actorNames = diagObj.db.getActors();\n for (const member in actors) delete actors[member];\n let actorPos = 0;\n actorNames.forEach((actorName) => {\n actors[actorName] = {\n color: conf.actorColours[actorPos % conf.actorColours.length],\n position: actorPos,\n };\n actorPos++;\n });\n\n drawActorLegend(diagram);\n bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);\n drawTasks(diagram, tasks, 0);\n\n const box = bounds.getBounds();\n if (title) {\n diagram\n .append('text')\n .text(title)\n .attr('x', LEFT_MARGIN)\n .attr('font-size', '4ex')\n .attr('font-weight', 'bold')\n .attr('y', 25);\n }\n\n const height = box.stopy - box.starty + 2 * conf.diagramMarginY;\n const width = LEFT_MARGIN + box.stopx + 2 * conf.diagramMarginX;\n\n configureSvgSize(diagram, height, width, conf.useMaxWidth);\n\n // Draw activity line\n diagram\n .append('line')\n .attr('x1', LEFT_MARGIN)\n .attr('y1', conf.height * 4) // One section head + one task + margins\n .attr('x2', width - LEFT_MARGIN - 4) // Subtract stroke width so arrow point is retained\n .attr('y2', conf.height * 4)\n .attr('stroke-width', 4)\n .attr('stroke', 'black')\n .attr('marker-end', 'url(#arrowhead)');\n\n const extraVertForTitle = title ? 70 : 0;\n diagram.attr('viewBox', `${box.startx} -25 ${width} ${height + extraVertForTitle}`);\n diagram.attr('preserveAspectRatio', 'xMinYMin meet');\n diagram.attr('height', height + extraVertForTitle + 25);\n\n addSVGAccessibilityFields(diagObj.db, diagram, id);\n};\n\nexport const bounds = {\n data: {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n },\n verticalPos: 0,\n\n sequenceItems: [],\n init: function () {\n this.sequenceItems = [];\n this.data = {\n startx: undefined,\n stopx: undefined,\n starty: undefined,\n stopy: undefined,\n };\n this.verticalPos = 0;\n },\n updateVal: function (obj, key, val, fun) {\n if (typeof obj[key] === 'undefined') {\n obj[key] = val;\n } else {\n obj[key] = fun(val, obj[key]);\n }\n },\n updateBounds: function (startx, starty, stopx, stopy) {\n const conf = getConfig().journey;\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const _self = this;\n let cnt = 0;\n /** @param {any} type */\n function updateFn(type) {\n return function updateItemBounds(item) {\n cnt++;\n // The loop sequenceItems is a stack so the biggest margins in the beginning of the sequenceItems\n const n = _self.sequenceItems.length - cnt + 1;\n _self.updateVal(item, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopy', stopy + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n if (!(type === 'activation')) {\n _self.updateVal(item, 'startx', startx - n * conf.boxMargin, Math.min);\n _self.updateVal(item, 'stopx', stopx + n * conf.boxMargin, Math.max);\n\n _self.updateVal(bounds.data, 'starty', starty - n * conf.boxMargin, Math.min);\n _self.updateVal(bounds.data, 'stopy', stopy + n * conf.boxMargin, Math.max);\n }\n };\n }\n\n this.sequenceItems.forEach(updateFn());\n },\n insert: function (startx, starty, stopx, stopy) {\n const _startx = Math.min(startx, stopx);\n const _stopx = Math.max(startx, stopx);\n const _starty = Math.min(starty, stopy);\n const _stopy = Math.max(starty, stopy);\n\n this.updateVal(bounds.data, 'startx', _startx, Math.min);\n this.updateVal(bounds.data, 'starty', _starty, Math.min);\n this.updateVal(bounds.data, 'stopx', _stopx, Math.max);\n this.updateVal(bounds.data, 'stopy', _stopy, Math.max);\n\n this.updateBounds(_startx, _starty, _stopx, _stopy);\n },\n bumpVerticalPos: function (bump) {\n this.verticalPos = this.verticalPos + bump;\n this.data.stopy = this.verticalPos;\n },\n getVerticalPos: function () {\n return this.verticalPos;\n },\n getBounds: function () {\n return this.data;\n },\n};\n\nconst fills = conf.sectionFills;\nconst textColours = conf.sectionColours;\n\nexport const drawTasks = function (diagram, tasks, verticalPos) {\n const conf = getConfig().journey;\n let lastSection = '';\n const sectionVHeight = conf.height * 2 + conf.diagramMarginY;\n const taskPos = verticalPos + sectionVHeight;\n\n let sectionNumber = 0;\n let fill = '#CCC';\n let colour = 'black';\n let num = 0;\n\n // Draw the tasks\n for (let i = 0; i < tasks.length; i++) {\n const task = tasks[i];\n if (lastSection !== task.section) {\n fill = fills[sectionNumber % fills.length];\n num = sectionNumber % fills.length;\n colour = textColours[sectionNumber % textColours.length];\n\n const section = {\n x: i * conf.taskMargin + i * conf.width + LEFT_MARGIN,\n y: 50,\n text: task.section,\n fill,\n num,\n colour,\n };\n\n svgDraw.drawSection(diagram, section, conf);\n lastSection = task.section;\n sectionNumber++;\n }\n\n // Collect the actors involved in the task\n const taskActors = task.people.reduce((acc, actorName) => {\n if (actors[actorName]) {\n acc[actorName] = actors[actorName];\n }\n\n return acc;\n }, {});\n\n // Add some rendering data to the object\n task.x = i * conf.taskMargin + i * conf.width + LEFT_MARGIN;\n task.y = taskPos;\n task.width = conf.diagramMarginX;\n task.height = conf.diagramMarginY;\n task.colour = colour;\n task.fill = fill;\n task.num = num;\n task.actors = taskActors;\n\n // Draw the box with the attached line\n svgDraw.drawTask(diagram, task, conf);\n bounds.insert(task.x, task.y, task.x + task.width + conf.taskMargin, 300 + 5 * 30); // stopy is the length of the descenders.\n }\n};\n\nexport default {\n setConf,\n draw,\n};\n","/** Created by knut on 14-12-11. */\nimport { select } from 'd3';\nimport { log } from '../../logger';\nimport { getErrorMessage } from '../../utils';\n\nlet conf = {};\n\n/**\n * Merges the value of `conf` with the passed `cnf`\n *\n * @param {object} cnf Config to merge\n */\nexport const setConf = function (cnf: any) {\n conf = { ...conf, ...cnf };\n};\n\n/**\n * Draws a an info picture in the tag with id: id based on the graph definition in text.\n *\n * @param text\n * @param {string} id The text for the error\n * @param {string} mermaidVersion The version\n */\nexport const draw = (text: string, id: string, mermaidVersion: string) => {\n try {\n log.debug('Renering svg for syntax error\\n');\n\n const svg = select('#' + id);\n\n const g = svg.append('g');\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z'\n );\n\n g.append('path')\n .attr('class', 'error-icon')\n .attr(\n 'd',\n 'm436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z'\n );\n\n g.append('text') // text label for the x axis\n .attr('class', 'error-text')\n .attr('x', 1440)\n .attr('y', 250)\n .attr('font-size', '150px')\n .style('text-anchor', 'middle')\n .text('Syntax error in graph');\n g.append('text') // text label for the x axis\n .attr('class', 'error-text')\n .attr('x', 1250)\n .attr('y', 400)\n .attr('font-size', '100px')\n .style('text-anchor', 'middle')\n .text('mermaid version ' + mermaidVersion);\n\n svg.attr('height', 100);\n svg.attr('width', 500);\n svg.attr('viewBox', '768 0 912 512');\n } catch (e) {\n log.error('Error while rendering info diagram');\n log.error(getErrorMessage(e));\n }\n};\n\nexport default {\n setConf,\n draw,\n};\n","import { registerDiagram } from './diagramAPI';\n\n// @ts-ignore: TODO Fix ts errors\nimport gitGraphParser from '../diagrams/git/parser/gitGraph';\nimport { gitGraphDetector } from '../diagrams/git/gitGraphDetector';\nimport gitGraphDb from '../diagrams/git/gitGraphAst';\nimport gitGraphRenderer from '../diagrams/git/gitGraphRenderer';\nimport gitGraphStyles from '../diagrams/git/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport c4Parser from '../diagrams/c4/parser/c4Diagram';\nimport { c4Detector } from '../diagrams/c4/c4Detector';\nimport c4Db from '../diagrams/c4/c4Db';\nimport c4Renderer from '../diagrams/c4/c4Renderer';\nimport c4Styles from '../diagrams/c4/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport classParser from '../diagrams/class/parser/classDiagram';\nimport { classDetector } from '../diagrams/class/classDetector';\nimport { classDetectorV2 } from '../diagrams/class/classDetector-V2';\nimport classDb from '../diagrams/class/classDb';\nimport classRenderer from '../diagrams/class/classRenderer';\nimport classRendererV2 from '../diagrams/class/classRenderer-v2';\nimport classStyles from '../diagrams/class/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport erParser from '../diagrams/er/parser/erDiagram';\nimport { erDetector } from '../diagrams/er/erDetector';\nimport erDb from '../diagrams/er/erDb';\nimport erRenderer from '../diagrams/er/erRenderer';\nimport erStyles from '../diagrams/er/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport flowParser from '../diagrams/flowchart/parser/flow';\nimport { flowDetector } from '../diagrams/flowchart/flowDetector';\nimport { flowDetectorV2 } from '../diagrams/flowchart/flowDetector-v2';\nimport flowDb from '../diagrams/flowchart/flowDb';\nimport flowRenderer from '../diagrams/flowchart/flowRenderer';\nimport flowRendererV2 from '../diagrams/flowchart/flowRenderer-v2';\nimport flowStyles from '../diagrams/flowchart/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport ganttParser from '../diagrams/gantt/parser/gantt';\nimport { ganttDetector } from '../diagrams/gantt/ganttDetector';\nimport ganttDb from '../diagrams/gantt/ganttDb';\nimport ganttRenderer from '../diagrams/gantt/ganttRenderer';\nimport ganttStyles from '../diagrams/gantt/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport infoParser from '../diagrams/info/parser/info';\nimport infoDb from '../diagrams/info/infoDb';\nimport infoRenderer from '../diagrams/info/infoRenderer';\nimport { infoDetector } from '../diagrams/info/infoDetector';\nimport infoStyles from '../diagrams/info/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport pieParser from '../diagrams/pie/parser/pie';\nimport { pieDetector } from '../diagrams/pie/pieDetector';\nimport pieDb from '../diagrams/pie/pieDb';\nimport pieRenderer from '../diagrams/pie/pieRenderer';\nimport pieStyles from '../diagrams/pie/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport requirementParser from '../diagrams/requirement/parser/requirementDiagram';\nimport { requirementDetector } from '../diagrams/requirement/requirementDetector';\nimport requirementDb from '../diagrams/requirement/requirementDb';\nimport requirementRenderer from '../diagrams/requirement/requirementRenderer';\nimport requirementStyles from '../diagrams/requirement/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport sequenceParser from '../diagrams/sequence/parser/sequenceDiagram';\nimport { sequenceDetector } from '../diagrams/sequence/sequenceDetector';\nimport sequenceDb from '../diagrams/sequence/sequenceDb';\nimport sequenceRenderer from '../diagrams/sequence/sequenceRenderer';\nimport sequenceStyles from '../diagrams/sequence/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport stateParser from '../diagrams/state/parser/stateDiagram';\nimport { stateDetector } from '../diagrams/state/stateDetector';\nimport { stateDetectorV2 } from '../diagrams/state/stateDetector-V2';\nimport stateDb from '../diagrams/state/stateDb';\nimport stateRenderer from '../diagrams/state/stateRenderer';\nimport stateRendererV2 from '../diagrams/state/stateRenderer-v2';\nimport stateStyles from '../diagrams/state/styles';\n\n// @ts-ignore: TODO Fix ts errors\nimport journeyParser from '../diagrams/user-journey/parser/journey';\nimport { journeyDetector } from '../diagrams/user-journey/journeyDetector';\nimport journeyDb from '../diagrams/user-journey/journeyDb';\nimport journeyRenderer from '../diagrams/user-journey/journeyRenderer';\nimport journeyStyles from '../diagrams/user-journey/styles';\nimport { setConfig } from '../config';\n\nimport errorRenderer from '../diagrams/error/errorRenderer';\nimport errorStyles from '../diagrams/error/styles';\n\nlet hasLoadedDiagrams = false;\nexport const addDiagrams = () => {\n if (hasLoadedDiagrams) {\n return;\n }\n // This is added here to avoid race-conditions.\n // We could optimize the loading logic somehow.\n hasLoadedDiagrams = true;\n registerDiagram(\n 'error',\n // Special diagram with error messages but setup as a regular diagram\n {\n db: {\n clear: () => {\n // Quite ok, clear needs to be there for error to work as a regular diagram\n },\n },\n styles: errorStyles,\n renderer: errorRenderer,\n parser: {\n parser: { yy: {} },\n parse: () => {\n // no op\n },\n },\n init: () => {\n // no op\n },\n },\n (text) => text.toLowerCase().trim() === 'error'\n );\n\n registerDiagram(\n 'c4',\n {\n parser: c4Parser,\n db: c4Db,\n renderer: c4Renderer,\n styles: c4Styles,\n init: (cnf) => {\n c4Renderer.setConf(cnf.c4);\n },\n },\n c4Detector\n );\n registerDiagram(\n 'class',\n {\n parser: classParser,\n db: classDb,\n renderer: classRenderer,\n styles: classStyles,\n init: (cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n classDb.clear();\n },\n },\n classDetector\n );\n registerDiagram(\n 'classDiagram',\n {\n parser: classParser,\n db: classDb,\n renderer: classRendererV2,\n styles: classStyles,\n init: (cnf) => {\n if (!cnf.class) {\n cnf.class = {};\n }\n cnf.class.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n classDb.clear();\n },\n },\n classDetectorV2\n );\n registerDiagram(\n 'er',\n {\n parser: erParser,\n db: erDb,\n renderer: erRenderer,\n styles: erStyles,\n },\n erDetector\n );\n registerDiagram(\n 'gantt',\n {\n parser: ganttParser,\n db: ganttDb,\n renderer: ganttRenderer,\n styles: ganttStyles,\n },\n ganttDetector\n );\n registerDiagram(\n 'info',\n {\n parser: infoParser,\n db: infoDb,\n renderer: infoRenderer,\n styles: infoStyles,\n },\n infoDetector\n );\n registerDiagram(\n 'pie',\n {\n parser: pieParser,\n db: pieDb,\n renderer: pieRenderer,\n styles: pieStyles,\n },\n pieDetector\n );\n registerDiagram(\n 'requirement',\n {\n parser: requirementParser,\n db: requirementDb,\n renderer: requirementRenderer,\n styles: requirementStyles,\n },\n requirementDetector\n );\n registerDiagram(\n 'sequence',\n {\n parser: sequenceParser,\n db: sequenceDb,\n renderer: sequenceRenderer,\n styles: sequenceStyles,\n init: (cnf) => {\n if (!cnf.sequence) {\n cnf.sequence = {};\n }\n cnf.sequence.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n if ('sequenceDiagram' in cnf) {\n throw new Error(\n '`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.'\n );\n }\n sequenceDb.setWrap(cnf.wrap);\n sequenceRenderer.setConf(cnf.sequence);\n },\n },\n sequenceDetector\n );\n registerDiagram(\n 'state',\n {\n parser: stateParser,\n db: stateDb,\n renderer: stateRenderer,\n styles: stateStyles,\n init: (cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n stateDb.clear();\n },\n },\n stateDetector\n );\n registerDiagram(\n 'stateDiagram',\n {\n parser: stateParser,\n db: stateDb,\n renderer: stateRendererV2,\n styles: stateStyles,\n init: (cnf) => {\n if (!cnf.state) {\n cnf.state = {};\n }\n cnf.state.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n stateDb.clear();\n },\n },\n stateDetectorV2\n );\n registerDiagram(\n 'journey',\n {\n parser: journeyParser,\n db: journeyDb,\n renderer: journeyRenderer,\n styles: journeyStyles,\n init: (cnf) => {\n journeyRenderer.setConf(cnf.journey);\n journeyDb.clear();\n },\n },\n journeyDetector\n );\n\n registerDiagram(\n 'flowchart',\n {\n parser: flowParser,\n db: flowDb,\n renderer: flowRendererV2,\n styles: flowStyles,\n init: (cnf) => {\n if (!cnf.flowchart) {\n cnf.flowchart = {};\n }\n // TODO, broken as of 2022-09-14 (13809b50251845475e6dca65cc395761be38fbd2)\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n flowRenderer.setConf(cnf.flowchart);\n flowDb.clear();\n flowDb.setGen('gen-1');\n },\n },\n flowDetector\n );\n registerDiagram(\n 'flowchart-v2',\n {\n parser: flowParser,\n db: flowDb,\n renderer: flowRendererV2,\n styles: flowStyles,\n init: (cnf) => {\n if (!cnf.flowchart) {\n cnf.flowchart = {};\n }\n cnf.flowchart.arrowMarkerAbsolute = cnf.arrowMarkerAbsolute;\n // flowchart-v2 uses dagre-wrapper, which doesn't have access to flowchart cnf\n setConfig({ flowchart: { arrowMarkerAbsolute: cnf.arrowMarkerAbsolute } });\n flowRendererV2.setConf(cnf.flowchart);\n flowDb.clear();\n flowDb.setGen('gen-2');\n },\n },\n flowDetectorV2\n );\n registerDiagram(\n 'gitGraph',\n { parser: gitGraphParser, db: gitGraphDb, renderer: gitGraphRenderer, styles: gitGraphStyles },\n gitGraphDetector\n );\n};\n","import * as configApi from './config';\nimport { log } from './logger';\nimport { DiagramNotFoundError, getDiagram, registerDiagram } from './diagram-api/diagramAPI';\nimport { detectType, getDiagramLoader } from './diagram-api/detectType';\nimport { isDetailedError } from './utils';\nexport class Diagram {\n type = 'graph';\n parser;\n renderer;\n db;\n private detectTypeFailed = false;\n // eslint-disable-next-line @typescript-eslint/ban-types\n constructor(public txt: string, parseError?: Function) {\n const cnf = configApi.getConfig();\n this.txt = txt;\n try {\n this.type = detectType(txt, cnf);\n } catch (e) {\n this.handleError(e, parseError);\n this.type = 'error';\n this.detectTypeFailed = true;\n }\n const diagram = getDiagram(this.type);\n log.debug('Type ' + this.type);\n // Setup diagram\n this.db = diagram.db;\n this.db.clear?.();\n this.renderer = diagram.renderer;\n this.parser = diagram.parser;\n this.parser.parser.yy = this.db;\n if (diagram.init) {\n diagram.init(cnf);\n log.debug('Initialized diagram ' + this.type, cnf);\n }\n this.txt += '\\n';\n\n this.parse(this.txt, parseError);\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n parse(text: string, parseError?: Function): boolean {\n if (this.detectTypeFailed) {\n return false;\n }\n try {\n text = text + '\\n';\n this.db.clear();\n this.parser.parse(text);\n return true;\n } catch (error) {\n this.handleError(error, parseError);\n }\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n handleError(error: unknown, parseError?: Function) {\n // Is this the correct way to access mermiad's parseError()\n // method ? (or global.mermaid.parseError()) ?\n if (parseError) {\n if (isDetailedError(error)) {\n // handle case where error string and hash were\n // wrapped in object like`const error = { str, hash };`\n parseError(error.str, error.hash);\n } else {\n // assume it is just error string and pass it on\n parseError(error);\n }\n } else {\n // No mermaid.parseError() handler defined, so re-throw it\n throw error;\n }\n }\n\n getParser() {\n return this.parser;\n }\n\n getType() {\n return this.type;\n }\n}\n\nexport const getDiagramFromText = (\n txt: string,\n // eslint-disable-next-line @typescript-eslint/ban-types\n parseError?: Function\n): Diagram | Promise<Diagram> => {\n const type = detectType(txt, configApi.getConfig());\n try {\n // Trying to find the diagram\n getDiagram(type);\n return new Diagram(txt, parseError);\n } catch (error) {\n if (!(error instanceof DiagramNotFoundError)) {\n log.error(error);\n throw error;\n }\n const loader = getDiagramLoader(type);\n if (!loader) {\n throw new Error(`Loader for ${type} not found.`);\n }\n // TODO: Uncomment for v10\n // // Diagram not available, loading it\n // const { diagram } = await loader();\n // registerDiagram(type, diagram, undefined, diagram.injectUtils);\n // // new diagram will try getDiagram again and if fails then it is a valid throw\n return loader().then(({ diagram }) => {\n registerDiagram(type, diagram, undefined, diagram.injectUtils);\n return new Diagram(txt, parseError);\n });\n }\n // return new Diagram(txt, parseError);\n};\n\nexport default Diagram;\n","/**\n * This is the API to be used when optionally handling the integration with the web page, instead of\n * using the default integration provided by mermaid.js.\n *\n * The core of this api is the [**render**](Setup.md?id=render) function which, given a graph\n * definition as text, renders the graph/diagram and returns an svg element for the graph.\n *\n * It is then up to the user of the API to make use of the svg, either insert it somewhere in the\n * page or do something completely different.\n *\n * In addition to the render function, a number of behavioral configuration options are available.\n *\n * @name mermaidAPI\n */\nimport { select } from 'd3';\nimport { compile, serialize, stringify } from 'stylis';\n// @ts-ignore: TODO Fix ts errors\nimport pkg from '../package.json';\nimport * as configApi from './config';\nimport { addDiagrams } from './diagram-api/diagram-orchestration';\nimport classDb from './diagrams/class/classDb';\nimport flowDb from './diagrams/flowchart/flowDb';\nimport flowRenderer from './diagrams/flowchart/flowRenderer';\nimport ganttDb from './diagrams/gantt/ganttDb';\nimport Diagram, { getDiagramFromText } from './Diagram';\nimport errorRenderer from './diagrams/error/errorRenderer';\nimport { attachFunctions } from './interactionDb';\nimport { log, setLogLevel } from './logger';\nimport getStyles from './styles';\nimport theme from './themes';\nimport utils, { directiveSanitizer } from './utils';\nimport DOMPurify from 'dompurify';\nimport { MermaidConfig } from './config.type';\nimport { evaluate } from './diagrams/common/common';\n\n/**\n * @param text\n * @param parseError\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction parse(text: string, parseError?: Function): boolean {\n addDiagrams();\n const diagram = new Diagram(text, parseError);\n return diagram.parse(text, parseError);\n}\n\n/**\n *\n * @param text\n * @param parseError\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nasync function parseAsync(text: string, parseError?: Function): Promise<boolean> {\n addDiagrams();\n const diagram = await getDiagramFromText(text, parseError);\n return diagram.parse(text, parseError);\n}\n\nexport const encodeEntities = function (text: string): string {\n let txt = text;\n\n txt = txt.replace(/style.*:\\S*#.*;/g, function (s) {\n const innerTxt = s.substring(0, s.length - 1);\n return innerTxt;\n });\n txt = txt.replace(/classDef.*:\\S*#.*;/g, function (s) {\n const innerTxt = s.substring(0, s.length - 1);\n return innerTxt;\n });\n\n txt = txt.replace(/#\\w+;/g, function (s) {\n const innerTxt = s.substring(1, s.length - 1);\n\n const isInt = /^\\+?\\d+$/.test(innerTxt);\n if (isInt) {\n return 'fl°°' + innerTxt + '¶ß';\n } else {\n return 'fl°' + innerTxt + '¶ß';\n }\n });\n\n return txt;\n};\n\nexport const decodeEntities = function (text: string): string {\n let txt = text;\n\n txt = txt.replace(/fl°°/g, function () {\n return '&#';\n });\n txt = txt.replace(/fl°/g, function () {\n return '&';\n });\n txt = txt.replace(/¶ß/g, function () {\n return ';';\n });\n\n return txt;\n};\n/**\n * Function that renders an svg with a graph from a chart definition. Usage example below.\n *\n * ```javascript\n * mermaidAPI.initialize({\n * startOnLoad: true,\n * });\n * $(function () {\n * const graphDefinition = 'graph TB\\na-->b';\n * const cb = function (svgGraph) {\n * console.log(svgGraph);\n * };\n * mermaidAPI.render('id1', graphDefinition, cb);\n * });\n * ```\n *\n * @param {string} id The id of the element to be rendered\n * @param {string} text The graph definition\n * @param {(svgCode: string, bindFunctions?: (element: Element) => void) => void} cb Callback which\n * is called after rendering is finished with the svg code as inparam.\n * @param {Element} container Selector to element in which a div with the graph temporarily will be\n * inserted. If one is provided a hidden div will be inserted in the body of the page instead. The\n * element will be removed when rendering is completed.\n * @returns {void}\n */\nconst render = function (\n id: string,\n text: string,\n cb: (svgCode: string, bindFunctions?: (element: Element) => void) => void,\n container?: Element\n): void {\n addDiagrams();\n configApi.reset();\n text = text.replace(/\\r\\n?/g, '\\n'); // parser problems on CRLF ignore all CR and leave LF;;\n const graphInit = utils.detectInit(text);\n if (graphInit) {\n directiveSanitizer(graphInit);\n configApi.addDirective(graphInit);\n }\n const cnf = configApi.getConfig();\n\n log.debug(cnf);\n\n // Check the maximum allowed text size\n if (text.length > cnf.maxTextSize!) {\n text = 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';\n }\n\n let root: any = select('body');\n\n // In regular execution the container will be the div with a mermaid class\n if (typeof container !== 'undefined') {\n // A container was provided by the caller\n if (container) {\n container.innerHTML = '';\n }\n\n if (cnf.securityLevel === 'sandbox') {\n // IF we are in sandboxed mode, we do everyting mermaid related\n // in a sandboxed div\n const iframe = select(container)\n .append('iframe')\n .attr('id', 'i' + id)\n .attr('style', 'width: 100%; height: 100%;')\n .attr('sandbox', '');\n // const iframeBody = ;\n root = select(iframe.nodes()[0]!.contentDocument!.body);\n root.node().style.margin = 0;\n } else {\n root = select(container);\n }\n\n root\n .append('div')\n .attr('id', 'd' + id)\n .attr('style', 'font-family: ' + cnf.fontFamily)\n .append('svg')\n .attr('id', id)\n .attr('width', '100%')\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .attr('xmlns:xlink', 'http://www.w3.org/1999/xlink')\n .append('g');\n } else {\n // No container was provided\n // If there is an existing element with the id, we remove it\n // this likely a previously rendered diagram\n const existingSvg = document.getElementById(id);\n if (existingSvg) {\n existingSvg.remove();\n }\n\n // Remove previous tpm element if it exists\n let element;\n if (cnf.securityLevel === 'sandbox') {\n element = document.querySelector('#i' + id);\n } else {\n element = document.querySelector('#d' + id);\n }\n\n if (element) {\n element.remove();\n }\n\n // Add the tmp div used for rendering with the id `d${id}`\n // d+id it will contain a svg with the id \"id\"\n\n if (cnf.securityLevel === 'sandbox') {\n // IF we are in sandboxed mode, we do everyting mermaid related\n // in a sandboxed div\n const iframe = select('body')\n .append('iframe')\n .attr('id', 'i' + id)\n .attr('style', 'width: 100%; height: 100%;')\n .attr('sandbox', '');\n\n root = select(iframe.nodes()[0]!.contentDocument!.body);\n root.node().style.margin = 0;\n } else {\n root = select('body');\n }\n\n // This is the temporary div\n root\n .append('div')\n .attr('id', 'd' + id)\n // this is the seed of the svg to be rendered\n .append('svg')\n .attr('id', id)\n .attr('width', '100%')\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .append('g');\n }\n\n text = encodeEntities(text);\n\n // Important that we do not create the diagram until after the directives have been included\n let diag;\n let parseEncounteredException;\n try {\n // diag = new Diagram(text);\n diag = getDiagramFromText(text);\n if ('then' in diag) {\n throw new Error('Diagram is a promise');\n }\n } catch (error) {\n diag = new Diagram('error');\n parseEncounteredException = error;\n }\n // Get the tmp element containing the the svg\n const element = root.select('#d' + id).node();\n const graphType = diag.type;\n\n // insert inline style into svg\n const svg = element.firstChild;\n const firstChild = svg.firstChild;\n\n let userStyles = '';\n // user provided theme CSS\n // If you add more configuration driven data into the user styles make sure that the value is\n // sanitized bye the santiizeCSS function\n if (cnf.themeCSS !== undefined) {\n userStyles += `\\n${cnf.themeCSS}`;\n }\n // user provided theme CSS\n if (cnf.fontFamily !== undefined) {\n userStyles += `\\n:root { --mermaid-font-family: ${cnf.fontFamily}}`;\n }\n // user provided theme CSS\n if (cnf.altFontFamily !== undefined) {\n userStyles += `\\n:root { --mermaid-alt-font-family: ${cnf.altFontFamily}}`;\n }\n\n // classDef\n if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {\n const classes: any = flowRenderer.getClasses(text, diag);\n const htmlLabels = cnf.htmlLabels || cnf.flowchart?.htmlLabels;\n for (const className in classes) {\n if (htmlLabels) {\n userStyles += `\\n.${className} > * { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} span { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n } else {\n userStyles += `\\n.${className} path { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} rect { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} polygon { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} ellipse { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} circle { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n if (classes[className].textStyles) {\n userStyles += `\\n.${className} tspan { ${classes[className].textStyles.join(\n ' !important; '\n )} !important; }`;\n }\n }\n }\n }\n\n const stylis = (selector: string, styles: string) =>\n serialize(compile(`${selector}{${styles}}`), stringify);\n const rules = stylis(`#${id}`, getStyles(graphType, userStyles, cnf.themeVariables));\n\n const style1 = document.createElement('style');\n style1.innerHTML = `#${id} ` + rules;\n svg.insertBefore(style1, firstChild);\n\n try {\n diag.renderer.draw(text, id, pkg.version, diag);\n } catch (e) {\n errorRenderer.draw(text, id, pkg.version);\n throw e;\n }\n\n root\n .select(`[id=\"${id}\"]`)\n .selectAll('foreignobject > *')\n .attr('xmlns', 'http://www.w3.org/1999/xhtml');\n\n // Fix for when the base tag is used\n let svgCode = root.select('#d' + id).node().innerHTML;\n\n log.debug('cnf.arrowMarkerAbsolute', cnf.arrowMarkerAbsolute);\n if (!evaluate(cnf.arrowMarkerAbsolute) && cnf.securityLevel !== 'sandbox') {\n svgCode = svgCode.replace(/marker-end=\"url\\(.*?#/g, 'marker-end=\"url(#', 'g');\n }\n\n svgCode = decodeEntities(svgCode);\n\n // Fix for when the br tag is used\n svgCode = svgCode.replace(/<br>/g, '<br/>');\n\n if (cnf.securityLevel === 'sandbox') {\n const svgEl = root.select('#d' + id + ' svg').node();\n const width = '100%';\n let height = '100%';\n if (svgEl) {\n height = svgEl.viewBox.baseVal.height + 'px';\n }\n svgCode = `<iframe style=\"width:${width};height:${height};border:0;margin:0;\" src=\"data:text/html;base64,${btoa(\n '<body style=\"margin:0\">' + svgCode + '</body>'\n )}\" sandbox=\"allow-top-navigation-by-user-activation allow-popups\">\n The “iframe” tag is not supported by your browser.\n</iframe>`;\n } else {\n if (cnf.securityLevel !== 'loose') {\n svgCode = DOMPurify.sanitize(svgCode, {\n ADD_TAGS: ['foreignobject'],\n ADD_ATTR: ['dominant-baseline'],\n });\n }\n }\n\n if (typeof cb !== 'undefined') {\n switch (graphType) {\n case 'flowchart':\n case 'flowchart-v2':\n cb(svgCode, flowDb.bindFunctions);\n break;\n case 'gantt':\n cb(svgCode, ganttDb.bindFunctions);\n break;\n case 'class':\n case 'classDiagram':\n cb(svgCode, classDb.bindFunctions);\n break;\n default:\n cb(svgCode);\n }\n } else {\n log.debug('CB = undefined!');\n }\n attachFunctions();\n\n const tmpElementSelector = cnf.securityLevel === 'sandbox' ? '#i' + id : '#d' + id;\n const node = select(tmpElementSelector).node();\n if (node && 'remove' in node) {\n node.remove();\n }\n\n if (parseEncounteredException) {\n throw parseEncounteredException;\n }\n\n return svgCode;\n};\n\n/**\n * @deprecated This is an internal function and should not be used. Will be removed in v10.\n */\n\nconst renderAsync = async function (\n id: string,\n text: string,\n cb: (svgCode: string, bindFunctions?: (element: Element) => void) => void,\n container?: Element\n): Promise<void> {\n addDiagrams();\n configApi.reset();\n text = text.replace(/\\r\\n?/g, '\\n'); // parser problems on CRLF ignore all CR and leave LF;;\n const graphInit = utils.detectInit(text);\n if (graphInit) {\n directiveSanitizer(graphInit);\n configApi.addDirective(graphInit);\n }\n const cnf = configApi.getConfig();\n\n log.debug(cnf);\n\n // Check the maximum allowed text size\n if (text.length > cnf.maxTextSize!) {\n text = 'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';\n }\n\n let root: any = select('body');\n\n // In regular execution the container will be the div with a mermaid class\n if (typeof container !== 'undefined') {\n // A container was provided by the caller\n if (container) {\n container.innerHTML = '';\n }\n\n if (cnf.securityLevel === 'sandbox') {\n // IF we are in sandboxed mode, we do everyting mermaid related\n // in a sandboxed div\n const iframe = select(container)\n .append('iframe')\n .attr('id', 'i' + id)\n .attr('style', 'width: 100%; height: 100%;')\n .attr('sandbox', '');\n // const iframeBody = ;\n root = select(iframe.nodes()[0]!.contentDocument!.body);\n root.node().style.margin = 0;\n } else {\n root = select(container);\n }\n\n root\n .append('div')\n .attr('id', 'd' + id)\n .attr('style', 'font-family: ' + cnf.fontFamily)\n .append('svg')\n .attr('id', id)\n .attr('width', '100%')\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .attr('xmlns:xlink', 'http://www.w3.org/1999/xlink')\n .append('g');\n } else {\n // No container was provided\n // If there is an existing element with the id, we remove it\n // this likely a previously rendered diagram\n const existingSvg = document.getElementById(id);\n if (existingSvg) {\n existingSvg.remove();\n }\n\n // Remove previous tpm element if it exists\n let element;\n if (cnf.securityLevel === 'sandbox') {\n element = document.querySelector('#i' + id);\n } else {\n element = document.querySelector('#d' + id);\n }\n\n if (element) {\n element.remove();\n }\n\n // Add the tmp div used for rendering with the id `d${id}`\n // d+id it will contain a svg with the id \"id\"\n\n if (cnf.securityLevel === 'sandbox') {\n // IF we are in sandboxed mode, we do everyting mermaid related\n // in a sandboxed div\n const iframe = select('body')\n .append('iframe')\n .attr('id', 'i' + id)\n .attr('style', 'width: 100%; height: 100%;')\n .attr('sandbox', '');\n\n root = select(iframe.nodes()[0]!.contentDocument!.body);\n root.node().style.margin = 0;\n } else {\n root = select('body');\n }\n\n // This is the temporary div\n root\n .append('div')\n .attr('id', 'd' + id)\n // this is the seed of the svg to be rendered\n .append('svg')\n .attr('id', id)\n .attr('width', '100%')\n .attr('xmlns', 'http://www.w3.org/2000/svg')\n .append('g');\n }\n\n text = encodeEntities(text);\n\n // Important that we do not create the diagram until after the directives have been included\n let diag;\n let parseEncounteredException;\n try {\n // diag = new Diagram(text);\n diag = await getDiagramFromText(text);\n } catch (error) {\n diag = new Diagram('error');\n parseEncounteredException = error;\n }\n // Get the tmp element containing the the svg\n const element = root.select('#d' + id).node();\n const graphType = diag.type;\n\n // insert inline style into svg\n const svg = element.firstChild;\n const firstChild = svg.firstChild;\n\n let userStyles = '';\n // user provided theme CSS\n // If you add more configuration driven data into the user styles make sure that the value is\n // sanitized bye the santiizeCSS function\n if (cnf.themeCSS !== undefined) {\n userStyles += `\\n${cnf.themeCSS}`;\n }\n // user provided theme CSS\n if (cnf.fontFamily !== undefined) {\n userStyles += `\\n:root { --mermaid-font-family: ${cnf.fontFamily}}`;\n }\n // user provided theme CSS\n if (cnf.altFontFamily !== undefined) {\n userStyles += `\\n:root { --mermaid-alt-font-family: ${cnf.altFontFamily}}`;\n }\n\n // classDef\n if (graphType === 'flowchart' || graphType === 'flowchart-v2' || graphType === 'graph') {\n const classes: any = flowRenderer.getClasses(text, diag);\n const htmlLabels = cnf.htmlLabels || cnf.flowchart?.htmlLabels;\n for (const className in classes) {\n if (htmlLabels) {\n userStyles += `\\n.${className} > * { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} span { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n } else {\n userStyles += `\\n.${className} path { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} rect { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} polygon { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} ellipse { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n userStyles += `\\n.${className} circle { ${classes[className].styles.join(\n ' !important; '\n )} !important; }`;\n if (classes[className].textStyles) {\n userStyles += `\\n.${className} tspan { ${classes[className].textStyles.join(\n ' !important; '\n )} !important; }`;\n }\n }\n }\n }\n\n const stylis = (selector: string, styles: string) =>\n serialize(compile(`${selector}{${styles}}`), stringify);\n const rules = stylis(`#${id}`, getStyles(graphType, userStyles, cnf.themeVariables));\n\n const style1 = document.createElement('style');\n style1.innerHTML = `#${id} ` + rules;\n svg.insertBefore(style1, firstChild);\n\n try {\n await diag.renderer.draw(text, id, pkg.version, diag);\n } catch (e) {\n errorRenderer.draw(text, id, pkg.version);\n throw e;\n }\n\n root\n .select(`[id=\"${id}\"]`)\n .selectAll('foreignobject > *')\n .attr('xmlns', 'http://www.w3.org/1999/xhtml');\n\n // Fix for when the base tag is used\n let svgCode = root.select('#d' + id).node().innerHTML;\n\n log.debug('cnf.arrowMarkerAbsolute', cnf.arrowMarkerAbsolute);\n if (!evaluate(cnf.arrowMarkerAbsolute) && cnf.securityLevel !== 'sandbox') {\n svgCode = svgCode.replace(/marker-end=\"url\\(.*?#/g, 'marker-end=\"url(#', 'g');\n }\n\n svgCode = decodeEntities(svgCode);\n\n // Fix for when the br tag is used\n svgCode = svgCode.replace(/<br>/g, '<br/>');\n\n if (cnf.securityLevel === 'sandbox') {\n const svgEl = root.select('#d' + id + ' svg').node();\n const width = '100%';\n let height = '100%';\n if (svgEl) {\n height = svgEl.viewBox.baseVal.height + 'px';\n }\n svgCode = `<iframe style=\"width:${width};height:${height};border:0;margin:0;\" src=\"data:text/html;base64,${btoa(\n '<body style=\"margin:0\">' + svgCode + '</body>'\n )}\" sandbox=\"allow-top-navigation-by-user-activation allow-popups\">\n The “iframe” tag is not supported by your browser.\n</iframe>`;\n } else {\n if (cnf.securityLevel !== 'loose') {\n svgCode = DOMPurify.sanitize(svgCode, {\n ADD_TAGS: ['foreignobject'],\n ADD_ATTR: ['dominant-baseline'],\n });\n }\n }\n\n if (typeof cb !== 'undefined') {\n switch (graphType) {\n case 'flowchart':\n case 'flowchart-v2':\n cb(svgCode, flowDb.bindFunctions);\n break;\n case 'gantt':\n cb(svgCode, ganttDb.bindFunctions);\n break;\n case 'class':\n case 'classDiagram':\n cb(svgCode, classDb.bindFunctions);\n break;\n default:\n cb(svgCode);\n }\n } else {\n log.debug('CB = undefined!');\n }\n attachFunctions();\n\n const tmpElementSelector = cnf.securityLevel === 'sandbox' ? '#i' + id : '#d' + id;\n const node = select(tmpElementSelector).node();\n if (node && 'remove' in node) {\n node.remove();\n }\n\n if (parseEncounteredException) {\n throw parseEncounteredException;\n }\n\n return svgCode;\n};\n\nlet currentDirective: { type?: string; args?: any } | undefined = {};\n\nconst parseDirective = function (p: any, statement: string, context: string, type: string): void {\n try {\n if (statement !== undefined) {\n statement = statement.trim();\n switch (context) {\n case 'open_directive':\n currentDirective = {};\n break;\n case 'type_directive':\n if (!currentDirective) throw new Error('currentDirective is undefined');\n currentDirective.type = statement.toLowerCase();\n break;\n case 'arg_directive':\n if (!currentDirective) throw new Error('currentDirective is undefined');\n currentDirective.args = JSON.parse(statement);\n break;\n case 'close_directive':\n handleDirective(p, currentDirective, type);\n currentDirective = undefined;\n break;\n }\n }\n } catch (error) {\n log.error(\n `Error while rendering sequenceDiagram directive: ${statement} jison context: ${context}`\n );\n // @ts-ignore: TODO Fix ts errors\n log.error(error.message);\n }\n};\n\nconst handleDirective = function (p: any, directive: any, type: string): void {\n log.debug(`Directive type=${directive.type} with args:`, directive.args);\n switch (directive.type) {\n case 'init':\n case 'initialize': {\n ['config'].forEach((prop) => {\n if (typeof directive.args[prop] !== 'undefined') {\n if (type === 'flowchart-v2') {\n type = 'flowchart';\n }\n directive.args[type] = directive.args[prop];\n delete directive.args[prop];\n }\n });\n log.debug('sanitize in handleDirective', directive.args);\n directiveSanitizer(directive.args);\n log.debug('sanitize in handleDirective (done)', directive.args);\n configApi.addDirective(directive.args);\n break;\n }\n case 'wrap':\n case 'nowrap':\n if (p && p['setWrap']) {\n p.setWrap(directive.type === 'wrap');\n }\n break;\n case 'themeCss':\n log.warn('themeCss encountered');\n break;\n default:\n log.warn(\n `Unhandled directive: source: '%%{${directive.type}: ${JSON.stringify(\n directive.args ? directive.args : {}\n )}}%%`,\n directive\n );\n break;\n }\n};\n\n/** @param {MermaidConfig} options */\nfunction initialize(options: MermaidConfig = {}) {\n // Handle legacy location of font-family configuration\n if (options.fontFamily) {\n if (!options.themeVariables) {\n options.themeVariables = {};\n }\n options.themeVariables.fontFamily = options.fontFamily;\n }\n\n // Set default options\n configApi.saveConfigFromInitialize(options);\n\n if (options?.theme && options.theme in theme) {\n // Todo merge with user options\n options.themeVariables = theme[options.theme as keyof typeof theme].getThemeVariables(\n options.themeVariables\n );\n } else if (options) {\n options.themeVariables = theme.default.getThemeVariables(options.themeVariables);\n }\n\n const config =\n typeof options === 'object' ? configApi.setSiteConfig(options) : configApi.getSiteConfig();\n\n setLogLevel(config.logLevel);\n addDiagrams();\n}\n\nexport const mermaidAPI = Object.freeze({\n render,\n renderAsync,\n parse,\n parseAsync,\n parseDirective,\n initialize,\n getConfig: configApi.getConfig,\n setConfig: configApi.setConfig,\n getSiteConfig: configApi.getSiteConfig,\n updateSiteConfig: configApi.updateSiteConfig,\n reset: () => {\n configApi.reset();\n },\n globalReset: () => {\n configApi.reset(configApi.defaultConfig);\n },\n defaultConfig: configApi.defaultConfig,\n});\n\nsetLogLevel(configApi.getConfig().logLevel);\nconfigApi.reset(configApi.getConfig());\nexport default mermaidAPI;\n\n/**\n * ## mermaidAPI configuration defaults\n *\n * ```html\n * <script>\n * var config = {\n * theme: 'default',\n * logLevel: 'fatal',\n * securityLevel: 'strict',\n * startOnLoad: true,\n * arrowMarkerAbsolute: false,\n *\n * er: {\n * diagramPadding: 20,\n * layoutDirection: 'TB',\n * minEntityWidth: 100,\n * minEntityHeight: 75,\n * entityPadding: 15,\n * stroke: 'gray',\n * fill: 'honeydew',\n * fontSize: 12,\n * useMaxWidth: true,\n * },\n * flowchart: {\n * diagramPadding: 8,\n * htmlLabels: true,\n * curve: 'basis',\n * },\n * sequence: {\n * diagramMarginX: 50,\n * diagramMarginY: 10,\n * actorMargin: 50,\n * width: 150,\n * height: 65,\n * boxMargin: 10,\n * boxTextMargin: 5,\n * noteMargin: 10,\n * messageMargin: 35,\n * messageAlign: 'center',\n * mirrorActors: true,\n * bottomMarginAdj: 1,\n * useMaxWidth: true,\n * rightAngles: false,\n * showSequenceNumbers: false,\n * },\n * gantt: {\n * titleTopMargin: 25,\n * barHeight: 20,\n * barGap: 4,\n * topPadding: 50,\n * leftPadding: 75,\n * gridLineStartPadding: 35,\n * fontSize: 11,\n * fontFamily: '\"Open Sans\", sans-serif',\n * numberSectionStyles: 4,\n * axisFormat: '%Y-%m-%d',\n * topAxis: false,\n * },\n * };\n * mermaid.initialize(config);\n * </script>\n * ```\n */\n","/**\n * Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid\n * functionality and to render the diagrams to svg code!\n */\nimport type { MermaidConfig } from './config.type';\nimport { log } from './logger';\nimport utils from './utils';\nimport { mermaidAPI } from './mermaidAPI';\nimport { addDetector } from './diagram-api/detectType';\nimport { isDetailedError, type DetailedError } from './utils';\nimport { registerDiagram } from './diagram-api/diagramAPI';\n\nexport type { MermaidConfig, DetailedError };\n/**\n * ## init\n *\n * Function that goes through the document to find the chart definitions in there and render them.\n *\n * The function tags the processed attributes with the attribute data-processed and ignores found\n * elements with the attribute already set. This way the init function can be triggered several\n * times.\n *\n * Optionally, `init` can accept in the second argument one of the following:\n *\n * - A DOM Node\n * - An array of DOM nodes (as would come from a jQuery selector)\n * - A W3C selector, a la `.mermaid`\n *\n * ```mermaid\n * graph LR;\n * a(Find elements)-->b{Processed}\n * b-->|Yes|c(Leave element)\n * b-->|No |d(Transform)\n * ```\n *\n * Renders the mermaid diagrams\n *\n * @param config\n * @param nodes\n * @param callback\n */\nconst init = async function (\n config?: MermaidConfig,\n // eslint-disable-next-line no-undef\n nodes?: string | HTMLElement | NodeListOf<HTMLElement>,\n // eslint-disable-next-line @typescript-eslint/ban-types\n callback?: Function\n) {\n try {\n await initThrowsErrors(config, nodes, callback);\n } catch (e) {\n log.warn('Syntax Error rendering');\n if (isDetailedError(e)) {\n log.warn(e.str);\n }\n if (mermaid.parseError) {\n mermaid.parseError(e);\n }\n }\n};\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nconst handleError = (error: unknown, errors: DetailedError[], parseError?: Function) => {\n log.warn(error);\n if (isDetailedError(error)) {\n // handle case where error string and hash were\n // wrapped in object like`const error = { str, hash };`\n if (parseError) {\n parseError(error.str, error.hash);\n }\n errors.push({ ...error, message: error.str, error });\n } else {\n // assume it is just error string and pass it on\n if (parseError) {\n parseError(error);\n }\n if (error instanceof Error) {\n errors.push({\n str: error.message,\n message: error.message,\n hash: error.name,\n error,\n });\n }\n }\n};\n/**\n * Equivalent to {@link init()}, except an error will be thrown on error.\n *\n * @param config - **Deprecated** Mermaid sequenceConfig.\n * @param nodes - One of:\n * - A DOM Node\n * - An array of DOM nodes (as would come from a jQuery selector)\n * - A W3C selector, a la `.mermaid` (default)\n * @param callback - Function that is called with the id of each generated mermaid diagram.\n *\n * @returns Resolves on success, otherwise the {@link Promise} will be rejected with an Error.\n */\nconst initThrowsErrors = async function (\n config?: MermaidConfig,\n // eslint-disable-next-line no-undef\n nodes?: string | HTMLElement | NodeListOf<HTMLElement>,\n // eslint-disable-next-line @typescript-eslint/ban-types\n callback?: Function\n) {\n const conf = mermaidAPI.getConfig();\n if (config) {\n // This is a legacy way of setting config. It is not documented and should be removed in the future.\n // @ts-ignore: TODO Fix ts errors\n mermaid.sequenceConfig = config;\n }\n\n const errors = [];\n\n if (conf?.lazyLoadedDiagrams && conf.lazyLoadedDiagrams.length > 0) {\n // Load all lazy loaded diagrams in parallel\n const results = await Promise.allSettled(\n conf.lazyLoadedDiagrams.map(async (diagram: string) => {\n const { id, detector, loadDiagram } = await import(diagram);\n addDetector(id, detector, loadDiagram);\n })\n );\n for (const result of results) {\n if (result.status == 'rejected') {\n log.warn(`Failed to lazyLoadedDiagram due to `, result.reason);\n errors.push(result.reason);\n }\n }\n }\n\n // if last argument is a function this is the callback function\n log.debug(`${!callback ? 'No ' : ''}Callback function found`);\n let nodesToProcess: ArrayLike<HTMLElement>;\n if (typeof nodes === 'undefined') {\n nodesToProcess = document.querySelectorAll('.mermaid');\n } else if (typeof nodes === 'string') {\n nodesToProcess = document.querySelectorAll(nodes);\n } else if (nodes instanceof HTMLElement) {\n nodesToProcess = [nodes];\n } else if (nodes instanceof NodeList) {\n nodesToProcess = nodes;\n } else {\n throw new Error('Invalid argument nodes for mermaid.init');\n }\n\n log.debug(`Found ${nodesToProcess.length} diagrams`);\n if (typeof config?.startOnLoad !== 'undefined') {\n log.debug('Start On Load: ' + config?.startOnLoad);\n mermaidAPI.updateSiteConfig({ startOnLoad: config?.startOnLoad });\n }\n\n // generate the id of the diagram\n const idGenerator = new utils.initIdGenerator(conf.deterministicIds, conf.deterministicIDSeed);\n\n let txt: string;\n\n // element is the current div with mermaid class\n for (const element of Array.from(nodesToProcess)) {\n log.info('Rendering diagram: ' + element.id);\n /*! Check if previously processed */\n if (element.getAttribute('data-processed')) {\n continue;\n }\n element.setAttribute('data-processed', 'true');\n\n const id = `mermaid-${idGenerator.next()}`;\n\n // Fetch the graph definition including tags\n txt = element.innerHTML;\n\n // transforms the html to pure text\n txt = utils\n .entityDecode(txt)\n .trim()\n .replace(/<br\\s*\\/?>/gi, '<br/>');\n\n const init = utils.detectInit(txt);\n if (init) {\n log.debug('Detected early reinit: ', init);\n }\n try {\n mermaidAPI.render(\n id,\n txt,\n (svgCode: string, bindFunctions?: (el: Element) => void) => {\n element.innerHTML = svgCode;\n if (typeof callback !== 'undefined') {\n callback(id);\n }\n if (bindFunctions) bindFunctions(element);\n },\n element\n );\n } catch (error) {\n handleError(error, errors, mermaid.parseError);\n }\n }\n if (errors.length > 0) {\n // TODO: We should be throwing an error object.\n throw errors[0];\n }\n};\n\nlet lazyLoadingPromise: Promise<unknown> | undefined = undefined;\n/**\n * @param conf\n * @deprecated This is an internal function and should not be used. Will be removed in v10.\n */\nconst registerLazyLoadedDiagrams = async (conf: MermaidConfig) => {\n // Only lazy load once\n // TODO: This is a hack. We should either throw error when new diagrams are added, or load them anyway.\n if (lazyLoadingPromise === undefined) {\n // Load all lazy loaded diagrams in parallel\n lazyLoadingPromise = Promise.allSettled(\n (conf?.lazyLoadedDiagrams ?? []).map(async (diagram: string) => {\n const { id, detector, loadDiagram } = await import(diagram);\n addDetector(id, detector, loadDiagram);\n })\n );\n }\n await lazyLoadingPromise;\n};\n\nlet loadingPromise: Promise<unknown> | undefined = undefined;\n\nconst loadExternalDiagrams = async (conf: MermaidConfig) => {\n // Only lazy load once\n // TODO: This is a hack. We should either throw error when new diagrams are added, or load them anyway.\n if (loadingPromise === undefined) {\n log.debug(`Loading ${conf?.lazyLoadedDiagrams?.length} external diagrams`);\n // Load all lazy loaded diagrams in parallel\n loadingPromise = Promise.allSettled(\n (conf?.lazyLoadedDiagrams ?? []).map(async (url: string) => {\n const { id, detector, loadDiagram } = await import(url);\n const { diagram } = await loadDiagram();\n registerDiagram(id, diagram, detector, diagram.injectUtils);\n })\n );\n }\n await loadingPromise;\n};\n\n/**\n * @deprecated This is an internal function and should not be used. Will be removed in v10.\n */\n\nconst initThrowsErrorsAsync = async function (\n config?: MermaidConfig,\n // eslint-disable-next-line no-undef\n nodes?: string | HTMLElement | NodeListOf<HTMLElement>,\n // eslint-disable-next-line @typescript-eslint/ban-types\n callback?: Function\n) {\n const conf = mermaidAPI.getConfig();\n if (config) {\n // This is a legacy way of setting config. It is not documented and should be removed in the future.\n // @ts-ignore: TODO Fix ts errors\n mermaid.sequenceConfig = config;\n }\n\n // if last argument is a function this is the callback function\n log.debug(`${!callback ? 'No ' : ''}Callback function found`);\n let nodesToProcess: ArrayLike<HTMLElement>;\n if (typeof nodes === 'undefined') {\n nodesToProcess = document.querySelectorAll('.mermaid');\n } else if (typeof nodes === 'string') {\n nodesToProcess = document.querySelectorAll(nodes);\n } else if (nodes instanceof HTMLElement) {\n nodesToProcess = [nodes];\n } else if (nodes instanceof NodeList) {\n nodesToProcess = nodes;\n } else {\n throw new Error('Invalid argument nodes for mermaid.init');\n }\n\n log.debug(`Found ${nodesToProcess.length} diagrams`);\n if (typeof config?.startOnLoad !== 'undefined') {\n log.debug('Start On Load: ' + config?.startOnLoad);\n mermaidAPI.updateSiteConfig({ startOnLoad: config?.startOnLoad });\n }\n\n // generate the id of the diagram\n const idGenerator = new utils.initIdGenerator(conf.deterministicIds, conf.deterministicIDSeed);\n\n let txt: string;\n const errors: DetailedError[] = [];\n\n // element is the current div with mermaid class\n for (const element of Array.from(nodesToProcess)) {\n log.info('Rendering diagram: ' + element.id);\n /*! Check if previously processed */\n if (element.getAttribute('data-processed')) {\n continue;\n }\n element.setAttribute('data-processed', 'true');\n\n const id = `mermaid-${idGenerator.next()}`;\n\n // Fetch the graph definition including tags\n txt = element.innerHTML;\n\n // transforms the html to pure text\n txt = utils\n .entityDecode(txt)\n .trim()\n .replace(/<br\\s*\\/?>/gi, '<br/>');\n\n const init = utils.detectInit(txt);\n if (init) {\n log.debug('Detected early reinit: ', init);\n }\n try {\n await mermaidAPI.renderAsync(\n id,\n txt,\n (svgCode: string, bindFunctions?: (el: Element) => void) => {\n element.innerHTML = svgCode;\n if (typeof callback !== 'undefined') {\n callback(id);\n }\n if (bindFunctions) bindFunctions(element);\n },\n element\n );\n } catch (error) {\n handleError(error, errors, mermaid.parseError);\n }\n }\n if (errors.length > 0) {\n // TODO: We should be throwing an error object.\n throw errors[0];\n }\n};\n\nconst initialize = function (config: MermaidConfig) {\n mermaidAPI.initialize(config);\n};\n\n/**\n * @param config\n * @deprecated This is an internal function and should not be used. Will be removed in v10.\n */\nconst initializeAsync = async function (config: MermaidConfig) {\n if (config.loadExternalDiagramsAtStartup) {\n await loadExternalDiagrams(config);\n } else {\n await registerLazyLoadedDiagrams(config);\n }\n mermaidAPI.initialize(config);\n};\n\n/**\n * ##contentLoaded Callback function that is called when page is loaded. This functions fetches\n * configuration for mermaid rendering and calls init for rendering the mermaid diagrams on the\n * page.\n */\nconst contentLoaded = function () {\n if (mermaid.startOnLoad) {\n const { startOnLoad } = mermaidAPI.getConfig();\n if (startOnLoad) {\n mermaid.init();\n }\n }\n};\n\nif (typeof document !== 'undefined') {\n /*!\n * Wait for document loaded before starting the execution\n */\n window.addEventListener('load', contentLoaded, false);\n}\n\n/**\n * ## setParseErrorHandler Alternative to directly setting parseError using:\n *\n * ```js\n * mermaid.parseError = function(err,hash){=\n * forExampleDisplayErrorInGui(err); // do something with the error\n * };\n * ```\n *\n * This is provided for environments where the mermaid object can't directly have a new member added\n * to it (eg. dart interop wrapper). (Initially there is no parseError member of mermaid).\n *\n * @param newParseErrorHandler New parseError() callback.\n */\nconst setParseErrorHandler = function (newParseErrorHandler: (err: any, hash: any) => void) {\n mermaid.parseError = newParseErrorHandler;\n};\n\nconst parse = (txt: string) => {\n return mermaidAPI.parse(txt, mermaid.parseError);\n};\n\nconst executionQueue: (() => Promise<unknown>)[] = [];\nlet executionQueueRunning = false;\nconst executeQueue = async () => {\n if (executionQueueRunning) {\n return;\n }\n executionQueueRunning = true;\n while (executionQueue.length > 0) {\n const f = executionQueue.shift();\n if (f) {\n try {\n await f();\n } catch (e) {\n log.error('Error executing queue', e);\n }\n }\n }\n executionQueueRunning = false;\n};\n\n/**\n * @param txt\n * @deprecated This is an internal function and should not be used. Will be removed in v10.\n */\nconst parseAsync = (txt: string) => {\n return new Promise((resolve, reject) => {\n // This promise will resolve when the mermaidAPI.render call is done.\n // It will be queued first and will be executed when it is first in line\n const performCall = () =>\n new Promise((res, rej) => {\n mermaidAPI.parseAsync(txt, mermaid.parseError).then(\n (r) => {\n // This resolves for the promise for the queue handling\n res(r);\n // This fullfills the promise sent to the value back to the original caller\n resolve(r);\n },\n (e) => {\n log.error('Error parsing', e);\n rej(e);\n reject(e);\n }\n );\n });\n executionQueue.push(performCall);\n executeQueue();\n });\n};\n\n// const asynco = (id: string, delay: number) =>\n// new Promise((res) => {\n// setTimeout(() => {\n// // This resolves for the promise for the queue handling\n// res(id);\n// }, delay);\n// });\n\n/**\n * @param txt\n * @param id\n * @param delay\n * @deprecated This is an internal function and should not be used. Will be removed in v10.\n */\n// const test1 = (id: string, delay: number) => {\n// const p = new Promise((resolve, reject) => {\n// // This promise will resolve when the mermaidAPI.render call is done.\n// // It will be queued first and will be executed when it is first in line\n// const performCall = () =>\n// new Promise((res) => {\n// asynco(id, delay).then((r) => {\n// // This resolves for the promise for the queue handling\n// res(r);\n// // This fullfills the promise sent to the value back to the original caller\n// resolve(r + ' result to caller');\n// });\n// });\n// executionQueue.push(performCall);\n// });\n// return p;\n// };\n\n/**\n * @param txt\n * @param id\n * @param text\n * @param cb\n * @param container\n * @deprecated This is an internal function and should not be used. Will be removed in v10.\n */\nconst renderAsync = (\n id: string,\n text: string,\n cb: (svgCode: string, bindFunctions?: (element: Element) => void) => void,\n container?: Element\n): Promise<void> => {\n return new Promise((resolve, reject) => {\n // This promise will resolve when the mermaidAPI.render call is done.\n // It will be queued first and will be executed when it is first in line\n const performCall = () =>\n new Promise((res, rej) => {\n mermaidAPI.renderAsync(id, text, cb, container).then(\n (r) => {\n // This resolves for the promise for the queue handling\n res(r);\n // This fullfills the promise sent to the value back to the original caller\n resolve(r);\n },\n (e) => {\n log.error('Error parsing', e);\n rej(e);\n reject(e);\n }\n );\n });\n executionQueue.push(performCall);\n executeQueue();\n });\n};\n\nconst mermaid: {\n startOnLoad: boolean;\n diagrams: any;\n // eslint-disable-next-line @typescript-eslint/ban-types\n parseError?: Function;\n mermaidAPI: typeof mermaidAPI;\n parse: typeof parse;\n parseAsync: typeof parseAsync;\n render: typeof mermaidAPI.render;\n renderAsync: typeof renderAsync;\n init: typeof init;\n initThrowsErrors: typeof initThrowsErrors;\n initialize: typeof initialize;\n initializeAsync: typeof initializeAsync;\n contentLoaded: typeof contentLoaded;\n setParseErrorHandler: typeof setParseErrorHandler;\n} = {\n startOnLoad: true,\n diagrams: {},\n mermaidAPI,\n parse,\n parseAsync,\n render: mermaidAPI.render,\n renderAsync,\n init,\n initThrowsErrors,\n initialize,\n initializeAsync,\n parseError: undefined,\n contentLoaded,\n setParseErrorHandler,\n};\n\nexport default mermaid;\n"],"names":["log","setLogLevel","config","sanitizeText","Theme","getThemeVariables","theme","baseThemeVariables","darkThemeVariables","defaultThemeVariables","forestThemeVariables","directive","freeGlobal","global","require$$0","root","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","objectToString","require$$1","require$$2","baseGetTag","isObject","type","isFunction","coreJsData","isMasked","funcProto","funcToString","toSource","require$$3","baseIsNative","getValue","getNative","nativeCreate","hashClear","hashDelete","HASH_UNDEFINED","hashGet","hashHas","hashSet","require$$4","Hash","listCacheClear","eq","assocIndexOf","listCacheDelete","listCacheGet","listCacheHas","listCacheSet","ListCache","Map","mapCacheClear","isKeyable","getMapData","mapCacheDelete","mapCacheGet","mapCacheHas","mapCacheSet","MapCache","init","totalDistance","point","cnt","generateId","options","getTextObj","memoize","line","fontFamily","startCnt","conf","getConfig","height","width","setupGraphViewbox","padding","getStyles","flowchart","sequence","gantt","classDiagram","stateDiagram","info","pie","er","error","journey","requirement","c4","_log","_setLogLevel","_getConfig","_sanitizeText","_setupGraphViewbox","name","message","parser","o","parse","self","lexer","c","title","clear","direction","parseDirective","setDirection","configApi.getConfig","commit","commitType","branch","mainBranchOrder","commonClear","getDirection","description","drawText","commits","circle","circle2","cross","rect","arc","arc2","branches","draw","wrapEnabled","c4ShapeInRow","c4BoundaryInRow","tags","rel","autoWrap","personOrSystem","container","component","boundary","setWrap","LINETYPE","ARROWTYPE","PLACEMENT","drawRect","drawImage","drawEmbeddedImage","drawLabel","drawRels","rels","_drawTextCandidateFunc","drawBoundary","getNoteRect","insertDatabaseIcon","insertComputerIcon","insertClockIcon","insertArrowHead","insertArrowFilledHead","insertArrowCrossHead","setConf","messageFont","bounds","svgDraw","c4ShapeArray","c4ShapeTypeConf","MERMAID_DOM_ID_PREFIX","relations","classes","funs","addClass","lookUpDomId","setupToolTips","getClasses","getRelations","addRelation","cleanupLabel","setTooltip","getTooltip","setLink","setClickEvent","bindFunctions","lineType","relationType","edgeCount","drawEdge","insertMarkers","markers","applyStyle","addHtmlLabel","insertPolygonShape","w","edges","data","intersect","node","ellipse","polygon","question","choice","hexagon","rect_left_inv_arrow","lean_right","lean_left","trapezoid","inv_trapezoid","rect_right_inv_arrow","cylinder","stadium","subroutine","diffX","shapes","clusterDb","head","edgeLabels","render","clearNodes","clearEdges","clearClusters","clearGraphlib","addRelationship","getRelationships","entities","adjustEntities","addRelationships","relationships","relCnt","drawRelationshipFromLayout","uuid4","start","end","setClass","setClickFun","dir","nodeList","configApi.defaultConfig","apply","exports","module","Buffer","isBuffer","funcTag","types","require$$5","require","require$$6","require$$7","util","addVertices","addEdges","defaultStyle","subGraphs","i","id","sections","tasks","currentSection","rawTasks","addSection","getSections","getTasks","compileTasks","dateFormat","excludes","includes","addTask","addTaskOrg","version","links","securityLevel","sandboxElement","doc","h","min","max","d","todayMarker","d3pie","requirements","elements","actors","getActors","text","actorCnt","actorActivations","drawBackgroundRect","drawNote","messages","note","addTspan","isFirst","rootDoc","divider","face","d3arc","errorStyles","c4Parser","c4Styles","classParser","classStyles","erParser","erStyles","ganttParser","ganttStyles","infoParser","infoStyles","pieParser","pieStyles","requirementParser","requirementStyles","sequenceParser","sequenceStyles","stateParser","stateStyles","journeyStyles","flowParser","flowStyles","gitGraphParser","gitGraphStyles","parseAsync","configApi.reset","configApi.addDirective","element","renderAsync","initialize","configApi.saveConfigFromInitialize","configApi.setSiteConfig","configApi.getSiteConfig"],"mappings":";;;;;;;;;;;;;;;;AAQO,MAAM,SAAmC;AAAA,EAC9C,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,O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