Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
diff --git a/404.html b/404.html index 15e42aac6..bdc2a8369 100644 --- a/404.html +++ b/404.html @@ -2,21 +2,18 @@
- -We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
} */
+ let marker
+ return start
+
+ /**
+ * Start of code.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // To do: parse whitespace like `markdown-rs`.
+ return beforeSequenceOpen(code)
+ }
+
+ /**
+ * In opening fence, after prefix, at sequence.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function beforeSequenceOpen(code) {
+ const tail = self.events[self.events.length - 1]
+ initialPrefix =
+ tail && tail[1].type === 'linePrefix'
+ ? tail[2].sliceSerialize(tail[1], true).length
+ : 0
+ marker = code
+ effects.enter('codeFenced')
+ effects.enter('codeFencedFence')
+ effects.enter('codeFencedFenceSequence')
+ return sequenceOpen(code)
+ }
+
+ /**
+ * In opening fence sequence.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceOpen(code) {
+ if (code === marker) {
+ sizeOpen++
+ effects.consume(code)
+ return sequenceOpen
+ }
+ if (sizeOpen < 3) {
+ return nok(code)
+ }
+ effects.exit('codeFencedFenceSequence')
+ return markdownSpace(code)
+ ? factorySpace(effects, infoBefore, 'whitespace')(code)
+ : infoBefore(code)
+ }
+
+ /**
+ * In opening fence, after the sequence (and optional whitespace), before info.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function infoBefore(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('codeFencedFence')
+ return self.interrupt
+ ? ok(code)
+ : effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)
+ }
+ effects.enter('codeFencedFenceInfo')
+ effects.enter('chunkString', {
+ contentType: 'string'
+ })
+ return info(code)
+ }
+
+ /**
+ * In info.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function info(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('chunkString')
+ effects.exit('codeFencedFenceInfo')
+ return infoBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.exit('chunkString')
+ effects.exit('codeFencedFenceInfo')
+ return factorySpace(effects, metaBefore, 'whitespace')(code)
+ }
+ if (code === 96 && code === marker) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return info
+ }
+
+ /**
+ * In opening fence, after info and whitespace, before meta.
+ *
+ * ```markdown
+ * > | ~~~js eval
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function metaBefore(code) {
+ if (code === null || markdownLineEnding(code)) {
+ return infoBefore(code)
+ }
+ effects.enter('codeFencedFenceMeta')
+ effects.enter('chunkString', {
+ contentType: 'string'
+ })
+ return meta(code)
+ }
+
+ /**
+ * In meta.
+ *
+ * ```markdown
+ * > | ~~~js eval
+ * ^
+ * | alert(1)
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function meta(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('chunkString')
+ effects.exit('codeFencedFenceMeta')
+ return infoBefore(code)
+ }
+ if (code === 96 && code === marker) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return meta
+ }
+
+ /**
+ * At eol/eof in code, before a non-lazy closing fence or content.
+ *
+ * ```markdown
+ * > | ~~~js
+ * ^
+ * > | alert(1)
+ * ^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function atNonLazyBreak(code) {
+ return effects.attempt(closeStart, after, contentBefore)(code)
+ }
+
+ /**
+ * Before code content, not a closing fence, at eol.
+ *
+ * ```markdown
+ * | ~~~js
+ * > | alert(1)
+ * ^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function contentBefore(code) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return contentStart
+ }
+
+ /**
+ * Before code content, not a closing fence.
+ *
+ * ```markdown
+ * | ~~~js
+ * > | alert(1)
+ * ^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function contentStart(code) {
+ return initialPrefix > 0 && markdownSpace(code)
+ ? factorySpace(
+ effects,
+ beforeContentChunk,
+ 'linePrefix',
+ initialPrefix + 1
+ )(code)
+ : beforeContentChunk(code)
+ }
+
+ /**
+ * Before code content, after optional prefix.
+ *
+ * ```markdown
+ * | ~~~js
+ * > | alert(1)
+ * ^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function beforeContentChunk(code) {
+ if (code === null || markdownLineEnding(code)) {
+ return effects.check(nonLazyContinuation, atNonLazyBreak, after)(code)
+ }
+ effects.enter('codeFlowValue')
+ return contentChunk(code)
+ }
+
+ /**
+ * In code content.
+ *
+ * ```markdown
+ * | ~~~js
+ * > | alert(1)
+ * ^^^^^^^^
+ * | ~~~
+ * ```
+ *
+ * @type {State}
+ */
+ function contentChunk(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('codeFlowValue')
+ return beforeContentChunk(code)
+ }
+ effects.consume(code)
+ return contentChunk
+ }
+
+ /**
+ * After code.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ effects.exit('codeFenced')
+ return ok(code)
+ }
+
+ /**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+ function tokenizeCloseStart(effects, ok, nok) {
+ let size = 0
+ return startBefore
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function startBefore(code) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return start
+ }
+
+ /**
+ * Before closing fence, at optional whitespace.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // Always populated by defaults.
+
+ // To do: `enter` here or in next state?
+ effects.enter('codeFencedFence')
+ return markdownSpace(code)
+ ? factorySpace(
+ effects,
+ beforeSequenceClose,
+ 'linePrefix',
+ self.parser.constructs.disable.null.includes('codeIndented')
+ ? undefined
+ : 4
+ )(code)
+ : beforeSequenceClose(code)
+ }
+
+ /**
+ * In closing fence, after optional whitespace, at sequence.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function beforeSequenceClose(code) {
+ if (code === marker) {
+ effects.enter('codeFencedFenceSequence')
+ return sequenceClose(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * In closing fence sequence.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceClose(code) {
+ if (code === marker) {
+ size++
+ effects.consume(code)
+ return sequenceClose
+ }
+ if (size >= sizeOpen) {
+ effects.exit('codeFencedFenceSequence')
+ return markdownSpace(code)
+ ? factorySpace(effects, sequenceCloseAfter, 'whitespace')(code)
+ : sequenceCloseAfter(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * After closing fence sequence, after optional whitespace.
+ *
+ * ```markdown
+ * | ~~~js
+ * | alert(1)
+ * > | ~~~
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceCloseAfter(code) {
+ if (code === null || markdownLineEnding(code)) {
+ effects.exit('codeFencedFence')
+ return ok(code)
+ }
+ return nok(code)
+ }
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeNonLazyContinuation(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function start(code) {
+ if (code === null) {
+ return nok(code)
+ }
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return lineStart
+ }
+
+ /**
+ *
+ *
+ * @type {State}
+ */
+ function lineStart(code) {
+ return self.parser.lazy[self.now().line] ? nok(code) : ok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/character-entities/index.js
+/**
+ * Map of named character references.
+ *
+ * @type {Record}
+ */
+const characterEntities = {
+ AElig: 'Æ',
+ AMP: '&',
+ Aacute: 'Á',
+ Abreve: 'Ă',
+ Acirc: 'Â',
+ Acy: 'А',
+ Afr: '𝔄',
+ Agrave: 'À',
+ Alpha: 'Α',
+ Amacr: 'Ā',
+ And: '⩓',
+ Aogon: 'Ą',
+ Aopf: '𝔸',
+ ApplyFunction: '',
+ Aring: 'Å',
+ Ascr: '𝒜',
+ Assign: '≔',
+ Atilde: 'Ã',
+ Auml: 'Ä',
+ Backslash: '∖',
+ Barv: '⫧',
+ Barwed: '⌆',
+ Bcy: 'Б',
+ Because: '∵',
+ Bernoullis: 'ℬ',
+ Beta: 'Β',
+ Bfr: '𝔅',
+ Bopf: '𝔹',
+ Breve: '˘',
+ Bscr: 'ℬ',
+ Bumpeq: '≎',
+ CHcy: 'Ч',
+ COPY: '©',
+ Cacute: 'Ć',
+ Cap: '⋒',
+ CapitalDifferentialD: 'ⅅ',
+ Cayleys: 'ℭ',
+ Ccaron: 'Č',
+ Ccedil: 'Ç',
+ Ccirc: 'Ĉ',
+ Cconint: '∰',
+ Cdot: 'Ċ',
+ Cedilla: '¸',
+ CenterDot: '·',
+ Cfr: 'ℭ',
+ Chi: 'Χ',
+ CircleDot: '⊙',
+ CircleMinus: '⊖',
+ CirclePlus: '⊕',
+ CircleTimes: '⊗',
+ ClockwiseContourIntegral: '∲',
+ CloseCurlyDoubleQuote: '”',
+ CloseCurlyQuote: '’',
+ Colon: '∷',
+ Colone: '⩴',
+ Congruent: '≡',
+ Conint: '∯',
+ ContourIntegral: '∮',
+ Copf: 'ℂ',
+ Coproduct: '∐',
+ CounterClockwiseContourIntegral: '∳',
+ Cross: '⨯',
+ Cscr: '𝒞',
+ Cup: '⋓',
+ CupCap: '≍',
+ DD: 'ⅅ',
+ DDotrahd: '⤑',
+ DJcy: 'Ђ',
+ DScy: 'Ѕ',
+ DZcy: 'Џ',
+ Dagger: '‡',
+ Darr: '↡',
+ Dashv: '⫤',
+ Dcaron: 'Ď',
+ Dcy: 'Д',
+ Del: '∇',
+ Delta: 'Δ',
+ Dfr: '𝔇',
+ DiacriticalAcute: '´',
+ DiacriticalDot: '˙',
+ DiacriticalDoubleAcute: '˝',
+ DiacriticalGrave: '`',
+ DiacriticalTilde: '˜',
+ Diamond: '⋄',
+ DifferentialD: 'ⅆ',
+ Dopf: '𝔻',
+ Dot: '¨',
+ DotDot: '⃜',
+ DotEqual: '≐',
+ DoubleContourIntegral: '∯',
+ DoubleDot: '¨',
+ DoubleDownArrow: '⇓',
+ DoubleLeftArrow: '⇐',
+ DoubleLeftRightArrow: '⇔',
+ DoubleLeftTee: '⫤',
+ DoubleLongLeftArrow: '⟸',
+ DoubleLongLeftRightArrow: '⟺',
+ DoubleLongRightArrow: '⟹',
+ DoubleRightArrow: '⇒',
+ DoubleRightTee: '⊨',
+ DoubleUpArrow: '⇑',
+ DoubleUpDownArrow: '⇕',
+ DoubleVerticalBar: '∥',
+ DownArrow: '↓',
+ DownArrowBar: '⤓',
+ DownArrowUpArrow: '⇵',
+ DownBreve: '̑',
+ DownLeftRightVector: '⥐',
+ DownLeftTeeVector: '⥞',
+ DownLeftVector: '↽',
+ DownLeftVectorBar: '⥖',
+ DownRightTeeVector: '⥟',
+ DownRightVector: '⇁',
+ DownRightVectorBar: '⥗',
+ DownTee: '⊤',
+ DownTeeArrow: '↧',
+ Downarrow: '⇓',
+ Dscr: '𝒟',
+ Dstrok: 'Đ',
+ ENG: 'Ŋ',
+ ETH: 'Ð',
+ Eacute: 'É',
+ Ecaron: 'Ě',
+ Ecirc: 'Ê',
+ Ecy: 'Э',
+ Edot: 'Ė',
+ Efr: '𝔈',
+ Egrave: 'È',
+ Element: '∈',
+ Emacr: 'Ē',
+ EmptySmallSquare: '◻',
+ EmptyVerySmallSquare: '▫',
+ Eogon: 'Ę',
+ Eopf: '𝔼',
+ Epsilon: 'Ε',
+ Equal: '⩵',
+ EqualTilde: '≂',
+ Equilibrium: '⇌',
+ Escr: 'ℰ',
+ Esim: '⩳',
+ Eta: 'Η',
+ Euml: 'Ë',
+ Exists: '∃',
+ ExponentialE: 'ⅇ',
+ Fcy: 'Ф',
+ Ffr: '𝔉',
+ FilledSmallSquare: '◼',
+ FilledVerySmallSquare: '▪',
+ Fopf: '𝔽',
+ ForAll: '∀',
+ Fouriertrf: 'ℱ',
+ Fscr: 'ℱ',
+ GJcy: 'Ѓ',
+ GT: '>',
+ Gamma: 'Γ',
+ Gammad: 'Ϝ',
+ Gbreve: 'Ğ',
+ Gcedil: 'Ģ',
+ Gcirc: 'Ĝ',
+ Gcy: 'Г',
+ Gdot: 'Ġ',
+ Gfr: '𝔊',
+ Gg: '⋙',
+ Gopf: '𝔾',
+ GreaterEqual: '≥',
+ GreaterEqualLess: '⋛',
+ GreaterFullEqual: '≧',
+ GreaterGreater: '⪢',
+ GreaterLess: '≷',
+ GreaterSlantEqual: '⩾',
+ GreaterTilde: '≳',
+ Gscr: '𝒢',
+ Gt: '≫',
+ HARDcy: 'Ъ',
+ Hacek: 'ˇ',
+ Hat: '^',
+ Hcirc: 'Ĥ',
+ Hfr: 'ℌ',
+ HilbertSpace: 'ℋ',
+ Hopf: 'ℍ',
+ HorizontalLine: '─',
+ Hscr: 'ℋ',
+ Hstrok: 'Ħ',
+ HumpDownHump: '≎',
+ HumpEqual: '≏',
+ IEcy: 'Е',
+ IJlig: 'IJ',
+ IOcy: 'Ё',
+ Iacute: 'Í',
+ Icirc: 'Î',
+ Icy: 'И',
+ Idot: 'İ',
+ Ifr: 'ℑ',
+ Igrave: 'Ì',
+ Im: 'ℑ',
+ Imacr: 'Ī',
+ ImaginaryI: 'ⅈ',
+ Implies: '⇒',
+ Int: '∬',
+ Integral: '∫',
+ Intersection: '⋂',
+ InvisibleComma: '',
+ InvisibleTimes: '',
+ Iogon: 'Į',
+ Iopf: '𝕀',
+ Iota: 'Ι',
+ Iscr: 'ℐ',
+ Itilde: 'Ĩ',
+ Iukcy: 'І',
+ Iuml: 'Ï',
+ Jcirc: 'Ĵ',
+ Jcy: 'Й',
+ Jfr: '𝔍',
+ Jopf: '𝕁',
+ Jscr: '𝒥',
+ Jsercy: 'Ј',
+ Jukcy: 'Є',
+ KHcy: 'Х',
+ KJcy: 'Ќ',
+ Kappa: 'Κ',
+ Kcedil: 'Ķ',
+ Kcy: 'К',
+ Kfr: '𝔎',
+ Kopf: '𝕂',
+ Kscr: '𝒦',
+ LJcy: 'Љ',
+ LT: '<',
+ Lacute: 'Ĺ',
+ Lambda: 'Λ',
+ Lang: '⟪',
+ Laplacetrf: 'ℒ',
+ Larr: '↞',
+ Lcaron: 'Ľ',
+ Lcedil: 'Ļ',
+ Lcy: 'Л',
+ LeftAngleBracket: '⟨',
+ LeftArrow: '←',
+ LeftArrowBar: '⇤',
+ LeftArrowRightArrow: '⇆',
+ LeftCeiling: '⌈',
+ LeftDoubleBracket: '⟦',
+ LeftDownTeeVector: '⥡',
+ LeftDownVector: '⇃',
+ LeftDownVectorBar: '⥙',
+ LeftFloor: '⌊',
+ LeftRightArrow: '↔',
+ LeftRightVector: '⥎',
+ LeftTee: '⊣',
+ LeftTeeArrow: '↤',
+ LeftTeeVector: '⥚',
+ LeftTriangle: '⊲',
+ LeftTriangleBar: '⧏',
+ LeftTriangleEqual: '⊴',
+ LeftUpDownVector: '⥑',
+ LeftUpTeeVector: '⥠',
+ LeftUpVector: '↿',
+ LeftUpVectorBar: '⥘',
+ LeftVector: '↼',
+ LeftVectorBar: '⥒',
+ Leftarrow: '⇐',
+ Leftrightarrow: '⇔',
+ LessEqualGreater: '⋚',
+ LessFullEqual: '≦',
+ LessGreater: '≶',
+ LessLess: '⪡',
+ LessSlantEqual: '⩽',
+ LessTilde: '≲',
+ Lfr: '𝔏',
+ Ll: '⋘',
+ Lleftarrow: '⇚',
+ Lmidot: 'Ŀ',
+ LongLeftArrow: '⟵',
+ LongLeftRightArrow: '⟷',
+ LongRightArrow: '⟶',
+ Longleftarrow: '⟸',
+ Longleftrightarrow: '⟺',
+ Longrightarrow: '⟹',
+ Lopf: '𝕃',
+ LowerLeftArrow: '↙',
+ LowerRightArrow: '↘',
+ Lscr: 'ℒ',
+ Lsh: '↰',
+ Lstrok: 'Ł',
+ Lt: '≪',
+ Map: '⤅',
+ Mcy: 'М',
+ MediumSpace: ' ',
+ Mellintrf: 'ℳ',
+ Mfr: '𝔐',
+ MinusPlus: '∓',
+ Mopf: '𝕄',
+ Mscr: 'ℳ',
+ Mu: 'Μ',
+ NJcy: 'Њ',
+ Nacute: 'Ń',
+ Ncaron: 'Ň',
+ Ncedil: 'Ņ',
+ Ncy: 'Н',
+ NegativeMediumSpace: '',
+ NegativeThickSpace: '',
+ NegativeThinSpace: '',
+ NegativeVeryThinSpace: '',
+ NestedGreaterGreater: '≫',
+ NestedLessLess: '≪',
+ NewLine: '\n',
+ Nfr: '𝔑',
+ NoBreak: '',
+ NonBreakingSpace: ' ',
+ Nopf: 'ℕ',
+ Not: '⫬',
+ NotCongruent: '≢',
+ NotCupCap: '≭',
+ NotDoubleVerticalBar: '∦',
+ NotElement: '∉',
+ NotEqual: '≠',
+ NotEqualTilde: '≂̸',
+ NotExists: '∄',
+ NotGreater: '≯',
+ NotGreaterEqual: '≱',
+ NotGreaterFullEqual: '≧̸',
+ NotGreaterGreater: '≫̸',
+ NotGreaterLess: '≹',
+ NotGreaterSlantEqual: '⩾̸',
+ NotGreaterTilde: '≵',
+ NotHumpDownHump: '≎̸',
+ NotHumpEqual: '≏̸',
+ NotLeftTriangle: '⋪',
+ NotLeftTriangleBar: '⧏̸',
+ NotLeftTriangleEqual: '⋬',
+ NotLess: '≮',
+ NotLessEqual: '≰',
+ NotLessGreater: '≸',
+ NotLessLess: '≪̸',
+ NotLessSlantEqual: '⩽̸',
+ NotLessTilde: '≴',
+ NotNestedGreaterGreater: '⪢̸',
+ NotNestedLessLess: '⪡̸',
+ NotPrecedes: '⊀',
+ NotPrecedesEqual: '⪯̸',
+ NotPrecedesSlantEqual: '⋠',
+ NotReverseElement: '∌',
+ NotRightTriangle: '⋫',
+ NotRightTriangleBar: '⧐̸',
+ NotRightTriangleEqual: '⋭',
+ NotSquareSubset: '⊏̸',
+ NotSquareSubsetEqual: '⋢',
+ NotSquareSuperset: '⊐̸',
+ NotSquareSupersetEqual: '⋣',
+ NotSubset: '⊂⃒',
+ NotSubsetEqual: '⊈',
+ NotSucceeds: '⊁',
+ NotSucceedsEqual: '⪰̸',
+ NotSucceedsSlantEqual: '⋡',
+ NotSucceedsTilde: '≿̸',
+ NotSuperset: '⊃⃒',
+ NotSupersetEqual: '⊉',
+ NotTilde: '≁',
+ NotTildeEqual: '≄',
+ NotTildeFullEqual: '≇',
+ NotTildeTilde: '≉',
+ NotVerticalBar: '∤',
+ Nscr: '𝒩',
+ Ntilde: 'Ñ',
+ Nu: 'Ν',
+ OElig: 'Œ',
+ Oacute: 'Ó',
+ Ocirc: 'Ô',
+ Ocy: 'О',
+ Odblac: 'Ő',
+ Ofr: '𝔒',
+ Ograve: 'Ò',
+ Omacr: 'Ō',
+ Omega: 'Ω',
+ Omicron: 'Ο',
+ Oopf: '𝕆',
+ OpenCurlyDoubleQuote: '“',
+ OpenCurlyQuote: '‘',
+ Or: '⩔',
+ Oscr: '𝒪',
+ Oslash: 'Ø',
+ Otilde: 'Õ',
+ Otimes: '⨷',
+ Ouml: 'Ö',
+ OverBar: '‾',
+ OverBrace: '⏞',
+ OverBracket: '⎴',
+ OverParenthesis: '⏜',
+ PartialD: '∂',
+ Pcy: 'П',
+ Pfr: '𝔓',
+ Phi: 'Φ',
+ Pi: 'Π',
+ PlusMinus: '±',
+ Poincareplane: 'ℌ',
+ Popf: 'ℙ',
+ Pr: '⪻',
+ Precedes: '≺',
+ PrecedesEqual: '⪯',
+ PrecedesSlantEqual: '≼',
+ PrecedesTilde: '≾',
+ Prime: '″',
+ Product: '∏',
+ Proportion: '∷',
+ Proportional: '∝',
+ Pscr: '𝒫',
+ Psi: 'Ψ',
+ QUOT: '"',
+ Qfr: '𝔔',
+ Qopf: 'ℚ',
+ Qscr: '𝒬',
+ RBarr: '⤐',
+ REG: '®',
+ Racute: 'Ŕ',
+ Rang: '⟫',
+ Rarr: '↠',
+ Rarrtl: '⤖',
+ Rcaron: 'Ř',
+ Rcedil: 'Ŗ',
+ Rcy: 'Р',
+ Re: 'ℜ',
+ ReverseElement: '∋',
+ ReverseEquilibrium: '⇋',
+ ReverseUpEquilibrium: '⥯',
+ Rfr: 'ℜ',
+ Rho: 'Ρ',
+ RightAngleBracket: '⟩',
+ RightArrow: '→',
+ RightArrowBar: '⇥',
+ RightArrowLeftArrow: '⇄',
+ RightCeiling: '⌉',
+ RightDoubleBracket: '⟧',
+ RightDownTeeVector: '⥝',
+ RightDownVector: '⇂',
+ RightDownVectorBar: '⥕',
+ RightFloor: '⌋',
+ RightTee: '⊢',
+ RightTeeArrow: '↦',
+ RightTeeVector: '⥛',
+ RightTriangle: '⊳',
+ RightTriangleBar: '⧐',
+ RightTriangleEqual: '⊵',
+ RightUpDownVector: '⥏',
+ RightUpTeeVector: '⥜',
+ RightUpVector: '↾',
+ RightUpVectorBar: '⥔',
+ RightVector: '⇀',
+ RightVectorBar: '⥓',
+ Rightarrow: '⇒',
+ Ropf: 'ℝ',
+ RoundImplies: '⥰',
+ Rrightarrow: '⇛',
+ Rscr: 'ℛ',
+ Rsh: '↱',
+ RuleDelayed: '⧴',
+ SHCHcy: 'Щ',
+ SHcy: 'Ш',
+ SOFTcy: 'Ь',
+ Sacute: 'Ś',
+ Sc: '⪼',
+ Scaron: 'Š',
+ Scedil: 'Ş',
+ Scirc: 'Ŝ',
+ Scy: 'С',
+ Sfr: '𝔖',
+ ShortDownArrow: '↓',
+ ShortLeftArrow: '←',
+ ShortRightArrow: '→',
+ ShortUpArrow: '↑',
+ Sigma: 'Σ',
+ SmallCircle: '∘',
+ Sopf: '𝕊',
+ Sqrt: '√',
+ Square: '□',
+ SquareIntersection: '⊓',
+ SquareSubset: '⊏',
+ SquareSubsetEqual: '⊑',
+ SquareSuperset: '⊐',
+ SquareSupersetEqual: '⊒',
+ SquareUnion: '⊔',
+ Sscr: '𝒮',
+ Star: '⋆',
+ Sub: '⋐',
+ Subset: '⋐',
+ SubsetEqual: '⊆',
+ Succeeds: '≻',
+ SucceedsEqual: '⪰',
+ SucceedsSlantEqual: '≽',
+ SucceedsTilde: '≿',
+ SuchThat: '∋',
+ Sum: '∑',
+ Sup: '⋑',
+ Superset: '⊃',
+ SupersetEqual: '⊇',
+ Supset: '⋑',
+ THORN: 'Þ',
+ TRADE: '™',
+ TSHcy: 'Ћ',
+ TScy: 'Ц',
+ Tab: '\t',
+ Tau: 'Τ',
+ Tcaron: 'Ť',
+ Tcedil: 'Ţ',
+ Tcy: 'Т',
+ Tfr: '𝔗',
+ Therefore: '∴',
+ Theta: 'Θ',
+ ThickSpace: ' ',
+ ThinSpace: ' ',
+ Tilde: '∼',
+ TildeEqual: '≃',
+ TildeFullEqual: '≅',
+ TildeTilde: '≈',
+ Topf: '𝕋',
+ TripleDot: '⃛',
+ Tscr: '𝒯',
+ Tstrok: 'Ŧ',
+ Uacute: 'Ú',
+ Uarr: '↟',
+ Uarrocir: '⥉',
+ Ubrcy: 'Ў',
+ Ubreve: 'Ŭ',
+ Ucirc: 'Û',
+ Ucy: 'У',
+ Udblac: 'Ű',
+ Ufr: '𝔘',
+ Ugrave: 'Ù',
+ Umacr: 'Ū',
+ UnderBar: '_',
+ UnderBrace: '⏟',
+ UnderBracket: '⎵',
+ UnderParenthesis: '⏝',
+ Union: '⋃',
+ UnionPlus: '⊎',
+ Uogon: 'Ų',
+ Uopf: '𝕌',
+ UpArrow: '↑',
+ UpArrowBar: '⤒',
+ UpArrowDownArrow: '⇅',
+ UpDownArrow: '↕',
+ UpEquilibrium: '⥮',
+ UpTee: '⊥',
+ UpTeeArrow: '↥',
+ Uparrow: '⇑',
+ Updownarrow: '⇕',
+ UpperLeftArrow: '↖',
+ UpperRightArrow: '↗',
+ Upsi: 'ϒ',
+ Upsilon: 'Υ',
+ Uring: 'Ů',
+ Uscr: '𝒰',
+ Utilde: 'Ũ',
+ Uuml: 'Ü',
+ VDash: '⊫',
+ Vbar: '⫫',
+ Vcy: 'В',
+ Vdash: '⊩',
+ Vdashl: '⫦',
+ Vee: '⋁',
+ Verbar: '‖',
+ Vert: '‖',
+ VerticalBar: '∣',
+ VerticalLine: '|',
+ VerticalSeparator: '❘',
+ VerticalTilde: '≀',
+ VeryThinSpace: ' ',
+ Vfr: '𝔙',
+ Vopf: '𝕍',
+ Vscr: '𝒱',
+ Vvdash: '⊪',
+ Wcirc: 'Ŵ',
+ Wedge: '⋀',
+ Wfr: '𝔚',
+ Wopf: '𝕎',
+ Wscr: '𝒲',
+ Xfr: '𝔛',
+ Xi: 'Ξ',
+ Xopf: '𝕏',
+ Xscr: '𝒳',
+ YAcy: 'Я',
+ YIcy: 'Ї',
+ YUcy: 'Ю',
+ Yacute: 'Ý',
+ Ycirc: 'Ŷ',
+ Ycy: 'Ы',
+ Yfr: '𝔜',
+ Yopf: '𝕐',
+ Yscr: '𝒴',
+ Yuml: 'Ÿ',
+ ZHcy: 'Ж',
+ Zacute: 'Ź',
+ Zcaron: 'Ž',
+ Zcy: 'З',
+ Zdot: 'Ż',
+ ZeroWidthSpace: '',
+ Zeta: 'Ζ',
+ Zfr: 'ℨ',
+ Zopf: 'ℤ',
+ Zscr: '𝒵',
+ aacute: 'á',
+ abreve: 'ă',
+ ac: '∾',
+ acE: '∾̳',
+ acd: '∿',
+ acirc: 'â',
+ acute: '´',
+ acy: 'а',
+ aelig: 'æ',
+ af: '',
+ afr: '𝔞',
+ agrave: 'à',
+ alefsym: 'ℵ',
+ aleph: 'ℵ',
+ alpha: 'α',
+ amacr: 'ā',
+ amalg: '⨿',
+ amp: '&',
+ and: '∧',
+ andand: '⩕',
+ andd: '⩜',
+ andslope: '⩘',
+ andv: '⩚',
+ ang: '∠',
+ ange: '⦤',
+ angle: '∠',
+ angmsd: '∡',
+ angmsdaa: '⦨',
+ angmsdab: '⦩',
+ angmsdac: '⦪',
+ angmsdad: '⦫',
+ angmsdae: '⦬',
+ angmsdaf: '⦭',
+ angmsdag: '⦮',
+ angmsdah: '⦯',
+ angrt: '∟',
+ angrtvb: '⊾',
+ angrtvbd: '⦝',
+ angsph: '∢',
+ angst: 'Å',
+ angzarr: '⍼',
+ aogon: 'ą',
+ aopf: '𝕒',
+ ap: '≈',
+ apE: '⩰',
+ apacir: '⩯',
+ ape: '≊',
+ apid: '≋',
+ apos: "'",
+ approx: '≈',
+ approxeq: '≊',
+ aring: 'å',
+ ascr: '𝒶',
+ ast: '*',
+ asymp: '≈',
+ asympeq: '≍',
+ atilde: 'ã',
+ auml: 'ä',
+ awconint: '∳',
+ awint: '⨑',
+ bNot: '⫭',
+ backcong: '≌',
+ backepsilon: '϶',
+ backprime: '‵',
+ backsim: '∽',
+ backsimeq: '⋍',
+ barvee: '⊽',
+ barwed: '⌅',
+ barwedge: '⌅',
+ bbrk: '⎵',
+ bbrktbrk: '⎶',
+ bcong: '≌',
+ bcy: 'б',
+ bdquo: '„',
+ becaus: '∵',
+ because: '∵',
+ bemptyv: '⦰',
+ bepsi: '϶',
+ bernou: 'ℬ',
+ beta: 'β',
+ beth: 'ℶ',
+ between: '≬',
+ bfr: '𝔟',
+ bigcap: '⋂',
+ bigcirc: '◯',
+ bigcup: '⋃',
+ bigodot: '⨀',
+ bigoplus: '⨁',
+ bigotimes: '⨂',
+ bigsqcup: '⨆',
+ bigstar: '★',
+ bigtriangledown: '▽',
+ bigtriangleup: '△',
+ biguplus: '⨄',
+ bigvee: '⋁',
+ bigwedge: '⋀',
+ bkarow: '⤍',
+ blacklozenge: '⧫',
+ blacksquare: '▪',
+ blacktriangle: '▴',
+ blacktriangledown: '▾',
+ blacktriangleleft: '◂',
+ blacktriangleright: '▸',
+ blank: '␣',
+ blk12: '▒',
+ blk14: '░',
+ blk34: '▓',
+ block: '█',
+ bne: '=⃥',
+ bnequiv: '≡⃥',
+ bnot: '⌐',
+ bopf: '𝕓',
+ bot: '⊥',
+ bottom: '⊥',
+ bowtie: '⋈',
+ boxDL: '╗',
+ boxDR: '╔',
+ boxDl: '╖',
+ boxDr: '╓',
+ boxH: '═',
+ boxHD: '╦',
+ boxHU: '╩',
+ boxHd: '╤',
+ boxHu: '╧',
+ boxUL: '╝',
+ boxUR: '╚',
+ boxUl: '╜',
+ boxUr: '╙',
+ boxV: '║',
+ boxVH: '╬',
+ boxVL: '╣',
+ boxVR: '╠',
+ boxVh: '╫',
+ boxVl: '╢',
+ boxVr: '╟',
+ boxbox: '⧉',
+ boxdL: '╕',
+ boxdR: '╒',
+ boxdl: '┐',
+ boxdr: '┌',
+ boxh: '─',
+ boxhD: '╥',
+ boxhU: '╨',
+ boxhd: '┬',
+ boxhu: '┴',
+ boxminus: '⊟',
+ boxplus: '⊞',
+ boxtimes: '⊠',
+ boxuL: '╛',
+ boxuR: '╘',
+ boxul: '┘',
+ boxur: '└',
+ boxv: '│',
+ boxvH: '╪',
+ boxvL: '╡',
+ boxvR: '╞',
+ boxvh: '┼',
+ boxvl: '┤',
+ boxvr: '├',
+ bprime: '‵',
+ breve: '˘',
+ brvbar: '¦',
+ bscr: '𝒷',
+ bsemi: '⁏',
+ bsim: '∽',
+ bsime: '⋍',
+ bsol: '\\',
+ bsolb: '⧅',
+ bsolhsub: '⟈',
+ bull: '•',
+ bullet: '•',
+ bump: '≎',
+ bumpE: '⪮',
+ bumpe: '≏',
+ bumpeq: '≏',
+ cacute: 'ć',
+ cap: '∩',
+ capand: '⩄',
+ capbrcup: '⩉',
+ capcap: '⩋',
+ capcup: '⩇',
+ capdot: '⩀',
+ caps: '∩︀',
+ caret: '⁁',
+ caron: 'ˇ',
+ ccaps: '⩍',
+ ccaron: 'č',
+ ccedil: 'ç',
+ ccirc: 'ĉ',
+ ccups: '⩌',
+ ccupssm: '⩐',
+ cdot: 'ċ',
+ cedil: '¸',
+ cemptyv: '⦲',
+ cent: '¢',
+ centerdot: '·',
+ cfr: '𝔠',
+ chcy: 'ч',
+ check: '✓',
+ checkmark: '✓',
+ chi: 'χ',
+ cir: '○',
+ cirE: '⧃',
+ circ: 'ˆ',
+ circeq: '≗',
+ circlearrowleft: '↺',
+ circlearrowright: '↻',
+ circledR: '®',
+ circledS: 'Ⓢ',
+ circledast: '⊛',
+ circledcirc: '⊚',
+ circleddash: '⊝',
+ cire: '≗',
+ cirfnint: '⨐',
+ cirmid: '⫯',
+ cirscir: '⧂',
+ clubs: '♣',
+ clubsuit: '♣',
+ colon: ':',
+ colone: '≔',
+ coloneq: '≔',
+ comma: ',',
+ commat: '@',
+ comp: '∁',
+ compfn: '∘',
+ complement: '∁',
+ complexes: 'ℂ',
+ cong: '≅',
+ congdot: '⩭',
+ conint: '∮',
+ copf: '𝕔',
+ coprod: '∐',
+ copy: '©',
+ copysr: '℗',
+ crarr: '↵',
+ cross: '✗',
+ cscr: '𝒸',
+ csub: '⫏',
+ csube: '⫑',
+ csup: '⫐',
+ csupe: '⫒',
+ ctdot: '⋯',
+ cudarrl: '⤸',
+ cudarrr: '⤵',
+ cuepr: '⋞',
+ cuesc: '⋟',
+ cularr: '↶',
+ cularrp: '⤽',
+ cup: '∪',
+ cupbrcap: '⩈',
+ cupcap: '⩆',
+ cupcup: '⩊',
+ cupdot: '⊍',
+ cupor: '⩅',
+ cups: '∪︀',
+ curarr: '↷',
+ curarrm: '⤼',
+ curlyeqprec: '⋞',
+ curlyeqsucc: '⋟',
+ curlyvee: '⋎',
+ curlywedge: '⋏',
+ curren: '¤',
+ curvearrowleft: '↶',
+ curvearrowright: '↷',
+ cuvee: '⋎',
+ cuwed: '⋏',
+ cwconint: '∲',
+ cwint: '∱',
+ cylcty: '⌭',
+ dArr: '⇓',
+ dHar: '⥥',
+ dagger: '†',
+ daleth: 'ℸ',
+ darr: '↓',
+ dash: '‐',
+ dashv: '⊣',
+ dbkarow: '⤏',
+ dblac: '˝',
+ dcaron: 'ď',
+ dcy: 'д',
+ dd: 'ⅆ',
+ ddagger: '‡',
+ ddarr: '⇊',
+ ddotseq: '⩷',
+ deg: '°',
+ delta: 'δ',
+ demptyv: '⦱',
+ dfisht: '⥿',
+ dfr: '𝔡',
+ dharl: '⇃',
+ dharr: '⇂',
+ diam: '⋄',
+ diamond: '⋄',
+ diamondsuit: '♦',
+ diams: '♦',
+ die: '¨',
+ digamma: 'ϝ',
+ disin: '⋲',
+ div: '÷',
+ divide: '÷',
+ divideontimes: '⋇',
+ divonx: '⋇',
+ djcy: 'ђ',
+ dlcorn: '⌞',
+ dlcrop: '⌍',
+ dollar: '$',
+ dopf: '𝕕',
+ dot: '˙',
+ doteq: '≐',
+ doteqdot: '≑',
+ dotminus: '∸',
+ dotplus: '∔',
+ dotsquare: '⊡',
+ doublebarwedge: '⌆',
+ downarrow: '↓',
+ downdownarrows: '⇊',
+ downharpoonleft: '⇃',
+ downharpoonright: '⇂',
+ drbkarow: '⤐',
+ drcorn: '⌟',
+ drcrop: '⌌',
+ dscr: '𝒹',
+ dscy: 'ѕ',
+ dsol: '⧶',
+ dstrok: 'đ',
+ dtdot: '⋱',
+ dtri: '▿',
+ dtrif: '▾',
+ duarr: '⇵',
+ duhar: '⥯',
+ dwangle: '⦦',
+ dzcy: 'џ',
+ dzigrarr: '⟿',
+ eDDot: '⩷',
+ eDot: '≑',
+ eacute: 'é',
+ easter: '⩮',
+ ecaron: 'ě',
+ ecir: '≖',
+ ecirc: 'ê',
+ ecolon: '≕',
+ ecy: 'э',
+ edot: 'ė',
+ ee: 'ⅇ',
+ efDot: '≒',
+ efr: '𝔢',
+ eg: '⪚',
+ egrave: 'è',
+ egs: '⪖',
+ egsdot: '⪘',
+ el: '⪙',
+ elinters: '⏧',
+ ell: 'ℓ',
+ els: '⪕',
+ elsdot: '⪗',
+ emacr: 'ē',
+ empty: '∅',
+ emptyset: '∅',
+ emptyv: '∅',
+ emsp13: ' ',
+ emsp14: ' ',
+ emsp: ' ',
+ eng: 'ŋ',
+ ensp: ' ',
+ eogon: 'ę',
+ eopf: '𝕖',
+ epar: '⋕',
+ eparsl: '⧣',
+ eplus: '⩱',
+ epsi: 'ε',
+ epsilon: 'ε',
+ epsiv: 'ϵ',
+ eqcirc: '≖',
+ eqcolon: '≕',
+ eqsim: '≂',
+ eqslantgtr: '⪖',
+ eqslantless: '⪕',
+ equals: '=',
+ equest: '≟',
+ equiv: '≡',
+ equivDD: '⩸',
+ eqvparsl: '⧥',
+ erDot: '≓',
+ erarr: '⥱',
+ escr: 'ℯ',
+ esdot: '≐',
+ esim: '≂',
+ eta: 'η',
+ eth: 'ð',
+ euml: 'ë',
+ euro: '€',
+ excl: '!',
+ exist: '∃',
+ expectation: 'ℰ',
+ exponentiale: 'ⅇ',
+ fallingdotseq: '≒',
+ fcy: 'ф',
+ female: '♀',
+ ffilig: 'ffi',
+ fflig: 'ff',
+ ffllig: 'ffl',
+ ffr: '𝔣',
+ filig: 'fi',
+ fjlig: 'fj',
+ flat: '♭',
+ fllig: 'fl',
+ fltns: '▱',
+ fnof: 'ƒ',
+ fopf: '𝕗',
+ forall: '∀',
+ fork: '⋔',
+ forkv: '⫙',
+ fpartint: '⨍',
+ frac12: '½',
+ frac13: '⅓',
+ frac14: '¼',
+ frac15: '⅕',
+ frac16: '⅙',
+ frac18: '⅛',
+ frac23: '⅔',
+ frac25: '⅖',
+ frac34: '¾',
+ frac35: '⅗',
+ frac38: '⅜',
+ frac45: '⅘',
+ frac56: '⅚',
+ frac58: '⅝',
+ frac78: '⅞',
+ frasl: '⁄',
+ frown: '⌢',
+ fscr: '𝒻',
+ gE: '≧',
+ gEl: '⪌',
+ gacute: 'ǵ',
+ gamma: 'γ',
+ gammad: 'ϝ',
+ gap: '⪆',
+ gbreve: 'ğ',
+ gcirc: 'ĝ',
+ gcy: 'г',
+ gdot: 'ġ',
+ ge: '≥',
+ gel: '⋛',
+ geq: '≥',
+ geqq: '≧',
+ geqslant: '⩾',
+ ges: '⩾',
+ gescc: '⪩',
+ gesdot: '⪀',
+ gesdoto: '⪂',
+ gesdotol: '⪄',
+ gesl: '⋛︀',
+ gesles: '⪔',
+ gfr: '𝔤',
+ gg: '≫',
+ ggg: '⋙',
+ gimel: 'ℷ',
+ gjcy: 'ѓ',
+ gl: '≷',
+ glE: '⪒',
+ gla: '⪥',
+ glj: '⪤',
+ gnE: '≩',
+ gnap: '⪊',
+ gnapprox: '⪊',
+ gne: '⪈',
+ gneq: '⪈',
+ gneqq: '≩',
+ gnsim: '⋧',
+ gopf: '𝕘',
+ grave: '`',
+ gscr: 'ℊ',
+ gsim: '≳',
+ gsime: '⪎',
+ gsiml: '⪐',
+ gt: '>',
+ gtcc: '⪧',
+ gtcir: '⩺',
+ gtdot: '⋗',
+ gtlPar: '⦕',
+ gtquest: '⩼',
+ gtrapprox: '⪆',
+ gtrarr: '⥸',
+ gtrdot: '⋗',
+ gtreqless: '⋛',
+ gtreqqless: '⪌',
+ gtrless: '≷',
+ gtrsim: '≳',
+ gvertneqq: '≩︀',
+ gvnE: '≩︀',
+ hArr: '⇔',
+ hairsp: ' ',
+ half: '½',
+ hamilt: 'ℋ',
+ hardcy: 'ъ',
+ harr: '↔',
+ harrcir: '⥈',
+ harrw: '↭',
+ hbar: 'ℏ',
+ hcirc: 'ĥ',
+ hearts: '♥',
+ heartsuit: '♥',
+ hellip: '…',
+ hercon: '⊹',
+ hfr: '𝔥',
+ hksearow: '⤥',
+ hkswarow: '⤦',
+ hoarr: '⇿',
+ homtht: '∻',
+ hookleftarrow: '↩',
+ hookrightarrow: '↪',
+ hopf: '𝕙',
+ horbar: '―',
+ hscr: '𝒽',
+ hslash: 'ℏ',
+ hstrok: 'ħ',
+ hybull: '⁃',
+ hyphen: '‐',
+ iacute: 'í',
+ ic: '',
+ icirc: 'î',
+ icy: 'и',
+ iecy: 'е',
+ iexcl: '¡',
+ iff: '⇔',
+ ifr: '𝔦',
+ igrave: 'ì',
+ ii: 'ⅈ',
+ iiiint: '⨌',
+ iiint: '∭',
+ iinfin: '⧜',
+ iiota: '℩',
+ ijlig: 'ij',
+ imacr: 'ī',
+ image: 'ℑ',
+ imagline: 'ℐ',
+ imagpart: 'ℑ',
+ imath: 'ı',
+ imof: '⊷',
+ imped: 'Ƶ',
+ in: '∈',
+ incare: '℅',
+ infin: '∞',
+ infintie: '⧝',
+ inodot: 'ı',
+ int: '∫',
+ intcal: '⊺',
+ integers: 'ℤ',
+ intercal: '⊺',
+ intlarhk: '⨗',
+ intprod: '⨼',
+ iocy: 'ё',
+ iogon: 'į',
+ iopf: '𝕚',
+ iota: 'ι',
+ iprod: '⨼',
+ iquest: '¿',
+ iscr: '𝒾',
+ isin: '∈',
+ isinE: '⋹',
+ isindot: '⋵',
+ isins: '⋴',
+ isinsv: '⋳',
+ isinv: '∈',
+ it: '',
+ itilde: 'ĩ',
+ iukcy: 'і',
+ iuml: 'ï',
+ jcirc: 'ĵ',
+ jcy: 'й',
+ jfr: '𝔧',
+ jmath: 'ȷ',
+ jopf: '𝕛',
+ jscr: '𝒿',
+ jsercy: 'ј',
+ jukcy: 'є',
+ kappa: 'κ',
+ kappav: 'ϰ',
+ kcedil: 'ķ',
+ kcy: 'к',
+ kfr: '𝔨',
+ kgreen: 'ĸ',
+ khcy: 'х',
+ kjcy: 'ќ',
+ kopf: '𝕜',
+ kscr: '𝓀',
+ lAarr: '⇚',
+ lArr: '⇐',
+ lAtail: '⤛',
+ lBarr: '⤎',
+ lE: '≦',
+ lEg: '⪋',
+ lHar: '⥢',
+ lacute: 'ĺ',
+ laemptyv: '⦴',
+ lagran: 'ℒ',
+ lambda: 'λ',
+ lang: '⟨',
+ langd: '⦑',
+ langle: '⟨',
+ lap: '⪅',
+ laquo: '«',
+ larr: '←',
+ larrb: '⇤',
+ larrbfs: '⤟',
+ larrfs: '⤝',
+ larrhk: '↩',
+ larrlp: '↫',
+ larrpl: '⤹',
+ larrsim: '⥳',
+ larrtl: '↢',
+ lat: '⪫',
+ latail: '⤙',
+ late: '⪭',
+ lates: '⪭︀',
+ lbarr: '⤌',
+ lbbrk: '❲',
+ lbrace: '{',
+ lbrack: '[',
+ lbrke: '⦋',
+ lbrksld: '⦏',
+ lbrkslu: '⦍',
+ lcaron: 'ľ',
+ lcedil: 'ļ',
+ lceil: '⌈',
+ lcub: '{',
+ lcy: 'л',
+ ldca: '⤶',
+ ldquo: '“',
+ ldquor: '„',
+ ldrdhar: '⥧',
+ ldrushar: '⥋',
+ ldsh: '↲',
+ le: '≤',
+ leftarrow: '←',
+ leftarrowtail: '↢',
+ leftharpoondown: '↽',
+ leftharpoonup: '↼',
+ leftleftarrows: '⇇',
+ leftrightarrow: '↔',
+ leftrightarrows: '⇆',
+ leftrightharpoons: '⇋',
+ leftrightsquigarrow: '↭',
+ leftthreetimes: '⋋',
+ leg: '⋚',
+ leq: '≤',
+ leqq: '≦',
+ leqslant: '⩽',
+ les: '⩽',
+ lescc: '⪨',
+ lesdot: '⩿',
+ lesdoto: '⪁',
+ lesdotor: '⪃',
+ lesg: '⋚︀',
+ lesges: '⪓',
+ lessapprox: '⪅',
+ lessdot: '⋖',
+ lesseqgtr: '⋚',
+ lesseqqgtr: '⪋',
+ lessgtr: '≶',
+ lesssim: '≲',
+ lfisht: '⥼',
+ lfloor: '⌊',
+ lfr: '𝔩',
+ lg: '≶',
+ lgE: '⪑',
+ lhard: '↽',
+ lharu: '↼',
+ lharul: '⥪',
+ lhblk: '▄',
+ ljcy: 'љ',
+ ll: '≪',
+ llarr: '⇇',
+ llcorner: '⌞',
+ llhard: '⥫',
+ lltri: '◺',
+ lmidot: 'ŀ',
+ lmoust: '⎰',
+ lmoustache: '⎰',
+ lnE: '≨',
+ lnap: '⪉',
+ lnapprox: '⪉',
+ lne: '⪇',
+ lneq: '⪇',
+ lneqq: '≨',
+ lnsim: '⋦',
+ loang: '⟬',
+ loarr: '⇽',
+ lobrk: '⟦',
+ longleftarrow: '⟵',
+ longleftrightarrow: '⟷',
+ longmapsto: '⟼',
+ longrightarrow: '⟶',
+ looparrowleft: '↫',
+ looparrowright: '↬',
+ lopar: '⦅',
+ lopf: '𝕝',
+ loplus: '⨭',
+ lotimes: '⨴',
+ lowast: '∗',
+ lowbar: '_',
+ loz: '◊',
+ lozenge: '◊',
+ lozf: '⧫',
+ lpar: '(',
+ lparlt: '⦓',
+ lrarr: '⇆',
+ lrcorner: '⌟',
+ lrhar: '⇋',
+ lrhard: '⥭',
+ lrm: '',
+ lrtri: '⊿',
+ lsaquo: '‹',
+ lscr: '𝓁',
+ lsh: '↰',
+ lsim: '≲',
+ lsime: '⪍',
+ lsimg: '⪏',
+ lsqb: '[',
+ lsquo: '‘',
+ lsquor: '‚',
+ lstrok: 'ł',
+ lt: '<',
+ ltcc: '⪦',
+ ltcir: '⩹',
+ ltdot: '⋖',
+ lthree: '⋋',
+ ltimes: '⋉',
+ ltlarr: '⥶',
+ ltquest: '⩻',
+ ltrPar: '⦖',
+ ltri: '◃',
+ ltrie: '⊴',
+ ltrif: '◂',
+ lurdshar: '⥊',
+ luruhar: '⥦',
+ lvertneqq: '≨︀',
+ lvnE: '≨︀',
+ mDDot: '∺',
+ macr: '¯',
+ male: '♂',
+ malt: '✠',
+ maltese: '✠',
+ map: '↦',
+ mapsto: '↦',
+ mapstodown: '↧',
+ mapstoleft: '↤',
+ mapstoup: '↥',
+ marker: '▮',
+ mcomma: '⨩',
+ mcy: 'м',
+ mdash: '—',
+ measuredangle: '∡',
+ mfr: '𝔪',
+ mho: '℧',
+ micro: 'µ',
+ mid: '∣',
+ midast: '*',
+ midcir: '⫰',
+ middot: '·',
+ minus: '−',
+ minusb: '⊟',
+ minusd: '∸',
+ minusdu: '⨪',
+ mlcp: '⫛',
+ mldr: '…',
+ mnplus: '∓',
+ models: '⊧',
+ mopf: '𝕞',
+ mp: '∓',
+ mscr: '𝓂',
+ mstpos: '∾',
+ mu: 'μ',
+ multimap: '⊸',
+ mumap: '⊸',
+ nGg: '⋙̸',
+ nGt: '≫⃒',
+ nGtv: '≫̸',
+ nLeftarrow: '⇍',
+ nLeftrightarrow: '⇎',
+ nLl: '⋘̸',
+ nLt: '≪⃒',
+ nLtv: '≪̸',
+ nRightarrow: '⇏',
+ nVDash: '⊯',
+ nVdash: '⊮',
+ nabla: '∇',
+ nacute: 'ń',
+ nang: '∠⃒',
+ nap: '≉',
+ napE: '⩰̸',
+ napid: '≋̸',
+ napos: 'ʼn',
+ napprox: '≉',
+ natur: '♮',
+ natural: '♮',
+ naturals: 'ℕ',
+ nbsp: ' ',
+ nbump: '≎̸',
+ nbumpe: '≏̸',
+ ncap: '⩃',
+ ncaron: 'ň',
+ ncedil: 'ņ',
+ ncong: '≇',
+ ncongdot: '⩭̸',
+ ncup: '⩂',
+ ncy: 'н',
+ ndash: '–',
+ ne: '≠',
+ neArr: '⇗',
+ nearhk: '⤤',
+ nearr: '↗',
+ nearrow: '↗',
+ nedot: '≐̸',
+ nequiv: '≢',
+ nesear: '⤨',
+ nesim: '≂̸',
+ nexist: '∄',
+ nexists: '∄',
+ nfr: '𝔫',
+ ngE: '≧̸',
+ nge: '≱',
+ ngeq: '≱',
+ ngeqq: '≧̸',
+ ngeqslant: '⩾̸',
+ nges: '⩾̸',
+ ngsim: '≵',
+ ngt: '≯',
+ ngtr: '≯',
+ nhArr: '⇎',
+ nharr: '↮',
+ nhpar: '⫲',
+ ni: '∋',
+ nis: '⋼',
+ nisd: '⋺',
+ niv: '∋',
+ njcy: 'њ',
+ nlArr: '⇍',
+ nlE: '≦̸',
+ nlarr: '↚',
+ nldr: '‥',
+ nle: '≰',
+ nleftarrow: '↚',
+ nleftrightarrow: '↮',
+ nleq: '≰',
+ nleqq: '≦̸',
+ nleqslant: '⩽̸',
+ nles: '⩽̸',
+ nless: '≮',
+ nlsim: '≴',
+ nlt: '≮',
+ nltri: '⋪',
+ nltrie: '⋬',
+ nmid: '∤',
+ nopf: '𝕟',
+ not: '¬',
+ notin: '∉',
+ notinE: '⋹̸',
+ notindot: '⋵̸',
+ notinva: '∉',
+ notinvb: '⋷',
+ notinvc: '⋶',
+ notni: '∌',
+ notniva: '∌',
+ notnivb: '⋾',
+ notnivc: '⋽',
+ npar: '∦',
+ nparallel: '∦',
+ nparsl: '⫽⃥',
+ npart: '∂̸',
+ npolint: '⨔',
+ npr: '⊀',
+ nprcue: '⋠',
+ npre: '⪯̸',
+ nprec: '⊀',
+ npreceq: '⪯̸',
+ nrArr: '⇏',
+ nrarr: '↛',
+ nrarrc: '⤳̸',
+ nrarrw: '↝̸',
+ nrightarrow: '↛',
+ nrtri: '⋫',
+ nrtrie: '⋭',
+ nsc: '⊁',
+ nsccue: '⋡',
+ nsce: '⪰̸',
+ nscr: '𝓃',
+ nshortmid: '∤',
+ nshortparallel: '∦',
+ nsim: '≁',
+ nsime: '≄',
+ nsimeq: '≄',
+ nsmid: '∤',
+ nspar: '∦',
+ nsqsube: '⋢',
+ nsqsupe: '⋣',
+ nsub: '⊄',
+ nsubE: '⫅̸',
+ nsube: '⊈',
+ nsubset: '⊂⃒',
+ nsubseteq: '⊈',
+ nsubseteqq: '⫅̸',
+ nsucc: '⊁',
+ nsucceq: '⪰̸',
+ nsup: '⊅',
+ nsupE: '⫆̸',
+ nsupe: '⊉',
+ nsupset: '⊃⃒',
+ nsupseteq: '⊉',
+ nsupseteqq: '⫆̸',
+ ntgl: '≹',
+ ntilde: 'ñ',
+ ntlg: '≸',
+ ntriangleleft: '⋪',
+ ntrianglelefteq: '⋬',
+ ntriangleright: '⋫',
+ ntrianglerighteq: '⋭',
+ nu: 'ν',
+ num: '#',
+ numero: '№',
+ numsp: ' ',
+ nvDash: '⊭',
+ nvHarr: '⤄',
+ nvap: '≍⃒',
+ nvdash: '⊬',
+ nvge: '≥⃒',
+ nvgt: '>⃒',
+ nvinfin: '⧞',
+ nvlArr: '⤂',
+ nvle: '≤⃒',
+ nvlt: '<⃒',
+ nvltrie: '⊴⃒',
+ nvrArr: '⤃',
+ nvrtrie: '⊵⃒',
+ nvsim: '∼⃒',
+ nwArr: '⇖',
+ nwarhk: '⤣',
+ nwarr: '↖',
+ nwarrow: '↖',
+ nwnear: '⤧',
+ oS: 'Ⓢ',
+ oacute: 'ó',
+ oast: '⊛',
+ ocir: '⊚',
+ ocirc: 'ô',
+ ocy: 'о',
+ odash: '⊝',
+ odblac: 'ő',
+ odiv: '⨸',
+ odot: '⊙',
+ odsold: '⦼',
+ oelig: 'œ',
+ ofcir: '⦿',
+ ofr: '𝔬',
+ ogon: '˛',
+ ograve: 'ò',
+ ogt: '⧁',
+ ohbar: '⦵',
+ ohm: 'Ω',
+ oint: '∮',
+ olarr: '↺',
+ olcir: '⦾',
+ olcross: '⦻',
+ oline: '‾',
+ olt: '⧀',
+ omacr: 'ō',
+ omega: 'ω',
+ omicron: 'ο',
+ omid: '⦶',
+ ominus: '⊖',
+ oopf: '𝕠',
+ opar: '⦷',
+ operp: '⦹',
+ oplus: '⊕',
+ or: '∨',
+ orarr: '↻',
+ ord: '⩝',
+ order: 'ℴ',
+ orderof: 'ℴ',
+ ordf: 'ª',
+ ordm: 'º',
+ origof: '⊶',
+ oror: '⩖',
+ orslope: '⩗',
+ orv: '⩛',
+ oscr: 'ℴ',
+ oslash: 'ø',
+ osol: '⊘',
+ otilde: 'õ',
+ otimes: '⊗',
+ otimesas: '⨶',
+ ouml: 'ö',
+ ovbar: '⌽',
+ par: '∥',
+ para: '¶',
+ parallel: '∥',
+ parsim: '⫳',
+ parsl: '⫽',
+ part: '∂',
+ pcy: 'п',
+ percnt: '%',
+ period: '.',
+ permil: '‰',
+ perp: '⊥',
+ pertenk: '‱',
+ pfr: '𝔭',
+ phi: 'φ',
+ phiv: 'ϕ',
+ phmmat: 'ℳ',
+ phone: '☎',
+ pi: 'π',
+ pitchfork: '⋔',
+ piv: 'ϖ',
+ planck: 'ℏ',
+ planckh: 'ℎ',
+ plankv: 'ℏ',
+ plus: '+',
+ plusacir: '⨣',
+ plusb: '⊞',
+ pluscir: '⨢',
+ plusdo: '∔',
+ plusdu: '⨥',
+ pluse: '⩲',
+ plusmn: '±',
+ plussim: '⨦',
+ plustwo: '⨧',
+ pm: '±',
+ pointint: '⨕',
+ popf: '𝕡',
+ pound: '£',
+ pr: '≺',
+ prE: '⪳',
+ prap: '⪷',
+ prcue: '≼',
+ pre: '⪯',
+ prec: '≺',
+ precapprox: '⪷',
+ preccurlyeq: '≼',
+ preceq: '⪯',
+ precnapprox: '⪹',
+ precneqq: '⪵',
+ precnsim: '⋨',
+ precsim: '≾',
+ prime: '′',
+ primes: 'ℙ',
+ prnE: '⪵',
+ prnap: '⪹',
+ prnsim: '⋨',
+ prod: '∏',
+ profalar: '⌮',
+ profline: '⌒',
+ profsurf: '⌓',
+ prop: '∝',
+ propto: '∝',
+ prsim: '≾',
+ prurel: '⊰',
+ pscr: '𝓅',
+ psi: 'ψ',
+ puncsp: ' ',
+ qfr: '𝔮',
+ qint: '⨌',
+ qopf: '𝕢',
+ qprime: '⁗',
+ qscr: '𝓆',
+ quaternions: 'ℍ',
+ quatint: '⨖',
+ quest: '?',
+ questeq: '≟',
+ quot: '"',
+ rAarr: '⇛',
+ rArr: '⇒',
+ rAtail: '⤜',
+ rBarr: '⤏',
+ rHar: '⥤',
+ race: '∽̱',
+ racute: 'ŕ',
+ radic: '√',
+ raemptyv: '⦳',
+ rang: '⟩',
+ rangd: '⦒',
+ range: '⦥',
+ rangle: '⟩',
+ raquo: '»',
+ rarr: '→',
+ rarrap: '⥵',
+ rarrb: '⇥',
+ rarrbfs: '⤠',
+ rarrc: '⤳',
+ rarrfs: '⤞',
+ rarrhk: '↪',
+ rarrlp: '↬',
+ rarrpl: '⥅',
+ rarrsim: '⥴',
+ rarrtl: '↣',
+ rarrw: '↝',
+ ratail: '⤚',
+ ratio: '∶',
+ rationals: 'ℚ',
+ rbarr: '⤍',
+ rbbrk: '❳',
+ rbrace: '}',
+ rbrack: ']',
+ rbrke: '⦌',
+ rbrksld: '⦎',
+ rbrkslu: '⦐',
+ rcaron: 'ř',
+ rcedil: 'ŗ',
+ rceil: '⌉',
+ rcub: '}',
+ rcy: 'р',
+ rdca: '⤷',
+ rdldhar: '⥩',
+ rdquo: '”',
+ rdquor: '”',
+ rdsh: '↳',
+ real: 'ℜ',
+ realine: 'ℛ',
+ realpart: 'ℜ',
+ reals: 'ℝ',
+ rect: '▭',
+ reg: '®',
+ rfisht: '⥽',
+ rfloor: '⌋',
+ rfr: '𝔯',
+ rhard: '⇁',
+ rharu: '⇀',
+ rharul: '⥬',
+ rho: 'ρ',
+ rhov: 'ϱ',
+ rightarrow: '→',
+ rightarrowtail: '↣',
+ rightharpoondown: '⇁',
+ rightharpoonup: '⇀',
+ rightleftarrows: '⇄',
+ rightleftharpoons: '⇌',
+ rightrightarrows: '⇉',
+ rightsquigarrow: '↝',
+ rightthreetimes: '⋌',
+ ring: '˚',
+ risingdotseq: '≓',
+ rlarr: '⇄',
+ rlhar: '⇌',
+ rlm: '',
+ rmoust: '⎱',
+ rmoustache: '⎱',
+ rnmid: '⫮',
+ roang: '⟭',
+ roarr: '⇾',
+ robrk: '⟧',
+ ropar: '⦆',
+ ropf: '𝕣',
+ roplus: '⨮',
+ rotimes: '⨵',
+ rpar: ')',
+ rpargt: '⦔',
+ rppolint: '⨒',
+ rrarr: '⇉',
+ rsaquo: '›',
+ rscr: '𝓇',
+ rsh: '↱',
+ rsqb: ']',
+ rsquo: '’',
+ rsquor: '’',
+ rthree: '⋌',
+ rtimes: '⋊',
+ rtri: '▹',
+ rtrie: '⊵',
+ rtrif: '▸',
+ rtriltri: '⧎',
+ ruluhar: '⥨',
+ rx: '℞',
+ sacute: 'ś',
+ sbquo: '‚',
+ sc: '≻',
+ scE: '⪴',
+ scap: '⪸',
+ scaron: 'š',
+ sccue: '≽',
+ sce: '⪰',
+ scedil: 'ş',
+ scirc: 'ŝ',
+ scnE: '⪶',
+ scnap: '⪺',
+ scnsim: '⋩',
+ scpolint: '⨓',
+ scsim: '≿',
+ scy: 'с',
+ sdot: '⋅',
+ sdotb: '⊡',
+ sdote: '⩦',
+ seArr: '⇘',
+ searhk: '⤥',
+ searr: '↘',
+ searrow: '↘',
+ sect: '§',
+ semi: ';',
+ seswar: '⤩',
+ setminus: '∖',
+ setmn: '∖',
+ sext: '✶',
+ sfr: '𝔰',
+ sfrown: '⌢',
+ sharp: '♯',
+ shchcy: 'щ',
+ shcy: 'ш',
+ shortmid: '∣',
+ shortparallel: '∥',
+ shy: '',
+ sigma: 'σ',
+ sigmaf: 'ς',
+ sigmav: 'ς',
+ sim: '∼',
+ simdot: '⩪',
+ sime: '≃',
+ simeq: '≃',
+ simg: '⪞',
+ simgE: '⪠',
+ siml: '⪝',
+ simlE: '⪟',
+ simne: '≆',
+ simplus: '⨤',
+ simrarr: '⥲',
+ slarr: '←',
+ smallsetminus: '∖',
+ smashp: '⨳',
+ smeparsl: '⧤',
+ smid: '∣',
+ smile: '⌣',
+ smt: '⪪',
+ smte: '⪬',
+ smtes: '⪬︀',
+ softcy: 'ь',
+ sol: '/',
+ solb: '⧄',
+ solbar: '⌿',
+ sopf: '𝕤',
+ spades: '♠',
+ spadesuit: '♠',
+ spar: '∥',
+ sqcap: '⊓',
+ sqcaps: '⊓︀',
+ sqcup: '⊔',
+ sqcups: '⊔︀',
+ sqsub: '⊏',
+ sqsube: '⊑',
+ sqsubset: '⊏',
+ sqsubseteq: '⊑',
+ sqsup: '⊐',
+ sqsupe: '⊒',
+ sqsupset: '⊐',
+ sqsupseteq: '⊒',
+ squ: '□',
+ square: '□',
+ squarf: '▪',
+ squf: '▪',
+ srarr: '→',
+ sscr: '𝓈',
+ ssetmn: '∖',
+ ssmile: '⌣',
+ sstarf: '⋆',
+ star: '☆',
+ starf: '★',
+ straightepsilon: 'ϵ',
+ straightphi: 'ϕ',
+ strns: '¯',
+ sub: '⊂',
+ subE: '⫅',
+ subdot: '⪽',
+ sube: '⊆',
+ subedot: '⫃',
+ submult: '⫁',
+ subnE: '⫋',
+ subne: '⊊',
+ subplus: '⪿',
+ subrarr: '⥹',
+ subset: '⊂',
+ subseteq: '⊆',
+ subseteqq: '⫅',
+ subsetneq: '⊊',
+ subsetneqq: '⫋',
+ subsim: '⫇',
+ subsub: '⫕',
+ subsup: '⫓',
+ succ: '≻',
+ succapprox: '⪸',
+ succcurlyeq: '≽',
+ succeq: '⪰',
+ succnapprox: '⪺',
+ succneqq: '⪶',
+ succnsim: '⋩',
+ succsim: '≿',
+ sum: '∑',
+ sung: '♪',
+ sup1: '¹',
+ sup2: '²',
+ sup3: '³',
+ sup: '⊃',
+ supE: '⫆',
+ supdot: '⪾',
+ supdsub: '⫘',
+ supe: '⊇',
+ supedot: '⫄',
+ suphsol: '⟉',
+ suphsub: '⫗',
+ suplarr: '⥻',
+ supmult: '⫂',
+ supnE: '⫌',
+ supne: '⊋',
+ supplus: '⫀',
+ supset: '⊃',
+ supseteq: '⊇',
+ supseteqq: '⫆',
+ supsetneq: '⊋',
+ supsetneqq: '⫌',
+ supsim: '⫈',
+ supsub: '⫔',
+ supsup: '⫖',
+ swArr: '⇙',
+ swarhk: '⤦',
+ swarr: '↙',
+ swarrow: '↙',
+ swnwar: '⤪',
+ szlig: 'ß',
+ target: '⌖',
+ tau: 'τ',
+ tbrk: '⎴',
+ tcaron: 'ť',
+ tcedil: 'ţ',
+ tcy: 'т',
+ tdot: '⃛',
+ telrec: '⌕',
+ tfr: '𝔱',
+ there4: '∴',
+ therefore: '∴',
+ theta: 'θ',
+ thetasym: 'ϑ',
+ thetav: 'ϑ',
+ thickapprox: '≈',
+ thicksim: '∼',
+ thinsp: ' ',
+ thkap: '≈',
+ thksim: '∼',
+ thorn: 'þ',
+ tilde: '˜',
+ times: '×',
+ timesb: '⊠',
+ timesbar: '⨱',
+ timesd: '⨰',
+ tint: '∭',
+ toea: '⤨',
+ top: '⊤',
+ topbot: '⌶',
+ topcir: '⫱',
+ topf: '𝕥',
+ topfork: '⫚',
+ tosa: '⤩',
+ tprime: '‴',
+ trade: '™',
+ triangle: '▵',
+ triangledown: '▿',
+ triangleleft: '◃',
+ trianglelefteq: '⊴',
+ triangleq: '≜',
+ triangleright: '▹',
+ trianglerighteq: '⊵',
+ tridot: '◬',
+ trie: '≜',
+ triminus: '⨺',
+ triplus: '⨹',
+ trisb: '⧍',
+ tritime: '⨻',
+ trpezium: '⏢',
+ tscr: '𝓉',
+ tscy: 'ц',
+ tshcy: 'ћ',
+ tstrok: 'ŧ',
+ twixt: '≬',
+ twoheadleftarrow: '↞',
+ twoheadrightarrow: '↠',
+ uArr: '⇑',
+ uHar: '⥣',
+ uacute: 'ú',
+ uarr: '↑',
+ ubrcy: 'ў',
+ ubreve: 'ŭ',
+ ucirc: 'û',
+ ucy: 'у',
+ udarr: '⇅',
+ udblac: 'ű',
+ udhar: '⥮',
+ ufisht: '⥾',
+ ufr: '𝔲',
+ ugrave: 'ù',
+ uharl: '↿',
+ uharr: '↾',
+ uhblk: '▀',
+ ulcorn: '⌜',
+ ulcorner: '⌜',
+ ulcrop: '⌏',
+ ultri: '◸',
+ umacr: 'ū',
+ uml: '¨',
+ uogon: 'ų',
+ uopf: '𝕦',
+ uparrow: '↑',
+ updownarrow: '↕',
+ upharpoonleft: '↿',
+ upharpoonright: '↾',
+ uplus: '⊎',
+ upsi: 'υ',
+ upsih: 'ϒ',
+ upsilon: 'υ',
+ upuparrows: '⇈',
+ urcorn: '⌝',
+ urcorner: '⌝',
+ urcrop: '⌎',
+ uring: 'ů',
+ urtri: '◹',
+ uscr: '𝓊',
+ utdot: '⋰',
+ utilde: 'ũ',
+ utri: '▵',
+ utrif: '▴',
+ uuarr: '⇈',
+ uuml: 'ü',
+ uwangle: '⦧',
+ vArr: '⇕',
+ vBar: '⫨',
+ vBarv: '⫩',
+ vDash: '⊨',
+ vangrt: '⦜',
+ varepsilon: 'ϵ',
+ varkappa: 'ϰ',
+ varnothing: '∅',
+ varphi: 'ϕ',
+ varpi: 'ϖ',
+ varpropto: '∝',
+ varr: '↕',
+ varrho: 'ϱ',
+ varsigma: 'ς',
+ varsubsetneq: '⊊︀',
+ varsubsetneqq: '⫋︀',
+ varsupsetneq: '⊋︀',
+ varsupsetneqq: '⫌︀',
+ vartheta: 'ϑ',
+ vartriangleleft: '⊲',
+ vartriangleright: '⊳',
+ vcy: 'в',
+ vdash: '⊢',
+ vee: '∨',
+ veebar: '⊻',
+ veeeq: '≚',
+ vellip: '⋮',
+ verbar: '|',
+ vert: '|',
+ vfr: '𝔳',
+ vltri: '⊲',
+ vnsub: '⊂⃒',
+ vnsup: '⊃⃒',
+ vopf: '𝕧',
+ vprop: '∝',
+ vrtri: '⊳',
+ vscr: '𝓋',
+ vsubnE: '⫋︀',
+ vsubne: '⊊︀',
+ vsupnE: '⫌︀',
+ vsupne: '⊋︀',
+ vzigzag: '⦚',
+ wcirc: 'ŵ',
+ wedbar: '⩟',
+ wedge: '∧',
+ wedgeq: '≙',
+ weierp: '℘',
+ wfr: '𝔴',
+ wopf: '𝕨',
+ wp: '℘',
+ wr: '≀',
+ wreath: '≀',
+ wscr: '𝓌',
+ xcap: '⋂',
+ xcirc: '◯',
+ xcup: '⋃',
+ xdtri: '▽',
+ xfr: '𝔵',
+ xhArr: '⟺',
+ xharr: '⟷',
+ xi: 'ξ',
+ xlArr: '⟸',
+ xlarr: '⟵',
+ xmap: '⟼',
+ xnis: '⋻',
+ xodot: '⨀',
+ xopf: '𝕩',
+ xoplus: '⨁',
+ xotime: '⨂',
+ xrArr: '⟹',
+ xrarr: '⟶',
+ xscr: '𝓍',
+ xsqcup: '⨆',
+ xuplus: '⨄',
+ xutri: '△',
+ xvee: '⋁',
+ xwedge: '⋀',
+ yacute: 'ý',
+ yacy: 'я',
+ ycirc: 'ŷ',
+ ycy: 'ы',
+ yen: '¥',
+ yfr: '𝔶',
+ yicy: 'ї',
+ yopf: '𝕪',
+ yscr: '𝓎',
+ yucy: 'ю',
+ yuml: 'ÿ',
+ zacute: 'ź',
+ zcaron: 'ž',
+ zcy: 'з',
+ zdot: 'ż',
+ zeetrf: 'ℨ',
+ zeta: 'ζ',
+ zfr: '𝔷',
+ zhcy: 'ж',
+ zigrarr: '⇝',
+ zopf: '𝕫',
+ zscr: '𝓏',
+ zwj: '',
+ zwnj: ''
+}
+
+;// CONCATENATED MODULE: ./node_modules/decode-named-character-reference/index.js
+
+
+const own = {}.hasOwnProperty
+
+/**
+ * Decode a single character reference (without the `&` or `;`).
+ * You probably only need this when you’re building parsers yourself that follow
+ * different rules compared to HTML.
+ * This is optimized to be tiny in browsers.
+ *
+ * @param {string} value
+ * `notin` (named), `#123` (deci), `#x123` (hexa).
+ * @returns {string|false}
+ * Decoded reference.
+ */
+function decodeNamedCharacterReference(value) {
+ return own.call(characterEntities, value) ? characterEntities[value] : false
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-reference.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const characterReference = {
+ name: 'characterReference',
+ tokenize: tokenizeCharacterReference
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeCharacterReference(effects, ok, nok) {
+ const self = this
+ let size = 0
+ /** @type {number} */
+ let max
+ /** @type {(code: Code) => boolean} */
+ let test
+ return start
+
+ /**
+ * Start of character reference.
+ *
+ * ```markdown
+ * > | a&b
+ * ^
+ * > | a{b
+ * ^
+ * > | a b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('characterReference')
+ effects.enter('characterReferenceMarker')
+ effects.consume(code)
+ effects.exit('characterReferenceMarker')
+ return open
+ }
+
+ /**
+ * After `&`, at `#` for numeric references or alphanumeric for named
+ * references.
+ *
+ * ```markdown
+ * > | a&b
+ * ^
+ * > | a{b
+ * ^
+ * > | a b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (code === 35) {
+ effects.enter('characterReferenceMarkerNumeric')
+ effects.consume(code)
+ effects.exit('characterReferenceMarkerNumeric')
+ return numeric
+ }
+ effects.enter('characterReferenceValue')
+ max = 31
+ test = asciiAlphanumeric
+ return value(code)
+ }
+
+ /**
+ * After `#`, at `x` for hexadecimals or digit for decimals.
+ *
+ * ```markdown
+ * > | a{b
+ * ^
+ * > | a b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function numeric(code) {
+ if (code === 88 || code === 120) {
+ effects.enter('characterReferenceMarkerHexadecimal')
+ effects.consume(code)
+ effects.exit('characterReferenceMarkerHexadecimal')
+ effects.enter('characterReferenceValue')
+ max = 6
+ test = asciiHexDigit
+ return value
+ }
+ effects.enter('characterReferenceValue')
+ max = 7
+ test = asciiDigit
+ return value(code)
+ }
+
+ /**
+ * After markers (``, ``, or `&`), in value, before `;`.
+ *
+ * The character reference kind defines what and how many characters are
+ * allowed.
+ *
+ * ```markdown
+ * > | a&b
+ * ^^^
+ * > | a{b
+ * ^^^
+ * > | a b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function value(code) {
+ if (code === 59 && size) {
+ const token = effects.exit('characterReferenceValue')
+ if (
+ test === asciiAlphanumeric &&
+ !decodeNamedCharacterReference(self.sliceSerialize(token))
+ ) {
+ return nok(code)
+ }
+
+ // To do: `markdown-rs` uses a different name:
+ // `CharacterReferenceMarkerSemi`.
+ effects.enter('characterReferenceMarker')
+ effects.consume(code)
+ effects.exit('characterReferenceMarker')
+ effects.exit('characterReference')
+ return ok
+ }
+ if (test(code) && size++ < max) {
+ effects.consume(code)
+ return value
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/character-escape.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+/** @type {Construct} */
+const characterEscape = {
+ name: 'characterEscape',
+ tokenize: tokenizeCharacterEscape
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeCharacterEscape(effects, ok, nok) {
+ return start
+
+ /**
+ * Start of character escape.
+ *
+ * ```markdown
+ * > | a\*b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('characterEscape')
+ effects.enter('escapeMarker')
+ effects.consume(code)
+ effects.exit('escapeMarker')
+ return inside
+ }
+
+ /**
+ * After `\`, at punctuation.
+ *
+ * ```markdown
+ * > | a\*b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function inside(code) {
+ // ASCII punctuation.
+ if (asciiPunctuation(code)) {
+ effects.enter('characterEscapeValue')
+ effects.consume(code)
+ effects.exit('characterEscapeValue')
+ effects.exit('characterEscape')
+ return ok
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/line-ending.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const lineEnding = {
+ name: 'lineEnding',
+ tokenize: tokenizeLineEnding
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeLineEnding(effects, ok) {
+ return start
+
+ /** @type {State} */
+ function start(code) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return factorySpace(effects, ok, 'linePrefix')
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-end.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+
+
+
+
+
+
+/** @type {Construct} */
+const labelEnd = {
+ name: 'labelEnd',
+ tokenize: tokenizeLabelEnd,
+ resolveTo: resolveToLabelEnd,
+ resolveAll: resolveAllLabelEnd
+}
+
+/** @type {Construct} */
+const resourceConstruct = {
+ tokenize: tokenizeResource
+}
+/** @type {Construct} */
+const referenceFullConstruct = {
+ tokenize: tokenizeReferenceFull
+}
+/** @type {Construct} */
+const referenceCollapsedConstruct = {
+ tokenize: tokenizeReferenceCollapsed
+}
+
+/** @type {Resolver} */
+function resolveAllLabelEnd(events) {
+ let index = -1
+ while (++index < events.length) {
+ const token = events[index][1]
+ if (
+ token.type === 'labelImage' ||
+ token.type === 'labelLink' ||
+ token.type === 'labelEnd'
+ ) {
+ // Remove the marker.
+ events.splice(index + 1, token.type === 'labelImage' ? 4 : 2)
+ token.type = 'data'
+ index++
+ }
+ }
+ return events
+}
+
+/** @type {Resolver} */
+function resolveToLabelEnd(events, context) {
+ let index = events.length
+ let offset = 0
+ /** @type {Token} */
+ let token
+ /** @type {number | undefined} */
+ let open
+ /** @type {number | undefined} */
+ let close
+ /** @type {Array} */
+ let media
+
+ // Find an opening.
+ while (index--) {
+ token = events[index][1]
+ if (open) {
+ // If we see another link, or inactive link label, we’ve been here before.
+ if (
+ token.type === 'link' ||
+ (token.type === 'labelLink' && token._inactive)
+ ) {
+ break
+ }
+
+ // Mark other link openings as inactive, as we can’t have links in
+ // links.
+ if (events[index][0] === 'enter' && token.type === 'labelLink') {
+ token._inactive = true
+ }
+ } else if (close) {
+ if (
+ events[index][0] === 'enter' &&
+ (token.type === 'labelImage' || token.type === 'labelLink') &&
+ !token._balanced
+ ) {
+ open = index
+ if (token.type !== 'labelLink') {
+ offset = 2
+ break
+ }
+ }
+ } else if (token.type === 'labelEnd') {
+ close = index
+ }
+ }
+ const group = {
+ type: events[open][1].type === 'labelLink' ? 'link' : 'image',
+ start: Object.assign({}, events[open][1].start),
+ end: Object.assign({}, events[events.length - 1][1].end)
+ }
+ const label = {
+ type: 'label',
+ start: Object.assign({}, events[open][1].start),
+ end: Object.assign({}, events[close][1].end)
+ }
+ const text = {
+ type: 'labelText',
+ start: Object.assign({}, events[open + offset + 2][1].end),
+ end: Object.assign({}, events[close - 2][1].start)
+ }
+ media = [
+ ['enter', group, context],
+ ['enter', label, context]
+ ]
+
+ // Opening marker.
+ media = push(media, events.slice(open + 1, open + offset + 3))
+
+ // Text open.
+ media = push(media, [['enter', text, context]])
+
+ // Always populated by defaults.
+
+ // Between.
+ media = push(
+ media,
+ resolveAll(
+ context.parser.constructs.insideSpan.null,
+ events.slice(open + offset + 4, close - 3),
+ context
+ )
+ )
+
+ // Text close, marker close, label close.
+ media = push(media, [
+ ['exit', text, context],
+ events[close - 2],
+ events[close - 1],
+ ['exit', label, context]
+ ])
+
+ // Reference, resource, or so.
+ media = push(media, events.slice(close + 1))
+
+ // Media close.
+ media = push(media, [['exit', group, context]])
+ splice(events, open, events.length, media)
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeLabelEnd(effects, ok, nok) {
+ const self = this
+ let index = self.events.length
+ /** @type {Token} */
+ let labelStart
+ /** @type {boolean} */
+ let defined
+
+ // Find an opening.
+ while (index--) {
+ if (
+ (self.events[index][1].type === 'labelImage' ||
+ self.events[index][1].type === 'labelLink') &&
+ !self.events[index][1]._balanced
+ ) {
+ labelStart = self.events[index][1]
+ break
+ }
+ }
+ return start
+
+ /**
+ * Start of label end.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * > | [a][b] c
+ * ^
+ * > | [a][] b
+ * ^
+ * > | [a] b
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ // If there is not an okay opening.
+ if (!labelStart) {
+ return nok(code)
+ }
+
+ // If the corresponding label (link) start is marked as inactive,
+ // it means we’d be wrapping a link, like this:
+ //
+ // ```markdown
+ // > | a [b [c](d) e](f) g.
+ // ^
+ // ```
+ //
+ // We can’t have that, so it’s just balanced brackets.
+ if (labelStart._inactive) {
+ return labelEndNok(code)
+ }
+ defined = self.parser.defined.includes(
+ normalizeIdentifier(
+ self.sliceSerialize({
+ start: labelStart.end,
+ end: self.now()
+ })
+ )
+ )
+ effects.enter('labelEnd')
+ effects.enter('labelMarker')
+ effects.consume(code)
+ effects.exit('labelMarker')
+ effects.exit('labelEnd')
+ return after
+ }
+
+ /**
+ * After `]`.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * > | [a][b] c
+ * ^
+ * > | [a][] b
+ * ^
+ * > | [a] b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ // Note: `markdown-rs` also parses GFM footnotes here, which for us is in
+ // an extension.
+
+ // Resource (`[asd](fgh)`)?
+ if (code === 40) {
+ return effects.attempt(
+ resourceConstruct,
+ labelEndOk,
+ defined ? labelEndOk : labelEndNok
+ )(code)
+ }
+
+ // Full (`[asd][fgh]`) or collapsed (`[asd][]`) reference?
+ if (code === 91) {
+ return effects.attempt(
+ referenceFullConstruct,
+ labelEndOk,
+ defined ? referenceNotFull : labelEndNok
+ )(code)
+ }
+
+ // Shortcut (`[asd]`) reference?
+ return defined ? labelEndOk(code) : labelEndNok(code)
+ }
+
+ /**
+ * After `]`, at `[`, but not at a full reference.
+ *
+ * > 👉 **Note**: we only get here if the label is defined.
+ *
+ * ```markdown
+ * > | [a][] b
+ * ^
+ * > | [a] b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceNotFull(code) {
+ return effects.attempt(
+ referenceCollapsedConstruct,
+ labelEndOk,
+ labelEndNok
+ )(code)
+ }
+
+ /**
+ * Done, we found something.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * > | [a][b] c
+ * ^
+ * > | [a][] b
+ * ^
+ * > | [a] b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function labelEndOk(code) {
+ // Note: `markdown-rs` does a bunch of stuff here.
+ return ok(code)
+ }
+
+ /**
+ * Done, it’s nothing.
+ *
+ * There was an okay opening, but we didn’t match anything.
+ *
+ * ```markdown
+ * > | [a](b c
+ * ^
+ * > | [a][b c
+ * ^
+ * > | [a] b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function labelEndNok(code) {
+ labelStart._balanced = true
+ return nok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeResource(effects, ok, nok) {
+ return resourceStart
+
+ /**
+ * At a resource.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceStart(code) {
+ effects.enter('resource')
+ effects.enter('resourceMarker')
+ effects.consume(code)
+ effects.exit('resourceMarker')
+ return resourceBefore
+ }
+
+ /**
+ * In resource, after `(`, at optional whitespace.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceBefore(code) {
+ return markdownLineEndingOrSpace(code)
+ ? factoryWhitespace(effects, resourceOpen)(code)
+ : resourceOpen(code)
+ }
+
+ /**
+ * In resource, after optional whitespace, at `)` or a destination.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceOpen(code) {
+ if (code === 41) {
+ return resourceEnd(code)
+ }
+ return factoryDestination(
+ effects,
+ resourceDestinationAfter,
+ resourceDestinationMissing,
+ 'resourceDestination',
+ 'resourceDestinationLiteral',
+ 'resourceDestinationLiteralMarker',
+ 'resourceDestinationRaw',
+ 'resourceDestinationString',
+ 32
+ )(code)
+ }
+
+ /**
+ * In resource, after destination, at optional whitespace.
+ *
+ * ```markdown
+ * > | [a](b) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceDestinationAfter(code) {
+ return markdownLineEndingOrSpace(code)
+ ? factoryWhitespace(effects, resourceBetween)(code)
+ : resourceEnd(code)
+ }
+
+ /**
+ * At invalid destination.
+ *
+ * ```markdown
+ * > | [a](<<) b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceDestinationMissing(code) {
+ return nok(code)
+ }
+
+ /**
+ * In resource, after destination and whitespace, at `(` or title.
+ *
+ * ```markdown
+ * > | [a](b ) c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceBetween(code) {
+ if (code === 34 || code === 39 || code === 40) {
+ return factoryTitle(
+ effects,
+ resourceTitleAfter,
+ nok,
+ 'resourceTitle',
+ 'resourceTitleMarker',
+ 'resourceTitleString'
+ )(code)
+ }
+ return resourceEnd(code)
+ }
+
+ /**
+ * In resource, after title, at optional whitespace.
+ *
+ * ```markdown
+ * > | [a](b "c") d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceTitleAfter(code) {
+ return markdownLineEndingOrSpace(code)
+ ? factoryWhitespace(effects, resourceEnd)(code)
+ : resourceEnd(code)
+ }
+
+ /**
+ * In resource, at `)`.
+ *
+ * ```markdown
+ * > | [a](b) d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function resourceEnd(code) {
+ if (code === 41) {
+ effects.enter('resourceMarker')
+ effects.consume(code)
+ effects.exit('resourceMarker')
+ effects.exit('resource')
+ return ok
+ }
+ return nok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeReferenceFull(effects, ok, nok) {
+ const self = this
+ return referenceFull
+
+ /**
+ * In a reference (full), at the `[`.
+ *
+ * ```markdown
+ * > | [a][b] d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceFull(code) {
+ return factoryLabel.call(
+ self,
+ effects,
+ referenceFullAfter,
+ referenceFullMissing,
+ 'reference',
+ 'referenceMarker',
+ 'referenceString'
+ )(code)
+ }
+
+ /**
+ * In a reference (full), after `]`.
+ *
+ * ```markdown
+ * > | [a][b] d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceFullAfter(code) {
+ return self.parser.defined.includes(
+ normalizeIdentifier(
+ self.sliceSerialize(self.events[self.events.length - 1][1]).slice(1, -1)
+ )
+ )
+ ? ok(code)
+ : nok(code)
+ }
+
+ /**
+ * In reference (full) that was missing.
+ *
+ * ```markdown
+ * > | [a][b d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceFullMissing(code) {
+ return nok(code)
+ }
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeReferenceCollapsed(effects, ok, nok) {
+ return referenceCollapsedStart
+
+ /**
+ * In reference (collapsed), at `[`.
+ *
+ * > 👉 **Note**: we only get here if the label is defined.
+ *
+ * ```markdown
+ * > | [a][] d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceCollapsedStart(code) {
+ // We only attempt a collapsed label if there’s a `[`.
+
+ effects.enter('reference')
+ effects.enter('referenceMarker')
+ effects.consume(code)
+ effects.exit('referenceMarker')
+ return referenceCollapsedOpen
+ }
+
+ /**
+ * In reference (collapsed), at `]`.
+ *
+ * > 👉 **Note**: we only get here if the label is defined.
+ *
+ * ```markdown
+ * > | [a][] d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function referenceCollapsedOpen(code) {
+ if (code === 93) {
+ effects.enter('referenceMarker')
+ effects.consume(code)
+ effects.exit('referenceMarker')
+ effects.exit('reference')
+ return ok
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-image.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const labelStartImage = {
+ name: 'labelStartImage',
+ tokenize: tokenizeLabelStartImage,
+ resolveAll: labelEnd.resolveAll
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeLabelStartImage(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ * Start of label (image) start.
+ *
+ * ```markdown
+ * > | a ![b] c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('labelImage')
+ effects.enter('labelImageMarker')
+ effects.consume(code)
+ effects.exit('labelImageMarker')
+ return open
+ }
+
+ /**
+ * After `!`, at `[`.
+ *
+ * ```markdown
+ * > | a ![b] c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (code === 91) {
+ effects.enter('labelMarker')
+ effects.consume(code)
+ effects.exit('labelMarker')
+ effects.exit('labelImage')
+ return after
+ }
+ return nok(code)
+ }
+
+ /**
+ * After `![`.
+ *
+ * ```markdown
+ * > | a ![b] c
+ * ^
+ * ```
+ *
+ * This is needed in because, when GFM footnotes are enabled, images never
+ * form when started with a `^`.
+ * Instead, links form:
+ *
+ * ```markdown
+ * ![^a](b)
+ *
+ * ![^a][b]
+ *
+ * [b]: c
+ * ```
+ *
+ * ```html
+ * !^a
+ * !^a
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ // To do: use a new field to do this, this is still needed for
+ // `micromark-extension-gfm-footnote`, but the `label-start-link`
+ // behavior isn’t.
+ // Hidden footnotes hook.
+ /* c8 ignore next 3 */
+ return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs
+ ? nok(code)
+ : ok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-classify-character/index.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ */
+
+
+/**
+ * Classify whether a code represents whitespace, punctuation, or something
+ * else.
+ *
+ * Used for attention (emphasis, strong), whose sequences can open or close
+ * based on the class of surrounding characters.
+ *
+ * > 👉 **Note**: eof (`null`) is seen as whitespace.
+ *
+ * @param {Code} code
+ * Code.
+ * @returns {typeof constants.characterGroupWhitespace | typeof constants.characterGroupPunctuation | undefined}
+ * Group.
+ */
+function classifyCharacter(code) {
+ if (
+ code === null ||
+ markdownLineEndingOrSpace(code) ||
+ unicodeWhitespace(code)
+ ) {
+ return 1
+ }
+ if (unicodePunctuation(code)) {
+ return 2
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/attention.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').Point} Point
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+
+/** @type {Construct} */
+const attention = {
+ name: 'attention',
+ tokenize: tokenizeAttention,
+ resolveAll: resolveAllAttention
+}
+
+/**
+ * Take all events and resolve attention to emphasis or strong.
+ *
+ * @type {Resolver}
+ */
+function resolveAllAttention(events, context) {
+ let index = -1
+ /** @type {number} */
+ let open
+ /** @type {Token} */
+ let group
+ /** @type {Token} */
+ let text
+ /** @type {Token} */
+ let openingSequence
+ /** @type {Token} */
+ let closingSequence
+ /** @type {number} */
+ let use
+ /** @type {Array} */
+ let nextEvents
+ /** @type {number} */
+ let offset
+
+ // Walk through all events.
+ //
+ // Note: performance of this is fine on an mb of normal markdown, but it’s
+ // a bottleneck for malicious stuff.
+ while (++index < events.length) {
+ // Find a token that can close.
+ if (
+ events[index][0] === 'enter' &&
+ events[index][1].type === 'attentionSequence' &&
+ events[index][1]._close
+ ) {
+ open = index
+
+ // Now walk back to find an opener.
+ while (open--) {
+ // Find a token that can open the closer.
+ if (
+ events[open][0] === 'exit' &&
+ events[open][1].type === 'attentionSequence' &&
+ events[open][1]._open &&
+ // If the markers are the same:
+ context.sliceSerialize(events[open][1]).charCodeAt(0) ===
+ context.sliceSerialize(events[index][1]).charCodeAt(0)
+ ) {
+ // If the opening can close or the closing can open,
+ // and the close size *is not* a multiple of three,
+ // but the sum of the opening and closing size *is* multiple of three,
+ // then don’t match.
+ if (
+ (events[open][1]._close || events[index][1]._open) &&
+ (events[index][1].end.offset - events[index][1].start.offset) % 3 &&
+ !(
+ (events[open][1].end.offset -
+ events[open][1].start.offset +
+ events[index][1].end.offset -
+ events[index][1].start.offset) %
+ 3
+ )
+ ) {
+ continue
+ }
+
+ // Number of markers to use from the sequence.
+ use =
+ events[open][1].end.offset - events[open][1].start.offset > 1 &&
+ events[index][1].end.offset - events[index][1].start.offset > 1
+ ? 2
+ : 1
+ const start = Object.assign({}, events[open][1].end)
+ const end = Object.assign({}, events[index][1].start)
+ movePoint(start, -use)
+ movePoint(end, use)
+ openingSequence = {
+ type: use > 1 ? 'strongSequence' : 'emphasisSequence',
+ start,
+ end: Object.assign({}, events[open][1].end)
+ }
+ closingSequence = {
+ type: use > 1 ? 'strongSequence' : 'emphasisSequence',
+ start: Object.assign({}, events[index][1].start),
+ end
+ }
+ text = {
+ type: use > 1 ? 'strongText' : 'emphasisText',
+ start: Object.assign({}, events[open][1].end),
+ end: Object.assign({}, events[index][1].start)
+ }
+ group = {
+ type: use > 1 ? 'strong' : 'emphasis',
+ start: Object.assign({}, openingSequence.start),
+ end: Object.assign({}, closingSequence.end)
+ }
+ events[open][1].end = Object.assign({}, openingSequence.start)
+ events[index][1].start = Object.assign({}, closingSequence.end)
+ nextEvents = []
+
+ // If there are more markers in the opening, add them before.
+ if (events[open][1].end.offset - events[open][1].start.offset) {
+ nextEvents = push(nextEvents, [
+ ['enter', events[open][1], context],
+ ['exit', events[open][1], context]
+ ])
+ }
+
+ // Opening.
+ nextEvents = push(nextEvents, [
+ ['enter', group, context],
+ ['enter', openingSequence, context],
+ ['exit', openingSequence, context],
+ ['enter', text, context]
+ ])
+
+ // Always populated by defaults.
+
+ // Between.
+ nextEvents = push(
+ nextEvents,
+ resolveAll(
+ context.parser.constructs.insideSpan.null,
+ events.slice(open + 1, index),
+ context
+ )
+ )
+
+ // Closing.
+ nextEvents = push(nextEvents, [
+ ['exit', text, context],
+ ['enter', closingSequence, context],
+ ['exit', closingSequence, context],
+ ['exit', group, context]
+ ])
+
+ // If there are more markers in the closing, add them after.
+ if (events[index][1].end.offset - events[index][1].start.offset) {
+ offset = 2
+ nextEvents = push(nextEvents, [
+ ['enter', events[index][1], context],
+ ['exit', events[index][1], context]
+ ])
+ } else {
+ offset = 0
+ }
+ splice(events, open - 1, index - open + 3, nextEvents)
+ index = open + nextEvents.length - offset - 2
+ break
+ }
+ }
+ }
+ }
+
+ // Remove remaining sequences.
+ index = -1
+ while (++index < events.length) {
+ if (events[index][1].type === 'attentionSequence') {
+ events[index][1].type = 'data'
+ }
+ }
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeAttention(effects, ok) {
+ const attentionMarkers = this.parser.constructs.attentionMarkers.null
+ const previous = this.previous
+ const before = classifyCharacter(previous)
+
+ /** @type {NonNullable} */
+ let marker
+ return start
+
+ /**
+ * Before a sequence.
+ *
+ * ```markdown
+ * > | **
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ marker = code
+ effects.enter('attentionSequence')
+ return inside(code)
+ }
+
+ /**
+ * In a sequence.
+ *
+ * ```markdown
+ * > | **
+ * ^^
+ * ```
+ *
+ * @type {State}
+ */
+ function inside(code) {
+ if (code === marker) {
+ effects.consume(code)
+ return inside
+ }
+ const token = effects.exit('attentionSequence')
+
+ // To do: next major: move this to resolver, just like `markdown-rs`.
+ const after = classifyCharacter(code)
+
+ // Always populated by defaults.
+
+ const open =
+ !after || (after === 2 && before) || attentionMarkers.includes(code)
+ const close =
+ !before || (before === 2 && after) || attentionMarkers.includes(previous)
+ token._open = Boolean(marker === 42 ? open : open && (before || !close))
+ token._close = Boolean(marker === 42 ? close : close && (after || !open))
+ return ok(code)
+ }
+}
+
+/**
+ * Move a point a bit.
+ *
+ * Note: `move` only works inside lines! It’s not possible to move past other
+ * chunks (replacement characters, tabs, or line endings).
+ *
+ * @param {Point} point
+ * @param {number} offset
+ * @returns {void}
+ */
+function movePoint(point, offset) {
+ point.column += offset
+ point.offset += offset
+ point._bufferIndex += offset
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/autolink.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+/** @type {Construct} */
+const autolink = {
+ name: 'autolink',
+ tokenize: tokenizeAutolink
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeAutolink(effects, ok, nok) {
+ let size = 0
+ return start
+
+ /**
+ * Start of an autolink.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('autolink')
+ effects.enter('autolinkMarker')
+ effects.consume(code)
+ effects.exit('autolinkMarker')
+ effects.enter('autolinkProtocol')
+ return open
+ }
+
+ /**
+ * After `<`, at protocol or atext.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ return schemeOrEmailAtext
+ }
+ return emailAtext(code)
+ }
+
+ /**
+ * At second byte of protocol or atext.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function schemeOrEmailAtext(code) {
+ // ASCII alphanumeric and `+`, `-`, and `.`.
+ if (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) {
+ // Count the previous alphabetical from `open` too.
+ size = 1
+ return schemeInsideOrEmailAtext(code)
+ }
+ return emailAtext(code)
+ }
+
+ /**
+ * In ambiguous protocol or atext.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function schemeInsideOrEmailAtext(code) {
+ if (code === 58) {
+ effects.consume(code)
+ size = 0
+ return urlInside
+ }
+
+ // ASCII alphanumeric and `+`, `-`, and `.`.
+ if (
+ (code === 43 || code === 45 || code === 46 || asciiAlphanumeric(code)) &&
+ size++ < 32
+ ) {
+ effects.consume(code)
+ return schemeInsideOrEmailAtext
+ }
+ size = 0
+ return emailAtext(code)
+ }
+
+ /**
+ * After protocol, in URL.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function urlInside(code) {
+ if (code === 62) {
+ effects.exit('autolinkProtocol')
+ effects.enter('autolinkMarker')
+ effects.consume(code)
+ effects.exit('autolinkMarker')
+ effects.exit('autolink')
+ return ok
+ }
+
+ // ASCII control, space, or `<`.
+ if (code === null || code === 32 || code === 60 || asciiControl(code)) {
+ return nok(code)
+ }
+ effects.consume(code)
+ return urlInside
+ }
+
+ /**
+ * In email atext.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function emailAtext(code) {
+ if (code === 64) {
+ effects.consume(code)
+ return emailAtSignOrDot
+ }
+ if (asciiAtext(code)) {
+ effects.consume(code)
+ return emailAtext
+ }
+ return nok(code)
+ }
+
+ /**
+ * In label, after at-sign or dot.
+ *
+ * ```markdown
+ * > | ab
+ * ^ ^
+ * ```
+ *
+ * @type {State}
+ */
+ function emailAtSignOrDot(code) {
+ return asciiAlphanumeric(code) ? emailLabel(code) : nok(code)
+ }
+
+ /**
+ * In label, where `.` and `>` are allowed.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function emailLabel(code) {
+ if (code === 46) {
+ effects.consume(code)
+ size = 0
+ return emailAtSignOrDot
+ }
+ if (code === 62) {
+ // Exit, then change the token type.
+ effects.exit('autolinkProtocol').type = 'autolinkEmail'
+ effects.enter('autolinkMarker')
+ effects.consume(code)
+ effects.exit('autolinkMarker')
+ effects.exit('autolink')
+ return ok
+ }
+ return emailValue(code)
+ }
+
+ /**
+ * In label, where `.` and `>` are *not* allowed.
+ *
+ * Though, this is also used in `emailLabel` to parse other values.
+ *
+ * ```markdown
+ * > | ab
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function emailValue(code) {
+ // ASCII alphanumeric or `-`.
+ if ((code === 45 || asciiAlphanumeric(code)) && size++ < 63) {
+ const next = code === 45 ? emailValue : emailLabel
+ effects.consume(code)
+ return next
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/html-text.js
+/**
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const htmlText = {
+ name: 'htmlText',
+ tokenize: tokenizeHtmlText
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeHtmlText(effects, ok, nok) {
+ const self = this
+ /** @type {NonNullable | undefined} */
+ let marker
+ /** @type {number} */
+ let index
+ /** @type {State} */
+ let returnState
+ return start
+
+ /**
+ * Start of HTML (text).
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('htmlText')
+ effects.enter('htmlTextData')
+ effects.consume(code)
+ return open
+ }
+
+ /**
+ * After `<`, at tag name or other stuff.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * > | a c
+ * ^
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function open(code) {
+ if (code === 33) {
+ effects.consume(code)
+ return declarationOpen
+ }
+ if (code === 47) {
+ effects.consume(code)
+ return tagCloseStart
+ }
+ if (code === 63) {
+ effects.consume(code)
+ return instruction
+ }
+
+ // ASCII alphabetical.
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ return tagOpen
+ }
+ return nok(code)
+ }
+
+ /**
+ * After ` | a c
+ * ^
+ * > | a c
+ * ^
+ * > | a &<]]> c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function declarationOpen(code) {
+ if (code === 45) {
+ effects.consume(code)
+ return commentOpenInside
+ }
+ if (code === 91) {
+ effects.consume(code)
+ index = 0
+ return cdataOpenInside
+ }
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ return declaration
+ }
+ return nok(code)
+ }
+
+ /**
+ * In a comment, after ` | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function commentOpenInside(code) {
+ if (code === 45) {
+ effects.consume(code)
+ return commentEnd
+ }
+ return nok(code)
+ }
+
+ /**
+ * In comment.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function comment(code) {
+ if (code === null) {
+ return nok(code)
+ }
+ if (code === 45) {
+ effects.consume(code)
+ return commentClose
+ }
+ if (markdownLineEnding(code)) {
+ returnState = comment
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return comment
+ }
+
+ /**
+ * In comment, after `-`.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function commentClose(code) {
+ if (code === 45) {
+ effects.consume(code)
+ return commentEnd
+ }
+ return comment(code)
+ }
+
+ /**
+ * In comment, after `--`.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function commentEnd(code) {
+ return code === 62
+ ? end(code)
+ : code === 45
+ ? commentClose(code)
+ : comment(code)
+ }
+
+ /**
+ * After ` | a &<]]> b
+ * ^^^^^^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdataOpenInside(code) {
+ const value = 'CDATA['
+ if (code === value.charCodeAt(index++)) {
+ effects.consume(code)
+ return index === value.length ? cdata : cdataOpenInside
+ }
+ return nok(code)
+ }
+
+ /**
+ * In CDATA.
+ *
+ * ```markdown
+ * > | a &<]]> b
+ * ^^^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdata(code) {
+ if (code === null) {
+ return nok(code)
+ }
+ if (code === 93) {
+ effects.consume(code)
+ return cdataClose
+ }
+ if (markdownLineEnding(code)) {
+ returnState = cdata
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return cdata
+ }
+
+ /**
+ * In CDATA, after `]`, at another `]`.
+ *
+ * ```markdown
+ * > | a &<]]> b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdataClose(code) {
+ if (code === 93) {
+ effects.consume(code)
+ return cdataEnd
+ }
+ return cdata(code)
+ }
+
+ /**
+ * In CDATA, after `]]`, at `>`.
+ *
+ * ```markdown
+ * > | a &<]]> b
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function cdataEnd(code) {
+ if (code === 62) {
+ return end(code)
+ }
+ if (code === 93) {
+ effects.consume(code)
+ return cdataEnd
+ }
+ return cdata(code)
+ }
+
+ /**
+ * In declaration.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function declaration(code) {
+ if (code === null || code === 62) {
+ return end(code)
+ }
+ if (markdownLineEnding(code)) {
+ returnState = declaration
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return declaration
+ }
+
+ /**
+ * In instruction.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function instruction(code) {
+ if (code === null) {
+ return nok(code)
+ }
+ if (code === 63) {
+ effects.consume(code)
+ return instructionClose
+ }
+ if (markdownLineEnding(code)) {
+ returnState = instruction
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return instruction
+ }
+
+ /**
+ * In instruction, after `?`, at `>`.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function instructionClose(code) {
+ return code === 62 ? end(code) : instruction(code)
+ }
+
+ /**
+ * After ``, in closing tag, at tag name.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagCloseStart(code) {
+ // ASCII alphabetical.
+ if (asciiAlpha(code)) {
+ effects.consume(code)
+ return tagClose
+ }
+ return nok(code)
+ }
+
+ /**
+ * After ` | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagClose(code) {
+ // ASCII alphanumerical and `-`.
+ if (code === 45 || asciiAlphanumeric(code)) {
+ effects.consume(code)
+ return tagClose
+ }
+ return tagCloseBetween(code)
+ }
+
+ /**
+ * In closing tag, after tag name.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagCloseBetween(code) {
+ if (markdownLineEnding(code)) {
+ returnState = tagCloseBetween
+ return lineEndingBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return tagCloseBetween
+ }
+ return end(code)
+ }
+
+ /**
+ * After ` | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpen(code) {
+ // ASCII alphanumerical and `-`.
+ if (code === 45 || asciiAlphanumeric(code)) {
+ effects.consume(code)
+ return tagOpen
+ }
+ if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
+ return tagOpenBetween(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * In opening tag, after tag name.
+ *
+ * ```markdown
+ * > | a c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenBetween(code) {
+ if (code === 47) {
+ effects.consume(code)
+ return end
+ }
+
+ // ASCII alphabetical and `:` and `_`.
+ if (code === 58 || code === 95 || asciiAlpha(code)) {
+ effects.consume(code)
+ return tagOpenAttributeName
+ }
+ if (markdownLineEnding(code)) {
+ returnState = tagOpenBetween
+ return lineEndingBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return tagOpenBetween
+ }
+ return end(code)
+ }
+
+ /**
+ * In attribute name.
+ *
+ * ```markdown
+ * > | a d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeName(code) {
+ // ASCII alphabetical and `-`, `.`, `:`, and `_`.
+ if (
+ code === 45 ||
+ code === 46 ||
+ code === 58 ||
+ code === 95 ||
+ asciiAlphanumeric(code)
+ ) {
+ effects.consume(code)
+ return tagOpenAttributeName
+ }
+ return tagOpenAttributeNameAfter(code)
+ }
+
+ /**
+ * After attribute name, before initializer, the end of the tag, or
+ * whitespace.
+ *
+ * ```markdown
+ * > | a d
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeNameAfter(code) {
+ if (code === 61) {
+ effects.consume(code)
+ return tagOpenAttributeValueBefore
+ }
+ if (markdownLineEnding(code)) {
+ returnState = tagOpenAttributeNameAfter
+ return lineEndingBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return tagOpenAttributeNameAfter
+ }
+ return tagOpenBetween(code)
+ }
+
+ /**
+ * Before unquoted, double quoted, or single quoted attribute value, allowing
+ * whitespace.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeValueBefore(code) {
+ if (
+ code === null ||
+ code === 60 ||
+ code === 61 ||
+ code === 62 ||
+ code === 96
+ ) {
+ return nok(code)
+ }
+ if (code === 34 || code === 39) {
+ effects.consume(code)
+ marker = code
+ return tagOpenAttributeValueQuoted
+ }
+ if (markdownLineEnding(code)) {
+ returnState = tagOpenAttributeValueBefore
+ return lineEndingBefore(code)
+ }
+ if (markdownSpace(code)) {
+ effects.consume(code)
+ return tagOpenAttributeValueBefore
+ }
+ effects.consume(code)
+ return tagOpenAttributeValueUnquoted
+ }
+
+ /**
+ * In double or single quoted attribute value.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeValueQuoted(code) {
+ if (code === marker) {
+ effects.consume(code)
+ marker = undefined
+ return tagOpenAttributeValueQuotedAfter
+ }
+ if (code === null) {
+ return nok(code)
+ }
+ if (markdownLineEnding(code)) {
+ returnState = tagOpenAttributeValueQuoted
+ return lineEndingBefore(code)
+ }
+ effects.consume(code)
+ return tagOpenAttributeValueQuoted
+ }
+
+ /**
+ * In unquoted attribute value.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeValueUnquoted(code) {
+ if (
+ code === null ||
+ code === 34 ||
+ code === 39 ||
+ code === 60 ||
+ code === 61 ||
+ code === 96
+ ) {
+ return nok(code)
+ }
+ if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
+ return tagOpenBetween(code)
+ }
+ effects.consume(code)
+ return tagOpenAttributeValueUnquoted
+ }
+
+ /**
+ * After double or single quoted attribute value, before whitespace or the end
+ * of the tag.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function tagOpenAttributeValueQuotedAfter(code) {
+ if (code === 47 || code === 62 || markdownLineEndingOrSpace(code)) {
+ return tagOpenBetween(code)
+ }
+ return nok(code)
+ }
+
+ /**
+ * In certain circumstances of a tag where only an `>` is allowed.
+ *
+ * ```markdown
+ * > | a e
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function end(code) {
+ if (code === 62) {
+ effects.consume(code)
+ effects.exit('htmlTextData')
+ effects.exit('htmlText')
+ return ok
+ }
+ return nok(code)
+ }
+
+ /**
+ * At eol.
+ *
+ * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
+ * > empty tokens.
+ *
+ * ```markdown
+ * > | a
+ * ```
+ *
+ * @type {State}
+ */
+ function lineEndingBefore(code) {
+ effects.exit('htmlTextData')
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return lineEndingAfter
+ }
+
+ /**
+ * After eol, at optional whitespace.
+ *
+ * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
+ * > empty tokens.
+ *
+ * ```markdown
+ * | a
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function lineEndingAfter(code) {
+ // Always populated by defaults.
+
+ return markdownSpace(code)
+ ? factorySpace(
+ effects,
+ lineEndingAfterPrefix,
+ 'linePrefix',
+ self.parser.constructs.disable.null.includes('codeIndented')
+ ? undefined
+ : 4
+ )(code)
+ : lineEndingAfterPrefix(code)
+ }
+
+ /**
+ * After eol, after optional whitespace.
+ *
+ * > 👉 **Note**: we can’t have blank lines in text, so no need to worry about
+ * > empty tokens.
+ *
+ * ```markdown
+ * | a
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function lineEndingAfterPrefix(code) {
+ effects.enter('htmlTextData')
+ return returnState(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/label-start-link.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+
+/** @type {Construct} */
+const labelStartLink = {
+ name: 'labelStartLink',
+ tokenize: tokenizeLabelStartLink,
+ resolveAll: labelEnd.resolveAll
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeLabelStartLink(effects, ok, nok) {
+ const self = this
+ return start
+
+ /**
+ * Start of label (link) start.
+ *
+ * ```markdown
+ * > | a [b] c
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('labelLink')
+ effects.enter('labelMarker')
+ effects.consume(code)
+ effects.exit('labelMarker')
+ effects.exit('labelLink')
+ return after
+ }
+
+ /** @type {State} */
+ function after(code) {
+ // To do: this isn’t needed in `micromark-extension-gfm-footnote`,
+ // remove.
+ // Hidden footnotes hook.
+ /* c8 ignore next 3 */
+ return code === 94 && '_hiddenFootnoteSupport' in self.parser.constructs
+ ? nok(code)
+ : ok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/hard-break-escape.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+/** @type {Construct} */
+const hardBreakEscape = {
+ name: 'hardBreakEscape',
+ tokenize: tokenizeHardBreakEscape
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeHardBreakEscape(effects, ok, nok) {
+ return start
+
+ /**
+ * Start of a hard break (escape).
+ *
+ * ```markdown
+ * > | a\
+ * ^
+ * | b
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('hardBreakEscape')
+ effects.consume(code)
+ return after
+ }
+
+ /**
+ * After `\`, at eol.
+ *
+ * ```markdown
+ * > | a\
+ * ^
+ * | b
+ * ```
+ *
+ * @type {State}
+ */
+ function after(code) {
+ if (markdownLineEnding(code)) {
+ effects.exit('hardBreakEscape')
+ return ok(code)
+ }
+ return nok(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-core-commonmark/lib/code-text.js
+/**
+ * @typedef {import('micromark-util-types').Construct} Construct
+ * @typedef {import('micromark-util-types').Previous} Previous
+ * @typedef {import('micromark-util-types').Resolver} Resolver
+ * @typedef {import('micromark-util-types').State} State
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Tokenizer} Tokenizer
+ */
+
+
+/** @type {Construct} */
+const codeText = {
+ name: 'codeText',
+ tokenize: tokenizeCodeText,
+ resolve: resolveCodeText,
+ previous
+}
+
+// To do: next major: don’t resolve, like `markdown-rs`.
+/** @type {Resolver} */
+function resolveCodeText(events) {
+ let tailExitIndex = events.length - 4
+ let headEnterIndex = 3
+ /** @type {number} */
+ let index
+ /** @type {number | undefined} */
+ let enter
+
+ // If we start and end with an EOL or a space.
+ if (
+ (events[headEnterIndex][1].type === 'lineEnding' ||
+ events[headEnterIndex][1].type === 'space') &&
+ (events[tailExitIndex][1].type === 'lineEnding' ||
+ events[tailExitIndex][1].type === 'space')
+ ) {
+ index = headEnterIndex
+
+ // And we have data.
+ while (++index < tailExitIndex) {
+ if (events[index][1].type === 'codeTextData') {
+ // Then we have padding.
+ events[headEnterIndex][1].type = 'codeTextPadding'
+ events[tailExitIndex][1].type = 'codeTextPadding'
+ headEnterIndex += 2
+ tailExitIndex -= 2
+ break
+ }
+ }
+ }
+
+ // Merge adjacent spaces and data.
+ index = headEnterIndex - 1
+ tailExitIndex++
+ while (++index <= tailExitIndex) {
+ if (enter === undefined) {
+ if (index !== tailExitIndex && events[index][1].type !== 'lineEnding') {
+ enter = index
+ }
+ } else if (
+ index === tailExitIndex ||
+ events[index][1].type === 'lineEnding'
+ ) {
+ events[enter][1].type = 'codeTextData'
+ if (index !== enter + 2) {
+ events[enter][1].end = events[index - 1][1].end
+ events.splice(enter + 2, index - enter - 2)
+ tailExitIndex -= index - enter - 2
+ index = enter + 2
+ }
+ enter = undefined
+ }
+ }
+ return events
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Previous}
+ */
+function previous(code) {
+ // If there is a previous code, there will always be a tail.
+ return (
+ code !== 96 ||
+ this.events[this.events.length - 1][1].type === 'characterEscape'
+ )
+}
+
+/**
+ * @this {TokenizeContext}
+ * @type {Tokenizer}
+ */
+function tokenizeCodeText(effects, ok, nok) {
+ const self = this
+ let sizeOpen = 0
+ /** @type {number} */
+ let size
+ /** @type {Token} */
+ let token
+ return start
+
+ /**
+ * Start of code (text).
+ *
+ * ```markdown
+ * > | `a`
+ * ^
+ * > | \`a`
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function start(code) {
+ effects.enter('codeText')
+ effects.enter('codeTextSequence')
+ return sequenceOpen(code)
+ }
+
+ /**
+ * In opening sequence.
+ *
+ * ```markdown
+ * > | `a`
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceOpen(code) {
+ if (code === 96) {
+ effects.consume(code)
+ sizeOpen++
+ return sequenceOpen
+ }
+ effects.exit('codeTextSequence')
+ return between(code)
+ }
+
+ /**
+ * Between something and something else.
+ *
+ * ```markdown
+ * > | `a`
+ * ^^
+ * ```
+ *
+ * @type {State}
+ */
+ function between(code) {
+ // EOF.
+ if (code === null) {
+ return nok(code)
+ }
+
+ // To do: next major: don’t do spaces in resolve, but when compiling,
+ // like `markdown-rs`.
+ // Tabs don’t work, and virtual spaces don’t make sense.
+ if (code === 32) {
+ effects.enter('space')
+ effects.consume(code)
+ effects.exit('space')
+ return between
+ }
+
+ // Closing fence? Could also be data.
+ if (code === 96) {
+ token = effects.enter('codeTextSequence')
+ size = 0
+ return sequenceClose(code)
+ }
+ if (markdownLineEnding(code)) {
+ effects.enter('lineEnding')
+ effects.consume(code)
+ effects.exit('lineEnding')
+ return between
+ }
+
+ // Data.
+ effects.enter('codeTextData')
+ return data(code)
+ }
+
+ /**
+ * In data.
+ *
+ * ```markdown
+ * > | `a`
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function data(code) {
+ if (
+ code === null ||
+ code === 32 ||
+ code === 96 ||
+ markdownLineEnding(code)
+ ) {
+ effects.exit('codeTextData')
+ return between(code)
+ }
+ effects.consume(code)
+ return data
+ }
+
+ /**
+ * In closing sequence.
+ *
+ * ```markdown
+ * > | `a`
+ * ^
+ * ```
+ *
+ * @type {State}
+ */
+ function sequenceClose(code) {
+ // More.
+ if (code === 96) {
+ effects.consume(code)
+ size++
+ return sequenceClose
+ }
+
+ // Done!
+ if (size === sizeOpen) {
+ effects.exit('codeTextSequence')
+ effects.exit('codeText')
+ return ok(code)
+ }
+
+ // More or less accents: mark as data.
+ token.type = 'codeTextData'
+ return data(code)
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/constructs.js
+/**
+ * @typedef {import('micromark-util-types').Extension} Extension
+ */
+
+
+
+
+/** @satisfies {Extension['document']} */
+const constructs_document = {
+ [42]: list,
+ [43]: list,
+ [45]: list,
+ [48]: list,
+ [49]: list,
+ [50]: list,
+ [51]: list,
+ [52]: list,
+ [53]: list,
+ [54]: list,
+ [55]: list,
+ [56]: list,
+ [57]: list,
+ [62]: blockQuote
+}
+
+/** @satisfies {Extension['contentInitial']} */
+const contentInitial = {
+ [91]: definition
+}
+
+/** @satisfies {Extension['flowInitial']} */
+const flowInitial = {
+ [-2]: codeIndented,
+ [-1]: codeIndented,
+ [32]: codeIndented
+}
+
+/** @satisfies {Extension['flow']} */
+const constructs_flow = {
+ [35]: headingAtx,
+ [42]: thematicBreak,
+ [45]: [setextUnderline, thematicBreak],
+ [60]: htmlFlow,
+ [61]: setextUnderline,
+ [95]: thematicBreak,
+ [96]: codeFenced,
+ [126]: codeFenced
+}
+
+/** @satisfies {Extension['string']} */
+const constructs_string = {
+ [38]: characterReference,
+ [92]: characterEscape
+}
+
+/** @satisfies {Extension['text']} */
+const constructs_text = {
+ [-5]: lineEnding,
+ [-4]: lineEnding,
+ [-3]: lineEnding,
+ [33]: labelStartImage,
+ [38]: characterReference,
+ [42]: attention,
+ [60]: [autolink, htmlText],
+ [91]: labelStartLink,
+ [92]: [hardBreakEscape, characterEscape],
+ [93]: labelEnd,
+ [95]: attention,
+ [96]: codeText
+}
+
+/** @satisfies {Extension['insideSpan']} */
+const insideSpan = {
+ null: [attention, resolver]
+}
+
+/** @satisfies {Extension['attentionMarkers']} */
+const attentionMarkers = {
+ null: [42, 95]
+}
+
+/** @satisfies {Extension['disable']} */
+const disable = {
+ null: []
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/parse.js
+/**
+ * @typedef {import('micromark-util-types').Create} Create
+ * @typedef {import('micromark-util-types').FullNormalizedExtension} FullNormalizedExtension
+ * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct
+ * @typedef {import('micromark-util-types').ParseContext} ParseContext
+ * @typedef {import('micromark-util-types').ParseOptions} ParseOptions
+ */
+
+
+
+
+
+
+
+
+
+/**
+ * @param {ParseOptions | null | undefined} [options]
+ * @returns {ParseContext}
+ */
+function parse(options) {
+ const settings = options || {}
+ const constructs =
+ /** @type {FullNormalizedExtension} */
+ combineExtensions([constructs_namespaceObject, ...(settings.extensions || [])])
+
+ /** @type {ParseContext} */
+ const parser = {
+ defined: [],
+ lazy: {},
+ constructs,
+ content: create(content),
+ document: create(document_document),
+ flow: create(flow),
+ string: create(string),
+ text: create(text_text)
+ }
+ return parser
+
+ /**
+ * @param {InitialConstruct} initial
+ */
+ function create(initial) {
+ return creator
+ /** @type {Create} */
+ function creator(from) {
+ return createTokenizer(parser, initial, from)
+ }
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/preprocess.js
+/**
+ * @typedef {import('micromark-util-types').Chunk} Chunk
+ * @typedef {import('micromark-util-types').Code} Code
+ * @typedef {import('micromark-util-types').Encoding} Encoding
+ * @typedef {import('micromark-util-types').Value} Value
+ */
+
+/**
+ * @callback Preprocessor
+ * @param {Value} value
+ * @param {Encoding | null | undefined} [encoding]
+ * @param {boolean | null | undefined} [end=false]
+ * @returns {Array}
+ */
+
+const search = /[\0\t\n\r]/g
+
+/**
+ * @returns {Preprocessor}
+ */
+function preprocess() {
+ let column = 1
+ let buffer = ''
+ /** @type {boolean | undefined} */
+ let start = true
+ /** @type {boolean | undefined} */
+ let atCarriageReturn
+ return preprocessor
+
+ /** @type {Preprocessor} */
+ function preprocessor(value, encoding, end) {
+ /** @type {Array} */
+ const chunks = []
+ /** @type {RegExpMatchArray | null} */
+ let match
+ /** @type {number} */
+ let next
+ /** @type {number} */
+ let startPosition
+ /** @type {number} */
+ let endPosition
+ /** @type {Code} */
+ let code
+
+ // @ts-expect-error `Buffer` does allow an encoding.
+ value = buffer + value.toString(encoding)
+ startPosition = 0
+ buffer = ''
+ if (start) {
+ // To do: `markdown-rs` actually parses BOMs (byte order mark).
+ if (value.charCodeAt(0) === 65279) {
+ startPosition++
+ }
+ start = undefined
+ }
+ while (startPosition < value.length) {
+ search.lastIndex = startPosition
+ match = search.exec(value)
+ endPosition =
+ match && match.index !== undefined ? match.index : value.length
+ code = value.charCodeAt(endPosition)
+ if (!match) {
+ buffer = value.slice(startPosition)
+ break
+ }
+ if (code === 10 && startPosition === endPosition && atCarriageReturn) {
+ chunks.push(-3)
+ atCarriageReturn = undefined
+ } else {
+ if (atCarriageReturn) {
+ chunks.push(-5)
+ atCarriageReturn = undefined
+ }
+ if (startPosition < endPosition) {
+ chunks.push(value.slice(startPosition, endPosition))
+ column += endPosition - startPosition
+ }
+ switch (code) {
+ case 0: {
+ chunks.push(65533)
+ column++
+ break
+ }
+ case 9: {
+ next = Math.ceil(column / 4) * 4
+ chunks.push(-2)
+ while (column++ < next) chunks.push(-1)
+ break
+ }
+ case 10: {
+ chunks.push(-4)
+ column = 1
+ break
+ }
+ default: {
+ atCarriageReturn = true
+ column = 1
+ }
+ }
+ }
+ startPosition = endPosition + 1
+ }
+ if (end) {
+ if (atCarriageReturn) chunks.push(-5)
+ if (buffer) chunks.push(buffer)
+ chunks.push(null)
+ }
+ return chunks
+ }
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark/lib/postprocess.js
+/**
+ * @typedef {import('micromark-util-types').Event} Event
+ */
+
+
+
+/**
+ * @param {Array} events
+ * @returns {Array}
+ */
+function postprocess(events) {
+ while (!subtokenize(events)) {
+ // Empty
+ }
+ return events
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-numeric-character-reference/index.js
+/**
+ * Turn the number (in string form as either hexa- or plain decimal) coming from
+ * a numeric character reference into a character.
+ *
+ * Sort of like `String.fromCharCode(Number.parseInt(value, base))`, but makes
+ * non-characters and control characters safe.
+ *
+ * @param {string} value
+ * Value to decode.
+ * @param {number} base
+ * Numeric base.
+ * @returns {string}
+ * Character.
+ */
+function decodeNumericCharacterReference(value, base) {
+ const code = Number.parseInt(value, base)
+ if (
+ // C0 except for HT, LF, FF, CR, space.
+ code < 9 ||
+ code === 11 ||
+ (code > 13 && code < 32) ||
+ // Control character (DEL) of C0, and C1 controls.
+ (code > 126 && code < 160) ||
+ // Lone high surrogates and low surrogates.
+ (code > 55295 && code < 57344) ||
+ // Noncharacters.
+ (code > 64975 && code < 65008) /* eslint-disable no-bitwise */ ||
+ (code & 65535) === 65535 ||
+ (code & 65535) === 65534 /* eslint-enable no-bitwise */ ||
+ // Out of range
+ code > 1114111
+ ) {
+ return '\uFFFD'
+ }
+ return String.fromCharCode(code)
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/micromark-util-decode-string/index.js
+
+
+const characterEscapeOrReference =
+ /\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi
+
+/**
+ * Decode markdown strings (which occur in places such as fenced code info
+ * strings, destinations, labels, and titles).
+ *
+ * The “string” content type allows character escapes and -references.
+ * This decodes those.
+ *
+ * @param {string} value
+ * Value to decode.
+ * @returns {string}
+ * Decoded value.
+ */
+function decodeString(value) {
+ return value.replace(characterEscapeOrReference, decode)
+}
+
+/**
+ * @param {string} $0
+ * @param {string} $1
+ * @param {string} $2
+ * @returns {string}
+ */
+function decode($0, $1, $2) {
+ if ($1) {
+ // Escape.
+ return $1
+ }
+
+ // Reference.
+ const head = $2.charCodeAt(0)
+ if (head === 35) {
+ const head = $2.charCodeAt(1)
+ const hex = head === 120 || head === 88
+ return decodeNumericCharacterReference($2.slice(hex ? 2 : 1), hex ? 16 : 10)
+ }
+ return decodeNamedCharacterReference($2) || $0
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/unist-util-stringify-position/lib/index.js
+/**
+ * @typedef {import('unist').Node} Node
+ * @typedef {import('unist').Point} Point
+ * @typedef {import('unist').Position} Position
+ */
+
+/**
+ * @typedef NodeLike
+ * @property {string} type
+ * @property {PositionLike | null | undefined} [position]
+ *
+ * @typedef PositionLike
+ * @property {PointLike | null | undefined} [start]
+ * @property {PointLike | null | undefined} [end]
+ *
+ * @typedef PointLike
+ * @property {number | null | undefined} [line]
+ * @property {number | null | undefined} [column]
+ * @property {number | null | undefined} [offset]
+ */
+
+/**
+ * Serialize the positional info of a point, position (start and end points),
+ * or node.
+ *
+ * @param {Node | NodeLike | Position | PositionLike | Point | PointLike | null | undefined} [value]
+ * Node, position, or point.
+ * @returns {string}
+ * Pretty printed positional info of a node (`string`).
+ *
+ * In the format of a range `ls:cs-le:ce` (when given `node` or `position`)
+ * or a point `l:c` (when given `point`), where `l` stands for line, `c` for
+ * column, `s` for `start`, and `e` for end.
+ * An empty string (`''`) is returned if the given value is neither `node`,
+ * `position`, nor `point`.
+ */
+function stringifyPosition(value) {
+ // Nothing.
+ if (!value || typeof value !== 'object') {
+ return ''
+ }
+
+ // Node.
+ if ('position' in value || 'type' in value) {
+ return position(value.position)
+ }
+
+ // Position.
+ if ('start' in value || 'end' in value) {
+ return position(value)
+ }
+
+ // Point.
+ if ('line' in value || 'column' in value) {
+ return point(value)
+ }
+
+ // ?
+ return ''
+}
+
+/**
+ * @param {Point | PointLike | null | undefined} point
+ * @returns {string}
+ */
+function point(point) {
+ return index(point && point.line) + ':' + index(point && point.column)
+}
+
+/**
+ * @param {Position | PositionLike | null | undefined} pos
+ * @returns {string}
+ */
+function position(pos) {
+ return point(pos && pos.start) + '-' + point(pos && pos.end)
+}
+
+/**
+ * @param {number | null | undefined} value
+ * @returns {number}
+ */
+function index(value) {
+ return value && typeof value === 'number' ? value : 1
+}
+
+;// CONCATENATED MODULE: ./node_modules/mermaid/node_modules/mdast-util-from-markdown/lib/index.js
+/**
+ * @typedef {import('micromark-util-types').Encoding} Encoding
+ * @typedef {import('micromark-util-types').Event} Event
+ * @typedef {import('micromark-util-types').ParseOptions} ParseOptions
+ * @typedef {import('micromark-util-types').Token} Token
+ * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext
+ * @typedef {import('micromark-util-types').Value} Value
+ *
+ * @typedef {import('unist').Parent} UnistParent
+ * @typedef {import('unist').Point} Point
+ *
+ * @typedef {import('mdast').PhrasingContent} PhrasingContent
+ * @typedef {import('mdast').StaticPhrasingContent} StaticPhrasingContent
+ * @typedef {import('mdast').Content} Content
+ * @typedef {import('mdast').Break} Break
+ * @typedef {import('mdast').Blockquote} Blockquote
+ * @typedef {import('mdast').Code} Code
+ * @typedef {import('mdast').Definition} Definition
+ * @typedef {import('mdast').Emphasis} Emphasis
+ * @typedef {import('mdast').Heading} Heading
+ * @typedef {import('mdast').HTML} HTML
+ * @typedef {import('mdast').Image} Image
+ * @typedef {import('mdast').ImageReference} ImageReference
+ * @typedef {import('mdast').InlineCode} InlineCode
+ * @typedef {import('mdast').Link} Link
+ * @typedef {import('mdast').LinkReference} LinkReference
+ * @typedef {import('mdast').List} List
+ * @typedef {import('mdast').ListItem} ListItem
+ * @typedef {import('mdast').Paragraph} Paragraph
+ * @typedef {import('mdast').Root} Root
+ * @typedef {import('mdast').Strong} Strong
+ * @typedef {import('mdast').Text} Text
+ * @typedef {import('mdast').ThematicBreak} ThematicBreak
+ * @typedef {import('mdast').ReferenceType} ReferenceType
+ * @typedef {import('../index.js').CompileData} CompileData
+ */
+
+/**
+ * @typedef {Root | Content} Node
+ * @typedef {Extract} Parent
+ *
+ * @typedef {Omit & {type: 'fragment', children: Array}} Fragment
+ */
+
+/**
+ * @callback Transform
+ * Extra transform, to change the AST afterwards.
+ * @param {Root} tree
+ * Tree to transform.
+ * @returns {Root | undefined | null | void}
+ * New tree or nothing (in which case the current tree is used).
+ *
+ * @callback Handle
+ * Handle a token.
+ * @param {CompileContext} this
+ * Context.
+ * @param {Token} token
+ * Current token.
+ * @returns {void}
+ * Nothing.
+ *
+ * @typedef {Record} Handles
+ * Token types mapping to handles
+ *
+ * @callback OnEnterError
+ * Handle the case where the `right` token is open, but it is closed (by the
+ * `left` token) or because we reached the end of the document.
+ * @param {Omit} this
+ * Context.
+ * @param {Token | undefined} left
+ * Left token.
+ * @param {Token} right
+ * Right token.
+ * @returns {void}
+ * Nothing.
+ *
+ * @callback OnExitError
+ * Handle the case where the `right` token is open but it is closed by
+ * exiting the `left` token.
+ * @param {Omit} this
+ * Context.
+ * @param {Token} left
+ * Left token.
+ * @param {Token} right
+ * Right token.
+ * @returns {void}
+ * Nothing.
+ *
+ * @typedef {[Token, OnEnterError | undefined]} TokenTuple
+ * Open token on the stack, with an optional error handler for when
+ * that token isn’t closed properly.
+ */
+
+/**
+ * @typedef Config
+ * Configuration.
+ *
+ * We have our defaults, but extensions will add more.
+ * @property {Array} canContainEols
+ * Token types where line endings are used.
+ * @property {Handles} enter
+ * Opening handles.
+ * @property {Handles} exit
+ * Closing handles.
+ * @property {Array} transforms
+ * Tree transforms.
+ *
+ * @typedef {Partial} Extension
+ * Change how markdown tokens from micromark are turned into mdast.
+ *
+ * @typedef CompileContext
+ * mdast compiler context.
+ * @property {Array} stack
+ * Stack of nodes.
+ * @property {Array} tokenStack
+ * Stack of tokens.
+ * @property {(key: Key) => CompileData[Key]} getData
+ * Get data from the key/value store.
+ * @property {(key: Key, value?: CompileData[Key]) => void} setData
+ * Set data into the key/value store.
+ * @property {(this: CompileContext) => void} buffer
+ * Capture some of the output data.
+ * @property {(this: CompileContext) => string} resume
+ * Stop capturing and access the output data.
+ * @property {(this: CompileContext, node: Kind, token: Token, onError?: OnEnterError) => Kind} enter
+ * Enter a token.
+ * @property {(this: CompileContext, token: Token, onError?: OnExitError) => Node} exit
+ * Exit a token.
+ * @property {TokenizeContext['sliceSerialize']} sliceSerialize
+ * Get the string value of a token.
+ * @property {Config} config
+ * Configuration.
+ *
+ * @typedef FromMarkdownOptions
+ * Configuration for how to build mdast.
+ * @property {Array> | null | undefined} [mdastExtensions]
+ * Extensions for this utility to change how tokens are turned into a tree.
+ *
+ * @typedef {ParseOptions & FromMarkdownOptions} Options
+ * Configuration.
+ */
+
+// To do: micromark: create a registry of tokens?
+// To do: next major: don’t return given `Node` from `enter`.
+// To do: next major: remove setter/getter.
+
+
+
+
+
+
+
+
+
+
+const lib_own = {}.hasOwnProperty
+
+/**
+ * @param value
+ * Markdown to parse.
+ * @param encoding
+ * Character encoding for when `value` is `Buffer`.
+ * @param options
+ * Configuration.
+ * @returns
+ * mdast tree.
+ */
+const fromMarkdown =
+ /**
+ * @type {(
+ * ((value: Value, encoding: Encoding, options?: Options | null | undefined) => Root) &
+ * ((value: Value, options?: Options | null | undefined) => Root)
+ * )}
+ */
+
+ /**
+ * @param {Value} value
+ * @param {Encoding | Options | null | undefined} [encoding]
+ * @param {Options | null | undefined} [options]
+ * @returns {Root}
+ */
+ function (value, encoding, options) {
+ if (typeof encoding !== 'string') {
+ options = encoding
+ encoding = undefined
+ }
+ return compiler(options)(
+ postprocess(
+ parse(options).document().write(preprocess()(value, encoding, true))
+ )
+ )
+ }
+
+/**
+ * Note this compiler only understand complete buffering, not streaming.
+ *
+ * @param {Options | null | undefined} [options]
+ */
+function compiler(options) {
+ /** @type {Config} */
+ const config = {
+ transforms: [],
+ canContainEols: ['emphasis', 'fragment', 'heading', 'paragraph', 'strong'],
+ enter: {
+ autolink: opener(link),
+ autolinkProtocol: onenterdata,
+ autolinkEmail: onenterdata,
+ atxHeading: opener(heading),
+ blockQuote: opener(blockQuote),
+ characterEscape: onenterdata,
+ characterReference: onenterdata,
+ codeFenced: opener(codeFlow),
+ codeFencedFenceInfo: buffer,
+ codeFencedFenceMeta: buffer,
+ codeIndented: opener(codeFlow, buffer),
+ codeText: opener(codeText, buffer),
+ codeTextData: onenterdata,
+ data: onenterdata,
+ codeFlowValue: onenterdata,
+ definition: opener(definition),
+ definitionDestinationString: buffer,
+ definitionLabelString: buffer,
+ definitionTitleString: buffer,
+ emphasis: opener(emphasis),
+ hardBreakEscape: opener(hardBreak),
+ hardBreakTrailing: opener(hardBreak),
+ htmlFlow: opener(html, buffer),
+ htmlFlowData: onenterdata,
+ htmlText: opener(html, buffer),
+ htmlTextData: onenterdata,
+ image: opener(image),
+ label: buffer,
+ link: opener(link),
+ listItem: opener(listItem),
+ listItemValue: onenterlistitemvalue,
+ listOrdered: opener(list, onenterlistordered),
+ listUnordered: opener(list),
+ paragraph: opener(paragraph),
+ reference: onenterreference,
+ referenceString: buffer,
+ resourceDestinationString: buffer,
+ resourceTitleString: buffer,
+ setextHeading: opener(heading),
+ strong: opener(strong),
+ thematicBreak: opener(thematicBreak)
+ },
+ exit: {
+ atxHeading: closer(),
+ atxHeadingSequence: onexitatxheadingsequence,
+ autolink: closer(),
+ autolinkEmail: onexitautolinkemail,
+ autolinkProtocol: onexitautolinkprotocol,
+ blockQuote: closer(),
+ characterEscapeValue: onexitdata,
+ characterReferenceMarkerHexadecimal: onexitcharacterreferencemarker,
+ characterReferenceMarkerNumeric: onexitcharacterreferencemarker,
+ characterReferenceValue: onexitcharacterreferencevalue,
+ codeFenced: closer(onexitcodefenced),
+ codeFencedFence: onexitcodefencedfence,
+ codeFencedFenceInfo: onexitcodefencedfenceinfo,
+ codeFencedFenceMeta: onexitcodefencedfencemeta,
+ codeFlowValue: onexitdata,
+ codeIndented: closer(onexitcodeindented),
+ codeText: closer(onexitcodetext),
+ codeTextData: onexitdata,
+ data: onexitdata,
+ definition: closer(),
+ definitionDestinationString: onexitdefinitiondestinationstring,
+ definitionLabelString: onexitdefinitionlabelstring,
+ definitionTitleString: onexitdefinitiontitlestring,
+ emphasis: closer(),
+ hardBreakEscape: closer(onexithardbreak),
+ hardBreakTrailing: closer(onexithardbreak),
+ htmlFlow: closer(onexithtmlflow),
+ htmlFlowData: onexitdata,
+ htmlText: closer(onexithtmltext),
+ htmlTextData: onexitdata,
+ image: closer(onexitimage),
+ label: onexitlabel,
+ labelText: onexitlabeltext,
+ lineEnding: onexitlineending,
+ link: closer(onexitlink),
+ listItem: closer(),
+ listOrdered: closer(),
+ listUnordered: closer(),
+ paragraph: closer(),
+ referenceString: onexitreferencestring,
+ resourceDestinationString: onexitresourcedestinationstring,
+ resourceTitleString: onexitresourcetitlestring,
+ resource: onexitresource,
+ setextHeading: closer(onexitsetextheading),
+ setextHeadingLineSequence: onexitsetextheadinglinesequence,
+ setextHeadingText: onexitsetextheadingtext,
+ strong: closer(),
+ thematicBreak: closer()
+ }
+ }
+ configure(config, (options || {}).mdastExtensions || [])
+
+ /** @type {CompileData} */
+ const data = {}
+ return compile
+
+ /**
+ * Turn micromark events into an mdast tree.
+ *
+ * @param {Array} events
+ * Events.
+ * @returns {Root}
+ * mdast tree.
+ */
+ function compile(events) {
+ /** @type {Root} */
+ let tree = {
+ type: 'root',
+ children: []
+ }
+ /** @type {Omit} */
+ const context = {
+ stack: [tree],
+ tokenStack: [],
+ config,
+ enter,
+ exit,
+ buffer,
+ resume,
+ setData,
+ getData
+ }
+ /** @type {Array} */
+ const listStack = []
+ let index = -1
+ while (++index < events.length) {
+ // We preprocess lists to add `listItem` tokens, and to infer whether
+ // items the list itself are spread out.
+ if (
+ events[index][1].type === 'listOrdered' ||
+ events[index][1].type === 'listUnordered'
+ ) {
+ if (events[index][0] === 'enter') {
+ listStack.push(index)
+ } else {
+ const tail = listStack.pop()
+ index = prepareList(events, tail, index)
+ }
+ }
+ }
+ index = -1
+ while (++index < events.length) {
+ const handler = config[events[index][0]]
+ if (lib_own.call(handler, events[index][1].type)) {
+ handler[events[index][1].type].call(
+ Object.assign(
+ {
+ sliceSerialize: events[index][2].sliceSerialize
+ },
+ context
+ ),
+ events[index][1]
+ )
+ }
+ }
+
+ // Handle tokens still being open.
+ if (context.tokenStack.length > 0) {
+ const tail = context.tokenStack[context.tokenStack.length - 1]
+ const handler = tail[1] || defaultOnError
+ handler.call(context, undefined, tail[0])
+ }
+
+ // Figure out `root` position.
+ tree.position = {
+ start: lib_point(
+ events.length > 0
+ ? events[0][1].start
+ : {
+ line: 1,
+ column: 1,
+ offset: 0
+ }
+ ),
+ end: lib_point(
+ events.length > 0
+ ? events[events.length - 2][1].end
+ : {
+ line: 1,
+ column: 1,
+ offset: 0
+ }
+ )
+ }
+
+ // Call transforms.
+ index = -1
+ while (++index < config.transforms.length) {
+ tree = config.transforms[index](tree) || tree
+ }
+ return tree
+ }
+
+ /**
+ * @param {Array} events
+ * @param {number} start
+ * @param {number} length
+ * @returns {number}
+ */
+ function prepareList(events, start, length) {
+ let index = start - 1
+ let containerBalance = -1
+ let listSpread = false
+ /** @type {Token | undefined} */
+ let listItem
+ /** @type {number | undefined} */
+ let lineIndex
+ /** @type {number | undefined} */
+ let firstBlankLineIndex
+ /** @type {boolean | undefined} */
+ let atMarker
+ while (++index <= length) {
+ const event = events[index]
+ if (
+ event[1].type === 'listUnordered' ||
+ event[1].type === 'listOrdered' ||
+ event[1].type === 'blockQuote'
+ ) {
+ if (event[0] === 'enter') {
+ containerBalance++
+ } else {
+ containerBalance--
+ }
+ atMarker = undefined
+ } else if (event[1].type === 'lineEndingBlank') {
+ if (event[0] === 'enter') {
+ if (
+ listItem &&
+ !atMarker &&
+ !containerBalance &&
+ !firstBlankLineIndex
+ ) {
+ firstBlankLineIndex = index
+ }
+ atMarker = undefined
+ }
+ } else if (
+ event[1].type === 'linePrefix' ||
+ event[1].type === 'listItemValue' ||
+ event[1].type === 'listItemMarker' ||
+ event[1].type === 'listItemPrefix' ||
+ event[1].type === 'listItemPrefixWhitespace'
+ ) {
+ // Empty.
+ } else {
+ atMarker = undefined
+ }
+ if (
+ (!containerBalance &&
+ event[0] === 'enter' &&
+ event[1].type === 'listItemPrefix') ||
+ (containerBalance === -1 &&
+ event[0] === 'exit' &&
+ (event[1].type === 'listUnordered' ||
+ event[1].type === 'listOrdered'))
+ ) {
+ if (listItem) {
+ let tailIndex = index
+ lineIndex = undefined
+ while (tailIndex--) {
+ const tailEvent = events[tailIndex]
+ if (
+ tailEvent[1].type === 'lineEnding' ||
+ tailEvent[1].type === 'lineEndingBlank'
+ ) {
+ if (tailEvent[0] === 'exit') continue
+ if (lineIndex) {
+ events[lineIndex][1].type = 'lineEndingBlank'
+ listSpread = true
+ }
+ tailEvent[1].type = 'lineEnding'
+ lineIndex = tailIndex
+ } else if (
+ tailEvent[1].type === 'linePrefix' ||
+ tailEvent[1].type === 'blockQuotePrefix' ||
+ tailEvent[1].type === 'blockQuotePrefixWhitespace' ||
+ tailEvent[1].type === 'blockQuoteMarker' ||
+ tailEvent[1].type === 'listItemIndent'
+ ) {
+ // Empty
+ } else {
+ break
+ }
+ }
+ if (
+ firstBlankLineIndex &&
+ (!lineIndex || firstBlankLineIndex < lineIndex)
+ ) {
+ listItem._spread = true
+ }
+
+ // Fix position.
+ listItem.end = Object.assign(
+ {},
+ lineIndex ? events[lineIndex][1].start : event[1].end
+ )
+ events.splice(lineIndex || index, 0, ['exit', listItem, event[2]])
+ index++
+ length++
+ }
+
+ // Create a new list item.
+ if (event[1].type === 'listItemPrefix') {
+ listItem = {
+ type: 'listItem',
+ _spread: false,
+ start: Object.assign({}, event[1].start),
+ // @ts-expect-error: we’ll add `end` in a second.
+ end: undefined
+ }
+ // @ts-expect-error: `listItem` is most definitely defined, TS...
+ events.splice(index, 0, ['enter', listItem, event[2]])
+ index++
+ length++
+ firstBlankLineIndex = undefined
+ atMarker = true
+ }
+ }
+ }
+ events[start][1]._spread = listSpread
+ return length
+ }
+
+ /**
+ * Set data.
+ *
+ * @template {keyof CompileData} Key
+ * Field type.
+ * @param {Key} key
+ * Key of field.
+ * @param {CompileData[Key]} [value]
+ * New value.
+ * @returns {void}
+ * Nothing.
+ */
+ function setData(key, value) {
+ data[key] = value
+ }
+
+ /**
+ * Get data.
+ *
+ * @template {keyof CompileData} Key
+ * Field type.
+ * @param {Key} key
+ * Key of field.
+ * @returns {CompileData[Key]}
+ * Value.
+ */
+ function getData(key) {
+ return data[key]
+ }
+
+ /**
+ * Create an opener handle.
+ *
+ * @param {(token: Token) => Node} create
+ * Create a node.
+ * @param {Handle} [and]
+ * Optional function to also run.
+ * @returns {Handle}
+ * Handle.
+ */
+ function opener(create, and) {
+ return open
+
+ /**
+ * @this {CompileContext}
+ * @param {Token} token
+ * @returns {void}
+ */
+ function open(token) {
+ enter.call(this, create(token), token)
+ if (and) and.call(this, token)
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @returns {void}
+ */
+ function buffer() {
+ this.stack.push({
+ type: 'fragment',
+ children: []
+ })
+ }
+
+ /**
+ * @template {Node} Kind
+ * Node type.
+ * @this {CompileContext}
+ * Context.
+ * @param {Kind} node
+ * Node to enter.
+ * @param {Token} token
+ * Corresponding token.
+ * @param {OnEnterError | undefined} [errorHandler]
+ * Handle the case where this token is open, but it is closed by something else.
+ * @returns {Kind}
+ * The given node.
+ */
+ function enter(node, token, errorHandler) {
+ const parent = this.stack[this.stack.length - 1]
+ // @ts-expect-error: Assume `Node` can exist as a child of `parent`.
+ parent.children.push(node)
+ this.stack.push(node)
+ this.tokenStack.push([token, errorHandler])
+ // @ts-expect-error: `end` will be patched later.
+ node.position = {
+ start: lib_point(token.start)
+ }
+ return node
+ }
+
+ /**
+ * Create a closer handle.
+ *
+ * @param {Handle} [and]
+ * Optional function to also run.
+ * @returns {Handle}
+ * Handle.
+ */
+ function closer(and) {
+ return close
+
+ /**
+ * @this {CompileContext}
+ * @param {Token} token
+ * @returns {void}
+ */
+ function close(token) {
+ if (and) and.call(this, token)
+ exit.call(this, token)
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * Context.
+ * @param {Token} token
+ * Corresponding token.
+ * @param {OnExitError | undefined} [onExitError]
+ * Handle the case where another token is open.
+ * @returns {Node}
+ * The closed node.
+ */
+ function exit(token, onExitError) {
+ const node = this.stack.pop()
+ const open = this.tokenStack.pop()
+ if (!open) {
+ throw new Error(
+ 'Cannot close `' +
+ token.type +
+ '` (' +
+ stringifyPosition({
+ start: token.start,
+ end: token.end
+ }) +
+ '): it’s not open'
+ )
+ } else if (open[0].type !== token.type) {
+ if (onExitError) {
+ onExitError.call(this, token, open[0])
+ } else {
+ const handler = open[1] || defaultOnError
+ handler.call(this, token, open[0])
+ }
+ }
+ node.position.end = lib_point(token.end)
+ return node
+ }
+
+ /**
+ * @this {CompileContext}
+ * @returns {string}
+ */
+ function resume() {
+ return lib_toString(this.stack.pop())
+ }
+
+ //
+ // Handlers.
+ //
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onenterlistordered() {
+ setData('expectingFirstListItemValue', true)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onenterlistitemvalue(token) {
+ if (getData('expectingFirstListItemValue')) {
+ const ancestor = this.stack[this.stack.length - 2]
+ ancestor.start = Number.parseInt(this.sliceSerialize(token), 10)
+ setData('expectingFirstListItemValue')
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodefencedfenceinfo() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.lang = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodefencedfencemeta() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.meta = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodefencedfence() {
+ // Exit if this is the closing fence.
+ if (getData('flowCodeInside')) return
+ this.buffer()
+ setData('flowCodeInside', true)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodefenced() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g, '')
+ setData('flowCodeInside')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcodeindented() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data.replace(/(\r?\n|\r)$/g, '')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitdefinitionlabelstring(token) {
+ const label = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.label = label
+ node.identifier = normalizeIdentifier(
+ this.sliceSerialize(token)
+ ).toLowerCase()
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitdefinitiontitlestring() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.title = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitdefinitiondestinationstring() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.url = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitatxheadingsequence(token) {
+ const node = this.stack[this.stack.length - 1]
+ if (!node.depth) {
+ const depth = this.sliceSerialize(token).length
+ node.depth = depth
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitsetextheadingtext() {
+ setData('setextHeadingSlurpLineEnding', true)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitsetextheadinglinesequence(token) {
+ const node = this.stack[this.stack.length - 1]
+ node.depth = this.sliceSerialize(token).charCodeAt(0) === 61 ? 1 : 2
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitsetextheading() {
+ setData('setextHeadingSlurpLineEnding')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onenterdata(token) {
+ const node = this.stack[this.stack.length - 1]
+ let tail = node.children[node.children.length - 1]
+ if (!tail || tail.type !== 'text') {
+ // Add a new text node.
+ tail = text()
+ // @ts-expect-error: we’ll add `end` later.
+ tail.position = {
+ start: lib_point(token.start)
+ }
+ // @ts-expect-error: Assume `parent` accepts `text`.
+ node.children.push(tail)
+ }
+ this.stack.push(tail)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitdata(token) {
+ const tail = this.stack.pop()
+ tail.value += this.sliceSerialize(token)
+ tail.position.end = lib_point(token.end)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitlineending(token) {
+ const context = this.stack[this.stack.length - 1]
+ // If we’re at a hard break, include the line ending in there.
+ if (getData('atHardBreak')) {
+ const tail = context.children[context.children.length - 1]
+ tail.position.end = lib_point(token.end)
+ setData('atHardBreak')
+ return
+ }
+ if (
+ !getData('setextHeadingSlurpLineEnding') &&
+ config.canContainEols.includes(context.type)
+ ) {
+ onenterdata.call(this, token)
+ onexitdata.call(this, token)
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexithardbreak() {
+ setData('atHardBreak', true)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexithtmlflow() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexithtmltext() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitcodetext() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.value = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitlink() {
+ const node = this.stack[this.stack.length - 1]
+ // Note: there are also `identifier` and `label` fields on this link node!
+ // These are used / cleaned here.
+ // To do: clean.
+ if (getData('inReference')) {
+ /** @type {ReferenceType} */
+ const referenceType = getData('referenceType') || 'shortcut'
+ node.type += 'Reference'
+ // @ts-expect-error: mutate.
+ node.referenceType = referenceType
+ // @ts-expect-error: mutate.
+ delete node.url
+ delete node.title
+ } else {
+ // @ts-expect-error: mutate.
+ delete node.identifier
+ // @ts-expect-error: mutate.
+ delete node.label
+ }
+ setData('referenceType')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitimage() {
+ const node = this.stack[this.stack.length - 1]
+ // Note: there are also `identifier` and `label` fields on this link node!
+ // These are used / cleaned here.
+ // To do: clean.
+ if (getData('inReference')) {
+ /** @type {ReferenceType} */
+ const referenceType = getData('referenceType') || 'shortcut'
+ node.type += 'Reference'
+ // @ts-expect-error: mutate.
+ node.referenceType = referenceType
+ // @ts-expect-error: mutate.
+ delete node.url
+ delete node.title
+ } else {
+ // @ts-expect-error: mutate.
+ delete node.identifier
+ // @ts-expect-error: mutate.
+ delete node.label
+ }
+ setData('referenceType')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitlabeltext(token) {
+ const string = this.sliceSerialize(token)
+ const ancestor = this.stack[this.stack.length - 2]
+ // @ts-expect-error: stash this on the node, as it might become a reference
+ // later.
+ ancestor.label = decodeString(string)
+ // @ts-expect-error: same as above.
+ ancestor.identifier = normalizeIdentifier(string).toLowerCase()
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitlabel() {
+ const fragment = this.stack[this.stack.length - 1]
+ const value = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ // Assume a reference.
+ setData('inReference', true)
+ if (node.type === 'link') {
+ /** @type {Array} */
+ // @ts-expect-error: Assume static phrasing content.
+ const children = fragment.children
+ node.children = children
+ } else {
+ node.alt = value
+ }
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitresourcedestinationstring() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.url = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitresourcetitlestring() {
+ const data = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ node.title = data
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitresource() {
+ setData('inReference')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onenterreference() {
+ setData('referenceType', 'collapsed')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitreferencestring(token) {
+ const label = this.resume()
+ const node = this.stack[this.stack.length - 1]
+ // @ts-expect-error: stash this on the node, as it might become a reference
+ // later.
+ node.label = label
+ // @ts-expect-error: same as above.
+ node.identifier = normalizeIdentifier(
+ this.sliceSerialize(token)
+ ).toLowerCase()
+ setData('referenceType', 'full')
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+
+ function onexitcharacterreferencemarker(token) {
+ setData('characterReferenceType', token.type)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitcharacterreferencevalue(token) {
+ const data = this.sliceSerialize(token)
+ const type = getData('characterReferenceType')
+ /** @type {string} */
+ let value
+ if (type) {
+ value = decodeNumericCharacterReference(
+ data,
+ type === 'characterReferenceMarkerNumeric' ? 10 : 16
+ )
+ setData('characterReferenceType')
+ } else {
+ const result = decodeNamedCharacterReference(data)
+ value = result
+ }
+ const tail = this.stack.pop()
+ tail.value += value
+ tail.position.end = lib_point(token.end)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitautolinkprotocol(token) {
+ onexitdata.call(this, token)
+ const node = this.stack[this.stack.length - 1]
+ node.url = this.sliceSerialize(token)
+ }
+
+ /**
+ * @this {CompileContext}
+ * @type {Handle}
+ */
+ function onexitautolinkemail(token) {
+ onexitdata.call(this, token)
+ const node = this.stack[this.stack.length - 1]
+ node.url = 'mailto:' + this.sliceSerialize(token)
+ }
+
+ //
+ // Creaters.
+ //
+
+ /** @returns {Blockquote} */
+ function blockQuote() {
+ return {
+ type: 'blockquote',
+ children: []
+ }
+ }
+
+ /** @returns {Code} */
+ function codeFlow() {
+ return {
+ type: 'code',
+ lang: null,
+ meta: null,
+ value: ''
+ }
+ }
+
+ /** @returns {InlineCode} */
+ function codeText() {
+ return {
+ type: 'inlineCode',
+ value: ''
+ }
+ }
+
+ /** @returns {Definition} */
+ function definition() {
+ return {
+ type: 'definition',
+ identifier: '',
+ label: null,
+ title: null,
+ url: ''
+ }
+ }
+
+ /** @returns {Emphasis} */
+ function emphasis() {
+ return {
+ type: 'emphasis',
+ children: []
+ }
+ }
+
+ /** @returns {Heading} */
+ function heading() {
+ // @ts-expect-error `depth` will be set later.
+ return {
+ type: 'heading',
+ depth: undefined,
+ children: []
+ }
+ }
+
+ /** @returns {Break} */
+ function hardBreak() {
+ return {
+ type: 'break'
+ }
+ }
+
+ /** @returns {HTML} */
+ function html() {
+ return {
+ type: 'html',
+ value: ''
+ }
+ }
+
+ /** @returns {Image} */
+ function image() {
+ return {
+ type: 'image',
+ title: null,
+ url: '',
+ alt: null
+ }
+ }
+
+ /** @returns {Link} */
+ function link() {
+ return {
+ type: 'link',
+ title: null,
+ url: '',
+ children: []
+ }
+ }
+
+ /**
+ * @param {Token} token
+ * @returns {List}
+ */
+ function list(token) {
+ return {
+ type: 'list',
+ ordered: token.type === 'listOrdered',
+ start: null,
+ spread: token._spread,
+ children: []
+ }
+ }
+
+ /**
+ * @param {Token} token
+ * @returns {ListItem}
+ */
+ function listItem(token) {
+ return {
+ type: 'listItem',
+ spread: token._spread,
+ checked: null,
+ children: []
+ }
+ }
+
+ /** @returns {Paragraph} */
+ function paragraph() {
+ return {
+ type: 'paragraph',
+ children: []
+ }
+ }
+
+ /** @returns {Strong} */
+ function strong() {
+ return {
+ type: 'strong',
+ children: []
+ }
+ }
+
+ /** @returns {Text} */
+ function text() {
+ return {
+ type: 'text',
+ value: ''
+ }
+ }
+
+ /** @returns {ThematicBreak} */
+ function thematicBreak() {
+ return {
+ type: 'thematicBreak'
+ }
+ }
+}
+
+/**
+ * Copy a point-like value.
+ *
+ * @param {Point} d
+ * Point-like value.
+ * @returns {Point}
+ * unist point.
+ */
+function lib_point(d) {
+ return {
+ line: d.line,
+ column: d.column,
+ offset: d.offset
+ }
+}
+
+/**
+ * @param {Config} combined
+ * @param {Array>} extensions
+ * @returns {void}
+ */
+function configure(combined, extensions) {
+ let index = -1
+ while (++index < extensions.length) {
+ const value = extensions[index]
+ if (Array.isArray(value)) {
+ configure(combined, value)
+ } else {
+ extension(combined, value)
+ }
+ }
+}
+
+/**
+ * @param {Config} combined
+ * @param {Extension} extension
+ * @returns {void}
+ */
+function extension(combined, extension) {
+ /** @type {keyof Extension} */
+ let key
+ for (key in extension) {
+ if (lib_own.call(extension, key)) {
+ if (key === 'canContainEols') {
+ const right = extension[key]
+ if (right) {
+ combined[key].push(...right)
+ }
+ } else if (key === 'transforms') {
+ const right = extension[key]
+ if (right) {
+ combined[key].push(...right)
+ }
+ } else if (key === 'enter' || key === 'exit') {
+ const right = extension[key]
+ if (right) {
+ Object.assign(combined[key], right)
+ }
+ }
+ }
+ }
+}
+
+/** @type {OnEnterError} */
+function defaultOnError(left, right) {
+ if (left) {
+ throw new Error(
+ 'Cannot close `' +
+ left.type +
+ '` (' +
+ stringifyPosition({
+ start: left.start,
+ end: left.end
+ }) +
+ '): a different token (`' +
+ right.type +
+ '`, ' +
+ stringifyPosition({
+ start: right.start,
+ end: right.end
+ }) +
+ ') is open'
+ )
+ } else {
+ throw new Error(
+ 'Cannot close document, a token (`' +
+ right.type +
+ '`, ' +
+ stringifyPosition({
+ start: right.start,
+ end: right.end
+ }) +
+ ') is still open'
+ )
+ }
+}
+
+// EXTERNAL MODULE: ./node_modules/ts-dedent/esm/index.js
+var esm = __webpack_require__(18464);
+;// CONCATENATED MODULE: ./node_modules/mermaid/dist/createText-a48a4c90.js
+
+
+
+function preprocessMarkdown(markdown) {
+ const withoutMultipleNewlines = markdown.replace(/\n{2,}/g, "\n");
+ const withoutExtraSpaces = (0,esm/* dedent */.Z)(withoutMultipleNewlines);
+ return withoutExtraSpaces;
+}
+function markdownToLines(markdown) {
+ const preprocessedMarkdown = preprocessMarkdown(markdown);
+ const { children } = fromMarkdown(preprocessedMarkdown);
+ const lines = [[]];
+ let currentLine = 0;
+ function processNode(node, parentType = "normal") {
+ if (node.type === "text") {
+ const textLines = node.value.split("\n");
+ textLines.forEach((textLine, index) => {
+ if (index !== 0) {
+ currentLine++;
+ lines.push([]);
+ }
+ textLine.split(" ").forEach((word) => {
+ if (word) {
+ lines[currentLine].push({ content: word, type: parentType });
+ }
+ });
+ });
+ } else if (node.type === "strong" || node.type === "emphasis") {
+ node.children.forEach((contentNode) => {
+ processNode(contentNode, node.type);
+ });
+ }
+ }
+ children.forEach((treeNode) => {
+ if (treeNode.type === "paragraph") {
+ treeNode.children.forEach((contentNode) => {
+ processNode(contentNode);
+ });
+ }
+ });
+ return lines;
+}
+function markdownToHTML(markdown) {
+ const { children } = fromMarkdown(markdown);
+ function output(node) {
+ if (node.type === "text") {
+ return node.value.replace(/\n/g, "
");
+ } else if (node.type === "strong") {
+ return `${node.children.map(output).join("")}`;
+ } else if (node.type === "emphasis") {
+ return `${node.children.map(output).join("")}`;
+ } else if (node.type === "paragraph") {
+ return `${node.children.map(output).join("")}
`;
+ }
+ return `Unsupported markdown: ${node.type}`;
+ }
+ return children.map(output).join("");
+}
+function splitTextToChars(text) {
+ if (Intl.Segmenter) {
+ return [...new Intl.Segmenter().segment(text)].map((s) => s.segment);
+ }
+ return [...text];
+}
+function splitWordToFitWidth(checkFit, word) {
+ const characters = splitTextToChars(word.content);
+ return splitWordToFitWidthRecursion(checkFit, [], characters, word.type);
+}
+function splitWordToFitWidthRecursion(checkFit, usedChars, remainingChars, type) {
+ if (remainingChars.length === 0) {
+ return [
+ { content: usedChars.join(""), type },
+ { content: "", type }
+ ];
+ }
+ const [nextChar, ...rest] = remainingChars;
+ const newWord = [...usedChars, nextChar];
+ if (checkFit([{ content: newWord.join(""), type }])) {
+ return splitWordToFitWidthRecursion(checkFit, newWord, rest, type);
+ }
+ if (usedChars.length === 0 && nextChar) {
+ usedChars.push(nextChar);
+ remainingChars.shift();
+ }
+ return [
+ { content: usedChars.join(""), type },
+ { content: remainingChars.join(""), type }
+ ];
+}
+function splitLineToFitWidth(line, checkFit) {
+ if (line.some(({ content }) => content.includes("\n"))) {
+ throw new Error("splitLineToFitWidth does not support newlines in the line");
+ }
+ return splitLineToFitWidthRecursion(line, checkFit);
+}
+function splitLineToFitWidthRecursion(words, checkFit, lines = [], newLine = []) {
+ if (words.length === 0) {
+ if (newLine.length > 0) {
+ lines.push(newLine);
+ }
+ return lines.length > 0 ? lines : [];
+ }
+ let joiner = "";
+ if (words[0].content === " ") {
+ joiner = " ";
+ words.shift();
+ }
+ const nextWord = words.shift() ?? { content: " ", type: "normal" };
+ const lineWithNextWord = [...newLine];
+ if (joiner !== "") {
+ lineWithNextWord.push({ content: joiner, type: "normal" });
+ }
+ lineWithNextWord.push(nextWord);
+ if (checkFit(lineWithNextWord)) {
+ return splitLineToFitWidthRecursion(words, checkFit, lines, lineWithNextWord);
+ }
+ if (newLine.length > 0) {
+ lines.push(newLine);
+ words.unshift(nextWord);
+ } else if (nextWord.content) {
+ const [line, rest] = splitWordToFitWidth(checkFit, nextWord);
+ lines.push([line]);
+ if (rest.content) {
+ words.unshift(rest);
+ }
+ }
+ return splitLineToFitWidthRecursion(words, checkFit, lines);
+}
+function applyStyle(dom, styleFn) {
+ if (styleFn) {
+ dom.attr("style", styleFn);
+ }
+}
+function addHtmlSpan(element, node, width, classes, addBackground = false) {
+ const fo = element.append("foreignObject");
+ const div = fo.append("xhtml:div");
+ const label = node.label;
+ const labelClass = node.isNode ? "nodeLabel" : "edgeLabel";
+ div.html(
+ `
+ " + label + ""
+ );
+ applyStyle(div, node.labelStyle);
+ div.style("display", "table-cell");
+ div.style("white-space", "nowrap");
+ div.style("max-width", width + "px");
+ div.attr("xmlns", "http://www.w3.org/1999/xhtml");
+ if (addBackground) {
+ div.attr("class", "labelBkg");
+ }
+ let bbox = div.node().getBoundingClientRect();
+ if (bbox.width === width) {
+ div.style("display", "table");
+ div.style("white-space", "break-spaces");
+ div.style("width", width + "px");
+ bbox = div.node().getBoundingClientRect();
+ }
+ fo.style("width", bbox.width);
+ fo.style("height", bbox.height);
+ return fo.node();
+}
+function createTspan(textElement, lineIndex, lineHeight) {
+ return textElement.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", lineIndex * lineHeight - 0.1 + "em").attr("dy", lineHeight + "em");
+}
+function computeWidthOfText(parentNode, lineHeight, line) {
+ const testElement = parentNode.append("text");
+ const testSpan = createTspan(testElement, 1, lineHeight);
+ updateTextContentAndStyles(testSpan, line);
+ const textLength = testSpan.node().getComputedTextLength();
+ testElement.remove();
+ return textLength;
+}
+function computeDimensionOfText(parentNode, lineHeight, text) {
+ var _a;
+ const testElement = parentNode.append("text");
+ const testSpan = createTspan(testElement, 1, lineHeight);
+ updateTextContentAndStyles(testSpan, [{ content: text, type: "normal" }]);
+ const textDimension = (_a = testSpan.node()) == null ? void 0 : _a.getBoundingClientRect();
+ if (textDimension) {
+ testElement.remove();
+ }
+ return textDimension;
+}
+function createFormattedText(width, g, structuredText, addBackground = false) {
+ const lineHeight = 1.1;
+ const labelGroup = g.append("g");
+ const bkg = labelGroup.insert("rect").attr("class", "background");
+ const textElement = labelGroup.append("text").attr("y", "-10.1");
+ let lineIndex = 0;
+ for (const line of structuredText) {
+ const checkWidth = (line2) => computeWidthOfText(labelGroup, lineHeight, line2) <= width;
+ const linesUnderWidth = checkWidth(line) ? [line] : splitLineToFitWidth(line, checkWidth);
+ for (const preparedLine of linesUnderWidth) {
+ const tspan = createTspan(textElement, lineIndex, lineHeight);
+ updateTextContentAndStyles(tspan, preparedLine);
+ lineIndex++;
+ }
+ }
+ if (addBackground) {
+ const bbox = textElement.node().getBBox();
+ const padding = 2;
+ bkg.attr("x", -padding).attr("y", -padding).attr("width", bbox.width + 2 * padding).attr("height", bbox.height + 2 * padding);
+ return labelGroup.node();
+ } else {
+ return textElement.node();
+ }
+}
+function updateTextContentAndStyles(tspan, wrappedLine) {
+ tspan.text("");
+ wrappedLine.forEach((word, index) => {
+ const innerTspan = tspan.append("tspan").attr("font-style", word.type === "emphasis" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", word.type === "strong" ? "bold" : "normal");
+ if (index === 0) {
+ innerTspan.text(word.content);
+ } else {
+ innerTspan.text(" " + word.content);
+ }
+ });
+}
+const createText = (el, text = "", {
+ style = "",
+ isTitle = false,
+ classes = "",
+ useHtmlLabels = true,
+ isNode = true,
+ width = 200,
+ addSvgBackground = false
+} = {}) => {
+ mermaid_04fb0060.l.info("createText", text, style, isTitle, classes, useHtmlLabels, isNode, addSvgBackground);
+ if (useHtmlLabels) {
+ const htmlText = markdownToHTML(text);
+ const node = {
+ isNode,
+ label: (0,mermaid_04fb0060.J)(htmlText).replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ (s) => ``
+ ),
+ labelStyle: style.replace("fill:", "color:")
+ };
+ const vertexNode = addHtmlSpan(el, node, width, classes, addSvgBackground);
+ return vertexNode;
+ } else {
+ const structuredText = markdownToLines(text);
+ const svgLabel = createFormattedText(width, el, structuredText, addSvgBackground);
+ return svgLabel;
+ }
+};
+
+
+
+/***/ }),
+
+/***/ 52494:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ a: () => (/* binding */ insertMarkers$1),
+/* harmony export */ b: () => (/* binding */ clear$1),
+/* harmony export */ c: () => (/* binding */ createLabel$1),
+/* harmony export */ d: () => (/* binding */ clear),
+/* harmony export */ e: () => (/* binding */ insertNode),
+/* harmony export */ f: () => (/* binding */ insertEdgeLabel),
+/* harmony export */ g: () => (/* binding */ insertEdge),
+/* harmony export */ h: () => (/* binding */ positionEdgeLabel),
+/* harmony export */ i: () => (/* binding */ intersectRect$1),
+/* harmony export */ j: () => (/* binding */ getLineFunctionsWithOffset),
+/* harmony export */ k: () => (/* binding */ addEdgeMarkers),
+/* harmony export */ l: () => (/* binding */ labelHelper),
+/* harmony export */ p: () => (/* binding */ positionNode),
+/* harmony export */ s: () => (/* binding */ setNodeElem),
+/* harmony export */ u: () => (/* binding */ updateNodeBounds)
+/* harmony export */ });
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76365);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
+/* harmony import */ var _createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33183);
+
+
+
+const insertMarkers = (elem, markerArray, type, id) => {
+ markerArray.forEach((markerName) => {
+ markers[markerName](elem, type, id);
+ });
+};
+const extension = (elem, type, id) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Making markers for ", id);
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionStart").attr("class", "marker extension " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z");
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-extensionEnd").attr("class", "marker extension " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
+};
+const composition = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionStart").attr("class", "marker composition " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-compositionEnd").attr("class", "marker composition " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+};
+const aggregation = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationStart").attr("class", "marker aggregation " + type).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-aggregationEnd").attr("class", "marker aggregation " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
+};
+const dependency = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyStart").attr("class", "marker dependency " + type).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z");
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-dependencyEnd").attr("class", "marker dependency " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
+};
+const lollipop = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopStart").attr("class", "marker lollipop " + type).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-lollipopEnd").attr("class", "marker lollipop " + type).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
+};
+const point = (elem, type, id) => {
+ elem.append("marker").attr("id", id + "_" + type + "-pointEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", id + "_" + type + "-pointStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+};
+const circle$1 = (elem, type, id) => {
+ elem.append("marker").attr("id", id + "_" + type + "-circleEnd").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", id + "_" + type + "-circleStart").attr("class", "marker " + type).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
+};
+const cross = (elem, type, id) => {
+ elem.append("marker").attr("id", id + "_" + type + "-crossEnd").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
+ elem.append("marker").attr("id", id + "_" + type + "-crossStart").attr("class", "marker cross " + type).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
+};
+const barb = (elem, type, id) => {
+ elem.append("defs").append("marker").attr("id", id + "_" + type + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
+};
+const markers = {
+ extension,
+ composition,
+ aggregation,
+ dependency,
+ lollipop,
+ point,
+ circle: circle$1,
+ cross,
+ barb
+};
+const insertMarkers$1 = insertMarkers;
+function applyStyle(dom, styleFn) {
+ if (styleFn) {
+ dom.attr("style", styleFn);
+ }
+}
+function addHtmlLabel(node) {
+ const fo = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject"));
+ const div = fo.append("xhtml:div");
+ const label = node.label;
+ const labelClass = node.isNode ? "nodeLabel" : "edgeLabel";
+ div.html(
+ '" + label + ""
+ );
+ applyStyle(div, node.labelStyle);
+ div.style("display", "inline-block");
+ div.style("white-space", "nowrap");
+ div.attr("xmlns", "http://www.w3.org/1999/xhtml");
+ return fo.node();
+}
+const createLabel = (_vertexText, style, isTitle, isNode) => {
+ let vertexText = _vertexText || "";
+ if (typeof vertexText === "object") {
+ vertexText = vertexText[0];
+ }
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ vertexText = vertexText.replace(/\\n|\n/g, "
");
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("vertexText" + vertexText);
+ const node = {
+ isNode,
+ label: (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.J)(vertexText).replace(
+ /fa[blrs]?:fa-[\w-]+/g,
+ (s) => ``
+ ),
+ labelStyle: style.replace("fill:", "color:")
+ };
+ let vertexNode = addHtmlLabel(node);
+ return vertexNode;
+ } else {
+ const svgLabel = document.createElementNS("http://www.w3.org/2000/svg", "text");
+ svgLabel.setAttribute("style", style.replace("color:", "fill:"));
+ let rows = [];
+ if (typeof vertexText === "string") {
+ rows = vertexText.split(/\\n|\n|
/gi);
+ } else if (Array.isArray(vertexText)) {
+ rows = vertexText;
+ } else {
+ rows = [];
+ }
+ for (const row of rows) {
+ const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
+ tspan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve");
+ tspan.setAttribute("dy", "1em");
+ tspan.setAttribute("x", "0");
+ if (isTitle) {
+ tspan.setAttribute("class", "title-row");
+ } else {
+ tspan.setAttribute("class", "row");
+ }
+ tspan.textContent = row.trim();
+ svgLabel.appendChild(tspan);
+ }
+ return svgLabel;
+ }
+};
+const createLabel$1 = createLabel;
+const labelHelper = async (parent, node, _classes, isNode) => {
+ let classes;
+ const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels);
+ if (!_classes) {
+ classes = "node default";
+ } else {
+ classes = _classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const label = shapeSvg.insert("g").attr("class", "label").attr("style", node.labelStyle);
+ let labelText;
+ if (node.labelText === void 0) {
+ labelText = "";
+ } else {
+ labelText = typeof node.labelText === "string" ? node.labelText : node.labelText[0];
+ }
+ const textNode = label.node();
+ let text;
+ if (node.labelType === "markdown") {
+ text = (0,_createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_2__.a)(label, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.J)(labelText), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)()), {
+ useHtmlLabels,
+ width: node.width || (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.wrappingWidth,
+ classes: "markdown-node-label"
+ });
+ } else {
+ text = textNode.appendChild(
+ createLabel$1(
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.d)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.J)(labelText), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)()),
+ node.labelStyle,
+ false,
+ isNode
+ )
+ );
+ }
+ let bbox = text.getBBox();
+ const halfPadding = node.padding / 2;
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(text);
+ const images = div.getElementsByTagName("img");
+ if (images) {
+ const noImgText = labelText.replace(/]*>/g, "").trim() === "";
+ await Promise.all(
+ [...images].map(
+ (img) => new Promise((res) => {
+ function setupImage() {
+ img.style.display = "flex";
+ img.style.flexDirection = "column";
+ if (noImgText) {
+ const bodyFontSize = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize ? (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().fontSize : window.getComputedStyle(document.body).fontSize;
+ const enlargingFactor = 5;
+ const width = parseInt(bodyFontSize, 10) * enlargingFactor + "px";
+ img.style.minWidth = width;
+ img.style.maxWidth = width;
+ } else {
+ img.style.width = "100%";
+ }
+ res(img);
+ }
+ setTimeout(() => {
+ if (img.complete) {
+ setupImage();
+ }
+ });
+ img.addEventListener("error", setupImage);
+ img.addEventListener("load", setupImage);
+ })
+ )
+ );
+ }
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (useHtmlLabels) {
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ } else {
+ label.attr("transform", "translate(0, " + -bbox.height / 2 + ")");
+ }
+ if (node.centerLabel) {
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ }
+ label.insert("rect", ":first-child");
+ return { shapeSvg, bbox, halfPadding, label };
+};
+const updateNodeBounds = (node, element) => {
+ const bbox = element.node().getBBox();
+ node.width = bbox.width;
+ node.height = bbox.height;
+};
+function insertPolygonShape(parent, w, h, points) {
+ return parent.insert("polygon", ":first-child").attr(
+ "points",
+ points.map(function(d) {
+ return d.x + "," + d.y;
+ }).join(" ")
+ ).attr("class", "label-container").attr("transform", "translate(" + -w / 2 + "," + h / 2 + ")");
+}
+function intersectNode(node, point2) {
+ return node.intersect(point2);
+}
+function intersectEllipse(node, rx, ry, point2) {
+ var cx = node.x;
+ var cy = node.y;
+ var px = cx - point2.x;
+ var py = cy - point2.y;
+ var det = Math.sqrt(rx * rx * py * py + ry * ry * px * px);
+ var dx = Math.abs(rx * ry * px / det);
+ if (point2.x < cx) {
+ dx = -dx;
+ }
+ var dy = Math.abs(rx * ry * py / det);
+ if (point2.y < cy) {
+ dy = -dy;
+ }
+ return { x: cx + dx, y: cy + dy };
+}
+function intersectCircle(node, rx, point2) {
+ return intersectEllipse(node, rx, rx, point2);
+}
+function intersectLine(p1, p2, q1, q2) {
+ var a1, a2, b1, b2, c1, c2;
+ var r1, r2, r3, r4;
+ var denom, offset, num;
+ var x, y;
+ a1 = p2.y - p1.y;
+ b1 = p1.x - p2.x;
+ c1 = p2.x * p1.y - p1.x * p2.y;
+ r3 = a1 * q1.x + b1 * q1.y + c1;
+ r4 = a1 * q2.x + b1 * q2.y + c1;
+ if (r3 !== 0 && r4 !== 0 && sameSign(r3, r4)) {
+ return;
+ }
+ a2 = q2.y - q1.y;
+ b2 = q1.x - q2.x;
+ c2 = q2.x * q1.y - q1.x * q2.y;
+ r1 = a2 * p1.x + b2 * p1.y + c2;
+ r2 = a2 * p2.x + b2 * p2.y + c2;
+ if (r1 !== 0 && r2 !== 0 && sameSign(r1, r2)) {
+ return;
+ }
+ denom = a1 * b2 - a2 * b1;
+ if (denom === 0) {
+ return;
+ }
+ offset = Math.abs(denom / 2);
+ num = b1 * c2 - b2 * c1;
+ x = num < 0 ? (num - offset) / denom : (num + offset) / denom;
+ num = a2 * c1 - a1 * c2;
+ y = num < 0 ? (num - offset) / denom : (num + offset) / denom;
+ return { x, y };
+}
+function sameSign(r1, r2) {
+ return r1 * r2 > 0;
+}
+function intersectPolygon(node, polyPoints, point2) {
+ var x1 = node.x;
+ var y1 = node.y;
+ var intersections = [];
+ var minX = Number.POSITIVE_INFINITY;
+ var minY = Number.POSITIVE_INFINITY;
+ if (typeof polyPoints.forEach === "function") {
+ polyPoints.forEach(function(entry) {
+ minX = Math.min(minX, entry.x);
+ minY = Math.min(minY, entry.y);
+ });
+ } else {
+ minX = Math.min(minX, polyPoints.x);
+ minY = Math.min(minY, polyPoints.y);
+ }
+ var left = x1 - node.width / 2 - minX;
+ var top = y1 - node.height / 2 - minY;
+ for (var i = 0; i < polyPoints.length; i++) {
+ var p1 = polyPoints[i];
+ var p2 = polyPoints[i < polyPoints.length - 1 ? i + 1 : 0];
+ var intersect2 = intersectLine(
+ node,
+ point2,
+ { x: left + p1.x, y: top + p1.y },
+ { x: left + p2.x, y: top + p2.y }
+ );
+ if (intersect2) {
+ intersections.push(intersect2);
+ }
+ }
+ if (!intersections.length) {
+ return node;
+ }
+ if (intersections.length > 1) {
+ intersections.sort(function(p, q) {
+ var pdx = p.x - point2.x;
+ var pdy = p.y - point2.y;
+ var distp = Math.sqrt(pdx * pdx + pdy * pdy);
+ var qdx = q.x - point2.x;
+ var qdy = q.y - point2.y;
+ var distq = Math.sqrt(qdx * qdx + qdy * qdy);
+ return distp < distq ? -1 : distp === distq ? 0 : 1;
+ });
+ }
+ return intersections[0];
+}
+const intersectRect = (node, point2) => {
+ var x = node.x;
+ var y = node.y;
+ var dx = point2.x - x;
+ var dy = point2.y - y;
+ var w = node.width / 2;
+ var h = node.height / 2;
+ var sx, sy;
+ if (Math.abs(dy) * w > Math.abs(dx) * h) {
+ if (dy < 0) {
+ h = -h;
+ }
+ sx = dy === 0 ? 0 : h * dx / dy;
+ sy = h;
+ } else {
+ if (dx < 0) {
+ w = -w;
+ }
+ sx = w;
+ sy = dx === 0 ? 0 : w * dy / dx;
+ }
+ return { x: x + sx, y: y + sy };
+};
+const intersectRect$1 = intersectRect;
+const intersect = {
+ node: intersectNode,
+ circle: intersectCircle,
+ ellipse: intersectEllipse,
+ polygon: intersectPolygon,
+ rect: intersectRect$1
+};
+const note = async (parent, node) => {
+ const useHtmlLabels = node.useHtmlLabels || (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels;
+ if (!useHtmlLabels) {
+ node.centerLabel = true;
+ }
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ "node " + node.classes,
+ true
+ );
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Classes = ", node.classes);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const note$1 = note;
+const formatClass = (str) => {
+ if (str) {
+ return " " + str;
+ }
+ return "";
+};
+const getClassesFromNode = (node, otherClasses) => {
+ return `${otherClasses ? otherClasses : "node default"}${formatClass(node.classes)} ${formatClass(
+ node.class
+ )}`;
+};
+const question = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const s = w + h;
+ const points = [
+ { x: s / 2, y: 0 },
+ { x: s, y: -s / 2 },
+ { x: s / 2, y: -s },
+ { x: 0, y: -s / 2 }
+ ];
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Question main (Circle)");
+ const questionElem = insertPolygonShape(shapeSvg, s, s, points);
+ questionElem.attr("style", node.style);
+ updateNodeBounds(node, questionElem);
+ node.intersect = function(point2) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("Intersect called");
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const choice = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const s = 28;
+ const points = [
+ { x: 0, y: s / 2 },
+ { x: s / 2, y: 0 },
+ { x: 0, y: -s / 2 },
+ { x: -s / 2, y: 0 }
+ ];
+ const choice2 = shapeSvg.insert("polygon", ":first-child").attr(
+ "points",
+ points.map(function(d) {
+ return d.x + "," + d.y;
+ }).join(" ")
+ );
+ choice2.attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28);
+ node.width = 28;
+ node.height = 28;
+ node.intersect = function(point2) {
+ return intersect.circle(node, 14, point2);
+ };
+ return shapeSvg;
+};
+const hexagon = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const f = 4;
+ const h = bbox.height + node.padding;
+ const m = h / f;
+ const w = bbox.width + 2 * m + node.padding;
+ const points = [
+ { x: m, y: 0 },
+ { x: w - m, y: 0 },
+ { x: w, y: -h / 2 },
+ { x: w - m, y: -h },
+ { x: m, y: -h },
+ { x: 0, y: -h / 2 }
+ ];
+ const hex = insertPolygonShape(shapeSvg, w, h, points);
+ hex.attr("style", node.style);
+ updateNodeBounds(node, hex);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const rect_left_inv_arrow = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -h / 2, y: 0 },
+ { x: w, y: 0 },
+ { x: w, y: -h },
+ { x: -h / 2, y: -h },
+ { x: 0, y: -h / 2 }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ node.width = w + h;
+ node.height = h;
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const lean_right = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(parent, node, getClassesFromNode(node), true);
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -2 * h / 6, y: 0 },
+ { x: w - h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: -h },
+ { x: h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const lean_left = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 2 * h / 6, y: 0 },
+ { x: w + h / 6, y: 0 },
+ { x: w - 2 * h / 6, y: -h },
+ { x: -h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const trapezoid = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: -2 * h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: 0 },
+ { x: w - h / 6, y: -h },
+ { x: h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const inv_trapezoid = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: h / 6, y: 0 },
+ { x: w - h / 6, y: 0 },
+ { x: w + 2 * h / 6, y: -h },
+ { x: -2 * h / 6, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const rect_right_inv_arrow = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 0, y: 0 },
+ { x: w + h / 2, y: 0 },
+ { x: w, y: -h / 2 },
+ { x: w + h / 2, y: -h },
+ { x: 0, y: -h }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const cylinder = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const rx = w / 2;
+ const ry = rx / (2.5 + w / 50);
+ const h = bbox.height + ry + node.padding;
+ const shape = "M 0," + ry + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 a " + rx + "," + ry + " 0,0,0 " + -w + " 0 l 0," + h + " a " + rx + "," + ry + " 0,0,0 " + w + " 0 l 0," + -h;
+ const el = shapeSvg.attr("label-offset-y", ry).insert("path", ":first-child").attr("style", node.style).attr("d", shape).attr("transform", "translate(" + -w / 2 + "," + -(h / 2 + ry) + ")");
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ const pos = intersect.rect(node, point2);
+ const x = pos.x - node.x;
+ if (rx != 0 && (Math.abs(x) < node.width / 2 || Math.abs(x) == node.width / 2 && Math.abs(pos.y - node.y) > node.height / 2 - ry)) {
+ let y = ry * ry * (1 - x * x / (rx * rx));
+ if (y != 0) {
+ y = Math.sqrt(y);
+ }
+ y = ry - y;
+ if (point2.y - node.y > 0) {
+ y = -y;
+ }
+ pos.y += y;
+ }
+ return pos;
+ };
+ return shapeSvg;
+};
+const rect = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ "node " + node.classes + " " + node.class,
+ true
+ );
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const totalWidth = bbox.width + node.padding;
+ const totalHeight = bbox.height + node.padding;
+ rect2.attr("class", "basic label-container").attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", totalWidth).attr("height", totalHeight);
+ if (node.props) {
+ const propKeys = new Set(Object.keys(node.props));
+ if (node.props.borders) {
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
+ propKeys.delete("borders");
+ }
+ propKeys.forEach((propKey) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`);
+ });
+ }
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const labelRect = async (parent, node) => {
+ const { shapeSvg } = await labelHelper(parent, node, "label", true);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.trace("Classes = ", node.class);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const totalWidth = 0;
+ const totalHeight = 0;
+ rect2.attr("width", totalWidth).attr("height", totalHeight);
+ shapeSvg.attr("class", "label edgeLabel");
+ if (node.props) {
+ const propKeys = new Set(Object.keys(node.props));
+ if (node.props.borders) {
+ applyNodePropertyBorders(rect2, node.props.borders, totalWidth, totalHeight);
+ propKeys.delete("borders");
+ }
+ propKeys.forEach((propKey) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown node property ${propKey}`);
+ });
+ }
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+function applyNodePropertyBorders(rect2, borders, totalWidth, totalHeight) {
+ const strokeDashArray = [];
+ const addBorder = (length) => {
+ strokeDashArray.push(length, 0);
+ };
+ const skipBorder = (length) => {
+ strokeDashArray.push(0, length);
+ };
+ if (borders.includes("t")) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add top border");
+ addBorder(totalWidth);
+ } else {
+ skipBorder(totalWidth);
+ }
+ if (borders.includes("r")) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add right border");
+ addBorder(totalHeight);
+ } else {
+ skipBorder(totalHeight);
+ }
+ if (borders.includes("b")) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add bottom border");
+ addBorder(totalWidth);
+ } else {
+ skipBorder(totalWidth);
+ }
+ if (borders.includes("l")) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("add left border");
+ addBorder(totalHeight);
+ } else {
+ skipBorder(totalHeight);
+ }
+ rect2.attr("stroke-dasharray", strokeDashArray.join(" "));
+}
+const rectWithTitle = (parent, node) => {
+ let classes;
+ if (!node.classes) {
+ classes = "node default";
+ } else {
+ classes = "node " + node.classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const innerLine = shapeSvg.insert("line");
+ const label = shapeSvg.insert("g").attr("class", "label");
+ const text2 = node.labelText.flat ? node.labelText.flat() : node.labelText;
+ let title = "";
+ if (typeof text2 === "object") {
+ title = text2[0];
+ } else {
+ title = text2;
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Label text abc79", title, text2, typeof text2 === "object");
+ const text = label.node().appendChild(createLabel$1(title, node.labelStyle, true, true));
+ let bbox = { width: 0, height: 0 };
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(text);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Text 2", text2);
+ const textRows = text2.slice(1, text2.length);
+ let titleBox = text.getBBox();
+ const descr = label.node().appendChild(
+ createLabel$1(textRows.join ? textRows.join("
") : textRows, node.labelStyle, true, true)
+ );
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = descr.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(descr);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ const halfPadding = node.padding / 2;
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(descr).attr(
+ "transform",
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
+ (bbox.width > titleBox.width ? 0 : (titleBox.width - bbox.width) / 2) + ", " + (titleBox.height + halfPadding + 5) + ")"
+ );
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(text).attr(
+ "transform",
+ "translate( " + // (titleBox.width - bbox.width) / 2 +
+ (bbox.width < titleBox.width ? 0 : -(titleBox.width - bbox.width) / 2) + ", 0)"
+ );
+ bbox = label.node().getBBox();
+ label.attr(
+ "transform",
+ "translate(" + -bbox.width / 2 + ", " + (-bbox.height / 2 - halfPadding + 3) + ")"
+ );
+ rect2.attr("class", "outer title-state").attr("x", -bbox.width / 2 - halfPadding).attr("y", -bbox.height / 2 - halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ innerLine.attr("class", "divider").attr("x1", -bbox.width / 2 - halfPadding).attr("x2", bbox.width / 2 + halfPadding).attr("y1", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding).attr("y2", -bbox.height / 2 - halfPadding + titleBox.height + halfPadding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const stadium = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const h = bbox.height + node.padding;
+ const w = bbox.width + h / 4 + node.padding;
+ const rect2 = shapeSvg.insert("rect", ":first-child").attr("style", node.style).attr("rx", h / 2).attr("ry", h / 2).attr("x", -w / 2).attr("y", -h / 2).attr("width", w).attr("height", h);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const circle = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle main");
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Circle intersect", node, bbox.width / 2 + halfPadding, point2);
+ return intersect.circle(node, bbox.width / 2 + halfPadding, point2);
+ };
+ return shapeSvg;
+};
+const doublecircle = async (parent, node) => {
+ const { shapeSvg, bbox, halfPadding } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const gap = 5;
+ const circleGroup = shapeSvg.insert("g", ":first-child");
+ const outerCircle = circleGroup.insert("circle");
+ const innerCircle = circleGroup.insert("circle");
+ circleGroup.attr("class", node.class);
+ outerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding + gap).attr("width", bbox.width + node.padding + gap * 2).attr("height", bbox.height + node.padding + gap * 2);
+ innerCircle.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("r", bbox.width / 2 + halfPadding).attr("width", bbox.width + node.padding).attr("height", bbox.height + node.padding);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle main");
+ updateNodeBounds(node, outerCircle);
+ node.intersect = function(point2) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("DoubleCircle intersect", node, bbox.width / 2 + halfPadding + gap, point2);
+ return intersect.circle(node, bbox.width / 2 + halfPadding + gap, point2);
+ };
+ return shapeSvg;
+};
+const subroutine = async (parent, node) => {
+ const { shapeSvg, bbox } = await labelHelper(
+ parent,
+ node,
+ getClassesFromNode(node, void 0),
+ true
+ );
+ const w = bbox.width + node.padding;
+ const h = bbox.height + node.padding;
+ const points = [
+ { x: 0, y: 0 },
+ { x: w, y: 0 },
+ { x: w, y: -h },
+ { x: 0, y: -h },
+ { x: 0, y: 0 },
+ { x: -8, y: 0 },
+ { x: w + 8, y: 0 },
+ { x: w + 8, y: -h },
+ { x: -8, y: -h },
+ { x: -8, y: 0 }
+ ];
+ const el = insertPolygonShape(shapeSvg, w, h, points);
+ el.attr("style", node.style);
+ updateNodeBounds(node, el);
+ node.intersect = function(point2) {
+ return intersect.polygon(node, points, point2);
+ };
+ return shapeSvg;
+};
+const start = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ return intersect.circle(node, 7, point2);
+ };
+ return shapeSvg;
+};
+const forkJoin = (parent, node, dir) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ let width = 70;
+ let height = 10;
+ if (dir === "LR") {
+ width = 10;
+ height = 70;
+ }
+ const shape = shapeSvg.append("rect").attr("x", -1 * width / 2).attr("y", -1 * height / 2).attr("width", width).attr("height", height).attr("class", "fork-join");
+ updateNodeBounds(node, shape);
+ node.height = node.height + node.padding / 2;
+ node.width = node.width + node.padding / 2;
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const end = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "node default").attr("id", node.domId || node.id);
+ const innerCircle = shapeSvg.insert("circle", ":first-child");
+ const circle2 = shapeSvg.insert("circle", ":first-child");
+ circle2.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14);
+ innerCircle.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10);
+ updateNodeBounds(node, circle2);
+ node.intersect = function(point2) {
+ return intersect.circle(node, 7, point2);
+ };
+ return shapeSvg;
+};
+const class_box = (parent, node) => {
+ const halfPadding = node.padding / 2;
+ const rowPadding = 4;
+ const lineHeight = 8;
+ let classes;
+ if (!node.classes) {
+ classes = "node default";
+ } else {
+ classes = "node " + node.classes;
+ }
+ const shapeSvg = parent.insert("g").attr("class", classes).attr("id", node.domId || node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const topLine = shapeSvg.insert("line");
+ const bottomLine = shapeSvg.insert("line");
+ let maxWidth = 0;
+ let maxHeight = rowPadding;
+ const labelContainer = shapeSvg.insert("g").attr("class", "label");
+ let verticalPos = 0;
+ const hasInterface = node.classData.annotations && node.classData.annotations[0];
+ const interfaceLabelText = node.classData.annotations[0] ? "«" + node.classData.annotations[0] + "»" : "";
+ const interfaceLabel = labelContainer.node().appendChild(createLabel$1(interfaceLabelText, node.labelStyle, true, true));
+ let interfaceBBox = interfaceLabel.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = interfaceLabel.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(interfaceLabel);
+ interfaceBBox = div.getBoundingClientRect();
+ dv.attr("width", interfaceBBox.width);
+ dv.attr("height", interfaceBBox.height);
+ }
+ if (node.classData.annotations[0]) {
+ maxHeight += interfaceBBox.height + rowPadding;
+ maxWidth += interfaceBBox.width;
+ }
+ let classTitleString = node.classData.label;
+ if (node.classData.type !== void 0 && node.classData.type !== "") {
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) {
+ classTitleString += "<" + node.classData.type + ">";
+ } else {
+ classTitleString += "<" + node.classData.type + ">";
+ }
+ }
+ const classTitleLabel = labelContainer.node().appendChild(createLabel$1(classTitleString, node.labelStyle, true, true));
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(classTitleLabel).attr("class", "classTitle");
+ let classTitleBBox = classTitleLabel.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = classTitleLabel.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(classTitleLabel);
+ classTitleBBox = div.getBoundingClientRect();
+ dv.attr("width", classTitleBBox.width);
+ dv.attr("height", classTitleBBox.height);
+ }
+ maxHeight += classTitleBBox.height + rowPadding;
+ if (classTitleBBox.width > maxWidth) {
+ maxWidth = classTitleBBox.width;
+ }
+ const classAttributes = [];
+ node.classData.members.forEach((member) => {
+ const parsedInfo = member.getDisplayDetails();
+ let parsedText = parsedInfo.displayText;
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) {
+ parsedText = parsedText.replace(//g, ">");
+ }
+ const lbl = labelContainer.node().appendChild(
+ createLabel$1(
+ parsedText,
+ parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
+ true,
+ true
+ )
+ );
+ let bbox = lbl.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = lbl.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(lbl);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (bbox.width > maxWidth) {
+ maxWidth = bbox.width;
+ }
+ maxHeight += bbox.height + rowPadding;
+ classAttributes.push(lbl);
+ });
+ maxHeight += lineHeight;
+ const classMethods = [];
+ node.classData.methods.forEach((member) => {
+ const parsedInfo = member.getDisplayDetails();
+ let displayText = parsedInfo.displayText;
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels) {
+ displayText = displayText.replace(//g, ">");
+ }
+ const lbl = labelContainer.node().appendChild(
+ createLabel$1(
+ displayText,
+ parsedInfo.cssStyle ? parsedInfo.cssStyle : node.labelStyle,
+ true,
+ true
+ )
+ );
+ let bbox = lbl.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels)) {
+ const div = lbl.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(lbl);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ if (bbox.width > maxWidth) {
+ maxWidth = bbox.width;
+ }
+ maxHeight += bbox.height + rowPadding;
+ classMethods.push(lbl);
+ });
+ maxHeight += lineHeight;
+ if (hasInterface) {
+ let diffX2 = (maxWidth - interfaceBBox.width) / 2;
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(interfaceLabel).attr(
+ "transform",
+ "translate( " + (-1 * maxWidth / 2 + diffX2) + ", " + -1 * maxHeight / 2 + ")"
+ );
+ verticalPos = interfaceBBox.height + rowPadding;
+ }
+ let diffX = (maxWidth - classTitleBBox.width) / 2;
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(classTitleLabel).attr(
+ "transform",
+ "translate( " + (-1 * maxWidth / 2 + diffX) + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"
+ );
+ verticalPos += classTitleBBox.height + rowPadding;
+ topLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
+ verticalPos += lineHeight;
+ classAttributes.forEach((lbl) => {
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(lbl).attr(
+ "transform",
+ "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos + lineHeight / 2) + ")"
+ );
+ const memberBBox = lbl == null ? void 0 : lbl.getBBox();
+ verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;
+ });
+ verticalPos += lineHeight;
+ bottomLine.attr("class", "divider").attr("x1", -maxWidth / 2 - halfPadding).attr("x2", maxWidth / 2 + halfPadding).attr("y1", -maxHeight / 2 - halfPadding + lineHeight + verticalPos).attr("y2", -maxHeight / 2 - halfPadding + lineHeight + verticalPos);
+ verticalPos += lineHeight;
+ classMethods.forEach((lbl) => {
+ (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(lbl).attr(
+ "transform",
+ "translate( " + -maxWidth / 2 + ", " + (-1 * maxHeight / 2 + verticalPos) + ")"
+ );
+ const memberBBox = lbl == null ? void 0 : lbl.getBBox();
+ verticalPos += ((memberBBox == null ? void 0 : memberBBox.height) ?? 0) + rowPadding;
+ });
+ rect2.attr("style", node.style).attr("class", "outer title-state").attr("x", -maxWidth / 2 - halfPadding).attr("y", -(maxHeight / 2) - halfPadding).attr("width", maxWidth + node.padding).attr("height", maxHeight + node.padding);
+ updateNodeBounds(node, rect2);
+ node.intersect = function(point2) {
+ return intersect.rect(node, point2);
+ };
+ return shapeSvg;
+};
+const shapes = {
+ rhombus: question,
+ question,
+ rect,
+ labelRect,
+ rectWithTitle,
+ choice,
+ circle,
+ doublecircle,
+ stadium,
+ hexagon,
+ rect_left_inv_arrow,
+ lean_right,
+ lean_left,
+ trapezoid,
+ inv_trapezoid,
+ rect_right_inv_arrow,
+ cylinder,
+ start,
+ end,
+ note: note$1,
+ subroutine,
+ fork: forkJoin,
+ join: forkJoin,
+ class_box
+};
+let nodeElems = {};
+const insertNode = async (elem, node, dir) => {
+ let newEl;
+ let el;
+ if (node.link) {
+ let target;
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().securityLevel === "sandbox") {
+ target = "_top";
+ } else if (node.linkTarget) {
+ target = node.linkTarget || "_blank";
+ }
+ newEl = elem.insert("svg:a").attr("xlink:href", node.link).attr("target", target);
+ el = await shapes[node.shape](newEl, node, dir);
+ } else {
+ el = await shapes[node.shape](elem, node, dir);
+ newEl = el;
+ }
+ if (node.tooltip) {
+ el.attr("title", node.tooltip);
+ }
+ if (node.class) {
+ el.attr("class", "node default " + node.class);
+ }
+ nodeElems[node.id] = newEl;
+ if (node.haveCallback) {
+ nodeElems[node.id].attr("class", nodeElems[node.id].attr("class") + " clickable");
+ }
+ return newEl;
+};
+const setNodeElem = (elem, node) => {
+ nodeElems[node.id] = elem;
+};
+const clear$1 = () => {
+ nodeElems = {};
+};
+const positionNode = (node) => {
+ const el = nodeElems[node.id];
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.trace(
+ "Transforming node",
+ node.diff,
+ node,
+ "translate(" + (node.x - node.width / 2 - 5) + ", " + node.width / 2 + ")"
+ );
+ const padding = 8;
+ const diff = node.diff || 0;
+ if (node.clusterNode) {
+ el.attr(
+ "transform",
+ "translate(" + (node.x + diff - node.width / 2) + ", " + (node.y - node.height / 2 - padding) + ")"
+ );
+ } else {
+ el.attr("transform", "translate(" + node.x + ", " + node.y + ")");
+ }
+ return diff;
+};
+const markerOffsets = {
+ aggregation: 18,
+ extension: 18,
+ composition: 18,
+ dependency: 6,
+ lollipop: 13.5,
+ arrow_point: 5.3
+};
+function calculateDeltaAndAngle(point1, point2) {
+ if (point1 === void 0 || point2 === void 0) {
+ return { angle: 0, deltaX: 0, deltaY: 0 };
+ }
+ point1 = pointTransformer(point1);
+ point2 = pointTransformer(point2);
+ const [x1, y1] = [point1.x, point1.y];
+ const [x2, y2] = [point2.x, point2.y];
+ const deltaX = x2 - x1;
+ const deltaY = y2 - y1;
+ return { angle: Math.atan(deltaY / deltaX), deltaX, deltaY };
+}
+const pointTransformer = (data) => {
+ if (Array.isArray(data)) {
+ return { x: data[0], y: data[1] };
+ }
+ return data;
+};
+const getLineFunctionsWithOffset = (edge) => {
+ return {
+ x: function(d, i, data) {
+ let offset = 0;
+ if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {
+ const { angle, deltaX } = calculateDeltaAndAngle(data[0], data[1]);
+ offset = markerOffsets[edge.arrowTypeStart] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1);
+ } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {
+ const { angle, deltaX } = calculateDeltaAndAngle(
+ data[data.length - 1],
+ data[data.length - 2]
+ );
+ offset = markerOffsets[edge.arrowTypeEnd] * Math.cos(angle) * (deltaX >= 0 ? 1 : -1);
+ }
+ return pointTransformer(d).x + offset;
+ },
+ y: function(d, i, data) {
+ let offset = 0;
+ if (i === 0 && Object.hasOwn(markerOffsets, edge.arrowTypeStart)) {
+ const { angle, deltaY } = calculateDeltaAndAngle(data[0], data[1]);
+ offset = markerOffsets[edge.arrowTypeStart] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1);
+ } else if (i === data.length - 1 && Object.hasOwn(markerOffsets, edge.arrowTypeEnd)) {
+ const { angle, deltaY } = calculateDeltaAndAngle(
+ data[data.length - 1],
+ data[data.length - 2]
+ );
+ offset = markerOffsets[edge.arrowTypeEnd] * Math.abs(Math.sin(angle)) * (deltaY >= 0 ? 1 : -1);
+ }
+ return pointTransformer(d).y + offset;
+ }
+ };
+};
+const addEdgeMarkers = (svgPath, edge, url, id, diagramType) => {
+ if (edge.arrowTypeStart) {
+ addEdgeMarker(svgPath, "start", edge.arrowTypeStart, url, id, diagramType);
+ }
+ if (edge.arrowTypeEnd) {
+ addEdgeMarker(svgPath, "end", edge.arrowTypeEnd, url, id, diagramType);
+ }
+};
+const arrowTypesMap = {
+ arrow_cross: "cross",
+ arrow_point: "point",
+ arrow_barb: "barb",
+ arrow_circle: "circle",
+ aggregation: "aggregation",
+ extension: "extension",
+ composition: "composition",
+ dependency: "dependency",
+ lollipop: "lollipop"
+};
+const addEdgeMarker = (svgPath, position, arrowType, url, id, diagramType) => {
+ const endMarkerType = arrowTypesMap[arrowType];
+ if (!endMarkerType) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`Unknown arrow type: ${arrowType}`);
+ return;
+ }
+ const suffix = position === "start" ? "Start" : "End";
+ svgPath.attr(`marker-${position}`, `url(${url}#${id}_${diagramType}-${endMarkerType}${suffix})`);
+};
+let edgeLabels = {};
+let terminalLabels = {};
+const clear = () => {
+ edgeLabels = {};
+ terminalLabels = {};
+};
+const insertEdgeLabel = (elem, edge) => {
+ const useHtmlLabels = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels);
+ const labelElement = edge.labelType === "markdown" ? (0,_createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_2__.a)(elem, edge.label, {
+ style: edge.labelStyle,
+ useHtmlLabels,
+ addSvgBackground: true
+ }) : createLabel$1(edge.label, edge.labelStyle);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc82", edge, edge.labelType);
+ const edgeLabel = elem.insert("g").attr("class", "edgeLabel");
+ const label = edgeLabel.insert("g").attr("class", "label");
+ label.node().appendChild(labelElement);
+ let bbox = labelElement.getBBox();
+ if (useHtmlLabels) {
+ const div = labelElement.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(labelElement);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ label.attr("transform", "translate(" + -bbox.width / 2 + ", " + -bbox.height / 2 + ")");
+ edgeLabels[edge.id] = edgeLabel;
+ edge.width = bbox.width;
+ edge.height = bbox.height;
+ let fo;
+ if (edge.startLabelLeft) {
+ const startLabelElement = createLabel$1(edge.startLabelLeft, edge.labelStyle);
+ const startEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = startEdgeLabelLeft.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(startLabelElement);
+ const slBox = startLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].startLeft = startEdgeLabelLeft;
+ setTerminalWidth(fo, edge.startLabelLeft);
+ }
+ if (edge.startLabelRight) {
+ const startLabelElement = createLabel$1(edge.startLabelRight, edge.labelStyle);
+ const startEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = startEdgeLabelRight.insert("g").attr("class", "inner");
+ fo = startEdgeLabelRight.node().appendChild(startLabelElement);
+ inner.node().appendChild(startLabelElement);
+ const slBox = startLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].startRight = startEdgeLabelRight;
+ setTerminalWidth(fo, edge.startLabelRight);
+ }
+ if (edge.endLabelLeft) {
+ const endLabelElement = createLabel$1(edge.endLabelLeft, edge.labelStyle);
+ const endEdgeLabelLeft = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = endEdgeLabelLeft.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(endLabelElement);
+ const slBox = endLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ endEdgeLabelLeft.node().appendChild(endLabelElement);
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].endLeft = endEdgeLabelLeft;
+ setTerminalWidth(fo, edge.endLabelLeft);
+ }
+ if (edge.endLabelRight) {
+ const endLabelElement = createLabel$1(edge.endLabelRight, edge.labelStyle);
+ const endEdgeLabelRight = elem.insert("g").attr("class", "edgeTerminals");
+ const inner = endEdgeLabelRight.insert("g").attr("class", "inner");
+ fo = inner.node().appendChild(endLabelElement);
+ const slBox = endLabelElement.getBBox();
+ inner.attr("transform", "translate(" + -slBox.width / 2 + ", " + -slBox.height / 2 + ")");
+ endEdgeLabelRight.node().appendChild(endLabelElement);
+ if (!terminalLabels[edge.id]) {
+ terminalLabels[edge.id] = {};
+ }
+ terminalLabels[edge.id].endRight = endEdgeLabelRight;
+ setTerminalWidth(fo, edge.endLabelRight);
+ }
+ return labelElement;
+};
+function setTerminalWidth(fo, value) {
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.htmlLabels && fo) {
+ fo.style.width = value.length * 9 + "px";
+ fo.style.height = "12px";
+ }
+}
+const positionEdgeLabel = (edge, paths) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("Moving label abc78 ", edge.id, edge.label, edgeLabels[edge.id]);
+ let path = paths.updatedPath ? paths.updatedPath : paths.originalPath;
+ if (edge.label) {
+ const el = edgeLabels[edge.id];
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.calcLabelPosition(path);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info(
+ "Moving label " + edge.label + " from (",
+ x,
+ ",",
+ y,
+ ") to (",
+ pos.x,
+ ",",
+ pos.y,
+ ") abc78"
+ );
+ if (paths.updatedPath) {
+ x = pos.x;
+ y = pos.y;
+ }
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.startLabelLeft) {
+ const el = terminalLabels[edge.id].startLeft;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeStart ? 10 : 0, "start_left", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.startLabelRight) {
+ const el = terminalLabels[edge.id].startRight;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(
+ edge.arrowTypeStart ? 10 : 0,
+ "start_right",
+ path
+ );
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.endLabelLeft) {
+ const el = terminalLabels[edge.id].endLeft;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_left", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+ if (edge.endLabelRight) {
+ const el = terminalLabels[edge.id].endRight;
+ let x = edge.x;
+ let y = edge.y;
+ if (path) {
+ const pos = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.calcTerminalLabelPosition(edge.arrowTypeEnd ? 10 : 0, "end_right", path);
+ x = pos.x;
+ y = pos.y;
+ }
+ el.attr("transform", "translate(" + x + ", " + y + ")");
+ }
+};
+const outsideNode = (node, point2) => {
+ const x = node.x;
+ const y = node.y;
+ const dx = Math.abs(point2.x - x);
+ const dy = Math.abs(point2.y - y);
+ const w = node.width / 2;
+ const h = node.height / 2;
+ if (dx >= w || dy >= h) {
+ return true;
+ }
+ return false;
+};
+const intersection = (node, outsidePoint, insidePoint) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`intersection calc abc89:
+ outsidePoint: ${JSON.stringify(outsidePoint)}
+ insidePoint : ${JSON.stringify(insidePoint)}
+ node : x:${node.x} y:${node.y} w:${node.width} h:${node.height}`);
+ const x = node.x;
+ const y = node.y;
+ const dx = Math.abs(x - insidePoint.x);
+ const w = node.width / 2;
+ let r = insidePoint.x < outsidePoint.x ? w - dx : w + dx;
+ const h = node.height / 2;
+ const Q = Math.abs(outsidePoint.y - insidePoint.y);
+ const R = Math.abs(outsidePoint.x - insidePoint.x);
+ if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) {
+ let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y;
+ r = R * q / Q;
+ const res = {
+ x: insidePoint.x < outsidePoint.x ? insidePoint.x + r : insidePoint.x - R + r,
+ y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q
+ };
+ if (r === 0) {
+ res.x = outsidePoint.x;
+ res.y = outsidePoint.y;
+ }
+ if (R === 0) {
+ res.x = outsidePoint.x;
+ }
+ if (Q === 0) {
+ res.y = outsidePoint.y;
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`abc89 topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
+ return res;
+ } else {
+ if (insidePoint.x < outsidePoint.x) {
+ r = outsidePoint.x - w - x;
+ } else {
+ r = x - w - outsidePoint.x;
+ }
+ let q = Q * r / R;
+ let _x = insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - R + r;
+ let _y = insidePoint.y < outsidePoint.y ? insidePoint.y + q : insidePoint.y - q;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn(`sides calc abc89, Q ${Q}, q ${q}, R ${R}, r ${r}`, { _x, _y });
+ if (r === 0) {
+ _x = outsidePoint.x;
+ _y = outsidePoint.y;
+ }
+ if (R === 0) {
+ _x = outsidePoint.x;
+ }
+ if (Q === 0) {
+ _y = outsidePoint.y;
+ }
+ return { x: _x, y: _y };
+ }
+};
+const cutPathAtIntersect = (_points, boundryNode) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 cutPathAtIntersect", _points, boundryNode);
+ let points = [];
+ let lastPointOutside = _points[0];
+ let isInside = false;
+ _points.forEach((point2) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc88 checking point", point2, boundryNode);
+ if (!outsideNode(boundryNode, point2) && !isInside) {
+ const inter = intersection(boundryNode, lastPointOutside, point2);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 inside", point2, lastPointOutside, inter);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 intersection", inter);
+ let pointPresent = false;
+ points.forEach((p) => {
+ pointPresent = pointPresent || p.x === inter.x && p.y === inter.y;
+ });
+ if (!points.some((e) => e.x === inter.x && e.y === inter.y)) {
+ points.push(inter);
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 no intersect", inter, points);
+ }
+ isInside = true;
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 outside", point2, lastPointOutside);
+ lastPointOutside = point2;
+ if (!isInside) {
+ points.push(point2);
+ }
+ }
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.warn("abc88 returning points", points);
+ return points;
+};
+const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph, id) {
+ let points = edge.points;
+ let pointsHasChanged = false;
+ const tail = graph.node(e.v);
+ var head = graph.node(e.w);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("abc88 InsertEdge: ", edge);
+ if (head.intersect && tail.intersect) {
+ points = points.slice(1, edge.points.length - 1);
+ points.unshift(tail.intersect(points[0]));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info(
+ "Last point",
+ points[points.length - 1],
+ head,
+ head.intersect(points[points.length - 1])
+ );
+ points.push(head.intersect(points[points.length - 1]));
+ }
+ if (edge.toCluster) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("to cluster abc88", clusterDb[edge.toCluster]);
+ points = cutPathAtIntersect(edge.points, clusterDb[edge.toCluster].node);
+ pointsHasChanged = true;
+ }
+ if (edge.fromCluster) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("from cluster abc88", clusterDb[edge.fromCluster]);
+ points = cutPathAtIntersect(points.reverse(), clusterDb[edge.fromCluster].node).reverse();
+ pointsHasChanged = true;
+ }
+ const lineData = points.filter((p) => !Number.isNaN(p.y));
+ let curve = d3__WEBPACK_IMPORTED_MODULE_0__/* .curveBasis */ .$0Z;
+ if (edge.curve && (diagramType === "graph" || diagramType === "flowchart")) {
+ curve = edge.curve;
+ }
+ const { x, y } = getLineFunctionsWithOffset(edge);
+ const lineFunction = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .line */ .jvg)().x(x).y(y).curve(curve);
+ let strokeClasses;
+ switch (edge.thickness) {
+ case "normal":
+ strokeClasses = "edge-thickness-normal";
+ break;
+ case "thick":
+ strokeClasses = "edge-thickness-thick";
+ break;
+ case "invisible":
+ strokeClasses = "edge-thickness-thick";
+ break;
+ default:
+ strokeClasses = "";
+ }
+ switch (edge.pattern) {
+ case "solid":
+ strokeClasses += " edge-pattern-solid";
+ break;
+ case "dotted":
+ strokeClasses += " edge-pattern-dotted";
+ break;
+ case "dashed":
+ strokeClasses += " edge-pattern-dashed";
+ break;
+ }
+ const svgPath = elem.append("path").attr("d", lineFunction(lineData)).attr("id", edge.id).attr("class", " " + strokeClasses + (edge.classes ? " " + edge.classes : "")).attr("style", edge.style);
+ let url = "";
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().flowchart.arrowMarkerAbsolute || (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().state.arrowMarkerAbsolute) {
+ url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
+ url = url.replace(/\(/g, "\\(");
+ url = url.replace(/\)/g, "\\)");
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("arrowTypeStart", edge.arrowTypeStart);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.info("arrowTypeEnd", edge.arrowTypeEnd);
+ addEdgeMarkers(svgPath, edge, url, id, diagramType);
+ let paths = {};
+ if (pointsHasChanged) {
+ paths.updatedPath = points;
+ }
+ paths.originalPath = edge.points;
+ return paths;
+};
+
+
+
+/***/ }),
+
+/***/ 74852:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ r: () => (/* binding */ render)
+/* harmony export */ });
+/* harmony import */ var dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41644);
+/* harmony import */ var dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(39354);
+/* harmony import */ var _edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(52494);
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76365);
+/* harmony import */ var dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45625);
+/* harmony import */ var _createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33183);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64218);
+
+
+
+
+
+
+
+let clusterDb = {};
+let descendants = {};
+let parents = {};
+const clear$1 = () => {
+ descendants = {};
+ parents = {};
+ clusterDb = {};
+};
+const isDescendant = (id, ancenstorId) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("In isDecendant", ancenstorId, " ", id, " = ", descendants[ancenstorId].includes(id));
+ if (descendants[ancenstorId].includes(id)) {
+ return true;
+ }
+ return false;
+};
+const edgeInCluster = (edge, clusterId) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Decendants of ", clusterId, " is ", descendants[clusterId]);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge is ", edge);
+ if (edge.v === clusterId) {
+ return false;
+ }
+ if (edge.w === clusterId) {
+ return false;
+ }
+ if (!descendants[clusterId]) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Tilt, ", clusterId, ",not in decendants");
+ return false;
+ }
+ return descendants[clusterId].includes(edge.v) || isDescendant(edge.v, clusterId) || isDescendant(edge.w, clusterId) || descendants[clusterId].includes(edge.w);
+};
+const copy = (clusterId, graph, newGraph, rootId) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Copying children of ",
+ clusterId,
+ "root",
+ rootId,
+ "data",
+ graph.node(clusterId),
+ rootId
+ );
+ const nodes = graph.children(clusterId) || [];
+ if (clusterId !== rootId) {
+ nodes.push(clusterId);
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Copying (nodes) clusterId", clusterId, "nodes", nodes);
+ nodes.forEach((node) => {
+ if (graph.children(node).length > 0) {
+ copy(node, graph, newGraph, rootId);
+ } else {
+ const data = graph.node(node);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("cp ", node, " to ", rootId, " with parent ", clusterId);
+ newGraph.setNode(node, data);
+ if (rootId !== graph.parent(node)) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Setting parent", node, graph.parent(node));
+ newGraph.setParent(node, graph.parent(node));
+ }
+ if (clusterId !== rootId && node !== clusterId) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Setting parent", node, clusterId);
+ newGraph.setParent(node, clusterId);
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("In copy ", clusterId, "root", rootId, "data", graph.node(clusterId), rootId);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(
+ "Not Setting parent for node=",
+ node,
+ "cluster!==rootId",
+ clusterId !== rootId,
+ "node!==clusterId",
+ node !== clusterId
+ );
+ }
+ const edges = graph.edges(node);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Copying Edges", edges);
+ edges.forEach((edge) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge", edge);
+ const data2 = graph.edge(edge.v, edge.w, edge.name);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge data", data2, rootId);
+ try {
+ if (edgeInCluster(edge, rootId)) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Copying as ", edge.v, edge.w, data2, edge.name);
+ newGraph.setEdge(edge.v, edge.w, data2, edge.name);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("newGraph edges ", newGraph.edges(), newGraph.edge(newGraph.edges()[0]));
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(
+ "Skipping copy of edge ",
+ edge.v,
+ "-->",
+ edge.w,
+ " rootId: ",
+ rootId,
+ " clusterId:",
+ clusterId
+ );
+ }
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error(e);
+ }
+ });
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Removing node", node);
+ graph.removeNode(node);
+ });
+};
+const extractDescendants = (id, graph) => {
+ const children = graph.children(id);
+ let res = [...children];
+ for (const child of children) {
+ parents[child] = id;
+ res = [...res, ...extractDescendants(child, graph)];
+ }
+ return res;
+};
+const findNonClusterChild = (id, graph) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching", id);
+ const children = graph.children(id);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Searching children of id ", id, children);
+ if (children.length < 1) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("This is a valid node", id);
+ return id;
+ }
+ for (const child of children) {
+ const _id = findNonClusterChild(child, graph);
+ if (_id) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Found replacement for", id, " => ", _id);
+ return _id;
+ }
+ }
+};
+const getAnchorId = (id) => {
+ if (!clusterDb[id]) {
+ return id;
+ }
+ if (!clusterDb[id].externalConnections) {
+ return id;
+ }
+ if (clusterDb[id]) {
+ return clusterDb[id].id;
+ }
+ return id;
+};
+const adjustClustersAndEdges = (graph, depth) => {
+ if (!graph || depth > 10) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting out, no graph ");
+ return;
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Opting in, graph ");
+ }
+ graph.nodes().forEach(function(id) {
+ const children = graph.children(id);
+ if (children.length > 0) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Cluster identified",
+ id,
+ " Replacement id in edges: ",
+ findNonClusterChild(id, graph)
+ );
+ descendants[id] = extractDescendants(id, graph);
+ clusterDb[id] = { id: findNonClusterChild(id, graph), clusterData: graph.node(id) };
+ }
+ });
+ graph.nodes().forEach(function(id) {
+ const children = graph.children(id);
+ const edges = graph.edges();
+ if (children.length > 0) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Cluster identified", id, descendants);
+ edges.forEach((edge) => {
+ if (edge.v !== id && edge.w !== id) {
+ const d1 = isDescendant(edge.v, id);
+ const d2 = isDescendant(edge.w, id);
+ if (d1 ^ d2) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge: ", edge, " leaves cluster ", id);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Decendants of XXX ", id, ": ", descendants[id]);
+ clusterDb[id].externalConnections = true;
+ }
+ }
+ });
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster ", id, descendants);
+ }
+ });
+ graph.edges().forEach(function(e) {
+ const edge = graph.edge(e);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(graph.edge(e)));
+ let v = e.v;
+ let w = e.w;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Fix XXX",
+ clusterDb,
+ "ids:",
+ e.v,
+ e.w,
+ "Translating: ",
+ clusterDb[e.v],
+ " --- ",
+ clusterDb[e.w]
+ );
+ if (clusterDb[e.v] && clusterDb[e.w] && clusterDb[e.v] === clusterDb[e.w]) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name);
+ v = getAnchorId(e.v);
+ w = getAnchorId(e.w);
+ graph.removeEdge(e.v, e.w, e.name);
+ const specialId = e.w + "---" + e.v;
+ graph.setNode(specialId, {
+ domId: specialId,
+ id: specialId,
+ labelStyle: "",
+ labelText: edge.label,
+ padding: 0,
+ shape: "labelRect",
+ style: ""
+ });
+ const edge1 = structuredClone(edge);
+ const edge2 = structuredClone(edge);
+ edge1.label = "";
+ edge1.arrowTypeEnd = "none";
+ edge2.label = "";
+ edge1.fromCluster = e.v;
+ edge2.toCluster = e.v;
+ graph.setEdge(v, specialId, edge1, e.name + "-cyclic-special");
+ graph.setEdge(specialId, w, edge2, e.name + "-cyclic-special");
+ } else if (clusterDb[e.v] || clusterDb[e.w]) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name);
+ v = getAnchorId(e.v);
+ w = getAnchorId(e.w);
+ graph.removeEdge(e.v, e.w, e.name);
+ if (v !== e.v) {
+ edge.fromCluster = e.v;
+ }
+ if (w !== e.w) {
+ edge.toCluster = e.w;
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fix Replacing with XXX", v, w, e.name);
+ graph.setEdge(v, w, edge, e.name);
+ }
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Adjusted Graph", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph));
+ extractor(graph, 0);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace(clusterDb);
+};
+const extractor = (graph, depth) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("extractor - ", depth, dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph), graph.children("D"));
+ if (depth > 10) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("Bailing out");
+ return;
+ }
+ let nodes = graph.nodes();
+ let hasChildren = false;
+ for (const node of nodes) {
+ const children = graph.children(node);
+ hasChildren = hasChildren || children.length > 0;
+ }
+ if (!hasChildren) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Done, no node has children", graph.nodes());
+ return;
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Nodes = ", nodes, depth);
+ for (const node of nodes) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(
+ "Extracting node",
+ node,
+ clusterDb,
+ clusterDb[node] && !clusterDb[node].externalConnections,
+ !graph.parent(node),
+ graph.node(node),
+ graph.children("D"),
+ " Depth ",
+ depth
+ );
+ if (!clusterDb[node]) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Not a cluster", node, depth);
+ } else if (!clusterDb[node].externalConnections && // !graph.parent(node) &&
+ graph.children(node) && graph.children(node).length > 0) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Cluster without external connections, without a parent and with children",
+ node,
+ depth
+ );
+ const graphSettings = graph.graph();
+ let dir = graphSettings.rankdir === "TB" ? "LR" : "TB";
+ if (clusterDb[node] && clusterDb[node].clusterData && clusterDb[node].clusterData.dir) {
+ dir = clusterDb[node].clusterData.dir;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Fixing dir", clusterDb[node].clusterData.dir, dir);
+ }
+ const clusterGraph = new dagre_d3_es_src_graphlib_index_js__WEBPACK_IMPORTED_MODULE_2__/* .Graph */ .k({
+ multigraph: true,
+ compound: true
+ }).setGraph({
+ rankdir: dir,
+ // Todo: set proper spacing
+ nodesep: 50,
+ ranksep: 50,
+ marginx: 8,
+ marginy: 8
+ }).setDefaultEdgeLabel(function() {
+ return {};
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Old graph before copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph));
+ copy(node, graph, clusterGraph, node);
+ graph.setNode(node, {
+ clusterNode: true,
+ id: node,
+ clusterData: clusterDb[node].clusterData,
+ labelText: clusterDb[node].labelText,
+ graph: clusterGraph
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New graph after copy node: (", node, ")", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(clusterGraph));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Old graph after copy", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph));
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(
+ "Cluster ** ",
+ node,
+ " **not meeting the criteria !externalConnections:",
+ !clusterDb[node].externalConnections,
+ " no parent: ",
+ !graph.parent(node),
+ " children ",
+ graph.children(node) && graph.children(node).length > 0,
+ graph.children("D"),
+ depth
+ );
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(clusterDb);
+ }
+ }
+ nodes = graph.nodes();
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("New list of nodes", nodes);
+ for (const node of nodes) {
+ const data = graph.node(node);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn(" Now next level", node, data);
+ if (data.clusterNode) {
+ extractor(data.graph, depth + 1);
+ }
+ }
+};
+const sorter = (graph, nodes) => {
+ if (nodes.length === 0) {
+ return [];
+ }
+ let result = Object.assign(nodes);
+ nodes.forEach((node) => {
+ const children = graph.children(node);
+ const sorted = sorter(graph, children);
+ result = [...result, ...sorted];
+ });
+ return result;
+};
+const sortNodesByHierarchy = (graph) => sorter(graph, graph.children());
+const rect = (parent, node) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Creating subgraph rect for ", node.id, node);
+ const shapeSvg = parent.insert("g").attr("class", "cluster" + (node.class ? " " + node.class : "")).attr("id", node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const useHtmlLabels = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().flowchart.htmlLabels);
+ const label = shapeSvg.insert("g").attr("class", "cluster-label");
+ const text = node.labelType === "markdown" ? (0,_createText_a48a4c90_js__WEBPACK_IMPORTED_MODULE_5__.a)(label, node.labelText, { style: node.labelStyle, useHtmlLabels }) : label.node().appendChild((0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true));
+ let bbox = text.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ys)(text);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ const padding = 0 * node.padding;
+ const halfPadding = padding / 2;
+ const width = node.width <= bbox.width + padding ? bbox.width + padding : node.width;
+ if (node.width <= bbox.width + padding) {
+ node.diff = (bbox.width - node.width) / 2 - node.padding / 2;
+ } else {
+ node.diff = -node.padding / 2;
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Data ", node, JSON.stringify(node));
+ rect2.attr("style", node.style).attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - width / 2).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width).attr("height", node.height + padding);
+ if (useHtmlLabels) {
+ label.attr(
+ "transform",
+ // This puts the labal on top of the box instead of inside it
+ "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2) + ")"
+ );
+ } else {
+ label.attr(
+ "transform",
+ // This puts the labal on top of the box instead of inside it
+ "translate(" + node.x + ", " + (node.y - node.height / 2) + ")"
+ );
+ }
+ const rectBox = rect2.node().getBBox();
+ node.width = rectBox.width;
+ node.height = rectBox.height;
+ node.intersect = function(point) {
+ return (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const noteGroup = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", "note-cluster").attr("id", node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const padding = 0 * node.padding;
+ const halfPadding = padding / 2;
+ rect2.attr("rx", node.rx).attr("ry", node.ry).attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", node.width + padding).attr("height", node.height + padding).attr("fill", "none");
+ const rectBox = rect2.node().getBBox();
+ node.width = rectBox.width;
+ node.height = rectBox.height;
+ node.intersect = function(point) {
+ return (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const roundedWithTitle = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const label = shapeSvg.insert("g").attr("class", "cluster-label");
+ const innerRect = shapeSvg.append("rect");
+ const text = label.node().appendChild((0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.c)(node.labelText, node.labelStyle, void 0, true));
+ let bbox = text.getBBox();
+ if ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().flowchart.htmlLabels)) {
+ const div = text.children[0];
+ const dv = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ys)(text);
+ bbox = div.getBoundingClientRect();
+ dv.attr("width", bbox.width);
+ dv.attr("height", bbox.height);
+ }
+ bbox = text.getBBox();
+ const padding = 0 * node.padding;
+ const halfPadding = padding / 2;
+ const width = node.width <= bbox.width + node.padding ? bbox.width + node.padding : node.width;
+ if (node.width <= bbox.width + node.padding) {
+ node.diff = (bbox.width + node.padding * 0 - node.width) / 2;
+ } else {
+ node.diff = -node.padding / 2;
+ }
+ rect2.attr("class", "outer").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding).attr("width", width + padding).attr("height", node.height + padding);
+ innerRect.attr("class", "inner").attr("x", node.x - width / 2 - halfPadding).attr("y", node.y - node.height / 2 - halfPadding + bbox.height - 1).attr("width", width + padding).attr("height", node.height + padding - bbox.height - 3);
+ label.attr(
+ "transform",
+ "translate(" + (node.x - bbox.width / 2) + ", " + (node.y - node.height / 2 - node.padding / 3 + ((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.m)((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().flowchart.htmlLabels) ? 5 : 3)) + ")"
+ );
+ const rectBox = rect2.node().getBBox();
+ node.height = rectBox.height;
+ node.intersect = function(point) {
+ return (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const divider = (parent, node) => {
+ const shapeSvg = parent.insert("g").attr("class", node.classes).attr("id", node.id);
+ const rect2 = shapeSvg.insert("rect", ":first-child");
+ const padding = 0 * node.padding;
+ const halfPadding = padding / 2;
+ rect2.attr("class", "divider").attr("x", node.x - node.width / 2 - halfPadding).attr("y", node.y - node.height / 2).attr("width", node.width + padding).attr("height", node.height + padding);
+ const rectBox = rect2.node().getBBox();
+ node.width = rectBox.width;
+ node.height = rectBox.height;
+ node.diff = -node.padding / 2;
+ node.intersect = function(point) {
+ return (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.i)(node, point);
+ };
+ return shapeSvg;
+};
+const shapes = { rect, roundedWithTitle, noteGroup, divider };
+let clusterElems = {};
+const insertCluster = (elem, node) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Inserting cluster");
+ const shape = node.shape || "rect";
+ clusterElems[node.id] = shapes[shape](elem, node);
+};
+const clear = () => {
+ clusterElems = {};
+};
+const recursiveRender = async (_elem, graph, diagramtype, id, parentCluster) => {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph in recursive render: XXX", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph), parentCluster);
+ const dir = graph.graph().rankdir;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Dir in recursive render - dir:", dir);
+ const elem = _elem.insert("g").attr("class", "root");
+ if (!graph.nodes()) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("No nodes found for", graph);
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Recursive render XXX", graph.nodes());
+ }
+ if (graph.edges().length > 0) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Recursive edges", graph.edge(graph.edges()[0]));
+ }
+ const clusters = elem.insert("g").attr("class", "clusters");
+ const edgePaths = elem.insert("g").attr("class", "edgePaths");
+ const edgeLabels = elem.insert("g").attr("class", "edgeLabels");
+ const nodes = elem.insert("g").attr("class", "nodes");
+ await Promise.all(
+ graph.nodes().map(async function(v) {
+ const node = graph.node(v);
+ if (parentCluster !== void 0) {
+ const data = JSON.parse(JSON.stringify(parentCluster.clusterData));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Setting data for cluster XXX (", v, ") ", data, parentCluster);
+ graph.setNode(parentCluster.id, data);
+ if (!graph.parent(v)) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.trace("Setting parent", v, parentCluster.id);
+ graph.setParent(v, parentCluster.id, data);
+ }
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("(Insert) Node XXX" + v + ": " + JSON.stringify(graph.node(v)));
+ if (node && node.clusterNode) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster identified", v, node.width, graph.node(v));
+ const o = await recursiveRender(nodes, node.graph, diagramtype, id, graph.node(v));
+ const newEl = o.elem;
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.u)(node, newEl);
+ node.diff = o.diff || 0;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node bounds (abc123)", v, node, node.width, node.x, node.y);
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.s)(newEl, node);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Recursive render complete ", newEl, node);
+ } else {
+ if (graph.children(v).length > 0) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Cluster - the non recursive path XXX", v, node.id, node, graph);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(findNonClusterChild(node.id, graph));
+ clusterDb[node.id] = { id: findNonClusterChild(node.id, graph), node };
+ } else {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Node - the non recursive path", v, node.id, node);
+ await (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.e)(nodes, graph.node(v), dir);
+ }
+ }
+ })
+ );
+ graph.edges().forEach(function(e) {
+ const edge = graph.edge(e.v, e.w, e.name);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": ", e, " ", JSON.stringify(graph.edge(e)));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Fix", clusterDb, "ids:", e.v, e.w, "Translateing: ", clusterDb[e.v], clusterDb[e.w]);
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.f)(edgeLabels, edge);
+ });
+ graph.edges().forEach(function(e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e));
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################");
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("### Layout ###");
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("#############################################");
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(graph);
+ (0,dagre_d3_es_src_dagre_index_js__WEBPACK_IMPORTED_MODULE_0__/* .layout */ .bK)(graph);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Graph after layout:", dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph));
+ let diff = 0;
+ sortNodesByHierarchy(graph).forEach(function(v) {
+ const node = graph.node(v);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Position " + v + ": " + JSON.stringify(graph.node(v)));
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(
+ "Position " + v + ": (" + node.x,
+ "," + node.y,
+ ") width: ",
+ node.width,
+ " height: ",
+ node.height
+ );
+ if (node && node.clusterNode) {
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.p)(node);
+ } else {
+ if (graph.children(v).length > 0) {
+ insertCluster(clusters, node);
+ clusterDb[node.id].node = node;
+ } else {
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.p)(node);
+ }
+ }
+ });
+ graph.edges().forEach(function(e) {
+ const edge = graph.edge(e);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(edge), edge);
+ const paths = (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.g)(edgePaths, e, edge, clusterDb, diagramtype, graph, id);
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.h)(edge, paths);
+ });
+ graph.nodes().forEach(function(v) {
+ const n = graph.node(v);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.info(v, n.type, n.diff);
+ if (n.type === "group") {
+ diff = n.diff;
+ }
+ });
+ return { elem, diff };
+};
+const render = async (elem, graph, markers, diagramtype, id) => {
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.a)(elem, markers, diagramtype, id);
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.b)();
+ (0,_edges_5ec2587c_js__WEBPACK_IMPORTED_MODULE_6__.d)();
+ clear();
+ clear$1();
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph at first:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph)));
+ adjustClustersAndEdges(graph);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.warn("Graph after:", JSON.stringify(dagre_d3_es_src_graphlib_json_js__WEBPACK_IMPORTED_MODULE_1__/* .write */ .c(graph)));
+ await recursiveRender(elem, graph, diagramtype, id);
+};
+
+
+
+/***/ }),
+
+/***/ 42924:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ d: () => (/* binding */ db),
+/* harmony export */ p: () => (/* binding */ parser$1),
+/* harmony export */ s: () => (/* binding */ styles)
+/* harmony export */ });
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76365);
+
+
+var parser = function() {
+ var o = function(k, v, o2, l) {
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
+ ;
+ return o2;
+ }, $V0 = [1, 17], $V1 = [1, 18], $V2 = [1, 19], $V3 = [1, 39], $V4 = [1, 40], $V5 = [1, 25], $V6 = [1, 23], $V7 = [1, 24], $V8 = [1, 31], $V9 = [1, 32], $Va = [1, 33], $Vb = [1, 34], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 26], $Vf = [1, 27], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 43], $Vj = [1, 30], $Vk = [1, 42], $Vl = [1, 44], $Vm = [1, 41], $Vn = [1, 45], $Vo = [1, 9], $Vp = [1, 8, 9], $Vq = [1, 56], $Vr = [1, 57], $Vs = [1, 58], $Vt = [1, 59], $Vu = [1, 60], $Vv = [1, 61], $Vw = [1, 62], $Vx = [1, 8, 9, 39], $Vy = [1, 74], $Vz = [1, 8, 9, 12, 13, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], $VA = [1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 46, 59, 60, 61, 62, 63, 64, 65, 70, 72, 74, 80, 95, 97, 98], $VB = [13, 74, 80, 95, 97, 98], $VC = [13, 64, 65, 74, 80, 95, 97, 98], $VD = [13, 59, 60, 61, 62, 63, 74, 80, 95, 97, 98], $VE = [1, 93], $VF = [1, 110], $VG = [1, 108], $VH = [1, 102], $VI = [1, 103], $VJ = [1, 104], $VK = [1, 105], $VL = [1, 106], $VM = [1, 107], $VN = [1, 109], $VO = [1, 8, 9, 37, 39, 42], $VP = [1, 8, 9, 21], $VQ = [1, 8, 9, 78], $VR = [1, 8, 9, 21, 73, 74, 78, 80, 81, 82, 83, 84, 85];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "styleStatement": 27, "cssClassStatement": 28, "noteStatement": 29, "direction": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "namespaceIdentifier": 36, "STRUCT_START": 37, "classStatements": 38, "STRUCT_STOP": 39, "NAMESPACE": 40, "classIdentifier": 41, "STYLE_SEPARATOR": 42, "members": 43, "CLASS": 44, "ANNOTATION_START": 45, "ANNOTATION_END": 46, "MEMBER": 47, "SEPARATOR": 48, "relation": 49, "NOTE_FOR": 50, "noteText": 51, "NOTE": 52, "direction_tb": 53, "direction_bt": 54, "direction_rl": 55, "direction_lr": 56, "relationType": 57, "lineType": 58, "AGGREGATION": 59, "EXTENSION": 60, "COMPOSITION": 61, "DEPENDENCY": 62, "LOLLIPOP": 63, "LINE": 64, "DOTTED_LINE": 65, "CALLBACK": 66, "LINK": 67, "LINK_TARGET": 68, "CLICK": 69, "CALLBACK_NAME": 70, "CALLBACK_ARGS": 71, "HREF": 72, "STYLE": 73, "ALPHA": 74, "stylesOpt": 75, "CSSCLASS": 76, "style": 77, "COMMA": 78, "styleComponent": 79, "NUM": 80, "COLON": 81, "UNIT": 82, "SPACE": 83, "BRKT": 84, "PCT": 85, "commentToken": 86, "textToken": 87, "graphCodeTokens": 88, "textNoTagsToken": 89, "TAGSTART": 90, "TAGEND": 91, "==": 92, "--": 93, "DEFAULT": 94, "MINUS": 95, "keywords": 96, "UNICODE_TEXT": 97, "BQUOTE_STR": 98, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 37: "STRUCT_START", 39: "STRUCT_STOP", 40: "NAMESPACE", 42: "STYLE_SEPARATOR", 44: "CLASS", 45: "ANNOTATION_START", 46: "ANNOTATION_END", 47: "MEMBER", 48: "SEPARATOR", 50: "NOTE_FOR", 52: "NOTE", 53: "direction_tb", 54: "direction_bt", 55: "direction_rl", 56: "direction_lr", 59: "AGGREGATION", 60: "EXTENSION", 61: "COMPOSITION", 62: "DEPENDENCY", 63: "LOLLIPOP", 64: "LINE", 65: "DOTTED_LINE", 66: "CALLBACK", 67: "LINK", 68: "LINK_TARGET", 69: "CLICK", 70: "CALLBACK_NAME", 71: "CALLBACK_ARGS", 72: "HREF", 73: "STYLE", 74: "ALPHA", 76: "CSSCLASS", 78: "COMMA", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 88: "graphCodeTokens", 90: "TAGSTART", 91: "TAGEND", 92: "==", 93: "--", 94: "DEFAULT", 95: "MINUS", 96: "keywords", 97: "UNICODE_TEXT", 98: "BQUOTE_STR" },
+ productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [36, 2], [38, 1], [38, 2], [38, 3], [23, 1], [23, 3], [23, 4], [23, 6], [41, 2], [41, 3], [25, 4], [43, 1], [43, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [29, 3], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [49, 3], [49, 2], [49, 2], [49, 1], [57, 1], [57, 1], [57, 1], [57, 1], [57, 1], [58, 1], [58, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [28, 3], [75, 1], [75, 3], [77, 1], [77, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [86, 1], [86, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [89, 1], [89, 1], [89, 1], [89, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [51, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 8:
+ this.$ = $$[$0 - 1];
+ break;
+ case 9:
+ case 11:
+ case 12:
+ this.$ = $$[$0];
+ break;
+ case 10:
+ case 13:
+ this.$ = $$[$0 - 1] + $$[$0];
+ break;
+ case 14:
+ case 15:
+ this.$ = $$[$0 - 1] + "~" + $$[$0] + "~";
+ break;
+ case 16:
+ yy.addRelation($$[$0]);
+ break;
+ case 17:
+ $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
+ yy.addRelation($$[$0 - 1]);
+ break;
+ case 27:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 28:
+ case 29:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 30:
+ yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 31:
+ yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]);
+ break;
+ case 32:
+ this.$ = $$[$0];
+ yy.addNamespace($$[$0]);
+ break;
+ case 33:
+ this.$ = [$$[$0]];
+ break;
+ case 34:
+ this.$ = [$$[$0 - 1]];
+ break;
+ case 35:
+ $$[$0].unshift($$[$0 - 2]);
+ this.$ = $$[$0];
+ break;
+ case 37:
+ yy.setCssClass($$[$0 - 2], $$[$0]);
+ break;
+ case 38:
+ yy.addMembers($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 39:
+ yy.setCssClass($$[$0 - 5], $$[$0 - 3]);
+ yy.addMembers($$[$0 - 5], $$[$0 - 1]);
+ break;
+ case 40:
+ this.$ = $$[$0];
+ yy.addClass($$[$0]);
+ break;
+ case 41:
+ this.$ = $$[$0 - 1];
+ yy.addClass($$[$0 - 1]);
+ yy.setClassLabel($$[$0 - 1], $$[$0]);
+ break;
+ case 42:
+ yy.addAnnotation($$[$0], $$[$0 - 2]);
+ break;
+ case 43:
+ this.$ = [$$[$0]];
+ break;
+ case 44:
+ $$[$0].push($$[$0 - 1]);
+ this.$ = $$[$0];
+ break;
+ case 45:
+ break;
+ case 46:
+ yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
+ break;
+ case 47:
+ break;
+ case 48:
+ break;
+ case 49:
+ this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" };
+ break;
+ case 50:
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" };
+ break;
+ case 51:
+ this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] };
+ break;
+ case 52:
+ this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };
+ break;
+ case 53:
+ yy.addNote($$[$0], $$[$0 - 1]);
+ break;
+ case 54:
+ yy.addNote($$[$0]);
+ break;
+ case 55:
+ yy.setDirection("TB");
+ break;
+ case 56:
+ yy.setDirection("BT");
+ break;
+ case 57:
+ yy.setDirection("RL");
+ break;
+ case 58:
+ yy.setDirection("LR");
+ break;
+ case 59:
+ this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };
+ break;
+ case 60:
+ this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] };
+ break;
+ case 61:
+ this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] };
+ break;
+ case 62:
+ this.$ = { type1: "none", type2: "none", lineType: $$[$0] };
+ break;
+ case 63:
+ this.$ = yy.relationType.AGGREGATION;
+ break;
+ case 64:
+ this.$ = yy.relationType.EXTENSION;
+ break;
+ case 65:
+ this.$ = yy.relationType.COMPOSITION;
+ break;
+ case 66:
+ this.$ = yy.relationType.DEPENDENCY;
+ break;
+ case 67:
+ this.$ = yy.relationType.LOLLIPOP;
+ break;
+ case 68:
+ this.$ = yy.lineType.LINE;
+ break;
+ case 69:
+ this.$ = yy.lineType.DOTTED_LINE;
+ break;
+ case 70:
+ case 76:
+ this.$ = $$[$0 - 2];
+ yy.setClickEvent($$[$0 - 1], $$[$0]);
+ break;
+ case 71:
+ case 77:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 2], $$[$0]);
+ break;
+ case 72:
+ this.$ = $$[$0 - 2];
+ yy.setLink($$[$0 - 1], $$[$0]);
+ break;
+ case 73:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 74:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 2], $$[$0]);
+ break;
+ case 75:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
+ yy.setTooltip($$[$0 - 3], $$[$0 - 1]);
+ break;
+ case 78:
+ this.$ = $$[$0 - 3];
+ yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
+ break;
+ case 79:
+ this.$ = $$[$0 - 4];
+ yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 80:
+ this.$ = $$[$0 - 3];
+ yy.setLink($$[$0 - 2], $$[$0]);
+ break;
+ case 81:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]);
+ break;
+ case 82:
+ this.$ = $$[$0 - 4];
+ yy.setLink($$[$0 - 3], $$[$0 - 1]);
+ yy.setTooltip($$[$0 - 3], $$[$0]);
+ break;
+ case 83:
+ this.$ = $$[$0 - 5];
+ yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
+ yy.setTooltip($$[$0 - 4], $$[$0 - 1]);
+ break;
+ case 84:
+ this.$ = $$[$0 - 2];
+ yy.setCssStyle($$[$0 - 1], $$[$0]);
+ break;
+ case 85:
+ yy.setCssClass($$[$0 - 1], $$[$0]);
+ break;
+ case 86:
+ this.$ = [$$[$0]];
+ break;
+ case 87:
+ $$[$0 - 2].push($$[$0]);
+ this.$ = $$[$0 - 2];
+ break;
+ case 89:
+ this.$ = $$[$0 - 1] + $$[$0];
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vo, [2, 5], { 8: [1, 46] }), { 8: [1, 47] }, o($Vp, [2, 16], { 21: [1, 48] }), o($Vp, [2, 18]), o($Vp, [2, 19]), o($Vp, [2, 20]), o($Vp, [2, 21]), o($Vp, [2, 22]), o($Vp, [2, 23]), o($Vp, [2, 24]), o($Vp, [2, 25]), o($Vp, [2, 26]), { 32: [1, 49] }, { 34: [1, 50] }, o($Vp, [2, 29]), o($Vp, [2, 45], { 49: 51, 57: 54, 58: 55, 13: [1, 52], 21: [1, 53], 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }), { 37: [1, 63] }, o($Vx, [2, 36], { 37: [1, 65], 42: [1, 64] }), o($Vp, [2, 47]), o($Vp, [2, 48]), { 16: 66, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 67, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 68, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 69, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 74: [1, 70] }, { 13: [1, 71] }, { 16: 37, 17: 72, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: $Vy, 51: 73 }, o($Vp, [2, 55]), o($Vp, [2, 56]), o($Vp, [2, 57]), o($Vp, [2, 58]), o($Vz, [2, 11], { 16: 37, 18: 38, 17: 75, 19: [1, 76], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), o($Vz, [2, 12], { 19: [1, 77] }), { 15: 78, 16: 79, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 80, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VA, [2, 112]), o($VA, [2, 113]), o($VA, [2, 114]), o($VA, [2, 115]), o([1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], [2, 116]), o($Vo, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 17: 20, 36: 21, 41: 22, 16: 37, 18: 38, 5: 81, 31: $V0, 33: $V1, 35: $V2, 40: $V3, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), { 5: 82, 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 17]), o($Vp, [2, 27]), o($Vp, [2, 28]), { 13: [1, 84], 16: 37, 17: 83, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 49: 85, 57: 54, 58: 55, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }, o($Vp, [2, 46]), { 58: 86, 64: $Vv, 65: $Vw }, o($VB, [2, 62], { 57: 87, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VC, [2, 63]), o($VC, [2, 64]), o($VC, [2, 65]), o($VC, [2, 66]), o($VC, [2, 67]), o($VD, [2, 68]), o($VD, [2, 69]), { 8: [1, 89], 23: 90, 38: 88, 41: 22, 44: $V4 }, { 16: 91, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 43: 92, 47: $VE }, { 46: [1, 94] }, { 13: [1, 95] }, { 13: [1, 96] }, { 70: [1, 97], 72: [1, 98] }, { 21: $VF, 73: $VG, 74: $VH, 75: 99, 77: 100, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, { 74: [1, 111] }, { 13: $Vy, 51: 112 }, o($Vp, [2, 54]), o($Vp, [2, 117]), o($Vz, [2, 13]), o($Vz, [2, 14]), o($Vz, [2, 15]), { 37: [2, 32] }, { 15: 113, 16: 79, 37: [2, 9], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, o($VO, [2, 40], { 11: 114, 12: [1, 115] }), o($Vo, [2, 7]), { 9: [1, 116] }, o($VP, [2, 49]), { 16: 37, 17: 117, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: [1, 119], 16: 37, 17: 118, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 61], { 57: 120, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VB, [2, 60]), { 39: [1, 121] }, { 23: 90, 38: 122, 41: 22, 44: $V4 }, { 8: [1, 123], 39: [2, 33] }, o($Vx, [2, 37], { 37: [1, 124] }), { 39: [1, 125] }, { 39: [2, 43], 43: 126, 47: $VE }, { 16: 37, 17: 127, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 70], { 13: [1, 128] }), o($Vp, [2, 72], { 13: [1, 130], 68: [1, 129] }), o($Vp, [2, 76], { 13: [1, 131], 71: [1, 132] }), { 13: [1, 133] }, o($Vp, [2, 84], { 78: [1, 134] }), o($VQ, [2, 86], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VR, [2, 88]), o($VR, [2, 90]), o($VR, [2, 91]), o($VR, [2, 92]), o($VR, [2, 93]), o($VR, [2, 94]), o($VR, [2, 95]), o($VR, [2, 96]), o($VR, [2, 97]), o($VR, [2, 98]), o($Vp, [2, 85]), o($Vp, [2, 53]), { 37: [2, 10] }, o($VO, [2, 41]), { 13: [1, 136] }, { 1: [2, 4] }, o($VP, [2, 51]), o($VP, [2, 50]), { 16: 37, 17: 137, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 59]), o($Vp, [2, 30]), { 39: [1, 138] }, { 23: 90, 38: 139, 39: [2, 34], 41: 22, 44: $V4 }, { 43: 140, 47: $VE }, o($Vx, [2, 38]), { 39: [2, 44] }, o($Vp, [2, 42]), o($Vp, [2, 71]), o($Vp, [2, 73]), o($Vp, [2, 74], { 68: [1, 141] }), o($Vp, [2, 77]), o($Vp, [2, 78], { 13: [1, 142] }), o($Vp, [2, 80], { 13: [1, 144], 68: [1, 143] }), { 21: $VF, 73: $VG, 74: $VH, 77: 145, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, o($VR, [2, 89]), { 14: [1, 146] }, o($VP, [2, 52]), o($Vp, [2, 31]), { 39: [2, 35] }, { 39: [1, 147] }, o($Vp, [2, 75]), o($Vp, [2, 79]), o($Vp, [2, 81]), o($Vp, [2, 82], { 68: [1, 148] }), o($VQ, [2, 87], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VO, [2, 8]), o($Vx, [2, 39]), o($Vp, [2, 83])],
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 78: [2, 32], 113: [2, 10], 116: [2, 4], 126: [2, 44], 139: [2, 35] },
+ parseError: function parseError(str, hash) {
+ if (hash.recoverable) {
+ this.trace(str);
+ } else {
+ var error = new Error(str);
+ error.hash = hash;
+ throw error;
+ }
+ },
+ parse: function parse(input) {
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
+ var args = lstack.slice.call(arguments, 1);
+ var lexer2 = Object.create(this.lexer);
+ var sharedState = { yy: {} };
+ for (var k in this.yy) {
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
+ sharedState.yy[k] = this.yy[k];
+ }
+ }
+ lexer2.setInput(input, sharedState.yy);
+ sharedState.yy.lexer = lexer2;
+ sharedState.yy.parser = this;
+ if (typeof lexer2.yylloc == "undefined") {
+ lexer2.yylloc = {};
+ }
+ var yyloc = lexer2.yylloc;
+ lstack.push(yyloc);
+ var ranges = lexer2.options && lexer2.options.ranges;
+ if (typeof sharedState.yy.parseError === "function") {
+ this.parseError = sharedState.yy.parseError;
+ } else {
+ this.parseError = Object.getPrototypeOf(this).parseError;
+ }
+ function lex() {
+ var token;
+ token = tstack.pop() || lexer2.lex() || EOF;
+ if (typeof token !== "number") {
+ if (token instanceof Array) {
+ tstack = token;
+ token = tstack.pop();
+ }
+ token = self.symbols_[token] || token;
+ }
+ return token;
+ }
+ var symbol, state, action, r, yyval = {}, p, len, newState, expected;
+ while (true) {
+ state = stack[stack.length - 1];
+ if (this.defaultActions[state]) {
+ action = this.defaultActions[state];
+ } else {
+ if (symbol === null || typeof symbol == "undefined") {
+ symbol = lex();
+ }
+ action = table[state] && table[state][symbol];
+ }
+ if (typeof action === "undefined" || !action.length || !action[0]) {
+ var errStr = "";
+ expected = [];
+ for (p in table[state]) {
+ if (this.terminals_[p] && p > TERROR) {
+ expected.push("'" + this.terminals_[p] + "'");
+ }
+ }
+ if (lexer2.showPosition) {
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
+ } else {
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
+ }
+ this.parseError(errStr, {
+ text: lexer2.match,
+ token: this.terminals_[symbol] || symbol,
+ line: lexer2.yylineno,
+ loc: yyloc,
+ expected
+ });
+ }
+ if (action[0] instanceof Array && action.length > 1) {
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
+ }
+ switch (action[0]) {
+ case 1:
+ stack.push(symbol);
+ vstack.push(lexer2.yytext);
+ lstack.push(lexer2.yylloc);
+ stack.push(action[1]);
+ symbol = null;
+ {
+ yyleng = lexer2.yyleng;
+ yytext = lexer2.yytext;
+ yylineno = lexer2.yylineno;
+ yyloc = lexer2.yylloc;
+ }
+ break;
+ case 2:
+ len = this.productions_[action[1]][1];
+ yyval.$ = vstack[vstack.length - len];
+ yyval._$ = {
+ first_line: lstack[lstack.length - (len || 1)].first_line,
+ last_line: lstack[lstack.length - 1].last_line,
+ first_column: lstack[lstack.length - (len || 1)].first_column,
+ last_column: lstack[lstack.length - 1].last_column
+ };
+ if (ranges) {
+ yyval._$.range = [
+ lstack[lstack.length - (len || 1)].range[0],
+ lstack[lstack.length - 1].range[1]
+ ];
+ }
+ r = this.performAction.apply(yyval, [
+ yytext,
+ yyleng,
+ yylineno,
+ sharedState.yy,
+ action[1],
+ vstack,
+ lstack
+ ].concat(args));
+ if (typeof r !== "undefined") {
+ return r;
+ }
+ if (len) {
+ stack = stack.slice(0, -1 * len * 2);
+ vstack = vstack.slice(0, -1 * len);
+ lstack = lstack.slice(0, -1 * len);
+ }
+ stack.push(this.productions_[action[1]][0]);
+ vstack.push(yyval.$);
+ lstack.push(yyval._$);
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
+ stack.push(newState);
+ break;
+ case 3:
+ return true;
+ }
+ }
+ return true;
+ }
+ };
+ var lexer = function() {
+ var lexer2 = {
+ EOF: 1,
+ parseError: function parseError(str, hash) {
+ if (this.yy.parser) {
+ this.yy.parser.parseError(str, hash);
+ } else {
+ throw new Error(str);
+ }
+ },
+ // resets the lexer, sets new input
+ setInput: function(input, yy) {
+ this.yy = yy || this.yy || {};
+ this._input = input;
+ this._more = this._backtrack = this.done = false;
+ this.yylineno = this.yyleng = 0;
+ this.yytext = this.matched = this.match = "";
+ this.conditionStack = ["INITIAL"];
+ this.yylloc = {
+ first_line: 1,
+ first_column: 0,
+ last_line: 1,
+ last_column: 0
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [0, 0];
+ }
+ this.offset = 0;
+ return this;
+ },
+ // consumes and returns one char from the input
+ input: function() {
+ var ch = this._input[0];
+ this.yytext += ch;
+ this.yyleng++;
+ this.offset++;
+ this.match += ch;
+ this.matched += ch;
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno++;
+ this.yylloc.last_line++;
+ } else {
+ this.yylloc.last_column++;
+ }
+ if (this.options.ranges) {
+ this.yylloc.range[1]++;
+ }
+ this._input = this._input.slice(1);
+ return ch;
+ },
+ // unshifts one char (or a string) into the input
+ unput: function(ch) {
+ var len = ch.length;
+ var lines = ch.split(/(?:\r\n?|\n)/g);
+ this._input = ch + this._input;
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
+ this.offset -= len;
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
+ this.match = this.match.substr(0, this.match.length - 1);
+ this.matched = this.matched.substr(0, this.matched.length - 1);
+ if (lines.length - 1) {
+ this.yylineno -= lines.length - 1;
+ }
+ var r = this.yylloc.range;
+ this.yylloc = {
+ first_line: this.yylloc.first_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.first_column,
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
+ }
+ this.yyleng = this.yytext.length;
+ return this;
+ },
+ // When called from action, caches matched text and appends it on next action
+ more: function() {
+ this._more = true;
+ return this;
+ },
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
+ reject: function() {
+ if (this.options.backtrack_lexer) {
+ this._backtrack = true;
+ } else {
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
+ }
+ return this;
+ },
+ // retain first n characters of the match
+ less: function(n) {
+ this.unput(this.match.slice(n));
+ },
+ // displays already matched input, i.e. for error messages
+ pastInput: function() {
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
+ },
+ // displays upcoming input, i.e. for error messages
+ upcomingInput: function() {
+ var next = this.match;
+ if (next.length < 20) {
+ next += this._input.substr(0, 20 - next.length);
+ }
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
+ },
+ // displays the character position where the lexing error occurred, i.e. for error messages
+ showPosition: function() {
+ var pre = this.pastInput();
+ var c = new Array(pre.length + 1).join("-");
+ return pre + this.upcomingInput() + "\n" + c + "^";
+ },
+ // test the lexed token: return FALSE when not a match, otherwise return token
+ test_match: function(match, indexed_rule) {
+ var token, lines, backup;
+ if (this.options.backtrack_lexer) {
+ backup = {
+ yylineno: this.yylineno,
+ yylloc: {
+ first_line: this.yylloc.first_line,
+ last_line: this.last_line,
+ first_column: this.yylloc.first_column,
+ last_column: this.yylloc.last_column
+ },
+ yytext: this.yytext,
+ match: this.match,
+ matches: this.matches,
+ matched: this.matched,
+ yyleng: this.yyleng,
+ offset: this.offset,
+ _more: this._more,
+ _input: this._input,
+ yy: this.yy,
+ conditionStack: this.conditionStack.slice(0),
+ done: this.done
+ };
+ if (this.options.ranges) {
+ backup.yylloc.range = this.yylloc.range.slice(0);
+ }
+ }
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno += lines.length;
+ }
+ this.yylloc = {
+ first_line: this.yylloc.last_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.last_column,
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
+ };
+ this.yytext += match[0];
+ this.match += match[0];
+ this.matches = match;
+ this.yyleng = this.yytext.length;
+ if (this.options.ranges) {
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
+ }
+ this._more = false;
+ this._backtrack = false;
+ this._input = this._input.slice(match[0].length);
+ this.matched += match[0];
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
+ if (this.done && this._input) {
+ this.done = false;
+ }
+ if (token) {
+ return token;
+ } else if (this._backtrack) {
+ for (var k in backup) {
+ this[k] = backup[k];
+ }
+ return false;
+ }
+ return false;
+ },
+ // return next match in input
+ next: function() {
+ if (this.done) {
+ return this.EOF;
+ }
+ if (!this._input) {
+ this.done = true;
+ }
+ var token, match, tempMatch, index;
+ if (!this._more) {
+ this.yytext = "";
+ this.match = "";
+ }
+ var rules = this._currentRules();
+ for (var i = 0; i < rules.length; i++) {
+ tempMatch = this._input.match(this.rules[rules[i]]);
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
+ match = tempMatch;
+ index = i;
+ if (this.options.backtrack_lexer) {
+ token = this.test_match(tempMatch, rules[i]);
+ if (token !== false) {
+ return token;
+ } else if (this._backtrack) {
+ match = false;
+ continue;
+ } else {
+ return false;
+ }
+ } else if (!this.options.flex) {
+ break;
+ }
+ }
+ }
+ if (match) {
+ token = this.test_match(match, rules[index]);
+ if (token !== false) {
+ return token;
+ }
+ return false;
+ }
+ if (this._input === "") {
+ return this.EOF;
+ } else {
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
+ }
+ },
+ // return next match that has a token
+ lex: function lex() {
+ var r = this.next();
+ if (r) {
+ return r;
+ } else {
+ return this.lex();
+ }
+ },
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
+ begin: function begin(condition) {
+ this.conditionStack.push(condition);
+ },
+ // pop the previously active lexer condition state off the condition stack
+ popState: function popState() {
+ var n = this.conditionStack.length - 1;
+ if (n > 0) {
+ return this.conditionStack.pop();
+ } else {
+ return this.conditionStack[0];
+ }
+ },
+ // produce the lexer rule set which is active for the currently active lexer condition state
+ _currentRules: function _currentRules() {
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
+ } else {
+ return this.conditions["INITIAL"].rules;
+ }
+ },
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
+ topState: function topState(n) {
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
+ if (n >= 0) {
+ return this.conditionStack[n];
+ } else {
+ return "INITIAL";
+ }
+ },
+ // alias for begin(condition)
+ pushState: function pushState(condition) {
+ this.begin(condition);
+ },
+ // return the number of states currently on the stack
+ stateStackSize: function stateStackSize() {
+ return this.conditionStack.length;
+ },
+ options: {},
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
+ switch ($avoiding_name_collisions) {
+ case 0:
+ return 53;
+ case 1:
+ return 54;
+ case 2:
+ return 55;
+ case 3:
+ return 56;
+ case 4:
+ break;
+ case 5:
+ break;
+ case 6:
+ this.begin("acc_title");
+ return 31;
+ case 7:
+ this.popState();
+ return "acc_title_value";
+ case 8:
+ this.begin("acc_descr");
+ return 33;
+ case 9:
+ this.popState();
+ return "acc_descr_value";
+ case 10:
+ this.begin("acc_descr_multiline");
+ break;
+ case 11:
+ this.popState();
+ break;
+ case 12:
+ return "acc_descr_multiline_value";
+ case 13:
+ return 8;
+ case 14:
+ break;
+ case 15:
+ return 7;
+ case 16:
+ return 7;
+ case 17:
+ return "EDGE_STATE";
+ case 18:
+ this.begin("callback_name");
+ break;
+ case 19:
+ this.popState();
+ break;
+ case 20:
+ this.popState();
+ this.begin("callback_args");
+ break;
+ case 21:
+ return 70;
+ case 22:
+ this.popState();
+ break;
+ case 23:
+ return 71;
+ case 24:
+ this.popState();
+ break;
+ case 25:
+ return "STR";
+ case 26:
+ this.begin("string");
+ break;
+ case 27:
+ return 73;
+ case 28:
+ this.begin("namespace");
+ return 40;
+ case 29:
+ this.popState();
+ return 8;
+ case 30:
+ break;
+ case 31:
+ this.begin("namespace-body");
+ return 37;
+ case 32:
+ this.popState();
+ return 39;
+ case 33:
+ return "EOF_IN_STRUCT";
+ case 34:
+ return 8;
+ case 35:
+ break;
+ case 36:
+ return "EDGE_STATE";
+ case 37:
+ this.begin("class");
+ return 44;
+ case 38:
+ this.popState();
+ return 8;
+ case 39:
+ break;
+ case 40:
+ this.popState();
+ this.popState();
+ return 39;
+ case 41:
+ this.begin("class-body");
+ return 37;
+ case 42:
+ this.popState();
+ return 39;
+ case 43:
+ return "EOF_IN_STRUCT";
+ case 44:
+ return "EDGE_STATE";
+ case 45:
+ return "OPEN_IN_STRUCT";
+ case 46:
+ break;
+ case 47:
+ return "MEMBER";
+ case 48:
+ return 76;
+ case 49:
+ return 66;
+ case 50:
+ return 67;
+ case 51:
+ return 69;
+ case 52:
+ return 50;
+ case 53:
+ return 52;
+ case 54:
+ return 45;
+ case 55:
+ return 46;
+ case 56:
+ return 72;
+ case 57:
+ this.popState();
+ break;
+ case 58:
+ return "GENERICTYPE";
+ case 59:
+ this.begin("generic");
+ break;
+ case 60:
+ this.popState();
+ break;
+ case 61:
+ return "BQUOTE_STR";
+ case 62:
+ this.begin("bqstring");
+ break;
+ case 63:
+ return 68;
+ case 64:
+ return 68;
+ case 65:
+ return 68;
+ case 66:
+ return 68;
+ case 67:
+ return 60;
+ case 68:
+ return 60;
+ case 69:
+ return 62;
+ case 70:
+ return 62;
+ case 71:
+ return 61;
+ case 72:
+ return 59;
+ case 73:
+ return 63;
+ case 74:
+ return 64;
+ case 75:
+ return 65;
+ case 76:
+ return 21;
+ case 77:
+ return 42;
+ case 78:
+ return 95;
+ case 79:
+ return "DOT";
+ case 80:
+ return "PLUS";
+ case 81:
+ return 81;
+ case 82:
+ return 78;
+ case 83:
+ return 84;
+ case 84:
+ return 84;
+ case 85:
+ return 85;
+ case 86:
+ return "EQUALS";
+ case 87:
+ return "EQUALS";
+ case 88:
+ return 74;
+ case 89:
+ return 12;
+ case 90:
+ return 14;
+ case 91:
+ return "PUNCTUATION";
+ case 92:
+ return 80;
+ case 93:
+ return 97;
+ case 94:
+ return 83;
+ case 95:
+ return 83;
+ case 96:
+ return 9;
+ }
+ },
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/],
+ conditions: { "namespace-body": { "rules": [26, 32, 33, 34, 35, 36, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "namespace": { "rules": [26, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class-body": { "rules": [26, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class": { "rules": [26, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr": { "rules": [9, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_title": { "rules": [7, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "href": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "struct": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "generic": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "bqstring": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "string": { "rules": [24, 25, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "inclusive": true } }
+ };
+ return lexer2;
+ }();
+ parser2.lexer = lexer;
+ function Parser() {
+ this.yy = {};
+ }
+ Parser.prototype = parser2;
+ parser2.Parser = Parser;
+ return new Parser();
+}();
+parser.parser = parser;
+const parser$1 = parser;
+const visibilityValues = ["#", "+", "~", "-", ""];
+class ClassMember {
+ constructor(input, memberType) {
+ this.memberType = memberType;
+ this.visibility = "";
+ this.classifier = "";
+ const sanitizedInput = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.d)(input, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ this.parseMember(sanitizedInput);
+ }
+ getDisplayDetails() {
+ let displayText = this.visibility + (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.v)(this.id);
+ if (this.memberType === "method") {
+ displayText += `(${(0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.v)(this.parameters.trim())})`;
+ if (this.returnType) {
+ displayText += " : " + (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.v)(this.returnType);
+ }
+ }
+ displayText = displayText.trim();
+ const cssStyle = this.parseClassifier();
+ return {
+ displayText,
+ cssStyle
+ };
+ }
+ parseMember(input) {
+ let potentialClassifier = "";
+ if (this.memberType === "method") {
+ const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/;
+ const match = input.match(methodRegEx);
+ if (match) {
+ const detectedVisibility = match[1] ? match[1].trim() : "";
+ if (visibilityValues.includes(detectedVisibility)) {
+ this.visibility = detectedVisibility;
+ }
+ this.id = match[2].trim();
+ this.parameters = match[3] ? match[3].trim() : "";
+ potentialClassifier = match[4] ? match[4].trim() : "";
+ this.returnType = match[5] ? match[5].trim() : "";
+ if (potentialClassifier === "") {
+ const lastChar = this.returnType.substring(this.returnType.length - 1);
+ if (lastChar.match(/[$*]/)) {
+ potentialClassifier = lastChar;
+ this.returnType = this.returnType.substring(0, this.returnType.length - 1);
+ }
+ }
+ }
+ } else {
+ const length = input.length;
+ const firstChar = input.substring(0, 1);
+ const lastChar = input.substring(length - 1);
+ if (visibilityValues.includes(firstChar)) {
+ this.visibility = firstChar;
+ }
+ if (lastChar.match(/[$*]/)) {
+ potentialClassifier = lastChar;
+ }
+ this.id = input.substring(
+ this.visibility === "" ? 0 : 1,
+ potentialClassifier === "" ? length : length - 1
+ );
+ }
+ this.classifier = potentialClassifier;
+ }
+ parseClassifier() {
+ switch (this.classifier) {
+ case "*":
+ return "font-style:italic;";
+ case "$":
+ return "text-decoration:underline;";
+ default:
+ return "";
+ }
+ }
+}
+const MERMAID_DOM_ID_PREFIX = "classId-";
+let relations = [];
+let classes = {};
+let notes = [];
+let classCounter = 0;
+let namespaces = {};
+let namespaceCounter = 0;
+let functions = [];
+const sanitizeText = (txt) => _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(txt, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+const splitClassNameAndType = function(_id) {
+ const id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ let genericType = "";
+ let className = id;
+ if (id.indexOf("~") > 0) {
+ const split = id.split("~");
+ className = sanitizeText(split[0]);
+ genericType = sanitizeText(split[1]);
+ }
+ return { className, type: genericType };
+};
+const setClassLabel = function(_id, label) {
+ const id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ if (label) {
+ label = sanitizeText(label);
+ }
+ const { className } = splitClassNameAndType(id);
+ classes[className].label = label;
+};
+const addClass = function(_id) {
+ const id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ const { className, type } = splitClassNameAndType(id);
+ if (Object.hasOwn(classes, className)) {
+ return;
+ }
+ const name = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(className, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ classes[name] = {
+ id: name,
+ type,
+ label: name,
+ cssClasses: [],
+ methods: [],
+ members: [],
+ annotations: [],
+ styles: [],
+ domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter
+ };
+ classCounter++;
+};
+const lookUpDomId = function(_id) {
+ const id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_id, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ if (id in classes) {
+ return classes[id].domId;
+ }
+ throw new Error("Class not found: " + id);
+};
+const clear = function() {
+ relations = [];
+ classes = {};
+ notes = [];
+ functions = [];
+ functions.push(setupToolTips);
+ namespaces = {};
+ namespaceCounter = 0;
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.t)();
+};
+const getClass = function(id) {
+ return classes[id];
+};
+const getClasses = function() {
+ return classes;
+};
+const getRelations = function() {
+ return relations;
+};
+const getNotes = function() {
+ return notes;
+};
+const addRelation = function(relation) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.l.debug("Adding relation: " + JSON.stringify(relation));
+ addClass(relation.id1);
+ addClass(relation.id2);
+ relation.id1 = splitClassNameAndType(relation.id1).className;
+ relation.id2 = splitClassNameAndType(relation.id2).className;
+ relation.relationTitle1 = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle1.trim(), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ relation.relationTitle2 = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(relation.relationTitle2.trim(), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ relations.push(relation);
+};
+const addAnnotation = function(className, annotation) {
+ const validatedClassName = splitClassNameAndType(className).className;
+ classes[validatedClassName].annotations.push(annotation);
+};
+const addMember = function(className, member) {
+ addClass(className);
+ const validatedClassName = splitClassNameAndType(className).className;
+ const theClass = classes[validatedClassName];
+ if (typeof member === "string") {
+ const memberString = member.trim();
+ if (memberString.startsWith("<<") && memberString.endsWith(">>")) {
+ theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2)));
+ } else if (memberString.indexOf(")") > 0) {
+ theClass.methods.push(new ClassMember(memberString, "method"));
+ } else if (memberString) {
+ theClass.members.push(new ClassMember(memberString, "attribute"));
+ }
+ }
+};
+const addMembers = function(className, members) {
+ if (Array.isArray(members)) {
+ members.reverse();
+ members.forEach((member) => addMember(className, member));
+ }
+};
+const addNote = function(text, className) {
+ const note = {
+ id: `note${notes.length}`,
+ class: className,
+ text
+ };
+ notes.push(note);
+};
+const cleanupLabel = function(label) {
+ if (label.startsWith(":")) {
+ label = label.substring(1);
+ }
+ return sanitizeText(label.trim());
+};
+const setCssClass = function(ids, className) {
+ ids.split(",").forEach(function(_id) {
+ let id = _id;
+ if (_id[0].match(/\d/)) {
+ id = MERMAID_DOM_ID_PREFIX + id;
+ }
+ if (classes[id] !== void 0) {
+ classes[id].cssClasses.push(className);
+ }
+ });
+};
+const setTooltip = function(ids, tooltip) {
+ ids.split(",").forEach(function(id) {
+ if (tooltip !== void 0) {
+ classes[id].tooltip = sanitizeText(tooltip);
+ }
+ });
+};
+const getTooltip = function(id, namespace) {
+ if (namespace) {
+ return namespaces[namespace].classes[id].tooltip;
+ }
+ return classes[id].tooltip;
+};
+const setLink = function(ids, linkStr, target) {
+ const config = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)();
+ ids.split(",").forEach(function(_id) {
+ let id = _id;
+ if (_id[0].match(/\d/)) {
+ id = MERMAID_DOM_ID_PREFIX + id;
+ }
+ if (classes[id] !== void 0) {
+ classes[id].link = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.formatUrl(linkStr, config);
+ if (config.securityLevel === "sandbox") {
+ classes[id].linkTarget = "_top";
+ } else if (typeof target === "string") {
+ classes[id].linkTarget = sanitizeText(target);
+ } else {
+ classes[id].linkTarget = "_blank";
+ }
+ }
+ });
+ setCssClass(ids, "clickable");
+};
+const setClickEvent = function(ids, functionName, functionArgs) {
+ ids.split(",").forEach(function(id) {
+ setClickFunc(id, functionName, functionArgs);
+ classes[id].haveCallback = true;
+ });
+ setCssClass(ids, "clickable");
+};
+const setClickFunc = function(_domId, functionName, functionArgs) {
+ const domId = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.e.sanitizeText(_domId, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)());
+ const config = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)();
+ if (config.securityLevel !== "loose") {
+ return;
+ }
+ if (functionName === void 0) {
+ return;
+ }
+ const id = domId;
+ if (classes[id] !== void 0) {
+ const elemId = lookUpDomId(id);
+ let argList = [];
+ if (typeof functionArgs === "string") {
+ argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
+ for (let i = 0; i < argList.length; i++) {
+ let item = argList[i].trim();
+ if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
+ item = item.substr(1, item.length - 2);
+ }
+ argList[i] = item;
+ }
+ }
+ if (argList.length === 0) {
+ argList.push(elemId);
+ }
+ functions.push(function() {
+ const elem = document.querySelector(`[id="${elemId}"]`);
+ if (elem !== null) {
+ elem.addEventListener(
+ "click",
+ function() {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.u.runFunc(functionName, ...argList);
+ },
+ false
+ );
+ }
+ });
+ }
+};
+const bindFunctions = function(element) {
+ functions.forEach(function(fun) {
+ fun(element);
+ });
+};
+const lineType = {
+ LINE: 0,
+ DOTTED_LINE: 1
+};
+const relationType = {
+ AGGREGATION: 0,
+ EXTENSION: 1,
+ COMPOSITION: 2,
+ DEPENDENCY: 3,
+ LOLLIPOP: 4
+};
+const setupToolTips = function(element) {
+ let tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(".mermaidTooltip");
+ if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
+ tooltipElem = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0);
+ }
+ const svg = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(element).select("svg");
+ const nodes = svg.selectAll("g.node");
+ nodes.on("mouseover", function() {
+ const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(this);
+ const title = el.attr("title");
+ if (title === null) {
+ return;
+ }
+ const rect = this.getBoundingClientRect();
+ tooltipElem.transition().duration(200).style("opacity", ".9");
+ tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px");
+ tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "
"));
+ el.classed("hover", true);
+ }).on("mouseout", function() {
+ tooltipElem.transition().duration(500).style("opacity", 0);
+ const el = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(this);
+ el.classed("hover", false);
+ });
+};
+functions.push(setupToolTips);
+let direction = "TB";
+const getDirection = () => direction;
+const setDirection = (dir) => {
+ direction = dir;
+};
+const addNamespace = function(id) {
+ if (namespaces[id] !== void 0) {
+ return;
+ }
+ namespaces[id] = {
+ id,
+ classes: {},
+ children: {},
+ domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter
+ };
+ namespaceCounter++;
+};
+const getNamespace = function(name) {
+ return namespaces[name];
+};
+const getNamespaces = function() {
+ return namespaces;
+};
+const addClassesToNamespace = function(id, classNames) {
+ if (namespaces[id] === void 0) {
+ return;
+ }
+ for (const name of classNames) {
+ const { className } = splitClassNameAndType(name);
+ classes[className].parent = id;
+ namespaces[id].classes[className] = classes[className];
+ }
+};
+const setCssStyle = function(id, styles2) {
+ const thisClass = classes[id];
+ if (!styles2 || !thisClass) {
+ return;
+ }
+ for (const s of styles2) {
+ if (s.includes(",")) {
+ thisClass.styles.push(...s.split(","));
+ } else {
+ thisClass.styles.push(s);
+ }
+ }
+};
+const db = {
+ setAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.s,
+ getAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.g,
+ getAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.a,
+ setAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.b,
+ getConfig: () => (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.c)().class,
+ addClass,
+ bindFunctions,
+ clear,
+ getClass,
+ getClasses,
+ getNotes,
+ addAnnotation,
+ addNote,
+ getRelations,
+ addRelation,
+ getDirection,
+ setDirection,
+ addMember,
+ addMembers,
+ cleanupLabel,
+ lineType,
+ relationType,
+ setClickEvent,
+ setCssClass,
+ setLink,
+ getTooltip,
+ setTooltip,
+ lookUpDomId,
+ setDiagramTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.q,
+ getDiagramTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.r,
+ setClassLabel,
+ addNamespace,
+ addClassesToNamespace,
+ getNamespace,
+ getNamespaces,
+ setCssStyle
+};
+const getStyles = (options) => `g.classGroup text {
+ fill: ${options.nodeBorder || options.classText};
+ stroke: none;
+ font-family: ${options.fontFamily};
+ font-size: 10px;
+
+ .title {
+ font-weight: bolder;
+ }
+
+}
+
+.nodeLabel, .edgeLabel {
+ color: ${options.classText};
+}
+.edgeLabel .label rect {
+ fill: ${options.mainBkg};
+}
+.label text {
+ fill: ${options.classText};
+}
+.edgeLabel .label span {
+ background: ${options.mainBkg};
+}
+
+.classTitle {
+ font-weight: bolder;
+}
+.node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${options.mainBkg};
+ stroke: ${options.nodeBorder};
+ stroke-width: 1px;
+ }
+
+
+.divider {
+ stroke: ${options.nodeBorder};
+ stroke-width: 1;
+}
+
+g.clickable {
+ cursor: pointer;
+}
+
+g.classGroup rect {
+ fill: ${options.mainBkg};
+ stroke: ${options.nodeBorder};
+}
+
+g.classGroup line {
+ stroke: ${options.nodeBorder};
+ stroke-width: 1;
+}
+
+.classLabel .box {
+ stroke: none;
+ stroke-width: 0;
+ fill: ${options.mainBkg};
+ opacity: 0.5;
+}
+
+.classLabel .label {
+ fill: ${options.nodeBorder};
+ font-size: 10px;
+}
+
+.relation {
+ stroke: ${options.lineColor};
+ stroke-width: 1;
+ fill: none;
+}
+
+.dashed-line{
+ stroke-dasharray: 3;
+}
+
+.dotted-line{
+ stroke-dasharray: 1 2;
+}
+
+#compositionStart, .composition {
+ fill: ${options.lineColor} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#compositionEnd, .composition {
+ fill: ${options.lineColor} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#dependencyStart, .dependency {
+ fill: ${options.lineColor} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#dependencyStart, .dependency {
+ fill: ${options.lineColor} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionStart, .extension {
+ fill: transparent !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionEnd, .extension {
+ fill: transparent !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationStart, .aggregation {
+ fill: transparent !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationEnd, .aggregation {
+ fill: transparent !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#lollipopStart, .lollipop {
+ fill: ${options.mainBkg} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+#lollipopEnd, .lollipop {
+ fill: ${options.mainBkg} !important;
+ stroke: ${options.lineColor} !important;
+ stroke-width: 1;
+}
+
+.edgeTerminals {
+ font-size: 11px;
+ line-height: initial;
+}
+
+.classTitleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${options.textColor};
+}
+`;
+const styles = getStyles;
+
+
+
+/***/ })
+
+};
+;
\ No newline at end of file
diff --git a/assets/js/1765.bbf8e0e8.js b/assets/js/1765.bbf8e0e8.js
deleted file mode 100644
index 584255a15..000000000
--- a/assets/js/1765.bbf8e0e8.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! For license information please see 1765.bbf8e0e8.js.LICENSE.txt */
-"use strict";(self.webpackChunkmd=self.webpackChunkmd||[]).push([[1765],{5303:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var r=i(n(7294)),o=i(n(895));function i(e){return e&&e.__esModule?e:{default:e}}function a(){return a=Object.assign||function(e){for(var t=1;t{t.__esModule=!0,t.default=void 0;var r=i(n(7294)),o=i(n(895));function i(e){return e&&e.__esModule?e:{default:e}}function a(){return a=Object.assign||function(e){for(var t=1;t{t.__esModule=!0,t.default=void 0;var r=i(n(7294)),o=i(n(895));function i(e){return e&&e.__esModule?e:{default:e}}function a(){return a=Object.assign||function(e){for(var t=1;t{t.__esModule=!0,t.default=void 0;var r=i(n(7294)),o=i(n(895));function i(e){return e&&e.__esModule?e:{default:e}}function a(){return a=Object.assign||function(e){for(var t=1;t{t.__esModule=!0,t.default=void 0;var r=i(n(7294)),o=i(n(5697));function i(e){return e&&e.__esModule?e:{default:e}}var a=function(e){var t=e.size,n=void 0===t?24:t,o=e.fill,i=void 0===o?"#000":o,a=e.className,s=e.path;return r.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",className:a},r.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),r.default.createElement("path",{fill:i,d:s}))};a.propTypes={size:o.default.number,fill:o.default.string,className:o.default.string,path:o.default.string.isRequired};var s=a;t.default=s},1609:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(7294)),o=u(n(5697)),i=n(3824),a=u(n(183)),s=n(5473),l=n(5756),c=n(6568);function u(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(){return f=Object.assign||function(e){for(var t=1;t1?(0,c.guessMaxImageWidth)(n.state.dimensions):0,supportsWebp:c.supportsWebp}),t=n.props.getUrl,r=t?t(e):e.src,o=n.props.shouldAutoDownload(function(e){for(var t=1;t{t.__esModule=!0,t.default=void 0;var r=s(n(7294)),o=s(n(1609)),i=s(n(4490)),a=s(n(663));function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){return r.default.createElement(o.default,e)};u.defaultProps=function(e){for(var t=1;t{t.__esModule=!0,t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}n.default=e,t&&t.set(e,n);return n}(n(7294)),o=s(n(5697)),i=s(n(5776)),a=n(5473);function s(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function c(){return c=Object.assign||function(e){for(var t=1;t{t.__esModule=!0,t.default=void 0;t.default=function(){for(var e,t=[],n=arguments.length,r=new Array(n),o=0;o1?t.join(" "):t[0],style:e}}},5473:(e,t)=>{t.__esModule=!0,t.loadStates=t.icons=void 0;var n="loading",r="loaded",o="error",i={load:"load",loading:n,loaded:r,error:o,noicon:"noicon",offline:"offline"};t.icons=i;var a={initial:"initial",loading:n,loaded:r,error:o};t.loadStates=a},6568:(e,t)=>{t.__esModule=!0,t.fallbackParams=t.selectSrc=t.supportsWebp=t.bytesToSize=t.guessMaxImageWidth=t.nativeConnection=t.ssr=void 0;var n="undefined"==typeof window||"ReactSnap"===window.navigator.userAgent;t.ssr=n;var r=!n&&!!window.navigator.connection;t.nativeConnection=r;t.guessMaxImageWidth=function(e,t){if(n)return 0;t||(t=window);var r,o=e.width,i=t.screen,a=i.width,s=i.height,l=document.documentElement,c=t.innerWidth||l.clientWidth,u=t.innerHeight||l.clientHeight,d=t.devicePixelRatio||1;if(a>c){var f=document.getElementsByTagName("body")[0],p=c-o;r=(f.clientHeight>u||f.clientHeight>s)&&p<=15?a-p:o/c*a}else r=o;return r*d};t.bytesToSize=function(e){var t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";var n=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return 0===n?e+" "+t[n]:(e/Math.pow(1024,n)).toFixed(1)+" "+t[n]};var o=function(){if(n)return!1;var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))&&0===e.toDataURL("image/webp").indexOf("data:image/webp")}();t.supportsWebp=o;var i=function(e){return"webp"===e.format||e.src&&e.src.match(/\.webp($|\?.*)/i)};t.selectSrc=function(e){var t,n,r=e.srcSet,o=e.maxImageWidth,a=e.supportsWebp;if(0===r.length)throw new Error("Need at least one item in srcSet");if(a)0===(t=r.filter(i)).length&&(t=r);else if(0===(t=r.filter((function(e){return!i(e)}))).length)throw new Error("Need at least one supported format item in srcSet");var s=t.filter((function(e){return e.width>=o}));return 0===s.length?(s=t,n=Math.max.apply(null,s.map((function(e){return e.width})))):n=Math.min.apply(null,s.map((function(e){return e.width}))),t.filter((function(e){return e.width===n}))[0]};t.fallbackParams=function(e){var t=e.srcSet,r=e.getUrl;if(!n)return{};var o=t.filter((function(e){return!i(e)})),a=o[0];return{nsSrcSet:o.map((function(e){return(r?r(e):e.src)+" "+e.width+"w"})).join(","),nsSrc:r?r(a):a.src,ssr:n}}},4490:(e,t,n)=>{t.__esModule=!0,t.default=void 0;var r,o=c(n(5303)),i=c(n(4442)),a=c(n(2266)),s=c(n(6818)),l=n(5473);function c(e){return e&&e.__esModule?e:{default:e}}var u=l.icons.load,d=l.icons.loading,f=l.icons.loaded,p=l.icons.error,h=l.icons.noicon,v=l.icons.offline,g=((r={})[u]=o.default,r[d]=s.default,r[f]=null,r[p]=a.default,r[h]=null,r[v]=i.default,r);t.default=g},5756:(e,t,n)=>{t.__esModule=!0,t.xhrLoader=t.imageLoader=t.timeout=t.combineCancel=void 0;var r=n(3646);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}t.combineCancel=function(e,t){if(!t)return e;var n=e.then((function(e){return e}),(function(e){return e}));return n.cancel=function(){e.cancel(),t.cancel()},n};t.timeout=function(e){var t,n=new Promise((function(n){t=setTimeout(n,e)}));return n.cancel=function(){clearTimeout(t),t=void 0},n};var a=function(e){var t=new Image,n=new Promise((function(n,r){t.onload=n,t.onabort=t.onerror=function(){return r({})},t.src=e}));return n.cancel=function(){if(!t)throw new Error("Already canceled");t.onload=t.onabort=t.onerror=void 0,t.src="",t=void 0},n};t.imageLoader=a;t.xhrLoader=function(e,t){var n=new r.UnfetchAbortController,s=n.signal,l=new Promise((function(n,l){return(0,r.unfetch)(e,function(e){for(var t=1;t{t.__esModule=!0,t.default=void 0;t.default={placeholder:{backgroundSize:"cover",backgroundRepeat:"no-repeat",position:"relative"},img:{width:"100%",height:"auto",maxWidth:"100%",marginBottom:"-4px"},icon:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",textAlign:"center"},noscript:{position:"absolute",top:0,left:0}}},3646:(e,t)=>{t.__esModule=!0,t.unfetch=t.UnfetchAbortController=void 0;t.UnfetchAbortController=function(){var e=this;this.signal={onabort:function(){}},this.abort=function(){return e.signal.onabort()}};t.unfetch=function(e,t){return t=t||{},new Promise((function(n,r){var o=new XMLHttpRequest;for(var i in o.open(t.method||"get",e,!0),t.headers)o.setRequestHeader(i,t.headers[i]);function a(){var e,t=[],n=[],r={};return o.getAllResponseHeaders().replace(/^(.*?):\s*?([\s\S]*?)$/gm,(function(o,i,a){t.push(i=i.toLowerCase()),n.push([i,a]),e=r[i],r[i]=e?e+","+a:a})),{ok:2==(o.status/100|0),status:o.status,statusText:o.statusText,url:o.responseURL,clone:a,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(o.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([o.response]))},headers:{keys:function(){return t},entries:function(){return n},get:function(e){return r[e.toLowerCase()]},has:function(e){return e.toLowerCase()in r}}}}o.withCredentials="include"===t.credentials,o.onload=function(){n(a())},o.onerror=r,t.signal&&(t.signal.onabort=function(){o.onerror=o.onload=void 0,o.abort()}),o.send(t.body)}))}},1065:(e,t,n)=>{var r;t.Z=void 0;var o=((r=n(7474))&&r.__esModule?r:{default:r}).default;t.Z=o},4137:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>h});var r=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},d="mdxType",f={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),d=c(n),p=o,h=d["".concat(l,".").concat(p)]||d[p]||f[p]||i;return n?r.createElement(h,a(a({ref:t},u),{},{components:n})):r.createElement(h,a({ref:t},u))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var i=n.length,a=new Array(i);a[0]=p;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[d]="string"==typeof e?e:o,a[1]=s;for(var c=2;c{n.d(t,{Z:()=>l});var r=n(7462),o=n(7294),i=n(1065),a=n(7325);function s(e,t){switch(e){case"noicon":case"loaded":return null;case"loading":return(0,a.I)({id:"theme.IdealImageMessage.loading",message:"Loading...",description:"When the full-scale image is loading"});case"load":{const{pickedSrc:e}=t,{size:n}=e,r=n?` (${function(e){const t=["B","KB","MB","GB","TB"];if(0===e)return"n/a";const n=Math.floor(Math.log(e)/Math.log(1024));return 0===n?`${e} ${t[n]}`:`${(e/1024**n).toFixed(1)} ${t[n]}`}(n)})`:"";return(0,a.I)({id:"theme.IdealImageMessage.load",message:"Click to load{sizeMessage}",description:"To prompt users to load the full image. sizeMessage is a parenthesized size figure."},{sizeMessage:r})}case"offline":return(0,a.I)({id:"theme.IdealImageMessage.offline",message:"Your browser is offline. Image not loaded",description:"When the user is viewing an offline document"});case"error":{const{loadInfo:e}=t;return 404===e?(0,a.I)({id:"theme.IdealImageMessage.404error",message:"404. Image not found",description:"When the image is not found"}):(0,a.I)({id:"theme.IdealImageMessage.error",message:"Error. Click to reload",description:"When the image fails to load for unknown error"})}default:throw new Error(`Wrong icon: ${e}`)}}function l(e){const{img:t,...n}=e;return"string"==typeof t||"default"in t?o.createElement("img",(0,r.Z)({src:"string"==typeof t?t:t.default},n)):o.createElement(i.Z,(0,r.Z)({},n,{height:t.src.height??100,width:t.src.width??100,placeholder:{lqip:t.preSrc},src:t.src.src,srcSet:t.src.images.map((e=>({...e,src:e.path}))),getMessage:s}))}},3824:(e,t,n)=>{n.r(t),n.d(t,{Waypoint:()=>j});var r=n(5068),o=!("undefined"==typeof window||!window.document||!window.document.createElement);var i=void 0;function a(){return void 0===i&&(i=function(){if(!o)return!1;if(!window.addEventListener||!window.removeEventListener||!Object.defineProperty)return!1;var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}}),n=function(){};window.addEventListener("testPassiveEventSupport",n,t),window.removeEventListener("testPassiveEventSupport",n,t)}catch(r){}return e}()),i}function s(e){e.handlers===e.nextHandlers&&(e.nextHandlers=e.handlers.slice())}function l(e){this.target=e,this.events={}}l.prototype.getEventHandlers=function(e,t){var n,r=String(e)+" "+String((n=t)?!0===n?100:(n.capture<<0)+(n.passive<<1)+(n.once<<2):0);return this.events[r]||(this.events[r]={handlers:[],handleEvent:void 0},this.events[r].nextHandlers=this.events[r].handlers),this.events[r]},l.prototype.handleEvent=function(e,t,n){var r=this.getEventHandlers(e,t);r.handlers=r.nextHandlers,r.handlers.forEach((function(e){e&&e(n)}))},l.prototype.add=function(e,t,n){var r=this,o=this.getEventHandlers(e,n);s(o),0===o.nextHandlers.length&&(o.handleEvent=this.handleEvent.bind(this,e,n),this.target.addEventListener(e,o.handleEvent,n)),o.nextHandlers.push(t);var i=!0;return function(){if(i){i=!1,s(o);var a=o.nextHandlers.indexOf(t);o.nextHandlers.splice(a,1),0===o.nextHandlers.length&&(r.target&&r.target.removeEventListener(e,o.handleEvent,n),o.handleEvent=void 0)}}};var c="__consolidated_events_handlers__";function u(e,t,n,r){e[c]||(e[c]=new l(e));var o=function(e){if(e)return a()?e:!!e.capture}(r);return e[c].add(t,n,o)}var d=n(7294),f=n(5834);function p(e,t){var n,r=(n=e,!isNaN(parseFloat(n))&&isFinite(n)?parseFloat(n):"px"===n.slice(-2)?parseFloat(n.slice(0,-2)):void 0);if("number"==typeof r)return r;var o=function(e){if("%"===e.slice(-1))return parseFloat(e.slice(0,-1))/100}(e);return"number"==typeof o?o*t:void 0}var h="above",v="inside",g="below",m="invisible";function w(e){return"string"==typeof e.type}var b;var y=[];function O(e){y.push(e),b||(b=setTimeout((function(){var e;for(b=null;e=y.shift();)e()}),0));var t=!0;return function(){if(t){t=!1;var n=y.indexOf(e);-1!==n&&(y.splice(n,1),!y.length&&b&&(clearTimeout(b),b=null))}}}var S="undefined"!=typeof window,E={debug:!1,scrollableAncestor:void 0,children:void 0,topOffset:"0px",bottomOffset:"0px",horizontal:!1,onEnter:function(){},onLeave:function(){},onPositionChange:function(){},fireOnRapidScroll:!0},j=function(e){function t(t){var n;return(n=e.call(this,t)||this).refElement=function(e){n._ref=e},n}(0,r.Z)(t,e);var o=t.prototype;return o.componentDidMount=function(){var e=this;S&&(this.cancelOnNextTick=O((function(){e.cancelOnNextTick=null;var t=e.props,n=t.children;t.debug;!function(e,t){if(e&&!w(e)&&!t)throw new Error(" needs a DOM element to compute boundaries. The child you passed is neither a DOM element (e.g. ) nor does it use the innerRef prop.\n\nSee https://goo.gl/LrBNgw for more info.")}(n,e._ref),e._handleScroll=e._handleScroll.bind(e),e.scrollableAncestor=e._findScrollableAncestor(),e.scrollEventListenerUnsubscribe=u(e.scrollableAncestor,"scroll",e._handleScroll,{passive:!0}),e.resizeEventListenerUnsubscribe=u(window,"resize",e._handleScroll,{passive:!0}),e._handleScroll(null)})))},o.componentDidUpdate=function(){var e=this;S&&this.scrollableAncestor&&(this.cancelOnNextTick||(this.cancelOnNextTick=O((function(){e.cancelOnNextTick=null,e._handleScroll(null)}))))},o.componentWillUnmount=function(){S&&(this.scrollEventListenerUnsubscribe&&this.scrollEventListenerUnsubscribe(),this.resizeEventListenerUnsubscribe&&this.resizeEventListenerUnsubscribe(),this.cancelOnNextTick&&this.cancelOnNextTick())},o._findScrollableAncestor=function(){var e=this.props,t=e.horizontal,r=e.scrollableAncestor;if(r)return function(e){return"window"===e?n.g.window:e}(r);for(var o=this._ref;o.parentNode;){if((o=o.parentNode)===document.body)return window;var i=window.getComputedStyle(o),a=(t?i.getPropertyValue("overflow-x"):i.getPropertyValue("overflow-y"))||i.getPropertyValue("overflow");if("auto"===a||"scroll"===a||"overlay"===a)return o}return window},o._handleScroll=function(e){if(this._ref){var t=this._getBounds(),n=function(e){return e.viewportBottom-e.viewportTop==0?m:e.viewportTop<=e.waypointTop&&e.waypointTop<=e.viewportBottom||e.viewportTop<=e.waypointBottom&&e.waypointBottom<=e.viewportBottom||e.waypointTop<=e.viewportTop&&e.viewportBottom<=e.waypointBottom?v:e.viewportBottom{var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case f:case p:return e;default:switch(e=e&&e.$$typeof){case u:case c:case d:case v:case h:case l:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isForwardRef=function(e){return m(e)===d}},5834:(e,t,n)=>{e.exports=n(5058)}}]);
\ No newline at end of file
diff --git a/assets/js/177.0cf72559.js b/assets/js/177.0cf72559.js
new file mode 100644
index 000000000..409d12c15
--- /dev/null
+++ b/assets/js/177.0cf72559.js
@@ -0,0 +1,3439 @@
+"use strict";
+exports.id = 177;
+exports.ids = [177];
+exports.modules = {
+
+/***/ 93177:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ diagram: () => (/* binding */ diagram)
+/* harmony export */ });
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76365);
+/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64218);
+/* harmony import */ var _svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(72015);
+/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17967);
+/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27484);
+/* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22424);
+
+
+
+
+
+
+
+
+
+
+
+
+var parser = function() {
+ var o = function(k, v, o2, l) {
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
+ ;
+ return o2;
+ }, $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 13], $V7 = [1, 14], $V8 = [1, 16], $V9 = [1, 17], $Va = [1, 18], $Vb = [1, 24], $Vc = [1, 25], $Vd = [1, 26], $Ve = [1, 27], $Vf = [1, 28], $Vg = [1, 29], $Vh = [1, 30], $Vi = [1, 31], $Vj = [1, 32], $Vk = [1, 33], $Vl = [1, 34], $Vm = [1, 35], $Vn = [1, 36], $Vo = [1, 37], $Vp = [1, 38], $Vq = [1, 39], $Vr = [1, 41], $Vs = [1, 42], $Vt = [1, 43], $Vu = [1, 44], $Vv = [1, 45], $Vw = [1, 46], $Vx = [1, 4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 48, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $Vy = [4, 5, 16, 50, 52, 53], $Vz = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VA = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 49, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VB = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 48, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VC = [4, 5, 13, 14, 16, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 47, 50, 52, 53, 54, 59, 60, 61, 62, 70], $VD = [68, 69, 70], $VE = [1, 120];
+ var parser2 = {
+ trace: function trace() {
+ },
+ yy: {},
+ symbols_: { "error": 2, "start": 3, "SPACE": 4, "NEWLINE": 5, "SD": 6, "document": 7, "line": 8, "statement": 9, "box_section": 10, "box_line": 11, "participant_statement": 12, "create": 13, "box": 14, "restOfLine": 15, "end": 16, "signal": 17, "autonumber": 18, "NUM": 19, "off": 20, "activate": 21, "actor": 22, "deactivate": 23, "note_statement": 24, "links_statement": 25, "link_statement": 26, "properties_statement": 27, "details_statement": 28, "title": 29, "legacy_title": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "loop": 36, "rect": 37, "opt": 38, "alt": 39, "else_sections": 40, "par": 41, "par_sections": 42, "par_over": 43, "critical": 44, "option_sections": 45, "break": 46, "option": 47, "and": 48, "else": 49, "participant": 50, "AS": 51, "participant_actor": 52, "destroy": 53, "note": 54, "placement": 55, "text2": 56, "over": 57, "actor_pair": 58, "links": 59, "link": 60, "properties": 61, "details": 62, "spaceList": 63, ",": 64, "left_of": 65, "right_of": 66, "signaltype": 67, "+": 68, "-": 69, "ACTOR": 70, "SOLID_OPEN_ARROW": 71, "DOTTED_OPEN_ARROW": 72, "SOLID_ARROW": 73, "DOTTED_ARROW": 74, "SOLID_CROSS": 75, "DOTTED_CROSS": 76, "SOLID_POINT": 77, "DOTTED_POINT": 78, "TXT": 79, "$accept": 0, "$end": 1 },
+ terminals_: { 2: "error", 4: "SPACE", 5: "NEWLINE", 6: "SD", 13: "create", 14: "box", 15: "restOfLine", 16: "end", 18: "autonumber", 19: "NUM", 20: "off", 21: "activate", 23: "deactivate", 29: "title", 30: "legacy_title", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 36: "loop", 37: "rect", 38: "opt", 39: "alt", 41: "par", 43: "par_over", 44: "critical", 46: "break", 47: "option", 48: "and", 49: "else", 50: "participant", 51: "AS", 52: "participant_actor", 53: "destroy", 54: "note", 57: "over", 59: "links", 60: "link", 61: "properties", 62: "details", 64: ",", 65: "left_of", 66: "right_of", 68: "+", 69: "-", 70: "ACTOR", 71: "SOLID_OPEN_ARROW", 72: "DOTTED_OPEN_ARROW", 73: "SOLID_ARROW", 74: "DOTTED_ARROW", 75: "SOLID_CROSS", 76: "DOTTED_CROSS", 77: "SOLID_POINT", 78: "DOTTED_POINT", 79: "TXT" },
+ productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [10, 0], [10, 2], [11, 2], [11, 1], [11, 1], [9, 1], [9, 2], [9, 4], [9, 2], [9, 4], [9, 3], [9, 3], [9, 2], [9, 3], [9, 3], [9, 2], [9, 2], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [9, 4], [45, 1], [45, 4], [42, 1], [42, 4], [40, 1], [40, 4], [12, 5], [12, 3], [12, 5], [12, 3], [12, 3], [24, 4], [24, 4], [25, 3], [26, 3], [27, 3], [28, 3], [63, 2], [63, 1], [58, 3], [58, 1], [55, 1], [55, 1], [17, 5], [17, 5], [17, 4], [22, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [67, 1], [56, 1]],
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
+ var $0 = $$.length - 1;
+ switch (yystate) {
+ case 3:
+ yy.apply($$[$0]);
+ return $$[$0];
+ case 4:
+ case 9:
+ this.$ = [];
+ break;
+ case 5:
+ case 10:
+ $$[$0 - 1].push($$[$0]);
+ this.$ = $$[$0 - 1];
+ break;
+ case 6:
+ case 7:
+ case 11:
+ case 12:
+ this.$ = $$[$0];
+ break;
+ case 8:
+ case 13:
+ this.$ = [];
+ break;
+ case 15:
+ $$[$0].type = "createParticipant";
+ this.$ = $$[$0];
+ break;
+ case 16:
+ $$[$0 - 1].unshift({ type: "boxStart", boxData: yy.parseBoxData($$[$0 - 2]) });
+ $$[$0 - 1].push({ type: "boxEnd", boxText: $$[$0 - 2] });
+ this.$ = $$[$0 - 1];
+ break;
+ case 18:
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 2]), sequenceIndexStep: Number($$[$0 - 1]), sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 19:
+ this.$ = { type: "sequenceIndex", sequenceIndex: Number($$[$0 - 1]), sequenceIndexStep: 1, sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 20:
+ this.$ = { type: "sequenceIndex", sequenceVisible: false, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 21:
+ this.$ = { type: "sequenceIndex", sequenceVisible: true, signalType: yy.LINETYPE.AUTONUMBER };
+ break;
+ case 22:
+ this.$ = { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] };
+ break;
+ case 23:
+ this.$ = { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 1] };
+ break;
+ case 29:
+ yy.setDiagramTitle($$[$0].substring(6));
+ this.$ = $$[$0].substring(6);
+ break;
+ case 30:
+ yy.setDiagramTitle($$[$0].substring(7));
+ this.$ = $$[$0].substring(7);
+ break;
+ case 31:
+ this.$ = $$[$0].trim();
+ yy.setAccTitle(this.$);
+ break;
+ case 32:
+ case 33:
+ this.$ = $$[$0].trim();
+ yy.setAccDescription(this.$);
+ break;
+ case 34:
+ $$[$0 - 1].unshift({ type: "loopStart", loopText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.LOOP_START });
+ $$[$0 - 1].push({ type: "loopEnd", loopText: $$[$0 - 2], signalType: yy.LINETYPE.LOOP_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 35:
+ $$[$0 - 1].unshift({ type: "rectStart", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_START });
+ $$[$0 - 1].push({ type: "rectEnd", color: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.RECT_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 36:
+ $$[$0 - 1].unshift({ type: "optStart", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_START });
+ $$[$0 - 1].push({ type: "optEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.OPT_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 37:
+ $$[$0 - 1].unshift({ type: "altStart", altText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.ALT_START });
+ $$[$0 - 1].push({ type: "altEnd", signalType: yy.LINETYPE.ALT_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 38:
+ $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_START });
+ $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 39:
+ $$[$0 - 1].unshift({ type: "parStart", parText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.PAR_OVER_START });
+ $$[$0 - 1].push({ type: "parEnd", signalType: yy.LINETYPE.PAR_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 40:
+ $$[$0 - 1].unshift({ type: "criticalStart", criticalText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.CRITICAL_START });
+ $$[$0 - 1].push({ type: "criticalEnd", signalType: yy.LINETYPE.CRITICAL_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 41:
+ $$[$0 - 1].unshift({ type: "breakStart", breakText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_START });
+ $$[$0 - 1].push({ type: "breakEnd", optText: yy.parseMessage($$[$0 - 2]), signalType: yy.LINETYPE.BREAK_END });
+ this.$ = $$[$0 - 1];
+ break;
+ case 43:
+ this.$ = $$[$0 - 3].concat([{ type: "option", optionText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.CRITICAL_OPTION }, $$[$0]]);
+ break;
+ case 45:
+ this.$ = $$[$0 - 3].concat([{ type: "and", parText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.PAR_AND }, $$[$0]]);
+ break;
+ case 47:
+ this.$ = $$[$0 - 3].concat([{ type: "else", altText: yy.parseMessage($$[$0 - 1]), signalType: yy.LINETYPE.ALT_ELSE }, $$[$0]]);
+ break;
+ case 48:
+ $$[$0 - 3].draw = "participant";
+ $$[$0 - 3].type = "addParticipant";
+ $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);
+ this.$ = $$[$0 - 3];
+ break;
+ case 49:
+ $$[$0 - 1].draw = "participant";
+ $$[$0 - 1].type = "addParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 50:
+ $$[$0 - 3].draw = "actor";
+ $$[$0 - 3].type = "addParticipant";
+ $$[$0 - 3].description = yy.parseMessage($$[$0 - 1]);
+ this.$ = $$[$0 - 3];
+ break;
+ case 51:
+ $$[$0 - 1].draw = "actor";
+ $$[$0 - 1].type = "addParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 52:
+ $$[$0 - 1].type = "destroyParticipant";
+ this.$ = $$[$0 - 1];
+ break;
+ case 53:
+ this.$ = [$$[$0 - 1], { type: "addNote", placement: $$[$0 - 2], actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 54:
+ $$[$0 - 2] = [].concat($$[$0 - 1], $$[$0 - 1]).slice(0, 2);
+ $$[$0 - 2][0] = $$[$0 - 2][0].actor;
+ $$[$0 - 2][1] = $$[$0 - 2][1].actor;
+ this.$ = [$$[$0 - 1], { type: "addNote", placement: yy.PLACEMENT.OVER, actor: $$[$0 - 2].slice(0, 2), text: $$[$0] }];
+ break;
+ case 55:
+ this.$ = [$$[$0 - 1], { type: "addLinks", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 56:
+ this.$ = [$$[$0 - 1], { type: "addALink", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 57:
+ this.$ = [$$[$0 - 1], { type: "addProperties", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 58:
+ this.$ = [$$[$0 - 1], { type: "addDetails", actor: $$[$0 - 1].actor, text: $$[$0] }];
+ break;
+ case 61:
+ this.$ = [$$[$0 - 2], $$[$0]];
+ break;
+ case 62:
+ this.$ = $$[$0];
+ break;
+ case 63:
+ this.$ = yy.PLACEMENT.LEFTOF;
+ break;
+ case 64:
+ this.$ = yy.PLACEMENT.RIGHTOF;
+ break;
+ case 65:
+ this.$ = [
+ $$[$0 - 4],
+ $$[$0 - 1],
+ { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0], activate: true },
+ { type: "activeStart", signalType: yy.LINETYPE.ACTIVE_START, actor: $$[$0 - 1] }
+ ];
+ break;
+ case 66:
+ this.$ = [
+ $$[$0 - 4],
+ $$[$0 - 1],
+ { type: "addMessage", from: $$[$0 - 4].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 3], msg: $$[$0] },
+ { type: "activeEnd", signalType: yy.LINETYPE.ACTIVE_END, actor: $$[$0 - 4] }
+ ];
+ break;
+ case 67:
+ this.$ = [$$[$0 - 3], $$[$0 - 1], { type: "addMessage", from: $$[$0 - 3].actor, to: $$[$0 - 1].actor, signalType: $$[$0 - 2], msg: $$[$0] }];
+ break;
+ case 68:
+ this.$ = { type: "addParticipant", actor: $$[$0] };
+ break;
+ case 69:
+ this.$ = yy.LINETYPE.SOLID_OPEN;
+ break;
+ case 70:
+ this.$ = yy.LINETYPE.DOTTED_OPEN;
+ break;
+ case 71:
+ this.$ = yy.LINETYPE.SOLID;
+ break;
+ case 72:
+ this.$ = yy.LINETYPE.DOTTED;
+ break;
+ case 73:
+ this.$ = yy.LINETYPE.SOLID_CROSS;
+ break;
+ case 74:
+ this.$ = yy.LINETYPE.DOTTED_CROSS;
+ break;
+ case 75:
+ this.$ = yy.LINETYPE.SOLID_POINT;
+ break;
+ case 76:
+ this.$ = yy.LINETYPE.DOTTED_POINT;
+ break;
+ case 77:
+ this.$ = yy.parseMessage($$[$0].trim().substring(1));
+ break;
+ }
+ },
+ table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 13, 14, 18, 21, 23, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 46, 50, 52, 53, 54, 59, 60, 61, 62, 70], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 5]), { 9: 47, 12: 12, 13: $V6, 14: $V7, 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, o($Vx, [2, 7]), o($Vx, [2, 8]), o($Vx, [2, 14]), { 12: 48, 50: $Vo, 52: $Vp, 53: $Vq }, { 15: [1, 49] }, { 5: [1, 50] }, { 5: [1, 53], 19: [1, 51], 20: [1, 52] }, { 22: 54, 70: $Vw }, { 22: 55, 70: $Vw }, { 5: [1, 56] }, { 5: [1, 57] }, { 5: [1, 58] }, { 5: [1, 59] }, { 5: [1, 60] }, o($Vx, [2, 29]), o($Vx, [2, 30]), { 32: [1, 61] }, { 34: [1, 62] }, o($Vx, [2, 33]), { 15: [1, 63] }, { 15: [1, 64] }, { 15: [1, 65] }, { 15: [1, 66] }, { 15: [1, 67] }, { 15: [1, 68] }, { 15: [1, 69] }, { 15: [1, 70] }, { 22: 71, 70: $Vw }, { 22: 72, 70: $Vw }, { 22: 73, 70: $Vw }, { 67: 74, 71: [1, 75], 72: [1, 76], 73: [1, 77], 74: [1, 78], 75: [1, 79], 76: [1, 80], 77: [1, 81], 78: [1, 82] }, { 55: 83, 57: [1, 84], 65: [1, 85], 66: [1, 86] }, { 22: 87, 70: $Vw }, { 22: 88, 70: $Vw }, { 22: 89, 70: $Vw }, { 22: 90, 70: $Vw }, o([5, 51, 64, 71, 72, 73, 74, 75, 76, 77, 78, 79], [2, 68]), o($Vx, [2, 6]), o($Vx, [2, 15]), o($Vy, [2, 9], { 10: 91 }), o($Vx, [2, 17]), { 5: [1, 93], 19: [1, 92] }, { 5: [1, 94] }, o($Vx, [2, 21]), { 5: [1, 95] }, { 5: [1, 96] }, o($Vx, [2, 24]), o($Vx, [2, 25]), o($Vx, [2, 26]), o($Vx, [2, 27]), o($Vx, [2, 28]), o($Vx, [2, 31]), o($Vx, [2, 32]), o($Vz, $V3, { 7: 97 }), o($Vz, $V3, { 7: 98 }), o($Vz, $V3, { 7: 99 }), o($VA, $V3, { 40: 100, 7: 101 }), o($VB, $V3, { 42: 102, 7: 103 }), o($VB, $V3, { 7: 103, 42: 104 }), o($VC, $V3, { 45: 105, 7: 106 }), o($Vz, $V3, { 7: 107 }), { 5: [1, 109], 51: [1, 108] }, { 5: [1, 111], 51: [1, 110] }, { 5: [1, 112] }, { 22: 115, 68: [1, 113], 69: [1, 114], 70: $Vw }, o($VD, [2, 69]), o($VD, [2, 70]), o($VD, [2, 71]), o($VD, [2, 72]), o($VD, [2, 73]), o($VD, [2, 74]), o($VD, [2, 75]), o($VD, [2, 76]), { 22: 116, 70: $Vw }, { 22: 118, 58: 117, 70: $Vw }, { 70: [2, 63] }, { 70: [2, 64] }, { 56: 119, 79: $VE }, { 56: 121, 79: $VE }, { 56: 122, 79: $VE }, { 56: 123, 79: $VE }, { 4: [1, 126], 5: [1, 128], 11: 125, 12: 127, 16: [1, 124], 50: $Vo, 52: $Vp, 53: $Vq }, { 5: [1, 129] }, o($Vx, [2, 19]), o($Vx, [2, 20]), o($Vx, [2, 22]), o($Vx, [2, 23]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 130], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 131], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 132], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 133] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 46], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 49: [1, 134], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 135] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 44], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 48: [1, 136], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 16: [1, 137] }, { 16: [1, 138] }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [2, 42], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 47: [1, 139], 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 4: $V4, 5: $V5, 8: 8, 9: 10, 12: 12, 13: $V6, 14: $V7, 16: [1, 140], 17: 15, 18: $V8, 21: $V9, 22: 40, 23: $Va, 24: 19, 25: 20, 26: 21, 27: 22, 28: 23, 29: $Vb, 30: $Vc, 31: $Vd, 33: $Ve, 35: $Vf, 36: $Vg, 37: $Vh, 38: $Vi, 39: $Vj, 41: $Vk, 43: $Vl, 44: $Vm, 46: $Vn, 50: $Vo, 52: $Vp, 53: $Vq, 54: $Vr, 59: $Vs, 60: $Vt, 61: $Vu, 62: $Vv, 70: $Vw }, { 15: [1, 141] }, o($Vx, [2, 49]), { 15: [1, 142] }, o($Vx, [2, 51]), o($Vx, [2, 52]), { 22: 143, 70: $Vw }, { 22: 144, 70: $Vw }, { 56: 145, 79: $VE }, { 56: 146, 79: $VE }, { 56: 147, 79: $VE }, { 64: [1, 148], 79: [2, 62] }, { 5: [2, 55] }, { 5: [2, 77] }, { 5: [2, 56] }, { 5: [2, 57] }, { 5: [2, 58] }, o($Vx, [2, 16]), o($Vy, [2, 10]), { 12: 149, 50: $Vo, 52: $Vp, 53: $Vq }, o($Vy, [2, 12]), o($Vy, [2, 13]), o($Vx, [2, 18]), o($Vx, [2, 34]), o($Vx, [2, 35]), o($Vx, [2, 36]), o($Vx, [2, 37]), { 15: [1, 150] }, o($Vx, [2, 38]), { 15: [1, 151] }, o($Vx, [2, 39]), o($Vx, [2, 40]), { 15: [1, 152] }, o($Vx, [2, 41]), { 5: [1, 153] }, { 5: [1, 154] }, { 56: 155, 79: $VE }, { 56: 156, 79: $VE }, { 5: [2, 67] }, { 5: [2, 53] }, { 5: [2, 54] }, { 22: 157, 70: $Vw }, o($Vy, [2, 11]), o($VA, $V3, { 7: 101, 40: 158 }), o($VB, $V3, { 7: 103, 42: 159 }), o($VC, $V3, { 7: 106, 45: 160 }), o($Vx, [2, 48]), o($Vx, [2, 50]), { 5: [2, 65] }, { 5: [2, 66] }, { 79: [2, 61] }, { 16: [2, 47] }, { 16: [2, 45] }, { 16: [2, 43] }],
+ defaultActions: { 5: [2, 1], 6: [2, 2], 85: [2, 63], 86: [2, 64], 119: [2, 55], 120: [2, 77], 121: [2, 56], 122: [2, 57], 123: [2, 58], 145: [2, 67], 146: [2, 53], 147: [2, 54], 155: [2, 65], 156: [2, 66], 157: [2, 61], 158: [2, 47], 159: [2, 45], 160: [2, 43] },
+ parseError: function parseError(str, hash) {
+ if (hash.recoverable) {
+ this.trace(str);
+ } else {
+ var error = new Error(str);
+ error.hash = hash;
+ throw error;
+ }
+ },
+ parse: function parse(input) {
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
+ var args = lstack.slice.call(arguments, 1);
+ var lexer2 = Object.create(this.lexer);
+ var sharedState = { yy: {} };
+ for (var k in this.yy) {
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
+ sharedState.yy[k] = this.yy[k];
+ }
+ }
+ lexer2.setInput(input, sharedState.yy);
+ sharedState.yy.lexer = lexer2;
+ sharedState.yy.parser = this;
+ if (typeof lexer2.yylloc == "undefined") {
+ lexer2.yylloc = {};
+ }
+ var yyloc = lexer2.yylloc;
+ lstack.push(yyloc);
+ var ranges = lexer2.options && lexer2.options.ranges;
+ if (typeof sharedState.yy.parseError === "function") {
+ this.parseError = sharedState.yy.parseError;
+ } else {
+ this.parseError = Object.getPrototypeOf(this).parseError;
+ }
+ function lex() {
+ var token;
+ token = tstack.pop() || lexer2.lex() || EOF;
+ if (typeof token !== "number") {
+ if (token instanceof Array) {
+ tstack = token;
+ token = tstack.pop();
+ }
+ token = self.symbols_[token] || token;
+ }
+ return token;
+ }
+ var symbol, state2, action, r, yyval = {}, p, len, newState, expected;
+ while (true) {
+ state2 = stack[stack.length - 1];
+ if (this.defaultActions[state2]) {
+ action = this.defaultActions[state2];
+ } else {
+ if (symbol === null || typeof symbol == "undefined") {
+ symbol = lex();
+ }
+ action = table[state2] && table[state2][symbol];
+ }
+ if (typeof action === "undefined" || !action.length || !action[0]) {
+ var errStr = "";
+ expected = [];
+ for (p in table[state2]) {
+ if (this.terminals_[p] && p > TERROR) {
+ expected.push("'" + this.terminals_[p] + "'");
+ }
+ }
+ if (lexer2.showPosition) {
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
+ } else {
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
+ }
+ this.parseError(errStr, {
+ text: lexer2.match,
+ token: this.terminals_[symbol] || symbol,
+ line: lexer2.yylineno,
+ loc: yyloc,
+ expected
+ });
+ }
+ if (action[0] instanceof Array && action.length > 1) {
+ throw new Error("Parse Error: multiple actions possible at state: " + state2 + ", token: " + symbol);
+ }
+ switch (action[0]) {
+ case 1:
+ stack.push(symbol);
+ vstack.push(lexer2.yytext);
+ lstack.push(lexer2.yylloc);
+ stack.push(action[1]);
+ symbol = null;
+ {
+ yyleng = lexer2.yyleng;
+ yytext = lexer2.yytext;
+ yylineno = lexer2.yylineno;
+ yyloc = lexer2.yylloc;
+ }
+ break;
+ case 2:
+ len = this.productions_[action[1]][1];
+ yyval.$ = vstack[vstack.length - len];
+ yyval._$ = {
+ first_line: lstack[lstack.length - (len || 1)].first_line,
+ last_line: lstack[lstack.length - 1].last_line,
+ first_column: lstack[lstack.length - (len || 1)].first_column,
+ last_column: lstack[lstack.length - 1].last_column
+ };
+ if (ranges) {
+ yyval._$.range = [
+ lstack[lstack.length - (len || 1)].range[0],
+ lstack[lstack.length - 1].range[1]
+ ];
+ }
+ r = this.performAction.apply(yyval, [
+ yytext,
+ yyleng,
+ yylineno,
+ sharedState.yy,
+ action[1],
+ vstack,
+ lstack
+ ].concat(args));
+ if (typeof r !== "undefined") {
+ return r;
+ }
+ if (len) {
+ stack = stack.slice(0, -1 * len * 2);
+ vstack = vstack.slice(0, -1 * len);
+ lstack = lstack.slice(0, -1 * len);
+ }
+ stack.push(this.productions_[action[1]][0]);
+ vstack.push(yyval.$);
+ lstack.push(yyval._$);
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
+ stack.push(newState);
+ break;
+ case 3:
+ return true;
+ }
+ }
+ return true;
+ }
+ };
+ var lexer = function() {
+ var lexer2 = {
+ EOF: 1,
+ parseError: function parseError(str, hash) {
+ if (this.yy.parser) {
+ this.yy.parser.parseError(str, hash);
+ } else {
+ throw new Error(str);
+ }
+ },
+ // resets the lexer, sets new input
+ setInput: function(input, yy) {
+ this.yy = yy || this.yy || {};
+ this._input = input;
+ this._more = this._backtrack = this.done = false;
+ this.yylineno = this.yyleng = 0;
+ this.yytext = this.matched = this.match = "";
+ this.conditionStack = ["INITIAL"];
+ this.yylloc = {
+ first_line: 1,
+ first_column: 0,
+ last_line: 1,
+ last_column: 0
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [0, 0];
+ }
+ this.offset = 0;
+ return this;
+ },
+ // consumes and returns one char from the input
+ input: function() {
+ var ch = this._input[0];
+ this.yytext += ch;
+ this.yyleng++;
+ this.offset++;
+ this.match += ch;
+ this.matched += ch;
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno++;
+ this.yylloc.last_line++;
+ } else {
+ this.yylloc.last_column++;
+ }
+ if (this.options.ranges) {
+ this.yylloc.range[1]++;
+ }
+ this._input = this._input.slice(1);
+ return ch;
+ },
+ // unshifts one char (or a string) into the input
+ unput: function(ch) {
+ var len = ch.length;
+ var lines = ch.split(/(?:\r\n?|\n)/g);
+ this._input = ch + this._input;
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
+ this.offset -= len;
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
+ this.match = this.match.substr(0, this.match.length - 1);
+ this.matched = this.matched.substr(0, this.matched.length - 1);
+ if (lines.length - 1) {
+ this.yylineno -= lines.length - 1;
+ }
+ var r = this.yylloc.range;
+ this.yylloc = {
+ first_line: this.yylloc.first_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.first_column,
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
+ };
+ if (this.options.ranges) {
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
+ }
+ this.yyleng = this.yytext.length;
+ return this;
+ },
+ // When called from action, caches matched text and appends it on next action
+ more: function() {
+ this._more = true;
+ return this;
+ },
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
+ reject: function() {
+ if (this.options.backtrack_lexer) {
+ this._backtrack = true;
+ } else {
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
+ }
+ return this;
+ },
+ // retain first n characters of the match
+ less: function(n) {
+ this.unput(this.match.slice(n));
+ },
+ // displays already matched input, i.e. for error messages
+ pastInput: function() {
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
+ },
+ // displays upcoming input, i.e. for error messages
+ upcomingInput: function() {
+ var next = this.match;
+ if (next.length < 20) {
+ next += this._input.substr(0, 20 - next.length);
+ }
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
+ },
+ // displays the character position where the lexing error occurred, i.e. for error messages
+ showPosition: function() {
+ var pre = this.pastInput();
+ var c = new Array(pre.length + 1).join("-");
+ return pre + this.upcomingInput() + "\n" + c + "^";
+ },
+ // test the lexed token: return FALSE when not a match, otherwise return token
+ test_match: function(match, indexed_rule) {
+ var token, lines, backup;
+ if (this.options.backtrack_lexer) {
+ backup = {
+ yylineno: this.yylineno,
+ yylloc: {
+ first_line: this.yylloc.first_line,
+ last_line: this.last_line,
+ first_column: this.yylloc.first_column,
+ last_column: this.yylloc.last_column
+ },
+ yytext: this.yytext,
+ match: this.match,
+ matches: this.matches,
+ matched: this.matched,
+ yyleng: this.yyleng,
+ offset: this.offset,
+ _more: this._more,
+ _input: this._input,
+ yy: this.yy,
+ conditionStack: this.conditionStack.slice(0),
+ done: this.done
+ };
+ if (this.options.ranges) {
+ backup.yylloc.range = this.yylloc.range.slice(0);
+ }
+ }
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
+ if (lines) {
+ this.yylineno += lines.length;
+ }
+ this.yylloc = {
+ first_line: this.yylloc.last_line,
+ last_line: this.yylineno + 1,
+ first_column: this.yylloc.last_column,
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
+ };
+ this.yytext += match[0];
+ this.match += match[0];
+ this.matches = match;
+ this.yyleng = this.yytext.length;
+ if (this.options.ranges) {
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
+ }
+ this._more = false;
+ this._backtrack = false;
+ this._input = this._input.slice(match[0].length);
+ this.matched += match[0];
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
+ if (this.done && this._input) {
+ this.done = false;
+ }
+ if (token) {
+ return token;
+ } else if (this._backtrack) {
+ for (var k in backup) {
+ this[k] = backup[k];
+ }
+ return false;
+ }
+ return false;
+ },
+ // return next match in input
+ next: function() {
+ if (this.done) {
+ return this.EOF;
+ }
+ if (!this._input) {
+ this.done = true;
+ }
+ var token, match, tempMatch, index;
+ if (!this._more) {
+ this.yytext = "";
+ this.match = "";
+ }
+ var rules = this._currentRules();
+ for (var i = 0; i < rules.length; i++) {
+ tempMatch = this._input.match(this.rules[rules[i]]);
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
+ match = tempMatch;
+ index = i;
+ if (this.options.backtrack_lexer) {
+ token = this.test_match(tempMatch, rules[i]);
+ if (token !== false) {
+ return token;
+ } else if (this._backtrack) {
+ match = false;
+ continue;
+ } else {
+ return false;
+ }
+ } else if (!this.options.flex) {
+ break;
+ }
+ }
+ }
+ if (match) {
+ token = this.test_match(match, rules[index]);
+ if (token !== false) {
+ return token;
+ }
+ return false;
+ }
+ if (this._input === "") {
+ return this.EOF;
+ } else {
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
+ text: "",
+ token: null,
+ line: this.yylineno
+ });
+ }
+ },
+ // return next match that has a token
+ lex: function lex() {
+ var r = this.next();
+ if (r) {
+ return r;
+ } else {
+ return this.lex();
+ }
+ },
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
+ begin: function begin(condition) {
+ this.conditionStack.push(condition);
+ },
+ // pop the previously active lexer condition state off the condition stack
+ popState: function popState() {
+ var n = this.conditionStack.length - 1;
+ if (n > 0) {
+ return this.conditionStack.pop();
+ } else {
+ return this.conditionStack[0];
+ }
+ },
+ // produce the lexer rule set which is active for the currently active lexer condition state
+ _currentRules: function _currentRules() {
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
+ } else {
+ return this.conditions["INITIAL"].rules;
+ }
+ },
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
+ topState: function topState(n) {
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
+ if (n >= 0) {
+ return this.conditionStack[n];
+ } else {
+ return "INITIAL";
+ }
+ },
+ // alias for begin(condition)
+ pushState: function pushState(condition) {
+ this.begin(condition);
+ },
+ // return the number of states currently on the stack
+ stateStackSize: function stateStackSize() {
+ return this.conditionStack.length;
+ },
+ options: { "case-insensitive": true },
+ performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
+ switch ($avoiding_name_collisions) {
+ case 0:
+ return 5;
+ case 1:
+ break;
+ case 2:
+ break;
+ case 3:
+ break;
+ case 4:
+ break;
+ case 5:
+ break;
+ case 6:
+ return 19;
+ case 7:
+ this.begin("LINE");
+ return 14;
+ case 8:
+ this.begin("ID");
+ return 50;
+ case 9:
+ this.begin("ID");
+ return 52;
+ case 10:
+ return 13;
+ case 11:
+ this.begin("ID");
+ return 53;
+ case 12:
+ yy_.yytext = yy_.yytext.trim();
+ this.begin("ALIAS");
+ return 70;
+ case 13:
+ this.popState();
+ this.popState();
+ this.begin("LINE");
+ return 51;
+ case 14:
+ this.popState();
+ this.popState();
+ return 5;
+ case 15:
+ this.begin("LINE");
+ return 36;
+ case 16:
+ this.begin("LINE");
+ return 37;
+ case 17:
+ this.begin("LINE");
+ return 38;
+ case 18:
+ this.begin("LINE");
+ return 39;
+ case 19:
+ this.begin("LINE");
+ return 49;
+ case 20:
+ this.begin("LINE");
+ return 41;
+ case 21:
+ this.begin("LINE");
+ return 43;
+ case 22:
+ this.begin("LINE");
+ return 48;
+ case 23:
+ this.begin("LINE");
+ return 44;
+ case 24:
+ this.begin("LINE");
+ return 47;
+ case 25:
+ this.begin("LINE");
+ return 46;
+ case 26:
+ this.popState();
+ return 15;
+ case 27:
+ return 16;
+ case 28:
+ return 65;
+ case 29:
+ return 66;
+ case 30:
+ return 59;
+ case 31:
+ return 60;
+ case 32:
+ return 61;
+ case 33:
+ return 62;
+ case 34:
+ return 57;
+ case 35:
+ return 54;
+ case 36:
+ this.begin("ID");
+ return 21;
+ case 37:
+ this.begin("ID");
+ return 23;
+ case 38:
+ return 29;
+ case 39:
+ return 30;
+ case 40:
+ this.begin("acc_title");
+ return 31;
+ case 41:
+ this.popState();
+ return "acc_title_value";
+ case 42:
+ this.begin("acc_descr");
+ return 33;
+ case 43:
+ this.popState();
+ return "acc_descr_value";
+ case 44:
+ this.begin("acc_descr_multiline");
+ break;
+ case 45:
+ this.popState();
+ break;
+ case 46:
+ return "acc_descr_multiline_value";
+ case 47:
+ return 6;
+ case 48:
+ return 18;
+ case 49:
+ return 20;
+ case 50:
+ return 64;
+ case 51:
+ return 5;
+ case 52:
+ yy_.yytext = yy_.yytext.trim();
+ return 70;
+ case 53:
+ return 73;
+ case 54:
+ return 74;
+ case 55:
+ return 71;
+ case 56:
+ return 72;
+ case 57:
+ return 75;
+ case 58:
+ return 76;
+ case 59:
+ return 77;
+ case 60:
+ return 78;
+ case 61:
+ return 79;
+ case 62:
+ return 68;
+ case 63:
+ return 69;
+ case 64:
+ return 5;
+ case 65:
+ return "INVALID";
+ }
+ },
+ rules: [/^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[0-9]+(?=[ \n]+))/i, /^(?:box\b)/i, /^(?:participant\b)/i, /^(?:actor\b)/i, /^(?:create\b)/i, /^(?:destroy\b)/i, /^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i, /^(?:as\b)/i, /^(?:(?:))/i, /^(?:loop\b)/i, /^(?:rect\b)/i, /^(?:opt\b)/i, /^(?:alt\b)/i, /^(?:else\b)/i, /^(?:par\b)/i, /^(?:par_over\b)/i, /^(?:and\b)/i, /^(?:critical\b)/i, /^(?:option\b)/i, /^(?:break\b)/i, /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i, /^(?:end\b)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:links\b)/i, /^(?:link\b)/i, /^(?:properties\b)/i, /^(?:details\b)/i, /^(?:over\b)/i, /^(?:note\b)/i, /^(?:activate\b)/i, /^(?:deactivate\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:title:\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:sequenceDiagram\b)/i, /^(?:autonumber\b)/i, /^(?:off\b)/i, /^(?:,)/i, /^(?:;)/i, /^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i, /^(?:->>)/i, /^(?:-->>)/i, /^(?:->)/i, /^(?:-->)/i, /^(?:-[x])/i, /^(?:--[x])/i, /^(?:-[\)])/i, /^(?:--[\)])/i, /^(?::(?:(?:no)?wrap)?[^#\n;]+)/i, /^(?:\+)/i, /^(?:-)/i, /^(?:$)/i, /^(?:.)/i],
+ conditions: { "acc_descr_multiline": { "rules": [45, 46], "inclusive": false }, "acc_descr": { "rules": [43], "inclusive": false }, "acc_title": { "rules": [41], "inclusive": false }, "ID": { "rules": [2, 3, 12], "inclusive": false }, "ALIAS": { "rules": [2, 3, 13, 14], "inclusive": false }, "LINE": { "rules": [2, 3, 26], "inclusive": false }, "INITIAL": { "rules": [0, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 42, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65], "inclusive": true } }
+ };
+ return lexer2;
+ }();
+ parser2.lexer = lexer;
+ function Parser() {
+ this.yy = {};
+ }
+ Parser.prototype = parser2;
+ parser2.Parser = Parser;
+ return new Parser();
+}();
+parser.parser = parser;
+const parser$1 = parser;
+class ImperativeState {
+ /**
+ * @param init - Function that creates the default state.
+ */
+ constructor(init) {
+ this.init = init;
+ this.records = this.init();
+ }
+ reset() {
+ this.records = this.init();
+ }
+}
+const state = new ImperativeState(() => ({
+ prevActor: void 0,
+ actors: {},
+ createdActors: {},
+ destroyedActors: {},
+ boxes: [],
+ messages: [],
+ notes: [],
+ sequenceNumbersEnabled: false,
+ wrapEnabled: void 0,
+ currentBox: void 0,
+ lastCreated: void 0,
+ lastDestroyed: void 0
+}));
+const addBox = function(data) {
+ state.records.boxes.push({
+ name: data.text,
+ wrap: data.wrap === void 0 && autoWrap() || !!data.wrap,
+ fill: data.color,
+ actorKeys: []
+ });
+ state.records.currentBox = state.records.boxes.slice(-1)[0];
+};
+const addActor = function(id, name, description, type) {
+ let assignedBox = state.records.currentBox;
+ const old = state.records.actors[id];
+ if (old) {
+ if (state.records.currentBox && old.box && state.records.currentBox !== old.box) {
+ throw new Error(
+ "A same participant should only be defined in one Box: " + old.name + " can't be in '" + old.box.name + "' and in '" + state.records.currentBox.name + "' at the same time."
+ );
+ }
+ assignedBox = old.box ? old.box : state.records.currentBox;
+ old.box = assignedBox;
+ if (old && name === old.name && description == null) {
+ return;
+ }
+ }
+ if (description == null || description.text == null) {
+ description = { text: name, wrap: null, type };
+ }
+ if (type == null || description.text == null) {
+ description = { text: name, wrap: null, type };
+ }
+ state.records.actors[id] = {
+ box: assignedBox,
+ name,
+ description: description.text,
+ wrap: description.wrap === void 0 && autoWrap() || !!description.wrap,
+ prevActor: state.records.prevActor,
+ links: {},
+ properties: {},
+ actorCnt: null,
+ rectData: null,
+ type: type || "participant"
+ };
+ if (state.records.prevActor && state.records.actors[state.records.prevActor]) {
+ state.records.actors[state.records.prevActor].nextActor = id;
+ }
+ if (state.records.currentBox) {
+ state.records.currentBox.actorKeys.push(id);
+ }
+ state.records.prevActor = id;
+};
+const activationCount = (part) => {
+ let i;
+ let count = 0;
+ for (i = 0; i < state.records.messages.length; i++) {
+ if (state.records.messages[i].type === LINETYPE.ACTIVE_START && state.records.messages[i].from.actor === part) {
+ count++;
+ }
+ if (state.records.messages[i].type === LINETYPE.ACTIVE_END && state.records.messages[i].from.actor === part) {
+ count--;
+ }
+ }
+ return count;
+};
+const addMessage = function(idFrom, idTo, message, answer) {
+ state.records.messages.push({
+ from: idFrom,
+ to: idTo,
+ message: message.text,
+ wrap: message.wrap === void 0 && autoWrap() || !!message.wrap,
+ answer
+ });
+};
+const addSignal = function(idFrom, idTo, message = { text: void 0, wrap: void 0 }, messageType, activate = false) {
+ if (messageType === LINETYPE.ACTIVE_END) {
+ const cnt = activationCount(idFrom.actor);
+ if (cnt < 1) {
+ let error = new Error("Trying to inactivate an inactive participant (" + idFrom.actor + ")");
+ error.hash = {
+ text: "->>-",
+ token: "->>-",
+ line: "1",
+ loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
+ expected: ["'ACTIVE_PARTICIPANT'"]
+ };
+ throw error;
+ }
+ }
+ state.records.messages.push({
+ from: idFrom,
+ to: idTo,
+ message: message.text,
+ wrap: message.wrap === void 0 && autoWrap() || !!message.wrap,
+ type: messageType,
+ activate
+ });
+ return true;
+};
+const hasAtLeastOneBox = function() {
+ return state.records.boxes.length > 0;
+};
+const hasAtLeastOneBoxWithTitle = function() {
+ return state.records.boxes.some((b) => b.name);
+};
+const getMessages = function() {
+ return state.records.messages;
+};
+const getBoxes = function() {
+ return state.records.boxes;
+};
+const getActors = function() {
+ return state.records.actors;
+};
+const getCreatedActors = function() {
+ return state.records.createdActors;
+};
+const getDestroyedActors = function() {
+ return state.records.destroyedActors;
+};
+const getActor = function(id) {
+ return state.records.actors[id];
+};
+const getActorKeys = function() {
+ return Object.keys(state.records.actors);
+};
+const enableSequenceNumbers = function() {
+ state.records.sequenceNumbersEnabled = true;
+};
+const disableSequenceNumbers = function() {
+ state.records.sequenceNumbersEnabled = false;
+};
+const showSequenceNumbers = () => state.records.sequenceNumbersEnabled;
+const setWrap = function(wrapSetting) {
+ state.records.wrapEnabled = wrapSetting;
+};
+const autoWrap = () => {
+ if (state.records.wrapEnabled !== void 0) {
+ return state.records.wrapEnabled;
+ }
+ return (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().sequence.wrap;
+};
+const clear = function() {
+ state.reset();
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.t)();
+};
+const parseMessage = function(str) {
+ const _str = str.trim();
+ const message = {
+ text: _str.replace(/^:?(?:no)?wrap:/, "").trim(),
+ wrap: _str.match(/^:?wrap:/) !== null ? true : _str.match(/^:?nowrap:/) !== null ? false : void 0
+ };
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("parseMessage:", message);
+ return message;
+};
+const parseBoxData = function(str) {
+ const match = str.match(/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/);
+ let color = match != null && match[1] ? match[1].trim() : "transparent";
+ let title = match != null && match[2] ? match[2].trim() : void 0;
+ if (window && window.CSS) {
+ if (!window.CSS.supports("color", color)) {
+ color = "transparent";
+ title = str.trim();
+ }
+ } else {
+ const style = new Option().style;
+ style.color = color;
+ if (style.color !== color) {
+ color = "transparent";
+ title = str.trim();
+ }
+ }
+ return {
+ color,
+ text: title !== void 0 ? (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.d)(title.replace(/^:?(?:no)?wrap:/, ""), (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)()) : void 0,
+ wrap: title !== void 0 ? title.match(/^:?wrap:/) !== null ? true : title.match(/^:?nowrap:/) !== null ? false : void 0 : void 0
+ };
+};
+const LINETYPE = {
+ SOLID: 0,
+ DOTTED: 1,
+ NOTE: 2,
+ SOLID_CROSS: 3,
+ DOTTED_CROSS: 4,
+ SOLID_OPEN: 5,
+ DOTTED_OPEN: 6,
+ LOOP_START: 10,
+ LOOP_END: 11,
+ ALT_START: 12,
+ ALT_ELSE: 13,
+ ALT_END: 14,
+ OPT_START: 15,
+ OPT_END: 16,
+ ACTIVE_START: 17,
+ ACTIVE_END: 18,
+ PAR_START: 19,
+ PAR_AND: 20,
+ PAR_END: 21,
+ RECT_START: 22,
+ RECT_END: 23,
+ SOLID_POINT: 24,
+ DOTTED_POINT: 25,
+ AUTONUMBER: 26,
+ CRITICAL_START: 27,
+ CRITICAL_OPTION: 28,
+ CRITICAL_END: 29,
+ BREAK_START: 30,
+ BREAK_END: 31,
+ PAR_OVER_START: 32
+};
+const ARROWTYPE = {
+ FILLED: 0,
+ OPEN: 1
+};
+const PLACEMENT = {
+ LEFTOF: 0,
+ RIGHTOF: 1,
+ OVER: 2
+};
+const addNote = function(actor, placement, message) {
+ const note = {
+ actor,
+ placement,
+ message: message.text,
+ wrap: message.wrap === void 0 && autoWrap() || !!message.wrap
+ };
+ const actors = [].concat(actor, actor);
+ state.records.notes.push(note);
+ state.records.messages.push({
+ from: actors[0],
+ to: actors[1],
+ message: message.text,
+ wrap: message.wrap === void 0 && autoWrap() || !!message.wrap,
+ type: LINETYPE.NOTE,
+ placement
+ });
+};
+const addLinks = function(actorId, text) {
+ const actor = getActor(actorId);
+ try {
+ let sanitizedText = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)());
+ sanitizedText = sanitizedText.replace(/&/g, "&");
+ sanitizedText = sanitizedText.replace(/=/g, "=");
+ const links = JSON.parse(sanitizedText);
+ insertLinks(actor, links);
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor link text", e);
+ }
+};
+const addALink = function(actorId, text) {
+ const actor = getActor(actorId);
+ try {
+ const links = {};
+ let sanitizedText = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)());
+ var sep = sanitizedText.indexOf("@");
+ sanitizedText = sanitizedText.replace(/&/g, "&");
+ sanitizedText = sanitizedText.replace(/=/g, "=");
+ var label = sanitizedText.slice(0, sep - 1).trim();
+ var link = sanitizedText.slice(sep + 1).trim();
+ links[label] = link;
+ insertLinks(actor, links);
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor link text", e);
+ }
+};
+function insertLinks(actor, links) {
+ if (actor.links == null) {
+ actor.links = links;
+ } else {
+ for (let key in links) {
+ actor.links[key] = links[key];
+ }
+ }
+}
+const addProperties = function(actorId, text) {
+ const actor = getActor(actorId);
+ try {
+ let sanitizedText = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.d)(text.text, (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)());
+ const properties = JSON.parse(sanitizedText);
+ insertProperties(actor, properties);
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor properties text", e);
+ }
+};
+function insertProperties(actor, properties) {
+ if (actor.properties == null) {
+ actor.properties = properties;
+ } else {
+ for (let key in properties) {
+ actor.properties[key] = properties[key];
+ }
+ }
+}
+function boxEnd() {
+ state.records.currentBox = void 0;
+}
+const addDetails = function(actorId, text) {
+ const actor = getActor(actorId);
+ const elem = document.getElementById(text.text);
+ try {
+ const text2 = elem.innerHTML;
+ const details = JSON.parse(text2);
+ if (details["properties"]) {
+ insertProperties(actor, details["properties"]);
+ }
+ if (details["links"]) {
+ insertLinks(actor, details["links"]);
+ }
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while parsing actor details text", e);
+ }
+};
+const getActorProperty = function(actor, key) {
+ if (actor !== void 0 && actor.properties !== void 0) {
+ return actor.properties[key];
+ }
+ return void 0;
+};
+const apply = function(param) {
+ if (Array.isArray(param)) {
+ param.forEach(function(item) {
+ apply(item);
+ });
+ } else {
+ switch (param.type) {
+ case "sequenceIndex":
+ state.records.messages.push({
+ from: void 0,
+ to: void 0,
+ message: {
+ start: param.sequenceIndex,
+ step: param.sequenceIndexStep,
+ visible: param.sequenceVisible
+ },
+ wrap: false,
+ type: param.signalType
+ });
+ break;
+ case "addParticipant":
+ addActor(param.actor, param.actor, param.description, param.draw);
+ break;
+ case "createParticipant":
+ if (state.records.actors[param.actor]) {
+ throw new Error(
+ "It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior"
+ );
+ }
+ state.records.lastCreated = param.actor;
+ addActor(param.actor, param.actor, param.description, param.draw);
+ state.records.createdActors[param.actor] = state.records.messages.length;
+ break;
+ case "destroyParticipant":
+ state.records.lastDestroyed = param.actor;
+ state.records.destroyedActors[param.actor] = state.records.messages.length;
+ break;
+ case "activeStart":
+ addSignal(param.actor, void 0, void 0, param.signalType);
+ break;
+ case "activeEnd":
+ addSignal(param.actor, void 0, void 0, param.signalType);
+ break;
+ case "addNote":
+ addNote(param.actor, param.placement, param.text);
+ break;
+ case "addLinks":
+ addLinks(param.actor, param.text);
+ break;
+ case "addALink":
+ addALink(param.actor, param.text);
+ break;
+ case "addProperties":
+ addProperties(param.actor, param.text);
+ break;
+ case "addDetails":
+ addDetails(param.actor, param.text);
+ break;
+ case "addMessage":
+ if (state.records.lastCreated) {
+ if (param.to !== state.records.lastCreated) {
+ throw new Error(
+ "The created participant " + state.records.lastCreated + " does not have an associated creating message after its declaration. Please check the sequence diagram."
+ );
+ } else {
+ state.records.lastCreated = void 0;
+ }
+ } else if (state.records.lastDestroyed) {
+ if (param.to !== state.records.lastDestroyed && param.from !== state.records.lastDestroyed) {
+ throw new Error(
+ "The destroyed participant " + state.records.lastDestroyed + " does not have an associated destroying message after its declaration. Please check the sequence diagram."
+ );
+ } else {
+ state.records.lastDestroyed = void 0;
+ }
+ }
+ addSignal(param.from, param.to, param.msg, param.signalType, param.activate);
+ break;
+ case "boxStart":
+ addBox(param.boxData);
+ break;
+ case "boxEnd":
+ boxEnd();
+ break;
+ case "loopStart":
+ addSignal(void 0, void 0, param.loopText, param.signalType);
+ break;
+ case "loopEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "rectStart":
+ addSignal(void 0, void 0, param.color, param.signalType);
+ break;
+ case "rectEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "optStart":
+ addSignal(void 0, void 0, param.optText, param.signalType);
+ break;
+ case "optEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "altStart":
+ addSignal(void 0, void 0, param.altText, param.signalType);
+ break;
+ case "else":
+ addSignal(void 0, void 0, param.altText, param.signalType);
+ break;
+ case "altEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "setAccTitle":
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.s)(param.text);
+ break;
+ case "parStart":
+ addSignal(void 0, void 0, param.parText, param.signalType);
+ break;
+ case "and":
+ addSignal(void 0, void 0, param.parText, param.signalType);
+ break;
+ case "parEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "criticalStart":
+ addSignal(void 0, void 0, param.criticalText, param.signalType);
+ break;
+ case "option":
+ addSignal(void 0, void 0, param.optionText, param.signalType);
+ break;
+ case "criticalEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ case "breakStart":
+ addSignal(void 0, void 0, param.breakText, param.signalType);
+ break;
+ case "breakEnd":
+ addSignal(void 0, void 0, void 0, param.signalType);
+ break;
+ }
+ }
+};
+const db = {
+ addActor,
+ addMessage,
+ addSignal,
+ addLinks,
+ addDetails,
+ addProperties,
+ autoWrap,
+ setWrap,
+ enableSequenceNumbers,
+ disableSequenceNumbers,
+ showSequenceNumbers,
+ getMessages,
+ getActors,
+ getCreatedActors,
+ getDestroyedActors,
+ getActor,
+ getActorKeys,
+ getActorProperty,
+ getAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.g,
+ getBoxes,
+ getDiagramTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.r,
+ setDiagramTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.q,
+ getConfig: () => (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)().sequence,
+ clear,
+ parseMessage,
+ parseBoxData,
+ LINETYPE,
+ ARROWTYPE,
+ PLACEMENT,
+ addNote,
+ setAccTitle: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.s,
+ apply,
+ setAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.b,
+ getAccDescription: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.a,
+ hasAtLeastOneBox,
+ hasAtLeastOneBoxWithTitle
+};
+const getStyles = (options) => `.actor {
+ stroke: ${options.actorBorder};
+ fill: ${options.actorBkg};
+ }
+
+ text.actor > tspan {
+ fill: ${options.actorTextColor};
+ stroke: none;
+ }
+
+ .actor-line {
+ stroke: ${options.actorLineColor};
+ }
+
+ .messageLine0 {
+ stroke-width: 1.5;
+ stroke-dasharray: none;
+ stroke: ${options.signalColor};
+ }
+
+ .messageLine1 {
+ stroke-width: 1.5;
+ stroke-dasharray: 2, 2;
+ stroke: ${options.signalColor};
+ }
+
+ #arrowhead path {
+ fill: ${options.signalColor};
+ stroke: ${options.signalColor};
+ }
+
+ .sequenceNumber {
+ fill: ${options.sequenceNumberColor};
+ }
+
+ #sequencenumber {
+ fill: ${options.signalColor};
+ }
+
+ #crosshead path {
+ fill: ${options.signalColor};
+ stroke: ${options.signalColor};
+ }
+
+ .messageText {
+ fill: ${options.signalTextColor};
+ stroke: none;
+ }
+
+ .labelBox {
+ stroke: ${options.labelBoxBorderColor};
+ fill: ${options.labelBoxBkgColor};
+ }
+
+ .labelText, .labelText > tspan {
+ fill: ${options.labelTextColor};
+ stroke: none;
+ }
+
+ .loopText, .loopText > tspan {
+ fill: ${options.loopTextColor};
+ stroke: none;
+ }
+
+ .loopLine {
+ stroke-width: 2px;
+ stroke-dasharray: 2, 2;
+ stroke: ${options.labelBoxBorderColor};
+ fill: ${options.labelBoxBorderColor};
+ }
+
+ .note {
+ //stroke: #decc93;
+ stroke: ${options.noteBorderColor};
+ fill: ${options.noteBkgColor};
+ }
+
+ .noteText, .noteText > tspan {
+ fill: ${options.noteTextColor};
+ stroke: none;
+ }
+
+ .activation0 {
+ fill: ${options.activationBkgColor};
+ stroke: ${options.activationBorderColor};
+ }
+
+ .activation1 {
+ fill: ${options.activationBkgColor};
+ stroke: ${options.activationBorderColor};
+ }
+
+ .activation2 {
+ fill: ${options.activationBkgColor};
+ stroke: ${options.activationBorderColor};
+ }
+
+ .actorPopupMenu {
+ position: absolute;
+ }
+
+ .actorPopupMenuPanel {
+ position: absolute;
+ fill: ${options.actorBkg};
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
+}
+ .actor-man line {
+ stroke: ${options.actorBorder};
+ fill: ${options.actorBkg};
+ }
+ .actor-man circle, line {
+ stroke: ${options.actorBorder};
+ fill: ${options.actorBkg};
+ stroke-width: 2px;
+ }
+`;
+const styles = getStyles;
+const ACTOR_TYPE_WIDTH = 18 * 2;
+const drawRect = function(elem, rectData) {
+ return (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.d)(elem, rectData);
+};
+const addPopupInteraction = (id, actorCnt2) => {
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.F)(() => {
+ const arr = document.querySelectorAll(id);
+ if (arr.length === 0) {
+ return;
+ }
+ arr[0].addEventListener("mouseover", function() {
+ popupMenuUpFunc("actor" + actorCnt2 + "_popup");
+ });
+ arr[0].addEventListener("mouseout", function() {
+ popupMenuDownFunc("actor" + actorCnt2 + "_popup");
+ });
+ });
+};
+const drawPopup = function(elem, actor, minMenuWidth, textAttrs, forceMenus) {
+ if (actor.links === void 0 || actor.links === null || Object.keys(actor.links).length === 0) {
+ return { height: 0, width: 0 };
+ }
+ const links = actor.links;
+ const actorCnt2 = actor.actorCnt;
+ const rectData = actor.rectData;
+ var displayValue = "none";
+ if (forceMenus) {
+ displayValue = "block !important";
+ }
+ const g = elem.append("g");
+ g.attr("id", "actor" + actorCnt2 + "_popup");
+ g.attr("class", "actorPopupMenu");
+ g.attr("display", displayValue);
+ addPopupInteraction("#actor" + actorCnt2 + "_popup", actorCnt2);
+ var actorClass = "";
+ if (rectData.class !== void 0) {
+ actorClass = " " + rectData.class;
+ }
+ let menuWidth = rectData.width > minMenuWidth ? rectData.width : minMenuWidth;
+ const rectElem = g.append("rect");
+ rectElem.attr("class", "actorPopupMenuPanel" + actorClass);
+ rectElem.attr("x", rectData.x);
+ rectElem.attr("y", rectData.height);
+ rectElem.attr("fill", rectData.fill);
+ rectElem.attr("stroke", rectData.stroke);
+ rectElem.attr("width", menuWidth);
+ rectElem.attr("height", rectData.height);
+ rectElem.attr("rx", rectData.rx);
+ rectElem.attr("ry", rectData.ry);
+ if (links != null) {
+ var linkY = 20;
+ for (let key in links) {
+ var linkElem = g.append("a");
+ var sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Nm)(links[key]);
+ linkElem.attr("xlink:href", sanitizedLink);
+ linkElem.attr("target", "_blank");
+ _drawMenuItemTextCandidateFunc(textAttrs)(
+ key,
+ linkElem,
+ rectData.x + 10,
+ rectData.height + linkY,
+ menuWidth,
+ 20,
+ { class: "actor" },
+ textAttrs
+ );
+ linkY += 30;
+ }
+ }
+ rectElem.attr("height", linkY);
+ return { height: rectData.height + linkY, width: menuWidth };
+};
+const popupMenu = function(popid) {
+ return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'block'; }";
+};
+const popdownMenu = function(popid) {
+ return "var pu = document.getElementById('" + popid + "'); if (pu != null) { pu.style.display = 'none'; }";
+};
+const popupMenuUpFunc = function(popupId) {
+ var pu = document.getElementById(popupId);
+ if (pu != null) {
+ pu.style.display = "block";
+ }
+};
+const popupMenuDownFunc = function(popupId) {
+ var pu = document.getElementById(popupId);
+ if (pu != null) {
+ pu.style.display = "none";
+ }
+};
+const drawText = function(elem, textData) {
+ let prevTextHeight = 0;
+ let textHeight = 0;
+ const lines = textData.text.split(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex);
+ const [_textFontSize, _textFontSizePx] = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.C)(textData.fontSize);
+ let textElems = [];
+ let dy = 0;
+ let yfunc = () => textData.y;
+ if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) {
+ switch (textData.valign) {
+ case "top":
+ case "start":
+ yfunc = () => Math.round(textData.y + textData.textMargin);
+ break;
+ case "middle":
+ case "center":
+ yfunc = () => Math.round(textData.y + (prevTextHeight + textHeight + textData.textMargin) / 2);
+ break;
+ case "bottom":
+ case "end":
+ yfunc = () => Math.round(
+ textData.y + (prevTextHeight + textHeight + 2 * textData.textMargin) - textData.textMargin
+ );
+ break;
+ }
+ }
+ if (textData.anchor !== void 0 && textData.textMargin !== void 0 && textData.width !== void 0) {
+ switch (textData.anchor) {
+ case "left":
+ case "start":
+ textData.x = Math.round(textData.x + textData.textMargin);
+ textData.anchor = "start";
+ textData.dominantBaseline = "middle";
+ textData.alignmentBaseline = "middle";
+ break;
+ case "middle":
+ case "center":
+ textData.x = Math.round(textData.x + textData.width / 2);
+ textData.anchor = "middle";
+ textData.dominantBaseline = "middle";
+ textData.alignmentBaseline = "middle";
+ break;
+ case "right":
+ case "end":
+ textData.x = Math.round(textData.x + textData.width - textData.textMargin);
+ textData.anchor = "end";
+ textData.dominantBaseline = "middle";
+ textData.alignmentBaseline = "middle";
+ break;
+ }
+ }
+ for (let [i, line] of lines.entries()) {
+ if (textData.textMargin !== void 0 && textData.textMargin === 0 && _textFontSize !== void 0) {
+ dy = i * _textFontSize;
+ }
+ const textElem = elem.append("text");
+ textElem.attr("x", textData.x);
+ textElem.attr("y", yfunc());
+ if (textData.anchor !== void 0) {
+ textElem.attr("text-anchor", textData.anchor).attr("dominant-baseline", textData.dominantBaseline).attr("alignment-baseline", textData.alignmentBaseline);
+ }
+ if (textData.fontFamily !== void 0) {
+ textElem.style("font-family", textData.fontFamily);
+ }
+ if (_textFontSizePx !== void 0) {
+ textElem.style("font-size", _textFontSizePx);
+ }
+ if (textData.fontWeight !== void 0) {
+ textElem.style("font-weight", textData.fontWeight);
+ }
+ if (textData.fill !== void 0) {
+ textElem.attr("fill", textData.fill);
+ }
+ if (textData.class !== void 0) {
+ textElem.attr("class", textData.class);
+ }
+ if (textData.dy !== void 0) {
+ textElem.attr("dy", textData.dy);
+ } else if (dy !== 0) {
+ textElem.attr("dy", dy);
+ }
+ const text = line || _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.Z;
+ if (textData.tspan) {
+ const span = textElem.append("tspan");
+ span.attr("x", textData.x);
+ if (textData.fill !== void 0) {
+ span.attr("fill", textData.fill);
+ }
+ span.text(text);
+ } else {
+ textElem.text(text);
+ }
+ if (textData.valign !== void 0 && textData.textMargin !== void 0 && textData.textMargin > 0) {
+ textHeight += (textElem._groups || textElem)[0][0].getBBox().height;
+ prevTextHeight = textHeight;
+ }
+ textElems.push(textElem);
+ }
+ return textElems;
+};
+const drawLabel = function(elem, txtObject) {
+ function genPoints(x, y, width, height, cut) {
+ return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
+ }
+ const polygon = elem.append("polygon");
+ polygon.attr("points", genPoints(txtObject.x, txtObject.y, txtObject.width, txtObject.height, 7));
+ polygon.attr("class", "labelBox");
+ txtObject.y = txtObject.y + txtObject.height / 2;
+ drawText(elem, txtObject);
+ return polygon;
+};
+let actorCnt = -1;
+const fixLifeLineHeights = (diagram2, actors, actorKeys, conf2) => {
+ if (!diagram2.select) {
+ return;
+ }
+ actorKeys.forEach((actorKey) => {
+ const actor = actors[actorKey];
+ const actorDOM = diagram2.select("#actor" + actor.actorCnt);
+ if (!conf2.mirrorActors && actor.stopy) {
+ actorDOM.attr("y2", actor.stopy + actor.height / 2);
+ } else if (conf2.mirrorActors) {
+ actorDOM.attr("y2", actor.stopy);
+ }
+ });
+};
+const drawActorTypeParticipant = function(elem, actor, conf2, isFooter) {
+ const actorY = isFooter ? actor.stopy : actor.starty;
+ const center = actor.x + actor.width / 2;
+ const centerY = actorY + 5;
+ const boxpluslineGroup = elem.append("g").lower();
+ var g = boxpluslineGroup;
+ if (!isFooter) {
+ actorCnt++;
+ g.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999");
+ g = boxpluslineGroup.append("g");
+ actor.actorCnt = actorCnt;
+ if (actor.links != null) {
+ g.attr("id", "root-" + actorCnt);
+ addPopupInteraction("#root-" + actorCnt, actorCnt);
+ }
+ }
+ const rect = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.g)();
+ var cssclass = "actor";
+ if (actor.properties != null && actor.properties["class"]) {
+ cssclass = actor.properties["class"];
+ } else {
+ rect.fill = "#eaeaea";
+ }
+ rect.x = actor.x;
+ rect.y = actorY;
+ rect.width = actor.width;
+ rect.height = actor.height;
+ rect.class = cssclass;
+ rect.rx = 3;
+ rect.ry = 3;
+ const rectElem = drawRect(g, rect);
+ actor.rectData = rect;
+ if (actor.properties != null && actor.properties["icon"]) {
+ const iconSrc = actor.properties["icon"].trim();
+ if (iconSrc.charAt(0) === "@") {
+ (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.b)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc.substr(1));
+ } else {
+ (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.c)(g, rect.x + rect.width - 20, rect.y + 10, iconSrc);
+ }
+ }
+ _drawTextCandidateFunc(conf2)(
+ actor.description,
+ g,
+ rect.x,
+ rect.y,
+ rect.width,
+ rect.height,
+ { class: "actor" },
+ conf2
+ );
+ let height = actor.height;
+ if (rectElem.node) {
+ const bounds2 = rectElem.node().getBBox();
+ actor.height = bounds2.height;
+ height = bounds2.height;
+ }
+ return height;
+};
+const drawActorTypeActor = function(elem, actor, conf2, isFooter) {
+ const actorY = isFooter ? actor.stopy : actor.starty;
+ const center = actor.x + actor.width / 2;
+ const centerY = actorY + 80;
+ elem.lower();
+ if (!isFooter) {
+ actorCnt++;
+ elem.append("line").attr("id", "actor" + actorCnt).attr("x1", center).attr("y1", centerY).attr("x2", center).attr("y2", 2e3).attr("class", "actor-line").attr("class", "200").attr("stroke-width", "0.5px").attr("stroke", "#999");
+ actor.actorCnt = actorCnt;
+ }
+ const actElem = elem.append("g");
+ actElem.attr("class", "actor-man");
+ const rect = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.g)();
+ rect.x = actor.x;
+ rect.y = actorY;
+ rect.fill = "#eaeaea";
+ rect.width = actor.width;
+ rect.height = actor.height;
+ rect.class = "actor";
+ rect.rx = 3;
+ rect.ry = 3;
+ actElem.append("line").attr("id", "actor-man-torso" + actorCnt).attr("x1", center).attr("y1", actorY + 25).attr("x2", center).attr("y2", actorY + 45);
+ actElem.append("line").attr("id", "actor-man-arms" + actorCnt).attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 33).attr("x2", center + ACTOR_TYPE_WIDTH / 2).attr("y2", actorY + 33);
+ actElem.append("line").attr("x1", center - ACTOR_TYPE_WIDTH / 2).attr("y1", actorY + 60).attr("x2", center).attr("y2", actorY + 45);
+ actElem.append("line").attr("x1", center).attr("y1", actorY + 45).attr("x2", center + ACTOR_TYPE_WIDTH / 2 - 2).attr("y2", actorY + 60);
+ const circle = actElem.append("circle");
+ circle.attr("cx", actor.x + actor.width / 2);
+ circle.attr("cy", actorY + 10);
+ circle.attr("r", 15);
+ circle.attr("width", actor.width);
+ circle.attr("height", actor.height);
+ const bounds2 = actElem.node().getBBox();
+ actor.height = bounds2.height;
+ _drawTextCandidateFunc(conf2)(
+ actor.description,
+ actElem,
+ rect.x,
+ rect.y + 35,
+ rect.width,
+ rect.height,
+ { class: "actor" },
+ conf2
+ );
+ return actor.height;
+};
+const drawActor = function(elem, actor, conf2, isFooter) {
+ switch (actor.type) {
+ case "actor":
+ return drawActorTypeActor(elem, actor, conf2, isFooter);
+ case "participant":
+ return drawActorTypeParticipant(elem, actor, conf2, isFooter);
+ }
+};
+const drawBox = function(elem, box, conf2) {
+ const boxplustextGroup = elem.append("g");
+ const g = boxplustextGroup;
+ drawBackgroundRect(g, box);
+ if (box.name) {
+ _drawTextCandidateFunc(conf2)(
+ box.name,
+ g,
+ box.x,
+ box.y + (box.textMaxHeight || 0) / 2,
+ box.width,
+ 0,
+ { class: "text" },
+ conf2
+ );
+ }
+ g.lower();
+};
+const anchorElement = function(elem) {
+ return elem.append("g");
+};
+const drawActivation = function(elem, bounds2, verticalPos, conf2, actorActivations2) {
+ const rect = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.g)();
+ const g = bounds2.anchored;
+ rect.x = bounds2.startx;
+ rect.y = bounds2.starty;
+ rect.class = "activation" + actorActivations2 % 3;
+ rect.width = bounds2.stopx - bounds2.startx;
+ rect.height = verticalPos - bounds2.starty;
+ drawRect(g, rect);
+};
+const drawLoop = function(elem, loopModel, labelText, conf2) {
+ const {
+ boxMargin,
+ boxTextMargin,
+ labelBoxHeight,
+ labelBoxWidth,
+ messageFontFamily: fontFamily,
+ messageFontSize: fontSize,
+ messageFontWeight: fontWeight
+ } = conf2;
+ const g = elem.append("g");
+ const drawLoopLine = function(startx, starty, stopx, stopy) {
+ return g.append("line").attr("x1", startx).attr("y1", starty).attr("x2", stopx).attr("y2", stopy).attr("class", "loopLine");
+ };
+ drawLoopLine(loopModel.startx, loopModel.starty, loopModel.stopx, loopModel.starty);
+ drawLoopLine(loopModel.stopx, loopModel.starty, loopModel.stopx, loopModel.stopy);
+ drawLoopLine(loopModel.startx, loopModel.stopy, loopModel.stopx, loopModel.stopy);
+ drawLoopLine(loopModel.startx, loopModel.starty, loopModel.startx, loopModel.stopy);
+ if (loopModel.sections !== void 0) {
+ loopModel.sections.forEach(function(item) {
+ drawLoopLine(loopModel.startx, item.y, loopModel.stopx, item.y).style(
+ "stroke-dasharray",
+ "3, 3"
+ );
+ });
+ }
+ let txt = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.e)();
+ txt.text = labelText;
+ txt.x = loopModel.startx;
+ txt.y = loopModel.starty;
+ txt.fontFamily = fontFamily;
+ txt.fontSize = fontSize;
+ txt.fontWeight = fontWeight;
+ txt.anchor = "middle";
+ txt.valign = "middle";
+ txt.tspan = false;
+ txt.width = labelBoxWidth || 50;
+ txt.height = labelBoxHeight || 20;
+ txt.textMargin = boxTextMargin;
+ txt.class = "labelText";
+ drawLabel(g, txt);
+ txt = getTextObj();
+ txt.text = loopModel.title;
+ txt.x = loopModel.startx + labelBoxWidth / 2 + (loopModel.stopx - loopModel.startx) / 2;
+ txt.y = loopModel.starty + boxMargin + boxTextMargin;
+ txt.anchor = "middle";
+ txt.valign = "middle";
+ txt.textMargin = boxTextMargin;
+ txt.class = "loopText";
+ txt.fontFamily = fontFamily;
+ txt.fontSize = fontSize;
+ txt.fontWeight = fontWeight;
+ txt.wrap = true;
+ let textElem = drawText(g, txt);
+ if (loopModel.sectionTitles !== void 0) {
+ loopModel.sectionTitles.forEach(function(item, idx) {
+ if (item.message) {
+ txt.text = item.message;
+ txt.x = loopModel.startx + (loopModel.stopx - loopModel.startx) / 2;
+ txt.y = loopModel.sections[idx].y + boxMargin + boxTextMargin;
+ txt.class = "loopText";
+ txt.anchor = "middle";
+ txt.valign = "middle";
+ txt.tspan = false;
+ txt.fontFamily = fontFamily;
+ txt.fontSize = fontSize;
+ txt.fontWeight = fontWeight;
+ txt.wrap = loopModel.wrap;
+ textElem = drawText(g, txt);
+ let sectionHeight = Math.round(
+ textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr)
+ );
+ loopModel.sections[idx].height += sectionHeight - (boxMargin + boxTextMargin);
+ }
+ });
+ }
+ loopModel.height = Math.round(loopModel.stopy - loopModel.starty);
+ return g;
+};
+const drawBackgroundRect = function(elem, bounds2) {
+ (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.a)(elem, bounds2);
+};
+const insertDatabaseIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
+ );
+};
+const insertComputerIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
+ );
+};
+const insertClockIcon = function(elem) {
+ elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
+ "d",
+ "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
+ );
+};
+const insertArrowHead = function(elem) {
+ elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
+};
+const insertArrowFilledHead = function(elem) {
+ elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 15.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
+};
+const insertSequenceNumber = function(elem) {
+ elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
+};
+const insertArrowCrossHead = function(elem) {
+ const defs = elem.append("defs");
+ const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5);
+ marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
+};
+const getTextObj = function() {
+ return {
+ x: 0,
+ y: 0,
+ fill: void 0,
+ anchor: void 0,
+ style: "#666",
+ width: void 0,
+ height: void 0,
+ textMargin: 0,
+ rx: 0,
+ ry: 0,
+ tspan: true,
+ valign: void 0
+ };
+};
+const getNoteRect = function() {
+ return {
+ x: 0,
+ y: 0,
+ fill: "#EDF2AE",
+ stroke: "#666",
+ width: 100,
+ anchor: "start",
+ height: 100,
+ rx: 0,
+ ry: 0
+ };
+};
+const _drawTextCandidateFunc = function() {
+ function byText(content, g, x, y, width, height, textAttrs) {
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content);
+ _setTextAttrs(text, textAttrs);
+ }
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
+ const { actorFontSize, actorFontFamily, actorFontWeight } = conf2;
+ const [_actorFontSize, _actorFontSizePx] = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.C)(actorFontSize);
+ const lines = content.split(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex);
+ for (let i = 0; i < lines.length; i++) {
+ const dy = i * _actorFontSize - _actorFontSize * (lines.length - 1) / 2;
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").style("font-size", _actorFontSizePx).style("font-weight", actorFontWeight).style("font-family", actorFontFamily);
+ text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
+ _setTextAttrs(text, textAttrs);
+ }
+ }
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
+ const s = g.append("switch");
+ const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
+ _setTextAttrs(text, textAttrs);
+ }
+ function _setTextAttrs(toText, fromTextAttrsDict) {
+ for (const key in fromTextAttrsDict) {
+ if (fromTextAttrsDict.hasOwnProperty(key)) {
+ toText.attr(key, fromTextAttrsDict[key]);
+ }
+ }
+ }
+ return function(conf2) {
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
+ };
+}();
+const _drawMenuItemTextCandidateFunc = function() {
+ function byText(content, g, x, y, width, height, textAttrs) {
+ const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").text(content);
+ _setTextAttrs(text, textAttrs);
+ }
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
+ const { actorFontSize, actorFontFamily, actorFontWeight } = conf2;
+ const lines = content.split(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.lineBreakRegex);
+ for (let i = 0; i < lines.length; i++) {
+ const dy = i * actorFontSize - actorFontSize * (lines.length - 1) / 2;
+ const text = g.append("text").attr("x", x).attr("y", y).style("text-anchor", "start").style("font-size", actorFontSize).style("font-weight", actorFontWeight).style("font-family", actorFontFamily);
+ text.append("tspan").attr("x", x).attr("dy", dy).text(lines[i]);
+ text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
+ _setTextAttrs(text, textAttrs);
+ }
+ }
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
+ const s = g.append("switch");
+ const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
+ _setTextAttrs(text, textAttrs);
+ }
+ function _setTextAttrs(toText, fromTextAttrsDict) {
+ for (const key in fromTextAttrsDict) {
+ if (fromTextAttrsDict.hasOwnProperty(key)) {
+ toText.attr(key, fromTextAttrsDict[key]);
+ }
+ }
+ }
+ return function(conf2) {
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
+ };
+}();
+const svgDraw = {
+ drawRect,
+ drawText,
+ drawLabel,
+ drawActor,
+ drawBox,
+ drawPopup,
+ anchorElement,
+ drawActivation,
+ drawLoop,
+ drawBackgroundRect,
+ insertArrowHead,
+ insertArrowFilledHead,
+ insertSequenceNumber,
+ insertArrowCrossHead,
+ insertDatabaseIcon,
+ insertComputerIcon,
+ insertClockIcon,
+ getTextObj,
+ getNoteRect,
+ popupMenu,
+ popdownMenu,
+ fixLifeLineHeights,
+ sanitizeUrl: _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .Nm
+};
+let conf = {};
+const bounds = {
+ data: {
+ startx: void 0,
+ stopx: void 0,
+ starty: void 0,
+ stopy: void 0
+ },
+ verticalPos: 0,
+ sequenceItems: [],
+ activations: [],
+ models: {
+ getHeight: function() {
+ return Math.max.apply(
+ null,
+ this.actors.length === 0 ? [0] : this.actors.map((actor) => actor.height || 0)
+ ) + (this.loops.length === 0 ? 0 : this.loops.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.messages.length === 0 ? 0 : this.messages.map((it) => it.height || 0).reduce((acc, h) => acc + h)) + (this.notes.length === 0 ? 0 : this.notes.map((it) => it.height || 0).reduce((acc, h) => acc + h));
+ },
+ clear: function() {
+ this.actors = [];
+ this.boxes = [];
+ this.loops = [];
+ this.messages = [];
+ this.notes = [];
+ },
+ addBox: function(boxModel) {
+ this.boxes.push(boxModel);
+ },
+ addActor: function(actorModel) {
+ this.actors.push(actorModel);
+ },
+ addLoop: function(loopModel) {
+ this.loops.push(loopModel);
+ },
+ addMessage: function(msgModel) {
+ this.messages.push(msgModel);
+ },
+ addNote: function(noteModel) {
+ this.notes.push(noteModel);
+ },
+ lastActor: function() {
+ return this.actors[this.actors.length - 1];
+ },
+ lastLoop: function() {
+ return this.loops[this.loops.length - 1];
+ },
+ lastMessage: function() {
+ return this.messages[this.messages.length - 1];
+ },
+ lastNote: function() {
+ return this.notes[this.notes.length - 1];
+ },
+ actors: [],
+ boxes: [],
+ loops: [],
+ messages: [],
+ notes: []
+ },
+ init: function() {
+ this.sequenceItems = [];
+ this.activations = [];
+ this.models.clear();
+ this.data = {
+ startx: void 0,
+ stopx: void 0,
+ starty: void 0,
+ stopy: void 0
+ };
+ this.verticalPos = 0;
+ setConf((0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)());
+ },
+ updateVal: function(obj, key, val, fun) {
+ if (obj[key] === void 0) {
+ obj[key] = val;
+ } else {
+ obj[key] = fun(val, obj[key]);
+ }
+ },
+ updateBounds: function(startx, starty, stopx, stopy) {
+ const _self = this;
+ let cnt = 0;
+ function updateFn(type) {
+ return function updateItemBounds(item) {
+ cnt++;
+ const n = _self.sequenceItems.length - cnt + 1;
+ _self.updateVal(item, "starty", starty - n * conf.boxMargin, Math.min);
+ _self.updateVal(item, "stopy", stopy + n * conf.boxMargin, Math.max);
+ _self.updateVal(bounds.data, "startx", startx - n * conf.boxMargin, Math.min);
+ _self.updateVal(bounds.data, "stopx", stopx + n * conf.boxMargin, Math.max);
+ if (!(type === "activation")) {
+ _self.updateVal(item, "startx", startx - n * conf.boxMargin, Math.min);
+ _self.updateVal(item, "stopx", stopx + n * conf.boxMargin, Math.max);
+ _self.updateVal(bounds.data, "starty", starty - n * conf.boxMargin, Math.min);
+ _self.updateVal(bounds.data, "stopy", stopy + n * conf.boxMargin, Math.max);
+ }
+ };
+ }
+ this.sequenceItems.forEach(updateFn());
+ this.activations.forEach(updateFn("activation"));
+ },
+ insert: function(startx, starty, stopx, stopy) {
+ const _startx = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(startx, stopx);
+ const _stopx = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(startx, stopx);
+ const _starty = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(starty, stopy);
+ const _stopy = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(starty, stopy);
+ this.updateVal(bounds.data, "startx", _startx, Math.min);
+ this.updateVal(bounds.data, "starty", _starty, Math.min);
+ this.updateVal(bounds.data, "stopx", _stopx, Math.max);
+ this.updateVal(bounds.data, "stopy", _stopy, Math.max);
+ this.updateBounds(_startx, _starty, _stopx, _stopy);
+ },
+ newActivation: function(message, diagram2, actors) {
+ const actorRect = actors[message.from.actor];
+ const stackedSize = actorActivations(message.from.actor).length || 0;
+ const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
+ this.activations.push({
+ startx: x,
+ starty: this.verticalPos + 2,
+ stopx: x + conf.activationWidth,
+ stopy: void 0,
+ actor: message.from.actor,
+ anchored: svgDraw.anchorElement(diagram2)
+ });
+ },
+ endActivation: function(message) {
+ const lastActorActivationIdx = this.activations.map(function(activation) {
+ return activation.actor;
+ }).lastIndexOf(message.from.actor);
+ return this.activations.splice(lastActorActivationIdx, 1)[0];
+ },
+ createLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) {
+ return {
+ startx: void 0,
+ starty: this.verticalPos,
+ stopx: void 0,
+ stopy: void 0,
+ title: title.message,
+ wrap: title.wrap,
+ width: title.width,
+ height: 0,
+ fill
+ };
+ },
+ newLoop: function(title = { message: void 0, wrap: false, width: void 0 }, fill) {
+ this.sequenceItems.push(this.createLoop(title, fill));
+ },
+ endLoop: function() {
+ return this.sequenceItems.pop();
+ },
+ isLoopOverlap: function() {
+ return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : false;
+ },
+ addSectionToLoop: function(message) {
+ const loop = this.sequenceItems.pop();
+ loop.sections = loop.sections || [];
+ loop.sectionTitles = loop.sectionTitles || [];
+ loop.sections.push({ y: bounds.getVerticalPos(), height: 0 });
+ loop.sectionTitles.push(message);
+ this.sequenceItems.push(loop);
+ },
+ saveVerticalPos: function() {
+ if (this.isLoopOverlap()) {
+ this.savedVerticalPos = this.verticalPos;
+ }
+ },
+ resetVerticalPos: function() {
+ if (this.isLoopOverlap()) {
+ this.verticalPos = this.savedVerticalPos;
+ }
+ },
+ bumpVerticalPos: function(bump) {
+ this.verticalPos = this.verticalPos + bump;
+ this.data.stopy = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(this.data.stopy, this.verticalPos);
+ },
+ getVerticalPos: function() {
+ return this.verticalPos;
+ },
+ getBounds: function() {
+ return { bounds: this.data, models: this.models };
+ }
+};
+const drawNote = function(elem, noteModel) {
+ bounds.bumpVerticalPos(conf.boxMargin);
+ noteModel.height = conf.boxMargin;
+ noteModel.starty = bounds.getVerticalPos();
+ const rect = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.g)();
+ rect.x = noteModel.startx;
+ rect.y = noteModel.starty;
+ rect.width = noteModel.width || conf.width;
+ rect.class = "note";
+ const g = elem.append("g");
+ const rectElem = svgDraw.drawRect(g, rect);
+ const textObj = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.e)();
+ textObj.x = noteModel.startx;
+ textObj.y = noteModel.starty;
+ textObj.width = rect.width;
+ textObj.dy = "1em";
+ textObj.text = noteModel.message;
+ textObj.class = "noteText";
+ textObj.fontFamily = conf.noteFontFamily;
+ textObj.fontSize = conf.noteFontSize;
+ textObj.fontWeight = conf.noteFontWeight;
+ textObj.anchor = conf.noteAlign;
+ textObj.textMargin = conf.noteMargin;
+ textObj.valign = "center";
+ const textElem = drawText(g, textObj);
+ const textHeight = Math.round(
+ textElem.map((te) => (te._groups || te)[0][0].getBBox().height).reduce((acc, curr) => acc + curr)
+ );
+ rectElem.attr("height", textHeight + 2 * conf.noteMargin);
+ noteModel.height += textHeight + 2 * conf.noteMargin;
+ bounds.bumpVerticalPos(textHeight + 2 * conf.noteMargin);
+ noteModel.stopy = noteModel.starty + textHeight + 2 * conf.noteMargin;
+ noteModel.stopx = noteModel.startx + rect.width;
+ bounds.insert(noteModel.startx, noteModel.starty, noteModel.stopx, noteModel.stopy);
+ bounds.models.addNote(noteModel);
+};
+const messageFont = (cnf) => {
+ return {
+ fontFamily: cnf.messageFontFamily,
+ fontSize: cnf.messageFontSize,
+ fontWeight: cnf.messageFontWeight
+ };
+};
+const noteFont = (cnf) => {
+ return {
+ fontFamily: cnf.noteFontFamily,
+ fontSize: cnf.noteFontSize,
+ fontWeight: cnf.noteFontWeight
+ };
+};
+const actorFont = (cnf) => {
+ return {
+ fontFamily: cnf.actorFontFamily,
+ fontSize: cnf.actorFontSize,
+ fontWeight: cnf.actorFontWeight
+ };
+};
+function boundMessage(_diagram, msgModel) {
+ bounds.bumpVerticalPos(10);
+ const { startx, stopx, message } = msgModel;
+ const lines = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.splitBreaks(message).length;
+ const textDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(message, messageFont(conf));
+ const lineHeight = textDims.height / lines;
+ msgModel.height += lineHeight;
+ bounds.bumpVerticalPos(lineHeight);
+ let lineStartY;
+ let totalOffset = textDims.height - 10;
+ const textWidth = textDims.width;
+ if (startx === stopx) {
+ lineStartY = bounds.getVerticalPos() + totalOffset;
+ if (!conf.rightAngles) {
+ totalOffset += conf.boxMargin;
+ lineStartY = bounds.getVerticalPos() + totalOffset;
+ }
+ totalOffset += 30;
+ const dx = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(textWidth / 2, conf.width / 2);
+ bounds.insert(
+ startx - dx,
+ bounds.getVerticalPos() - 10 + totalOffset,
+ stopx + dx,
+ bounds.getVerticalPos() + 30 + totalOffset
+ );
+ } else {
+ totalOffset += conf.boxMargin;
+ lineStartY = bounds.getVerticalPos() + totalOffset;
+ bounds.insert(startx, lineStartY - 10, stopx, lineStartY);
+ }
+ bounds.bumpVerticalPos(totalOffset);
+ msgModel.height += totalOffset;
+ msgModel.stopy = msgModel.starty + msgModel.height;
+ bounds.insert(msgModel.fromBounds, msgModel.starty, msgModel.toBounds, msgModel.stopy);
+ return lineStartY;
+}
+const drawMessage = function(diagram2, msgModel, lineStartY, diagObj) {
+ const { startx, stopx, starty, message, type, sequenceIndex, sequenceVisible } = msgModel;
+ const textDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(message, messageFont(conf));
+ const textObj = (0,_svgDrawCommon_92a8ff2b_js__WEBPACK_IMPORTED_MODULE_5__.e)();
+ textObj.x = startx;
+ textObj.y = starty + 10;
+ textObj.width = stopx - startx;
+ textObj.class = "messageText";
+ textObj.dy = "1em";
+ textObj.text = message;
+ textObj.fontFamily = conf.messageFontFamily;
+ textObj.fontSize = conf.messageFontSize;
+ textObj.fontWeight = conf.messageFontWeight;
+ textObj.anchor = conf.messageAlign;
+ textObj.valign = "center";
+ textObj.textMargin = conf.wrapPadding;
+ textObj.tspan = false;
+ drawText(diagram2, textObj);
+ const textWidth = textDims.width;
+ let line;
+ if (startx === stopx) {
+ if (conf.rightAngles) {
+ line = diagram2.append("path").attr(
+ "d",
+ `M ${startx},${lineStartY} H ${startx + _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width / 2, textWidth / 2)} V ${lineStartY + 25} H ${startx}`
+ );
+ } else {
+ line = diagram2.append("path").attr(
+ "d",
+ "M " + startx + "," + lineStartY + " C " + (startx + 60) + "," + (lineStartY - 10) + " " + (startx + 60) + "," + (lineStartY + 30) + " " + startx + "," + (lineStartY + 20)
+ );
+ }
+ } else {
+ line = diagram2.append("line");
+ line.attr("x1", startx);
+ line.attr("y1", lineStartY);
+ line.attr("x2", stopx);
+ line.attr("y2", lineStartY);
+ }
+ if (type === diagObj.db.LINETYPE.DOTTED || type === diagObj.db.LINETYPE.DOTTED_CROSS || type === diagObj.db.LINETYPE.DOTTED_POINT || type === diagObj.db.LINETYPE.DOTTED_OPEN) {
+ line.style("stroke-dasharray", "3, 3");
+ line.attr("class", "messageLine1");
+ } else {
+ line.attr("class", "messageLine0");
+ }
+ let url = "";
+ if (conf.arrowMarkerAbsolute) {
+ url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
+ url = url.replace(/\(/g, "\\(");
+ url = url.replace(/\)/g, "\\)");
+ }
+ line.attr("stroke-width", 2);
+ line.attr("stroke", "none");
+ line.style("fill", "none");
+ if (type === diagObj.db.LINETYPE.SOLID || type === diagObj.db.LINETYPE.DOTTED) {
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
+ }
+ if (type === diagObj.db.LINETYPE.SOLID_POINT || type === diagObj.db.LINETYPE.DOTTED_POINT) {
+ line.attr("marker-end", "url(" + url + "#filled-head)");
+ }
+ if (type === diagObj.db.LINETYPE.SOLID_CROSS || type === diagObj.db.LINETYPE.DOTTED_CROSS) {
+ line.attr("marker-end", "url(" + url + "#crosshead)");
+ }
+ if (sequenceVisible || conf.showSequenceNumbers) {
+ line.attr("marker-start", "url(" + url + "#sequencenumber)");
+ diagram2.append("text").attr("x", startx).attr("y", lineStartY + 4).attr("font-family", "sans-serif").attr("font-size", "12px").attr("text-anchor", "middle").attr("class", "sequenceNumber").text(sequenceIndex);
+ }
+};
+const addActorRenderingData = function(diagram2, actors, createdActors, actorKeys, verticalPos, messages, isFooter) {
+ let prevWidth = 0;
+ let prevMargin = 0;
+ let prevBox = void 0;
+ let maxHeight = 0;
+ for (const actorKey of actorKeys) {
+ const actor = actors[actorKey];
+ const box = actor.box;
+ if (prevBox && prevBox != box) {
+ if (!isFooter) {
+ bounds.models.addBox(prevBox);
+ }
+ prevMargin += conf.boxMargin + prevBox.margin;
+ }
+ if (box && box != prevBox) {
+ if (!isFooter) {
+ box.x = prevWidth + prevMargin;
+ box.y = verticalPos;
+ }
+ prevMargin += box.margin;
+ }
+ actor.width = actor.width || conf.width;
+ actor.height = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actor.height || conf.height, conf.height);
+ actor.margin = actor.margin || conf.actorMargin;
+ maxHeight = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, actor.height);
+ if (createdActors[actor.name]) {
+ prevMargin += actor.width / 2;
+ }
+ actor.x = prevWidth + prevMargin;
+ actor.starty = bounds.getVerticalPos();
+ bounds.insert(actor.x, verticalPos, actor.x + actor.width, actor.height);
+ prevWidth += actor.width + prevMargin;
+ if (actor.box) {
+ actor.box.width = prevWidth + box.margin - actor.box.x;
+ }
+ prevMargin = actor.margin;
+ prevBox = actor.box;
+ bounds.models.addActor(actor);
+ }
+ if (prevBox && !isFooter) {
+ bounds.models.addBox(prevBox);
+ }
+ bounds.bumpVerticalPos(maxHeight);
+};
+const drawActors = function(diagram2, actors, actorKeys, isFooter) {
+ if (!isFooter) {
+ for (const actorKey of actorKeys) {
+ const actor = actors[actorKey];
+ svgDraw.drawActor(diagram2, actor, conf, false);
+ }
+ } else {
+ let maxHeight = 0;
+ bounds.bumpVerticalPos(conf.boxMargin * 2);
+ for (const actorKey of actorKeys) {
+ const actor = actors[actorKey];
+ if (!actor.stopy) {
+ actor.stopy = bounds.getVerticalPos();
+ }
+ const height = svgDraw.drawActor(diagram2, actor, conf, true);
+ maxHeight = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, height);
+ }
+ bounds.bumpVerticalPos(maxHeight + conf.boxMargin);
+ }
+};
+const drawActorsPopup = function(diagram2, actors, actorKeys, doc) {
+ let maxHeight = 0;
+ let maxWidth = 0;
+ for (const actorKey of actorKeys) {
+ const actor = actors[actorKey];
+ const minMenuWidth = getRequiredPopupWidth(actor);
+ const menuDimensions = svgDraw.drawPopup(
+ diagram2,
+ actor,
+ minMenuWidth,
+ conf,
+ conf.forceMenus,
+ doc
+ );
+ if (menuDimensions.height > maxHeight) {
+ maxHeight = menuDimensions.height;
+ }
+ if (menuDimensions.width + actor.x > maxWidth) {
+ maxWidth = menuDimensions.width + actor.x;
+ }
+ }
+ return { maxHeight, maxWidth };
+};
+const setConf = function(cnf) {
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.f)(conf, cnf);
+ if (cnf.fontFamily) {
+ conf.actorFontFamily = conf.noteFontFamily = conf.messageFontFamily = cnf.fontFamily;
+ }
+ if (cnf.fontSize) {
+ conf.actorFontSize = conf.noteFontSize = conf.messageFontSize = cnf.fontSize;
+ }
+ if (cnf.fontWeight) {
+ conf.actorFontWeight = conf.noteFontWeight = conf.messageFontWeight = cnf.fontWeight;
+ }
+};
+const actorActivations = function(actor) {
+ return bounds.activations.filter(function(activation) {
+ return activation.actor === actor;
+ });
+};
+const activationBounds = function(actor, actors) {
+ const actorObj = actors[actor];
+ const activations = actorActivations(actor);
+ const left = activations.reduce(function(acc, activation) {
+ return _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(acc, activation.startx);
+ }, actorObj.x + actorObj.width / 2 - 1);
+ const right = activations.reduce(function(acc, activation) {
+ return _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(acc, activation.stopx);
+ }, actorObj.x + actorObj.width / 2 + 1);
+ return [left, right];
+};
+function adjustLoopHeightForWrap(loopWidths, msg, preMargin, postMargin, addLoopFn) {
+ bounds.bumpVerticalPos(preMargin);
+ let heightAdjust = postMargin;
+ if (msg.id && msg.message && loopWidths[msg.id]) {
+ const loopWidth = loopWidths[msg.id].width;
+ const textConf = messageFont(conf);
+ msg.message = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(`[${msg.message}]`, loopWidth - 2 * conf.wrapPadding, textConf);
+ msg.width = loopWidth;
+ msg.wrap = true;
+ const textDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(msg.message, textConf);
+ const totalOffset = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(textDims.height, conf.labelBoxHeight);
+ heightAdjust = postMargin + totalOffset;
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`${totalOffset} - ${msg.message}`);
+ }
+ addLoopFn(msg);
+ bounds.bumpVerticalPos(heightAdjust);
+}
+function adjustCreatedDestroyedData(msg, msgModel, lineStartY, index, actors, createdActors, destroyedActors) {
+ function receiverAdjustment(actor, adjustment) {
+ if (actor.x < actors[msg.from].x) {
+ bounds.insert(
+ msgModel.stopx - adjustment,
+ msgModel.starty,
+ msgModel.startx,
+ msgModel.stopy + actor.height / 2 + conf.noteMargin
+ );
+ msgModel.stopx = msgModel.stopx + adjustment;
+ } else {
+ bounds.insert(
+ msgModel.startx,
+ msgModel.starty,
+ msgModel.stopx + adjustment,
+ msgModel.stopy + actor.height / 2 + conf.noteMargin
+ );
+ msgModel.stopx = msgModel.stopx - adjustment;
+ }
+ }
+ function senderAdjustment(actor, adjustment) {
+ if (actor.x < actors[msg.to].x) {
+ bounds.insert(
+ msgModel.startx - adjustment,
+ msgModel.starty,
+ msgModel.stopx,
+ msgModel.stopy + actor.height / 2 + conf.noteMargin
+ );
+ msgModel.startx = msgModel.startx + adjustment;
+ } else {
+ bounds.insert(
+ msgModel.stopx,
+ msgModel.starty,
+ msgModel.startx + adjustment,
+ msgModel.stopy + actor.height / 2 + conf.noteMargin
+ );
+ msgModel.startx = msgModel.startx - adjustment;
+ }
+ }
+ if (createdActors[msg.to] == index) {
+ const actor = actors[msg.to];
+ const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;
+ receiverAdjustment(actor, adjustment);
+ actor.starty = lineStartY - actor.height / 2;
+ bounds.bumpVerticalPos(actor.height / 2);
+ } else if (destroyedActors[msg.from] == index) {
+ const actor = actors[msg.from];
+ if (conf.mirrorActors) {
+ const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 : actor.width / 2;
+ senderAdjustment(actor, adjustment);
+ }
+ actor.stopy = lineStartY - actor.height / 2;
+ bounds.bumpVerticalPos(actor.height / 2);
+ } else if (destroyedActors[msg.to] == index) {
+ const actor = actors[msg.to];
+ if (conf.mirrorActors) {
+ const adjustment = actor.type == "actor" ? ACTOR_TYPE_WIDTH / 2 + 3 : actor.width / 2 + 3;
+ receiverAdjustment(actor, adjustment);
+ }
+ actor.stopy = lineStartY - actor.height / 2;
+ bounds.bumpVerticalPos(actor.height / 2);
+ }
+}
+const draw = function(_text, id, _version, diagObj) {
+ const { securityLevel, sequence } = (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.c)();
+ conf = sequence;
+ let sandboxElement;
+ if (securityLevel === "sandbox") {
+ sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("#i" + id);
+ }
+ const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)("body");
+ const doc = securityLevel === "sandbox" ? sandboxElement.nodes()[0].contentDocument : document;
+ bounds.init();
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(diagObj.db);
+ const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_0__/* .select */ .Ys)(`[id="${id}"]`);
+ const actors = diagObj.db.getActors();
+ const createdActors = diagObj.db.getCreatedActors();
+ const destroyedActors = diagObj.db.getDestroyedActors();
+ const boxes = diagObj.db.getBoxes();
+ let actorKeys = diagObj.db.getActorKeys();
+ const messages = diagObj.db.getMessages();
+ const title = diagObj.db.getDiagramTitle();
+ const hasBoxes = diagObj.db.hasAtLeastOneBox();
+ const hasBoxTitles = diagObj.db.hasAtLeastOneBoxWithTitle();
+ const maxMessageWidthPerActor = getMaxMessageWidthPerActor(actors, messages, diagObj);
+ conf.height = calculateActorMargins(actors, maxMessageWidthPerActor, boxes);
+ svgDraw.insertComputerIcon(diagram2);
+ svgDraw.insertDatabaseIcon(diagram2);
+ svgDraw.insertClockIcon(diagram2);
+ if (hasBoxes) {
+ bounds.bumpVerticalPos(conf.boxMargin);
+ if (hasBoxTitles) {
+ bounds.bumpVerticalPos(boxes[0].textMaxHeight);
+ }
+ }
+ if (conf.hideUnusedParticipants === true) {
+ const newActors = /* @__PURE__ */ new Set();
+ messages.forEach((message) => {
+ newActors.add(message.from);
+ newActors.add(message.to);
+ });
+ actorKeys = actorKeys.filter((actorKey) => newActors.has(actorKey));
+ }
+ addActorRenderingData(diagram2, actors, createdActors, actorKeys, 0, messages, false);
+ const loopWidths = calculateLoopBounds(messages, actors, maxMessageWidthPerActor, diagObj);
+ svgDraw.insertArrowHead(diagram2);
+ svgDraw.insertArrowCrossHead(diagram2);
+ svgDraw.insertArrowFilledHead(diagram2);
+ svgDraw.insertSequenceNumber(diagram2);
+ function activeEnd(msg, verticalPos) {
+ const activationData = bounds.endActivation(msg);
+ if (activationData.starty + 18 > verticalPos) {
+ activationData.starty = verticalPos - 6;
+ verticalPos += 12;
+ }
+ svgDraw.drawActivation(
+ diagram2,
+ activationData,
+ verticalPos,
+ conf,
+ actorActivations(msg.from.actor).length
+ );
+ bounds.insert(activationData.startx, verticalPos - 10, activationData.stopx, verticalPos);
+ }
+ let sequenceIndex = 1;
+ let sequenceIndexStep = 1;
+ const messagesToDraw = [];
+ const backgrounds = [];
+ messages.forEach(function(msg, index) {
+ let loopModel, noteModel, msgModel;
+ switch (msg.type) {
+ case diagObj.db.LINETYPE.NOTE:
+ bounds.resetVerticalPos();
+ noteModel = msg.noteModel;
+ drawNote(diagram2, noteModel);
+ break;
+ case diagObj.db.LINETYPE.ACTIVE_START:
+ bounds.newActivation(msg, diagram2, actors);
+ break;
+ case diagObj.db.LINETYPE.ACTIVE_END:
+ activeEnd(msg, bounds.getVerticalPos());
+ break;
+ case diagObj.db.LINETYPE.LOOP_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.LOOP_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "loop", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.RECT_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin,
+ (message) => bounds.newLoop(void 0, message.message)
+ );
+ break;
+ case diagObj.db.LINETYPE.RECT_END:
+ loopModel = bounds.endLoop();
+ backgrounds.push(loopModel);
+ bounds.models.addLoop(loopModel);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ break;
+ case diagObj.db.LINETYPE.OPT_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.OPT_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "opt", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.ALT_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.ALT_ELSE:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin + conf.boxTextMargin,
+ conf.boxMargin,
+ (message) => bounds.addSectionToLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.ALT_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "alt", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.PAR_START:
+ case diagObj.db.LINETYPE.PAR_OVER_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ bounds.saveVerticalPos();
+ break;
+ case diagObj.db.LINETYPE.PAR_AND:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin + conf.boxTextMargin,
+ conf.boxMargin,
+ (message) => bounds.addSectionToLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.PAR_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "par", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.AUTONUMBER:
+ sequenceIndex = msg.message.start || sequenceIndex;
+ sequenceIndexStep = msg.message.step || sequenceIndexStep;
+ if (msg.message.visible) {
+ diagObj.db.enableSequenceNumbers();
+ } else {
+ diagObj.db.disableSequenceNumbers();
+ }
+ break;
+ case diagObj.db.LINETYPE.CRITICAL_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.CRITICAL_OPTION:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin + conf.boxTextMargin,
+ conf.boxMargin,
+ (message) => bounds.addSectionToLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.CRITICAL_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "critical", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ case diagObj.db.LINETYPE.BREAK_START:
+ adjustLoopHeightForWrap(
+ loopWidths,
+ msg,
+ conf.boxMargin,
+ conf.boxMargin + conf.boxTextMargin,
+ (message) => bounds.newLoop(message)
+ );
+ break;
+ case diagObj.db.LINETYPE.BREAK_END:
+ loopModel = bounds.endLoop();
+ svgDraw.drawLoop(diagram2, loopModel, "break", conf);
+ bounds.bumpVerticalPos(loopModel.stopy - bounds.getVerticalPos());
+ bounds.models.addLoop(loopModel);
+ break;
+ default:
+ try {
+ msgModel = msg.msgModel;
+ msgModel.starty = bounds.getVerticalPos();
+ msgModel.sequenceIndex = sequenceIndex;
+ msgModel.sequenceVisible = diagObj.db.showSequenceNumbers();
+ const lineStartY = boundMessage(diagram2, msgModel);
+ adjustCreatedDestroyedData(
+ msg,
+ msgModel,
+ lineStartY,
+ index,
+ actors,
+ createdActors,
+ destroyedActors
+ );
+ messagesToDraw.push({ messageModel: msgModel, lineStartY });
+ bounds.models.addMessage(msgModel);
+ } catch (e) {
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.error("error while drawing message", e);
+ }
+ }
+ if ([
+ diagObj.db.LINETYPE.SOLID_OPEN,
+ diagObj.db.LINETYPE.DOTTED_OPEN,
+ diagObj.db.LINETYPE.SOLID,
+ diagObj.db.LINETYPE.DOTTED,
+ diagObj.db.LINETYPE.SOLID_CROSS,
+ diagObj.db.LINETYPE.DOTTED_CROSS,
+ diagObj.db.LINETYPE.SOLID_POINT,
+ diagObj.db.LINETYPE.DOTTED_POINT
+ ].includes(msg.type)) {
+ sequenceIndex = sequenceIndex + sequenceIndexStep;
+ }
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("createdActors", createdActors);
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("destroyedActors", destroyedActors);
+ drawActors(diagram2, actors, actorKeys, false);
+ messagesToDraw.forEach((e) => drawMessage(diagram2, e.messageModel, e.lineStartY, diagObj));
+ if (conf.mirrorActors) {
+ drawActors(diagram2, actors, actorKeys, true);
+ }
+ backgrounds.forEach((e) => svgDraw.drawBackgroundRect(diagram2, e));
+ fixLifeLineHeights(diagram2, actors, actorKeys, conf);
+ bounds.models.boxes.forEach(function(box2) {
+ box2.height = bounds.getVerticalPos() - box2.y;
+ bounds.insert(box2.x, box2.y, box2.x + box2.width, box2.height);
+ box2.startx = box2.x;
+ box2.starty = box2.y;
+ box2.stopx = box2.startx + box2.width;
+ box2.stopy = box2.starty + box2.height;
+ box2.stroke = "rgb(0,0,0, 0.5)";
+ svgDraw.drawBox(diagram2, box2, conf);
+ });
+ if (hasBoxes) {
+ bounds.bumpVerticalPos(conf.boxMargin);
+ }
+ const requiredBoxSize = drawActorsPopup(diagram2, actors, actorKeys, doc);
+ const { bounds: box } = bounds.getBounds();
+ let boxHeight = box.stopy - box.starty;
+ if (boxHeight < requiredBoxSize.maxHeight) {
+ boxHeight = requiredBoxSize.maxHeight;
+ }
+ let height = boxHeight + 2 * conf.diagramMarginY;
+ if (conf.mirrorActors) {
+ height = height - conf.boxMargin + conf.bottomMarginAdj;
+ }
+ let boxWidth = box.stopx - box.startx;
+ if (boxWidth < requiredBoxSize.maxWidth) {
+ boxWidth = requiredBoxSize.maxWidth;
+ }
+ const width = boxWidth + 2 * conf.diagramMarginX;
+ if (title) {
+ diagram2.append("text").text(title).attr("x", (box.stopx - box.startx) / 2 - 2 * conf.diagramMarginX).attr("y", -25);
+ }
+ (0,_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.i)(diagram2, height, width, conf.useMaxWidth);
+ const extraVertForTitle = title ? 40 : 0;
+ diagram2.attr(
+ "viewBox",
+ box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)
+ );
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(`models:`, bounds.models);
+};
+function getMaxMessageWidthPerActor(actors, messages, diagObj) {
+ const maxMessageWidthPerActor = {};
+ messages.forEach(function(msg) {
+ if (actors[msg.to] && actors[msg.from]) {
+ const actor = actors[msg.to];
+ if (msg.placement === diagObj.db.PLACEMENT.LEFTOF && !actor.prevActor) {
+ return;
+ }
+ if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF && !actor.nextActor) {
+ return;
+ }
+ const isNote = msg.placement !== void 0;
+ const isMessage = !isNote;
+ const textFont = isNote ? noteFont(conf) : messageFont(conf);
+ const wrappedMessage = msg.wrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(msg.message, conf.width - 2 * conf.wrapPadding, textFont) : msg.message;
+ const messageDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(wrappedMessage, textFont);
+ const messageWidth = messageDimensions.width + 2 * conf.wrapPadding;
+ if (isMessage && msg.from === actor.nextActor) {
+ maxMessageWidthPerActor[msg.to] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.to] || 0,
+ messageWidth
+ );
+ } else if (isMessage && msg.from === actor.prevActor) {
+ maxMessageWidthPerActor[msg.from] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.from] || 0,
+ messageWidth
+ );
+ } else if (isMessage && msg.from === msg.to) {
+ maxMessageWidthPerActor[msg.from] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.from] || 0,
+ messageWidth / 2
+ );
+ maxMessageWidthPerActor[msg.to] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.to] || 0,
+ messageWidth / 2
+ );
+ } else if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {
+ maxMessageWidthPerActor[msg.from] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.from] || 0,
+ messageWidth
+ );
+ } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {
+ maxMessageWidthPerActor[actor.prevActor] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[actor.prevActor] || 0,
+ messageWidth
+ );
+ } else if (msg.placement === diagObj.db.PLACEMENT.OVER) {
+ if (actor.prevActor) {
+ maxMessageWidthPerActor[actor.prevActor] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[actor.prevActor] || 0,
+ messageWidth / 2
+ );
+ }
+ if (actor.nextActor) {
+ maxMessageWidthPerActor[msg.from] = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ maxMessageWidthPerActor[msg.from] || 0,
+ messageWidth / 2
+ );
+ }
+ }
+ }
+ });
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("maxMessageWidthPerActor:", maxMessageWidthPerActor);
+ return maxMessageWidthPerActor;
+}
+const getRequiredPopupWidth = function(actor) {
+ let requiredPopupWidth = 0;
+ const textFont = actorFont(conf);
+ for (const key in actor.links) {
+ const labelDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(key, textFont);
+ const labelWidth = labelDimensions.width + 2 * conf.wrapPadding + 2 * conf.boxMargin;
+ if (requiredPopupWidth < labelWidth) {
+ requiredPopupWidth = labelWidth;
+ }
+ }
+ return requiredPopupWidth;
+};
+function calculateActorMargins(actors, actorToMessageWidth, boxes) {
+ let maxHeight = 0;
+ Object.keys(actors).forEach((prop) => {
+ const actor = actors[prop];
+ if (actor.wrap) {
+ actor.description = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(
+ actor.description,
+ conf.width - 2 * conf.wrapPadding,
+ actorFont(conf)
+ );
+ }
+ const actDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(actor.description, actorFont(conf));
+ actor.width = actor.wrap ? conf.width : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actDims.width + 2 * conf.wrapPadding);
+ actor.height = actor.wrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actDims.height, conf.height) : conf.height;
+ maxHeight = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, actor.height);
+ });
+ for (const actorKey in actorToMessageWidth) {
+ const actor = actors[actorKey];
+ if (!actor) {
+ continue;
+ }
+ const nextActor = actors[actor.nextActor];
+ if (!nextActor) {
+ const messageWidth2 = actorToMessageWidth[actorKey];
+ const actorWidth2 = messageWidth2 + conf.actorMargin - actor.width / 2;
+ actor.margin = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actorWidth2, conf.actorMargin);
+ continue;
+ }
+ const messageWidth = actorToMessageWidth[actorKey];
+ const actorWidth = messageWidth + conf.actorMargin - actor.width / 2 - nextActor.width / 2;
+ actor.margin = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(actorWidth, conf.actorMargin);
+ }
+ let maxBoxHeight = 0;
+ boxes.forEach((box) => {
+ const textFont = messageFont(conf);
+ let totalWidth = box.actorKeys.reduce((total, aKey) => {
+ return total += actors[aKey].width + (actors[aKey].margin || 0);
+ }, 0);
+ totalWidth -= 2 * conf.boxTextMargin;
+ if (box.wrap) {
+ box.name = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(box.name, totalWidth - 2 * conf.wrapPadding, textFont);
+ }
+ const boxMsgDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(box.name, textFont);
+ maxBoxHeight = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(boxMsgDimensions.height, maxBoxHeight);
+ const minWidth = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(totalWidth, boxMsgDimensions.width + 2 * conf.wrapPadding);
+ box.margin = conf.boxTextMargin;
+ if (totalWidth < minWidth) {
+ const missing = (minWidth - totalWidth) / 2;
+ box.margin += missing;
+ }
+ });
+ boxes.forEach((box) => box.textMaxHeight = maxBoxHeight);
+ return _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(maxHeight, conf.height);
+}
+const buildNoteModel = function(msg, actors, diagObj) {
+ const startx = actors[msg.from].x;
+ const stopx = actors[msg.to].x;
+ const shouldWrap = msg.wrap && msg.message;
+ let textDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(
+ shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(msg.message, conf.width, noteFont(conf)) : msg.message,
+ noteFont(conf)
+ );
+ const noteModel = {
+ width: shouldWrap ? conf.width : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin),
+ height: 0,
+ startx: actors[msg.from].x,
+ stopx: 0,
+ starty: 0,
+ stopy: 0,
+ message: msg.message
+ };
+ if (msg.placement === diagObj.db.PLACEMENT.RIGHTOF) {
+ noteModel.width = shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width) : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ actors[msg.from].width / 2 + actors[msg.to].width / 2,
+ textDimensions.width + 2 * conf.noteMargin
+ );
+ noteModel.startx = startx + (actors[msg.from].width + conf.actorMargin) / 2;
+ } else if (msg.placement === diagObj.db.PLACEMENT.LEFTOF) {
+ noteModel.width = shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, textDimensions.width + 2 * conf.noteMargin) : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ actors[msg.from].width / 2 + actors[msg.to].width / 2,
+ textDimensions.width + 2 * conf.noteMargin
+ );
+ noteModel.startx = startx - noteModel.width + (actors[msg.from].width - conf.actorMargin) / 2;
+ } else if (msg.to === msg.from) {
+ textDimensions = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(
+ shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(
+ msg.message,
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actors[msg.from].width),
+ noteFont(conf)
+ ) : msg.message,
+ noteFont(conf)
+ );
+ noteModel.width = shouldWrap ? _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(conf.width, actors[msg.from].width) : _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ actors[msg.from].width,
+ conf.width,
+ textDimensions.width + 2 * conf.noteMargin
+ );
+ noteModel.startx = startx + (actors[msg.from].width - noteModel.width) / 2;
+ } else {
+ noteModel.width = Math.abs(startx + actors[msg.from].width / 2 - (stopx + actors[msg.to].width / 2)) + conf.actorMargin;
+ noteModel.startx = startx < stopx ? startx + actors[msg.from].width / 2 - conf.actorMargin / 2 : stopx + actors[msg.to].width / 2 - conf.actorMargin / 2;
+ }
+ if (shouldWrap) {
+ noteModel.message = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(
+ msg.message,
+ noteModel.width - 2 * conf.wrapPadding,
+ noteFont(conf)
+ );
+ }
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug(
+ `NM:[${noteModel.startx},${noteModel.stopx},${noteModel.starty},${noteModel.stopy}:${noteModel.width},${noteModel.height}=${msg.message}]`
+ );
+ return noteModel;
+};
+const buildMessageModel = function(msg, actors, diagObj) {
+ if (![
+ diagObj.db.LINETYPE.SOLID_OPEN,
+ diagObj.db.LINETYPE.DOTTED_OPEN,
+ diagObj.db.LINETYPE.SOLID,
+ diagObj.db.LINETYPE.DOTTED,
+ diagObj.db.LINETYPE.SOLID_CROSS,
+ diagObj.db.LINETYPE.DOTTED_CROSS,
+ diagObj.db.LINETYPE.SOLID_POINT,
+ diagObj.db.LINETYPE.DOTTED_POINT
+ ].includes(msg.type)) {
+ return {};
+ }
+ const [fromLeft, fromRight] = activationBounds(msg.from, actors);
+ const [toLeft, toRight] = activationBounds(msg.to, actors);
+ const isArrowToRight = fromLeft <= toLeft;
+ const startx = isArrowToRight ? fromRight : fromLeft;
+ let stopx = isArrowToRight ? toLeft : toRight;
+ const isArrowToActivation = Math.abs(toLeft - toRight) > 2;
+ const adjustValue = (value) => {
+ return isArrowToRight ? -value : value;
+ };
+ if (msg.from === msg.to) {
+ stopx = startx;
+ } else {
+ if (msg.activate && !isArrowToActivation) {
+ stopx += adjustValue(conf.activationWidth / 2 - 1);
+ }
+ if (![diagObj.db.LINETYPE.SOLID_OPEN, diagObj.db.LINETYPE.DOTTED_OPEN].includes(msg.type)) {
+ stopx += adjustValue(3);
+ }
+ }
+ const allBounds = [fromLeft, fromRight, toLeft, toRight];
+ const boundedWidth = Math.abs(startx - stopx);
+ if (msg.wrap && msg.message) {
+ msg.message = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.wrapLabel(
+ msg.message,
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(boundedWidth + 2 * conf.wrapPadding, conf.width),
+ messageFont(conf)
+ );
+ }
+ const msgDims = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.calculateTextDimensions(msg.message, messageFont(conf));
+ return {
+ width: _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ msg.wrap ? 0 : msgDims.width + 2 * conf.wrapPadding,
+ boundedWidth + 2 * conf.wrapPadding,
+ conf.width
+ ),
+ height: 0,
+ startx,
+ stopx,
+ starty: 0,
+ stopy: 0,
+ message: msg.message,
+ type: msg.type,
+ wrap: msg.wrap,
+ fromBounds: Math.min.apply(null, allBounds),
+ toBounds: Math.max.apply(null, allBounds)
+ };
+};
+const calculateLoopBounds = function(messages, actors, _maxWidthPerActor, diagObj) {
+ const loops = {};
+ const stack = [];
+ let current, noteModel, msgModel;
+ messages.forEach(function(msg) {
+ msg.id = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.u.random({ length: 10 });
+ switch (msg.type) {
+ case diagObj.db.LINETYPE.LOOP_START:
+ case diagObj.db.LINETYPE.ALT_START:
+ case diagObj.db.LINETYPE.OPT_START:
+ case diagObj.db.LINETYPE.PAR_START:
+ case diagObj.db.LINETYPE.PAR_OVER_START:
+ case diagObj.db.LINETYPE.CRITICAL_START:
+ case diagObj.db.LINETYPE.BREAK_START:
+ stack.push({
+ id: msg.id,
+ msg: msg.message,
+ from: Number.MAX_SAFE_INTEGER,
+ to: Number.MIN_SAFE_INTEGER,
+ width: 0
+ });
+ break;
+ case diagObj.db.LINETYPE.ALT_ELSE:
+ case diagObj.db.LINETYPE.PAR_AND:
+ case diagObj.db.LINETYPE.CRITICAL_OPTION:
+ if (msg.message) {
+ current = stack.pop();
+ loops[current.id] = current;
+ loops[msg.id] = current;
+ stack.push(current);
+ }
+ break;
+ case diagObj.db.LINETYPE.LOOP_END:
+ case diagObj.db.LINETYPE.ALT_END:
+ case diagObj.db.LINETYPE.OPT_END:
+ case diagObj.db.LINETYPE.PAR_END:
+ case diagObj.db.LINETYPE.CRITICAL_END:
+ case diagObj.db.LINETYPE.BREAK_END:
+ current = stack.pop();
+ loops[current.id] = current;
+ break;
+ case diagObj.db.LINETYPE.ACTIVE_START:
+ {
+ const actorRect = actors[msg.from ? msg.from.actor : msg.to.actor];
+ const stackedSize = actorActivations(msg.from ? msg.from.actor : msg.to.actor).length;
+ const x = actorRect.x + actorRect.width / 2 + (stackedSize - 1) * conf.activationWidth / 2;
+ const toAdd = {
+ startx: x,
+ stopx: x + conf.activationWidth,
+ actor: msg.from.actor,
+ enabled: true
+ };
+ bounds.activations.push(toAdd);
+ }
+ break;
+ case diagObj.db.LINETYPE.ACTIVE_END:
+ {
+ const lastActorActivationIdx = bounds.activations.map((a) => a.actor).lastIndexOf(msg.from.actor);
+ delete bounds.activations.splice(lastActorActivationIdx, 1)[0];
+ }
+ break;
+ }
+ const isNote = msg.placement !== void 0;
+ if (isNote) {
+ noteModel = buildNoteModel(msg, actors, diagObj);
+ msg.noteModel = noteModel;
+ stack.forEach((stk) => {
+ current = stk;
+ current.from = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(current.from, noteModel.startx);
+ current.to = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.to, noteModel.startx + noteModel.width);
+ current.width = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, Math.abs(current.from - current.to)) - conf.labelBoxWidth;
+ });
+ } else {
+ msgModel = buildMessageModel(msg, actors, diagObj);
+ msg.msgModel = msgModel;
+ if (msgModel.startx && msgModel.stopx && stack.length > 0) {
+ stack.forEach((stk) => {
+ current = stk;
+ if (msgModel.startx === msgModel.stopx) {
+ const from = actors[msg.from];
+ const to = actors[msg.to];
+ current.from = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(
+ from.x - msgModel.width / 2,
+ from.x - from.width / 2,
+ current.from
+ );
+ current.to = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(
+ to.x + msgModel.width / 2,
+ to.x + from.width / 2,
+ current.to
+ );
+ current.width = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, Math.abs(current.to - current.from)) - conf.labelBoxWidth;
+ } else {
+ current.from = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMin(msgModel.startx, current.from);
+ current.to = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(msgModel.stopx, current.to);
+ current.width = _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.e.getMax(current.width, msgModel.width) - conf.labelBoxWidth;
+ }
+ });
+ }
+ }
+ });
+ bounds.activations = [];
+ _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_4__.l.debug("Loop type widths:", loops);
+ return loops;
+};
+const renderer = {
+ bounds,
+ drawActors,
+ drawActorsPopup,
+ setConf,
+ draw
+};
+const diagram = {
+ parser: parser$1,
+ db,
+ renderer,
+ styles,
+ init: ({ wrap }) => {
+ db.setWrap(wrap);
+ }
+};
+
+
+
+/***/ }),
+
+/***/ 72015:
+/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
+
+/* harmony export */ __webpack_require__.d(__webpack_exports__, {
+/* harmony export */ a: () => (/* binding */ drawBackgroundRect),
+/* harmony export */ b: () => (/* binding */ drawEmbeddedImage),
+/* harmony export */ c: () => (/* binding */ drawImage),
+/* harmony export */ d: () => (/* binding */ drawRect),
+/* harmony export */ e: () => (/* binding */ getTextObj),
+/* harmony export */ f: () => (/* binding */ drawText),
+/* harmony export */ g: () => (/* binding */ getNoteRect)
+/* harmony export */ });
+/* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17967);
+/* harmony import */ var _mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76365);
+
+
+const drawRect = (element, rectData) => {
+ const rectElement = element.append("rect");
+ rectElement.attr("x", rectData.x);
+ rectElement.attr("y", rectData.y);
+ rectElement.attr("fill", rectData.fill);
+ rectElement.attr("stroke", rectData.stroke);
+ rectElement.attr("width", rectData.width);
+ rectElement.attr("height", rectData.height);
+ rectData.rx !== void 0 && rectElement.attr("rx", rectData.rx);
+ rectData.ry !== void 0 && rectElement.attr("ry", rectData.ry);
+ if (rectData.attrs !== void 0) {
+ for (const attrKey in rectData.attrs) {
+ rectElement.attr(attrKey, rectData.attrs[attrKey]);
+ }
+ }
+ rectData.class !== void 0 && rectElement.attr("class", rectData.class);
+ return rectElement;
+};
+const drawBackgroundRect = (element, bounds) => {
+ const rectData = {
+ x: bounds.startx,
+ y: bounds.starty,
+ width: bounds.stopx - bounds.startx,
+ height: bounds.stopy - bounds.starty,
+ fill: bounds.fill,
+ stroke: bounds.stroke,
+ class: "rect"
+ };
+ const rectElement = drawRect(element, rectData);
+ rectElement.lower();
+};
+const drawText = (element, textData) => {
+ const nText = textData.text.replace(_mermaid_04fb0060_js__WEBPACK_IMPORTED_MODULE_1__.H, " ");
+ const textElem = element.append("text");
+ textElem.attr("x", textData.x);
+ textElem.attr("y", textData.y);
+ textElem.attr("class", "legend");
+ textElem.style("text-anchor", textData.anchor);
+ textData.class !== void 0 && textElem.attr("class", textData.class);
+ const tspan = textElem.append("tspan");
+ tspan.attr("x", textData.x + textData.textMargin * 2);
+ tspan.text(nText);
+ return textElem;
+};
+const drawImage = (elem, x, y, link) => {
+ const imageElement = elem.append("image");
+ imageElement.attr("x", x);
+ imageElement.attr("y", y);
+ const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(link);
+ imageElement.attr("xlink:href", sanitizedLink);
+};
+const drawEmbeddedImage = (element, x, y, link) => {
+ const imageElement = element.append("use");
+ imageElement.attr("x", x);
+ imageElement.attr("y", y);
+ const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_0__/* .sanitizeUrl */ .Nm)(link);
+ imageElement.attr("xlink:href", `#${sanitizedLink}`);
+};
+const getNoteRect = () => {
+ const noteRectData = {
+ x: 0,
+ y: 0,
+ width: 100,
+ height: 100,
+ fill: "#EDF2AE",
+ stroke: "#666",
+ anchor: "start",
+ rx: 0,
+ ry: 0
+ };
+ return noteRectData;
+};
+const getTextObj = () => {
+ const testObject = {
+ x: 0,
+ y: 0,
+ width: 100,
+ height: 100,
+ "text-anchor": "start",
+ style: "#666",
+ textMargin: 0,
+ rx: 0,
+ ry: 0,
+ tspan: true
+ };
+ return testObject;
+};
+
+
+
+/***/ })
+
+};
+;
\ No newline at end of file
diff --git a/assets/js/17896441.7cdefb8f.js b/assets/js/17896441.7cdefb8f.js
new file mode 100644
index 000000000..42818858c
--- /dev/null
+++ b/assets/js/17896441.7cdefb8f.js
@@ -0,0 +1,2 @@
+/*! For license information please see 17896441.7cdefb8f.js.LICENSE.txt */
+(self.webpackChunkmd=self.webpackChunkmd||[]).push([[7918],{7967:(t,e)=>{"use strict";e.Nm=e.Rq=void 0;var i=/^([^\w]*)(javascript|data|vbscript)/im,r=/(\w+)(^\w|;)?/g,n=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|:)/gim,a=[".","/"];e.Rq="about:blank",e.Nm=function(t){if(!t)return e.Rq;var l,c=(l=t,l.replace(o,"").replace(r,(function(t,e){return String.fromCharCode(e)}))).replace(n,"").replace(o,"").trim();if(!c)return e.Rq;if(function(t){return a.indexOf(t[0])>-1}(c))return c;var h=c.match(s);if(!h)return c;var u=h[0];return i.test(u)?e.Rq:c}},9114:(t,e,i)=>{"use strict";i.d(e,{Z:()=>L});var r=i(7294),n=i(5893);function o(t){const{mdxAdmonitionTitle:e,rest:i}=function(t){const e=r.Children.toArray(t),i=e.find((t=>r.isValidElement(t)&&"mdxAdmonitionTitle"===t.type)),o=e.filter((t=>t!==i)),s=i?.props.children;return{mdxAdmonitionTitle:s,rest:o.length>0?(0,n.jsx)(n.Fragment,{children:o}):null}}(t.children),o=t.title??e;return{...t,...o&&{title:o},children:i}}var s=i(512),a=i(7325),l=i(3702);const c={admonition:"admonition_xJq3",admonitionHeading:"admonitionHeading_Gvgb",admonitionIcon:"admonitionIcon_Rf37",admonitionContent:"admonitionContent_BuS1"};function h(t){let{type:e,className:i,children:r}=t;return(0,n.jsx)("div",{className:(0,s.Z)(l.k.common.admonition,l.k.common.admonitionType(e),c.admonition,i),children:r})}function u(t){let{icon:e,title:i}=t;return(0,n.jsxs)("div",{className:c.admonitionHeading,children:[(0,n.jsx)("span",{className:c.admonitionIcon,children:e}),i]})}function d(t){let{children:e}=t;return e?(0,n.jsx)("div",{className:c.admonitionContent,children:e}):null}function f(t){const{type:e,icon:i,title:r,children:o,className:s}=t;return(0,n.jsxs)(h,{type:e,className:s,children:[(0,n.jsx)(u,{title:r,icon:i}),(0,n.jsx)(d,{children:o})]})}function p(t){return(0,n.jsx)("svg",{viewBox:"0 0 14 16",...t,children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})})}const g={icon:(0,n.jsx)(p,{}),title:(0,n.jsx)(a.Z,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function m(t){return(0,n.jsx)(f,{...g,...t,className:(0,s.Z)("alert alert--secondary",t.className),children:t.children})}function y(t){return(0,n.jsx)("svg",{viewBox:"0 0 12 16",...t,children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})})}const x={icon:(0,n.jsx)(y,{}),title:(0,n.jsx)(a.Z,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function b(t){return(0,n.jsx)(f,{...x,...t,className:(0,s.Z)("alert alert--success",t.className),children:t.children})}function C(t){return(0,n.jsx)("svg",{viewBox:"0 0 14 16",...t,children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})})}const _={icon:(0,n.jsx)(C,{}),title:(0,n.jsx)(a.Z,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function v(t){return(0,n.jsx)(f,{..._,...t,className:(0,s.Z)("alert alert--info",t.className),children:t.children})}function k(t){return(0,n.jsx)("svg",{viewBox:"0 0 16 16",...t,children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})})}const T={icon:(0,n.jsx)(k,{}),title:(0,n.jsx)(a.Z,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function w(t){return(0,n.jsx)("svg",{viewBox:"0 0 12 16",...t,children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})})}const S={icon:(0,n.jsx)(w,{}),title:(0,n.jsx)(a.Z,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};const B={icon:(0,n.jsx)(k,{}),title:(0,n.jsx)(a.Z,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};const F={...{note:m,tip:b,info:v,warning:function(t){return(0,n.jsx)(f,{...T,...t,className:(0,s.Z)("alert alert--warning",t.className),children:t.children})},danger:function(t){return(0,n.jsx)(f,{...S,...t,className:(0,s.Z)("alert alert--danger",t.className),children:t.children})}},...{secondary:t=>(0,n.jsx)(m,{title:"secondary",...t}),important:t=>(0,n.jsx)(v,{title:"important",...t}),success:t=>(0,n.jsx)(b,{title:"success",...t}),caution:function(t){return(0,n.jsx)(f,{...B,...t,className:(0,s.Z)("alert alert--warning",t.className),children:t.children})}}};function L(t){const e=o(t),i=(r=e.type,F[r]||(console.warn(`No admonition component found for admonition type "${r}". Using Info as fallback.`),F.info));var r;return(0,n.jsx)(i,{...e})}},6086:(t,e,i)=>{"use strict";i.d(e,{Z:()=>y});i(7294);var r=i(512),n=i(3702),o=i(8259),s=i(9003),a=i(4791),l=i(7325),c=i(9524),h=i(5893);function u(t){return(0,h.jsx)("svg",{viewBox:"0 0 24 24",...t,children:(0,h.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})})}const d={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function f(){const t=(0,c.Z)("/");return(0,h.jsx)("li",{className:"breadcrumbs__item",children:(0,h.jsx)(a.Z,{"aria-label":(0,l.I)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:t,children:(0,h.jsx)(u,{className:d.breadcrumbHomeIcon})})})}const p={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function g(t){let{children:e,href:i,isLast:r}=t;const n="breadcrumbs__link";return r?(0,h.jsx)("span",{className:n,itemProp:"name",children:e}):i?(0,h.jsx)(a.Z,{className:n,href:i,itemProp:"item",children:(0,h.jsx)("span",{itemProp:"name",children:e})}):(0,h.jsx)("span",{className:n,children:e})}function m(t){let{children:e,active:i,index:n,addMicrodata:o}=t;return(0,h.jsxs)("li",{...o&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},className:(0,r.Z)("breadcrumbs__item",{"breadcrumbs__item--active":i}),children:[e,(0,h.jsx)("meta",{itemProp:"position",content:String(n+1)})]})}function y(){const t=(0,o.s1)(),e=(0,s.Ns)();return t?(0,h.jsx)("nav",{className:(0,r.Z)(n.k.docs.docBreadcrumbs,p.breadcrumbsContainer),"aria-label":(0,l.I)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,h.jsxs)("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList",children:[e&&(0,h.jsx)(f,{}),t.map(((e,i)=>{const r=i===t.length-1,n="category"===e.type&&e.linkUnlisted?void 0:e.href;return(0,h.jsx)(m,{active:r,index:i,addMicrodata:!!n,children:(0,h.jsx)(g,{href:n,isLast:r,children:e.label})},i)}))]})}):null}},7741:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>ue});var r=i(7294),n=i(9488),o=i(3768),s=i(5893);const a=r.createContext(null);function l(t){let{children:e,content:i}=t;const n=function(t){return(0,r.useMemo)((()=>({metadata:t.metadata,frontMatter:t.frontMatter,assets:t.assets,contentTitle:t.contentTitle,toc:t.toc})),[t])}(i);return(0,s.jsx)(a.Provider,{value:n,children:e})}function c(){const t=(0,r.useContext)(a);if(null===t)throw new o.i6("DocProvider");return t}function h(){const{metadata:t,frontMatter:e,assets:i}=c();return(0,s.jsx)(n.d,{title:t.title,description:t.description,keywords:e.keywords,image:i.image??e.image})}var u=i(512),d=i(3488),f=i(9473);function p(){const{metadata:t}=c();return(0,s.jsx)(f.Z,{previous:t.previous,next:t.next})}var g=i(5350),m=i(4617),y=i(3702),x=i(7325);function b(t){let{lastUpdatedAt:e,formattedLastUpdatedAt:i}=t;return(0,s.jsx)(x.Z,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,s.jsx)("b",{children:(0,s.jsx)("time",{dateTime:new Date(1e3*e).toISOString(),children:i})})},children:" on {date}"})}function C(t){let{lastUpdatedBy:e}=t;return(0,s.jsx)(x.Z,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,s.jsx)("b",{children:e})},children:" by {user}"})}function _(t){let{lastUpdatedAt:e,formattedLastUpdatedAt:i,lastUpdatedBy:r}=t;return(0,s.jsxs)("span",{className:y.k.common.lastUpdated,children:[(0,s.jsx)(x.Z,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:e&&i?(0,s.jsx)(b,{lastUpdatedAt:e,formattedLastUpdatedAt:i}):"",byUser:r?(0,s.jsx)(C,{lastUpdatedBy:r}):""},children:"Last updated{atDate}{byUser}"}),!1]})}var v=i(4791);const k={iconEdit:"iconEdit_Z9Sw"};function T(t){let{className:e,...i}=t;return(0,s.jsx)("svg",{fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,u.Z)(k.iconEdit,e),"aria-hidden":"true",...i,children:(0,s.jsx)("g",{children:(0,s.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})})}function w(t){let{editUrl:e}=t;return(0,s.jsxs)(v.Z,{to:e,className:y.k.common.editThisPage,children:[(0,s.jsx)(T,{}),(0,s.jsx)(x.Z,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}var S=i(3852);const B={tags:"tags_jXut",tag:"tag_QGVx"};function F(t){let{tags:e}=t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("b",{children:(0,s.jsx)(x.Z,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,s.jsx)("ul",{className:(0,u.Z)(B.tags,"padding--none","margin-left--sm"),children:e.map((t=>{let{label:e,permalink:i}=t;return(0,s.jsx)("li",{className:B.tag,children:(0,s.jsx)(S.Z,{label:e,permalink:i})},i)}))})]})}const L={lastUpdated:"lastUpdated_vwxv"};function A(t){return(0,s.jsx)("div",{className:(0,u.Z)(y.k.docs.docFooterTagsRow,"row margin-bottom--sm"),children:(0,s.jsx)("div",{className:"col",children:(0,s.jsx)(F,{...t})})})}function M(t){let{editUrl:e,lastUpdatedAt:i,lastUpdatedBy:r,formattedLastUpdatedAt:n}=t;return(0,s.jsxs)("div",{className:(0,u.Z)(y.k.docs.docFooterEditMetaRow,"row"),children:[(0,s.jsx)("div",{className:"col",children:e&&(0,s.jsx)(w,{editUrl:e})}),(0,s.jsx)("div",{className:(0,u.Z)("col",L.lastUpdated),children:(i||r)&&(0,s.jsx)(_,{lastUpdatedAt:i,formattedLastUpdatedAt:n,lastUpdatedBy:r})})]})}function E(){const{metadata:t}=c(),{editUrl:e,lastUpdatedAt:i,formattedLastUpdatedAt:r,lastUpdatedBy:n,tags:o}=t,a=o.length>0,l=!!(e||i||n);return a||l?(0,s.jsxs)("footer",{className:(0,u.Z)(y.k.docs.docFooter,"docusaurus-mt-lg"),children:[a&&(0,s.jsx)(A,{tags:o}),l&&(0,s.jsx)(M,{editUrl:e,lastUpdatedAt:i,lastUpdatedBy:n,formattedLastUpdatedAt:r})]}):null}var N=i(4639),Z=i(107);function j(t){const e=t.map((t=>({...t,parentIndex:-1,children:[]}))),i=Array(7).fill(-1);e.forEach(((t,e)=>{const r=i.slice(2,t.level);t.parentIndex=Math.max(...r),i[t.level]=e}));const r=[];return e.forEach((t=>{const{parentIndex:i,...n}=t;i>=0?e[i].children.push(n):r.push(n)})),r}function O(t){let{toc:e,minHeadingLevel:i,maxHeadingLevel:r}=t;return e.flatMap((t=>{const e=O({toc:t.children,minHeadingLevel:i,maxHeadingLevel:r});return function(t){return t.level>=i&&t.level<=r}(t)?[{...t,children:e}]:e}))}function I(t){const e=t.getBoundingClientRect();return e.top===e.bottom?I(t.parentNode):e}function D(t,e){let{anchorTopOffset:i}=e;const r=t.find((t=>I(t).top>=i));if(r){return function(t){return t.top>0&&t.bottom{t.current=e?0:document.querySelector(".navbar").clientHeight}),[e]),t}function $(t){const e=(0,r.useRef)(void 0),i=q();(0,r.useEffect)((()=>{if(!t)return()=>{};const{linkClassName:r,linkActiveClassName:n,minHeadingLevel:o,maxHeadingLevel:s}=t;function a(){const t=function(t){return Array.from(document.getElementsByClassName(t))}(r),a=function(t){let{minHeadingLevel:e,maxHeadingLevel:i}=t;const r=[];for(let n=e;n<=i;n+=1)r.push(`h${n}.anchor`);return Array.from(document.querySelectorAll(r.join()))}({minHeadingLevel:o,maxHeadingLevel:s}),l=D(a,{anchorTopOffset:i.current}),c=t.find((t=>l&&l.id===function(t){return decodeURIComponent(t.href.substring(t.href.indexOf("#")+1))}(t)));t.forEach((t=>{!function(t,i){i?(e.current&&e.current!==t&&e.current.classList.remove(n),t.classList.add(n),e.current=t):t.classList.remove(n)}(t,t===c)}))}return document.addEventListener("scroll",a),document.addEventListener("resize",a),a(),()=>{document.removeEventListener("scroll",a),document.removeEventListener("resize",a)}}),[t,i])}function z(t){let{toc:e,className:i,linkClassName:r,isChild:n}=t;return e.length?(0,s.jsx)("ul",{className:n?void 0:i,children:e.map((t=>(0,s.jsxs)("li",{children:[(0,s.jsx)(v.Z,{to:`#${t.id}`,className:r??void 0,dangerouslySetInnerHTML:{__html:t.value}}),(0,s.jsx)(z,{isChild:!0,toc:t.children,className:i,linkClassName:r})]},t.id)))}):null}const P=r.memo(z);function R(t){let{toc:e,className:i="table-of-contents table-of-contents__left-border",linkClassName:n="table-of-contents__link",linkActiveClassName:o,minHeadingLevel:a,maxHeadingLevel:l,...c}=t;const h=(0,Z.L)(),u=a??h.tableOfContents.minHeadingLevel,d=l??h.tableOfContents.maxHeadingLevel,f=function(t){let{toc:e,minHeadingLevel:i,maxHeadingLevel:n}=t;return(0,r.useMemo)((()=>O({toc:j(e),minHeadingLevel:i,maxHeadingLevel:n})),[e,i,n])}({toc:e,minHeadingLevel:u,maxHeadingLevel:d});return $((0,r.useMemo)((()=>{if(n&&o)return{linkClassName:n,linkActiveClassName:o,minHeadingLevel:u,maxHeadingLevel:d}}),[n,o,u,d])),(0,s.jsx)(P,{toc:f,className:i,linkClassName:n,...c})}const H={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function W(t){let{collapsed:e,...i}=t;return(0,s.jsx)("button",{type:"button",...i,className:(0,u.Z)("clean-btn",H.tocCollapsibleButton,!e&&H.tocCollapsibleButtonExpanded,i.className),children:(0,s.jsx)(x.Z,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component",children:"On this page"})})}const U={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function Y(t){let{toc:e,className:i,minHeadingLevel:r,maxHeadingLevel:n}=t;const{collapsed:o,toggleCollapsed:a}=(0,N.u)({initialState:!0});return(0,s.jsxs)("div",{className:(0,u.Z)(U.tocCollapsible,!o&&U.tocCollapsibleExpanded,i),children:[(0,s.jsx)(W,{collapsed:o,onClick:a}),(0,s.jsx)(N.z,{lazy:!0,className:U.tocCollapsibleContent,collapsed:o,children:(0,s.jsx)(R,{toc:e,minHeadingLevel:r,maxHeadingLevel:n})})]})}const V={tocMobile:"tocMobile_ITEo"};function G(){const{toc:t,frontMatter:e}=c();return(0,s.jsx)(Y,{toc:t,minHeadingLevel:e.toc_min_heading_level,maxHeadingLevel:e.toc_max_heading_level,className:(0,u.Z)(y.k.docs.docTocMobile,V.tocMobile)})}const X={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},J="table-of-contents__link toc-highlight",Q="table-of-contents__link--active";function K(t){let{className:e,...i}=t;return(0,s.jsx)("div",{className:(0,u.Z)(X.tableOfContents,"thin-scrollbar",e),children:(0,s.jsx)(R,{...i,linkClassName:J,linkActiveClassName:Q})})}function tt(){const{toc:t,frontMatter:e}=c();return(0,s.jsx)(K,{toc:t,minHeadingLevel:e.toc_min_heading_level,maxHeadingLevel:e.toc_max_heading_level,className:y.k.docs.docTocDesktop})}var et=i(3899),it=i(1151),rt=i(1514),nt=i(1048),ot=i(9200);function st(){const{prism:t}=(0,Z.L)(),{colorMode:e}=(0,ot.I)(),i=t.theme,r=t.darkTheme||i;return"dark"===e?r:i}var at=i(7594),lt=i.n(at);const ct=/title=(?["'])(?.*?)\1/,ht=/\{(?[\d,-]+)\}/,ut={js:{start:"\\/\\/",end:""},jsBlock:{start:"\\/\\*",end:"\\*\\/"},jsx:{start:"\\{\\s*\\/\\*",end:"\\*\\/\\s*\\}"},bash:{start:"#",end:""},html:{start:"\x3c!--",end:"--\x3e"}},dt={...ut,lua:{start:"--",end:""},wasm:{start:"\\;\\;",end:""},tex:{start:"%",end:""},vb:{start:"['\u2018\u2019]",end:""},vbnet:{start:"(?:_\\s*)?['\u2018\u2019]",end:""},rem:{start:"[Rr][Ee][Mm]\\b",end:""},f90:{start:"!",end:""},ml:{start:"\\(\\*",end:"\\*\\)"},cobol:{start:"\\*>",end:""}},ft=Object.keys(ut);function pt(t,e){const i=t.map((t=>{const{start:i,end:r}=dt[t];return`(?:${i}\\s*(${e.flatMap((t=>[t.line,t.block?.start,t.block?.end].filter(Boolean))).join("|")})\\s*${r})`})).join("|");return new RegExp(`^\\s*(?:${i})\\s*$`)}function gt(t,e){let i=t.replace(/\n$/,"");const{language:r,magicComments:n,metastring:o}=e;if(o&&ht.test(o)){const t=o.match(ht).groups.range;if(0===n.length)throw new Error(`A highlight range has been given in code block's metastring (\`\`\` ${o}), but no magic comment config is available. Docusaurus applies the first magic comment entry's className for metastring ranges.`);const e=n[0].className,r=lt()(t).filter((t=>t>0)).map((t=>[t-1,[e]]));return{lineClassNames:Object.fromEntries(r),code:i}}if(void 0===r)return{lineClassNames:{},code:i};const s=function(t,e){switch(t){case"js":case"javascript":case"ts":case"typescript":return pt(["js","jsBlock"],e);case"jsx":case"tsx":return pt(["js","jsBlock","jsx"],e);case"html":return pt(["js","jsBlock","html"],e);case"python":case"py":case"bash":return pt(["bash"],e);case"markdown":case"md":return pt(["html","jsx","bash"],e);case"tex":case"latex":case"matlab":return pt(["tex"],e);case"lua":case"haskell":case"sql":return pt(["lua"],e);case"wasm":return pt(["wasm"],e);case"vb":case"vba":case"visual-basic":return pt(["vb","rem"],e);case"vbnet":return pt(["vbnet","rem"],e);case"batch":return pt(["rem"],e);case"basic":return pt(["rem","f90"],e);case"fsharp":return pt(["js","ml"],e);case"ocaml":case"sml":return pt(["ml"],e);case"fortran":return pt(["f90"],e);case"cobol":return pt(["cobol"],e);default:return pt(ft,e)}}(r,n),a=i.split("\n"),l=Object.fromEntries(n.map((t=>[t.className,{start:0,range:""}]))),c=Object.fromEntries(n.filter((t=>t.line)).map((t=>{let{className:e,line:i}=t;return[i,e]}))),h=Object.fromEntries(n.filter((t=>t.block)).map((t=>{let{className:e,block:i}=t;return[i.start,e]}))),u=Object.fromEntries(n.filter((t=>t.block)).map((t=>{let{className:e,block:i}=t;return[i.end,e]})));for(let f=0;fvoid 0!==t));c[e]?l[c[e]].range+=`${f},`:h[e]?l[h[e]].start=f:u[e]&&(l[u[e]].range+=`${l[u[e]].start}-${f-1},`),a.splice(f,1)}i=a.join("\n");const d={};return Object.entries(l).forEach((t=>{let[e,{range:i}]=t;lt()(i).forEach((t=>{d[t]??=[],d[t].push(e)}))})),{lineClassNames:d,code:i}}const mt={codeBlockContainer:"codeBlockContainer_Ckt0"};function yt(t){let{as:e,...i}=t;const r=function(t){const e={color:"--prism-color",backgroundColor:"--prism-background-color"},i={};return Object.entries(t.plain).forEach((t=>{let[r,n]=t;const o=e[r];o&&"string"==typeof n&&(i[o]=n)})),i}(st());return(0,s.jsx)(e,{...i,style:r,className:(0,u.Z)(i.className,mt.codeBlockContainer,y.k.common.codeBlock)})}const xt={codeBlockContent:"codeBlockContent_biex",codeBlockTitle:"codeBlockTitle_Ktv7",codeBlock:"codeBlock_bY9V",codeBlockStandalone:"codeBlockStandalone_MEMb",codeBlockLines:"codeBlockLines_e6Vv",codeBlockLinesWithNumbering:"codeBlockLinesWithNumbering_o6Pm",buttonGroup:"buttonGroup__atx"};function bt(t){let{children:e,className:i}=t;return(0,s.jsx)(yt,{as:"pre",tabIndex:0,className:(0,u.Z)(xt.codeBlockStandalone,"thin-scrollbar",i),children:(0,s.jsx)("code",{className:xt.codeBlockLines,children:e})})}const Ct={attributes:!0,characterData:!0,childList:!0,subtree:!0};function _t(t,e){const[i,n]=(0,r.useState)(),s=(0,r.useCallback)((()=>{n(t.current?.closest("[role=tabpanel][hidden]"))}),[t,n]);(0,r.useEffect)((()=>{s()}),[s]),function(t,e,i){void 0===i&&(i=Ct);const n=(0,o.zX)(e),s=(0,o.Ql)(i);(0,r.useEffect)((()=>{const e=new MutationObserver(n);return t&&e.observe(t,s),()=>e.disconnect()}),[t,n,s])}(i,(t=>{t.forEach((t=>{"attributes"===t.type&&"hidden"===t.attributeName&&(e(),s())}))}),{attributes:!0,characterData:!1,childList:!1,subtree:!1})}var vt=i(2573);const kt={codeLine:"codeLine_lJS_",codeLineNumber:"codeLineNumber_Tfdd",codeLineContent:"codeLineContent_feaV"};function Tt(t){let{line:e,classNames:i,showLineNumbers:r,getLineProps:n,getTokenProps:o}=t;1===e.length&&"\n"===e[0].content&&(e[0].content="");const a=n({line:e,className:(0,u.Z)(i,r&&kt.codeLine)}),l=e.map(((t,e)=>(0,s.jsx)("span",{...o({token:t,key:e})},e)));return(0,s.jsxs)("span",{...a,children:[r?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:kt.codeLineNumber}),(0,s.jsx)("span",{className:kt.codeLineContent,children:l})]}):l,(0,s.jsx)("br",{})]})}function wt(t){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})})}function St(t){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})})}const Bt={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function Ft(t){let{code:e,className:i}=t;const[n,o]=(0,r.useState)(!1),a=(0,r.useRef)(void 0),l=(0,r.useCallback)((()=>{!function(t,e){let{target:i=document.body}=void 0===e?{}:e;if("string"!=typeof t)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof t}\`.`);const r=document.createElement("textarea"),n=document.activeElement;r.value=t,r.setAttribute("readonly",""),r.style.contain="strict",r.style.position="absolute",r.style.left="-9999px",r.style.fontSize="12pt";const o=document.getSelection(),s=o.rangeCount>0&&o.getRangeAt(0);i.append(r),r.select(),r.selectionStart=0,r.selectionEnd=t.length;let a=!1;try{a=document.execCommand("copy")}catch{}r.remove(),s&&(o.removeAllRanges(),o.addRange(s)),n&&n.focus()}(e),o(!0),a.current=window.setTimeout((()=>{o(!1)}),1e3)}),[e]);return(0,r.useEffect)((()=>()=>window.clearTimeout(a.current)),[]),(0,s.jsx)("button",{type:"button","aria-label":n?(0,x.I)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,x.I)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,x.I)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,u.Z)("clean-btn",i,Bt.copyButton,n&&Bt.copyButtonCopied),onClick:l,children:(0,s.jsxs)("span",{className:Bt.copyButtonIcons,"aria-hidden":"true",children:[(0,s.jsx)(wt,{className:Bt.copyButtonIcon}),(0,s.jsx)(St,{className:Bt.copyButtonSuccessIcon})]})})}function Lt(t){return(0,s.jsx)("svg",{viewBox:"0 0 24 24",...t,children:(0,s.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})})}const At={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function Mt(t){let{className:e,onClick:i,isEnabled:r}=t;const n=(0,x.I)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,s.jsx)("button",{type:"button",onClick:i,className:(0,u.Z)("clean-btn",e,r&&At.wordWrapButtonEnabled),"aria-label":n,title:n,children:(0,s.jsx)(Lt,{className:At.wordWrapButtonIcon,"aria-hidden":"true"})})}function Et(t){let{children:e,className:i="",metastring:n,title:o,showLineNumbers:a,language:l}=t;const{prism:{defaultLanguage:c,magicComments:h}}=(0,Z.L)(),d=function(t){return t?.toLowerCase()}(l??function(t){const e=t.split(" ").find((t=>t.startsWith("language-")));return e?.replace(/language-/,"")}(i)??c),f=st(),p=function(){const[t,e]=(0,r.useState)(!1),[i,n]=(0,r.useState)(!1),o=(0,r.useRef)(null),s=(0,r.useCallback)((()=>{const i=o.current.querySelector("code");t?i.removeAttribute("style"):(i.style.whiteSpace="pre-wrap",i.style.overflowWrap="anywhere"),e((t=>!t))}),[o,t]),a=(0,r.useCallback)((()=>{const{scrollWidth:t,clientWidth:e}=o.current,i=t>e||o.current.querySelector("code").hasAttribute("style");n(i)}),[o]);return _t(o,a),(0,r.useEffect)((()=>{a()}),[t,a]),(0,r.useEffect)((()=>(window.addEventListener("resize",a,{passive:!0}),()=>{window.removeEventListener("resize",a)})),[a]),{codeBlockRef:o,isEnabled:t,isCodeScrollable:i,toggle:s}}(),g=function(t){return t?.match(ct)?.groups.title??""}(n)||o,{lineClassNames:m,code:y}=gt(e,{metastring:n,language:d,magicComments:h}),x=a??function(t){return Boolean(t?.includes("showLineNumbers"))}(n);return(0,s.jsxs)(yt,{as:"div",className:(0,u.Z)(i,d&&!i.includes(`language-${d}`)&&`language-${d}`),children:[g&&(0,s.jsx)("div",{className:xt.codeBlockTitle,children:g}),(0,s.jsxs)("div",{className:xt.codeBlockContent,children:[(0,s.jsx)(vt.y$,{theme:f,code:y,language:d??"text",children:t=>{let{className:e,style:i,tokens:r,getLineProps:n,getTokenProps:o}=t;return(0,s.jsx)("pre",{tabIndex:0,ref:p.codeBlockRef,className:(0,u.Z)(e,xt.codeBlock,"thin-scrollbar"),style:i,children:(0,s.jsx)("code",{className:(0,u.Z)(xt.codeBlockLines,x&&xt.codeBlockLinesWithNumbering),children:r.map(((t,e)=>(0,s.jsx)(Tt,{line:t,getLineProps:n,getTokenProps:o,classNames:m[e],showLineNumbers:x},e)))})})}}),(0,s.jsxs)("div",{className:xt.buttonGroup,children:[(p.isEnabled||p.isCodeScrollable)&&(0,s.jsx)(Mt,{className:xt.codeButton,onClick:()=>p.toggle(),isEnabled:p.isEnabled}),(0,s.jsx)(Ft,{className:xt.codeButton,code:y})]})]})]})}function Nt(t){let{children:e,...i}=t;const n=(0,nt.Z)(),o=function(t){return r.Children.toArray(t).some((t=>(0,r.isValidElement)(t)))?t:Array.isArray(t)?t.join(""):t}(e),a="string"==typeof o?Et:bt;return(0,s.jsx)(a,{...i,children:o},String(n))}function Zt(t){return(0,s.jsx)("code",{...t})}var jt=i(168);const Ot={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function It(t){return!!t&&("SUMMARY"===t.tagName||It(t.parentElement))}function Dt(t,e){return!!t&&(t===e||Dt(t.parentElement,e))}function qt(t){let{summary:e,children:i,...n}=t;(0,jt.Z)().collectAnchor(n.id);const o=(0,nt.Z)(),a=(0,r.useRef)(null),{collapsed:l,setCollapsed:c}=(0,N.u)({initialState:!n.open}),[h,d]=(0,r.useState)(n.open),f=r.isValidElement(e)?e:(0,s.jsx)("summary",{children:e??"Details"});return(0,s.jsxs)("details",{...n,ref:a,open:h,"data-collapsed":l,className:(0,u.Z)(Ot.details,o&&Ot.isBrowser,n.className),onMouseDown:t=>{It(t.target)&&t.detail>1&&t.preventDefault()},onClick:t=>{t.stopPropagation();const e=t.target;It(e)&&Dt(e,a.current)&&(t.preventDefault(),l?(c(!1),d(!0)):c(!0))},children:[f,(0,s.jsx)(N.z,{lazy:!1,collapsed:l,disableSSRStyle:!0,onCollapseTransitionEnd:t=>{c(t),d(!t)},children:(0,s.jsx)("div",{className:Ot.collapsibleContent,children:i})})]})}const $t={details:"details_b_Ee"},zt="alert alert--info";function Pt(t){let{...e}=t;return(0,s.jsx)(qt,{...e,className:(0,u.Z)(zt,$t.details,e.className)})}function Rt(t){const e=r.Children.toArray(t.children),i=e.find((t=>r.isValidElement(t)&&"summary"===t.type)),n=(0,s.jsx)(s.Fragment,{children:e.filter((t=>t!==i))});return(0,s.jsx)(Pt,{...t,summary:i,children:n})}function Ht(t){return(0,s.jsx)(et.Z,{...t})}const Wt={containsTaskList:"containsTaskList_mC6p"};function Ut(t){if(void 0!==t)return(0,u.Z)(t,t?.includes("contains-task-list")&&Wt.containsTaskList)}const Yt={img:"img_ev3q"};var Vt=i(9114),Gt=i(3256),Xt=i(2303),Jt=i(6365);const Qt="docusaurus-mermaid-container";function Kt(){const{colorMode:t}=(0,ot.I)(),e=(0,Z.L)().mermaid,i=e.theme[t],{options:n}=e;return(0,r.useMemo)((()=>({startOnLoad:!1,...n,theme:i})),[i,n])}function te(t){let{text:e,config:i}=t;const[n,o]=(0,r.useState)(null),s=(0,r.useRef)(`mermaid-svg-${Math.round(1e7*Math.random())}`).current,a=Kt(),l=i??a;return(0,r.useEffect)((()=>{(async function(t){let{id:e,text:i,config:r}=t;Jt.L.mermaidAPI.initialize(r);try{return await Jt.L.render(e,i)}catch(n){throw document.querySelector(`#d${e}`)?.remove(),n}})({id:s,text:e,config:l}).then(o).catch((t=>{o((()=>{throw t}))}))}),[s,e,l]),n}const ee={container:"container_lyt7"};function ie(t){let{renderResult:e}=t;const i=(0,r.useRef)(null);return(0,r.useEffect)((()=>{const t=i.current;e.bindFunctions?.(t)}),[e]),(0,s.jsx)("div",{ref:i,className:`${Qt} ${ee.container}`,dangerouslySetInnerHTML:{__html:e.svg}})}function re(t){let{value:e}=t;const i=te({text:e});return null===i?null:(0,s.jsx)(ie,{renderResult:i})}const ne={Head:rt.Z,details:Rt,Details:Rt,code:function(t){return function(t){return void 0!==t.children&&r.Children.toArray(t.children).every((t=>"string"==typeof t&&!t.includes("\n")))}(t)?(0,s.jsx)(Zt,{...t}):(0,s.jsx)(Nt,{...t})},a:function(t){return(0,s.jsx)(v.Z,{...t})},pre:function(t){return(0,s.jsx)(s.Fragment,{children:t.children})},ul:function(t){return(0,s.jsx)("ul",{...t,className:Ut(t.className)})},li:function(t){return(0,jt.Z)().collectAnchor(t.id),(0,s.jsx)("li",{...t})},img:function(t){return(0,s.jsx)("img",{decoding:"async",loading:"lazy",...t,className:(e=t.className,(0,u.Z)(e,Yt.img))});var e},h1:t=>(0,s.jsx)(Ht,{as:"h1",...t}),h2:t=>(0,s.jsx)(Ht,{as:"h2",...t}),h3:t=>(0,s.jsx)(Ht,{as:"h3",...t}),h4:t=>(0,s.jsx)(Ht,{as:"h4",...t}),h5:t=>(0,s.jsx)(Ht,{as:"h5",...t}),h6:t=>(0,s.jsx)(Ht,{as:"h6",...t}),admonition:Vt.Z,mermaid:function(t){return(0,s.jsx)(Gt.Z,{fallback:t=>(0,s.jsx)(Xt.Ac,{...t}),children:(0,s.jsx)(re,{...t})})}};function oe(t){let{children:e}=t;return(0,s.jsx)(it.Z,{components:ne,children:e})}function se(t){let{children:e}=t;const i=function(){const{metadata:t,frontMatter:e,contentTitle:i}=c();return e.hide_title||void 0!==i?null:t.title}();return(0,s.jsxs)("div",{className:(0,u.Z)(y.k.docs.docMarkdown,"markdown"),children:[i&&(0,s.jsx)("header",{children:(0,s.jsx)(et.Z,{as:"h1",children:i})}),(0,s.jsx)(oe,{children:e})]})}var ae=i(6086),le=i(9501);const ce={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function he(t){let{children:e}=t;const i=function(){const{frontMatter:t,toc:e}=c(),i=(0,d.i)(),r=t.hide_table_of_contents,n=!r&&e.length>0;return{hidden:r,mobile:n?(0,s.jsx)(G,{}):void 0,desktop:!n||"desktop"!==i&&"ssr"!==i?void 0:(0,s.jsx)(tt,{})}}(),{metadata:{unlisted:r}}=c();return(0,s.jsxs)("div",{className:"row",children:[(0,s.jsxs)("div",{className:(0,u.Z)("col",!i.hidden&&ce.docItemCol),children:[r&&(0,s.jsx)(le.Z,{}),(0,s.jsx)(g.Z,{}),(0,s.jsxs)("div",{className:ce.docItemContainer,children:[(0,s.jsxs)("article",{children:[(0,s.jsx)(ae.Z,{}),(0,s.jsx)(m.Z,{}),i.mobile,(0,s.jsx)(se,{children:e}),(0,s.jsx)(E,{})]}),(0,s.jsx)(p,{})]})]}),i.desktop&&(0,s.jsx)("div",{className:"col col--3",children:i.desktop})]})}function ue(t){const e=`docs-doc-id-${t.content.metadata.id}`,i=t.content;return(0,s.jsx)(l,{content:t.content,children:(0,s.jsxs)(n.FG,{className:e,children:[(0,s.jsx)(h,{}),(0,s.jsx)(he,{children:(0,s.jsx)(i,{})})]})})}},9473:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});i(7294);var r=i(7325),n=i(512),o=i(4791),s=i(5893);function a(t){const{permalink:e,title:i,subLabel:r,isNext:a}=t;return(0,s.jsxs)(o.Z,{className:(0,n.Z)("pagination-nav__link",a?"pagination-nav__link--next":"pagination-nav__link--prev"),to:e,children:[r&&(0,s.jsx)("div",{className:"pagination-nav__sublabel",children:r}),(0,s.jsx)("div",{className:"pagination-nav__label",children:i})]})}function l(t){const{previous:e,next:i}=t;return(0,s.jsxs)("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,r.I)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[e&&(0,s.jsx)(a,{...e,subLabel:(0,s.jsx)(r.Z,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})}),i&&(0,s.jsx)(a,{...i,subLabel:(0,s.jsx)(r.Z,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0})]})}},4617:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});i(7294);var r=i(512),n=i(7325),o=i(3702),s=i(8801),a=i(5893);function l(t){let{className:e}=t;const i=(0,s.E)();return i.badge?(0,a.jsx)("span",{className:(0,r.Z)(e,o.k.docs.docVersionBadge,"badge badge--secondary"),children:(0,a.jsx)(n.Z,{id:"theme.docs.versionBadge.label",values:{versionLabel:i.label},children:"Version: {versionLabel}"})}):null}},5350:(t,e,i)=>{"use strict";i.d(e,{Z:()=>m});i(7294);var r=i(512),n=i(9962),o=i(4791),s=i(7325),a=i(9871),l=i(3702),c=i(6409),h=i(8801),u=i(5893);const d={unreleased:function(t){let{siteTitle:e,versionMetadata:i}=t;return(0,u.jsx)(s.Z,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:e,versionLabel:(0,u.jsx)("b",{children:i.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(t){let{siteTitle:e,versionMetadata:i}=t;return(0,u.jsx)(s.Z,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:e,versionLabel:(0,u.jsx)("b",{children:i.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function f(t){const e=d[t.versionMetadata.banner];return(0,u.jsx)(e,{...t})}function p(t){let{versionLabel:e,to:i,onClick:r}=t;return(0,u.jsx)(s.Z,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:e,latestVersionLink:(0,u.jsx)("b",{children:(0,u.jsx)(o.Z,{to:i,onClick:r,children:(0,u.jsx)(s.Z,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function g(t){let{className:e,versionMetadata:i}=t;const{siteConfig:{title:o}}=(0,n.Z)(),{pluginId:s}=(0,a.gA)({failfast:!0}),{savePreferredVersionName:h}=(0,c.J)(s),{latestDocSuggestion:d,latestVersionSuggestion:g}=(0,a.Jo)(s),m=d??(y=g).docs.find((t=>t.id===y.mainDocId));var y;return(0,u.jsxs)("div",{className:(0,r.Z)(e,l.k.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,u.jsx)("div",{children:(0,u.jsx)(f,{siteTitle:o,versionMetadata:i})}),(0,u.jsx)("div",{className:"margin-top--md",children:(0,u.jsx)(p,{versionLabel:g.label,to:m.path,onClick:()=>h(g.name)})})]})}function m(t){let{className:e}=t;const i=(0,h.E)();return i.banner?(0,u.jsx)(g,{className:e,versionMetadata:i}):null}},3852:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});i(7294);var r=i(512),n=i(4791);const o={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};var s=i(5893);function a(t){let{permalink:e,label:i,count:a}=t;return(0,s.jsxs)(n.Z,{href:e,className:(0,r.Z)(o.tag,a?o.tagWithCount:o.tagRegular),children:[i,a&&(0,s.jsx)("span",{children:a})]})}},9501:(t,e,i)=>{"use strict";i.d(e,{Z:()=>f});i(7294);var r=i(512),n=i(7325),o=i(1514),s=i(5893);function a(){return(0,s.jsx)(n.Z,{id:"theme.unlistedContent.title",description:"The unlisted content banner title",children:"Unlisted page"})}function l(){return(0,s.jsx)(n.Z,{id:"theme.unlistedContent.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function c(){return(0,s.jsx)(o.Z,{children:(0,s.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}var h=i(3702),u=i(9114);function d(t){let{className:e}=t;return(0,s.jsx)(u.Z,{type:"caution",title:(0,s.jsx)(a,{}),className:(0,r.Z)(e,h.k.common.unlistedBanner),children:(0,s.jsx)(l,{})})}function f(t){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c,{}),(0,s.jsx)(d,{...t})]})}},7484:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,i=36e5,r="millisecond",n="second",o="minute",s="hour",a="day",l="week",c="month",h="quarter",u="year",d="date",f="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],i=t%100;return"["+t+(e[(i-20)%10]||e[i]||e[0])+"]"}},y=function(t,e,i){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(i)+t},x={s:y,z:function(t){var e=-t.utcOffset(),i=Math.abs(e),r=Math.floor(i/60),n=i%60;return(e<=0?"+":"-")+y(r,2,"0")+":"+y(n,2,"0")},m:function t(e,i){if(e.date()1)return t(s[0])}else{var a=e.name;C[a]=e,n=a}return!r&&n&&(b=n),n||!r&&b},T=function(t,e){if(v(t))return t.clone();var i="object"==typeof e?e:{};return i.date=t,i.args=arguments,new S(i)},w=x;w.l=k,w.i=v,w.w=function(t,e){return T(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function m(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var y=m.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,i=t.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(p);if(r){var n=r[2]-1||0,o=(r[7]||"0").substring(0,3);return i?new Date(Date.UTC(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],n,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return w},y.isValid=function(){return!(this.$d.toString()===f)},y.isSame=function(t,e){var i=T(t);return this.startOf(e)<=i&&i<=this.endOf(e)},y.isAfter=function(t,e){return T(t)1?i-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:f;e&&e(t,null);let o=r.length;for(;o--;){let e=r[o];if("string"==typeof e){const t=n(e);t!==e&&(i(r)||(r[o]=t),e=t)}t[e]=!0}return t}function T(t){for(let e=0;e/gm),$=s(/\${[\w\W]*}/gm),z=s(/^data-[\-\w.\u00B7-\uFFFF]/),P=s(/^aria-[\-\w]+$/),R=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=s(/^(?:\w+script|data):/i),W=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U=s(/^html$/i);var Y=Object.freeze({__proto__:null,MUSTACHE_EXPR:D,ERB_EXPR:q,TMPLIT_EXPR:$,DATA_ATTR:z,ARIA_ATTR:P,IS_ALLOWED_URI:R,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:W,DOCTYPE_NAME:U});const V=function(){return"undefined"==typeof window?null:window},G=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let i=null;const r="data-tt-policy-suffix";e&&e.hasAttribute(r)&&(i=e.getAttribute(r));const n="dompurify"+(i?"#"+i:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(o){return console.warn("TrustedTypes policy "+n+" could not be created."),null}};function X(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V();const i=t=>X(t);if(i.version="3.0.8",i.removed=[],!e||!e.document||9!==e.document.nodeType)return i.isSupported=!1,i;let{document:r}=e;const n=r,s=n.currentScript,{DocumentFragment:l,HTMLTemplateElement:c,Node:_,Element:v,NodeFilter:T,NamedNodeMap:D=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:q,DOMParser:$,trustedTypes:z}=e,P=v.prototype,H=S(P,"cloneNode"),W=S(P,"nextSibling"),J=S(P,"childNodes"),Q=S(P,"parentNode");if("function"==typeof c){const t=r.createElement("template");t.content&&t.content.ownerDocument&&(r=t.content.ownerDocument)}let K,tt="";const{implementation:et,createNodeIterator:it,createDocumentFragment:rt,getElementsByTagName:nt}=r,{importNode:ot}=n;let st={};i.isSupported="function"==typeof t&&"function"==typeof Q&&et&&void 0!==et.createHTMLDocument;const{MUSTACHE_EXPR:at,ERB_EXPR:lt,TMPLIT_EXPR:ct,DATA_ATTR:ht,ARIA_ATTR:ut,IS_SCRIPT_OR_DATA:dt,ATTR_WHITESPACE:ft}=Y;let{IS_ALLOWED_URI:pt}=Y,gt=null;const mt=k({},[...B,...F,...L,...M,...N]);let yt=null;const xt=k({},[...Z,...j,...O,...I]);let bt=Object.seal(a(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,_t=null,vt=!0,kt=!0,Tt=!1,wt=!0,St=!1,Bt=!1,Ft=!1,Lt=!1,At=!1,Mt=!1,Et=!1,Nt=!0,Zt=!1;const jt="user-content-";let Ot=!0,It=!1,Dt={},qt=null;const $t=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let zt=null;const Pt=k({},["audio","video","img","source","image","track"]);let Rt=null;const Ht=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Wt="http://www.w3.org/1998/Math/MathML",Ut="http://www.w3.org/2000/svg",Yt="http://www.w3.org/1999/xhtml";let Vt=Yt,Gt=!1,Xt=null;const Jt=k({},[Wt,Ut,Yt],p);let Qt=null;const Kt=["application/xhtml+xml","text/html"],te="text/html";let ee=null,ie=null;const re=r.createElement("form"),ne=function(t){return t instanceof RegExp||t instanceof Function},oe=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ie||ie!==t){if(t&&"object"==typeof t||(t={}),t=w(t),Qt=-1===Kt.indexOf(t.PARSER_MEDIA_TYPE)?te:t.PARSER_MEDIA_TYPE,ee="application/xhtml+xml"===Qt?p:f,gt="ALLOWED_TAGS"in t?k({},t.ALLOWED_TAGS,ee):mt,yt="ALLOWED_ATTR"in t?k({},t.ALLOWED_ATTR,ee):xt,Xt="ALLOWED_NAMESPACES"in t?k({},t.ALLOWED_NAMESPACES,p):Jt,Rt="ADD_URI_SAFE_ATTR"in t?k(w(Ht),t.ADD_URI_SAFE_ATTR,ee):Ht,zt="ADD_DATA_URI_TAGS"in t?k(w(Pt),t.ADD_DATA_URI_TAGS,ee):Pt,qt="FORBID_CONTENTS"in t?k({},t.FORBID_CONTENTS,ee):$t,Ct="FORBID_TAGS"in t?k({},t.FORBID_TAGS,ee):{},_t="FORBID_ATTR"in t?k({},t.FORBID_ATTR,ee):{},Dt="USE_PROFILES"in t&&t.USE_PROFILES,vt=!1!==t.ALLOW_ARIA_ATTR,kt=!1!==t.ALLOW_DATA_ATTR,Tt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,wt=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,St=t.SAFE_FOR_TEMPLATES||!1,Bt=t.WHOLE_DOCUMENT||!1,At=t.RETURN_DOM||!1,Mt=t.RETURN_DOM_FRAGMENT||!1,Et=t.RETURN_TRUSTED_TYPE||!1,Lt=t.FORCE_BODY||!1,Nt=!1!==t.SANITIZE_DOM,Zt=t.SANITIZE_NAMED_PROPS||!1,Ot=!1!==t.KEEP_CONTENT,It=t.IN_PLACE||!1,pt=t.ALLOWED_URI_REGEXP||R,Vt=t.NAMESPACE||Yt,bt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ne(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(bt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ne(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(bt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(bt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),St&&(kt=!1),Mt&&(At=!0),Dt&&(gt=k({},N),yt=[],!0===Dt.html&&(k(gt,B),k(yt,Z)),!0===Dt.svg&&(k(gt,F),k(yt,j),k(yt,I)),!0===Dt.svgFilters&&(k(gt,L),k(yt,j),k(yt,I)),!0===Dt.mathMl&&(k(gt,M),k(yt,O),k(yt,I))),t.ADD_TAGS&&(gt===mt&&(gt=w(gt)),k(gt,t.ADD_TAGS,ee)),t.ADD_ATTR&&(yt===xt&&(yt=w(yt)),k(yt,t.ADD_ATTR,ee)),t.ADD_URI_SAFE_ATTR&&k(Rt,t.ADD_URI_SAFE_ATTR,ee),t.FORBID_CONTENTS&&(qt===$t&&(qt=w(qt)),k(qt,t.FORBID_CONTENTS,ee)),Ot&&(gt["#text"]=!0),Bt&&k(gt,["html","head","body"]),gt.table&&(k(gt,["tbody"]),delete Ct.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');K=t.TRUSTED_TYPES_POLICY,tt=K.createHTML("")}else void 0===K&&(K=G(z,s)),null!==K&&"string"==typeof tt&&(tt=K.createHTML(""));o&&o(t),ie=t}},se=k({},["mi","mo","mn","ms","mtext"]),ae=k({},["foreignobject","desc","title","annotation-xml"]),le=k({},["title","style","font","a","script"]),ce=k({},[...F,...L,...A]),he=k({},[...M,...E]),ue=function(t){let e=Q(t);e&&e.tagName||(e={namespaceURI:Vt,tagName:"template"});const i=f(t.tagName),r=f(e.tagName);return!!Xt[t.namespaceURI]&&(t.namespaceURI===Ut?e.namespaceURI===Yt?"svg"===i:e.namespaceURI===Wt?"svg"===i&&("annotation-xml"===r||se[r]):Boolean(ce[i]):t.namespaceURI===Wt?e.namespaceURI===Yt?"math"===i:e.namespaceURI===Ut?"math"===i&&ae[r]:Boolean(he[i]):t.namespaceURI===Yt?!(e.namespaceURI===Ut&&!ae[r])&&!(e.namespaceURI===Wt&&!se[r])&&!he[i]&&(le[i]||!ce[i]):!("application/xhtml+xml"!==Qt||!Xt[t.namespaceURI]))},de=function(t){d(i.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){t.remove()}},fe=function(t,e){try{d(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(r){d(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!yt[t])if(At||Mt)try{de(e)}catch(r){}else try{e.setAttribute(t,"")}catch(r){}},pe=function(t){let e=null,i=null;if(Lt)t=" "+t;else{const e=g(t,/^[\r\n\t ]+/);i=e&&e[0]}"application/xhtml+xml"===Qt&&Vt===Yt&&(t=''+t+"");const n=K?K.createHTML(t):t;if(Vt===Yt)try{e=(new $).parseFromString(n,Qt)}catch(s){}if(!e||!e.documentElement){e=et.createDocument(Vt,"template",null);try{e.documentElement.innerHTML=Gt?tt:n}catch(s){}}const o=e.body||e.documentElement;return t&&i&&o.insertBefore(r.createTextNode(i),o.childNodes[0]||null),Vt===Yt?nt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:o},ge=function(t){return it.call(t.ownerDocument||t,t,T.SHOW_ELEMENT|T.SHOW_COMMENT|T.SHOW_TEXT,null)},me=function(t){return t instanceof q&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof D)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},ye=function(t){return"function"==typeof _&&t instanceof _},xe=function(t,e,r){st[t]&&h(st[t],(t=>{t.call(i,e,r,ie)}))},be=function(t){let e=null;if(xe("beforeSanitizeElements",t,null),me(t))return de(t),!0;const r=ee(t.nodeName);if(xe("uponSanitizeElement",t,{tagName:r,allowedTags:gt}),t.hasChildNodes()&&!ye(t.firstElementChild)&&b(/<[/\w]/g,t.innerHTML)&&b(/<[/\w]/g,t.textContent))return de(t),!0;if(!gt[r]||Ct[r]){if(!Ct[r]&&_e(r)){if(bt.tagNameCheck instanceof RegExp&&b(bt.tagNameCheck,r))return!1;if(bt.tagNameCheck instanceof Function&&bt.tagNameCheck(r))return!1}if(Ot&&!qt[r]){const e=Q(t)||t.parentNode,i=J(t)||t.childNodes;if(i&&e)for(let r=i.length-1;r>=0;--r)e.insertBefore(H(i[r],!0),W(t))}return de(t),!0}return t instanceof v&&!ue(t)?(de(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!b(/<\/no(script|embed|frames)/i,t.innerHTML)?(St&&3===t.nodeType&&(e=t.textContent,h([at,lt,ct],(t=>{e=m(e,t," ")})),t.textContent!==e&&(d(i.removed,{element:t.cloneNode()}),t.textContent=e)),xe("afterSanitizeElements",t,null),!1):(de(t),!0)},Ce=function(t,e,i){if(Nt&&("id"===e||"name"===e)&&(i in r||i in re))return!1;if(kt&&!_t[e]&&b(ht,e));else if(vt&&b(ut,e));else if(!yt[e]||_t[e]){if(!(_e(t)&&(bt.tagNameCheck instanceof RegExp&&b(bt.tagNameCheck,t)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(t))&&(bt.attributeNameCheck instanceof RegExp&&b(bt.attributeNameCheck,e)||bt.attributeNameCheck instanceof Function&&bt.attributeNameCheck(e))||"is"===e&&bt.allowCustomizedBuiltInElements&&(bt.tagNameCheck instanceof RegExp&&b(bt.tagNameCheck,i)||bt.tagNameCheck instanceof Function&&bt.tagNameCheck(i))))return!1}else if(Rt[e]);else if(b(pt,m(i,ft,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==y(i,"data:")||!zt[t])if(Tt&&!b(dt,m(i,ft,"")));else if(i)return!1;return!0},_e=function(t){return t.indexOf("-")>0},ve=function(t){xe("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:yt};let n=e.length;for(;n--;){const s=e[n],{name:a,namespaceURI:l,value:c}=s,d=ee(a);let f="value"===a?c:x(c);if(r.attrName=d,r.attrValue=f,r.keepAttr=!0,r.forceKeepAttr=void 0,xe("uponSanitizeAttribute",t,r),f=r.attrValue,r.forceKeepAttr)continue;if(fe(a,t),!r.keepAttr)continue;if(!wt&&b(/\/>/i,f)){fe(a,t);continue}St&&h([at,lt,ct],(t=>{f=m(f,t," ")}));const p=ee(t.nodeName);if(Ce(p,d,f)){if(!Zt||"id"!==d&&"name"!==d||(fe(a,t),f=jt+f),K&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(l);else switch(z.getAttributeType(p,d)){case"TrustedHTML":f=K.createHTML(f);break;case"TrustedScriptURL":f=K.createScriptURL(f)}try{l?t.setAttributeNS(l,a,f):t.setAttribute(a,f),u(i.removed)}catch(o){}}}xe("afterSanitizeAttributes",t,null)},ke=function t(e){let i=null;const r=ge(e);for(xe("beforeSanitizeShadowDOM",e,null);i=r.nextNode();)xe("uponSanitizeShadowNode",i,null),be(i)||(i.content instanceof l&&t(i.content),ve(i));xe("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,a=null;if(Gt=!t,Gt&&(t="\x3c!--\x3e"),"string"!=typeof t&&!ye(t)){if("function"!=typeof t.toString)throw C("toString is not a function");if("string"!=typeof(t=t.toString()))throw C("dirty is not a string, aborting")}if(!i.isSupported)return t;if(Ft||oe(e),i.removed=[],"string"==typeof t&&(It=!1),It){if(t.nodeName){const e=ee(t.nodeName);if(!gt[e]||Ct[e])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof _)r=pe("\x3c!----\x3e"),o=r.ownerDocument.importNode(t,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!At&&!St&&!Bt&&-1===t.indexOf("<"))return K&&Et?K.createHTML(t):t;if(r=pe(t),!r)return At?null:Et?tt:""}r&&Lt&&de(r.firstChild);const c=ge(It?t:r);for(;s=c.nextNode();)be(s)||(s.content instanceof l&&ke(s.content),ve(s));if(It)return t;if(At){if(Mt)for(a=rt.call(r.ownerDocument);r.firstChild;)a.appendChild(r.firstChild);else a=r;return(yt.shadowroot||yt.shadowrootmode)&&(a=ot.call(n,a,!0)),a}let u=Bt?r.outerHTML:r.innerHTML;return Bt&>["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&b(U,r.ownerDocument.doctype.name)&&(u="\n"+u),St&&h([at,lt,ct],(t=>{u=m(u,t," ")})),K&&Et?K.createHTML(u):u},i.setConfig=function(){oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ft=!0},i.clearConfig=function(){ie=null,Ft=!1},i.isValidAttribute=function(t,e,i){ie||oe({});const r=ee(t),n=ee(e);return Ce(r,n,i)},i.addHook=function(t,e){"function"==typeof e&&(st[t]=st[t]||[],d(st[t],e))},i.removeHook=function(t){if(st[t])return u(st[t])},i.removeHooks=function(t){st[t]&&(st[t]=[])},i.removeAllHooks=function(){st={}},i}return X()}()},7594:(t,e)=>{function i(t){let e,i=[];for(let r of t.split(",").map((t=>t.trim())))if(/^-?\d+$/.test(r))i.push(parseInt(r,10));else if(e=r.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[t,r,n,o]=e;if(r&&o){r=parseInt(r),o=parseInt(o);const t=r{"use strict";function r(t){for(var e=[],i=1;ir})},1151:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a,a:()=>s});var r=i(7294);const n={},o=r.createContext(n);function s(t){const e=r.useContext(o);return r.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function a(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(n):t.components||n:s(t.components),r.createElement(o.Provider,{value:e},t.children)}},4218:(t,e,i)=>{"use strict";function r(t,e){let i;if(void 0===e)for(const r of t)null!=r&&(i=r)&&(i=r);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(i=n)&&(i=n)}return i}function n(t,e){let i;if(void 0===e)for(const r of t)null!=r&&(i>r||void 0===i&&r>=r)&&(i=r);else{let r=-1;for(let n of t)null!=(n=e(n,++r,t))&&(i>n||void 0===i&&n>=n)&&(i=n)}return i}function o(t){return t}i.d(e,{Nb1:()=>ca,LLu:()=>x,F5q:()=>y,$0Z:()=>va,Dts:()=>Ta,WQY:()=>Sa,qpX:()=>Fa,u93:()=>La,tFB:()=>Ma,YY7:()=>Za,OvA:()=>Oa,dCK:()=>Da,zgE:()=>za,fGX:()=>Ra,$m7:()=>Wa,c_6:()=>da,fxm:()=>Ya,FdL:()=>el,ak_:()=>il,SxZ:()=>ol,eA_:()=>al,jsv:()=>cl,iJ:()=>ll,JHv:()=>pr,jvg:()=>ga,Fp7:()=>r,VV$:()=>n,ve8:()=>xa,tiA:()=>kr,BYU:()=>mn,PKp:()=>vr,Xf:()=>Ns,K2I:()=>Zs,Ys:()=>js,td_:()=>Os,YPS:()=>Yi,rr1:()=>Nn,i$Z:()=>uo,y2j:()=>Pn,WQD:()=>Mn,U8T:()=>Bn,Z_i:()=>Ln,Ox9:()=>Dn,F0B:()=>Qn,LqH:()=>Rn,S1K:()=>Fn,Zyz:()=>In,Igq:()=>zn,YDX:()=>qn,EFj:()=>$n});var s=1,a=2,l=3,c=4,h=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function f(t){return e=>+t(e)}function p(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),i=>+t(i)+e}function g(){return!this.__axis}function m(t,e){var i=[],r=null,n=null,m=6,y=6,x=3,b="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,C=t===s||t===c?-1:1,_=t===c||t===a?"x":"y",v=t===s||t===l?u:d;function k(u){var d=null==r?e.ticks?e.ticks.apply(e,i):e.domain():r,k=null==n?e.tickFormat?e.tickFormat.apply(e,i):o:n,T=Math.max(m,0)+x,w=e.range(),S=+w[0]+b,B=+w[w.length-1]+b,F=(e.bandwidth?p:f)(e.copy(),b),L=u.selection?u.selection():u,A=L.selectAll(".domain").data([null]),M=L.selectAll(".tick").data(d,e).order(),E=M.exit(),N=M.enter().append("g").attr("class","tick"),Z=M.select("line"),j=M.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),M=M.merge(N),Z=Z.merge(N.append("line").attr("stroke","currentColor").attr(_+"2",C*m)),j=j.merge(N.append("text").attr("fill","currentColor").attr(_,C*T).attr("dy",t===s?"0em":t===l?"0.71em":"0.32em")),u!==L&&(A=A.transition(u),M=M.transition(u),Z=Z.transition(u),j=j.transition(u),E=E.transition(u).attr("opacity",h).attr("transform",(function(t){return isFinite(t=F(t))?v(t+b):this.getAttribute("transform")})),N.attr("opacity",h).attr("transform",(function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:F(t))+b)}))),E.remove(),A.attr("d",t===c||t===a?y?"M"+C*y+","+S+"H"+b+"V"+B+"H"+C*y:"M"+b+","+S+"V"+B:y?"M"+S+","+C*y+"V"+b+"H"+B+"V"+C*y:"M"+S+","+b+"H"+B),M.attr("opacity",1).attr("transform",(function(t){return v(F(t)+b)})),Z.attr(_+"2",C*m),j.attr(_,C*T).text(k),L.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===a?"start":t===c?"end":"middle"),L.each((function(){this.__axis=F}))}return k.scale=function(t){return arguments.length?(e=t,k):e},k.ticks=function(){return i=Array.from(arguments),k},k.tickArguments=function(t){return arguments.length?(i=null==t?[]:Array.from(t),k):i.slice()},k.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),k):r&&r.slice()},k.tickFormat=function(t){return arguments.length?(n=t,k):n},k.tickSize=function(t){return arguments.length?(m=y=+t,k):m},k.tickSizeInner=function(t){return arguments.length?(m=+t,k):m},k.tickSizeOuter=function(t){return arguments.length?(y=+t,k):y},k.tickPadding=function(t){return arguments.length?(x=+t,k):x},k.offset=function(t){return arguments.length?(b=+t,k):b},k}function y(t){return m(s,t)}function x(t){return m(l,t)}function b(){}function C(t){return null==t?b:function(){return this.querySelector(t)}}function _(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function v(){return[]}function k(t){return null==t?v:function(){return this.querySelectorAll(t)}}function T(t){return function(){return this.matches(t)}}function w(t){return function(e){return e.matches(t)}}var S=Array.prototype.find;function B(){return this.firstElementChild}var F=Array.prototype.filter;function L(){return Array.from(this.children)}function A(t){return new Array(t.length)}function M(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function E(t,e,i,r,n,o){for(var s,a=0,l=e.length,c=o.length;ae?1:t>=e?0:NaN}M.prototype={constructor:M,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var I="http://www.w3.org/1999/xhtml";const D={svg:"http://www.w3.org/2000/svg",xhtml:I,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function q(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),D.hasOwnProperty(e)?{space:D[e],local:t}:t}function $(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function P(t,e){return function(){this.setAttribute(t,e)}}function R(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function H(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function W(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function U(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Y(t){return function(){this.style.removeProperty(t)}}function V(t,e,i){return function(){this.style.setProperty(t,e,i)}}function G(t,e,i){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,i)}}function X(t,e){return t.style.getPropertyValue(e)||U(t).getComputedStyle(t,null).getPropertyValue(e)}function J(t){return function(){delete this[t]}}function Q(t,e){return function(){this[t]=e}}function K(t,e){return function(){var i=e.apply(this,arguments);null==i?delete this[t]:this[t]=i}}function tt(t){return t.trim().split(/^|\s+/)}function et(t){return t.classList||new it(t)}function it(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function rt(t,e){for(var i=et(t),r=-1,n=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ft=[null];function Lt(t,e){this._groups=t,this._parents=e}function At(){return new Lt([[document.documentElement]],Ft)}Lt.prototype=At.prototype={constructor:Lt,select:function(t){"function"!=typeof t&&(t=C(t));for(var e=this._groups,i=e.length,r=new Array(i),n=0;n=_&&(_=C+1);!(b=y[_])&&++_=0;)(r=n[o])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function e(e,i){return e&&i?t(e.__data__,i.__data__):!e-!i}t||(t=O);for(var i=this._groups,r=i.length,n=new Array(r),o=0;o1?this.each((null==e?Y:"function"==typeof e?G:V)(t,e,null==i?"":i)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?J:"function"==typeof e?K:Q)(t,e)):this.node()[t]},classed:function(t,e){var i=tt(t+"");if(arguments.length<2){for(var r=et(this.node()),n=-1,o=i.length;++n=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}}))}(t+""),s=o.length;if(!(arguments.length<2)){for(a=e?Tt:kt,r=0;r{}};function Nt(){for(var t,e=0,i=arguments.length,r={};e=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++s0)for(var i,r,n=new Array(i),o=0;o=0&&e._call.call(void 0,t),e=e._next;--$t}()}finally{$t=0,function(){var t,e,i=Dt,r=1/0;for(;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(e=i._next,i._next=null,i=t?t._next=e:Dt=e);qt=t,ee(r)}(),Wt=0}}function te(){var t=Yt.now(),e=t-Ht;e>Rt&&(Ut-=e,Ht=t)}function ee(t){$t||(zt&&(zt=clearTimeout(zt)),t-Wt>24?(t<1/0&&(zt=setTimeout(Kt,t-Yt.now()-Ut)),Pt&&(Pt=clearInterval(Pt))):(Pt||(Ht=Yt.now(),Pt=setInterval(te,Rt)),$t=1,Vt(Kt)))}function ie(t,e,i){var r=new Jt;return e=null==e?0:+e,r.restart((i=>{r.stop(),t(i+e)}),e,i),r}Jt.prototype=Qt.prototype={constructor:Jt,restart:function(t,e,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?Gt():+i)+(null==e?0:+e),this._next||qt===this||(qt?qt._next=this:Dt=this,qt=this),this._call=t,this._time=i,ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,ee())}};var re=It("start","end","cancel","interrupt"),ne=[],oe=0,se=1,ae=2,le=3,ce=4,he=5,ue=6;function de(t,e,i,r,n,o){var s=t.__transition;if(s){if(i in s)return}else t.__transition={};!function(t,e,i){var r,n=t.__transition;function o(t){i.state=se,i.timer.restart(s,i.delay,i.time),i.delay<=t&&s(t-i.delay)}function s(o){var c,h,u,d;if(i.state!==se)return l();for(c in n)if((d=n[c]).name===i.name){if(d.state===le)return ie(s);d.state===ce?(d.state=ue,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[c]):+coe)throw new Error("too late; already scheduled");return i}function pe(t,e){var i=ge(t,e);if(i.state>le)throw new Error("too late; already running");return i}function ge(t,e){var i=t.__transition;if(!i||!(i=i[e]))throw new Error("transition not found");return i}function me(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}var ye,xe=180/Math.PI,be={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ce(t,e,i,r,n,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*i+e*r)&&(i-=t*l,r-=e*l),(a=Math.sqrt(i*i+r*r))&&(i/=a,r/=a,l/=a),t*r180?e+=360:e-t>180&&(t+=360),o.push({i:i.push(n(i)+"rotate(",null,r)-2,x:me(t,e)})):e&&i.push(n(i)+"rotate("+e+r)}(o.rotate,s.rotate,a,l),function(t,e,i,o){t!==e?o.push({i:i.push(n(i)+"skewX(",null,r)-2,x:me(t,e)}):e&&i.push(n(i)+"skewX("+e+r)}(o.skewX,s.skewX,a,l),function(t,e,i,r,o,s){if(t!==i||e!==r){var a=o.push(n(o)+"scale(",null,",",null,")");s.push({i:a-4,x:me(t,i)},{i:a-2,x:me(e,r)})}else 1===i&&1===r||o.push(n(o)+"scale("+i+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,l),o=s=null,function(t){for(var e,i=-1,r=l.length;++i>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?Ye(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?Ye(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Oe.exec(t))?new Xe(e[1],e[2],e[3],1):(e=Ie.exec(t))?new Xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=De.exec(t))?Ye(e[1],e[2],e[3],e[4]):(e=qe.exec(t))?Ye(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$e.exec(t))?ii(e[1],e[2]/100,e[3]/100,1):(e=ze.exec(t))?ii(e[1],e[2]/100,e[3]/100,e[4]):Pe.hasOwnProperty(t)?Ue(Pe[t]):"transparent"===t?new Xe(NaN,NaN,NaN,0):null}function Ue(t){return new Xe(t>>16&255,t>>8&255,255&t,1)}function Ye(t,e,i,r){return r<=0&&(t=e=i=NaN),new Xe(t,e,i,r)}function Ve(t){return t instanceof Le||(t=We(t)),t?new Xe((t=t.rgb()).r,t.g,t.b,t.opacity):new Xe}function Ge(t,e,i,r){return 1===arguments.length?Ve(t):new Xe(t,e,i,null==r?1:r)}function Xe(t,e,i,r){this.r=+t,this.g=+e,this.b=+i,this.opacity=+r}function Je(){return`#${ei(this.r)}${ei(this.g)}${ei(this.b)}`}function Qe(){const t=Ke(this.opacity);return`${1===t?"rgb(":"rgba("}${ti(this.r)}, ${ti(this.g)}, ${ti(this.b)}${1===t?")":`, ${t})`}`}function Ke(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ti(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ei(t){return((t=ti(t))<16?"0":"")+t.toString(16)}function ii(t,e,i,r){return r<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new ni(t,e,i,r)}function ri(t){if(t instanceof ni)return new ni(t.h,t.s,t.l,t.opacity);if(t instanceof Le||(t=We(t)),!t)return new ni;if(t instanceof ni)return t;var e=(t=t.rgb()).r/255,i=t.g/255,r=t.b/255,n=Math.min(e,i,r),o=Math.max(e,i,r),s=NaN,a=o-n,l=(o+n)/2;return a?(s=e===o?(i-r)/a+6*(i0&&l<1?0:s,new ni(s,a,l,t.opacity)}function ni(t,e,i,r){this.h=+t,this.s=+e,this.l=+i,this.opacity=+r}function oi(t){return(t=(t||0)%360)<0?t+360:t}function si(t){return Math.max(0,Math.min(1,t||0))}function ai(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}function li(t,e,i,r,n){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*i+(1+3*t+3*o-3*s)*r+s*n)/6}Be(Le,We,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Re,formatHex:Re,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ri(this).formatHsl()},formatRgb:He,toString:He}),Be(Xe,Ge,Fe(Le,{brighter(t){return t=null==t?Me:Math.pow(Me,t),new Xe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Ae:Math.pow(Ae,t),new Xe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Xe(ti(this.r),ti(this.g),ti(this.b),Ke(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatHex8:function(){return`#${ei(this.r)}${ei(this.g)}${ei(this.b)}${ei(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Qe,toString:Qe})),Be(ni,(function(t,e,i,r){return 1===arguments.length?ri(t):new ni(t,e,i,null==r?1:r)}),Fe(Le,{brighter(t){return t=null==t?Me:Math.pow(Me,t),new ni(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Ae:Math.pow(Ae,t),new ni(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,r=i+(i<.5?i:1-i)*e,n=2*i-r;return new Xe(ai(t>=240?t-240:t+120,n,r),ai(t,n,r),ai(t<120?t+240:t-120,n,r),this.opacity)},clamp(){return new ni(oi(this.h),si(this.s),si(this.l),Ke(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ke(this.opacity);return`${1===t?"hsl(":"hsla("}${oi(this.h)}, ${100*si(this.s)}%, ${100*si(this.l)}%${1===t?")":`, ${t})`}`}}));const ci=t=>()=>t;function hi(t,e){return function(i){return t+i*e}}function ui(t){return 1==(t=+t)?di:function(e,i){return i-e?function(t,e,i){return t=Math.pow(t,i),e=Math.pow(e,i)-t,i=1/i,function(r){return Math.pow(t+r*e,i)}}(e,i,t):ci(isNaN(e)?i:e)}}function di(t,e){var i=e-t;return i?hi(t,i):ci(isNaN(t)?e:t)}const fi=function t(e){var i=ui(e);function r(t,e){var r=i((t=Ge(t)).r,(e=Ge(e)).r),n=i(t.g,e.g),o=i(t.b,e.b),s=di(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=n(e),t.b=o(e),t.opacity=s(e),t+""}}return r.gamma=t,r}(1);function pi(t){return function(e){var i,r,n=e.length,o=new Array(n),s=new Array(n),a=new Array(n);for(i=0;i=1?(i=1,e-1):Math.floor(i*e),n=t[r],o=t[r+1],s=r>0?t[r-1]:2*n-o,a=ro&&(n=e.slice(o,n),a[s]?a[s]+=n:a[++s]=n),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:me(i,r)})),o=mi.lastIndex;return o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?fe:pe;return function(){var s=o(this,t),a=s.on;a!==r&&(n=(r=a).copy()).on(e,i),s.on=n}}(i,t,e))},attr:function(t,e){var i=q(t),r="transform"===i?ke:xi;return this.attrTween(t,"function"==typeof e?(i.local?Ti:ki)(i,r,Se(this,"attr."+t,e)):null==e?(i.local?Ci:bi)(i):(i.local?vi:_i)(i,r,e))},attrTween:function(t,e){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;var r=q(t);return this.tween(i,(r.local?wi:Si)(r,e))},style:function(t,e,i){var r="transform"==(t+="")?ve:xi;return null==e?this.styleTween(t,function(t,e){var i,r,n;return function(){var o=X(this,t),s=(this.style.removeProperty(t),X(this,t));return o===s?null:o===i&&s===r?n:n=e(i=o,r=s)}}(t,r)).on("end.style."+t,Ei(t)):"function"==typeof e?this.styleTween(t,function(t,e,i){var r,n,o;return function(){var s=X(this,t),a=i(this),l=a+"";return null==a&&(this.style.removeProperty(t),l=a=X(this,t)),s===l?null:s===r&&l===n?o:(n=l,o=e(r=s,a))}}(t,r,Se(this,"style."+t,e))).each(function(t,e){var i,r,n,o,s="style."+e,a="end."+s;return function(){var l=pe(this,t),c=l.on,h=null==l.value[s]?o||(o=Ei(e)):void 0;c===i&&n===h||(r=(i=c).copy()).on(a,n=h),l.on=r}}(this._id,t)):this.styleTween(t,function(t,e,i){var r,n,o=i+"";return function(){var s=X(this,t);return s===o?null:s===r?n:n=e(r=s,i)}}(t,r,e),i).on("end.style."+t,null)},styleTween:function(t,e,i){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,i){var r,n;function o(){var o=e.apply(this,arguments);return o!==n&&(r=(n=o)&&function(t,e,i){return function(r){this.style.setProperty(t,e.call(this,r),i)}}(t,o,i)),r}return o._value=e,o}(t,e,null==i?"":i))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Se(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,i;function r(){var r=t.apply(this,arguments);return r!==i&&(e=(i=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var i in this.__transition)if(+i!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var i=this._id;if(t+="",arguments.length<2){for(var r,n=ge(this.node(),i).tween,o=0,s=n.length;oae&&i.statefunction(t,e){return fetch(t,e).then(Wi)}(e,i).then((e=>(new DOMParser).parseFromString(e,t)))}Ui("application/xml");Ui("text/html");var Yi=Ui("image/svg+xml");const Vi=Math.PI/180,Gi=180/Math.PI,Xi=.96422,Ji=1,Qi=.82521,Ki=4/29,tr=6/29,er=3*tr*tr,ir=tr*tr*tr;function rr(t){if(t instanceof nr)return new nr(t.l,t.a,t.b,t.opacity);if(t instanceof ur)return dr(t);t instanceof Xe||(t=Ve(t));var e,i,r=lr(t.r),n=lr(t.g),o=lr(t.b),s=or((.2225045*r+.7168786*n+.0606169*o)/Ji);return r===n&&n===o?e=i=s:(e=or((.4360747*r+.3850649*n+.1430804*o)/Xi),i=or((.0139322*r+.0971045*n+.7141733*o)/Qi)),new nr(116*s-16,500*(e-s),200*(s-i),t.opacity)}function nr(t,e,i,r){this.l=+t,this.a=+e,this.b=+i,this.opacity=+r}function or(t){return t>ir?Math.pow(t,1/3):t/er+Ki}function sr(t){return t>tr?t*t*t:er*(t-Ki)}function ar(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function lr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cr(t){if(t instanceof ur)return new ur(t.h,t.c,t.l,t.opacity);if(t instanceof nr||(t=rr(t)),0===t.a&&0===t.b)return new ur(NaN,0180||i<-180?i-360*Math.round(i/360):i):ci(isNaN(t)?e:t)}));fr(di);function gr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class mr extends Map{constructor(t,e=Cr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[i,r]of t)this.set(i,r)}get(t){return super.get(yr(this,t))}has(t){return super.has(yr(this,t))}set(t,e){return super.set(xr(this,t),e)}delete(t){return super.delete(br(this,t))}}Set;function yr({_intern:t,_key:e},i){const r=e(i);return t.has(r)?t.get(r):i}function xr({_intern:t,_key:e},i){const r=e(i);return t.has(r)?t.get(r):(t.set(r,i),i)}function br({_intern:t,_key:e},i){const r=e(i);return t.has(r)&&(i=t.get(r),t.delete(r)),i}function Cr(t){return null!==t&&"object"==typeof t?t.valueOf():t}const _r=Symbol("implicit");function vr(){var t=new mr,e=[],i=[],r=_r;function n(n){let o=t.get(n);if(void 0===o){if(r!==_r)return r;t.set(n,o=e.push(n)-1)}return i[o%i.length]}return n.domain=function(i){if(!arguments.length)return e.slice();e=[],t=new mr;for(const r of i)t.has(r)||t.set(r,e.push(r)-1);return n},n.range=function(t){return arguments.length?(i=Array.from(t),n):i.slice()},n.unknown=function(t){return arguments.length?(r=t,n):r},n.copy=function(){return vr(e,i).unknown(r)},gr.apply(n,arguments),n}function kr(){var t,e,i=vr().unknown(void 0),r=i.domain,n=i.range,o=0,s=1,a=!1,l=0,c=0,h=.5;function u(){var i=r().length,u=s=Tr?10:o>=wr?5:o>=Sr?2:1;let a,l,c;return n<0?(c=Math.pow(10,-n)/s,a=Math.round(t*c),l=Math.round(e*c),a/ce&&--l,c=-c):(c=Math.pow(10,n)*s,a=Math.round(t/c),l=Math.round(e/c),a*ce&&--l),le?1:t>=e?0:NaN}function Mr(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Er(t){let e,i,r;function n(t,r,n=0,o=t.length){if(n>>1;i(t[e],r)<0?n=e+1:o=e}while(nAr(t(e),i),r=(e,i)=>t(e)-i):(e=t===Ar||t===Mr?t:Nr,i=t,r=t),{left:n,center:function(t,e,i=0,o=t.length){const s=n(t,e,i,o-1);return s>i&&r(t[s-1],e)>-r(t[s],e)?s-1:s},right:function(t,r,n=0,o=t.length){if(n>>1;i(t[e],r)<=0?n=e+1:o=e}while(ne&&(i=t,t=e,e=i),c=function(i){return Math.max(t,Math.min(e,i))}),r=l>2?Vr:Yr,n=o=null,u}function u(e){return null==e||isNaN(e=+e)?i:(n||(n=r(s.map(t),a,l)))(t(c(e)))}return u.invert=function(i){return c(e((o||(o=r(a,s.map(t),me)))(i)))},u.domain=function(t){return arguments.length?(s=Array.from(t,Rr),h()):s.slice()},u.range=function(t){return arguments.length?(a=Array.from(t),h()):a.slice()},u.rangeRound=function(t){return a=Array.from(t),l=Pr,h()},u.clamp=function(t){return arguments.length?(c=!!t||Wr,h()):c!==Wr},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i,r){return t=i,e=r,h()}}function Jr(){return Xr()(Wr,Wr)}var Qr,Kr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function tn(t){if(!(e=Kr.exec(t)))throw new Error("invalid format: "+t);var e;return new en({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function en(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function rn(t,e){if((i=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var i,r=t.slice(0,i);return[r.length>1?r[0]+r.slice(2):r,+t.slice(i+1)]}function nn(t){return(t=rn(Math.abs(t)))?t[1]:NaN}function on(t,e){var i=rn(t,e);if(!i)return t+"";var r=i[0],n=i[1];return n<0?"0."+new Array(-n).join("0")+r:r.length>n+1?r.slice(0,n+1)+"."+r.slice(n+1):r+new Array(n-r.length+2).join("0")}tn.prototype=en.prototype,en.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const sn={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>on(100*t,e),r:on,s:function(t,e){var i=rn(t,e);if(!i)return t+"";var r=i[0],n=i[1],o=n-(Qr=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+rn(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function an(t){return t}var ln,cn,hn,un=Array.prototype.map,dn=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function fn(t){var e,i,r=void 0===t.grouping||void 0===t.thousands?an:(e=un.call(t.grouping,Number),i=t.thousands+"",function(t,r){for(var n=t.length,o=[],s=0,a=e[0],l=0;n>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(t.substring(n-=a,n+a)),!((l+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(i)}),n=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?an:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(un.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=tn(t)).fill,i=t.align,u=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,x=t.type;"n"===x?(g=!0,x="g"):sn[x]||(void 0===m&&(m=12),y=!0,x="g"),(f||"0"===e&&"="===i)&&(f=!0,e="0",i="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",C="$"===d?o:/[%p]/.test(x)?l:"",_=sn[x],v=/[defgprs%]/.test(x);function k(t){var n,o,l,d=b,k=C;if("c"===x)k=_(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:_(Math.abs(t),m),y&&(t=function(t){t:for(var e,i=t.length,r=1,n=-1;r0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==u&&(T=!1),d=(T?"("===u?u:c:"-"===u||"("===u?"":u)+d,k=("s"===x?dn[8+Qr/3]:"")+k+(T&&"("===u?")":""),v)for(n=-1,o=t.length;++n(l=t.charCodeAt(n))||l>57){k=(46===l?s+t.slice(n+1):t.slice(n))+k,t=t.slice(0,n);break}}g&&!f&&(t=r(t,1/0));var w=d.length+t.length+k.length,S=w>1)+d+t+k+S.slice(w);break;default:t=S+d+t+k}return a(t)}return m=void 0===m?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),k.toString=function(){return t+""},k}return{format:u,formatPrefix:function(t,e){var i=u(((t=tn(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(nn(e)/3))),n=Math.pow(10,-r),o=dn[8+r/3];return function(t){return i(n*t)+o}}}}function pn(t,e,i,r){var n,o=Lr(t,e,i);switch((r=tn(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(n=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(nn(e)/3)))-nn(Math.abs(t)))}(o,s))||(r.precision=n),hn(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(n=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,nn(e)-nn(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=n-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(n=function(t){return Math.max(0,-nn(Math.abs(t)))}(o))||(r.precision=n-2*("%"===r.type))}return cn(r)}function gn(t){var e=t.domain;return t.ticks=function(t){var i=e();return function(t,e,i){if(!((i=+i)>0))return[];if((t=+t)==(e=+e))return[t];const r=e=n))return[];const a=o-n+1,l=new Array(a);if(r)if(s<0)for(let c=0;c0;){if((n=Fr(l,c,i))===r)return o[s]=l,o[a]=c,e(o);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}r=n}return t},t}function mn(){var t=Jr();return t.copy=function(){return Gr(t,mn())},gr.apply(t,arguments),gn(t)}ln=fn({thousands:",",grouping:[3],currency:["$",""]}),cn=ln.format,hn=ln.formatPrefix;const yn=1e3,xn=6e4,bn=36e5,Cn=864e5,_n=6048e5,vn=2592e6,kn=31536e6,Tn=new Date,wn=new Date;function Sn(t,e,i,r){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=i=>(t(i=new Date(i-1)),e(i,1),t(i),i),n.round=t=>{const e=n(t),i=n.ceil(t);return t-e(e(t=new Date(+t),null==i?1:Math.floor(i)),t),n.range=(i,r,o)=>{const s=[];if(i=n.ceil(i),o=null==o?1:Math.floor(o),!(i0))return s;let a;do{s.push(a=new Date(+i)),e(i,o),t(i)}while(aSn((e=>{if(e>=e)for(;t(e),!i(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!i(t););else for(;--r>=0;)for(;e(t,1),!i(t););})),i&&(n.count=(e,r)=>(Tn.setTime(+e),wn.setTime(+r),t(Tn),t(wn),Math.floor(i(Tn,wn))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(r?e=>r(e)%t==0:e=>n.count(0,e)%t==0):n:null)),n}const Bn=Sn((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Bn.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Sn((e=>{e.setTime(Math.floor(e/t)*t)}),((e,i)=>{e.setTime(+e+i*t)}),((e,i)=>(i-e)/t)):Bn:null);Bn.range;const Fn=Sn((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*yn)}),((t,e)=>(e-t)/yn),(t=>t.getUTCSeconds())),Ln=(Fn.range,Sn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yn)}),((t,e)=>{t.setTime(+t+e*xn)}),((t,e)=>(e-t)/xn),(t=>t.getMinutes()))),An=(Ln.range,Sn((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*xn)}),((t,e)=>(e-t)/xn),(t=>t.getUTCMinutes()))),Mn=(An.range,Sn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yn-t.getMinutes()*xn)}),((t,e)=>{t.setTime(+t+e*bn)}),((t,e)=>(e-t)/bn),(t=>t.getHours()))),En=(Mn.range,Sn((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*bn)}),((t,e)=>(e-t)/bn),(t=>t.getUTCHours()))),Nn=(En.range,Sn((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*xn)/Cn),(t=>t.getDate()-1))),Zn=(Nn.range,Sn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Cn),(t=>t.getUTCDate()-1))),jn=(Zn.range,Sn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/Cn),(t=>Math.floor(t/Cn))));jn.range;function On(t){return Sn((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*xn)/_n))}const In=On(0),Dn=On(1),qn=On(2),$n=On(3),zn=On(4),Pn=On(5),Rn=On(6);In.range,Dn.range,qn.range,$n.range,zn.range,Pn.range,Rn.range;function Hn(t){return Sn((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/_n))}const Wn=Hn(0),Un=Hn(1),Yn=Hn(2),Vn=Hn(3),Gn=Hn(4),Xn=Hn(5),Jn=Hn(6),Qn=(Wn.range,Un.range,Yn.range,Vn.range,Gn.range,Xn.range,Jn.range,Sn((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Kn=(Qn.range,Sn((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),to=(Kn.range,Sn((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));to.every=t=>isFinite(t=Math.floor(t))&&t>0?Sn((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,i)=>{e.setFullYear(e.getFullYear()+i*t)})):null;to.range;const eo=Sn((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));eo.every=t=>isFinite(t=Math.floor(t))&&t>0?Sn((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,i)=>{e.setUTCFullYear(e.getUTCFullYear()+i*t)})):null;eo.range;function io(t,e,i,r,n,o){const s=[[Fn,1,yn],[Fn,5,5e3],[Fn,15,15e3],[Fn,30,3e4],[o,1,xn],[o,5,3e5],[o,15,9e5],[o,30,18e5],[n,1,bn],[n,3,108e5],[n,6,216e5],[n,12,432e5],[r,1,Cn],[r,2,1728e5],[i,1,_n],[e,1,vn],[e,3,7776e6],[t,1,kn]];function a(e,i,r){const n=Math.abs(i-e)/r,o=Er((([,,t])=>t)).right(s,n);if(o===s.length)return t.every(Lr(e/kn,i/kn,r));if(0===o)return Bn.every(Math.max(Lr(e,i,r),1));const[a,l]=s[n/s[o-1][2][t.toLowerCase(),e])))}function _o(t,e,i){var r=po.exec(e.slice(i,i+1));return r?(t.w=+r[0],i+r[0].length):-1}function vo(t,e,i){var r=po.exec(e.slice(i,i+1));return r?(t.u=+r[0],i+r[0].length):-1}function ko(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.U=+r[0],i+r[0].length):-1}function To(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.V=+r[0],i+r[0].length):-1}function wo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.W=+r[0],i+r[0].length):-1}function So(t,e,i){var r=po.exec(e.slice(i,i+4));return r?(t.y=+r[0],i+r[0].length):-1}function Bo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),i+r[0].length):-1}function Fo(t,e,i){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(i,i+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),i+r[0].length):-1}function Lo(t,e,i){var r=po.exec(e.slice(i,i+1));return r?(t.q=3*r[0]-3,i+r[0].length):-1}function Ao(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.m=r[0]-1,i+r[0].length):-1}function Mo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.d=+r[0],i+r[0].length):-1}function Eo(t,e,i){var r=po.exec(e.slice(i,i+3));return r?(t.m=0,t.d=+r[0],i+r[0].length):-1}function No(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.H=+r[0],i+r[0].length):-1}function Zo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.M=+r[0],i+r[0].length):-1}function jo(t,e,i){var r=po.exec(e.slice(i,i+2));return r?(t.S=+r[0],i+r[0].length):-1}function Oo(t,e,i){var r=po.exec(e.slice(i,i+3));return r?(t.L=+r[0],i+r[0].length):-1}function Io(t,e,i){var r=po.exec(e.slice(i,i+6));return r?(t.L=Math.floor(r[0]/1e3),i+r[0].length):-1}function Do(t,e,i){var r=go.exec(e.slice(i,i+1));return r?i+r[0].length:-1}function qo(t,e,i){var r=po.exec(e.slice(i));return r?(t.Q=+r[0],i+r[0].length):-1}function $o(t,e,i){var r=po.exec(e.slice(i));return r?(t.s=+r[0],i+r[0].length):-1}function zo(t,e){return yo(t.getDate(),e,2)}function Po(t,e){return yo(t.getHours(),e,2)}function Ro(t,e){return yo(t.getHours()%12||12,e,2)}function Ho(t,e){return yo(1+Nn.count(to(t),t),e,3)}function Wo(t,e){return yo(t.getMilliseconds(),e,3)}function Uo(t,e){return Wo(t,e)+"000"}function Yo(t,e){return yo(t.getMonth()+1,e,2)}function Vo(t,e){return yo(t.getMinutes(),e,2)}function Go(t,e){return yo(t.getSeconds(),e,2)}function Xo(t){var e=t.getDay();return 0===e?7:e}function Jo(t,e){return yo(In.count(to(t)-1,t),e,2)}function Qo(t){var e=t.getDay();return e>=4||0===e?zn(t):zn.ceil(t)}function Ko(t,e){return t=Qo(t),yo(zn.count(to(t),t)+(4===to(t).getDay()),e,2)}function ts(t){return t.getDay()}function es(t,e){return yo(Dn.count(to(t)-1,t),e,2)}function is(t,e){return yo(t.getFullYear()%100,e,2)}function rs(t,e){return yo((t=Qo(t)).getFullYear()%100,e,2)}function ns(t,e){return yo(t.getFullYear()%1e4,e,4)}function os(t,e){var i=t.getDay();return yo((t=i>=4||0===i?zn(t):zn.ceil(t)).getFullYear()%1e4,e,4)}function ss(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+yo(e/60|0,"0",2)+yo(e%60,"0",2)}function as(t,e){return yo(t.getUTCDate(),e,2)}function ls(t,e){return yo(t.getUTCHours(),e,2)}function cs(t,e){return yo(t.getUTCHours()%12||12,e,2)}function hs(t,e){return yo(1+Zn.count(eo(t),t),e,3)}function us(t,e){return yo(t.getUTCMilliseconds(),e,3)}function ds(t,e){return us(t,e)+"000"}function fs(t,e){return yo(t.getUTCMonth()+1,e,2)}function ps(t,e){return yo(t.getUTCMinutes(),e,2)}function gs(t,e){return yo(t.getUTCSeconds(),e,2)}function ms(t){var e=t.getUTCDay();return 0===e?7:e}function ys(t,e){return yo(Wn.count(eo(t)-1,t),e,2)}function xs(t){var e=t.getUTCDay();return e>=4||0===e?Gn(t):Gn.ceil(t)}function bs(t,e){return t=xs(t),yo(Gn.count(eo(t),t)+(4===eo(t).getUTCDay()),e,2)}function Cs(t){return t.getUTCDay()}function _s(t,e){return yo(Un.count(eo(t)-1,t),e,2)}function vs(t,e){return yo(t.getUTCFullYear()%100,e,2)}function ks(t,e){return yo((t=xs(t)).getUTCFullYear()%100,e,2)}function Ts(t,e){return yo(t.getUTCFullYear()%1e4,e,4)}function ws(t,e){var i=t.getUTCDay();return yo((t=i>=4||0===i?Gn(t):Gn.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ss(){return"+0000"}function Bs(){return"%"}function Fs(t){return+t}function Ls(t){return Math.floor(+t/1e3)}function As(t){return new Date(t)}function Ms(t){return t instanceof Date?+t:+new Date(+t)}function Es(t,e,i,r,n,o,s,a,l,c){var h=Jr(),u=h.invert,d=h.domain,f=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),y=c("%a %d"),x=c("%b %d"),b=c("%B"),C=c("%Y");function _(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Fs,s:Ls,S:Go,u:Xo,U:Jo,V:Ko,w:ts,W:es,x:null,X:null,y:is,Y:ns,Z:ss,"%":Bs},C={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:as,e:as,f:ds,g:ks,G:ws,H:ls,I:cs,j:hs,L:us,m:fs,M:ps,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Fs,s:Ls,S:gs,u:ms,U:ys,V:bs,w:Cs,W:_s,x:null,X:null,y:vs,Y:Ts,Z:Ss,"%":Bs},_={a:function(t,e,i){var r=f.exec(e.slice(i));return r?(t.w=p.get(r[0].toLowerCase()),i+r[0].length):-1},A:function(t,e,i){var r=u.exec(e.slice(i));return r?(t.w=d.get(r[0].toLowerCase()),i+r[0].length):-1},b:function(t,e,i){var r=y.exec(e.slice(i));return r?(t.m=x.get(r[0].toLowerCase()),i+r[0].length):-1},B:function(t,e,i){var r=g.exec(e.slice(i));return r?(t.m=m.get(r[0].toLowerCase()),i+r[0].length):-1},c:function(t,i,r){return T(t,e,i,r)},d:Mo,e:Mo,f:Io,g:Bo,G:So,H:No,I:No,j:Eo,L:Oo,m:Ao,M:Zo,p:function(t,e,i){var r=c.exec(e.slice(i));return r?(t.p=h.get(r[0].toLowerCase()),i+r[0].length):-1},q:Lo,Q:qo,s:$o,S:jo,u:vo,U:ko,V:To,w:_o,W:wo,x:function(t,e,r){return T(t,i,e,r)},X:function(t,e,i){return T(t,r,e,i)},y:Bo,Y:So,Z:Fo,"%":Do};function v(t,e){return function(i){var r,n,o,s=[],a=-1,l=0,c=t.length;for(i instanceof Date||(i=new Date(+i));++a53)return null;"w"in o||(o.w=1),"Z"in o?(n=(r=lo(co(o.y,0,1))).getUTCDay(),r=n>4||0===n?Un.ceil(r):Un(r),r=Zn.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(n=(r=ao(co(o.y,0,1))).getDay(),r=n>4||0===n?Dn.ceil(r):Dn(r),r=Nn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),n="Z"in o?lo(co(o.y,0,1)).getUTCDay():ao(co(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(n+5)%7:o.w+7*o.U-(n+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,lo(o)):ao(o)}}function T(t,e,i,r){for(var n,o,s=0,a=e.length,l=i.length;s=l)return-1;if(37===(n=e.charCodeAt(s++))){if(n=e.charAt(s++),!(o=_[n in fo?e.charAt(s++):n])||(r=o(t,i,r))<0)return-1}else if(n!=i.charCodeAt(r++))return-1}return r}return b.x=v(i,b),b.X=v(r,b),b.c=v(e,b),C.x=v(i,C),C.X=v(r,C),C.c=v(e,C),{format:function(t){var e=v(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=v(t+="",C);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}(t),uo=ho.format,ho.parse,ho.utcFormat,ho.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Zs=function(t){for(var e=t.length/6|0,i=new Array(e),r=0;r=1?Ys:t<=-1?-Ys:Math.asin(t)}const Xs=Math.PI,Js=2*Xs,Qs=1e-6,Ks=Js-Qs;function ta(t){this._+=t[0];for(let e=1,i=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ta;const i=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eQs)if(Math.abs(h*a-l*c)>Qs&&n){let d=i-o,f=r-s,p=a*a+l*l,g=d*d+f*f,m=Math.sqrt(p),y=Math.sqrt(u),x=n*Math.tan((Xs-Math.acos((p+u-g)/(2*m*y)))/2),b=x/y,C=x/m;Math.abs(b-1)>Qs&&this._append`L${t+b*c},${e+b*h}`,this._append`A${n},${n},0,0,${+(h*d>c*f)},${this._x1=t+C*a},${this._y1=e+C*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,i,r,n,o){if(t=+t,e=+e,o=!!o,(i=+i)<0)throw new Error(`negative radius: ${i}`);let s=i*Math.cos(r),a=i*Math.sin(r),l=t+s,c=e+a,h=1^o,u=o?r-n:n-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Qs||Math.abs(this._y1-c)>Qs)&&this._append`L${l},${c}`,i&&(u<0&&(u=u%Js+Js),u>Ks?this._append`A${i},${i},0,1,${h},${t-s},${e-a}A${i},${i},0,1,${h},${this._x1=l},${this._y1=c}`:u>Qs&&this._append`A${i},${i},0,${+(u>=Xs)},${h},${this._x1=t+i*Math.cos(n)},${this._y1=e+i*Math.sin(n)}`)}rect(t,e,i,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function ia(t){let e=3;return t.digits=function(i){if(!arguments.length)return e;if(null==i)e=null;else{const t=Math.floor(i);if(!(t>=0))throw new RangeError(`invalid digits: ${i}`);e=t}return t},()=>new ea(e)}function ra(t){return t.innerRadius}function na(t){return t.outerRadius}function oa(t){return t.startAngle}function sa(t){return t.endAngle}function aa(t){return t&&t.padAngle}function la(t,e,i,r,n,o,s){var a=t-i,l=e-r,c=(s?o:-o)/Hs(a*a+l*l),h=c*l,u=-c*a,d=t+h,f=e+u,p=i+h,g=r+u,m=(d+p)/2,y=(f+g)/2,x=p-d,b=g-f,C=x*x+b*b,_=n-o,v=d*g-p*f,k=(b<0?-1:1)*Hs(zs(0,_*_*C-v*v)),T=(v*b-x*k)/C,w=(-v*x-b*k)/C,S=(v*b+x*k)/C,B=(-v*x+b*k)/C,F=T-m,L=w-y,A=S-m,M=B-y;return F*F+L*L>A*A+M*M&&(T=S,w=B),{cx:T,cy:w,x01:-h,y01:-u,x11:T*(n/_-1),y11:w*(n/_-1)}}function ca(){var t=ra,e=na,i=Is(0),r=null,n=oa,o=sa,s=aa,a=null,l=ia(c);function c(){var c,h,u,d=+t.apply(this,arguments),f=+e.apply(this,arguments),p=n.apply(this,arguments)-Ys,g=o.apply(this,arguments)-Ys,m=Ds(g-p),y=g>p;if(a||(a=c=l()),fWs)if(m>Vs-Ws)a.moveTo(f*$s(p),f*Rs(p)),a.arc(0,0,f,p,g,!y),d>Ws&&(a.moveTo(d*$s(g),d*Rs(g)),a.arc(0,0,d,g,p,y));else{var x,b,C=p,_=g,v=p,k=g,T=m,w=m,S=s.apply(this,arguments)/2,B=S>Ws&&(r?+r.apply(this,arguments):Hs(d*d+f*f)),F=Ps(Ds(f-d)/2,+i.apply(this,arguments)),L=F,A=F;if(B>Ws){var M=Gs(B/d*Rs(S)),E=Gs(B/f*Rs(S));(T-=2*M)>Ws?(v+=M*=y?1:-1,k-=M):(T=0,v=k=(p+g)/2),(w-=2*E)>Ws?(C+=E*=y?1:-1,_-=E):(w=0,C=_=(p+g)/2)}var N=f*$s(C),Z=f*Rs(C),j=d*$s(k),O=d*Rs(k);if(F>Ws){var I,D=f*$s(_),q=f*Rs(_),$=d*$s(v),z=d*Rs(v);if(m1?0:u<-1?Us:Math.acos(u))/2),Y=Hs(I[0]*I[0]+I[1]*I[1]);L=Ps(F,(d-Y)/(U-1)),A=Ps(F,(f-Y)/(U+1))}else L=A=0}w>Ws?A>Ws?(x=la($,z,N,Z,f,A,y),b=la(D,q,j,O,f,A,y),a.moveTo(x.cx+x.x01,x.cy+x.y01),AWs&&T>Ws?L>Ws?(x=la(j,O,D,q,d,-L,y),b=la(N,Z,$,z,d,-L,y),a.lineTo(x.cx+x.x01,x.cy+x.y01),Lt?1:e>=t?0:NaN}function ya(t){return t}function xa(){var t=ya,e=ma,i=null,r=Is(0),n=Is(Vs),o=Is(0);function s(s){var a,l,c,h,u,d=(s=ha(s)).length,f=0,p=new Array(d),g=new Array(d),m=+r.apply(this,arguments),y=Math.min(Vs,Math.max(-Vs,n.apply(this,arguments)-m)),x=Math.min(Math.abs(y)/d,o.apply(this,arguments)),b=x*(y<0?-1:1);for(a=0;a0&&(f+=u);for(null!=e?p.sort((function(t,i){return e(g[t],g[i])})):null!=i&&p.sort((function(t,e){return i(s[t],s[e])})),a=0,c=f?(y-d*b)/f:0;a0?u*c:0)+b,g[l]={data:s[l],index:a,value:u,startAngle:m,endAngle:h,padAngle:x};return g}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:Is(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,i=null,s):e},s.sort=function(t){return arguments.length?(i=t,e=null,s):i},s.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Is(+t),s):r},s.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:Is(+t),s):n},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Is(+t),s):o},s}function ba(){}function Ca(t,e,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+i)/6)}function _a(t){this._context=t}function va(t){return new _a(t)}function ka(t){this._context=t}function Ta(t){return new ka(t)}function wa(t){this._context=t}function Sa(t){return new wa(t)}ua.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},_a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ca(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ca(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ka.prototype={areaStart:ba,areaEnd:ba,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Ca(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},wa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(i,r):this._context.moveTo(i,r);break;case 3:this._point=4;default:Ca(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class Ba{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function Fa(t){return new Ba(t,!0)}function La(t){return new Ba(t,!1)}function Aa(t,e){this._basis=new _a(t),this._beta=e}Aa.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,i=t.length-1;if(i>0)for(var r,n=t[0],o=e[0],s=t[i]-n,a=e[i]-o,l=-1;++l<=i;)r=l/i,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+r*s),this._beta*e[l]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Ma=function t(e){function i(t){return 1===e?new _a(t):new Aa(t,e)}return i.beta=function(e){return t(+e)},i}(.85);function Ea(t,e,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function Na(t,e){this._context=t,this._k=(1-e)/6}Na.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ea(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ea(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Za=function t(e){function i(t){return new Na(t,e)}return i.tension=function(e){return t(+e)},i}(0);function ja(t,e){this._context=t,this._k=(1-e)/6}ja.prototype={areaStart:ba,areaEnd:ba,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ea(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Oa=function t(e){function i(t){return new ja(t,e)}return i.tension=function(e){return t(+e)},i}(0);function Ia(t,e){this._context=t,this._k=(1-e)/6}Ia.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ea(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Da=function t(e){function i(t){return new Ia(t,e)}return i.tension=function(e){return t(+e)},i}(0);function qa(t,e,i){var r=t._x1,n=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Ws){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ws){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-i*t._l12_2a)/h}t._context.bezierCurveTo(r,n,o,s,t._x2,t._y2)}function $a(t,e){this._context=t,this._alpha=e}$a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:qa(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const za=function t(e){function i(t){return e?new $a(t,e):new Na(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Pa(t,e){this._context=t,this._alpha=e}Pa.prototype={areaStart:ba,areaEnd:ba,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:qa(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ra=function t(e){function i(t){return e?new Pa(t,e):new ja(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Ha(t,e){this._context=t,this._alpha=e}Ha.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var i=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qa(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Wa=function t(e){function i(t){return e?new Ha(t,e):new Ia(t,0)}return i.alpha=function(e){return t(+e)},i}(.5);function Ua(t){this._context=t}function Ya(t){return new Ua(t)}function Va(t){return t<0?-1:1}function Ga(t,e,i){var r=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(r||n<0&&-0),s=(i-t._y1)/(n||r<0&&-0),a=(o*n+s*r)/(r+n);return(Va(o)+Va(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function Xa(t,e){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-e)/2:e}function Ja(t,e,i){var r=t._x0,n=t._y0,o=t._x1,s=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,n+a*e,o-a,s-a*i,o,s)}function Qa(t){this._context=t}function Ka(t){this._context=new tl(t)}function tl(t){this._context=t}function el(t){return new Qa(t)}function il(t){return new Ka(t)}function rl(t){this._context=t}function nl(t){var e,i,r=t.length-1,n=new Array(r),o=new Array(r),s=new Array(r);for(n[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e=0;--e)n[e]=(s[e]-n[e+1])/o[e];for(o[r-1]=(t[r]+n[r-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}}this._x=t,this._y=e}},hl.prototype={constructor:hl,scale:function(t){return 1===t?this:new hl(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new hl(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new hl(1,0,0);hl.prototype},1883:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var r=i(1691),n=i(2142);const o=class{constructor(){this.type=n.w.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.w.ALL}is(t){return this.type===t}};const s=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new o}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.w.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:i,l:n}=t;void 0===e&&(t.h=r.Z.channel.rgb2hsl(t,"h")),void 0===i&&(t.s=r.Z.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=r.Z.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:i,b:n}=t;void 0===e&&(t.r=r.Z.channel.hsl2rgb(t,"r")),void 0===i&&(t.g=r.Z.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=r.Z.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.w.HSL)||void 0===e?(this._ensureHSL(),r.Z.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.w.HSL)||void 0===e?(this._ensureHSL(),r.Z.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.w.HSL)||void 0===e?(this._ensureHSL(),r.Z.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.w.RGB)||void 0===e?(this._ensureRGB(),r.Z.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.w.RGB)||void 0===e?(this._ensureRGB(),r.Z.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.w.RGB)||void 0===e?(this._ensureRGB(),r.Z.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.w.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.w.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.w.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.w.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.w.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.w.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},1610:(t,e,i)=>{"use strict";i.d(e,{Z:()=>g});var r=i(1883),n=i(2142);const o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(o.re);if(!e)return;const i=e[1],n=parseInt(i,16),s=i.length,a=s%4==0,l=s>4,c=l?1:17,h=l?8:4,u=a?0:-1,d=l?255:15;return r.Z.set({r:(n>>h*(u+3)&d)*c,g:(n>>h*(u+2)&d)*c,b:(n>>h*(u+1)&d)*c,a:a?(n&d)*c/255:1},t)},stringify:t=>{const{r:e,g:i,b:r,a:o}=t;return o<1?`#${n.Q[Math.round(e)]}${n.Q[Math.round(i)]}${n.Q[Math.round(r)]}${n.Q[Math.round(255*o)]}`:`#${n.Q[Math.round(e)]}${n.Q[Math.round(i)]}${n.Q[Math.round(r)]}`}},s=o;var a=i(1691);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,i]=e;switch(i){case"grad":return a.Z.channel.clamp.h(.9*parseFloat(t));case"rad":return a.Z.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return a.Z.channel.clamp.h(360*parseFloat(t))}}return a.Z.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const i=t.match(l.re);if(!i)return;const[,n,o,s,c,h]=i;return r.Z.set({h:l._hue2deg(n),s:a.Z.channel.clamp.s(parseFloat(o)),l:a.Z.channel.clamp.l(parseFloat(s)),a:c?a.Z.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:i,l:r,a:n}=t;return n<1?`hsla(${a.Z.lang.round(e)}, ${a.Z.lang.round(i)}%, ${a.Z.lang.round(r)}%, ${n})`:`hsl(${a.Z.lang.round(e)}, ${a.Z.lang.round(i)}%, ${a.Z.lang.round(r)}%)`}},c=l,h={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return s.parse(e)},stringify:t=>{const e=s.stringify(t);for(const i in h.colors)if(h.colors[i]===e)return i}},u=h,d={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,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const i=t.match(d.re);if(!i)return;const[,n,o,s,l,c,h,u,f]=i;return r.Z.set({r:a.Z.channel.clamp.r(o?2.55*parseFloat(n):parseFloat(n)),g:a.Z.channel.clamp.g(l?2.55*parseFloat(s):parseFloat(s)),b:a.Z.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?a.Z.channel.clamp.a(f?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:i,b:r,a:n}=t;return n<1?`rgba(${a.Z.lang.round(e)}, ${a.Z.lang.round(i)}, ${a.Z.lang.round(r)}, ${a.Z.lang.round(n)})`:`rgb(${a.Z.lang.round(e)}, ${a.Z.lang.round(i)}, ${a.Z.lang.round(r)})`}},f=d,p={format:{keyword:h,hex:s,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=s.parse(t)||f.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.w.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?f.stringify(t):s.stringify(t)},g=p},2142:(t,e,i)=>{"use strict";i.d(e,{Q:()=>n,w:()=>o});var r=i(1691);const n={};for(let s=0;s<=255;s++)n[s]=r.Z.unit.dec2hex(s);const o={ALL:0,RGB:1,HSL:2}},6174:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=i(1691),n=i(1610);const o=(t,e,i)=>{const o=n.Z.parse(t),s=o[e],a=r.Z.channel.clamp[e](s+i);return s!==a&&(o[e]=a),n.Z.stringify(o)}},3438:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=i(1691),n=i(1610);const o=(t,e)=>{const i=n.Z.parse(t);for(const n in e)i[n]=r.Z.channel.clamp[n](e[n]);return n.Z.stringify(i)}},7201:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var r=i(6174);const n=(t,e)=>(0,r.Z)(t,"l",-e)},1619:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var r=i(1691),n=i(1610);const o=t=>{const{r:e,g:i,b:o}=n.Z.parse(t),s=.2126*r.Z.channel.toLinear(e)+.7152*r.Z.channel.toLinear(i)+.0722*r.Z.channel.toLinear(o);return r.Z.lang.round(s)},s=t=>o(t)>=.5,a=t=>!s(t)},2281:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var r=i(6174);const n=(t,e)=>(0,r.Z)(t,"l",e)},1117:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var r=i(1691),n=i(1883),o=i(1610),s=i(3438);const a=(t,e,i=0,a=1)=>{if("number"!=typeof t)return(0,s.Z)(t,{a:e});const l=n.Z.set({r:r.Z.channel.clamp.r(t),g:r.Z.channel.clamp.g(e),b:r.Z.channel.clamp.b(i),a:r.Z.channel.clamp.a(a)});return o.Z.stringify(l)}},1691:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});const r={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,i)=>(i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t),hsl2rgb:({h:t,s:e,l:i},n)=>{if(!e)return 2.55*i;t/=360,e/=100;const o=(i/=100)<.5?i*(1+e):i+e-i*e,s=2*i-o;switch(n){case"r":return 255*r.hue2rgb(s,o,t+1/3);case"g":return 255*r.hue2rgb(s,o,t);case"b":return 255*r.hue2rgb(s,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:i},r)=>{t/=255,e/=255,i/=255;const n=Math.max(t,e,i),o=Math.min(t,e,i),s=(n+o)/2;if("l"===r)return 100*s;if(n===o)return 0;const a=n-o;if("s"===r)return 100*(s>.5?a/(2-n-o):a/(n+o));switch(n){case t:return 60*((e-i)/a+(ee>i?Math.min(e,Math.max(i,t)):Math.min(i,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},7308:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});const r=function(){this.__data__=[],this.size=0};var n=i(9651);const o=function(t,e){for(var i=t.length;i--;)if((0,n.Z)(t[i][0],e))return i;return-1};var s=Array.prototype.splice;const a=function(t){var e=this.__data__,i=o(e,t);return!(i<0)&&(i==e.length-1?e.pop():s.call(e,i,1),--this.size,!0)};const l=function(t){var e=this.__data__,i=o(e,t);return i<0?void 0:e[i][1]};const c=function(t){return o(this.__data__,t)>-1};const h=function(t,e){var i=this.__data__,r=o(i,t);return r<0?(++this.size,i.push([t,e])):i[r][1]=e,this};function u(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{"use strict";i.d(e,{Z:()=>o});var r=i(2508),n=i(6092);const o=(0,r.Z)(n.Z,"Map")},7834:(t,e,i)=>{"use strict";i.d(e,{Z:()=>k});const r=(0,i(2508).Z)(Object,"create");const n=function(){this.__data__=r?r(null):{},this.size=0};const o=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var s=Object.prototype.hasOwnProperty;const a=function(t){var e=this.__data__;if(r){var i=e[t];return"__lodash_hash_undefined__"===i?void 0:i}return s.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return r?void 0!==e[t]:l.call(e,t)};const h=function(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{"use strict";i.d(e,{Z:()=>o});var r=i(2508),n=i(6092);const o=(0,r.Z)(n.Z,"Set")},1667:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var r=i(7308);const n=function(){this.__data__=new r.Z,this.size=0};const o=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i};const s=function(t){return this.__data__.get(t)};const a=function(t){return this.__data__.has(t)};var l=i(6183),c=i(7834);const h=function(t,e){var i=this.__data__;if(i instanceof r.Z){var n=i.__data__;if(!l.Z||n.length<199)return n.push([t,e]),this.size=++i.size,this;i=this.__data__=new c.Z(n)}return i.set(t,e),this.size=i.size,this};function u(t){var e=this.__data__=new r.Z(t);this.size=e.size}u.prototype.clear=n,u.prototype.delete=o,u.prototype.get=s,u.prototype.has=a,u.prototype.set=h;const d=u},7685:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=i(6092).Z.Symbol},4073:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=i(6092).Z.Uint8Array},7668:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});const r=function(t,e){for(var i=-1,r=Array(t);++i{"use strict";i.d(e,{Z:()=>s});var r=i(4752),n=i(9651),o=Object.prototype.hasOwnProperty;const s=function(t,e,i){var s=t[e];o.call(t,e)&&(0,n.Z)(s,i)&&(void 0!==i||e in t)||(0,r.Z)(t,e,i)}},4752:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var r=i(7904);const n=function(t,e,i){"__proto__"==e&&r.Z?(0,r.Z)(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}},1395:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){return function(e,i,r){for(var n=-1,o=Object(e),s=r(e),a=s.length;a--;){var l=s[t?a:++n];if(!1===i(o[l],l,o))break}return e}}()},3589:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var r=i(7685),n=Object.prototype,o=n.hasOwnProperty,s=n.toString,a=r.Z?r.Z.toStringTag:void 0;const l=function(t){var e=o.call(t,a),i=t[a];try{t[a]=void 0;var r=!0}catch(l){}var n=s.call(t);return r&&(e?t[a]=i:delete t[a]),n};var c=Object.prototype.toString;const h=function(t){return c.call(t)};var u=r.Z?r.Z.toStringTag:void 0;const d=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?l(t):h(t)}},5154:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var r=i(2764);const n=(0,i(1851).Z)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,r.Z)(t))return n(t);var e=[];for(var i in Object(t))o.call(t,i)&&"constructor"!=i&&e.push(i);return e}},9581:(t,e,i)=>{"use strict";i.d(e,{Z:()=>s});var r=i(9203),n=i(1211),o=i(7227);const s=function(t,e){return(0,o.Z)((0,n.Z)(t,e,r.Z),t+"")}},1162:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){return function(e){return t(e)}}},1884:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var r=i(4073);const n=function(t){var e=new t.constructor(t.byteLength);return new r.Z(e).set(new r.Z(t)),e}},1050:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var r=i(6092),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===n?r.Z.Buffer:void 0,a=s?s.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var i=t.length,r=a?a(i):new t.constructor(i);return t.copy(r),r}},2701:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var r=i(1884);const n=function(t,e){var i=e?(0,r.Z)(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}},7215:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t,e){var i=-1,r=t.length;for(e||(e=Array(r));++i{"use strict";i.d(e,{Z:()=>o});var r=i(2954),n=i(4752);const o=function(t,e,i,o){var s=!i;i||(i={});for(var a=-1,l=e.length;++a{"use strict";i.d(e,{Z:()=>n});var r=i(2508);const n=function(){try{var t=(0,r.Z)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},3413:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r="object"==typeof global&&global&&global.Object===Object&&global},2508:(t,e,i)=>{"use strict";i.d(e,{Z:()=>x});var r=i(3234);const n=i(6092).Z["__core-js_shared__"];var o,s=(o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";const a=function(t){return!!s&&s in t};var l=i(7226),c=i(19),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,f=u.toString,p=d.hasOwnProperty,g=RegExp("^"+f.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(t){return!(!(0,l.Z)(t)||a(t))&&((0,r.Z)(t)?g:h).test((0,c.Z)(t))};const y=function(t,e){return null==t?void 0:t[e]};const x=function(t,e){var i=y(t,e);return m(i)?i:void 0}},2513:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=(0,i(1851).Z)(Object.getPrototypeOf,Object)},3970:(t,e,i)=>{"use strict";i.d(e,{Z:()=>k});var r=i(2508),n=i(6092);const o=(0,r.Z)(n.Z,"DataView");var s=i(6183);const a=(0,r.Z)(n.Z,"Promise");var l=i(3203);const c=(0,r.Z)(n.Z,"WeakMap");var h=i(3589),u=i(19),d="[object Map]",f="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.Z)(o),x=(0,u.Z)(s.Z),b=(0,u.Z)(a),C=(0,u.Z)(l.Z),_=(0,u.Z)(c),v=h.Z;(o&&v(new o(new ArrayBuffer(1)))!=m||s.Z&&v(new s.Z)!=d||a&&v(a.resolve())!=f||l.Z&&v(new l.Z)!=p||c&&v(new c)!=g)&&(v=function(t){var e=(0,h.Z)(t),i="[object Object]"==e?t.constructor:void 0,r=i?(0,u.Z)(i):"";if(r)switch(r){case y:return m;case x:return d;case b:return f;case C:return p;case _:return g}return e});const k=v},3658:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var r=i(7226),n=Object.create;const o=function(){function t(){}return function(e){if(!(0,r.Z)(e))return{};if(n)return n(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();var s=i(2513),a=i(2764);const l=function(t){return"function"!=typeof t.constructor||(0,a.Z)(t)?{}:o((0,s.Z)(t))}},6009:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var r=/^(?:0|[1-9]\d*)$/;const n=function(t,e){var i=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==i||"symbol"!=i&&r.test(t))&&t>-1&&t%1==0&&t{"use strict";i.d(e,{Z:()=>a});var r=i(9651),n=i(585),o=i(6009),s=i(7226);const a=function(t,e,i){if(!(0,s.Z)(i))return!1;var a=typeof e;return!!("number"==a?(0,n.Z)(i)&&(0,o.Z)(e,i.length):"string"==a&&e in i)&&(0,r.Z)(i[e],t)}},2764:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var r=Object.prototype;const n=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||r)}},8351:(t,e,i)=>{"use strict";i.d(e,{Z:()=>a});var r=i(3413),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===n&&r.Z.process;const a=function(){try{var t=o&&o.require&&o.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}()},1851:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t,e){return function(i){return t(e(i))}}},1211:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});const r=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)};var n=Math.max;const o=function(t,e,i){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=n(o.length-e,0),l=Array(a);++s{"use strict";i.d(e,{Z:()=>o});var r=i(3413),n="object"==typeof self&&self&&self.Object===Object&&self;const o=r.Z||n||Function("return this")()},7227:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var r=i(2002),n=i(7904),o=i(9203);const s=n.Z?function(t,e){return(0,n.Z)(t,"toString",{configurable:!0,enumerable:!1,value:(0,r.Z)(e),writable:!0})}:o.Z;var a=Date.now;const l=function(t){var e=0,i=0;return function(){var r=a(),n=16-(r-i);if(i=r,n>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(s)},19:(t,e,i)=>{"use strict";i.d(e,{Z:()=>n});var r=Function.prototype.toString;const n=function(t){if(null!=t){try{return r.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},2002:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){return function(){return t}}},9651:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t,e){return t===e||t!=t&&e!=e}},9203:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){return t}},9169:(t,e,i)=>{"use strict";i.d(e,{Z:()=>c});var r=i(3589),n=i(8533);const o=function(t){return(0,n.Z)(t)&&"[object Arguments]"==(0,r.Z)(t)};var s=Object.prototype,a=s.hasOwnProperty,l=s.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(t){return(0,n.Z)(t)&&a.call(t,"callee")&&!l.call(t,"callee")}},7771:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=Array.isArray},585:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=i(3234),n=i(1656);const o=function(t){return null!=t&&(0,n.Z)(t.length)&&!(0,r.Z)(t)}},836:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=i(585),n=i(8533);const o=function(t){return(0,n.Z)(t)&&(0,r.Z)(t)}},7008:(t,e,i)=>{"use strict";i.d(e,{Z:()=>l});var r=i(6092);const n=function(){return!1};var o="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=o&&"object"==typeof module&&module&&!module.nodeType&&module,a=s&&s.exports===o?r.Z.Buffer:void 0;const l=(a?a.isBuffer:void 0)||n},9697:(t,e,i)=>{"use strict";i.d(e,{Z:()=>d});var r=i(5154),n=i(3970),o=i(9169),s=i(7771),a=i(585),l=i(7008),c=i(2764),h=i(8843),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,a.Z)(t)&&((0,s.Z)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.Z)(t)||(0,h.Z)(t)||(0,o.Z)(t)))return!t.length;var e=(0,n.Z)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.Z)(t))return!(0,r.Z)(t).length;for(var i in t)if(u.call(t,i))return!1;return!0}},3234:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=i(3589),n=i(7226);const o=function(t){if(!(0,n.Z)(t))return!1;var e=(0,r.Z)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1656:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},7226:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},8533:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});const r=function(t){return null!=t&&"object"==typeof t}},7514:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var r=i(3589),n=i(2513),o=i(8533),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,h=l.call(Object);const u=function(t){if(!(0,o.Z)(t)||"[object Object]"!=(0,r.Z)(t))return!1;var e=(0,n.Z)(t);if(null===e)return!0;var i=c.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&l.call(i)==h}},8843:(t,e,i)=>{"use strict";i.d(e,{Z:()=>u});var r=i(3589),n=i(1656),o=i(8533),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;const a=function(t){return(0,o.Z)(t)&&(0,n.Z)(t.length)&&!!s[(0,r.Z)(t)]};var l=i(1162),c=i(8351),h=c.Z&&c.Z.isTypedArray;const u=h?(0,l.Z)(h):a},5733:(t,e,i)=>{"use strict";i.d(e,{Z:()=>h});var r=i(7668),n=i(7226),o=i(2764);const s=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e};var a=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,n.Z)(t))return s(t);var e=(0,o.Z)(t),i=[];for(var r in t)("constructor"!=r||!e&&a.call(t,r))&&i.push(r);return i};var c=i(585);const h=function(t){return(0,c.Z)(t)?(0,r.Z)(t,!0):l(t)}},2454:(t,e,i)=>{"use strict";i.d(e,{Z:()=>o});var r=i(7834);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var i=function(){var r=arguments,n=e?e.apply(this,r):r[0],o=i.cache;if(o.has(n))return o.get(n);var s=t.apply(this,r);return i.cache=o.set(n,s)||o,s};return i.cache=new(n.Cache||r.Z),i}n.Cache=r.Z;const o=n},9236:(t,e,i)=>{"use strict";i.d(e,{Z:()=>F});var r=i(1667),n=i(4752),o=i(9651);const s=function(t,e,i){(void 0!==i&&!(0,o.Z)(t[e],i)||void 0===i&&!(e in t))&&(0,n.Z)(t,e,i)};var a=i(1395),l=i(1050),c=i(2701),h=i(7215),u=i(3658),d=i(9169),f=i(7771),p=i(836),g=i(7008),m=i(3234),y=i(7226),x=i(7514),b=i(8843);const C=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var _=i(1899),v=i(5733);const k=function(t){return(0,_.Z)(t,(0,v.Z)(t))};const T=function(t,e,i,r,n,o,a){var _=C(t,i),v=C(e,i),T=a.get(v);if(T)s(t,i,T);else{var w=o?o(_,v,i+"",t,e,a):void 0,S=void 0===w;if(S){var B=(0,f.Z)(v),F=!B&&(0,g.Z)(v),L=!B&&!F&&(0,b.Z)(v);w=v,B||F||L?(0,f.Z)(_)?w=_:(0,p.Z)(_)?w=(0,h.Z)(_):F?(S=!1,w=(0,l.Z)(v,!0)):L?(S=!1,w=(0,c.Z)(v,!0)):w=[]:(0,x.Z)(v)||(0,d.Z)(v)?(w=_,(0,d.Z)(_)?w=k(_):(0,y.Z)(_)&&!(0,m.Z)(_)||(w=(0,u.Z)(v))):S=!1}S&&(a.set(v,w),n(w,v,r,o,a),a.delete(v)),s(t,i,w)}};const w=function t(e,i,n,o,l){e!==i&&(0,a.Z)(i,(function(a,c){if(l||(l=new r.Z),(0,y.Z)(a))T(e,i,c,n,t,o,l);else{var h=o?o(C(e,c),a,c+"",e,i,l):void 0;void 0===h&&(h=a),s(e,c,h)}}),v.Z)};var S=i(9581),B=i(439);const F=function(t){return(0,S.Z)((function(e,i){var r=-1,n=i.length,o=n>1?i[n-1]:void 0,s=n>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(n--,o):void 0,s&&(0,B.Z)(i[0],i[1],s)&&(o=n<3?void 0:o,n=1),e=Object(e);++r{"use strict";i.d(e,{A:()=>Ot,B:()=>me,C:()=>ge,D:()=>Ft,E:()=>Fe,F:()=>ir,G:()=>oe,H:()=>ht,I:()=>Ei,J:()=>xe,K:()=>Bi,L:()=>io,Z:()=>Gt,a:()=>Ti,b:()=>ki,c:()=>Ai,d:()=>ft,e:()=>_t,f:()=>Vt,g:()=>vi,h:()=>ue,i:()=>di,j:()=>he,k:()=>re,l:()=>at,m:()=>mt,n:()=>Kt,o:()=>fi,p:()=>Mi,q:()=>wi,r:()=>Si,s:()=>_i,t:()=>Ci,u:()=>ye,v:()=>yt,w:()=>le,x:()=>se,y:()=>Zi,z:()=>qi});var r=i(8464),n=i(7484),o=i(7967),s=i(4218),a=i(7856),l=i(1610),c=i(3438);const h=(t,e)=>{const i=l.Z.parse(t),r={};for(const n in e)e[n]&&(r[n]=i[n]+e[n]);return(0,c.Z)(t,r)};var u=i(1117);const d=(t,e,i=50)=>{const{r:r,g:n,b:o,a:s}=l.Z.parse(t),{r:a,g:c,b:h,a:d}=l.Z.parse(e),f=i/100,p=2*f-1,g=s-d,m=((p*g==-1?p:(p+g)/(1+p*g))+1)/2,y=1-m,x=r*m+a*y,b=n*m+c*y,C=o*m+h*y,_=s*f+d*(1-f);return(0,u.Z)(x,b,C,_)},f=(t,e=100)=>{const i=l.Z.parse(t);return i.r=255-i.r,i.g=255-i.g,i.b=255-i.b,d(i,t,e)};var p=i(7201),g=i(2281),m=i(1619),y=i(2454),x=i(9236),b="comm",C="rule",_="decl",v=Math.abs,k=String.fromCharCode;Object.assign;function T(t){return t.trim()}function w(t,e,i){return t.replace(e,i)}function S(t,e,i){return t.indexOf(e,i)}function B(t,e){return 0|t.charCodeAt(e)}function F(t,e,i){return t.slice(e,i)}function L(t){return t.length}function A(t,e){return e.push(t),t}function M(t,e){for(var i="",r=0;r0?B(D,--O):0,Z--,10===I&&(Z=1,N--),I}function z(){return I=O2||W(I)>3?"":" "}function X(t,e){for(;--e&&z()&&!(I<48||I>102||I>57&&I<65||I>70&&I<97););return H(t,R()+(e<6&&32==P()&&32==z()))}function J(t){for(;z();)switch(I){case t:return O;case 34:case 39:34!==t&&39!==t&&J(I);break;case 40:41===t&&J(t);break;case 92:z()}return O}function Q(t,e){for(;z()&&t+I!==57&&(t+I!==84||47!==P()););return"/*"+H(e,O-1)+"*"+k(47===t?t:z())}function K(t){for(;!W(P());)z();return H(t,O)}function tt(t){return Y(et("",null,null,null,[""],t=U(t),0,[0],t))}function et(t,e,i,r,n,o,s,a,l){for(var c=0,h=0,u=s,d=0,f=0,p=0,g=1,m=1,y=1,x=0,b="",C=n,_=o,T=r,F=b;m;)switch(p=x,x=z()){case 40:if(108!=p&&58==B(F,u-1)){-1!=S(F+=w(V(x),"&","&\f"),"&\f",v(c?a[c-1]:0))&&(y=-1);break}case 34:case 39:case 91:F+=V(x);break;case 9:case 10:case 13:case 32:F+=G(p);break;case 92:F+=X(R()-1,7);continue;case 47:switch(P()){case 42:case 47:A(rt(Q(z(),R()),e,i,l),l);break;default:F+="/"}break;case 123*g:a[c++]=L(F)*y;case 125*g:case 59:case 0:switch(x){case 0:case 125:m=0;case 59+h:-1==y&&(F=w(F,/\f/g,"")),f>0&&L(F)-u&&A(f>32?nt(F+";",r,i,u-1,l):nt(w(F," ","")+";",r,i,u-2,l),l);break;case 59:F+=";";default:if(A(T=it(F,e,i,c,h,n,a,b,C=[],_=[],u,o),o),123===x)if(0===h)et(F,e,T,T,C,o,u,a,_);else switch(99===d&&110===B(F,3)?100:d){case 100:case 108:case 109:case 115:et(t,T,T,r&&A(it(t,T,T,0,0,n,a,b,n,C=[],u,_),_),n,_,u,a,r?C:_);break;default:et(F,T,T,T,[""],_,0,a,_)}}c=h=f=0,g=y=1,b=F="",u=s;break;case 58:u=1+L(F),f=p;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==$())continue;switch(F+=k(x),x*g){case 38:y=h>0?1:(F+="\f",-1);break;case 44:a[c++]=(L(F)-1)*y,y=1;break;case 64:45===P()&&(F+=V(z())),d=P(),h=u=L(b=F+=K(R())),x++;break;case 45:45===p&&2==L(F)&&(g=0)}}return o}function it(t,e,i,r,n,o,s,a,l,c,h,u){for(var d=n-1,f=0===n?o:[""],p=function(t){return t.length}(f),g=0,m=0,y=0;g0?f[x]+" "+b:w(b,/&\f/g,f[x])))&&(l[y++]=_);return q(t,e,i,0===n?C:a,l,c,h,u)}function rt(t,e,i,r){return q(t,e,i,b,k(I),F(t,2,-2),0,r)}function nt(t,e,i,r,n){return q(t,e,i,_,F(t,0,r),F(t,r+1,-1),r,n)}var ot=i(9697);const st={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},at={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},lt=function(t="fatal"){let e=st.fatal;"string"==typeof t?(t=t.toLowerCase())in st&&(e=st[t]):"number"==typeof t&&(e=t),at.trace=()=>{},at.debug=()=>{},at.info=()=>{},at.warn=()=>{},at.error=()=>{},at.fatal=()=>{},e<=st.fatal&&(at.fatal=console.error?console.error.bind(console,ct("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",ct("FATAL"))),e<=st.error&&(at.error=console.error?console.error.bind(console,ct("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",ct("ERROR"))),e<=st.warn&&(at.warn=console.warn?console.warn.bind(console,ct("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",ct("WARN"))),e<=st.info&&(at.info=console.info?console.info.bind(console,ct("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",ct("INFO"))),e<=st.debug&&(at.debug=console.debug?console.debug.bind(console,ct("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",ct("DEBUG"))),e<=st.trace&&(at.trace=console.debug?console.debug.bind(console,ct("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",ct("TRACE")))},ct=t=>`%c${n().format("ss.SSS")} : ${t} : `,ht=/
/gi,ut=t=>{const e="data-temp-href-target";a.addHook("beforeSanitizeAttributes",(t=>{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")||"")}));const i=a.sanitize(t);return a.addHook("afterSanitizeAttributes",(t=>{"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)||""),t.removeAttribute(e),"_blank"===t.getAttribute("target")&&t.setAttribute("rel","noopener"))})),i},dt=(t,e)=>{var i;if(!1!==(null==(i=e.flowchart)?void 0:i.htmlLabels)){const i=e.securityLevel;"antiscript"===i||"strict"===i?t=ut(t):"loose"!==i&&(t=(t=(t=gt(t)).replace(/
/g,">")).replace(/=/g,"="),t=pt(t))}return t},ft=(t,e)=>t?t=e.dompurifyConfig?a.sanitize(dt(t,e),e.dompurifyConfig).toString():a.sanitize(dt(t,e),{FORBID_TAGS:["style"]}).toString():t,pt=t=>t.replace(/#br#/g,"
"),gt=t=>t.replace(ht,"#br#"),mt=t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),yt=function(t){const e=t.split(/(,)/),i=[];for(let r=0;r0&&r+1Math.max(0,t.split(e).length-1),bt=(t,e)=>{const i=xt(t,"~"),r=xt(e,"~");return 1===i&&1===r},Ct=t=>{const e=xt(t,"~");let i=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),i=!0);const r=[...t];let n=r.indexOf("~"),o=r.lastIndexOf("~");for(;-1!==n&&-1!==o&&n!==o;)r[n]="<",r[o]=">",n=r.indexOf("~"),o=r.lastIndexOf("~");return i&&r.unshift("~"),r.join("")},_t={getRows:t=>{if(!t)return[""];return gt(t).replace(/\\n/g,"#br#").split("#br#")},sanitizeText:ft,sanitizeTextOrArray:(t,e)=>"string"==typeof t?ft(t,e):t.flat().map((t=>ft(t,e))),hasBreaks:t=>ht.test(t),splitBreaks:t=>t.split(ht),lineBreakRegex:ht,removeScript:ut,getUrl:t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},evaluate:mt,getMax:function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)},getMin:function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}},vt=(t,e)=>h(t,e?{s:-40,l:10}:{s:-40,l:-10}),kt="#ffffff",Tt="#f2f2f2";let wt=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var t,e,i,r,n,o,s,a,l,c,u;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||h(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||h(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||vt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||vt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||f(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||f(this.tertiaryColor),this.lineColor=this.lineColor||f(this.background),this.arrowheadColor=this.arrowheadColor||f(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,p.Z)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,p.Z)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||f(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,g.Z)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.darkMode)for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let St=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,g.Z)(this.primaryColor,16),this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=f(this.background),this.secondaryBorderColor=vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,g.Z)(f("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=(0,u.Z)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,p.Z)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,p.Z)(this.sectionBkgColor,10),this.taskBorderColor=(0,u.Z)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,u.Z)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var t,e,i,r,n,o,s,a,l,c,u;this.secondBkg=(0,g.Z)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,g.Z)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,g.Z)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=h(this.primaryColor,{h:64}),this.fillType3=h(this.secondaryColor,{h:64}),this.fillType4=h(this.primaryColor,{h:-64}),this.fillType5=h(this.secondaryColor,{h:-64}),this.fillType6=h(this.primaryColor,{h:128}),this.fillType7=h(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330});for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};let Bt=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=h(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,u.Z)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var t,e,i,r,n,o,s,a,l,c,u;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,p.Z)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,p.Z)(this.tertiaryColor,40);for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};const Ft=t=>{const e=new Bt;return e.calculate(t),e};let Lt=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,g.Z)("#cde498",10),this.primaryBorderColor=vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.primaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,i,r,n,o,s,a,l,c,u;this.actorBorder=(0,p.Z)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||h(this.primaryColor,{h:30}),this.cScale4=this.cScale4||h(this.primaryColor,{h:60}),this.cScale5=this.cScale5||h(this.primaryColor,{h:90}),this.cScale6=this.cScale6||h(this.primaryColor,{h:120}),this.cScale7=this.cScale7||h(this.primaryColor,{h:150}),this.cScale8=this.cScale8||h(this.primaryColor,{h:210}),this.cScale9=this.cScale9||h(this.primaryColor,{h:270}),this.cScale10=this.cScale10||h(this.primaryColor,{h:300}),this.cScale11=this.cScale11||h(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,p.Z)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,p.Z)(this.tertiaryColor,40);for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}};class At{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,g.Z)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=h(this.primaryColor,{h:-160}),this.primaryBorderColor=vt(this.primaryColor,this.darkMode),this.secondaryBorderColor=vt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=vt(this.tertiaryColor,this.darkMode),this.primaryTextColor=f(this.primaryColor),this.secondaryTextColor=f(this.secondaryColor),this.tertiaryTextColor=f(this.tertiaryColor),this.lineColor=f(this.background),this.textColor=f(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var t,e,i,r,n,o,s,a,l,c,u;this.secondBkg=(0,g.Z)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,g.Z)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let h=0;h{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}}const Mt={base:{getThemeVariables:t=>{const e=new wt;return e.calculate(t),e}},dark:{getThemeVariables:t=>{const e=new St;return e.calculate(t),e}},default:{getThemeVariables:Ft},forest:{getThemeVariables:t=>{const e=new Lt;return e.calculate(t),e}},neutral:{getThemeVariables:t=>{const e=new At;return e.calculate(t),e}}},Et={flowchart:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},theme:"default",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges"],deterministicIds:!1,fontSize:16},Nt={...Et,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Mt.default.getThemeVariables(),sequence:{...Et.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...Et.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Et.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...Et.pie,useWidth:984},xyChart:{...Et.xyChart,useWidth:void 0},requirement:{...Et.requirement,useWidth:void 0},gitGraph:{...Et.gitGraph,useMaxWidth:!1},sankey:{...Et.sankey,useMaxWidth:!1}},Zt=(t,e="")=>Object.keys(t).reduce(((i,r)=>Array.isArray(t[r])?i:"object"==typeof t[r]&&null!==t[r]?[...i,e+r,...Zt(t[r],"")]:[...i,e+r]),[]),jt=new Set(Zt(Nt,"")),Ot=Nt,It=t=>{if(at.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>It(t)));else{for(const e of Object.keys(t)){if(at.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!jt.has(e)||null==t[e]){at.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){at.debug("sanitizing object",e),It(t[e]);continue}const i=["themeCSS","fontFamily","altFontFamily"];for(const r of i)e.includes(r)&&(at.debug("sanitizing css option",e),t[e]=Dt(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const i=t.themeVariables[e];(null==i?void 0:i.match)&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}at.debug("After sanitization",t)}},Dt=t=>{let e=0,i=0;for(const r of t){if(e{for(const{id:e,detector:i,loader:r}of t)Ut(e,i,r)},Ut=(t,e,i)=>{Rt[t]?at.error(`Detector with key ${t} already exists`):Rt[t]={detector:e,loader:i},at.debug(`Detector with key ${t} added${i?" with loader":""}`)},Yt=(t,e,{depth:i=2,clobber:r=!1}={})=>{const n={depth:i,clobber:r};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>Yt(t,e,n))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||i<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(r||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=Yt(t[n],e[n],{depth:i-1,clobber:r}))})),t)},Vt=Yt,Gt="\u200b",Xt={curveBasis:s.$0Z,curveBasisClosed:s.Dts,curveBasisOpen:s.WQY,curveBumpX:s.qpX,curveBumpY:s.u93,curveBundle:s.tFB,curveCardinalClosed:s.OvA,curveCardinalOpen:s.dCK,curveCardinal:s.YY7,curveCatmullRomClosed:s.fGX,curveCatmullRomOpen:s.$m7,curveCatmullRom:s.zgE,curveLinear:s.c_6,curveLinearClosed:s.fxm,curveMonotoneX:s.FdL,curveMonotoneY:s.ak_,curveNatural:s.SxZ,curveStep:s.eA_,curveStepAfter:s.jsv,curveStepBefore:s.iJ},Jt=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Qt=function(t,e=null){try{const i=new RegExp(`[%]{2}(?![{]${Jt.source})(?=[}][%]{2}).*\n`,"ig");let r;t=t.trim().replace(i,"").replace(/'/gm,'"'),at.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const n=[];for(;null!==(r=$t.exec(t));)if(r.index===$t.lastIndex&&$t.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){const t=r[1]?r[1]:r[2],e=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;n.push({type:t,args:e})}return 0===n.length?{type:t,args:null}:1===n.length?n[0]:n}catch(i){return at.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}};function Kt(t,e){if(!t)return e;const i=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return Xt[i]??e}function te(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}const ee=(t,e=2)=>{const i=Math.pow(10,e);return Math.round(t*i)/i},ie=(t,e)=>{let i,r=e;for(const n of t){if(i){const t=te(n,i);if(t=1)return{x:n.x,y:n.y};if(e>0&&e<1)return{x:ee((1-e)*i.x+e*n.x,5),y:ee((1-e)*i.y+e*n.y,5)}}}i=n}throw new Error("Could not find a suitable point for the given distance")};function re(t){let e="",i="";for(const r of t)void 0!==r&&(r.startsWith("color:")||r.startsWith("text-align:")?i=i+r+";":e=e+r+";");return{style:e,labelStyle:i}}let ne=0;const oe=()=>(ne++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ne);const se=t=>function(t){let e="";const i="0123456789abcdef";for(let r=0;r{if(!t)return t;if(i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},i),_t.lineBreakRegex.test(t))return t;const r=t.split(" "),n=[];let o="";return r.forEach(((t,s)=>{const a=ue(`${t} `,i),l=ue(o,i);if(a>e){const{hyphenatedStrings:r,remainingWord:s}=ce(t,e,"-",i);n.push(o,...r),o=s}else l+a>=e?(n.push(o),o=t):o=[o,t].filter(Boolean).join(" ");s+1===r.length&&n.push(o)})),n.filter((t=>""!==t)).join(i.joinWith)}),((t,e,i)=>`${t}${e}${i.fontSize}${i.fontWeight}${i.fontFamily}${i.joinWith}`)),ce=(0,y.Z)(((t,e,i="-",r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);const n=[...t],o=[];let s="";return n.forEach(((t,a)=>{const l=`${s}${t}`;if(ue(l,r)>=e){const t=a+1,e=n.length===t,r=`${l}${i}`;o.push(e?l:r),s=""}else s=l})),{hyphenatedStrings:o,remainingWord:s}}),((t,e,i="-",r)=>`${t}${e}${i}${r.fontSize}${r.fontWeight}${r.fontFamily}`));function he(t,e){return de(t,e).height}function ue(t,e){return de(t,e).width}const de=(0,y.Z)(((t,e)=>{const{fontSize:i=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};const[,o]=ge(i),a=["sans-serif",r],l=t.split(_t.lineBreakRegex),c=[],h=(0,s.Ys)("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const u=h.append("svg");for(const s of a){let t=0;const e={width:0,height:0,lineHeight:0};for(const i of l){const r={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""};r.text=i||Gt;const a=ae(u,r).style("font-size",o).style("font-weight",n).style("font-family",s),l=(a._groups||a)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}c.push(e)}u.remove();return c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`));let fe;function pe(t){return"str"in t}const ge=t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]};function me(t,e){return(0,x.Z)({},t,e)}const ye={assignWithDepth:Vt,wrapLabel:le,calculateTextHeight:he,calculateTextWidth:ue,calculateTextDimensions:de,cleanAndMerge:me,detectInit:function(t,e){const i=Qt(t,/(?:init\b)|(?:initialize\b)/);let r={};if(Array.isArray(i)){const t=i.map((t=>t.args));It(t),r=Vt(r,[...t])}else r=i.args;if(!r)return;let n=Ht(t,e);const o="config";return void 0!==r[o]&&("flowchart-v2"===n&&(n="flowchart"),r[n]=r[o],delete r[o]),r},detectDirective:Qt,isSubstringInArray:function(t,e){for(const[i,r]of e.entries())if(r.match(t))return i;return-1},interpolateToCurve:Kt,calcLabelPosition:function(t){return 1===t.length?t[0]:function(t){let e,i=0;return t.forEach((t=>{i+=te(t,e),e=t})),ie(t,i/2)}(t)},calcCardinalityPosition:(t,e,i)=>{at.info(`our points ${JSON.stringify(e)}`),e[0]!==i&&(e=e.reverse());const r=ie(e,25),n=t?10:5,o=Math.atan2(e[0].y-r.y,e[0].x-r.x),s={x:0,y:0};return s.x=Math.sin(o)*n+(e[0].x+r.x)/2,s.y=-Math.cos(o)*n+(e[0].y+r.y)/2,s},calcTerminalLabelPosition:function(t,e,i){const r=structuredClone(i);at.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse();const n=ie(r,25+t),o=10+.5*t,s=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(s+Math.PI)*o+(r[0].x+n.x)/2,a.y=-Math.cos(s+Math.PI)*o+(r[0].y+n.y)/2):"end_right"===e?(a.x=Math.sin(s-Math.PI)*o+(r[0].x+n.x)/2-5,a.y=-Math.cos(s-Math.PI)*o+(r[0].y+n.y)/2-5):"end_left"===e?(a.x=Math.sin(s)*o+(r[0].x+n.x)/2-5,a.y=-Math.cos(s)*o+(r[0].y+n.y)/2-5):(a.x=Math.sin(s)*o+(r[0].x+n.x)/2,a.y=-Math.cos(s)*o+(r[0].y+n.y)/2),a},formatUrl:function(t,e){const i=t.trim();if(i)return"loose"!==e.securityLevel?(0,o.Nm)(i):i},getStylesFromArray:re,generateId:oe,random:se,runFunc:(t,...e)=>{const i=t.split("."),r=i.length-1,n=i[r];let o=window;for(let s=0;s{var n;if(!r)return;const o=null==(n=t.node())?void 0:n.getBBox();o&&t.append("text").text(r).attr("x",o.x+o.width/2).attr("y",-i).attr("class",e)},parseFontSize:ge,InitIDGenerator:class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}}},xe=function(t){return t.replace(/\ufb02\xb0\xb0/g,"").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")},be="10.7.0",Ce=Object.freeze(Ot);let _e,ve=Vt({},Ce),ke=[],Te=Vt({},Ce);const we=(t,e)=>{let i=Vt({},t),r={};for(const n of e)Le(n),r=Vt(r,n);if(i=Vt(i,r),r.theme&&r.theme in Mt){const t=Vt({},_e),e=Vt(t.themeVariables||{},r.themeVariables);i.theme&&i.theme in Mt&&(i.themeVariables=Mt[i.theme].getThemeVariables(e))}return Te=i,Ze(Te),Te},Se=()=>Vt({},ve),Be=t=>(Ze(t),Vt(Te,t),Fe()),Fe=()=>Vt({},Te),Le=t=>{t&&(["secure",...ve.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(at.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&Le(t[e])})))},Ae=t=>{It(t),!t.fontFamily||t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}),ke.push(t),we(ve,ke)},Me=(t=ve)=>{ke=[],we(t,ke)},Ee={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ne={},Ze=t=>{var e;t&&((t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&(Ne[e="LAZY_LOAD_DEPRECATED"]||(at.warn(Ee[e]),Ne[e]=!0)))},je={id:"c4",detector:t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),loader:async()=>{const{diagram:t}=await i.e(7973).then(i.bind(i,7973));return{id:"c4",diagram:t}}},Oe="flowchart",Ie={id:Oe,detector:(t,e)=>{var i,r;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&"elk"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&/^\s*graph/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1644),i.e(9261),i.e(2494),i.e(4852),i.e(4641),i.e(1308)]).then(i.bind(i,1308));return{id:Oe,diagram:t}}},De="flowchart-v2",qe={id:De,detector:(t,e)=>{var i,r,n;return"dagre-d3"!==(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer)&&"elk"!==(null==(r=null==e?void 0:e.flowchart)?void 0:r.defaultRenderer)&&(!(!/^\s*graph/.test(t)||"dagre-wrapper"!==(null==(n=null==e?void 0:e.flowchart)?void 0:n.defaultRenderer))||/^\s*flowchart/.test(t))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1644),i.e(9261),i.e(2494),i.e(4852),i.e(4641),i.e(89)]).then(i.bind(i,89));return{id:De,diagram:t}}},$e={id:"er",detector:t=>/^\s*erDiagram/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(1644),i.e(2005)]).then(i.bind(i,2005));return{id:"er",diagram:t}}},ze="gitGraph",Pe={id:ze,detector:t=>/^\s*gitGraph/.test(t),loader:async()=>{const{diagram:t}=await i.e(2491).then(i.bind(i,2491));return{id:ze,diagram:t}}},Re="gantt",He={id:Re,detector:t=>/^\s*gantt/.test(t),loader:async()=>{const{diagram:t}=await i.e(8932).then(i.bind(i,8932));return{id:Re,diagram:t}}},We="info",Ue={id:We,detector:t=>/^\s*info/.test(t),loader:async()=>{const{diagram:t}=await i.e(7273).then(i.bind(i,7273));return{id:We,diagram:t}}},Ye={id:"pie",detector:t=>/^\s*pie/.test(t),loader:async()=>{const{diagram:t}=await i.e(2950).then(i.bind(i,2950));return{id:"pie",diagram:t}}},Ve="quadrantChart",Ge={id:Ve,detector:t=>/^\s*quadrantChart/.test(t),loader:async()=>{const{diagram:t}=await i.e(861).then(i.bind(i,861));return{id:Ve,diagram:t}}},Xe="xychart",Je={id:Xe,detector:t=>/^\s*xychart-beta/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(9261),i.e(2788)]).then(i.bind(i,2788));return{id:Xe,diagram:t}}},Qe="requirement",Ke={id:Qe,detector:t=>/^\s*requirement(Diagram)?/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(1644),i.e(9765)]).then(i.bind(i,9765));return{id:Qe,diagram:t}}},ti="sequence",ei={id:ti,detector:t=>/^\s*sequenceDiagram/.test(t),loader:async()=>{const{diagram:t}=await i.e(3177).then(i.bind(i,3177));return{id:ti,diagram:t}}},ii="class",ri={id:ii,detector:(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.class)?void 0:i.defaultRenderer)&&/^\s*classDiagram/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1644),i.e(2924),i.e(5364)]).then(i.bind(i,5364));return{id:ii,diagram:t}}},ni="classDiagram",oi={id:ni,detector:(t,e)=>{var i;return!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==(null==(i=null==e?void 0:e.class)?void 0:i.defaultRenderer))||/^\s*classDiagram-v2/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1644),i.e(9261),i.e(2494),i.e(4852),i.e(2924),i.e(4168)]).then(i.bind(i,4168));return{id:ni,diagram:t}}},si="state",ai={id:si,detector:(t,e)=>{var i;return"dagre-wrapper"!==(null==(i=null==e?void 0:e.state)?void 0:i.defaultRenderer)&&/^\s*stateDiagram/.test(t)},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1644),i.e(885),i.e(9277)]).then(i.bind(i,9277));return{id:si,diagram:t}}},li="stateDiagram",ci={id:li,detector:(t,e)=>{var i;return!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==(null==(i=null==e?void 0:e.state)?void 0:i.defaultRenderer))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(1644),i.e(9261),i.e(2494),i.e(4852),i.e(885),i.e(3343)]).then(i.bind(i,3343));return{id:li,diagram:t}}},hi="journey",ui={id:hi,detector:t=>/^\s*journey/.test(t),loader:async()=>{const{diagram:t}=await i.e(4237).then(i.bind(i,4237));return{id:hi,diagram:t}}},di=function(t,e,i,r){const n=function(t,e,i){let r=new Map;return i?(r.set("width","100%"),r.set("style",`max-width: ${e}px;`)):(r.set("height",t),r.set("width",e)),r}(e,i,r);!function(t,e){for(let i of e)t.attr(i[0],i[1])}(t,n)},fi=function(t,e,i,r){const n=e.node().getBBox(),o=n.width,s=n.height;at.info(`SVG bounds: ${o}x${s}`,n);let a=0,l=0;at.info(`Graph bounds: ${a}x${l}`,t),a=o+2*i,l=s+2*i,at.info(`Calculated bounds: ${a}x${l}`),di(e,l,a,r);const c=`${n.x-i} ${n.y-i} ${n.width+2*i} ${n.height+2*i}`;e.attr("viewBox",c)},pi={},gi=(t,e,i)=>{let r="";return t in pi&&pi[t]?r=pi[t](i):at.warn(`No theme found for ${t}`),` & {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n fill: ${i.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${i.errorBkgColor};\n }\n & .error-text {\n fill: ${i.errorTextColor};\n stroke: ${i.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 2px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${i.lineColor};\n stroke: ${i.lineColor};\n }\n & .marker.cross {\n stroke: ${i.lineColor};\n }\n\n & svg {\n font-family: ${i.fontFamily};\n font-size: ${i.fontSize};\n }\n\n ${r}\n\n ${e}\n`};let mi="",yi="",xi="";const bi=t=>ft(t,Fe()),Ci=()=>{mi="",xi="",yi=""},_i=t=>{mi=bi(t).replace(/^\s+/g,"")},vi=()=>mi,ki=t=>{xi=bi(t).replace(/\n\s+/g,"\n")},Ti=()=>xi,wi=t=>{yi=bi(t)},Si=()=>yi,Bi=Object.freeze(Object.defineProperty({__proto__:null,clear:Ci,getAccDescription:Ti,getAccTitle:vi,getDiagramTitle:Si,setAccDescription:ki,setAccTitle:_i,setDiagramTitle:wi},Symbol.toStringTag,{value:"Module"})),Fi=at,Li=lt,Ai=Fe,Mi=Be,Ei=Ce,Ni=t=>ft(t,Ai()),Zi=fi,ji={},Oi=(t,e,i)=>{var r,n,o;if(ji[t])throw new Error(`Diagram ${t} already registered.`);ji[t]=e,i&&Ut(t,i),n=t,void 0!==(o=e.styles)&&(pi[n]=o),null==(r=e.injectUtils)||r.call(e,Fi,Li,Ai,Ni,Zi,Bi,(()=>{}))},Ii=t=>{if(t in ji)return ji[t];throw new Di(t)};class Di extends Error{constructor(t){super(`Diagram ${t} not found.`)}}const qi=t=>{var e;const{securityLevel:i}=Ai();let r=(0,s.Ys)("body");if("sandbox"===i){const i=(null==(e=(0,s.Ys)(`#i${t}`).node())?void 0:e.contentDocument)??document;r=(0,s.Ys)(i.body)}return r.select(`#${t}`)},$i={draw:(t,e,i)=>{at.debug("renering svg for syntax error\n");const r=qi(e);r.attr("viewBox","0 0 2412 512"),di(r,100,512,!0);const n=r.append("g");n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${i}`)}},zi=$i,Pi={db:{},renderer:$i,parser:{parser:{yy:{}},parse:()=>{}}},Ri="flowchart-elk",Hi={id:Ri,detector:(t,e)=>{var i;return!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===(null==(i=null==e?void 0:e.flowchart)?void 0:i.defaultRenderer))},loader:async()=>{const{diagram:t}=await Promise.all([i.e(9261),i.e(2494),i.e(4641),i.e(194)]).then(i.bind(i,194));return{id:Ri,diagram:t}}},Wi="timeline",Ui={id:Wi,detector:t=>/^\s*timeline/.test(t),loader:async()=>{const{diagram:t}=await i.e(3304).then(i.bind(i,3304));return{id:Wi,diagram:t}}},Yi="mindmap",Vi={id:Yi,detector:t=>/^\s*mindmap/.test(t),loader:async()=>{const{diagram:t}=await Promise.all([i.e(9261),i.e(339)]).then(i.bind(i,339));return{id:Yi,diagram:t}}},Gi="sankey",Xi={id:Gi,detector:t=>/^\s*sankey-beta/.test(t),loader:async()=>{const{diagram:t}=await i.e(5622).then(i.bind(i,5622));return{id:Gi,diagram:t}}};let Ji=!1;const Qi=()=>{Ji||(Ji=!0,Oi("error",Pi,(t=>"error"===t.toLowerCase().trim())),Oi("---",{db:{clear:()=>{}},styles:{},renderer:{draw:()=>{}},parser:{parser:{yy:{}},parse:()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")}},init:()=>null},(t=>t.toLowerCase().trimStart().startsWith("---"))),Wt(je,oi,ri,$e,He,Ue,Ye,Ke,ei,Hi,qe,Ie,Vi,Ui,Pe,ci,ai,ui,Ge,Xi,Je))};class Ki{constructor(t,e={}){this.text=t,this.metadata=e,this.type="graph",this.text=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"})),e}(t),this.text+="\n";const i=Fe();try{this.type=Ht(t,i)}catch(n){this.type="error",this.detectError=n}const r=Ii(this.type);at.debug("Type "+this.type),this.db=r.db,this.renderer=r.renderer,this.parser=r.parser,this.parser.parser.yy=this.db,this.init=r.init,this.parse()}parse(){var t,e,i,r,n;if(this.detectError)throw this.detectError;null==(e=(t=this.db).clear)||e.call(t);const o=Fe();null==(i=this.init)||i.call(this,o),this.metadata.title&&(null==(n=(r=this.db).setDiagramTitle)||n.call(r,this.metadata.title)),this.parser.parse(this.text)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}}const tr=async(t,e={})=>{const i=Ht(t,Fe());try{Ii(i)}catch(r){const t=Rt[i].loader;if(!t)throw new Pt(`Diagram ${i} not found.`);const{id:e,diagram:n}=await t();Oi(e,n)}return new Ki(t,e)};let er=[];const ir=t=>{er.push(t)},rr="graphics-document document";const nr=t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart();function or(t){return null==t}var sr={isNothing:or,isObject:function(t){return"object"==typeof t&&null!==t},toArray:function(t){return Array.isArray(t)?t:or(t)?[]:[t]},repeat:function(t,e){var i,r="";for(i=0;ia&&(e=r-a+(o=" ... ").length),i-r>a&&(i=r+a-(s=" ...").length),{str:o+t.slice(e,i).replace(/\t/g,"\u2192")+s,pos:r-e+o.length}}function ur(t,e){return sr.repeat(" ",e-t.length)+t}var dr=function(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,n=[0],o=[],s=-1;i=r.exec(t.buffer);)o.push(i.index),n.push(i.index+i[0].length),t.position<=i.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var a,l,c="",h=Math.min(t.line+e.linesAfter,o.length).toString().length,u=e.maxLength-(e.indent+h+3);for(a=1;a<=e.linesBefore&&!(s-a<0);a++)l=hr(t.buffer,n[s-a],o[s-a],t.position-(n[s]-n[s-a]),u),c=sr.repeat(" ",e.indent)+ur((t.line-a+1).toString(),h)+" | "+l.str+"\n"+c;for(l=hr(t.buffer,n[s],o[s],t.position,u),c+=sr.repeat(" ",e.indent)+ur((t.line+1).toString(),h)+" | "+l.str+"\n",c+=sr.repeat("-",e.indent+h+3+l.pos)+"^\n",a=1;a<=e.linesAfter&&!(s+a>=o.length);a++)l=hr(t.buffer,n[s+a],o[s+a],t.position-(n[s]-n[s+a]),u),c+=sr.repeat(" ",e.indent)+ur((t.line+a+1).toString(),h)+" | "+l.str+"\n";return c.replace(/\n$/,"")},fr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],pr=["scalar","sequence","mapping"];var gr=function(t,e){var i,r;if(e=e||{},Object.keys(e).forEach((function(e){if(-1===fr.indexOf(e))throw new cr('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=(i=e.styleAliases||null,r={},null!==i&&Object.keys(i).forEach((function(t){i[t].forEach((function(e){r[String(e)]=t}))})),r),-1===pr.indexOf(this.kind))throw new cr('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function mr(t,e){var i=[];return t[e].forEach((function(t){var e=i.length;i.forEach((function(i,r){i.tag===t.tag&&i.kind===t.kind&&i.multi===t.multi&&(e=r)})),i[e]=t})),i}function yr(t){return this.extend(t)}yr.prototype.extend=function(t){var e=[],i=[];if(t instanceof gr)i.push(t);else if(Array.isArray(t))i=i.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new cr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit))}e.forEach((function(t){if(!(t instanceof gr))throw new cr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new cr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new cr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),i.forEach((function(t){if(!(t instanceof gr))throw new cr("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var r=Object.create(yr.prototype);return r.implicit=(this.implicit||[]).concat(e),r.explicit=(this.explicit||[]).concat(i),r.compiledImplicit=mr(r,"implicit"),r.compiledExplicit=mr(r,"explicit"),r.compiledTypeMap=function(){var t,e,i={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function r(t){t.multi?(i.multi[t.kind].push(t),i.multi.fallback.push(t)):i[t.kind][t.tag]=i.fallback[t.tag]=t}for(t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Tr=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var wr=/^[-+]?[0-9]+e/;var Sr=new gr("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!Tr.test(t)||"_"===t[t.length-1])},construct:function(t){var e,i;return i="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===i?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:i*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||sr.isNegativeZero(t))},represent:function(t,e){var i;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(sr.isNegativeZero(t))return"-0.0";return i=t.toString(10),wr.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),Br=xr.extend({implicit:[br,Cr,kr,Sr]}),Fr=Br,Lr=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Ar=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var Mr=new gr("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(t){return null!==t&&(null!==Lr.exec(t)||null!==Ar.exec(t))},construct:function(t){var e,i,r,n,o,s,a,l,c=0,h=null;if(null===(e=Lr.exec(t))&&(e=Ar.exec(t)),null===e)throw new Error("Date resolve error");if(i=+e[1],r=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(i,r,n));if(o=+e[4],s=+e[5],a=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(i,r,n,o,s,a,c)),h&&l.setTime(l.getTime()-h),l},instanceOf:Date,represent:function(t){return t.toISOString()}});var Er=new gr("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}}),Nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var Zr=new gr("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,i,r=0,n=t.length,o=Nr;for(i=0;i64)){if(e<0)return!1;r+=6}return r%8==0},construct:function(t){var e,i,r=t.replace(/[\r\n=]/g,""),n=r.length,o=Nr,s=0,a=[];for(e=0;e>16&255),a.push(s>>8&255),a.push(255&s)),s=s<<6|o.indexOf(r.charAt(e));return 0===(i=n%4*6)?(a.push(s>>16&255),a.push(s>>8&255),a.push(255&s)):18===i?(a.push(s>>10&255),a.push(s>>2&255)):12===i&&a.push(s>>4&255),new Uint8Array(a)},predicate:function(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)},represent:function(t){var e,i,r="",n=0,o=t.length,s=Nr;for(e=0;e>18&63],r+=s[n>>12&63],r+=s[n>>6&63],r+=s[63&n]),n=(n<<8)+t[e];return 0===(i=o%3)?(r+=s[n>>18&63],r+=s[n>>12&63],r+=s[n>>6&63],r+=s[63&n]):2===i?(r+=s[n>>10&63],r+=s[n>>4&63],r+=s[n<<2&63],r+=s[64]):1===i&&(r+=s[n>>2&63],r+=s[n<<4&63],r+=s[64],r+=s[64]),r}}),jr=Object.prototype.hasOwnProperty,Or=Object.prototype.toString;var Ir=new gr("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(t){if(null===t)return!0;var e,i,r,n,o,s=[],a=t;for(e=0,i=a.length;e>10),56320+(t-65536&1023))}for(var un=new Array(256),dn=new Array(256),fn=0;fn<256;fn++)un[fn]=cn(fn)?1:0,dn[fn]=cn(fn);function pn(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Pr,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function gn(t,e){var i={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return i.snippet=dr(i),new cr(e,i)}function mn(t,e){throw gn(t,e)}function yn(t,e){t.onWarning&&t.onWarning.call(null,gn(t,e))}var xn={YAML:function(t,e,i){var r,n,o;null!==t.version&&mn(t,"duplication of %YAML directive"),1!==i.length&&mn(t,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(i[0]))&&mn(t,"ill-formed argument of the YAML directive"),n=parseInt(r[1],10),o=parseInt(r[2],10),1!==n&&mn(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&yn(t,"unsupported YAML version of the document")},TAG:function(t,e,i){var r,n;2!==i.length&&mn(t,"TAG directive accepts exactly two arguments"),r=i[0],n=i[1],tn.test(r)||mn(t,"ill-formed tag handle (first argument) of the TAG directive"),Rr.call(t.tagMap,r)&&mn(t,'there is a previously declared suffix for "'+r+'" tag handle'),en.test(n)||mn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(o){mn(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n}};function bn(t,e,i,r){var n,o,s,a;if(e1&&(t.result+=sr.repeat("\n",e-1))}function Sn(t,e){var i,r,n=t.tag,o=t.anchor,s=[],a=!1;if(-1!==t.firstTabInLine)return!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=s),r=t.input.charCodeAt(t.position);0!==r&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,mn(t,"tab characters must not be used in indentation")),45===r)&&sn(t.input.charCodeAt(t.position+1));)if(a=!0,t.position++,kn(t,!0,-1)&&t.lineIndent<=e)s.push(null),r=t.input.charCodeAt(t.position);else if(i=t.line,Ln(t,e,Ur,!1,!0),s.push(t.result),kn(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===i||t.lineIndent>e)&&0!==r)mn(t,"bad indentation of a sequence entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente)&&(y&&(s=t.line,a=t.lineStart,l=t.position),Ln(t,e,Yr,!0,n)&&(y?g=t.result:m=t.result),y||(_n(t,d,f,p,g,m,s,a,l),p=g=m=null),kn(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)mn(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===n?mn(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?mn(t,"repeat of an indentation width identifier"):(h=e+n-1,c=!0)}if(on(o)){do{o=t.input.charCodeAt(++t.position)}while(on(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!nn(o)&&0!==o)}for(;0!==o;){for(vn(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!c||t.lineIndenth&&(h=t.lineIndent),nn(o))u++;else{if(t.lineIndent0){for(n=s,o=0;n>0;n--)(s=ln(a=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+s:mn(t,"expected hexadecimal character");t.result+=hn(o),t.position++}else mn(t,"unknown escape sequence");i=r=t.position}else nn(a)?(bn(t,i,r,!0),wn(t,kn(t,!1,e)),i=r=t.position):t.position===t.lineStart&&Tn(t)?mn(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}mn(t,"unexpected end of the stream within a double quoted scalar")}(t,d)?m=!0:!function(t){var e,i,r;if(42!==(r=t.input.charCodeAt(t.position)))return!1;for(r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!sn(r)&&!an(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&mn(t,"name of an alias node must contain at least one character"),i=t.input.slice(e,t.position),Rr.call(t.anchorMap,i)||mn(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],kn(t,!0,-1),!0}(t)?function(t,e,i){var r,n,o,s,a,l,c,h,u=t.kind,d=t.result;if(sn(h=t.input.charCodeAt(t.position))||an(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(sn(r=t.input.charCodeAt(t.position+1))||i&&an(r)))return!1;for(t.kind="scalar",t.result="",n=o=t.position,s=!1;0!==h;){if(58===h){if(sn(r=t.input.charCodeAt(t.position+1))||i&&an(r))break}else if(35===h){if(sn(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Tn(t)||i&&an(h))break;if(nn(h)){if(a=t.line,l=t.lineStart,c=t.lineIndent,kn(t,!1,-1),t.lineIndent>=e){s=!0,h=t.input.charCodeAt(t.position);continue}t.position=o,t.line=a,t.lineStart=l,t.lineIndent=c;break}}s&&(bn(t,n,o,!1),wn(t,t.line-a),n=o=t.position,s=!1),on(h)||(o=t.position+1),h=t.input.charCodeAt(++t.position)}return bn(t,n,o,!1),!!t.result||(t.kind=u,t.result=d,!1)}(t,d,Hr===i)&&(m=!0,null===t.tag&&(t.tag="?")):(m=!0,null===t.tag&&null===t.anchor||mn(t,"alias node should not have any properties")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===p&&(m=a&&Sn(t,f))),null===t.tag)null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);else if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&mn(t,'unacceptable node kind for !> tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&mn(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):mn(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||m}function An(t){var e,i,r,n,o=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(kn(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(s=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!sn(n);)n=t.input.charCodeAt(++t.position);for(r=[],(i=t.input.slice(e,t.position)).length<1&&mn(t,"directive name must not be less than one character in length");0!==n;){for(;on(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!nn(n));break}if(nn(n))break;for(e=t.position;0!==n&&!sn(n);)n=t.input.charCodeAt(++t.position);r.push(t.input.slice(e,t.position))}0!==n&&vn(t),Rr.call(xn,i)?xn[i](t,i,r):yn(t,'unknown document directive "'+i+'"')}kn(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,kn(t,!0,-1)):s&&mn(t,"directives end mark is expected"),Ln(t,t.lineIndent-1,Yr,!1,!0),kn(t,!0,-1),t.checkLineBreaks&&Qr.test(t.input.slice(o,t.position))&&yn(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Tn(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,kn(t,!0,-1)):t.positiont.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,i)=>"<"+e+i.replace(/="([^"]*)"/g,"='$1'")+">")),jn=t=>{const{text:e,metadata:i}=function(t){const e=t.match(qt);if(!e)return{text:t,metadata:{}};let i=Nn(e[1],{schema:En})??{};i="object"!=typeof i||Array.isArray(i)?{}:i;const r={};return i.displayMode&&(r.displayMode=i.displayMode.toString()),i.title&&(r.title=i.title.toString()),i.config&&(r.config=i.config),{text:t.slice(e[0].length),metadata:r}}(t),{displayMode:r,title:n,config:o={}}=i;return r&&(o.gantt||(o.gantt={}),o.gantt.displayMode=r),{title:n,config:o,text:e}},On=t=>{const e=ye.detectInit(t)??{},i=ye.detectDirective(t,"wrap");return Array.isArray(i)?e.wrap=i.some((({type:t})=>{})):"wrap"===(null==i?void 0:i.type)&&(e.wrap=!0),{text:(r=t,r.replace($t,"")),directive:e};var r};function In(t){const e=Zn(t),i=jn(e),r=On(i.text),n=me(i.config,r.directive);return{code:t=nr(r.text),title:i.title,config:n}}const Dn=["foreignobject"],qn=["dominant-baseline"];function $n(t){const e=In(t);return Me(),Ae(e.config??{}),e}const zn=(t,e,i=[])=>`\n.${t} ${e} { ${i.join(" !important; ")} !important; }`,Pn=(t,e,i,r)=>{const n=((t,e={})=>{var i;let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!(0,ot.Z)(e)){const n=t.htmlLabels||(null==(i=t.flowchart)?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const t in e){const i=e[t];(0,ot.Z)(i.styles)||n.forEach((t=>{r+=zn(i.id,t,i.styles)})),(0,ot.Z)(i.textStyles)||(r+=zn(i.id,"tspan",i.textStyles))}}return r})(t,i);return M(tt(`${r}{${gi(e,n,t.themeVariables)}}`),E)},Rn=(t,e,i,r,n)=>{const o=t.append("div");o.attr("id",i),r&&o.attr("style",r);const s=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&s.attr("xmlns:xlink",n),s.append("g"),t};function Hn(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const Wn=(t,e={})=>{const{code:i}=In(t);return tr(i,e)};const Un=Object.freeze({render:async function(t,e,i){var r,n,o,l,c,h;Qi();const u=$n(e);e=u.code;const d=Fe();at.debug(d),e.length>((null==d?void 0:d.maxTextSize)??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const f="#"+t,p="i"+t,g="#"+p,m="d"+t,y="#"+m;let x=(0,s.Ys)("body");const b="sandbox"===d.securityLevel,C="loose"===d.securityLevel,_=d.fontFamily;if(void 0!==i){if(i&&(i.innerHTML=""),b){const t=Hn((0,s.Ys)(i),p);x=(0,s.Ys)(t.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=(0,s.Ys)(i);Rn(x,t,m,`font-family: ${_}`,"http://www.w3.org/1999/xlink")}else{if(((t,e,i,r)=>{var n,o,s;null==(n=t.getElementById(e))||n.remove(),null==(o=t.getElementById(i))||o.remove(),null==(s=t.getElementById(r))||s.remove()})(document,t,m,p),b){const t=Hn((0,s.Ys)("body"),p);x=(0,s.Ys)(t.nodes()[0].contentDocument.body),x.node().style.margin=0}else x=(0,s.Ys)("body");Rn(x,t,m)}let v,k;try{v=await Wn(e,{title:u.title})}catch(Z){v=new Ki("error"),k=Z}const T=x.select(y).node(),w=v.type,S=T.firstChild,B=S.firstChild,F=null==(n=(r=v.renderer).getClasses)?void 0:n.call(r,e,v),L=Pn(d,w,F,f),A=document.createElement("style");A.innerHTML=L,S.insertBefore(A,B);try{await v.renderer.draw(e,t,be,v)}catch(j){throw zi.draw(e,t,be),j}!function(t,e,i,r){(function(t,e){t.attr("role",rr),""!==e&&t.attr("aria-roledescription",e)})(e,t),function(t,e,i,r){if(void 0!==t.insert){if(i){const e=`chart-desc-${r}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(i)}if(e){const i=`chart-title-${r}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}(e,i,r,e.attr("id"))}(w,x.select(`${y} svg`),null==(l=(o=v.db).getAccTitle)?void 0:l.call(o),null==(h=(c=v.db).getAccDescription)?void 0:h.call(c)),x.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let M=x.select(y).node().innerHTML;if(at.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),M=((t="",e,i)=>{let r=t;return i||e||(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),r=xe(r),r=r.replace(/
/g,"
"),r})(M,b,mt(d.arrowMarkerAbsolute)),b){M=((t="",e)=>{var i,r;return`