{
  "version": 3,
  "sources": ["../../../src/diagram-api/regexes.ts", "../../../src/errors.ts", "../../../src/diagram-api/detectType.ts", "../../../src/assignWithDepth.ts", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/channel.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/lang.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/unit.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/index.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/constants.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/type.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/index.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/reusable.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/hex.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/hsl.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/keyword.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/rgb.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/index.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/change.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/rgba.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/channel.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/luminance.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/is_light.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/is_dark.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/adjust_channel.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/lighten.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/darken.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/transparentize.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/adjust.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/mix.js", "../../../../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/invert.js", "../../../src/themes/erDiagram-oldHardcodedValues.ts", "../../../src/themes/theme-helpers.js", "../../../src/themes/theme-base.js", "../../../src/themes/theme-dark.js", "../../../src/themes/theme-default.js", "../../../src/themes/theme-forest.js", "../../../src/themes/theme-neutral.js", "../../../src/themes/theme-neo.js", "../../../src/themes/theme-neo-dark.js", "../../../src/themes/theme-redux.js", "../../../src/themes/theme-redux-dark.js", "../../../src/themes/theme-redux-color.js", "../../../src/themes/theme-redux-dark-color.js", "../../../src/themes/index.js", "../../../src/schemas/config.schema.yaml", "../../../src/defaultConfig.ts", "../../../src/utils/sanitizeDirective.ts", "../../../src/config.ts", "../../../../../node_modules/.pnpm/dompurify@3.3.1/node_modules/dompurify/src/utils.ts", "../../../../../node_modules/.pnpm/dompurify@3.3.1/node_modules/dompurify/src/tags.ts", "../../../../../node_modules/.pnpm/dompurify@3.3.1/node_modules/dompurify/src/attrs.ts", "../../../../../node_modules/.pnpm/dompurify@3.3.1/node_modules/dompurify/src/regexp.ts", "../../../../../node_modules/.pnpm/dompurify@3.3.1/node_modules/dompurify/src/purify.ts", "../../../src/diagrams/common/common.ts", "../../../src/setupGraphViewbox.js", "../../../src/styles.ts", "../../../src/diagrams/common/commonDb.ts", "../../../src/diagram-api/diagramAPI.ts"],
  "sourcesContent": ["// 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\nexport const frontMatterRegex = /^-{3}\\s*[\\n\\r](.*?)[\\n\\r]-{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", "/* 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", "/* IMPORT */\n/* MAIN */\nconst Channel = {\n    /* CLAMP */\n    min: {\n        r: 0,\n        g: 0,\n        b: 0,\n        s: 0,\n        l: 0,\n        a: 0\n    },\n    max: {\n        r: 255,\n        g: 255,\n        b: 255,\n        h: 360,\n        s: 100,\n        l: 100,\n        a: 1\n    },\n    clamp: {\n        r: (r) => r >= 255 ? 255 : (r < 0 ? 0 : r),\n        g: (g) => g >= 255 ? 255 : (g < 0 ? 0 : g),\n        b: (b) => b >= 255 ? 255 : (b < 0 ? 0 : b),\n        h: (h) => h % 360,\n        s: (s) => s >= 100 ? 100 : (s < 0 ? 0 : s),\n        l: (l) => l >= 100 ? 100 : (l < 0 ? 0 : l),\n        a: (a) => a >= 1 ? 1 : (a < 0 ? 0 : a)\n    },\n    /* CONVERSION */\n    //SOURCE: https://planetcalc.com/7779\n    toLinear: (c) => {\n        const n = c / 255;\n        return c > .03928 ? Math.pow(((n + .055) / 1.055), 2.4) : n / 12.92;\n    },\n    //SOURCE: https://gist.github.com/mjackson/5311256\n    hue2rgb: (p, q, t) => {\n        if (t < 0)\n            t += 1;\n        if (t > 1)\n            t -= 1;\n        if (t < 1 / 6)\n            return p + (q - p) * 6 * t;\n        if (t < 1 / 2)\n            return q;\n        if (t < 2 / 3)\n            return p + (q - p) * (2 / 3 - t) * 6;\n        return p;\n    },\n    hsl2rgb: ({ h, s, l }, channel) => {\n        if (!s)\n            return l * 2.55; // Achromatic\n        h /= 360;\n        s /= 100;\n        l /= 100;\n        const q = (l < .5) ? l * (1 + s) : (l + s) - (l * s);\n        const p = 2 * l - q;\n        switch (channel) {\n            case 'r': return Channel.hue2rgb(p, q, h + 1 / 3) * 255;\n            case 'g': return Channel.hue2rgb(p, q, h) * 255;\n            case 'b': return Channel.hue2rgb(p, q, h - 1 / 3) * 255;\n        }\n    },\n    rgb2hsl: ({ r, g, b }, channel) => {\n        r /= 255;\n        g /= 255;\n        b /= 255;\n        const max = Math.max(r, g, b);\n        const min = Math.min(r, g, b);\n        const l = (max + min) / 2;\n        if (channel === 'l')\n            return l * 100;\n        if (max === min)\n            return 0; // Achromatic\n        const d = max - min;\n        const s = (l > .5) ? d / (2 - max - min) : d / (max + min);\n        if (channel === 's')\n            return s * 100;\n        switch (max) {\n            case r: return ((g - b) / d + (g < b ? 6 : 0)) * 60;\n            case g: return ((b - r) / d + 2) * 60;\n            case b: return ((r - g) / d + 4) * 60;\n            default: return -1; //TSC: TypeScript is stupid and complains if there isn't this useless default statement\n        }\n    }\n};\n/* EXPORT */\nexport default Channel;\n", "/* MAIN */\nconst Lang = {\n    /* API */\n    clamp: (number, lower, upper) => {\n        if (lower > upper)\n            return Math.min(lower, Math.max(upper, number));\n        return Math.min(upper, Math.max(lower, number));\n    },\n    round: (number) => {\n        return Math.round(number * 10000000000) / 10000000000;\n    }\n};\n/* EXPORT */\nexport default Lang;\n", "/* MAIN */\nconst Unit = {\n    /* API */\n    dec2hex: (dec) => {\n        const hex = Math.round(dec).toString(16);\n        return hex.length > 1 ? hex : `0${hex}`;\n    }\n};\n/* EXPORT */\nexport default Unit;\n", "/* IMPORT */\nimport channel from './channel.js';\nimport lang from './lang.js';\nimport unit from './unit.js';\n/* MAIN */\nconst Utils = {\n    channel,\n    lang,\n    unit\n};\n/* EXPORT */\nexport default Utils;\n", "/* IMPORT */\nimport _ from './utils/index.js';\n/* MAIN */\nconst DEC2HEX = {};\nfor (let i = 0; i <= 255; i++)\n    DEC2HEX[i] = _.unit.dec2hex(i); // Populating dynamically, striking a balance between code size and performance\nconst TYPE = {\n    ALL: 0,\n    RGB: 1,\n    HSL: 2\n};\n/* EXPORT */\nexport { DEC2HEX, TYPE };\n", "/* IMPORT */\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Type {\n    constructor() {\n        /* VARIABLES */\n        this.type = TYPE.ALL;\n    }\n    /* API */\n    get() {\n        return this.type;\n    }\n    set(type) {\n        if (this.type && this.type !== type)\n            throw new Error('Cannot change both RGB and HSL channels at the same time');\n        this.type = type;\n    }\n    reset() {\n        this.type = TYPE.ALL;\n    }\n    is(type) {\n        return this.type === type;\n    }\n}\n/* EXPORT */\nexport default Type;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Type from './type.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nclass Channels {\n    /* CONSTRUCTOR */\n    constructor(data, color) {\n        this.color = color;\n        this.changed = false;\n        this.data = data; //TSC\n        this.type = new Type();\n    }\n    /* API */\n    set(data, color) {\n        this.color = color;\n        this.changed = false;\n        this.data = data; //TSC\n        this.type.type = TYPE.ALL;\n        return this;\n    }\n    /* HELPERS */\n    _ensureHSL() {\n        const data = this.data;\n        const { h, s, l } = data;\n        if (h === undefined)\n            data.h = _.channel.rgb2hsl(data, 'h');\n        if (s === undefined)\n            data.s = _.channel.rgb2hsl(data, 's');\n        if (l === undefined)\n            data.l = _.channel.rgb2hsl(data, 'l');\n    }\n    _ensureRGB() {\n        const data = this.data;\n        const { r, g, b } = data;\n        if (r === undefined)\n            data.r = _.channel.hsl2rgb(data, 'r');\n        if (g === undefined)\n            data.g = _.channel.hsl2rgb(data, 'g');\n        if (b === undefined)\n            data.b = _.channel.hsl2rgb(data, 'b');\n    }\n    /* GETTERS */\n    get r() {\n        const data = this.data;\n        const r = data.r;\n        if (!this.type.is(TYPE.HSL) && r !== undefined)\n            return r;\n        this._ensureHSL();\n        return _.channel.hsl2rgb(data, 'r');\n    }\n    get g() {\n        const data = this.data;\n        const g = data.g;\n        if (!this.type.is(TYPE.HSL) && g !== undefined)\n            return g;\n        this._ensureHSL();\n        return _.channel.hsl2rgb(data, 'g');\n    }\n    get b() {\n        const data = this.data;\n        const b = data.b;\n        if (!this.type.is(TYPE.HSL) && b !== undefined)\n            return b;\n        this._ensureHSL();\n        return _.channel.hsl2rgb(data, 'b');\n    }\n    get h() {\n        const data = this.data;\n        const h = data.h;\n        if (!this.type.is(TYPE.RGB) && h !== undefined)\n            return h;\n        this._ensureRGB();\n        return _.channel.rgb2hsl(data, 'h');\n    }\n    get s() {\n        const data = this.data;\n        const s = data.s;\n        if (!this.type.is(TYPE.RGB) && s !== undefined)\n            return s;\n        this._ensureRGB();\n        return _.channel.rgb2hsl(data, 's');\n    }\n    get l() {\n        const data = this.data;\n        const l = data.l;\n        if (!this.type.is(TYPE.RGB) && l !== undefined)\n            return l;\n        this._ensureRGB();\n        return _.channel.rgb2hsl(data, 'l');\n    }\n    get a() {\n        return this.data.a;\n    }\n    /* SETTERS */\n    set r(r) {\n        this.type.set(TYPE.RGB);\n        this.changed = true;\n        this.data.r = r;\n    }\n    set g(g) {\n        this.type.set(TYPE.RGB);\n        this.changed = true;\n        this.data.g = g;\n    }\n    set b(b) {\n        this.type.set(TYPE.RGB);\n        this.changed = true;\n        this.data.b = b;\n    }\n    set h(h) {\n        this.type.set(TYPE.HSL);\n        this.changed = true;\n        this.data.h = h;\n    }\n    set s(s) {\n        this.type.set(TYPE.HSL);\n        this.changed = true;\n        this.data.s = s;\n    }\n    set l(l) {\n        this.type.set(TYPE.HSL);\n        this.changed = true;\n        this.data.l = l;\n    }\n    set a(a) {\n        this.changed = true;\n        this.data.a = a;\n    }\n}\n/* EXPORT */\nexport default Channels;\n", "/* IMPORT */\nimport Channels from './/index.js';\n/* MAIN */\nconst channels = new Channels({ r: 0, g: 0, b: 0, a: 0 }, 'transparent');\n/* EXPORT */\nexport default channels;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport { DEC2HEX } from '../constants.js';\n/* MAIN */\nconst Hex = {\n    /* VARIABLES */\n    re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,\n    /* API */\n    parse: (color) => {\n        if (color.charCodeAt(0) !== 35)\n            return; // '#'\n        const match = color.match(Hex.re);\n        if (!match)\n            return;\n        const hex = match[1];\n        const dec = parseInt(hex, 16);\n        const length = hex.length;\n        const hasAlpha = length % 4 === 0;\n        const isFullLength = length > 4;\n        const multiplier = isFullLength ? 1 : 17;\n        const bits = isFullLength ? 8 : 4;\n        const bitsOffset = hasAlpha ? 0 : -1;\n        const mask = isFullLength ? 255 : 15;\n        return ChannelsReusable.set({\n            r: ((dec >> (bits * (bitsOffset + 3))) & mask) * multiplier,\n            g: ((dec >> (bits * (bitsOffset + 2))) & mask) * multiplier,\n            b: ((dec >> (bits * (bitsOffset + 1))) & mask) * multiplier,\n            a: hasAlpha ? (dec & mask) * multiplier / 255 : 1\n        }, color);\n    },\n    stringify: (channels) => {\n        const { r, g, b, a } = channels;\n        if (a < 1) { // #RRGGBBAA\n            return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`;\n        }\n        else { // #RRGGBB\n            return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;\n        }\n    }\n};\n/* EXPORT */\nexport default Hex;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst HSL = {\n    /* VARIABLES */\n    re: /^hsla?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(?:deg|grad|rad|turn)?)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?%)(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e-?\\d+)?(%)?))?\\s*?\\)$/i,\n    hueRe: /^(.+?)(deg|grad|rad|turn)$/i,\n    /* HELPERS */\n    _hue2deg: (hue) => {\n        const match = hue.match(HSL.hueRe);\n        if (match) {\n            const [, number, unit] = match;\n            switch (unit) {\n                case 'grad': return _.channel.clamp.h(parseFloat(number) * .9);\n                case 'rad': return _.channel.clamp.h(parseFloat(number) * 180 / Math.PI);\n                case 'turn': return _.channel.clamp.h(parseFloat(number) * 360);\n            }\n        }\n        return _.channel.clamp.h(parseFloat(hue));\n    },\n    /* API */\n    parse: (color) => {\n        const charCode = color.charCodeAt(0);\n        if (charCode !== 104 && charCode !== 72)\n            return; // 'h'/'H'\n        const match = color.match(HSL.re);\n        if (!match)\n            return;\n        const [, h, s, l, a, isAlphaPercentage] = match;\n        return ChannelsReusable.set({\n            h: HSL._hue2deg(h),\n            s: _.channel.clamp.s(parseFloat(s)),\n            l: _.channel.clamp.l(parseFloat(l)),\n            a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n        }, color);\n    },\n    stringify: (channels) => {\n        const { h, s, l, a } = channels;\n        if (a < 1) { // HSLA\n            return `hsla(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%, ${a})`;\n        }\n        else { // HSL\n            return `hsl(${_.lang.round(h)}, ${_.lang.round(s)}%, ${_.lang.round(l)}%)`;\n        }\n    }\n};\n/* EXPORT */\nexport default HSL;\n", "/* IMPORT */\nimport Hex from './hex.js';\n/* MAIN */\nconst Keyword = {\n    /* VARIABLES */\n    colors: {\n        aliceblue: '#f0f8ff',\n        antiquewhite: '#faebd7',\n        aqua: '#00ffff',\n        aquamarine: '#7fffd4',\n        azure: '#f0ffff',\n        beige: '#f5f5dc',\n        bisque: '#ffe4c4',\n        black: '#000000',\n        blanchedalmond: '#ffebcd',\n        blue: '#0000ff',\n        blueviolet: '#8a2be2',\n        brown: '#a52a2a',\n        burlywood: '#deb887',\n        cadetblue: '#5f9ea0',\n        chartreuse: '#7fff00',\n        chocolate: '#d2691e',\n        coral: '#ff7f50',\n        cornflowerblue: '#6495ed',\n        cornsilk: '#fff8dc',\n        crimson: '#dc143c',\n        cyanaqua: '#00ffff',\n        darkblue: '#00008b',\n        darkcyan: '#008b8b',\n        darkgoldenrod: '#b8860b',\n        darkgray: '#a9a9a9',\n        darkgreen: '#006400',\n        darkgrey: '#a9a9a9',\n        darkkhaki: '#bdb76b',\n        darkmagenta: '#8b008b',\n        darkolivegreen: '#556b2f',\n        darkorange: '#ff8c00',\n        darkorchid: '#9932cc',\n        darkred: '#8b0000',\n        darksalmon: '#e9967a',\n        darkseagreen: '#8fbc8f',\n        darkslateblue: '#483d8b',\n        darkslategray: '#2f4f4f',\n        darkslategrey: '#2f4f4f',\n        darkturquoise: '#00ced1',\n        darkviolet: '#9400d3',\n        deeppink: '#ff1493',\n        deepskyblue: '#00bfff',\n        dimgray: '#696969',\n        dimgrey: '#696969',\n        dodgerblue: '#1e90ff',\n        firebrick: '#b22222',\n        floralwhite: '#fffaf0',\n        forestgreen: '#228b22',\n        fuchsia: '#ff00ff',\n        gainsboro: '#dcdcdc',\n        ghostwhite: '#f8f8ff',\n        gold: '#ffd700',\n        goldenrod: '#daa520',\n        gray: '#808080',\n        green: '#008000',\n        greenyellow: '#adff2f',\n        grey: '#808080',\n        honeydew: '#f0fff0',\n        hotpink: '#ff69b4',\n        indianred: '#cd5c5c',\n        indigo: '#4b0082',\n        ivory: '#fffff0',\n        khaki: '#f0e68c',\n        lavender: '#e6e6fa',\n        lavenderblush: '#fff0f5',\n        lawngreen: '#7cfc00',\n        lemonchiffon: '#fffacd',\n        lightblue: '#add8e6',\n        lightcoral: '#f08080',\n        lightcyan: '#e0ffff',\n        lightgoldenrodyellow: '#fafad2',\n        lightgray: '#d3d3d3',\n        lightgreen: '#90ee90',\n        lightgrey: '#d3d3d3',\n        lightpink: '#ffb6c1',\n        lightsalmon: '#ffa07a',\n        lightseagreen: '#20b2aa',\n        lightskyblue: '#87cefa',\n        lightslategray: '#778899',\n        lightslategrey: '#778899',\n        lightsteelblue: '#b0c4de',\n        lightyellow: '#ffffe0',\n        lime: '#00ff00',\n        limegreen: '#32cd32',\n        linen: '#faf0e6',\n        magenta: '#ff00ff',\n        maroon: '#800000',\n        mediumaquamarine: '#66cdaa',\n        mediumblue: '#0000cd',\n        mediumorchid: '#ba55d3',\n        mediumpurple: '#9370db',\n        mediumseagreen: '#3cb371',\n        mediumslateblue: '#7b68ee',\n        mediumspringgreen: '#00fa9a',\n        mediumturquoise: '#48d1cc',\n        mediumvioletred: '#c71585',\n        midnightblue: '#191970',\n        mintcream: '#f5fffa',\n        mistyrose: '#ffe4e1',\n        moccasin: '#ffe4b5',\n        navajowhite: '#ffdead',\n        navy: '#000080',\n        oldlace: '#fdf5e6',\n        olive: '#808000',\n        olivedrab: '#6b8e23',\n        orange: '#ffa500',\n        orangered: '#ff4500',\n        orchid: '#da70d6',\n        palegoldenrod: '#eee8aa',\n        palegreen: '#98fb98',\n        paleturquoise: '#afeeee',\n        palevioletred: '#db7093',\n        papayawhip: '#ffefd5',\n        peachpuff: '#ffdab9',\n        peru: '#cd853f',\n        pink: '#ffc0cb',\n        plum: '#dda0dd',\n        powderblue: '#b0e0e6',\n        purple: '#800080',\n        rebeccapurple: '#663399',\n        red: '#ff0000',\n        rosybrown: '#bc8f8f',\n        royalblue: '#4169e1',\n        saddlebrown: '#8b4513',\n        salmon: '#fa8072',\n        sandybrown: '#f4a460',\n        seagreen: '#2e8b57',\n        seashell: '#fff5ee',\n        sienna: '#a0522d',\n        silver: '#c0c0c0',\n        skyblue: '#87ceeb',\n        slateblue: '#6a5acd',\n        slategray: '#708090',\n        slategrey: '#708090',\n        snow: '#fffafa',\n        springgreen: '#00ff7f',\n        tan: '#d2b48c',\n        teal: '#008080',\n        thistle: '#d8bfd8',\n        transparent: '#00000000',\n        turquoise: '#40e0d0',\n        violet: '#ee82ee',\n        wheat: '#f5deb3',\n        white: '#ffffff',\n        whitesmoke: '#f5f5f5',\n        yellow: '#ffff00',\n        yellowgreen: '#9acd32'\n    },\n    /* API */\n    parse: (color) => {\n        color = color.toLowerCase();\n        const hex = Keyword.colors[color];\n        if (!hex)\n            return;\n        return Hex.parse(hex);\n    },\n    stringify: (channels) => {\n        const hex = Hex.stringify(channels);\n        for (const name in Keyword.colors) {\n            if (Keyword.colors[name] === hex)\n                return name;\n        }\n        return;\n    }\n};\n/* EXPORT */\nexport default Keyword;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\n/* MAIN */\nconst RGB = {\n    /* VARIABLES */\n    re: /^rgba?\\(\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))\\s*?(?:,|\\s)\\s*?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?))(?:\\s*?(?:,|\\/)\\s*?\\+?(-?(?:\\d+(?:\\.\\d+)?|(?:\\.\\d+))(?:e\\d+)?(%?)))?\\s*?\\)$/i,\n    /* API */\n    parse: (color) => {\n        const charCode = color.charCodeAt(0);\n        if (charCode !== 114 && charCode !== 82)\n            return; // 'r'/'R'\n        const match = color.match(RGB.re);\n        if (!match)\n            return;\n        const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match;\n        return ChannelsReusable.set({\n            r: _.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),\n            g: _.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),\n            b: _.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),\n            a: a ? _.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1\n        }, color);\n    },\n    stringify: (channels) => {\n        const { r, g, b, a } = channels;\n        if (a < 1) { // RGBA\n            return `rgba(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)}, ${_.lang.round(a)})`;\n        }\n        else { // RGB\n            return `rgb(${_.lang.round(r)}, ${_.lang.round(g)}, ${_.lang.round(b)})`;\n        }\n    }\n};\n/* EXPORT */\nexport default RGB;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Hex from './hex.js';\nimport HSL from './hsl.js';\nimport Keyword from './keyword.js';\nimport RGB from './rgb.js';\nimport { TYPE } from '../constants.js';\n/* MAIN */\nconst Color = {\n    /* VARIABLES */\n    format: {\n        keyword: Keyword,\n        hex: Hex,\n        rgb: RGB,\n        rgba: RGB,\n        hsl: HSL,\n        hsla: HSL\n    },\n    /* API */\n    parse: (color) => {\n        if (typeof color !== 'string')\n            return color;\n        const channels = Hex.parse(color) || RGB.parse(color) || HSL.parse(color) || Keyword.parse(color); // Color providers ordered with performance in mind\n        if (channels)\n            return channels;\n        throw new Error(`Unsupported color format: \"${color}\"`);\n    },\n    stringify: (channels) => {\n        // SASS returns a keyword if possible, but we avoid doing that as it's slower and doesn't really add any value\n        if (!channels.changed && channels.color)\n            return channels.color;\n        if (channels.type.is(TYPE.HSL) || channels.data.r === undefined) {\n            return HSL.stringify(channels);\n        }\n        else if (channels.a < 1 || !Number.isInteger(channels.r) || !Number.isInteger(channels.g) || !Number.isInteger(channels.b)) {\n            return RGB.stringify(channels);\n        }\n        else {\n            return Hex.stringify(channels);\n        }\n    }\n};\n/* EXPORT */\nexport default Color;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst change = (color, channels) => {\n    const ch = Color.parse(color);\n    for (const c in channels) {\n        ch[c] = _.channel.clamp[c](channels[c]);\n    }\n    return Color.stringify(ch);\n};\n/* EXPORT */\nexport default change;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport ChannelsReusable from '../channels/reusable.js';\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst rgba = (r, g, b = 0, a = 1) => {\n    if (typeof r !== 'number')\n        return change(r, { a: g });\n    const channels = ChannelsReusable.set({\n        r: _.channel.clamp.r(r),\n        g: _.channel.clamp.g(g),\n        b: _.channel.clamp.b(b),\n        a: _.channel.clamp.a(a)\n    });\n    return Color.stringify(channels);\n};\n/* EXPORT */\nexport default rgba;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst channel = (color, channel) => {\n    return _.lang.round(Color.parse(color)[channel]);\n};\n/* EXPORT */\nexport default channel;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\n//SOURCE: https://planetcalc.com/7779\nconst luminance = (color) => {\n    const { r, g, b } = Color.parse(color);\n    const luminance = .2126 * _.channel.toLinear(r) + .7152 * _.channel.toLinear(g) + .0722 * _.channel.toLinear(b);\n    return _.lang.round(luminance);\n};\n/* EXPORT */\nexport default luminance;\n", "/* IMPORT */\nimport luminance from './luminance.js';\n/* MAIN */\nconst isLight = (color) => {\n    return luminance(color) >= .5;\n};\n/* EXPORT */\nexport default isLight;\n", "/* IMPORT */\nimport isLight from './is_light.js';\n/* MAIN */\nconst isDark = (color) => {\n    return !isLight(color);\n};\n/* EXPORT */\nexport default isDark;\n", "/* IMPORT */\nimport _ from '../utils/index.js';\nimport Color from '../color/index.js';\n/* MAIN */\nconst adjustChannel = (color, channel, amount) => {\n    const channels = Color.parse(color);\n    const amountCurrent = channels[channel];\n    const amountNext = _.channel.clamp[channel](amountCurrent + amount);\n    if (amountCurrent !== amountNext)\n        channels[channel] = amountNext;\n    return Color.stringify(channels);\n};\n/* EXPORT */\nexport default adjustChannel;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst lighten = (color, amount) => {\n    return adjustChannel(color, 'l', amount);\n};\n/* EXPORT */\nexport default lighten;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst darken = (color, amount) => {\n    return adjustChannel(color, 'l', -amount);\n};\n/* EXPORT */\nexport default darken;\n", "/* IMPORT */\nimport adjustChannel from './adjust_channel.js';\n/* MAIN */\nconst transparentize = (color, amount) => {\n    return adjustChannel(color, 'a', -amount);\n};\n/* EXPORT */\nexport default transparentize;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport change from './change.js';\n/* MAIN */\nconst adjust = (color, channels) => {\n    const ch = Color.parse(color);\n    const changes = {};\n    for (const c in channels) {\n        if (!channels[c])\n            continue;\n        changes[c] = ch[c] + channels[c];\n    }\n    return change(color, changes);\n};\n/* EXPORT */\nexport default adjust;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport rgba from './rgba.js';\n/* MAIN */\n//SOURCE: https://github.com/sass/dart-sass/blob/7457d2e9e7e623d9844ffd037a070cf32d39c348/lib/src/functions/color.dart#L718-L756\nconst mix = (color1, color2, weight = 50) => {\n    const { r: r1, g: g1, b: b1, a: a1 } = Color.parse(color1);\n    const { r: r2, g: g2, b: b2, a: a2 } = Color.parse(color2);\n    const weightScale = weight / 100;\n    const weightNormalized = (weightScale * 2) - 1;\n    const alphaDelta = a1 - a2;\n    const weight1combined = ((weightNormalized * alphaDelta) === -1) ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);\n    const weight1 = (weight1combined + 1) / 2;\n    const weight2 = 1 - weight1;\n    const r = (r1 * weight1) + (r2 * weight2);\n    const g = (g1 * weight1) + (g2 * weight2);\n    const b = (b1 * weight1) + (b2 * weight2);\n    const a = (a1 * weightScale) + (a2 * (1 - weightScale));\n    return rgba(r, g, b, a);\n};\n/* EXPORT */\nexport default mix;\n", "/* IMPORT */\nimport Color from '../color/index.js';\nimport mix from './mix.js';\n/* MAIN */\nconst invert = (color, weight = 100) => {\n    const inverse = Color.parse(color);\n    inverse.r = 255 - inverse.r;\n    inverse.g = 255 - inverse.g;\n    inverse.b = 255 - inverse.b;\n    return mix(inverse, color, weight);\n};\n/* EXPORT */\nexport default invert;\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\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    /* 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    /* 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    /* 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\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    /* 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    /* 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    /* 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\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    /* 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    /* 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    /* 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\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    /* 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    /* 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    /* 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.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    /* 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    /* 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    /* 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\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\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\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\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\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\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  \"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  },\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  },\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    },\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    },\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  },\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  },\n  \"architecture\": {\n    \"useMaxWidth\": true,\n    \"padding\": 40,\n    \"iconSize\": 80,\n    \"fontSize\": 16,\n    \"randomize\": false\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  \"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  },\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  treeView: {\n    ...defaultConfigJson.treeView,\n    useWidth: undefined,\n  },\n  radar: {\n    ...defaultConfigJson.radar,\n  },\n  ishikawa: {\n    ...defaultConfigJson.ishikawa,\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};\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 * 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\n    if (typeof args[key] === 'object') {\n      log.debug('sanitizing object', key);\n      sanitizeDirective(args[key]);\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", "const {\n  entries,\n  setPrototypeOf,\n  isFrozen,\n  getPrototypeOf,\n  getOwnPropertyDescriptor,\n} = Object;\n\nlet { freeze, seal, create } = Object; // eslint-disable-line import/no-mutable-exports\nlet { apply, construct } = typeof Reflect !== 'undefined' && Reflect;\n\nif (!freeze) {\n  freeze = function <T>(x: T): T {\n    return x;\n  };\n}\n\nif (!seal) {\n  seal = function <T>(x: T): T {\n    return x;\n  };\n}\n\nif (!apply) {\n  apply = function <T>(\n    func: (thisArg: any, ...args: any[]) => T,\n    thisArg: any,\n    ...args: any[]\n  ): T {\n    return func.apply(thisArg, args);\n  };\n}\n\nif (!construct) {\n  construct = function <T>(Func: new (...args: any[]) => T, ...args: any[]): T {\n    return new Func(...args);\n  };\n}\n\nconst arrayForEach = unapply(Array.prototype.forEach);\nconst arrayIndexOf = unapply(Array.prototype.indexOf);\nconst arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);\nconst arrayPop = unapply(Array.prototype.pop);\nconst arrayPush = unapply(Array.prototype.push);\nconst arraySlice = unapply(Array.prototype.slice);\nconst arraySplice = unapply(Array.prototype.splice);\n\nconst stringToLowerCase = unapply(String.prototype.toLowerCase);\nconst stringToString = unapply(String.prototype.toString);\nconst stringMatch = unapply(String.prototype.match);\nconst stringReplace = unapply(String.prototype.replace);\nconst stringIndexOf = unapply(String.prototype.indexOf);\nconst stringTrim = unapply(String.prototype.trim);\n\nconst objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);\n\nconst regExpTest = unapply(RegExp.prototype.test);\n\nconst typeErrorCreate = unconstruct(TypeError);\n\n/**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param func - The function to be wrapped and called.\n * @returns A new function that calls the given function with a specified thisArg and arguments.\n */\nfunction unapply<T>(\n  func: (thisArg: any, ...args: any[]) => T\n): (thisArg: any, ...args: any[]) => T {\n  return (thisArg: any, ...args: any[]): T => {\n    if (thisArg instanceof RegExp) {\n      thisArg.lastIndex = 0;\n    }\n\n    return apply(func, thisArg, args);\n  };\n}\n\n/**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param func - The constructor function to be wrapped and called.\n * @returns A new function that constructs an instance of the given constructor function with the provided arguments.\n */\nfunction unconstruct<T>(\n  Func: new (...args: any[]) => T\n): (...args: any[]) => T {\n  return (...args: any[]): T => construct(Func, args);\n}\n\n/**\n * Add properties to a lookup table\n *\n * @param set - The set to which elements will be added.\n * @param array - The array containing elements to be added to the set.\n * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns The modified set with added elements.\n */\nfunction addToSet(\n  set: Record<string, any>,\n  array: readonly any[],\n  transformCaseFunc: ReturnType<typeof unapply<string>> = stringToLowerCase\n): Record<string, any> {\n  if (setPrototypeOf) {\n    // Make 'in' and truthy checks like Boolean(set.constructor)\n    // independent of any properties defined on Object.prototype.\n    // Prevent prototype setters from intercepting set as a this value.\n    setPrototypeOf(set, null);\n  }\n\n  let l = array.length;\n  while (l--) {\n    let element = array[l];\n    if (typeof element === 'string') {\n      const lcElement = transformCaseFunc(element);\n      if (lcElement !== element) {\n        // Config presets (e.g. tags.js, attrs.js) are immutable.\n        if (!isFrozen(array)) {\n          (array as any[])[l] = lcElement;\n        }\n\n        element = lcElement;\n      }\n    }\n\n    set[element] = true;\n  }\n\n  return set;\n}\n\n/**\n * Clean up an array to harden against CSPP\n *\n * @param array - The array to be cleaned.\n * @returns The cleaned version of the array\n */\nfunction cleanArray<T>(array: T[]): Array<T | null> {\n  for (let index = 0; index < array.length; index++) {\n    const isPropertyExist = objectHasOwnProperty(array, index);\n\n    if (!isPropertyExist) {\n      array[index] = null;\n    }\n  }\n\n  return array;\n}\n\n/**\n * Shallow clone an object\n *\n * @param object - The object to be cloned.\n * @returns A new object that copies the original.\n */\nfunction clone<T extends Record<string, any>>(object: T): T {\n  const newObject = create(null);\n\n  for (const [property, value] of entries(object)) {\n    const isPropertyExist = objectHasOwnProperty(object, property);\n\n    if (isPropertyExist) {\n      if (Array.isArray(value)) {\n        newObject[property] = cleanArray(value);\n      } else if (\n        value &&\n        typeof value === 'object' &&\n        value.constructor === Object\n      ) {\n        newObject[property] = clone(value);\n      } else {\n        newObject[property] = value;\n      }\n    }\n  }\n\n  return newObject;\n}\n\n/**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param object - The object to look up the getter function in its prototype chain.\n * @param prop - The property name for which to find the getter function.\n * @returns The getter function found in the prototype chain or a fallback function.\n */\nfunction lookupGetter<T extends Record<string, any>>(\n  object: T,\n  prop: string\n): ReturnType<typeof unapply<any>> | (() => null) {\n  while (object !== null) {\n    const desc = getOwnPropertyDescriptor(object, prop);\n\n    if (desc) {\n      if (desc.get) {\n        return unapply(desc.get);\n      }\n\n      if (typeof desc.value === 'function') {\n        return unapply(desc.value);\n      }\n    }\n\n    object = getPrototypeOf(object);\n  }\n\n  function fallbackValue(): null {\n    return null;\n  }\n\n  return fallbackValue;\n}\n\nexport {\n  // Array\n  arrayForEach,\n  arrayIndexOf,\n  arrayLastIndexOf,\n  arrayPop,\n  arrayPush,\n  arraySlice,\n  arraySplice,\n  // Object\n  entries,\n  freeze,\n  getPrototypeOf,\n  getOwnPropertyDescriptor,\n  isFrozen,\n  setPrototypeOf,\n  seal,\n  clone,\n  create,\n  objectHasOwnProperty,\n  // RegExp\n  regExpTest,\n  // String\n  stringIndexOf,\n  stringMatch,\n  stringReplace,\n  stringToLowerCase,\n  stringToString,\n  stringTrim,\n  // Errors\n  typeErrorCreate,\n  // Other\n  lookupGetter,\n  addToSet,\n  // Reflect\n  unapply,\n  unconstruct,\n};\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n  'a',\n  'abbr',\n  'acronym',\n  'address',\n  'area',\n  'article',\n  'aside',\n  'audio',\n  'b',\n  'bdi',\n  'bdo',\n  'big',\n  'blink',\n  'blockquote',\n  'body',\n  'br',\n  'button',\n  'canvas',\n  'caption',\n  'center',\n  'cite',\n  'code',\n  'col',\n  'colgroup',\n  'content',\n  'data',\n  'datalist',\n  'dd',\n  'decorator',\n  'del',\n  'details',\n  'dfn',\n  'dialog',\n  'dir',\n  'div',\n  'dl',\n  'dt',\n  'element',\n  'em',\n  'fieldset',\n  'figcaption',\n  'figure',\n  'font',\n  'footer',\n  'form',\n  'h1',\n  'h2',\n  'h3',\n  'h4',\n  'h5',\n  'h6',\n  'head',\n  'header',\n  'hgroup',\n  'hr',\n  'html',\n  'i',\n  'img',\n  'input',\n  'ins',\n  'kbd',\n  'label',\n  'legend',\n  'li',\n  'main',\n  'map',\n  'mark',\n  'marquee',\n  'menu',\n  'menuitem',\n  'meter',\n  'nav',\n  'nobr',\n  'ol',\n  'optgroup',\n  'option',\n  'output',\n  'p',\n  'picture',\n  'pre',\n  'progress',\n  'q',\n  'rp',\n  'rt',\n  'ruby',\n  's',\n  'samp',\n  'search',\n  'section',\n  'select',\n  'shadow',\n  'slot',\n  'small',\n  'source',\n  'spacer',\n  'span',\n  'strike',\n  'strong',\n  'style',\n  'sub',\n  'summary',\n  'sup',\n  'table',\n  'tbody',\n  'td',\n  'template',\n  'textarea',\n  'tfoot',\n  'th',\n  'thead',\n  'time',\n  'tr',\n  'track',\n  'tt',\n  'u',\n  'ul',\n  'var',\n  'video',\n  'wbr',\n] as const);\n\nexport const svg = freeze([\n  'svg',\n  'a',\n  'altglyph',\n  'altglyphdef',\n  'altglyphitem',\n  'animatecolor',\n  'animatemotion',\n  'animatetransform',\n  'circle',\n  'clippath',\n  'defs',\n  'desc',\n  'ellipse',\n  'enterkeyhint',\n  'exportparts',\n  'filter',\n  'font',\n  'g',\n  'glyph',\n  'glyphref',\n  'hkern',\n  'image',\n  'inputmode',\n  'line',\n  'lineargradient',\n  'marker',\n  'mask',\n  'metadata',\n  'mpath',\n  'part',\n  'path',\n  'pattern',\n  'polygon',\n  'polyline',\n  'radialgradient',\n  'rect',\n  'stop',\n  'style',\n  'switch',\n  'symbol',\n  'text',\n  'textpath',\n  'title',\n  'tref',\n  'tspan',\n  'view',\n  'vkern',\n] as const);\n\nexport const svgFilters = freeze([\n  'feBlend',\n  'feColorMatrix',\n  'feComponentTransfer',\n  'feComposite',\n  'feConvolveMatrix',\n  'feDiffuseLighting',\n  'feDisplacementMap',\n  'feDistantLight',\n  'feDropShadow',\n  'feFlood',\n  'feFuncA',\n  'feFuncB',\n  'feFuncG',\n  'feFuncR',\n  'feGaussianBlur',\n  'feImage',\n  'feMerge',\n  'feMergeNode',\n  'feMorphology',\n  'feOffset',\n  'fePointLight',\n  'feSpecularLighting',\n  'feSpotLight',\n  'feTile',\n  'feTurbulence',\n] as const);\n\n// List of SVG elements that are disallowed by default.\n// We still need to know them so that we can do namespace\n// checks properly in case one wants to add them to\n// allow-list.\nexport const svgDisallowed = freeze([\n  'animate',\n  'color-profile',\n  'cursor',\n  'discard',\n  'font-face',\n  'font-face-format',\n  'font-face-name',\n  'font-face-src',\n  'font-face-uri',\n  'foreignobject',\n  'hatch',\n  'hatchpath',\n  'mesh',\n  'meshgradient',\n  'meshpatch',\n  'meshrow',\n  'missing-glyph',\n  'script',\n  'set',\n  'solidcolor',\n  'unknown',\n  'use',\n] as const);\n\nexport const mathMl = freeze([\n  'math',\n  'menclose',\n  'merror',\n  'mfenced',\n  'mfrac',\n  'mglyph',\n  'mi',\n  'mlabeledtr',\n  'mmultiscripts',\n  'mn',\n  'mo',\n  'mover',\n  'mpadded',\n  'mphantom',\n  'mroot',\n  'mrow',\n  'ms',\n  'mspace',\n  'msqrt',\n  'mstyle',\n  'msub',\n  'msup',\n  'msubsup',\n  'mtable',\n  'mtd',\n  'mtext',\n  'mtr',\n  'munder',\n  'munderover',\n  'mprescripts',\n] as const);\n\n// Similarly to SVG, we want to know all MathML elements,\n// even those that we disallow by default.\nexport const mathMlDisallowed = freeze([\n  'maction',\n  'maligngroup',\n  'malignmark',\n  'mlongdiv',\n  'mscarries',\n  'mscarry',\n  'msgroup',\n  'mstack',\n  'msline',\n  'msrow',\n  'semantics',\n  'annotation',\n  'annotation-xml',\n  'mprescripts',\n  'none',\n] as const);\n\nexport const text = freeze(['#text'] as const);\n", "import { freeze } from './utils.js';\n\nexport const html = freeze([\n  'accept',\n  'action',\n  'align',\n  'alt',\n  'autocapitalize',\n  'autocomplete',\n  'autopictureinpicture',\n  'autoplay',\n  'background',\n  'bgcolor',\n  'border',\n  'capture',\n  'cellpadding',\n  'cellspacing',\n  'checked',\n  'cite',\n  'class',\n  'clear',\n  'color',\n  'cols',\n  'colspan',\n  'controls',\n  'controlslist',\n  'coords',\n  'crossorigin',\n  'datetime',\n  'decoding',\n  'default',\n  'dir',\n  'disabled',\n  'disablepictureinpicture',\n  'disableremoteplayback',\n  'download',\n  'draggable',\n  'enctype',\n  'enterkeyhint',\n  'exportparts',\n  'face',\n  'for',\n  'headers',\n  'height',\n  'hidden',\n  'high',\n  'href',\n  'hreflang',\n  'id',\n  'inert',\n  'inputmode',\n  'integrity',\n  'ismap',\n  'kind',\n  'label',\n  'lang',\n  'list',\n  'loading',\n  'loop',\n  'low',\n  'max',\n  'maxlength',\n  'media',\n  'method',\n  'min',\n  'minlength',\n  'multiple',\n  'muted',\n  'name',\n  'nonce',\n  'noshade',\n  'novalidate',\n  'nowrap',\n  'open',\n  'optimum',\n  'part',\n  'pattern',\n  'placeholder',\n  'playsinline',\n  'popover',\n  'popovertarget',\n  'popovertargetaction',\n  'poster',\n  'preload',\n  'pubdate',\n  'radiogroup',\n  'readonly',\n  'rel',\n  'required',\n  'rev',\n  'reversed',\n  'role',\n  'rows',\n  'rowspan',\n  'spellcheck',\n  'scope',\n  'selected',\n  'shape',\n  'size',\n  'sizes',\n  'slot',\n  'span',\n  'srclang',\n  'start',\n  'src',\n  'srcset',\n  'step',\n  'style',\n  'summary',\n  'tabindex',\n  'title',\n  'translate',\n  'type',\n  'usemap',\n  'valign',\n  'value',\n  'width',\n  'wrap',\n  'xmlns',\n  'slot',\n] as const);\n\nexport const svg = freeze([\n  'accent-height',\n  'accumulate',\n  'additive',\n  'alignment-baseline',\n  'amplitude',\n  'ascent',\n  'attributename',\n  'attributetype',\n  'azimuth',\n  'basefrequency',\n  'baseline-shift',\n  'begin',\n  'bias',\n  'by',\n  'class',\n  'clip',\n  'clippathunits',\n  'clip-path',\n  'clip-rule',\n  'color',\n  'color-interpolation',\n  'color-interpolation-filters',\n  'color-profile',\n  'color-rendering',\n  'cx',\n  'cy',\n  'd',\n  'dx',\n  'dy',\n  'diffuseconstant',\n  'direction',\n  'display',\n  'divisor',\n  'dur',\n  'edgemode',\n  'elevation',\n  'end',\n  'exponent',\n  'fill',\n  'fill-opacity',\n  'fill-rule',\n  'filter',\n  'filterunits',\n  'flood-color',\n  'flood-opacity',\n  'font-family',\n  'font-size',\n  'font-size-adjust',\n  'font-stretch',\n  'font-style',\n  'font-variant',\n  'font-weight',\n  'fx',\n  'fy',\n  'g1',\n  'g2',\n  'glyph-name',\n  'glyphref',\n  'gradientunits',\n  'gradienttransform',\n  'height',\n  'href',\n  'id',\n  'image-rendering',\n  'in',\n  'in2',\n  'intercept',\n  'k',\n  'k1',\n  'k2',\n  'k3',\n  'k4',\n  'kerning',\n  'keypoints',\n  'keysplines',\n  'keytimes',\n  'lang',\n  'lengthadjust',\n  'letter-spacing',\n  'kernelmatrix',\n  'kernelunitlength',\n  'lighting-color',\n  'local',\n  'marker-end',\n  'marker-mid',\n  'marker-start',\n  'markerheight',\n  'markerunits',\n  'markerwidth',\n  'maskcontentunits',\n  'maskunits',\n  'max',\n  'mask',\n  'mask-type',\n  'media',\n  'method',\n  'mode',\n  'min',\n  'name',\n  'numoctaves',\n  'offset',\n  'operator',\n  'opacity',\n  'order',\n  'orient',\n  'orientation',\n  'origin',\n  'overflow',\n  'paint-order',\n  'path',\n  'pathlength',\n  'patterncontentunits',\n  'patterntransform',\n  'patternunits',\n  'points',\n  'preservealpha',\n  'preserveaspectratio',\n  'primitiveunits',\n  'r',\n  'rx',\n  'ry',\n  'radius',\n  'refx',\n  'refy',\n  'repeatcount',\n  'repeatdur',\n  'restart',\n  'result',\n  'rotate',\n  'scale',\n  'seed',\n  'shape-rendering',\n  'slope',\n  'specularconstant',\n  'specularexponent',\n  'spreadmethod',\n  'startoffset',\n  'stddeviation',\n  'stitchtiles',\n  'stop-color',\n  'stop-opacity',\n  'stroke-dasharray',\n  'stroke-dashoffset',\n  'stroke-linecap',\n  'stroke-linejoin',\n  'stroke-miterlimit',\n  'stroke-opacity',\n  'stroke',\n  'stroke-width',\n  'style',\n  'surfacescale',\n  'systemlanguage',\n  'tabindex',\n  'tablevalues',\n  'targetx',\n  'targety',\n  'transform',\n  'transform-origin',\n  'text-anchor',\n  'text-decoration',\n  'text-rendering',\n  'textlength',\n  'type',\n  'u1',\n  'u2',\n  'unicode',\n  'values',\n  'viewbox',\n  'visibility',\n  'version',\n  'vert-adv-y',\n  'vert-origin-x',\n  'vert-origin-y',\n  'width',\n  'word-spacing',\n  'wrap',\n  'writing-mode',\n  'xchannelselector',\n  'ychannelselector',\n  'x',\n  'x1',\n  'x2',\n  'xmlns',\n  'y',\n  'y1',\n  'y2',\n  'z',\n  'zoomandpan',\n] as const);\n\nexport const mathMl = freeze([\n  'accent',\n  'accentunder',\n  'align',\n  'bevelled',\n  'close',\n  'columnsalign',\n  'columnlines',\n  'columnspan',\n  'denomalign',\n  'depth',\n  'dir',\n  'display',\n  'displaystyle',\n  'encoding',\n  'fence',\n  'frame',\n  'height',\n  'href',\n  'id',\n  'largeop',\n  'length',\n  'linethickness',\n  'lspace',\n  'lquote',\n  'mathbackground',\n  'mathcolor',\n  'mathsize',\n  'mathvariant',\n  'maxsize',\n  'minsize',\n  'movablelimits',\n  'notation',\n  'numalign',\n  'open',\n  'rowalign',\n  'rowlines',\n  'rowspacing',\n  'rowspan',\n  'rspace',\n  'rquote',\n  'scriptlevel',\n  'scriptminsize',\n  'scriptsizemultiplier',\n  'selection',\n  'separator',\n  'separators',\n  'stretchy',\n  'subscriptshift',\n  'supscriptshift',\n  'symmetric',\n  'voffset',\n  'width',\n  'xmlns',\n]);\n\nexport const xml = freeze([\n  'xlink:href',\n  'xml:id',\n  'xlink:title',\n  'xml:space',\n  'xmlns:xlink',\n] as const);\n", "import { seal } from './utils.js';\n\n// eslint-disable-next-line unicorn/better-regex\nexport const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\nexport const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\nexport const TMPLIT_EXPR = seal(/\\$\\{[\\w\\W]*/gm); // eslint-disable-line unicorn/better-regex\nexport const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]+$/); // eslint-disable-line no-useless-escape\nexport const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\nexport const IS_ALLOWED_URI = seal(\n  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n);\nexport const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\nexport const ATTR_WHITESPACE = seal(\n  /[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n);\nexport const DOCTYPE_NAME = seal(/^html$/i);\nexport const CUSTOM_ELEMENT = seal(/^[a-z][.\\w]*(-[.\\w]+)+$/i);\n", "/* eslint-disable @typescript-eslint/indent */\n\nimport type {\n  TrustedHTML,\n  TrustedTypesWindow,\n} from 'trusted-types/lib/index.js';\nimport type { Config, UseProfilesConfig } from './config';\nimport * as TAGS from './tags.js';\nimport * as ATTRS from './attrs.js';\nimport * as EXPRESSIONS from './regexp.js';\nimport {\n  addToSet,\n  clone,\n  entries,\n  freeze,\n  arrayForEach,\n  arrayLastIndexOf,\n  arrayPop,\n  arrayPush,\n  arraySplice,\n  stringMatch,\n  stringReplace,\n  stringToLowerCase,\n  stringToString,\n  stringIndexOf,\n  stringTrim,\n  regExpTest,\n  typeErrorCreate,\n  lookupGetter,\n  create,\n  objectHasOwnProperty,\n} from './utils.js';\n\nexport type { Config } from './config';\n\ndeclare const VERSION: string;\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType\nconst NODE_TYPE = {\n  element: 1,\n  attribute: 2,\n  text: 3,\n  cdataSection: 4,\n  entityReference: 5, // Deprecated\n  entityNode: 6, // Deprecated\n  progressingInstruction: 7,\n  comment: 8,\n  document: 9,\n  documentType: 10,\n  documentFragment: 11,\n  notation: 12, // Deprecated\n};\n\nconst getGlobal = function (): WindowLike {\n  return typeof window === 'undefined' ? null : window;\n};\n\n/**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param trustedTypes The policy factory.\n * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\nconst _createTrustedTypesPolicy = function (\n  trustedTypes: TrustedTypePolicyFactory,\n  purifyHostElement: HTMLScriptElement\n) {\n  if (\n    typeof trustedTypes !== 'object' ||\n    typeof trustedTypes.createPolicy !== 'function'\n  ) {\n    return null;\n  }\n\n  // Allow the callers to control the unique policy name\n  // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n  // Policy creation with duplicate names throws in Trusted Types.\n  let suffix = null;\n  const ATTR_NAME = 'data-tt-policy-suffix';\n  if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n    suffix = purifyHostElement.getAttribute(ATTR_NAME);\n  }\n\n  const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n  try {\n    return trustedTypes.createPolicy(policyName, {\n      createHTML(html) {\n        return html;\n      },\n      createScriptURL(scriptUrl) {\n        return scriptUrl;\n      },\n    });\n  } catch (_) {\n    // Policy creation failed (most likely another DOMPurify script has\n    // already run). Skip creating the policy, as this will only cause errors\n    // if TT are enforced.\n    console.warn(\n      'TrustedTypes policy ' + policyName + ' could not be created.'\n    );\n    return null;\n  }\n};\n\nconst _createHooksMap = function (): HooksMap {\n  return {\n    afterSanitizeAttributes: [],\n    afterSanitizeElements: [],\n    afterSanitizeShadowDOM: [],\n    beforeSanitizeAttributes: [],\n    beforeSanitizeElements: [],\n    beforeSanitizeShadowDOM: [],\n    uponSanitizeAttribute: [],\n    uponSanitizeElement: [],\n    uponSanitizeShadowNode: [],\n  };\n};\n\nfunction createDOMPurify(window: WindowLike = getGlobal()): DOMPurify {\n  const DOMPurify: DOMPurify = (root: WindowLike) => createDOMPurify(root);\n\n  DOMPurify.version = VERSION;\n\n  DOMPurify.removed = [];\n\n  if (\n    !window ||\n    !window.document ||\n    window.document.nodeType !== NODE_TYPE.document ||\n    !window.Element\n  ) {\n    // Not running in a browser, provide a factory function\n    // so that you can pass your own Window\n    DOMPurify.isSupported = false;\n\n    return DOMPurify;\n  }\n\n  let { document } = window;\n\n  const originalDocument = document;\n  const currentScript: HTMLScriptElement =\n    originalDocument.currentScript as HTMLScriptElement;\n  const {\n    DocumentFragment,\n    HTMLTemplateElement,\n    Node,\n    Element,\n    NodeFilter,\n    NamedNodeMap = window.NamedNodeMap || (window as any).MozNamedAttrMap,\n    HTMLFormElement,\n    DOMParser,\n    trustedTypes,\n  } = window;\n\n  const ElementPrototype = Element.prototype;\n\n  const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n  const remove = lookupGetter(ElementPrototype, 'remove');\n  const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n  const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n  const getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n  // As per issue #47, the web-components registry is inherited by a\n  // new document created via createHTMLDocument. As per the spec\n  // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n  // a new empty registry is used when creating a template contents owner\n  // document, so we use that as our parent document to ensure nothing\n  // is inherited.\n  if (typeof HTMLTemplateElement === 'function') {\n    const template = document.createElement('template');\n    if (template.content && template.content.ownerDocument) {\n      document = template.content.ownerDocument;\n    }\n  }\n\n  let trustedTypesPolicy;\n  let emptyHTML = '';\n\n  const {\n    implementation,\n    createNodeIterator,\n    createDocumentFragment,\n    getElementsByTagName,\n  } = document;\n  const { importNode } = originalDocument;\n\n  let hooks = _createHooksMap();\n\n  /**\n   * Expose whether this browser supports running the full DOMPurify.\n   */\n  DOMPurify.isSupported =\n    typeof entries === 'function' &&\n    typeof getParentNode === 'function' &&\n    implementation &&\n    implementation.createHTMLDocument !== undefined;\n\n  const {\n    MUSTACHE_EXPR,\n    ERB_EXPR,\n    TMPLIT_EXPR,\n    DATA_ATTR,\n    ARIA_ATTR,\n    IS_SCRIPT_OR_DATA,\n    ATTR_WHITESPACE,\n    CUSTOM_ELEMENT,\n  } = EXPRESSIONS;\n\n  let { IS_ALLOWED_URI } = EXPRESSIONS;\n\n  /**\n   * We consider the elements and attributes below to be safe. Ideally\n   * don't add any new ones but feel free to remove unwanted ones.\n   */\n\n  /* allowed element names */\n  let ALLOWED_TAGS = null;\n  const DEFAULT_ALLOWED_TAGS = addToSet({}, [\n    ...TAGS.html,\n    ...TAGS.svg,\n    ...TAGS.svgFilters,\n    ...TAGS.mathMl,\n    ...TAGS.text,\n  ]);\n\n  /* Allowed attribute names */\n  let ALLOWED_ATTR = null;\n  const DEFAULT_ALLOWED_ATTR = addToSet({}, [\n    ...ATTRS.html,\n    ...ATTRS.svg,\n    ...ATTRS.mathMl,\n    ...ATTRS.xml,\n  ]);\n\n  /*\n   * Configure how DOMPurify should handle custom elements and their attributes as well as customized built-in elements.\n   * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n   * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n   * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n   */\n  let CUSTOM_ELEMENT_HANDLING = Object.seal(\n    create(null, {\n      tagNameCheck: {\n        writable: true,\n        configurable: false,\n        enumerable: true,\n        value: null,\n      },\n      attributeNameCheck: {\n        writable: true,\n        configurable: false,\n        enumerable: true,\n        value: null,\n      },\n      allowCustomizedBuiltInElements: {\n        writable: true,\n        configurable: false,\n        enumerable: true,\n        value: false,\n      },\n    })\n  );\n\n  /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n  let FORBID_TAGS = null;\n\n  /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n  let FORBID_ATTR = null;\n\n  /* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */\n  const EXTRA_ELEMENT_HANDLING = Object.seal(\n    create(null, {\n      tagCheck: {\n        writable: true,\n        configurable: false,\n        enumerable: true,\n        value: null,\n      },\n      attributeCheck: {\n        writable: true,\n        configurable: false,\n        enumerable: true,\n        value: null,\n      },\n    })\n  );\n\n  /* Decide if ARIA attributes are okay */\n  let ALLOW_ARIA_ATTR = true;\n\n  /* Decide if custom data attributes are okay */\n  let ALLOW_DATA_ATTR = true;\n\n  /* Decide if unknown protocols are okay */\n  let ALLOW_UNKNOWN_PROTOCOLS = false;\n\n  /* Decide if self-closing tags in attributes are allowed.\n   * Usually removed due to a mXSS issue in jQuery 3.0 */\n  let ALLOW_SELF_CLOSE_IN_ATTR = true;\n\n  /* Output should be safe for common template engines.\n   * This means, DOMPurify removes data attributes, mustaches and ERB\n   */\n  let SAFE_FOR_TEMPLATES = false;\n\n  /* Output should be safe even for XML used within HTML and alike.\n   * This means, DOMPurify removes comments when containing risky content.\n   */\n  let SAFE_FOR_XML = true;\n\n  /* Decide if document with <html>... should be returned */\n  let WHOLE_DOCUMENT = false;\n\n  /* Track whether config is already set on this instance of DOMPurify. */\n  let SET_CONFIG = false;\n\n  /* Decide if all elements (e.g. style, script) must be children of\n   * document.body. By default, browsers might move them to document.head */\n  let FORCE_BODY = false;\n\n  /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n   * string (or a TrustedHTML object if Trusted Types are supported).\n   * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n   */\n  let RETURN_DOM = false;\n\n  /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n   * string  (or a TrustedHTML object if Trusted Types are supported) */\n  let RETURN_DOM_FRAGMENT = false;\n\n  /* Try to return a Trusted Type object instead of a string, return a string in\n   * case Trusted Types are not supported  */\n  let RETURN_TRUSTED_TYPE = false;\n\n  /* Output should be free from DOM clobbering attacks?\n   * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n   */\n  let SANITIZE_DOM = true;\n\n  /* Achieve full DOM Clobbering protection by isolating the namespace of named\n   * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n   *\n   * HTML/DOM spec rules that enable DOM Clobbering:\n   *   - Named Access on Window (§7.3.3)\n   *   - DOM Tree Accessors (§3.1.5)\n   *   - Form Element Parent-Child Relations (§4.10.3)\n   *   - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n   *   - HTMLCollection (§4.2.10.2)\n   *\n   * Namespace isolation is implemented by prefixing `id` and `name` attributes\n   * with a constant string, i.e., `user-content-`\n   */\n  let SANITIZE_NAMED_PROPS = false;\n  const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n\n  /* Keep element content when removing element? */\n  let KEEP_CONTENT = true;\n\n  /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n   * of importing it into a new Document and returning a sanitized copy */\n  let IN_PLACE = false;\n\n  /* Allow usage of profiles like html, svg and mathMl */\n  let USE_PROFILES: UseProfilesConfig | false = {};\n\n  /* Tags to ignore content of when KEEP_CONTENT is true */\n  let FORBID_CONTENTS = null;\n  const DEFAULT_FORBID_CONTENTS = addToSet({}, [\n    'annotation-xml',\n    'audio',\n    'colgroup',\n    'desc',\n    'foreignobject',\n    'head',\n    'iframe',\n    'math',\n    'mi',\n    'mn',\n    'mo',\n    'ms',\n    'mtext',\n    'noembed',\n    'noframes',\n    'noscript',\n    'plaintext',\n    'script',\n    'style',\n    'svg',\n    'template',\n    'thead',\n    'title',\n    'video',\n    'xmp',\n  ]);\n\n  /* Tags that are safe for data: URIs */\n  let DATA_URI_TAGS = null;\n  const DEFAULT_DATA_URI_TAGS = addToSet({}, [\n    'audio',\n    'video',\n    'img',\n    'source',\n    'image',\n    'track',\n  ]);\n\n  /* Attributes safe for values like \"javascript:\" */\n  let URI_SAFE_ATTRIBUTES = null;\n  const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [\n    'alt',\n    'class',\n    'for',\n    'id',\n    'label',\n    'name',\n    'pattern',\n    'placeholder',\n    'role',\n    'summary',\n    'title',\n    'value',\n    'style',\n    'xmlns',\n  ]);\n\n  const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n  const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n  const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n  /* Document namespace */\n  let NAMESPACE = HTML_NAMESPACE;\n  let IS_EMPTY_INPUT = false;\n\n  /* Allowed XHTML+XML namespaces */\n  let ALLOWED_NAMESPACES = null;\n  const DEFAULT_ALLOWED_NAMESPACES = addToSet(\n    {},\n    [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE],\n    stringToString\n  );\n\n  let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, [\n    'mi',\n    'mo',\n    'mn',\n    'ms',\n    'mtext',\n  ]);\n\n  let HTML_INTEGRATION_POINTS = addToSet({}, ['annotation-xml']);\n\n  // Certain elements are allowed in both SVG and HTML\n  // namespace. We need to specify them explicitly\n  // so that they don't get erroneously deleted from\n  // HTML namespace.\n  const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [\n    'title',\n    'style',\n    'font',\n    'a',\n    'script',\n  ]);\n\n  /* Parsing of strict XHTML documents */\n  let PARSER_MEDIA_TYPE: null | DOMParserSupportedType = null;\n  const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n  const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n  let transformCaseFunc: null | Parameters<typeof addToSet>[2] = null;\n\n  /* Keep a reference to config to pass to hooks */\n  let CONFIG: Config | null = null;\n\n  /* Ideally, do not touch anything below this line */\n  /* ______________________________________________ */\n\n  const formElement = document.createElement('form');\n\n  const isRegexOrFunction = function (\n    testValue: unknown\n  ): testValue is Function | RegExp {\n    return testValue instanceof RegExp || testValue instanceof Function;\n  };\n\n  /**\n   * _parseConfig\n   *\n   * @param cfg optional config literal\n   */\n  // eslint-disable-next-line complexity\n  const _parseConfig = function (cfg: Config = {}): void {\n    if (CONFIG && CONFIG === cfg) {\n      return;\n    }\n\n    /* Shield configuration object from tampering */\n    if (!cfg || typeof cfg !== 'object') {\n      cfg = {};\n    }\n\n    /* Shield configuration object from prototype pollution */\n    cfg = clone(cfg);\n\n    PARSER_MEDIA_TYPE =\n      // eslint-disable-next-line unicorn/prefer-includes\n      SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1\n        ? DEFAULT_PARSER_MEDIA_TYPE\n        : cfg.PARSER_MEDIA_TYPE;\n\n    // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n    transformCaseFunc =\n      PARSER_MEDIA_TYPE === 'application/xhtml+xml'\n        ? stringToString\n        : stringToLowerCase;\n\n    /* Set configuration parameters */\n    ALLOWED_TAGS = objectHasOwnProperty(cfg, 'ALLOWED_TAGS')\n      ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc)\n      : DEFAULT_ALLOWED_TAGS;\n    ALLOWED_ATTR = objectHasOwnProperty(cfg, 'ALLOWED_ATTR')\n      ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc)\n      : DEFAULT_ALLOWED_ATTR;\n    ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, 'ALLOWED_NAMESPACES')\n      ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString)\n      : DEFAULT_ALLOWED_NAMESPACES;\n    URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, 'ADD_URI_SAFE_ATTR')\n      ? addToSet(\n          clone(DEFAULT_URI_SAFE_ATTRIBUTES),\n          cfg.ADD_URI_SAFE_ATTR,\n          transformCaseFunc\n        )\n      : DEFAULT_URI_SAFE_ATTRIBUTES;\n    DATA_URI_TAGS = objectHasOwnProperty(cfg, 'ADD_DATA_URI_TAGS')\n      ? addToSet(\n          clone(DEFAULT_DATA_URI_TAGS),\n          cfg.ADD_DATA_URI_TAGS,\n          transformCaseFunc\n        )\n      : DEFAULT_DATA_URI_TAGS;\n    FORBID_CONTENTS = objectHasOwnProperty(cfg, 'FORBID_CONTENTS')\n      ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc)\n      : DEFAULT_FORBID_CONTENTS;\n    FORBID_TAGS = objectHasOwnProperty(cfg, 'FORBID_TAGS')\n      ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc)\n      : clone({});\n    FORBID_ATTR = objectHasOwnProperty(cfg, 'FORBID_ATTR')\n      ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc)\n      : clone({});\n    USE_PROFILES = objectHasOwnProperty(cfg, 'USE_PROFILES')\n      ? cfg.USE_PROFILES\n      : false;\n    ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n    ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n    ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n    ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n    SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n    SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false; // Default true\n    WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n    RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n    RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n    RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n    FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n    SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n    SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n    KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n    IN_PLACE = cfg.IN_PLACE || false; // Default false\n    IS_ALLOWED_URI = cfg.ALLOWED_URI_REGEXP || EXPRESSIONS.IS_ALLOWED_URI;\n    NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n    MATHML_TEXT_INTEGRATION_POINTS =\n      cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;\n    HTML_INTEGRATION_POINTS =\n      cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;\n\n    CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n    if (\n      cfg.CUSTOM_ELEMENT_HANDLING &&\n      isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)\n    ) {\n      CUSTOM_ELEMENT_HANDLING.tagNameCheck =\n        cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n    }\n\n    if (\n      cfg.CUSTOM_ELEMENT_HANDLING &&\n      isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)\n    ) {\n      CUSTOM_ELEMENT_HANDLING.attributeNameCheck =\n        cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n    }\n\n    if (\n      cfg.CUSTOM_ELEMENT_HANDLING &&\n      typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements ===\n        'boolean'\n    ) {\n      CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements =\n        cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n    }\n\n    if (SAFE_FOR_TEMPLATES) {\n      ALLOW_DATA_ATTR = false;\n    }\n\n    if (RETURN_DOM_FRAGMENT) {\n      RETURN_DOM = true;\n    }\n\n    /* Parse profile info */\n    if (USE_PROFILES) {\n      ALLOWED_TAGS = addToSet({}, TAGS.text);\n      ALLOWED_ATTR = [];\n      if (USE_PROFILES.html === true) {\n        addToSet(ALLOWED_TAGS, TAGS.html);\n        addToSet(ALLOWED_ATTR, ATTRS.html);\n      }\n\n      if (USE_PROFILES.svg === true) {\n        addToSet(ALLOWED_TAGS, TAGS.svg);\n        addToSet(ALLOWED_ATTR, ATTRS.svg);\n        addToSet(ALLOWED_ATTR, ATTRS.xml);\n      }\n\n      if (USE_PROFILES.svgFilters === true) {\n        addToSet(ALLOWED_TAGS, TAGS.svgFilters);\n        addToSet(ALLOWED_ATTR, ATTRS.svg);\n        addToSet(ALLOWED_ATTR, ATTRS.xml);\n      }\n\n      if (USE_PROFILES.mathMl === true) {\n        addToSet(ALLOWED_TAGS, TAGS.mathMl);\n        addToSet(ALLOWED_ATTR, ATTRS.mathMl);\n        addToSet(ALLOWED_ATTR, ATTRS.xml);\n      }\n    }\n\n    /* Merge configuration parameters */\n    if (cfg.ADD_TAGS) {\n      if (typeof cfg.ADD_TAGS === 'function') {\n        EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;\n      } else {\n        if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n          ALLOWED_TAGS = clone(ALLOWED_TAGS);\n        }\n\n        addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n      }\n    }\n\n    if (cfg.ADD_ATTR) {\n      if (typeof cfg.ADD_ATTR === 'function') {\n        EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;\n      } else {\n        if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n          ALLOWED_ATTR = clone(ALLOWED_ATTR);\n        }\n\n        addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n      }\n    }\n\n    if (cfg.ADD_URI_SAFE_ATTR) {\n      addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n    }\n\n    if (cfg.FORBID_CONTENTS) {\n      if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n        FORBID_CONTENTS = clone(FORBID_CONTENTS);\n      }\n\n      addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n    }\n\n    if (cfg.ADD_FORBID_CONTENTS) {\n      if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n        FORBID_CONTENTS = clone(FORBID_CONTENTS);\n      }\n\n      addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);\n    }\n\n    /* Add #text in case KEEP_CONTENT is set to true */\n    if (KEEP_CONTENT) {\n      ALLOWED_TAGS['#text'] = true;\n    }\n\n    /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n    if (WHOLE_DOCUMENT) {\n      addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n    }\n\n    /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n    if (ALLOWED_TAGS.table) {\n      addToSet(ALLOWED_TAGS, ['tbody']);\n      delete FORBID_TAGS.tbody;\n    }\n\n    if (cfg.TRUSTED_TYPES_POLICY) {\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n        throw typeErrorCreate(\n          'TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.'\n        );\n      }\n\n      if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n        throw typeErrorCreate(\n          'TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.'\n        );\n      }\n\n      // Overwrite existing TrustedTypes policy.\n      trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;\n\n      // Sign local variables required by `sanitize`.\n      emptyHTML = trustedTypesPolicy.createHTML('');\n    } else {\n      // Uninitialized policy, attempt to initialize the internal dompurify policy.\n      if (trustedTypesPolicy === undefined) {\n        trustedTypesPolicy = _createTrustedTypesPolicy(\n          trustedTypes,\n          currentScript\n        );\n      }\n\n      // If creating the internal policy succeeded sign internal variables.\n      if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n        emptyHTML = trustedTypesPolicy.createHTML('');\n      }\n    }\n\n    // Prevent further manipulation of configuration.\n    // Not available in IE8, Safari 5, etc.\n    if (freeze) {\n      freeze(cfg);\n    }\n\n    CONFIG = cfg;\n  };\n\n  /* Keep track of all possible SVG and MathML tags\n   * so that we can perform the namespace checks\n   * correctly. */\n  const ALL_SVG_TAGS = addToSet({}, [\n    ...TAGS.svg,\n    ...TAGS.svgFilters,\n    ...TAGS.svgDisallowed,\n  ]);\n  const ALL_MATHML_TAGS = addToSet({}, [\n    ...TAGS.mathMl,\n    ...TAGS.mathMlDisallowed,\n  ]);\n\n  /**\n   * @param element a DOM element whose namespace is being checked\n   * @returns Return false if the element has a\n   *  namespace that a spec-compliant parser would never\n   *  return. Return true otherwise.\n   */\n  const _checkValidNamespace = function (element: Element): boolean {\n    let parent = getParentNode(element);\n\n    // In JSDOM, if we're inside shadow DOM, then parentNode\n    // can be null. We just simulate parent in this case.\n    if (!parent || !parent.tagName) {\n      parent = {\n        namespaceURI: NAMESPACE,\n        tagName: 'template',\n      };\n    }\n\n    const tagName = stringToLowerCase(element.tagName);\n    const parentTagName = stringToLowerCase(parent.tagName);\n\n    if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n      return false;\n    }\n\n    if (element.namespaceURI === SVG_NAMESPACE) {\n      // The only way to switch from HTML namespace to SVG\n      // is via <svg>. If it happens via any other tag, then\n      // it should be killed.\n      if (parent.namespaceURI === HTML_NAMESPACE) {\n        return tagName === 'svg';\n      }\n\n      // The only way to switch from MathML to SVG is via`\n      // svg if parent is either <annotation-xml> or MathML\n      // text integration points.\n      if (parent.namespaceURI === MATHML_NAMESPACE) {\n        return (\n          tagName === 'svg' &&\n          (parentTagName === 'annotation-xml' ||\n            MATHML_TEXT_INTEGRATION_POINTS[parentTagName])\n        );\n      }\n\n      // We only allow elements that are defined in SVG\n      // spec. All others are disallowed in SVG namespace.\n      return Boolean(ALL_SVG_TAGS[tagName]);\n    }\n\n    if (element.namespaceURI === MATHML_NAMESPACE) {\n      // The only way to switch from HTML namespace to MathML\n      // is via <math>. If it happens via any other tag, then\n      // it should be killed.\n      if (parent.namespaceURI === HTML_NAMESPACE) {\n        return tagName === 'math';\n      }\n\n      // The only way to switch from SVG to MathML is via\n      // <math> and HTML integration points\n      if (parent.namespaceURI === SVG_NAMESPACE) {\n        return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n      }\n\n      // We only allow elements that are defined in MathML\n      // spec. All others are disallowed in MathML namespace.\n      return Boolean(ALL_MATHML_TAGS[tagName]);\n    }\n\n    if (element.namespaceURI === HTML_NAMESPACE) {\n      // The only way to switch from SVG to HTML is via\n      // HTML integration points, and from MathML to HTML\n      // is via MathML text integration points\n      if (\n        parent.namespaceURI === SVG_NAMESPACE &&\n        !HTML_INTEGRATION_POINTS[parentTagName]\n      ) {\n        return false;\n      }\n\n      if (\n        parent.namespaceURI === MATHML_NAMESPACE &&\n        !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]\n      ) {\n        return false;\n      }\n\n      // We disallow tags that are specific for MathML\n      // or SVG and should never appear in HTML namespace\n      return (\n        !ALL_MATHML_TAGS[tagName] &&\n        (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName])\n      );\n    }\n\n    // For XHTML and XML documents that support custom namespaces\n    if (\n      PARSER_MEDIA_TYPE === 'application/xhtml+xml' &&\n      ALLOWED_NAMESPACES[element.namespaceURI]\n    ) {\n      return true;\n    }\n\n    // The code should never reach this place (this means\n    // that the element somehow got namespace that is not\n    // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n    // Return false just in case.\n    return false;\n  };\n\n  /**\n   * _forceRemove\n   *\n   * @param node a DOM node\n   */\n  const _forceRemove = function (node: Node): void {\n    arrayPush(DOMPurify.removed, { element: node });\n\n    try {\n      // eslint-disable-next-line unicorn/prefer-dom-node-remove\n      getParentNode(node).removeChild(node);\n    } catch (_) {\n      remove(node);\n    }\n  };\n\n  /**\n   * _removeAttribute\n   *\n   * @param name an Attribute name\n   * @param element a DOM node\n   */\n  const _removeAttribute = function (name: string, element: Element): void {\n    try {\n      arrayPush(DOMPurify.removed, {\n        attribute: element.getAttributeNode(name),\n        from: element,\n      });\n    } catch (_) {\n      arrayPush(DOMPurify.removed, {\n        attribute: null,\n        from: element,\n      });\n    }\n\n    element.removeAttribute(name);\n\n    // We void attribute values for unremovable \"is\" attributes\n    if (name === 'is') {\n      if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n        try {\n          _forceRemove(element);\n        } catch (_) {}\n      } else {\n        try {\n          element.setAttribute(name, '');\n        } catch (_) {}\n      }\n    }\n  };\n\n  /**\n   * _initDocument\n   *\n   * @param dirty - a string of dirty markup\n   * @return a DOM, filled with the dirty markup\n   */\n  const _initDocument = function (dirty: string): Document {\n    /* Create a HTML document */\n    let doc = null;\n    let leadingWhitespace = null;\n\n    if (FORCE_BODY) {\n      dirty = '<remove></remove>' + dirty;\n    } else {\n      /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n      const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n      leadingWhitespace = matches && matches[0];\n    }\n\n    if (\n      PARSER_MEDIA_TYPE === 'application/xhtml+xml' &&\n      NAMESPACE === HTML_NAMESPACE\n    ) {\n      // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n      dirty =\n        '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' +\n        dirty +\n        '</body></html>';\n    }\n\n    const dirtyPayload = trustedTypesPolicy\n      ? trustedTypesPolicy.createHTML(dirty)\n      : dirty;\n    /*\n     * Use the DOMParser API by default, fallback later if needs be\n     * DOMParser not work for svg when has multiple root element.\n     */\n    if (NAMESPACE === HTML_NAMESPACE) {\n      try {\n        doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n      } catch (_) {}\n    }\n\n    /* Use createHTMLDocument in case DOMParser is not available */\n    if (!doc || !doc.documentElement) {\n      doc = implementation.createDocument(NAMESPACE, 'template', null);\n      try {\n        doc.documentElement.innerHTML = IS_EMPTY_INPUT\n          ? emptyHTML\n          : dirtyPayload;\n      } catch (_) {\n        // Syntax error if dirtyPayload is invalid xml\n      }\n    }\n\n    const body = doc.body || doc.documentElement;\n\n    if (dirty && leadingWhitespace) {\n      body.insertBefore(\n        document.createTextNode(leadingWhitespace),\n        body.childNodes[0] || null\n      );\n    }\n\n    /* Work on whole document or just its body */\n    if (NAMESPACE === HTML_NAMESPACE) {\n      return getElementsByTagName.call(\n        doc,\n        WHOLE_DOCUMENT ? 'html' : 'body'\n      )[0];\n    }\n\n    return WHOLE_DOCUMENT ? doc.documentElement : body;\n  };\n\n  /**\n   * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n   *\n   * @param root The root element or node to start traversing on.\n   * @return The created NodeIterator\n   */\n  const _createNodeIterator = function (root: Node): NodeIterator {\n    return createNodeIterator.call(\n      root.ownerDocument || root,\n      root,\n      // eslint-disable-next-line no-bitwise\n      NodeFilter.SHOW_ELEMENT |\n        NodeFilter.SHOW_COMMENT |\n        NodeFilter.SHOW_TEXT |\n        NodeFilter.SHOW_PROCESSING_INSTRUCTION |\n        NodeFilter.SHOW_CDATA_SECTION,\n      null\n    );\n  };\n\n  /**\n   * _isClobbered\n   *\n   * @param element element to check for clobbering attacks\n   * @return true if clobbered, false if safe\n   */\n  const _isClobbered = function (element: Element): boolean {\n    return (\n      element instanceof HTMLFormElement &&\n      (typeof element.nodeName !== 'string' ||\n        typeof element.textContent !== 'string' ||\n        typeof element.removeChild !== 'function' ||\n        !(element.attributes instanceof NamedNodeMap) ||\n        typeof element.removeAttribute !== 'function' ||\n        typeof element.setAttribute !== 'function' ||\n        typeof element.namespaceURI !== 'string' ||\n        typeof element.insertBefore !== 'function' ||\n        typeof element.hasChildNodes !== 'function')\n    );\n  };\n\n  /**\n   * Checks whether the given object is a DOM node.\n   *\n   * @param value object to check whether it's a DOM node\n   * @return true is object is a DOM node\n   */\n  const _isNode = function (value: unknown): value is Node {\n    return typeof Node === 'function' && value instanceof Node;\n  };\n\n  function _executeHooks<T extends HookFunction>(\n    hooks: HookFunction[],\n    currentNode: Parameters<T>[0],\n    data: Parameters<T>[1]\n  ): void {\n    arrayForEach(hooks, (hook: T) => {\n      hook.call(DOMPurify, currentNode, data, CONFIG);\n    });\n  }\n\n  /**\n   * _sanitizeElements\n   *\n   * @protect nodeName\n   * @protect textContent\n   * @protect removeChild\n   * @param currentNode to check for permission to exist\n   * @return true if node was killed, false if left alive\n   */\n  const _sanitizeElements = function (currentNode: any): boolean {\n    let content = null;\n\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeElements, currentNode, null);\n\n    /* Check if element is clobbered or can clobber */\n    if (_isClobbered(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Now let's check the element's type and name */\n    const tagName = transformCaseFunc(currentNode.nodeName);\n\n    /* Execute a hook if present */\n    _executeHooks(hooks.uponSanitizeElement, currentNode, {\n      tagName,\n      allowedTags: ALLOWED_TAGS,\n    });\n\n    /* Detect mXSS attempts abusing namespace confusion */\n    if (\n      SAFE_FOR_XML &&\n      currentNode.hasChildNodes() &&\n      !_isNode(currentNode.firstElementChild) &&\n      regExpTest(/<[/\\w!]/g, currentNode.innerHTML) &&\n      regExpTest(/<[/\\w!]/g, currentNode.textContent)\n    ) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Remove any occurrence of processing instructions */\n    if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Remove any kind of possibly harmful comments */\n    if (\n      SAFE_FOR_XML &&\n      currentNode.nodeType === NODE_TYPE.comment &&\n      regExpTest(/<[/\\w]/g, currentNode.data)\n    ) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Remove element if anything forbids its presence */\n    if (\n      !(\n        EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function &&\n        EXTRA_ELEMENT_HANDLING.tagCheck(tagName)\n      ) &&\n      (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])\n    ) {\n      /* Check if we have a custom element to handle */\n      if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n        if (\n          CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n          regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)\n        ) {\n          return false;\n        }\n\n        if (\n          CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n          CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)\n        ) {\n          return false;\n        }\n      }\n\n      /* Keep content except for bad-listed elements */\n      if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n        const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n        const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n        if (childNodes && parentNode) {\n          const childCount = childNodes.length;\n\n          for (let i = childCount - 1; i >= 0; --i) {\n            const childClone = cloneNode(childNodes[i], true);\n            childClone.__removalCount = (currentNode.__removalCount || 0) + 1;\n            parentNode.insertBefore(childClone, getNextSibling(currentNode));\n          }\n        }\n      }\n\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Check whether element has a valid namespace */\n    if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Make sure that older browsers don't get fallback-tag mXSS */\n    if (\n      (tagName === 'noscript' ||\n        tagName === 'noembed' ||\n        tagName === 'noframes') &&\n      regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)\n    ) {\n      _forceRemove(currentNode);\n      return true;\n    }\n\n    /* Sanitize element content to be template-safe */\n    if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {\n      /* Get the element's text content */\n      content = currentNode.textContent;\n\n      arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr: RegExp) => {\n        content = stringReplace(content, expr, ' ');\n      });\n\n      if (currentNode.textContent !== content) {\n        arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });\n        currentNode.textContent = content;\n      }\n    }\n\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeElements, currentNode, null);\n\n    return false;\n  };\n\n  /**\n   * _isValidAttribute\n   *\n   * @param lcTag Lowercase tag name of containing element.\n   * @param lcName Lowercase attribute name.\n   * @param value Attribute value.\n   * @return Returns true if `value` is valid, otherwise false.\n   */\n  // eslint-disable-next-line complexity\n  const _isValidAttribute = function (\n    lcTag: string,\n    lcName: string,\n    value: string\n  ): boolean {\n    /* Make sure attribute cannot clobber */\n    if (\n      SANITIZE_DOM &&\n      (lcName === 'id' || lcName === 'name') &&\n      (value in document || value in formElement)\n    ) {\n      return false;\n    }\n\n    /* Allow valid data-* attributes: At least one character after \"-\"\n        (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n        XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n        We don't need to check the value; it's always URI safe. */\n    if (\n      ALLOW_DATA_ATTR &&\n      !FORBID_ATTR[lcName] &&\n      regExpTest(DATA_ATTR, lcName)\n    ) {\n      // This attribute is safe\n    } else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) {\n      // This attribute is safe\n      /* Check if ADD_ATTR function allows this attribute */\n    } else if (\n      EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function &&\n      EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)\n    ) {\n      // This attribute is safe\n      /* Otherwise, check the name is permitted */\n    } else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n      if (\n        // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n        // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n        // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n        (_isBasicCustomElement(lcTag) &&\n          ((CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n            regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag)) ||\n            (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n              CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag))) &&\n          ((CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp &&\n            regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName)) ||\n            (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function &&\n              CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)))) ||\n        // Alternative, second condition checks if it's an `is`-attribute, AND\n        // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n        (lcName === 'is' &&\n          CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements &&\n          ((CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp &&\n            regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value)) ||\n            (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function &&\n              CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))))\n      ) {\n        // If user has supplied a regexp or function in CUSTOM_ELEMENT_HANDLING.tagNameCheck, we need to also allow derived custom elements using the same tagName test.\n        // Additionally, we need to allow attributes passing the CUSTOM_ELEMENT_HANDLING.attributeNameCheck user has configured, as custom elements can define these at their own discretion.\n      } else {\n        return false;\n      }\n      /* Check value is safe. First, is attr inert? If so, is safe */\n    } else if (URI_SAFE_ATTRIBUTES[lcName]) {\n      // This attribute is safe\n      /* Check no script, data or unknown possibly unsafe URI\n        unless we know URI values are safe for that attribute */\n    } else if (\n      regExpTest(IS_ALLOWED_URI, stringReplace(value, ATTR_WHITESPACE, ''))\n    ) {\n      // This attribute is safe\n      /* Keep image data URIs alive if src/xlink:href is allowed */\n      /* Further prevent gadget XSS for dynamically built script tags */\n    } else if (\n      (lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') &&\n      lcTag !== 'script' &&\n      stringIndexOf(value, 'data:') === 0 &&\n      DATA_URI_TAGS[lcTag]\n    ) {\n      // This attribute is safe\n      /* Allow unknown protocols: This provides support for links that\n        are handled by protocol handlers which may be unknown ahead of\n        time, e.g. fb:, spotify: */\n    } else if (\n      ALLOW_UNKNOWN_PROTOCOLS &&\n      !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))\n    ) {\n      // This attribute is safe\n      /* Check for binary attributes */\n    } else if (value) {\n      return false;\n    } else {\n      // Binary attributes are safe at this point\n      /* Anything else, presume unsafe, do not add it back */\n    }\n\n    return true;\n  };\n\n  /**\n   * _isBasicCustomElement\n   * checks if at least one dash is included in tagName, and it's not the first char\n   * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n   *\n   * @param tagName name of the tag of the node to sanitize\n   * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n   */\n  const _isBasicCustomElement = function (tagName: string): RegExpMatchArray {\n    return tagName !== 'annotation-xml' && stringMatch(tagName, CUSTOM_ELEMENT);\n  };\n\n  /**\n   * _sanitizeAttributes\n   *\n   * @protect attributes\n   * @protect nodeName\n   * @protect removeAttribute\n   * @protect setAttribute\n   *\n   * @param currentNode to sanitize\n   */\n  const _sanitizeAttributes = function (currentNode: Element): void {\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);\n\n    const { attributes } = currentNode;\n\n    /* Check if we have attributes; if not we might have a text node */\n    if (!attributes || _isClobbered(currentNode)) {\n      return;\n    }\n\n    const hookEvent = {\n      attrName: '',\n      attrValue: '',\n      keepAttr: true,\n      allowedAttributes: ALLOWED_ATTR,\n      forceKeepAttr: undefined,\n    };\n    let l = attributes.length;\n\n    /* Go backwards over all attributes; safely remove bad ones */\n    while (l--) {\n      const attr = attributes[l];\n      const { name, namespaceURI, value: attrValue } = attr;\n      const lcName = transformCaseFunc(name);\n\n      const initValue = attrValue;\n      let value = name === 'value' ? initValue : stringTrim(initValue);\n\n      /* Execute a hook if present */\n      hookEvent.attrName = lcName;\n      hookEvent.attrValue = value;\n      hookEvent.keepAttr = true;\n      hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n      _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);\n      value = hookEvent.attrValue;\n\n      /* Full DOM Clobbering protection via namespace isolation,\n       * Prefix id and name attributes with `user-content-`\n       */\n      if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n        // Remove the attribute with this value\n        _removeAttribute(name, currentNode);\n\n        // Prefix the value and later re-create the attribute with the sanitized value\n        value = SANITIZE_NAMED_PROPS_PREFIX + value;\n      }\n\n      /* Work around a security issue with comments inside attributes */\n      if (\n        SAFE_FOR_XML &&\n        regExpTest(/((--!?|])>)|<\\/(style|title|textarea)/i, value)\n      ) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n\n      /* Make sure we cannot easily use animated hrefs, even if animations are allowed */\n      if (lcName === 'attributename' && stringMatch(value, 'href')) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n\n      /* Did the hooks approve of the attribute? */\n      if (hookEvent.forceKeepAttr) {\n        continue;\n      }\n\n      /* Did the hooks approve of the attribute? */\n      if (!hookEvent.keepAttr) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n\n      /* Work around a security issue in jQuery 3.0 */\n      if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n\n      /* Sanitize attribute content to be template-safe */\n      if (SAFE_FOR_TEMPLATES) {\n        arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr: RegExp) => {\n          value = stringReplace(value, expr, ' ');\n        });\n      }\n\n      /* Is `value` valid for this attribute? */\n      const lcTag = transformCaseFunc(currentNode.nodeName);\n      if (!_isValidAttribute(lcTag, lcName, value)) {\n        _removeAttribute(name, currentNode);\n        continue;\n      }\n\n      /* Handle attributes that require Trusted Types */\n      if (\n        trustedTypesPolicy &&\n        typeof trustedTypes === 'object' &&\n        typeof trustedTypes.getAttributeType === 'function'\n      ) {\n        if (namespaceURI) {\n          /* Namespaces are not yet supported, see https://bugs.chromium.org/p/chromium/issues/detail?id=1305293 */\n        } else {\n          switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n            case 'TrustedHTML': {\n              value = trustedTypesPolicy.createHTML(value);\n              break;\n            }\n\n            case 'TrustedScriptURL': {\n              value = trustedTypesPolicy.createScriptURL(value);\n              break;\n            }\n\n            default: {\n              break;\n            }\n          }\n        }\n      }\n\n      /* Handle invalid data-* attribute set by try-catching it */\n      if (value !== initValue) {\n        try {\n          if (namespaceURI) {\n            currentNode.setAttributeNS(namespaceURI, name, value);\n          } else {\n            /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n            currentNode.setAttribute(name, value);\n          }\n\n          if (_isClobbered(currentNode)) {\n            _forceRemove(currentNode);\n          } else {\n            arrayPop(DOMPurify.removed);\n          }\n        } catch (_) {\n          _removeAttribute(name, currentNode);\n        }\n      }\n    }\n\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);\n  };\n\n  /**\n   * _sanitizeShadowDOM\n   *\n   * @param fragment to iterate over recursively\n   */\n  const _sanitizeShadowDOM = function (fragment: DocumentFragment): void {\n    let shadowNode = null;\n    const shadowIterator = _createNodeIterator(fragment);\n\n    /* Execute a hook if present */\n    _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);\n\n    while ((shadowNode = shadowIterator.nextNode())) {\n      /* Execute a hook if present */\n      _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);\n\n      /* Sanitize tags and elements */\n      _sanitizeElements(shadowNode);\n\n      /* Check attributes next */\n      _sanitizeAttributes(shadowNode);\n\n      /* Deep shadow DOM detected */\n      if (shadowNode.content instanceof DocumentFragment) {\n        _sanitizeShadowDOM(shadowNode.content);\n      }\n    }\n\n    /* Execute a hook if present */\n    _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);\n  };\n\n  // eslint-disable-next-line complexity\n  DOMPurify.sanitize = function (dirty, cfg = {}) {\n    let body = null;\n    let importedNode = null;\n    let currentNode = null;\n    let returnNode = null;\n    /* Make sure we have a string to sanitize.\n      DO NOT return early, as this will return the wrong type if\n      the user has requested a DOM object rather than a string */\n    IS_EMPTY_INPUT = !dirty;\n    if (IS_EMPTY_INPUT) {\n      dirty = '<!-->';\n    }\n\n    /* Stringify, in case dirty is an object */\n    if (typeof dirty !== 'string' && !_isNode(dirty)) {\n      if (typeof dirty.toString === 'function') {\n        dirty = dirty.toString();\n        if (typeof dirty !== 'string') {\n          throw typeErrorCreate('dirty is not a string, aborting');\n        }\n      } else {\n        throw typeErrorCreate('toString is not a function');\n      }\n    }\n\n    /* Return dirty HTML if DOMPurify cannot run */\n    if (!DOMPurify.isSupported) {\n      return dirty;\n    }\n\n    /* Assign config vars */\n    if (!SET_CONFIG) {\n      _parseConfig(cfg);\n    }\n\n    /* Clean up removed elements */\n    DOMPurify.removed = [];\n\n    /* Check if dirty is correctly typed for IN_PLACE */\n    if (typeof dirty === 'string') {\n      IN_PLACE = false;\n    }\n\n    if (IN_PLACE) {\n      /* Do some early pre-sanitization to avoid unsafe root nodes */\n      if ((dirty as Node).nodeName) {\n        const tagName = transformCaseFunc((dirty as Node).nodeName);\n        if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n          throw typeErrorCreate(\n            'root node is forbidden and cannot be sanitized in-place'\n          );\n        }\n      }\n    } else if (dirty instanceof Node) {\n      /* If dirty is a DOM element, append to an empty document to avoid\n         elements being stripped by the parser */\n      body = _initDocument('<!---->');\n      importedNode = body.ownerDocument.importNode(dirty, true);\n      if (\n        importedNode.nodeType === NODE_TYPE.element &&\n        importedNode.nodeName === 'BODY'\n      ) {\n        /* Node is already a body, use as is */\n        body = importedNode;\n      } else if (importedNode.nodeName === 'HTML') {\n        body = importedNode;\n      } else {\n        // eslint-disable-next-line unicorn/prefer-dom-node-append\n        body.appendChild(importedNode);\n      }\n    } else {\n      /* Exit directly if we have nothing to do */\n      if (\n        !RETURN_DOM &&\n        !SAFE_FOR_TEMPLATES &&\n        !WHOLE_DOCUMENT &&\n        // eslint-disable-next-line unicorn/prefer-includes\n        dirty.indexOf('<') === -1\n      ) {\n        return trustedTypesPolicy && RETURN_TRUSTED_TYPE\n          ? trustedTypesPolicy.createHTML(dirty)\n          : dirty;\n      }\n\n      /* Initialize the document to work on */\n      body = _initDocument(dirty);\n\n      /* Check we have a DOM node from the data */\n      if (!body) {\n        return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n      }\n    }\n\n    /* Remove first element node (ours) if FORCE_BODY is set */\n    if (body && FORCE_BODY) {\n      _forceRemove(body.firstChild);\n    }\n\n    /* Get node iterator */\n    const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n\n    /* Now start iterating over the created document */\n    while ((currentNode = nodeIterator.nextNode())) {\n      /* Sanitize tags and elements */\n      _sanitizeElements(currentNode);\n\n      /* Check attributes next */\n      _sanitizeAttributes(currentNode);\n\n      /* Shadow DOM detected, sanitize it */\n      if (currentNode.content instanceof DocumentFragment) {\n        _sanitizeShadowDOM(currentNode.content);\n      }\n    }\n\n    /* If we sanitized `dirty` in-place, return it. */\n    if (IN_PLACE) {\n      return dirty;\n    }\n\n    /* Return sanitized string or DOM */\n    if (RETURN_DOM) {\n      if (RETURN_DOM_FRAGMENT) {\n        returnNode = createDocumentFragment.call(body.ownerDocument);\n\n        while (body.firstChild) {\n          // eslint-disable-next-line unicorn/prefer-dom-node-append\n          returnNode.appendChild(body.firstChild);\n        }\n      } else {\n        returnNode = body;\n      }\n\n      if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n        /*\n          AdoptNode() is not used because internal state is not reset\n          (e.g. the past names map of a HTMLFormElement), this is safe\n          in theory but we would rather not risk another attack vector.\n          The state that is cloned by importNode() is explicitly defined\n          by the specs.\n        */\n        returnNode = importNode.call(originalDocument, returnNode, true);\n      }\n\n      return returnNode;\n    }\n\n    let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n\n    /* Serialize doctype if allowed */\n    if (\n      WHOLE_DOCUMENT &&\n      ALLOWED_TAGS['!doctype'] &&\n      body.ownerDocument &&\n      body.ownerDocument.doctype &&\n      body.ownerDocument.doctype.name &&\n      regExpTest(EXPRESSIONS.DOCTYPE_NAME, body.ownerDocument.doctype.name)\n    ) {\n      serializedHTML =\n        '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n    }\n\n    /* Sanitize final string template-safe */\n    if (SAFE_FOR_TEMPLATES) {\n      arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], (expr: RegExp) => {\n        serializedHTML = stringReplace(serializedHTML, expr, ' ');\n      });\n    }\n\n    return trustedTypesPolicy && RETURN_TRUSTED_TYPE\n      ? trustedTypesPolicy.createHTML(serializedHTML)\n      : serializedHTML;\n  };\n\n  DOMPurify.setConfig = function (cfg = {}) {\n    _parseConfig(cfg);\n    SET_CONFIG = true;\n  };\n\n  DOMPurify.clearConfig = function () {\n    CONFIG = null;\n    SET_CONFIG = false;\n  };\n\n  DOMPurify.isValidAttribute = function (tag, attr, value) {\n    /* Initialize shared config vars if necessary. */\n    if (!CONFIG) {\n      _parseConfig({});\n    }\n\n    const lcTag = transformCaseFunc(tag);\n    const lcName = transformCaseFunc(attr);\n    return _isValidAttribute(lcTag, lcName, value);\n  };\n\n  DOMPurify.addHook = function (\n    entryPoint: keyof HooksMap,\n    hookFunction: HookFunction\n  ) {\n    if (typeof hookFunction !== 'function') {\n      return;\n    }\n\n    arrayPush(hooks[entryPoint], hookFunction);\n  };\n\n  DOMPurify.removeHook = function (\n    entryPoint: keyof HooksMap,\n    hookFunction: HookFunction\n  ) {\n    if (hookFunction !== undefined) {\n      const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);\n\n      return index === -1\n        ? undefined\n        : arraySplice(hooks[entryPoint], index, 1)[0];\n    }\n\n    return arrayPop(hooks[entryPoint]);\n  };\n\n  DOMPurify.removeHooks = function (entryPoint: keyof HooksMap) {\n    hooks[entryPoint] = [];\n  };\n\n  DOMPurify.removeAllHooks = function () {\n    hooks = _createHooksMap();\n  };\n\n  return DOMPurify;\n}\n\nexport default createDOMPurify();\n\nexport interface DOMPurify {\n  /**\n   * Creates a DOMPurify instance using the given window-like object. Defaults to `window`.\n   */\n  (root?: WindowLike): DOMPurify;\n\n  /**\n   * Version label, exposed for easier checks\n   * if DOMPurify is up to date or not\n   */\n  version: string;\n\n  /**\n   * Array of elements that DOMPurify removed during sanitation.\n   * Empty if nothing was removed.\n   */\n  removed: Array<RemovedElement | RemovedAttribute>;\n\n  /**\n   * Expose whether this browser supports running the full DOMPurify.\n   */\n  isSupported: boolean;\n\n  /**\n   * Set the configuration once.\n   *\n   * @param cfg configuration object\n   */\n  setConfig(cfg?: Config): void;\n\n  /**\n   * Removes the configuration.\n   */\n  clearConfig(): void;\n\n  /**\n   * Provides core sanitation functionality.\n   *\n   * @param dirty string or DOM node\n   * @param cfg object\n   * @returns Sanitized TrustedHTML.\n   */\n  sanitize(\n    dirty: string | Node,\n    cfg: Config & { RETURN_TRUSTED_TYPE: true }\n  ): TrustedHTML;\n\n  /**\n   * Provides core sanitation functionality.\n   *\n   * @param dirty DOM node\n   * @param cfg object\n   * @returns Sanitized DOM node.\n   */\n  sanitize(dirty: Node, cfg: Config & { IN_PLACE: true }): Node;\n\n  /**\n   * Provides core sanitation functionality.\n   *\n   * @param dirty string or DOM node\n   * @param cfg object\n   * @returns Sanitized DOM node.\n   */\n  sanitize(dirty: string | Node, cfg: Config & { RETURN_DOM: true }): Node;\n\n  /**\n   * Provides core sanitation functionality.\n   *\n   * @param dirty string or DOM node\n   * @param cfg object\n   * @returns Sanitized document fragment.\n   */\n  sanitize(\n    dirty: string | Node,\n    cfg: Config & { RETURN_DOM_FRAGMENT: true }\n  ): DocumentFragment;\n\n  /**\n   * Provides core sanitation functionality.\n   *\n   * @param dirty string or DOM node\n   * @param cfg object\n   * @returns Sanitized string.\n   */\n  sanitize(dirty: string | Node, cfg?: Config): string;\n\n  /**\n   * Checks if an attribute value is valid.\n   * Uses last set config, if any. Otherwise, uses config defaults.\n   *\n   * @param tag Tag name of containing element.\n   * @param attr Attribute name.\n   * @param value Attribute value.\n   * @returns Returns true if `value` is valid. Otherwise, returns false.\n   */\n  isValidAttribute(tag: string, attr: string, value: string): boolean;\n\n  /**\n   * Adds a DOMPurify hook.\n   *\n   * @param entryPoint entry point for the hook to add\n   * @param hookFunction function to execute\n   */\n  addHook(entryPoint: BasicHookName, hookFunction: NodeHook): void;\n\n  /**\n   * Adds a DOMPurify hook.\n   *\n   * @param entryPoint entry point for the hook to add\n   * @param hookFunction function to execute\n   */\n  addHook(entryPoint: ElementHookName, hookFunction: ElementHook): void;\n\n  /**\n   * Adds a DOMPurify hook.\n   *\n   * @param entryPoint entry point for the hook to add\n   * @param hookFunction function to execute\n   */\n  addHook(\n    entryPoint: DocumentFragmentHookName,\n    hookFunction: DocumentFragmentHook\n  ): void;\n\n  /**\n   * Adds a DOMPurify hook.\n   *\n   * @param entryPoint entry point for the hook to add\n   * @param hookFunction function to execute\n   */\n  addHook(\n    entryPoint: 'uponSanitizeElement',\n    hookFunction: UponSanitizeElementHook\n  ): void;\n\n  /**\n   * Adds a DOMPurify hook.\n   *\n   * @param entryPoint entry point for the hook to add\n   * @param hookFunction function to execute\n   */\n  addHook(\n    entryPoint: 'uponSanitizeAttribute',\n    hookFunction: UponSanitizeAttributeHook\n  ): void;\n\n  /**\n   * Remove a DOMPurify hook at a given entryPoint\n   * (pops it from the stack of hooks if hook not specified)\n   *\n   * @param entryPoint entry point for the hook to remove\n   * @param hookFunction optional specific hook to remove\n   * @returns removed hook\n   */\n  removeHook(\n    entryPoint: BasicHookName,\n    hookFunction?: NodeHook\n  ): NodeHook | undefined;\n\n  /**\n   * Remove a DOMPurify hook at a given entryPoint\n   * (pops it from the stack of hooks if hook not specified)\n   *\n   * @param entryPoint entry point for the hook to remove\n   * @param hookFunction optional specific hook to remove\n   * @returns removed hook\n   */\n  removeHook(\n    entryPoint: ElementHookName,\n    hookFunction?: ElementHook\n  ): ElementHook | undefined;\n\n  /**\n   * Remove a DOMPurify hook at a given entryPoint\n   * (pops it from the stack of hooks if hook not specified)\n   *\n   * @param entryPoint entry point for the hook to remove\n   * @param hookFunction optional specific hook to remove\n   * @returns removed hook\n   */\n  removeHook(\n    entryPoint: DocumentFragmentHookName,\n    hookFunction?: DocumentFragmentHook\n  ): DocumentFragmentHook | undefined;\n\n  /**\n   * Remove a DOMPurify hook at a given entryPoint\n   * (pops it from the stack of hooks if hook not specified)\n   *\n   * @param entryPoint entry point for the hook to remove\n   * @param hookFunction optional specific hook to remove\n   * @returns removed hook\n   */\n  removeHook(\n    entryPoint: 'uponSanitizeElement',\n    hookFunction?: UponSanitizeElementHook\n  ): UponSanitizeElementHook | undefined;\n\n  /**\n   * Remove a DOMPurify hook at a given entryPoint\n   * (pops it from the stack of hooks if hook not specified)\n   *\n   * @param entryPoint entry point for the hook to remove\n   * @param hookFunction optional specific hook to remove\n   * @returns removed hook\n   */\n  removeHook(\n    entryPoint: 'uponSanitizeAttribute',\n    hookFunction?: UponSanitizeAttributeHook\n  ): UponSanitizeAttributeHook | undefined;\n\n  /**\n   * Removes all DOMPurify hooks at a given entryPoint\n   *\n   * @param entryPoint entry point for the hooks to remove\n   */\n  removeHooks(entryPoint: HookName): void;\n\n  /**\n   * Removes all DOMPurify hooks.\n   */\n  removeAllHooks(): void;\n}\n\n/**\n * An element removed by DOMPurify.\n */\nexport interface RemovedElement {\n  /**\n   * The element that was removed.\n   */\n  element: Node;\n}\n\n/**\n * An element removed by DOMPurify.\n */\nexport interface RemovedAttribute {\n  /**\n   * The attribute that was removed.\n   */\n  attribute: Attr | null;\n\n  /**\n   * The element that the attribute was removed.\n   */\n  from: Node;\n}\n\ntype BasicHookName =\n  | 'beforeSanitizeElements'\n  | 'afterSanitizeElements'\n  | 'uponSanitizeShadowNode';\ntype ElementHookName = 'beforeSanitizeAttributes' | 'afterSanitizeAttributes';\ntype DocumentFragmentHookName =\n  | 'beforeSanitizeShadowDOM'\n  | 'afterSanitizeShadowDOM';\ntype UponSanitizeElementHookName = 'uponSanitizeElement';\ntype UponSanitizeAttributeHookName = 'uponSanitizeAttribute';\n\ninterface HooksMap {\n  beforeSanitizeElements: NodeHook[];\n  afterSanitizeElements: NodeHook[];\n  beforeSanitizeShadowDOM: DocumentFragmentHook[];\n  uponSanitizeShadowNode: NodeHook[];\n  afterSanitizeShadowDOM: DocumentFragmentHook[];\n  beforeSanitizeAttributes: ElementHook[];\n  afterSanitizeAttributes: ElementHook[];\n  uponSanitizeElement: UponSanitizeElementHook[];\n  uponSanitizeAttribute: UponSanitizeAttributeHook[];\n}\n\ntype ArrayElement<T> = T extends Array<infer U> ? U : never;\n\ntype HookFunction = ArrayElement<HooksMap[keyof HooksMap]>;\n\nexport type HookName =\n  | BasicHookName\n  | ElementHookName\n  | DocumentFragmentHookName\n  | UponSanitizeElementHookName\n  | UponSanitizeAttributeHookName;\n\nexport type NodeHook = (\n  this: DOMPurify,\n  currentNode: Node,\n  hookEvent: null,\n  config: Config\n) => void;\n\nexport type ElementHook = (\n  this: DOMPurify,\n  currentNode: Element,\n  hookEvent: null,\n  config: Config\n) => void;\n\nexport type DocumentFragmentHook = (\n  this: DOMPurify,\n  currentNode: DocumentFragment,\n  hookEvent: null,\n  config: Config\n) => void;\n\nexport type UponSanitizeElementHook = (\n  this: DOMPurify,\n  currentNode: Node,\n  hookEvent: UponSanitizeElementHookEvent,\n  config: Config\n) => void;\n\nexport type UponSanitizeAttributeHook = (\n  this: DOMPurify,\n  currentNode: Element,\n  hookEvent: UponSanitizeAttributeHookEvent,\n  config: Config\n) => void;\n\nexport interface UponSanitizeElementHookEvent {\n  tagName: string;\n  allowedTags: Record<string, boolean>;\n}\n\nexport interface UponSanitizeAttributeHookEvent {\n  attrName: string;\n  attrValue: string;\n  keepAttr: boolean;\n  allowedAttributes: Record<string, boolean>;\n  forceKeepAttr: boolean | undefined;\n}\n\n/**\n * A `Window`-like object containing the properties and types that DOMPurify requires.\n */\nexport type WindowLike = Pick<\n  typeof globalThis,\n  | 'DocumentFragment'\n  | 'HTMLTemplateElement'\n  | 'Node'\n  | 'Element'\n  | 'NodeFilter'\n  | 'NamedNodeMap'\n  | 'HTMLFormElement'\n  | 'DOMParser'\n> & {\n  document?: Document;\n  MozNamedAttrMap?: typeof window.NamedNodeMap;\n} & Pick<TrustedTypesWindow, 'trustedTypes'>;\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\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\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"],
  "mappings": "6FAKO,IAAMA,GAAmB,2CAEnBC,GACX,kFAEWC,GAAkB,cCVxB,IAAMC,GAAN,cAAkC,KAAM,CAA/C,MAA+C,CAAAC,EAAA,4BAC7C,YAAYC,EAAiB,CAC3B,MAAMA,CAAO,EACb,KAAK,KAAO,qBACd,CACF,ECMO,IAAMC,GAA4C,CAAC,EAwB7CC,GAAaC,EAAA,SAAUC,EAAcC,EAAgC,CAChFD,EA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,eAAkB,GAClB,UAAa,GACb,OAAU,EACV,WAAc,GACd,aAAgB,GAChB,YAAe,GACf,qBAAwB,GACxB,SAAY,GACZ,gBAAmB,GACnB,oBAAuB,EACvB,WAAc,WACd,QAAW,GACX,YAAe,GACf,QAAW,QACb,EACA,QAAW,CACT,YAAe,GACf,eAAkB,GAClB,eAAkB,GAClB,WAAc,IACd,cAAiB,IACjB,MAAS,IACT,OAAU,GACV,UAAa,GACb,cAAiB,EACjB,WAAc,GACd,cAAiB,GACjB,aAAgB,SAChB,gBAAmB,EACnB,YAAe,GACf,aAAgB,GAChB,eAAkB,0BAClB,WAAc,GACd,gBAAmB,GACnB,cAAiB,KACjB,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,SACF,EACA,aAAgB,CACd,UACA,UACA,UACA,UACA,UACA,UACA,SACF,EACA,eAAkB,CAChB,MACF,EACA,WAAc,GACd,gBAAmB,6CACnB,cAAiB,KACnB,EACA,MAAS,CACP,YAAe,GACf,eAAkB,GAClB,oBAAuB,GACvB,cAAiB,GACjB,QAAW,EACX,WAAc,GACd,gBAAmB,gBACnB,WAAc,GACd,oBAAuB,EACzB,EACA,MAAS,CACP,YAAe,GACf,eAAkB,GAClB,cAAiB,GACjB,SAAY,EACZ,QAAW,EACX,WAAc,GACd,WAAc,IACd,WAAc,GACd,UAAa,GACb,WAAc,EACd,YAAe,EACf,eAAkB,KAClB,SAAY,GACZ,YAAe,GACf,iBAAoB,KACpB,kBAAqB,GACrB,OAAU,EACV,gBAAmB,eACrB,EACA,GAAM,CACJ,YAAe,GACf,eAAkB,GAClB,eAAkB,GAClB,gBAAmB,KACnB,eAAkB,IAClB,gBAAmB,GACnB,cAAiB,GACjB,YAAe,IACf,YAAe,GACf,OAAU,OACV,KAAQ,WACR,SAAY,EACd,EACA,IAAO,CACL,YAAe,GACf,aAAgB,GAClB,EACA,cAAiB,CACf,YAAe,GACf,WAAc,IACd,YAAe,IACf,cAAiB,GACjB,aAAgB,GAChB,gBAAmB,EAC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AIA,EAAKC,IACP,OAAOxD,EAAQuD,EAAKC,GAAG,EAGzB,GAAI,OAAOD,EAAKL,OAAU,WACxB,OAAOlD,EAAQuD,EAAKL,KAAK,CAE7B,CAEAH,EAAStE,GAAesE,CAAM,CAChC,CAEA,SAASU,GAAa,CACpB,OAAO,IACT,CAFSA,OAAAA,EAAAA,EAAAA,iBAIFA,CACT,CAzBSJ,EAAAA,GAAAA,gBCxLF,IAAMK,GAAO9E,EAAO,CACzB,IACA,OACA,UACA,UACA,OACA,UACA,QACA,QACA,IACA,MACA,MACA,MACA,QACA,aACA,OACA,KACA,SACA,SACA,UACA,SACA,OACA,OACA,MACA,WACA,UACA,OACA,WACA,KACA,YACA,MACA,UACA,MACA,SACA,MACA,MACA,KACA,KACA,UACA,KACA,WACA,aACA,SACA,OACA,SACA,OACA,KACA,KACA,KACA,KACA,KACA,KACA,OACA,SACA,SACA,KACA,OACA,IACA,MACA,QACA,MACA,MACA,QACA,SACA,KACA,OACA,MACA,OACA,UACA,OACA,WACA,QACA,MACA,OACA,KACA,WACA,SACA,SACA,IACA,UACA,MACA,WACA,IACA,KACA,KACA,OACA,IACA,OACA,SACA,UACA,SACA,SACA,OACA,QACA,SACA,SACA,OACA,SACA,SACA,QACA,MACA,UACA,MACA,QACA,QACA,KACA,WACA,WACA,QACA,KACA,QACA,OACA,KACA,QACA,KACA,IACA,KACA,MACA,QACA,KAAK,CACG,EAEG+E,GAAM/E,EAAO,CACxB,MACA,IACA,WACA,cACA,eACA,eACA,gBACA,mBACA,SACA,WACA,OACA,OACA,UACA,eACA,cACA,SACA,OACA,IACA,QACA,WACA,QACA,QACA,YACA,OACA,iBACA,SACA,OACA,WACA,QACA,OACA,OACA,UACA,UACA,WACA,iBACA,OACA,OACA,QACA,SACA,SACA,OACA,WACA,QACA,OACA,QACA,OACA,OAAO,CACC,EAEGgF,GAAahF,EAAO,CAC/B,UACA,gBACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,cAAc,CACN,EAMGiF,GAAgBjF,EAAO,CAClC,UACA,gBACA,SACA,UACA,YACA,mBACA,iBACA,gBACA,gBACA,gBACA,QACA,YACA,OACA,eACA,YACA,UACA,gBACA,SACA,MACA,aACA,UACA,KAAK,CACG,EAEGkF,GAASlF,EAAO,CAC3B,OACA,WACA,SACA,UACA,QACA,SACA,KACA,aACA,gBACA,KACA,KACA,QACA,UACA,WACA,QACA,OACA,KACA,SACA,QACA,SACA,OACA,OACA,UACA,SACA,MACA,QACA,MACA,SACA,aACA,aAAa,CACL,EAIGmF,GAAmBnF,EAAO,CACrC,UACA,cACA,aACA,WACA,YACA,UACA,UACA,SACA,SACA,QACA,YACA,aACA,iBACA,cACA,MAAM,CACE,EAEGoF,GAAOpF,EAAO,CAAC,OAAO,CAAU,EC1RhC8E,GAAO9E,EAAO,CACzB,SACA,SACA,QACA,MACA,iBACA,eACA,uBACA,WACA,aACA,UACA,SACA,UACA,cACA,cACA,UACA,OACA,QACA,QACA,QACA,OACA,UACA,WACA,eACA,SACA,cACA,WACA,WACA,UACA,MACA,WACA,0BACA,wBACA,WACA,YACA,UACA,eACA,cACA,OACA,MACA,UACA,SACA,SACA,OACA,OACA,WACA,KACA,QACA,YACA,YACA,QACA,OACA,QACA,OACA,OACA,UACA,OACA,MACA,MACA,YACA,QACA,SACA,MACA,YACA,WACA,QACA,OACA,QACA,UACA,aACA,SACA,OACA,UACA,OACA,UACA,cACA,cACA,UACA,gBACA,sBACA,SACA,UACA,UACA,aACA,WACA,MACA,WACA,MACA,WACA,OACA,OACA,UACA,aACA,QACA,WACA,QACA,OACA,QACA,OACA,OACA,UACA,QACA,MACA,SACA,OACA,QACA,UACA,WACA,QACA,YACA,OACA,SACA,SACA,QACA,QACA,OACA,QACA,MAAM,CACE,EAEG+E,GAAM/E,EAAO,CACxB,gBACA,aACA,WACA,qBACA,YACA,SACA,gBACA,gBACA,UACA,gBACA,iBACA,QACA,OACA,KACA,QACA,OACA,gBACA,YACA,YACA,QACA,sBACA,8BACA,gBACA,kBACA,KACA,KACA,IACA,KACA,KACA,kBACA,YACA,UACA,UACA,MACA,WACA,YACA,MACA,WACA,OACA,eACA,YACA,SACA,cACA,cACA,gBACA,cACA,YACA,mBACA,eACA,aACA,eACA,cACA,KACA,KACA,KACA,KACA,aACA,WACA,gBACA,oBACA,SACA,OACA,KACA,kBACA,KACA,MACA,YACA,IACA,KACA,KACA,KACA,KACA,UACA,YACA,aACA,WACA,OACA,eACA,iBACA,eACA,mBACA,iBACA,QACA,aACA,aACA,eACA,eACA,cACA,cACA,mBACA,YACA,MACA,OACA,YACA,QACA,SACA,OACA,MACA,OACA,aACA,SACA,WACA,UACA,QACA,SACA,cACA,SACA,WACA,cACA,OACA,aACA,sBACA,mBACA,eACA,SACA,gBACA,sBACA,iBACA,IACA,KACA,KACA,SACA,OACA,OACA,cACA,YACA,UACA,SACA,SACA,QACA,OACA,kBACA,QACA,mBACA,mBACA,eACA,cACA,eACA,cACA,aACA,eACA,mBACA,oBACA,iBACA,kBACA,oBACA,iBACA,SACA,eACA,QACA,eACA,iBACA,WACA,cACA,UACA,UACA,YACA,mBACA,cACA,kBACA,iBACA,aACA,OACA,KACA,KACA,UACA,SACA,UACA,aACA,UACA,aACA,gBACA,gBACA,QACA,eACA,OACA,eACA,mBACA,mBACA,IACA,KACA,KACA,QACA,IACA,KACA,KACA,IACA,YAAY,CACJ,EAEGkF,GAASlF,EAAO,CAC3B,SACA,cACA,QACA,WACA,QACA,eACA,cACA,aACA,aACA,QACA,MACA,UACA,eACA,WACA,QACA,QACA,SACA,OACA,KACA,UACA,SACA,gBACA,SACA,SACA,iBACA,YACA,WACA,cACA,UACA,UACA,gBACA,WACA,WACA,OACA,WACA,WACA,aACA,UACA,SACA,SACA,cACA,gBACA,uBACA,YACA,YACA,aACA,WACA,iBACA,iBACA,YACA,UACA,QACA,OAAO,CACR,EAEYqF,GAA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L,EAAIC,EAAQ,MAAM,EAEtCA,EAAQ,cACNE,GACAG,GACAZ,GACAH,GACAI,GACAC,GAAY,EACZ,IAAM,CAGN,CACF,CACF,EA1B+B,mBA4BlBW,GAAaf,EAACgB,GAAoC,CAC7D,GAAIA,KAAQV,GACV,OAAOA,GAASU,CAAI,EAEtB,MAAM,IAAIC,GAAqBD,CAAI,CACrC,EAL0B,cAObC,GAAN,cAAmC,KAAM,CA9EhD,MA8EgD,CAAAjB,EAAA,6BAC9C,YAAYgB,EAAc,CACxB,MAAM,WAAWA,CAAI,aAAa,CACpC,CACF",
  "names": ["frontMatterRegex", "directiveRegex", "anyCommentRegex", "UnknownDiagramError", "__name", "message", "detectors", "detectType", "__name", "text", "config", "frontMatterRegex", "directiveRegex", "anyCommentRegex", "key", "detector", "UnknownDiagramError", "registerLazyLoadedDiagrams", "diagrams", "id", "loader", "addDetector", "log", "getDiagramLoader", "assignWithDepth", "__name", "dst", "src", "depth", "clobber", "config", "s", "key", "assignWithDepth_default", "Channel", "__name", "g", "b", "h", "s", "l", "a", "c", "n", "p", "q", "t", "channel", "max", "min", "d", "channel_default", "Lang", "__name", "number", "lower", "upper", "lang_default", "Unit", "__name", "dec", "hex", "unit_default", "Utils", "channel_default", "lang_default", "unit_default", "utils_default", "DEC2HEX", "i", "utils_default", "TYPE", "Type", "__name", "TYPE", "type", "type_default", "Channels", "__name", "data", "color", "type_default", "TYPE", "h", "s", "l", "utils_default", "r", "g", "b", "a", "channels_default", "channels", "channels_default", "reusable_default", "Hex", "__name", "color", "match", "hex", "dec", "length", "hasAlpha", "isFullLength", "multiplier", "bits", "bitsOffset", "mask", "reusable_default", "channels", "r", "g", "b", "a", "DEC2HEX", "hex_default", "HSL", "__name", "hue", "match", "number", "unit", "utils_default", "color", "charCode", "h", "s", "l", "a", "isAlphaPercentage", "reusable_default", "channels", "hsl_default", "Keyword", "__name", "color", "hex", "hex_default", "channels", "name", "keyword_default", "RGB", "__name", "color", "charCode", "match", "r", "isRedPercentage", "g", "isGreenPercentage", "b", "isBluePercentage", "a", "isAlphaPercentage", "reusable_default", "utils_default", "channels", "rgb_default", "Color", "keyword_default", "hex_default", "rgb_default", "hsl_default", "__name", "color", "channels", "TYPE", "color_default", "change", "__name", "color", "channels", "ch", "color_default", "c", "utils_default", "change_default", "rgba", "__name", "g", "b", "a", "change_default", "channels", "reusable_default", "utils_default", "color_default", "rgba_default", "channel", "__name", "color", "utils_default", "color_default", "channel_default", "luminance", "__name", "color", "r", "g", "b", "color_default", "utils_default", "luminance_default", "isLight", "__name", "color", "luminance_default", "is_light_default", "isDark", "__name", "color", "is_light_default", "is_dark_default", "adjustChannel", "__name", "color", "channel", "amount", "channels", "color_default", "amountCurrent", "amountNext", "utils_default", "adjust_channel_default", "lighten", "__name", "color", "amount", "adjust_channel_default", "lighten_default", "darken", "__name", "color", "amount", "adjust_channel_default", "darken_default", "transparentize", "__name", "color", "amount", "adjust_channel_default", "transparentize_default", "adjust", "__name", "color", "channels", "ch", "color_default", "changes", "c", "change_default", "adjust_default", "mix", "__name", "color1", "color2", "weight", "r1", "g1", "b1", "a1", "color_default", "r2", "g2", "b2", "a2", "weightScale", "weightNormalized", "alphaDelta", "weight1", "weight2", "r", "g", "b", "a", "rgba_default", "mix_default", "invert", "__name", "color", "weight", "inverse", "color_default", "mix_default", "invert_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "mkBorder", "__name", "col", "darkMode", "adjust_default", "Theme", "__name", "adjust_default", "mkBorder", "invert_default", "darken_default", "lighten_default", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "lighten_default", "adjust_default", "invert_default", "mkBorder", "rgba_default", "darken_default", "i", "is_dark_default", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "adjust_default", "mkBorder", "invert_default", "rgba_default", "darken_default", "i", "lighten_default", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "k", "keys", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "lighten_default", "mkBorder", "invert_default", "darken_default", "adjust_default", "i", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "lighten_default", "adjust_default", "mkBorder", "invert_default", "i", "darken_default", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "mkBorder", "adjust_default", "invert_default", "darken_default", "primaryColor", "secondaryColor", "tertiaryColor", "lighten_default", "i", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "lighten_default", "adjust_default", "invert_default", "mkBorder", "rgba_default", "darken_default", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "mkBorder", "adjust_default", "invert_default", "darken_default", "primaryColor", "secondaryColor", "tertiaryColor", "lighten_default", "i", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "lighten_default", "adjust_default", "invert_default", "mkBorder", "rgba_default", "darken_default", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "mkBorder", "adjust_default", "invert_default", "darken_default", "primaryColor", "secondaryColor", "tertiaryColor", "lighten_default", "i", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "Theme", "__name", "lighten_default", "adjust_default", "invert_default", "mkBorder", "rgba_default", "darken_default", "multiplier", "is_dark_default", "oldAttributeBackgroundColorOdd", "oldAttributeBackgroundColorEven", "overrides", "keys", "k", "getThemeVariables", "userOverrides", "theme", "themes_default", "getThemeVariables", "config_schema_default", "config", "config_schema_default", "themes_default", "__name", "keyify", "obj", "prefix", "res", "el", "configKeys", "defaultConfig_default", "sanitizeDirective", "__name", "args", "log", "arg", "key", "configKeys", "cssMatchers", "cssKey", "sanitizeCss", "k", "val", "str", "startCnt", "endCnt", "element", "defaultConfig", "defaultConfig_default", "evaluate", "__name", "val", "siteConfig", "assignWithDepth_default", "configFromInitialize", "directives", "currentConfig", "updateCurrentConfig", "siteCfg", "_directives", "cfg", "sumOfDirectives", "sanitize", "themes_default", "tmpConfigFromInitialize", "themeVariables", "checkConfig", "setSiteConfig", "conf", "saveConfigFromInitialize", "updateSiteConfig", "getSiteConfig", "setConfig", "getConfig", "options", "key", "log", "addDirective", "directive", "sanitizeDirective", "reset", "config", "ConfigWarning", "issuedWarnings", "issueWarning", "warning", "getUserDefinedConfig", "userConfig", "d", "getEffectiveHtmlLabels", "entries", "setPrototypeOf", "isFrozen", "getPrototypeOf", "getOwnPropertyDescriptor", "Object", "freeze", "seal", "create", "apply", "construct", "Reflect", "__name", "x", "func", "thisArg", "_len", "arguments", "length", "args", "Array", "_key", "Func", "_len2", "_key2", "arrayForEach", "unapply", "prototype", "forEach", "arrayLastIndexOf", "lastIndexOf", "arrayPop", "pop", "arrayPush", "push", "arraySplice", "splice", "stringToLowerCase", "String", "toLowerCase", "stringToString", "toString", "stringMatch", "match", "stringReplace", "replace", "stringIndexOf", "indexOf", "stringTrim", "trim", "objectHasOwnProperty", "hasOwnProperty", "regExpTest", "RegExp", "test", "typeErrorCreate", "unconstruct", "TypeError", "lastIndex", "_len3", "_key3", "_len4", "_key4", "addToSet", "set", "array", "transformCaseFunc", "l", "element", "lcElement", "cleanArray", "index", "clone", "object", "newObject", "property", "value", "isArray", "constructor", "lookupGetter", "prop", "desc", "get", "fallbackValue", "html", "svg", "svgFilters", "svgDisallowed", "mathMl", "mathMlDisallowed", "text", "xml", "MUSTACHE_EXPR", "ERB_EXPR", "TMPLIT_EXPR", "DATA_ATTR", "ARIA_ATTR", "IS_ALLOWED_URI", "IS_SCRIPT_OR_DATA", "ATTR_WHITESPACE", "DOCTYPE_NAME", "CUSTOM_ELEMENT", "NODE_TYPE", "attribute", "cdataSection", "entityReference", "entityNode", "progressingInstruction", "comment", "document", "documentType", "documentFragment", "notation", "getGlobal", "window", "_createTrustedTypesPolicy", "trustedTypes", "purifyHostElement", "createPolicy", "suffix", "ATTR_NAME", "hasAttribute", "getAttribute", "policyName", "createHTML", "createScriptURL", "scriptUrl", "console", "warn", "_createHooksMap", "afterSanitizeAttributes", "afterSanitizeElements", "afterSanitizeShadowDOM", "beforeSanitizeAttributes", "beforeSanitizeElements", "beforeSanitizeShadowDOM", "uponSanitizeAttribute", "uponSanitizeElement", "uponSanitizeShadowNode", "createDOMPurify", "undefined", "DOMPurify", "root", "version", "VERSION", "removed", "nodeType", "Element", "isSupported", "originalDocument", "currentScript", "DocumentFragment", "HTMLTemplateElement", "Node", "NodeFilter", "NamedNodeMap", "MozNamedAttrMap", "HTMLFormElement", "DOMParser", "ElementPrototype", "cloneNode", "remove", "getNextSibling", "getChildNodes", "getParentNode", "template", "createElement", "content", "ownerDocument", "trustedTypesPolicy", "emptyHTML", "implementation", "createNodeIterator", "createDocumentFragment", "getElementsByTagName", "importNode", "hooks", "createHTMLDocument", "EXPRESSIONS", "ALLOWED_TAGS", "DEFAULT_ALLOWED_TAGS", "TAGS", "ALLOWED_ATTR", "DEFAULT_ALLOWED_ATTR", "ATTRS", "CUSTOM_ELEMENT_HANDLING", "tagNameCheck", "writable", "configurable", "enumerable", "attributeNameCheck", "allowCustomizedBuiltInElements", "FORBID_TAGS", "FORBID_ATTR", "EXTRA_ELEMENT_HANDLING", "tagCheck", "attributeCheck", "ALLOW_ARIA_ATTR", "ALLOW_DATA_ATTR", "ALLOW_UNKNOWN_PROTOCOLS", "ALLOW_SELF_CLOSE_IN_ATTR", "SAFE_FOR_TEMPLATES", "SAFE_FOR_XML", "WHOLE_DOCUMENT", "SET_CONFIG", "FORCE_BODY", "RETURN_DOM", "RETURN_DOM_FRAGMENT", "RETURN_TRUSTED_TYPE", "SANITIZE_DOM", "SANITIZE_NAMED_PROPS", "SANITIZE_NAMED_PROPS_PREFIX", "KEEP_CONTENT", "IN_PLACE", "USE_PROFILES", "FORBID_CONTENTS", "DEFAULT_FORBID_CONTENTS", "DATA_URI_TAGS", "DEFAULT_DATA_URI_TAGS", "URI_SAFE_ATTRIBUTES", "DEFAULT_URI_SAFE_ATTRIBUTES", "MATHML_NAMESPACE", "SVG_NAMESPACE", "HTML_NAMESPACE", "NAMESPACE", "IS_EMPTY_INPUT", "ALLOWED_NAMESPACES", "DEFAULT_ALLOWED_NAMESPACES", "MATHML_TEXT_INTEGRATION_POINTS", "HTML_INTEGRATION_POINTS", "COMMON_SVG_AND_HTML_ELEMENTS", "PARSER_MEDIA_TYPE", "SUPPORTED_PARSER_MEDIA_TYPES", "DEFAULT_PARSER_MEDIA_TYPE", "CONFIG", "formElement", "isRegexOrFunction", "testValue", "Function", "_parseConfig", "cfg", "ADD_URI_SAFE_ATTR", "ADD_DATA_URI_TAGS", "ALLOWED_URI_REGEXP", "ADD_TAGS", "ADD_ATTR", "ADD_FORBID_CONTENTS", "table", "tbody", "TRUSTED_TYPES_POLICY", "ALL_SVG_TAGS", "ALL_MATHML_TAGS", "_checkValidNamespace", "parent", "tagName", "namespaceURI", "parentTagName", "Boolean", "_forceRemove", "node", "removeChild", "_removeAttribute", "name", "getAttributeNode", "from", "removeAttribute", "setAttribute", "_initDocument", "dirty", "doc", "leadingWhitespace", "matches", "dirtyPayload", "parseFromString", "documentElement", "createDocument", "innerHTML", "body", "insertBefore", "createTextNode", "childNodes", "call", "_createNodeIterator", "SHOW_ELEMENT", "SHOW_COMMENT", "SHOW_TEXT", "SHOW_PROCESSING_INSTRUCTION", "SHOW_CDATA_SECTION", "_isClobbered", "nodeName", "textContent", "attributes", "hasChildNodes", "_isNode", "_executeHooks", "currentNode", "data", "hook", "_sanitizeElements", "allowedTags", "firstElementChild", "_isBasicCustomElement", "parentNode", "childCount", "i", "childClone", "__removalCount", "expr", "_isValidAttribute", "lcTag", "lcName", "_sanitizeAttributes", "hookEvent", "attrName", "attrValue", "keepAttr", "allowedAttributes", "forceKeepAttr", "attr", "initValue", "getAttributeType", "setAttributeNS", "_sanitizeShadowDOM", "fragment", "shadowNode", "shadowIterator", "nextNode", "sanitize", "importedNode", "returnNode", "appendChild", "firstChild", "nodeIterator", "shadowroot", "shadowrootmode", "serializedHTML", "outerHTML", "doctype", "setConfig", "clearConfig", "isValidAttribute", "tag", "addHook", "entryPoint", "hookFunction", "removeHook", "removeHooks", "removeAllHooks", "purify", "lineBreakRegex", "getRows", "__name", "s", "breakToPlaceholder", "setupDompurifyHooksIfNotSetup", "setup", "setupDompurifyHooks", "TEMPORARY_ATTRIBUTE", "purify", "node", "removeScript", "txt", "sanitizeMore", "text", "config", "getEffectiveHtmlLabels", "level", "placeholderToBreak", "sanitizeText", "sanitizeTextOrArray", "a", "x", "hasBreaks", "splitBreaks", "getUrl", "useAbsolute", "url", "getMax", "__name", "values", "newValues", "value", "getMin", "parseGenericTypes", "input", "inputSets", "output", "i", "thisSet", "previousSet", "nextSet", "shouldCombineSets", "processSet", "countOccurrence", "string", "substring", "prevCount", "nextCount", "tildeCount", "hasStartingTilde", "chars", "first", "last", "isMathMLSupported", "katexRegex", "hasKatex", "text", "calculateMathMLDimensions", "config", "divElem", "renderKatexSanitized", "dim", "renderKatexUnsanitized", "katex", "outputMode", "lineBreakRegex", "line", "_", "c", "sanitizeText", "common_default", "getRows", "sanitizeTextOrArray", "hasBreaks", "splitBreaks", "removeScript", "getUrl", "evaluate", "d3Attrs", "__name", "d3Elem", "attrs", "attr", "calculateSvgSizeAttrs", "height", "width", "useMaxWidth", "configureSvgSize", "svgElem", "setupGraphViewbox", "graph", "padding", "svgBounds", "sWidth", "sHeight", "log", "vBox", "themes", "getStyles", "__name", "type", "userStyles", "options", "svgId", "diagramStyles", "log", "addStylesForDiagram", "diagramTheme", "styles_default", "commonDb_exports", "__export", "clear", "getAccDescription", "getAccTitle", "getDiagramTitle", "setAccDescription", "setAccTitle", "setDiagramTitle", "accTitle", "diagramTitle", "accDescription", "sanitizeText", "__name", "txt", "getConfig", "clear", "setAccTitle", "getAccTitle", "setAccDescription", "getAccDescription", "setDiagramTitle", "getDiagramTitle", "log", "setLogLevel", "getConfig", "setConfig", "defaultConfig", "sanitizeText", "__name", "text", "getConfig", "setupGraphViewbox", "getCommonDb", "commonDb_exports", "diagrams", "registerDiagram", "id", "diagram", "detector", "log", "addDetector", "addStylesForDiagram", "setLogLevel", "getDiagram", "name", "DiagramNotFoundError"]
}
