{"version":3,"sources":["jsdelivr-header.js","/npm/mermaid@11.16.0/src/logger.ts","/npm/mermaid@11.16.0/src/assignWithDepth.ts","/npm/mermaid@11.16.0/src/themes/erDiagram-oldHardcodedValues.ts","/npm/mermaid@11.16.0/src/themes/theme-helpers.js","/npm/mermaid@11.16.0/src/themes/theme-base.js","/npm/mermaid@11.16.0/src/themes/theme-dark.js","/npm/mermaid@11.16.0/src/themes/theme-default.js","/npm/mermaid@11.16.0/src/themes/theme-forest.js","/npm/mermaid@11.16.0/src/themes/theme-neutral.js","/npm/mermaid@11.16.0/src/themes/theme-neo.js","/npm/mermaid@11.16.0/src/themes/theme-neo-dark.js","/npm/mermaid@11.16.0/src/themes/theme-redux.js","/npm/mermaid@11.16.0/src/themes/theme-redux-dark.js","/npm/mermaid@11.16.0/src/themes/theme-redux-color.js","/npm/mermaid@11.16.0/src/themes/theme-redux-dark-color.js","/npm/mermaid@11.16.0/src/themes/index.js","/npm/mermaid@11.16.0/src/schemas/config.schema.yaml","/npm/mermaid@11.16.0/src/defaultConfig.ts","/npm/mermaid@11.16.0/src/utils/sanitizeDirective.ts","/npm/mermaid@11.16.0/src/config.ts","/npm/mermaid@11.16.0/src/diagram-api/regexes.ts","/npm/mermaid@11.16.0/src/errors.ts","/npm/mermaid@11.16.0/src/diagram-api/detectType.ts","/npm/mermaid@11.16.0/src/diagrams/common/common.ts","/npm/mermaid@11.16.0/src/setupGraphViewbox.js","/npm/mermaid@11.16.0/src/styles.ts","/npm/mermaid@11.16.0/src/diagrams/common/commonDb.ts","/npm/mermaid@11.16.0/src/diagram-api/diagramAPI.ts","/npm/mermaid@11.16.0/src/rendering-util/selectSvgElement.ts","/node_modules/.pnpm/js-yaml@4.1.1/node_modules/js-yaml/dist/js-yaml.mjs","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/handDrawnShapeStyles.ts","/npm/mermaid@11.16.0/src/utils.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/labelImageUtils.ts","/npm/mermaid@11.16.0/src/rendering-util/icons.ts","/npm/mermaid@11.16.0/src/rendering-util/handle-markdown-text.ts","/npm/mermaid@11.16.0/src/rendering-util/splitText.ts","/npm/mermaid@11.16.0/src/rendering-util/createText.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/util.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/intersect/intersect-rect.js","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/createLabel.js","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/roundedRectPath.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/intersect/intersect-node.js","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/intersect/intersect-ellipse.js","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/intersect/intersect-circle.js","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/intersect/intersect-line.js","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/intersect/intersect-polygon.js","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/intersect/index.js","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/anchor.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/bowTieRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/insertPolygonShape.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/card.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/choice.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/circle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/crossedCircle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/curlyBraceLeft.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/curlyBraceRight.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/curlyBraces.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/curvedTrapezoid.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/cylinder.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/drawRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/datastore.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/dividedRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/doubleCircle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/filledCircle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/flippedTriangle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/forkJoin.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/halfRoundedRectangle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/hexagon.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/hourglass.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/icon.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/iconCircle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/iconRounded.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/iconSquare.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/imageSquare.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/invertedTrapezoid.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/labelRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/leanLeft.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/leanRight.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/lightningBolt.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/linedCylinder.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/linedWaveEdgedRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/multiRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/multiWaveEdgedRectangle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/note.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/question.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/rectLeftInvArrow.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/rectWithTitle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/roundedRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/shadedProcess.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/slopedRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/squareRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/stadium.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/state.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/stateEnd.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/stateStart.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/subroutine.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/taggedRect.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/taggedWaveEdgedRectangle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/text.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/tiltedCylinder.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/trapezoid.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/trapezoidalPentagon.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/triangle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/waveEdgedRectangle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/waveRectangle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/windowPane.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/erBox.ts","/npm/mermaid@11.16.0/src/diagrams/class/shapeUtil.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/classBox.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/requirementBox.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/kanbanItem.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/bang.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/cloud.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/defaultMindmapNode.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes/mindmapCircle.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/shapes.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/nodes.ts","/npm/mermaid@11.16.0/src/utils/lineWithOffset.ts","/npm/mermaid@11.16.0/src/rendering-util/rendering-elements/edges.js","/npm/mermaid@11.16.0/src/rendering-util/render.ts","/npm/mermaid@11.16.0/src/diagrams/c4/c4Detector.ts","/npm/mermaid@11.16.0/src/diagrams/flowchart/flowDetector.ts","/npm/mermaid@11.16.0/src/diagrams/flowchart/flowDetector-v2.ts","/npm/mermaid@11.16.0/src/diagrams/swimlanes/detector.ts","/npm/mermaid@11.16.0/src/diagrams/er/erDetector.ts","/npm/mermaid@11.16.0/src/diagrams/git/gitGraphDetector.ts","/npm/mermaid@11.16.0/src/diagrams/gantt/ganttDetector.ts","/npm/mermaid@11.16.0/src/diagrams/info/infoDetector.ts","/npm/mermaid@11.16.0/src/diagrams/pie/pieDetector.ts","/npm/mermaid@11.16.0/src/diagrams/quadrant-chart/quadrantDetector.ts","/npm/mermaid@11.16.0/src/diagrams/xychart/xychartDetector.ts","/npm/mermaid@11.16.0/src/diagrams/requirement/requirementDetector.ts","/npm/mermaid@11.16.0/src/diagrams/sequence/sequenceDetector.ts","/npm/mermaid@11.16.0/src/diagrams/class/classDetector.ts","/npm/mermaid@11.16.0/src/diagrams/class/classDetector-V2.ts","/npm/mermaid@11.16.0/src/diagrams/state/stateDetector.ts","/npm/mermaid@11.16.0/src/diagrams/state/stateDetector-V2.ts","/npm/mermaid@11.16.0/src/diagrams/user-journey/journeyDetector.ts","/npm/mermaid@11.16.0/src/diagrams/error/errorRenderer.ts","/npm/mermaid@11.16.0/src/diagrams/error/errorDiagram.ts","/npm/mermaid@11.16.0/src/diagrams/flowchart/elk/detector.ts","/npm/mermaid@11.16.0/src/diagrams/timeline/detector.ts","/npm/mermaid@11.16.0/src/diagrams/mindmap/detector.ts","/npm/mermaid@11.16.0/src/diagrams/kanban/detector.ts","/npm/mermaid@11.16.0/src/diagrams/sankey/sankeyDetector.ts","/npm/mermaid@11.16.0/src/diagrams/packet/detector.ts","/npm/mermaid@11.16.0/src/diagrams/radar/detector.ts","/npm/mermaid@11.16.0/src/diagrams/block/blockDetector.ts","/npm/mermaid@11.16.0/src/diagrams/treeView/detector.ts","/npm/mermaid@11.16.0/src/diagrams/architecture/architectureDetector.ts","/npm/mermaid@11.16.0/src/diagrams/eventmodeling/detector.ts","/npm/mermaid@11.16.0/src/diagrams/ishikawa/ishikawaDetector.ts","/npm/mermaid@11.16.0/src/diagrams/venn/vennDetector.ts","/npm/mermaid@11.16.0/src/diagrams/treemap/detector.ts","/npm/mermaid@11.16.0/src/diagrams/wardley/wardleyDetector.ts","/npm/mermaid@11.16.0/src/diagrams/cynefin/cynefinDetector.ts","/npm/mermaid@11.16.0/src/diagrams/railroad/railroadDetector.ts","/npm/mermaid@11.16.0/src/diagrams/railroad/ebnfDetector.ts","/npm/mermaid@11.16.0/src/diagrams/railroad/abnfDetector.ts","/npm/mermaid@11.16.0/src/diagrams/railroad/pegDetector.ts","/npm/mermaid@11.16.0/src/diagram-api/diagram-orchestration.ts","/npm/mermaid@11.16.0/src/diagram-api/loadDiagram.ts","/npm/mermaid@11.16.0/src/accessibility.ts","/npm/mermaid@11.16.0/src/Diagram.ts","/npm/mermaid@11.16.0/src/interactionDb.ts","/npm/mermaid@11.16.0/src/diagram-api/comments.ts","/npm/mermaid@11.16.0/src/diagram-api/frontmatter.ts","/npm/mermaid@11.16.0/src/preprocess.ts","/npm/mermaid@11.16.0/src/utils/base64.ts","/npm/mermaid@11.16.0/src/mermaidAPI.ts","/npm/mermaid@11.16.0/src/mermaid.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,63CCEa,GAAmC,CAC9C,MAAO,EACP,MAAO,EACP,KAAM,EACN,KAAM,EACN,MAAO,EACP,MAAO,CACT,EAEa,EAAuD,CAClE,MAAA,EAAA,IAAW,IAAiB,CAAC,EAAtB,OAAA,EACP,MAAA,EAAA,IAAW,IAAiB,CAAC,EAAtB,OAAA,EACP,KAAA,EAAA,IAAU,IAAiB,CAAC,EAAtB,MAAA,EACN,KAAA,EAAA,IAAU,IAAiB,CAAC,EAAtB,MAAA,EACN,MAAA,EAAA,IAAW,IAAiB,CAAC,EAAtB,OAAA,EACP,MAAA,EAAA,IAAW,IAAiB,CAAC,EAAtB,OAAA,CACT,EAOa,GAAc,EAAA,SAAU,EAAsC,QAAS,CAClF,IAAI,EAAuB,GAAO,MAC9B,OAAO,GAAU,SACf,EAAM,YAAA,IAAiB,KACzB,EAAe,GAAO,CAAK,GAEpB,OAAO,GAAU,WAC1B,EAAe,GAEjB,EAAI,MAAQ,IAAM,CAAC,EACnB,EAAI,MAAQ,IAAM,CAAC,EACnB,EAAI,KAAO,IAAM,CAAC,EAClB,EAAI,KAAO,IAAM,CAAC,EAClB,EAAI,MAAQ,IAAM,CAAC,EACnB,EAAI,MAAQ,IAAM,CAAC,EAEf,GAAgB,GAAO,QACzB,EAAI,MAAQ,QAAQ,MAChB,QAAQ,MAAM,KAAK,QAAS,GAAO,OAAO,EAAG,eAAe,EAC5D,QAAQ,IAAI,KAAK,QAAS,WAAY,GAAO,O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Ae,KAAK,CAAW,EAC/B,GAAA,EAAe,MAAM,CAAM,CAC7B,CAAC,EAvBsC,QAAA,EA+BnC,GAAgC,EAAA,IAC7B,OAAO,KAAK,EAAS,EAAE,IAAK,IAAQ,CACzC,GAAA,CAAA,EACA,EAHkC,+BAAA,EA+BhC,GAAmB,CACvB,YAAa,GACb,WAAA,GACA,MAAA,GACA,OAAA,GACA,KAAA,GACA,IAAA,GACA,yBAAA,GACA,sBAAA,GACA,WAAA,GACA,WAAY,OACZ,cAAA,GACA,qBAAA,GAAA,WACA,GACA,kBAAA,GACA,8BAAA,EACF,EAEO,GAAQ","file":"/npm/mermaid@11.16.0/dist/mermaid.core.mjs/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v4.62.2 and esbuild v0.28.1.\n * Original file: /npm/mermaid@11.16.0/dist/mermaid.core.mjs\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/* eslint-disable no-console */\nimport dayjs from 'dayjs';\n\nexport type LogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal';\n\nexport const LEVELS: Record<LogLevel, number> = {\n  trace: 0,\n  debug: 1,\n  info: 2,\n  warn: 3,\n  error: 4,\n  fatal: 5,\n};\n\nexport const log: Record<keyof typeof LEVELS, typeof console.log> = {\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 level - The level to set the logging to. Default is `\"fatal\"`\n */\nexport const setLogLevel = function (level: keyof typeof LEVELS | number = 'fatal') {\n  let numericLevel: number = LEVELS.fatal;\n  if (typeof level === 'string') {\n    if (level.toLowerCase() in LEVELS) {\n      numericLevel = LEVELS[level];\n    }\n  } else if (typeof level === 'number') {\n    numericLevel = level;\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 level - The level for the log format\n * @returns The format with the timestamp and log level\n */\nconst format = (level: Uppercase<LogLevel>): string => {\n  const time = dayjs().format('ss.SSS');\n  return `%c${time} : ${level} : `;\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * assignWithDepth Extends the functionality of {@link Object.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`]<p> Additionally, dissimilar types will not clobber unless the\n *   config.clobber parameter === true. Example:\n *\n * ```\n * const config_0 = { foo: { bar: 'bar' }, bar: 'foo' };\n * const config_1 = { foo: 'foo', bar: 'bar' };\n * const 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 dst - The destination of the merge\n * @param src - The source object(s) to merge into destination\n * @param config -\n * * depth: depth to traverse within src and dst for merging\n * * clobber: should dissimilar types clobber\n */\nconst assignWithDepth = (\n  dst: any,\n  src: any,\n  { depth = 2, clobber = false }: { depth?: number; clobber?: boolean } = {}\n): any => {\n  const config: { depth: number; clobber: boolean } = { depth, clobber };\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.includes(s)) {\n        dst.push(s);\n      }\n    });\n    return dst;\n  }\n  if (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 (src !== undefined && typeof dst === 'object' && typeof src === 'object') {\n    Object.keys(src).forEach((key) => {\n      if (\n        typeof src[key] === 'object' &&\n        src[key] !== null &&\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","/**\n * 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 { adjust } from 'khroma';\n\nexport const mkBorder = (col, darkMode) =>\n  darkMode ? adjust(col, { s: -40, l: 10 }) : adjust(col, { s: -40, l: -10 });\n","import { adjust, darken, invert, isDark, lighten } from 'khroma';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\nimport { mkBorder } from './theme-helpers.js';\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\n    this.primaryColor = '#fff4dd';\n\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = '#333';\n\n    this.THEME_COLOR_LIMIT = 12;\n    this.radius = 5;\n    this.strokeWidth = 1;\n    // dark\n\n    this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n    this.fontSize = '16px';\n    this.useGradient = true;\n    this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1))';\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.arrowheadColor = this.arrowheadColor || invert(this.background);\n    this.textColor = this.textColor || this.primaryTextColor;\n\n    // TODO: should this instead default to secondaryBorderColor?\n    this.border2 = this.border2 || this.tertiaryBorderColor;\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 || this.actorBorder;\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    // Default fill for rect blocks in sequence diagrams (when no color is specified by the user).\n    // Uses tertiaryColor so it is always visually distinct from actors, text, and arrows.\n    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\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.vertLineColor = this.vertLineColor || 'navy';\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    this.noteFontWeight = this.noteFontWeight || 'normal';\n    this.fontWeight = this.fontWeight || 'normal';\n\n    /* Sequence Diagram variables */\n\n    this.personBorder = this.personBorder || this.primaryBorderColor;\n    this.personBkg = this.personBkg || this.mainBkg;\n\n    /* ER diagram */\n\n    if (this.darkMode) {\n      this.rowOdd = this.rowOdd || darken(this.mainBkg, 5) || '#ffffff';\n      this.rowEven = this.rowEven || darken(this.mainBkg, 10);\n    } else {\n      this.rowOdd = this.rowOdd || lighten(this.mainBkg, 75) || '#ffffff';\n      this.rowEven = this.rowEven || lighten(this.mainBkg, 5);\n    }\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 foreground 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 the 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    const multiplier = this.darkMode ? -4 : -1;\n    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.venn1 = this.venn1 ?? adjust(this.primaryColor, { l: -30 });\n    this.venn2 = this.venn2 ?? adjust(this.secondaryColor, { l: -30 });\n    this.venn3 = this.venn3 ?? adjust(this.tertiaryColor, { l: -30 });\n    this.venn4 = this.venn4 ?? adjust(this.primaryColor, { h: 60, l: -30 });\n    this.venn5 = this.venn5 ?? adjust(this.primaryColor, { h: -60, l: -30 });\n    this.venn6 = this.venn6 ?? adjust(this.secondaryColor, { h: 60, l: -30 });\n    this.venn7 = this.venn7 ?? adjust(this.primaryColor, { h: 120, l: -30 });\n    this.venn8 = this.venn8 ?? adjust(this.secondaryColor, { h: 120, l: -30 });\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* cynefin */\n    this.cynefin = {\n      domainFontSize: this.cynefin?.domainFontSize || 16,\n      itemFontSize: this.cynefin?.itemFontSize || 12,\n      boundaryColor: this.cynefin?.boundaryColor || this.lineColor,\n      boundaryWidth: this.cynefin?.boundaryWidth || 2,\n      cliffColor: this.cynefin?.cliffColor || '#8B0000',\n      cliffWidth: this.cynefin?.cliffWidth || 4,\n      arrowColor: this.cynefin?.arrowColor || this.lineColor,\n      arrowWidth: this.cynefin?.arrowWidth || 2,\n      complexBg: this.cynefin?.complexBg || '#E8F5E9',\n      complicatedBg: this.cynefin?.complicatedBg || '#E3F2FD',\n      chaoticBg: this.cynefin?.chaoticBg || '#FBE9E7',\n      clearBg: this.cynefin?.clearBg || '#FFF8E1',\n      confusionBg: this.cynefin?.confusionBg || '#F3E5F5',\n      textColor: this.cynefin?.textColor || this.textColor,\n      labelColor: this.cynefin?.labelColor || this.primaryTextColor,\n    };\n\n    /* radar */\n    this.radar = {\n      axisColor: this.radar?.axisColor || this.lineColor,\n      axisStrokeWidth: this.radar?.axisStrokeWidth || 2,\n      axisLabelFontSize: this.radar?.axisLabelFontSize || 12,\n      curveOpacity: this.radar?.curveOpacity || 0.5,\n      curveStrokeWidth: this.radar?.curveStrokeWidth || 2,\n      graticuleColor: this.radar?.graticuleColor || '#DEDEDE',\n      graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,\n      graticuleOpacity: this.radar?.graticuleOpacity || 0.3,\n      legendBoxSize: this.radar?.legendBoxSize || 12,\n      legendFontSize: this.radar?.legendFontSize || 12,\n    };\n\n    /* wardley */\n    this.wardleyEvolutionColor = this.wardleyEvolutionColor || '#dc3545';\n    this.wardley = {\n      backgroundColor: this.wardley?.backgroundColor || this.background,\n      axisColor: this.wardley?.axisColor || this.lineColor,\n      axisTextColor: this.wardley?.axisTextColor || this.primaryTextColor,\n      gridColor: this.wardley?.gridColor || this.gridColor,\n      componentFill: this.wardley?.componentFill || this.background,\n      componentStroke: this.wardley?.componentStroke || this.lineColor,\n      componentLabelColor: this.wardley?.componentLabelColor || this.primaryTextColor,\n      linkStroke: this.wardley?.linkStroke || this.lineColor,\n      evolutionStroke: this.wardley?.evolutionStroke || this.wardleyEvolutionColor,\n      annotationStroke: this.wardley?.annotationStroke || this.lineColor,\n      annotationTextColor: this.wardley?.annotationTextColor || this.primaryTextColor,\n      annotationFill: this.wardley?.annotationFill || this.background,\n    };\n\n    /* architecture */\n    this.archEdgeColor = this.archEdgeColor || '#777';\n    this.archEdgeArrowColor = this.archEdgeArrowColor || '#777';\n    this.archEdgeWidth = this.archEdgeWidth || '3';\n    this.archGroupBorderColor = this.archGroupBorderColor || '#000';\n    this.archGroupBorderWidth = this.archGroupBorderWidth || '2px';\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      dataLabelColor: this.xyChart?.dataLabelColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || this.primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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    /* Event Modeling diagrams                             */\n\n    this.emUiFill = this.emUiFill || 'white';\n    this.emUiStroke = this.emUiStroke || '#dbdada';\n    this.emProcessorFill = this.emProcessorFill || '#edb3f6';\n    this.emProcessorStroke = this.emProcessorStroke || '#b88cbf';\n    this.emReadModelFill = this.emReadModelFill || '#d3f1a2';\n    this.emReadModelStroke = this.emReadModelStroke || '#a3b732';\n    this.emCommandFill = this.emCommandFill || '#bcd6fe';\n    this.emCommandStroke = this.emCommandStroke || '#679ac3';\n    this.emEventFill = this.emEventFill || '#ffb778';\n    this.emEventStroke = this.emEventStroke || '#c19a0f';\n    this.emSwimlaneBackgroundOdd = this.emSwimlaneBackgroundOdd || 'rgb(250,250,250)';\n    this.emSwimlaneBackgroundStroke = this.emSwimlaneBackgroundStroke || 'rgb(240,240,240)';\n    this.emArrowhead = this.emArrowhead || this.lineColor;\n    this.emRelationStroke = this.emRelationStroke || this.lineColor;\n\n    /* -------------------------------------------------- */\n    /* EntityRelationship diagrams                        */\n\n    this.attributeBackgroundColorOdd =\n      this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;\n    this.attributeBackgroundColorEven =\n      this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;\n    /* -------------------------------------------------- */\n\n    this.gradientStart = this.primaryBorderColor;\n    this.gradientStop = this.secondaryBorderColor;\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 { adjust, darken, invert, isDark, lighten, rgba } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\n\nclass Theme {\n  constructor() {\n    this.background = '#333';\n    this.primaryColor = '#1f2020';\n    this.secondaryColor = lighten(this.primaryColor, 16);\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 = '#ccc';\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    this.radius = 5;\n    this.strokeWidth = 1;\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    this.clusterBkg = '#302F3D';\n\n    /* Gantt chart variables */\n\n    this.sectionBkgColor = darken('#EAE8D9', 30);\n    this.altSectionBkgColor = 'calculated';\n    this.sectionBkgColor2 = '#EAE8D9';\n    this.excludeBkgColor = darken(this.sectionBkgColor, 10);\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    this.vertLineColor = '#00BFFF';\n\n    /* C4 Context Diagram variables */\n    this.personBorder = this.primaryBorderColor;\n    this.personBkg = this.mainBkg;\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    /* Entity Relationship variables */\n    this.rowOdd = this.rowOdd || lighten(this.mainBkg, 5) || '#ffffff';\n    this.rowEven = this.rowEven || darken(this.mainBkg, 10);\n\n    /* state colors */\n    this.labelColor = 'calculated';\n\n    this.errorBkgColor = '#a44141';\n    this.errorTextColor = '#ddd';\n    this.useGradient = true;\n    this.gradientStart = this.primaryBorderColor;\n    this.gradientStop = this.secondaryBorderColor;\n    this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1))';\n\n    this.noteFontWeight = this.noteFontWeight || 'normal';\n    this.fontWeight = this.fontWeight || 'normal';\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.actorBorder;\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    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\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 = invert(this.doneTaskBkgColor);\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\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 foreground 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    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-10 + i * 4) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) });\n    }\n\n    // Setup the 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.mainContrastColor;\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.mainContrastColor;\n    this.pieStrokeColor = this.pieStrokeColor || 'black';\n    this.pieStrokeWidth = this.pieStrokeWidth || '2px';\n    this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    for (let i = 0; i < 8; i++) {\n      this['venn' + (i + 1)] = this['venn' + (i + 1)] ?? lighten(this['cScale' + i], 30);\n    }\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* cynefin */\n    this.cynefin = {\n      domainFontSize: this.cynefin?.domainFontSize || 16,\n      itemFontSize: this.cynefin?.itemFontSize || 12,\n      boundaryColor: this.cynefin?.boundaryColor || this.lineColor,\n      boundaryWidth: this.cynefin?.boundaryWidth || 2,\n      cliffColor: this.cynefin?.cliffColor || '#FF6B6B',\n      cliffWidth: this.cynefin?.cliffWidth || 4,\n      arrowColor: this.cynefin?.arrowColor || this.lineColor,\n      arrowWidth: this.cynefin?.arrowWidth || 2,\n      complexBg: this.cynefin?.complexBg || '#1B5E20',\n      complicatedBg: this.cynefin?.complicatedBg || '#0D47A1',\n      chaoticBg: this.cynefin?.chaoticBg || '#BF360C',\n      clearBg: this.cynefin?.clearBg || '#F57F17',\n      confusionBg: this.cynefin?.confusionBg || '#4A148C',\n      textColor: this.cynefin?.textColor || this.textColor,\n      labelColor: this.cynefin?.labelColor || this.primaryTextColor,\n    };\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      dataLabelColor: this.xyChart?.dataLabelColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22',\n    };\n\n    this.packet = {\n      startByteColor: this.primaryTextColor,\n      endByteColor: this.primaryTextColor,\n      labelColor: this.primaryTextColor,\n      titleColor: this.primaryTextColor,\n      blockStrokeColor: this.primaryTextColor,\n      blockFillColor: this.background,\n    };\n\n    /* radar */\n    this.radar = {\n      axisColor: this.radar?.axisColor || this.lineColor,\n      axisStrokeWidth: this.radar?.axisStrokeWidth || 2,\n      axisLabelFontSize: this.radar?.axisLabelFontSize || 12,\n      curveOpacity: this.radar?.curveOpacity || 0.5,\n      curveStrokeWidth: this.radar?.curveStrokeWidth || 2,\n      graticuleColor: this.radar?.graticuleColor || '#DEDEDE',\n      graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,\n      graticuleOpacity: this.radar?.graticuleOpacity || 0.3,\n      legendBoxSize: this.radar?.legendBoxSize || 12,\n      legendFontSize: this.radar?.legendFontSize || 12,\n    };\n\n    /* wardley */\n    this.wardleyEvolutionColor = this.wardleyEvolutionColor || '#ff6b6b';\n    this.wardley = {\n      backgroundColor: this.wardley?.backgroundColor || this.background,\n      axisColor: this.wardley?.axisColor || this.lineColor,\n      axisTextColor: this.wardley?.axisTextColor || this.primaryTextColor,\n      gridColor: this.wardley?.gridColor || this.gridColor,\n      componentFill: this.wardley?.componentFill || this.mainBkg,\n      componentStroke: this.wardley?.componentStroke || this.lineColor,\n      componentLabelColor: this.wardley?.componentLabelColor || this.primaryTextColor,\n      linkStroke: this.wardley?.linkStroke || this.lineColor,\n      evolutionStroke: this.wardley?.evolutionStroke || this.wardleyEvolutionColor,\n      annotationStroke: this.wardley?.annotationStroke || this.lineColor,\n      annotationTextColor: this.wardley?.annotationTextColor || this.primaryTextColor,\n      annotationFill: this.wardley?.annotationFill || this.mainBkg,\n    };\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 || '1';\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    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    /* Event Modeling diagrams                             */\n\n    this.emUiFill = this.emUiFill || '#2d2d2d';\n    this.emUiStroke = this.emUiStroke || '#555';\n    this.emProcessorFill = this.emProcessorFill || lighten('#5a3d5c', 10);\n    this.emProcessorStroke = this.emProcessorStroke || '#8a6d8c';\n    this.emReadModelFill = this.emReadModelFill || lighten('#3d5a2d', 10);\n    this.emReadModelStroke = this.emReadModelStroke || '#6d8c5c';\n    this.emCommandFill = this.emCommandFill || lighten('#2d3d5a', 10);\n    this.emCommandStroke = this.emCommandStroke || '#5c6d8c';\n    this.emEventFill = this.emEventFill || lighten('#5a452d', 10);\n    this.emEventStroke = this.emEventStroke || '#8c755c';\n    this.emSwimlaneBackgroundOdd = this.emSwimlaneBackgroundOdd || lighten(this.background, 5);\n    this.emSwimlaneBackgroundStroke =\n      this.emSwimlaneBackgroundStroke || lighten(this.background, 12);\n    this.emArrowhead = this.emArrowhead || this.lineColor;\n    this.emRelationStroke = this.emRelationStroke || this.lineColor;\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    this.nodeBorder = this.nodeBorder || '#999';\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, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\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.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n    this.border2 = '#aaaa33';\n    this.arrowheadColor = '#333333';\n    this.fontFamily = '\"trebuchet ms\", verdana, arial, sans-serif';\n    this.fontSize = '16px';\n    this.labelBackground = 'rgba(232,232,232, 0.8)';\n    this.textColor = '#333';\n    this.THEME_COLOR_LIMIT = 12;\n    this.radius = 5;\n    this.strokeWidth = 1;\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 = '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 = '#666';\n    this.activationBkgColor = '#f4f4f4';\n    this.sequenceNumberColor = 'white';\n    this.clusterBkg = '#FBFBFF';\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    this.vertLineColor = '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    this.vertLineColor = 'navy';\n\n    this.noteFontWeight = this.noteFontWeight || 'normal';\n    this.fontWeight = this.fontWeight || 'normal';\n\n    /* C4 Context Diagram variables */\n    this.personBorder = this.primaryBorderColor;\n    this.personBkg = this.mainBkg;\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    /* Entity Relationship variables */\n    this.rowOdd = 'calculated';\n    this.rowEven = 'calculated';\n\n    /* state colors */\n    this.labelColor = 'black';\n    this.errorBkgColor = '#552222';\n    this.errorTextColor = '#552222';\n\n    // Neo-specific\n    this.useGradient = false;\n    this.gradientStart = this.primaryBorderColor;\n    this.gradientStop = this.secondaryBorderColor;\n    this.dropShadow = 'drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))';\n    this.updateColors();\n  }\n  updateColors() {\n    /* Color Scale */\n    /* Each color-set will have a background, a foreground and a border color */\n\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    // 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    for (let i = 0; i < 5; i++) {\n      this['surface' + i] = this['surface' + i] || adjust(this.mainBkg, { h: 30, l: -(5 + i * 5) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, l: -(7 + i * 5) });\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 = this.border1;\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    this.actorLineColor = this.actorBorder;\n    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\n\n    /* Gantt chart variables */\n\n    this.taskTextColor = this.taskTextLightColor;\n    this.taskTextOutsideColor = this.taskTextDarkColor;\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\n\n    /* Entity Relationship variables */\n    this.rowOdd = this.rowOdd || lighten(this.primaryColor, 75) || '#ffffff';\n    this.rowEven = this.rowEven || lighten(this.primaryColor, 1);\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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.venn1 = this.venn1 ?? adjust(this.primaryColor, { l: -30 });\n    this.venn2 = this.venn2 ?? adjust(this.secondaryColor, { l: -30 });\n    this.venn3 = this.venn3 ?? adjust(this.tertiaryColor, { l: -40 });\n    this.venn4 = this.venn4 ?? adjust(this.primaryColor, { h: 60, l: -30 });\n    this.venn5 = this.venn5 ?? adjust(this.primaryColor, { h: -60, l: -30 });\n    this.venn6 = this.venn6 ?? adjust(this.secondaryColor, { h: 60, l: -30 });\n    this.venn7 = this.venn7 ?? adjust(this.primaryColor, { h: 120, l: -30 });\n    this.venn8 = this.venn8 ?? adjust(this.secondaryColor, { h: 120, l: -30 });\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* cynefin */\n    this.cynefin = {\n      domainFontSize: this.cynefin?.domainFontSize || 16,\n      itemFontSize: this.cynefin?.itemFontSize || 12,\n      boundaryColor: this.cynefin?.boundaryColor || this.lineColor,\n      boundaryWidth: this.cynefin?.boundaryWidth || 2,\n      cliffColor: this.cynefin?.cliffColor || '#8B0000',\n      cliffWidth: this.cynefin?.cliffWidth || 4,\n      arrowColor: this.cynefin?.arrowColor || this.lineColor,\n      arrowWidth: this.cynefin?.arrowWidth || 2,\n      complexBg: this.cynefin?.complexBg || '#E8F5E9',\n      complicatedBg: this.cynefin?.complicatedBg || '#E3F2FD',\n      chaoticBg: this.cynefin?.chaoticBg || '#FBE9E7',\n      clearBg: this.cynefin?.clearBg || '#FFF8E1',\n      confusionBg: this.cynefin?.confusionBg || '#F3E5F5',\n      textColor: this.cynefin?.textColor || this.textColor,\n      labelColor: this.cynefin?.labelColor || this.primaryTextColor,\n    };\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* radar */\n    this.radar = {\n      axisColor: this.radar?.axisColor || this.lineColor,\n      axisStrokeWidth: this.radar?.axisStrokeWidth || 2,\n      axisLabelFontSize: this.radar?.axisLabelFontSize || 12,\n      curveOpacity: this.radar?.curveOpacity || 0.5,\n      curveStrokeWidth: this.radar?.curveStrokeWidth || 2,\n      graticuleColor: this.radar?.graticuleColor || '#DEDEDE',\n      graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,\n      graticuleOpacity: this.radar?.graticuleOpacity || 0.3,\n      legendBoxSize: this.radar?.legendBoxSize || 12,\n      legendFontSize: this.radar?.legendFontSize || 12,\n    };\n\n    /* wardley */\n    this.wardleyEvolutionColor = this.wardleyEvolutionColor || '#dc3545';\n    this.wardley = {\n      backgroundColor: this.wardley?.backgroundColor || this.background,\n      axisColor: this.wardley?.axisColor || this.lineColor,\n      axisTextColor: this.wardley?.axisTextColor || this.primaryTextColor,\n      gridColor: this.wardley?.gridColor || this.gridColor,\n      componentFill: this.wardley?.componentFill || this.background,\n      componentStroke: this.wardley?.componentStroke || this.lineColor,\n      componentLabelColor: this.wardley?.componentLabelColor || this.primaryTextColor,\n      linkStroke: this.wardley?.linkStroke || this.lineColor,\n      evolutionStroke: this.wardley?.evolutionStroke || this.wardleyEvolutionColor,\n      annotationStroke: this.wardley?.annotationStroke || this.lineColor,\n      annotationTextColor: this.wardley?.annotationTextColor || this.primaryTextColor,\n      annotationFill: this.wardley?.annotationFill || this.background,\n    };\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      dataLabelColor: this.xyChart?.dataLabelColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || this.primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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    /* Event Modeling diagrams                             */\n\n    this.emUiFill = this.emUiFill || 'white';\n    this.emUiStroke = this.emUiStroke || '#dbdada';\n    this.emProcessorFill = this.emProcessorFill || '#edb3f6';\n    this.emProcessorStroke = this.emProcessorStroke || '#b88cbf';\n    this.emReadModelFill = this.emReadModelFill || '#d3f1a2';\n    this.emReadModelStroke = this.emReadModelStroke || '#a3b732';\n    this.emCommandFill = this.emCommandFill || '#bcd6fe';\n    this.emCommandStroke = this.emCommandStroke || '#679ac3';\n    this.emEventFill = this.emEventFill || '#ffb778';\n    this.emEventStroke = this.emEventStroke || '#c19a0f';\n    this.emSwimlaneBackgroundOdd = this.emSwimlaneBackgroundOdd || 'rgb(250,250,250)';\n    this.emSwimlaneBackgroundStroke = this.emSwimlaneBackgroundStroke || 'rgb(240,240,240)';\n    this.emArrowhead = this.emArrowhead || this.lineColor;\n    this.emRelationStroke = this.emRelationStroke || this.lineColor;\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    // for all keys in this object, if it is 'calculated' then set it to undefined\n    Object.keys(this).forEach((k) => {\n      if (this[k] === 'calculated') {\n        this[k] = undefined;\n      }\n    });\n\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 { adjust, darken, invert, isDark, lighten } from 'khroma';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\nimport { mkBorder } from './theme-helpers.js';\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    this.radius = 5;\n    this.strokeWidth = 1;\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 = 'calculated';\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    this.vertLineColor = '#00BFFF';\n\n    /* C4 Context Diagram variables */\n    this.personBorder = this.primaryBorderColor;\n    this.personBkg = this.mainBkg;\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    this.noteFontWeight = 'normal';\n    this.fontWeight = 'normal';\n\n    /* state colors */\n    this.labelColor = 'black';\n\n    this.errorBkgColor = '#552222';\n    this.errorTextColor = '#552222';\n\n    this.useGradient = true;\n    this.gradientStart = this.primaryBorderColor;\n    this.gradientStop = this.secondaryBorderColor;\n    this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))';\n  }\n  updateColors() {\n    /* Sequence Diagram variables */\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    this.actorLineColor = this.actorBorder;\n    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\n\n    /* Each color-set will have a background, a foreground 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    for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n      this['cScaleLabel' + i] = this['cScaleLabel' + i] || this.scaleLabelColor;\n    }\n\n    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(5 + i * 5) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] || adjust(this.mainBkg, { h: 30, s: -30, l: -(8 + i * 5) });\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    /* 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    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\n\n    /* ER diagram */\n    this.rowOdd = this.rowOdd || lighten(this.mainBkg, 75) || '#ffffff';\n    this.rowEven = this.rowEven || lighten(this.mainBkg, 20);\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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.venn1 = this.venn1 ?? adjust(this.primaryColor, { l: -30 });\n    this.venn2 = this.venn2 ?? adjust(this.secondaryColor, { l: -30 });\n    this.venn3 = this.venn3 ?? adjust(this.tertiaryColor, { l: -30 });\n    this.venn4 = this.venn4 ?? adjust(this.primaryColor, { h: 60, l: -30 });\n    this.venn5 = this.venn5 ?? adjust(this.primaryColor, { h: -60, l: -30 });\n    this.venn6 = this.venn6 ?? adjust(this.secondaryColor, { h: 60, l: -30 });\n    this.venn7 = this.venn7 ?? adjust(this.primaryColor, { h: 120, l: -30 });\n    this.venn8 = this.venn8 ?? adjust(this.secondaryColor, { h: 120, l: -30 });\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* cynefin */\n    this.cynefin = {\n      domainFontSize: this.cynefin?.domainFontSize || 16,\n      itemFontSize: this.cynefin?.itemFontSize || 12,\n      boundaryColor: this.cynefin?.boundaryColor || this.lineColor,\n      boundaryWidth: this.cynefin?.boundaryWidth || 2,\n      cliffColor: this.cynefin?.cliffColor || '#8B4513',\n      cliffWidth: this.cynefin?.cliffWidth || 4,\n      arrowColor: this.cynefin?.arrowColor || this.lineColor,\n      arrowWidth: this.cynefin?.arrowWidth || 2,\n      complexBg: this.cynefin?.complexBg || '#C8E6C9',\n      complicatedBg: this.cynefin?.complicatedBg || '#DCEDC8',\n      chaoticBg: this.cynefin?.chaoticBg || '#FFE0B2',\n      clearBg: this.cynefin?.clearBg || '#FFF9C4',\n      confusionBg: this.cynefin?.confusionBg || '#D7CCC8',\n      textColor: this.cynefin?.textColor || this.textColor,\n      labelColor: this.cynefin?.labelColor || this.primaryTextColor,\n    };\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    this.packet = {\n      startByteColor: this.primaryTextColor,\n      endByteColor: this.primaryTextColor,\n      labelColor: this.primaryTextColor,\n      titleColor: this.primaryTextColor,\n      blockStrokeColor: this.primaryTextColor,\n      blockFillColor: this.mainBkg,\n    };\n\n    /* radar */\n    this.radar = {\n      axisColor: this.radar?.axisColor || this.lineColor,\n      axisStrokeWidth: this.radar?.axisStrokeWidth || 2,\n      axisLabelFontSize: this.radar?.axisLabelFontSize || 12,\n      curveOpacity: this.radar?.curveOpacity || 0.5,\n      curveStrokeWidth: this.radar?.curveStrokeWidth || 2,\n      graticuleColor: this.radar?.graticuleColor || '#DEDEDE',\n      graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,\n      graticuleOpacity: this.radar?.graticuleOpacity || 0.3,\n      legendBoxSize: this.radar?.legendBoxSize || 12,\n      legendFontSize: this.radar?.legendFontSize || 12,\n    };\n\n    /* wardley */\n    this.wardleyEvolutionColor = this.wardleyEvolutionColor || '#dc3545';\n    this.wardley = {\n      backgroundColor: this.wardley?.backgroundColor || this.background,\n      axisColor: this.wardley?.axisColor || this.lineColor,\n      axisTextColor: this.wardley?.axisTextColor || this.primaryTextColor,\n      gridColor: this.wardley?.gridColor || this.gridColor,\n      componentFill: this.wardley?.componentFill || this.background,\n      componentStroke: this.wardley?.componentStroke || this.lineColor,\n      componentLabelColor: this.wardley?.componentLabelColor || this.primaryTextColor,\n      linkStroke: this.wardley?.linkStroke || this.lineColor,\n      evolutionStroke: this.wardley?.evolutionStroke || this.wardleyEvolutionColor,\n      annotationStroke: this.wardley?.annotationStroke || this.lineColor,\n      annotationTextColor: this.wardley?.annotationTextColor || this.primaryTextColor,\n      annotationFill: this.wardley?.annotationFill || this.background,\n    };\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      dataLabelColor: this.xyChart?.dataLabelColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || this.primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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    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    /* Event Modeling diagrams                             */\n\n    this.emUiFill = this.emUiFill || 'white';\n    this.emUiStroke = this.emUiStroke || '#dbdada';\n    this.emProcessorFill = this.emProcessorFill || '#edb3f6';\n    this.emProcessorStroke = this.emProcessorStroke || '#b88cbf';\n    this.emReadModelFill = this.emReadModelFill || '#d3f1a2';\n    this.emReadModelStroke = this.emReadModelStroke || '#a3b732';\n    this.emCommandFill = this.emCommandFill || '#bcd6fe';\n    this.emCommandStroke = this.emCommandStroke || '#679ac3';\n    this.emEventFill = this.emEventFill || '#ffb778';\n    this.emEventStroke = this.emEventStroke || '#c19a0f';\n    this.emSwimlaneBackgroundOdd = this.emSwimlaneBackgroundOdd || 'rgb(250,250,250)';\n    this.emSwimlaneBackgroundStroke = this.emSwimlaneBackgroundStroke || 'rgb(240,240,240)';\n    this.emArrowhead = this.emArrowhead || this.lineColor;\n    this.emRelationStroke = this.emRelationStroke || this.lineColor;\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, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\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    this.radius = 5;\n    this.strokeWidth = 1;\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 = this.actorBorder;\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    this.vertLineColor = 'calculated';\n\n    /* C4 Context Diagram variables */\n    this.personBorder = this.primaryBorderColor;\n    this.personBkg = this.mainBkg;\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    this.noteFontWeight = 'normal';\n    this.fontWeight = 'normal';\n\n    /* ER diagram */\n    this.rowOdd = this.rowOdd || lighten(this.mainBkg, 75) || '#ffffff';\n    this.rowEven = this.rowEven || '#f4f4f4';\n\n    /* state colors */\n    this.labelColor = 'black';\n\n    this.errorBkgColor = '#552222';\n    this.errorTextColor = '#552222';\n    this.useGradient = true;\n    this.gradientStart = this.primaryBorderColor;\n    this.gradientStop = this.secondaryBorderColor;\n    this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1))';\n  }\n  updateColors() {\n    this.secondBkg = lighten(this.contrast, 55);\n    this.border2 = this.contrast;\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.actorBorder;\n    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\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    /* Color Scale */\n    /* Each color-set will have a background, a foreground 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    for (let i = 0; i < 5; i++) {\n      this['surface' + i] = this['surface' + i] || adjust(this.mainBkg, { l: -(5 + i * 5) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] || adjust(this.mainBkg, { l: -(8 + i * 5) });\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    /* 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    this.vertLineColor = this.critBkgColor;\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    for (let i = 0; i < 8; i++) {\n      this['venn' + (i + 1)] = this['venn' + (i + 1)] ?? this['cScale' + i];\n    }\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* cynefin */\n    this.cynefin = {\n      domainFontSize: this.cynefin?.domainFontSize || 16,\n      itemFontSize: this.cynefin?.itemFontSize || 12,\n      boundaryColor: this.cynefin?.boundaryColor || this.lineColor,\n      boundaryWidth: this.cynefin?.boundaryWidth || 2,\n      cliffColor: this.cynefin?.cliffColor || '#8B0000',\n      cliffWidth: this.cynefin?.cliffWidth || 4,\n      arrowColor: this.cynefin?.arrowColor || this.lineColor,\n      arrowWidth: this.cynefin?.arrowWidth || 2,\n      complexBg: this.cynefin?.complexBg || '#E8F5E9',\n      complicatedBg: this.cynefin?.complicatedBg || '#E3F2FD',\n      chaoticBg: this.cynefin?.chaoticBg || '#FBE9E7',\n      clearBg: this.cynefin?.clearBg || '#FFF8E1',\n      confusionBg: this.cynefin?.confusionBg || '#F3E5F5',\n      textColor: this.cynefin?.textColor || this.textColor,\n      labelColor: this.cynefin?.labelColor || this.primaryTextColor,\n    };\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      dataLabelColor: this.xyChart?.dataLabelColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0',\n    };\n\n    /* radar */\n    this.radar = {\n      axisColor: this.radar?.axisColor || this.lineColor,\n      axisStrokeWidth: this.radar?.axisStrokeWidth || 2,\n      axisLabelFontSize: this.radar?.axisLabelFontSize || 12,\n      curveOpacity: this.radar?.curveOpacity || 0.5,\n      curveStrokeWidth: this.radar?.curveStrokeWidth || 2,\n      graticuleColor: this.radar?.graticuleColor || '#DEDEDE',\n      graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,\n      graticuleOpacity: this.radar?.graticuleOpacity || 0.3,\n      legendBoxSize: this.radar?.legendBoxSize || 12,\n      legendFontSize: this.radar?.legendFontSize || 12,\n    };\n\n    /* wardley */\n    this.wardleyEvolutionColor = this.wardleyEvolutionColor || '#dc3545';\n    this.wardley = {\n      backgroundColor: this.wardley?.backgroundColor || this.background,\n      axisColor: this.wardley?.axisColor || this.lineColor,\n      axisTextColor: this.wardley?.axisTextColor || this.primaryTextColor,\n      gridColor: this.wardley?.gridColor || this.gridColor,\n      componentFill: this.wardley?.componentFill || this.background,\n      componentStroke: this.wardley?.componentStroke || this.lineColor,\n      componentLabelColor: this.wardley?.componentLabelColor || this.primaryTextColor,\n      linkStroke: this.wardley?.linkStroke || this.lineColor,\n      evolutionStroke: this.wardley?.evolutionStroke || this.wardleyEvolutionColor,\n      annotationStroke: this.wardley?.annotationStroke || this.lineColor,\n      annotationTextColor: this.wardley?.annotationTextColor || this.primaryTextColor,\n      annotationFill: this.wardley?.annotationFill || this.background,\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || this.primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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    /* Event Modeling diagrams                             */\n\n    this.emUiFill = this.emUiFill || 'white';\n    this.emUiStroke = this.emUiStroke || '#dbdada';\n    this.emProcessorFill = this.emProcessorFill || '#edb3f6';\n    this.emProcessorStroke = this.emProcessorStroke || '#b88cbf';\n    this.emReadModelFill = this.emReadModelFill || '#d3f1a2';\n    this.emReadModelStroke = this.emReadModelStroke || '#a3b732';\n    this.emCommandFill = this.emCommandFill || '#bcd6fe';\n    this.emCommandStroke = this.emCommandStroke || '#679ac3';\n    this.emEventFill = this.emEventFill || '#ffb778';\n    this.emEventStroke = this.emEventStroke || '#c19a0f';\n    this.emSwimlaneBackgroundOdd = this.emSwimlaneBackgroundOdd || 'rgb(250,250,250)';\n    this.emSwimlaneBackgroundStroke = this.emSwimlaneBackgroundStroke || 'rgb(240,240,240)';\n    this.emArrowhead = this.emArrowhead || this.lineColor;\n    this.emRelationStroke = this.emRelationStroke || this.lineColor;\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, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\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 = '#ffffff';\n\n    this.primaryColor = '#cccccc';\n    this.mainBkg = '#ffffff';\n\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = '#333';\n\n    this.THEME_COLOR_LIMIT = 12;\n    this.radius = 3;\n    this.strokeWidth = 2;\n    this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n    // dark\n\n    this.fontFamily = 'arial, sans-serif';\n    this.fontSize = '14px';\n\n    // Neo-specific\n    this.nodeBorder = '#000000';\n    this.stateBorder = '#000000';\n    this.useGradient = true;\n    this.gradientStart = '#0042eb';\n    this.gradientStop = '#eb0042';\n    // this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,1))';\n    // this.dropShadow = 'drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.25));';\n    this.dropShadow = 'drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));';\n    this.tertiaryColor = '#ffffff';\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n    this.noteFontWeight = 'normal';\n    this.fontWeight = 'normal';\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.arrowheadColor = this.arrowheadColor || invert(this.background);\n    this.textColor = this.textColor || this.primaryTextColor;\n\n    // TODO: should this instead default to secondaryBorderColor?\n    this.border2 = this.border2 || this.tertiaryBorderColor;\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 || this.actorBorder;\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    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\n\n    /* Gantt chart variables */\n    const primaryColor = '#ECECFE';\n    const secondaryColor = '#E9E9F1';\n    const tertiaryColor = adjust(primaryColor, { h: 180, l: 5 });\n    this.sectionBkgColor = this.sectionBkgColor || tertiaryColor;\n    this.altSectionBkgColor = this.altSectionBkgColor || 'white';\n    this.sectionBkgColor = this.sectionBkgColor || secondaryColor;\n    this.sectionBkgColor2 = this.sectionBkgColor2 || primaryColor;\n    this.excludeBkgColor = this.excludeBkgColor || '#eeeeee';\n    this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;\n    this.taskBkgColor = this.taskBkgColor || primaryColor;\n    this.activeTaskBorderColor = this.activeTaskBorderColor || primaryColor;\n    this.activeTaskBkgColor = this.activeTaskBkgColor || lighten(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.vertLineColor = this.vertLineColor || this.primaryBorderColor;\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    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\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 || '#f0f0f0';\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 foreground and a border color */\n\n    this.cScale0 = this.cScale0 || primaryColor;\n    this.cScale1 = this.cScale1 || secondaryColor;\n    this.cScale2 = this.cScale2 || tertiaryColor;\n    this.cScale3 = this.cScale3 || adjust(primaryColor, { h: 30 });\n    this.cScale4 = this.cScale4 || adjust(primaryColor, { h: 60 });\n    this.cScale5 = this.cScale5 || adjust(primaryColor, { h: 90 });\n    this.cScale6 = this.cScale6 || adjust(primaryColor, { h: 120 });\n    this.cScale7 = this.cScale7 || adjust(primaryColor, { h: 150 });\n    this.cScale8 = this.cScale8 || adjust(primaryColor, { h: 210, l: 150 });\n    this.cScale9 = this.cScale9 || adjust(primaryColor, { h: 270 });\n    this.cScale10 = this.cScale10 || adjust(primaryColor, { h: 300 });\n    this.cScale11 = this.cScale11 || adjust(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 the 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    const multiplier = this.darkMode ? -4 : -1;\n    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\n    }\n\n    /* class */\n    this.classText = this.classText || this.textColor;\n\n    /* user-journey */\n    this.fillType0 = this.fillType0 || primaryColor;\n    this.fillType1 = this.fillType1 || secondaryColor;\n    this.fillType2 = this.fillType2 || adjust(primaryColor, { h: 64 });\n    this.fillType3 = this.fillType3 || adjust(secondaryColor, { h: 64 });\n    this.fillType4 = this.fillType4 || adjust(primaryColor, { h: -64 });\n    this.fillType5 = this.fillType5 || adjust(secondaryColor, { h: -64 });\n    this.fillType6 = this.fillType6 || adjust(primaryColor, { h: 128 });\n    this.fillType7 = this.fillType7 || adjust(secondaryColor, { h: 128 });\n\n    /* pie */\n    this.pie1 = this.pie1 || primaryColor;\n    this.pie2 = this.pie2 || secondaryColor;\n    this.pie3 = this.pie3 || tertiaryColor;\n    this.pie4 = this.pie4 || adjust(primaryColor, { l: -10 });\n    this.pie5 = this.pie5 || adjust(secondaryColor, { l: -10 });\n    this.pie6 = this.pie6 || adjust(tertiaryColor, { l: -10 });\n    this.pie7 = this.pie7 || adjust(primaryColor, { h: +60, l: -10 });\n    this.pie8 = this.pie8 || adjust(primaryColor, { h: -60, l: -10 });\n    this.pie9 = this.pie9 || adjust(primaryColor, { h: 120, l: 0 });\n    this.pie10 = this.pie10 || adjust(primaryColor, { h: +60, l: -20 });\n    this.pie11 = this.pie11 || adjust(primaryColor, { h: -60, l: -20 });\n    this.pie12 = this.pie12 || adjust(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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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 || primaryColor;\n    this.git1 = this.git1 || secondaryColor;\n    this.git2 = this.git2 || tertiaryColor;\n    this.git3 = this.git3 || adjust(primaryColor, { h: -30 });\n    this.git4 = this.git4 || adjust(primaryColor, { h: -60 });\n    this.git5 = this.git5 || adjust(primaryColor, { h: -90 });\n    this.git6 = this.git6 || adjust(primaryColor, { h: +60 });\n    this.git7 = this.git7 || adjust(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 { adjust, darken, invert, isDark, lighten, rgba } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\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 = '#333';\n    this.primaryColor = '#1f2020';\n    this.secondaryColor = lighten(this.primaryColor, 16);\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\n    this.mainBkg = '#2a2020';\n    this.secondBkg = 'calculated';\n    this.mainContrastColor = 'lightgrey';\n    this.darkTextColor = lighten(invert('#323D47'), 10);\n    this.border1 = '#ccc';\n    this.border2 = rgba(255, 255, 255, 0.25);\n    this.arrowheadColor = invert(this.background);\n    this.fontFamily = 'arial, sans-serif';\n    this.fontSize = '14px';\n    this.labelBackground = '#181818';\n    this.textColor = '#ccc';\n    this.THEME_COLOR_LIMIT = 12;\n    this.radius = 3;\n    this.strokeWidth = 1;\n\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = '#333';\n\n    this.THEME_COLOR_LIMIT = 12;\n    // dark\n    this.fontFamily = 'arial, sans-serif';\n    this.fontSize = '14px';\n\n    // Neo-specific\n    // this.nodeBorder = 'none';\n    // this.stateBorder = 'none';\n\n    this.useGradient = true;\n    this.gradientStart = '#0042eb';\n    this.gradientStop = '#eb0042';\n    this.dropShadow = 'drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))';\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    this.noteFontWeight = 'normal';\n    this.fontWeight = 'normal';\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.arrowheadColor = this.arrowheadColor || invert(this.background);\n    this.textColor = this.textColor || this.primaryTextColor;\n\n    // TODO: should this instead default to secondaryBorderColor?\n    this.border2 = this.border2 || this.tertiaryBorderColor;\n\n    /* Flowchart variables */\n    this.nodeBkg = this.nodeBkg || this.primaryColor;\n    this.mainBkg = this.mainBkg || this.primaryColor;\n    this.nodeBorder = this.nodeBorder || this.border1;\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 || this.actorBorder;\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    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\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.vertLineColor = this.vertLineColor || this.primaryBorderColor;\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    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\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 || '#f0f0f0';\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 foreground 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 the 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    const multiplier = this.darkMode ? -4 : -1;\n    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || this.primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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 || '#0b0000';\n    this.git1 = this.git1 || '#4d1037';\n    this.git2 = this.git2 || '#3f5258';\n    this.git3 = this.git3 || '#4f2f1b';\n    this.git4 = this.git4 || '#6e0a0a';\n    this.git5 = this.git5 || '#3b0048';\n    this.git6 = this.git6 || '#995a01';\n    this.git7 = this.git7 || '#154706';\n    this.gitDarkMode = true;\n    if (this.gitDarkMode) {\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 { darken, lighten, adjust, invert, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\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 = '#ffffff';\n\n    this.primaryColor = '#cccccc';\n    this.mainBkg = '#ffffff';\n\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = '#28253D';\n\n    this.THEME_COLOR_LIMIT = 12;\n    this.radius = 12;\n    this.strokeWidth = 2;\n\n    this.primaryBorderColor = mkBorder('#28253D', this.darkMode);\n    // dark\n\n    this.fontFamily = '\"Recursive Variable\", arial, sans-serif';\n    this.fontSize = '14px';\n\n    // Neo-specific\n    this.nodeBorder = '#28253D';\n    this.stateBorder = '#28253D';\n    this.useGradient = false;\n    this.gradientStart = '#0042eb';\n    this.gradientStop = '#eb0042';\n    this.dropShadow = 'url(#drop-shadow)';\n    this.nodeShadow = true;\n    this.tertiaryColor = '#ffffff';\n    this.clusterBkg = '#F9F9FB';\n    this.clusterBorder = '#BDBCCC';\n    this.noteBorderColor = '#FACC15';\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    /* Sequence Diagram variables */\n    this.actorBorder = '#28253D';\n\n    this.filterColor = '#000000';\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' : '#28253D'); // 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 || '#FEF9C3';\n    this.noteTextColor = this.noteTextColor || '#28253D';\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.arrowheadColor = this.arrowheadColor || invert(this.background);\n    this.textColor = this.textColor || this.primaryTextColor;\n\n    // TODO: should this instead default to secondaryBorderColor?\n    this.border2 = this.border2 || this.tertiaryBorderColor;\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    this.noteFontWeight = 600;\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 || this.actorBorder;\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    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\n\n    /* Gantt chart variables */\n    const primaryColor = '#ECECFE';\n    const secondaryColor = '#E9E9F1';\n    const tertiaryColor = adjust(primaryColor, { h: 180, l: 5 });\n    this.sectionBkgColor = this.sectionBkgColor || tertiaryColor;\n    this.altSectionBkgColor = this.altSectionBkgColor || 'white';\n    this.sectionBkgColor = this.sectionBkgColor || secondaryColor;\n    this.sectionBkgColor2 = this.sectionBkgColor2 || primaryColor;\n    this.excludeBkgColor = this.excludeBkgColor || '#eeeeee';\n    this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;\n    this.taskBkgColor = this.taskBkgColor || primaryColor;\n    this.activeTaskBorderColor = this.activeTaskBorderColor || primaryColor;\n    this.activeTaskBkgColor = this.activeTaskBkgColor || lighten(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.vertLineColor = this.vertLineColor || this.primaryBorderColor;\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    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\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    this.compositeTitleBackground = '#F9F9FB';\n    this.altBackground = '#F9F9FB';\n    this.stateEdgeLabelBackground = '#FFFFFF';\n    this.fontWeight = 600;\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.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 foreground and a border color */\n\n    for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {\n      this['cScale' + i] = this.mainBkg;\n    }\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 the 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    const multiplier = this.darkMode ? -4 : -1;\n    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\n    }\n\n    /* class */\n    this.classText = this.classText || this.textColor;\n\n    /* user-journey */\n    this.fillType0 = this.fillType0 || primaryColor;\n    this.fillType1 = this.fillType1 || secondaryColor;\n    this.fillType2 = this.fillType2 || adjust(primaryColor, { h: 64 });\n    this.fillType3 = this.fillType3 || adjust(secondaryColor, { h: 64 });\n    this.fillType4 = this.fillType4 || adjust(primaryColor, { h: -64 });\n    this.fillType5 = this.fillType5 || adjust(secondaryColor, { h: -64 });\n    this.fillType6 = this.fillType6 || adjust(primaryColor, { h: 128 });\n    this.fillType7 = this.fillType7 || adjust(secondaryColor, { h: 128 });\n\n    /* pie */\n    this.pie1 = this.pie1 || primaryColor;\n    this.pie2 = this.pie2 || secondaryColor;\n    this.pie3 = this.pie3 || tertiaryColor;\n    this.pie4 = this.pie4 || adjust(primaryColor, { l: -10 });\n    this.pie5 = this.pie5 || adjust(secondaryColor, { l: -10 });\n    this.pie6 = this.pie6 || adjust(tertiaryColor, { l: -10 });\n    this.pie7 = this.pie7 || adjust(primaryColor, { h: +60, l: -10 });\n    this.pie8 = this.pie8 || adjust(primaryColor, { h: -60, l: -10 });\n    this.pie9 = this.pie9 || adjust(primaryColor, { h: 120, l: 0 });\n    this.pie10 = this.pie10 || adjust(primaryColor, { h: +60, l: -20 });\n    this.pie11 = this.pie11 || adjust(primaryColor, { h: -60, l: -20 });\n    this.pie12 = this.pie12 || adjust(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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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    this.requirementEdgeLabelBackground = '#FFFFFF';\n\n    /* git */\n    this.git0 = this.git0 || primaryColor;\n    this.git1 = this.git1 || secondaryColor;\n    this.git2 = this.git2 || tertiaryColor;\n    this.git3 = this.git3 || adjust(primaryColor, { h: -30 });\n    this.git4 = this.git4 || adjust(primaryColor, { h: -60 });\n    this.git5 = this.git5 || adjust(primaryColor, { h: -90 });\n    this.git6 = this.git6 || adjust(primaryColor, { h: +60 });\n    this.git7 = this.git7 || adjust(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    this.commitLineColor = this.commitLineColor ?? '#BDBCCC';\n\n    /* -------------------------------------------------- */\n    /* EntityRelationship diagrams                        */\n    this.erEdgeLabelBackground = '#FFFFFF';\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 { adjust, darken, invert, isDark, lighten, rgba } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\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 = '#333';\n    this.primaryColor = '#1f2020';\n    this.secondaryColor = lighten(this.primaryColor, 16);\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\n    this.mainBkg = '#111113';\n    this.secondBkg = 'calculated';\n    this.mainContrastColor = 'lightgrey';\n    this.darkTextColor = lighten(invert('#323D47'), 10);\n    this.border1 = '#ccc';\n    this.border2 = rgba(255, 255, 255, 0.25);\n    this.arrowheadColor = invert(this.background);\n    this.fontFamily = '\"Recursive Variable\", arial, sans-serif';\n    this.fontSize = '14px';\n    this.labelBackground = '#111113';\n    this.textColor = '#ccc';\n    this.THEME_COLOR_LIMIT = 12;\n    this.radius = 12;\n    this.strokeWidth = 2;\n\n    this.noteBkgColor = this.noteBkgColor ?? '#FEF9C3';\n    this.noteTextColor = this.noteTextColor ?? '#28253D';\n\n    this.THEME_COLOR_LIMIT = 12;\n    // dark\n    this.fontFamily = '\"Recursive Variable\", arial, sans-serif';\n    this.fontSize = '14px';\n\n    // Neo-specific\n    this.nodeBorder = '#FFFFFF';\n    this.stateBorder = '#FFFFFF';\n\n    this.useGradient = false;\n    this.gradientStart = '#0042eb';\n    this.gradientStop = '#eb0042';\n    this.dropShadow = 'url(#drop-shadow)';\n    this.nodeShadow = true;\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    /* Class Diagram variables */\n    this.clusterBkg = '#1E1A2E';\n    this.clusterBorder = '#BDBCCC';\n    this.noteBorderColor = '#FACC15';\n\n    /* Sequence Diagram variables */\n    this.noteFontWeight = 600;\n\n    this.filterColor = '#FFFFFF';\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' : '#FFFFFF'); // 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 || '#FFFFFF';\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.arrowheadColor = this.arrowheadColor || invert(this.background);\n    this.textColor = this.textColor || this.primaryTextColor;\n\n    // TODO: should this instead default to secondaryBorderColor?\n    this.border2 = this.border2 || this.tertiaryBorderColor;\n\n    /* Flowchart variables */\n    this.nodeBkg = this.nodeBkg || this.primaryColor;\n    this.mainBkg = this.mainBkg || this.primaryColor;\n    this.nodeBorder = this.nodeBorder || this.border1;\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\n    /* Sequence Diagram variables */\n\n    this.actorBorder = '#FFFFFF';\n    this.signalColor = '#FFFFFF';\n    this.labelBoxBorderColor = '#BDBCCC';\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 || this.actorBorder;\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    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\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    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\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    this.vertLineColor = this.vertLineColor || this.primaryBorderColor;\n    this.compositeBackground = '#16141F';\n    this.altBackground = '#16141F';\n    this.compositeTitleBackground = '#16141F';\n    this.stateEdgeLabelBackground = '#16141F';\n    this.fontWeight = 600;\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.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 foreground 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 the 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    const multiplier = this.darkMode ? -4 : -1;\n    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || this.primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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    this.requirementEdgeLabelBackground = '#16141F';\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    this.commitLineColor = this.commitLineColor ?? '#BDBCCC';\n\n    /* -------------------------------------------------- */\n    /* EntityRelationship diagrams                        */\n    this.erEdgeLabelBackground = '#16141F';\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, isDark } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\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 = '#ffffff';\n\n    this.primaryColor = '#cccccc';\n    this.mainBkg = '#ffffff';\n\n    this.noteBkgColor = '#fff5ad';\n    this.noteTextColor = '#28253D';\n\n    this.THEME_COLOR_LIMIT = 12;\n    this.radius = 12;\n    this.strokeWidth = 2;\n\n    this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);\n    // dark\n\n    this.fontFamily = '\"Recursive Variable\", arial, sans-serif';\n    this.fontSize = '14px';\n\n    // Neo-specific\n    this.nodeBorder = '#28253D';\n    this.stateBorder = '#28253D';\n    this.useGradient = false;\n    this.gradientStart = '#0042eb';\n    this.gradientStop = '#eb0042';\n    this.dropShadow = 'url(#drop-shadow)';\n    this.nodeShadow = true;\n    this.tertiaryColor = '#ffffff';\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    /* Sequence Diagram variables */\n    this.actorBorder = '#28253D';\n    this.noteBorderColor = '#FACC15';\n    this.noteFontWeight = 600;\n\n    this.borderColorArray = [\n      '#E879F9', //Fuchsia-400\n      '#2DD4BF', //Teal-400\n      '#FB923C', //Orange-400\n      '#22D3EE', // Cyan-400\n      '#4ADE80', // Green-400\n      '#A78BFA', //Violet-400\n      '#F87171', //red-400\n      '#FACC15', //yellow-400\n      '#818CF8', //indigo-400\n      '#A3E635 ', //Lime-400\n      '#38BDF8', //Sky-400\n      '#FB7185', //Rose-400\n    ];\n\n    this.bkgColorArray = [\n      '#FDF4FF', //Fuchsia-50\n      '#F0FDFA', //Teal-50\n      '#FFF7ED', //Orange-50\n      '#ECFEFF', // Cyan-50\n      '#F0FDF4', // Green-50\n      '#F5F3FF', //Violet-50\n      '#FEF2F2', //red-50\n      '#FEFCE8', //yellow-50\n      '#EEF2FF', //indigo-50\n      '#F7FEE7', //Lime-50\n      '#F0F9FF', //Sky-50\n      '#FFF1F2', //Rose-50\n    ];\n\n    this.filterColor = '#000000';\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' : '#28253D'); // 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 || '#28253D';\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.arrowheadColor = this.arrowheadColor || invert(this.background);\n    this.textColor = this.textColor || this.primaryTextColor;\n\n    // TODO: should this instead default to secondaryBorderColor?\n    this.border2 = this.border2 || this.tertiaryBorderColor;\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 || this.actorBorder;\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    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\n\n    /* Gantt chart variables */\n    const primaryColor = '#ECECFE';\n    const secondaryColor = '#E9E9F1';\n    const tertiaryColor = adjust(primaryColor, { h: 180, l: 5 });\n    this.sectionBkgColor = this.sectionBkgColor || tertiaryColor;\n    this.altSectionBkgColor = this.altSectionBkgColor || 'white';\n    this.sectionBkgColor = this.sectionBkgColor || secondaryColor;\n    this.sectionBkgColor2 = this.sectionBkgColor2 || primaryColor;\n    this.excludeBkgColor = this.excludeBkgColor || '#eeeeee';\n    this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;\n    this.taskBkgColor = this.taskBkgColor || primaryColor;\n    this.activeTaskBorderColor = this.activeTaskBorderColor || primaryColor;\n    this.activeTaskBkgColor = this.activeTaskBkgColor || lighten(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.vertLineColor = this.vertLineColor || this.primaryBorderColor;\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    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\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 || '#f0f0f0';\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 foreground and a border color */\n\n    this.cScale0 = this.cScale0 || '#f4a8ff'; // Fuchsia-300\n    this.cScale1 = this.cScale1 || '#46ecd5'; // Teal-300\n    this.cScale2 = this.cScale2 || '#ffb86a'; // Orange-300\n    this.cScale3 = this.cScale3 || '#dab2ff'; // Purple-300\n    this.cScale4 = this.cScale4 || '#7bf1a8'; // Green-300\n    this.cScale5 = this.cScale5 || '#c4b4ff'; // Violet-300\n    this.cScale6 = this.cScale6 || '#ffa2a2'; // Red-300\n    this.cScale7 = this.cScale7 || '#ffdf20'; // Yellow-300\n    this.cScale8 = this.cScale8 || '#a3b3ff'; // Indigo-300\n    this.cScale9 = this.cScale9 || '#bbf451'; // Lime-300\n    this.cScale10 = this.cScale10 || '#74d4ff'; // Sky-300\n    this.cScale11 = this.cScale11 || '#ffa1ad'; // Rose-300\n\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 the 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    const multiplier = this.darkMode ? -4 : -1;\n    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\n    }\n\n    /* class */\n    this.classText = this.classText || this.textColor;\n\n    /* user-journey */\n    this.fillType0 = this.fillType0 || primaryColor;\n    this.fillType1 = this.fillType1 || secondaryColor;\n    this.fillType2 = this.fillType2 || adjust(primaryColor, { h: 64 });\n    this.fillType3 = this.fillType3 || adjust(secondaryColor, { h: 64 });\n    this.fillType4 = this.fillType4 || adjust(primaryColor, { h: -64 });\n    this.fillType5 = this.fillType5 || adjust(secondaryColor, { h: -64 });\n    this.fillType6 = this.fillType6 || adjust(primaryColor, { h: 128 });\n    this.fillType7 = this.fillType7 || adjust(secondaryColor, { h: 128 });\n\n    /* pie */\n    this.pie1 = this.pie1 || primaryColor;\n    this.pie2 = this.pie2 || secondaryColor;\n    this.pie3 = this.pie3 || tertiaryColor;\n    this.pie4 = this.pie4 || adjust(primaryColor, { l: -10 });\n    this.pie5 = this.pie5 || adjust(secondaryColor, { l: -10 });\n    this.pie6 = this.pie6 || adjust(tertiaryColor, { l: -10 });\n    this.pie7 = this.pie7 || adjust(primaryColor, { h: +60, l: -10 });\n    this.pie8 = this.pie8 || adjust(primaryColor, { h: -60, l: -10 });\n    this.pie9 = this.pie9 || adjust(primaryColor, { h: 120, l: 0 });\n    this.pie10 = this.pie10 || adjust(primaryColor, { h: +60, l: -20 });\n    this.pie11 = this.pie11 || adjust(primaryColor, { h: -60, l: -20 });\n    this.pie12 = this.pie12 || adjust(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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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 || primaryColor;\n    this.git1 = this.git1 || secondaryColor;\n    this.git2 = this.git2 || tertiaryColor;\n    this.git3 = this.git3 || adjust(primaryColor, { h: -30 });\n    this.git4 = this.git4 || adjust(primaryColor, { h: -60 });\n    this.git5 = this.git5 || adjust(primaryColor, { h: -90 });\n    this.git6 = this.git6 || adjust(primaryColor, { h: +60 });\n    this.git7 = this.git7 || adjust(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.commitLineColor = this.commitLineColor ?? '#BDBCCC';\n    this.commitLabelFontSize = this.commitLabelFontSize || '10px';\n    this.fontWeight = 600;\n\n    /* -------------------------------------------------- */\n    /* EntityRelationship diagrams                        */\n    this.erEdgeLabelBackground = '#FFFFFF';\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 { adjust, darken, invert, isDark, lighten, rgba } from 'khroma';\nimport { mkBorder } from './theme-helpers.js';\nimport {\n  oldAttributeBackgroundColorEven,\n  oldAttributeBackgroundColorOdd,\n} from './erDiagram-oldHardcodedValues.js';\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 = '#333';\n    this.primaryColor = '#1f2020';\n    this.secondaryColor = lighten(this.primaryColor, 16);\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\n    this.mainBkg = '#111113';\n    this.secondBkg = 'calculated';\n    this.mainContrastColor = 'lightgrey';\n    this.darkTextColor = lighten(invert('#323D47'), 10);\n    this.border1 = '#ccc';\n    this.border2 = rgba(255, 255, 255, 0.25);\n    this.arrowheadColor = invert(this.background);\n    this.fontFamily = '\"Recursive Variable\", arial, sans-serif';\n    this.fontSize = '14px';\n    this.labelBackground = '#111113';\n    this.textColor = '#ccc';\n    this.THEME_COLOR_LIMIT = 12;\n    this.radius = 12;\n    this.strokeWidth = 2;\n\n    this.noteBkgColor = this.noteBkgColor ?? '#FEF9C3';\n    this.noteTextColor = this.noteTextColor ?? '#28253D';\n\n    this.THEME_COLOR_LIMIT = 12;\n    // dark\n    this.fontFamily = '\"Recursive Variable\", arial, sans-serif';\n    this.fontSize = '14px';\n\n    // Neo-specific\n    this.nodeBorder = '#FFFFFF';\n    this.stateBorder = '#FFFFFF';\n\n    this.useGradient = false;\n    this.gradientStart = '#0042eb';\n    this.gradientStop = '#eb0042';\n    this.dropShadow = 'url(#drop-shadow)';\n    this.nodeShadow = true;\n\n    /* Architecture Diagram variables */\n    this.archEdgeColor = 'calculated';\n    this.archEdgeArrowColor = 'calculated';\n    this.archEdgeWidth = '3';\n    this.archGroupBorderColor = this.primaryBorderColor;\n    this.archGroupBorderWidth = '2px';\n\n    /* Class Diagram variables */\n    this.clusterBkg = '#1E1A2E';\n    this.clusterBorder = '#BDBCCC';\n    this.noteBorderColor = '#FACC15';\n\n    /* Sequence Diagram variables */\n    this.noteFontWeight = 600;\n\n    this.borderColorArray = [\n      '#E879F9', //Fuchsia-400\n      '#2DD4BF', //Teal-400\n      '#FB923C', //Orange-400\n      '#22D3EE', // Cyan-400\n      '#4ADE80', // Green-400\n      '#A78BFA', //Violet-400\n      '#F87171', //red-400\n      '#FACC15', //yellow-400\n      '#818CF8', //indigo-400\n      '#A3E635 ', //Lime-400\n      '#38BDF8', //Sky-400\n      '#FB7185', //Rose-400\n    ];\n\n    this.bkgColorArray = [];\n\n    this.filterColor = '#FFFFFF';\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' : '#FFFFFF'); // 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 || '#FFFFFF';\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.arrowheadColor = this.arrowheadColor || invert(this.background);\n    this.textColor = this.textColor || this.primaryTextColor;\n\n    // TODO: should this instead default to secondaryBorderColor?\n    this.border2 = this.border2 || this.tertiaryBorderColor;\n\n    /* Flowchart variables */\n    this.nodeBkg = this.nodeBkg || this.primaryColor;\n    this.mainBkg = this.mainBkg || this.primaryColor;\n    this.nodeBorder = this.nodeBorder || this.border1;\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\n    /* Sequence Diagram variables */\n\n    this.actorBorder = '#FFFFFF';\n    this.signalColor = '#FFFFFF';\n    this.labelBoxBorderColor = '#BDBCCC';\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 || this.actorBorder;\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    this.rectBkgColor = this.rectBkgColor || this.tertiaryColor;\n\n    /* Mindmap Diagram variables */\n    this.rootLabelColor = '#FFFFFF';\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.vertLineColor = this.vertLineColor || this.primaryBorderColor;\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    /* Architecture Diagram variables */\n    this.archEdgeColor = this.lineColor;\n    this.archEdgeArrowColor = this.lineColor;\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 || '#f0f0f0';\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 foreground and a border color */\n    this.cScale0 = this.cScale0 || '#f4a8ff'; // Fuchsia-300\n    this.cScale1 = this.cScale1 || '#46ecd5'; // Teal-300\n    this.cScale2 = this.cScale2 || '#ffb86a'; // Orange-300\n    this.cScale3 = this.cScale3 || '#dab2ff'; // Purple-300\n    this.cScale4 = this.cScale4 || '#7bf1a8'; // Green-300\n    this.cScale5 = this.cScale5 || '#c4b4ff'; // Violet-300\n    this.cScale6 = this.cScale6 || '#ffa2a2'; // Red-300\n    this.cScale7 = this.cScale7 || '#ffdf20'; // Yellow-300\n    this.cScale8 = this.cScale8 || '#a3b3ff'; // Indigo-300\n    this.cScale9 = this.cScale9 || '#bbf451'; // Lime-300\n    this.cScale10 = this.cScale10 || '#74d4ff'; // Sky-300\n    this.cScale11 = this.cScale11 || '#ffa1ad'; // Rose-300\n\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 the 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] = darken(this['cScale' + i], 75);\n    }\n\n    const multiplier = this.darkMode ? -4 : -1;\n    for (let i = 0; i < 5; i++) {\n      this['surface' + i] =\n        this['surface' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });\n      this['surfacePeer' + i] =\n        this['surfacePeer' + i] ||\n        adjust(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });\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.pieOuterStrokeWidth = this.pieOuterStrokeWidth || '2px';\n    this.pieOuterStrokeColor = this.pieOuterStrokeColor || 'black';\n    this.pieOpacity = this.pieOpacity || '0.7';\n\n    /* venn */\n    this.vennTitleTextColor = this.vennTitleTextColor ?? this.titleColor;\n    this.vennSetTextColor = this.vennSetTextColor ?? this.textColor;\n\n    /* quadrant-graph */\n    this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;\n    this.quadrant2Fill = this.quadrant2Fill || adjust(this.primaryColor, { r: 5, g: 5, b: 5 });\n    this.quadrant3Fill = this.quadrant3Fill || adjust(this.primaryColor, { r: 10, g: 10, b: 10 });\n    this.quadrant4Fill = this.quadrant4Fill || adjust(this.primaryColor, { r: 15, g: 15, b: 15 });\n    this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;\n    this.quadrant2TextFill =\n      this.quadrant2TextFill || adjust(this.primaryTextColor, { r: -5, g: -5, b: -5 });\n    this.quadrant3TextFill =\n      this.quadrant3TextFill || adjust(this.primaryTextColor, { r: -10, g: -10, b: -10 });\n    this.quadrant4TextFill =\n      this.quadrant4TextFill || adjust(this.primaryTextColor, { r: -15, g: -15, b: -15 });\n    this.quadrantPointFill =\n      this.quadrantPointFill || isDark(this.quadrant1Fill)\n        ? lighten(this.quadrant1Fill)\n        : darken(this.quadrant1Fill);\n    this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;\n    this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;\n    this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;\n    this.quadrantInternalBorderStrokeFill =\n      this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantExternalBorderStrokeFill =\n      this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;\n    this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;\n\n    /* xychart */\n    this.xyChart = {\n      backgroundColor: this.xyChart?.backgroundColor || this.background,\n      titleColor: this.xyChart?.titleColor || this.primaryTextColor,\n      xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,\n      xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,\n      xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,\n      xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,\n      yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,\n      yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,\n      yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,\n      yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,\n      plotColorPalette:\n        this.xyChart?.plotColorPalette ||\n        '#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0',\n    };\n\n    /* requirement-diagram */\n    this.requirementBackground = this.requirementBackground || this.primaryColor;\n    this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;\n    this.requirementBorderSize = this.requirementBorderSize || '1';\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    this.commitLineColor = this.commitLineColor ?? '#BDBCCC';\n    this.fontWeight = 600;\n\n    /* -------------------------------------------------- */\n    /* EntityRelationship diagrams                        */\n    this.erEdgeLabelBackground = '#16141F';\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.js';\nimport { getThemeVariables as darkThemeVariables } from './theme-dark.js';\nimport { getThemeVariables as defaultThemeVariables } from './theme-default.js';\nimport { getThemeVariables as forestThemeVariables } from './theme-forest.js';\nimport { getThemeVariables as neutralThemeVariables } from './theme-neutral.js';\nimport { getThemeVariables as neoThemeVariables } from './theme-neo.js';\nimport { getThemeVariables as neoDarkThemeVariables } from './theme-neo-dark.js';\nimport { getThemeVariables as reduxThemeVariables } from './theme-redux.js';\nimport { getThemeVariables as reduxDarkThemeVariables } from './theme-redux-dark.js';\nimport { getThemeVariables as reduxColorThemeVariables } from './theme-redux-color.js';\nimport { getThemeVariables as reduxDarkColorThemeVariables } from './theme-redux-dark-color.js';\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  neo: {\n    getThemeVariables: neoThemeVariables,\n  },\n  'neo-dark': {\n    getThemeVariables: neoDarkThemeVariables,\n  },\n  redux: {\n    getThemeVariables: reduxThemeVariables,\n  },\n  'redux-dark': {\n    getThemeVariables: reduxDarkThemeVariables,\n  },\n  'redux-color': {\n    getThemeVariables: reduxColorThemeVariables,\n  },\n  'redux-dark-color': {\n    getThemeVariables: reduxDarkColorThemeVariables,\n  },\n};\n","export default {\n  \"flowchart\": {\n    \"useMaxWidth\": true,\n    \"titleTopMargin\": 25,\n    \"subGraphTitleMargin\": {\n      \"top\": 0,\n      \"bottom\": 0\n    },\n    \"diagramPadding\": 8,\n    \"htmlLabels\": null,\n    \"nodeSpacing\": 50,\n    \"rankSpacing\": 50,\n    \"curve\": \"basis\",\n    \"padding\": 15,\n    \"defaultRenderer\": \"dagre-wrapper\",\n    \"wrappingWidth\": 200,\n    \"inheritDir\": false\n  },\n  \"swimlane\": {\n    \"useMaxWidth\": true,\n    \"lineHops\": \"arc\",\n    \"ignoreCrossLaneEdges\": true,\n    \"optimizeRanksByCrossings\": true,\n    \"automaticLaneOrdering\": false\n  },\n  \"sequence\": {\n    \"useMaxWidth\": true,\n    \"hideUnusedParticipants\": false,\n    \"activationWidth\": 10,\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    \"forceMenus\": false,\n    \"bottomMarginAdj\": 1,\n    \"rightAngles\": false,\n    \"showSequenceNumbers\": false,\n    \"actorFontSize\": 14,\n    \"actorFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"actorFontWeight\": 400,\n    \"noteFontSize\": 14,\n    \"noteFontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif\",\n    \"noteFontWeight\": 400,\n    \"noteAlign\": \"center\",\n    \"messageFontSize\": 16,\n    \"messageFontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif\",\n    \"messageFontWeight\": 400,\n    \"wrap\": false,\n    \"wrapPadding\": 10,\n    \"labelBoxWidth\": 50,\n    \"labelBoxHeight\": 20\n  },\n  \"gantt\": {\n    \"useMaxWidth\": true,\n    \"titleTopMargin\": 25,\n    \"barHeight\": 20,\n    \"barGap\": 4,\n    \"topPadding\": 50,\n    \"rightPadding\": 75,\n    \"leftPadding\": 75,\n    \"gridLineStartPadding\": 35,\n    \"fontSize\": 11,\n    \"sectionFontSize\": 11,\n    \"numberSectionStyles\": 4,\n    \"axisFormat\": \"%Y-%m-%d\",\n    \"topAxis\": false,\n    \"displayMode\": \"\",\n    \"weekday\": \"sunday\"\n  },\n  \"journey\": {\n    \"useMaxWidth\": true,\n    \"diagramMarginX\": 50,\n    \"diagramMarginY\": 10,\n    \"leftMargin\": 150,\n    \"maxLabelWidth\": 360,\n    \"width\": 150,\n    \"height\": 50,\n    \"boxMargin\": 10,\n    \"boxTextMargin\": 5,\n    \"noteMargin\": 10,\n    \"messageMargin\": 35,\n    \"messageAlign\": \"center\",\n    \"bottomMarginAdj\": 1,\n    \"rightAngles\": false,\n    \"taskFontSize\": 14,\n    \"taskFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"taskMargin\": 50,\n    \"activationWidth\": 10,\n    \"textPlacement\": \"fo\",\n    \"actorColours\": [\n      \"#8FBC8F\",\n      \"#7CFC00\",\n      \"#00FFFF\",\n      \"#20B2AA\",\n      \"#B0E0E6\",\n      \"#FFFFE0\"\n    ],\n    \"sectionFills\": [\n      \"#191970\",\n      \"#8B008B\",\n      \"#4B0082\",\n      \"#2F4F4F\",\n      \"#800000\",\n      \"#8B4513\",\n      \"#00008B\"\n    ],\n    \"sectionColours\": [\n      \"#fff\"\n    ],\n    \"titleColor\": \"\",\n    \"titleFontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif\",\n    \"titleFontSize\": \"4ex\"\n  },\n  \"class\": {\n    \"useMaxWidth\": true,\n    \"titleTopMargin\": 25,\n    \"arrowMarkerAbsolute\": false,\n    \"dividerMargin\": 10,\n    \"padding\": 5,\n    \"textHeight\": 10,\n    \"defaultRenderer\": \"dagre-wrapper\",\n    \"htmlLabels\": false,\n    \"hideEmptyMembersBox\": false,\n    \"hierarchicalNamespaces\": true\n  },\n  \"state\": {\n    \"useMaxWidth\": true,\n    \"titleTopMargin\": 25,\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    \"miniPadding\": 2,\n    \"fontSizeFactor\": 5.02,\n    \"fontSize\": 24,\n    \"labelHeight\": 16,\n    \"edgeLengthFactor\": \"20\",\n    \"compositTitleSize\": 35,\n    \"radius\": 5,\n    \"defaultRenderer\": \"dagre-wrapper\"\n  },\n  \"er\": {\n    \"useMaxWidth\": true,\n    \"titleTopMargin\": 25,\n    \"diagramPadding\": 20,\n    \"layoutDirection\": \"TB\",\n    \"minEntityWidth\": 100,\n    \"minEntityHeight\": 75,\n    \"entityPadding\": 15,\n    \"nodeSpacing\": 140,\n    \"rankSpacing\": 80,\n    \"stroke\": \"gray\",\n    \"fill\": \"honeydew\",\n    \"fontSize\": 12\n  },\n  \"pie\": {\n    \"useMaxWidth\": true,\n    \"textPosition\": 0.75,\n    \"donutHole\": 0,\n    \"legendPosition\": \"right\",\n    \"highlightSlice\": \"\"\n  },\n  \"quadrantChart\": {\n    \"useMaxWidth\": true,\n    \"chartWidth\": 500,\n    \"chartHeight\": 500,\n    \"titleFontSize\": 20,\n    \"titlePadding\": 10,\n    \"quadrantPadding\": 5,\n    \"xAxisLabelPadding\": 5,\n    \"yAxisLabelPadding\": 5,\n    \"xAxisLabelFontSize\": 16,\n    \"yAxisLabelFontSize\": 16,\n    \"quadrantLabelFontSize\": 16,\n    \"quadrantTextTopPadding\": 5,\n    \"pointTextPadding\": 5,\n    \"pointLabelFontSize\": 12,\n    \"pointRadius\": 5,\n    \"xAxisPosition\": \"top\",\n    \"yAxisPosition\": \"left\",\n    \"quadrantInternalBorderStrokeWidth\": 1,\n    \"quadrantExternalBorderStrokeWidth\": 2\n  },\n  \"xyChart\": {\n    \"useMaxWidth\": true,\n    \"width\": 700,\n    \"height\": 500,\n    \"titleFontSize\": 20,\n    \"titlePadding\": 10,\n    \"showDataLabel\": false,\n    \"showDataLabelOutsideBar\": false,\n    \"showTitle\": true,\n    \"xAxis\": {\n      \"$ref\": \"#/$defs/XYChartAxisConfig\",\n      \"showLabel\": true,\n      \"labelFontSize\": 14,\n      \"labelPadding\": 5,\n      \"showTitle\": true,\n      \"titleFontSize\": 16,\n      \"titlePadding\": 5,\n      \"showTick\": true,\n      \"tickLength\": 5,\n      \"tickWidth\": 2,\n      \"showAxisLine\": true,\n      \"axisLineWidth\": 2,\n      \"labelRotation\": 0\n    },\n    \"yAxis\": {\n      \"$ref\": \"#/$defs/XYChartAxisConfig\",\n      \"showLabel\": true,\n      \"labelFontSize\": 14,\n      \"labelPadding\": 5,\n      \"showTitle\": true,\n      \"titleFontSize\": 16,\n      \"titlePadding\": 5,\n      \"showTick\": true,\n      \"tickLength\": 5,\n      \"tickWidth\": 2,\n      \"showAxisLine\": true,\n      \"axisLineWidth\": 2,\n      \"labelRotation\": 0\n    },\n    \"chartOrientation\": \"vertical\",\n    \"plotReservedSpacePercent\": 50\n  },\n  \"requirement\": {\n    \"useMaxWidth\": true,\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  \"mindmap\": {\n    \"useMaxWidth\": true,\n    \"padding\": 10,\n    \"maxNodeWidth\": 200,\n    \"layoutAlgorithm\": \"cose-bilkent\"\n  },\n  \"ishikawa\": {\n    \"useMaxWidth\": true,\n    \"diagramPadding\": 20\n  },\n  \"kanban\": {\n    \"useMaxWidth\": true,\n    \"padding\": 8,\n    \"sectionWidth\": 200,\n    \"ticketBaseUrl\": \"\"\n  },\n  \"timeline\": {\n    \"useMaxWidth\": true,\n    \"diagramMarginX\": 50,\n    \"diagramMarginY\": 10,\n    \"leftMargin\": 150,\n    \"width\": 150,\n    \"height\": 50,\n    \"boxMargin\": 10,\n    \"boxTextMargin\": 5,\n    \"noteMargin\": 10,\n    \"messageMargin\": 35,\n    \"messageAlign\": \"center\",\n    \"bottomMarginAdj\": 1,\n    \"rightAngles\": false,\n    \"taskFontSize\": 14,\n    \"taskFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"taskMargin\": 50,\n    \"activationWidth\": 10,\n    \"textPlacement\": \"fo\",\n    \"actorColours\": [\n      \"#8FBC8F\",\n      \"#7CFC00\",\n      \"#00FFFF\",\n      \"#20B2AA\",\n      \"#B0E0E6\",\n      \"#FFFFE0\"\n    ],\n    \"sectionFills\": [\n      \"#191970\",\n      \"#8B008B\",\n      \"#4B0082\",\n      \"#2F4F4F\",\n      \"#800000\",\n      \"#8B4513\",\n      \"#00008B\"\n    ],\n    \"sectionColours\": [\n      \"#fff\"\n    ],\n    \"disableMulticolor\": false\n  },\n  \"gitGraph\": {\n    \"useMaxWidth\": true,\n    \"titleTopMargin\": 25,\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    \"parallelCommits\": false,\n    \"arrowMarkerAbsolute\": false\n  },\n  \"c4\": {\n    \"useMaxWidth\": true,\n    \"diagramMarginX\": 50,\n    \"diagramMarginY\": 10,\n    \"c4ShapeMargin\": 50,\n    \"c4ShapePadding\": 20,\n    \"width\": 216,\n    \"height\": 60,\n    \"boxMargin\": 10,\n    \"c4ShapeInRow\": 4,\n    \"nextLinePaddingX\": 0,\n    \"c4BoundaryInRow\": 2,\n    \"personFontSize\": 14,\n    \"personFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"personFontWeight\": \"normal\",\n    \"external_personFontSize\": 14,\n    \"external_personFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_personFontWeight\": \"normal\",\n    \"systemFontSize\": 14,\n    \"systemFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"systemFontWeight\": \"normal\",\n    \"external_systemFontSize\": 14,\n    \"external_systemFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_systemFontWeight\": \"normal\",\n    \"system_dbFontSize\": 14,\n    \"system_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"system_dbFontWeight\": \"normal\",\n    \"external_system_dbFontSize\": 14,\n    \"external_system_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_system_dbFontWeight\": \"normal\",\n    \"system_queueFontSize\": 14,\n    \"system_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"system_queueFontWeight\": \"normal\",\n    \"external_system_queueFontSize\": 14,\n    \"external_system_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_system_queueFontWeight\": \"normal\",\n    \"boundaryFontSize\": 14,\n    \"boundaryFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"boundaryFontWeight\": \"normal\",\n    \"messageFontSize\": 12,\n    \"messageFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"messageFontWeight\": \"normal\",\n    \"containerFontSize\": 14,\n    \"containerFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"containerFontWeight\": \"normal\",\n    \"external_containerFontSize\": 14,\n    \"external_containerFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_containerFontWeight\": \"normal\",\n    \"container_dbFontSize\": 14,\n    \"container_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"container_dbFontWeight\": \"normal\",\n    \"external_container_dbFontSize\": 14,\n    \"external_container_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_container_dbFontWeight\": \"normal\",\n    \"container_queueFontSize\": 14,\n    \"container_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"container_queueFontWeight\": \"normal\",\n    \"external_container_queueFontSize\": 14,\n    \"external_container_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_container_queueFontWeight\": \"normal\",\n    \"componentFontSize\": 14,\n    \"componentFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"componentFontWeight\": \"normal\",\n    \"external_componentFontSize\": 14,\n    \"external_componentFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_componentFontWeight\": \"normal\",\n    \"component_dbFontSize\": 14,\n    \"component_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"component_dbFontWeight\": \"normal\",\n    \"external_component_dbFontSize\": 14,\n    \"external_component_dbFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_component_dbFontWeight\": \"normal\",\n    \"component_queueFontSize\": 14,\n    \"component_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"component_queueFontWeight\": \"normal\",\n    \"external_component_queueFontSize\": 14,\n    \"external_component_queueFontFamily\": \"\\\"Open Sans\\\", sans-serif\",\n    \"external_component_queueFontWeight\": \"normal\",\n    \"wrap\": true,\n    \"wrapPadding\": 10,\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  \"sankey\": {\n    \"useMaxWidth\": true,\n    \"width\": 600,\n    \"height\": 400,\n    \"linkColor\": \"gradient\",\n    \"nodeAlignment\": \"justify\",\n    \"showValues\": true,\n    \"prefix\": \"\",\n    \"suffix\": \"\",\n    \"nodeWidth\": 10,\n    \"nodePadding\": 12,\n    \"labelStyle\": \"legacy\"\n  },\n  \"block\": {\n    \"useMaxWidth\": true,\n    \"padding\": 8\n  },\n  \"packet\": {\n    \"useMaxWidth\": true,\n    \"rowHeight\": 32,\n    \"bitWidth\": 32,\n    \"bitsPerRow\": 32,\n    \"showBits\": true,\n    \"paddingX\": 5,\n    \"paddingY\": 5\n  },\n  \"treeView\": {\n    \"useMaxWidth\": true,\n    \"rowIndent\": 10,\n    \"paddingX\": 5,\n    \"paddingY\": 5,\n    \"lineThickness\": 1,\n    \"showIcons\": false,\n    \"defaultIconPack\": \"\",\n    \"filenameIcons\": {},\n    \"extensionIcons\": {}\n  },\n  \"architecture\": {\n    \"useMaxWidth\": true,\n    \"padding\": 40,\n    \"iconSize\": 80,\n    \"fontSize\": 16,\n    \"randomize\": false,\n    \"nodeSeparation\": 75,\n    \"idealEdgeLengthMultiplier\": 1.5,\n    \"edgeElasticity\": 0.45,\n    \"numIter\": 2500,\n    \"seed\": 1\n  },\n  \"eventmodeling\": {\n    \"useMaxWidth\": true,\n    \"padding\": 30,\n    \"rowHeight\": 32\n  },\n  \"radar\": {\n    \"useMaxWidth\": true,\n    \"width\": 600,\n    \"height\": 600,\n    \"marginTop\": 50,\n    \"marginRight\": 50,\n    \"marginBottom\": 50,\n    \"marginLeft\": 50,\n    \"axisScaleFactor\": 1,\n    \"axisLabelFactor\": 1.05,\n    \"curveTension\": 0.17\n  },\n  \"venn\": {\n    \"useMaxWidth\": true,\n    \"width\": 800,\n    \"height\": 450,\n    \"padding\": 8,\n    \"useDebugLayout\": false\n  },\n  \"cynefin\": {\n    \"useMaxWidth\": true,\n    \"width\": 800,\n    \"height\": 600,\n    \"padding\": 40,\n    \"showDomainDescriptions\": true,\n    \"boundaryAmplitude\": 8,\n    \"seed\": 0\n  },\n  \"theme\": \"default\",\n  \"look\": \"classic\",\n  \"handDrawnSeed\": 0,\n  \"layout\": \"dagre\",\n  \"maxTextSize\": 50000,\n  \"maxEdges\": 500,\n  \"darkMode\": false,\n  \"fontFamily\": \"\\\"trebuchet ms\\\", verdana, arial, sans-serif;\",\n  \"logLevel\": 5,\n  \"securityLevel\": \"strict\",\n  \"startOnLoad\": true,\n  \"arrowMarkerAbsolute\": false,\n  \"secure\": [\n    \"secure\",\n    \"securityLevel\",\n    \"startOnLoad\",\n    \"maxTextSize\",\n    \"suppressErrorRendering\",\n    \"maxEdges\"\n  ],\n  \"legacyMathML\": false,\n  \"forceLegacyMathML\": false,\n  \"deterministicIds\": false,\n  \"fontSize\": 16,\n  \"markdownAutoWrap\": true,\n  \"suppressErrorRendering\": false\n};","import type { RequiredDeep } from 'type-fest';\n\nimport theme from './themes/index.js';\nimport type { MermaidConfig } from './config.type.js';\n\n// Uses our custom Vite jsonSchemaPlugin to load only the default values from\n// our JSON Schema\n// @ts-expect-error This file is automatically generated via a custom Vite plugin\nimport defaultConfigJson from './schemas/config.schema.yaml?only-defaults=true';\n\n/**\n * Default mermaid configuration options.\n *\n * Please see the Mermaid config JSON Schema for the default JSON values.\n * Non-JSON JS default values are listed in this file, e.g. functions, or\n * `undefined` (explicitly set so that `configKeys` finds them).\n */\nconst config: RequiredDeep<MermaidConfig> = {\n  ...defaultConfigJson,\n  // Set, even though they're `undefined` so that `configKeys` finds these keys\n  // TODO: Should we replace these with `null` so that they can go in the JSON Schema?\n  deterministicIDSeed: undefined,\n  elk: {\n    // mergeEdges is needed here to be considered\n    mergeEdges: false,\n    nodePlacementStrategy: 'BRANDES_KOEPF',\n    forceNodeModelOrder: false,\n    considerModelOrder: 'NODES_AND_EDGES',\n  },\n  themeCSS: undefined,\n\n  // add non-JSON default config values\n  themeVariables: theme.default.getThemeVariables(),\n  sequence: {\n    ...defaultConfigJson.sequence,\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  class: {\n    hideEmptyMembersBox: false,\n    hierarchicalNamespaces: true,\n  },\n  gantt: {\n    ...defaultConfigJson.gantt,\n    tickInterval: undefined,\n    useWidth: undefined, // can probably be removed since `configKeys` already includes this\n  },\n  c4: {\n    ...defaultConfigJson.c4,\n    useWidth: undefined,\n    personFont: function () {\n      return {\n        fontFamily: this.personFontFamily,\n        fontSize: this.personFontSize,\n        fontWeight: this.personFontWeight,\n      };\n    },\n    flowchart: {\n      ...defaultConfigJson.flowchart,\n      inheritDir: false, // default to legacy behavior\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  pie: {\n    ...defaultConfigJson.pie,\n    useWidth: 984,\n  },\n  xyChart: {\n    ...defaultConfigJson.xyChart,\n    useWidth: undefined,\n  },\n  requirement: {\n    ...defaultConfigJson.requirement,\n    useWidth: undefined,\n  },\n  packet: {\n    ...defaultConfigJson.packet,\n  },\n  eventmodeling: {\n    ...defaultConfigJson.eventmodeling,\n  },\n  treeView: {\n    ...defaultConfigJson.treeView,\n    useWidth: undefined,\n  },\n  radar: {\n    ...defaultConfigJson.radar,\n  },\n  railroad: {\n    ...defaultConfigJson.railroad,\n    // Railroad colors and typography derive from the active theme unless explicitly overridden.\n    fontSize: undefined,\n    fontFamily: undefined,\n    terminalFill: undefined,\n    terminalStroke: undefined,\n    terminalTextColor: undefined,\n    nonTerminalFill: undefined,\n    nonTerminalStroke: undefined,\n    nonTerminalTextColor: undefined,\n    lineColor: undefined,\n    markerFill: undefined,\n    commentFill: undefined,\n    commentStroke: undefined,\n    commentTextColor: undefined,\n    specialFill: undefined,\n    specialStroke: undefined,\n    ruleNameColor: undefined,\n  },\n  ishikawa: {\n    ...defaultConfigJson.ishikawa,\n  },\n  sankey: {\n    ...defaultConfigJson.sankey,\n    // Set so that `configKeys` includes this key for sanitizeDirective\n    nodeColors: undefined,\n  },\n  treemap: {\n    useMaxWidth: true,\n    padding: 10,\n    diagramPadding: 8,\n    showValues: true,\n    nodeWidth: 100,\n    nodeHeight: 40,\n    borderWidth: 1,\n    valueFontSize: 12,\n    labelFontSize: 14,\n    valueFormat: ',',\n  },\n  venn: {\n    ...defaultConfigJson.venn,\n  },\n  cynefin: {\n    ...defaultConfigJson.cynefin,\n  },\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\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 = new Set<string>(keyify(config, ''));\nexport default config;\n","import { configKeys } from '../defaultConfig.js';\nimport { log } from '../logger.js';\n\n/**\n * Dictionary-style configs have arbitrary user-defined keys, so instead of\n * checking the keys against configKeys, their values are validated against a\n * pattern (and suspicious keys are dropped).\n */\nconst DICTIONARY_CONFIG_PATTERNS: Record<string, RegExp> = {\n  // CSS colors (sankey)\n  nodeColors: /^#[\\da-f]{3,8}$|^rgb\\([\\d\\s%,.]+\\)$|^hsl\\([\\d\\s%,.]+\\)$|^[a-z]+$/i,\n  // iconify icon references (treeView filenameIcons/extensionIcons)\n  filenameIcons: /^[\\w-]+(?::[\\w-]+)?$/,\n  extensionIcons: /^[\\w-]+(?::[\\w-]+)?$/,\n};\n\nconst sanitizeDictionaryConfig = (dict: Record<string, unknown>, valuePattern: RegExp): void => {\n  for (const key of Object.keys(dict)) {\n    const value = dict[key];\n    if (\n      key.startsWith('__') ||\n      key.includes('proto') ||\n      key.includes('constr') ||\n      typeof value !== 'string' ||\n      !valuePattern.test(value)\n    ) {\n      log.debug('sanitize deleting dictionary entry:', key, value);\n      delete dict[key];\n    }\n  }\n};\n\n/**\n * Sanitizes directive objects\n *\n * @param args - Directive's JSON\n */\nexport const sanitizeDirective = (args: any): void => {\n  log.debug('sanitizeDirective called with', args);\n\n  // Return if not an object\n  if (typeof args !== 'object' || args == null) {\n    return;\n  }\n\n  // Sanitize each element if an array\n  if (Array.isArray(args)) {\n    args.forEach((arg) => sanitizeDirective(arg));\n    return;\n  }\n\n  // Sanitize each key if an object\n  for (const key of Object.keys(args)) {\n    log.debug('Checking key', key);\n    if (\n      key.startsWith('__') ||\n      key.includes('proto') ||\n      key.includes('constr') ||\n      !configKeys.has(key) ||\n      args[key] == null\n    ) {\n      log.debug('sanitize deleting key: ', key);\n      delete args[key];\n      continue;\n    }\n\n    // Recurse if an object, but handle dictionary-style configs specially\n    // (like nodeColors or filenameIcons) by validating their values instead\n    if (typeof args[key] === 'object') {\n      const valuePattern = DICTIONARY_CONFIG_PATTERNS[key];\n      if (valuePattern) {\n        sanitizeDictionaryConfig(args[key], valuePattern);\n      } else {\n        log.debug('sanitizing object', key);\n        sanitizeDirective(args[key]);\n      }\n      continue;\n    }\n\n    const cssMatchers = ['themeCSS', 'fontFamily', 'altFontFamily'];\n    for (const cssKey of cssMatchers) {\n      if (key.includes(cssKey)) {\n        log.debug('sanitizing css option', key);\n        args[key] = sanitizeCss(args[key]);\n      }\n    }\n  }\n\n  if (args.themeVariables) {\n    for (const k of Object.keys(args.themeVariables)) {\n      const val = args.themeVariables[k];\n      if (val?.match && !val.match(/^[\\d \"#%(),.;A-Za-z]+$/)) {\n        args.themeVariables[k] = '';\n      }\n    }\n  }\n  log.debug('After sanitization', args);\n};\n\nexport const sanitizeCss = (str: string): string => {\n  let startCnt = 0;\n  let endCnt = 0;\n\n  for (const element of str) {\n    if (startCnt < endCnt) {\n      return '{ /* ERROR: Unbalanced CSS */ }';\n    }\n    if (element === '{') {\n      startCnt++;\n    } else if (element === '}') {\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","import assignWithDepth from './assignWithDepth.js';\nimport { log } from './logger.js';\nimport theme from './themes/index.js';\nimport config from './defaultConfig.js';\nimport type { MermaidConfig } from './config.type.js';\nimport { sanitizeDirective } from './utils/sanitizeDirective.js';\n\nexport const defaultConfig: MermaidConfig = Object.freeze(config);\n\n/**\n * Converts a string/boolean into a boolean\n *\n * @param val - String or boolean to convert\n * @returns The result from the input\n */\nexport const evaluate = (val?: string | boolean | null): boolean =>\n  val === false || ['false', 'null', '0'].includes(String(val).trim().toLowerCase()) ? false : true;\n\nlet siteConfig: MermaidConfig = assignWithDepth({}, defaultConfig);\nlet configFromInitialize: MermaidConfig;\nlet directives: MermaidConfig[] = [];\nlet currentConfig: MermaidConfig = assignWithDepth({}, defaultConfig);\n\nexport const updateCurrentConfig = (siteCfg: MermaidConfig, _directives: MermaidConfig[]) => {\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 (const d of _directives) {\n    sanitize(d);\n    // Apply the data from the directive where 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  checkConfig(currentConfig);\n  return currentConfig;\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 The new 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  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 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 conf - The potential currentConfig\n * @returns The currentConfig merged with the sanitized conf\n */\nexport const setConfig = (conf: MermaidConfig): MermaidConfig => {\n  checkConfig(conf);\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**: Avoid calling this function repeatedly. Instead, store the result in a variable and use it, and pass it down to function calls.\n *\n * @returns 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 options - The potential setConfig parameter\n */\nexport const sanitize = (options: any) => {\n  if (!options) {\n    return;\n  }\n  // Checking that options are not in the list of excluded options\n  ['secure', ...(siteConfig.secure ?? [])].forEach((key) => {\n    if (Object.hasOwn(options, key)) {\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.startsWith('__')) {\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 svg's with inline script tags\n  Object.keys(options).forEach((key) => {\n    if (\n      typeof options[key] === 'string' &&\n      (options[key].includes('<') ||\n        options[key].includes('>') ||\n        options[key].includes('url(data:'))\n    ) {\n      delete options[key];\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 directive - The directive to push in\n */\nexport const addDirective = (directive: MermaidConfig) => {\n  sanitizeDirective(directive);\n\n  // If the directive has a fontFamily, but no themeVariables, add the fontFamily to the themeVariables\n  if (directive.fontFamily && !directive.themeVariables?.fontFamily) {\n    directive.themeVariables = {\n      ...directive.themeVariables,\n      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 - base set of values, which currentConfig could be **reset** to.\n * Defaults to the current siteConfig (e.g returned by {@link getSiteConfig}).\n */\nexport const reset = (config = siteConfig): void => {\n  // Replace current config with siteConfig\n  directives = [];\n  updateCurrentConfig(config, directives);\n};\n\nconst ConfigWarning = {\n  LAZY_LOAD_DEPRECATED:\n    'The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.',\n  FLOWCHART_HTML_LABELS_DEPRECATED:\n    'flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.',\n} as const;\n\ntype ConfigWarningStrings = keyof typeof ConfigWarning;\nconst issuedWarnings: Partial<Record<ConfigWarningStrings, boolean>> = {};\nconst issueWarning = (warning: ConfigWarningStrings) => {\n  if (issuedWarnings[warning]) {\n    return;\n  }\n  log.warn(ConfigWarning[warning]);\n  issuedWarnings[warning] = true;\n};\n\nconst checkConfig = (config: MermaidConfig) => {\n  if (!config) {\n    return;\n  }\n  // @ts-expect-error Properties were removed in v10. Warning should exist.\n  if (config.lazyLoadedDiagrams || config.loadExternalDiagramsAtStartup) {\n    issueWarning('LAZY_LOAD_DEPRECATED');\n  }\n};\n\nexport const getUserDefinedConfig = (): MermaidConfig => {\n  let userConfig: MermaidConfig = {};\n\n  if (configFromInitialize) {\n    userConfig = assignWithDepth(userConfig, configFromInitialize);\n  }\n\n  for (const d of directives) {\n    userConfig = assignWithDepth(userConfig, d);\n  }\n\n  return userConfig;\n};\n\n/**\n * Helper function to handle deprecated flowchart.htmlLabels\n * @param config - The configuration object (merged config with defaults)\n * @returns The effective htmlLabels value based on precedence: root flowchart  default\n */\nexport const getEffectiveHtmlLabels = (config: MermaidConfig): boolean => {\n  // != instead of !== handles null case\n  if (config.flowchart?.htmlLabels != undefined) {\n    issueWarning('FLOWCHART_HTML_LABELS_DEPRECATED');\n  }\n  return evaluate(config.htmlLabels ?? config.flowchart?.htmlLabels ?? true);\n};\n","// Match Jekyll-style front matter blocks (https://jekyllrb.com/docs/front-matter/).\n// Based on regex used by Jekyll: https://github.com/jekyll/jekyll/blob/6dd3cc21c40b98054851846425af06c64f9fb466/lib/jekyll/document.rb#L10\n// Note that JS doesn't support the \"\\A\" anchor, which means we can't use\n// multiline mode.\n// Relevant YAML spec: https://yaml.org/spec/1.2.2/#914-explicit-documents\n// The \\1 backreference anchors closing `---` to the same indent as the opening one, guards against indented `---` inside multi-line YAML scalars (#7613).\nexport const frontMatterRegex = /^([^\\S\\n\\r]*)-{3}\\s*[\\n\\r](.*?)[\\n\\r]\\1-{3}\\s*[\\n\\r]+/s;\n\nexport const directiveRegex =\n  /%{2}{\\s*(?:(\\w+)\\s*:|(\\w+))\\s*(?:(\\w+)|((?:(?!}%{2}).|\\r?\\n)*))?\\s*(?:}%{2})?/gi;\n\nexport const anyCommentRegex = /\\s*%%.*\\n/gm;\n","export class UnknownDiagramError extends Error {\n  constructor(message: string) {\n    super(message);\n    this.name = 'UnknownDiagramError';\n  }\n}\n","import type { MermaidConfig } from '../config.type.js';\nimport { log } from '../logger.js';\nimport type {\n  DetectorRecord,\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from './types.js';\nimport { anyCommentRegex, directiveRegex, frontMatterRegex } from './regexes.js';\nimport { UnknownDiagramError } from '../errors.js';\n\nexport const detectors: Record<string, DetectorRecord> = {};\n\n/**\n * Detects the type of the graph text.\n *\n * Takes into consideration the possible existence of an `%%init` directive\n *\n * @param text - The text defining the graph. For example:\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 *\n * @param config - The mermaid config.\n * @returns A graph definition key\n */\nexport const detectType = function (text: string, config?: MermaidConfig): string {\n  text = text\n    .replace(frontMatterRegex, '')\n    .replace(directiveRegex, '')\n    .replace(anyCommentRegex, '\\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 UnknownDiagramError(\n    `No diagram type detected matching given configuration for text: ${text}`\n  );\n};\n\n/**\n * Registers lazy-loaded diagrams to Mermaid.\n *\n * The diagram function is loaded asynchronously, so that diagrams are only loaded\n * if the diagram is detected.\n *\n * @remarks\n * Please note that the order of diagram detectors is important.\n * The first detector to return `true` is the diagram that will be loaded\n * and used, so put more specific detectors at the beginning!\n *\n * @param diagrams - Diagrams to lazy load, and their detectors, in order of importance.\n */\nexport const registerLazyLoadedDiagrams = (...diagrams: ExternalDiagramDefinition[]) => {\n  for (const { id, detector, loader } of diagrams) {\n    addDetector(id, detector, loader);\n  }\n};\n\nexport const addDetector = (key: string, detector: DiagramDetector, loader?: DiagramLoader) => {\n  if (detectors[key]) {\n    log.warn(`Detector with key ${key} already exists. Overwriting.`);\n  }\n  detectors[key] = { detector, loader };\n  log.debug(`Detector with key ${key} added${loader ? ' with loader' : ''}`);\n};\n\nexport const getDiagramLoader = (key: string) => {\n  return detectors[key].loader;\n};\n","import DOMPurify from 'dompurify';\nimport { evaluate, getEffectiveHtmlLabels } from '../../config.js';\nimport type { MermaidConfig } from '../../config.type.js';\n\n// Remove and ignore br:s\nexport const lineBreakRegex = /<br\\s*\\/?>/gi;\n\n/**\n * Gets the rows of lines in a string\n *\n * @param s - The string to check the lines for\n * @returns The rows in that string\n */\nexport const getRows = (s?: string): string[] => {\n  if (!s) {\n    return [''];\n  }\n  const str = breakToPlaceholder(s).replace(/\\\\n/g, '#br#');\n  return str.split('#br#');\n};\n\nconst setupDompurifyHooksIfNotSetup = (() => {\n  let setup = false;\n\n  return () => {\n    if (!setup) {\n      setupDompurifyHooks();\n      setup = true;\n    }\n  };\n})();\n\nfunction setupDompurifyHooks() {\n  const TEMPORARY_ATTRIBUTE = 'data-temp-href-target';\n\n  DOMPurify.addHook('beforeSanitizeAttributes', (node) => {\n    if (node.tagName === 'A' && node.hasAttribute('target')) {\n      node.setAttribute(TEMPORARY_ATTRIBUTE, node.getAttribute('target') ?? '');\n    }\n  });\n\n  DOMPurify.addHook('afterSanitizeAttributes', (node) => {\n    if (node.tagName === 'A' && node.hasAttribute(TEMPORARY_ATTRIBUTE)) {\n      node.setAttribute('target', node.getAttribute(TEMPORARY_ATTRIBUTE) ?? '');\n      node.removeAttribute(TEMPORARY_ATTRIBUTE);\n      if (node.getAttribute('target') === '_blank') {\n        node.setAttribute('rel', 'noopener');\n      }\n    }\n  });\n}\n\n/**\n * Removes script tags from a text\n *\n * @param txt - The text to sanitize\n * @returns The safer text\n */\nexport const removeScript = (txt: string): string => {\n  setupDompurifyHooksIfNotSetup();\n\n  const sanitizedText = DOMPurify.sanitize(txt);\n\n  return sanitizedText;\n};\n\nconst sanitizeMore = (text: string, config: MermaidConfig) => {\n  if (getEffectiveHtmlLabels(config)) {\n    const level = config.securityLevel;\n    if (level === 'antiscript' || level === 'strict' || level === 'sandbox') {\n      text = removeScript(text);\n    } else if (level !== 'loose') {\n      text = breakToPlaceholder(text);\n      text = text.replace(/</g, '&lt;').replace(/>/g, '&gt;');\n      text = text.replace(/=/g, '&equals;');\n      text = placeholderToBreak(text);\n    }\n  }\n  return text;\n};\n\nexport const sanitizeText = (text: string, config: MermaidConfig): string => {\n  if (!text) {\n    return text;\n  }\n  if (config.dompurifyConfig) {\n    text = DOMPurify.sanitize(sanitizeMore(text, config), config.dompurifyConfig).toString();\n  } else {\n    text = DOMPurify.sanitize(sanitizeMore(text, config), {\n      FORBID_TAGS: ['style'],\n    }).toString();\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') {\n    return sanitizeText(a, config);\n  }\n  // TODO: Refactor to avoid flat.\n  return a.flat().map((x: string) => sanitizeText(x, config));\n};\n\n/**\n * Whether or not a text has any line breaks\n *\n * @param text - The text to test\n * @returns 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 <br> tags\n *\n * @param text - Text to split\n * @returns List of lines as strings\n */\nexport const splitBreaks = (text: string): string[] => {\n  return text.split(lineBreakRegex);\n};\n\n/**\n * Converts placeholders to line breaks in HTML\n *\n * @param s - HTML with placeholders\n * @returns HTML with breaks instead of placeholders\n */\nconst placeholderToBreak = (s: string): string => {\n  return s.replace(/#br#/g, '<br/>');\n};\n\n/**\n * Opposite of `placeholderToBreak`, converts breaks to placeholders\n *\n * @param s - HTML string\n * @returns 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 useAbsolute - Whether to return the absolute URL or not\n * @returns The current URL\n */\nexport const 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\n    url = CSS.escape(url);\n  }\n\n  return url;\n};\n\nexport { evaluate };\n\n/**\n * Wrapper around Math.max which removes non-numeric values\n * Returns the larger of a set of supplied numeric expressions.\n * @param values - Numeric expressions to be evaluated\n * @returns The smaller value\n */\nexport const getMax = function (...values: number[]): number {\n  const newValues: number[] = values.filter((value) => {\n    return !isNaN(value);\n  });\n  return Math.max(...newValues);\n};\n\n/**\n * Wrapper around Math.min which removes non-numeric values\n * Returns the smaller of a set of supplied numeric expressions.\n * @param values - Numeric expressions to be evaluated\n * @returns The smaller value\n */\nexport const getMin = function (...values: number[]): number {\n  const newValues: number[] = values.filter((value) => {\n    return !isNaN(value);\n  });\n  return Math.min(...newValues);\n};\n\n/**\n * Makes generics in typescript syntax\n *\n * @example\n * Array of array of strings in typescript syntax\n *\n * ```js\n * // returns \"Array<Array<string>>\"\n * parseGenericTypes('Array~Array~string~~');\n * ```\n * @param text - The text to convert\n * @returns The converted string\n */\nexport const parseGenericTypes = function (input: string): string {\n  const inputSets = input.split(/(,)/);\n  const output = [];\n\n  for (let i = 0; i < inputSets.length; i++) {\n    let thisSet = inputSets[i];\n\n    // if the original input included a value such as \"~K, V~\"\", these will be split into\n    // an array of [\"~K\",\",\",\" V~\"].\n    // This means that on each call of processSet, there will only be 1 ~ present\n    // To account for this, if we encounter a \",\", we are checking the previous and next sets in the array\n    // to see if they contain matching ~'s\n    // in which case we are assuming that they should be rejoined and sent to be processed\n    if (thisSet === ',' && i > 0 && i + 1 < inputSets.length) {\n      const previousSet = inputSets[i - 1];\n      const nextSet = inputSets[i + 1];\n\n      if (shouldCombineSets(previousSet, nextSet)) {\n        thisSet = previousSet + ',' + nextSet;\n        i++; // Move the index forward to skip the next iteration since we're combining sets\n        output.pop();\n      }\n    }\n\n    output.push(processSet(thisSet));\n  }\n\n  return output.join('');\n};\n\nexport const countOccurrence = (string: string, substring: string): number => {\n  return Math.max(0, string.split(substring).length - 1);\n};\n\nconst shouldCombineSets = (previousSet: string, nextSet: string): boolean => {\n  const prevCount = countOccurrence(previousSet, '~');\n  const nextCount = countOccurrence(nextSet, '~');\n\n  return prevCount === 1 && nextCount === 1;\n};\n\nconst processSet = (input: string): string => {\n  const tildeCount = countOccurrence(input, '~');\n  let hasStartingTilde = false;\n\n  if (tildeCount <= 1) {\n    return input;\n  }\n\n  // If there is an odd number of tildes, and the input starts with a tilde, we need to remove it and add it back in later\n  if (tildeCount % 2 !== 0 && input.startsWith('~')) {\n    input = input.substring(1);\n    hasStartingTilde = true;\n  }\n\n  const chars = [...input];\n\n  let first = chars.indexOf('~');\n  let last = chars.lastIndexOf('~');\n\n  while (first !== -1 && last !== -1 && first !== last) {\n    chars[first] = '<';\n    chars[last] = '>';\n\n    first = chars.indexOf('~');\n    last = chars.lastIndexOf('~');\n  }\n\n  // Add the starting tilde back in if we removed it\n  if (hasStartingTilde) {\n    chars.unshift('~');\n  }\n\n  return chars.join('');\n};\n\n// TODO: find a better method for detecting support. This interface was added in the MathML 4 spec.\n// Firefox versions between [4,71] (0.47%) and Safari versions between [5,13.4] (0.17%) don't have this interface implemented but MathML is supported\nexport const isMathMLSupported = () => window.MathMLElement !== undefined;\n\nexport const katexRegex = /\\$\\$(.*?)\\$\\$/g;\n\n/**\n * Whether or not a text has KaTeX delimiters\n *\n * @param text - The text to test\n * @returns Whether or not the text has KaTeX delimiters\n */\nexport const hasKatex = (text: string): boolean => (text.match(katexRegex)?.length ?? 0) > 0;\n\n/**\n * Computes the minimum dimensions needed to display a div containing MathML\n *\n * @param text - The text to test\n * @param config - Configuration for Mermaid\n * @returns Object containing \\{width, height\\}\n */\nexport const calculateMathMLDimensions = async (text: string, config: MermaidConfig) => {\n  const divElem = document.createElement('div');\n  divElem.innerHTML = await renderKatexSanitized(text, config);\n  divElem.id = 'katex-temp';\n  divElem.style.visibility = 'hidden';\n  divElem.style.position = 'absolute';\n  divElem.style.top = '0';\n  const body = document.querySelector('body');\n  body?.insertAdjacentElement('beforeend', divElem);\n  const dim = { width: divElem.clientWidth, height: divElem.clientHeight };\n  divElem.remove();\n  return dim;\n};\n\nconst renderKatexUnsanitized = async (text: string, config: MermaidConfig): Promise<string> => {\n  if (!hasKatex(text)) {\n    return text;\n  }\n\n  if (!(isMathMLSupported() || config.legacyMathML || config.forceLegacyMathML)) {\n    return text.replace(katexRegex, 'MathML is unsupported in this environment.');\n  }\n\n  if (injected.includeLargeFeatures) {\n    const { default: katex } = await import('katex');\n    const outputMode =\n      config.forceLegacyMathML || (!isMathMLSupported() && config.legacyMathML)\n        ? 'htmlAndMathml'\n        : 'mathml';\n    return text\n      .split(lineBreakRegex)\n      .map((line) =>\n        hasKatex(line)\n          ? `<div style=\"display: flex; align-items: center; justify-content: center; white-space: nowrap;\">${line}</div>`\n          : `<div>${line}</div>`\n      )\n      .join('')\n      .replace(katexRegex, (_, c) =>\n        katex\n          .renderToString(c, {\n            throwOnError: true,\n            displayMode: true,\n            output: outputMode,\n          })\n          .replace(/\\n/g, ' ')\n          .replace(/<annotation.*<\\/annotation>/g, '')\n      );\n  }\n\n  return text.replace(\n    katexRegex,\n    'Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.'\n  );\n};\n\n/**\n * Attempts to render and return the KaTeX portion of a string with MathML\n *\n * @param text - The text to test\n * @param config - Configuration for Mermaid\n * @returns String containing MathML if KaTeX is supported, or an error message if it is not and stylesheets aren't present\n */\nexport const renderKatexSanitized = async (\n  text: string,\n  config: MermaidConfig\n): Promise<string> => {\n  return sanitizeText(await renderKatexUnsanitized(text, config), config);\n};\n\nexport default {\n  getRows,\n  sanitizeText,\n  sanitizeTextOrArray,\n  hasBreaks,\n  splitBreaks,\n  lineBreakRegex,\n  removeScript,\n  getUrl,\n  evaluate,\n  getMax,\n  getMin,\n};\n","import { log } from './logger.js';\n\n/**\n * Applies 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('height', height);\n    attrs.set('width', width);\n  }\n  return attrs;\n};\n\n/**\n * Applies attributes from `calculateSvgSizeAttrs`\n *\n * @param {import('./diagram-api/types.js').SVG} 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};\n\n// TODO v11: Remove the graph parameter. It is not used.\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  width = sWidth + padding * 2;\n  height = sHeight + padding * 2;\n\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 = `${svgBounds.x - padding} ${svgBounds.y - padding} ${\n    svgBounds.width + 2 * padding\n  } ${svgBounds.height + 2 * padding}`;\n\n  svgElem.attr('viewBox', vBox);\n};\n","import type { FlowChartStyleOptions } from './diagrams/flowchart/styles.js';\nimport { log } from './logger.js';\nimport type { DiagramStylesProvider } from './diagram-api/types.js';\n\nconst themes: Record<string, DiagramStylesProvider> = {};\n\nexport function cssStyleSheetToString(cssStyleSheet: CSSStyleSheet): string {\n  return [...cssStyleSheet.cssRules].map((rule) => rule.cssText).join('\\n');\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    useGradient?: boolean;\n    dropShadow?: string;\n    primaryBorderColor?: string;\n    compositeTitleBackground?: string;\n    THEME_COLOR_LIMIT?: number;\n    nodeBorder?: string;\n    mainBkg?: string;\n    strokeWidth?: number;\n    theme?: string;\n    look?: string;\n  } & FlowChartStyleOptions,\n  svgId: `${string}`\n) => {\n  let diagramStyles = '';\n  if (type in themes && themes[type]) {\n    // Pass svgId through options so diagram-specific style functions can use it\n    // (e.g., for gradient URL references like url(svgId-gradient)).\n    diagramStyles = themes[type]({ ...options, svgId });\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  @keyframes edge-animation-frame {\n    from {\n      stroke-dashoffset: 0;\n    }\n  }\n  @keyframes dash {\n    to {\n      stroke-dashoffset: 0;\n    }\n  }\n  & .edge-animation-slow {\n    stroke-dasharray: 9,5 !important;\n    stroke-dashoffset: 900;\n    animation: dash 50s linear infinite;\n    stroke-linecap: round;\n  }\n  & .edge-animation-fast {\n    stroke-dasharray: 9,5 !important;\n    stroke-dashoffset: 900;\n    animation: dash 20s linear infinite;\n    stroke-linecap: round;\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: ${(options.strokeWidth ?? 1) as number}px;\n  }\n  & .edge-thickness-thick {\n    stroke-width: 3.5px\n  }\n  & .edge-pattern-solid {\n    stroke-dasharray: 0;\n  }\n  & .edge-thickness-invisible {\n    stroke-width: 0;\n    fill: none;\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   & p {\n    margin: 0\n   }\n\n  ${diagramStyles}\n  .node .neo-node {\n    stroke: ${options.nodeBorder};\n  }\n\n  [data-look=\"neo\"].node rect, [data-look=\"neo\"].cluster rect, [data-look=\"neo\"].node polygon {\n    stroke: ${options.useGradient ? 'url(' + svgId + '-gradient)' : options.nodeBorder};\n    filter: ${options.dropShadow ? options.dropShadow.replace('url(#drop-shadow)', `url(${svgId}-drop-shadow)`) : 'none'};\n  }\n  [data-look=\"neo\"].swimlane.cluster rect {\n    filter: none;\n  }\n\n\n  [data-look=\"neo\"].node path {\n    stroke: ${options.useGradient ? 'url(' + svgId + '-gradient)' : options.nodeBorder};\n    stroke-width: ${(options.strokeWidth ?? 1) as number}px;\n  }\n\n  [data-look=\"neo\"].node .outer-path {\n    filter: ${options.dropShadow ? options.dropShadow.replace('url(#drop-shadow)', `url(${svgId}-drop-shadow)`) : 'none'};\n  }\n\n  [data-look=\"neo\"].node .neo-line path {\n    stroke: ${options.nodeBorder};\n    filter: none;\n  }\n\n  [data-look=\"neo\"].node circle{\n    stroke: ${options.useGradient ? 'url(' + svgId + '-gradient)' : options.nodeBorder};\n    filter: ${options.dropShadow ? options.dropShadow.replace('url(#drop-shadow)', `url(${svgId}-drop-shadow)`) : 'none'};\n  }\n\n  [data-look=\"neo\"].node circle .state-start{\n    fill: #000000;\n  }\n\n  [data-look=\"neo\"].icon-shape .icon {\n    fill: ${options.useGradient ? 'url(' + svgId + '-gradient)' : options.nodeBorder};\n    filter: ${options.dropShadow ? options.dropShadow.replace('url(#drop-shadow)', `url(${svgId}-drop-shadow)`) : 'none'};\n  }\n\n    [data-look=\"neo\"].icon-shape .icon-neo path {\n    stroke: ${options.useGradient ? 'url(' + svgId + '-gradient)' : options.nodeBorder};\n    filter: ${options.dropShadow ? options.dropShadow.replace('url(#drop-shadow)', `url(${svgId}-drop-shadow)`) : 'none'};\n  }\n\n  ${userStyles}\n`;\n};\n\nexport const addStylesForDiagram = (type: string, diagramTheme?: DiagramStylesProvider): void => {\n  if (diagramTheme !== undefined) {\n    themes[type] = diagramTheme;\n  }\n};\n\nexport default getStyles;\n","import { sanitizeText as _sanitizeText } from './common.js';\nimport { getConfig } from '../../config.js';\n\nlet accTitle = '';\nlet diagramTitle = '';\nlet accDescription = '';\n\nconst sanitizeText = (txt: string): string => _sanitizeText(txt, getConfig());\n\nexport const clear = (): void => {\n  accTitle = '';\n  accDescription = '';\n  diagramTitle = '';\n};\n\nexport const setAccTitle = (txt: string): void => {\n  accTitle = sanitizeText(txt).replace(/^\\s+/g, '');\n};\n\nexport const getAccTitle = (): string => accTitle;\n\nexport const setAccDescription = (txt: string): void => {\n  accDescription = sanitizeText(txt).replace(/\\n\\s+/g, '\\n');\n};\n\nexport const getAccDescription = (): string => accDescription;\n\nexport const setDiagramTitle = (txt: string): void => {\n  diagramTitle = sanitizeText(txt);\n};\n\nexport const getDiagramTitle = (): string => diagramTitle;\n","import { addDetector } from './detectType.js';\nimport { log as _log, setLogLevel as _setLogLevel } from '../logger.js';\nimport {\n  getConfig as _getConfig,\n  setConfig as _setConfig,\n  defaultConfig as _defaultConfig,\n  setSiteConfig as _setSiteConfig,\n} from '../config.js';\nimport { sanitizeText as _sanitizeText } from '../diagrams/common/common.js';\nimport { setupGraphViewbox as _setupGraphViewbox } from '../setupGraphViewbox.js';\nimport { addStylesForDiagram } from '../styles.js';\nimport type { DiagramDefinition, DiagramDetector } from './types.js';\nimport * as _commonDb from '../diagrams/common/commonDb.js';\n\n/*\n  Packaging and exposing resources for external diagrams so that they can import\n  diagramAPI and have access to select parts of mermaid common code required to\n  create diagrams working like the internal diagrams.\n*/\nexport const log = _log;\nexport const setLogLevel = _setLogLevel;\nexport const getConfig = _getConfig;\nexport const setConfig = _setConfig;\nexport const defaultConfig = _defaultConfig;\nexport const setSiteConfig = _setSiteConfig;\nexport const sanitizeText = (text: string) => _sanitizeText(text, getConfig());\nexport const setupGraphViewbox = _setupGraphViewbox;\nexport const getCommonDb = () => {\n  return _commonDb;\n};\n\nconst diagrams: Record<string, DiagramDefinition> = {};\nexport type Detectors = Record<string, DiagramDetector>;\n\n/**\n * Registers the given diagram with Mermaid.\n *\n * Can be used for third-party custom diagrams.\n *\n * @param id - A unique ID for the given diagram.\n * @param diagram - The diagram definition.\n * @param detector - Function that returns `true` if a given mermaid text is this diagram definition.\n */\nexport const registerDiagram = (\n  id: string,\n  diagram: DiagramDefinition,\n  detector?: DiagramDetector\n) => {\n  if (diagrams[id]) {\n    log.warn(`Diagram with id ${id} already registered. Overwriting.`);\n  }\n  diagrams[id] = diagram;\n  if (detector) {\n    addDetector(id, detector);\n  }\n  addStylesForDiagram(id, diagram.styles);\n\n  diagram.injectUtils?.(\n    log,\n    setLogLevel,\n    getConfig,\n    sanitizeText,\n    setupGraphViewbox,\n    getCommonDb(),\n    () => {\n      // parseDirective is removed in https://github.com/mermaid-js/mermaid/pull/4759.\n      // This is a no-op for legacy support.\n    }\n  );\n};\n\nexport const getDiagram = (name: string): DiagramDefinition => {\n  if (name in diagrams) {\n    return diagrams[name];\n  }\n  throw new DiagramNotFoundError(name);\n};\n\nexport class DiagramNotFoundError extends Error {\n  constructor(name: string) {\n    super(`Diagram ${name} not found.`);\n  }\n}\n","import { select } from 'd3';\nimport { getConfig } from '../diagram-api/diagramAPI.js';\nimport type { HTML, SVG } from '../diagram-api/types.js';\n\n/**\n * Selects the SVG element using {@link id}.\n *\n * @param id - The diagram ID.\n * @returns The selected {@link SVG} element using {@link id}.\n */\nexport const selectSvgElement = (id: string): SVG => {\n  const { securityLevel } = getConfig();\n  // handle root and document for when rendering in sandbox mode\n  let root: HTML = select('body');\n  if (securityLevel === 'sandbox') {\n    const sandboxElement: HTML = select(`#i${id}`);\n    const doc: Document = sandboxElement.node()?.contentDocument ?? document;\n    root = select(doc.body as HTMLIFrameElement);\n  }\n  const svg: SVG = root.select(`#${id}`);\n  return svg;\n};\n","\n/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */\nfunction isNothing(subject) {\n  return (typeof subject === 'undefined') || (subject === null);\n}\n\n\nfunction isObject(subject) {\n  return (typeof subject === 'object') && (subject !== null);\n}\n\n\nfunction toArray(sequence) {\n  if (Array.isArray(sequence)) return sequence;\n  else if (isNothing(sequence)) return [];\n\n  return [ sequence ];\n}\n\n\nfunction extend(target, source) {\n  var index, length, key, sourceKeys;\n\n  if (source) {\n    sourceKeys = Object.keys(source);\n\n    for (index = 0, length = sourceKeys.length; index < length; index += 1) {\n      key = sourceKeys[index];\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\n\nfunction repeat(string, count) {\n  var result = '', cycle;\n\n  for (cycle = 0; cycle < count; cycle += 1) {\n    result += string;\n  }\n\n  return result;\n}\n\n\nfunction isNegativeZero(number) {\n  return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\n}\n\n\nvar isNothing_1      = isNothing;\nvar isObject_1       = isObject;\nvar toArray_1        = toArray;\nvar repeat_1         = repeat;\nvar isNegativeZero_1 = isNegativeZero;\nvar extend_1         = extend;\n\nvar common = {\n\tisNothing: isNothing_1,\n\tisObject: isObject_1,\n\ttoArray: toArray_1,\n\trepeat: repeat_1,\n\tisNegativeZero: isNegativeZero_1,\n\textend: extend_1\n};\n\n// YAML error class. http://stackoverflow.com/questions/8458984\n\n\nfunction formatError(exception, compact) {\n  var where = '', message = exception.reason || '(unknown reason)';\n\n  if (!exception.mark) return message;\n\n  if (exception.mark.name) {\n    where += 'in \"' + exception.mark.name + '\" ';\n  }\n\n  where += '(' + (exception.mark.line + 1) + ':' + (exception.mark.column + 1) + ')';\n\n  if (!compact && exception.mark.snippet) {\n    where += '\\n\\n' + exception.mark.snippet;\n  }\n\n  return message + ' ' + where;\n}\n\n\nfunction YAMLException$1(reason, mark) {\n  // Super constructor\n  Error.call(this);\n\n  this.name = 'YAMLException';\n  this.reason = reason;\n  this.mark = mark;\n  this.message = formatError(this, false);\n\n  // Include stack trace in error object\n  if (Error.captureStackTrace) {\n    // Chrome and NodeJS\n    Error.captureStackTrace(this, this.constructor);\n  } else {\n    // FF, IE 10+ and Safari 6+. Fallback for others\n    this.stack = (new Error()).stack || '';\n  }\n}\n\n\n// Inherit from Error\nYAMLException$1.prototype = Object.create(Error.prototype);\nYAMLException$1.prototype.constructor = YAMLException$1;\n\n\nYAMLException$1.prototype.toString = function toString(compact) {\n  return this.name + ': ' + formatError(this, compact);\n};\n\n\nvar exception = YAMLException$1;\n\n// get snippet for a single line, respecting maxLength\nfunction getLine(buffer, lineStart, lineEnd, position, maxLineLength) {\n  var head = '';\n  var tail = '';\n  var maxHalfLength = Math.floor(maxLineLength / 2) - 1;\n\n  if (position - lineStart > maxHalfLength) {\n    head = ' ... ';\n    lineStart = position - maxHalfLength + head.length;\n  }\n\n  if (lineEnd - position > maxHalfLength) {\n    tail = ' ...';\n    lineEnd = position + maxHalfLength - tail.length;\n  }\n\n  return {\n    str: head + buffer.slice(lineStart, lineEnd).replace(/\\t/g, '→') + tail,\n    pos: position - lineStart + head.length // relative position\n  };\n}\n\n\nfunction padStart(string, max) {\n  return common.repeat(' ', max - string.length) + string;\n}\n\n\nfunction makeSnippet(mark, options) {\n  options = Object.create(options || null);\n\n  if (!mark.buffer) return null;\n\n  if (!options.maxLength) options.maxLength = 79;\n  if (typeof options.indent      !== 'number') options.indent      = 1;\n  if (typeof options.linesBefore !== 'number') options.linesBefore = 3;\n  if (typeof options.linesAfter  !== 'number') options.linesAfter  = 2;\n\n  var re = /\\r?\\n|\\r|\\0/g;\n  var lineStarts = [ 0 ];\n  var lineEnds = [];\n  var match;\n  var foundLineNo = -1;\n\n  while ((match = re.exec(mark.buffer))) {\n    lineEnds.push(match.index);\n    lineStarts.push(match.index + match[0].length);\n\n    if (mark.position <= match.index && foundLineNo < 0) {\n      foundLineNo = lineStarts.length - 2;\n    }\n  }\n\n  if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;\n\n  var result = '', i, line;\n  var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;\n  var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);\n\n  for (i = 1; i <= options.linesBefore; i++) {\n    if (foundLineNo - i < 0) break;\n    line = getLine(\n      mark.buffer,\n      lineStarts[foundLineNo - i],\n      lineEnds[foundLineNo - i],\n      mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),\n      maxLineLength\n    );\n    result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +\n      ' | ' + line.str + '\\n' + result;\n  }\n\n  line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);\n  result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +\n    ' | ' + line.str + '\\n';\n  result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\\n';\n\n  for (i = 1; i <= options.linesAfter; i++) {\n    if (foundLineNo + i >= lineEnds.length) break;\n    line = getLine(\n      mark.buffer,\n      lineStarts[foundLineNo + i],\n      lineEnds[foundLineNo + i],\n      mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),\n      maxLineLength\n    );\n    result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +\n      ' | ' + line.str + '\\n';\n  }\n\n  return result.replace(/\\n$/, '');\n}\n\n\nvar snippet = makeSnippet;\n\nvar TYPE_CONSTRUCTOR_OPTIONS = [\n  'kind',\n  'multi',\n  'resolve',\n  'construct',\n  'instanceOf',\n  'predicate',\n  'represent',\n  'representName',\n  'defaultStyle',\n  'styleAliases'\n];\n\nvar YAML_NODE_KINDS = [\n  'scalar',\n  'sequence',\n  'mapping'\n];\n\nfunction compileStyleAliases(map) {\n  var result = {};\n\n  if (map !== null) {\n    Object.keys(map).forEach(function (style) {\n      map[style].forEach(function (alias) {\n        result[String(alias)] = style;\n      });\n    });\n  }\n\n  return result;\n}\n\nfunction Type$1(tag, options) {\n  options = options || {};\n\n  Object.keys(options).forEach(function (name) {\n    if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\n      throw new exception('Unknown option \"' + name + '\" is met in definition of \"' + tag + '\" YAML type.');\n    }\n  });\n\n  // TODO: Add tag format check.\n  this.options       = options; // keep original options in case user wants to extend this type later\n  this.tag           = tag;\n  this.kind          = options['kind']          || null;\n  this.resolve       = options['resolve']       || function () { return true; };\n  this.construct     = options['construct']     || function (data) { return data; };\n  this.instanceOf    = options['instanceOf']    || null;\n  this.predicate     = options['predicate']     || null;\n  this.represent     = options['represent']     || null;\n  this.representName = options['representName'] || null;\n  this.defaultStyle  = options['defaultStyle']  || null;\n  this.multi         = options['multi']         || false;\n  this.styleAliases  = compileStyleAliases(options['styleAliases'] || null);\n\n  if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\n    throw new exception('Unknown kind \"' + this.kind + '\" is specified for \"' + tag + '\" YAML type.');\n  }\n}\n\nvar type = Type$1;\n\n/*eslint-disable max-len*/\n\n\n\n\n\nfunction compileList(schema, name) {\n  var result = [];\n\n  schema[name].forEach(function (currentType) {\n    var newIndex = result.length;\n\n    result.forEach(function (previousType, previousIndex) {\n      if (previousType.tag === currentType.tag &&\n          previousType.kind === currentType.kind &&\n          previousType.multi === currentType.multi) {\n\n        newIndex = previousIndex;\n      }\n    });\n\n    result[newIndex] = currentType;\n  });\n\n  return result;\n}\n\n\nfunction compileMap(/* lists... */) {\n  var result = {\n        scalar: {},\n        sequence: {},\n        mapping: {},\n        fallback: {},\n        multi: {\n          scalar: [],\n          sequence: [],\n          mapping: [],\n          fallback: []\n        }\n      }, index, length;\n\n  function collectType(type) {\n    if (type.multi) {\n      result.multi[type.kind].push(type);\n      result.multi['fallback'].push(type);\n    } else {\n      result[type.kind][type.tag] = result['fallback'][type.tag] = type;\n    }\n  }\n\n  for (index = 0, length = arguments.length; index < length; index += 1) {\n    arguments[index].forEach(collectType);\n  }\n  return result;\n}\n\n\nfunction Schema$1(definition) {\n  return this.extend(definition);\n}\n\n\nSchema$1.prototype.extend = function extend(definition) {\n  var implicit = [];\n  var explicit = [];\n\n  if (definition instanceof type) {\n    // Schema.extend(type)\n    explicit.push(definition);\n\n  } else if (Array.isArray(definition)) {\n    // Schema.extend([ type1, type2, ... ])\n    explicit = explicit.concat(definition);\n\n  } else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {\n    // Schema.extend({ explicit: [ type1, type2, ... ], implicit: [ type1, type2, ... ] })\n    if (definition.implicit) implicit = implicit.concat(definition.implicit);\n    if (definition.explicit) explicit = explicit.concat(definition.explicit);\n\n  } else {\n    throw new exception('Schema.extend argument should be a Type, [ Type ], ' +\n      'or a schema definition ({ implicit: [...], explicit: [...] })');\n  }\n\n  implicit.forEach(function (type$1) {\n    if (!(type$1 instanceof type)) {\n      throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n    }\n\n    if (type$1.loadKind && type$1.loadKind !== 'scalar') {\n      throw new exception('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\n    }\n\n    if (type$1.multi) {\n      throw new exception('There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.');\n    }\n  });\n\n  explicit.forEach(function (type$1) {\n    if (!(type$1 instanceof type)) {\n      throw new exception('Specified list of YAML types (or a single Type object) contains a non-Type object.');\n    }\n  });\n\n  var result = Object.create(Schema$1.prototype);\n\n  result.implicit = (this.implicit || []).concat(implicit);\n  result.explicit = (this.explicit || []).concat(explicit);\n\n  result.compiledImplicit = compileList(result, 'implicit');\n  result.compiledExplicit = compileList(result, 'explicit');\n  result.compiledTypeMap  = compileMap(result.compiledImplicit, result.compiledExplicit);\n\n  return result;\n};\n\n\nvar schema = Schema$1;\n\nvar str = new type('tag:yaml.org,2002:str', {\n  kind: 'scalar',\n  construct: function (data) { return data !== null ? data : ''; }\n});\n\nvar seq = new type('tag:yaml.org,2002:seq', {\n  kind: 'sequence',\n  construct: function (data) { return data !== null ? data : []; }\n});\n\nvar map = new type('tag:yaml.org,2002:map', {\n  kind: 'mapping',\n  construct: function (data) { return data !== null ? data : {}; }\n});\n\nvar failsafe = new schema({\n  explicit: [\n    str,\n    seq,\n    map\n  ]\n});\n\nfunction resolveYamlNull(data) {\n  if (data === null) return true;\n\n  var max = data.length;\n\n  return (max === 1 && data === '~') ||\n         (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\n}\n\nfunction constructYamlNull() {\n  return null;\n}\n\nfunction isNull(object) {\n  return object === null;\n}\n\nvar _null = new type('tag:yaml.org,2002:null', {\n  kind: 'scalar',\n  resolve: resolveYamlNull,\n  construct: constructYamlNull,\n  predicate: isNull,\n  represent: {\n    canonical: function () { return '~';    },\n    lowercase: function () { return 'null'; },\n    uppercase: function () { return 'NULL'; },\n    camelcase: function () { return 'Null'; },\n    empty:     function () { return '';     }\n  },\n  defaultStyle: 'lowercase'\n});\n\nfunction resolveYamlBoolean(data) {\n  if (data === null) return false;\n\n  var max = data.length;\n\n  return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\n         (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\n}\n\nfunction constructYamlBoolean(data) {\n  return data === 'true' ||\n         data === 'True' ||\n         data === 'TRUE';\n}\n\nfunction isBoolean(object) {\n  return Object.prototype.toString.call(object) === '[object Boolean]';\n}\n\nvar bool = new type('tag:yaml.org,2002:bool', {\n  kind: 'scalar',\n  resolve: resolveYamlBoolean,\n  construct: constructYamlBoolean,\n  predicate: isBoolean,\n  represent: {\n    lowercase: function (object) { return object ? 'true' : 'false'; },\n    uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\n    camelcase: function (object) { return object ? 'True' : 'False'; }\n  },\n  defaultStyle: 'lowercase'\n});\n\nfunction isHexCode(c) {\n  return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\n         ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\n         ((0x61/* a */ <= c) && (c <= 0x66/* f */));\n}\n\nfunction isOctCode(c) {\n  return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\n}\n\nfunction isDecCode(c) {\n  return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\n}\n\nfunction resolveYamlInteger(data) {\n  if (data === null) return false;\n\n  var max = data.length,\n      index = 0,\n      hasDigits = false,\n      ch;\n\n  if (!max) return false;\n\n  ch = data[index];\n\n  // sign\n  if (ch === '-' || ch === '+') {\n    ch = data[++index];\n  }\n\n  if (ch === '0') {\n    // 0\n    if (index + 1 === max) return true;\n    ch = data[++index];\n\n    // base 2, base 8, base 16\n\n    if (ch === 'b') {\n      // base 2\n      index++;\n\n      for (; index < max; index++) {\n        ch = data[index];\n        if (ch === '_') continue;\n        if (ch !== '0' && ch !== '1') return false;\n        hasDigits = true;\n      }\n      return hasDigits && ch !== '_';\n    }\n\n\n    if (ch === 'x') {\n      // base 16\n      index++;\n\n      for (; index < max; index++) {\n        ch = data[index];\n        if (ch === '_') continue;\n        if (!isHexCode(data.charCodeAt(index))) return false;\n        hasDigits = true;\n      }\n      return hasDigits && ch !== '_';\n    }\n\n\n    if (ch === 'o') {\n      // base 8\n      index++;\n\n      for (; index < max; index++) {\n        ch = data[index];\n        if (ch === '_') continue;\n        if (!isOctCode(data.charCodeAt(index))) return false;\n        hasDigits = true;\n      }\n      return hasDigits && ch !== '_';\n    }\n  }\n\n  // base 10 (except 0)\n\n  // value should not start with `_`;\n  if (ch === '_') return false;\n\n  for (; index < max; index++) {\n    ch = data[index];\n    if (ch === '_') continue;\n    if (!isDecCode(data.charCodeAt(index))) {\n      return false;\n    }\n    hasDigits = true;\n  }\n\n  // Should have digits and should not end with `_`\n  if (!hasDigits || ch === '_') return false;\n\n  return true;\n}\n\nfunction constructYamlInteger(data) {\n  var value = data, sign = 1, ch;\n\n  if (value.indexOf('_') !== -1) {\n    value = value.replace(/_/g, '');\n  }\n\n  ch = value[0];\n\n  if (ch === '-' || ch === '+') {\n    if (ch === '-') sign = -1;\n    value = value.slice(1);\n    ch = value[0];\n  }\n\n  if (value === '0') return 0;\n\n  if (ch === '0') {\n    if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\n    if (value[1] === 'x') return sign * parseInt(value.slice(2), 16);\n    if (value[1] === 'o') return sign * parseInt(value.slice(2), 8);\n  }\n\n  return sign * parseInt(value, 10);\n}\n\nfunction isInteger(object) {\n  return (Object.prototype.toString.call(object)) === '[object Number]' &&\n         (object % 1 === 0 && !common.isNegativeZero(object));\n}\n\nvar int = new type('tag:yaml.org,2002:int', {\n  kind: 'scalar',\n  resolve: resolveYamlInteger,\n  construct: constructYamlInteger,\n  predicate: isInteger,\n  represent: {\n    binary:      function (obj) { return obj >= 0 ? '0b' + obj.toString(2) : '-0b' + obj.toString(2).slice(1); },\n    octal:       function (obj) { return obj >= 0 ? '0o'  + obj.toString(8) : '-0o'  + obj.toString(8).slice(1); },\n    decimal:     function (obj) { return obj.toString(10); },\n    /* eslint-disable max-len */\n    hexadecimal: function (obj) { return obj >= 0 ? '0x' + obj.toString(16).toUpperCase() :  '-0x' + obj.toString(16).toUpperCase().slice(1); }\n  },\n  defaultStyle: 'decimal',\n  styleAliases: {\n    binary:      [ 2,  'bin' ],\n    octal:       [ 8,  'oct' ],\n    decimal:     [ 10, 'dec' ],\n    hexadecimal: [ 16, 'hex' ]\n  }\n});\n\nvar YAML_FLOAT_PATTERN = new RegExp(\n  // 2.5e4, 2.5 and integers\n  '^(?:[-+]?(?:[0-9][0-9_]*)(?:\\\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?' +\n  // .2e4, .2\n  // special case, seems not from spec\n  '|\\\\.[0-9_]+(?:[eE][-+]?[0-9]+)?' +\n  // .inf\n  '|[-+]?\\\\.(?:inf|Inf|INF)' +\n  // .nan\n  '|\\\\.(?:nan|NaN|NAN))$');\n\nfunction resolveYamlFloat(data) {\n  if (data === null) return false;\n\n  if (!YAML_FLOAT_PATTERN.test(data) ||\n      // Quick hack to not allow integers end with `_`\n      // Probably should update regexp & check speed\n      data[data.length - 1] === '_') {\n    return false;\n  }\n\n  return true;\n}\n\nfunction constructYamlFloat(data) {\n  var value, sign;\n\n  value  = data.replace(/_/g, '').toLowerCase();\n  sign   = value[0] === '-' ? -1 : 1;\n\n  if ('+-'.indexOf(value[0]) >= 0) {\n    value = value.slice(1);\n  }\n\n  if (value === '.inf') {\n    return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\n\n  } else if (value === '.nan') {\n    return NaN;\n  }\n  return sign * parseFloat(value, 10);\n}\n\n\nvar SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\n\nfunction representYamlFloat(object, style) {\n  var res;\n\n  if (isNaN(object)) {\n    switch (style) {\n      case 'lowercase': return '.nan';\n      case 'uppercase': return '.NAN';\n      case 'camelcase': return '.NaN';\n    }\n  } else if (Number.POSITIVE_INFINITY === object) {\n    switch (style) {\n      case 'lowercase': return '.inf';\n      case 'uppercase': return '.INF';\n      case 'camelcase': return '.Inf';\n    }\n  } else if (Number.NEGATIVE_INFINITY === object) {\n    switch (style) {\n      case 'lowercase': return '-.inf';\n      case 'uppercase': return '-.INF';\n      case 'camelcase': return '-.Inf';\n    }\n  } else if (common.isNegativeZero(object)) {\n    return '-0.0';\n  }\n\n  res = object.toString(10);\n\n  // JS stringifier can build scientific format without dots: 5e-100,\n  // while YAML requres dot: 5.e-100. Fix it with simple hack\n\n  return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\n}\n\nfunction isFloat(object) {\n  return (Object.prototype.toString.call(object) === '[object Number]') &&\n         (object % 1 !== 0 || common.isNegativeZero(object));\n}\n\nvar float = new type('tag:yaml.org,2002:float', {\n  kind: 'scalar',\n  resolve: resolveYamlFloat,\n  construct: constructYamlFloat,\n  predicate: isFloat,\n  represent: representYamlFloat,\n  defaultStyle: 'lowercase'\n});\n\nvar json = failsafe.extend({\n  implicit: [\n    _null,\n    bool,\n    int,\n    float\n  ]\n});\n\nvar core = json;\n\nvar YAML_DATE_REGEXP = new RegExp(\n  '^([0-9][0-9][0-9][0-9])'          + // [1] year\n  '-([0-9][0-9])'                    + // [2] month\n  '-([0-9][0-9])$');                   // [3] day\n\nvar YAML_TIMESTAMP_REGEXP = new RegExp(\n  '^([0-9][0-9][0-9][0-9])'          + // [1] year\n  '-([0-9][0-9]?)'                   + // [2] month\n  '-([0-9][0-9]?)'                   + // [3] day\n  '(?:[Tt]|[ \\\\t]+)'                 + // ...\n  '([0-9][0-9]?)'                    + // [4] hour\n  ':([0-9][0-9])'                    + // [5] minute\n  ':([0-9][0-9])'                    + // [6] second\n  '(?:\\\\.([0-9]*))?'                 + // [7] fraction\n  '(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\n  '(?::([0-9][0-9]))?))?$');           // [11] tz_minute\n\nfunction resolveYamlTimestamp(data) {\n  if (data === null) return false;\n  if (YAML_DATE_REGEXP.exec(data) !== null) return true;\n  if (YAML_TIMESTAMP_REGEXP.exec(data) !== null) return true;\n  return false;\n}\n\nfunction constructYamlTimestamp(data) {\n  var match, year, month, day, hour, minute, second, fraction = 0,\n      delta = null, tz_hour, tz_minute, date;\n\n  match = YAML_DATE_REGEXP.exec(data);\n  if (match === null) match = YAML_TIMESTAMP_REGEXP.exec(data);\n\n  if (match === null) throw new Error('Date resolve error');\n\n  // match: [1] year [2] month [3] day\n\n  year = +(match[1]);\n  month = +(match[2]) - 1; // JS month starts with 0\n  day = +(match[3]);\n\n  if (!match[4]) { // no hour\n    return new Date(Date.UTC(year, month, day));\n  }\n\n  // match: [4] hour [5] minute [6] second [7] fraction\n\n  hour = +(match[4]);\n  minute = +(match[5]);\n  second = +(match[6]);\n\n  if (match[7]) {\n    fraction = match[7].slice(0, 3);\n    while (fraction.length < 3) { // milli-seconds\n      fraction += '0';\n    }\n    fraction = +fraction;\n  }\n\n  // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\n\n  if (match[9]) {\n    tz_hour = +(match[10]);\n    tz_minute = +(match[11] || 0);\n    delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\n    if (match[9] === '-') delta = -delta;\n  }\n\n  date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\n\n  if (delta) date.setTime(date.getTime() - delta);\n\n  return date;\n}\n\nfunction representYamlTimestamp(object /*, style*/) {\n  return object.toISOString();\n}\n\nvar timestamp = new type('tag:yaml.org,2002:timestamp', {\n  kind: 'scalar',\n  resolve: resolveYamlTimestamp,\n  construct: constructYamlTimestamp,\n  instanceOf: Date,\n  represent: representYamlTimestamp\n});\n\nfunction resolveYamlMerge(data) {\n  return data === '<<' || data === null;\n}\n\nvar merge = new type('tag:yaml.org,2002:merge', {\n  kind: 'scalar',\n  resolve: resolveYamlMerge\n});\n\n/*eslint-disable no-bitwise*/\n\n\n\n\n\n// [ 64, 65, 66 ] -> [ padding, CR, LF ]\nvar BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r';\n\n\nfunction resolveYamlBinary(data) {\n  if (data === null) return false;\n\n  var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\n\n  // Convert one by one.\n  for (idx = 0; idx < max; idx++) {\n    code = map.indexOf(data.charAt(idx));\n\n    // Skip CR/LF\n    if (code > 64) continue;\n\n    // Fail on illegal characters\n    if (code < 0) return false;\n\n    bitlen += 6;\n  }\n\n  // If there are any bits left, source was corrupted\n  return (bitlen % 8) === 0;\n}\n\nfunction constructYamlBinary(data) {\n  var idx, tailbits,\n      input = data.replace(/[\\r\\n=]/g, ''), // remove CR/LF & padding to simplify scan\n      max = input.length,\n      map = BASE64_MAP,\n      bits = 0,\n      result = [];\n\n  // Collect by 6*4 bits (3 bytes)\n\n  for (idx = 0; idx < max; idx++) {\n    if ((idx % 4 === 0) && idx) {\n      result.push((bits >> 16) & 0xFF);\n      result.push((bits >> 8) & 0xFF);\n      result.push(bits & 0xFF);\n    }\n\n    bits = (bits << 6) | map.indexOf(input.charAt(idx));\n  }\n\n  // Dump tail\n\n  tailbits = (max % 4) * 6;\n\n  if (tailbits === 0) {\n    result.push((bits >> 16) & 0xFF);\n    result.push((bits >> 8) & 0xFF);\n    result.push(bits & 0xFF);\n  } else if (tailbits === 18) {\n    result.push((bits >> 10) & 0xFF);\n    result.push((bits >> 2) & 0xFF);\n  } else if (tailbits === 12) {\n    result.push((bits >> 4) & 0xFF);\n  }\n\n  return new Uint8Array(result);\n}\n\nfunction representYamlBinary(object /*, style*/) {\n  var result = '', bits = 0, idx, tail,\n      max = object.length,\n      map = BASE64_MAP;\n\n  // Convert every three bytes to 4 ASCII characters.\n\n  for (idx = 0; idx < max; idx++) {\n    if ((idx % 3 === 0) && idx) {\n      result += map[(bits >> 18) & 0x3F];\n      result += map[(bits >> 12) & 0x3F];\n      result += map[(bits >> 6) & 0x3F];\n      result += map[bits & 0x3F];\n    }\n\n    bits = (bits << 8) + object[idx];\n  }\n\n  // Dump tail\n\n  tail = max % 3;\n\n  if (tail === 0) {\n    result += map[(bits >> 18) & 0x3F];\n    result += map[(bits >> 12) & 0x3F];\n    result += map[(bits >> 6) & 0x3F];\n    result += map[bits & 0x3F];\n  } else if (tail === 2) {\n    result += map[(bits >> 10) & 0x3F];\n    result += map[(bits >> 4) & 0x3F];\n    result += map[(bits << 2) & 0x3F];\n    result += map[64];\n  } else if (tail === 1) {\n    result += map[(bits >> 2) & 0x3F];\n    result += map[(bits << 4) & 0x3F];\n    result += map[64];\n    result += map[64];\n  }\n\n  return result;\n}\n\nfunction isBinary(obj) {\n  return Object.prototype.toString.call(obj) ===  '[object Uint8Array]';\n}\n\nvar binary = new type('tag:yaml.org,2002:binary', {\n  kind: 'scalar',\n  resolve: resolveYamlBinary,\n  construct: constructYamlBinary,\n  predicate: isBinary,\n  represent: representYamlBinary\n});\n\nvar _hasOwnProperty$3 = Object.prototype.hasOwnProperty;\nvar _toString$2       = Object.prototype.toString;\n\nfunction resolveYamlOmap(data) {\n  if (data === null) return true;\n\n  var objectKeys = [], index, length, pair, pairKey, pairHasKey,\n      object = data;\n\n  for (index = 0, length = object.length; index < length; index += 1) {\n    pair = object[index];\n    pairHasKey = false;\n\n    if (_toString$2.call(pair) !== '[object Object]') return false;\n\n    for (pairKey in pair) {\n      if (_hasOwnProperty$3.call(pair, pairKey)) {\n        if (!pairHasKey) pairHasKey = true;\n        else return false;\n      }\n    }\n\n    if (!pairHasKey) return false;\n\n    if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\n    else return false;\n  }\n\n  return true;\n}\n\nfunction constructYamlOmap(data) {\n  return data !== null ? data : [];\n}\n\nvar omap = new type('tag:yaml.org,2002:omap', {\n  kind: 'sequence',\n  resolve: resolveYamlOmap,\n  construct: constructYamlOmap\n});\n\nvar _toString$1 = Object.prototype.toString;\n\nfunction resolveYamlPairs(data) {\n  if (data === null) return true;\n\n  var index, length, pair, keys, result,\n      object = data;\n\n  result = new Array(object.length);\n\n  for (index = 0, length = object.length; index < length; index += 1) {\n    pair = object[index];\n\n    if (_toString$1.call(pair) !== '[object Object]') return false;\n\n    keys = Object.keys(pair);\n\n    if (keys.length !== 1) return false;\n\n    result[index] = [ keys[0], pair[keys[0]] ];\n  }\n\n  return true;\n}\n\nfunction constructYamlPairs(data) {\n  if (data === null) return [];\n\n  var index, length, pair, keys, result,\n      object = data;\n\n  result = new Array(object.length);\n\n  for (index = 0, length = object.length; index < length; index += 1) {\n    pair = object[index];\n\n    keys = Object.keys(pair);\n\n    result[index] = [ keys[0], pair[keys[0]] ];\n  }\n\n  return result;\n}\n\nvar pairs = new type('tag:yaml.org,2002:pairs', {\n  kind: 'sequence',\n  resolve: resolveYamlPairs,\n  construct: constructYamlPairs\n});\n\nvar _hasOwnProperty$2 = Object.prototype.hasOwnProperty;\n\nfunction resolveYamlSet(data) {\n  if (data === null) return true;\n\n  var key, object = data;\n\n  for (key in object) {\n    if (_hasOwnProperty$2.call(object, key)) {\n      if (object[key] !== null) return false;\n    }\n  }\n\n  return true;\n}\n\nfunction constructYamlSet(data) {\n  return data !== null ? data : {};\n}\n\nvar set = new type('tag:yaml.org,2002:set', {\n  kind: 'mapping',\n  resolve: resolveYamlSet,\n  construct: constructYamlSet\n});\n\nvar _default = core.extend({\n  implicit: [\n    timestamp,\n    merge\n  ],\n  explicit: [\n    binary,\n    omap,\n    pairs,\n    set\n  ]\n});\n\n/*eslint-disable max-len,no-use-before-define*/\n\n\n\n\n\n\n\nvar _hasOwnProperty$1 = Object.prototype.hasOwnProperty;\n\n\nvar CONTEXT_FLOW_IN   = 1;\nvar CONTEXT_FLOW_OUT  = 2;\nvar CONTEXT_BLOCK_IN  = 3;\nvar CONTEXT_BLOCK_OUT = 4;\n\n\nvar CHOMPING_CLIP  = 1;\nvar CHOMPING_STRIP = 2;\nvar CHOMPING_KEEP  = 3;\n\n\nvar PATTERN_NON_PRINTABLE         = /[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\nvar PATTERN_NON_ASCII_LINE_BREAKS = /[\\x85\\u2028\\u2029]/;\nvar PATTERN_FLOW_INDICATORS       = /[,\\[\\]\\{\\}]/;\nvar PATTERN_TAG_HANDLE            = /^(?:!|!!|![a-z\\-]+!)$/i;\nvar PATTERN_TAG_URI               = /^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i;\n\n\nfunction _class(obj) { return Object.prototype.toString.call(obj); }\n\nfunction is_EOL(c) {\n  return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\n}\n\nfunction is_WHITE_SPACE(c) {\n  return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\n}\n\nfunction is_WS_OR_EOL(c) {\n  return (c === 0x09/* Tab */) ||\n         (c === 0x20/* Space */) ||\n         (c === 0x0A/* LF */) ||\n         (c === 0x0D/* CR */);\n}\n\nfunction is_FLOW_INDICATOR(c) {\n  return c === 0x2C/* , */ ||\n         c === 0x5B/* [ */ ||\n         c === 0x5D/* ] */ ||\n         c === 0x7B/* { */ ||\n         c === 0x7D/* } */;\n}\n\nfunction fromHexCode(c) {\n  var lc;\n\n  if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n    return c - 0x30;\n  }\n\n  /*eslint-disable no-bitwise*/\n  lc = c | 0x20;\n\n  if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\n    return lc - 0x61 + 10;\n  }\n\n  return -1;\n}\n\nfunction escapedHexLen(c) {\n  if (c === 0x78/* x */) { return 2; }\n  if (c === 0x75/* u */) { return 4; }\n  if (c === 0x55/* U */) { return 8; }\n  return 0;\n}\n\nfunction fromDecimalCode(c) {\n  if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\n    return c - 0x30;\n  }\n\n  return -1;\n}\n\nfunction simpleEscapeSequence(c) {\n  /* eslint-disable indent */\n  return (c === 0x30/* 0 */) ? '\\x00' :\n        (c === 0x61/* a */) ? '\\x07' :\n        (c === 0x62/* b */) ? '\\x08' :\n        (c === 0x74/* t */) ? '\\x09' :\n        (c === 0x09/* Tab */) ? '\\x09' :\n        (c === 0x6E/* n */) ? '\\x0A' :\n        (c === 0x76/* v */) ? '\\x0B' :\n        (c === 0x66/* f */) ? '\\x0C' :\n        (c === 0x72/* r */) ? '\\x0D' :\n        (c === 0x65/* e */) ? '\\x1B' :\n        (c === 0x20/* Space */) ? ' ' :\n        (c === 0x22/* \" */) ? '\\x22' :\n        (c === 0x2F/* / */) ? '/' :\n        (c === 0x5C/* \\ */) ? '\\x5C' :\n        (c === 0x4E/* N */) ? '\\x85' :\n        (c === 0x5F/* _ */) ? '\\xA0' :\n        (c === 0x4C/* L */) ? '\\u2028' :\n        (c === 0x50/* P */) ? '\\u2029' : '';\n}\n\nfunction charFromCodepoint(c) {\n  if (c <= 0xFFFF) {\n    return String.fromCharCode(c);\n  }\n  // Encode UTF-16 surrogate pair\n  // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\n  return String.fromCharCode(\n    ((c - 0x010000) >> 10) + 0xD800,\n    ((c - 0x010000) & 0x03FF) + 0xDC00\n  );\n}\n\n// set a property of a literal object, while protecting against prototype pollution,\n// see https://github.com/nodeca/js-yaml/issues/164 for more details\nfunction setProperty(object, key, value) {\n  // used for this specific key only because Object.defineProperty is slow\n  if (key === '__proto__') {\n    Object.defineProperty(object, key, {\n      configurable: true,\n      enumerable: true,\n      writable: true,\n      value: value\n    });\n  } else {\n    object[key] = value;\n  }\n}\n\nvar simpleEscapeCheck = new Array(256); // integer, for fast access\nvar simpleEscapeMap = new Array(256);\nfor (var i = 0; i < 256; i++) {\n  simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\n  simpleEscapeMap[i] = simpleEscapeSequence(i);\n}\n\n\nfunction State$1(input, options) {\n  this.input = input;\n\n  this.filename  = options['filename']  || null;\n  this.schema    = options['schema']    || _default;\n  this.onWarning = options['onWarning'] || null;\n  // (Hidden) Remove? makes the loader to expect YAML 1.1 documents\n  // if such documents have no explicit %YAML directive\n  this.legacy    = options['legacy']    || false;\n\n  this.json      = options['json']      || false;\n  this.listener  = options['listener']  || null;\n\n  this.implicitTypes = this.schema.compiledImplicit;\n  this.typeMap       = this.schema.compiledTypeMap;\n\n  this.length     = input.length;\n  this.position   = 0;\n  this.line       = 0;\n  this.lineStart  = 0;\n  this.lineIndent = 0;\n\n  // position of first leading tab in the current line,\n  // used to make sure there are no tabs in the indentation\n  this.firstTabInLine = -1;\n\n  this.documents = [];\n\n  /*\n  this.version;\n  this.checkLineBreaks;\n  this.tagMap;\n  this.anchorMap;\n  this.tag;\n  this.anchor;\n  this.kind;\n  this.result;*/\n\n}\n\n\nfunction generateError(state, message) {\n  var mark = {\n    name:     state.filename,\n    buffer:   state.input.slice(0, -1), // omit trailing \\0\n    position: state.position,\n    line:     state.line,\n    column:   state.position - state.lineStart\n  };\n\n  mark.snippet = snippet(mark);\n\n  return new exception(message, mark);\n}\n\nfunction throwError(state, message) {\n  throw generateError(state, message);\n}\n\nfunction throwWarning(state, message) {\n  if (state.onWarning) {\n    state.onWarning.call(null, generateError(state, message));\n  }\n}\n\n\nvar directiveHandlers = {\n\n  YAML: function handleYamlDirective(state, name, args) {\n\n    var match, major, minor;\n\n    if (state.version !== null) {\n      throwError(state, 'duplication of %YAML directive');\n    }\n\n    if (args.length !== 1) {\n      throwError(state, 'YAML directive accepts exactly one argument');\n    }\n\n    match = /^([0-9]+)\\.([0-9]+)$/.exec(args[0]);\n\n    if (match === null) {\n      throwError(state, 'ill-formed argument of the YAML directive');\n    }\n\n    major = parseInt(match[1], 10);\n    minor = parseInt(match[2], 10);\n\n    if (major !== 1) {\n      throwError(state, 'unacceptable YAML version of the document');\n    }\n\n    state.version = args[0];\n    state.checkLineBreaks = (minor < 2);\n\n    if (minor !== 1 && minor !== 2) {\n      throwWarning(state, 'unsupported YAML version of the document');\n    }\n  },\n\n  TAG: function handleTagDirective(state, name, args) {\n\n    var handle, prefix;\n\n    if (args.length !== 2) {\n      throwError(state, 'TAG directive accepts exactly two arguments');\n    }\n\n    handle = args[0];\n    prefix = args[1];\n\n    if (!PATTERN_TAG_HANDLE.test(handle)) {\n      throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\n    }\n\n    if (_hasOwnProperty$1.call(state.tagMap, handle)) {\n      throwError(state, 'there is a previously declared suffix for \"' + handle + '\" tag handle');\n    }\n\n    if (!PATTERN_TAG_URI.test(prefix)) {\n      throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\n    }\n\n    try {\n      prefix = decodeURIComponent(prefix);\n    } catch (err) {\n      throwError(state, 'tag prefix is malformed: ' + prefix);\n    }\n\n    state.tagMap[handle] = prefix;\n  }\n};\n\n\nfunction captureSegment(state, start, end, checkJson) {\n  var _position, _length, _character, _result;\n\n  if (start < end) {\n    _result = state.input.slice(start, end);\n\n    if (checkJson) {\n      for (_position = 0, _length = _result.length; _position < _length; _position += 1) {\n        _character = _result.charCodeAt(_position);\n        if (!(_character === 0x09 ||\n              (0x20 <= _character && _character <= 0x10FFFF))) {\n          throwError(state, 'expected valid JSON character');\n        }\n      }\n    } else if (PATTERN_NON_PRINTABLE.test(_result)) {\n      throwError(state, 'the stream contains non-printable characters');\n    }\n\n    state.result += _result;\n  }\n}\n\nfunction mergeMappings(state, destination, source, overridableKeys) {\n  var sourceKeys, key, index, quantity;\n\n  if (!common.isObject(source)) {\n    throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\n  }\n\n  sourceKeys = Object.keys(source);\n\n  for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\n    key = sourceKeys[index];\n\n    if (!_hasOwnProperty$1.call(destination, key)) {\n      setProperty(destination, key, source[key]);\n      overridableKeys[key] = true;\n    }\n  }\n}\n\nfunction storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode,\n  startLine, startLineStart, startPos) {\n\n  var index, quantity;\n\n  // The output is a plain object here, so keys can only be strings.\n  // We need to convert keyNode to a string, but doing so can hang the process\n  // (deeply nested arrays that explode exponentially using aliases).\n  if (Array.isArray(keyNode)) {\n    keyNode = Array.prototype.slice.call(keyNode);\n\n    for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {\n      if (Array.isArray(keyNode[index])) {\n        throwError(state, 'nested arrays are not supported inside keys');\n      }\n\n      if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {\n        keyNode[index] = '[object Object]';\n      }\n    }\n  }\n\n  // Avoid code execution in load() via toString property\n  // (still use its own toString for arrays, timestamps,\n  // and whatever user schema extensions happen to have @@toStringTag)\n  if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {\n    keyNode = '[object Object]';\n  }\n\n\n  keyNode = String(keyNode);\n\n  if (_result === null) {\n    _result = {};\n  }\n\n  if (keyTag === 'tag:yaml.org,2002:merge') {\n    if (Array.isArray(valueNode)) {\n      for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\n        mergeMappings(state, _result, valueNode[index], overridableKeys);\n      }\n    } else {\n      mergeMappings(state, _result, valueNode, overridableKeys);\n    }\n  } else {\n    if (!state.json &&\n        !_hasOwnProperty$1.call(overridableKeys, keyNode) &&\n        _hasOwnProperty$1.call(_result, keyNode)) {\n      state.line = startLine || state.line;\n      state.lineStart = startLineStart || state.lineStart;\n      state.position = startPos || state.position;\n      throwError(state, 'duplicated mapping key');\n    }\n\n    setProperty(_result, keyNode, valueNode);\n    delete overridableKeys[keyNode];\n  }\n\n  return _result;\n}\n\nfunction readLineBreak(state) {\n  var ch;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (ch === 0x0A/* LF */) {\n    state.position++;\n  } else if (ch === 0x0D/* CR */) {\n    state.position++;\n    if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\n      state.position++;\n    }\n  } else {\n    throwError(state, 'a line break is expected');\n  }\n\n  state.line += 1;\n  state.lineStart = state.position;\n  state.firstTabInLine = -1;\n}\n\nfunction skipSeparationSpace(state, allowComments, checkIndent) {\n  var lineBreaks = 0,\n      ch = state.input.charCodeAt(state.position);\n\n  while (ch !== 0) {\n    while (is_WHITE_SPACE(ch)) {\n      if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {\n        state.firstTabInLine = state.position;\n      }\n      ch = state.input.charCodeAt(++state.position);\n    }\n\n    if (allowComments && ch === 0x23/* # */) {\n      do {\n        ch = state.input.charCodeAt(++state.position);\n      } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\n    }\n\n    if (is_EOL(ch)) {\n      readLineBreak(state);\n\n      ch = state.input.charCodeAt(state.position);\n      lineBreaks++;\n      state.lineIndent = 0;\n\n      while (ch === 0x20/* Space */) {\n        state.lineIndent++;\n        ch = state.input.charCodeAt(++state.position);\n      }\n    } else {\n      break;\n    }\n  }\n\n  if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\n    throwWarning(state, 'deficient indentation');\n  }\n\n  return lineBreaks;\n}\n\nfunction testDocumentSeparator(state) {\n  var _position = state.position,\n      ch;\n\n  ch = state.input.charCodeAt(_position);\n\n  // Condition state.position === state.lineStart is tested\n  // in parent on each call, for efficiency. No needs to test here again.\n  if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\n      ch === state.input.charCodeAt(_position + 1) &&\n      ch === state.input.charCodeAt(_position + 2)) {\n\n    _position += 3;\n\n    ch = state.input.charCodeAt(_position);\n\n    if (ch === 0 || is_WS_OR_EOL(ch)) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction writeFoldedLines(state, count) {\n  if (count === 1) {\n    state.result += ' ';\n  } else if (count > 1) {\n    state.result += common.repeat('\\n', count - 1);\n  }\n}\n\n\nfunction readPlainScalar(state, nodeIndent, withinFlowCollection) {\n  var preceding,\n      following,\n      captureStart,\n      captureEnd,\n      hasPendingContent,\n      _line,\n      _lineStart,\n      _lineIndent,\n      _kind = state.kind,\n      _result = state.result,\n      ch;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (is_WS_OR_EOL(ch)      ||\n      is_FLOW_INDICATOR(ch) ||\n      ch === 0x23/* # */    ||\n      ch === 0x26/* & */    ||\n      ch === 0x2A/* * */    ||\n      ch === 0x21/* ! */    ||\n      ch === 0x7C/* | */    ||\n      ch === 0x3E/* > */    ||\n      ch === 0x27/* ' */    ||\n      ch === 0x22/* \" */    ||\n      ch === 0x25/* % */    ||\n      ch === 0x40/* @ */    ||\n      ch === 0x60/* ` */) {\n    return false;\n  }\n\n  if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\n    following = state.input.charCodeAt(state.position + 1);\n\n    if (is_WS_OR_EOL(following) ||\n        withinFlowCollection && is_FLOW_INDICATOR(following)) {\n      return false;\n    }\n  }\n\n  state.kind = 'scalar';\n  state.result = '';\n  captureStart = captureEnd = state.position;\n  hasPendingContent = false;\n\n  while (ch !== 0) {\n    if (ch === 0x3A/* : */) {\n      following = state.input.charCodeAt(state.position + 1);\n\n      if (is_WS_OR_EOL(following) ||\n          withinFlowCollection && is_FLOW_INDICATOR(following)) {\n        break;\n      }\n\n    } else if (ch === 0x23/* # */) {\n      preceding = state.input.charCodeAt(state.position - 1);\n\n      if (is_WS_OR_EOL(preceding)) {\n        break;\n      }\n\n    } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\n               withinFlowCollection && is_FLOW_INDICATOR(ch)) {\n      break;\n\n    } else if (is_EOL(ch)) {\n      _line = state.line;\n      _lineStart = state.lineStart;\n      _lineIndent = state.lineIndent;\n      skipSeparationSpace(state, false, -1);\n\n      if (state.lineIndent >= nodeIndent) {\n        hasPendingContent = true;\n        ch = state.input.charCodeAt(state.position);\n        continue;\n      } else {\n        state.position = captureEnd;\n        state.line = _line;\n        state.lineStart = _lineStart;\n        state.lineIndent = _lineIndent;\n        break;\n      }\n    }\n\n    if (hasPendingContent) {\n      captureSegment(state, captureStart, captureEnd, false);\n      writeFoldedLines(state, state.line - _line);\n      captureStart = captureEnd = state.position;\n      hasPendingContent = false;\n    }\n\n    if (!is_WHITE_SPACE(ch)) {\n      captureEnd = state.position + 1;\n    }\n\n    ch = state.input.charCodeAt(++state.position);\n  }\n\n  captureSegment(state, captureStart, captureEnd, false);\n\n  if (state.result) {\n    return true;\n  }\n\n  state.kind = _kind;\n  state.result = _result;\n  return false;\n}\n\nfunction readSingleQuotedScalar(state, nodeIndent) {\n  var ch,\n      captureStart, captureEnd;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (ch !== 0x27/* ' */) {\n    return false;\n  }\n\n  state.kind = 'scalar';\n  state.result = '';\n  state.position++;\n  captureStart = captureEnd = state.position;\n\n  while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n    if (ch === 0x27/* ' */) {\n      captureSegment(state, captureStart, state.position, true);\n      ch = state.input.charCodeAt(++state.position);\n\n      if (ch === 0x27/* ' */) {\n        captureStart = state.position;\n        state.position++;\n        captureEnd = state.position;\n      } else {\n        return true;\n      }\n\n    } else if (is_EOL(ch)) {\n      captureSegment(state, captureStart, captureEnd, true);\n      writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n      captureStart = captureEnd = state.position;\n\n    } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n      throwError(state, 'unexpected end of the document within a single quoted scalar');\n\n    } else {\n      state.position++;\n      captureEnd = state.position;\n    }\n  }\n\n  throwError(state, 'unexpected end of the stream within a single quoted scalar');\n}\n\nfunction readDoubleQuotedScalar(state, nodeIndent) {\n  var captureStart,\n      captureEnd,\n      hexLength,\n      hexResult,\n      tmp,\n      ch;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (ch !== 0x22/* \" */) {\n    return false;\n  }\n\n  state.kind = 'scalar';\n  state.result = '';\n  state.position++;\n  captureStart = captureEnd = state.position;\n\n  while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n    if (ch === 0x22/* \" */) {\n      captureSegment(state, captureStart, state.position, true);\n      state.position++;\n      return true;\n\n    } else if (ch === 0x5C/* \\ */) {\n      captureSegment(state, captureStart, state.position, true);\n      ch = state.input.charCodeAt(++state.position);\n\n      if (is_EOL(ch)) {\n        skipSeparationSpace(state, false, nodeIndent);\n\n        // TODO: rework to inline fn with no type cast?\n      } else if (ch < 256 && simpleEscapeCheck[ch]) {\n        state.result += simpleEscapeMap[ch];\n        state.position++;\n\n      } else if ((tmp = escapedHexLen(ch)) > 0) {\n        hexLength = tmp;\n        hexResult = 0;\n\n        for (; hexLength > 0; hexLength--) {\n          ch = state.input.charCodeAt(++state.position);\n\n          if ((tmp = fromHexCode(ch)) >= 0) {\n            hexResult = (hexResult << 4) + tmp;\n\n          } else {\n            throwError(state, 'expected hexadecimal character');\n          }\n        }\n\n        state.result += charFromCodepoint(hexResult);\n\n        state.position++;\n\n      } else {\n        throwError(state, 'unknown escape sequence');\n      }\n\n      captureStart = captureEnd = state.position;\n\n    } else if (is_EOL(ch)) {\n      captureSegment(state, captureStart, captureEnd, true);\n      writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\n      captureStart = captureEnd = state.position;\n\n    } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\n      throwError(state, 'unexpected end of the document within a double quoted scalar');\n\n    } else {\n      state.position++;\n      captureEnd = state.position;\n    }\n  }\n\n  throwError(state, 'unexpected end of the stream within a double quoted scalar');\n}\n\nfunction readFlowCollection(state, nodeIndent) {\n  var readNext = true,\n      _line,\n      _lineStart,\n      _pos,\n      _tag     = state.tag,\n      _result,\n      _anchor  = state.anchor,\n      following,\n      terminator,\n      isPair,\n      isExplicitPair,\n      isMapping,\n      overridableKeys = Object.create(null),\n      keyNode,\n      keyTag,\n      valueNode,\n      ch;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (ch === 0x5B/* [ */) {\n    terminator = 0x5D;/* ] */\n    isMapping = false;\n    _result = [];\n  } else if (ch === 0x7B/* { */) {\n    terminator = 0x7D;/* } */\n    isMapping = true;\n    _result = {};\n  } else {\n    return false;\n  }\n\n  if (state.anchor !== null) {\n    state.anchorMap[state.anchor] = _result;\n  }\n\n  ch = state.input.charCodeAt(++state.position);\n\n  while (ch !== 0) {\n    skipSeparationSpace(state, true, nodeIndent);\n\n    ch = state.input.charCodeAt(state.position);\n\n    if (ch === terminator) {\n      state.position++;\n      state.tag = _tag;\n      state.anchor = _anchor;\n      state.kind = isMapping ? 'mapping' : 'sequence';\n      state.result = _result;\n      return true;\n    } else if (!readNext) {\n      throwError(state, 'missed comma between flow collection entries');\n    } else if (ch === 0x2C/* , */) {\n      // \"flow collection entries can never be completely empty\", as per YAML 1.2, section 7.4\n      throwError(state, \"expected the node content, but found ','\");\n    }\n\n    keyTag = keyNode = valueNode = null;\n    isPair = isExplicitPair = false;\n\n    if (ch === 0x3F/* ? */) {\n      following = state.input.charCodeAt(state.position + 1);\n\n      if (is_WS_OR_EOL(following)) {\n        isPair = isExplicitPair = true;\n        state.position++;\n        skipSeparationSpace(state, true, nodeIndent);\n      }\n    }\n\n    _line = state.line; // Save the current line.\n    _lineStart = state.lineStart;\n    _pos = state.position;\n    composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n    keyTag = state.tag;\n    keyNode = state.result;\n    skipSeparationSpace(state, true, nodeIndent);\n\n    ch = state.input.charCodeAt(state.position);\n\n    if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\n      isPair = true;\n      ch = state.input.charCodeAt(++state.position);\n      skipSeparationSpace(state, true, nodeIndent);\n      composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\n      valueNode = state.result;\n    }\n\n    if (isMapping) {\n      storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);\n    } else if (isPair) {\n      _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));\n    } else {\n      _result.push(keyNode);\n    }\n\n    skipSeparationSpace(state, true, nodeIndent);\n\n    ch = state.input.charCodeAt(state.position);\n\n    if (ch === 0x2C/* , */) {\n      readNext = true;\n      ch = state.input.charCodeAt(++state.position);\n    } else {\n      readNext = false;\n    }\n  }\n\n  throwError(state, 'unexpected end of the stream within a flow collection');\n}\n\nfunction readBlockScalar(state, nodeIndent) {\n  var captureStart,\n      folding,\n      chomping       = CHOMPING_CLIP,\n      didReadContent = false,\n      detectedIndent = false,\n      textIndent     = nodeIndent,\n      emptyLines     = 0,\n      atMoreIndented = false,\n      tmp,\n      ch;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (ch === 0x7C/* | */) {\n    folding = false;\n  } else if (ch === 0x3E/* > */) {\n    folding = true;\n  } else {\n    return false;\n  }\n\n  state.kind = 'scalar';\n  state.result = '';\n\n  while (ch !== 0) {\n    ch = state.input.charCodeAt(++state.position);\n\n    if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\n      if (CHOMPING_CLIP === chomping) {\n        chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\n      } else {\n        throwError(state, 'repeat of a chomping mode identifier');\n      }\n\n    } else if ((tmp = fromDecimalCode(ch)) >= 0) {\n      if (tmp === 0) {\n        throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\n      } else if (!detectedIndent) {\n        textIndent = nodeIndent + tmp - 1;\n        detectedIndent = true;\n      } else {\n        throwError(state, 'repeat of an indentation width identifier');\n      }\n\n    } else {\n      break;\n    }\n  }\n\n  if (is_WHITE_SPACE(ch)) {\n    do { ch = state.input.charCodeAt(++state.position); }\n    while (is_WHITE_SPACE(ch));\n\n    if (ch === 0x23/* # */) {\n      do { ch = state.input.charCodeAt(++state.position); }\n      while (!is_EOL(ch) && (ch !== 0));\n    }\n  }\n\n  while (ch !== 0) {\n    readLineBreak(state);\n    state.lineIndent = 0;\n\n    ch = state.input.charCodeAt(state.position);\n\n    while ((!detectedIndent || state.lineIndent < textIndent) &&\n           (ch === 0x20/* Space */)) {\n      state.lineIndent++;\n      ch = state.input.charCodeAt(++state.position);\n    }\n\n    if (!detectedIndent && state.lineIndent > textIndent) {\n      textIndent = state.lineIndent;\n    }\n\n    if (is_EOL(ch)) {\n      emptyLines++;\n      continue;\n    }\n\n    // End of the scalar.\n    if (state.lineIndent < textIndent) {\n\n      // Perform the chomping.\n      if (chomping === CHOMPING_KEEP) {\n        state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n      } else if (chomping === CHOMPING_CLIP) {\n        if (didReadContent) { // i.e. only if the scalar is not empty.\n          state.result += '\\n';\n        }\n      }\n\n      // Break this `while` cycle and go to the funciton's epilogue.\n      break;\n    }\n\n    // Folded style: use fancy rules to handle line breaks.\n    if (folding) {\n\n      // Lines starting with white space characters (more-indented lines) are not folded.\n      if (is_WHITE_SPACE(ch)) {\n        atMoreIndented = true;\n        // except for the first content line (cf. Example 8.1)\n        state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n\n      // End of more-indented block.\n      } else if (atMoreIndented) {\n        atMoreIndented = false;\n        state.result += common.repeat('\\n', emptyLines + 1);\n\n      // Just one line break - perceive as the same line.\n      } else if (emptyLines === 0) {\n        if (didReadContent) { // i.e. only if we have already read some scalar content.\n          state.result += ' ';\n        }\n\n      // Several line breaks - perceive as different lines.\n      } else {\n        state.result += common.repeat('\\n', emptyLines);\n      }\n\n    // Literal style: just add exact number of line breaks between content lines.\n    } else {\n      // Keep all line breaks except the header line break.\n      state.result += common.repeat('\\n', didReadContent ? 1 + emptyLines : emptyLines);\n    }\n\n    didReadContent = true;\n    detectedIndent = true;\n    emptyLines = 0;\n    captureStart = state.position;\n\n    while (!is_EOL(ch) && (ch !== 0)) {\n      ch = state.input.charCodeAt(++state.position);\n    }\n\n    captureSegment(state, captureStart, state.position, false);\n  }\n\n  return true;\n}\n\nfunction readBlockSequence(state, nodeIndent) {\n  var _line,\n      _tag      = state.tag,\n      _anchor   = state.anchor,\n      _result   = [],\n      following,\n      detected  = false,\n      ch;\n\n  // there is a leading tab before this token, so it can't be a block sequence/mapping;\n  // it can still be flow sequence/mapping or a scalar\n  if (state.firstTabInLine !== -1) return false;\n\n  if (state.anchor !== null) {\n    state.anchorMap[state.anchor] = _result;\n  }\n\n  ch = state.input.charCodeAt(state.position);\n\n  while (ch !== 0) {\n    if (state.firstTabInLine !== -1) {\n      state.position = state.firstTabInLine;\n      throwError(state, 'tab characters must not be used in indentation');\n    }\n\n    if (ch !== 0x2D/* - */) {\n      break;\n    }\n\n    following = state.input.charCodeAt(state.position + 1);\n\n    if (!is_WS_OR_EOL(following)) {\n      break;\n    }\n\n    detected = true;\n    state.position++;\n\n    if (skipSeparationSpace(state, true, -1)) {\n      if (state.lineIndent <= nodeIndent) {\n        _result.push(null);\n        ch = state.input.charCodeAt(state.position);\n        continue;\n      }\n    }\n\n    _line = state.line;\n    composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\n    _result.push(state.result);\n    skipSeparationSpace(state, true, -1);\n\n    ch = state.input.charCodeAt(state.position);\n\n    if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n      throwError(state, 'bad indentation of a sequence entry');\n    } else if (state.lineIndent < nodeIndent) {\n      break;\n    }\n  }\n\n  if (detected) {\n    state.tag = _tag;\n    state.anchor = _anchor;\n    state.kind = 'sequence';\n    state.result = _result;\n    return true;\n  }\n  return false;\n}\n\nfunction readBlockMapping(state, nodeIndent, flowIndent) {\n  var following,\n      allowCompact,\n      _line,\n      _keyLine,\n      _keyLineStart,\n      _keyPos,\n      _tag          = state.tag,\n      _anchor       = state.anchor,\n      _result       = {},\n      overridableKeys = Object.create(null),\n      keyTag        = null,\n      keyNode       = null,\n      valueNode     = null,\n      atExplicitKey = false,\n      detected      = false,\n      ch;\n\n  // there is a leading tab before this token, so it can't be a block sequence/mapping;\n  // it can still be flow sequence/mapping or a scalar\n  if (state.firstTabInLine !== -1) return false;\n\n  if (state.anchor !== null) {\n    state.anchorMap[state.anchor] = _result;\n  }\n\n  ch = state.input.charCodeAt(state.position);\n\n  while (ch !== 0) {\n    if (!atExplicitKey && state.firstTabInLine !== -1) {\n      state.position = state.firstTabInLine;\n      throwError(state, 'tab characters must not be used in indentation');\n    }\n\n    following = state.input.charCodeAt(state.position + 1);\n    _line = state.line; // Save the current line.\n\n    //\n    // Explicit notation case. There are two separate blocks:\n    // first for the key (denoted by \"?\") and second for the value (denoted by \":\")\n    //\n    if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\n\n      if (ch === 0x3F/* ? */) {\n        if (atExplicitKey) {\n          storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n          keyTag = keyNode = valueNode = null;\n        }\n\n        detected = true;\n        atExplicitKey = true;\n        allowCompact = true;\n\n      } else if (atExplicitKey) {\n        // i.e. 0x3A/* : */ === character after the explicit key.\n        atExplicitKey = false;\n        allowCompact = true;\n\n      } else {\n        throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line');\n      }\n\n      state.position += 1;\n      ch = following;\n\n    //\n    // Implicit notation case. Flow-style node as the key first, then \":\", and the value.\n    //\n    } else {\n      _keyLine = state.line;\n      _keyLineStart = state.lineStart;\n      _keyPos = state.position;\n\n      if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\n        // Neither implicit nor explicit notation.\n        // Reading is done. Go to the epilogue.\n        break;\n      }\n\n      if (state.line === _line) {\n        ch = state.input.charCodeAt(state.position);\n\n        while (is_WHITE_SPACE(ch)) {\n          ch = state.input.charCodeAt(++state.position);\n        }\n\n        if (ch === 0x3A/* : */) {\n          ch = state.input.charCodeAt(++state.position);\n\n          if (!is_WS_OR_EOL(ch)) {\n            throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\n          }\n\n          if (atExplicitKey) {\n            storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n            keyTag = keyNode = valueNode = null;\n          }\n\n          detected = true;\n          atExplicitKey = false;\n          allowCompact = false;\n          keyTag = state.tag;\n          keyNode = state.result;\n\n        } else if (detected) {\n          throwError(state, 'can not read an implicit mapping pair; a colon is missed');\n\n        } else {\n          state.tag = _tag;\n          state.anchor = _anchor;\n          return true; // Keep the result of `composeNode`.\n        }\n\n      } else if (detected) {\n        throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\n\n      } else {\n        state.tag = _tag;\n        state.anchor = _anchor;\n        return true; // Keep the result of `composeNode`.\n      }\n    }\n\n    //\n    // Common reading code for both explicit and implicit notations.\n    //\n    if (state.line === _line || state.lineIndent > nodeIndent) {\n      if (atExplicitKey) {\n        _keyLine = state.line;\n        _keyLineStart = state.lineStart;\n        _keyPos = state.position;\n      }\n\n      if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\n        if (atExplicitKey) {\n          keyNode = state.result;\n        } else {\n          valueNode = state.result;\n        }\n      }\n\n      if (!atExplicitKey) {\n        storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);\n        keyTag = keyNode = valueNode = null;\n      }\n\n      skipSeparationSpace(state, true, -1);\n      ch = state.input.charCodeAt(state.position);\n    }\n\n    if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\n      throwError(state, 'bad indentation of a mapping entry');\n    } else if (state.lineIndent < nodeIndent) {\n      break;\n    }\n  }\n\n  //\n  // Epilogue.\n  //\n\n  // Special case: last mapping's node contains only the key in explicit notation.\n  if (atExplicitKey) {\n    storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);\n  }\n\n  // Expose the resulting mapping.\n  if (detected) {\n    state.tag = _tag;\n    state.anchor = _anchor;\n    state.kind = 'mapping';\n    state.result = _result;\n  }\n\n  return detected;\n}\n\nfunction readTagProperty(state) {\n  var _position,\n      isVerbatim = false,\n      isNamed    = false,\n      tagHandle,\n      tagName,\n      ch;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (ch !== 0x21/* ! */) return false;\n\n  if (state.tag !== null) {\n    throwError(state, 'duplication of a tag property');\n  }\n\n  ch = state.input.charCodeAt(++state.position);\n\n  if (ch === 0x3C/* < */) {\n    isVerbatim = true;\n    ch = state.input.charCodeAt(++state.position);\n\n  } else if (ch === 0x21/* ! */) {\n    isNamed = true;\n    tagHandle = '!!';\n    ch = state.input.charCodeAt(++state.position);\n\n  } else {\n    tagHandle = '!';\n  }\n\n  _position = state.position;\n\n  if (isVerbatim) {\n    do { ch = state.input.charCodeAt(++state.position); }\n    while (ch !== 0 && ch !== 0x3E/* > */);\n\n    if (state.position < state.length) {\n      tagName = state.input.slice(_position, state.position);\n      ch = state.input.charCodeAt(++state.position);\n    } else {\n      throwError(state, 'unexpected end of the stream within a verbatim tag');\n    }\n  } else {\n    while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n\n      if (ch === 0x21/* ! */) {\n        if (!isNamed) {\n          tagHandle = state.input.slice(_position - 1, state.position + 1);\n\n          if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\n            throwError(state, 'named tag handle cannot contain such characters');\n          }\n\n          isNamed = true;\n          _position = state.position + 1;\n        } else {\n          throwError(state, 'tag suffix cannot contain exclamation marks');\n        }\n      }\n\n      ch = state.input.charCodeAt(++state.position);\n    }\n\n    tagName = state.input.slice(_position, state.position);\n\n    if (PATTERN_FLOW_INDICATORS.test(tagName)) {\n      throwError(state, 'tag suffix cannot contain flow indicator characters');\n    }\n  }\n\n  if (tagName && !PATTERN_TAG_URI.test(tagName)) {\n    throwError(state, 'tag name cannot contain such characters: ' + tagName);\n  }\n\n  try {\n    tagName = decodeURIComponent(tagName);\n  } catch (err) {\n    throwError(state, 'tag name is malformed: ' + tagName);\n  }\n\n  if (isVerbatim) {\n    state.tag = tagName;\n\n  } else if (_hasOwnProperty$1.call(state.tagMap, tagHandle)) {\n    state.tag = state.tagMap[tagHandle] + tagName;\n\n  } else if (tagHandle === '!') {\n    state.tag = '!' + tagName;\n\n  } else if (tagHandle === '!!') {\n    state.tag = 'tag:yaml.org,2002:' + tagName;\n\n  } else {\n    throwError(state, 'undeclared tag handle \"' + tagHandle + '\"');\n  }\n\n  return true;\n}\n\nfunction readAnchorProperty(state) {\n  var _position,\n      ch;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (ch !== 0x26/* & */) return false;\n\n  if (state.anchor !== null) {\n    throwError(state, 'duplication of an anchor property');\n  }\n\n  ch = state.input.charCodeAt(++state.position);\n  _position = state.position;\n\n  while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n    ch = state.input.charCodeAt(++state.position);\n  }\n\n  if (state.position === _position) {\n    throwError(state, 'name of an anchor node must contain at least one character');\n  }\n\n  state.anchor = state.input.slice(_position, state.position);\n  return true;\n}\n\nfunction readAlias(state) {\n  var _position, alias,\n      ch;\n\n  ch = state.input.charCodeAt(state.position);\n\n  if (ch !== 0x2A/* * */) return false;\n\n  ch = state.input.charCodeAt(++state.position);\n  _position = state.position;\n\n  while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\n    ch = state.input.charCodeAt(++state.position);\n  }\n\n  if (state.position === _position) {\n    throwError(state, 'name of an alias node must contain at least one character');\n  }\n\n  alias = state.input.slice(_position, state.position);\n\n  if (!_hasOwnProperty$1.call(state.anchorMap, alias)) {\n    throwError(state, 'unidentified alias \"' + alias + '\"');\n  }\n\n  state.result = state.anchorMap[alias];\n  skipSeparationSpace(state, true, -1);\n  return true;\n}\n\nfunction composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\n  var allowBlockStyles,\n      allowBlockScalars,\n      allowBlockCollections,\n      indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent\n      atNewLine  = false,\n      hasContent = false,\n      typeIndex,\n      typeQuantity,\n      typeList,\n      type,\n      flowIndent,\n      blockIndent;\n\n  if (state.listener !== null) {\n    state.listener('open', state);\n  }\n\n  state.tag    = null;\n  state.anchor = null;\n  state.kind   = null;\n  state.result = null;\n\n  allowBlockStyles = allowBlockScalars = allowBlockCollections =\n    CONTEXT_BLOCK_OUT === nodeContext ||\n    CONTEXT_BLOCK_IN  === nodeContext;\n\n  if (allowToSeek) {\n    if (skipSeparationSpace(state, true, -1)) {\n      atNewLine = true;\n\n      if (state.lineIndent > parentIndent) {\n        indentStatus = 1;\n      } else if (state.lineIndent === parentIndent) {\n        indentStatus = 0;\n      } else if (state.lineIndent < parentIndent) {\n        indentStatus = -1;\n      }\n    }\n  }\n\n  if (indentStatus === 1) {\n    while (readTagProperty(state) || readAnchorProperty(state)) {\n      if (skipSeparationSpace(state, true, -1)) {\n        atNewLine = true;\n        allowBlockCollections = allowBlockStyles;\n\n        if (state.lineIndent > parentIndent) {\n          indentStatus = 1;\n        } else if (state.lineIndent === parentIndent) {\n          indentStatus = 0;\n        } else if (state.lineIndent < parentIndent) {\n          indentStatus = -1;\n        }\n      } else {\n        allowBlockCollections = false;\n      }\n    }\n  }\n\n  if (allowBlockCollections) {\n    allowBlockCollections = atNewLine || allowCompact;\n  }\n\n  if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\n    if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\n      flowIndent = parentIndent;\n    } else {\n      flowIndent = parentIndent + 1;\n    }\n\n    blockIndent = state.position - state.lineStart;\n\n    if (indentStatus === 1) {\n      if (allowBlockCollections &&\n          (readBlockSequence(state, blockIndent) ||\n           readBlockMapping(state, blockIndent, flowIndent)) ||\n          readFlowCollection(state, flowIndent)) {\n        hasContent = true;\n      } else {\n        if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\n            readSingleQuotedScalar(state, flowIndent) ||\n            readDoubleQuotedScalar(state, flowIndent)) {\n          hasContent = true;\n\n        } else if (readAlias(state)) {\n          hasContent = true;\n\n          if (state.tag !== null || state.anchor !== null) {\n            throwError(state, 'alias node should not have any properties');\n          }\n\n        } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\n          hasContent = true;\n\n          if (state.tag === null) {\n            state.tag = '?';\n          }\n        }\n\n        if (state.anchor !== null) {\n          state.anchorMap[state.anchor] = state.result;\n        }\n      }\n    } else if (indentStatus === 0) {\n      // Special case: block sequences are allowed to have same indentation level as the parent.\n      // http://www.yaml.org/spec/1.2/spec.html#id2799784\n      hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\n    }\n  }\n\n  if (state.tag === null) {\n    if (state.anchor !== null) {\n      state.anchorMap[state.anchor] = state.result;\n    }\n\n  } else if (state.tag === '?') {\n    // Implicit resolving is not allowed for non-scalar types, and '?'\n    // non-specific tag is only automatically assigned to plain scalars.\n    //\n    // We only need to check kind conformity in case user explicitly assigns '?'\n    // tag, for example like this: \"!<?> [0]\"\n    //\n    if (state.result !== null && state.kind !== 'scalar') {\n      throwError(state, 'unacceptable node kind for !<?> tag; it should be \"scalar\", not \"' + state.kind + '\"');\n    }\n\n    for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {\n      type = state.implicitTypes[typeIndex];\n\n      if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\n        state.result = type.construct(state.result);\n        state.tag = type.tag;\n        if (state.anchor !== null) {\n          state.anchorMap[state.anchor] = state.result;\n        }\n        break;\n      }\n    }\n  } else if (state.tag !== '!') {\n    if (_hasOwnProperty$1.call(state.typeMap[state.kind || 'fallback'], state.tag)) {\n      type = state.typeMap[state.kind || 'fallback'][state.tag];\n    } else {\n      // looking for multi type\n      type = null;\n      typeList = state.typeMap.multi[state.kind || 'fallback'];\n\n      for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {\n        if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {\n          type = typeList[typeIndex];\n          break;\n        }\n      }\n    }\n\n    if (!type) {\n      throwError(state, 'unknown tag !<' + state.tag + '>');\n    }\n\n    if (state.result !== null && type.kind !== state.kind) {\n      throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be \"' + type.kind + '\", not \"' + state.kind + '\"');\n    }\n\n    if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched\n      throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\n    } else {\n      state.result = type.construct(state.result, state.tag);\n      if (state.anchor !== null) {\n        state.anchorMap[state.anchor] = state.result;\n      }\n    }\n  }\n\n  if (state.listener !== null) {\n    state.listener('close', state);\n  }\n  return state.tag !== null ||  state.anchor !== null || hasContent;\n}\n\nfunction readDocument(state) {\n  var documentStart = state.position,\n      _position,\n      directiveName,\n      directiveArgs,\n      hasDirectives = false,\n      ch;\n\n  state.version = null;\n  state.checkLineBreaks = state.legacy;\n  state.tagMap = Object.create(null);\n  state.anchorMap = Object.create(null);\n\n  while ((ch = state.input.charCodeAt(state.position)) !== 0) {\n    skipSeparationSpace(state, true, -1);\n\n    ch = state.input.charCodeAt(state.position);\n\n    if (state.lineIndent > 0 || ch !== 0x25/* % */) {\n      break;\n    }\n\n    hasDirectives = true;\n    ch = state.input.charCodeAt(++state.position);\n    _position = state.position;\n\n    while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n      ch = state.input.charCodeAt(++state.position);\n    }\n\n    directiveName = state.input.slice(_position, state.position);\n    directiveArgs = [];\n\n    if (directiveName.length < 1) {\n      throwError(state, 'directive name must not be less than one character in length');\n    }\n\n    while (ch !== 0) {\n      while (is_WHITE_SPACE(ch)) {\n        ch = state.input.charCodeAt(++state.position);\n      }\n\n      if (ch === 0x23/* # */) {\n        do { ch = state.input.charCodeAt(++state.position); }\n        while (ch !== 0 && !is_EOL(ch));\n        break;\n      }\n\n      if (is_EOL(ch)) break;\n\n      _position = state.position;\n\n      while (ch !== 0 && !is_WS_OR_EOL(ch)) {\n        ch = state.input.charCodeAt(++state.position);\n      }\n\n      directiveArgs.push(state.input.slice(_position, state.position));\n    }\n\n    if (ch !== 0) readLineBreak(state);\n\n    if (_hasOwnProperty$1.call(directiveHandlers, directiveName)) {\n      directiveHandlers[directiveName](state, directiveName, directiveArgs);\n    } else {\n      throwWarning(state, 'unknown document directive \"' + directiveName + '\"');\n    }\n  }\n\n  skipSeparationSpace(state, true, -1);\n\n  if (state.lineIndent === 0 &&\n      state.input.charCodeAt(state.position)     === 0x2D/* - */ &&\n      state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\n      state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\n    state.position += 3;\n    skipSeparationSpace(state, true, -1);\n\n  } else if (hasDirectives) {\n    throwError(state, 'directives end mark is expected');\n  }\n\n  composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\n  skipSeparationSpace(state, true, -1);\n\n  if (state.checkLineBreaks &&\n      PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\n    throwWarning(state, 'non-ASCII line breaks are interpreted as content');\n  }\n\n  state.documents.push(state.result);\n\n  if (state.position === state.lineStart && testDocumentSeparator(state)) {\n\n    if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\n      state.position += 3;\n      skipSeparationSpace(state, true, -1);\n    }\n    return;\n  }\n\n  if (state.position < (state.length - 1)) {\n    throwError(state, 'end of the stream or a document separator is expected');\n  } else {\n    return;\n  }\n}\n\n\nfunction loadDocuments(input, options) {\n  input = String(input);\n  options = options || {};\n\n  if (input.length !== 0) {\n\n    // Add tailing `\\n` if not exists\n    if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\n        input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\n      input += '\\n';\n    }\n\n    // Strip BOM\n    if (input.charCodeAt(0) === 0xFEFF) {\n      input = input.slice(1);\n    }\n  }\n\n  var state = new State$1(input, options);\n\n  var nullpos = input.indexOf('\\0');\n\n  if (nullpos !== -1) {\n    state.position = nullpos;\n    throwError(state, 'null byte is not allowed in input');\n  }\n\n  // Use 0 as string terminator. That significantly simplifies bounds check.\n  state.input += '\\0';\n\n  while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\n    state.lineIndent += 1;\n    state.position += 1;\n  }\n\n  while (state.position < (state.length - 1)) {\n    readDocument(state);\n  }\n\n  return state.documents;\n}\n\n\nfunction loadAll$1(input, iterator, options) {\n  if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {\n    options = iterator;\n    iterator = null;\n  }\n\n  var documents = loadDocuments(input, options);\n\n  if (typeof iterator !== 'function') {\n    return documents;\n  }\n\n  for (var index = 0, length = documents.length; index < length; index += 1) {\n    iterator(documents[index]);\n  }\n}\n\n\nfunction load$1(input, options) {\n  var documents = loadDocuments(input, options);\n\n  if (documents.length === 0) {\n    /*eslint-disable no-undefined*/\n    return undefined;\n  } else if (documents.length === 1) {\n    return documents[0];\n  }\n  throw new exception('expected a single document in the stream, but found more');\n}\n\n\nvar loadAll_1 = loadAll$1;\nvar load_1    = load$1;\n\nvar loader = {\n\tloadAll: loadAll_1,\n\tload: load_1\n};\n\n/*eslint-disable no-use-before-define*/\n\n\n\n\n\nvar _toString       = Object.prototype.toString;\nvar _hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar CHAR_BOM                  = 0xFEFF;\nvar CHAR_TAB                  = 0x09; /* Tab */\nvar CHAR_LINE_FEED            = 0x0A; /* LF */\nvar CHAR_CARRIAGE_RETURN      = 0x0D; /* CR */\nvar CHAR_SPACE                = 0x20; /* Space */\nvar CHAR_EXCLAMATION          = 0x21; /* ! */\nvar CHAR_DOUBLE_QUOTE         = 0x22; /* \" */\nvar CHAR_SHARP                = 0x23; /* # */\nvar CHAR_PERCENT              = 0x25; /* % */\nvar CHAR_AMPERSAND            = 0x26; /* & */\nvar CHAR_SINGLE_QUOTE         = 0x27; /* ' */\nvar CHAR_ASTERISK             = 0x2A; /* * */\nvar CHAR_COMMA                = 0x2C; /* , */\nvar CHAR_MINUS                = 0x2D; /* - */\nvar CHAR_COLON                = 0x3A; /* : */\nvar CHAR_EQUALS               = 0x3D; /* = */\nvar CHAR_GREATER_THAN         = 0x3E; /* > */\nvar CHAR_QUESTION             = 0x3F; /* ? */\nvar CHAR_COMMERCIAL_AT        = 0x40; /* @ */\nvar CHAR_LEFT_SQUARE_BRACKET  = 0x5B; /* [ */\nvar CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\nvar CHAR_GRAVE_ACCENT         = 0x60; /* ` */\nvar CHAR_LEFT_CURLY_BRACKET   = 0x7B; /* { */\nvar CHAR_VERTICAL_LINE        = 0x7C; /* | */\nvar CHAR_RIGHT_CURLY_BRACKET  = 0x7D; /* } */\n\nvar ESCAPE_SEQUENCES = {};\n\nESCAPE_SEQUENCES[0x00]   = '\\\\0';\nESCAPE_SEQUENCES[0x07]   = '\\\\a';\nESCAPE_SEQUENCES[0x08]   = '\\\\b';\nESCAPE_SEQUENCES[0x09]   = '\\\\t';\nESCAPE_SEQUENCES[0x0A]   = '\\\\n';\nESCAPE_SEQUENCES[0x0B]   = '\\\\v';\nESCAPE_SEQUENCES[0x0C]   = '\\\\f';\nESCAPE_SEQUENCES[0x0D]   = '\\\\r';\nESCAPE_SEQUENCES[0x1B]   = '\\\\e';\nESCAPE_SEQUENCES[0x22]   = '\\\\\"';\nESCAPE_SEQUENCES[0x5C]   = '\\\\\\\\';\nESCAPE_SEQUENCES[0x85]   = '\\\\N';\nESCAPE_SEQUENCES[0xA0]   = '\\\\_';\nESCAPE_SEQUENCES[0x2028] = '\\\\L';\nESCAPE_SEQUENCES[0x2029] = '\\\\P';\n\nvar DEPRECATED_BOOLEANS_SYNTAX = [\n  'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\n  'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\n];\n\nvar DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\\.[0-9_]*)?$/;\n\nfunction compileStyleMap(schema, map) {\n  var result, keys, index, length, tag, style, type;\n\n  if (map === null) return {};\n\n  result = {};\n  keys = Object.keys(map);\n\n  for (index = 0, length = keys.length; index < length; index += 1) {\n    tag = keys[index];\n    style = String(map[tag]);\n\n    if (tag.slice(0, 2) === '!!') {\n      tag = 'tag:yaml.org,2002:' + tag.slice(2);\n    }\n    type = schema.compiledTypeMap['fallback'][tag];\n\n    if (type && _hasOwnProperty.call(type.styleAliases, style)) {\n      style = type.styleAliases[style];\n    }\n\n    result[tag] = style;\n  }\n\n  return result;\n}\n\nfunction encodeHex(character) {\n  var string, handle, length;\n\n  string = character.toString(16).toUpperCase();\n\n  if (character <= 0xFF) {\n    handle = 'x';\n    length = 2;\n  } else if (character <= 0xFFFF) {\n    handle = 'u';\n    length = 4;\n  } else if (character <= 0xFFFFFFFF) {\n    handle = 'U';\n    length = 8;\n  } else {\n    throw new exception('code point within a string may not be greater than 0xFFFFFFFF');\n  }\n\n  return '\\\\' + handle + common.repeat('0', length - string.length) + string;\n}\n\n\nvar QUOTING_TYPE_SINGLE = 1,\n    QUOTING_TYPE_DOUBLE = 2;\n\nfunction State(options) {\n  this.schema        = options['schema'] || _default;\n  this.indent        = Math.max(1, (options['indent'] || 2));\n  this.noArrayIndent = options['noArrayIndent'] || false;\n  this.skipInvalid   = options['skipInvalid'] || false;\n  this.flowLevel     = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\n  this.styleMap      = compileStyleMap(this.schema, options['styles'] || null);\n  this.sortKeys      = options['sortKeys'] || false;\n  this.lineWidth     = options['lineWidth'] || 80;\n  this.noRefs        = options['noRefs'] || false;\n  this.noCompatMode  = options['noCompatMode'] || false;\n  this.condenseFlow  = options['condenseFlow'] || false;\n  this.quotingType   = options['quotingType'] === '\"' ? QUOTING_TYPE_DOUBLE : QUOTING_TYPE_SINGLE;\n  this.forceQuotes   = options['forceQuotes'] || false;\n  this.replacer      = typeof options['replacer'] === 'function' ? options['replacer'] : null;\n\n  this.implicitTypes = this.schema.compiledImplicit;\n  this.explicitTypes = this.schema.compiledExplicit;\n\n  this.tag = null;\n  this.result = '';\n\n  this.duplicates = [];\n  this.usedDuplicates = null;\n}\n\n// Indents every line in a string. Empty lines (\\n only) are not indented.\nfunction indentString(string, spaces) {\n  var ind = common.repeat(' ', spaces),\n      position = 0,\n      next = -1,\n      result = '',\n      line,\n      length = string.length;\n\n  while (position < length) {\n    next = string.indexOf('\\n', position);\n    if (next === -1) {\n      line = string.slice(position);\n      position = length;\n    } else {\n      line = string.slice(position, next + 1);\n      position = next + 1;\n    }\n\n    if (line.length && line !== '\\n') result += ind;\n\n    result += line;\n  }\n\n  return result;\n}\n\nfunction generateNextLine(state, level) {\n  return '\\n' + common.repeat(' ', state.indent * level);\n}\n\nfunction testImplicitResolving(state, str) {\n  var index, length, type;\n\n  for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\n    type = state.implicitTypes[index];\n\n    if (type.resolve(str)) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\n// [33] s-white ::= s-space | s-tab\nfunction isWhitespace(c) {\n  return c === CHAR_SPACE || c === CHAR_TAB;\n}\n\n// Returns true if the character can be printed without escaping.\n// From YAML 1.2: \"any allowed characters known to be non-printable\n// should also be escaped. [However,] This isn’t mandatory\"\n// Derived from nb-char - \\t - #x85 - #xA0 - #x2028 - #x2029.\nfunction isPrintable(c) {\n  return  (0x00020 <= c && c <= 0x00007E)\n      || ((0x000A1 <= c && c <= 0x00D7FF) && c !== 0x2028 && c !== 0x2029)\n      || ((0x0E000 <= c && c <= 0x00FFFD) && c !== CHAR_BOM)\n      ||  (0x10000 <= c && c <= 0x10FFFF);\n}\n\n// [34] ns-char ::= nb-char - s-white\n// [27] nb-char ::= c-printable - b-char - c-byte-order-mark\n// [26] b-char  ::= b-line-feed | b-carriage-return\n// Including s-white (for some reason, examples doesn't match specs in this aspect)\n// ns-char ::= c-printable - b-line-feed - b-carriage-return - c-byte-order-mark\nfunction isNsCharOrWhitespace(c) {\n  return isPrintable(c)\n    && c !== CHAR_BOM\n    // - b-char\n    && c !== CHAR_CARRIAGE_RETURN\n    && c !== CHAR_LINE_FEED;\n}\n\n// [127]  ns-plain-safe(c) ::= c = flow-out  ⇒ ns-plain-safe-out\n//                             c = flow-in   ⇒ ns-plain-safe-in\n//                             c = block-key ⇒ ns-plain-safe-out\n//                             c = flow-key  ⇒ ns-plain-safe-in\n// [128] ns-plain-safe-out ::= ns-char\n// [129]  ns-plain-safe-in ::= ns-char - c-flow-indicator\n// [130]  ns-plain-char(c) ::=  ( ns-plain-safe(c) - “:” - “#” )\n//                            | ( /* An ns-char preceding */ “#” )\n//                            | ( “:” /* Followed by an ns-plain-safe(c) */ )\nfunction isPlainSafe(c, prev, inblock) {\n  var cIsNsCharOrWhitespace = isNsCharOrWhitespace(c);\n  var cIsNsChar = cIsNsCharOrWhitespace && !isWhitespace(c);\n  return (\n    // ns-plain-safe\n    inblock ? // c = flow-in\n      cIsNsCharOrWhitespace\n      : cIsNsCharOrWhitespace\n        // - c-flow-indicator\n        && c !== CHAR_COMMA\n        && c !== CHAR_LEFT_SQUARE_BRACKET\n        && c !== CHAR_RIGHT_SQUARE_BRACKET\n        && c !== CHAR_LEFT_CURLY_BRACKET\n        && c !== CHAR_RIGHT_CURLY_BRACKET\n  )\n    // ns-plain-char\n    && c !== CHAR_SHARP // false on '#'\n    && !(prev === CHAR_COLON && !cIsNsChar) // false on ': '\n    || (isNsCharOrWhitespace(prev) && !isWhitespace(prev) && c === CHAR_SHARP) // change to true on '[^ ]#'\n    || (prev === CHAR_COLON && cIsNsChar); // change to true on ':[^ ]'\n}\n\n// Simplified test for values allowed as the first character in plain style.\nfunction isPlainSafeFirst(c) {\n  // Uses a subset of ns-char - c-indicator\n  // where ns-char = nb-char - s-white.\n  // No support of ( ( “?” | “:” | “-” ) /* Followed by an ns-plain-safe(c)) */ ) part\n  return isPrintable(c) && c !== CHAR_BOM\n    && !isWhitespace(c) // - s-white\n    // - (c-indicator ::=\n    // “-” | “?” | “:” | “,” | “[” | “]” | “{” | “}”\n    && c !== CHAR_MINUS\n    && c !== CHAR_QUESTION\n    && c !== CHAR_COLON\n    && c !== CHAR_COMMA\n    && c !== CHAR_LEFT_SQUARE_BRACKET\n    && c !== CHAR_RIGHT_SQUARE_BRACKET\n    && c !== CHAR_LEFT_CURLY_BRACKET\n    && c !== CHAR_RIGHT_CURLY_BRACKET\n    // | “#” | “&” | “*” | “!” | “|” | “=” | “>” | “'” | “\"”\n    && c !== CHAR_SHARP\n    && c !== CHAR_AMPERSAND\n    && c !== CHAR_ASTERISK\n    && c !== CHAR_EXCLAMATION\n    && c !== CHAR_VERTICAL_LINE\n    && c !== CHAR_EQUALS\n    && c !== CHAR_GREATER_THAN\n    && c !== CHAR_SINGLE_QUOTE\n    && c !== CHAR_DOUBLE_QUOTE\n    // | “%” | “@” | “`”)\n    && c !== CHAR_PERCENT\n    && c !== CHAR_COMMERCIAL_AT\n    && c !== CHAR_GRAVE_ACCENT;\n}\n\n// Simplified test for values allowed as the last character in plain style.\nfunction isPlainSafeLast(c) {\n  // just not whitespace or colon, it will be checked to be plain character later\n  return !isWhitespace(c) && c !== CHAR_COLON;\n}\n\n// Same as 'string'.codePointAt(pos), but works in older browsers.\nfunction codePointAt(string, pos) {\n  var first = string.charCodeAt(pos), second;\n  if (first >= 0xD800 && first <= 0xDBFF && pos + 1 < string.length) {\n    second = string.charCodeAt(pos + 1);\n    if (second >= 0xDC00 && second <= 0xDFFF) {\n      // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n      return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n    }\n  }\n  return first;\n}\n\n// Determines whether block indentation indicator is required.\nfunction needIndentIndicator(string) {\n  var leadingSpaceRe = /^\\n* /;\n  return leadingSpaceRe.test(string);\n}\n\nvar STYLE_PLAIN   = 1,\n    STYLE_SINGLE  = 2,\n    STYLE_LITERAL = 3,\n    STYLE_FOLDED  = 4,\n    STYLE_DOUBLE  = 5;\n\n// Determines which scalar styles are possible and returns the preferred style.\n// lineWidth = -1 => no limit.\n// Pre-conditions: str.length > 0.\n// Post-conditions:\n//    STYLE_PLAIN or STYLE_SINGLE => no \\n are in the string.\n//    STYLE_LITERAL => no lines are suitable for folding (or lineWidth is -1).\n//    STYLE_FOLDED => a line > lineWidth and can be folded (and lineWidth != -1).\nfunction chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth,\n  testAmbiguousType, quotingType, forceQuotes, inblock) {\n\n  var i;\n  var char = 0;\n  var prevChar = null;\n  var hasLineBreak = false;\n  var hasFoldableLine = false; // only checked if shouldTrackWidth\n  var shouldTrackWidth = lineWidth !== -1;\n  var previousLineBreak = -1; // count the first line correctly\n  var plain = isPlainSafeFirst(codePointAt(string, 0))\n          && isPlainSafeLast(codePointAt(string, string.length - 1));\n\n  if (singleLineOnly || forceQuotes) {\n    // Case: no block styles.\n    // Check for disallowed characters to rule out plain and single.\n    for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n      char = codePointAt(string, i);\n      if (!isPrintable(char)) {\n        return STYLE_DOUBLE;\n      }\n      plain = plain && isPlainSafe(char, prevChar, inblock);\n      prevChar = char;\n    }\n  } else {\n    // Case: block styles permitted.\n    for (i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n      char = codePointAt(string, i);\n      if (char === CHAR_LINE_FEED) {\n        hasLineBreak = true;\n        // Check if any line can be folded.\n        if (shouldTrackWidth) {\n          hasFoldableLine = hasFoldableLine ||\n            // Foldable line = too long, and not more-indented.\n            (i - previousLineBreak - 1 > lineWidth &&\n             string[previousLineBreak + 1] !== ' ');\n          previousLineBreak = i;\n        }\n      } else if (!isPrintable(char)) {\n        return STYLE_DOUBLE;\n      }\n      plain = plain && isPlainSafe(char, prevChar, inblock);\n      prevChar = char;\n    }\n    // in case the end is missing a \\n\n    hasFoldableLine = hasFoldableLine || (shouldTrackWidth &&\n      (i - previousLineBreak - 1 > lineWidth &&\n       string[previousLineBreak + 1] !== ' '));\n  }\n  // Although every style can represent \\n without escaping, prefer block styles\n  // for multiline, since they're more readable and they don't add empty lines.\n  // Also prefer folding a super-long line.\n  if (!hasLineBreak && !hasFoldableLine) {\n    // Strings interpretable as another type have to be quoted;\n    // e.g. the string 'true' vs. the boolean true.\n    if (plain && !forceQuotes && !testAmbiguousType(string)) {\n      return STYLE_PLAIN;\n    }\n    return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n  }\n  // Edge case: block indentation indicator can only have one digit.\n  if (indentPerLevel > 9 && needIndentIndicator(string)) {\n    return STYLE_DOUBLE;\n  }\n  // At this point we know block styles are valid.\n  // Prefer literal style unless we want to fold.\n  if (!forceQuotes) {\n    return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;\n  }\n  return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;\n}\n\n// Note: line breaking/folding is implemented for only the folded style.\n// NB. We drop the last trailing newline (if any) of a returned block scalar\n//  since the dumper adds its own newline. This always works:\n//    • No ending newline => unaffected; already using strip \"-\" chomping.\n//    • Ending newline    => removed then restored.\n//  Importantly, this keeps the \"+\" chomp indicator from gaining an extra line.\nfunction writeScalar(state, string, level, iskey, inblock) {\n  state.dump = (function () {\n    if (string.length === 0) {\n      return state.quotingType === QUOTING_TYPE_DOUBLE ? '\"\"' : \"''\";\n    }\n    if (!state.noCompatMode) {\n      if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {\n        return state.quotingType === QUOTING_TYPE_DOUBLE ? ('\"' + string + '\"') : (\"'\" + string + \"'\");\n      }\n    }\n\n    var indent = state.indent * Math.max(1, level); // no 0-indent scalars\n    // As indentation gets deeper, let the width decrease monotonically\n    // to the lower bound min(state.lineWidth, 40).\n    // Note that this implies\n    //  state.lineWidth ≤ 40 + state.indent: width is fixed at the lower bound.\n    //  state.lineWidth > 40 + state.indent: width decreases until the lower bound.\n    // This behaves better than a constant minimum width which disallows narrower options,\n    // or an indent threshold which causes the width to suddenly increase.\n    var lineWidth = state.lineWidth === -1\n      ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);\n\n    // Without knowing if keys are implicit/explicit, assume implicit for safety.\n    var singleLineOnly = iskey\n      // No block styles in flow mode.\n      || (state.flowLevel > -1 && level >= state.flowLevel);\n    function testAmbiguity(string) {\n      return testImplicitResolving(state, string);\n    }\n\n    switch (chooseScalarStyle(string, singleLineOnly, state.indent, lineWidth,\n      testAmbiguity, state.quotingType, state.forceQuotes && !iskey, inblock)) {\n\n      case STYLE_PLAIN:\n        return string;\n      case STYLE_SINGLE:\n        return \"'\" + string.replace(/'/g, \"''\") + \"'\";\n      case STYLE_LITERAL:\n        return '|' + blockHeader(string, state.indent)\n          + dropEndingNewline(indentString(string, indent));\n      case STYLE_FOLDED:\n        return '>' + blockHeader(string, state.indent)\n          + dropEndingNewline(indentString(foldString(string, lineWidth), indent));\n      case STYLE_DOUBLE:\n        return '\"' + escapeString(string) + '\"';\n      default:\n        throw new exception('impossible error: invalid scalar style');\n    }\n  }());\n}\n\n// Pre-conditions: string is valid for a block scalar, 1 <= indentPerLevel <= 9.\nfunction blockHeader(string, indentPerLevel) {\n  var indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : '';\n\n  // note the special case: the string '\\n' counts as a \"trailing\" empty line.\n  var clip =          string[string.length - 1] === '\\n';\n  var keep = clip && (string[string.length - 2] === '\\n' || string === '\\n');\n  var chomp = keep ? '+' : (clip ? '' : '-');\n\n  return indentIndicator + chomp + '\\n';\n}\n\n// (See the note for writeScalar.)\nfunction dropEndingNewline(string) {\n  return string[string.length - 1] === '\\n' ? string.slice(0, -1) : string;\n}\n\n// Note: a long line without a suitable break point will exceed the width limit.\n// Pre-conditions: every char in str isPrintable, str.length > 0, width > 0.\nfunction foldString(string, width) {\n  // In folded style, $k$ consecutive newlines output as $k+1$ newlines—\n  // unless they're before or after a more-indented line, or at the very\n  // beginning or end, in which case $k$ maps to $k$.\n  // Therefore, parse each chunk as newline(s) followed by a content line.\n  var lineRe = /(\\n+)([^\\n]*)/g;\n\n  // first line (possibly an empty line)\n  var result = (function () {\n    var nextLF = string.indexOf('\\n');\n    nextLF = nextLF !== -1 ? nextLF : string.length;\n    lineRe.lastIndex = nextLF;\n    return foldLine(string.slice(0, nextLF), width);\n  }());\n  // If we haven't reached the first content line yet, don't add an extra \\n.\n  var prevMoreIndented = string[0] === '\\n' || string[0] === ' ';\n  var moreIndented;\n\n  // rest of the lines\n  var match;\n  while ((match = lineRe.exec(string))) {\n    var prefix = match[1], line = match[2];\n    moreIndented = (line[0] === ' ');\n    result += prefix\n      + (!prevMoreIndented && !moreIndented && line !== ''\n        ? '\\n' : '')\n      + foldLine(line, width);\n    prevMoreIndented = moreIndented;\n  }\n\n  return result;\n}\n\n// Greedy line breaking.\n// Picks the longest line under the limit each time,\n// otherwise settles for the shortest line over the limit.\n// NB. More-indented lines *cannot* be folded, as that would add an extra \\n.\nfunction foldLine(line, width) {\n  if (line === '' || line[0] === ' ') return line;\n\n  // Since a more-indented line adds a \\n, breaks can't be followed by a space.\n  var breakRe = / [^ ]/g; // note: the match index will always be <= length-2.\n  var match;\n  // start is an inclusive index. end, curr, and next are exclusive.\n  var start = 0, end, curr = 0, next = 0;\n  var result = '';\n\n  // Invariants: 0 <= start <= length-1.\n  //   0 <= curr <= next <= max(0, length-2). curr - start <= width.\n  // Inside the loop:\n  //   A match implies length >= 2, so curr and next are <= length-2.\n  while ((match = breakRe.exec(line))) {\n    next = match.index;\n    // maintain invariant: curr - start <= width\n    if (next - start > width) {\n      end = (curr > start) ? curr : next; // derive end <= length-2\n      result += '\\n' + line.slice(start, end);\n      // skip the space that was output as \\n\n      start = end + 1;                    // derive start <= length-1\n    }\n    curr = next;\n  }\n\n  // By the invariants, start <= length-1, so there is something left over.\n  // It is either the whole string or a part starting from non-whitespace.\n  result += '\\n';\n  // Insert a break if the remainder is too long and there is a break available.\n  if (line.length - start > width && curr > start) {\n    result += line.slice(start, curr) + '\\n' + line.slice(curr + 1);\n  } else {\n    result += line.slice(start);\n  }\n\n  return result.slice(1); // drop extra \\n joiner\n}\n\n// Escapes a double-quoted string.\nfunction escapeString(string) {\n  var result = '';\n  var char = 0;\n  var escapeSeq;\n\n  for (var i = 0; i < string.length; char >= 0x10000 ? i += 2 : i++) {\n    char = codePointAt(string, i);\n    escapeSeq = ESCAPE_SEQUENCES[char];\n\n    if (!escapeSeq && isPrintable(char)) {\n      result += string[i];\n      if (char >= 0x10000) result += string[i + 1];\n    } else {\n      result += escapeSeq || encodeHex(char);\n    }\n  }\n\n  return result;\n}\n\nfunction writeFlowSequence(state, level, object) {\n  var _result = '',\n      _tag    = state.tag,\n      index,\n      length,\n      value;\n\n  for (index = 0, length = object.length; index < length; index += 1) {\n    value = object[index];\n\n    if (state.replacer) {\n      value = state.replacer.call(object, String(index), value);\n    }\n\n    // Write only valid elements, put null instead of invalid elements.\n    if (writeNode(state, level, value, false, false) ||\n        (typeof value === 'undefined' &&\n         writeNode(state, level, null, false, false))) {\n\n      if (_result !== '') _result += ',' + (!state.condenseFlow ? ' ' : '');\n      _result += state.dump;\n    }\n  }\n\n  state.tag = _tag;\n  state.dump = '[' + _result + ']';\n}\n\nfunction writeBlockSequence(state, level, object, compact) {\n  var _result = '',\n      _tag    = state.tag,\n      index,\n      length,\n      value;\n\n  for (index = 0, length = object.length; index < length; index += 1) {\n    value = object[index];\n\n    if (state.replacer) {\n      value = state.replacer.call(object, String(index), value);\n    }\n\n    // Write only valid elements, put null instead of invalid elements.\n    if (writeNode(state, level + 1, value, true, true, false, true) ||\n        (typeof value === 'undefined' &&\n         writeNode(state, level + 1, null, true, true, false, true))) {\n\n      if (!compact || _result !== '') {\n        _result += generateNextLine(state, level);\n      }\n\n      if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n        _result += '-';\n      } else {\n        _result += '- ';\n      }\n\n      _result += state.dump;\n    }\n  }\n\n  state.tag = _tag;\n  state.dump = _result || '[]'; // Empty sequence if no valid values.\n}\n\nfunction writeFlowMapping(state, level, object) {\n  var _result       = '',\n      _tag          = state.tag,\n      objectKeyList = Object.keys(object),\n      index,\n      length,\n      objectKey,\n      objectValue,\n      pairBuffer;\n\n  for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n\n    pairBuffer = '';\n    if (_result !== '') pairBuffer += ', ';\n\n    if (state.condenseFlow) pairBuffer += '\"';\n\n    objectKey = objectKeyList[index];\n    objectValue = object[objectKey];\n\n    if (state.replacer) {\n      objectValue = state.replacer.call(object, objectKey, objectValue);\n    }\n\n    if (!writeNode(state, level, objectKey, false, false)) {\n      continue; // Skip this pair because of invalid key;\n    }\n\n    if (state.dump.length > 1024) pairBuffer += '? ';\n\n    pairBuffer += state.dump + (state.condenseFlow ? '\"' : '') + ':' + (state.condenseFlow ? '' : ' ');\n\n    if (!writeNode(state, level, objectValue, false, false)) {\n      continue; // Skip this pair because of invalid value.\n    }\n\n    pairBuffer += state.dump;\n\n    // Both key and value are valid.\n    _result += pairBuffer;\n  }\n\n  state.tag = _tag;\n  state.dump = '{' + _result + '}';\n}\n\nfunction writeBlockMapping(state, level, object, compact) {\n  var _result       = '',\n      _tag          = state.tag,\n      objectKeyList = Object.keys(object),\n      index,\n      length,\n      objectKey,\n      objectValue,\n      explicitPair,\n      pairBuffer;\n\n  // Allow sorting keys so that the output file is deterministic\n  if (state.sortKeys === true) {\n    // Default sorting\n    objectKeyList.sort();\n  } else if (typeof state.sortKeys === 'function') {\n    // Custom sort function\n    objectKeyList.sort(state.sortKeys);\n  } else if (state.sortKeys) {\n    // Something is wrong\n    throw new exception('sortKeys must be a boolean or a function');\n  }\n\n  for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n    pairBuffer = '';\n\n    if (!compact || _result !== '') {\n      pairBuffer += generateNextLine(state, level);\n    }\n\n    objectKey = objectKeyList[index];\n    objectValue = object[objectKey];\n\n    if (state.replacer) {\n      objectValue = state.replacer.call(object, objectKey, objectValue);\n    }\n\n    if (!writeNode(state, level + 1, objectKey, true, true, true)) {\n      continue; // Skip this pair because of invalid key.\n    }\n\n    explicitPair = (state.tag !== null && state.tag !== '?') ||\n                   (state.dump && state.dump.length > 1024);\n\n    if (explicitPair) {\n      if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n        pairBuffer += '?';\n      } else {\n        pairBuffer += '? ';\n      }\n    }\n\n    pairBuffer += state.dump;\n\n    if (explicitPair) {\n      pairBuffer += generateNextLine(state, level);\n    }\n\n    if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\n      continue; // Skip this pair because of invalid value.\n    }\n\n    if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\n      pairBuffer += ':';\n    } else {\n      pairBuffer += ': ';\n    }\n\n    pairBuffer += state.dump;\n\n    // Both key and value are valid.\n    _result += pairBuffer;\n  }\n\n  state.tag = _tag;\n  state.dump = _result || '{}'; // Empty mapping if no valid pairs.\n}\n\nfunction detectType(state, object, explicit) {\n  var _result, typeList, index, length, type, style;\n\n  typeList = explicit ? state.explicitTypes : state.implicitTypes;\n\n  for (index = 0, length = typeList.length; index < length; index += 1) {\n    type = typeList[index];\n\n    if ((type.instanceOf  || type.predicate) &&\n        (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\n        (!type.predicate  || type.predicate(object))) {\n\n      if (explicit) {\n        if (type.multi && type.representName) {\n          state.tag = type.representName(object);\n        } else {\n          state.tag = type.tag;\n        }\n      } else {\n        state.tag = '?';\n      }\n\n      if (type.represent) {\n        style = state.styleMap[type.tag] || type.defaultStyle;\n\n        if (_toString.call(type.represent) === '[object Function]') {\n          _result = type.represent(object, style);\n        } else if (_hasOwnProperty.call(type.represent, style)) {\n          _result = type.represent[style](object, style);\n        } else {\n          throw new exception('!<' + type.tag + '> tag resolver accepts not \"' + style + '\" style');\n        }\n\n        state.dump = _result;\n      }\n\n      return true;\n    }\n  }\n\n  return false;\n}\n\n// Serializes `object` and writes it to global `result`.\n// Returns true on success, or false on invalid object.\n//\nfunction writeNode(state, level, object, block, compact, iskey, isblockseq) {\n  state.tag = null;\n  state.dump = object;\n\n  if (!detectType(state, object, false)) {\n    detectType(state, object, true);\n  }\n\n  var type = _toString.call(state.dump);\n  var inblock = block;\n  var tagStr;\n\n  if (block) {\n    block = (state.flowLevel < 0 || state.flowLevel > level);\n  }\n\n  var objectOrArray = type === '[object Object]' || type === '[object Array]',\n      duplicateIndex,\n      duplicate;\n\n  if (objectOrArray) {\n    duplicateIndex = state.duplicates.indexOf(object);\n    duplicate = duplicateIndex !== -1;\n  }\n\n  if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\n    compact = false;\n  }\n\n  if (duplicate && state.usedDuplicates[duplicateIndex]) {\n    state.dump = '*ref_' + duplicateIndex;\n  } else {\n    if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\n      state.usedDuplicates[duplicateIndex] = true;\n    }\n    if (type === '[object Object]') {\n      if (block && (Object.keys(state.dump).length !== 0)) {\n        writeBlockMapping(state, level, state.dump, compact);\n        if (duplicate) {\n          state.dump = '&ref_' + duplicateIndex + state.dump;\n        }\n      } else {\n        writeFlowMapping(state, level, state.dump);\n        if (duplicate) {\n          state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n        }\n      }\n    } else if (type === '[object Array]') {\n      if (block && (state.dump.length !== 0)) {\n        if (state.noArrayIndent && !isblockseq && level > 0) {\n          writeBlockSequence(state, level - 1, state.dump, compact);\n        } else {\n          writeBlockSequence(state, level, state.dump, compact);\n        }\n        if (duplicate) {\n          state.dump = '&ref_' + duplicateIndex + state.dump;\n        }\n      } else {\n        writeFlowSequence(state, level, state.dump);\n        if (duplicate) {\n          state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\n        }\n      }\n    } else if (type === '[object String]') {\n      if (state.tag !== '?') {\n        writeScalar(state, state.dump, level, iskey, inblock);\n      }\n    } else if (type === '[object Undefined]') {\n      return false;\n    } else {\n      if (state.skipInvalid) return false;\n      throw new exception('unacceptable kind of an object to dump ' + type);\n    }\n\n    if (state.tag !== null && state.tag !== '?') {\n      // Need to encode all characters except those allowed by the spec:\n      //\n      // [35] ns-dec-digit    ::=  [#x30-#x39] /* 0-9 */\n      // [36] ns-hex-digit    ::=  ns-dec-digit\n      //                         | [#x41-#x46] /* A-F */ | [#x61-#x66] /* a-f */\n      // [37] ns-ascii-letter ::=  [#x41-#x5A] /* A-Z */ | [#x61-#x7A] /* a-z */\n      // [38] ns-word-char    ::=  ns-dec-digit | ns-ascii-letter | “-”\n      // [39] ns-uri-char     ::=  “%” ns-hex-digit ns-hex-digit | ns-word-char | “#”\n      //                         | “;” | “/” | “?” | “:” | “@” | “&” | “=” | “+” | “$” | “,”\n      //                         | “_” | “.” | “!” | “~” | “*” | “'” | “(” | “)” | “[” | “]”\n      //\n      // Also need to encode '!' because it has special meaning (end of tag prefix).\n      //\n      tagStr = encodeURI(\n        state.tag[0] === '!' ? state.tag.slice(1) : state.tag\n      ).replace(/!/g, '%21');\n\n      if (state.tag[0] === '!') {\n        tagStr = '!' + tagStr;\n      } else if (tagStr.slice(0, 18) === 'tag:yaml.org,2002:') {\n        tagStr = '!!' + tagStr.slice(18);\n      } else {\n        tagStr = '!<' + tagStr + '>';\n      }\n\n      state.dump = tagStr + ' ' + state.dump;\n    }\n  }\n\n  return true;\n}\n\nfunction getDuplicateReferences(object, state) {\n  var objects = [],\n      duplicatesIndexes = [],\n      index,\n      length;\n\n  inspectNode(object, objects, duplicatesIndexes);\n\n  for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\n    state.duplicates.push(objects[duplicatesIndexes[index]]);\n  }\n  state.usedDuplicates = new Array(length);\n}\n\nfunction inspectNode(object, objects, duplicatesIndexes) {\n  var objectKeyList,\n      index,\n      length;\n\n  if (object !== null && typeof object === 'object') {\n    index = objects.indexOf(object);\n    if (index !== -1) {\n      if (duplicatesIndexes.indexOf(index) === -1) {\n        duplicatesIndexes.push(index);\n      }\n    } else {\n      objects.push(object);\n\n      if (Array.isArray(object)) {\n        for (index = 0, length = object.length; index < length; index += 1) {\n          inspectNode(object[index], objects, duplicatesIndexes);\n        }\n      } else {\n        objectKeyList = Object.keys(object);\n\n        for (index = 0, length = objectKeyList.length; index < length; index += 1) {\n          inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\n        }\n      }\n    }\n  }\n}\n\nfunction dump$1(input, options) {\n  options = options || {};\n\n  var state = new State(options);\n\n  if (!state.noRefs) getDuplicateReferences(input, state);\n\n  var value = input;\n\n  if (state.replacer) {\n    value = state.replacer.call({ '': value }, '', value);\n  }\n\n  if (writeNode(state, 0, value, true, true)) return state.dump + '\\n';\n\n  return '';\n}\n\nvar dump_1 = dump$1;\n\nvar dumper = {\n\tdump: dump_1\n};\n\nfunction renamed(from, to) {\n  return function () {\n    throw new Error('Function yaml.' + from + ' is removed in js-yaml 4. ' +\n      'Use yaml.' + to + ' instead, which is now safe by default.');\n  };\n}\n\n\nvar Type                = type;\nvar Schema              = schema;\nvar FAILSAFE_SCHEMA     = failsafe;\nvar JSON_SCHEMA         = json;\nvar CORE_SCHEMA         = core;\nvar DEFAULT_SCHEMA      = _default;\nvar load                = loader.load;\nvar loadAll             = loader.loadAll;\nvar dump                = dumper.dump;\nvar YAMLException       = exception;\n\n// Re-export all types in case user wants to create custom schema\nvar types = {\n  binary:    binary,\n  float:     float,\n  map:       map,\n  null:      _null,\n  pairs:     pairs,\n  set:       set,\n  timestamp: timestamp,\n  bool:      bool,\n  int:       int,\n  merge:     merge,\n  omap:      omap,\n  seq:       seq,\n  str:       str\n};\n\n// Removed functions from JS-YAML 3.0.x\nvar safeLoad            = renamed('safeLoad', 'load');\nvar safeLoadAll         = renamed('safeLoadAll', 'loadAll');\nvar safeDump            = renamed('safeDump', 'dump');\n\nvar jsYaml = {\n\tType: Type,\n\tSchema: Schema,\n\tFAILSAFE_SCHEMA: FAILSAFE_SCHEMA,\n\tJSON_SCHEMA: JSON_SCHEMA,\n\tCORE_SCHEMA: CORE_SCHEMA,\n\tDEFAULT_SCHEMA: DEFAULT_SCHEMA,\n\tload: load,\n\tloadAll: loadAll,\n\tdump: dump,\n\tYAMLException: YAMLException,\n\ttypes: types,\n\tsafeLoad: safeLoad,\n\tsafeLoadAll: safeLoadAll,\n\tsafeDump: safeDump\n};\n\nexport { CORE_SCHEMA, DEFAULT_SCHEMA, FAILSAFE_SCHEMA, JSON_SCHEMA, Schema, Type, YAMLException, jsYaml as default, dump, load, loadAll, safeDump, safeLoad, safeLoadAll, types };\n","import { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport type { Node } from '../../types.js';\n\n// Striped fill like start or fork nodes in state diagrams\nexport const solidStateFill = (color: string) => {\n  const { handDrawnSeed } = getConfig();\n  return {\n    fill: color,\n    hachureAngle: 120, // angle of hachure,\n    hachureGap: 4,\n    fillWeight: 2,\n    roughness: 0.7,\n    stroke: color,\n    seed: handDrawnSeed,\n  };\n};\n\nexport const compileStyles = (node: Node) => {\n  // node.cssCompiledStyles is an array of strings in the form of 'key: value' where key is the css property and value is the value\n  // the array is the styles of node from the classes it is using\n  // node.cssStyles is an array of styles directly set on the node\n  // concat the arrays and remove duplicates such that the values from node.cssStyles are used if there are duplicates\n  const stylesMap = styles2Map([\n    ...(node.cssCompiledStyles || []),\n    ...(node.cssStyles || []),\n    ...(node.labelStyle || []),\n  ]);\n  return { stylesMap, stylesArray: [...stylesMap] };\n};\n\nexport const styles2Map = (styles: string[]) => {\n  const styleMap = new Map<string, string>();\n  styles.forEach((style) => {\n    const [key, value] = style.split(':');\n    styleMap.set(key.trim(), value?.trim());\n  });\n  return styleMap;\n};\nexport const isLabelStyle = (key: string) => {\n  return (\n    key === 'color' ||\n    key === 'font-size' ||\n    key === 'font-family' ||\n    key === 'font-weight' ||\n    key === 'font-style' ||\n    key === 'text-decoration' ||\n    key === 'text-align' ||\n    key === 'text-transform' ||\n    key === 'line-height' ||\n    key === 'letter-spacing' ||\n    key === 'word-spacing' ||\n    key === 'text-shadow' ||\n    key === 'text-overflow' ||\n    key === 'white-space' ||\n    key === 'word-wrap' ||\n    key === 'word-break' ||\n    key === 'overflow-wrap' ||\n    key === 'hyphens'\n  );\n};\nexport const styles2String = (node: Node) => {\n  const { stylesArray } = compileStyles(node);\n  const labelStyles: string[] = [];\n  const nodeStyles: string[] = [];\n  const borderStyles: string[] = [];\n  const backgroundStyles: string[] = [];\n\n  stylesArray.forEach((style) => {\n    const key = style[0];\n    if (isLabelStyle(key)) {\n      labelStyles.push(style.join(':') + ' !important');\n    } else {\n      nodeStyles.push(style.join(':') + ' !important');\n      if (key.includes('stroke')) {\n        borderStyles.push(style.join(':') + ' !important');\n      }\n      if (key === 'fill') {\n        backgroundStyles.push(style.join(':') + ' !important');\n      }\n    }\n  });\n\n  return {\n    labelStyles: labelStyles.join(';'),\n    nodeStyles: nodeStyles.join(';'),\n    stylesArray,\n    borderStyles,\n    backgroundStyles,\n  };\n};\n\n// Striped fill like start or fork nodes in state diagrams\n// TODO remove any\nexport const userNodeOverrides = (node: Node, options: any) => {\n  const { themeVariables, handDrawnSeed } = getConfig();\n  const { nodeBorder, mainBkg } = themeVariables;\n  const { stylesMap } = compileStyles(node);\n\n  // index the style array to a map object\n  const result = Object.assign(\n    {\n      roughness: 0.7,\n      fill: stylesMap.get('fill') || mainBkg,\n      fillStyle: 'hachure', // solid fill\n      fillWeight: 4,\n      hachureGap: 5.2,\n      stroke: stylesMap.get('stroke') || nodeBorder,\n      seed: handDrawnSeed,\n      strokeWidth: stylesMap.get('stroke-width')?.replace('px', '') || 1.3,\n      fillLineDash: [0, 0],\n      strokeLineDash: getStrokeDashArray(stylesMap.get('stroke-dasharray')),\n    },\n    options\n  );\n  return result;\n};\n\nconst getStrokeDashArray = (strokeDasharrayStyle?: string) => {\n  if (!strokeDasharrayStyle) {\n    return [0, 0];\n  }\n  const dashArray = strokeDasharrayStyle.trim().split(/\\s+/).map(Number);\n  if (dashArray.length === 1) {\n    const val = isNaN(dashArray[0]) ? 0 : dashArray[0];\n    return [val, val];\n  }\n  const first = isNaN(dashArray[0]) ? 0 : dashArray[0];\n  const second = isNaN(dashArray[1]) ? 0 : dashArray[1];\n  return [first, second];\n};\n","import { sanitizeUrl } from '@braintree/sanitize-url';\nimport type { BaseType, CurveFactory } from 'd3';\nimport {\n  curveBasis,\n  curveBasisClosed,\n  curveBasisOpen,\n  curveBumpX,\n  curveBumpY,\n  curveBundle,\n  curveCardinalClosed,\n  curveCardinalOpen,\n  curveCardinal,\n  curveCatmullRomClosed,\n  curveCatmullRomOpen,\n  curveCatmullRom,\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.js';\nimport { sanitizeDirective } from './utils/sanitizeDirective.js';\nimport { log } from './logger.js';\nimport { detectType } from './diagram-api/detectType.js';\nimport assignWithDepth from './assignWithDepth.js';\nimport type { MermaidConfig } from './config.type.js';\nimport { memoize, merge } from 'es-toolkit/compat';\nimport { directiveRegex } from './diagram-api/regexes.js';\nimport type { D3Element, Point, TextDimensionConfig, TextDimensions } from './types.js';\n\nexport const ZERO_WIDTH_SPACE = '\\u200b';\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  curveBumpX: curveBumpX,\n  curveBumpY: curveBumpY,\n  curveBundle: curveBundle,\n  curveCardinalClosed: curveCardinalClosed,\n  curveCardinalOpen: curveCardinalOpen,\n  curveCardinal: curveCardinal,\n  curveCatmullRomClosed: curveCatmullRomClosed,\n  curveCatmullRomOpen: curveCatmullRomOpen,\n  curveCatmullRom: curveCatmullRom,\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} as const;\n\nconst directiveWithoutOpen =\n  /\\s*(?:(\\w+)(?=:):|(\\w+))\\s*(?:(\\w+)|((?:(?!}%{2}).|\\r?\\n)*))?\\s*(?:}%{2})?/gi;\n/**\n * Detects the init config object from the text\n *\n * @param text - The text defining the graph. For example:\n *\n * ```mermaid\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 *\n * @param config - Optional mermaid configuration object.\n * @returns The json object representing the init passed to mermaid.initialize()\n */\nexport const detectInit = function (\n  text: string,\n  config?: MermaidConfig\n): MermaidConfig | undefined {\n  const inits = detectDirective(text, /(?:init\\b)|(?:initialize\\b)/);\n  let results: MermaidConfig & { config?: unknown } = {};\n\n  if (Array.isArray(inits)) {\n    const args = inits.map((init) => init.args);\n    sanitizeDirective(args);\n    results = assignWithDepth(results, [...args]);\n  } else {\n    results = inits.args as MermaidConfig;\n  }\n\n  if (!results) {\n    return;\n  }\n\n  let type = detectType(text, config);\n\n  // Move the `config` value to appropriate diagram type value\n  const prop = 'config';\n  if (results[prop] !== undefined) {\n    if (type === 'flowchart-v2') {\n      type = 'flowchart';\n    }\n    results[type as keyof MermaidConfig] = results[prop];\n    delete results[prop];\n  }\n\n  return results;\n};\n\ninterface Directive {\n  type?: string;\n  args?: unknown;\n}\n/**\n * Detects the directive from the text.\n *\n * Text can be single line or multiline. If type is null or omitted,\n * 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 *\n * @param text - The text defining the graph\n * @param type - The directive to return (default: `null`)\n * @returns An object or Array representing the directive(s) matched by the input type.\n * If a single directive was found, that directive object will be returned.\n */\nexport const detectDirective = function (\n  text: string,\n  type: string | RegExp | null = null\n): Directive | Directive[] {\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: RegExpExecArray | null;\n    const result: Directive[] = [];\n    while ((match = directiveRegex.exec(text)) !== null) {\n      // This is necessary to avoid infinite loops with zero-width matches\n      if (match.index === directiveRegex.lastIndex) {\n        directiveRegex.lastIndex++;\n      }\n      if ((match && !type) || (type && match[1]?.match(type)) || (type && match[2]?.match(type))) {\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      return { type: text, args: null };\n    }\n\n    return result.length === 1 ? result[0] : result;\n  } catch (error) {\n    log.error(\n      `ERROR: ${\n        (error as Error).message\n      } - Unable to parse directive type: '${type}' based on the text: '${text}'`\n    );\n    return { type: undefined, args: null };\n  }\n};\n\nexport const removeDirectives = function (text: string): string {\n  return text.replace(directiveRegex, '');\n};\n\n/**\n * Detects whether a substring in present in a given array\n *\n * @param str - The substring to detect\n * @param arr - The array to search\n * @returns The array index containing the substring or -1 if not present\n */\nexport const isSubstringInArray = function (str: string, arr: string[]): number {\n  for (const [i, element] of arr.entries()) {\n    if (element.match(str)) {\n      return i;\n    }\n  }\n  return -1;\n};\n\n/**\n * Returns a d3 curve given a curve name\n *\n * @param interpolate - The interpolation name\n * @param defaultCurve - The default curve to return\n * @returns The curve factory to use\n */\nexport function interpolateToCurve(\n  interpolate: string | undefined,\n  defaultCurve: CurveFactory\n): CurveFactory {\n  if (!interpolate) {\n    return defaultCurve;\n  }\n  const curveName = `curve${interpolate.charAt(0).toUpperCase() + interpolate.slice(1)}`;\n\n  // @ts-ignore TODO: Fix issue with curve type\n  return d3CurveTypes[curveName as keyof typeof d3CurveTypes] ?? defaultCurve;\n}\n\n/**\n * Formats a URL string\n *\n * @param linkStr - String of the URL\n * @param config - Configuration passed to MermaidJS\n * @returns The formatted URL or `undefined`.\n */\nexport function formatUrl(linkStr: string, config: MermaidConfig): string | undefined {\n  const url = linkStr.trim();\n\n  if (!url) {\n    return undefined;\n  }\n\n  if (config.securityLevel !== 'loose') {\n    return sanitizeUrl(url);\n  }\n\n  return url;\n}\n\n/**\n * Runs a function\n *\n * @param functionName - A dot separated path to the function relative to the `window`\n * @param params - Parameters to pass to the function\n */\nexport const runFunc = (functionName: string, ...params: unknown[]) => {\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] as keyof typeof obj];\n    if (!obj) {\n      log.error(`Function name: ${functionName} not found in window`);\n      return;\n    }\n  }\n\n  obj[fnName as keyof typeof obj](...params);\n};\n\n/**\n * Finds the distance between two points using the Distance Formula\n *\n * @param p1 - The first point\n * @param p2 - The second point\n * @returns The distance between the two points.\n */\nfunction distance(p1?: Point, p2?: Point): number {\n  if (!p1 || !p2) {\n    return 0;\n  }\n  return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));\n}\n\n/**\n * TODO: Give this a description\n *\n * @param points - List of points\n */\nfunction traverseEdge(points: Point[]): Point {\n  let prevPoint: Point | undefined;\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  const remainingDistance = totalDistance / 2;\n  return calculatePoint(points, remainingDistance);\n}\n\n/**\n * {@inheritdoc traverseEdge}\n */\nfunction calcLabelPosition(points: Point[]): Point {\n  if (points.length === 1) {\n    return points[0];\n  }\n  return traverseEdge(points);\n}\n\nexport const roundNumber = (num: number, precision = 2) => {\n  const factor = Math.pow(10, precision);\n  return Math.round(num * factor) / factor;\n};\n\nexport const calculatePoint = (points: Point[], distanceToTraverse: number): Point => {\n  let prevPoint: Point | undefined = undefined;\n  let remainingDistance = distanceToTraverse;\n  for (const point of points) {\n    if (prevPoint) {\n      const vectorDistance = distance(point, prevPoint);\n      if (vectorDistance === 0) {\n        return prevPoint;\n      }\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) {\n          return prevPoint;\n        }\n        if (distanceRatio >= 1) {\n          return { x: point.x, y: point.y };\n        }\n        if (distanceRatio > 0 && distanceRatio < 1) {\n          return {\n            x: roundNumber((1 - distanceRatio) * prevPoint.x + distanceRatio * point.x, 5),\n            y: roundNumber((1 - distanceRatio) * prevPoint.y + distanceRatio * point.y, 5),\n          };\n        }\n      }\n    }\n    prevPoint = point;\n  }\n  throw new Error('Could not find a suitable point for the given distance');\n};\n\nconst calcCardinalityPosition = (\n  isRelationTypePresent: boolean,\n  points: Point[],\n  initialPosition: Point\n) => {\n  log.info(`our points ${JSON.stringify(points)}`);\n  if (points[0] !== initialPosition) {\n    points = points.reverse();\n  }\n  // Traverse only 25 total distance along points to find cardinality point\n  const distanceToCardinalityPoint = 25;\n  const center = calculatePoint(points, distanceToCardinalityPoint);\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 perpendicular 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 * Calculates the terminal label position.\n *\n * @param terminalMarkerSize - Terminal marker size.\n * @param position - Position of label relative to points.\n * @param _points - Array of points.\n * @returns - The `cardinalityPosition`.\n */\nfunction calcTerminalLabelPosition(\n  terminalMarkerSize: number,\n  position: 'start_left' | 'start_right' | 'end_left' | 'end_right',\n  _points: Point[]\n): Point {\n  const points = structuredClone(_points);\n  log.info('our points', points);\n  if (position !== 'start_left' && position !== 'start_right') {\n    points.reverse();\n  }\n\n  // Traverse only 25 total distance along points to find cardinality point\n  const distanceToCardinalityPoint = 25 + terminalMarkerSize;\n  const center = calculatePoint(points, distanceToCardinalityPoint);\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: Point = { x: 0, y: 0 };\n  //Calculation cardinality position using angle, center point on the line/curve but perpendicular and with offset-distance\n\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  } else 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  } else 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  } else {\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  }\n  return cardinalityPosition;\n}\n\n/**\n * Gets styles from an array of declarations\n *\n * @param arr - Declarations\n * @returns The styles grouped as strings\n */\nexport function getStylesFromArray(arr: string[]): { style: string; labelStyle: string } {\n  let style = '';\n  let labelStyle = '';\n\n  for (const element of arr) {\n    if (element !== undefined) {\n      // add text properties to label style definition\n      if (element.startsWith('color:') || element.startsWith('text-align:')) {\n        labelStyle = labelStyle + element + ';';\n      } else {\n        style = style + element + ';';\n      }\n    }\n  }\n\n  return { style, 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 * Generates a random hexadecimal id of the given length.\n *\n * @param length - Length of string.\n * @returns The generated string.\n */\nfunction makeRandomHex(length: number): string {\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: { length: number }) => {\n  return makeRandomHex(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    text: '',\n  };\n};\n\n/**\n * Adds text to an element\n *\n * @param elem - SVG Element to add text to\n * @param textData - Text options.\n * @returns Text element with given styling and content\n */\nexport const drawSimpleText = function (\n  elem: SVGElement,\n  textData: {\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  }\n): SVGTextElement {\n  // Remove and ignore br:s\n  const nText = textData.text.replace(common.lineBreakRegex, ' ');\n\n  const [, _fontSizePx] = parseFontSize(textData.fontSize);\n\n  const textElem = elem.append('text') as any;\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', _fontSizePx);\n  textElem.style('font-weight', textData.fontWeight);\n  textElem.attr('fill', textData.fill);\n\n  if (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\ninterface WrapLabelConfig {\n  fontSize: number;\n  fontFamily: string;\n  fontWeight: number;\n  joinWith: string;\n}\n\nexport const wrapLabel: (label: string, maxWidth: number, config: WrapLabelConfig) => string =\n  memoize(\n    (label: string, maxWidth: number, config: WrapLabelConfig): string => {\n      if (!label) {\n        return label;\n      }\n      config = Object.assign(\n        { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', joinWith: '<br/>' },\n        config\n      );\n      if (common.lineBreakRegex.test(label)) {\n        return label;\n      }\n      const words = label.split(' ').filter(Boolean);\n      const completedLines: string[] = [];\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\ninterface BreakStringOutput {\n  hyphenatedStrings: string[];\n  remainingWord: string;\n}\n\nconst breakString: (\n  word: string,\n  maxWidth: number,\n  hyphenCharacter: string,\n  config: WrapLabelConfig\n) => BreakStringOutput = memoize(\n  (\n    word: string,\n    maxWidth: number,\n    hyphenCharacter = '-',\n    config: WrapLabelConfig\n  ): BreakStringOutput => {\n    config = Object.assign(\n      { fontSize: 12, fontWeight: 400, fontFamily: 'Arial', margin: 0 },\n      config\n    );\n    const characters = [...word];\n    const lines: string[] = [];\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 has greater height, we extend the height, so it's value won't overflow.\n *\n * @param text - The text to measure\n * @param config - The config for fontSize, fontFamily, and fontWeight all impacting the\n *   resulting size\n * @returns The height for the given text\n */\nexport function calculateTextHeight(\n  text: Parameters<typeof calculateTextDimensions>[0],\n  config: Parameters<typeof calculateTextDimensions>[1]\n): ReturnType<typeof calculateTextDimensions>['height'] {\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 text - The text to calculate the width of\n * @param config - The config for fontSize, fontFamily, and fontWeight all impacting the\n *   resulting size\n * @returns The width for the given text\n */\nexport function calculateTextWidth(\n  text: Parameters<typeof calculateTextDimensions>[0],\n  config: Parameters<typeof calculateTextDimensions>[1]\n): ReturnType<typeof calculateTextDimensions>['width'] {\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 text - The text to calculate the width of\n * @param config - The config for fontSize, fontFamily, fontWeight, and margin all impacting\n *   the resulting size\n * @returns The dimensions for the given text\n */\nexport const calculateTextDimensions: (\n  text: string,\n  config: TextDimensionConfig\n) => TextDimensions = memoize(\n  (text: string, config: TextDimensionConfig): TextDimensions => {\n    const { fontSize = 12, fontFamily = 'Arial', fontWeight = 400 } = config;\n    if (!text) {\n      return { width: 0, height: 0 };\n    }\n\n    const [, _fontSizePx] = parseFontSize(fontSize);\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 || ZERO_WIDTH_SPACE;\n        // @ts-ignore TODO: Fix D3 types\n        const textElem = drawSimpleText(g, textObj)\n          // @ts-ignore TODO: Fix D3 types\n          .style('font-size', _fontSizePx)\n          .style('font-weight', fontWeight)\n          .style('font-family', fontFamily);\n\n        const bBox = (textElem._groups || textElem)[0][0].getBBox();\n        if (bBox.width === 0 && bBox.height === 0) {\n          throw new Error('svg element not in render tree');\n        }\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 class InitIDGenerator {\n  private count = 0;\n  public next: () => number;\n  constructor(deterministic = false, seed?: string) {\n    // TODO: Seed is only used for length?\n    // v11: Use the actual value of seed string to generate an initial value for count.\n    this.count = seed ? seed.length : 0;\n    this.next = deterministic ? () => this.count++ : () => Date.now();\n  }\n}\n\nlet decoder: HTMLDivElement;\n\n/**\n * Decodes HTML, source: {@link https://github.com/shrpne/entity-decode/blob/v2.0.1/browser.js}\n *\n * @param html - HTML as a string\n * @returns Unescaped HTML\n */\nexport const entityDecode = function (html: string): string {\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  decoder.innerHTML = html;\n\n  return unescape(decoder.textContent!);\n};\n\nexport interface DetailedError {\n  str: string;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  hash: any;\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  error?: any;\n  message?: string;\n}\n\n/** @param error - The error to check */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function isDetailedError(error: any): error is DetailedError {\n  return 'str' in error;\n}\n\n/** @param error - The error to convert to an error message */\nexport function getErrorMessage(error: unknown): string {\n  if (error instanceof Error) {\n    return error.message;\n  }\n  return String(error);\n}\n\n/**\n * Appends <text> element with the given title and css class.\n *\n * @param parent - d3 svg object to append title to\n * @param cssClass - CSS class for the <text> element containing the title\n * @param titleTopMargin - Margin in pixels between title and rest of the graph\n * @param title - The title. If empty, returns immediately.\n */\nexport const insertTitle = (\n  parent: D3Element,\n  cssClass: string,\n  titleTopMargin: number,\n  title?: string\n): void => {\n  if (!title) {\n    return;\n  }\n  const bounds = parent.node()?.getBBox();\n  if (!bounds) {\n    return;\n  }\n  parent\n    .append('text')\n    .text(title)\n    .attr('text-anchor', 'middle')\n    .attr('x', bounds.x + bounds.width / 2)\n    .attr('y', -titleTopMargin)\n    .attr('class', cssClass);\n};\n\n/**\n * Parses a raw fontSize configuration value into a number and string value.\n *\n * @param fontSize - a string or number font size configuration value\n *\n * @returns parsed number and string style font size values, or nulls if a number value can't\n * be parsed from an input string.\n */\nexport const parseFontSize = (fontSize: string | number | undefined): [number?, string?] => {\n  // if the font size is a number, assume a px string representation\n  if (typeof fontSize === 'number') {\n    return [fontSize, fontSize + 'px'];\n  }\n\n  const fontSizeNumber = parseInt(fontSize ?? '', 10);\n  if (Number.isNaN(fontSizeNumber)) {\n    // if a number value can't be parsed, return null for both values\n    return [undefined, undefined];\n  } else if (fontSize === String(fontSizeNumber)) {\n    // if a string input doesn't contain any units, assume px units\n    return [fontSizeNumber, fontSize + 'px'];\n  } else {\n    return [fontSizeNumber, fontSize];\n  }\n};\n\nexport function cleanAndMerge<T>(defaultData: T, data?: Partial<T>): T {\n  return merge({}, defaultData, data);\n}\n\nexport default {\n  assignWithDepth,\n  wrapLabel,\n  calculateTextHeight,\n  calculateTextWidth,\n  calculateTextDimensions,\n  cleanAndMerge,\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  insertTitle,\n  isLabelCoordinateInPath,\n  parseFontSize,\n  InitIDGenerator,\n};\n\n/**\n * @param  text - text to be encoded\n * @returns\n */\nexport const encodeEntities = function (text: string): string {\n  let txt = text;\n\n  txt = txt.replace(/style.*:\\S*#.*;/g, function (s): string {\n    return s.substring(0, s.length - 1);\n  });\n  txt = txt.replace(/classDef.*:\\S*#.*;/g, function (s): string {\n    return s.substring(0, s.length - 1);\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 'ﬂ°°' + innerTxt + '¶ß';\n    } else {\n      return 'ﬂ°' + innerTxt + '¶ß';\n    }\n  });\n\n  return txt;\n};\n\n/**\n * Partially reverts encoding done via {@link encodeEntities}\n *\n * @param  text - text to be decoded\n * @returns\n */\nexport const decodeEntities = function (text: string): string {\n  return text.replace(/ﬂ°°/g, '&#').replace(/ﬂ°/g, '&').replace(/¶ß/g, ';');\n};\n\nexport const isString = (value: unknown): value is string => {\n  return typeof value === 'string';\n};\n\nexport const getEdgeId = (\n  from: string,\n  to: string,\n  {\n    counter = 0,\n    prefix,\n    suffix,\n  }: {\n    counter?: number;\n    prefix?: string;\n    suffix?: string;\n  },\n  id?: string\n) => {\n  if (id) {\n    return id;\n  }\n  return `${prefix ? `${prefix}_` : ''}${from}_${to}_${counter}${suffix ? `_${suffix}` : ''}`;\n};\n\n/**\n * D3's `selection.attr` method doesn't officially support `undefined`.\n *\n * However, it seems if you do pass `undefined`, it seems to be treated as `null`\n * (e.g. it removes the attribute).\n */\nexport function handleUndefinedAttr(\n  attrValue: Parameters<d3.Selection<BaseType, unknown, HTMLElement, any>['attr']>[1] | undefined\n) {\n  return attrValue ?? null;\n}\n\n/**\n * Checks if the  x or y coordinate of the edge label\n * appears in the given SVG path data string.\n *\n * @param point  - The Point object with x and y properties to check.\n * @param dAttr  - SVG path data string (the 'd' attribute of an SVG path element).\n * @returns      - True if the rounded x or y coordinate of the edge label is found\n *                 in the sanitized path data string; otherwise, false.\n */\nexport function isLabelCoordinateInPath(point: Point, dAttr: string) {\n  const roundedX = Math.round(point.x);\n  const roundedY = Math.round(point.y);\n\n  const sanitizedD = dAttr.replace(/(\\d+\\.\\d+)/g, (match) =>\n    Math.round(parseFloat(match)).toString()\n  );\n\n  return sanitizedD.includes(roundedX.toString()) || sanitizedD.includes(roundedY.toString());\n}\n","import { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport defaultConfig from '../../../defaultConfig.js';\nimport { parseFontSize } from '../../../utils.js';\n\n/**\n * Waits for all images in a container to load and applies appropriate styling.\n * This ensures accurate bounding box measurements after images are loaded.\n *\n * @param container - The HTML element containing img tags\n * @param labelText - The original label text to check if there's text besides images\n * @returns Promise that resolves when all images are loaded and styled\n */\nexport async function configureLabelImages(\n  container: HTMLElement,\n  labelText: string\n): Promise<void> {\n  const images = container.getElementsByTagName('img');\n  if (!images || images.length === 0) {\n    return;\n  }\n\n  const noImgText = labelText.replace(/<img[^>]*>/g, '').trim() === '';\n\n  await Promise.all(\n    [...images].map(\n      (img) =>\n        new Promise((res) => {\n          function setupImage() {\n            img.style.display = 'flex';\n            img.style.flexDirection = 'column';\n\n            if (noImgText) {\n              // default size if no text\n              const bodyFontSize = getConfig().fontSize\n                ? getConfig().fontSize\n                : window.getComputedStyle(document.body).fontSize;\n              const enlargingFactor = 5;\n              const [parsedBodyFontSize = defaultConfig.fontSize] = parseFontSize(bodyFontSize);\n              const width = parsedBodyFontSize * enlargingFactor + 'px';\n              img.style.minWidth = width;\n              img.style.maxWidth = width;\n            } else {\n              img.style.width = '100%';\n            }\n            res(img);\n          }\n          setTimeout(() => {\n            if (img.complete) {\n              setupImage();\n            }\n          });\n          img.addEventListener('error', setupImage);\n          img.addEventListener('load', setupImage);\n        })\n    )\n  );\n}\n","import type { ExtendedIconifyIcon, IconifyIcon, IconifyJSON } from '@iconify/types';\nimport type { IconifyIconCustomisations } from '@iconify/utils';\nimport { getIconData, iconToHTML, iconToSVG, replaceIDs, stringToIcon } from '@iconify/utils';\nimport { getConfig } from '../config.js';\nimport { sanitizeText } from '../diagrams/common/common.js';\nimport { log } from '../logger.js';\n\nexport interface AsyncIconLoader {\n  name: string;\n  loader: () => Promise<IconifyJSON>;\n}\n\nexport interface SyncIconLoader {\n  name: string;\n  icons: IconifyJSON;\n}\n\nexport type IconLoader = AsyncIconLoader | SyncIconLoader;\n\nexport const unknownIcon: IconifyIcon = {\n  body: '<g><rect width=\"80\" height=\"80\" style=\"fill: #087ebf; stroke-width: 0px;\"/><text transform=\"translate(21.16 64.67)\" style=\"fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;\"><tspan x=\"0\" y=\"0\">?</tspan></text></g>',\n  height: 80,\n  width: 80,\n};\n\nconst iconsStore = new Map<string, IconifyJSON>();\nconst loaderStore = new Map<string, AsyncIconLoader['loader']>();\n\nexport const registerIconPacks = (iconLoaders: IconLoader[]) => {\n  for (const iconLoader of iconLoaders) {\n    if (!iconLoader.name) {\n      throw new Error(\n        'Invalid icon loader. Must have a \"name\" property with non-empty string value.'\n      );\n    }\n    log.debug('Registering icon pack:', iconLoader.name);\n    if ('loader' in iconLoader) {\n      loaderStore.set(iconLoader.name, iconLoader.loader);\n    } else if ('icons' in iconLoader) {\n      iconsStore.set(iconLoader.name, iconLoader.icons);\n    } else {\n      log.error('Invalid icon loader:', iconLoader);\n      throw new Error('Invalid icon loader. Must have either \"icons\" or \"loader\" property.');\n    }\n  }\n};\n\nconst getRegisteredIconData = async (iconName: string, fallbackPrefix?: string) => {\n  const data = stringToIcon(iconName, true, fallbackPrefix !== undefined);\n  if (!data) {\n    throw new Error(`Invalid icon name: ${iconName}`);\n  }\n  const prefix = data.prefix || fallbackPrefix;\n  if (!prefix) {\n    throw new Error(`Icon name must contain a prefix: ${iconName}`);\n  }\n  let icons = iconsStore.get(prefix);\n  if (!icons) {\n    const loader = loaderStore.get(prefix);\n    if (!loader) {\n      throw new Error(`Icon set not found: ${data.prefix}`);\n    }\n    try {\n      const loaded = await loader();\n      icons = { ...loaded, prefix };\n      iconsStore.set(prefix, icons);\n    } catch (e) {\n      log.error(e);\n      throw new Error(`Failed to load icon set: ${data.prefix}`);\n    }\n  }\n  const iconData = getIconData(icons, data.name);\n  if (!iconData) {\n    throw new Error(`Icon not found: ${iconName}`);\n  }\n  return iconData;\n};\n\nexport const isIconAvailable = async (iconName: string) => {\n  try {\n    await getRegisteredIconData(iconName);\n    return true;\n  } catch {\n    return false;\n  }\n};\n\nexport const getIconSVG = async (\n  iconName: string,\n  customisations?: IconifyIconCustomisations & { fallbackPrefix?: string },\n  extraAttributes?: Record<string, string>\n) => {\n  let iconData: ExtendedIconifyIcon;\n  try {\n    iconData = await getRegisteredIconData(iconName, customisations?.fallbackPrefix);\n  } catch (e) {\n    log.error(e);\n    iconData = unknownIcon;\n  }\n  const renderData = iconToSVG(iconData, customisations);\n  const svg = iconToHTML(replaceIDs(renderData.body), {\n    ...renderData.attributes,\n    ...extraAttributes,\n  });\n  return sanitizeText(svg, getConfig());\n};\n","import type { MarkedToken, Token } from 'marked';\nimport { marked } from 'marked';\nimport { dedent } from 'ts-dedent';\nimport type { MarkdownLine, MarkdownWordType } from './types.js';\nimport type { MermaidConfig } from '../config.type.js';\nimport { log } from '../logger.js';\n\n/**\n * @param markdown - markdown to process\n * @returns processed markdown\n */\nfunction preprocessMarkdown(markdown: string, { markdownAutoWrap }: MermaidConfig): string {\n  //Replace <br/>with \\n\n  const withoutBR = markdown.replace(/<br\\/>/g, '\\n');\n  // Replace multiple newlines with a single newline\n  const withoutMultipleNewlines = withoutBR.replace(/\\n{2,}/g, '\\n');\n  // Remove extra spaces at the beginning of each line\n  const withoutExtraSpaces = dedent(withoutMultipleNewlines);\n  if (markdownAutoWrap === false) {\n    // TODO: Disabling `markdownAutoWrap` is currently broken for `htmlLabels: false`,\n    // since the code calls `splitWordToFitWidth` to split words even we can't\n    // break on spaces.\n    // return withoutExtraSpaces.replace(/ /g, '\\u00A0');\n  }\n  return withoutExtraSpaces;\n}\n\n/**\n * @param nonMarkdownText - Non-markdown text to split into plain-text formatted lines.\n * This treats new lines, `\\n`, and `<br/>` as line breaks, and splits on spaces for words.\n * SVG tags are preserved as separate words to maintain proper formatting.\n */\nexport function nonMarkdownToLines(nonMarkdownText: string): MarkdownLine[] {\n  return nonMarkdownText.split(/\\\\n|\\n|<br\\s*\\/?>/gi).map(\n    (line) =>\n      line\n        .trim()\n        .match(/<[^>]+>|[^\\s<>]+/g) // keeps SVG tags intact and preserves space between tags and text\n        ?.map((word) => ({ content: word, type: 'normal' })) ?? []\n  );\n}\n\n/**\n * @param markdown - markdown to split into lines\n */\nexport function markdownToLines(markdown: string, config: MermaidConfig = {}): MarkdownLine[] {\n  const preprocessedMarkdown = preprocessMarkdown(markdown, config);\n  const nodes = marked.lexer(preprocessedMarkdown);\n  const lines: MarkdownLine[] = [[]];\n  let currentLine = 0;\n\n  function processNode(node: MarkedToken, parentType: MarkdownWordType = 'normal') {\n    if (node.type === 'text') {\n      const textLines = node.text.split('\\n');\n      textLines.forEach((textLine, index) => {\n        if (index !== 0) {\n          currentLine++;\n          lines.push([]);\n        }\n        textLine.split(' ').forEach((word) => {\n          word = word.replace(/&#39;/g, `'`);\n          if (word) {\n            lines[currentLine].push({ content: word, type: parentType });\n          }\n        });\n      });\n    } else if (node.type === 'strong' || node.type === 'em') {\n      node.tokens.forEach((contentNode) => {\n        processNode(contentNode as MarkedToken, node.type);\n      });\n    } else if (node.type === 'html') {\n      lines[currentLine].push({ content: node.text, type: 'normal' });\n    }\n  }\n\n  nodes.forEach((treeNode) => {\n    if (treeNode.type === 'paragraph') {\n      treeNode.tokens?.forEach((contentNode) => {\n        processNode(contentNode as MarkedToken);\n      });\n    } else if (treeNode.type === 'html') {\n      lines[currentLine].push({ content: treeNode.text, type: 'normal' });\n    } else {\n      lines[currentLine].push({ content: treeNode.raw, type: 'normal' });\n    }\n  });\n\n  return lines;\n}\n\n/**\n * Counterpart to {@link markdownToHTML} for non-markdown text.\n *\n * Non-markdown text is not wrapped normally, and users can use an explicit `\\n`\n * sequence to add a line break.\n *\n * @param text - Non-markdown text to convert to HTML.\n */\nexport function nonMarkdownToHTML(text: string) {\n  if (!text) {\n    return '';\n  }\n  /*\n   * Edge labels may have double backgrounds if `addBackground` is `true`.\n   * This `<p>` wrapper aligns with how {@link markdownToHTML} wraps its output, and\n   * ensures both backgrounds are the same size.\n   *\n   * We can't set it for empty labels, otherwise it causes rendering changes.\n   */\n  return `<p>${\n    /**\n     * Replace new lines with <br /> tags.\n     *\n     * Unlike in markdown text, `\\n` sequences are treated as line breaks here.\n     */\n    text.replace(/\\\\n|\\n/g, '<br />')\n  }</p>`;\n}\n\nexport function markdownToHTML(markdown: string, { markdownAutoWrap }: MermaidConfig = {}) {\n  const nodes = marked.lexer(markdown);\n\n  function output(node: Token): string {\n    if (node.type === 'text') {\n      if (markdownAutoWrap === false) {\n        return node.text.replace(/\\n */g, '<br/>').replace(/ /g, '&nbsp;');\n      }\n      return node.text.replace(/\\n */g, '<br/>');\n    } else if (node.type === 'strong') {\n      return `<strong>${node.tokens?.map(output).join('')}</strong>`;\n    } else if (node.type === 'em') {\n      return `<em>${node.tokens?.map(output).join('')}</em>`;\n    } else if (node.type === 'paragraph') {\n      return `<p>${node.tokens?.map(output).join('')}</p>`;\n    } else if (node.type === 'space') {\n      return '';\n    } else if (node.type === 'html') {\n      return `${node.text}`;\n    } else if (node.type === 'escape') {\n      return node.text;\n    }\n    log.warn(`Unsupported markdown: ${node.type}`);\n    return node.raw;\n  }\n\n  return nodes.map(output).join('');\n}\n","import type { CheckFitFunction, MarkdownLine, MarkdownWord, MarkdownWordType } from './types.js';\n\n/**\n * Splits a string into graphemes if available, otherwise characters.\n */\nexport function splitTextToChars(text: string): string[] {\n  if (Intl.Segmenter) {\n    return [...new Intl.Segmenter().segment(text)].map((s) => s.segment);\n  }\n  return [...text];\n}\n\n/**\n * Splits a string into words by using `Intl.Segmenter` if available, or splitting by ' '.\n * `Intl.Segmenter` uses the default locale, which might be different across browsers.\n */\nexport function splitLineToWords(text: string): string[] {\n  if (Intl.Segmenter) {\n    return [...new Intl.Segmenter(undefined, { granularity: 'word' }).segment(text)].map(\n      (s) => s.segment\n    );\n  }\n  // Split by ' ' removes the ' 's from the result.\n  const words = text.split(' ');\n  // Add the ' 's back to the result.\n  const wordsWithSpaces = words.flatMap((s) => [s, ' ']).filter((s) => s);\n  // Remove last space.\n  wordsWithSpaces.pop();\n  return wordsWithSpaces;\n}\n\n/**\n * Splits a word into two parts, the first part fits the width and the remaining part.\n * @param checkFit - Function to check if word fits\n * @param word - Word to split\n * @returns [first part of word that fits, rest of word]\n */\nexport function splitWordToFitWidth(\n  checkFit: CheckFitFunction,\n  word: MarkdownWord\n): [MarkdownWord, MarkdownWord] {\n  const characters = splitTextToChars(word.content);\n  return splitWordToFitWidthRecursion(checkFit, [], characters, word.type);\n}\n\nfunction splitWordToFitWidthRecursion(\n  checkFit: CheckFitFunction,\n  usedChars: string[],\n  remainingChars: string[],\n  type: MarkdownWordType\n): [MarkdownWord, MarkdownWord] {\n  if (remainingChars.length === 0) {\n    return [\n      { content: usedChars.join(''), type },\n      { content: '', type },\n    ];\n  }\n  const [nextChar, ...rest] = remainingChars;\n  const newWord = [...usedChars, nextChar];\n  if (checkFit([{ content: newWord.join(''), type }])) {\n    return splitWordToFitWidthRecursion(checkFit, newWord, rest, type);\n  }\n  if (usedChars.length === 0 && nextChar) {\n    // If the first character does not fit, split it anyway\n    usedChars.push(nextChar);\n    remainingChars.shift();\n  }\n  return [\n    { content: usedChars.join(''), type },\n    { content: remainingChars.join(''), type },\n  ];\n}\n\n/**\n * Splits a line into multiple lines that satisfy the checkFit function.\n * @param line - Line to split\n * @param checkFit - Function to check if line fits\n * @returns Array of lines that fit\n */\nexport function splitLineToFitWidth(\n  line: MarkdownLine,\n  checkFit: CheckFitFunction\n): MarkdownLine[] {\n  if (line.some(({ content }) => content.includes('\\n'))) {\n    throw new Error('splitLineToFitWidth does not support newlines in the line');\n  }\n  return splitLineToFitWidthRecursion(line, checkFit);\n}\n\nfunction splitLineToFitWidthRecursion(\n  words: MarkdownWord[],\n  checkFit: CheckFitFunction,\n  lines: MarkdownLine[] = [],\n  newLine: MarkdownLine = []\n): MarkdownLine[] {\n  // Return if there is nothing left to split\n  if (words.length === 0) {\n    // If there is a new line, add it to the lines\n    if (newLine.length > 0) {\n      lines.push(newLine);\n    }\n    return lines.length > 0 ? lines : [];\n  }\n  let joiner = '';\n  if (words[0].content === ' ') {\n    joiner = ' ';\n    words.shift();\n  }\n  const nextWord: MarkdownWord = words.shift() ?? { content: ' ', type: 'normal' };\n  const lineWithNextWord: MarkdownLine = [...newLine];\n  if (joiner !== '') {\n    lineWithNextWord.push({ content: joiner, type: 'normal' });\n  }\n  lineWithNextWord.push(nextWord);\n\n  if (checkFit(lineWithNextWord)) {\n    // nextWord fits, so we can add it to the new line and continue\n    return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord);\n  }\n\n  // nextWord doesn't fit, so we need to split it\n  if (newLine.length > 0) {\n    // There was text in newLine, so add it to lines and push nextWord back into words.\n    lines.push(newLine);\n    words.unshift(nextWord);\n  } else if (nextWord.content) {\n    // There was no text in newLine, so we need to split nextWord\n    const [line, rest] = splitWordToFitWidth(checkFit, nextWord);\n    lines.push([line]);\n    if (rest.content) {\n      words.unshift(rest);\n    }\n  }\n  return splitLineToFitWidthRecursion(words, checkFit, lines);\n}\n","import { select } from 'd3';\nimport type { MermaidConfig } from '../config.type.js';\nimport type { SVGGroup } from '../diagram-api/types.js';\nimport common, { hasKatex, renderKatexSanitized, sanitizeText } from '../diagrams/common/common.js';\nimport type { D3TSpanElement, D3TextElement } from '../diagrams/common/commonTypes.js';\nimport { log } from '../logger.js';\nimport {\n  markdownToHTML,\n  markdownToLines,\n  nonMarkdownToHTML,\n  nonMarkdownToLines,\n} from '../rendering-util/handle-markdown-text.js';\nimport { decodeEntities } from '../utils.js';\nimport { getIconSVG, isIconAvailable } from './icons.js';\nimport { splitLineToFitWidth } from './splitText.js';\nimport type { MarkdownLine, MarkdownWord } from './types.js';\nimport { getConfig } from '../config.js';\nimport type { D3Selection } from '../types.js';\n\nfunction applyStyle<T extends Element>(\n  dom: d3.Selection<T, unknown, Element | null, unknown>,\n  styleFn?: Parameters<typeof dom.attr>[1]\n) {\n  if (styleFn) {\n    dom.attr('style', styleFn);\n  }\n}\n\n// We assume that nobody will want to create labels larger than 16384 pixels wide\nconst maxSafeSizeForWidth = 16384;\n\nasync function addHtmlSpan(\n  element: D3Selection<SVGGElement>,\n  node: { label: string; labelStyle: string; isNode: boolean },\n  width: number,\n  classes: string,\n  addBackground = false,\n  // TODO: Make config mandatory\n  config: MermaidConfig = getConfig()\n) {\n  const fo = element.append('foreignObject');\n  // This is not the final width but used in order to make sure the foreign\n  // object in firefox gets a width at all. The final width is fetched from the div\n  fo.attr('width', `${Math.min(10 * width, maxSafeSizeForWidth)}px`);\n  fo.attr('height', `${Math.min(10 * width, maxSafeSizeForWidth)}px`);\n\n  const div = fo.append<HTMLDivElement>('xhtml:div');\n  const sanitizedLabel = hasKatex(node.label)\n    ? await renderKatexSanitized(node.label.replace(common.lineBreakRegex, '\\n'), config)\n    : sanitizeText(node.label, config);\n  const labelClass = node.isNode ? 'nodeLabel' : 'edgeLabel';\n  const span = div.append('span');\n  span.html(sanitizedLabel);\n  applyStyle(span, node.labelStyle);\n  span.attr('class', `${labelClass} ${classes}`);\n\n  applyStyle(div, node.labelStyle);\n  div.style('display', 'table-cell');\n  div.style('white-space', 'nowrap');\n  div.style('line-height', '1.5');\n  if (width !== Number.POSITIVE_INFINITY) {\n    div.style('max-width', width + 'px');\n    div.style('text-align', 'center');\n  }\n  div.attr('xmlns', 'http://www.w3.org/1999/xhtml');\n  if (addBackground) {\n    div.attr('class', 'labelBkg');\n  }\n\n  let bbox = div.node()!.getBoundingClientRect();\n  if (bbox.width === width) {\n    div.style('display', 'table');\n    div.style('white-space', 'break-spaces');\n    div.style('width', width + 'px');\n    bbox = div.node()!.getBoundingClientRect();\n  }\n\n  return fo.node()!;\n}\n\n/**\n * Creates a tspan element with the specified attributes for text positioning.\n *\n * @param textElement - The parent text element to append the tspan element.\n * @param lineIndex - The index of the current line in the structuredText array.\n * @param lineHeight - The line height value for the text.\n * @param centerText - The flag to determine if the text should be centered.\n * @returns The created tspan element.\n */\nfunction createTspan(\n  textElement: D3Selection<SVGTextElement>,\n  lineIndex: number,\n  lineHeight: number,\n  centerText = false\n) {\n  const tspan = textElement\n    .append('tspan')\n    .attr('class', 'text-outer-tspan')\n    .attr('x', 0)\n    .attr('y', lineIndex * lineHeight - 0.1 + 'em')\n    .attr('dy', lineHeight + 'em');\n  if (centerText) {\n    tspan.attr('text-anchor', 'middle');\n  }\n  return tspan;\n}\n\nfunction computeWidthOfText(\n  parentNode: D3Selection<SVGGElement>,\n  lineHeight: number,\n  line: MarkdownLine\n): number {\n  const testElement = parentNode.append('text');\n  const testSpan = createTspan(testElement, 1, lineHeight);\n  updateTextContentAndStyles(testSpan, line);\n  const textLength = testSpan.node()!.getComputedTextLength();\n  testElement.remove();\n  return textLength;\n}\n\nexport function computeDimensionOfText(\n  parentNode: SVGGroup,\n  lineHeight: number,\n  text: string\n): DOMRect | undefined {\n  const testElement: D3TextElement = parentNode.append('text');\n  const testSpan: D3TSpanElement = createTspan(testElement, 1, lineHeight);\n  updateTextContentAndStyles(testSpan, [{ content: text, type: 'normal' }]);\n  const textDimension: DOMRect | undefined = testSpan.node()?.getBoundingClientRect();\n  if (textDimension) {\n    testElement.remove();\n  }\n  return textDimension;\n}\n\n/**\n * Creates a formatted text element by breaking lines and applying styles based on\n * the given structuredText.\n *\n * @param width - The maximum allowed width of the text.\n * @param g - The parent group element to append the formatted text.\n * @param structuredText - The structured text data to format.\n * @param addBackground - Whether to add a background to the text.\n * @param centerText - The flag to determine if the text should be centered.\n */\nfunction createFormattedText(\n  width: number,\n  g: D3Selection<SVGGElement>,\n  structuredText: MarkdownWord[][],\n  addBackground = false,\n  centerText = false\n) {\n  const lineHeight = 1.1;\n  const labelGroup = g.append('g');\n  const bkg = labelGroup.insert('rect').attr('class', 'background').attr('style', 'stroke: none');\n  const textElement = labelGroup.append('text').attr('y', '-10.1');\n  if (centerText) {\n    textElement.attr('text-anchor', 'middle');\n  }\n  let lineIndex = 0;\n  for (const line of structuredText) {\n    /**\n     * Preprocess raw string content of line data\n     * Creating an array of strings pre-split to satisfy width limit\n     */\n    const checkWidth = (line: MarkdownLine) =>\n      computeWidthOfText(labelGroup, lineHeight, line) <= width;\n    const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth);\n    /** Add each prepared line as a tspan to the parent node */\n    for (const preparedLine of linesUnderWidth) {\n      const tspan = createTspan(textElement, lineIndex, lineHeight, centerText);\n      updateTextContentAndStyles(tspan, preparedLine);\n      lineIndex++;\n    }\n  }\n  if (addBackground) {\n    const bbox = textElement.node()!.getBBox();\n    const padding = 2;\n    bkg\n      .attr('x', bbox.x - padding)\n      .attr('y', bbox.y - padding)\n      .attr('width', bbox.width + 2 * padding)\n      .attr('height', bbox.height + 2 * padding);\n\n    return labelGroup.node()!;\n  } else {\n    return textElement.node()!;\n  }\n}\n\n/**\n * Our HTML code uses `.innerHTML` to apply the text,\n * however our plain text SVG code uses `.textContent` to apply the text,\n * which means that HTML entities are not decoded in SVG text.\n *\n * This means that we need to decode any HTML entities that `sanitizeText` encodes.\n *\n * TODO: If we're using `.textContent`, we can probably skip sanitization entirely.\n */\nfunction decodeHTMLEntities(text: string): string {\n  // We only need to decode the few entries that `sanitizeText` encodes.\n  const regex = /&(amp|lt|gt);/g;\n  return text.replace(regex, (match, entity) => {\n    switch (entity) {\n      case 'amp':\n        return '&';\n      case 'lt':\n        return '<';\n      case 'gt':\n        return '>';\n      default:\n        return match;\n    }\n  });\n}\n\n/**\n * Updates the text content and styles of the given tspan element based on the\n * provided wrappedLine data.\n *\n * @param tspan - The tspan element to update.\n * @param wrappedLine - The line data to apply to the tspan element.\n */\nfunction updateTextContentAndStyles(\n  tspan: D3Selection<SVGTSpanElement>,\n  wrappedLine: MarkdownWord[]\n) {\n  tspan.text('');\n\n  wrappedLine.forEach((word, index) => {\n    const innerTspan = tspan\n      .append('tspan')\n      .attr('font-style', word.type === 'em' ? 'italic' : 'normal')\n      .attr('class', 'text-inner-tspan')\n      .attr('font-weight', word.type === 'strong' ? 'bold' : 'normal');\n    if (index === 0) {\n      innerTspan.text(decodeHTMLEntities(word.content));\n    } else {\n      // TODO: check what joiner to use.\n      innerTspan.text(' ' + decodeHTMLEntities(word.content));\n    }\n  });\n}\n\n/**\n * Convert fontawesome labels into fontawesome icons by using a regex pattern\n * @param text - The raw string to convert\n * @param config - Mermaid config\n * @returns string with fontawesome icons as svg if the icon is registered otherwise as i tags\n */\nexport async function replaceIconSubstring(\n  text: string,\n  // TODO: Make config mandatory\n  config: MermaidConfig = {}\n): Promise<string> {\n  const pendingReplacements: Promise<string>[] = [];\n  // cspell: disable-next-line\n  text.replace(/(fa[bklrs]?):fa-([\\w-]+)/g, (fullMatch, prefix, iconName) => {\n    pendingReplacements.push(\n      (async () => {\n        const registeredIconName = `${prefix}:${iconName}`;\n        if (await isIconAvailable(registeredIconName)) {\n          return await getIconSVG(registeredIconName, undefined, { class: 'label-icon' });\n        } else {\n          return `<i class='${sanitizeText(fullMatch, config).replace(':', ' ')}'></i>`;\n        }\n      })()\n    );\n    return fullMatch;\n  });\n\n  const replacements = await Promise.all(pendingReplacements);\n  // cspell: disable-next-line\n  return text.replace(/(fa[bklrs]?):fa-([\\w-]+)/g, () => replacements.shift() ?? '');\n}\n\n// Note when using from flowcharts converting the API isNode means classes should be set accordingly. When using htmlLabels => to set classes to 'nodeLabel' when isNode=true otherwise 'edgeLabel'\n// When not using htmlLabels => to set classes to 'title-row' when isTitle=true otherwise 'title-row'\n/**\n * Creates a text element within the given SVG group element.\n *\n * If `markdown` is `true`, basic markdown syntax will be processed.\n * Otherwise, if:\n *   - `useHtmlLabels` is `true`, the text will be sanitized and set in `<foreignObject>` as HTML.\n *   - `useHtmlLabels` is `false`, the text will be added as a `<text>` element using `.text`\n *\n * @param el - The parent SVG `<g>` element to append the text element to.\n * @param text - The text content to be displayed.\n * @param options - Optional options\n * @param config - Mermaid configuration object\n * @returns The created text element, either a `<foreignObject>` or a `<text>` element depending on the options.\n */\nexport const createText = async (\n  el: D3Selection<SVGGElement>,\n  text = '',\n  {\n    style = '',\n    isTitle = false,\n    classes = '',\n    useHtmlLabels = true,\n    markdown = true,\n    isNode = true,\n    /**\n     * The width to wrap the text within. Set to `Number.POSITIVE_INFINITY` for no wrapping.\n     */\n    width = 200,\n    addSvgBackground = false,\n  } = {},\n  config?: MermaidConfig\n) => {\n  log.debug(\n    'XYZ createText',\n    text,\n    style,\n    isTitle,\n    classes,\n    useHtmlLabels,\n    isNode,\n    'addSvgBackground: ',\n    addSvgBackground\n  );\n  if (useHtmlLabels) {\n    // TODO: addHtmlLabel accepts a labelStyle. Do we possibly have that?\n\n    const htmlText = markdown ? markdownToHTML(text, config) : nonMarkdownToHTML(text);\n    const decodedReplacedText = await replaceIconSubstring(decodeEntities(htmlText), config);\n\n    //for Katex the text could contain escaped characters, \\\\relax that should be transformed to \\relax\n    const inputForKatex = text.replace(/\\\\\\\\/g, '\\\\');\n\n    const node = {\n      isNode,\n      label: hasKatex(text) ? inputForKatex : decodedReplacedText,\n      labelStyle: style.replace('fill:', 'color:'),\n    };\n    const vertexNode = await addHtmlSpan(el, node, width, classes, addSvgBackground, config);\n    return vertexNode;\n  } else {\n    //sometimes the user might add br tags with 1 or more spaces in between, so we need to replace them with <br/>\n    const sanitizeBR = decodeEntities(text.replace(/<br\\s*\\/?>/g, '<br/>'));\n    const structuredText = markdown\n      ? markdownToLines(sanitizeBR.replace('<br>', '<br/>'), config)\n      : nonMarkdownToLines(sanitizeBR);\n    const svgLabel = createFormattedText(\n      width,\n      el,\n      structuredText,\n      text ? addSvgBackground : false,\n      !isNode\n    );\n    if (isNode) {\n      if (/stroke:/.exec(style)) {\n        style = style.replace('stroke:', 'lineColor:');\n      }\n\n      const nodeLabelTextStyle = style\n        .replace(/stroke:[^;]+;?/g, '')\n        .replace(/stroke-width:[^;]+;?/g, '')\n        .replace(/fill:[^;]+;?/g, '')\n        .replace(/color:/g, 'fill:');\n      select(svgLabel).attr('style', nodeLabelTextStyle);\n      // svgLabel.setAttribute('style', style);\n    } else {\n      //On style, assume `stroke`, `stroke-width` are used for edge path, so remove them\n      // remove `fill`\n      //  use  `background` as `fill` for label rect,\n\n      const edgeLabelRectStyle = style\n        .replace(/stroke:[^;]+;?/g, '')\n        .replace(/stroke-width:[^;]+;?/g, '')\n        .replace(/fill:[^;]+;?/g, '')\n        .replace(/background:/g, 'fill:');\n      select(svgLabel)\n        .select('rect')\n        .attr('style', edgeLabelRectStyle.replace(/background:/g, 'fill:'));\n\n      // for text, update fill color with `color`\n      const edgeLabelTextStyle = style\n        .replace(/stroke:[^;]+;?/g, '')\n        .replace(/stroke-width:[^;]+;?/g, '')\n        .replace(/fill:[^;]+;?/g, '')\n        .replace(/color:/g, 'fill:');\n      select(svgLabel).select('text').attr('style', edgeLabelTextStyle);\n    }\n    if (isTitle) {\n      // I can't actually see the title-row/row class being used anywhere, but keeping it for backward compatibility\n      select(svgLabel).selectAll('tspan.text-outer-tspan').classed('title-row', true);\n    } else {\n      select(svgLabel).selectAll('tspan.text-outer-tspan').classed('row', true);\n    }\n    return svgLabel;\n  }\n};\n","import { createText } from '../../createText.js';\nimport type { Node } from '../../types.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { evaluate, getEffectiveHtmlLabels } from '../../../config.js';\nimport { select } from 'd3';\nimport { sanitizeText } from '../../../diagrams/common/common.js';\nimport { decodeEntities, handleUndefinedAttr } from '../../../utils.js';\nimport type { D3Selection, Point } from '../../../types.js';\nimport { configureLabelImages } from './labelImageUtils.js';\n\nexport const labelHelper = async <T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  _classes?: string\n) => {\n  let cssClasses;\n  const useHtmlLabels = node.useHtmlLabels || evaluate(getConfig()?.htmlLabels);\n  if (!_classes) {\n    cssClasses = 'node default';\n  } else {\n    cssClasses = _classes;\n  }\n\n  // Add outer g element\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', cssClasses)\n    .attr('id', node.domId || node.id);\n\n  // Create the label and insert it after the rect\n  const labelEl = shapeSvg\n    .insert('g')\n    .attr('class', 'label')\n    .attr('style', handleUndefinedAttr(node.labelStyle));\n\n  // Replace label with default value if undefined\n  let label;\n  if (node.label === undefined) {\n    label = '';\n  } else {\n    label = typeof node.label === 'string' ? node.label : node.label[0];\n  }\n\n  const addBackground = !!node.icon || !!node.img;\n  const isMarkdown = node.labelType === 'markdown';\n  const text = await createText(\n    labelEl,\n    sanitizeText(decodeEntities(label), getConfig()),\n    {\n      useHtmlLabels,\n      width: node.width || getConfig().flowchart?.wrappingWidth,\n      classes: isMarkdown ? 'markdown-node-label' : '',\n      style: node.labelStyle,\n      addSvgBackground: addBackground,\n      markdown: isMarkdown,\n    },\n    getConfig()\n  );\n\n  // Get the size of the label\n  let bbox = text.getBBox();\n  const halfPadding = (node?.padding ?? 0) / 2;\n\n  if (useHtmlLabels) {\n    const div = text.children[0] as HTMLDivElement;\n    const dv = select(text);\n\n    // if there are images, need to wait for them to load before getting the bounding box\n    await configureLabelImages(div, label);\n\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  // Center the label\n  if (useHtmlLabels) {\n    labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  } else {\n    labelEl.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n  }\n  if (node.centerLabel) {\n    labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  }\n  labelEl.insert('rect', ':first-child');\n  return { shapeSvg, bbox, halfPadding, label: labelEl };\n};\nexport const insertLabel = async <T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  label: string,\n  options: {\n    labelStyle?: string | undefined;\n    icon?: boolean | undefined;\n    img?: string | undefined;\n    useHtmlLabels?: boolean | undefined;\n    padding: number;\n    width?: number | undefined;\n    centerLabel?: boolean | undefined;\n    addSvgBackground?: boolean | undefined;\n  }\n) => {\n  const useHtmlLabels = options.useHtmlLabels ?? getEffectiveHtmlLabels(getConfig());\n\n  // Create the label and insert it after the rect\n  const labelEl = parent\n    .insert('g')\n    .attr('class', 'label')\n    .attr('style', options.labelStyle || '');\n\n  const text = await createText(labelEl, sanitizeText(decodeEntities(label), getConfig()), {\n    useHtmlLabels,\n    width: options.width || getConfig()?.flowchart?.wrappingWidth,\n    style: options.labelStyle,\n    addSvgBackground: !!options.icon || !!options.img,\n  });\n  // Get the size of the label\n  let bbox = text.getBBox();\n  const halfPadding = options.padding / 2;\n\n  if (getEffectiveHtmlLabels(getConfig())) {\n    const div = text.children[0];\n    const dv = select(text);\n\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  // Center the label\n  if (useHtmlLabels) {\n    labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  } else {\n    labelEl.attr('transform', 'translate(' + 0 + ', ' + -bbox.height / 2 + ')');\n  }\n  if (options.centerLabel) {\n    labelEl.attr('transform', 'translate(' + -bbox.width / 2 + ', ' + -bbox.height / 2 + ')');\n  }\n  labelEl.insert('rect', ':first-child');\n  return { shapeSvg: parent, bbox, halfPadding, label: labelEl };\n};\nexport const updateNodeBounds = <T extends SVGGraphicsElement>(\n  node: Node,\n  // D3Selection<SVGGElement> is for the roughjs case, D3Selection<T> is for the non-roughjs case\n  element: D3Selection<SVGGElement> | D3Selection<T>\n) => {\n  const bbox = element.node()!.getBBox();\n  node.width = bbox.width;\n  node.height = bbox.height;\n};\n\n/**\n * @param parent - Parent element to append the polygon to\n * @param w - Width of the polygon\n * @param h - Height of the polygon\n * @param points - Array of points to create the polygon\n */\nexport function insertPolygonShape(\n  parent: D3Selection<SVGGElement>,\n  w: number,\n  h: number,\n  points: Point[]\n) {\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\nexport const getNodeClasses = (node: Node, extra?: string) =>\n  (node.look === 'handDrawn' ? 'rough-node' : 'node') + ' ' + node.cssClasses + ' ' + (extra || '');\n\nexport function createPathFromPoints(points: Point[]) {\n  const pointStrings = points.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`);\n  pointStrings.push('Z');\n  return pointStrings.join(' ');\n}\n\nexport function generateFullSineWavePoints(\n  x1: number,\n  y1: number,\n  x2: number,\n  y2: number,\n  amplitude: number,\n  numCycles: number\n) {\n  const points = [];\n  const steps = 50; // Number of segments to create a smooth curve\n  const deltaX = x2 - x1;\n  const deltaY = y2 - y1;\n  const cycleLength = deltaX / numCycles;\n\n  // Calculate frequency and phase shift\n  const frequency = (2 * Math.PI) / cycleLength;\n  const midY = y1 + deltaY / 2;\n\n  for (let i = 0; i <= steps; i++) {\n    const t = i / steps;\n    const x = x1 + t * deltaX;\n    const y = midY + amplitude * Math.sin(frequency * (x - x1));\n\n    points.push({ x, y });\n  }\n\n  return points;\n}\n\n/**\n * @param centerX - x-coordinate of center of circle\n * @param centerY - y-coordinate of center of circle\n * @param radius - radius of circle\n * @param numPoints - total points required\n * @param startAngle - angle where arc will start\n * @param endAngle - angle where arc will end\n */\nexport function generateCirclePoints(\n  centerX: number,\n  centerY: number,\n  radius: number,\n  numPoints: number,\n  startAngle: number,\n  endAngle: number\n) {\n  const points = [];\n\n  // Convert angles to radians\n  const startAngleRad = (startAngle * Math.PI) / 180;\n  const endAngleRad = (endAngle * Math.PI) / 180;\n\n  // Calculate the angle range in radians\n  const angleRange = endAngleRad - startAngleRad;\n\n  // Calculate the angle step\n  const angleStep = angleRange / (numPoints - 1);\n\n  for (let i = 0; i < numPoints; i++) {\n    const angle = startAngleRad + i * angleStep;\n    const x = centerX + radius * Math.cos(angle);\n    const y = centerY + radius * Math.sin(angle);\n    points.push({ x: -x, y: -y });\n  }\n\n  return points;\n}\n\nexport function mergePaths(roughElement: SVGElement) {\n  // Get all paths generated by RoughJS\n  // eslint-disable-next-line unicorn/prefer-spread\n  const paths: SVGPathElement[] = Array.from(roughElement.childNodes).filter(\n    (node): node is SVGPathElement => (node as Element).tagName === 'path'\n  );\n\n  // Create a new path element\n  const mergedPath: SVGPathElement = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n\n  // Combine all path data\n  const combinedPathData: string = paths\n    .map((path) => path.getAttribute('d'))\n    .filter((d): d is string => d !== null)\n    .join(' ');\n\n  mergedPath.setAttribute('d', combinedPathData);\n\n  // Find the fill path (usually the second path)\n  const fillPath = paths.find((path) => path.getAttribute('fill') !== 'none');\n\n  // Find the stroke path (usually the first path)\n  const strokePath = paths.find((path) => path.getAttribute('stroke') !== 'none');\n\n  // Helper function to safely get attribute\n  const getAttr = (element: SVGPathElement | undefined, attr: string): string | undefined => {\n    return element?.getAttribute(attr) ?? undefined;\n  };\n\n  // Apply the correct styles from respective paths\n  if (fillPath) {\n    const fillAttrs = {\n      fill: getAttr(fillPath, 'fill'),\n      'fill-opacity': getAttr(fillPath, 'fill-opacity') ?? '1',\n    };\n\n    Object.entries(fillAttrs).forEach(([attr, value]) => {\n      if (value) {\n        mergedPath.setAttribute(attr, value);\n      }\n    });\n  }\n\n  if (strokePath) {\n    const strokeAttrs = {\n      stroke: getAttr(strokePath, 'stroke'),\n      'stroke-width': getAttr(strokePath, 'stroke-width') ?? '1',\n      'stroke-opacity': getAttr(strokePath, 'stroke-opacity') ?? '1',\n    };\n\n    Object.entries(strokeAttrs).forEach(([attr, value]) => {\n      if (value) {\n        mergedPath.setAttribute(attr, value);\n      }\n    });\n  }\n\n  // Create a group to hold our merged path\n  const group: SVGGElement = document.createElementNS('http://www.w3.org/2000/svg', 'g');\n  group.appendChild(mergedPath);\n\n  return group;\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","import { getEffectiveHtmlLabels } from '../../config.js';\nimport { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { createText } from '../createText.js';\n\n/**\n * @param {import('../../types.js').D3Selection<SVGGElement>} element - The parent element to which the label will be appended.\n * @param {string | [string] | undefined} _vertexText - The text content of the label.\n * @param {string} style\n * @param {boolean} [isTitle] - If `true`, style this as a title label, else as a normal label.\n * @param {boolean} [isNode] - If `true`, style this as a node label, else as an edge label.\n * @deprecated svg-util/createText instead\n *\n * @example\n *\n * If `getEffectiveHtmlLabels(getConfig())` is `true`, you must reset the width\n * and height of the created label after creation, like this:\n *\n * ```js\n * const labelElement = await createLabel(parent, ... );\n * let slBox = labelElement.getBBox();\n * if (useHtmlLabels) {\n *   const div = labelElement.children[0];\n *   const dv = select(labelElement);\n *   slBox = div.getBoundingClientRect();\n *   dv.attr('width', slBox.width);\n *   dv.attr('height', slBox.height);\n * }\n * parent.attr('transform', 'translate(' + -slBox.width / 2 + ', ' + -slBox.height / 2 + ')');\n * ```\n */\nconst createLabel = async (element, _vertexText, style, isTitle = false, isNode = false) => {\n  let vertexText = _vertexText || '';\n  if (typeof vertexText === 'object') {\n    vertexText = vertexText[0];\n  }\n\n  const config = getConfig();\n  const useHtmlLabels = getEffectiveHtmlLabels(config);\n\n  return await createText(\n    element,\n    vertexText,\n    {\n      style,\n      isTitle,\n      useHtmlLabels,\n      markdown: false,\n      isNode,\n      width: Number.POSITIVE_INFINITY,\n    },\n    config\n  );\n};\n\nexport default createLabel;\n","export const createRoundedRectPathD = (\n  x: number,\n  y: number,\n  totalWidth: number,\n  totalHeight: number,\n  radius: number\n) =>\n  [\n    'M',\n    x + radius,\n    y, // Move to the first point\n    'H',\n    x + totalWidth - radius, // Draw horizontal line to the beginning of the right corner\n    'A',\n    radius,\n    radius,\n    0,\n    0,\n    1,\n    x + totalWidth,\n    y + radius, // Draw arc to the right top corner\n    'V',\n    y + totalHeight - radius, // Draw vertical line down to the beginning of the right bottom corner\n    'A',\n    radius,\n    radius,\n    0,\n    0,\n    1,\n    x + totalWidth - radius,\n    y + totalHeight, // Draw arc to the right bottom corner\n    'H',\n    x + radius, // Draw horizontal line to the beginning of the left bottom corner\n    'A',\n    radius,\n    radius,\n    0,\n    0,\n    1,\n    x,\n    y + totalHeight - radius, // Draw arc to the left bottom corner\n    'V',\n    y + radius, // Draw vertical line up to the beginning of the left top corner\n    'A',\n    radius,\n    radius,\n    0,\n    0,\n    1,\n    x + radius,\n    y, // Draw arc to the left top corner\n    'Z', // Close the path\n  ].join(' ');\n","function intersectNode(node, point) {\n  return node.intersect(point);\n}\n\nexport default intersectNode;\n","function 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.js';\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 */\nfunction intersectLine(p1, p2, q1, q2) {\n  {\n    // Algorithm from J. Avro, (ed.) Graphics Gems, No 2, Morgan Kaufmann, 1994,\n    // p7 and p473.\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    const a1 = p2.y - p1.y;\n    const b1 = p1.x - p2.x;\n    const c1 = p2.x * p1.y - p1.x * p2.y;\n\n    // Compute r3 and r4.\n    const r3 = a1 * q1.x + b1 * q1.y + c1;\n    const r4 = a1 * q2.x + b1 * q2.y + c1;\n\n    const epsilon = 1e-6;\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 /*DON'T_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    const a2 = q2.y - q1.y;\n    const b2 = q1.x - q2.x;\n    const c2 = q2.x * q1.y - q1.x * q2.y;\n\n    // Compute r1 and r2\n    const r1 = a2 * p1.x + b2 * p1.y + c2;\n    const 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 (Math.abs(r1) < epsilon && Math.abs(r2) < epsilon && sameSign(r1, r2)) {\n      return /*DON'T_INTERSECT*/;\n    }\n\n    // Line segments intersect: compute intersection point.\n    const denom = a1 * b2 - a2 * b1;\n    if (denom === 0) {\n      return /*COLLINEAR*/;\n    }\n\n    const 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    let num = b1 * c2 - b2 * c1;\n    const x = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n    num = a2 * c1 - a1 * c2;\n    const y = num < 0 ? (num - offset) / denom : (num + offset) / denom;\n\n    return { x: x, y: y };\n  }\n}\n\nfunction sameSign(r1, r2) {\n  return r1 * r2 > 0;\n}\n\nexport default intersectLine;\n","import intersectLine from './intersect-line.js';\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 */\nfunction intersectPolygon(node, polyPoints, point) {\n  let x1 = node.x;\n  let y1 = node.y;\n\n  let intersections = [];\n\n  let minX = Number.POSITIVE_INFINITY;\n  let 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  let left = x1 - node.width / 2 - minX;\n  let top = y1 - node.height / 2 - minY;\n\n  for (let i = 0; i < polyPoints.length; i++) {\n    let p1 = polyPoints[i];\n    let p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];\n    let 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    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      let pdx = p.x - point.x;\n      let pdy = p.y - point.y;\n      let distp = Math.sqrt(pdx * pdx + pdy * pdy);\n\n      let qdx = q.x - point.x;\n      let qdy = q.y - point.y;\n      let 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\nexport default intersectPolygon;\n","/*\n * Borrowed with love from dagre-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 { log } from '../../../logger.js';\nimport { updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { handleUndefinedAttr } from '../../../utils.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function anchor<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const classes = getNodeClasses(node);\n  let cssClasses = classes;\n  if (!classes) {\n    cssClasses = 'anchor';\n  }\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', cssClasses)\n    .attr('id', node.domId || node.id);\n\n  const radius = 1;\n\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, { fill: 'black', stroke: 'none', fillStyle: 'solid' });\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n  }\n  const roughNode = rc.circle(0, 0, radius * 2, options);\n  const circleElem = shapeSvg.insert(() => roughNode, ':first-child');\n  circleElem.attr('class', 'anchor').attr('style', handleUndefinedAttr(cssStyles));\n\n  updateNodeBounds(node, circleElem);\n\n  node.intersect = function (point) {\n    log.info('Circle intersect', node, radius, point);\n    return intersect.circle(node, radius, point);\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateArcPoints(\n  x1: number,\n  y1: number,\n  x2: number,\n  y2: number,\n  rx: number,\n  ry: number,\n  clockwise: boolean\n) {\n  const numPoints = 20;\n  // Calculate midpoint\n  const midX = (x1 + x2) / 2;\n  const midY = (y1 + y2) / 2;\n\n  // Calculate the angle of the line connecting the points\n  const angle = Math.atan2(y2 - y1, x2 - x1);\n\n  // Calculate transformed coordinates for the ellipse\n  const dx = (x2 - x1) / 2;\n  const dy = (y2 - y1) / 2;\n\n  // Scale to unit circle\n  const transformedX = dx / rx;\n  const transformedY = dy / ry;\n\n  // Calculate the distance between points on the unit circle\n  const distance = Math.sqrt(transformedX ** 2 + transformedY ** 2);\n\n  // Check if the ellipse can be drawn with the given radii\n  if (distance > 1) {\n    throw new Error('The given radii are too small to create an arc between the points.');\n  }\n\n  // Calculate the distance from the midpoint to the center of the ellipse\n  const scaledCenterDistance = Math.sqrt(1 - distance ** 2);\n\n  // Calculate the center of the ellipse\n  const centerX = midX + scaledCenterDistance * ry * Math.sin(angle) * (clockwise ? -1 : 1);\n  const centerY = midY - scaledCenterDistance * rx * Math.cos(angle) * (clockwise ? -1 : 1);\n\n  // Calculate the start and end angles on the ellipse\n  const startAngle = Math.atan2((y1 - centerY) / ry, (x1 - centerX) / rx);\n  const endAngle = Math.atan2((y2 - centerY) / ry, (x2 - centerX) / rx);\n\n  // Adjust angles for clockwise/counterclockwise\n  let angleRange = endAngle - startAngle;\n  if (clockwise && angleRange < 0) {\n    angleRange += 2 * Math.PI;\n  }\n  if (!clockwise && angleRange > 0) {\n    angleRange -= 2 * Math.PI;\n  }\n\n  // Generate points\n  const points = [];\n  for (let i = 0; i < numPoints; i++) {\n    const t = i / (numPoints - 1);\n    const angle = startAngle + t * angleRange;\n    const x = centerX + rx * Math.cos(angle);\n    const y = centerY + ry * Math.sin(angle);\n    points.push({ x, y });\n  }\n\n  return points;\n}\n\n/**\n * Calculates the sagitta of an arc of an ellipse given its chord and radii.\n *\n * @param chord - The chord of the arc (e.g. the line connecting the two points on the circle)\n * @param radiusX - The x-radius of the ellipse.\n * @param radiusY - The y-radius of the ellipse.\n */\nfunction calculateArcSagitta(chord: number, radiusX: number, radiusY: number) {\n  const [semiMajorAxis, semiMinorAxis] = [radiusX, radiusY].sort((a, b) => b - a);\n  return semiMinorAxis * (1 - Math.sqrt(1 - (chord / semiMajorAxis / 2) ** 2));\n}\n\nexport async function bowTieRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n\n  const calcTotalHeight = (labelHeight: number) => labelHeight + labelPaddingY;\n  const calcEllipseRadius = (totalHeight: number) => {\n    const ry = totalHeight / 2;\n    const rx = ry / (2.5 + totalHeight / 50);\n    return [rx, ry];\n  };\n\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const totalHeight = calcTotalHeight(node?.height ? node?.height : bbox.height);\n  const [rx, ry] = calcEllipseRadius(totalHeight);\n  const sagitta = calculateArcSagitta(totalHeight, rx, ry);\n  const totalWidth = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2 + sagitta;\n\n  const w = totalWidth - sagitta;\n  const h = totalHeight;\n  // let shape: d3.Selection<SVGPathElement | SVGGElement, unknown, null, undefined>;\n  const { cssStyles } = node;\n\n  const points = [\n    { x: w / 2, y: -h / 2 },\n    { x: -w / 2, y: -h / 2 },\n    ...generateArcPoints(-w / 2, -h / 2, -w / 2, h / 2, rx, ry, false),\n    { x: w / 2, y: h / 2 },\n    ...generateArcPoints(w / 2, h / 2, w / 2, -h / 2, rx, ry, true),\n  ];\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const bowTieRectPath = createPathFromPoints(points);\n  const bowTieRectShapePath = rc.path(bowTieRectPath, options);\n  const bowTieRectShape = shapeSvg.insert(() => bowTieRectShapePath, ':first-child');\n\n  bowTieRectShape.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    bowTieRectShape.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    bowTieRectShape.selectAll('path').attr('style', nodeStyles);\n  }\n\n  bowTieRectShape.attr('transform', `translate(${rx / 2}, 0)`);\n\n  updateNodeBounds(node, bowTieRectShape);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import type { D3Selection } from '../../../types.js';\n\nexport function insertPolygonShape<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  w: number,\n  h: number,\n  points: { x: number; y: number }[]\n) {\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","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\n// const createPathFromPoints = (points: { x: number; y: number }[]): string => {\n//   const pointStrings = points.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`);\n//   pointStrings.push('Z');\n//   return pointStrings.join(' ');\n// };\n\n/// Size of the notch on the top left corner\nconst NOTCH_SIZE = 12;\n\nexport async function card<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 28 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 24 : nodePadding;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w =\n    (node?.width ?? bbox.width) +\n    (node.look === 'neo' ? labelPaddingX * 2 : labelPaddingX + NOTCH_SIZE);\n  const h =\n    (node?.height ?? bbox.height) + (node.look === 'neo' ? labelPaddingY * 2 : labelPaddingY);\n  const left = 0;\n  const right = w;\n  const top = -h;\n  const bottom = 0;\n  const points = [\n    { x: left + NOTCH_SIZE, y: top },\n    { x: right, y: top },\n    { x: right, y: bottom },\n    { x: left, y: bottom },\n    { x: left, y: top + NOTCH_SIZE },\n    { x: left + NOTCH_SIZE, y: top },\n  ];\n\n  let polygon: D3Selection<SVGGElement> | Awaited<ReturnType<typeof insertPolygonShape>>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const pathData = createPathFromPoints(points);\n    const roughNode = rc.path(pathData, options);\n\n    polygon = shapeSvg\n      .insert(() => roughNode, ':first-child')\n      .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n    if (cssStyles) {\n      polygon.attr('style', cssStyles);\n    }\n  } else {\n    polygon = insertPolygonShape(shapeSvg, w, h, points);\n  }\n\n  if (nodeStyles) {\n    polygon.attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { createPathFromPoints, getNodeClasses } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function choice<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { nodeStyles } = styles2String(node);\n  node.label = '';\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', getNodeClasses(node))\n    .attr('id', node.domId ?? node.id);\n  const { cssStyles } = node;\n\n  const s = Math.max(28, node.width ?? 0);\n\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  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const choicePath = createPathFromPoints(points);\n  const roughNode = rc.path(choicePath, options);\n  const choiceShape = shapeSvg.insert(() => roughNode, ':first-child');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    choiceShape.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    choiceShape.selectAll('path').attr('style', nodeStyles);\n  }\n\n  node.width = 28;\n  node.height = 28;\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport type { Bounds, D3Selection, Point } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\nimport type { MindmapOptions, Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';\n\nexport async function circle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  options?: MindmapOptions | ShapeRenderOptions\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { shapeSvg, bbox, halfPadding } = await labelHelper(parent, node, getNodeClasses(node));\n\n  // Calculate radius based on look type\n  const labelPadding = 16;\n  const padding = options?.padding ?? halfPadding;\n  const radius = node.look === 'neo' ? bbox.width / 2 + labelPadding * 2 : bbox.width / 2 + padding;\n\n  let circleElem;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const roughNode = rc.circle(0, 0, radius * 2, options);\n\n    circleElem = shapeSvg.insert(() => roughNode, ':first-child');\n    circleElem.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n  } else {\n    circleElem = shapeSvg\n      .insert('circle', ':first-child')\n      .attr('class', 'basic label-container')\n      .attr('style', nodeStyles)\n      .attr('r', radius)\n      .attr('cx', 0)\n      .attr('cy', 0);\n  }\n\n  updateNodeBounds(node, circleElem);\n  node.calcIntersect = function (bounds: Bounds, point: Point) {\n    const radius = bounds.width / 2;\n    return intersect.circle(bounds, radius, point);\n  };\n  node.intersect = function (point) {\n    log.info('Circle intersect', node, radius, point);\n    return intersect.circle(node, radius, point);\n  };\n\n  return shapeSvg;\n}\n","import { log } from '../../../logger.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nfunction createLine(r: number) {\n  const xAxis45 = Math.cos(Math.PI / 4); // cosine of 45 degrees\n  const yAxis45 = Math.sin(Math.PI / 4); // sine of 45 degrees\n  const lineLength = r * 2;\n\n  const pointQ1 = { x: (lineLength / 2) * xAxis45, y: (lineLength / 2) * yAxis45 }; // Quadrant I\n  const pointQ2 = { x: -(lineLength / 2) * xAxis45, y: (lineLength / 2) * yAxis45 }; // Quadrant II\n  const pointQ3 = { x: -(lineLength / 2) * xAxis45, y: -(lineLength / 2) * yAxis45 }; // Quadrant III\n  const pointQ4 = { x: (lineLength / 2) * xAxis45, y: -(lineLength / 2) * yAxis45 }; // Quadrant IV\n\n  return `M ${pointQ2.x},${pointQ2.y} L ${pointQ4.x},${pointQ4.y}\n                   M ${pointQ1.x},${pointQ1.y} L ${pointQ3.x},${pointQ3.y}`;\n}\n\nexport function crossedCircle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  node.label = '';\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', getNodeClasses(node))\n    .attr('id', node.domId ?? node.id);\n  const radius = Math.max(30, node?.width ?? 0);\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const circleNode = rc.circle(0, 0, radius * 2, options);\n  const linePath = createLine(radius);\n  const lineNode = rc.path(linePath, options);\n\n  const crossedCircle = shapeSvg.insert(() => circleNode, ':first-child');\n  crossedCircle.insert(() => lineNode);\n  crossedCircle.attr('class', 'outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    crossedCircle.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    crossedCircle.selectAll('path').attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, crossedCircle);\n\n  node.intersect = function (point) {\n    log.info('crossedCircle intersect', node, { radius, point });\n    const pos = intersect.circle(node, radius, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n  centerX: number,\n  centerY: number,\n  radius: number,\n  numPoints = 100,\n  startAngle = 0,\n  endAngle = 180\n) {\n  const points = [];\n\n  // Convert angles to radians\n  const startAngleRad = (startAngle * Math.PI) / 180;\n  const endAngleRad = (endAngle * Math.PI) / 180;\n\n  // Calculate the angle range in radians\n  const angleRange = endAngleRad - startAngleRad;\n\n  // Calculate the angle step\n  const angleStep = angleRange / (numPoints - 1);\n\n  for (let i = 0; i < numPoints; i++) {\n    const angle = startAngleRad + i * angleStep;\n    const x = centerX + radius * Math.cos(angle);\n    const y = centerY + radius * Math.sin(angle);\n    points.push({ x: -x, y: -y });\n  }\n\n  return points;\n}\n\nexport async function curlyBraceLeft<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const paddingX = node.look === 'neo' ? 18 : (node.padding ?? 0);\n  const paddingY = node.look === 'neo' ? 12 : (node.padding ?? 0);\n  const w = bbox.width + paddingX;\n  const h = bbox.height + paddingY;\n  const radius = Math.max(5, h * 0.1);\n  const { cssStyles } = node;\n\n  const points = [\n    ...generateCirclePoints(w / 2, -h / 2, radius, 30, -90, 0),\n    { x: -w / 2 - radius, y: radius },\n    ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n    ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n    { x: -w / 2 - radius, y: -h / 2 },\n    ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n  ];\n\n  const rectPoints = [\n    { x: w / 2, y: -h / 2 - radius },\n    { x: -w / 2, y: -h / 2 - radius },\n    ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n    { x: -w / 2 - radius, y: -radius },\n    ...generateCirclePoints(w / 2 + w * 0.1, -radius, radius, 20, -180, -270),\n    ...generateCirclePoints(w / 2 + w * 0.1, radius, radius, 20, -90, -180),\n    { x: -w / 2 - radius, y: h / 2 },\n    ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n    { x: -w / 2, y: h / 2 + radius },\n    { x: w / 2, y: h / 2 + radius },\n  ];\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, { fill: 'none' });\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const curlyBraceLeftPath = createPathFromPoints(points);\n  const newCurlyBracePath = curlyBraceLeftPath.replace('Z', '');\n  const curlyBraceLeftNode = rc.path(newCurlyBracePath, options);\n  const rectPath = createPathFromPoints(rectPoints);\n  const rectShape = rc.path(rectPath, { ...options });\n  const curlyBraceLeftShape = shapeSvg.insert('g', ':first-child');\n  curlyBraceLeftShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n  curlyBraceLeftShape.insert(() => curlyBraceLeftNode, ':first-child');\n  curlyBraceLeftShape.attr('class', 'text');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    curlyBraceLeftShape.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    curlyBraceLeftShape.selectAll('path').attr('style', nodeStyles);\n  }\n\n  curlyBraceLeftShape.attr('transform', `translate(${radius}, 0)`);\n\n  label.attr(\n    'transform',\n    `translate(${-w / 2 + radius - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, curlyBraceLeftShape);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, rectPoints, point);\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n  centerX: number,\n  centerY: number,\n  radius: number,\n  numPoints = 100,\n  startAngle = 0,\n  endAngle = 180\n) {\n  const points = [];\n\n  // Convert angles to radians\n  const startAngleRad = (startAngle * Math.PI) / 180;\n  const endAngleRad = (endAngle * Math.PI) / 180;\n\n  // Calculate the angle range in radians\n  const angleRange = endAngleRad - startAngleRad;\n\n  // Calculate the angle step\n  const angleStep = angleRange / (numPoints - 1);\n\n  for (let i = 0; i < numPoints; i++) {\n    const angle = startAngleRad + i * angleStep;\n    const x = centerX + radius * Math.cos(angle);\n    const y = centerY + radius * Math.sin(angle);\n    points.push({ x, y });\n  }\n\n  return points;\n}\n\nexport async function curlyBraceRight<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const labelPaddingX = node.look === 'neo' ? 18 : (node.padding ?? 0);\n  const labelPaddingY = node.look === 'neo' ? 12 : (node.padding ?? 0);\n  const w = bbox.width + (node.look === 'neo' ? labelPaddingX * 2 : labelPaddingX);\n  const h = bbox.height + (node.look === 'neo' ? labelPaddingY * 2 : labelPaddingY);\n  const radius = Math.max(5, h * 0.1);\n\n  const { cssStyles } = node;\n\n  const points = [\n    ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n    { x: w / 2 + radius, y: -radius },\n    ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n    ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n    { x: w / 2 + radius, y: h / 2 },\n    ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n  ];\n\n  const rectPoints = [\n    { x: -w / 2, y: -h / 2 - radius },\n    { x: w / 2, y: -h / 2 - radius },\n    ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n    { x: w / 2 + radius, y: -radius },\n    ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n    ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n    { x: w / 2 + radius, y: h / 2 },\n    ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n    { x: w / 2, y: h / 2 + radius },\n    { x: -w / 2, y: h / 2 + radius },\n  ];\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, { fill: 'none' });\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const curlyBraceRightPath = createPathFromPoints(points);\n  const newCurlyBracePath = curlyBraceRightPath.replace('Z', '');\n  const curlyBraceRightNode = rc.path(newCurlyBracePath, options);\n  const rectPath = createPathFromPoints(rectPoints);\n  const rectShape = rc.path(rectPath, { ...options });\n  const curlyBraceRightShape = shapeSvg.insert('g', ':first-child');\n  curlyBraceRightShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n  curlyBraceRightShape.insert(() => curlyBraceRightNode, ':first-child');\n  curlyBraceRightShape.attr('class', 'text');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    curlyBraceRightShape.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    curlyBraceRightShape.selectAll('path').attr('style', nodeStyles);\n  }\n\n  curlyBraceRightShape.attr('transform', `translate(${-radius}, 0)`);\n\n  label.attr(\n    'transform',\n    `translate(${-w / 2 + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, curlyBraceRightShape);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, rectPoints, point);\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nfunction generateCirclePoints(\n  centerX: number,\n  centerY: number,\n  radius: number,\n  numPoints = 100,\n  startAngle = 0,\n  endAngle = 180\n) {\n  const points = [];\n\n  // Convert angles to radians\n  const startAngleRad = (startAngle * Math.PI) / 180;\n  const endAngleRad = (endAngle * Math.PI) / 180;\n\n  // Calculate the angle range in radians\n  const angleRange = endAngleRad - startAngleRad;\n\n  // Calculate the angle step\n  const angleStep = angleRange / (numPoints - 1);\n\n  for (let i = 0; i < numPoints; i++) {\n    const angle = startAngleRad + i * angleStep;\n    const x = centerX + radius * Math.cos(angle);\n    const y = centerY + radius * Math.sin(angle);\n    points.push({ x: -x, y: -y });\n  }\n\n  return points;\n}\n\nexport async function curlyBraces<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const labelPaddingX = node.look === 'neo' ? 18 : (node.padding ?? 0);\n  const labelPaddingY = node.look === 'neo' ? 12 : (node.padding ?? 0);\n  const w = bbox.width + (node.look === 'neo' ? labelPaddingX * 2 : labelPaddingX);\n  const h = bbox.height + (node.look === 'neo' ? labelPaddingY * 2 : labelPaddingY);\n  const radius = Math.max(5, h * 0.1);\n  const { cssStyles } = node;\n\n  const leftCurlyBracePoints = [\n    ...generateCirclePoints(w / 2, -h / 2, radius, 30, -90, 0),\n    { x: -w / 2 - radius, y: radius },\n    ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n    ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n    { x: -w / 2 - radius, y: -h / 2 },\n    ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n  ];\n\n  const rightCurlyBracePoints = [\n    ...generateCirclePoints(-w / 2 + radius + radius / 2, -h / 2, radius, 20, -90, -180),\n    { x: w / 2 - radius / 2, y: radius },\n    ...generateCirclePoints(-w / 2 - radius / 2, -radius, radius, 20, 0, 90),\n    ...generateCirclePoints(-w / 2 - radius / 2, radius, radius, 20, -90, 0),\n    { x: w / 2 - radius / 2, y: -radius },\n    ...generateCirclePoints(-w / 2 + radius + radius / 2, h / 2, radius, 30, -180, -270),\n  ];\n\n  const rectPoints = [\n    { x: w / 2, y: -h / 2 - radius },\n    { x: -w / 2, y: -h / 2 - radius },\n    ...generateCirclePoints(w / 2, -h / 2, radius, 20, -90, 0),\n    { x: -w / 2 - radius, y: -radius },\n    ...generateCirclePoints(w / 2 + radius * 2, -radius, radius, 20, -180, -270),\n    ...generateCirclePoints(w / 2 + radius * 2, radius, radius, 20, -90, -180),\n    { x: -w / 2 - radius, y: h / 2 },\n    ...generateCirclePoints(w / 2, h / 2, radius, 20, 0, 90),\n    { x: -w / 2, y: h / 2 + radius },\n    { x: w / 2 - radius - radius / 2, y: h / 2 + radius },\n    ...generateCirclePoints(-w / 2 + radius + radius / 2, -h / 2, radius, 20, -90, -180),\n    { x: w / 2 - radius / 2, y: radius },\n    ...generateCirclePoints(-w / 2 - radius / 2, -radius, radius, 20, 0, 90),\n    ...generateCirclePoints(-w / 2 - radius / 2, radius, radius, 20, -90, 0),\n    { x: w / 2 - radius / 2, y: -radius },\n    ...generateCirclePoints(-w / 2 + radius + radius / 2, h / 2, radius, 30, -180, -270),\n  ];\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, { fill: 'none' });\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const leftCurlyBracePath = createPathFromPoints(leftCurlyBracePoints);\n  const newLeftCurlyBracePath = leftCurlyBracePath.replace('Z', '');\n  const leftCurlyBraceNode = rc.path(newLeftCurlyBracePath, options);\n  const rightCurlyBracePath = createPathFromPoints(rightCurlyBracePoints);\n  const newRightCurlyBracePath = rightCurlyBracePath.replace('Z', '');\n  const rightCurlyBraceNode = rc.path(newRightCurlyBracePath, options);\n  const rectPath = createPathFromPoints(rectPoints);\n  const rectShape = rc.path(rectPath, { ...options });\n  const curlyBracesShape = shapeSvg.insert('g', ':first-child');\n  curlyBracesShape.insert(() => rectShape, ':first-child').attr('stroke-opacity', 0);\n  curlyBracesShape.insert(() => leftCurlyBraceNode, ':first-child');\n  curlyBracesShape.insert(() => rightCurlyBraceNode, ':first-child');\n  curlyBracesShape.attr('class', 'text');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    curlyBracesShape.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    curlyBracesShape.selectAll('path').attr('style', nodeStyles);\n  }\n\n  curlyBracesShape.attr('transform', `translate(${radius - radius / 4}, 0)`);\n\n  label.attr(\n    'transform',\n    `translate(${-w / 2 + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, curlyBracesShape);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, rectPoints, point);\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import {\n  labelHelper,\n  updateNodeBounds,\n  getNodeClasses,\n  createPathFromPoints,\n  generateCirclePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function curvedTrapezoid<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n  const minWidth = 20,\n    minHeight = 5;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n  const w = Math.max(minWidth, (bbox.width + labelPaddingX * 2) * 1.25, node?.width ?? 0);\n  const h = Math.max(minHeight, bbox.height + labelPaddingY * 2, node?.height ?? 0);\n  const radius = h / 2;\n\n  const { cssStyles } = node;\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const totalWidth = w,\n    totalHeight = h;\n  const rw = totalWidth - radius;\n  const tw = totalHeight / 4;\n\n  const points = [\n    { x: rw, y: 0 },\n    { x: tw, y: 0 },\n    { x: 0, y: totalHeight / 2 },\n    { x: tw, y: totalHeight },\n    { x: rw, y: totalHeight },\n    ...generateCirclePoints(-rw, -totalHeight / 2, radius, 50, 270, 90),\n  ];\n\n  const pathData = createPathFromPoints(points);\n  const shapeNode = rc.path(pathData, options);\n\n  const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n  polygon.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', nodeStyles);\n  }\n\n  polygon.attr('transform', `translate(${-w / 2}, ${-h / 2})`);\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number\n): string => {\n  return [\n    `M${x},${y + ry}`,\n    `a${rx},${ry} 0,0,0 ${width},0`,\n    `a${rx},${ry} 0,0,0 ${-width},0`,\n    `l0,${height}`,\n    `a${rx},${ry} 0,0,0 ${width},0`,\n    `l0,${-height}`,\n  ].join(' ');\n};\nexport const createOuterCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number\n): string => {\n  return [\n    `M${x},${y + ry}`,\n    `M${x + width},${y + ry}`,\n    `a${rx},${ry} 0,0,0 ${-width},0`,\n    `l0,${height}`,\n    `a${rx},${ry} 0,0,0 ${width},0`,\n    `l0,${-height}`,\n  ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number\n): string => {\n  return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(' ');\n};\n\nconst MIN_HEIGHT = 8;\nconst MIN_WIDTH = 8;\n\nexport async function cylinder<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 24 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 24 : nodePadding;\n\n  if (node.width || node.height) {\n    const originalWidth = node.width ?? 0;\n    node.width = (node.width ?? 0) - labelPaddingY;\n    if (node.width < MIN_WIDTH) {\n      node.width = MIN_WIDTH;\n    }\n\n    const rx = originalWidth / 2;\n    const ry = rx / (2.5 + originalWidth / 50);\n    node.height = (node.height ?? 0) - labelPaddingX - ry * 3;\n\n    if (node.height < MIN_HEIGHT) {\n      node.height = MIN_HEIGHT;\n    }\n  }\n\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = (node.width ? node.width : bbox.width) + labelPaddingY;\n  const rx = w / 2;\n  const ry = rx / (2.5 + w / 50);\n  const h = (node.height ? node.height : bbox.height) + labelPaddingX + ry;\n\n  let cylinder: D3Selection<SVGPathElement> | D3Selection<SVGGElement>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry);\n    const innerPathData = createInnerCylinderPathD(0, ry, w, h, rx, ry);\n    const options = userNodeOverrides(node, {});\n    const outerNode = rc.path(outerPathData, options);\n    const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: 'none' }));\n\n    cylinder = shapeSvg.insert(() => innerLine, ':first-child');\n    cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n    cylinder.attr('class', 'basic label-container');\n    if (cssStyles) {\n      cylinder.attr('style', cssStyles);\n    }\n  } else {\n    const pathData = createCylinderPathD(0, 0, w, h, rx, ry);\n    cylinder = shapeSvg\n      .insert('path', ':first-child')\n      .attr('d', pathData)\n      .attr('class', 'basic label-container outer-path')\n      .attr('style', handleUndefinedAttr(cssStyles))\n      .attr('style', nodeStyles);\n  }\n\n  cylinder.attr('label-offset-y', ry);\n  cylinder.attr('transform', `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n\n  updateNodeBounds(node, cylinder);\n\n  label.attr(\n    'transform',\n    `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + (node.padding ?? 0) / 1.5 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  node.intersect = function (point) {\n    const pos = intersect.rect(node, point);\n    const x = pos.x - (node.x ?? 0);\n\n    if (\n      rx != 0 &&\n      (Math.abs(x) < (node.width ?? 0) / 2 ||\n        (Math.abs(x) == (node.width ?? 0) / 2 &&\n          Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry))\n    ) {\n      let y = ry * ry * (1 - (x * x) / (rx * rx));\n      if (y > 0) {\n        y = Math.sqrt(y);\n      }\n      y = ry - y;\n      if (point.y - (node.y ?? 0) > 0) {\n        y = -y;\n      }\n\n      pos.y += y;\n    }\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node, RectOptions } from '../../types.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { userNodeOverrides, styles2String } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\nimport type { Bounds, Point } from '../../../types.js';\n\nexport async function drawRect<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  options: RectOptions\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  // console.log('IPI labelStyles:', labelStyles);\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const totalWidth = Math.max(bbox.width + options.labelPaddingX * 2, node?.width || 0);\n  const totalHeight = Math.max(bbox.height + options.labelPaddingY * 2, node?.height || 0);\n  const x = -totalWidth / 2;\n  const y = -totalHeight / 2;\n\n  // log.info('IPI node = ', node);\n\n  let rect;\n  let { rx, ry } = node;\n  const { cssStyles } = node;\n\n  //use options rx, ry overrides if present\n  if (options?.rx && options.ry) {\n    rx = options.rx;\n    ry = options.ry;\n  }\n\n  if (node.look === 'handDrawn') {\n    // @ts-ignore TODO: Fix rough typings\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n\n    const roughNode =\n      rx || ry\n        ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options)\n        : rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n    rect = shapeSvg.insert(() => roughNode, ':first-child');\n    rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n  } else {\n    rect = shapeSvg.insert('rect', ':first-child');\n\n    rect\n      .attr('class', 'basic label-container')\n      .attr('style', nodeStyles)\n      .attr('rx', handleUndefinedAttr(rx))\n      .attr('ry', handleUndefinedAttr(ry))\n      .attr('x', x)\n      .attr('y', y)\n      .attr('width', totalWidth)\n      .attr('height', totalHeight);\n  }\n\n  updateNodeBounds(node, rect);\n\n  node.calcIntersect = function (bounds: Bounds, point: Point) {\n    return intersect.rect(bounds, point);\n  };\n\n  node.intersect = function (point) {\n    return intersect.rect(node, point);\n  };\n\n  return shapeSvg;\n}\n","import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\nimport { userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\n\nexport async function datastore<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { cssClasses, labelPaddingX, labelPaddingY, padding, width, height } = node;\n\n  const rectOptions: RectOptions = {\n    rx: 0,\n    ry: 0,\n    classes: cssClasses ?? '',\n    labelPaddingX: labelPaddingX ?? (padding ?? 0) * 2,\n    labelPaddingY: labelPaddingY ?? padding ?? 0,\n  };\n\n  const rect = await drawRect(parent, node, rectOptions);\n\n  if (node.look === 'handDrawn') {\n    // @ts-ignore TODO: Fix rough typings\n    const rc = rough.svg(rect);\n    const nodeOverrideOptions = userNodeOverrides(node, {});\n\n    const borderSelection = rect.select('.basic.label-container > path:nth-child(2)');\n    const borderPath = borderSelection.node();\n    if (!borderPath) {\n      return rect;\n    }\n\n    let bbox: DOMRect | null = null;\n    if (borderPath instanceof SVGGraphicsElement) {\n      bbox = borderPath.getBBox();\n    } else {\n      return rect;\n    }\n\n    rect.insert(\n      () => rc.line(bbox.x, bbox.y, bbox.x + bbox.width, bbox.y, nodeOverrideOptions),\n      '.basic.label-container g.label'\n    );\n    rect.insert(\n      () =>\n        rc.line(\n          bbox.x,\n          bbox.y + bbox.height,\n          bbox.x + bbox.width,\n          bbox.y + bbox.height,\n          nodeOverrideOptions\n        ),\n      '.basic.label-container g.label'\n    );\n    borderSelection.remove();\n    return rect;\n  }\n\n  const selection = rect.select('.basic.label-container');\n  const datastoreWidth = (Number(selection.attr('width')) || width) ?? 0;\n  const datastoreHeight = (Number(selection.attr('height')) || height) ?? 0;\n  if (datastoreWidth > 0 && datastoreHeight > 0) {\n    selection.attr('stroke-dasharray', `${datastoreWidth} ${datastoreHeight}`);\n  }\n\n  return rect;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function dividedRectangle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const paddingX = node.look === 'neo' ? 16 : (node.padding ?? 0);\n  const paddingY = node.look === 'neo' ? 16 : (node.padding ?? 0);\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const w = bbox.width + paddingX;\n  const h = bbox.height + paddingY;\n  const rectOffset = h * 0.2;\n\n  const x = -w / 2;\n  const y = -h / 2 - rectOffset / 2;\n\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const pts = [\n    { x, y: y + rectOffset },\n    { x: -x, y: y + rectOffset },\n    { x: -x, y: -y },\n    { x, y: -y },\n    { x, y },\n    { x: -x, y },\n    { x: -x, y: y + rectOffset },\n  ];\n\n  const poly = rc.polygon(\n    pts.map((p) => [p.x, p.y]),\n    options\n  );\n\n  const polygon = shapeSvg.insert(() => poly, ':first-child');\n  polygon.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectAll('path').attr('style', nodeStyles);\n  }\n\n  label.attr(\n    'transform',\n    `translate(${x + (node.padding ?? 0) / 2 - (bbox.x - (bbox.left ?? 0))}, ${y + rectOffset + (node.padding ?? 0) / 2 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    const pos = intersect.rect(node, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport async function doublecircle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  const gap = node.look === 'neo' ? 12 : 5;\n  node.labelStyle = labelStyles;\n  const padding = node.padding ?? 0;\n  const labelPadding = node.look === 'neo' ? 16 : padding;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n  const outerRadius = (node?.width ? node?.width / 2 : bbox.width / 2) + (labelPadding ?? 0);\n  const innerRadius = outerRadius - gap;\n\n  let circleGroup;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const outerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 2.5 });\n\n    const innerOptions = userNodeOverrides(node, { roughness: 0.2, strokeWidth: 1.5 });\n    const outerRoughNode = rc.circle(0, 0, outerRadius * 2, outerOptions);\n    const innerRoughNode = rc.circle(0, 0, innerRadius * 2, innerOptions);\n\n    circleGroup = shapeSvg.insert('g', ':first-child');\n    // circleGroup = circleGroup.insert(() => outerRoughNode, ':first-child');\n    circleGroup\n      .attr('class', handleUndefinedAttr(node.cssClasses))\n      .attr('style', handleUndefinedAttr(cssStyles));\n\n    circleGroup.node()?.appendChild(outerRoughNode);\n    circleGroup.node()?.appendChild(innerRoughNode);\n  } else {\n    circleGroup = shapeSvg.insert('g', ':first-child');\n\n    const outerCircle = circleGroup.insert('circle', ':first-child');\n    const innerCircle = circleGroup.insert('circle');\n    circleGroup.attr('class', 'basic label-container').attr('style', nodeStyles);\n\n    outerCircle\n      .attr('class', 'outer-circle')\n      .attr('style', nodeStyles)\n      .attr('r', outerRadius)\n      .attr('cx', 0)\n      .attr('cy', 0);\n\n    innerCircle\n      .attr('class', 'inner-circle')\n      .attr('style', nodeStyles)\n      .attr('r', innerRadius)\n      .attr('cx', 0)\n      .attr('cy', 0);\n  }\n\n  updateNodeBounds(node, circleGroup);\n\n  node.intersect = function (point) {\n    log.info('DoubleCircle intersect', node, outerRadius, point);\n    return intersect.circle(node, outerRadius, point);\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function filledCircle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables } }: ShapeRenderOptions\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.label = '';\n  node.labelStyle = labelStyles;\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', getNodeClasses(node))\n    .attr('id', node.domId ?? node.id);\n  const radius = 7;\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const { nodeBorder } = themeVariables;\n  const options = userNodeOverrides(node, { fillStyle: 'solid' });\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n  }\n\n  const circleNode = rc.circle(0, 0, radius * 2, options);\n\n  const filledCircle = shapeSvg.insert(() => circleNode, ':first-child');\n\n  filledCircle.selectAll('path').attr('style', `fill: ${nodeBorder} !important;`);\n\n  if (cssStyles && cssStyles.length > 0 && node.look !== 'handDrawn') {\n    filledCircle.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    filledCircle.selectAll('path').attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, filledCircle);\n\n  node.intersect = function (point) {\n    log.info('filledCircle intersect', node, { radius, point });\n    const pos = intersect.circle(node, radius, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nconst MIN_HEIGHT = 10;\nconst MIN_WIDTH = 10;\nexport async function flippedTriangle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;\n  if (node.width || node.height) {\n    node.height = node?.height ?? 0;\n    if (node.height < MIN_HEIGHT) {\n      node.height = MIN_HEIGHT;\n    }\n\n    node.width = (node?.width ?? 0) - labelPaddingX - labelPaddingX / 2;\n    if (node.width < MIN_WIDTH) {\n      node.width = MIN_WIDTH;\n    }\n  }\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = (node?.width ? node?.width : bbox.width) + (labelPaddingX ?? 0);\n  const h = node?.height ? node?.height : w + bbox.height;\n\n  const tw = h;\n\n  const points = [\n    { x: 0, y: -h },\n    { x: tw, y: -h },\n    { x: tw / 2, y: 0 },\n  ];\n\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const pathData = createPathFromPoints(points);\n  const roughNode = rc.path(pathData, options);\n\n  const flippedTriangle = shapeSvg\n    .insert(() => roughNode, ':first-child')\n    .attr('transform', `translate(${-h / 2}, ${h / 2})`)\n    .attr('class', 'outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    flippedTriangle.selectChildren('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    flippedTriangle.selectChildren('path').attr('style', nodeStyles);\n  }\n\n  node.width = w;\n  node.height = h;\n\n  updateNodeBounds(node, flippedTriangle);\n\n  label.attr(\n    'transform',\n    `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (node.padding ?? 0) / 2 + (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  node.intersect = function (point) {\n    log.info('Triangle intersect', node, points, point);\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function forkJoin<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { dir, config: { state, themeVariables } }: ShapeRenderOptions\n) {\n  const { nodeStyles } = styles2String(node);\n  node.label = '';\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', getNodeClasses(node))\n    .attr('id', node.domId ?? node.id);\n\n  const { cssStyles } = node;\n  let width = Math.max(70, node?.width ?? 0);\n  let height = Math.max(10, node?.height ?? 0);\n\n  if (dir === 'LR') {\n    width = Math.max(10, node?.width ?? 0);\n    height = Math.max(70, node?.height ?? 0);\n  }\n\n  const x = (-1 * width) / 2;\n  const y = (-1 * height) / 2;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {\n    stroke: themeVariables.lineColor,\n    fill: themeVariables.lineColor,\n  });\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const roughNode = rc.rectangle(x, y, width, height, options);\n\n  const shape = shapeSvg.insert(() => roughNode, ':first-child');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    shape.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    shape.selectAll('path').attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, shape);\n  const padding = state?.padding ?? 0;\n  if (node.width && node.height) {\n    node.width += padding / 2 || 0;\n    node.height += padding / 2 || 0;\n  }\n  node.intersect = function (point) {\n    return intersect.rect(node, point);\n  };\n  return shapeSvg;\n}\n","import { log } from '../../../logger.js';\nimport {\n  labelHelper,\n  updateNodeBounds,\n  getNodeClasses,\n  createPathFromPoints,\n  generateCirclePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function halfRoundedRectangle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const minWidth = 15,\n    minHeight = 10;\n\n  const paddingX = node.look === 'neo' ? 16 : (node.padding ?? 0);\n  const paddingY = node.look === 'neo' ? 12 : (node.padding ?? 0);\n\n  if (node.width || node.height) {\n    node.height = (node?.height ?? 0) - paddingY * 2;\n    if (node.height < minHeight) {\n      node.height = minHeight;\n    }\n\n    node.width = (node?.width ?? 0) - paddingX * 2;\n    if (node.width < minWidth) {\n      node.width = minWidth;\n    }\n  }\n\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = (node?.width ? node?.width : Math.max(minWidth, bbox.width)) + paddingX * 2;\n  const h = (node?.height ? node?.height : Math.max(minHeight, bbox.height)) + paddingY * 2;\n  const radius = h / 2;\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x: -w / 2, y: -h / 2 },\n    { x: w / 2 - radius, y: -h / 2 },\n    ...generateCirclePoints(-w / 2 + radius, 0, radius, 50, 90, 270),\n    { x: w / 2 - radius, y: h / 2 },\n    { x: -w / 2, y: h / 2 },\n  ];\n\n  const pathData = createPathFromPoints(points);\n  const shapeNode = rc.path(pathData, options);\n  const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n  polygon.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', nodeStyles);\n  }\n\n  // label.attr(\n  //   'transform',\n  //   `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))}, ${-h / 2 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n  // );\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    log.info('Pill intersect', node, { radius, point });\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport const createHexagonPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  m: number\n): string => {\n  return [\n    `M${x + m},${y}`,\n    `L${x + width - m},${y}`,\n    `L${x + width},${y - height / 2}`,\n    `L${x + width - m},${y - height}`,\n    `L${x + m},${y - height}`,\n    `L${x},${y - height / 2}`,\n    'Z',\n  ].join(' ');\n};\n\nexport async function hexagon<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  const f = node.look === 'neo' ? 3.5 : 4;\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const wa = 70;\n  const ha = 32;\n\n  const labelPaddingX = node.look === 'neo' ? wa : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? ha : nodePadding;\n  if (node.width || node.height) {\n    const originalHeight = node.height ?? 0;\n    const m = originalHeight / f;\n    node.width = (node?.width ?? 0) - 2 * m - labelPaddingY;\n    node.height = (node.height ?? 0) - labelPaddingX;\n  }\n\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const h = (node?.height ? node?.height : bbox.height) + labelPaddingX;\n  const m = h / f;\n\n  const w = (node?.width ? node?.width : bbox.width) + 2 * m + labelPaddingY;\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  let polygon: D3Selection<SVGGElement> | Awaited<ReturnType<typeof insertPolygonShape>>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const pathData = createHexagonPathD(0, 0, w, h, m);\n    const roughNode = rc.path(pathData, options);\n\n    polygon = shapeSvg\n      .insert(() => roughNode, ':first-child')\n      .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n    if (cssStyles) {\n      polygon.attr('style', cssStyles);\n    }\n  } else {\n    polygon = insertPolygonShape(shapeSvg, w, h, points);\n  }\n\n  if (nodeStyles) {\n    polygon.attr('style', nodeStyles);\n  }\n\n  node.width = w;\n  node.height = h;\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function hourglass<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.label = '';\n  node.labelStyle = labelStyles;\n  const { shapeSvg } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = Math.max(30, node?.width ?? 0);\n  const h = Math.max(30, node?.height ?? 0);\n\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x: 0, y: 0 },\n    { x: w, y: 0 },\n    { x: 0, y: h },\n    { x: w, y: h },\n  ];\n\n  const pathData = createPathFromPoints(points);\n  const shapeNode = rc.path(pathData, options);\n  const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n  polygon.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', nodeStyles);\n  }\n\n  polygon.attr('transform', `translate(${-w / 2}, ${-h / 2})`);\n\n  updateNodeBounds(node, polygon);\n\n  // label.attr('transform', `translate(${-bbox.width / 2}, ${(h/2)})`); // To transform text below hourglass shape\n\n  node.intersect = function (point) {\n    log.info('Pill intersect', node, { points });\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function icon<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n  const { labelStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const assetHeight = node.assetHeight ?? 48;\n  const assetWidth = node.assetWidth ?? 48;\n  const iconSize = Math.max(assetHeight, assetWidth);\n  const defaultWidth = flowchart?.wrappingWidth;\n  node.width = Math.max(iconSize, defaultWidth ?? 0);\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'icon-shape default');\n\n  const topLabel = node.pos === 't';\n\n  const height = iconSize;\n  const width = iconSize;\n  const { nodeBorder } = themeVariables;\n  const { stylesMap } = compileStyles(node);\n\n  const x = -width / 2;\n  const y = -height / 2;\n\n  const labelPadding = node.label ? 8 : 0;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, { stroke: 'none', fill: 'none' });\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const iconNode = rc.rectangle(x, y, width, height, options);\n\n  const outerWidth = Math.max(width, bbox.width);\n  const outerHeight = height + bbox.height + labelPadding;\n\n  const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n    ...options,\n    fill: 'transparent',\n    stroke: 'none',\n  });\n\n  const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n  const outerShape = shapeSvg.insert(() => outerNode);\n\n  if (node.icon) {\n    const iconElem = shapeSvg.append('g');\n    iconElem.html(\n      `<g>${await getIconSVG(node.icon, {\n        height: iconSize,\n        width: iconSize,\n        fallbackPrefix: '',\n      })}</g>`\n    );\n    const iconBBox = iconElem.node()!.getBBox();\n    const iconWidth = iconBBox.width;\n    const iconHeight = iconBBox.height;\n    const iconX = iconBBox.x;\n    const iconY = iconBBox.y;\n    iconElem.attr(\n      'transform',\n      `translate(${-iconWidth / 2 - iconX},${\n        topLabel\n          ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n          : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n      })`\n    );\n    iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n  }\n\n  label.attr(\n    'transform',\n    `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n      topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n    })`\n  );\n\n  iconShape.attr(\n    'transform',\n    `translate(${0},${\n      topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n    })`\n  );\n\n  updateNodeBounds(node, outerShape);\n\n  node.intersect = function (point) {\n    log.info('iconSquare intersect', node, point);\n    if (!node.label) {\n      return intersect.rect(node, point);\n    }\n    const dx = node.x ?? 0;\n    const dy = node.y ?? 0;\n    const nodeHeight = node.height ?? 0;\n    let points = [];\n    if (topLabel) {\n      points = [\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx + width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n      ];\n    } else {\n      points = [\n        { x: dx - width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n        { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n      ];\n    }\n\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconCircle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n  const { labelStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const assetHeight = node.assetHeight ?? 48;\n  const assetWidth = node.assetWidth ?? 48;\n  const iconSize = Math.max(assetHeight, assetWidth);\n  const defaultWidth = flowchart?.wrappingWidth;\n  node.width = Math.max(iconSize, defaultWidth ?? 0);\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'icon-shape default');\n\n  const padding = 20;\n  const labelPadding = node.label ? 8 : 0;\n\n  const topLabel = node.pos === 't';\n\n  const { nodeBorder, mainBkg } = themeVariables;\n  const { stylesMap } = compileStyles(node);\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const fill = stylesMap.get('fill');\n  options.stroke = fill ?? mainBkg;\n\n  const iconElem = shapeSvg.append('g');\n  if (node.icon) {\n    iconElem.html(\n      `<g>${await getIconSVG(node.icon, {\n        height: iconSize,\n        width: iconSize,\n        fallbackPrefix: '',\n      })}</g>`\n    );\n  }\n  const iconBBox = iconElem.node()!.getBBox();\n  const iconWidth = iconBBox.width;\n  const iconHeight = iconBBox.height;\n  const iconX = iconBBox.x;\n  const iconY = iconBBox.y;\n\n  const diameter = Math.max(iconWidth, iconHeight) * Math.SQRT2 + padding * 2;\n  const iconNode = rc.circle(0, 0, diameter, options);\n\n  const outerWidth = Math.max(diameter, bbox.width);\n  const outerHeight = diameter + bbox.height + labelPadding;\n\n  const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n    ...options,\n    fill: 'transparent',\n    stroke: 'none',\n  });\n\n  const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n  const outerShape = shapeSvg.insert(() => outerNode);\n  iconElem.attr(\n    'transform',\n    `translate(${-iconWidth / 2 - iconX},${\n      topLabel\n        ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n        : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n    })`\n  );\n  iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n  label.attr(\n    'transform',\n    `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n      topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n    })`\n  );\n\n  iconShape.attr(\n    'transform',\n    `translate(${0},${\n      topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n    })`\n  );\n\n  updateNodeBounds(node, outerShape);\n\n  node.intersect = function (point) {\n    log.info('iconSquare intersect', node, point);\n    const pos = intersect.rect(node, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconRounded<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n  const { labelStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const assetHeight = node.assetHeight ?? 48;\n  const assetWidth = node.assetWidth ?? 48;\n  const iconSize = Math.max(assetHeight, assetWidth);\n  const defaultWidth = flowchart?.wrappingWidth;\n  node.width = Math.max(iconSize, defaultWidth ?? 0);\n  const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n    parent,\n    node,\n    'icon-shape default'\n  );\n\n  const topLabel = node.pos === 't';\n\n  const height = iconSize + halfPadding * 2;\n  const width = iconSize + halfPadding * 2;\n  const { nodeBorder, mainBkg } = themeVariables;\n  const { stylesMap } = compileStyles(node);\n\n  const x = -width / 2;\n  const y = -height / 2;\n\n  const labelPadding = node.label ? 8 : 0;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const fill = stylesMap.get('fill');\n  options.stroke = fill ?? mainBkg;\n\n  const iconNode = rc.path(createRoundedRectPathD(x, y, width, height, 5), options);\n\n  const outerWidth = Math.max(width, bbox.width);\n  const outerHeight = height + bbox.height + labelPadding;\n\n  const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n    ...options,\n    fill: 'transparent',\n    stroke: 'none',\n  });\n\n  const iconShape = shapeSvg.insert(() => iconNode, ':first-child').attr('class', 'icon-shape2');\n  const outerShape = shapeSvg.insert(() => outerNode);\n\n  if (node.icon) {\n    const iconElem = shapeSvg.append('g');\n    iconElem.html(\n      `<g>${await getIconSVG(node.icon, {\n        height: iconSize,\n        width: iconSize,\n        fallbackPrefix: '',\n      })}</g>`\n    );\n    const iconBBox = iconElem.node()!.getBBox();\n    const iconWidth = iconBBox.width;\n    const iconHeight = iconBBox.height;\n    const iconX = iconBBox.x;\n    const iconY = iconBBox.y;\n    iconElem.attr(\n      'transform',\n      `translate(${-iconWidth / 2 - iconX},${\n        topLabel\n          ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n          : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n      })`\n    );\n    iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n  }\n\n  label.attr(\n    'transform',\n    `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n      topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n    })`\n  );\n\n  iconShape.attr(\n    'transform',\n    `translate(${0},${\n      topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n    })`\n  );\n\n  updateNodeBounds(node, outerShape);\n\n  node.intersect = function (point) {\n    log.info('iconSquare intersect', node, point);\n    if (!node.label) {\n      return intersect.rect(node, point);\n    }\n    const dx = node.x ?? 0;\n    const dy = node.y ?? 0;\n    const nodeHeight = node.height ?? 0;\n    let points = [];\n    if (topLabel) {\n      points = [\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx + width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n      ];\n    } else {\n      points = [\n        { x: dx - width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n        { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n      ];\n    }\n\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport { getIconSVG } from '../../icons.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { compileStyles, styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function iconSquare<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables, flowchart } }: ShapeRenderOptions\n) {\n  const { labelStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const assetHeight = node.assetHeight ?? 48;\n  const assetWidth = node.assetWidth ?? 48;\n  const iconSize = Math.max(assetHeight, assetWidth);\n  const defaultWidth = flowchart?.wrappingWidth;\n  node.width = Math.max(iconSize, defaultWidth ?? 0);\n  const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n    parent,\n    node,\n    'icon-shape default'\n  );\n\n  const topLabel = node.pos === 't';\n\n  const height = iconSize + halfPadding * 2;\n  const width = iconSize + halfPadding * 2;\n  const { nodeBorder, mainBkg } = themeVariables;\n  const { stylesMap } = compileStyles(node);\n\n  const x = -width / 2;\n  const y = -height / 2;\n\n  const labelPadding = node.label ? 8 : 0;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const fill = stylesMap.get('fill');\n  options.stroke = fill ?? mainBkg;\n\n  const iconNode = rc.path(createRoundedRectPathD(x, y, width, height, 0.1), options);\n\n  const outerWidth = Math.max(width, bbox.width);\n  const outerHeight = height + bbox.height + labelPadding;\n\n  const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n    ...options,\n    fill: 'transparent',\n    stroke: 'none',\n  });\n\n  const iconShape = shapeSvg.insert(() => iconNode, ':first-child');\n  const outerShape = shapeSvg.insert(() => outerNode);\n\n  if (node.icon) {\n    const iconElem = shapeSvg.append('g');\n    iconElem.html(\n      `<g>${await getIconSVG(node.icon, {\n        height: iconSize,\n        width: iconSize,\n        fallbackPrefix: '',\n      })}</g>`\n    );\n    const iconBBox = iconElem.node()!.getBBox();\n    const iconWidth = iconBBox.width;\n    const iconHeight = iconBBox.height;\n    const iconX = iconBBox.x;\n    const iconY = iconBBox.y;\n    iconElem.attr(\n      'transform',\n      `translate(${-iconWidth / 2 - iconX},${\n        topLabel\n          ? bbox.height / 2 + labelPadding / 2 - iconHeight / 2 - iconY\n          : -bbox.height / 2 - labelPadding / 2 - iconHeight / 2 - iconY\n      })`\n    );\n    iconElem.attr('style', `color: ${stylesMap.get('stroke') ?? nodeBorder};`);\n  }\n\n  label.attr(\n    'transform',\n    `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n      topLabel ? -outerHeight / 2 : outerHeight / 2 - bbox.height\n    })`\n  );\n\n  iconShape.attr(\n    'transform',\n    `translate(${0},${\n      topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n    })`\n  );\n\n  updateNodeBounds(node, outerShape);\n\n  node.intersect = function (point) {\n    log.info('iconSquare intersect', node, point);\n    if (!node.label) {\n      return intersect.rect(node, point);\n    }\n    const dx = node.x ?? 0;\n    const dy = node.y ?? 0;\n    const nodeHeight = node.height ?? 0;\n    let points = [];\n    if (topLabel) {\n      points = [\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx + width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n      ];\n    } else {\n      points = [\n        { x: dx - width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n        { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + height },\n        { x: dx - width / 2, y: dy - nodeHeight / 2 + height },\n      ];\n    }\n\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function imageSquare<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { flowchart } }: ShapeRenderOptions\n) {\n  const img = new Image();\n  img.src = node?.img ?? '';\n  await img.decode();\n\n  const imageNaturalWidth = Number(img.naturalWidth.toString().replace('px', ''));\n  const imageNaturalHeight = Number(img.naturalHeight.toString().replace('px', ''));\n  node.imageAspectRatio = imageNaturalWidth / imageNaturalHeight;\n\n  const { labelStyles } = styles2String(node);\n\n  node.labelStyle = labelStyles;\n\n  const defaultWidth = flowchart?.wrappingWidth;\n  node.defaultWidth = flowchart?.wrappingWidth;\n\n  const imageRawWidth = Math.max(\n    node.label ? (defaultWidth ?? 0) : 0,\n    node?.assetWidth ?? imageNaturalWidth\n  );\n\n  const imageWidth =\n    node.constraint === 'on'\n      ? node?.assetHeight\n        ? node.assetHeight * node.imageAspectRatio\n        : imageRawWidth\n      : imageRawWidth;\n\n  const imageHeight =\n    node.constraint === 'on'\n      ? imageWidth / node.imageAspectRatio\n      : (node?.assetHeight ?? imageNaturalHeight);\n  node.width = Math.max(imageWidth, defaultWidth ?? 0);\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'image-shape default');\n\n  const topLabel = node.pos === 't';\n\n  const x = -imageWidth / 2;\n  const y = -imageHeight / 2;\n\n  const labelPadding = node.label ? 8 : 0;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const imageNode = rc.rectangle(x, y, imageWidth, imageHeight, options);\n\n  const outerWidth = Math.max(imageWidth, bbox.width);\n  const outerHeight = imageHeight + bbox.height + labelPadding;\n\n  const outerNode = rc.rectangle(-outerWidth / 2, -outerHeight / 2, outerWidth, outerHeight, {\n    ...options,\n    fill: 'none',\n    stroke: 'none',\n  });\n\n  const iconShape = shapeSvg.insert(() => imageNode, ':first-child');\n  const outerShape = shapeSvg.insert(() => outerNode);\n\n  if (node.img) {\n    const image = shapeSvg.append('image');\n\n    // Set the image attributes\n    image.attr('href', node.img);\n    image.attr('width', imageWidth);\n    image.attr('height', imageHeight);\n    image.attr('preserveAspectRatio', 'none');\n\n    image.attr(\n      'transform',\n      `translate(${-imageWidth / 2},${topLabel ? outerHeight / 2 - imageHeight : -outerHeight / 2})`\n    );\n  }\n\n  label.attr(\n    'transform',\n    `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))},${\n      topLabel\n        ? -imageHeight / 2 - bbox.height / 2 - labelPadding / 2\n        : imageHeight / 2 - bbox.height / 2 + labelPadding / 2\n    })`\n  );\n\n  iconShape.attr(\n    'transform',\n    `translate(${0},${\n      topLabel ? bbox.height / 2 + labelPadding / 2 : -bbox.height / 2 - labelPadding / 2\n    })`\n  );\n\n  updateNodeBounds(node, outerShape);\n\n  node.intersect = function (point) {\n    log.info('iconSquare intersect', node, point);\n    if (!node.label) {\n      return intersect.rect(node, point);\n    }\n    const dx = node.x ?? 0;\n    const dy = node.y ?? 0;\n    const nodeHeight = node.height ?? 0;\n    let points = [];\n    if (topLabel) {\n      points = [\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx + imageWidth / 2, y: dy + nodeHeight / 2 },\n        { x: dx - imageWidth / 2, y: dy + nodeHeight / 2 },\n        { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + bbox.height + labelPadding },\n      ];\n    } else {\n      points = [\n        { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 },\n        { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 },\n        { x: dx + imageWidth / 2, y: dy - nodeHeight / 2 + imageHeight },\n        { x: dx + bbox.width / 2, y: dy - nodeHeight / 2 + imageHeight },\n        { x: dx + bbox.width / 2 / 2, y: dy + nodeHeight / 2 },\n        { x: dx - bbox.width / 2, y: dy + nodeHeight / 2 },\n        { x: dx - bbox.width / 2, y: dy - nodeHeight / 2 + imageHeight },\n        { x: dx - imageWidth / 2, y: dy - nodeHeight / 2 + imageHeight },\n      ];\n    }\n\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function inv_trapezoid<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingY = nodePadding;\n  const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = Math.max(bbox.width + (labelPaddingX ?? 0) * 2, node?.width ?? 0);\n  const h = Math.max(bbox.height + (labelPaddingY ?? 0) * 2, node?.height ?? 0);\n\n  const points = [\n    { x: 0, y: 0 },\n    { x: w, y: 0 },\n    { x: w + (3 * h) / 6, y: -h },\n    { x: (-3 * h) / 6, y: -h },\n  ];\n\n  let polygon: typeof shapeSvg | ReturnType<typeof insertPolygonShape>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const pathData = createPathFromPoints(points);\n    // const pathData = createInvertedTrapezoidPathD(0, 0, w, h);\n    const roughNode = rc.path(pathData, options);\n\n    polygon = shapeSvg\n      .insert(() => roughNode, ':first-child')\n      .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n    if (cssStyles) {\n      polygon.attr('style', cssStyles);\n    }\n  } else {\n    polygon = insertPolygonShape(shapeSvg, w, h, points);\n  }\n\n  if (nodeStyles) {\n    polygon.attr('style', nodeStyles);\n  }\n\n  node.width = w;\n  node.height = h;\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import type { Node, RectOptions } from '../../types.js';\nimport { drawRect } from './drawRect.js';\nimport { labelHelper, updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function roundedRect<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const options = {\n    rx: 5,\n    ry: 5,\n    classes: '',\n    labelPaddingX: (node?.padding || 0) * 1,\n    labelPaddingY: (node?.padding || 0) * 1,\n  } as RectOptions;\n\n  return drawRect(parent, node, options);\n}\n\nexport async function labelRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, 'label');\n\n  // log.trace('Classes = ', node.class);\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.1;\n  const totalHeight = 0.1;\n  rect.attr('width', totalWidth).attr('height', totalHeight);\n  shapeSvg.attr('class', 'label edgeLabel');\n  label.attr(\n    'transform',\n    `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  // if (node.props) {\n  //   const propKeys = new Set(Object.keys(node.props));\n  //   if (node.props.borders) {\n  //     applyNodePropertyBorders(rect, node.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  // node.width = 1;\n  // node.height = 1;\n\n  node.intersect = function (point) {\n    return intersect.rect(node, point);\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function lean_left<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingY = nodePadding;\n  const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n  const h = (node?.height ?? bbox.height) + labelPaddingY;\n  const w = (node?.width ?? bbox.width) + labelPaddingX;\n  const points = [\n    { x: 0, y: 0 },\n    { x: w + (3 * h) / 6, y: 0 },\n    { x: w, y: -h },\n    { x: -(3 * h) / 6, y: -h },\n  ];\n\n  let polygon: typeof shapeSvg | ReturnType<typeof insertPolygonShape>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const pathData = createPathFromPoints(points);\n    // const pathData = createLeanLeftPathD(0, 0, w, h);\n    const roughNode = rc.path(pathData, options);\n\n    polygon = shapeSvg\n      .insert(() => roughNode, ':first-child')\n      .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n    if (cssStyles) {\n      polygon.attr('style', cssStyles);\n    }\n  } else {\n    polygon = insertPolygonShape(shapeSvg, w, h, points);\n  }\n\n  if (nodeStyles) {\n    polygon.attr('style', nodeStyles);\n  }\n\n  node.width = w;\n  node.height = h;\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function lean_right<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingY = nodePadding;\n  const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n  const h = (node?.height ?? bbox.height) + labelPaddingY;\n  const w = (node?.width ?? bbox.width) + labelPaddingX;\n\n  const points = [\n    { x: (-3 * h) / 6, y: 0 },\n    { x: w, y: 0 },\n    { x: w + (3 * h) / 6, y: -h },\n    { x: 0, y: -h },\n  ];\n\n  let polygon: typeof shapeSvg | ReturnType<typeof insertPolygonShape>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const pathData = createPathFromPoints(points);\n    const roughNode = rc.path(pathData, options);\n\n    polygon = shapeSvg\n      .insert(() => roughNode, ':first-child')\n      .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n    if (cssStyles) {\n      polygon.attr('style', cssStyles);\n    }\n  } else {\n    polygon = insertPolygonShape(shapeSvg, w, h, points);\n  }\n\n  if (nodeStyles) {\n    polygon.attr('style', nodeStyles);\n  }\n\n  node.width = w;\n  node.height = h;\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import { log } from '../../../logger.js';\nimport { getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport { createPathFromPoints } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function lightningBolt<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.label = '';\n  node.labelStyle = labelStyles;\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', getNodeClasses(node))\n    .attr('id', node.domId ?? node.id);\n  const { cssStyles } = node;\n  const width = Math.max(35, node?.width ?? 0);\n  const height = Math.max(35, node?.height ?? 0);\n  const gap = 7;\n\n  const points = [\n    { x: width, y: 0 },\n    { x: 0, y: height + gap / 2 },\n    { x: width - 2 * gap, y: height + gap / 2 },\n    { x: 0, y: 2 * height },\n    { x: width, y: height - gap / 2 },\n    { x: 2 * gap, y: height - gap / 2 },\n  ];\n\n  // @ts-expect-error shapeSvg d3 class is incorrect?\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const linePath = createPathFromPoints(points);\n  const lineNode = rc.path(linePath, options);\n\n  const lightningBolt = shapeSvg.insert(() => lineNode, ':first-child');\n  lightningBolt.attr('class', 'outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    lightningBolt.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    lightningBolt.selectAll('path').attr('style', nodeStyles);\n  }\n\n  lightningBolt.attr('transform', `translate(-${width / 2},${-height})`);\n\n  updateNodeBounds(node, lightningBolt);\n\n  node.intersect = function (point) {\n    log.info('lightningBolt intersect', node, point);\n    const pos = intersect.polygon(node, points, point);\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number,\n  outerOffset: number\n): string => {\n  return [\n    `M${x},${y + ry}`,\n    `a${rx},${ry} 0,0,0 ${width},0`,\n    `a${rx},${ry} 0,0,0 ${-width},0`,\n    `l0,${height}`,\n    `a${rx},${ry} 0,0,0 ${width},0`,\n    `l0,${-height}`,\n    `M${x},${y + ry + outerOffset}`,\n    `a${rx},${ry} 0,0,0 ${width},0`,\n  ].join(' ');\n};\nexport const createOuterCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number,\n  outerOffset: number\n): string => {\n  return [\n    `M${x},${y + ry}`,\n    `M${x + width},${y + ry}`,\n    `a${rx},${ry} 0,0,0 ${-width},0`,\n    `l0,${height}`,\n    `a${rx},${ry} 0,0,0 ${width},0`,\n    `l0,${-height}`,\n    `M${x},${y + ry + outerOffset}`,\n    `a${rx},${ry} 0,0,0 ${width},0`,\n  ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number\n): string => {\n  return [`M${x - width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 ${width},0`].join(' ');\n};\n\nconst MIN_HEIGHT = 10;\nconst MIN_WIDTH = 10;\n\nexport async function linedCylinder<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 24 : nodePadding;\n\n  if (node.width || node.height) {\n    const originalWidth = node.width ?? 0;\n    node.width = (node.width ?? 0) - labelPaddingX;\n    if (node.width < MIN_WIDTH) {\n      node.width = MIN_WIDTH;\n    }\n\n    const rx = originalWidth / 2;\n\n    // based on this width, height is calculated\n    const ry = rx / (2.5 + originalWidth / 50);\n    node.height = (node.height ?? 0) - labelPaddingY - ry * 3;\n    if (node.height < MIN_HEIGHT) {\n      node.height = MIN_HEIGHT;\n    }\n  }\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;\n  const rx = w / 2;\n  const ry = rx / (2.5 + w / 50);\n  const h = (node?.height ? node?.height : bbox.height) + ry + labelPaddingY * 2;\n  const outerOffset = h * 0.1; // 10% of height\n\n  let cylinder: typeof shapeSvg | D3Selection<SVGPathElement>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry, outerOffset);\n    const innerPathData = createInnerCylinderPathD(0, ry, w, h, rx, ry);\n    const options = userNodeOverrides(node, {});\n\n    const outerNode = rc.path(outerPathData, options);\n    const innerLine = rc.path(innerPathData, options);\n\n    const innerLineEl = shapeSvg.insert(() => innerLine, ':first-child');\n    innerLineEl.attr('class', 'line');\n    cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n    cylinder.attr('class', 'basic label-container');\n    if (cssStyles) {\n      cylinder.attr('style', cssStyles);\n    }\n  } else {\n    const pathData = createCylinderPathD(0, 0, w, h, rx, ry, outerOffset);\n    cylinder = shapeSvg\n      .insert('path', ':first-child')\n      .attr('d', pathData)\n      .attr('class', 'basic label-container outer-path')\n      .attr('style', handleUndefinedAttr(cssStyles))\n      .attr('style', nodeStyles);\n  }\n\n  // find label and move it down\n  cylinder.attr('label-offset-y', ry);\n  cylinder.attr('transform', `translate(${-w / 2}, ${-(h / 2 + ry)})`);\n\n  updateNodeBounds(node, cylinder);\n\n  label.attr(\n    'transform',\n    `translate(${-(bbox.width / 2) - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + ry - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  node.intersect = function (point) {\n    const pos = intersect.rect(node, point);\n    const x = pos.x - (node.x ?? 0);\n\n    if (\n      rx != 0 &&\n      (Math.abs(x) < (node.width ?? 0) / 2 ||\n        (Math.abs(x) == (node.width ?? 0) / 2 &&\n          Math.abs(pos.y - (node.y ?? 0)) > (node.height ?? 0) / 2 - ry))\n    ) {\n      let y = ry * ry * (1 - (x * x) / (rx * rx));\n      if (y > 0) {\n        y = Math.sqrt(y);\n      }\n      y = ry - y;\n      if (point.y - (node.y ?? 0) > 0) {\n        y = -y;\n      }\n\n      pos.y += y;\n    }\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import {\n  labelHelper,\n  updateNodeBounds,\n  getNodeClasses,\n  generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function linedWaveEdgedRect<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n  if (node.width || node.height) {\n    const originalWidth = node.width;\n    node.width = ((originalWidth ?? 0) * 10) / 11 - labelPaddingX * 2;\n    if (node.width < 10) {\n      node.width = 10;\n    }\n    node.height = (node?.height ?? 0) - labelPaddingY * 2;\n    if (node.height < 10) {\n      node.height = 10;\n    }\n  }\n\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const w = (node?.width ? node?.width : bbox.width) + (labelPaddingX ?? 0) * 2;\n  const h = (node?.height ? node?.height : bbox.height) + (labelPaddingY ?? 0) * 2;\n  const waveAmplitude = node.look === 'neo' ? h / 4 : h / 8;\n  const finalH = h + waveAmplitude;\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n    { x: -w / 2 - (w / 2) * 0.1, y: finalH / 2 },\n    ...generateFullSineWavePoints(\n      -w / 2 - (w / 2) * 0.1,\n      finalH / 2,\n      w / 2 + (w / 2) * 0.1,\n      finalH / 2,\n      waveAmplitude,\n      0.8\n    ),\n    { x: w / 2 + (w / 2) * 0.1, y: -finalH / 2 },\n    { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n    { x: -w / 2, y: -finalH / 2 },\n    { x: -w / 2, y: (finalH / 2) * 1.1 },\n    { x: -w / 2, y: -finalH / 2 },\n  ];\n\n  const poly = rc.polygon(\n    points.map((p) => [p.x, p.y]),\n    options\n  );\n\n  const waveEdgeRect = shapeSvg.insert(() => poly, ':first-child');\n\n  waveEdgeRect.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    waveEdgeRect.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n  label.attr(\n    'transform',\n    `translate(${-w / 2 + (node.padding ?? 0) + ((w / 2) * 0.1) / 2 - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, waveEdgeRect);\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import {\n  labelHelper,\n  getNodeClasses,\n  updateNodeBounds,\n  createPathFromPoints,\n  mergePaths,\n} from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function multiRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n  const rectOffset = node.look === 'neo' ? 10 : 5;\n\n  // If incoming height & width are present, subtract the padding from them\n  // as labelHelper does not take padding into account\n  // also check if the width or height is less than minimum default values (50),\n  // if so set it to min value\n  if (node.width || node.height) {\n    node.width = Math.max((node?.width ?? 0) - labelPaddingX * 2 - 2 * rectOffset, 10);\n    node.height = Math.max((node?.height ?? 0) - labelPaddingY * 2 - 2 * rectOffset, 10);\n  }\n\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const totalWidth = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2 + 2 * rectOffset;\n  const totalHeight =\n    (node?.height ? node?.height : bbox.height) + labelPaddingY * 2 + 2 * rectOffset;\n\n  const w = totalWidth - 2 * rectOffset;\n  const h = totalHeight - 2 * rectOffset;\n\n  const x = -w / 2;\n  const y = -h / 2;\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  const outerPathPoints = [\n    { x: x - rectOffset, y: y + rectOffset },\n    { x: x - rectOffset, y: y + h + rectOffset },\n    { x: x + w - rectOffset, y: y + h + rectOffset },\n    { x: x + w - rectOffset, y: y + h },\n    { x: x + w, y: y + h },\n    { x: x + w, y: y + h - rectOffset },\n    { x: x + w + rectOffset, y: y + h - rectOffset },\n    { x: x + w + rectOffset, y: y - rectOffset },\n    { x: x + rectOffset, y: y - rectOffset },\n    { x: x + rectOffset, y: y },\n    { x, y },\n    { x, y: y + rectOffset },\n  ];\n\n  const innerPathPoints = [\n    { x, y: y + rectOffset },\n    { x: x + w - rectOffset, y: y + rectOffset },\n    { x: x + w - rectOffset, y: y + h },\n    { x: x + w, y: y + h },\n    { x: x + w, y },\n    { x, y },\n  ];\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const outerPath = createPathFromPoints(outerPathPoints);\n  let outerNode = rc.path(outerPath, options);\n  const innerPath = createPathFromPoints(innerPathPoints);\n  let innerNode = rc.path(innerPath, options);\n\n  if (node.look !== 'handDrawn') {\n    outerNode = mergePaths(outerNode);\n    innerNode = mergePaths(innerNode);\n  }\n\n  const multiRect = shapeSvg.insert('g', ':first-child');\n  multiRect.insert(() => outerNode);\n  multiRect.insert(() => innerNode);\n\n  multiRect.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    multiRect.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    multiRect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  label.attr(\n    'transform',\n    `translate(${-(bbox.width / 2) - rectOffset - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, multiRect);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, outerPathPoints, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import {\n  labelHelper,\n  updateNodeBounds,\n  getNodeClasses,\n  createPathFromPoints,\n  generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function multiWaveEdgedRectangle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n  let adjustFinalHeight = true;\n\n  if (node.width || node.height) {\n    adjustFinalHeight = false;\n    node.width = (node?.width ?? 0) - labelPaddingX * 2;\n    node.height = (node?.height ?? 0) - labelPaddingY * 3;\n  }\n\n  const w = Math.max(bbox.width, node?.width ?? 0) + labelPaddingX * 2;\n  const h = Math.max(bbox.height, node?.height ?? 0) + labelPaddingY * 3;\n  const waveAmplitude = node.look === 'neo' ? h / 4 : h / 8;\n  const finalH = h + (adjustFinalHeight ? waveAmplitude / 2 : -waveAmplitude / 2);\n  const x = -w / 2;\n  const y = -finalH / 2;\n  const rectOffset = 10;\n\n  const { cssStyles } = node;\n\n  const wavePoints = generateFullSineWavePoints(\n    x - rectOffset,\n    y + finalH + rectOffset,\n    x + w - rectOffset,\n    y + finalH + rectOffset,\n    waveAmplitude,\n    0.8\n  );\n\n  const lastWavePoint = wavePoints?.[wavePoints.length - 1];\n\n  const outerPathPoints = [\n    { x: x - rectOffset, y: y + rectOffset },\n    { x: x - rectOffset, y: y + finalH + rectOffset },\n    ...wavePoints,\n    { x: x + w - rectOffset, y: lastWavePoint.y - rectOffset },\n    { x: x + w, y: lastWavePoint.y - rectOffset },\n    { x: x + w, y: lastWavePoint.y - 2 * rectOffset },\n    { x: x + w + rectOffset, y: lastWavePoint.y - 2 * rectOffset },\n    { x: x + w + rectOffset, y: y - rectOffset },\n    { x: x + rectOffset, y: y - rectOffset },\n    { x: x + rectOffset, y: y },\n    { x, y },\n    { x, y: y + rectOffset },\n  ];\n\n  const innerPathPoints = [\n    { x, y: y + rectOffset },\n    { x: x + w - rectOffset, y: y + rectOffset },\n    { x: x + w - rectOffset, y: lastWavePoint.y - rectOffset },\n    { x: x + w, y: lastWavePoint.y - rectOffset },\n    { x: x + w, y },\n    { x, y },\n  ];\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const outerPath = createPathFromPoints(outerPathPoints);\n  const outerNode = rc.path(outerPath, options);\n  const innerPath = createPathFromPoints(innerPathPoints);\n  const innerNode = rc.path(innerPath, options);\n\n  const shape = shapeSvg.insert(() => outerNode, ':first-child');\n  shape.insert(() => innerNode);\n\n  shape.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    shape.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    shape.selectAll('path').attr('style', nodeStyles);\n  }\n\n  shape.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n\n  label.attr(\n    'transform',\n    `translate(${-(bbox.width / 2) - rectOffset - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, shape);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, outerPathPoints, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\nimport { getConfig } from '../../../config.js';\nimport { getEffectiveHtmlLabels } from '../../../config.js';\n\nexport async function note<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables } }: ShapeRenderOptions\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const useHtmlLabels = node.useHtmlLabels || getEffectiveHtmlLabels(getConfig());\n  if (!useHtmlLabels) {\n    node.centerLabel = true;\n  }\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const totalWidth = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n  const totalHeight = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n  const x = -totalWidth / 2;\n  const y = -totalHeight / 2;\n  const { cssStyles } = node;\n\n  // add the rect\n  // @ts-ignore TODO: Fix rough typings\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {\n    fill: themeVariables.noteBkgColor,\n    stroke: themeVariables.noteBorderColor,\n  });\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const noteShapeNode = rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n  const rect = shapeSvg.insert(() => noteShapeNode, ':first-child');\n  rect.attr('class', 'basic label-container outer-path');\n  label.attr('class', 'label noteLabel');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    rect.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    rect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  label.attr(\n    'transform',\n    `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\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","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\nimport type { Bounds, Point } from '../../../types.js';\n\nexport const createDecisionBoxPathD = (x: number, y: number, size: number): string => {\n  return [\n    `M${x + size / 2},${y}`,\n    `L${x + size},${y - size / 2}`,\n    `L${x + size / 2},${y - size}`,\n    `L${x},${y - size / 2}`,\n    'Z',\n  ].join(' ');\n};\n\nexport async function question<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = bbox.width + (node.padding ?? 0);\n  const h = bbox.height + (node.padding ?? 0);\n  const s = w + h;\n  const adjustment = 0.5;\n\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  let polygon: typeof shapeSvg | ReturnType<typeof insertPolygonShape>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const pathData = createDecisionBoxPathD(0, 0, s);\n    const roughNode = rc.path(pathData, options);\n\n    polygon = shapeSvg\n      .insert(() => roughNode, ':first-child')\n      .attr('transform', `translate(${-s / 2 + adjustment}, ${s / 2})`);\n\n    if (cssStyles) {\n      polygon.attr('style', cssStyles);\n    }\n  } else {\n    polygon = insertPolygonShape(shapeSvg, s, s, points);\n    polygon.attr('transform', `translate(${-s / 2 + adjustment}, ${s / 2})`);\n  }\n\n  if (nodeStyles) {\n    polygon.attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, polygon);\n  node.calcIntersect = function (bounds: Bounds, point: Point) {\n    const s = bounds.width;\n\n    // Define polygon points\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    // Calculate the intersection point\n    const res = intersect.polygon(bounds, points, point);\n\n    return { x: res.x - 0.5, y: res.y - 0.5 }; // Adjusted result\n  };\n\n  node.intersect = function (point) {\n    // @ts-ignore TODO fix this (KNSV)\n    return this.calcIntersect(node as Bounds, point);\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function rect_left_inv_arrow<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 21 : (nodePadding ?? 0);\n  const labelPaddingY = node.look === 'neo' ? 12 : (nodePadding ?? 0);\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = (node?.width ?? bbox.width) + (node.look === 'neo' ? labelPaddingX * 2 : labelPaddingX);\n  const h =\n    (node?.height ?? bbox.height) + (node.look === 'neo' ? labelPaddingY * 2 : labelPaddingY);\n\n  const x = -w / 2;\n  const y = -h / 2;\n  const notch = y / 2;\n\n  const points = [\n    { x: x + notch, y },\n    { x: x, y: 0 },\n    { x: x + notch, y: -y },\n    { x: -x, y: -y },\n    { x: -x, y },\n  ];\n\n  const { cssStyles } = node;\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const pathData = createPathFromPoints(points);\n  const roughNode = rc.path(pathData, options);\n\n  const polygon = shapeSvg.insert(() => roughNode, ':first-child');\n\n  polygon.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectAll('path').attr('style', cssStyles);\n  }\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectAll('path').attr('style', nodeStyles);\n  }\n\n  polygon.attr('transform', `translate(${-notch / 2},0)`);\n\n  label.attr(\n    'transform',\n    `translate(${-notch / 2 - bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n  );\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import type { Node } from '../../types.js';\nimport { select } from 'd3';\nimport { updateNodeBounds } from './util.js';\nimport createLabel from '../createLabel.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { log } from '../../../logger.js';\nimport type { D3Selection } from '../../../types.js';\nimport { getEffectiveHtmlLabels } from '../../../config.js';\n\nexport async function rectWithTitle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  let classes;\n  if (!node.cssClasses) {\n    classes = 'node default';\n  } else {\n    classes = 'node ' + node.cssClasses;\n  }\n\n  // Add outer g element\n  const shapeSvg = parent\n    // @ts-ignore - d3 typings are not correct\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 g = shapeSvg.insert('g');\n\n  const label = shapeSvg.insert('g').attr('class', 'label').attr('style', nodeStyles);\n\n  const description = node.description;\n\n  const title = node.label;\n\n  const text = await createLabel(label, title, node.labelStyle, true, true);\n  let bbox = { width: 0, height: 0 };\n  if (getEffectiveHtmlLabels(getConfig())) {\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', description);\n  const textRows = description || [];\n  const titleBox = text.getBBox();\n  const descr = await createLabel(\n    label,\n    Array.isArray(textRows) ? textRows.join('<br/>') : textRows,\n    node.labelStyle,\n    true,\n    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\n  const halfPadding = (node.padding || 0) / 2;\n  select(descr).attr(\n    'transform',\n    'translate( ' +\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      (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  const totalWidth = bbox.width + (node.padding || 0);\n  const totalHeight = bbox.height + (node.padding || 0);\n  const x = -bbox.width / 2 - halfPadding;\n  const y = -bbox.height / 2 - halfPadding;\n  let rect;\n  let innerLine;\n  if (node.look === 'handDrawn') {\n    // @ts-ignore No typings for rough\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const roughNode = rc.path(\n      createRoundedRectPathD(x, y, totalWidth, totalHeight, node.rx || 0),\n      options\n    );\n\n    const roughLine = rc.line(\n      -bbox.width / 2 - halfPadding,\n      -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n      bbox.width / 2 + halfPadding,\n      -bbox.height / 2 - halfPadding + titleBox.height + halfPadding,\n      options\n    );\n\n    innerLine = shapeSvg.insert(() => {\n      log.debug('Rough node insert CXC', roughNode);\n      return roughLine;\n    }, ':first-child');\n    rect = shapeSvg.insert(() => {\n      log.debug('Rough node insert CXC', roughNode);\n      return roughNode;\n    }, ':first-child');\n  } else {\n    rect = g.insert('rect', ':first-child');\n    innerLine = g.insert('line');\n    rect\n      .attr('class', 'outer title-state')\n      .attr('style', nodeStyles)\n      .attr('x', -bbox.width / 2 - halfPadding)\n      .attr('y', -bbox.height / 2 - halfPadding)\n      .attr('width', bbox.width + (node.padding || 0))\n      .attr('height', bbox.height + (node.padding || 0));\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","import type { Node, RectOptions, ShapeRenderOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function roundedRect<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables } }: ShapeRenderOptions\n) {\n  const radius = themeVariables?.radius ?? 5;\n\n  const options = {\n    rx: radius,\n    ry: radius,\n    classes: '',\n    labelPaddingX: (node?.padding ?? 0) * 1,\n    labelPaddingY: (node?.padding ?? 0) * 1,\n  } as RectOptions;\n\n  return drawRect(parent, node, options);\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\n/// Width of the frame on the left of the shape\nconst FRAME_WIDTH = 8;\n\nexport async function shadedProcess<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const paddingX = node.look === 'neo' ? 16 : (node.padding ?? 0);\n  const paddingY = node.look === 'neo' ? 12 : (node.padding ?? 0);\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const totalWidth =\n    (node?.width ?? bbox.width) +\n    paddingX * 2 +\n    (node.look === 'neo' ? FRAME_WIDTH : FRAME_WIDTH * 2);\n  const totalHeight = (node?.height ?? bbox.height) + paddingY * 2;\n  const w = totalWidth - FRAME_WIDTH;\n  const h = totalHeight;\n  const x = FRAME_WIDTH - totalWidth / 2;\n  const y = -totalHeight / 2;\n\n  const { cssStyles } = node;\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x, y },\n    { x: x + w, y },\n    { x: x + w, y: y + h },\n    { x: x - FRAME_WIDTH, y: y + h },\n    { x: x - FRAME_WIDTH, y: y },\n    { x, y },\n    { x, y: y + h },\n  ];\n\n  const roughNode = rc.polygon(\n    points.map((p) => [p.x, p.y]),\n    options\n  );\n\n  const rect = shapeSvg.insert(() => roughNode, ':first-child');\n\n  rect\n    .attr('class', 'basic label-container outer-path')\n    .attr('style', handleUndefinedAttr(cssStyles));\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    rect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    rect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  // The inner main rect is centered at FRAME_WIDTH/2, not at 0.\n  // Shift the label right by FRAME_WIDTH/2 so it's centered inside the main rect.\n  label.attr(\n    'transform',\n    `translate(${FRAME_WIDTH / 2 - bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\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","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function slopedRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n\n  // If incoming height & width are present, subtract the padding from them\n  // as labelHelper does not take padding into account\n  // also check if the width or height is less than minimum default values (50),\n  // if so set it to min value\n  if (node.width || node.height) {\n    node.width = Math.max((node?.width ?? 0) - labelPaddingX * 2, 10);\n    node.height = Math.max((node?.height ?? 0) / 1.5 - labelPaddingY * 2, 10);\n  }\n\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const totalWidth = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;\n  const totalHeight = ((node?.height ? node?.height : bbox.height) + labelPaddingY * 2) * 1.5;\n\n  const w = totalWidth;\n  const h = totalHeight / 1.5;\n  const x = -w / 2;\n  const y = -h / 2;\n\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x, y },\n    { x, y: y + h },\n    { x: x + w, y: y + h },\n    { x: x + w, y: y - h / 2 },\n  ];\n\n  const pathData = createPathFromPoints(points);\n  const shapeNode = rc.path(pathData, options);\n\n  const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n  polygon.attr('class', 'basic label-container  outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', nodeStyles);\n  }\n\n  polygon.attr('transform', `translate(0, ${h / 4})`);\n  label.attr(\n    'transform',\n    `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))}, ${-h / 4 + (node.padding ?? 0) - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function squareRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding * 2;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n\n  const options = {\n    rx: 0,\n    ry: 0,\n    classes: '',\n    labelPaddingX: node.labelPaddingX ?? labelPaddingX,\n    labelPaddingY: labelPaddingY,\n  } as RectOptions;\n  return drawRect(parent, node, options);\n}\n","import {\n  labelHelper,\n  updateNodeBounds,\n  getNodeClasses,\n  generateCirclePoints,\n  createPathFromPoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport const createStadiumPathD = (\n  x: number,\n  y: number,\n  totalWidth: number,\n  totalHeight: number\n) => {\n  const radius = totalHeight / 2;\n  return [\n    'M',\n    x + radius,\n    y, // Move to the start of the top-left arc\n    'H',\n    x + totalWidth - radius, // Draw horizontal line to the start of the top-right arc\n    'A',\n    radius,\n    radius,\n    0,\n    0,\n    1,\n    x + totalWidth,\n    y + radius, // Draw top-right arc\n    'H',\n    x, // Draw horizontal line to the start of the bottom-right arc\n    'A',\n    radius,\n    radius,\n    0,\n    0,\n    1,\n    x + totalWidth - radius,\n    y + totalHeight, // Draw bottom-right arc\n    'H',\n    x + radius, // Draw horizontal line to the start of the bottom-left arc\n    'A',\n    radius,\n    radius,\n    0,\n    0,\n    1,\n    x,\n    y + radius, // Draw bottom-left arc\n    'Z', // Close the path\n  ].join(' ');\n};\n\nexport async function stadium<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 20 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n  const h = bbox.height + (node.look === 'neo' ? labelPaddingY * 2 : labelPaddingY);\n  const w = bbox.width + h / 4 + (node.look === 'neo' ? labelPaddingX * 2 : labelPaddingX);\n\n  const radius = h / 2;\n  const { cssStyles } = node;\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x: -w / 2 + radius, y: -h / 2 },\n    { x: w / 2 - radius, y: -h / 2 },\n    ...generateCirclePoints(-w / 2 + radius, 0, radius, 50, 90, 270),\n    { x: w / 2 - radius, y: h / 2 },\n    ...generateCirclePoints(w / 2 - radius, 0, radius, 50, 270, 450),\n  ];\n\n  const pathData = createPathFromPoints(points);\n  const shapeNode = rc.path(pathData, options);\n\n  const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n  polygon.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import type { Node, RectOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\nimport { drawRect } from './drawRect.js';\n\nexport async function state<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const options = {\n    rx: node.look === 'neo' ? 3 : 5,\n    ry: node.look === 'neo' ? 3 : 5,\n    classes: 'flowchart-node',\n  } as RectOptions;\n  return drawRect(parent, node, options);\n}\n","import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function stateEnd<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables } }: ShapeRenderOptions\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { cssStyles } = node;\n  const { lineColor, stateBorder, nodeBorder, nodeShadow } = themeVariables;\n\n  // If incoming height & width are present, subtract the padding from them\n  // as labelHelper does not take padding into account\n  // also check if the width or height is less than minimum default values (50),\n  // if so set it to min value\n  if (node.width || node.height) {\n    if ((node.width ?? 0) < 14) {\n      node.width = 14;\n    }\n\n    if ((node.height ?? 0) < 14) {\n      node.height = 14;\n    }\n  }\n\n  if (!node.width) {\n    node.width = 14;\n  }\n\n  if (!node.height) {\n    node.height = 14;\n  }\n\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', 'node default')\n    .attr('id', node.domId ?? node.id);\n\n  // @ts-ignore TODO: Fix rough typings\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const roughNode = rc.circle(0, 0, node.width, {\n    ...options,\n    stroke: lineColor,\n    strokeWidth: 2,\n  });\n  const innerFill = stateBorder ?? nodeBorder;\n  const innerNodeRadius = ((node.width ?? 0) * 5) / 14;\n  const roughInnerNode = rc.circle(0, 0, innerNodeRadius, {\n    ...options,\n    fill: innerFill,\n    stroke: innerFill,\n    strokeWidth: 2,\n    fillStyle: 'solid',\n  });\n  const circle = shapeSvg.insert(() => roughNode, ':first-child');\n  circle.insert(() => roughInnerNode);\n\n  if (node.look !== 'handDrawn') {\n    circle.attr('class', 'outer-path');\n  }\n\n  if (cssStyles) {\n    circle.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles) {\n    circle.selectAll('path').attr('style', nodeStyles);\n  }\n\n  if (node.width < 25 && nodeShadow && node.look !== 'handDrawn') {\n    const svgId = parent.node()?.ownerSVGElement?.id ?? '';\n    const filterId = svgId ? `${svgId}-drop-shadow-small` : 'drop-shadow-small';\n    circle.attr('style', `filter:url(#${filterId})`);\n  }\n\n  updateNodeBounds(node, circle);\n\n  node.intersect = function (point) {\n    return intersect.circle(node, (node.width ?? 0) / 2, point);\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport type { Node, ShapeRenderOptions } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { solidStateFill } from './handDrawnShapeStyles.js';\nimport { updateNodeBounds } from './util.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport function stateStart<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  { config: { themeVariables } }: ShapeRenderOptions\n) {\n  const { lineColor, nodeShadow } = themeVariables;\n\n  // If incoming height & width are present, subtract the padding from them\n  // as labelHelper does not take padding into account\n  // also check if the width or height is less than minimum default values (50),\n  // if so set it to min value\n  if (node.width || node.height) {\n    if ((node.width ?? 0) < 14) {\n      node.width = 14;\n    }\n\n    if ((node.height ?? 0) < 14) {\n      node.height = 14;\n    }\n  }\n\n  if (!node.width) {\n    node.width = 14;\n  }\n\n  if (!node.height) {\n    node.height = 14;\n  }\n\n  const shapeSvg = parent\n    .insert('g')\n    .attr('class', 'node default')\n    .attr('id', node.domId || node.id);\n\n  let circle: D3Selection<SVGCircleElement> | D3Selection<SVGGElement>;\n  if (node.look === 'handDrawn') {\n    // @ts-ignore TODO: Fix rough typings\n    const rc = rough.svg(shapeSvg);\n    const roughNode = rc.circle(0, 0, node.width, solidStateFill(lineColor));\n    // @ts-ignore TODO: Fix typings\n    circle = shapeSvg.insert(() => roughNode);\n    // center the circle around its coordinate\n    circle\n      .attr('class', 'state-start')\n      .attr('r', (node.width ?? 7) / 2)\n      .attr('width', node.width ?? 14)\n      .attr('height', node.height ?? 14);\n  } else {\n    circle = shapeSvg.insert('circle', ':first-child');\n    // center the circle around its coordinate\n    circle\n      .attr('class', 'state-start')\n      .attr('r', (node.width ?? 7) / 2)\n      .attr('width', node.width ?? 14)\n      .attr('height', node.height ?? 14);\n  }\n\n  if (node.width < 25 && nodeShadow && node.look !== 'handDrawn') {\n    const svgId = parent.node()?.ownerSVGElement?.id ?? '';\n    const filterId = svgId ? `${svgId}-drop-shadow-small` : 'drop-shadow-small';\n    circle.attr('style', `filter:url(#${filterId})`);\n  }\n\n  updateNodeBounds(node, circle);\n\n  node.intersect = function (point) {\n    return intersect.circle(node, (node.width ?? 7) / 2, point);\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createSubroutinePathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number\n): string => {\n  const offset = 8;\n  return [\n    `M${x - offset},${y}`,\n    `H${x + width + offset}`,\n    `V${y + height}`,\n    `H${x - offset}`,\n    `V${y}`,\n    'M',\n    x,\n    y,\n    'H',\n    x + width,\n    'V',\n    y + height,\n    'H',\n    x,\n    'Z',\n  ].join(' ');\n};\n\n// width of the frame on the left and right side of the shape\nconst FRAME_WIDTH = 8;\n\nexport async function subroutine<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const nodePadding = node?.padding ?? 8;\n  const labelPaddingX = node.look === 'neo' ? 28 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const totalWidth = (node?.width ?? bbox.width) + 2 * FRAME_WIDTH + labelPaddingX;\n  const totalHeight = (node?.height ?? bbox.height) + labelPaddingY;\n\n  const w = totalWidth - 2 * FRAME_WIDTH;\n  const h = totalHeight;\n  const x = -totalWidth / 2;\n  const y = -totalHeight / 2;\n\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  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n\n    const roughNode = rc.rectangle(x, y, w + 16, h, options);\n    const l1 = rc.line(x + FRAME_WIDTH, y, x + FRAME_WIDTH, y + h, options);\n    const l2 = rc.line(x + FRAME_WIDTH + w, y, x + FRAME_WIDTH + w, y + h, options);\n\n    shapeSvg.insert(() => l1, ':first-child');\n    shapeSvg.insert(() => l2, ':first-child');\n    const rect = shapeSvg.insert(() => roughNode, ':first-child');\n    const { cssStyles } = node;\n    rect.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n    updateNodeBounds(node, rect);\n  } else {\n    const el = insertPolygonShape(shapeSvg, w, h, points);\n    if (nodeStyles) {\n      el.attr('style', nodeStyles);\n    }\n    updateNodeBounds(node, el);\n  }\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, getNodeClasses, updateNodeBounds, createPathFromPoints } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\n/// The width/height of the tag in comparison to the height of the node\nconst TAG_RATIO = 0.2;\n\nexport async function taggedRect<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n\n  // If incoming height & width are present, subtract the padding from them\n  // as labelHelper does not take padding into account\n  // also check if the width or height is less than minimum default values (50),\n  // if so set it to min value\n  if (node.width || node.height) {\n    node.height = Math.max((node?.height ?? 0) - labelPaddingY * 2, 10);\n    node.width = Math.max(\n      (node?.width ?? 0) - labelPaddingX * 2 - TAG_RATIO * (node.height + labelPaddingY * 2),\n      10\n    );\n  }\n\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const totalHeight = (node?.height ? node?.height : bbox.height) + labelPaddingY * 2;\n  const tagWidth = TAG_RATIO * totalHeight;\n  const tagHeight = TAG_RATIO * totalHeight;\n  const totalWidth = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2 + tagWidth;\n\n  const w = totalWidth - tagWidth;\n  const h = totalHeight;\n  const x = -w / 2;\n  const y = -h / 2;\n\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  const rectPoints = [\n    { x: x - tagWidth / 2, y },\n    { x: x + w + tagWidth / 2, y },\n    { x: x + w + tagWidth / 2, y: y + h },\n    { x: x - tagWidth / 2, y: y + h },\n  ];\n\n  const tagPoints = [\n    { x: x + w - tagWidth / 2, y: y + h },\n    { x: x + w + tagWidth / 2, y: y + h },\n    { x: x + w + tagWidth / 2, y: y + h - tagHeight },\n  ];\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const rectPath = createPathFromPoints(rectPoints);\n  const rectNode = rc.path(rectPath, options);\n\n  const tagPath = createPathFromPoints(tagPoints);\n  const tagNode = rc.path(tagPath, { ...options, fillStyle: 'solid' });\n\n  const taggedRect = shapeSvg.insert(() => tagNode, ':first-child');\n  taggedRect.insert(() => rectNode, ':first-child');\n\n  taggedRect.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    taggedRect.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    taggedRect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, taggedRect);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, rectPoints, point);\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import {\n  labelHelper,\n  updateNodeBounds,\n  getNodeClasses,\n  generateFullSineWavePoints,\n  createPathFromPoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function taggedWaveEdgedRectangle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const w = Math.max(bbox.width + (node.padding ?? 0) * 2, node?.width ?? 0);\n  const h = Math.max(bbox.height + (node.padding ?? 0) * 2, node?.height ?? 0);\n  const waveAmplitude = h / 8;\n  const tagWidth = 0.2 * w;\n  const tagHeight = 0.2 * h;\n  const finalH = h + waveAmplitude;\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x: -w / 2 - (w / 2) * 0.1, y: finalH / 2 },\n    ...generateFullSineWavePoints(\n      -w / 2 - (w / 2) * 0.1,\n      finalH / 2,\n      w / 2 + (w / 2) * 0.1,\n      finalH / 2,\n      waveAmplitude,\n      0.8\n    ),\n\n    { x: w / 2 + (w / 2) * 0.1, y: -finalH / 2 },\n    { x: -w / 2 - (w / 2) * 0.1, y: -finalH / 2 },\n  ];\n\n  const x = -w / 2 + (w / 2) * 0.1;\n  const y = -finalH / 2 - tagHeight * 0.4;\n\n  const tagPoints = [\n    { x: x + w - tagWidth, y: (y + h) * 1.3 },\n    { x: x + w, y: y + h - tagHeight },\n    { x: x + w, y: (y + h) * 0.9 },\n    ...generateFullSineWavePoints(\n      x + w,\n      (y + h) * 1.25,\n      x + w - tagWidth,\n      (y + h) * 1.3,\n      -h * 0.02,\n      0.5\n    ),\n  ];\n\n  const waveEdgeRectPath = createPathFromPoints(points);\n  const waveEdgeRectNode = rc.path(waveEdgeRectPath, options);\n\n  const taggedWaveEdgeRectPath = createPathFromPoints(tagPoints);\n  const taggedWaveEdgeRectNode = rc.path(taggedWaveEdgeRectPath, {\n    ...options,\n    fillStyle: 'solid',\n  });\n\n  const waveEdgeRect = shapeSvg.insert(() => taggedWaveEdgeRectNode, ':first-child');\n  waveEdgeRect.insert(() => waveEdgeRectNode, ':first-child');\n\n  waveEdgeRect.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    waveEdgeRect.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n  label.attr(\n    'transform',\n    `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude / 2 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, waveEdgeRect);\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function text<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const totalWidth = Math.max(bbox.width + (node.padding ?? 0), node?.width || 0);\n  const totalHeight = Math.max(bbox.height + (node.padding ?? 0), node?.height || 0);\n  const x = -totalWidth / 2;\n  const y = -totalHeight / 2;\n\n  const rect = shapeSvg.insert('rect', ':first-child');\n\n  rect\n    .attr('class', 'text')\n    .attr('style', nodeStyles)\n    .attr('rx', 0)\n    .attr('ry', 0)\n    .attr('x', x)\n    .attr('y', y)\n    .attr('width', totalWidth)\n    .attr('height', totalHeight);\n\n  updateNodeBounds(node, rect);\n\n  node.intersect = function (point) {\n    return intersect.rect(node, point);\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\n\nexport const createCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number\n): string => {\n  return `M${x},${y}\n    a${rx},${ry} 0,0,1 ${0},${-height}\n    l${width},${0}\n    a${rx},${ry} 0,0,1 ${0},${height}\n    M${width},${-height}\n    a${rx},${ry} 0,0,0 ${0},${height}\n    l${-width},${0}`;\n};\n\nexport const createOuterCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number\n): string => {\n  return [\n    `M${x},${y}`,\n    `M${x + width},${y}`,\n    `a${rx},${ry} 0,0,0 ${0},${-height}`,\n    `l${-width},0`,\n    `a${rx},${ry} 0,0,0 ${0},${height}`,\n    `l${width},0`,\n  ].join(' ');\n};\nexport const createInnerCylinderPathD = (\n  x: number,\n  y: number,\n  width: number,\n  height: number,\n  rx: number,\n  ry: number\n): string => {\n  return [`M${x + width / 2},${-height / 2}`, `a${rx},${ry} 0,0,0 0,${height}`].join(' ');\n};\n\nconst MIN_HEIGHT = 5;\nconst MIN_WIDTH = 10;\n\nexport async function tiltedCylinder<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPadding = node.look === 'neo' ? 12 : nodePadding / 2;\n  if (node.width || node.height) {\n    const originalHeight = node.height ?? 0;\n    node.height = (node.height ?? 0) - labelPadding;\n    if (node.height < MIN_HEIGHT) {\n      node.height = MIN_HEIGHT;\n    }\n    const ry = originalHeight / 2;\n    // based on this height, width is calculated\n    const rx = ry / (2.5 + originalHeight / 50);\n\n    node.width = (node.width ?? 0) - labelPadding - rx * 3;\n    if (node.width < MIN_WIDTH) {\n      node.width = MIN_WIDTH;\n    }\n  }\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const h = (node.height ? node.height : bbox.height) + labelPadding;\n  const ry = h / 2;\n  const rx = ry / (2.5 + h / 50);\n  const w = (node.width ? node.width : bbox.width) + rx + labelPadding;\n  const { cssStyles } = node;\n\n  let cylinder: D3Selection<SVGGElement> | D3Selection<SVGPathElement>;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const outerPathData = createOuterCylinderPathD(0, 0, w, h, rx, ry);\n    const innerPathData = createInnerCylinderPathD(0, 0, w, h, rx, ry);\n    const outerNode = rc.path(outerPathData, userNodeOverrides(node, {}));\n    const innerLine = rc.path(innerPathData, userNodeOverrides(node, { fill: 'none' }));\n    cylinder = shapeSvg.insert(() => innerLine, ':first-child');\n    cylinder = shapeSvg.insert(() => outerNode, ':first-child');\n    cylinder.attr('class', 'basic label-container');\n    if (cssStyles) {\n      cylinder.attr('style', cssStyles);\n    }\n  } else {\n    const pathData = createCylinderPathD(0, 0, w, h, rx, ry);\n    cylinder = shapeSvg\n      .insert('path', ':first-child')\n      .attr('d', pathData)\n      .attr('class', 'basic label-container')\n      .attr('style', handleUndefinedAttr(cssStyles))\n      .attr('style', nodeStyles);\n    cylinder.attr('class', 'basic label-container outer-path');\n\n    if (cssStyles) {\n      cylinder.selectAll('path').attr('style', cssStyles);\n    }\n\n    if (nodeStyles) {\n      cylinder.selectAll('path').attr('style', nodeStyles);\n    }\n  }\n\n  cylinder.attr('label-offset-x', rx);\n  cylinder.attr('transform', `translate(${-w / 2}, ${h / 2} )`);\n\n  label.attr(\n    'transform',\n    `translate(${-(bbox.width / 2) - rx - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, cylinder);\n\n  node.intersect = function (point) {\n    const pos = intersect.rect(node, point);\n    const y = pos.y - (node.y ?? 0);\n\n    if (\n      ry != 0 &&\n      (Math.abs(y) < (node.height ?? 0) / 2 ||\n        (Math.abs(y) == (node.height ?? 0) / 2 &&\n          Math.abs(pos.x - (node.x ?? 0)) > (node.width ?? 0) / 2 - rx))\n    ) {\n      let x = rx * rx * (1 - (y * y) / (ry * ry));\n      if (x != 0) {\n        x = Math.sqrt(Math.abs(x));\n      }\n      x = rx - x;\n      if (point.x - (node.x ?? 0) > 0) {\n        x = -x;\n      }\n\n      pos.x += x;\n    }\n\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { insertPolygonShape } from './insertPolygonShape.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function trapezoid<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingY = node.look === 'neo' ? nodePadding : nodePadding;\n  const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n  const h = (node?.height ?? bbox.height) + labelPaddingY;\n  const w = (node?.width ?? bbox.width) + labelPaddingX;\n\n  const points = [\n    { x: (-3 * h) / 6, y: 0 },\n    { x: w + (3 * h) / 6, y: 0 },\n    { x: w, y: -h },\n    { x: 0, y: -h },\n  ];\n\n  let polygon: typeof shapeSvg | ReturnType<typeof insertPolygonShape>;\n  const { cssStyles } = node;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const pathData = createPathFromPoints(points);\n    const roughNode = rc.path(pathData, options);\n\n    polygon = shapeSvg\n      .insert(() => roughNode, ':first-child')\n      .attr('transform', `translate(${-w / 2}, ${h / 2})`);\n\n    if (cssStyles) {\n      polygon.attr('style', cssStyles);\n    }\n  } else {\n    polygon = insertPolygonShape(shapeSvg, w, h, points);\n  }\n\n  if (nodeStyles) {\n    polygon.attr('style', nodeStyles);\n  }\n\n  node.width = w;\n  node.height = h;\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, updateNodeBounds, getNodeClasses, createPathFromPoints } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function trapezoidalPentagon<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n  const minWidth = 15,\n    minHeight = 5;\n  if (node.width || node.height) {\n    node.height = (node.height ?? 0) - labelPaddingY * 2;\n    if (node.height < minHeight) {\n      node.height = minHeight;\n    }\n\n    node.width = (node.width ?? 0) - labelPaddingX * 2;\n    if (node.width < minWidth) {\n      node.width = minWidth;\n    }\n  }\n\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n  const w = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;\n  const h = (node?.height ? node?.height : bbox.height) + labelPaddingY * 2;\n\n  const { cssStyles } = node;\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x: (-w / 2) * 0.8, y: -h / 2 },\n    { x: (w / 2) * 0.8, y: -h / 2 },\n    { x: w / 2, y: (-h / 2) * 0.6 },\n    { x: w / 2, y: h / 2 },\n    { x: -w / 2, y: h / 2 },\n    { x: -w / 2, y: (-h / 2) * 0.6 },\n  ];\n\n  const pathData = createPathFromPoints(points);\n  const shapeNode = rc.path(pathData, options);\n\n  const polygon = shapeSvg.insert(() => shapeNode, ':first-child');\n  polygon.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, polygon);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { createPathFromPoints } from './util.js';\nimport { evaluate } from '../../../diagrams/common/common.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport type { D3Selection } from '../../../types.js';\n\nconst MIN_HEIGHT = 10;\nconst MIN_WIDTH = 10;\n\nexport async function triangle<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? nodePadding * 2 : nodePadding;\n  if (node.width || node.height) {\n    node.width = ((node?.width ?? 0) - labelPaddingX) / 2;\n    if (node.width < MIN_WIDTH) {\n      node.width = MIN_WIDTH;\n    }\n    node.height = node?.height ?? 0;\n    if (node.height < MIN_HEIGHT) {\n      node.height = MIN_HEIGHT;\n    }\n  }\n\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const useHtmlLabels = evaluate(getConfig().flowchart?.htmlLabels);\n  const w = (node?.width ? node?.width : bbox.width) + labelPaddingX;\n  const h = node?.height ? node?.height : w + bbox.height;\n  const tw = h;\n  const points = [\n    { x: 0, y: 0 },\n    { x: tw, y: 0 },\n    { x: tw / 2, y: -h },\n  ];\n\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n  const pathData = createPathFromPoints(points);\n  const roughNode = rc.path(pathData, options);\n\n  const polygon = shapeSvg\n    .insert(() => roughNode, ':first-child')\n    .attr('transform', `translate(${-h / 2}, ${h / 2})`)\n    .attr('class', 'outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    polygon.selectChildren('path').attr('style', nodeStyles);\n  }\n\n  node.width = w;\n  node.height = h;\n\n  updateNodeBounds(node, polygon);\n\n  label.attr(\n    'transform',\n    `translate(${-bbox.width / 2 - (bbox.x - (bbox.left ?? 0))}, ${h / 2 - (bbox.height + (node.padding ?? 0) / (useHtmlLabels ? 2 : 1) - (bbox.y - (bbox.top ?? 0)))})`\n  );\n\n  node.intersect = function (point) {\n    log.info('Triangle intersect', node, points, point);\n    return intersect.polygon(node, points, point);\n  };\n\n  return shapeSvg;\n}\n","import {\n  labelHelper,\n  updateNodeBounds,\n  getNodeClasses,\n  generateFullSineWavePoints,\n  createPathFromPoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function waveEdgedRectangle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 12 : nodePadding;\n\n  let adjustFinalHeight = true;\n  if (node.width || node.height) {\n    adjustFinalHeight = false;\n    node.width = (node?.width ?? 0) - labelPaddingX * 2;\n    if (node.width < 10) {\n      node.width = 10;\n    }\n    node.height = (node?.height ?? 0) - labelPaddingY * 2;\n    if (node.height < 10) {\n      node.height = 10;\n    }\n  }\n\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n  const w = (node?.width ? node?.width : bbox.width) + (labelPaddingX ?? 0) * 2;\n  const h = (node?.height ? node?.height : bbox.height) + (labelPaddingY ?? 0) * 2;\n  const waveAmplitude = node.look === 'neo' ? h / 4 : h / 8;\n  const finalH = h + (adjustFinalHeight ? waveAmplitude : -waveAmplitude);\n  const { cssStyles } = node;\n\n  // To maintain minimum width\n  const minWidth = 14;\n  const widthDif = minWidth - w;\n  const extraW = widthDif > 0 ? widthDif / 2 : 0;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x: -w / 2 - extraW, y: finalH / 2 },\n    ...generateFullSineWavePoints(\n      -w / 2 - extraW,\n      finalH / 2,\n      w / 2 + extraW,\n      finalH / 2,\n      waveAmplitude,\n      0.8\n    ),\n    { x: w / 2 + extraW, y: -finalH / 2 },\n    { x: -w / 2 - extraW, y: -finalH / 2 },\n  ];\n\n  const waveEdgeRectPath = createPathFromPoints(points);\n  const waveEdgeRectNode = rc.path(waveEdgeRectPath, options);\n\n  const waveEdgeRect = shapeSvg.insert(() => waveEdgeRectNode, ':first-child');\n\n  waveEdgeRect.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    waveEdgeRect.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    waveEdgeRect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  waveEdgeRect.attr('transform', `translate(0,${-waveAmplitude / 2})`);\n  label.attr(\n    'transform',\n    `translate(${-w / 2 + (node.padding ?? 0) - (bbox.x - (bbox.left ?? 0))},${-h / 2 + (node.padding ?? 0) - waveAmplitude - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, waveEdgeRect);\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import {\n  labelHelper,\n  updateNodeBounds,\n  getNodeClasses,\n  createPathFromPoints,\n  generateFullSineWavePoints,\n} from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function waveRectangle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const nodePadding = node.padding ?? 0;\n  const labelPaddingX = node.look === 'neo' ? 16 : nodePadding;\n  const labelPaddingY = node.look === 'neo' ? 20 : nodePadding;\n\n  if (node.width || node.height) {\n    node.width = node?.width ?? 0;\n    if (node.width < 20) {\n      node.width = 20;\n    }\n\n    node.height = node?.height ?? 0;\n    if (node.height < 10) {\n      node.height = 10;\n    }\n\n    // Adjust for wave amplitude\n    const waveAmplitude = Math.min(node.height * 0.2, node.height / 4);\n    node.height = Math.ceil(node.height - labelPaddingY - waveAmplitude * (20 / 9));\n    node.width = node.width - labelPaddingX * 2;\n  }\n\n  const { shapeSvg, bbox } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const w = (node?.width ? node?.width : bbox.width) + labelPaddingX * 2;\n  const h = (node?.height ? node?.height : bbox.height) + labelPaddingY;\n\n  const waveAmplitude = h / 8;\n  const finalH = h + waveAmplitude * 2;\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const points = [\n    { x: -w / 2, y: finalH / 2 },\n    ...generateFullSineWavePoints(-w / 2, finalH / 2, w / 2, finalH / 2, waveAmplitude, 1),\n    { x: w / 2, y: -finalH / 2 },\n    ...generateFullSineWavePoints(w / 2, -finalH / 2, -w / 2, -finalH / 2, waveAmplitude, -1),\n  ];\n\n  const waveRectPath = createPathFromPoints(points);\n  const waveRectNode = rc.path(waveRectPath, options);\n\n  const waveRect = shapeSvg.insert(() => waveRectNode, ':first-child');\n\n  waveRect.attr('class', 'basic label-container');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    waveRect.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    waveRect.selectAll('path').attr('style', nodeStyles);\n  }\n\n  updateNodeBounds(node, waveRect);\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, points, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { labelHelper, getNodeClasses, updateNodeBounds } from './util.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport intersect from '../intersect/index.js';\nimport type { D3Selection } from '../../../types.js';\n\n/// Width of the frame on the top and left of the shape\nconst rectOffset = 10;\n\nexport async function windowPane<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const paddingX = node.look === 'neo' ? 16 : (node.padding ?? 0);\n  const paddingY = node.look === 'neo' ? 12 : (node.padding ?? 0);\n\n  // If incoming height & width are present, subtract the padding from them\n  // as labelHelper does not take padding into account\n  // also check if the width or height is less than minimum default values (50),\n  // if so set it to min value\n  if (node.width || node.height) {\n    node.width = Math.max((node?.width ?? 0) - paddingX * 2 - rectOffset, 10);\n    node.height = Math.max((node?.height ?? 0) - paddingY * 2 - rectOffset, 10);\n  }\n\n  const { shapeSvg, bbox, label } = await labelHelper(parent, node, getNodeClasses(node));\n\n  const totalWidth = (node?.width ? node?.width : bbox.width) + paddingX * 2 + rectOffset;\n  const totalHeight = (node?.height ? node?.height : bbox.height) + paddingY * 2 + rectOffset;\n\n  const w = totalWidth - rectOffset;\n  const h = totalHeight - rectOffset;\n  const x = -w / 2;\n  const y = -h / 2;\n  const { cssStyles } = node;\n\n  // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  const outerPathPoints = [\n    { x: x - rectOffset, y: y - rectOffset },\n    { x: x - rectOffset, y: y + h },\n    { x: x + w, y: y + h },\n    { x: x + w, y: y - rectOffset },\n  ];\n\n  const path = `M${x - rectOffset},${y - rectOffset} L${x + w},${y - rectOffset} L${x + w},${y + h} L${x - rectOffset},${y + h} L${x - rectOffset},${y - rectOffset}\n                M${x - rectOffset},${y} L${x + w},${y}\n                M${x},${y - rectOffset} L${x},${y + h}`;\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const no = rc.path(path, options);\n\n  const windowPane = shapeSvg.insert(() => no, ':first-child');\n  windowPane.attr('transform', `translate(${rectOffset / 2}, ${rectOffset / 2})`);\n\n  windowPane.attr('class', 'basic label-container outer-path');\n\n  if (cssStyles && node.look !== 'handDrawn') {\n    windowPane.selectAll('path').attr('style', cssStyles);\n  }\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    windowPane.selectAll('path').attr('style', nodeStyles);\n  }\n\n  label.attr(\n    'transform',\n    `translate(${-(bbox.width / 2) + rectOffset / 2 - (bbox.x - (bbox.left ?? 0))}, ${-(bbox.height / 2) + rectOffset / 2 - (bbox.y - (bbox.top ?? 0))})`\n  );\n\n  updateNodeBounds(node, windowPane);\n\n  node.intersect = function (point) {\n    const pos = intersect.polygon(node, outerPathPoints, point);\n    return pos;\n  };\n\n  return shapeSvg;\n}\n","import { updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { userNodeOverrides, styles2String } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport { drawRect } from './drawRect.js';\nimport { getConfig } from '../../../config.js';\nimport type { EntityNode } from '../../../diagrams/er/erTypes.js';\nimport { createText } from '../../createText.js';\nimport { evaluate, parseGenericTypes } from '../../../diagrams/common/common.js';\nimport { select } from 'd3';\nimport { calculateTextWidth } from '../../../utils.js';\nimport type { MermaidConfig } from '../../../config.type.js';\nimport type { D3Selection } from '../../../types.js';\n\nconst COLOR_THEMES = new Set(['redux-color', 'redux-dark-color']);\nconst REDUX_THEMES = new Set(['redux', 'redux-dark', 'redux-color', 'redux-dark-color']);\n\nexport async function erBox<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  // Treat node as entityNode for certain entityNode checks\n  const entityNode = node as unknown as EntityNode;\n  if (entityNode.alias) {\n    node.label = entityNode.alias;\n  }\n  const { theme, themeVariables } = getConfig();\n  const { rowEven, rowOdd, nodeBorder, borderColorArray } = themeVariables;\n\n  // Background shapes are drawn to fill in the background color and cover up the ER diagram edge markers.\n  // Draw background shape once.\n  if (node.look === 'handDrawn') {\n    const { themeVariables } = getConfig();\n    const { background } = themeVariables;\n    const backgroundNode = {\n      ...node,\n      id: node.id + '-background',\n      domId: (node.domId || node.id) + '-background',\n      look: 'default',\n      cssStyles: ['stroke: none', `fill: ${background}`],\n    };\n    await erBox(parent, backgroundNode);\n  }\n\n  const config = getConfig();\n  node.useHtmlLabels = config.htmlLabels;\n  let PADDING = config.er?.diagramPadding ?? 10;\n  let TEXT_PADDING = config.er?.entityPadding ?? 6;\n\n  const { cssStyles } = node;\n  const { labelStyles, nodeStyles } = styles2String(node);\n\n  // Draw rect if no attributes are found\n  if (entityNode.attributes.length === 0 && node.label) {\n    const options = {\n      rx: 0,\n      ry: 0,\n      labelPaddingX: PADDING,\n      labelPaddingY: PADDING * 1.5,\n      classes: '',\n    };\n    // Set minimum width\n    if (\n      calculateTextWidth(node.label, config) + options.labelPaddingX * 2 <\n      config.er!.minEntityWidth!\n    ) {\n      node.width = config.er!.minEntityWidth;\n    }\n    const shapeSvg = await drawRect(parent, node, options);\n    if (theme != null && COLOR_THEMES.has(theme)) {\n      const colorIndex = entityNode.colorIndex ?? 0;\n      shapeSvg.attr('data-color-id', `color-${colorIndex % borderColorArray.length}`);\n    }\n\n    // drawRect doesn't center non-htmlLabels correctly as of now, so translate label\n    if (!evaluate(config.htmlLabels)) {\n      const textElement = shapeSvg.select('text');\n      const bbox = (textElement.node() as SVGTextElement)?.getBBox();\n      textElement.attr('transform', `translate(${-bbox.width / 2}, 0)`);\n    }\n    return shapeSvg;\n  }\n\n  if (!config.htmlLabels) {\n    PADDING *= 1.25;\n    TEXT_PADDING *= 1.25;\n  }\n\n  let cssClasses = getNodeClasses(node);\n  if (!cssClasses) {\n    cssClasses = 'node default';\n  }\n\n  const shapeSvg = parent\n    // @ts-ignore Ignore .insert on SVGAElement\n    .insert('g')\n    .attr('class', cssClasses)\n    .attr('id', node.domId || node.id);\n\n  const nameBBox = await addText(shapeSvg, node.label ?? '', config, 0, 0, ['name'], labelStyles);\n  nameBBox.height += TEXT_PADDING;\n  let yOffset = 0;\n  const yOffsets = [];\n  const rows = [];\n  let maxTypeWidth = 0;\n  let maxNameWidth = 0;\n  let maxKeysWidth = 0;\n  let maxCommentWidth = 0;\n  let keysPresent = true;\n  let commentPresent = true;\n  for (const attribute of entityNode.attributes) {\n    const typeBBox = await addText(\n      shapeSvg,\n      attribute.type,\n      config,\n      0,\n      yOffset,\n      ['attribute-type'],\n      labelStyles\n    );\n    maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width + PADDING);\n    const nameBBox = await addText(\n      shapeSvg,\n      attribute.name,\n      config,\n      0,\n      yOffset,\n      ['attribute-name'],\n      labelStyles\n    );\n    maxNameWidth = Math.max(maxNameWidth, nameBBox.width + PADDING);\n    const keysBBox = await addText(\n      shapeSvg,\n      attribute.keys.join(),\n      config,\n      0,\n      yOffset,\n      ['attribute-keys'],\n      labelStyles\n    );\n    maxKeysWidth = Math.max(maxKeysWidth, keysBBox.width + PADDING);\n    const commentBBox = await addText(\n      shapeSvg,\n      attribute.comment,\n      config,\n      0,\n      yOffset,\n      ['attribute-comment'],\n      labelStyles\n    );\n    maxCommentWidth = Math.max(maxCommentWidth, commentBBox.width + PADDING);\n\n    const rowHeight =\n      Math.max(typeBBox.height, nameBBox.height, keysBBox.height, commentBBox.height) +\n      TEXT_PADDING;\n    rows.push({ yOffset, rowHeight });\n    yOffset += rowHeight;\n  }\n  let totalWidthSections = 4;\n\n  if (maxKeysWidth <= PADDING) {\n    keysPresent = false;\n    maxKeysWidth = 0;\n    totalWidthSections--;\n  }\n  if (maxCommentWidth <= PADDING) {\n    commentPresent = false;\n    maxCommentWidth = 0;\n    totalWidthSections--;\n  }\n\n  const shapeBBox = shapeSvg.node()!.getBBox();\n  // Add extra padding to attribute components to accommodate for difference in width\n  if (\n    nameBBox.width + PADDING * 2 - (maxTypeWidth + maxNameWidth + maxKeysWidth + maxCommentWidth) >\n    0\n  ) {\n    const difference =\n      nameBBox.width + PADDING * 2 - (maxTypeWidth + maxNameWidth + maxKeysWidth + maxCommentWidth);\n    maxTypeWidth += difference / totalWidthSections;\n    maxNameWidth += difference / totalWidthSections;\n    if (maxKeysWidth > 0) {\n      maxKeysWidth += difference / totalWidthSections;\n    }\n    if (maxCommentWidth > 0) {\n      maxCommentWidth += difference / totalWidthSections;\n    }\n  }\n\n  const maxWidth = maxTypeWidth + maxNameWidth + maxKeysWidth + maxCommentWidth;\n\n  // @ts-ignore TODO: Fix rough typings\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  let totalShapeBBoxHeight = 0;\n  if (rows.length > 0) {\n    totalShapeBBoxHeight = rows.reduce((sum, row) => sum + (row?.rowHeight ?? 0), 0);\n  }\n  const w = Math.max(shapeBBox.width + PADDING * 2, node?.width || 0, maxWidth);\n  const h = Math.max((totalShapeBBoxHeight ?? 0) + nameBBox.height, node?.height || 0);\n  const x = -w / 2;\n  const y = -h / 2;\n\n  // Translate attribute text labels\n  shapeSvg.selectAll('g:not(:first-child)').each((_: any, i: number, nodes: any) => {\n    const text = select<any, unknown>(nodes[i]);\n    const transform = text.attr('transform');\n    let translateX = 0;\n    let translateY = 0;\n\n    if (transform) {\n      const regex = RegExp(/translate\\(([^,]+),([^)]+)\\)/);\n      const translate = regex.exec(transform);\n      if (translate) {\n        translateX = parseFloat(translate[1]);\n        translateY = parseFloat(translate[2]);\n        if (text.attr('class').includes('attribute-name')) {\n          translateX += maxTypeWidth;\n        } else if (text.attr('class').includes('attribute-keys')) {\n          translateX += maxTypeWidth + maxNameWidth;\n        } else if (text.attr('class').includes('attribute-comment')) {\n          translateX += maxTypeWidth + maxNameWidth + maxKeysWidth;\n        }\n      }\n    }\n\n    text.attr(\n      'transform',\n      `translate(${x + PADDING / 2 + translateX}, ${translateY + y + nameBBox.height + TEXT_PADDING / 2})`\n    );\n  });\n  // Center the name\n  shapeSvg\n    .select('.name')\n    .attr('transform', 'translate(' + -nameBBox.width / 2 + ', ' + (y + TEXT_PADDING / 2) + ')');\n\n  if (theme != null && COLOR_THEMES.has(theme)) {\n    const colorIndex = entityNode.colorIndex ?? 0;\n    shapeSvg.attr('data-color-id', `color-${colorIndex % borderColorArray.length}`);\n  }\n  // Draw shape\n  const roughRect = rc.rectangle(x, y, w, h, options);\n  const rect = shapeSvg\n    .insert(() => roughRect, ':first-child')\n    .attr('class', 'outer-path')\n    .attr('style', cssStyles!.join(''));\n\n  yOffsets.push(0);\n  // Draw row rects\n  for (const [i, row] of rows.entries()) {\n    const contentRowIndex = i + 1; // Adjusted index to skip the header (name) row\n    const isEven = contentRowIndex % 2 === 0 && row.yOffset !== 0;\n    const roughRect = rc.rectangle(x, nameBBox.height + y + row?.yOffset, w, row?.rowHeight, {\n      ...options,\n      fill: isEven ? rowEven : rowOdd,\n      stroke: nodeBorder,\n    });\n    shapeSvg\n      .insert(() => roughRect, 'g.label')\n      .attr('style', cssStyles!.join(''))\n      .attr('class', `row-rect-${isEven ? 'even' : 'odd'}`);\n  }\n\n  // Draw divider lines\n  // Name line\n  const thickness = 0.0001;\n\n  // 1. Top horizontal line\n  let points = lineToPolygon(x, nameBBox.height + y, w + x, nameBBox.height + y, thickness);\n  let roughLine = rc.polygon(\n    points.map((p) => [p.x, p.y]),\n    options\n  );\n  shapeSvg.insert(() => roughLine).attr('class', 'divider');\n  // First line\n  points = lineToPolygon(maxTypeWidth + x, nameBBox.height + y, maxTypeWidth + x, h + y, thickness);\n  roughLine = rc.polygon(\n    points.map((p) => [p.x, p.y]),\n    options\n  );\n  shapeSvg.insert(() => roughLine).attr('class', 'divider');\n  // Second line\n  if (keysPresent) {\n    const xCoord = maxTypeWidth + maxNameWidth + x;\n    points = lineToPolygon(xCoord, nameBBox.height + y, xCoord, h + y, thickness);\n    roughLine = rc.polygon(\n      points.map((p) => [p.x, p.y]),\n      options\n    );\n    shapeSvg.insert(() => roughLine).attr('class', 'divider');\n  }\n  // Third line\n  if (commentPresent) {\n    const xCoord = maxTypeWidth + maxNameWidth + maxKeysWidth + x;\n    points = lineToPolygon(xCoord, nameBBox.height + y, xCoord, h + y, thickness);\n    roughLine = rc.polygon(\n      points.map((p) => [p.x, p.y]),\n      options\n    );\n    shapeSvg.insert(() => roughLine).attr('class', 'divider');\n  }\n\n  // Attribute divider lines\n  for (const yOffset of yOffsets) {\n    const yCoord = nameBBox.height + y + yOffset;\n    points = lineToPolygon(x, yCoord, w + x, yCoord, thickness);\n    roughLine = rc.polygon(\n      points.map((p) => [p.x, p.y]),\n      options\n    );\n    shapeSvg.insert(() => roughLine).attr('class', 'divider');\n  }\n\n  updateNodeBounds(node, rect);\n\n  if (nodeStyles && node.look !== 'handDrawn') {\n    if (theme != null && REDUX_THEMES.has(theme)) {\n      shapeSvg.selectAll('path').attr('style', nodeStyles);\n    } else {\n      const allStyle = nodeStyles.split(';');\n      const strokeStyles = allStyle\n        ?.filter((e) => {\n          return e.includes('stroke');\n        })\n        ?.map((s) => `${s}`)\n        .join('; ');\n      shapeSvg.selectAll('path').attr('style', strokeStyles ?? '');\n      shapeSvg.selectAll('.row-rect-even path').attr('style', nodeStyles);\n    }\n  }\n\n  node.intersect = function (point) {\n    return intersect.rect(node, point);\n  };\n  return shapeSvg;\n}\n\n// Helper function to add label text g with translate position and style\nasync function addText<T extends SVGGraphicsElement>(\n  shapeSvg: D3Selection<T>,\n  labelText: string,\n  config: MermaidConfig,\n  translateX = 0,\n  translateY = 0,\n  classes: string[] = [],\n  style = ''\n) {\n  const label = shapeSvg\n    .insert('g')\n    .attr('class', `label ${classes.join(' ')}`)\n    .attr('transform', `translate(${translateX}, ${translateY})`)\n    .attr('style', style);\n\n  // Return types need to be parsed\n  if (labelText !== parseGenericTypes(labelText)) {\n    labelText = parseGenericTypes(labelText);\n    // Work around\n    labelText = labelText.replaceAll('<', '&lt;').replaceAll('>', '&gt;');\n  }\n\n  const text = label.node()!.appendChild(\n    await createText(\n      label,\n      labelText,\n      {\n        width: calculateTextWidth(labelText, config) + 100,\n        style,\n        useHtmlLabels: config.htmlLabels,\n      },\n      config\n    )\n  );\n  // Undo work around now that text passed through correctly\n  if (labelText.includes('&lt;') || labelText.includes('&gt;')) {\n    let child: Element | ChildNode = text.children[0];\n    child.textContent = child.textContent!.replaceAll('&lt;', '<').replaceAll('&gt;', '>');\n    while (child.childNodes[0]) {\n      child = child.childNodes[0];\n      // Replace its text content\n      child.textContent = child.textContent!.replaceAll('&lt;', '<').replaceAll('&gt;', '>');\n    }\n  }\n\n  let bbox = text.getBBox();\n  if (evaluate(config.htmlLabels)) {\n    const div = text.children[0] as HTMLDivElement;\n    div.style.textAlign = 'start';\n    const dv = select(text);\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  return bbox;\n}\n\nfunction lineToPolygon(\n  x1: number,\n  y1: number,\n  x2: number,\n  y2: number,\n  thickness: number\n): { x: number; y: number }[] {\n  if (x1 === x2) {\n    // Vertical line\n    return [\n      { x: x1 - thickness / 2, y: y1 },\n      { x: x1 + thickness / 2, y: y1 },\n      { x: x2 + thickness / 2, y: y2 },\n      { x: x2 - thickness / 2, y: y2 },\n    ];\n  }\n  // Horizontal line (ER dividers are always axis-aligned)\n  return [\n    { x: x1, y: y1 - thickness / 2 },\n    { x: x1, y: y1 + thickness / 2 },\n    { x: x2, y: y2 + thickness / 2 },\n    { x: x2, y: y2 - thickness / 2 },\n  ];\n}\n","import { select } from 'd3';\nimport { getConfig } from '../../config.js';\nimport { getNodeClasses } from '../../rendering-util/rendering-elements/shapes/util.js';\nimport { calculateTextWidth, decodeEntities } from '../../utils.js';\nimport type { ClassMember, ClassNode } from './classTypes.js';\nimport { sanitizeText } from '../../diagram-api/diagramAPI.js';\nimport { createText } from '../../rendering-util/createText.js';\nimport { evaluate, hasKatex } from '../common/common.js';\nimport type { Node } from '../../rendering-util/types.js';\nimport type { MermaidConfig } from '../../config.type.js';\nimport type { D3Selection } from '../../types.js';\n\n// Creates the shapeSvg and inserts text\nexport async function textHelper<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: any,\n  config: MermaidConfig,\n  useHtmlLabels: boolean,\n  GAP = config.class!.padding ?? 12\n) {\n  const TEXT_PADDING = !useHtmlLabels ? 3 : 0;\n  const shapeSvg = parent\n    // @ts-ignore: Ignore error for using .insert on SVGAElement\n    .insert('g')\n    .attr('class', getNodeClasses(node))\n    .attr('id', node.domId || node.id);\n\n  let annotationGroup = null;\n  let labelGroup = null;\n  let membersGroup = null;\n  let methodsGroup = null;\n\n  let annotationGroupHeight = 0;\n  let labelGroupHeight = 0;\n  let membersGroupHeight = 0;\n\n  annotationGroup = shapeSvg.insert('g').attr('class', 'annotation-group text');\n  if (node.annotations.length > 0) {\n    const annotation = node.annotations[0];\n    await addText(annotationGroup, { text: `«${annotation}»` } as unknown as ClassMember, 0);\n\n    const annotationGroupBBox = annotationGroup.node()!.getBBox();\n    annotationGroupHeight = annotationGroupBBox.height;\n  }\n\n  labelGroup = shapeSvg.insert('g').attr('class', 'label-group text');\n  await addText(labelGroup, node, 0, ['font-weight: bolder']);\n  const labelGroupBBox = labelGroup.node()!.getBBox();\n  labelGroupHeight = labelGroupBBox.height;\n\n  membersGroup = shapeSvg.insert('g').attr('class', 'members-group text');\n  let yOffset = 0;\n  for (const member of node.members) {\n    const height = await addText(membersGroup, member, yOffset, [member.parseClassifier()]);\n    yOffset += height + TEXT_PADDING;\n  }\n  membersGroupHeight = membersGroup.node()!.getBBox().height;\n  if (membersGroupHeight <= 0) {\n    membersGroupHeight = GAP / 2;\n  }\n\n  methodsGroup = shapeSvg.insert('g').attr('class', 'methods-group text');\n  let methodsYOffset = 0;\n  for (const method of node.methods) {\n    const height = await addText(methodsGroup, method, methodsYOffset, [method.parseClassifier()]);\n    methodsYOffset += height + TEXT_PADDING;\n  }\n\n  let bbox = shapeSvg.node()!.getBBox();\n\n  // Center annotation\n  if (annotationGroup !== null) {\n    const annotationGroupBBox = annotationGroup.node()!.getBBox();\n    annotationGroup.attr('transform', `translate(${-annotationGroupBBox.width / 2})`);\n  }\n\n  // Adjust label\n  labelGroup.attr('transform', `translate(${-labelGroupBBox.width / 2}, ${annotationGroupHeight})`);\n\n  bbox = shapeSvg.node()!.getBBox();\n\n  membersGroup.attr(\n    'transform',\n    `translate(${0}, ${annotationGroupHeight + labelGroupHeight + GAP * 2})`\n  );\n  bbox = shapeSvg.node()!.getBBox();\n  methodsGroup.attr(\n    'transform',\n    `translate(${0}, ${annotationGroupHeight + labelGroupHeight + (membersGroupHeight ? membersGroupHeight + GAP * 4 : GAP * 2)})`\n  );\n\n  bbox = shapeSvg.node()!.getBBox();\n\n  return { shapeSvg, bbox };\n}\n\n// Modified version of labelHelper() to help create and place text for classes\nasync function addText<T extends SVGGraphicsElement>(\n  parentGroup: D3Selection<T>,\n  node: Node | ClassNode | ClassMember,\n  yOffset: number,\n  styles: string[] = []\n) {\n  const textEl = parentGroup.insert('g').attr('class', 'label').attr('style', styles.join('; '));\n  const config = getConfig();\n  let useHtmlLabels =\n    'useHtmlLabels' in node ? node.useHtmlLabels : (evaluate(config.htmlLabels) ?? true);\n\n  let textContent = '';\n  // Support regular node type (.label) and classNodes (.text)\n  if ('text' in node) {\n    textContent = node.text;\n  } else {\n    textContent = node.label!;\n  }\n\n  // createText() will cause unwanted behavior because of classDiagram syntax so workarounds are needed\n\n  if (!useHtmlLabels && textContent.startsWith('\\\\')) {\n    textContent = textContent.substring(1);\n  }\n\n  if (hasKatex(textContent)) {\n    useHtmlLabels = true;\n  }\n\n  const text = await createText(\n    textEl,\n    sanitizeText(decodeEntities(textContent)),\n    {\n      width: calculateTextWidth(textContent, config) + 50, // Add room for error when splitting text into multiple lines\n      classes: 'markdown-node-label',\n      useHtmlLabels,\n    },\n    config\n  );\n  let bbox;\n  let numberOfLines = 1;\n\n  if (!useHtmlLabels) {\n    // Undo font-weight normal\n    if (styles.includes('font-weight: bolder')) {\n      select(text).selectAll('tspan').attr('font-weight', '');\n    }\n\n    numberOfLines = text.children.length;\n\n    const textChild = text.children[0];\n    if (text.textContent === '' || text.textContent!.includes('&gt')) {\n      textChild.textContent =\n        textContent[0] +\n        textContent.substring(1).replaceAll('&gt;', '>').replaceAll('&lt;', '<').trim();\n\n      // Text was improperly removed due to spaces (preserve one space if present)\n      const preserveSpace = textContent[1] === ' ';\n      if (preserveSpace) {\n        textChild.textContent = textChild.textContent[0] + ' ' + textChild.textContent.substring(1);\n      }\n    }\n\n    // To support empty boxes\n    if (textChild.textContent === 'undefined') {\n      textChild.textContent = '';\n    }\n\n    // Get the bounding box after the text update\n    bbox = text.getBBox();\n  } else {\n    const div = text.children[0];\n    const dv = select(text);\n\n    numberOfLines = div.innerHTML.split('<br>').length;\n    // Katex math support\n    if (div.innerHTML.includes('</math>')) {\n      numberOfLines += div.innerHTML.split('<mrow>').length - 1;\n    }\n\n    // Support images\n    const images = div.getElementsByTagName('img');\n    if (images) {\n      const noImgText = textContent.replace(/<img[^>]*>/g, '').trim() === '';\n      await Promise.all(\n        [...images].map(\n          (img) =>\n            new Promise((res) => {\n              function setupImage() {\n                img.style.display = 'flex';\n                img.style.flexDirection = 'column';\n\n                if (noImgText) {\n                  // default size if no text\n                  const bodyFontSize =\n                    config.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize;\n                  const enlargingFactor = 5;\n                  const width = parseInt(bodyFontSize, 10) * enlargingFactor + 'px';\n                  img.style.minWidth = width;\n                  img.style.maxWidth = width;\n                } else {\n                  img.style.width = '100%';\n                }\n                res(img);\n              }\n              setTimeout(() => {\n                if (img.complete) {\n                  setupImage();\n                }\n              });\n              img.addEventListener('error', setupImage);\n              img.addEventListener('load', setupImage);\n            })\n        )\n      );\n    }\n\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  // Center text and offset by yOffset\n  textEl.attr('transform', 'translate(0,' + (-bbox.height / (2 * numberOfLines) + yOffset) + ')');\n  return bbox.height;\n}\n","import { updateNodeBounds } from './util.js';\nimport { getConfig } from '../../../diagram-api/diagramAPI.js';\nimport { select } from 'd3';\nimport type { Node } from '../../types.js';\nimport type { ClassNode } from '../../../diagrams/class/classTypes.js';\nimport rough from 'roughjs';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport intersect from '../intersect/index.js';\nimport { textHelper } from '../../../diagrams/class/shapeUtil.js';\nimport { evaluate } from '../../../diagrams/common/common.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function classBox<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const config = getConfig();\n  const { themeVariables } = config;\n  const { useGradient } = themeVariables;\n  const PADDING = config.class!.padding ?? 12;\n  const GAP = PADDING;\n  const useHtmlLabels = node.useHtmlLabels ?? evaluate(config.htmlLabels) ?? true;\n  // Treat node as classNode\n  const classNode = node as unknown as ClassNode;\n  classNode.annotations = classNode.annotations ?? [];\n  classNode.members = classNode.members ?? [];\n  classNode.methods = classNode.methods ?? [];\n\n  const { shapeSvg, bbox } = await textHelper(parent, node, config, useHtmlLabels, GAP);\n\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  node.cssStyles = classNode.styles || '';\n\n  const styles = classNode.styles?.join(';') || nodeStyles || '';\n\n  if (!node.cssStyles) {\n    node.cssStyles = styles.replaceAll('!important', '').split(';');\n  }\n\n  const renderExtraBox =\n    classNode.members.length === 0 &&\n    classNode.methods.length === 0 &&\n    !config.class?.hideEmptyMembersBox;\n\n  // Setup roughjs\n  // @ts-ignore TODO: Fix rough typings\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  const w = Math.max(node.width ?? 0, bbox.width);\n  let h = Math.max(node.height ?? 0, bbox.height);\n  const nodeHeightGreater = (node.height ?? 0) > bbox.height;\n  if (classNode.members.length === 0 && classNode.methods.length === 0) {\n    h += GAP;\n  } else if (classNode.members.length > 0 && classNode.methods.length === 0) {\n    h += GAP * 2;\n  }\n\n  const x = -w / 2;\n  const y = -h / 2;\n  let extraHeight = renderExtraBox\n    ? PADDING * 2\n    : classNode.members.length === 0 && classNode.methods.length === 0\n      ? -PADDING\n      : 0;\n  if (nodeHeightGreater) {\n    extraHeight = PADDING * 2;\n  }\n\n  // Create and center rectangle\n  const roughRect = rc.rectangle(\n    x - PADDING,\n    y -\n      PADDING -\n      (renderExtraBox\n        ? PADDING\n        : classNode.members.length === 0 && classNode.methods.length === 0\n          ? -PADDING / 2\n          : 0),\n    w + 2 * PADDING,\n    h + 2 * PADDING + extraHeight,\n    options\n  );\n\n  const rect = shapeSvg.insert(() => roughRect, ':first-child');\n  rect.attr('class', 'basic label-container outer-path');\n  const rectBBox = rect.node()!.getBBox();\n\n  // Rect is centered so now adjust labels.\n  const annotationGroupHeight =\n    (shapeSvg.select('.annotation-group').node() as SVGGraphicsElement).getBBox().height -\n      (renderExtraBox ? PADDING / 2 : 0) || 0;\n  const labelGroupHeight =\n    (shapeSvg.select('.label-group').node() as SVGGraphicsElement).getBBox().height -\n      (renderExtraBox ? PADDING / 2 : 0) || 0;\n  const membersGroupHeight =\n    (shapeSvg.select('.members-group').node() as SVGGraphicsElement).getBBox().height -\n      (renderExtraBox ? PADDING / 2 : 0) || 0;\n\n  // Y value in the middle of the first line and remaining space.\n  const methodsAreaPlacement =\n    (annotationGroupHeight +\n      labelGroupHeight +\n      y +\n      PADDING -\n      (y -\n        PADDING -\n        (renderExtraBox\n          ? PADDING\n          : classNode.members.length === 0 && classNode.methods.length === 0\n            ? -PADDING / 2\n            : 0))) /\n    2;\n  // Rect is centered so now adjust labels.\n  // TODO: Fix types\n  shapeSvg.selectAll('.text').each((_: any, i: number, nodes: any) => {\n    const text = select<any, unknown>(nodes[i]);\n    // Get the current transform attribute\n    const transform = text.attr('transform');\n    // Initialize variables for the translation values\n    let translateY = 0;\n    // Check if the transform attribute exists\n    if (transform) {\n      const regex = RegExp(/translate\\(([^,]+),([^)]+)\\)/);\n      const translate = regex.exec(transform);\n      if (translate) {\n        translateY = parseFloat(translate[2]);\n      }\n    }\n    // Add to the y value\n    let newTranslateY =\n      translateY +\n      y +\n      PADDING -\n      (renderExtraBox\n        ? PADDING\n        : classNode.members.length === 0 && classNode.methods.length === 0\n          ? -PADDING / 2\n          : 0);\n    if (text.attr('class').includes('methods-group')) {\n      const membersGroupHeightForMethods = Math.max(membersGroupHeight, GAP / 2);\n      if (nodeHeightGreater) {\n        newTranslateY =\n          Math.max(\n            methodsAreaPlacement,\n            annotationGroupHeight +\n              labelGroupHeight +\n              membersGroupHeightForMethods +\n              y +\n              GAP * 2 +\n              PADDING\n          ) +\n          GAP * 2;\n      } else {\n        newTranslateY =\n          annotationGroupHeight +\n          labelGroupHeight +\n          membersGroupHeightForMethods +\n          y +\n          GAP * 4 +\n          PADDING;\n      }\n    }\n    if (\n      classNode.members.length === 0 &&\n      classNode.methods.length === 0 &&\n      config.class?.hideEmptyMembersBox\n    ) {\n      if (classNode.annotations.length > 0) {\n        newTranslateY = translateY - GAP;\n      } else {\n        newTranslateY = translateY;\n      }\n    }\n    if (!useHtmlLabels) {\n      // Fix so non html labels are better centered.\n      // BBox of text seems to be slightly different when calculated so we offset\n      newTranslateY -= 4;\n    }\n    let newTranslateX = x;\n    if (\n      text.attr('class').includes('label-group') ||\n      text.attr('class').includes('annotation-group')\n    ) {\n      newTranslateX = -text.node()?.getBBox().width / 2 || 0;\n      shapeSvg.selectAll('text').each(function (_: any, i: number, nodes: any) {\n        if (window.getComputedStyle(nodes[i]).textAnchor === 'middle') {\n          newTranslateX = 0;\n        }\n      });\n    }\n    // Set the updated transform attribute\n    text.attr('transform', `translate(${newTranslateX}, ${newTranslateY})`);\n  });\n\n  // Render divider lines.\n  // Line y-values are offset by 0.001 so gradient stroke can apply.\n  // If y-values are the same then the height of the bounding box is zero and it doesn't work.\n  // First line (under label)\n  if (classNode.members.length > 0 || classNode.methods.length > 0 || renderExtraBox) {\n    const firstLineY = annotationGroupHeight + labelGroupHeight + y + PADDING;\n    const roughLine = rc.line(\n      rectBBox.x,\n      firstLineY,\n      rectBBox.x + rectBBox.width,\n      firstLineY + 0.001,\n      options\n    );\n    const line = shapeSvg.insert(() => roughLine);\n    line\n      .attr('class', `divider${node.look === 'neo' && !useGradient ? ' neo-line' : ''}`)\n      .attr('style', styles);\n  }\n\n  // Second line (under members)\n  if (renderExtraBox || classNode.members.length > 0 || classNode.methods.length > 0) {\n    const secondLineY =\n      annotationGroupHeight + labelGroupHeight + membersGroupHeight + y + GAP * 2 + PADDING;\n    const roughLine = rc.line(\n      rectBBox.x,\n      nodeHeightGreater ? Math.max(methodsAreaPlacement, secondLineY) : secondLineY,\n      rectBBox.x + rectBBox.width,\n      (nodeHeightGreater ? Math.max(methodsAreaPlacement, secondLineY) : secondLineY) + 0.001,\n      options\n    );\n    const line = shapeSvg.insert(() => roughLine);\n    line\n      .attr('class', `divider${node.look === 'neo' && !useGradient ? ' neo-line' : ''}`)\n      .attr('style', styles);\n  }\n\n  /// Apply styles ///\n  if (classNode.look !== 'handDrawn') {\n    shapeSvg.selectAll('path').attr('style', styles);\n  }\n  // Apply other styles like stroke-width and stroke-dasharray to border (not background of shape)\n  rect.select(':nth-child(2)').attr('style', styles);\n  // Divider lines\n  shapeSvg.selectAll('.divider').select('path').attr('style', styles);\n  // Text elements\n  if (node.labelStyle) {\n    shapeSvg.selectAll('span').attr('style', node.labelStyle);\n  } else {\n    shapeSvg.selectAll('span').attr('style', styles);\n  }\n  // SVG text uses fill not color\n  if (!useHtmlLabels) {\n    // We just want to apply color to the text\n    const colorRegex = RegExp(/color\\s*:\\s*([^;]*)/);\n    const match = colorRegex.exec(styles);\n    if (match) {\n      const colorStyle = match[0].replace('color', 'fill');\n      shapeSvg.selectAll('tspan').attr('style', colorStyle);\n    } else if (labelStyles) {\n      const match = colorRegex.exec(labelStyles);\n      if (match) {\n        const colorStyle = match[0].replace('color', 'fill');\n        shapeSvg.selectAll('tspan').attr('style', colorStyle);\n      }\n    }\n  }\n\n  updateNodeBounds(node, rect);\n  node.intersect = function (point) {\n    return intersect.rect(node, point);\n  };\n\n  return shapeSvg;\n}\n","import { getNodeClasses, updateNodeBounds } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { calculateTextWidth, decodeEntities } from '../../../utils.js';\nimport { getConfig, sanitizeText } from '../../../diagram-api/diagramAPI.js';\nimport { createText } from '../../createText.js';\nimport { select } from 'd3';\nimport type { Requirement, Element } from '../../../diagrams/requirement/types.js';\n\nexport async function requirementBox<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const requirementNode = node as unknown as Requirement;\n  const elementNode = node as unknown as Element;\n  const padding = 20;\n  const gap = 20;\n  const isRequirementNode = 'verifyMethod' in node;\n  const classes = getNodeClasses(node);\n  const { themeVariables } = getConfig();\n  const { borderColorArray, requirementEdgeLabelBackground } = themeVariables;\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  let typeHeight;\n  if (isRequirementNode) {\n    typeHeight = await addText(\n      shapeSvg,\n      `&lt;&lt;${requirementNode.type}&gt;&gt;`,\n      0,\n      node.labelStyle\n    );\n  } else {\n    typeHeight = await addText(shapeSvg, '&lt;&lt;Element&gt;&gt;', 0, node.labelStyle);\n  }\n\n  let accumulativeHeight = typeHeight;\n  const nameHeight = await addText(\n    shapeSvg,\n    requirementNode.name,\n    accumulativeHeight,\n    node.labelStyle + '; font-weight: bold;'\n  );\n  accumulativeHeight += nameHeight + gap;\n\n  // Requirement\n  if (isRequirementNode) {\n    const idHeight = await addText(\n      shapeSvg,\n      `${requirementNode.requirementId ? `ID: ${requirementNode.requirementId}` : ''}`,\n      accumulativeHeight,\n      node.labelStyle\n    );\n\n    accumulativeHeight += idHeight;\n    const textHeight = await addText(\n      shapeSvg,\n      `${requirementNode.text ? `Text: ${requirementNode.text}` : ''}`,\n      accumulativeHeight,\n      node.labelStyle\n    );\n    accumulativeHeight += textHeight;\n    const riskHeight = await addText(\n      shapeSvg,\n      `${requirementNode.risk ? `Risk: ${requirementNode.risk}` : ''}`,\n      accumulativeHeight,\n      node.labelStyle\n    );\n    accumulativeHeight += riskHeight;\n    await addText(\n      shapeSvg,\n      `${requirementNode.verifyMethod ? `Verification: ${requirementNode.verifyMethod}` : ''}`,\n      accumulativeHeight,\n      node.labelStyle\n    );\n  } else {\n    // Element\n    const typeHeight = await addText(\n      shapeSvg,\n      `${elementNode.type ? `Type: ${elementNode.type}` : ''}`,\n      accumulativeHeight,\n      node.labelStyle\n    );\n    accumulativeHeight += typeHeight;\n    await addText(\n      shapeSvg,\n      `${elementNode.docRef ? `Doc Ref: ${elementNode.docRef}` : ''}`,\n      accumulativeHeight,\n      node.labelStyle\n    );\n  }\n\n  const totalWidth = (shapeSvg.node()?.getBBox().width ?? 200) + padding;\n  const totalHeight = (shapeSvg.node()?.getBBox().height ?? 200) + padding;\n  const x = -totalWidth / 2;\n  const y = -totalHeight / 2;\n\n  // Setup roughjs\n  // @ts-ignore TODO: Fix rough typings\n  const rc = rough.svg(shapeSvg);\n  const options = userNodeOverrides(node, {});\n\n  if (node.look !== 'handDrawn') {\n    options.roughness = 0;\n    options.fillStyle = 'solid';\n  }\n\n  // Create and center rectangle\n  const roughRect = rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n  const rect = shapeSvg.insert(() => roughRect, ':first-child');\n  rect.attr('class', 'basic label-container outer-path').attr('style', nodeStyles);\n\n  if (borderColorArray?.length) {\n    const colorIndex = node.colorIndex ?? 0;\n    shapeSvg.attr('data-color-id', `color-${colorIndex % borderColorArray.length}`);\n  }\n\n  // Re-translate labels now that rect is centered\n  // eslint-disable-next-line @typescript-eslint/no-explicit-any\n  shapeSvg.selectAll('.label').each((_: any, i: number, nodes: any) => {\n    // eslint-disable-next-line @typescript-eslint/no-explicit-any\n    const text = select<any, unknown>(nodes[i]);\n\n    const transform = text.attr('transform');\n    let translateX = 0;\n    let translateY = 0;\n    if (transform) {\n      const regex = RegExp(/translate\\(([^,]+),([^)]+)\\)/);\n      const translate = regex.exec(transform);\n      if (translate) {\n        translateX = parseFloat(translate[1]);\n        translateY = parseFloat(translate[2]);\n      }\n    }\n\n    const newTranslateY = translateY - totalHeight / 2;\n    let newTranslateX = x + padding / 2;\n\n    // Keep type and name labels centered.\n    if (i === 0 || i === 1) {\n      newTranslateX = translateX;\n    }\n    // Set the updated transform attribute\n    text.attr('transform', `translate(${newTranslateX}, ${newTranslateY + padding})`);\n  });\n\n  // Insert divider line if there is body text\n  if (accumulativeHeight > typeHeight + nameHeight + gap) {\n    const lineY = y + typeHeight + nameHeight + gap;\n    let roughLine: SVGGElement;\n    if (node.look === 'neo') {\n      const thickness = 0.001;\n      const polygonPoints: [number, number][] = [\n        [x, lineY],\n        [x + totalWidth, lineY],\n        [x + totalWidth, lineY + thickness],\n        [x, lineY + thickness],\n      ];\n      roughLine = rc.polygon(polygonPoints, options);\n    } else {\n      roughLine = rc.line(x, lineY, x + totalWidth, lineY, options);\n    }\n    const dividerLine = shapeSvg.insert(() => roughLine);\n    dividerLine.attr('class', 'divider');\n  }\n\n  updateNodeBounds(node, rect);\n\n  node.intersect = function (point) {\n    return intersect.rect(node, point);\n  };\n\n  if (\n    nodeStyles &&\n    node.look !== 'handDrawn' &&\n    (requirementEdgeLabelBackground || borderColorArray?.length)\n  ) {\n    shapeSvg.selectAll('path').attr('style', nodeStyles);\n  }\n\n  return shapeSvg;\n}\n\nasync function addText<T extends SVGGraphicsElement>(\n  parentGroup: D3Selection<T>,\n  inputText: string,\n  yOffset: number,\n  style = ''\n) {\n  if (inputText === '') {\n    return 0;\n  }\n  const textEl = parentGroup.insert('g').attr('class', 'label').attr('style', style);\n  const config = getConfig();\n  const useHtmlLabels = config.htmlLabels ?? true;\n\n  const text = await createText(\n    textEl,\n    sanitizeText(decodeEntities(inputText)),\n    {\n      width: calculateTextWidth(inputText, config) + 50, // Add room for error when splitting text into multiple lines\n      classes: 'markdown-node-label',\n      useHtmlLabels,\n      style,\n    },\n    config\n  );\n  let bbox;\n\n  if (!useHtmlLabels) {\n    const textChild = text.children[0];\n    for (const child of textChild.children) {\n      if (style) {\n        child.setAttribute('style', style);\n      }\n    }\n    // Get the bounding box after the style update\n    bbox = text.getBBox();\n    // Add extra height so it is similar to the html labels\n    bbox.height += 6;\n  } else {\n    const div = text.children[0];\n    const dv = select(text);\n\n    bbox = div.getBoundingClientRect();\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  }\n\n  // Center text and offset by yOffset\n  textEl.attr('transform', `translate(${-bbox.width / 2},${-bbox.height / 2 + yOffset})`);\n  return bbox.height;\n}\n","import { labelHelper, insertLabel, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node, KanbanNode, ShapeRenderOptions } from '../../types.js';\nimport { createRoundedRectPathD } from './roundedRectPath.js';\nimport { userNodeOverrides, styles2String } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\n\nconst colorFromPriority = (priority: NonNullable<KanbanNode['priority']>) => {\n  switch (priority) {\n    case 'Very High':\n      return 'red';\n    case 'High':\n      return 'orange';\n    case 'Medium':\n      return null; // no stroke\n    case 'Low':\n      return 'blue';\n    case 'Very Low':\n      return 'lightblue';\n  }\n};\nexport async function kanbanItem<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  // Omit the 'shape' prop since otherwise, it causes a TypeScript circular dependency error\n  kanbanNode: Omit<Node, 'shape'> | Omit<KanbanNode, 'level' | 'shape'>,\n  { config }: ShapeRenderOptions\n) {\n  const { labelStyles, nodeStyles } = styles2String(kanbanNode);\n  kanbanNode.labelStyle = labelStyles || '';\n\n  const labelPaddingX = 10;\n  const orgWidth = kanbanNode.width;\n  kanbanNode.width = (kanbanNode.width ?? 200) - 10;\n\n  const {\n    shapeSvg,\n    bbox,\n    label: labelElTitle,\n  } = await labelHelper(parent, kanbanNode, getNodeClasses(kanbanNode));\n  const padding = kanbanNode.padding || 10;\n\n  let ticketUrl = '';\n  let link;\n\n  if ('ticket' in kanbanNode && kanbanNode.ticket && config?.kanban?.ticketBaseUrl) {\n    ticketUrl = config?.kanban?.ticketBaseUrl.replace('#TICKET#', kanbanNode.ticket);\n    link = shapeSvg\n      .insert<SVGAElement>('svg:a', ':first-child')\n      .attr('class', 'kanban-ticket-link')\n      .attr('xlink:href', ticketUrl)\n      .attr('target', '_blank');\n  }\n\n  const options = {\n    useHtmlLabels: kanbanNode.useHtmlLabels,\n    labelStyle: kanbanNode.labelStyle || '',\n    width: kanbanNode.width,\n    img: kanbanNode.img,\n    padding: kanbanNode.padding || 8,\n    centerLabel: false,\n  };\n  let labelEl, bbox2;\n  if (link) {\n    ({ label: labelEl, bbox: bbox2 } = await insertLabel(\n      link,\n      ('ticket' in kanbanNode && kanbanNode.ticket) || '',\n      options\n    ));\n  } else {\n    ({ label: labelEl, bbox: bbox2 } = await insertLabel(\n      shapeSvg,\n      ('ticket' in kanbanNode && kanbanNode.ticket) || '',\n      options\n    ));\n  }\n  const { label: labelElAssigned, bbox: bboxAssigned } = await insertLabel(\n    shapeSvg,\n    ('assigned' in kanbanNode && kanbanNode.assigned) || '',\n    options\n  );\n  kanbanNode.width = orgWidth;\n  const labelPaddingY = 10;\n  const totalWidth = kanbanNode?.width || 0;\n  const heightAdj = Math.max(bbox2.height, bboxAssigned.height) / 2;\n  const totalHeight =\n    Math.max(bbox.height + labelPaddingY * 2, kanbanNode?.height || 0) + heightAdj;\n  const x = -totalWidth / 2;\n  const y = -totalHeight / 2;\n  labelElTitle.attr(\n    'transform',\n    'translate(' + (padding - totalWidth / 2) + ', ' + (-heightAdj - bbox.height / 2) + ')'\n  );\n  labelEl.attr(\n    'transform',\n    'translate(' + (padding - totalWidth / 2) + ', ' + (-heightAdj + bbox.height / 2) + ')'\n  );\n  labelElAssigned.attr(\n    'transform',\n    'translate(' +\n      (padding + totalWidth / 2 - bboxAssigned.width - 2 * labelPaddingX) +\n      ', ' +\n      (-heightAdj + bbox.height / 2) +\n      ')'\n  );\n\n  let rect;\n\n  const { rx, ry } = kanbanNode;\n  const { cssStyles } = kanbanNode;\n\n  if (kanbanNode.look === 'handDrawn') {\n    // @ts-ignore TODO: Fix rough typings\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(kanbanNode, {});\n\n    const roughNode =\n      rx || ry\n        ? rc.path(createRoundedRectPathD(x, y, totalWidth, totalHeight, rx || 0), options)\n        : rc.rectangle(x, y, totalWidth, totalHeight, options);\n\n    rect = shapeSvg.insert(() => roughNode, ':first-child');\n    rect.attr('class', 'basic label-container').attr('style', cssStyles ? cssStyles : null);\n  } else {\n    rect = shapeSvg.insert('rect', ':first-child');\n\n    rect\n      .attr('class', 'basic label-container __APA__')\n      .attr('style', nodeStyles)\n      .attr('rx', rx ?? 5)\n      .attr('ry', ry ?? 5)\n      .attr('x', x)\n      .attr('y', y)\n      .attr('width', totalWidth)\n      .attr('height', totalHeight);\n\n    const priority = 'priority' in kanbanNode && kanbanNode.priority;\n    if (priority) {\n      const line = shapeSvg.append('line');\n      const lineX = x + 2;\n\n      const y1 = y + Math.floor((rx ?? 0) / 2);\n      const y2 = y + totalHeight - Math.floor((rx ?? 0) / 2);\n      line\n        .attr('x1', lineX)\n        .attr('y1', y1)\n        .attr('x2', lineX)\n        .attr('y2', y2)\n\n        .attr('stroke-width', '4')\n        .attr('stroke', colorFromPriority(priority));\n    }\n  }\n\n  updateNodeBounds(kanbanNode, rect);\n  kanbanNode.height = totalHeight;\n\n  kanbanNode.intersect = function (point) {\n    return intersect.rect(kanbanNode, point);\n  };\n\n  return shapeSvg;\n}\n","import { log } from '../../../logger.js';\nimport { labelHelper, updateNodeBounds, getNodeClasses } from './util.js';\nimport intersect from '../intersect/index.js';\nimport type { Node } from '../../types.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport rough from 'roughjs';\nimport type { D3Selection } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\nimport type { Bounds, Point } from '../../../types.js';\n\nexport async function bang<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n  const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n    parent,\n    node,\n    getNodeClasses(node)\n  );\n\n  const w = bbox.width + 10 * halfPadding;\n  const h = bbox.height + 8 * halfPadding;\n  const r = 0.15 * w;\n  const { cssStyles } = node;\n\n  const minWidth = bbox.width + 20;\n  const minHeight = bbox.height + 20;\n  const effectiveWidth = Math.max(w, minWidth);\n  const effectiveHeight = Math.max(h, minHeight);\n\n  label.attr('transform', `translate(${-bbox.width / 2}, ${-bbox.height / 2})`);\n\n  let bangElem;\n  const path = `M0 0 \n    a${r},${r} 1 0,0 ${effectiveWidth * 0.25},${-1 * effectiveHeight * 0.1}\n    a${r},${r} 1 0,0 ${effectiveWidth * 0.25},${0}\n    a${r},${r} 1 0,0 ${effectiveWidth * 0.25},${0}\n    a${r},${r} 1 0,0 ${effectiveWidth * 0.25},${effectiveHeight * 0.1}\n\n    a${r},${r} 1 0,0 ${effectiveWidth * 0.15},${effectiveHeight * 0.33}\n    a${r * 0.8},${r * 0.8} 1 0,0 0,${effectiveHeight * 0.34}\n    a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.15},${effectiveHeight * 0.33}\n\n    a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.25},${effectiveHeight * 0.15}\n    a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.25},0\n    a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.25},0\n    a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.25},${-1 * effectiveHeight * 0.15}\n\n    a${r},${r} 1 0,0 ${-1 * effectiveWidth * 0.1},${-1 * effectiveHeight * 0.33}\n    a${r * 0.8},${r * 0.8} 1 0,0 0,${-1 * effectiveHeight * 0.34}\n    a${r},${r} 1 0,0 ${effectiveWidth * 0.1},${-1 * effectiveHeight * 0.33}\n  H0 V0 Z`;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const roughNode = rc.path(path, options);\n    bangElem = shapeSvg.insert(() => roughNode, ':first-child');\n    bangElem.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n  } else {\n    bangElem = shapeSvg\n      .insert('path', ':first-child')\n      .attr('class', 'basic label-container')\n      .attr('style', nodeStyles)\n      .attr('d', path);\n  }\n\n  // Translate the path (center the shape)\n  bangElem.attr('transform', `translate(${-effectiveWidth / 2}, ${-effectiveHeight / 2})`);\n\n  updateNodeBounds(node, bangElem);\n  node.calcIntersect = function (bounds: Bounds, point: Point) {\n    return intersect.rect(bounds, point);\n  };\n  node.intersect = function (point) {\n    log.info('Bang intersect', node, point);\n    return intersect.rect(node, point);\n  };\n\n  return shapeSvg;\n}\n","import rough from 'roughjs';\nimport { log } from '../../../logger.js';\nimport type { Bounds, D3Selection, Point } from '../../../types.js';\nimport { handleUndefinedAttr } from '../../../utils.js';\nimport type { Node } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String, userNodeOverrides } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';\n\nexport async function cloud<T extends SVGGraphicsElement>(parent: D3Selection<T>, node: Node) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n    parent,\n    node,\n    getNodeClasses(node)\n  );\n\n  const w = bbox.width + 2 * halfPadding;\n  const h = bbox.height + 2 * halfPadding;\n\n  // Cloud radii\n  const r1 = 0.15 * w;\n  const r2 = 0.25 * w;\n  const r3 = 0.35 * w;\n  const r4 = 0.2 * w;\n\n  const { cssStyles } = node;\n  let cloudElem;\n\n  // Cloud path\n  const path = `M0 0 \n    a${r1},${r1} 0 0,1 ${w * 0.25},${-1 * w * 0.1}\n    a${r3},${r3} 1 0,1 ${w * 0.4},${-1 * w * 0.1}\n    a${r2},${r2} 1 0,1 ${w * 0.35},${w * 0.2}\n\n    a${r1},${r1} 1 0,1 ${w * 0.15},${h * 0.35}\n    a${r4},${r4} 1 0,1 ${-1 * w * 0.15},${h * 0.65}\n\n    a${r2},${r1} 1 0,1 ${-1 * w * 0.25},${w * 0.15}\n    a${r3},${r3} 1 0,1 ${-1 * w * 0.5},0\n    a${r1},${r1} 1 0,1 ${-1 * w * 0.25},${-1 * w * 0.15}\n\n    a${r1},${r1} 1 0,1 ${-1 * w * 0.1},${-1 * h * 0.35}\n    a${r4},${r4} 1 0,1 ${w * 0.1},${-1 * h * 0.65}\n  H0 V0 Z`;\n\n  if (node.look === 'handDrawn') {\n    // @ts-expect-error -- Passing a D3.Selection seems to work for some reason\n    const rc = rough.svg(shapeSvg);\n    const options = userNodeOverrides(node, {});\n    const roughNode = rc.path(path, options);\n    cloudElem = shapeSvg.insert(() => roughNode, ':first-child');\n    cloudElem.attr('class', 'basic label-container').attr('style', handleUndefinedAttr(cssStyles));\n  } else {\n    cloudElem = shapeSvg\n      .insert('path', ':first-child')\n      .attr('class', 'basic label-container')\n      .attr('style', nodeStyles)\n      .attr('d', path);\n  }\n\n  label.attr('transform', `translate(${-bbox.width / 2}, ${-bbox.height / 2})`);\n\n  // Center the shape\n  cloudElem.attr('transform', `translate(${-w / 2}, ${-h / 2})`);\n\n  updateNodeBounds(node, cloudElem);\n\n  node.calcIntersect = function (bounds: Bounds, point: Point) {\n    return intersect.rect(bounds, point);\n  };\n  node.intersect = function (point) {\n    log.info('Cloud intersect', node, point);\n    return intersect.rect(node, point);\n  };\n\n  return shapeSvg;\n}\n","import type { Bounds, D3Selection, Point } from '../../../types.js';\nimport type { Node } from '../../types.js';\nimport intersect from '../intersect/index.js';\nimport { styles2String } from './handDrawnShapeStyles.js';\nimport { getNodeClasses, labelHelper, updateNodeBounds } from './util.js';\n\nexport async function defaultMindmapNode<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const { labelStyles, nodeStyles } = styles2String(node);\n  node.labelStyle = labelStyles;\n\n  const { shapeSvg, bbox, halfPadding, label } = await labelHelper(\n    parent,\n    node,\n    getNodeClasses(node)\n  );\n\n  const w = bbox.width + 8 * halfPadding;\n  const h = bbox.height + 2 * halfPadding;\n  const rd = 5;\n\n  // Neo look: rounded top corners only, flat bottom edge (tab-like shape).\n  const rectPath =\n    node.look === 'neo'\n      ? `\n    M${-w / 2} ${h / 2 - rd}\n    v${-h + 2 * rd}\n    q0,-${rd} ${rd},-${rd}\n    h${w - 2 * rd}\n    q${rd},0 ${rd},${rd}\n    v${h - rd}\n    H${-w / 2}\n    Z\n  `\n      : `\n    M${-w / 2} ${h / 2 - rd}\n    v${-h + 2 * rd}\n    q0,-${rd} ${rd},-${rd}\n    h${w - 2 * rd}\n    q${rd},0 ${rd},${rd}\n    v${h - 2 * rd}\n    q0,${rd} ${-rd},${rd}\n    h${-(w - 2 * rd)}\n    q${-rd},0 ${-rd},${-rd}\n    Z\n  `;\n\n  if (!node.domId) {\n    throw new Error(\n      `defaultMindmapNode: node \"${node.id}\" is missing a domId — was render.ts domId prefixing skipped?`\n    );\n  }\n\n  const bg = shapeSvg\n    .append('path')\n    .attr('id', node.domId)\n    .attr('class', 'node-bkg node-' + node.type)\n    .attr('style', nodeStyles)\n    .attr('d', rectPath);\n\n  shapeSvg\n    .append('line')\n    .attr('class', 'node-line-')\n    .attr('x1', -w / 2)\n    .attr('y1', h / 2)\n    .attr('x2', w / 2)\n    .attr('y2', h / 2);\n\n  label.attr('transform', `translate(${-bbox.width / 2}, ${-bbox.height / 2})`);\n  shapeSvg.append(() => label.node());\n\n  updateNodeBounds(node, bg);\n  node.calcIntersect = function (bounds: Bounds, point: Point) {\n    return intersect.rect(bounds, point);\n  };\n  node.intersect = function (point) {\n    return intersect.rect(node, point);\n  };\n\n  return shapeSvg;\n}\n","import { circle } from './circle.js';\nimport type { Node, MindmapOptions } from '../../types.js';\nimport type { D3Selection } from '../../../types.js';\n\nexport async function mindmapCircle<T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node\n) {\n  const options = {\n    padding: node.padding ?? 0,\n  } as MindmapOptions;\n  return circle(parent, node, options);\n}\n","import type { Entries } from 'type-fest';\nimport type { D3Selection, MaybePromise } from '../../types.js';\nimport type { Node, ShapeRenderOptions } from '../types.js';\nimport { anchor } from './shapes/anchor.js';\nimport { bowTieRect } from './shapes/bowTieRect.js';\nimport { card } from './shapes/card.js';\nimport { choice } from './shapes/choice.js';\nimport { circle } from './shapes/circle.js';\nimport { crossedCircle } from './shapes/crossedCircle.js';\nimport { curlyBraceLeft } from './shapes/curlyBraceLeft.js';\nimport { curlyBraceRight } from './shapes/curlyBraceRight.js';\nimport { curlyBraces } from './shapes/curlyBraces.js';\nimport { curvedTrapezoid } from './shapes/curvedTrapezoid.js';\nimport { cylinder } from './shapes/cylinder.js';\nimport { datastore } from './shapes/datastore.js';\nimport { dividedRectangle } from './shapes/dividedRect.js';\nimport { doublecircle } from './shapes/doubleCircle.js';\nimport { filledCircle } from './shapes/filledCircle.js';\nimport { flippedTriangle } from './shapes/flippedTriangle.js';\nimport { forkJoin } from './shapes/forkJoin.js';\nimport { halfRoundedRectangle } from './shapes/halfRoundedRectangle.js';\nimport { hexagon } from './shapes/hexagon.js';\nimport { hourglass } from './shapes/hourglass.js';\nimport { icon } from './shapes/icon.js';\nimport { iconCircle } from './shapes/iconCircle.js';\nimport { iconRounded } from './shapes/iconRounded.js';\nimport { iconSquare } from './shapes/iconSquare.js';\nimport { imageSquare } from './shapes/imageSquare.js';\nimport { inv_trapezoid } from './shapes/invertedTrapezoid.js';\nimport { labelRect } from './shapes/labelRect.js';\nimport { lean_left } from './shapes/leanLeft.js';\nimport { lean_right } from './shapes/leanRight.js';\nimport { lightningBolt } from './shapes/lightningBolt.js';\nimport { linedCylinder } from './shapes/linedCylinder.js';\nimport { linedWaveEdgedRect } from './shapes/linedWaveEdgedRect.js';\nimport { multiRect } from './shapes/multiRect.js';\nimport { multiWaveEdgedRectangle } from './shapes/multiWaveEdgedRectangle.js';\nimport { note } from './shapes/note.js';\nimport { question } from './shapes/question.js';\nimport { rect_left_inv_arrow } from './shapes/rectLeftInvArrow.js';\nimport { rectWithTitle } from './shapes/rectWithTitle.js';\nimport { roundedRect } from './shapes/roundedRect.js';\nimport { shadedProcess } from './shapes/shadedProcess.js';\nimport { slopedRect } from './shapes/slopedRect.js';\nimport { squareRect } from './shapes/squareRect.js';\nimport { stadium } from './shapes/stadium.js';\nimport { state } from './shapes/state.js';\nimport { stateEnd } from './shapes/stateEnd.js';\nimport { stateStart } from './shapes/stateStart.js';\nimport { subroutine } from './shapes/subroutine.js';\nimport { taggedRect } from './shapes/taggedRect.js';\nimport { taggedWaveEdgedRectangle } from './shapes/taggedWaveEdgedRectangle.js';\nimport { text } from './shapes/text.js';\nimport { tiltedCylinder } from './shapes/tiltedCylinder.js';\nimport { trapezoid } from './shapes/trapezoid.js';\nimport { trapezoidalPentagon } from './shapes/trapezoidalPentagon.js';\nimport { triangle } from './shapes/triangle.js';\nimport { waveEdgedRectangle } from './shapes/waveEdgedRectangle.js';\nimport { waveRectangle } from './shapes/waveRectangle.js';\nimport { windowPane } from './shapes/windowPane.js';\nimport { erBox } from './shapes/erBox.js';\nimport { classBox } from './shapes/classBox.js';\nimport { requirementBox } from './shapes/requirementBox.js';\nimport { kanbanItem } from './shapes/kanbanItem.js';\nimport { bang } from './shapes/bang.js';\nimport { cloud } from './shapes/cloud.js';\nimport { defaultMindmapNode } from './shapes/defaultMindmapNode.js';\nimport { mindmapCircle } from './shapes/mindmapCircle.js';\n\ntype ShapeHandler = <T extends SVGGraphicsElement>(\n  parent: D3Selection<T>,\n  node: Node,\n  options: ShapeRenderOptions\n) => MaybePromise<D3Selection<SVGGElement>>;\n\nexport interface ShapeDefinition {\n  semanticName: string;\n  name: string;\n  shortName: string;\n  description: string;\n  /**\n   * Aliases can include descriptive names, other short names, etc.\n   */\n  aliases?: string[];\n  /**\n   * These are names used by mermaid before the introduction of new shapes. These will not be in standard formats, and shouldn't be used by the users\n   */\n  internalAliases?: string[];\n  handler: ShapeHandler;\n}\n\nexport const shapesDefs = [\n  {\n    semanticName: 'Process',\n    name: 'Rectangle',\n    shortName: 'rect',\n    description: 'Standard process shape',\n    aliases: ['proc', 'process', 'rectangle'],\n    internalAliases: ['squareRect'],\n    handler: squareRect,\n  },\n  {\n    semanticName: 'Event',\n    name: 'Rounded Rectangle',\n    shortName: 'rounded',\n    description: 'Represents an event',\n    aliases: ['event'],\n    internalAliases: ['roundedRect'],\n    handler: roundedRect,\n  },\n  {\n    semanticName: 'Terminal Point',\n    name: 'Stadium',\n    shortName: 'stadium',\n    description: 'Terminal point',\n    aliases: ['terminal', 'pill'],\n    handler: stadium,\n  },\n  {\n    semanticName: 'Subprocess',\n    name: 'Framed Rectangle',\n    shortName: 'fr-rect',\n    description: 'Subprocess',\n    aliases: ['subprocess', 'subproc', 'framed-rectangle', 'subroutine'],\n    handler: subroutine,\n  },\n  {\n    semanticName: 'Database',\n    name: 'Cylinder',\n    shortName: 'cyl',\n    description: 'Database storage',\n    aliases: ['db', 'database', 'cylinder'],\n    handler: cylinder,\n  },\n  {\n    semanticName: 'Data Store',\n    name: 'Data Store',\n    shortName: 'datastore',\n    description: 'Data flow diagram data store',\n    aliases: ['data-store'],\n    handler: datastore,\n  },\n  {\n    semanticName: 'Start',\n    name: 'Circle',\n    shortName: 'circle',\n    description: 'Starting point',\n    aliases: ['circ'],\n    handler: circle,\n  },\n  {\n    semanticName: 'Bang',\n    name: 'Bang',\n    shortName: 'bang',\n    description: 'Bang',\n    aliases: ['bang'],\n    handler: bang,\n  },\n  {\n    semanticName: 'Cloud',\n    name: 'Cloud',\n    shortName: 'cloud',\n    description: 'cloud',\n    aliases: ['cloud'],\n    handler: cloud,\n  },\n  {\n    semanticName: 'Decision',\n    name: 'Diamond',\n    shortName: 'diam',\n    description: 'Decision-making step',\n    aliases: ['decision', 'diamond', 'question'],\n    handler: question,\n  },\n  {\n    semanticName: 'Prepare Conditional',\n    name: 'Hexagon',\n    shortName: 'hex',\n    description: 'Preparation or condition step',\n    aliases: ['hexagon', 'prepare'],\n    handler: hexagon,\n  },\n  {\n    semanticName: 'Data Input/Output',\n    name: 'Lean Right',\n    shortName: 'lean-r',\n    description: 'Represents input or output',\n    aliases: ['lean-right', 'in-out'],\n    internalAliases: ['lean_right'],\n    handler: lean_right,\n  },\n  {\n    semanticName: 'Data Input/Output',\n    name: 'Lean Left',\n    shortName: 'lean-l',\n    description: 'Represents output or input',\n    aliases: ['lean-left', 'out-in'],\n    internalAliases: ['lean_left'],\n    handler: lean_left,\n  },\n  {\n    semanticName: 'Priority Action',\n    name: 'Trapezoid Base Bottom',\n    shortName: 'trap-b',\n    description: 'Priority action',\n    aliases: ['priority', 'trapezoid-bottom', 'trapezoid'],\n    handler: trapezoid,\n  },\n  {\n    semanticName: 'Manual Operation',\n    name: 'Trapezoid Base Top',\n    shortName: 'trap-t',\n    description: 'Represents a manual task',\n    aliases: ['manual', 'trapezoid-top', 'inv-trapezoid'],\n    internalAliases: ['inv_trapezoid'],\n    handler: inv_trapezoid,\n  },\n  {\n    semanticName: 'Stop',\n    name: 'Double Circle',\n    shortName: 'dbl-circ',\n    description: 'Represents a stop point',\n    aliases: ['double-circle'],\n    internalAliases: ['doublecircle'],\n    handler: doublecircle,\n  },\n  {\n    semanticName: 'Text Block',\n    name: 'Text Block',\n    shortName: 'text',\n    description: 'Text block',\n    handler: text,\n  },\n  {\n    semanticName: 'Card',\n    name: 'Notched Rectangle',\n    shortName: 'notch-rect',\n    description: 'Represents a card',\n    aliases: ['card', 'notched-rectangle'],\n    handler: card,\n  },\n  {\n    semanticName: 'Lined/Shaded Process',\n    name: 'Lined Rectangle',\n    shortName: 'lin-rect',\n    description: 'Lined process shape',\n    aliases: ['lined-rectangle', 'lined-process', 'lin-proc', 'shaded-process'],\n    handler: shadedProcess,\n  },\n  {\n    semanticName: 'Start',\n    name: 'Small Circle',\n    shortName: 'sm-circ',\n    description: 'Small starting point',\n    aliases: ['start', 'small-circle'],\n    internalAliases: ['stateStart'],\n    handler: stateStart,\n  },\n  {\n    semanticName: 'Stop',\n    name: 'Framed Circle',\n    shortName: 'fr-circ',\n    description: 'Stop point',\n    aliases: ['stop', 'framed-circle'],\n    internalAliases: ['stateEnd'],\n    handler: stateEnd,\n  },\n  {\n    semanticName: 'Fork/Join',\n    name: 'Filled Rectangle',\n    shortName: 'fork',\n    description: 'Fork or join in process flow',\n    aliases: ['join'],\n    internalAliases: ['forkJoin'],\n    handler: forkJoin,\n  },\n  {\n    semanticName: 'Collate',\n    name: 'Hourglass',\n    shortName: 'hourglass',\n    description: 'Represents a collate operation',\n    aliases: ['hourglass', 'collate'],\n    handler: hourglass,\n  },\n  {\n    semanticName: 'Comment',\n    name: 'Curly Brace',\n    shortName: 'brace',\n    description: 'Adds a comment',\n    aliases: ['comment', 'brace-l'],\n    handler: curlyBraceLeft,\n  },\n  {\n    semanticName: 'Comment Right',\n    name: 'Curly Brace',\n    shortName: 'brace-r',\n    description: 'Adds a comment',\n    handler: curlyBraceRight,\n  },\n  {\n    semanticName: 'Comment with braces on both sides',\n    name: 'Curly Braces',\n    shortName: 'braces',\n    description: 'Adds a comment',\n    handler: curlyBraces,\n  },\n  {\n    semanticName: 'Com Link',\n    name: 'Lightning Bolt',\n    shortName: 'bolt',\n    description: 'Communication link',\n    aliases: ['com-link', 'lightning-bolt'],\n    handler: lightningBolt,\n  },\n  {\n    semanticName: 'Document',\n    name: 'Document',\n    shortName: 'doc',\n    description: 'Represents a document',\n    aliases: ['doc', 'document'],\n    handler: waveEdgedRectangle,\n  },\n  {\n    semanticName: 'Delay',\n    name: 'Half-Rounded Rectangle',\n    shortName: 'delay',\n    description: 'Represents a delay',\n    aliases: ['half-rounded-rectangle'],\n    handler: halfRoundedRectangle,\n  },\n  {\n    semanticName: 'Direct Access Storage',\n    name: 'Horizontal Cylinder',\n    shortName: 'h-cyl',\n    description: 'Direct access storage',\n    aliases: ['das', 'horizontal-cylinder'],\n    handler: tiltedCylinder,\n  },\n  {\n    semanticName: 'Disk Storage',\n    name: 'Lined Cylinder',\n    shortName: 'lin-cyl',\n    description: 'Disk storage',\n    aliases: ['disk', 'lined-cylinder'],\n    handler: linedCylinder,\n  },\n  {\n    semanticName: 'Display',\n    name: 'Curved Trapezoid',\n    shortName: 'curv-trap',\n    description: 'Represents a display',\n    aliases: ['curved-trapezoid', 'display'],\n    handler: curvedTrapezoid,\n  },\n  {\n    semanticName: 'Divided Process',\n    name: 'Divided Rectangle',\n    shortName: 'div-rect',\n    description: 'Divided process shape',\n    aliases: ['div-proc', 'divided-rectangle', 'divided-process'],\n    handler: dividedRectangle,\n  },\n  {\n    semanticName: 'Extract',\n    name: 'Triangle',\n    shortName: 'tri',\n    description: 'Extraction process',\n    aliases: ['extract', 'triangle'],\n    handler: triangle,\n  },\n  {\n    semanticName: 'Internal Storage',\n    name: 'Window Pane',\n    shortName: 'win-pane',\n    description: 'Internal storage',\n    aliases: ['internal-storage', 'window-pane'],\n    handler: windowPane,\n  },\n  {\n    semanticName: 'Junction',\n    name: 'Filled Circle',\n    shortName: 'f-circ',\n    description: 'Junction point',\n    aliases: ['junction', 'filled-circle'],\n    handler: filledCircle,\n  },\n  {\n    semanticName: 'Loop Limit',\n    name: 'Trapezoidal Pentagon',\n    shortName: 'notch-pent',\n    description: 'Loop limit step',\n    aliases: ['loop-limit', 'notched-pentagon'],\n    handler: trapezoidalPentagon,\n  },\n  {\n    semanticName: 'Manual File',\n    name: 'Flipped Triangle',\n    shortName: 'flip-tri',\n    description: 'Manual file operation',\n    aliases: ['manual-file', 'flipped-triangle'],\n    handler: flippedTriangle,\n  },\n  {\n    semanticName: 'Manual Input',\n    name: 'Sloped Rectangle',\n    shortName: 'sl-rect',\n    description: 'Manual input step',\n    aliases: ['manual-input', 'sloped-rectangle'],\n    handler: slopedRect,\n  },\n  {\n    semanticName: 'Multi-Document',\n    name: 'Stacked Document',\n    shortName: 'docs',\n    description: 'Multiple documents',\n    aliases: ['documents', 'st-doc', 'stacked-document'],\n    handler: multiWaveEdgedRectangle,\n  },\n  {\n    semanticName: 'Multi-Process',\n    name: 'Stacked Rectangle',\n    shortName: 'st-rect',\n    description: 'Multiple processes',\n    aliases: ['procs', 'processes', 'stacked-rectangle'],\n    handler: multiRect,\n  },\n  {\n    semanticName: 'Stored Data',\n    name: 'Bow Tie Rectangle',\n    shortName: 'bow-rect',\n    description: 'Stored data',\n    aliases: ['stored-data', 'bow-tie-rectangle'],\n    handler: bowTieRect,\n  },\n  {\n    semanticName: 'Summary',\n    name: 'Crossed Circle',\n    shortName: 'cross-circ',\n    description: 'Summary',\n    aliases: ['summary', 'crossed-circle'],\n    handler: crossedCircle,\n  },\n  {\n    semanticName: 'Tagged Document',\n    name: 'Tagged Document',\n    shortName: 'tag-doc',\n    description: 'Tagged document',\n    aliases: ['tag-doc', 'tagged-document'],\n    handler: taggedWaveEdgedRectangle,\n  },\n  {\n    semanticName: 'Tagged Process',\n    name: 'Tagged Rectangle',\n    shortName: 'tag-rect',\n    description: 'Tagged process',\n    aliases: ['tagged-rectangle', 'tag-proc', 'tagged-process'],\n    handler: taggedRect,\n  },\n  {\n    semanticName: 'Paper Tape',\n    name: 'Flag',\n    shortName: 'flag',\n    description: 'Paper tape',\n    aliases: ['paper-tape'],\n    handler: waveRectangle,\n  },\n  {\n    semanticName: 'Odd',\n    name: 'Odd',\n    shortName: 'odd',\n    description: 'Odd shape',\n    internalAliases: ['rect_left_inv_arrow'],\n    handler: rect_left_inv_arrow,\n  },\n  {\n    semanticName: 'Lined Document',\n    name: 'Lined Document',\n    shortName: 'lin-doc',\n    description: 'Lined document',\n    aliases: ['lined-document'],\n    handler: linedWaveEdgedRect,\n  },\n] as const satisfies ShapeDefinition[];\n\nconst generateShapeMap = () => {\n  // These are the shapes that didn't have documentation present\n  const undocumentedShapes = {\n    // States\n    state,\n    choice,\n    note,\n\n    // Rectangles\n    rectWithTitle,\n    labelRect,\n\n    // Icons\n    iconSquare,\n    iconCircle,\n    icon,\n    iconRounded,\n    imageSquare,\n    anchor,\n\n    // Kanban diagram\n    kanbanItem,\n\n    //Mindmap diagram\n    mindmapCircle,\n    defaultMindmapNode,\n    // class diagram\n    classBox,\n\n    // er diagram\n    erBox,\n\n    // Requirement diagram\n    requirementBox,\n  } as const;\n\n  const entries = [\n    ...(Object.entries(undocumentedShapes) as Entries<typeof undocumentedShapes>),\n    ...shapesDefs.flatMap((shape) => {\n      const aliases = [\n        shape.shortName,\n        ...('aliases' in shape ? shape.aliases : []),\n        ...('internalAliases' in shape ? shape.internalAliases : []),\n      ];\n      return aliases.map((alias) => [alias, shape.handler] as const);\n    }),\n  ];\n  return Object.fromEntries(entries) as Record<\n    (typeof entries)[number][0],\n    (typeof entries)[number][1]\n  > satisfies Record<string, ShapeHandler>;\n};\n\nexport const shapes = generateShapeMap();\n\nexport function isValidShape(shape: string): shape is ShapeID {\n  return shape in shapes;\n}\n\nexport type ShapeID = keyof typeof shapes;\n","import { log } from '../../logger.js';\nimport { shapes } from './shapes.js';\nimport type { Node, NonClusterNode, ShapeRenderOptions } from '../types.js';\nimport type { SVGGroup } from '../../mermaid.js';\nimport type { D3Selection } from '../../types.js';\nimport { handleUndefinedAttr } from '../../utils.js';\nimport type { graphlib } from 'dagre-d3-es';\n\ntype ShapeHandler = (typeof shapes)[keyof typeof shapes];\ntype NodeElement = D3Selection<SVGAElement> | Awaited<ReturnType<ShapeHandler>>;\n\nconst nodeElems = new Map<string, NodeElement>();\n\nexport async function insertNode(\n  elem: SVGGroup,\n  node: NonClusterNode,\n  renderOptions: ShapeRenderOptions\n) {\n  let newEl: NodeElement | undefined;\n  let el;\n\n  //special check for rect shape (with or without rounded corners)\n  if (node.shape === 'rect') {\n    if (node.rx && node.ry) {\n      node.shape = 'roundedRect';\n    } else {\n      node.shape = 'squareRect';\n    }\n  }\n\n  const shapeHandler = node.shape ? shapes[node.shape] : undefined;\n\n  if (!shapeHandler) {\n    throw new Error(`No such shape: ${node.shape}. Please check your syntax.`);\n  }\n\n  if (node.link) {\n    // Add link when appropriate\n    let target;\n    if (renderOptions.config.securityLevel === 'sandbox') {\n      target = '_top';\n    } else if (node.linkTarget) {\n      target = node.linkTarget || '_blank';\n    }\n    newEl = elem\n      .insert<SVGAElement>('svg:a')\n      .attr('xlink:href', node.link)\n      .attr('target', target ?? null);\n    el = await shapeHandler(newEl, node, renderOptions);\n  } else {\n    el = await shapeHandler(elem, node, renderOptions);\n    newEl = el;\n  }\n  // Add data attributes for neo look support\n  newEl.attr('data-look', handleUndefinedAttr(node.look));\n\n  if (node.tooltip) {\n    el.attr('title', node.tooltip);\n  }\n\n  nodeElems.set(node.id, newEl);\n\n  if (node.haveCallback) {\n    newEl.attr('class', newEl.attr('class') + ' clickable');\n  }\n  return newEl;\n}\n\nexport const setNodeElem = (elem: NodeElement, node: Pick<Node, 'id'>) => {\n  nodeElems.set(node.id, elem);\n};\n\nexport const clear = () => {\n  nodeElems.clear();\n};\n\nexport const positionNode = (node: ReturnType<graphlib.Graph['node']>) => {\n  const el = nodeElems.get(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 type { EdgeData, Point } from '../types.js';\n\n// We need to draw the lines a bit shorter to avoid drawing\n// under any transparent markers.\n// The offsets are calculated from the markers' dimensions.\nexport const markerOffsets = {\n  aggregation: 17.25,\n  extension: 17.25,\n  composition: 17.25,\n  dependency: 6,\n  lollipop: 13.5,\n  arrow_point: 4,\n  arrow_barb: 0,\n  arrow_barb_neo: 5.5,\n  //arrow_cross: 24,\n} as const;\n\n// We need to draw the lines a bit shorter to avoid drawing\n// under any transparent markers.\n// The offsets are calculated from the markers' dimensions.\nexport const markerOffsets2 = {\n  arrow_point: 4,\n  arrow_cross: 12.5,\n  arrow_circle: 12.5,\n} as const;\n\n/**\n * Calculate the deltas and angle between two points\n * @param point1 - First point\n * @param point2 - Second point\n * @returns The angle, deltaX and deltaY\n */\nfunction calculateDeltaAndAngle(\n  point1?: Point | [number, number],\n  point2?: Point | [number, number]\n): { angle: number; deltaX: number; deltaY: number } {\n  if (point1 === undefined || point2 === undefined) {\n    return { angle: 0, deltaX: 0, deltaY: 0 };\n  }\n  point1 = pointTransformer(point1);\n  point2 = pointTransformer(point2);\n  const [x1, y1] = [point1.x, point1.y];\n  const [x2, y2] = [point2.x, point2.y];\n  const deltaX = x2 - x1;\n  const deltaY = y2 - y1;\n  return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY };\n}\n\nconst pointTransformer = (data: Point | [number, number]) => {\n  if (Array.isArray(data)) {\n    return { x: data[0], y: data[1] };\n  }\n  return data;\n};\n\nexport const getLineFunctionsWithOffset = (\n  edge: Pick<EdgeData, 'arrowTypeStart' | 'arrowTypeEnd'>\n) => {\n  return {\n    x: function (\n      this: void,\n      d: Point | [number, number],\n      i: number,\n      data: (Point | [number, number])[]\n    ) {\n      let offset = 0;\n      const DIRECTION =\n        pointTransformer(data[0]).x < pointTransformer(data[data.length - 1]).x ? 'left' : 'right';\n      if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {\n        const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]);\n        offset =\n          markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets] *\n          Math.cos(angle) *\n          (deltaX >= 0 ? 1 : -1);\n      } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {\n        const { angle, deltaX } = calculateDeltaAndAngle(\n          data[data.length - 1],\n          data[data.length - 2]\n        );\n        offset =\n          markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets] *\n          Math.cos(angle) *\n          (deltaX >= 0 ? 1 : -1);\n      }\n\n      const differenceToEnd = Math.abs(\n        pointTransformer(d).x - pointTransformer(data[data.length - 1]).x\n      );\n      const differenceInYEnd = Math.abs(\n        pointTransformer(d).y - pointTransformer(data[data.length - 1]).y\n      );\n      const differenceToStart = Math.abs(pointTransformer(d).x - pointTransformer(data[0]).x);\n      const differenceInYStart = Math.abs(pointTransformer(d).y - pointTransformer(data[0]).y);\n      const startMarkerHeight = markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets];\n      const endMarkerHeight = markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets];\n      const extraRoom = 1;\n\n      // Adjust the offset if the difference is smaller than the marker height\n      if (\n        differenceToEnd < endMarkerHeight &&\n        differenceToEnd > 0 &&\n        differenceInYEnd < endMarkerHeight\n      ) {\n        let adjustment = endMarkerHeight + extraRoom - differenceToEnd;\n        adjustment *= DIRECTION === 'right' ? -1 : 1;\n        // Adjust the offset by the amount needed to fit the marker\n        offset -= adjustment;\n      }\n\n      if (\n        differenceToStart < startMarkerHeight &&\n        differenceToStart > 0 &&\n        differenceInYStart < startMarkerHeight\n      ) {\n        let adjustment = startMarkerHeight + extraRoom - differenceToStart;\n        adjustment *= DIRECTION === 'right' ? -1 : 1;\n        offset += adjustment;\n      }\n\n      return pointTransformer(d).x + offset;\n    },\n    y: function (\n      this: void,\n      d: Point | [number, number],\n      i: number,\n      data: (Point | [number, number])[]\n    ) {\n      let offset = 0;\n      const DIRECTION =\n        pointTransformer(data[0]).y < pointTransformer(data[data.length - 1]).y ? 'down' : 'up';\n      if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {\n        const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]);\n        offset =\n          markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets] *\n          Math.abs(Math.sin(angle)) *\n          (deltaY >= 0 ? 1 : -1);\n      } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {\n        const { angle, deltaY } = calculateDeltaAndAngle(\n          data[data.length - 1],\n          data[data.length - 2]\n        );\n        offset =\n          markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets] *\n          Math.abs(Math.sin(angle)) *\n          (deltaY >= 0 ? 1 : -1);\n      }\n\n      const differenceToEnd = Math.abs(\n        pointTransformer(d).y - pointTransformer(data[data.length - 1]).y\n      );\n      const differenceInXEnd = Math.abs(\n        pointTransformer(d).x - pointTransformer(data[data.length - 1]).x\n      );\n      const differenceToStart = Math.abs(pointTransformer(d).y - pointTransformer(data[0]).y);\n      const differenceInXStart = Math.abs(pointTransformer(d).x - pointTransformer(data[0]).x);\n      const startMarkerHeight = markerOffsets[edge.arrowTypeStart as keyof typeof markerOffsets];\n      const endMarkerHeight = markerOffsets[edge.arrowTypeEnd as keyof typeof markerOffsets];\n      const extraRoom = 1;\n\n      // Adjust the offset if the difference is smaller than the marker height\n      if (\n        differenceToEnd < endMarkerHeight &&\n        differenceToEnd > 0 &&\n        differenceInXEnd < endMarkerHeight\n      ) {\n        let adjustment = endMarkerHeight + extraRoom - differenceToEnd;\n        adjustment *= DIRECTION === 'up' ? -1 : 1;\n        // Adjust the offset by the amount needed to fit the marker\n        offset -= adjustment;\n      }\n\n      if (\n        differenceToStart < startMarkerHeight &&\n        differenceToStart > 0 &&\n        differenceInXStart < startMarkerHeight\n      ) {\n        let adjustment = startMarkerHeight + extraRoom - differenceToStart;\n        adjustment *= DIRECTION === 'up' ? -1 : 1;\n        offset += adjustment;\n      }\n      return pointTransformer(d).y + offset;\n    },\n  };\n};\n\nif (import.meta.vitest) {\n  const { it, expect, describe } = import.meta.vitest;\n  describe('calculateDeltaAndAngle', () => {\n    it('should calculate the angle and deltas between two points', () => {\n      expect(calculateDeltaAndAngle([0, 0], [0, 1])).toStrictEqual({\n        angle: 1.5707963267948966,\n        deltaX: 0,\n        deltaY: 1,\n      });\n      expect(calculateDeltaAndAngle([1, 0], [0, -1])).toStrictEqual({\n        angle: 0.7853981633974483,\n        deltaX: -1,\n        deltaY: -1,\n      });\n      expect(calculateDeltaAndAngle({ x: 1, y: 0 }, [0, -1])).toStrictEqual({\n        angle: 0.7853981633974483,\n        deltaX: -1,\n        deltaY: -1,\n      });\n      expect(calculateDeltaAndAngle({ x: 1, y: 0 }, { x: 1, y: 0 })).toStrictEqual({\n        angle: NaN,\n        deltaX: 0,\n        deltaY: 0,\n      });\n    });\n\n    it('should calculate the angle and deltas if one point in undefined', () => {\n      expect(calculateDeltaAndAngle(undefined, [0, 1])).toStrictEqual({\n        angle: 0,\n        deltaX: 0,\n        deltaY: 0,\n      });\n      expect(calculateDeltaAndAngle([0, 1], undefined)).toStrictEqual({\n        angle: 0,\n        deltaX: 0,\n        deltaY: 0,\n      });\n    });\n  });\n}\n","import { getConfig } from '../../diagram-api/diagramAPI.js';\nimport { getEffectiveHtmlLabels } from '../../config.js';\nimport { log } from '../../logger.js';\nimport { createText } from '../createText.js';\nimport { computeLabelTransform } from '../labelTransform.js';\nimport utils, { handleUndefinedAttr } from '../../utils.js';\nimport {\n  getLineFunctionsWithOffset,\n  markerOffsets,\n  markerOffsets2,\n} from '../../utils/lineWithOffset.js';\nimport { getSubGraphTitleMargins } from '../../utils/subGraphTitleMargins.js';\n\nimport {\n  curveBasis,\n  curveLinear,\n  curveCardinal,\n  curveBumpX,\n  curveBumpY,\n  curveCatmullRom,\n  curveMonotoneX,\n  curveMonotoneY,\n  curveNatural,\n  curveStep,\n  curveStepAfter,\n  curveStepBefore,\n  line,\n  select,\n} from 'd3';\nimport rough from 'roughjs';\nimport createLabel from './createLabel.js';\nimport { addEdgeMarkers } from './edgeMarker.ts';\nimport { isLabelStyle, styles2String } from './shapes/handDrawnShapeStyles.js';\n\n/**\n * Resolve the effective curve type for an edge.\n * If edge.curve is a string (e.g. 'rounded', 'linear'), use it directly.\n * Otherwise (undefined, null, or a D3 CurveFactory function), fall back to config.\n * @param {*} edgeCurve - The edge.curve value (string, function, or undefined/null)\n * @returns {string|undefined} - The resolved curve type string\n */\nexport const resolveEdgeCurveType = (edgeCurve) => {\n  return typeof edgeCurve === 'string' ? edgeCurve : getConfig()?.flowchart?.curve;\n};\n\nexport const edgeLabels = new Map();\nexport const terminalLabels = new Map();\n\nexport const clear = () => {\n  edgeLabels.clear();\n  terminalLabels.clear();\n};\n\nexport const getLabelStyles = (styleArray) => {\n  if (!styleArray) {\n    return '';\n  }\n  if (typeof styleArray === 'string') {\n    return styleArray;\n  }\n  return styleArray.reduce((acc, style) => acc + ';' + style, '');\n};\n\nexport const insertEdgeLabel = async (elem, edge) => {\n  const config = getConfig();\n  let useHtmlLabels = getEffectiveHtmlLabels(config);\n  const { labelStyles } = styles2String(edge);\n  edge.labelStyle = labelStyles;\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').attr('data-id', edge.id);\n\n  const isMarkdown = edge.labelType === 'markdown';\n  const markdownWidth = undefined; // Use default width for markdown labels\n  const labelElement = await createText(\n    elem,\n    edge.label,\n    {\n      style: getLabelStyles(edge.labelStyle),\n      useHtmlLabels,\n      addSvgBackground: true,\n      isNode: false,\n      markdown: isMarkdown,\n      // Plain text edge labels should auto-wrap, markdown edge labels respect markdownAutoWrap config\n      width: isMarkdown ? markdownWidth : undefined,\n    },\n    config\n  );\n\n  label.node().appendChild(labelElement);\n  log.info('abc82', edge, edge.labelType);\n\n  // Center the label\n  let bbox = labelElement.getBBox();\n  let transformBbox = bbox;\n  if (useHtmlLabels) {\n    const div = labelElement.children[0];\n    const dv = select(labelElement);\n    bbox = div.getBoundingClientRect();\n    transformBbox = bbox;\n    dv.attr('width', bbox.width);\n    dv.attr('height', bbox.height);\n  } else {\n    // For SVG labels, use text element's bbox so the text is centered on the edge\n    const textEl = select(labelElement).select('text').node();\n    if (textEl && typeof textEl.getBBox === 'function') {\n      transformBbox = textEl.getBBox();\n    }\n  }\n  label.attr('transform', computeLabelTransform(transformBbox, useHtmlLabels));\n\n  // Make element accessible by id for positioning\n  edgeLabels.set(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 startEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n    const inner = startEdgeLabelLeft.insert('g').attr('class', 'inner');\n    const startLabelElement = await createLabel(\n      inner,\n      edge.startLabelLeft,\n      getLabelStyles(edge.labelStyle) || '',\n      false,\n      false\n    );\n    fo = startLabelElement;\n    let slBox = startLabelElement.getBBox();\n    if (useHtmlLabels) {\n      const div = startLabelElement.children[0];\n      const dv = select(startLabelElement);\n      slBox = div.getBoundingClientRect();\n      dv.attr('width', slBox.width);\n      dv.attr('height', slBox.height);\n    }\n    inner.attr('transform', computeLabelTransform(slBox, useHtmlLabels));\n    if (!terminalLabels.get(edge.id)) {\n      terminalLabels.set(edge.id, {});\n    }\n    terminalLabels.get(edge.id).startLeft = startEdgeLabelLeft;\n    setTerminalWidth(fo, edge.startLabelLeft);\n  }\n  if (edge.startLabelRight) {\n    const startEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n    const inner = startEdgeLabelRight.insert('g').attr('class', 'inner');\n    const startLabelElement = await createLabel(\n      inner,\n      edge.startLabelRight,\n      getLabelStyles(edge.labelStyle) || '',\n      false,\n      false\n    );\n    fo = startLabelElement;\n    let slBox = startLabelElement.getBBox();\n    if (useHtmlLabels) {\n      const div = startLabelElement.children[0];\n      const dv = select(startLabelElement);\n      slBox = div.getBoundingClientRect();\n      dv.attr('width', slBox.width);\n      dv.attr('height', slBox.height);\n    }\n    inner.attr('transform', computeLabelTransform(slBox, useHtmlLabels));\n\n    if (!terminalLabels.get(edge.id)) {\n      terminalLabels.set(edge.id, {});\n    }\n    terminalLabels.get(edge.id).startRight = startEdgeLabelRight;\n    setTerminalWidth(fo, edge.startLabelRight);\n  }\n  if (edge.endLabelLeft) {\n    const endEdgeLabelLeft = elem.insert('g').attr('class', 'edgeTerminals');\n    // TODO: Remove? `inner` is not used\n    const inner = endEdgeLabelLeft.insert('g').attr('class', 'inner');\n    const endLabelElement = await createLabel(\n      endEdgeLabelLeft,\n      edge.endLabelLeft,\n      getLabelStyles(edge.labelStyle) || '',\n      false,\n      false\n    );\n    fo = endLabelElement;\n    let slBox = endLabelElement.getBBox();\n    if (useHtmlLabels) {\n      const div = endLabelElement.children[0];\n      const dv = select(endLabelElement);\n      slBox = div.getBoundingClientRect();\n      dv.attr('width', slBox.width);\n      dv.attr('height', slBox.height);\n    }\n    inner.attr('transform', computeLabelTransform(slBox, useHtmlLabels));\n\n    if (!terminalLabels.get(edge.id)) {\n      terminalLabels.set(edge.id, {});\n    }\n    terminalLabels.get(edge.id).endLeft = endEdgeLabelLeft;\n    setTerminalWidth(fo, edge.endLabelLeft);\n  }\n  if (edge.endLabelRight) {\n    const endEdgeLabelRight = elem.insert('g').attr('class', 'edgeTerminals');\n    // TODO: Remove? `inner` is not used\n    const inner = endEdgeLabelRight.insert('g').attr('class', 'inner');\n\n    const endLabelElement = await createLabel(\n      endEdgeLabelRight,\n      edge.endLabelRight,\n      getLabelStyles(edge.labelStyle) || '',\n      false,\n      false\n    );\n    fo = endLabelElement;\n    let slBox = endLabelElement.getBBox();\n    if (useHtmlLabels) {\n      const div = endLabelElement.children[0];\n      const dv = select(endLabelElement);\n      slBox = div.getBoundingClientRect();\n      dv.attr('width', slBox.width);\n      dv.attr('height', slBox.height);\n    }\n    inner.attr('transform', computeLabelTransform(slBox, useHtmlLabels));\n\n    if (!terminalLabels.get(edge.id)) {\n      terminalLabels.set(edge.id, {});\n    }\n    terminalLabels.get(edge.id).endRight = endEdgeLabelRight;\n    setTerminalWidth(fo, edge.endLabelRight);\n  }\n  return labelElement;\n};\n\n/**\n * @param {any} fo\n * @param {any} value\n */\nfunction setTerminalWidth(fo, value) {\n  if (getEffectiveHtmlLabels(getConfig()) && fo) {\n    fo.style.width = value.length * 9 + 'px';\n    fo.style.height = '12px';\n  }\n}\n\nexport const positionEdgeLabel = (edge, paths) => {\n  log.debug('Moving label abc88 ', edge.id, edge.label, edgeLabels.get(edge.id), paths);\n  let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;\n  const siteConfig = getConfig();\n  const { subGraphTitleTotalMargin } = getSubGraphTitleMargins(siteConfig);\n  if (edge.label) {\n    const el = edgeLabels.get(edge.id);\n    let x = edge.x;\n    let y = edge.y;\n    if (path) {\n      const pos = utils.calcLabelPosition(path);\n      log.debug(\n        'Moving label ' + edge.label + ' from (',\n        x,\n        ',',\n        y,\n        ') to (',\n        pos.x,\n        ',',\n        pos.y,\n        ') abc88'\n      );\n      if (paths.updatedPath) {\n        x = pos.x;\n        y = pos.y;\n      }\n    }\n    el.attr('transform', `translate(${x}, ${y + subGraphTitleTotalMargin / 2})`);\n  }\n\n  if (edge.startLabelLeft) {\n    const el = terminalLabels.get(edge.id).startLeft;\n    let x = edge.x;\n    let y = edge.y;\n    if (path) {\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.get(edge.id).startRight;\n    let x = edge.x;\n    let y = edge.y;\n    if (path) {\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.get(edge.id).endLeft;\n    let x = edge.x;\n    let y = edge.y;\n    if (path) {\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.get(edge.id).endRight;\n    let x = edge.x;\n    let y = edge.y;\n    if (path) {\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\n// Swimlanes-only helper, kept module-private: it self-gates to `-to-label` edges\n// (the swimlanes edge-label waypoint mechanism) and is called only from insertEdge's\n// `layout === 'swimlane'` branch, so it is a no-op for every other layout.\nconst orthogonalizeToLabelClippedPoints = (edge, points) => {\n  if (!edge?.isLabelEdge || !edge?.id?.endsWith('-to-label') || !Array.isArray(points)) {\n    return points;\n  }\n\n  if (points.length !== 2) {\n    return points;\n  }\n\n  const [start, end] = points;\n  const dx = Math.abs(end.x - start.x);\n  const dy = Math.abs(end.y - start.y);\n\n  if (dx < 1e-3 || dy < 1e-3) {\n    return points;\n  }\n\n  if (dy >= dx) {\n    return [start, { x: start.x, y: end.y }, end];\n  }\n\n  return [start, { x: end.x, y: start.y }, end];\n};\n\nconst outsideNode = (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  return dx >= w || dy >= h;\n};\n\nexport const intersection = (node, outsidePoint, insidePoint) => {\n  log.debug(`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 w = node.width / 2;\n  let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;\n  const h = node.height / 2;\n\n  const Q = Math.abs(outsidePoint.y - insidePoint.y);\n  const R = Math.abs(outsidePoint.x - insidePoint.x);\n\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    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.debug(`abc89 top/bottom calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);\n\n    return res;\n  } else {\n    // Intersection on sides of rect\n    if (insidePoint.x < outsidePoint.x) {\n      r = outsidePoint.x - w - x;\n    } else {\n      r = x - w - outsidePoint.x;\n    }\n    let q = (Q * r) / R;\n    let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;\n    let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;\n    log.debug(`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\nconst cutPathAtIntersect = (_points, boundaryNode) => {\n  log.warn('abc88 cutPathAtIntersect', _points, boundaryNode);\n  let points = [];\n  let lastPointOutside = _points[0];\n  let isInside = false;\n  _points.forEach((point) => {\n    log.info('abc88 checking point', point, boundaryNode);\n\n    if (!outsideNode(boundaryNode, point) && !isInside) {\n      const inter = intersection(boundaryNode, lastPointOutside, point);\n      log.debug('abc88 inside', point, lastPointOutside, inter);\n      log.debug('abc88 intersection', inter, boundaryNode);\n\n      let pointPresent = false;\n      points.forEach((p) => {\n        pointPresent = pointPresent || (p.x === inter.x && p.y === inter.y);\n      });\n\n      if (!points.some((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      isInside = true;\n    } else {\n      log.warn('abc88 outside', point, lastPointOutside);\n      lastPointOutside = point;\n      if (!isInside) {\n        points.push(point);\n      }\n    }\n  });\n  log.debug('returning points', points);\n  return points;\n};\n\nfunction extractCornerPoints(points) {\n  const cornerPoints = [];\n  const cornerPointPositions = [];\n  for (let i = 1; i < points.length - 1; i++) {\n    const prev = points[i - 1];\n    const curr = points[i];\n    const next = points[i + 1];\n    if (\n      prev.x === curr.x &&\n      curr.y === next.y &&\n      Math.abs(curr.x - next.x) > 5 &&\n      Math.abs(curr.y - prev.y) > 5\n    ) {\n      cornerPoints.push(curr);\n      cornerPointPositions.push(i);\n    } else if (\n      prev.y === curr.y &&\n      curr.x === next.x &&\n      Math.abs(curr.x - prev.x) > 5 &&\n      Math.abs(curr.y - next.y) > 5\n    ) {\n      cornerPoints.push(curr);\n      cornerPointPositions.push(i);\n    }\n  }\n  return { cornerPoints, cornerPointPositions };\n}\n\nconst findAdjacentPoint = function (pointA, pointB, distance) {\n  const xDiff = pointB.x - pointA.x;\n  const yDiff = pointB.y - pointA.y;\n  const length = Math.sqrt(xDiff * xDiff + yDiff * yDiff);\n  const ratio = distance / length;\n  return { x: pointB.x - ratio * xDiff, y: pointB.y - ratio * yDiff };\n};\n\nconst fixCorners = function (lineData) {\n  const { cornerPointPositions } = extractCornerPoints(lineData);\n  const newLineData = [];\n  for (let i = 0; i < lineData.length; i++) {\n    if (cornerPointPositions.includes(i)) {\n      const prevPoint = lineData[i - 1];\n      const nextPoint = lineData[i + 1];\n      const cornerPoint = lineData[i];\n\n      const newPrevPoint = findAdjacentPoint(prevPoint, cornerPoint, 5);\n      const newNextPoint = findAdjacentPoint(nextPoint, cornerPoint, 5);\n\n      const xDiff = newNextPoint.x - newPrevPoint.x;\n      const yDiff = newNextPoint.y - newPrevPoint.y;\n      newLineData.push(newPrevPoint);\n\n      const a = Math.sqrt(2) * 2;\n      let newCornerPoint = { x: cornerPoint.x, y: cornerPoint.y };\n      if (Math.abs(nextPoint.x - prevPoint.x) > 10 && Math.abs(nextPoint.y - prevPoint.y) >= 10) {\n        log.debug(\n          'Corner point fixing',\n          Math.abs(nextPoint.x - prevPoint.x),\n          Math.abs(nextPoint.y - prevPoint.y)\n        );\n        const r = 5;\n        if (cornerPoint.x === newPrevPoint.x) {\n          newCornerPoint = {\n            x: xDiff < 0 ? newPrevPoint.x - r + a : newPrevPoint.x + r - a,\n            y: yDiff < 0 ? newPrevPoint.y - a : newPrevPoint.y + a,\n          };\n        } else {\n          newCornerPoint = {\n            x: xDiff < 0 ? newPrevPoint.x - a : newPrevPoint.x + a,\n            y: yDiff < 0 ? newPrevPoint.y - r + a : newPrevPoint.y + r - a,\n          };\n        }\n      } else {\n        log.debug(\n          'Corner point skipping fixing',\n          Math.abs(nextPoint.x - prevPoint.x),\n          Math.abs(nextPoint.y - prevPoint.y)\n        );\n      }\n      newLineData.push(newCornerPoint, newNextPoint);\n    } else {\n      newLineData.push(lineData[i]);\n    }\n  }\n  return newLineData;\n};\n\nconst generateDashArray = (len, oValueS, oValueE) => {\n  const middleLength = len - oValueS - oValueE;\n  const dashLength = 2; // Length of each dash\n  const gapLength = 2; // Length of each gap\n  const dashGapPairLength = dashLength + gapLength;\n\n  // Calculate number of complete dash-gap pairs that can fit\n  const numberOfPairs = Math.floor(middleLength / dashGapPairLength);\n\n  // Generate the middle pattern array\n  const middlePattern = Array(numberOfPairs).fill(`${dashLength} ${gapLength}`).join(' ');\n\n  // Combine all parts\n  const dashArray = `0 ${oValueS} ${middlePattern} ${oValueE}`;\n\n  return dashArray;\n};\n\nexport const insertEdge = function (\n  elem,\n  edge,\n  clusterDb,\n  diagramType,\n  startNode,\n  endNode,\n  diagramId,\n  skipIntersect = false\n) {\n  if (!diagramId) {\n    throw new Error(\n      `insertEdge: missing diagramId for edge \"${edge.id}\" — edge IDs require a diagram prefix for uniqueness`\n    );\n  }\n  const { handDrawnSeed, layout } = getConfig();\n  let points = edge.points;\n  let pointsHasChanged = false;\n  const tail = startNode;\n  var head = endNode;\n  const edgeClassStyles = [];\n  for (const key in edge.cssCompiledStyles) {\n    if (isLabelStyle(key)) {\n      continue;\n    }\n    edgeClassStyles.push(edge.cssCompiledStyles[key]);\n  }\n\n  // Edge endpoint clipping. The swimlanes layout produces orthogonal edges whose\n  // axis-aligned entry/exit segments must be preserved, so it uses a dedicated\n  // boundary-clipping path. Every other layout (dagre, ELK, …) keeps the original\n  // clipping below, so their edge ports are unaffected by swimlanes.\n  if (layout === 'swimlane') {\n    if (head.intersect && tail.intersect && Array.isArray(points) && points.length >= 2) {\n      if (points.length === 2) {\n        // Simple straight edge: just clip the two endpoints to the node boundaries.\n        points = [tail.intersect(points[0]), head.intersect(points[1])];\n      } else {\n        // For multi-segment paths, keep the inner bend points and just adjust the entry/exit\n        // segments near the nodes.\n        const innerPoints = points.slice(1, -1);\n        const firstInner = innerPoints[0];\n        const lastInner = innerPoints[innerPoints.length - 1];\n        const TOLERANCE = 0.5;\n        const lastIsPinned =\n          Math.abs(points[points.length - 1].x - lastInner.x) < TOLERANCE &&\n          Math.abs(points[points.length - 1].y - lastInner.y) < TOLERANCE;\n\n        const newFirst = tail.intersect(firstInner);\n        const newLast = lastIsPinned ? lastInner : head.intersect(lastInner);\n\n        // When the boundary intersection lands ~on the inner point, skip it to\n        // avoid a zero-length final segment (keeps the entry/exit segment orthogonal).\n        const lastIsDuplicate =\n          Math.abs(newLast.x - lastInner.x) < TOLERANCE &&\n          Math.abs(newLast.y - lastInner.y) < TOLERANCE;\n        const firstIsDuplicate =\n          Math.abs(newFirst.x - firstInner.x) < TOLERANCE &&\n          Math.abs(newFirst.y - firstInner.y) < TOLERANCE;\n\n        const startPoints = firstIsDuplicate ? [] : [newFirst];\n        const endPoints = lastIsDuplicate ? [] : [newLast];\n\n        points = [...startPoints, ...innerPoints, ...endPoints];\n      }\n    }\n    points = orthogonalizeToLabelClippedPoints(edge, points);\n  } else if (head.intersect && tail.intersect && !skipIntersect) {\n    // Original clipping — unchanged for dagre / ELK / every non-swimlanes layout.\n    points = points.slice(1, edge.points.length - 1);\n    points.unshift(tail.intersect(points[0]));\n    points.push(head.intersect(points[points.length - 1]));\n  }\n  const pointsStr = btoa(JSON.stringify(points));\n  if (edge.toCluster) {\n    log.info('to cluster abc88', clusterDb.get(edge.toCluster));\n    points = cutPathAtIntersect(edge.points, clusterDb.get(edge.toCluster).node);\n\n    pointsHasChanged = true;\n  }\n\n  if (edge.fromCluster) {\n    log.debug(\n      'from cluster abc88',\n      clusterDb.get(edge.fromCluster),\n      JSON.stringify(points, null, 2)\n    );\n    points = cutPathAtIntersect(points.reverse(), clusterDb.get(edge.fromCluster).node).reverse();\n\n    pointsHasChanged = true;\n  }\n\n  let lineData = points.filter((p) => !Number.isNaN(p.y));\n  // Resolve curve type: use edge.curve if it's a string, otherwise fall back to config default\n  const edgeCurveType = resolveEdgeCurveType(edge.curve);\n  // Apply fixCorners for non-rounded curves to pre-round right-angle corners\n  // (rounded curve type uses generateRoundedPath instead)\n  if (edgeCurveType !== 'rounded') {\n    lineData = fixCorners(lineData);\n  }\n  let curve = curveLinear;\n  switch (edgeCurveType) {\n    case 'linear':\n      curve = curveLinear;\n      break;\n    case 'basis':\n      curve = curveBasis;\n      break;\n    case 'cardinal':\n      curve = curveCardinal;\n      break;\n    case 'bumpX':\n      curve = curveBumpX;\n      break;\n    case 'bumpY':\n      curve = curveBumpY;\n      break;\n    case 'catmullRom':\n      curve = curveCatmullRom;\n      break;\n    case 'monotoneX':\n      curve = curveMonotoneX;\n      break;\n    case 'monotoneY':\n      curve = curveMonotoneY;\n      break;\n    case 'natural':\n      curve = curveNatural;\n      break;\n    case 'step':\n      curve = curveStep;\n      break;\n    case 'stepAfter':\n      curve = curveStepAfter;\n      break;\n    case 'stepBefore':\n      curve = curveStepBefore;\n      break;\n    case 'rounded':\n      curve = curveLinear;\n      break;\n    default:\n      curve = curveBasis;\n  }\n\n  const { x, y } = getLineFunctionsWithOffset(edge);\n  const lineFunction = line().x(x).y(y).curve(curve);\n\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-invisible';\n      break;\n    default:\n      strokeClasses = 'edge-thickness-normal';\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    default:\n      strokeClasses += ' edge-pattern-solid';\n  }\n  let svgPath;\n  let linePath =\n    edgeCurveType === 'rounded'\n      ? generateRoundedPath(applyMarkerOffsetsToPoints(lineData, edge), 5)\n      : lineFunction(lineData);\n  const edgeStyles = Array.isArray(edge.style) ? edge.style : [edge.style];\n  let strokeColor = edgeStyles.find((style) => style?.startsWith('stroke:'));\n\n  let animationClass = '';\n  if (edge.animate) {\n    animationClass = 'edge-animation-fast';\n  }\n  if (edge.animation) {\n    animationClass = 'edge-animation-' + edge.animation;\n  }\n\n  let animatedEdge = false;\n  if (edge.look === 'handDrawn') {\n    const rc = rough.svg(elem);\n    Object.assign([], lineData);\n\n    const svgPathNode = rc.path(linePath, {\n      roughness: 0.3,\n      seed: handDrawnSeed,\n    });\n\n    strokeClasses += ' transition';\n\n    svgPath = select(svgPathNode)\n      .select('path')\n      .attr('id', `${diagramId}-${edge.id}`)\n      .attr(\n        'class',\n        ' ' +\n          strokeClasses +\n          (edge.classes ? ' ' + edge.classes : '') +\n          (animationClass ? ' ' + animationClass : '')\n      )\n      .attr('style', edgeStyles ? edgeStyles.reduce((acc, style) => acc + ';' + style, '') : '');\n    let d = svgPath.attr('d');\n    svgPath.attr('d', d);\n    elem.node().appendChild(svgPath.node());\n  } else {\n    const stylesFromClasses = edgeClassStyles.join(';');\n    const styles = edgeStyles ? edgeStyles.reduce((acc, style) => acc + style + ';', '') : '';\n\n    const pathStyle =\n      (stylesFromClasses ? stylesFromClasses + ';' + styles + ';' : styles) +\n      ';' +\n      (edgeStyles ? edgeStyles.reduce((acc, style) => acc + ';' + style, '') : '');\n    svgPath = elem\n      .append('path')\n      .attr('d', linePath)\n      .attr('id', `${diagramId}-${edge.id}`)\n      .attr(\n        'class',\n        ' ' +\n          strokeClasses +\n          (edge.classes ? ' ' + edge.classes : '') +\n          (animationClass ? ' ' + animationClass : '')\n      )\n      .attr('style', pathStyle);\n\n    //eslint-disable-next-line @typescript-eslint/prefer-regexp-exec\n    strokeColor = pathStyle.match(/stroke:([^;]+)/)?.[1];\n\n    // Possible fix to remove eslint-disable-next-line\n    //strokeColor = /stroke:([^;]+)/.exec(pathStyle)?.[1];\n\n    animatedEdge =\n      edge.animate === true || !!edge.animation || stylesFromClasses.includes('animation');\n    const pathNode = svgPath.node();\n    const len = typeof pathNode.getTotalLength === 'function' ? pathNode.getTotalLength() : 0;\n    const oValueS = markerOffsets2[edge.arrowTypeStart] || 0;\n    const oValueE = markerOffsets2[edge.arrowTypeEnd] || 0;\n\n    if (edge.look === 'neo' && !animatedEdge) {\n      const dashArray =\n        edge.pattern === 'dotted' || edge.pattern === 'dashed'\n          ? generateDashArray(len, oValueS, oValueE)\n          : `0 ${oValueS} ${len - oValueS - oValueE} ${oValueE}`;\n\n      // No offset needed because we already start with a zero-length dash that effectively sets us up for a gap at the start.\n      const mOffset = `stroke-dasharray: ${dashArray}; stroke-dashoffset: 0;`;\n      svgPath.attr('style', mOffset + svgPath.attr('style'));\n    }\n  }\n\n  // MC Special\n  svgPath.attr('data-edge', true);\n  svgPath.attr('data-et', 'edge');\n  svgPath.attr('data-id', edge.id);\n  svgPath.attr('data-points', pointsStr);\n  // Add data attributes for neo look support\n  svgPath.attr('data-look', handleUndefinedAttr(edge.look));\n  // DEBUG code, adds a red circle at each edge coordinate\n  // cornerPoints.forEach((point) => {\n  //   elem\n  //     .append('circle')\n  //     .style('stroke', 'blue')\n  //     .style('fill', 'blue')\n  //     .attr('r', 3)\n  //     .attr('cx', point.x)\n  //     .attr('cy', point.y);\n  // });\n  if (edge.showPoints) {\n    lineData.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  // lineData.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  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, '\\\\(').replace(/\\)/g, '\\\\)');\n  }\n  log.info('arrowTypeStart', edge.arrowTypeStart);\n  log.info('arrowTypeEnd', edge.arrowTypeEnd);\n\n  const useMargin = !animatedEdge && edge?.look === 'neo';\n  addEdgeMarkers(svgPath, edge, url, diagramId, diagramType, useMargin, strokeColor);\n  const midIndex = Math.floor(points.length / 2);\n  const point = points[midIndex];\n  if (!utils.isLabelCoordinateInPath(point, svgPath.attr('d'))) {\n    pointsHasChanged = true;\n  }\n\n  let paths = {};\n  if (pointsHasChanged) {\n    paths.updatedPath = points;\n  }\n  paths.originalPath = edge.points;\n  return paths;\n};\n\n/**\n * Generates SVG path data with rounded corners from an array of points.\n * @param {Array} points - Array of points in the format [{x: Number, y: Number}, ...]\n * @param {Number} radius - The radius of the rounded corners\n * @returns {String} - SVG path data string\n */\nexport function generateRoundedPath(points, radius) {\n  if (points.length < 2) {\n    return '';\n  }\n\n  let path = '';\n  const size = points.length;\n  const epsilon = 1e-5;\n\n  for (let i = 0; i < size; i++) {\n    const currPoint = points[i];\n    const prevPoint = points[i - 1];\n    const nextPoint = points[i + 1];\n\n    if (i === 0) {\n      // Move to the first point\n      path += `M${currPoint.x},${currPoint.y}`;\n    } else if (i === size - 1) {\n      // Last point, draw a straight line to the final point\n      path += `L${currPoint.x},${currPoint.y}`;\n    } else {\n      // Calculate vectors for incoming and outgoing segments\n      const dx1 = currPoint.x - prevPoint.x;\n      const dy1 = currPoint.y - prevPoint.y;\n      const dx2 = nextPoint.x - currPoint.x;\n      const dy2 = nextPoint.y - currPoint.y;\n\n      const len1 = Math.hypot(dx1, dy1);\n      const len2 = Math.hypot(dx2, dy2);\n\n      // Prevent division by zero\n      if (len1 < epsilon || len2 < epsilon) {\n        path += `L${currPoint.x},${currPoint.y}`;\n        continue;\n      }\n\n      // Normalize the vectors\n      const nx1 = dx1 / len1;\n      const ny1 = dy1 / len1;\n      const nx2 = dx2 / len2;\n      const ny2 = dy2 / len2;\n\n      // Calculate the angle between the vectors\n      const dot = nx1 * nx2 + ny1 * ny2;\n      // Clamp the dot product to avoid numerical issues with acos\n      const clampedDot = Math.max(-1, Math.min(1, dot));\n      const angle = Math.acos(clampedDot);\n\n      // Skip rounding if the angle is too small or too close to 180 degrees\n      if (angle < epsilon || Math.abs(Math.PI - angle) < epsilon) {\n        path += `L${currPoint.x},${currPoint.y}`;\n        continue;\n      }\n\n      // Calculate the distance to offset the control point\n      const cutLen = Math.min(radius / Math.sin(angle / 2), len1 / 2, len2 / 2);\n\n      // Calculate the start and end points of the curve\n      const startX = currPoint.x - nx1 * cutLen;\n      const startY = currPoint.y - ny1 * cutLen;\n      const endX = currPoint.x + nx2 * cutLen;\n      const endY = currPoint.y + ny2 * cutLen;\n\n      // Draw the line to the start of the curve\n      path += `L${startX},${startY}`;\n\n      // Draw the quadratic Bezier curve\n      path += `Q${currPoint.x},${currPoint.y} ${endX},${endY}`;\n    }\n  }\n\n  return path;\n}\n// Helper function to calculate delta and angle between two points\nfunction calculateDeltaAndAngle(point1, point2) {\n  if (!point1 || !point2) {\n    return { angle: 0, deltaX: 0, deltaY: 0 };\n  }\n  const deltaX = point2.x - point1.x;\n  const deltaY = point2.y - point1.y;\n  const angle = Math.atan2(deltaY, deltaX);\n  return { angle, deltaX, deltaY };\n}\n\n// Function to adjust the first and last points of the points array\nexport function applyMarkerOffsetsToPoints(points, edge) {\n  // Copy the points array to avoid mutating the original data\n  const newPoints = points.map((point) => ({ ...point }));\n\n  // Handle the first point (start of the edge)\n  if (points.length >= 2 && markerOffsets[edge.arrowTypeStart]) {\n    const offsetValue = markerOffsets[edge.arrowTypeStart];\n\n    const point1 = points[0];\n    const point2 = points[1];\n\n    const { angle } = calculateDeltaAndAngle(point1, point2);\n\n    const offsetX = offsetValue * Math.cos(angle);\n    const offsetY = offsetValue * Math.sin(angle);\n\n    newPoints[0].x = point1.x + offsetX;\n    newPoints[0].y = point1.y + offsetY;\n  }\n\n  // Handle the last point (end of the edge)\n  const n = points.length;\n  if (n >= 2 && markerOffsets[edge.arrowTypeEnd]) {\n    const offsetValue = markerOffsets[edge.arrowTypeEnd];\n\n    const point1 = points[n - 1];\n    const point2 = points[n - 2];\n\n    const { angle } = calculateDeltaAndAngle(point2, point1);\n\n    const offsetX = offsetValue * Math.cos(angle);\n    const offsetY = offsetValue * Math.sin(angle);\n\n    newPoints[n - 1].x = point1.x - offsetX;\n    newPoints[n - 1].y = point1.y - offsetY;\n  }\n\n  return newPoints;\n}\n","import type { Positions, SVG } from '../diagram-api/types.js';\nimport type { InternalHelpers } from '../internals.js';\nimport { internalHelpers } from '../internals.js';\nimport { log } from '../logger.js';\nimport type { LayoutData } from './types.js';\n\n// console.log('MUST be removed, this only for keeping dev server working');\n// import tmp from './layout-algorithms/dagre/index.js';\n\nexport interface RenderOptions {\n  algorithm?: string;\n}\n\nexport interface LayoutAlgorithm {\n  render(\n    layoutData: LayoutData,\n    svg: SVG,\n    helpers: InternalHelpers,\n    options?: RenderOptions,\n    positions?: Positions\n  ): Promise<void>;\n}\n\nexport type LayoutLoader = () => Promise<LayoutAlgorithm>;\nexport interface LayoutLoaderDefinition {\n  name: string;\n  loader: LayoutLoader;\n  algorithm?: string;\n}\n\nconst layoutAlgorithms: Record<string, LayoutLoaderDefinition> = {};\n\nexport const registerLayoutLoaders = (loaders: LayoutLoaderDefinition[]) => {\n  for (const loader of loaders) {\n    layoutAlgorithms[loader.name] = loader;\n  }\n};\n\n// TODO: Should we load dagre without lazy loading?\nconst registerDefaultLayoutLoaders = () => {\n  registerLayoutLoaders([\n    {\n      name: 'dagre',\n      loader: async () => await import('./layout-algorithms/dagre/index.js'),\n    },\n    {\n      name: 'swimlane',\n      loader: async () => await import('./layout-algorithms/swimlanes/index.js'),\n    },\n    ...(injected.includeLargeFeatures\n      ? [\n          {\n            name: 'cose-bilkent',\n            loader: async () => await import('./layout-algorithms/cose-bilkent/index.js'),\n          },\n        ]\n      : []),\n  ]);\n};\n\nregisterDefaultLayoutLoaders();\n\nexport const render = async (data4Layout: LayoutData, svg: SVG, positions?: Positions) => {\n  if (!(data4Layout.layoutAlgorithm in layoutAlgorithms)) {\n    throw new Error(`Unknown layout algorithm: ${data4Layout.layoutAlgorithm}`);\n  }\n\n  // Prefix all node domIds with the diagram's SVG element ID to ensure uniqueness\n  // across multiple diagrams on the same page.\n  if (data4Layout.diagramId) {\n    for (const node of data4Layout.nodes) {\n      const originalDomId = node.domId || node.id;\n      node.domId = `${data4Layout.diagramId}-${originalDomId}`;\n    }\n  }\n\n  const layoutDefinition = layoutAlgorithms[data4Layout.layoutAlgorithm];\n  const layoutRenderer = await layoutDefinition.loader();\n\n  const { theme, themeVariables } = data4Layout.config;\n  const { useGradient, gradientStart, gradientStop } = themeVariables;\n\n  const svgId = svg.attr('id');\n\n  svg\n    .append('defs')\n    .append('filter')\n    .attr('id', `${svgId}-drop-shadow`)\n    .attr('height', '130%')\n    .attr('width', '130%')\n    .append('feDropShadow')\n    .attr('dx', '4')\n    .attr('dy', '4')\n    .attr('stdDeviation', 0)\n    .attr('flood-opacity', '0.06')\n    .attr('flood-color', `${theme?.includes('dark') ? '#FFFFFF' : '#000000'}`);\n\n  svg\n    .append('defs')\n    .append('filter')\n    .attr('id', `${svgId}-drop-shadow-small`)\n    .attr('height', '150%')\n    .attr('width', '150%')\n    .append('feDropShadow')\n    .attr('dx', '2')\n    .attr('dy', '2')\n    .attr('stdDeviation', 0)\n    .attr('flood-opacity', '0.06')\n    .attr('flood-color', `${theme?.includes('dark') ? '#FFFFFF' : '#000000'}`);\n\n  if (useGradient) {\n    const gradient = svg\n      .append('linearGradient')\n      .attr('id', svg.attr('id') + '-gradient')\n      .attr('gradientUnits', 'objectBoundingBox')\n      .attr('x1', '0%')\n      .attr('y1', '0%')\n      .attr('x2', '100%')\n      .attr('y2', '0%');\n\n    gradient\n      .append('svg:stop')\n      .attr('offset', '0%')\n      .attr('stop-color', gradientStart)\n      .attr('stop-opacity', 1);\n\n    gradient\n      .append('svg:stop')\n      .attr('offset', '100%')\n      .attr('stop-color', gradientStop)\n      .attr('stop-opacity', 1);\n  }\n\n  return layoutRenderer.render(\n    data4Layout,\n    svg,\n    internalHelpers,\n    {\n      algorithm: layoutDefinition.algorithm,\n    },\n    positions\n  );\n};\n\n/**\n * Get the registered layout algorithm. If the algorithm is not registered, use the fallback algorithm.\n */\nexport const getRegisteredLayoutAlgorithm = (algorithm = '', { fallback = 'dagre' } = {}) => {\n  if (algorithm in layoutAlgorithms) {\n    return algorithm;\n  }\n  if (fallback in layoutAlgorithms) {\n    log.warn(`Layout algorithm ${algorithm} is not registered. Using ${fallback} as fallback.`);\n    return fallback;\n  }\n  throw new Error(`Both layout algorithms ${algorithm} and ${fallback} are not registered.`);\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'c4';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./c4Diagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'flowchart';\n\nconst detector: DiagramDetector = (txt, config) => {\n  // If we have conferred to only use new flow charts this function should always return false\n  // as in not signalling true for a legacy flowchart\n  if (\n    config?.flowchart?.defaultRenderer === 'dagre-wrapper' ||\n    config?.flowchart?.defaultRenderer === 'elk'\n  ) {\n    return false;\n  }\n  return /^\\s*graph/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./flowDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'flowchart-v2';\n\nconst detector: DiagramDetector = (txt, config) => {\n  if (config?.flowchart?.defaultRenderer === 'dagre-d3') {\n    return false;\n  }\n\n  if (config?.flowchart?.defaultRenderer === 'elk') {\n    config.layout = 'elk';\n  }\n\n  // If we have configured 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 (/^\\s*graph/.test(txt) && config?.flowchart?.defaultRenderer === 'dagre-wrapper') {\n    return true;\n  }\n  return /^\\s*flowchart/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./flowDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'swimlane';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*swimlane-beta\\b/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./swimlanesDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'er';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*erDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./erDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type { DiagramDetector, DiagramLoader } from '../../diagram-api/types.js';\nimport type { ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'gitGraph';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*gitGraph/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./gitGraphDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'gantt';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*gantt/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./ganttDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'info';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*info/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./infoDiagram.js');\n  return { id, diagram };\n};\n\nexport const info: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'pie';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*pie/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./pieDiagram.js');\n  return { id, diagram };\n};\n\nexport const pie: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'quadrantChart';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*quadrantChart/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./quadrantDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'xychart';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*xychart(-beta)?/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./xychartDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'requirement';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*requirement(Diagram)?/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./requirementDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'sequence';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*sequenceDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./sequenceDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'class';\n\nconst detector: DiagramDetector = (txt, config) => {\n  // If we have configured to use dagre-wrapper then we should never return true in this function\n  if (config?.class?.defaultRenderer === 'dagre-wrapper') {\n    return false;\n  }\n  // We have not opted to use the new renderer so we should return true if we detect a class diagram\n  return /^\\s*classDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./classDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'classDiagram';\n\nconst detector: DiagramDetector = (txt, config) => {\n  // If we have configured 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 (/^\\s*classDiagram/.test(txt) && config?.class?.defaultRenderer === 'dagre-wrapper') {\n    return true;\n  }\n  // We have not opted to use the new renderer so we should return true if we detect a class diagram\n  return /^\\s*classDiagram-v2/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./classDiagram-v2.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'state';\n\nconst detector: DiagramDetector = (txt, config) => {\n  // If we have confirmed 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') {\n    return false;\n  }\n  return /^\\s*stateDiagram/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./stateDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'stateDiagram';\n\nconst detector: DiagramDetector = (txt, config) => {\n  if (/^\\s*stateDiagram-v2/.test(txt)) {\n    return true;\n  }\n  if (/^\\s*stateDiagram/.test(txt) && config?.state?.defaultRenderer === 'dagre-wrapper') {\n    return true;\n  }\n  return false;\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./stateDiagram-v2.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'journey';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*journey/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./journeyDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type { SVG, SVGGroup } from '../../diagram-api/types.js';\nimport { log } from '../../logger.js';\nimport { selectSvgElement } from '../../rendering-util/selectSvgElement.js';\nimport { configureSvgSize } from '../../setupGraphViewbox.js';\n\n/**\n * Draws an info picture in the tag with id: id based on the graph definition in text.\n *\n * @param _text - Mermaid graph definition.\n * @param id - The text for the error\n * @param version - The version\n */\nexport const draw = (_text: string, id: string, version: string) => {\n  log.debug('rendering svg for syntax error\\n');\n  const svg: SVG = selectSvgElement(id);\n  const g: SVGGroup = svg.append('g');\n\n  svg.attr('viewBox', '0 0 2412 512');\n  configureSvgSize(svg, 100, 512, true);\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 text');\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 ${version}`);\n};\n\nexport const renderer = { draw };\n\nexport default renderer;\n","import type { DiagramDefinition } from '../../diagram-api/types.js';\nimport { renderer } from './errorRenderer.js';\n\nconst diagram: DiagramDefinition = {\n  db: {},\n  renderer,\n  parser: {\n    parse: (): void => {\n      return;\n    },\n  },\n};\n\nexport default diagram;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../../diagram-api/types.js';\n\nconst id = 'flowchart-elk';\n\nconst detector: DiagramDetector = (txt, config = {}): boolean => {\n  if (\n    // If diagram explicitly states flowchart-elk\n    /^\\s*flowchart-elk/.test(txt) ||\n    // If a flowchart/graph diagram has their default renderer set to elk\n    (/^\\s*(flowchart|graph)/.test(txt) && config?.flowchart?.defaultRenderer === 'elk')\n  ) {\n    config.layout = 'elk';\n    return true;\n  }\n  return false;\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('../flowDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'timeline';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*timeline/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./timeline-definition.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\nconst id = 'mindmap';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*mindmap/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./mindmap-definition.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\nconst id = 'kanban';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*kanban/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./kanban-definition.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type { DiagramDetector, ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'sankey';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*sankey(-beta)?/.test(txt);\n};\n\nconst loader = async () => {\n  const { diagram } = await import('./sankeyDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'packet';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*packet(-beta)?/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./diagram.js');\n  return { id, diagram };\n};\n\nexport const packet: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'radar';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*radar-beta/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./diagram.js');\n  return { id, diagram };\n};\n\nexport const radar: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type { DiagramDetector, ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'block';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*block(-beta)?/.test(txt);\n};\n\nconst loader = async () => {\n  const { diagram } = await import('./blockDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type { DiagramDetector, DiagramLoader } from '../../diagram-api/types.js';\nimport type { ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'treeView';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*treeView-beta/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./diagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'architecture';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*architecture/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./architectureDiagram.js');\n  return { id, diagram };\n};\n\nconst architecture: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default architecture;\n","import type { DiagramDetector, DiagramLoader } from '../../diagram-api/types.js';\nimport type { ExternalDiagramDefinition } from '../../diagram-api/types.js';\n\nconst id = 'eventmodeling';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*eventmodeling/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./diagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'ishikawa';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*ishikawa(-beta)?\\b/i.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./ishikawaDiagram.js');\n  return { id, diagram };\n};\n\nexport const ishikawa: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'venn';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*venn-beta/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./vennDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'treemap';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*treemap/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./diagram.js');\n  return { id, diagram };\n};\n\nexport const treemap: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'wardley';\n\nconst detector: DiagramDetector = (text) => {\n  return /^\\s*wardley-beta/i.test(text);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./wardleyDiagram.js');\n  return { id, diagram };\n};\n\nconst plugin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n\nexport default plugin;\n","import type {\n  ExternalDiagramDefinition,\n  DiagramDetector,\n  DiagramLoader,\n} from '../../diagram-api/types.js';\n\nconst id = 'cynefin';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*cynefin-beta(?:[\\s:]|$)/.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./cynefinDiagram.js');\n  return { id, diagram };\n};\n\nexport const cynefin: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'railroad';\n\n/**\n * Detector function to identify Railroad diagrams\n * Looks for 'railroad-beta' keyword at the start of the text\n */\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*railroad-beta/i.test(txt);\n};\n\n/**\n * Lazy loader for the Railroad diagram\n */\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./railroadDiagram.js');\n  return { id, diagram };\n};\n\n/**\n * Export the external diagram definition\n */\nexport const railroad: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'railroadEbnf';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*railroad-ebnf-beta/i.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./ebnfDiagram.js');\n  return { id, diagram };\n};\n\nexport const railroadEbnf: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'railroadAbnf';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*railroad-abnf-beta/i.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./abnfDiagram.js');\n  return { id, diagram };\n};\n\nexport const railroadAbnf: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import type {\n  DiagramDetector,\n  DiagramLoader,\n  ExternalDiagramDefinition,\n} from '../../diagram-api/types.js';\n\nconst id = 'railroadPeg';\n\nconst detector: DiagramDetector = (txt) => {\n  return /^\\s*railroad-peg-beta/i.test(txt);\n};\n\nconst loader: DiagramLoader = async () => {\n  const { diagram } = await import('./pegDiagram.js');\n  return { id, diagram };\n};\n\nexport const railroadPeg: ExternalDiagramDefinition = {\n  id,\n  detector,\n  loader,\n};\n","import c4 from '../diagrams/c4/c4Detector.js';\nimport flowchart from '../diagrams/flowchart/flowDetector.js';\nimport flowchartV2 from '../diagrams/flowchart/flowDetector-v2.js';\nimport swimlanes from '../diagrams/swimlanes/detector.js';\nimport er from '../diagrams/er/erDetector.js';\nimport git from '../diagrams/git/gitGraphDetector.js';\nimport gantt from '../diagrams/gantt/ganttDetector.js';\nimport { info } from '../diagrams/info/infoDetector.js';\nimport { pie } from '../diagrams/pie/pieDetector.js';\nimport quadrantChart from '../diagrams/quadrant-chart/quadrantDetector.js';\nimport xychart from '../diagrams/xychart/xychartDetector.js';\nimport requirement from '../diagrams/requirement/requirementDetector.js';\nimport sequence from '../diagrams/sequence/sequenceDetector.js';\nimport classDiagram from '../diagrams/class/classDetector.js';\nimport classDiagramV2 from '../diagrams/class/classDetector-V2.js';\nimport state from '../diagrams/state/stateDetector.js';\nimport stateV2 from '../diagrams/state/stateDetector-V2.js';\nimport journey from '../diagrams/user-journey/journeyDetector.js';\nimport errorDiagram from '../diagrams/error/errorDiagram.js';\nimport flowchartElk from '../diagrams/flowchart/elk/detector.js';\nimport timeline from '../diagrams/timeline/detector.js';\nimport mindmap from '../diagrams/mindmap/detector.js';\nimport kanban from '../diagrams/kanban/detector.js';\nimport sankey from '../diagrams/sankey/sankeyDetector.js';\nimport { packet } from '../diagrams/packet/detector.js';\nimport { radar } from '../diagrams/radar/detector.js';\nimport block from '../diagrams/block/blockDetector.js';\nimport treeView from '../diagrams/treeView/detector.js';\nimport architecture from '../diagrams/architecture/architectureDetector.js';\nimport eventmodeling from '../diagrams/eventmodeling/detector.js';\nimport { ishikawa } from '../diagrams/ishikawa/ishikawaDetector.js';\nimport venn from '../diagrams/venn/vennDetector.js';\nimport { registerLazyLoadedDiagrams } from './detectType.js';\nimport { registerDiagram } from './diagramAPI.js';\nimport { treemap } from '../diagrams/treemap/detector.js';\nimport wardley from '../diagrams/wardley/wardleyDetector.js';\nimport { cynefin } from '../diagrams/cynefin/cynefinDetector.js';\nimport { railroad } from '../diagrams/railroad/railroadDetector.js';\nimport { railroadEbnf } from '../diagrams/railroad/ebnfDetector.js';\nimport { railroadAbnf } from '../diagrams/railroad/abnfDetector.js';\nimport { railroadPeg } from '../diagrams/railroad/pegDetector.js';\nimport '../type.d.ts';\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('error', errorDiagram, (text) => {\n    return text.toLowerCase().trim() === 'error';\n  });\n  registerDiagram(\n    '---',\n    // --- diagram type may appear if YAML front-matter is not parsed correctly\n    {\n      db: {\n        clear: () => {\n          // Quite ok, clear needs to be there for --- to work as a regular diagram\n        },\n      },\n      styles: {}, // should never be used\n      renderer: {\n        draw: () => {\n          // should never be used\n        },\n      },\n      parser: {\n        parse: () => {\n          throw new Error(\n            'Diagrams beginning with --- are not valid. ' +\n              'If you were trying to use a YAML front-matter, please ensure that ' +\n              \"you've correctly opened and closed the YAML front-matter with un-indented `---` blocks\"\n          );\n        },\n      },\n      init: () => null, // no op\n    },\n    (text) => {\n      return text.toLowerCase().trimStart().startsWith('---');\n    }\n  );\n\n  if (injected.includeLargeFeatures) {\n    registerLazyLoadedDiagrams(flowchartElk, mindmap, architecture);\n  }\n\n  // Ordering of detectors is important. The first one to return true will be used.\n  registerLazyLoadedDiagrams(\n    c4,\n    kanban,\n    classDiagramV2,\n    classDiagram,\n    er,\n    gantt,\n    info,\n    pie,\n    requirement,\n    sequence,\n    swimlanes,\n    flowchartV2,\n    flowchart,\n    timeline,\n    git,\n    stateV2,\n    state,\n    journey,\n    quadrantChart,\n    sankey,\n    packet,\n    xychart,\n    block,\n    eventmodeling,\n    treeView,\n    radar,\n    ishikawa,\n    treemap,\n    railroad,\n    railroadEbnf,\n    railroadAbnf,\n    railroadPeg,\n    venn,\n    wardley,\n    cynefin\n  );\n};\n","import { log } from '../logger.js';\nimport { detectors } from './detectType.js';\nimport { getDiagram, registerDiagram } from './diagramAPI.js';\n\nexport const loadRegisteredDiagrams = async () => {\n  log.debug(`Loading registered diagrams`);\n  // Load all lazy loaded diagrams in parallel\n  const results = await Promise.allSettled(\n    Object.entries(detectors).map(async ([key, { detector, loader }]) => {\n      if (!loader) {\n        return;\n      }\n      try {\n        getDiagram(key);\n      } catch {\n        try {\n          // Register diagram if it is not already registered\n          const { diagram, id } = await loader();\n          registerDiagram(id, diagram, detector);\n        } catch (err) {\n          // Remove failed diagram from detectors\n          log.error(`Failed to load external diagram with key ${key}. Removing from detectors.`);\n          delete detectors[key];\n          throw err;\n        }\n      }\n    })\n  );\n  const failed = results.filter((result) => result.status === 'rejected');\n  if (failed.length > 0) {\n    log.error(`Failed to load ${failed.length} external diagrams`);\n    for (const res of failed) {\n      log.error(res);\n    }\n    throw new Error(`Failed to load ${failed.length} external diagrams`);\n  }\n};\n","/**\n * Accessibility (a11y) functions, types, helpers.\n *\n * @see https://www.w3.org/WAI/\n * @see https://www.w3.org/TR/wai-aria-1.1/\n * @see https://www.w3.org/TR/svg-aam-1.0/\n */\nimport type { D3Element } from './types.js';\n\n/**\n * SVG element role:\n * The SVG element role _should_ be set to 'graphics-document' per SVG standard\n * but in practice is not always done by browsers, etc. (As of 2022-12-08).\n * A fallback role of 'document' should be set for those browsers, etc., that only support ARIA 1.0.\n *\n * @see https://www.w3.org/TR/svg-aam-1.0/#roleMappingGeneralRules\n * @see https://www.w3.org/TR/graphics-aria-1.0/#graphics-document\n */\nconst SVG_ROLE = 'graphics-document document';\n\n/**\n * Add role and aria-roledescription to the svg element.\n *\n * @param svg - d3 object that contains the SVG HTML element\n * @param diagramType - diagram name for to the aria-roledescription\n */\nexport function setA11yDiagramInfo(svg: D3Element, diagramType: string) {\n  svg.attr('role', SVG_ROLE);\n  if (diagramType !== '') {\n    svg.attr('aria-roledescription', diagramType);\n  }\n}\n\n/**\n * Add an accessible title and/or description element to a chart.\n * The title is usually not displayed and the description is never displayed.\n *\n * The following charts display their title as a visual and accessibility element: gantt.\n *\n * @param svg - d3 node to insert the a11y title and desc info\n * @param a11yTitle - a11y title. undefined or empty strings mean to skip them\n * @param a11yDesc - a11y description. undefined or empty strings mean to skip them\n * @param baseId - id used to construct the a11y title and description id\n */\nexport function addSVGa11yTitleDescription(\n  svg: D3Element,\n  a11yTitle: string | undefined,\n  a11yDesc: string | undefined,\n  baseId: string\n): void {\n  if (svg.insert === undefined) {\n    return;\n  }\n\n  if (a11yDesc) {\n    const descId = `chart-desc-${baseId}`;\n    svg.attr('aria-describedby', descId);\n    svg.insert('desc', ':first-child').attr('id', descId).text(a11yDesc);\n  }\n  if (a11yTitle) {\n    const titleId = `chart-title-${baseId}`;\n    svg.attr('aria-labelledby', titleId);\n    svg.insert('title', ':first-child').attr('id', titleId).text(a11yTitle);\n  }\n}\n","import * as configApi from './config.js';\nimport { getDiagram, registerDiagram } from './diagram-api/diagramAPI.js';\nimport { detectType, getDiagramLoader } from './diagram-api/detectType.js';\nimport { UnknownDiagramError } from './errors.js';\nimport { encodeEntities } from './utils.js';\nimport type { DetailedError } from './utils.js';\nimport type { DiagramDefinition, DiagramMetadata } from './diagram-api/types.js';\n\n// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents\nexport type ParseErrorFunction = (err: string | DetailedError | unknown, hash?: any) => void;\n\n/**\n * An object representing a parsed mermaid diagram definition.\n * @privateRemarks This is exported as part of the public mermaidAPI.\n */\nexport class Diagram {\n  public static async fromText(text: string, metadata: Pick<DiagramMetadata, 'title'> = {}) {\n    const config = configApi.getConfig();\n    const type = detectType(text, config);\n    text = encodeEntities(text) + '\\n';\n    try {\n      getDiagram(type);\n    } catch {\n      const loader = getDiagramLoader(type);\n      if (!loader) {\n        throw new UnknownDiagramError(`Diagram ${type} not found.`);\n      }\n      // Diagram not available, loading it.\n      // new diagram will try getDiagram again and if fails then it is a valid throw\n      const { id, diagram } = await loader();\n      registerDiagram(id, diagram);\n    }\n    const { db, parser, renderer, init } = getDiagram(type);\n    if (parser.parser) {\n      // The parser.parser.yy is only present in JISON parsers. So, we'll only set if required.\n      parser.parser.yy = db;\n    }\n    db.clear?.();\n    init?.(config);\n    // This block was added for legacy compatibility. Use frontmatter instead of adding more special cases.\n    if (metadata.title) {\n      db.setDiagramTitle?.(metadata.title);\n    }\n    await parser.parse(text);\n    return new Diagram(type, text, db, parser, renderer);\n  }\n\n  private constructor(\n    public type: string,\n    public text: string,\n    public db: DiagramDefinition['db'],\n    public parser: DiagramDefinition['parser'],\n    public renderer: DiagramDefinition['renderer']\n  ) {}\n\n  async render(id: string, version: string) {\n    await this.renderer.draw(this.text, id, version, this);\n  }\n\n  getParser() {\n    return this.parser;\n  }\n\n  getType() {\n    return this.type;\n  }\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","/**\n * Remove all lines starting with `%%` from the text that don't contain a `%%{`\n * @param text - The text to remove comments from\n * @returns cleaned text\n */\nexport const cleanupComments = (text: string): string => {\n  return text.replace(/^\\s*%%(?!{)[^\\n]+\\n?/gm, '').trimStart();\n};\n","import type { GanttDiagramConfig, MermaidConfig } from '../config.type.js';\nimport { frontMatterRegex } from './regexes.js';\n// The \"* as yaml\" part is necessary for tree-shaking\nimport * as yaml from 'js-yaml';\n\ninterface FrontMatterMetadata {\n  title?: string;\n  // Allows custom display modes. Currently used for compact mode in gantt charts.\n  displayMode?: GanttDiagramConfig['displayMode'];\n  config?: MermaidConfig;\n}\n\nexport interface FrontMatterResult {\n  text: string;\n  metadata: FrontMatterMetadata;\n}\n\n/**\n * Extract and parse frontmatter from text, if present, and sets appropriate\n * properties in the provided db.\n * @param text - The text that may have a YAML frontmatter.\n * @returns text with frontmatter stripped out\n */\nexport function extractFrontMatter(text: string): FrontMatterResult {\n  const matches = text.match(frontMatterRegex);\n  if (!matches) {\n    return {\n      text,\n      metadata: {},\n    };\n  }\n\n  // Dedent by the captured indent — js-yaml rejects tab-indented documents.\n  const indent = matches[1];\n  const yamlBody = indent\n    ? matches[2]\n        .split('\\n')\n        .map((line) => (line.startsWith(indent) ? line.slice(indent.length) : line))\n        .join('\\n')\n    : matches[2];\n\n  let parsed: FrontMatterMetadata =\n    yaml.load(yamlBody, {\n      // To support config, we need JSON schema.\n      // https://www.yaml.org/spec/1.2/spec.html#id2803231\n      schema: yaml.JSON_SCHEMA,\n    }) ?? {};\n\n  // To handle runtime data type changes\n  parsed = typeof parsed === 'object' && !Array.isArray(parsed) ? parsed : {};\n\n  const metadata: FrontMatterMetadata = {};\n\n  // Only add properties that are explicitly supported, if they exist\n  if (parsed.displayMode) {\n    metadata.displayMode = parsed.displayMode.toString() as GanttDiagramConfig['displayMode'];\n  }\n  if (parsed.title) {\n    metadata.title = parsed.title.toString();\n  }\n  if (parsed.config) {\n    metadata.config = parsed.config;\n  }\n\n  return {\n    text: text.slice(matches[0].length),\n    metadata,\n  };\n}\n","import { cleanupComments } from './diagram-api/comments.js';\nimport { extractFrontMatter } from './diagram-api/frontmatter.js';\nimport type { DiagramMetadata } from './diagram-api/types.js';\nimport utils, { cleanAndMerge, removeDirectives } from './utils.js';\n\nconst cleanupText = (code: string) => {\n  return (\n    code\n      // parser problems on CRLF ignore all CR and leave LF;;\n      .replace(/\\r\\n?/g, '\\n')\n      // clean up html tags so that all attributes use single quotes, parser throws error on double quotes\n      .replace(\n        /<(\\w+)([^>]*)>/g,\n        (match, tag, attributes) => '<' + tag + attributes.replace(/=\"([^\"]*)\"/g, \"='$1'\") + '>'\n      )\n  );\n};\n\nconst processFrontmatter = (code: string) => {\n  const { text, metadata } = extractFrontMatter(code);\n  const { displayMode, title, config = {} } = metadata;\n  if (displayMode) {\n    // Needs to be supported for legacy reasons\n    if (!config.gantt) {\n      config.gantt = {};\n    }\n    config.gantt.displayMode = displayMode;\n  }\n\n  return { title, config, text };\n};\n\nconst processDirectives = (code: string) => {\n  const initDirective = utils.detectInit(code) ?? {};\n  const wrapDirectives = utils.detectDirective(code, 'wrap');\n  if (Array.isArray(wrapDirectives)) {\n    initDirective.wrap = wrapDirectives.some(({ type }) => type === 'wrap');\n  } else if (wrapDirectives?.type === 'wrap') {\n    initDirective.wrap = true;\n  }\n  return {\n    text: removeDirectives(code),\n    directive: initDirective,\n  };\n};\n\n/**\n * Preprocess the given code by cleaning it up, extracting front matter and directives,\n * cleaning and merging configuration, and removing comments.\n * @param code - The code to preprocess.\n * @returns The object containing the preprocessed code, title, and configuration.\n */\nexport function preprocessDiagram(code: string) {\n  const cleanedCode = cleanupText(code);\n  const frontMatterResult = processFrontmatter(cleanedCode);\n  const directiveResult = processDirectives(frontMatterResult.text);\n  const config = cleanAndMerge(frontMatterResult.config, directiveResult.directive);\n  code = cleanupComments(directiveResult.text);\n  return {\n    code,\n    title: frontMatterResult.title,\n    config,\n  } satisfies DiagramMetadata & { code: string };\n}\n","export function toBase64(str: string) {\n  // ref: https://developer.mozilla.org/en-US/docs/Glossary/Base64#the_unicode_problem\n  const utf8Bytes = new TextEncoder().encode(str);\n  const utf8Str = Array.from(utf8Bytes, (byte) => String.fromCodePoint(byte)).join('');\n  return btoa(utf8Str);\n}\n","/**\n * This file contains functions that are used internally by mermaid\n * and is not intended to be used by the end user.\n */\n// @ts-ignore TODO: Investigate D3 issue\nimport { select } from 'd3';\nimport {\n  COMMENT,\n  compile,\n  KEYFRAMES,\n  LAYER,\n  MEDIA,\n  middleware,\n  SCOPE,\n  serialize,\n  stringify,\n  SUPPORTS,\n} from 'stylis';\nimport DOMPurify from 'dompurify';\nimport { isEmpty } from 'es-toolkit/compat';\nimport { addSVGa11yTitleDescription, setA11yDiagramInfo } from './accessibility.js';\nimport assignWithDepth from './assignWithDepth.js';\nimport * as configApi from './config.js';\nimport { getEffectiveHtmlLabels } from './config.js';\nimport type { MermaidConfig } from './config.type.js';\nimport { addDiagrams } from './diagram-api/diagram-orchestration.js';\nimport type { DiagramMetadata, DiagramStyleClassDef } from './diagram-api/types.js';\nimport { Diagram } from './Diagram.js';\nimport { evaluate } from './diagrams/common/common.js';\nimport errorRenderer from './diagrams/error/errorRenderer.js';\nimport { attachFunctions } from './interactionDb.js';\nimport { log, setLogLevel } from './logger.js';\nimport { preprocessDiagram } from './preprocess.js';\nimport getStyles, { cssStyleSheetToString } from './styles.js';\nimport theme from './themes/index.js';\nimport type {\n  D3HtmlSelection,\n  D3Selection,\n  ParseOptions,\n  ParseResult,\n  RenderResult,\n} from './types.js';\nimport { decodeEntities } from './utils.js';\nimport { toBase64 } from './utils/base64.js';\nimport { sanitizeCss } from './utils/sanitizeDirective.js';\n\nconst MAX_TEXTLENGTH = 50_000;\nconst MAX_TEXTLENGTH_EXCEEDED_MSG =\n  'graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa';\n\nconst SECURITY_LVL_SANDBOX = 'sandbox';\nconst SECURITY_LVL_LOOSE = 'loose';\n\nconst XMLNS_SVG_STD = 'http://www.w3.org/2000/svg';\nconst XMLNS_XLINK_STD = 'http://www.w3.org/1999/xlink';\nconst XMLNS_XHTML_STD = 'http://www.w3.org/1999/xhtml';\n\n// ------------------------------\n// iFrame\nconst IFRAME_WIDTH = '100%';\nconst IFRAME_HEIGHT = '100%';\nconst IFRAME_STYLES = 'border:0;margin:0;';\nconst IFRAME_BODY_STYLE = 'margin:0';\nconst IFRAME_SANDBOX_OPTS = 'allow-top-navigation-by-user-activation allow-popups';\nconst IFRAME_NOT_SUPPORTED_MSG = 'The \"iframe\" tag is not supported by your browser.';\n\n// DOMPurify settings for svgCode\nconst DOMPURIFY_TAGS = ['foreignobject'];\nconst DOMPURIFY_ATTR = ['dominant-baseline'];\n\nfunction processAndSetConfigs(text: string) {\n  const processed = preprocessDiagram(text);\n  configApi.reset();\n  configApi.addDirective(processed.config ?? {});\n  return processed;\n}\n\n/**\n * Parse the text and validate the syntax.\n * @param text - The mermaid diagram definition.\n * @param parseOptions - Options for parsing. @see {@link ParseOptions}\n * @returns An object with the `diagramType` set to type of the diagram if valid. Otherwise `false` if parseOptions.suppressErrors is `true`.\n * @throws Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.\n */\nasync function parse(\n  text: string,\n  parseOptions: ParseOptions & { suppressErrors: true }\n): Promise<ParseResult | false>;\nasync function parse(text: string, parseOptions?: ParseOptions): Promise<ParseResult>;\nasync function parse(text: string, parseOptions?: ParseOptions): Promise<ParseResult | false> {\n  addDiagrams();\n  try {\n    const { code, config } = processAndSetConfigs(text);\n    const diagram = await getDiagramFromText(code);\n    return { diagramType: diagram.type, config };\n  } catch (error) {\n    if (parseOptions?.suppressErrors) {\n      return false;\n    }\n    throw error;\n  }\n}\n\n/**\n * Create a CSS style that starts with the given class name, then the element,\n * with an enclosing block that has each of the cssClasses followed by !important;\n * @param cssClass - CSS class name\n * @param element - CSS element\n * @param cssClasses - list of CSS styles to append after the element\n * @returns - the constructed string\n */\nexport const cssImportantStyles = (\n  cssClass: string,\n  element: string,\n  cssClasses: string[] = []\n): string => {\n  const declarationBlock = sanitizeCss(`{ ${cssClasses.join(' !important; ')} !important; }`);\n  return `.${cssClass} ${element} ${declarationBlock}`;\n};\n\n/**\n * Create the user styles\n * @internal\n * @param  config - configuration that has style and theme settings to use\n * @param  classDefs - the classDefs in the diagram text. Might be null if none were defined. Usually is the result of a call to getClasses(...)\n * @returns  the string with all the user styles\n */\nexport const createCssStyles = (\n  config: MermaidConfig,\n  classDefs: Map<string, DiagramStyleClassDef> | null | undefined = new Map()\n): string => {\n  const cssStyles = new CSSStyleSheet();\n\n  // user provided theme CSS info\n  // If you add more configuration driven data into the user styles make sure that the value is\n  // sanitized by the sanitize CSS function TODO where is this method?  what should be used to replace it?  refactor so that it's always sanitized\n  if (config.fontFamily !== undefined) {\n    cssStyles.insertRule(\n      `:root { --mermaid-font-family: ${config.fontFamily}}`,\n      cssStyles.cssRules.length\n    );\n  }\n  if (config.altFontFamily !== undefined) {\n    cssStyles.insertRule(\n      `:root { --mermaid-alt-font-family: ${config.altFontFamily}}`,\n      cssStyles.cssRules.length\n    );\n  }\n\n  // classDefs defined in the diagram text\n  if (classDefs instanceof Map) {\n    const htmlLabels = getEffectiveHtmlLabels(config);\n\n    const cssHtmlElements = ['> *', 'span']; // TODO make a constant\n    const cssShapeElements = ['rect', 'polygon', 'ellipse', 'circle', 'path']; // TODO make a constant\n\n    const cssElements = htmlLabels ? cssHtmlElements : cssShapeElements;\n\n    // create the CSS styles needed for each styleClass definition and css element\n    classDefs.forEach((styleClassDef) => {\n      // create the css styles for each cssElement and the styles (only if there are styles)\n      if (!isEmpty(styleClassDef.styles)) {\n        cssElements.forEach((cssElement) => {\n          cssStyles.insertRule(\n            cssImportantStyles(styleClassDef.id, cssElement, styleClassDef.styles),\n            cssStyles.cssRules.length\n          );\n        });\n      }\n      // create the css styles for the tspan element and the text styles (only if there are textStyles)\n      if (!isEmpty(styleClassDef.textStyles)) {\n        cssStyles.insertRule(\n          cssImportantStyles(\n            styleClassDef.id,\n            'tspan',\n            (styleClassDef?.textStyles || []).map((s) => s.replace('color', 'fill'))\n          ),\n          cssStyles.cssRules.length\n        );\n      }\n    });\n  }\n\n  let cssString = '';\n  if (config.themeCSS !== undefined) {\n    if (typeof cssStyles.replaceSync === 'function') {\n      const themeCssStyleSheet = new CSSStyleSheet();\n      themeCssStyleSheet.replaceSync(config.themeCSS);\n      cssString = cssStyleSheetToString(themeCssStyleSheet) + '\\n';\n    } else {\n      /**\n       * Ideally we'd do a `CSSStyleSheet.replaceSync`, but it's not supported\n       * in some older browsers and in JSDOM.\n       */\n      cssString += `${config.themeCSS}\\n`;\n    }\n  }\n\n  return cssString + cssStyleSheetToString(cssStyles);\n};\n\n/**\n * Use `stylis` to compile the CSS to only apply to the given namespace.\n *\n * This will also remove some newer CSS features (e.g. nesting) to better\n * support older browsers and does some minification. It also removes some\n * at-rules that can't be namespaced.\n *\n * @internal\n * @param namespace - the namespace to add in front of all the CSS styles, e.g. `#idOfSvgElement`\n * @param css - the CSS styles to add the namespace to.\n * @see https://github.com/thysultan/stylis\n *\n * @example\n * // Returns `#id .class1{fill:red;}`\n * compileCSS('#id', `.class1 { fill: red }`)\n */\nconst compileCSS = (namespace: `#${string}`, css: string) => {\n  return serialize(\n    compile(`${namespace}{${css}}`),\n    middleware([\n      function addNamespace(element, _index, _children, _callback) {\n        /**\n         * CSS normally automatically adds the `&` selector in front of each\n         * element. But, if there's already an `&` selector, it doesn't add this.\n         *\n         * This code will explicitly make sure it's always added, to ensure\n         * that the CSS never applies outside the SVG.\n         *\n         * E.g. `#svgId { .nested-class :not(&) { fill: red } }` will be\n         * transformed to `#svgId { & .nested-class :not(&) { fill: red } }`\n         */\n        if (element.type === 'rule' && Array.isArray(element.props)) {\n          if (element.parent && element.parent.type === KEYFRAMES) {\n            /**\n             * Don't namespace CSSKeyframeRule, since they don't have selectors.\n             */\n            return;\n          }\n          element.props = element.props.map((prop) => {\n            if (!prop.startsWith(namespace)) {\n              return `${namespace} ${prop}`;\n            }\n            return prop;\n          });\n        } else if (element.type.startsWith('@')) {\n          // Only allow certain at-rules to avoid namespace escape.\n          //\n          // Nested ones are allowed, since they'd get namespaced appropriately.\n          // @keyframes are required for Mermaid's animation features, even\n          // if they can potentially pollute the page.\n\n          /**\n           * At-rules that contain nested rules.\n           *\n           * @see {@link https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@container}\n           */\n          const nestedAtRules = [\n            MEDIA,\n            SUPPORTS,\n            LAYER,\n            SCOPE,\n            '@container',\n            '@starting-style',\n          ] as const;\n          const allowedAtRules = [\n            ...nestedAtRules,\n            KEYFRAMES, // needed for Mermaid's animation feature\n          ] as const;\n          if (!allowedAtRules.includes(element.type as (typeof allowedAtRules)[number])) {\n            log.warn(`Removing unsupported at-rule ${element.type} from CSS`);\n            element.type = COMMENT;\n          }\n        }\n      },\n      stringify,\n    ])\n  );\n};\n\nexport const createUserStyles = (\n  config: MermaidConfig,\n  graphType: string,\n  classDefs: Map<string, DiagramStyleClassDef> | undefined,\n  // CSS selector for the SVG element, e.g. `#idOfSvgElement`\n  svgId: `#${string}`\n): string => {\n  const userCSSstyles = createCssStyles(config, classDefs);\n  const allStyles = getStyles(\n    graphType,\n    userCSSstyles,\n    { ...config.themeVariables, theme: config.theme, look: config.look },\n    svgId\n  );\n  return compileCSS(svgId, allStyles);\n};\n\n/**\n * Clean up svgCode. Do replacements needed\n *\n * @param svgCode - the code to clean up\n * @param inSandboxMode - security level\n * @param useArrowMarkerUrls - should arrow marker's use full urls? (vs. just the anchors)\n * @returns the cleaned up svgCode\n */\nexport const cleanUpSvgCode = (\n  svgCode = '',\n  inSandboxMode: boolean,\n  useArrowMarkerUrls: boolean\n): string => {\n  let cleanedUpSvg = svgCode;\n\n  // Replace marker-end urls with just the # anchor (remove the preceding part of the URL)\n  if (!useArrowMarkerUrls && !inSandboxMode) {\n    cleanedUpSvg = cleanedUpSvg.replace(\n      /marker-end=\"url\\([\\d+./:=?A-Za-z-]*?#/g,\n      'marker-end=\"url(#'\n    );\n  }\n\n  cleanedUpSvg = decodeEntities(cleanedUpSvg);\n\n  // replace old br tags with newer style\n  cleanedUpSvg = cleanedUpSvg.replace(/<br>/g, '<br/>');\n\n  return cleanedUpSvg;\n};\n\n/**\n * Put the svgCode into an iFrame. Return the iFrame code\n *\n * @param svgCode - the svg code to put inside the iFrame\n * @param svgElement - the d3 node that has the current svgElement so we can get the height from it\n * @returns  - the code with the iFrame that now contains the svgCode\n */\nexport const putIntoIFrame = (svgCode = '', svgElement?: SVGSVGElement): string => {\n  const height = svgElement?.viewBox?.baseVal?.height\n    ? svgElement.viewBox.baseVal.height + 'px'\n    : IFRAME_HEIGHT;\n  const base64encodedSrc = toBase64(`<body style=\"${IFRAME_BODY_STYLE}\">${svgCode}</body>`);\n  return `<iframe style=\"width:${IFRAME_WIDTH};height:${height};${IFRAME_STYLES}\" src=\"data:text/html;charset=UTF-8;base64,${base64encodedSrc}\" sandbox=\"${IFRAME_SANDBOX_OPTS}\">\n  ${IFRAME_NOT_SUPPORTED_MSG}\n</iframe>`;\n};\n\n/**\n * Append an enclosing div, then svg, then g (group) to the d3 parentRoot. Set attributes.\n * Only set the style attribute on the enclosing div if divStyle is given.\n * Only set the xmlns:xlink attribute on svg if svgXlink is given.\n * Return the last node appended\n *\n * @param parentRoot - the d3 node to append things to\n * @param id - the value to set the id attr to\n * @param enclosingDivId - the id to set the enclosing div to\n * @param divStyle - if given, the style to set the enclosing div to\n * @param svgXlink - if given, the link to set the new svg element to\n * @returns - returns the parentRoot that had nodes appended\n */\nexport const appendDivSvgG = (\n  parentRoot: D3HtmlSelection<HTMLElement> | D3HtmlSelection<Element>,\n  id: string,\n  enclosingDivId: string,\n  divStyle?: string,\n  svgXlink?: string\n) => {\n  const enclosingDiv = parentRoot.append('div');\n  enclosingDiv.attr('id', enclosingDivId);\n  if (divStyle) {\n    enclosingDiv.attr('style', divStyle);\n  }\n\n  const svgNode = enclosingDiv\n    .append('svg')\n    .attr('id', id)\n    .attr('width', '100%')\n    .attr('xmlns', XMLNS_SVG_STD);\n  if (svgXlink) {\n    svgNode.attr('xmlns:xlink', svgXlink);\n  }\n\n  svgNode.append('g');\n  return parentRoot;\n};\n\n/**\n * Append an iFrame node to the given parentNode and set the id, style, and 'sandbox' attributes\n *  Return the appended iframe d3 node\n *\n * @param parentNode - the d3 node to append the iFrame node to\n * @param iFrameId - id to use for the iFrame\n * @returns the appended iframe d3 node\n */\nfunction sandboxedIframe(\n  parentNode: D3HtmlSelection<Element> | D3HtmlSelection<HTMLElement>,\n  iFrameId: string\n) {\n  return parentNode\n    .append('iframe')\n    .attr('id', iFrameId)\n    .attr('style', 'width: 100%; height: 100%;')\n    .attr('sandbox', '');\n}\n\n/**\n * Remove any existing elements from the given document\n *\n * @param doc - the document to removed elements from\n * @param id - id for any existing SVG element\n * @param divSelector - selector for any existing enclosing div element\n * @param iFrameSelector - selector for any existing iFrame element\n */\nexport const removeExistingElements = (\n  doc: Document,\n  id: string,\n  divId: string,\n  iFrameId: string\n) => {\n  // Remove existing SVG element if it exists\n  doc.getElementById(id)?.remove();\n  // Remove previous temporary element if it exists\n  // Both div and iframe needs to be cleared in case there is a config change happening between renders.\n  doc.getElementById(divId)?.remove();\n  doc.getElementById(iFrameId)?.remove();\n};\n\n/**\n * @deprecated - use the `mermaid.render` function instead of `mermaid.mermaidAPI.render`\n *\n * Deprecated for external use.\n */\n\nconst render = async function (\n  id: string,\n  text: string,\n  svgContainingElement?: Element\n): Promise<RenderResult> {\n  addDiagrams();\n\n  const processed = processAndSetConfigs(text);\n  text = processed.code;\n\n  const config = configApi.getConfig();\n  log.debug(config);\n\n  // Check the maximum allowed text size\n  if (text.length > (config?.maxTextSize ?? MAX_TEXTLENGTH)) {\n    text = MAX_TEXTLENGTH_EXCEEDED_MSG;\n  }\n\n  const idSelector = `#${id}` as const;\n  const iFrameID = 'i' + id;\n  const iFrameID_selector = '#' + iFrameID;\n  const enclosingDivID = 'd' + id;\n  const enclosingDivID_selector = '#' + enclosingDivID;\n\n  const removeTempElements = () => {\n    // -------------------------------------------------------------------------------\n    // Remove the temporary HTML element if appropriate\n    const tmpElementSelector = isSandboxed ? iFrameID_selector : enclosingDivID_selector;\n    const node = select(tmpElementSelector).node();\n    if (node && 'remove' in node) {\n      node.remove();\n    }\n  };\n\n  let root: D3HtmlSelection<HTMLElement> | D3HtmlSelection<Element> = select(document.body);\n\n  const isSandboxed = config.securityLevel === SECURITY_LVL_SANDBOX;\n  const isLooseSecurityLevel = config.securityLevel === SECURITY_LVL_LOOSE;\n\n  const fontFamily = config.fontFamily;\n\n  // -------------------------------------------------------------------------------\n  // Define the root d3 node\n  // In regular execution the svgContainingElement will be the element with a mermaid class\n\n  if (svgContainingElement !== undefined) {\n    if (svgContainingElement) {\n      svgContainingElement.innerHTML = '';\n    }\n\n    if (isSandboxed) {\n      // If we are in sandboxed mode, we do everything mermaid related in a (sandboxed )iFrame\n      const iframe = sandboxedIframe(select(svgContainingElement), iFrameID);\n      root = select(iframe.nodes()[0].contentDocument!.body);\n      root.node()!.style.margin = '0';\n    } else {\n      root = select(svgContainingElement);\n    }\n    appendDivSvgG(root, id, enclosingDivID, `font-family: ${fontFamily}`, XMLNS_XLINK_STD);\n  } else {\n    // No svgContainingElement was provided\n\n    // If there is an existing element with the id, we remove it. This likely a previously rendered diagram\n    removeExistingElements(document, id, enclosingDivID, iFrameID);\n\n    // Add the temporary div used for rendering with the enclosingDivID.\n    // This temporary div will contain a svg with the id == id\n\n    if (isSandboxed) {\n      // If we are in sandboxed mode, we do everything mermaid related in a (sandboxed) iFrame\n      const iframe = sandboxedIframe(select(document.body), iFrameID);\n      root = select(iframe.nodes()[0].contentDocument!.body);\n      root.node()!.style.margin = '0';\n    } else {\n      root = select('body');\n    }\n\n    appendDivSvgG(root, id, enclosingDivID);\n  }\n\n  // -------------------------------------------------------------------------------\n  // Create the diagram\n\n  // Important that we do not create the diagram until after the directives have been included\n  let diag: Diagram;\n  let parseEncounteredException;\n\n  try {\n    diag = await Diagram.fromText(text, { title: processed.title });\n  } catch (error) {\n    if (config.suppressErrorRendering) {\n      removeTempElements();\n      throw error;\n    }\n    diag = await Diagram.fromText('error');\n    parseEncounteredException = error;\n  }\n\n  // Get the temporary div element containing the svg\n  const element = root.select<HTMLDivElement>(enclosingDivID_selector).node()!;\n  const diagramType = diag.type;\n\n  // -------------------------------------------------------------------------------\n  // Create and insert the styles (user styles, theme styles, config styles)\n\n  // Insert an element into svg. This is where we put the styles\n  const svg = element.firstChild!;\n  const firstChild = svg.firstChild;\n  const diagramClassDefs = diag.renderer.getClasses?.(text, diag);\n\n  const rules = createUserStyles(config, diagramType, diagramClassDefs, idSelector);\n\n  const style1 = document.createElement('style');\n  style1.innerHTML = rules;\n  svg.insertBefore(style1, firstChild);\n\n  // -------------------------------------------------------------------------------\n  // Draw the diagram with the renderer\n  try {\n    await diag.renderer.draw(text, id, injected.version, diag);\n  } catch (e) {\n    if (config.suppressErrorRendering) {\n      removeTempElements();\n    } else {\n      errorRenderer.draw(text, id, injected.version);\n    }\n    throw e;\n  }\n\n  // This is the d3 node for the svg element\n  const svgNode = root.select<SVGSVGElement>(`${enclosingDivID_selector} svg`);\n  const a11yTitle: string | undefined = diag.db.getAccTitle?.();\n  const a11yDescr: string | undefined = diag.db.getAccDescription?.();\n  addA11yInfo(diagramType, svgNode, a11yTitle, a11yDescr);\n  // -------------------------------------------------------------------------------\n  // Clean up SVG code\n  root.select(`[id=\"${id}\"]`).selectAll('foreignobject > *').attr('xmlns', XMLNS_XHTML_STD);\n\n  // Fix for when the base tag is used\n  let svgCode: string = root.select<HTMLDivElement>(enclosingDivID_selector).node()!.innerHTML;\n\n  log.debug('config.arrowMarkerAbsolute', config.arrowMarkerAbsolute);\n  svgCode = cleanUpSvgCode(svgCode, isSandboxed, evaluate(config.arrowMarkerAbsolute));\n\n  if (isSandboxed) {\n    const svgEl = root.select<SVGSVGElement>(enclosingDivID_selector + ' svg').node()!;\n    svgCode = putIntoIFrame(svgCode, svgEl);\n  } else if (!isLooseSecurityLevel) {\n    // Sanitize the svgCode using DOMPurify\n    svgCode = DOMPurify.sanitize(svgCode, {\n      ADD_TAGS: DOMPURIFY_TAGS,\n      ADD_ATTR: DOMPURIFY_ATTR,\n      HTML_INTEGRATION_POINTS: { foreignobject: true },\n    });\n  }\n\n  attachFunctions();\n\n  if (parseEncounteredException) {\n    throw parseEncounteredException;\n  }\n\n  removeTempElements();\n\n  return {\n    diagramType,\n    svg: svgCode,\n    bindFunctions: diag.db.bindFunctions,\n  };\n};\n\n/**\n * @param  userOptions - Initial Mermaid options\n */\nfunction initialize(userOptions: MermaidConfig = {}) {\n  const options: MermaidConfig = assignWithDepth({}, userOptions);\n  // Handle legacy location of font-family configuration\n  if (options?.fontFamily && !options.themeVariables?.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\nconst getDiagramFromText = (text: string, metadata: Pick<DiagramMetadata, 'title'> = {}) => {\n  const { code } = preprocessDiagram(text);\n  return Diagram.fromText(code, metadata);\n};\n\n/**\n * Add accessibility (a11y) information to the diagram.\n *\n * @param diagramType - diagram type\n * @param svgNode - d3 node to insert the a11y title and desc info\n * @param a11yTitle - a11y title\n * @param a11yDescr - a11y description\n */\nfunction addA11yInfo(\n  diagramType: string,\n  svgNode: D3Selection<SVGSVGElement>,\n  a11yTitle?: string,\n  a11yDescr?: string\n): void {\n  setA11yDiagramInfo(svgNode, diagramType);\n  addSVGa11yTitleDescription(svgNode, a11yTitle, a11yDescr, svgNode.attr('id'));\n}\n\n/**\n * @internal - Use mermaid.function instead of mermaid.mermaidAPI.function\n */\nexport const mermaidAPI = Object.freeze({\n  render,\n  parse,\n  getDiagramFromText,\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 * 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 { AsyncIconLoader, IconLoader, SyncIconLoader } from './rendering-util/icons.js';\nimport { registerIconPacks } from './rendering-util/icons.js';\nimport { dedent } from 'ts-dedent';\nimport type { MermaidConfig } from './config.type.js';\nimport { detectType, detectors, registerLazyLoadedDiagrams } from './diagram-api/detectType.js';\nimport { addDiagrams } from './diagram-api/diagram-orchestration.js';\nimport { loadRegisteredDiagrams } from './diagram-api/loadDiagram.js';\nimport type { ExternalDiagramDefinition, SVG, SVGGroup } from './diagram-api/types.js';\nimport type { ParseErrorFunction } from './Diagram.js';\nimport type { UnknownDiagramError } from './errors.js';\nimport type { InternalHelpers } from './internals.js';\nimport { log } from './logger.js';\nimport { mermaidAPI } from './mermaidAPI.js';\nimport type { LayoutLoaderDefinition, RenderOptions } from './rendering-util/render.js';\nimport { registerLayoutLoaders } from './rendering-util/render.js';\nimport type { LayoutData } from './rendering-util/types.js';\nimport type { ParseOptions, ParseResult, RenderResult } from './types.js';\nimport type { DetailedError } from './utils.js';\nimport utils, { isDetailedError } from './utils.js';\n\nexport type {\n  AsyncIconLoader,\n  DetailedError,\n  ExternalDiagramDefinition,\n  IconLoader,\n  InternalHelpers,\n  LayoutData,\n  LayoutLoaderDefinition,\n  MermaidConfig,\n  ParseErrorFunction,\n  ParseOptions,\n  ParseResult,\n  RenderOptions,\n  RenderResult,\n  SVG,\n  SVGGroup,\n  SyncIconLoader,\n  UnknownDiagramError,\n};\n\nexport interface RunOptions {\n  /**\n   * The query selector to use when finding elements to render. Default: `\".mermaid\"`.\n   */\n  querySelector?: string;\n  /**\n   * The nodes to render. If this is set, `querySelector` will be ignored.\n   */\n  nodes?: ArrayLike<HTMLElement>;\n  /**\n   * A callback to call after each diagram is rendered.\n   */\n  postRenderCallback?: (id: string) => unknown;\n  /**\n   * If `true`, errors will be logged to the console, but not thrown. Default: `false`\n   */\n  suppressErrors?: boolean;\n}\n\nconst handleError = (error: unknown, errors: DetailedError[], parseError?: ParseErrorFunction) => {\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/**\n * ## run\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 * ```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 options - Optional runtime configs\n */\nconst run = async function (\n  options: RunOptions = {\n    querySelector: '.mermaid',\n  }\n) {\n  try {\n    await runThrowsErrors(options);\n  } catch (e) {\n    if (isDetailedError(e)) {\n      log.error(e.str);\n    }\n    if (mermaid.parseError) {\n      mermaid.parseError(e as string);\n    }\n    if (!options.suppressErrors) {\n      log.error('Use the suppressErrors option to suppress these errors');\n      throw e;\n    }\n  }\n};\n\nconst runThrowsErrors = async function (\n  { postRenderCallback, querySelector, nodes }: Omit<RunOptions, 'suppressErrors'> = {\n    querySelector: '.mermaid',\n  }\n) {\n  const conf = mermaidAPI.getConfig();\n\n  log.debug(`${!postRenderCallback ? 'No ' : ''}Callback function found`);\n\n  let nodesToProcess: ArrayLike<HTMLElement>;\n  if (nodes) {\n    nodesToProcess = nodes;\n  } else if (querySelector) {\n    nodesToProcess = document.querySelectorAll(querySelector);\n  } else {\n    throw new Error('Nodes and querySelector are both undefined');\n  }\n\n  log.debug(`Found ${nodesToProcess.length} diagrams`);\n  if (conf?.startOnLoad !== undefined) {\n    log.debug('Start On Load: ' + conf?.startOnLoad);\n    mermaidAPI.updateSiteConfig({ startOnLoad: conf?.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  // eslint-disable-next-line unicorn/prefer-spread\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 = dedent(utils.entityDecode(txt)) // removes indentation, required for YAML parsing\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      const { svg, bindFunctions } = await render(id, txt, element);\n      element.innerHTML = svg;\n      if (postRenderCallback) {\n        await postRenderCallback(id);\n      }\n      if (bindFunctions) {\n        bindFunctions(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\n/**\n * Used to set configurations for mermaid.\n * This function should be called before the run function.\n * @param config - Configuration object for mermaid.\n */\n\nconst initialize = function (config: MermaidConfig) {\n  mermaidAPI.initialize(config);\n};\n\n/**\n * ## init\n *\n * @deprecated Use {@link initialize} and {@link run} instead.\n *\n * Renders the mermaid diagrams\n *\n * @param config - **Deprecated**, please set configuration in {@link initialize}.\n * @param nodes - **Default**: `.mermaid`. One of the following:\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 * @param callback - Called once for each rendered diagram's id.\n */\nconst init = async function (\n  config?: MermaidConfig,\n  nodes?: string | HTMLElement | NodeListOf<HTMLElement>,\n  callback?: (id: string) => unknown\n) {\n  log.warn('mermaid.init is deprecated. Please use run instead.');\n  if (config) {\n    initialize(config);\n  }\n  const runOptions: RunOptions = { postRenderCallback: callback, querySelector: '.mermaid' };\n  if (typeof nodes === 'string') {\n    runOptions.querySelector = nodes;\n  } else if (nodes) {\n    if (nodes instanceof HTMLElement) {\n      runOptions.nodes = [nodes];\n    } else {\n      runOptions.nodes = nodes;\n    }\n  }\n  await run(runOptions);\n};\n\n/**\n * Used to register external diagram types.\n * @param diagrams - Array of {@link ExternalDiagramDefinition}.\n * @param opts - If opts.lazyLoad is false, the diagrams will be loaded immediately.\n */\nconst registerExternalDiagrams = async (\n  diagrams: ExternalDiagramDefinition[],\n  {\n    lazyLoad = true,\n  }: {\n    lazyLoad?: boolean;\n  } = {}\n) => {\n  addDiagrams();\n  registerLazyLoadedDiagrams(...diagrams);\n  if (lazyLoad === false) {\n    await loadRegisteredDiagrams();\n  }\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.run().catch((err) => log.error('Mermaid failed to initialize', err));\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 parseErrorHandler - New parseError() callback.\n */\nconst setParseErrorHandler = function (parseErrorHandler: (err: any, hash: any) => void) {\n  mermaid.parseError = parseErrorHandler;\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 * Parse the text and validate the syntax.\n * @param text - The mermaid diagram definition.\n * @param parseOptions - Options for parsing. @see {@link ParseOptions}\n * @returns If valid, {@link ParseResult} otherwise `false` if parseOptions.suppressErrors is `true`.\n * @throws Error if the diagram is invalid and parseOptions.suppressErrors is false or not set.\n *\n * @example\n * ```js\n * console.log(await mermaid.parse('flowchart \\n a --> b'));\n * // { diagramType: 'flowchart-v2' }\n * console.log(await mermaid.parse('wrong \\n a --> b', { suppressErrors: true }));\n * // false\n * console.log(await mermaid.parse('wrong \\n a --> b', { suppressErrors: false }));\n * // throws Error\n * console.log(await mermaid.parse('wrong \\n a --> b'));\n * // throws Error\n * ```\n */\nconst parse: typeof mermaidAPI.parse = async (text, parseOptions) => {\n  return new Promise((resolve, reject) => {\n    // This promise will resolve when the 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.parse(text, parseOptions).then(\n          (r) => {\n            // This resolves for the promise for the queue handling\n            res(r);\n            // This fulfills the promise sent to the value back to the original caller\n            resolve(r);\n          },\n          (e) => {\n            log.error('Error parsing', e);\n            mermaid.parseError?.(e);\n            rej(e);\n            reject(e);\n          }\n        );\n      });\n    executionQueue.push(performCall);\n    executeQueue().catch(reject);\n  });\n};\n\n/**\n * Function that renders an SVG with a graph from a chart definition. Usage example below.\n *\n * ```javascript\n *  element = document.querySelector('#graphDiv');\n *  const graphDefinition = 'graph TB\\na-->b';\n *  const { svg, bindFunctions } = await mermaid.render('graphDiv', graphDefinition);\n *  element.innerHTML = svg;\n *  bindFunctions?.(element);\n * ```\n *\n * @remarks\n * Multiple calls to this function will be enqueued to run serially.\n *\n * @param id - The id for the SVG element (the element to be rendered)\n * @param text - The text for the graph definition\n * @param container - HTML element where the svg will be inserted. (Is usually element with the .mermaid class)\n *   If no svgContainingElement is provided then the SVG element will be appended to the body.\n *    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 Returns the SVG Definition and BindFunctions.\n */\nconst render: typeof mermaidAPI.render = (id, text, container) => {\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.render(id, text, container).then(\n          (r) => {\n            // This resolves for the promise for the queue handling\n            res(r);\n            // This fulfills the promise sent to the value back to the original caller\n            resolve(r);\n          },\n          (e) => {\n            log.error('Error parsing', e);\n            mermaid.parseError?.(e);\n            rej(e);\n            reject(e);\n          }\n        );\n      });\n    executionQueue.push(performCall);\n    executeQueue().catch(reject);\n  });\n};\n\n/**\n * Gets the metadata for all registered diagrams.\n * Currently only the id is returned.\n * @returns An array of objects with the id of the diagram.\n */\nconst getRegisteredDiagramsMetadata = (): Pick<ExternalDiagramDefinition, 'id'>[] => {\n  return Object.keys(detectors).map((id) => ({\n    id,\n  }));\n};\n\nexport interface Mermaid {\n  startOnLoad: boolean;\n  parseError?: ParseErrorFunction;\n  /**\n   * @deprecated Use {@link parse} and {@link render} instead. Please [open a discussion](https://github.com/mermaid-js/mermaid/discussions) if your use case does not fit the new API.\n   * @internal\n   */\n  mermaidAPI: typeof mermaidAPI;\n  parse: typeof parse;\n  render: typeof render;\n  /**\n   * @deprecated Use {@link initialize} and {@link run} instead.\n   */\n  init: typeof init;\n  run: typeof run;\n  registerLayoutLoaders: typeof registerLayoutLoaders;\n  registerExternalDiagrams: typeof registerExternalDiagrams;\n  initialize: typeof initialize;\n  contentLoaded: typeof contentLoaded;\n  setParseErrorHandler: typeof setParseErrorHandler;\n  detectType: typeof detectType;\n  registerIconPacks: typeof registerIconPacks;\n  getRegisteredDiagramsMetadata: typeof getRegisteredDiagramsMetadata;\n}\n\nconst mermaid: Mermaid = {\n  startOnLoad: true,\n  mermaidAPI,\n  parse,\n  render,\n  init,\n  run,\n  registerExternalDiagrams,\n  registerLayoutLoaders,\n  initialize,\n  parseError: undefined,\n  contentLoaded,\n  setParseErrorHandler,\n  detectType,\n  registerIconPacks,\n  getRegisteredDiagramsMetadata,\n};\n\nexport default mermaid;\n"]}