@copilotkitnext/react 0.0.22-alpha.7 → 0.0.22-alpha.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/angular-html-LD6QEAZE.mjs +0 -7
- package/dist/angular-html-LD6QEAZE.mjs.map +0 -1
- package/dist/angular-ts-FGK7I2F5.mjs +0 -37
- package/dist/angular-ts-FGK7I2F5.mjs.map +0 -1
- package/dist/angular-ts-XZTE5LQS.mjs +0 -37
- package/dist/angular-ts-XZTE5LQS.mjs.map +0 -1
- package/dist/apl-VB2EG5RZ.mjs +0 -22
- package/dist/apl-VB2EG5RZ.mjs.map +0 -1
- package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs +0 -8712
- package/dist/architectureDiagram-VXUJARFQ-PPLKSFYC.mjs.map +0 -1
- package/dist/blade-EZDWULER.mjs +0 -26
- package/dist/blade-EZDWULER.mjs.map +0 -1
- package/dist/blade-HS4Z7O3Y.mjs +0 -26
- package/dist/blade-HS4Z7O3Y.mjs.map +0 -1
- package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs +0 -3618
- package/dist/blockDiagram-VD42YOAC-7SIEWHYD.mjs.map +0 -1
- package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs +0 -2495
- package/dist/c4Diagram-YG6GDRKO-G2UUBRHQ.mjs.map +0 -1
- package/dist/chunk-2BAFECUC.mjs +0 -28
- package/dist/chunk-2BAFECUC.mjs.map +0 -1
- package/dist/chunk-BF5LDW2L.mjs +0 -65
- package/dist/chunk-BF5LDW2L.mjs.map +0 -1
- package/dist/chunk-BUEC2HNL.mjs +0 -762
- package/dist/chunk-BUEC2HNL.mjs.map +0 -1
- package/dist/chunk-CRGJ2YCV.mjs +0 -109
- package/dist/chunk-CRGJ2YCV.mjs.map +0 -1
- package/dist/chunk-DKZXT4VQ.mjs +0 -19
- package/dist/chunk-DKZXT4VQ.mjs.map +0 -1
- package/dist/chunk-DYQXFOGA.mjs +0 -34
- package/dist/chunk-DYQXFOGA.mjs.map +0 -1
- package/dist/chunk-ENI667QL.mjs +0 -806
- package/dist/chunk-ENI667QL.mjs.map +0 -1
- package/dist/chunk-GEUZOPED.mjs +0 -1834
- package/dist/chunk-GEUZOPED.mjs.map +0 -1
- package/dist/chunk-GU7334FJ.mjs +0 -538
- package/dist/chunk-GU7334FJ.mjs.map +0 -1
- package/dist/chunk-HNKEYT4A.mjs +0 -4693
- package/dist/chunk-HNKEYT4A.mjs.map +0 -1
- package/dist/chunk-HTMHAYGC.mjs +0 -14
- package/dist/chunk-HTMHAYGC.mjs.map +0 -1
- package/dist/chunk-JRLFMJ6U.mjs +0 -1923
- package/dist/chunk-JRLFMJ6U.mjs.map +0 -1
- package/dist/chunk-JYRND4DC.mjs +0 -22
- package/dist/chunk-JYRND4DC.mjs.map +0 -1
- package/dist/chunk-KFEPUFID.mjs +0 -52
- package/dist/chunk-KFEPUFID.mjs.map +0 -1
- package/dist/chunk-M3UH7XZX.mjs +0 -6222
- package/dist/chunk-M3UH7XZX.mjs.map +0 -1
- package/dist/chunk-ND4RYWG7.mjs +0 -12
- package/dist/chunk-ND4RYWG7.mjs.map +0 -1
- package/dist/chunk-VLSLBZME.mjs +0 -51
- package/dist/chunk-VLSLBZME.mjs.map +0 -1
- package/dist/chunk-WJBV3P3K.mjs +0 -55
- package/dist/chunk-WJBV3P3K.mjs.map +0 -1
- package/dist/chunk-X2TQ2HDS.mjs +0 -44
- package/dist/chunk-X2TQ2HDS.mjs.map +0 -1
- package/dist/chunk-YIDZOZG3.mjs +0 -103
- package/dist/chunk-YIDZOZG3.mjs.map +0 -1
- package/dist/chunk-YLW7IP7V.mjs +0 -14525
- package/dist/chunk-YLW7IP7V.mjs.map +0 -1
- package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs +0 -38
- package/dist/classDiagram-2ON5EDUG-WUV4PTK5.mjs.map +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs +0 -38
- package/dist/classDiagram-v2-WZHVMYZB-J4QNVYPE.mjs.map +0 -1
- package/dist/cobol-PNTKRG5I.mjs +0 -17
- package/dist/cobol-PNTKRG5I.mjs.map +0 -1
- package/dist/crystal-BSMHK65A.mjs +0 -23
- package/dist/crystal-BSMHK65A.mjs.map +0 -1
- package/dist/dagre-6UL2VRFP-XN667C7N.mjs +0 -710
- package/dist/dagre-6UL2VRFP-XN667C7N.mjs.map +0 -1
- package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs +0 -538
- package/dist/diagram-PSM6KHXK-VA2CF5LZ.mjs.map +0 -1
- package/dist/diagram-QEK2KX5R-H3EHES33.mjs +0 -319
- package/dist/diagram-QEK2KX5R-H3EHES33.mjs.map +0 -1
- package/dist/diagram-S2PKOQOG-FOQYPB22.mjs +0 -231
- package/dist/diagram-S2PKOQOG-FOQYPB22.mjs.map +0 -1
- package/dist/edge-JOI74UJM.mjs +0 -19
- package/dist/edge-JOI74UJM.mjs.map +0 -1
- package/dist/elixir-FEL6DDPJ.mjs +0 -15
- package/dist/elixir-FEL6DDPJ.mjs.map +0 -1
- package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs +0 -1175
- package/dist/erDiagram-Q2GNP2WA-IXNJSD2A.mjs.map +0 -1
- package/dist/erb-Q2D6FWX3.mjs +0 -32
- package/dist/erb-Q2D6FWX3.mjs.map +0 -1
- package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs +0 -2349
- package/dist/flowDiagram-NV44I4VS-ISKGEBMD.mjs.map +0 -1
- package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs +0 -2344
- package/dist/ganttDiagram-LVOFAZNH-OAL7V7IR.mjs.map +0 -1
- package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs +0 -1221
- package/dist/gitGraphDiagram-NY62KEGX-RKN2CCAZ.mjs.map +0 -1
- package/dist/glimmer-js-B32LCGFA.mjs +0 -19
- package/dist/glimmer-js-B32LCGFA.mjs.map +0 -1
- package/dist/glimmer-ts-4PHFAQCG.mjs +0 -19
- package/dist/glimmer-ts-4PHFAQCG.mjs.map +0 -1
- package/dist/hack-3ZNSL4KD.mjs +0 -17
- package/dist/hack-3ZNSL4KD.mjs.map +0 -1
- package/dist/handlebars-ICBC3AZK.mjs +0 -19
- package/dist/handlebars-ICBC3AZK.mjs.map +0 -1
- package/dist/html-BGY5P773.mjs +0 -6
- package/dist/html-BGY5P773.mjs.map +0 -1
- package/dist/html-derivative-3HGXHHFE.mjs +0 -7
- package/dist/html-derivative-3HGXHHFE.mjs.map +0 -1
- package/dist/index.css +0 -2385
- package/dist/index.css.map +0 -1
- package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs +0 -49
- package/dist/infoDiagram-F6ZHWCRC-Z7KMJJ45.mjs.map +0 -1
- package/dist/jinja-WL6HNMB5.mjs +0 -22
- package/dist/jinja-WL6HNMB5.mjs.map +0 -1
- package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs +0 -1259
- package/dist/journeyDiagram-XKPGCS4Q-BMTOBHZ4.mjs.map +0 -1
- package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs +0 -1062
- package/dist/kanban-definition-3W4ZIXB7-MVFRARF4.mjs.map +0 -1
- package/dist/katex-4R42CMCB.mjs +0 -4
- package/dist/katex-4R42CMCB.mjs.map +0 -1
- package/dist/liquid-YS3YPW54.mjs +0 -19
- package/dist/liquid-YS3YPW54.mjs.map +0 -1
- package/dist/logo-mark-OHF64HAY.svg +0 -8
- package/dist/mdc-A66KLOT4.mjs +0 -20
- package/dist/mdc-A66KLOT4.mjs.map +0 -1
- package/dist/mermaid.core-4OWTNZSL.mjs +0 -1587
- package/dist/mermaid.core-4OWTNZSL.mjs.map +0 -1
- package/dist/mermaid.core-7AUE4M6E.mjs +0 -1587
- package/dist/mermaid.core-7AUE4M6E.mjs.map +0 -1
- package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs +0 -1112
- package/dist/mindmap-definition-VGOIOE7T-7FMA2CPY.mjs.map +0 -1
- package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs +0 -1112
- package/dist/mindmap-definition-VGOIOE7T-VNF7JZOY.mjs.map +0 -1
- package/dist/nim-HUBKBJHZ.mjs +0 -26
- package/dist/nim-HUBKBJHZ.mjs.map +0 -1
- package/dist/perl-QHAMWWQ5.mjs +0 -22
- package/dist/perl-QHAMWWQ5.mjs.map +0 -1
- package/dist/php-FS5GKSPN.mjs +0 -11
- package/dist/php-FS5GKSPN.mjs.map +0 -1
- package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs +0 -200
- package/dist/pieDiagram-ADFJNKIX-EER3WTCU.mjs.map +0 -1
- package/dist/pug-WTY5FMEA.mjs +0 -17
- package/dist/pug-WTY5FMEA.mjs.map +0 -1
- package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs +0 -1344
- package/dist/quadrantDiagram-AYHSOK5B-WQCIRJOK.mjs.map +0 -1
- package/dist/razor-BAB7LFWZ.mjs +0 -17
- package/dist/razor-BAB7LFWZ.mjs.map +0 -1
- package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs +0 -1179
- package/dist/requirementDiagram-UZGBJVZJ-RVM6Q2TT.mjs.map +0 -1
- package/dist/rst-AY7U27YM.mjs +0 -41
- package/dist/rst-AY7U27YM.mjs.map +0 -1
- package/dist/rst-Y2VLYMJI.mjs +0 -41
- package/dist/rst-Y2VLYMJI.mjs.map +0 -1
- package/dist/ruby-K4BNEYWG.mjs +0 -22
- package/dist/ruby-K4BNEYWG.mjs.map +0 -1
- package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs +0 -1230
- package/dist/sankeyDiagram-TZEHDZUN-H7BVEXGO.mjs.map +0 -1
- package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs +0 -3885
- package/dist/sequenceDiagram-WL72ISMW-XBGZSOYI.mjs.map +0 -1
- package/dist/soy-5QMQV2KL.mjs +0 -15
- package/dist/soy-5QMQV2KL.mjs.map +0 -1
- package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs +0 -467
- package/dist/stateDiagram-FKZM4ZOC-WRIBVFSJ.mjs.map +0 -1
- package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs +0 -37
- package/dist/stateDiagram-v2-4FDKWEC3-SPDO7R6D.mjs.map +0 -1
- package/dist/templ-VSARRSO2.mjs +0 -17
- package/dist/templ-VSARRSO2.mjs.map +0 -1
- package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs +0 -1226
- package/dist/timeline-definition-IT6M3QCI-PX4A2RIH.mjs.map +0 -1
- package/dist/ts-tags-YK3Q2LIW.mjs +0 -68
- package/dist/ts-tags-YK3Q2LIW.mjs.map +0 -1
- package/dist/twig-HNMWLN6H.mjs +0 -40
- package/dist/twig-HNMWLN6H.mjs.map +0 -1
- package/dist/vue-7OSX6ZY5.mjs +0 -10
- package/dist/vue-7OSX6ZY5.mjs.map +0 -1
- package/dist/vue-html-AQH2V2EU.mjs +0 -20
- package/dist/vue-html-AQH2V2EU.mjs.map +0 -1
- package/dist/vue-vine-GCYT2IGV.mjs +0 -29
- package/dist/vue-vine-GCYT2IGV.mjs.map +0 -1
- package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs +0 -1865
- package/dist/xychartDiagram-PRI3JC2R-65KZQZDU.mjs.map +0 -1
package/dist/chunk-HNKEYT4A.mjs
DELETED
|
@@ -1,4693 +0,0 @@
|
|
|
1
|
-
import { __name, __export, log, setLogLevel } from './chunk-WHXHCOFP.mjs';
|
|
2
|
-
|
|
3
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/channel.js
|
|
4
|
-
var Channel = {
|
|
5
|
-
/* CLAMP */
|
|
6
|
-
min: {
|
|
7
|
-
r: 0,
|
|
8
|
-
g: 0,
|
|
9
|
-
b: 0,
|
|
10
|
-
s: 0,
|
|
11
|
-
l: 0,
|
|
12
|
-
a: 0
|
|
13
|
-
},
|
|
14
|
-
max: {
|
|
15
|
-
r: 255,
|
|
16
|
-
g: 255,
|
|
17
|
-
b: 255,
|
|
18
|
-
h: 360,
|
|
19
|
-
s: 100,
|
|
20
|
-
l: 100,
|
|
21
|
-
a: 1
|
|
22
|
-
},
|
|
23
|
-
clamp: {
|
|
24
|
-
r: (r) => r >= 255 ? 255 : r < 0 ? 0 : r,
|
|
25
|
-
g: (g) => g >= 255 ? 255 : g < 0 ? 0 : g,
|
|
26
|
-
b: (b) => b >= 255 ? 255 : b < 0 ? 0 : b,
|
|
27
|
-
h: (h) => h % 360,
|
|
28
|
-
s: (s) => s >= 100 ? 100 : s < 0 ? 0 : s,
|
|
29
|
-
l: (l) => l >= 100 ? 100 : l < 0 ? 0 : l,
|
|
30
|
-
a: (a) => a >= 1 ? 1 : a < 0 ? 0 : a
|
|
31
|
-
},
|
|
32
|
-
/* CONVERSION */
|
|
33
|
-
//SOURCE: https://planetcalc.com/7779
|
|
34
|
-
toLinear: (c) => {
|
|
35
|
-
const n = c / 255;
|
|
36
|
-
return c > 0.03928 ? Math.pow((n + 0.055) / 1.055, 2.4) : n / 12.92;
|
|
37
|
-
},
|
|
38
|
-
//SOURCE: https://gist.github.com/mjackson/5311256
|
|
39
|
-
hue2rgb: (p, q, t) => {
|
|
40
|
-
if (t < 0)
|
|
41
|
-
t += 1;
|
|
42
|
-
if (t > 1)
|
|
43
|
-
t -= 1;
|
|
44
|
-
if (t < 1 / 6)
|
|
45
|
-
return p + (q - p) * 6 * t;
|
|
46
|
-
if (t < 1 / 2)
|
|
47
|
-
return q;
|
|
48
|
-
if (t < 2 / 3)
|
|
49
|
-
return p + (q - p) * (2 / 3 - t) * 6;
|
|
50
|
-
return p;
|
|
51
|
-
},
|
|
52
|
-
hsl2rgb: ({ h, s, l }, channel2) => {
|
|
53
|
-
if (!s)
|
|
54
|
-
return l * 2.55;
|
|
55
|
-
h /= 360;
|
|
56
|
-
s /= 100;
|
|
57
|
-
l /= 100;
|
|
58
|
-
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
59
|
-
const p = 2 * l - q;
|
|
60
|
-
switch (channel2) {
|
|
61
|
-
case "r":
|
|
62
|
-
return Channel.hue2rgb(p, q, h + 1 / 3) * 255;
|
|
63
|
-
case "g":
|
|
64
|
-
return Channel.hue2rgb(p, q, h) * 255;
|
|
65
|
-
case "b":
|
|
66
|
-
return Channel.hue2rgb(p, q, h - 1 / 3) * 255;
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
rgb2hsl: ({ r, g, b }, channel2) => {
|
|
70
|
-
r /= 255;
|
|
71
|
-
g /= 255;
|
|
72
|
-
b /= 255;
|
|
73
|
-
const max = Math.max(r, g, b);
|
|
74
|
-
const min = Math.min(r, g, b);
|
|
75
|
-
const l = (max + min) / 2;
|
|
76
|
-
if (channel2 === "l")
|
|
77
|
-
return l * 100;
|
|
78
|
-
if (max === min)
|
|
79
|
-
return 0;
|
|
80
|
-
const d = max - min;
|
|
81
|
-
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
82
|
-
if (channel2 === "s")
|
|
83
|
-
return s * 100;
|
|
84
|
-
switch (max) {
|
|
85
|
-
case r:
|
|
86
|
-
return ((g - b) / d + (g < b ? 6 : 0)) * 60;
|
|
87
|
-
case g:
|
|
88
|
-
return ((b - r) / d + 2) * 60;
|
|
89
|
-
case b:
|
|
90
|
-
return ((r - g) / d + 4) * 60;
|
|
91
|
-
default:
|
|
92
|
-
return -1;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
var channel_default = Channel;
|
|
97
|
-
|
|
98
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/lang.js
|
|
99
|
-
var Lang = {
|
|
100
|
-
/* API */
|
|
101
|
-
clamp: (number, lower, upper) => {
|
|
102
|
-
if (lower > upper)
|
|
103
|
-
return Math.min(lower, Math.max(upper, number));
|
|
104
|
-
return Math.min(upper, Math.max(lower, number));
|
|
105
|
-
},
|
|
106
|
-
round: (number) => {
|
|
107
|
-
return Math.round(number * 1e10) / 1e10;
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
var lang_default = Lang;
|
|
111
|
-
|
|
112
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/unit.js
|
|
113
|
-
var Unit = {
|
|
114
|
-
/* API */
|
|
115
|
-
dec2hex: (dec) => {
|
|
116
|
-
const hex = Math.round(dec).toString(16);
|
|
117
|
-
return hex.length > 1 ? hex : `0${hex}`;
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
var unit_default = Unit;
|
|
121
|
-
|
|
122
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/utils/index.js
|
|
123
|
-
var Utils = {
|
|
124
|
-
channel: channel_default,
|
|
125
|
-
lang: lang_default,
|
|
126
|
-
unit: unit_default
|
|
127
|
-
};
|
|
128
|
-
var utils_default = Utils;
|
|
129
|
-
|
|
130
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/constants.js
|
|
131
|
-
var DEC2HEX = {};
|
|
132
|
-
for (let i = 0; i <= 255; i++)
|
|
133
|
-
DEC2HEX[i] = utils_default.unit.dec2hex(i);
|
|
134
|
-
var TYPE = {
|
|
135
|
-
ALL: 0,
|
|
136
|
-
RGB: 1,
|
|
137
|
-
HSL: 2
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/type.js
|
|
141
|
-
var Type = class {
|
|
142
|
-
constructor() {
|
|
143
|
-
this.type = TYPE.ALL;
|
|
144
|
-
}
|
|
145
|
-
/* API */
|
|
146
|
-
get() {
|
|
147
|
-
return this.type;
|
|
148
|
-
}
|
|
149
|
-
set(type) {
|
|
150
|
-
if (this.type && this.type !== type)
|
|
151
|
-
throw new Error("Cannot change both RGB and HSL channels at the same time");
|
|
152
|
-
this.type = type;
|
|
153
|
-
}
|
|
154
|
-
reset() {
|
|
155
|
-
this.type = TYPE.ALL;
|
|
156
|
-
}
|
|
157
|
-
is(type) {
|
|
158
|
-
return this.type === type;
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
var type_default = Type;
|
|
162
|
-
|
|
163
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/index.js
|
|
164
|
-
var Channels = class {
|
|
165
|
-
/* CONSTRUCTOR */
|
|
166
|
-
constructor(data, color) {
|
|
167
|
-
this.color = color;
|
|
168
|
-
this.changed = false;
|
|
169
|
-
this.data = data;
|
|
170
|
-
this.type = new type_default();
|
|
171
|
-
}
|
|
172
|
-
/* API */
|
|
173
|
-
set(data, color) {
|
|
174
|
-
this.color = color;
|
|
175
|
-
this.changed = false;
|
|
176
|
-
this.data = data;
|
|
177
|
-
this.type.type = TYPE.ALL;
|
|
178
|
-
return this;
|
|
179
|
-
}
|
|
180
|
-
/* HELPERS */
|
|
181
|
-
_ensureHSL() {
|
|
182
|
-
const data = this.data;
|
|
183
|
-
const { h, s, l } = data;
|
|
184
|
-
if (h === void 0)
|
|
185
|
-
data.h = utils_default.channel.rgb2hsl(data, "h");
|
|
186
|
-
if (s === void 0)
|
|
187
|
-
data.s = utils_default.channel.rgb2hsl(data, "s");
|
|
188
|
-
if (l === void 0)
|
|
189
|
-
data.l = utils_default.channel.rgb2hsl(data, "l");
|
|
190
|
-
}
|
|
191
|
-
_ensureRGB() {
|
|
192
|
-
const data = this.data;
|
|
193
|
-
const { r, g, b } = data;
|
|
194
|
-
if (r === void 0)
|
|
195
|
-
data.r = utils_default.channel.hsl2rgb(data, "r");
|
|
196
|
-
if (g === void 0)
|
|
197
|
-
data.g = utils_default.channel.hsl2rgb(data, "g");
|
|
198
|
-
if (b === void 0)
|
|
199
|
-
data.b = utils_default.channel.hsl2rgb(data, "b");
|
|
200
|
-
}
|
|
201
|
-
/* GETTERS */
|
|
202
|
-
get r() {
|
|
203
|
-
const data = this.data;
|
|
204
|
-
const r = data.r;
|
|
205
|
-
if (!this.type.is(TYPE.HSL) && r !== void 0)
|
|
206
|
-
return r;
|
|
207
|
-
this._ensureHSL();
|
|
208
|
-
return utils_default.channel.hsl2rgb(data, "r");
|
|
209
|
-
}
|
|
210
|
-
get g() {
|
|
211
|
-
const data = this.data;
|
|
212
|
-
const g = data.g;
|
|
213
|
-
if (!this.type.is(TYPE.HSL) && g !== void 0)
|
|
214
|
-
return g;
|
|
215
|
-
this._ensureHSL();
|
|
216
|
-
return utils_default.channel.hsl2rgb(data, "g");
|
|
217
|
-
}
|
|
218
|
-
get b() {
|
|
219
|
-
const data = this.data;
|
|
220
|
-
const b = data.b;
|
|
221
|
-
if (!this.type.is(TYPE.HSL) && b !== void 0)
|
|
222
|
-
return b;
|
|
223
|
-
this._ensureHSL();
|
|
224
|
-
return utils_default.channel.hsl2rgb(data, "b");
|
|
225
|
-
}
|
|
226
|
-
get h() {
|
|
227
|
-
const data = this.data;
|
|
228
|
-
const h = data.h;
|
|
229
|
-
if (!this.type.is(TYPE.RGB) && h !== void 0)
|
|
230
|
-
return h;
|
|
231
|
-
this._ensureRGB();
|
|
232
|
-
return utils_default.channel.rgb2hsl(data, "h");
|
|
233
|
-
}
|
|
234
|
-
get s() {
|
|
235
|
-
const data = this.data;
|
|
236
|
-
const s = data.s;
|
|
237
|
-
if (!this.type.is(TYPE.RGB) && s !== void 0)
|
|
238
|
-
return s;
|
|
239
|
-
this._ensureRGB();
|
|
240
|
-
return utils_default.channel.rgb2hsl(data, "s");
|
|
241
|
-
}
|
|
242
|
-
get l() {
|
|
243
|
-
const data = this.data;
|
|
244
|
-
const l = data.l;
|
|
245
|
-
if (!this.type.is(TYPE.RGB) && l !== void 0)
|
|
246
|
-
return l;
|
|
247
|
-
this._ensureRGB();
|
|
248
|
-
return utils_default.channel.rgb2hsl(data, "l");
|
|
249
|
-
}
|
|
250
|
-
get a() {
|
|
251
|
-
return this.data.a;
|
|
252
|
-
}
|
|
253
|
-
/* SETTERS */
|
|
254
|
-
set r(r) {
|
|
255
|
-
this.type.set(TYPE.RGB);
|
|
256
|
-
this.changed = true;
|
|
257
|
-
this.data.r = r;
|
|
258
|
-
}
|
|
259
|
-
set g(g) {
|
|
260
|
-
this.type.set(TYPE.RGB);
|
|
261
|
-
this.changed = true;
|
|
262
|
-
this.data.g = g;
|
|
263
|
-
}
|
|
264
|
-
set b(b) {
|
|
265
|
-
this.type.set(TYPE.RGB);
|
|
266
|
-
this.changed = true;
|
|
267
|
-
this.data.b = b;
|
|
268
|
-
}
|
|
269
|
-
set h(h) {
|
|
270
|
-
this.type.set(TYPE.HSL);
|
|
271
|
-
this.changed = true;
|
|
272
|
-
this.data.h = h;
|
|
273
|
-
}
|
|
274
|
-
set s(s) {
|
|
275
|
-
this.type.set(TYPE.HSL);
|
|
276
|
-
this.changed = true;
|
|
277
|
-
this.data.s = s;
|
|
278
|
-
}
|
|
279
|
-
set l(l) {
|
|
280
|
-
this.type.set(TYPE.HSL);
|
|
281
|
-
this.changed = true;
|
|
282
|
-
this.data.l = l;
|
|
283
|
-
}
|
|
284
|
-
set a(a) {
|
|
285
|
-
this.changed = true;
|
|
286
|
-
this.data.a = a;
|
|
287
|
-
}
|
|
288
|
-
};
|
|
289
|
-
var channels_default = Channels;
|
|
290
|
-
|
|
291
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/channels/reusable.js
|
|
292
|
-
var channels = new channels_default({ r: 0, g: 0, b: 0, a: 0 }, "transparent");
|
|
293
|
-
var reusable_default = channels;
|
|
294
|
-
|
|
295
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/hex.js
|
|
296
|
-
var Hex = {
|
|
297
|
-
/* VARIABLES */
|
|
298
|
-
re: /^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,
|
|
299
|
-
/* API */
|
|
300
|
-
parse: (color) => {
|
|
301
|
-
if (color.charCodeAt(0) !== 35)
|
|
302
|
-
return;
|
|
303
|
-
const match = color.match(Hex.re);
|
|
304
|
-
if (!match)
|
|
305
|
-
return;
|
|
306
|
-
const hex = match[1];
|
|
307
|
-
const dec = parseInt(hex, 16);
|
|
308
|
-
const length = hex.length;
|
|
309
|
-
const hasAlpha = length % 4 === 0;
|
|
310
|
-
const isFullLength = length > 4;
|
|
311
|
-
const multiplier = isFullLength ? 1 : 17;
|
|
312
|
-
const bits = isFullLength ? 8 : 4;
|
|
313
|
-
const bitsOffset = hasAlpha ? 0 : -1;
|
|
314
|
-
const mask = isFullLength ? 255 : 15;
|
|
315
|
-
return reusable_default.set({
|
|
316
|
-
r: (dec >> bits * (bitsOffset + 3) & mask) * multiplier,
|
|
317
|
-
g: (dec >> bits * (bitsOffset + 2) & mask) * multiplier,
|
|
318
|
-
b: (dec >> bits * (bitsOffset + 1) & mask) * multiplier,
|
|
319
|
-
a: hasAlpha ? (dec & mask) * multiplier / 255 : 1
|
|
320
|
-
}, color);
|
|
321
|
-
},
|
|
322
|
-
stringify: (channels2) => {
|
|
323
|
-
const { r, g, b, a } = channels2;
|
|
324
|
-
if (a < 1) {
|
|
325
|
-
return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}${DEC2HEX[Math.round(a * 255)]}`;
|
|
326
|
-
} else {
|
|
327
|
-
return `#${DEC2HEX[Math.round(r)]}${DEC2HEX[Math.round(g)]}${DEC2HEX[Math.round(b)]}`;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
};
|
|
331
|
-
var hex_default = Hex;
|
|
332
|
-
|
|
333
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/hsl.js
|
|
334
|
-
var HSL = {
|
|
335
|
-
/* VARIABLES */
|
|
336
|
-
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,
|
|
337
|
-
hueRe: /^(.+?)(deg|grad|rad|turn)$/i,
|
|
338
|
-
/* HELPERS */
|
|
339
|
-
_hue2deg: (hue) => {
|
|
340
|
-
const match = hue.match(HSL.hueRe);
|
|
341
|
-
if (match) {
|
|
342
|
-
const [, number, unit] = match;
|
|
343
|
-
switch (unit) {
|
|
344
|
-
case "grad":
|
|
345
|
-
return utils_default.channel.clamp.h(parseFloat(number) * 0.9);
|
|
346
|
-
case "rad":
|
|
347
|
-
return utils_default.channel.clamp.h(parseFloat(number) * 180 / Math.PI);
|
|
348
|
-
case "turn":
|
|
349
|
-
return utils_default.channel.clamp.h(parseFloat(number) * 360);
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
return utils_default.channel.clamp.h(parseFloat(hue));
|
|
353
|
-
},
|
|
354
|
-
/* API */
|
|
355
|
-
parse: (color) => {
|
|
356
|
-
const charCode = color.charCodeAt(0);
|
|
357
|
-
if (charCode !== 104 && charCode !== 72)
|
|
358
|
-
return;
|
|
359
|
-
const match = color.match(HSL.re);
|
|
360
|
-
if (!match)
|
|
361
|
-
return;
|
|
362
|
-
const [, h, s, l, a, isAlphaPercentage] = match;
|
|
363
|
-
return reusable_default.set({
|
|
364
|
-
h: HSL._hue2deg(h),
|
|
365
|
-
s: utils_default.channel.clamp.s(parseFloat(s)),
|
|
366
|
-
l: utils_default.channel.clamp.l(parseFloat(l)),
|
|
367
|
-
a: a ? utils_default.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1
|
|
368
|
-
}, color);
|
|
369
|
-
},
|
|
370
|
-
stringify: (channels2) => {
|
|
371
|
-
const { h, s, l, a } = channels2;
|
|
372
|
-
if (a < 1) {
|
|
373
|
-
return `hsla(${utils_default.lang.round(h)}, ${utils_default.lang.round(s)}%, ${utils_default.lang.round(l)}%, ${a})`;
|
|
374
|
-
} else {
|
|
375
|
-
return `hsl(${utils_default.lang.round(h)}, ${utils_default.lang.round(s)}%, ${utils_default.lang.round(l)}%)`;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
};
|
|
379
|
-
var hsl_default = HSL;
|
|
380
|
-
|
|
381
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/keyword.js
|
|
382
|
-
var Keyword = {
|
|
383
|
-
/* VARIABLES */
|
|
384
|
-
colors: {
|
|
385
|
-
aliceblue: "#f0f8ff",
|
|
386
|
-
antiquewhite: "#faebd7",
|
|
387
|
-
aqua: "#00ffff",
|
|
388
|
-
aquamarine: "#7fffd4",
|
|
389
|
-
azure: "#f0ffff",
|
|
390
|
-
beige: "#f5f5dc",
|
|
391
|
-
bisque: "#ffe4c4",
|
|
392
|
-
black: "#000000",
|
|
393
|
-
blanchedalmond: "#ffebcd",
|
|
394
|
-
blue: "#0000ff",
|
|
395
|
-
blueviolet: "#8a2be2",
|
|
396
|
-
brown: "#a52a2a",
|
|
397
|
-
burlywood: "#deb887",
|
|
398
|
-
cadetblue: "#5f9ea0",
|
|
399
|
-
chartreuse: "#7fff00",
|
|
400
|
-
chocolate: "#d2691e",
|
|
401
|
-
coral: "#ff7f50",
|
|
402
|
-
cornflowerblue: "#6495ed",
|
|
403
|
-
cornsilk: "#fff8dc",
|
|
404
|
-
crimson: "#dc143c",
|
|
405
|
-
cyanaqua: "#00ffff",
|
|
406
|
-
darkblue: "#00008b",
|
|
407
|
-
darkcyan: "#008b8b",
|
|
408
|
-
darkgoldenrod: "#b8860b",
|
|
409
|
-
darkgray: "#a9a9a9",
|
|
410
|
-
darkgreen: "#006400",
|
|
411
|
-
darkgrey: "#a9a9a9",
|
|
412
|
-
darkkhaki: "#bdb76b",
|
|
413
|
-
darkmagenta: "#8b008b",
|
|
414
|
-
darkolivegreen: "#556b2f",
|
|
415
|
-
darkorange: "#ff8c00",
|
|
416
|
-
darkorchid: "#9932cc",
|
|
417
|
-
darkred: "#8b0000",
|
|
418
|
-
darksalmon: "#e9967a",
|
|
419
|
-
darkseagreen: "#8fbc8f",
|
|
420
|
-
darkslateblue: "#483d8b",
|
|
421
|
-
darkslategray: "#2f4f4f",
|
|
422
|
-
darkslategrey: "#2f4f4f",
|
|
423
|
-
darkturquoise: "#00ced1",
|
|
424
|
-
darkviolet: "#9400d3",
|
|
425
|
-
deeppink: "#ff1493",
|
|
426
|
-
deepskyblue: "#00bfff",
|
|
427
|
-
dimgray: "#696969",
|
|
428
|
-
dimgrey: "#696969",
|
|
429
|
-
dodgerblue: "#1e90ff",
|
|
430
|
-
firebrick: "#b22222",
|
|
431
|
-
floralwhite: "#fffaf0",
|
|
432
|
-
forestgreen: "#228b22",
|
|
433
|
-
fuchsia: "#ff00ff",
|
|
434
|
-
gainsboro: "#dcdcdc",
|
|
435
|
-
ghostwhite: "#f8f8ff",
|
|
436
|
-
gold: "#ffd700",
|
|
437
|
-
goldenrod: "#daa520",
|
|
438
|
-
gray: "#808080",
|
|
439
|
-
green: "#008000",
|
|
440
|
-
greenyellow: "#adff2f",
|
|
441
|
-
grey: "#808080",
|
|
442
|
-
honeydew: "#f0fff0",
|
|
443
|
-
hotpink: "#ff69b4",
|
|
444
|
-
indianred: "#cd5c5c",
|
|
445
|
-
indigo: "#4b0082",
|
|
446
|
-
ivory: "#fffff0",
|
|
447
|
-
khaki: "#f0e68c",
|
|
448
|
-
lavender: "#e6e6fa",
|
|
449
|
-
lavenderblush: "#fff0f5",
|
|
450
|
-
lawngreen: "#7cfc00",
|
|
451
|
-
lemonchiffon: "#fffacd",
|
|
452
|
-
lightblue: "#add8e6",
|
|
453
|
-
lightcoral: "#f08080",
|
|
454
|
-
lightcyan: "#e0ffff",
|
|
455
|
-
lightgoldenrodyellow: "#fafad2",
|
|
456
|
-
lightgray: "#d3d3d3",
|
|
457
|
-
lightgreen: "#90ee90",
|
|
458
|
-
lightgrey: "#d3d3d3",
|
|
459
|
-
lightpink: "#ffb6c1",
|
|
460
|
-
lightsalmon: "#ffa07a",
|
|
461
|
-
lightseagreen: "#20b2aa",
|
|
462
|
-
lightskyblue: "#87cefa",
|
|
463
|
-
lightslategray: "#778899",
|
|
464
|
-
lightslategrey: "#778899",
|
|
465
|
-
lightsteelblue: "#b0c4de",
|
|
466
|
-
lightyellow: "#ffffe0",
|
|
467
|
-
lime: "#00ff00",
|
|
468
|
-
limegreen: "#32cd32",
|
|
469
|
-
linen: "#faf0e6",
|
|
470
|
-
magenta: "#ff00ff",
|
|
471
|
-
maroon: "#800000",
|
|
472
|
-
mediumaquamarine: "#66cdaa",
|
|
473
|
-
mediumblue: "#0000cd",
|
|
474
|
-
mediumorchid: "#ba55d3",
|
|
475
|
-
mediumpurple: "#9370db",
|
|
476
|
-
mediumseagreen: "#3cb371",
|
|
477
|
-
mediumslateblue: "#7b68ee",
|
|
478
|
-
mediumspringgreen: "#00fa9a",
|
|
479
|
-
mediumturquoise: "#48d1cc",
|
|
480
|
-
mediumvioletred: "#c71585",
|
|
481
|
-
midnightblue: "#191970",
|
|
482
|
-
mintcream: "#f5fffa",
|
|
483
|
-
mistyrose: "#ffe4e1",
|
|
484
|
-
moccasin: "#ffe4b5",
|
|
485
|
-
navajowhite: "#ffdead",
|
|
486
|
-
navy: "#000080",
|
|
487
|
-
oldlace: "#fdf5e6",
|
|
488
|
-
olive: "#808000",
|
|
489
|
-
olivedrab: "#6b8e23",
|
|
490
|
-
orange: "#ffa500",
|
|
491
|
-
orangered: "#ff4500",
|
|
492
|
-
orchid: "#da70d6",
|
|
493
|
-
palegoldenrod: "#eee8aa",
|
|
494
|
-
palegreen: "#98fb98",
|
|
495
|
-
paleturquoise: "#afeeee",
|
|
496
|
-
palevioletred: "#db7093",
|
|
497
|
-
papayawhip: "#ffefd5",
|
|
498
|
-
peachpuff: "#ffdab9",
|
|
499
|
-
peru: "#cd853f",
|
|
500
|
-
pink: "#ffc0cb",
|
|
501
|
-
plum: "#dda0dd",
|
|
502
|
-
powderblue: "#b0e0e6",
|
|
503
|
-
purple: "#800080",
|
|
504
|
-
rebeccapurple: "#663399",
|
|
505
|
-
red: "#ff0000",
|
|
506
|
-
rosybrown: "#bc8f8f",
|
|
507
|
-
royalblue: "#4169e1",
|
|
508
|
-
saddlebrown: "#8b4513",
|
|
509
|
-
salmon: "#fa8072",
|
|
510
|
-
sandybrown: "#f4a460",
|
|
511
|
-
seagreen: "#2e8b57",
|
|
512
|
-
seashell: "#fff5ee",
|
|
513
|
-
sienna: "#a0522d",
|
|
514
|
-
silver: "#c0c0c0",
|
|
515
|
-
skyblue: "#87ceeb",
|
|
516
|
-
slateblue: "#6a5acd",
|
|
517
|
-
slategray: "#708090",
|
|
518
|
-
slategrey: "#708090",
|
|
519
|
-
snow: "#fffafa",
|
|
520
|
-
springgreen: "#00ff7f",
|
|
521
|
-
tan: "#d2b48c",
|
|
522
|
-
teal: "#008080",
|
|
523
|
-
thistle: "#d8bfd8",
|
|
524
|
-
transparent: "#00000000",
|
|
525
|
-
turquoise: "#40e0d0",
|
|
526
|
-
violet: "#ee82ee",
|
|
527
|
-
wheat: "#f5deb3",
|
|
528
|
-
white: "#ffffff",
|
|
529
|
-
whitesmoke: "#f5f5f5",
|
|
530
|
-
yellow: "#ffff00",
|
|
531
|
-
yellowgreen: "#9acd32"
|
|
532
|
-
},
|
|
533
|
-
/* API */
|
|
534
|
-
parse: (color) => {
|
|
535
|
-
color = color.toLowerCase();
|
|
536
|
-
const hex = Keyword.colors[color];
|
|
537
|
-
if (!hex)
|
|
538
|
-
return;
|
|
539
|
-
return hex_default.parse(hex);
|
|
540
|
-
},
|
|
541
|
-
stringify: (channels2) => {
|
|
542
|
-
const hex = hex_default.stringify(channels2);
|
|
543
|
-
for (const name in Keyword.colors) {
|
|
544
|
-
if (Keyword.colors[name] === hex)
|
|
545
|
-
return name;
|
|
546
|
-
}
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
};
|
|
550
|
-
var keyword_default = Keyword;
|
|
551
|
-
|
|
552
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/rgb.js
|
|
553
|
-
var RGB = {
|
|
554
|
-
/* VARIABLES */
|
|
555
|
-
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,
|
|
556
|
-
/* API */
|
|
557
|
-
parse: (color) => {
|
|
558
|
-
const charCode = color.charCodeAt(0);
|
|
559
|
-
if (charCode !== 114 && charCode !== 82)
|
|
560
|
-
return;
|
|
561
|
-
const match = color.match(RGB.re);
|
|
562
|
-
if (!match)
|
|
563
|
-
return;
|
|
564
|
-
const [, r, isRedPercentage, g, isGreenPercentage, b, isBluePercentage, a, isAlphaPercentage] = match;
|
|
565
|
-
return reusable_default.set({
|
|
566
|
-
r: utils_default.channel.clamp.r(isRedPercentage ? parseFloat(r) * 2.55 : parseFloat(r)),
|
|
567
|
-
g: utils_default.channel.clamp.g(isGreenPercentage ? parseFloat(g) * 2.55 : parseFloat(g)),
|
|
568
|
-
b: utils_default.channel.clamp.b(isBluePercentage ? parseFloat(b) * 2.55 : parseFloat(b)),
|
|
569
|
-
a: a ? utils_default.channel.clamp.a(isAlphaPercentage ? parseFloat(a) / 100 : parseFloat(a)) : 1
|
|
570
|
-
}, color);
|
|
571
|
-
},
|
|
572
|
-
stringify: (channels2) => {
|
|
573
|
-
const { r, g, b, a } = channels2;
|
|
574
|
-
if (a < 1) {
|
|
575
|
-
return `rgba(${utils_default.lang.round(r)}, ${utils_default.lang.round(g)}, ${utils_default.lang.round(b)}, ${utils_default.lang.round(a)})`;
|
|
576
|
-
} else {
|
|
577
|
-
return `rgb(${utils_default.lang.round(r)}, ${utils_default.lang.round(g)}, ${utils_default.lang.round(b)})`;
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
var rgb_default = RGB;
|
|
582
|
-
|
|
583
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/color/index.js
|
|
584
|
-
var Color = {
|
|
585
|
-
/* VARIABLES */
|
|
586
|
-
format: {
|
|
587
|
-
keyword: keyword_default,
|
|
588
|
-
hex: hex_default,
|
|
589
|
-
rgb: rgb_default,
|
|
590
|
-
rgba: rgb_default,
|
|
591
|
-
hsl: hsl_default,
|
|
592
|
-
hsla: hsl_default
|
|
593
|
-
},
|
|
594
|
-
/* API */
|
|
595
|
-
parse: (color) => {
|
|
596
|
-
if (typeof color !== "string")
|
|
597
|
-
return color;
|
|
598
|
-
const channels2 = hex_default.parse(color) || rgb_default.parse(color) || hsl_default.parse(color) || keyword_default.parse(color);
|
|
599
|
-
if (channels2)
|
|
600
|
-
return channels2;
|
|
601
|
-
throw new Error(`Unsupported color format: "${color}"`);
|
|
602
|
-
},
|
|
603
|
-
stringify: (channels2) => {
|
|
604
|
-
if (!channels2.changed && channels2.color)
|
|
605
|
-
return channels2.color;
|
|
606
|
-
if (channels2.type.is(TYPE.HSL) || channels2.data.r === void 0) {
|
|
607
|
-
return hsl_default.stringify(channels2);
|
|
608
|
-
} else if (channels2.a < 1 || !Number.isInteger(channels2.r) || !Number.isInteger(channels2.g) || !Number.isInteger(channels2.b)) {
|
|
609
|
-
return rgb_default.stringify(channels2);
|
|
610
|
-
} else {
|
|
611
|
-
return hex_default.stringify(channels2);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
};
|
|
615
|
-
var color_default = Color;
|
|
616
|
-
|
|
617
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/change.js
|
|
618
|
-
var change = (color, channels2) => {
|
|
619
|
-
const ch = color_default.parse(color);
|
|
620
|
-
for (const c in channels2) {
|
|
621
|
-
ch[c] = utils_default.channel.clamp[c](channels2[c]);
|
|
622
|
-
}
|
|
623
|
-
return color_default.stringify(ch);
|
|
624
|
-
};
|
|
625
|
-
var change_default = change;
|
|
626
|
-
|
|
627
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/rgba.js
|
|
628
|
-
var rgba = (r, g, b = 0, a = 1) => {
|
|
629
|
-
if (typeof r !== "number")
|
|
630
|
-
return change_default(r, { a: g });
|
|
631
|
-
const channels2 = reusable_default.set({
|
|
632
|
-
r: utils_default.channel.clamp.r(r),
|
|
633
|
-
g: utils_default.channel.clamp.g(g),
|
|
634
|
-
b: utils_default.channel.clamp.b(b),
|
|
635
|
-
a: utils_default.channel.clamp.a(a)
|
|
636
|
-
});
|
|
637
|
-
return color_default.stringify(channels2);
|
|
638
|
-
};
|
|
639
|
-
var rgba_default = rgba;
|
|
640
|
-
|
|
641
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/channel.js
|
|
642
|
-
var channel = (color, channel2) => {
|
|
643
|
-
return utils_default.lang.round(color_default.parse(color)[channel2]);
|
|
644
|
-
};
|
|
645
|
-
var channel_default2 = channel;
|
|
646
|
-
|
|
647
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/luminance.js
|
|
648
|
-
var luminance = (color) => {
|
|
649
|
-
const { r, g, b } = color_default.parse(color);
|
|
650
|
-
const luminance2 = 0.2126 * utils_default.channel.toLinear(r) + 0.7152 * utils_default.channel.toLinear(g) + 0.0722 * utils_default.channel.toLinear(b);
|
|
651
|
-
return utils_default.lang.round(luminance2);
|
|
652
|
-
};
|
|
653
|
-
var luminance_default = luminance;
|
|
654
|
-
|
|
655
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/is_light.js
|
|
656
|
-
var isLight = (color) => {
|
|
657
|
-
return luminance_default(color) >= 0.5;
|
|
658
|
-
};
|
|
659
|
-
var is_light_default = isLight;
|
|
660
|
-
|
|
661
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/is_dark.js
|
|
662
|
-
var isDark = (color) => {
|
|
663
|
-
return !is_light_default(color);
|
|
664
|
-
};
|
|
665
|
-
var is_dark_default = isDark;
|
|
666
|
-
|
|
667
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/adjust_channel.js
|
|
668
|
-
var adjustChannel = (color, channel2, amount) => {
|
|
669
|
-
const channels2 = color_default.parse(color);
|
|
670
|
-
const amountCurrent = channels2[channel2];
|
|
671
|
-
const amountNext = utils_default.channel.clamp[channel2](amountCurrent + amount);
|
|
672
|
-
if (amountCurrent !== amountNext)
|
|
673
|
-
channels2[channel2] = amountNext;
|
|
674
|
-
return color_default.stringify(channels2);
|
|
675
|
-
};
|
|
676
|
-
var adjust_channel_default = adjustChannel;
|
|
677
|
-
|
|
678
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/lighten.js
|
|
679
|
-
var lighten = (color, amount) => {
|
|
680
|
-
return adjust_channel_default(color, "l", amount);
|
|
681
|
-
};
|
|
682
|
-
var lighten_default = lighten;
|
|
683
|
-
|
|
684
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/darken.js
|
|
685
|
-
var darken = (color, amount) => {
|
|
686
|
-
return adjust_channel_default(color, "l", -amount);
|
|
687
|
-
};
|
|
688
|
-
var darken_default = darken;
|
|
689
|
-
|
|
690
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/adjust.js
|
|
691
|
-
var adjust = (color, channels2) => {
|
|
692
|
-
const ch = color_default.parse(color);
|
|
693
|
-
const changes = {};
|
|
694
|
-
for (const c in channels2) {
|
|
695
|
-
if (!channels2[c])
|
|
696
|
-
continue;
|
|
697
|
-
changes[c] = ch[c] + channels2[c];
|
|
698
|
-
}
|
|
699
|
-
return change_default(color, changes);
|
|
700
|
-
};
|
|
701
|
-
var adjust_default = adjust;
|
|
702
|
-
|
|
703
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/mix.js
|
|
704
|
-
var mix = (color1, color2, weight = 50) => {
|
|
705
|
-
const { r: r1, g: g1, b: b1, a: a1 } = color_default.parse(color1);
|
|
706
|
-
const { r: r2, g: g2, b: b2, a: a2 } = color_default.parse(color2);
|
|
707
|
-
const weightScale = weight / 100;
|
|
708
|
-
const weightNormalized = weightScale * 2 - 1;
|
|
709
|
-
const alphaDelta = a1 - a2;
|
|
710
|
-
const weight1combined = weightNormalized * alphaDelta === -1 ? weightNormalized : (weightNormalized + alphaDelta) / (1 + weightNormalized * alphaDelta);
|
|
711
|
-
const weight1 = (weight1combined + 1) / 2;
|
|
712
|
-
const weight2 = 1 - weight1;
|
|
713
|
-
const r = r1 * weight1 + r2 * weight2;
|
|
714
|
-
const g = g1 * weight1 + g2 * weight2;
|
|
715
|
-
const b = b1 * weight1 + b2 * weight2;
|
|
716
|
-
const a = a1 * weightScale + a2 * (1 - weightScale);
|
|
717
|
-
return rgba_default(r, g, b, a);
|
|
718
|
-
};
|
|
719
|
-
var mix_default = mix;
|
|
720
|
-
|
|
721
|
-
// ../../node_modules/.pnpm/khroma@2.1.0/node_modules/khroma/dist/methods/invert.js
|
|
722
|
-
var invert = (color, weight = 100) => {
|
|
723
|
-
const inverse = color_default.parse(color);
|
|
724
|
-
inverse.r = 255 - inverse.r;
|
|
725
|
-
inverse.g = 255 - inverse.g;
|
|
726
|
-
inverse.b = 255 - inverse.b;
|
|
727
|
-
return mix_default(inverse, color, weight);
|
|
728
|
-
};
|
|
729
|
-
var invert_default = invert;
|
|
730
|
-
|
|
731
|
-
// ../../node_modules/.pnpm/dompurify@3.2.7/node_modules/dompurify/dist/purify.es.mjs
|
|
732
|
-
var {
|
|
733
|
-
entries,
|
|
734
|
-
setPrototypeOf,
|
|
735
|
-
isFrozen,
|
|
736
|
-
getPrototypeOf,
|
|
737
|
-
getOwnPropertyDescriptor
|
|
738
|
-
} = Object;
|
|
739
|
-
var {
|
|
740
|
-
freeze,
|
|
741
|
-
seal,
|
|
742
|
-
create
|
|
743
|
-
} = Object;
|
|
744
|
-
var {
|
|
745
|
-
apply,
|
|
746
|
-
construct
|
|
747
|
-
} = typeof Reflect !== "undefined" && Reflect;
|
|
748
|
-
if (!freeze) {
|
|
749
|
-
freeze = function freeze2(x) {
|
|
750
|
-
return x;
|
|
751
|
-
};
|
|
752
|
-
}
|
|
753
|
-
if (!seal) {
|
|
754
|
-
seal = function seal2(x) {
|
|
755
|
-
return x;
|
|
756
|
-
};
|
|
757
|
-
}
|
|
758
|
-
if (!apply) {
|
|
759
|
-
apply = function apply2(func, thisArg) {
|
|
760
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
761
|
-
args[_key - 2] = arguments[_key];
|
|
762
|
-
}
|
|
763
|
-
return func.apply(thisArg, args);
|
|
764
|
-
};
|
|
765
|
-
}
|
|
766
|
-
if (!construct) {
|
|
767
|
-
construct = function construct2(Func) {
|
|
768
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
769
|
-
args[_key2 - 1] = arguments[_key2];
|
|
770
|
-
}
|
|
771
|
-
return new Func(...args);
|
|
772
|
-
};
|
|
773
|
-
}
|
|
774
|
-
var arrayForEach = unapply(Array.prototype.forEach);
|
|
775
|
-
var arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
|
|
776
|
-
var arrayPop = unapply(Array.prototype.pop);
|
|
777
|
-
var arrayPush = unapply(Array.prototype.push);
|
|
778
|
-
var arraySplice = unapply(Array.prototype.splice);
|
|
779
|
-
var stringToLowerCase = unapply(String.prototype.toLowerCase);
|
|
780
|
-
var stringToString = unapply(String.prototype.toString);
|
|
781
|
-
var stringMatch = unapply(String.prototype.match);
|
|
782
|
-
var stringReplace = unapply(String.prototype.replace);
|
|
783
|
-
var stringIndexOf = unapply(String.prototype.indexOf);
|
|
784
|
-
var stringTrim = unapply(String.prototype.trim);
|
|
785
|
-
var objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
|
|
786
|
-
var regExpTest = unapply(RegExp.prototype.test);
|
|
787
|
-
var typeErrorCreate = unconstruct(TypeError);
|
|
788
|
-
function unapply(func) {
|
|
789
|
-
return function(thisArg) {
|
|
790
|
-
if (thisArg instanceof RegExp) {
|
|
791
|
-
thisArg.lastIndex = 0;
|
|
792
|
-
}
|
|
793
|
-
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
794
|
-
args[_key3 - 1] = arguments[_key3];
|
|
795
|
-
}
|
|
796
|
-
return apply(func, thisArg, args);
|
|
797
|
-
};
|
|
798
|
-
}
|
|
799
|
-
function unconstruct(Func) {
|
|
800
|
-
return function() {
|
|
801
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
802
|
-
args[_key4] = arguments[_key4];
|
|
803
|
-
}
|
|
804
|
-
return construct(Func, args);
|
|
805
|
-
};
|
|
806
|
-
}
|
|
807
|
-
function addToSet(set, array) {
|
|
808
|
-
let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
|
|
809
|
-
if (setPrototypeOf) {
|
|
810
|
-
setPrototypeOf(set, null);
|
|
811
|
-
}
|
|
812
|
-
let l = array.length;
|
|
813
|
-
while (l--) {
|
|
814
|
-
let element = array[l];
|
|
815
|
-
if (typeof element === "string") {
|
|
816
|
-
const lcElement = transformCaseFunc(element);
|
|
817
|
-
if (lcElement !== element) {
|
|
818
|
-
if (!isFrozen(array)) {
|
|
819
|
-
array[l] = lcElement;
|
|
820
|
-
}
|
|
821
|
-
element = lcElement;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
set[element] = true;
|
|
825
|
-
}
|
|
826
|
-
return set;
|
|
827
|
-
}
|
|
828
|
-
function cleanArray(array) {
|
|
829
|
-
for (let index = 0; index < array.length; index++) {
|
|
830
|
-
const isPropertyExist = objectHasOwnProperty(array, index);
|
|
831
|
-
if (!isPropertyExist) {
|
|
832
|
-
array[index] = null;
|
|
833
|
-
}
|
|
834
|
-
}
|
|
835
|
-
return array;
|
|
836
|
-
}
|
|
837
|
-
function clone(object) {
|
|
838
|
-
const newObject = create(null);
|
|
839
|
-
for (const [property, value] of entries(object)) {
|
|
840
|
-
const isPropertyExist = objectHasOwnProperty(object, property);
|
|
841
|
-
if (isPropertyExist) {
|
|
842
|
-
if (Array.isArray(value)) {
|
|
843
|
-
newObject[property] = cleanArray(value);
|
|
844
|
-
} else if (value && typeof value === "object" && value.constructor === Object) {
|
|
845
|
-
newObject[property] = clone(value);
|
|
846
|
-
} else {
|
|
847
|
-
newObject[property] = value;
|
|
848
|
-
}
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
return newObject;
|
|
852
|
-
}
|
|
853
|
-
function lookupGetter(object, prop) {
|
|
854
|
-
while (object !== null) {
|
|
855
|
-
const desc = getOwnPropertyDescriptor(object, prop);
|
|
856
|
-
if (desc) {
|
|
857
|
-
if (desc.get) {
|
|
858
|
-
return unapply(desc.get);
|
|
859
|
-
}
|
|
860
|
-
if (typeof desc.value === "function") {
|
|
861
|
-
return unapply(desc.value);
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
object = getPrototypeOf(object);
|
|
865
|
-
}
|
|
866
|
-
function fallbackValue() {
|
|
867
|
-
return null;
|
|
868
|
-
}
|
|
869
|
-
return fallbackValue;
|
|
870
|
-
}
|
|
871
|
-
var html$1 = freeze(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]);
|
|
872
|
-
var svg$1 = freeze(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]);
|
|
873
|
-
var svgFilters = freeze(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]);
|
|
874
|
-
var svgDisallowed = freeze(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]);
|
|
875
|
-
var mathMl$1 = freeze(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]);
|
|
876
|
-
var mathMlDisallowed = freeze(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]);
|
|
877
|
-
var text = freeze(["#text"]);
|
|
878
|
-
var html = freeze(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]);
|
|
879
|
-
var svg = freeze(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]);
|
|
880
|
-
var mathMl = freeze(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]);
|
|
881
|
-
var xml = freeze(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]);
|
|
882
|
-
var MUSTACHE_EXPR = seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm);
|
|
883
|
-
var ERB_EXPR = seal(/<%[\w\W]*|[\w\W]*%>/gm);
|
|
884
|
-
var TMPLIT_EXPR = seal(/\$\{[\w\W]*/gm);
|
|
885
|
-
var DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
|
|
886
|
-
var ARIA_ATTR = seal(/^aria-[\-\w]+$/);
|
|
887
|
-
var IS_ALLOWED_URI = seal(
|
|
888
|
-
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
889
|
-
// eslint-disable-line no-useless-escape
|
|
890
|
-
);
|
|
891
|
-
var IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
|
|
892
|
-
var ATTR_WHITESPACE = seal(
|
|
893
|
-
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
894
|
-
// eslint-disable-line no-control-regex
|
|
895
|
-
);
|
|
896
|
-
var DOCTYPE_NAME = seal(/^html$/i);
|
|
897
|
-
var CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
|
|
898
|
-
var EXPRESSIONS = /* @__PURE__ */ Object.freeze({
|
|
899
|
-
__proto__: null,
|
|
900
|
-
ARIA_ATTR,
|
|
901
|
-
ATTR_WHITESPACE,
|
|
902
|
-
CUSTOM_ELEMENT,
|
|
903
|
-
DATA_ATTR,
|
|
904
|
-
DOCTYPE_NAME,
|
|
905
|
-
ERB_EXPR,
|
|
906
|
-
IS_ALLOWED_URI,
|
|
907
|
-
IS_SCRIPT_OR_DATA,
|
|
908
|
-
MUSTACHE_EXPR,
|
|
909
|
-
TMPLIT_EXPR
|
|
910
|
-
});
|
|
911
|
-
var NODE_TYPE = {
|
|
912
|
-
element: 1,
|
|
913
|
-
text: 3,
|
|
914
|
-
// Deprecated
|
|
915
|
-
progressingInstruction: 7,
|
|
916
|
-
comment: 8,
|
|
917
|
-
document: 9};
|
|
918
|
-
var getGlobal = function getGlobal2() {
|
|
919
|
-
return typeof window === "undefined" ? null : window;
|
|
920
|
-
};
|
|
921
|
-
var _createTrustedTypesPolicy = function _createTrustedTypesPolicy2(trustedTypes, purifyHostElement) {
|
|
922
|
-
if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") {
|
|
923
|
-
return null;
|
|
924
|
-
}
|
|
925
|
-
let suffix = null;
|
|
926
|
-
const ATTR_NAME = "data-tt-policy-suffix";
|
|
927
|
-
if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {
|
|
928
|
-
suffix = purifyHostElement.getAttribute(ATTR_NAME);
|
|
929
|
-
}
|
|
930
|
-
const policyName = "dompurify" + (suffix ? "#" + suffix : "");
|
|
931
|
-
try {
|
|
932
|
-
return trustedTypes.createPolicy(policyName, {
|
|
933
|
-
createHTML(html2) {
|
|
934
|
-
return html2;
|
|
935
|
-
},
|
|
936
|
-
createScriptURL(scriptUrl) {
|
|
937
|
-
return scriptUrl;
|
|
938
|
-
}
|
|
939
|
-
});
|
|
940
|
-
} catch (_) {
|
|
941
|
-
console.warn("TrustedTypes policy " + policyName + " could not be created.");
|
|
942
|
-
return null;
|
|
943
|
-
}
|
|
944
|
-
};
|
|
945
|
-
var _createHooksMap = function _createHooksMap2() {
|
|
946
|
-
return {
|
|
947
|
-
afterSanitizeAttributes: [],
|
|
948
|
-
afterSanitizeElements: [],
|
|
949
|
-
afterSanitizeShadowDOM: [],
|
|
950
|
-
beforeSanitizeAttributes: [],
|
|
951
|
-
beforeSanitizeElements: [],
|
|
952
|
-
beforeSanitizeShadowDOM: [],
|
|
953
|
-
uponSanitizeAttribute: [],
|
|
954
|
-
uponSanitizeElement: [],
|
|
955
|
-
uponSanitizeShadowNode: []
|
|
956
|
-
};
|
|
957
|
-
};
|
|
958
|
-
function createDOMPurify() {
|
|
959
|
-
let window2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
|
|
960
|
-
const DOMPurify = (root) => createDOMPurify(root);
|
|
961
|
-
DOMPurify.version = "3.2.7";
|
|
962
|
-
DOMPurify.removed = [];
|
|
963
|
-
if (!window2 || !window2.document || window2.document.nodeType !== NODE_TYPE.document || !window2.Element) {
|
|
964
|
-
DOMPurify.isSupported = false;
|
|
965
|
-
return DOMPurify;
|
|
966
|
-
}
|
|
967
|
-
let {
|
|
968
|
-
document: document2
|
|
969
|
-
} = window2;
|
|
970
|
-
const originalDocument = document2;
|
|
971
|
-
const currentScript = originalDocument.currentScript;
|
|
972
|
-
const {
|
|
973
|
-
DocumentFragment,
|
|
974
|
-
HTMLTemplateElement,
|
|
975
|
-
Node,
|
|
976
|
-
Element,
|
|
977
|
-
NodeFilter,
|
|
978
|
-
NamedNodeMap = window2.NamedNodeMap || window2.MozNamedAttrMap,
|
|
979
|
-
HTMLFormElement,
|
|
980
|
-
DOMParser,
|
|
981
|
-
trustedTypes
|
|
982
|
-
} = window2;
|
|
983
|
-
const ElementPrototype = Element.prototype;
|
|
984
|
-
const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
|
|
985
|
-
const remove = lookupGetter(ElementPrototype, "remove");
|
|
986
|
-
const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
|
|
987
|
-
const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
|
|
988
|
-
const getParentNode = lookupGetter(ElementPrototype, "parentNode");
|
|
989
|
-
if (typeof HTMLTemplateElement === "function") {
|
|
990
|
-
const template = document2.createElement("template");
|
|
991
|
-
if (template.content && template.content.ownerDocument) {
|
|
992
|
-
document2 = template.content.ownerDocument;
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
let trustedTypesPolicy;
|
|
996
|
-
let emptyHTML = "";
|
|
997
|
-
const {
|
|
998
|
-
implementation,
|
|
999
|
-
createNodeIterator,
|
|
1000
|
-
createDocumentFragment,
|
|
1001
|
-
getElementsByTagName
|
|
1002
|
-
} = document2;
|
|
1003
|
-
const {
|
|
1004
|
-
importNode
|
|
1005
|
-
} = originalDocument;
|
|
1006
|
-
let hooks = _createHooksMap();
|
|
1007
|
-
DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
|
|
1008
|
-
const {
|
|
1009
|
-
MUSTACHE_EXPR: MUSTACHE_EXPR2,
|
|
1010
|
-
ERB_EXPR: ERB_EXPR2,
|
|
1011
|
-
TMPLIT_EXPR: TMPLIT_EXPR2,
|
|
1012
|
-
DATA_ATTR: DATA_ATTR2,
|
|
1013
|
-
ARIA_ATTR: ARIA_ATTR2,
|
|
1014
|
-
IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA2,
|
|
1015
|
-
ATTR_WHITESPACE: ATTR_WHITESPACE2,
|
|
1016
|
-
CUSTOM_ELEMENT: CUSTOM_ELEMENT2
|
|
1017
|
-
} = EXPRESSIONS;
|
|
1018
|
-
let {
|
|
1019
|
-
IS_ALLOWED_URI: IS_ALLOWED_URI$1
|
|
1020
|
-
} = EXPRESSIONS;
|
|
1021
|
-
let ALLOWED_TAGS = null;
|
|
1022
|
-
const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);
|
|
1023
|
-
let ALLOWED_ATTR = null;
|
|
1024
|
-
const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);
|
|
1025
|
-
let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
|
|
1026
|
-
tagNameCheck: {
|
|
1027
|
-
writable: true,
|
|
1028
|
-
configurable: false,
|
|
1029
|
-
enumerable: true,
|
|
1030
|
-
value: null
|
|
1031
|
-
},
|
|
1032
|
-
attributeNameCheck: {
|
|
1033
|
-
writable: true,
|
|
1034
|
-
configurable: false,
|
|
1035
|
-
enumerable: true,
|
|
1036
|
-
value: null
|
|
1037
|
-
},
|
|
1038
|
-
allowCustomizedBuiltInElements: {
|
|
1039
|
-
writable: true,
|
|
1040
|
-
configurable: false,
|
|
1041
|
-
enumerable: true,
|
|
1042
|
-
value: false
|
|
1043
|
-
}
|
|
1044
|
-
}));
|
|
1045
|
-
let FORBID_TAGS = null;
|
|
1046
|
-
let FORBID_ATTR = null;
|
|
1047
|
-
let ALLOW_ARIA_ATTR = true;
|
|
1048
|
-
let ALLOW_DATA_ATTR = true;
|
|
1049
|
-
let ALLOW_UNKNOWN_PROTOCOLS = false;
|
|
1050
|
-
let ALLOW_SELF_CLOSE_IN_ATTR = true;
|
|
1051
|
-
let SAFE_FOR_TEMPLATES = false;
|
|
1052
|
-
let SAFE_FOR_XML = true;
|
|
1053
|
-
let WHOLE_DOCUMENT = false;
|
|
1054
|
-
let SET_CONFIG = false;
|
|
1055
|
-
let FORCE_BODY = false;
|
|
1056
|
-
let RETURN_DOM = false;
|
|
1057
|
-
let RETURN_DOM_FRAGMENT = false;
|
|
1058
|
-
let RETURN_TRUSTED_TYPE = false;
|
|
1059
|
-
let SANITIZE_DOM = true;
|
|
1060
|
-
let SANITIZE_NAMED_PROPS = false;
|
|
1061
|
-
const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
|
|
1062
|
-
let KEEP_CONTENT = true;
|
|
1063
|
-
let IN_PLACE = false;
|
|
1064
|
-
let USE_PROFILES = {};
|
|
1065
|
-
let FORBID_CONTENTS = null;
|
|
1066
|
-
const DEFAULT_FORBID_CONTENTS = addToSet({}, ["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"]);
|
|
1067
|
-
let DATA_URI_TAGS = null;
|
|
1068
|
-
const DEFAULT_DATA_URI_TAGS = addToSet({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
1069
|
-
let URI_SAFE_ATTRIBUTES = null;
|
|
1070
|
-
const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]);
|
|
1071
|
-
const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
|
|
1072
|
-
const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
1073
|
-
const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
|
|
1074
|
-
let NAMESPACE = HTML_NAMESPACE;
|
|
1075
|
-
let IS_EMPTY_INPUT = false;
|
|
1076
|
-
let ALLOWED_NAMESPACES = null;
|
|
1077
|
-
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
|
1078
|
-
let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ["mi", "mo", "mn", "ms", "mtext"]);
|
|
1079
|
-
let HTML_INTEGRATION_POINTS = addToSet({}, ["annotation-xml"]);
|
|
1080
|
-
const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ["title", "style", "font", "a", "script"]);
|
|
1081
|
-
let PARSER_MEDIA_TYPE = null;
|
|
1082
|
-
const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
|
|
1083
|
-
const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
|
|
1084
|
-
let transformCaseFunc = null;
|
|
1085
|
-
let CONFIG = null;
|
|
1086
|
-
const formElement = document2.createElement("form");
|
|
1087
|
-
const isRegexOrFunction = function isRegexOrFunction2(testValue) {
|
|
1088
|
-
return testValue instanceof RegExp || testValue instanceof Function;
|
|
1089
|
-
};
|
|
1090
|
-
const _parseConfig = function _parseConfig2() {
|
|
1091
|
-
let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1092
|
-
if (CONFIG && CONFIG === cfg) {
|
|
1093
|
-
return;
|
|
1094
|
-
}
|
|
1095
|
-
if (!cfg || typeof cfg !== "object") {
|
|
1096
|
-
cfg = {};
|
|
1097
|
-
}
|
|
1098
|
-
cfg = clone(cfg);
|
|
1099
|
-
PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes
|
|
1100
|
-
SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
|
|
1101
|
-
transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
|
|
1102
|
-
ALLOWED_TAGS = objectHasOwnProperty(cfg, "ALLOWED_TAGS") ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;
|
|
1103
|
-
ALLOWED_ATTR = objectHasOwnProperty(cfg, "ALLOWED_ATTR") ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;
|
|
1104
|
-
ALLOWED_NAMESPACES = objectHasOwnProperty(cfg, "ALLOWED_NAMESPACES") ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;
|
|
1105
|
-
URI_SAFE_ATTRIBUTES = objectHasOwnProperty(cfg, "ADD_URI_SAFE_ATTR") ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR, transformCaseFunc) : DEFAULT_URI_SAFE_ATTRIBUTES;
|
|
1106
|
-
DATA_URI_TAGS = objectHasOwnProperty(cfg, "ADD_DATA_URI_TAGS") ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS, transformCaseFunc) : DEFAULT_DATA_URI_TAGS;
|
|
1107
|
-
FORBID_CONTENTS = objectHasOwnProperty(cfg, "FORBID_CONTENTS") ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;
|
|
1108
|
-
FORBID_TAGS = objectHasOwnProperty(cfg, "FORBID_TAGS") ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : clone({});
|
|
1109
|
-
FORBID_ATTR = objectHasOwnProperty(cfg, "FORBID_ATTR") ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : clone({});
|
|
1110
|
-
USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES : false;
|
|
1111
|
-
ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
|
|
1112
|
-
ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
|
|
1113
|
-
ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
|
|
1114
|
-
ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
|
|
1115
|
-
SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
|
|
1116
|
-
SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;
|
|
1117
|
-
WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
|
|
1118
|
-
RETURN_DOM = cfg.RETURN_DOM || false;
|
|
1119
|
-
RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
|
|
1120
|
-
RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
|
|
1121
|
-
FORCE_BODY = cfg.FORCE_BODY || false;
|
|
1122
|
-
SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
|
|
1123
|
-
SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
|
|
1124
|
-
KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
|
|
1125
|
-
IN_PLACE = cfg.IN_PLACE || false;
|
|
1126
|
-
IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;
|
|
1127
|
-
NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;
|
|
1128
|
-
MATHML_TEXT_INTEGRATION_POINTS = cfg.MATHML_TEXT_INTEGRATION_POINTS || MATHML_TEXT_INTEGRATION_POINTS;
|
|
1129
|
-
HTML_INTEGRATION_POINTS = cfg.HTML_INTEGRATION_POINTS || HTML_INTEGRATION_POINTS;
|
|
1130
|
-
CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};
|
|
1131
|
-
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {
|
|
1132
|
-
CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;
|
|
1133
|
-
}
|
|
1134
|
-
if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {
|
|
1135
|
-
CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;
|
|
1136
|
-
}
|
|
1137
|
-
if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === "boolean") {
|
|
1138
|
-
CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;
|
|
1139
|
-
}
|
|
1140
|
-
if (SAFE_FOR_TEMPLATES) {
|
|
1141
|
-
ALLOW_DATA_ATTR = false;
|
|
1142
|
-
}
|
|
1143
|
-
if (RETURN_DOM_FRAGMENT) {
|
|
1144
|
-
RETURN_DOM = true;
|
|
1145
|
-
}
|
|
1146
|
-
if (USE_PROFILES) {
|
|
1147
|
-
ALLOWED_TAGS = addToSet({}, text);
|
|
1148
|
-
ALLOWED_ATTR = [];
|
|
1149
|
-
if (USE_PROFILES.html === true) {
|
|
1150
|
-
addToSet(ALLOWED_TAGS, html$1);
|
|
1151
|
-
addToSet(ALLOWED_ATTR, html);
|
|
1152
|
-
}
|
|
1153
|
-
if (USE_PROFILES.svg === true) {
|
|
1154
|
-
addToSet(ALLOWED_TAGS, svg$1);
|
|
1155
|
-
addToSet(ALLOWED_ATTR, svg);
|
|
1156
|
-
addToSet(ALLOWED_ATTR, xml);
|
|
1157
|
-
}
|
|
1158
|
-
if (USE_PROFILES.svgFilters === true) {
|
|
1159
|
-
addToSet(ALLOWED_TAGS, svgFilters);
|
|
1160
|
-
addToSet(ALLOWED_ATTR, svg);
|
|
1161
|
-
addToSet(ALLOWED_ATTR, xml);
|
|
1162
|
-
}
|
|
1163
|
-
if (USE_PROFILES.mathMl === true) {
|
|
1164
|
-
addToSet(ALLOWED_TAGS, mathMl$1);
|
|
1165
|
-
addToSet(ALLOWED_ATTR, mathMl);
|
|
1166
|
-
addToSet(ALLOWED_ATTR, xml);
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
if (cfg.ADD_TAGS) {
|
|
1170
|
-
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
1171
|
-
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
1172
|
-
}
|
|
1173
|
-
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
1174
|
-
}
|
|
1175
|
-
if (cfg.ADD_ATTR) {
|
|
1176
|
-
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
1177
|
-
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
1178
|
-
}
|
|
1179
|
-
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
1180
|
-
}
|
|
1181
|
-
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
1182
|
-
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
1183
|
-
}
|
|
1184
|
-
if (cfg.FORBID_CONTENTS) {
|
|
1185
|
-
if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {
|
|
1186
|
-
FORBID_CONTENTS = clone(FORBID_CONTENTS);
|
|
1187
|
-
}
|
|
1188
|
-
addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);
|
|
1189
|
-
}
|
|
1190
|
-
if (KEEP_CONTENT) {
|
|
1191
|
-
ALLOWED_TAGS["#text"] = true;
|
|
1192
|
-
}
|
|
1193
|
-
if (WHOLE_DOCUMENT) {
|
|
1194
|
-
addToSet(ALLOWED_TAGS, ["html", "head", "body"]);
|
|
1195
|
-
}
|
|
1196
|
-
if (ALLOWED_TAGS.table) {
|
|
1197
|
-
addToSet(ALLOWED_TAGS, ["tbody"]);
|
|
1198
|
-
delete FORBID_TAGS.tbody;
|
|
1199
|
-
}
|
|
1200
|
-
if (cfg.TRUSTED_TYPES_POLICY) {
|
|
1201
|
-
if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") {
|
|
1202
|
-
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1203
|
-
}
|
|
1204
|
-
if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") {
|
|
1205
|
-
throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
1206
|
-
}
|
|
1207
|
-
trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
|
|
1208
|
-
emptyHTML = trustedTypesPolicy.createHTML("");
|
|
1209
|
-
} else {
|
|
1210
|
-
if (trustedTypesPolicy === void 0) {
|
|
1211
|
-
trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
|
|
1212
|
-
}
|
|
1213
|
-
if (trustedTypesPolicy !== null && typeof emptyHTML === "string") {
|
|
1214
|
-
emptyHTML = trustedTypesPolicy.createHTML("");
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
if (freeze) {
|
|
1218
|
-
freeze(cfg);
|
|
1219
|
-
}
|
|
1220
|
-
CONFIG = cfg;
|
|
1221
|
-
};
|
|
1222
|
-
const ALL_SVG_TAGS = addToSet({}, [...svg$1, ...svgFilters, ...svgDisallowed]);
|
|
1223
|
-
const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
|
|
1224
|
-
const _checkValidNamespace = function _checkValidNamespace2(element) {
|
|
1225
|
-
let parent = getParentNode(element);
|
|
1226
|
-
if (!parent || !parent.tagName) {
|
|
1227
|
-
parent = {
|
|
1228
|
-
namespaceURI: NAMESPACE,
|
|
1229
|
-
tagName: "template"
|
|
1230
|
-
};
|
|
1231
|
-
}
|
|
1232
|
-
const tagName = stringToLowerCase(element.tagName);
|
|
1233
|
-
const parentTagName = stringToLowerCase(parent.tagName);
|
|
1234
|
-
if (!ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
1235
|
-
return false;
|
|
1236
|
-
}
|
|
1237
|
-
if (element.namespaceURI === SVG_NAMESPACE) {
|
|
1238
|
-
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
1239
|
-
return tagName === "svg";
|
|
1240
|
-
}
|
|
1241
|
-
if (parent.namespaceURI === MATHML_NAMESPACE) {
|
|
1242
|
-
return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
|
|
1243
|
-
}
|
|
1244
|
-
return Boolean(ALL_SVG_TAGS[tagName]);
|
|
1245
|
-
}
|
|
1246
|
-
if (element.namespaceURI === MATHML_NAMESPACE) {
|
|
1247
|
-
if (parent.namespaceURI === HTML_NAMESPACE) {
|
|
1248
|
-
return tagName === "math";
|
|
1249
|
-
}
|
|
1250
|
-
if (parent.namespaceURI === SVG_NAMESPACE) {
|
|
1251
|
-
return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
|
|
1252
|
-
}
|
|
1253
|
-
return Boolean(ALL_MATHML_TAGS[tagName]);
|
|
1254
|
-
}
|
|
1255
|
-
if (element.namespaceURI === HTML_NAMESPACE) {
|
|
1256
|
-
if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {
|
|
1257
|
-
return false;
|
|
1258
|
-
}
|
|
1259
|
-
if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {
|
|
1260
|
-
return false;
|
|
1261
|
-
}
|
|
1262
|
-
return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
|
|
1263
|
-
}
|
|
1264
|
-
if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) {
|
|
1265
|
-
return true;
|
|
1266
|
-
}
|
|
1267
|
-
return false;
|
|
1268
|
-
};
|
|
1269
|
-
const _forceRemove = function _forceRemove2(node) {
|
|
1270
|
-
arrayPush(DOMPurify.removed, {
|
|
1271
|
-
element: node
|
|
1272
|
-
});
|
|
1273
|
-
try {
|
|
1274
|
-
getParentNode(node).removeChild(node);
|
|
1275
|
-
} catch (_) {
|
|
1276
|
-
remove(node);
|
|
1277
|
-
}
|
|
1278
|
-
};
|
|
1279
|
-
const _removeAttribute = function _removeAttribute2(name, element) {
|
|
1280
|
-
try {
|
|
1281
|
-
arrayPush(DOMPurify.removed, {
|
|
1282
|
-
attribute: element.getAttributeNode(name),
|
|
1283
|
-
from: element
|
|
1284
|
-
});
|
|
1285
|
-
} catch (_) {
|
|
1286
|
-
arrayPush(DOMPurify.removed, {
|
|
1287
|
-
attribute: null,
|
|
1288
|
-
from: element
|
|
1289
|
-
});
|
|
1290
|
-
}
|
|
1291
|
-
element.removeAttribute(name);
|
|
1292
|
-
if (name === "is") {
|
|
1293
|
-
if (RETURN_DOM || RETURN_DOM_FRAGMENT) {
|
|
1294
|
-
try {
|
|
1295
|
-
_forceRemove(element);
|
|
1296
|
-
} catch (_) {
|
|
1297
|
-
}
|
|
1298
|
-
} else {
|
|
1299
|
-
try {
|
|
1300
|
-
element.setAttribute(name, "");
|
|
1301
|
-
} catch (_) {
|
|
1302
|
-
}
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
};
|
|
1306
|
-
const _initDocument = function _initDocument2(dirty) {
|
|
1307
|
-
let doc = null;
|
|
1308
|
-
let leadingWhitespace = null;
|
|
1309
|
-
if (FORCE_BODY) {
|
|
1310
|
-
dirty = "<remove></remove>" + dirty;
|
|
1311
|
-
} else {
|
|
1312
|
-
const matches = stringMatch(dirty, /^[\r\n\t ]+/);
|
|
1313
|
-
leadingWhitespace = matches && matches[0];
|
|
1314
|
-
}
|
|
1315
|
-
if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) {
|
|
1316
|
-
dirty = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + dirty + "</body></html>";
|
|
1317
|
-
}
|
|
1318
|
-
const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
|
1319
|
-
if (NAMESPACE === HTML_NAMESPACE) {
|
|
1320
|
-
try {
|
|
1321
|
-
doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
|
|
1322
|
-
} catch (_) {
|
|
1323
|
-
}
|
|
1324
|
-
}
|
|
1325
|
-
if (!doc || !doc.documentElement) {
|
|
1326
|
-
doc = implementation.createDocument(NAMESPACE, "template", null);
|
|
1327
|
-
try {
|
|
1328
|
-
doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
|
|
1329
|
-
} catch (_) {
|
|
1330
|
-
}
|
|
1331
|
-
}
|
|
1332
|
-
const body = doc.body || doc.documentElement;
|
|
1333
|
-
if (dirty && leadingWhitespace) {
|
|
1334
|
-
body.insertBefore(document2.createTextNode(leadingWhitespace), body.childNodes[0] || null);
|
|
1335
|
-
}
|
|
1336
|
-
if (NAMESPACE === HTML_NAMESPACE) {
|
|
1337
|
-
return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
|
|
1338
|
-
}
|
|
1339
|
-
return WHOLE_DOCUMENT ? doc.documentElement : body;
|
|
1340
|
-
};
|
|
1341
|
-
const _createNodeIterator = function _createNodeIterator2(root) {
|
|
1342
|
-
return createNodeIterator.call(
|
|
1343
|
-
root.ownerDocument || root,
|
|
1344
|
-
root,
|
|
1345
|
-
// eslint-disable-next-line no-bitwise
|
|
1346
|
-
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION,
|
|
1347
|
-
null
|
|
1348
|
-
);
|
|
1349
|
-
};
|
|
1350
|
-
const _isClobbered = function _isClobbered2(element) {
|
|
1351
|
-
return element instanceof HTMLFormElement && (typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || !(element.attributes instanceof NamedNodeMap) || typeof element.removeAttribute !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function");
|
|
1352
|
-
};
|
|
1353
|
-
const _isNode = function _isNode2(value) {
|
|
1354
|
-
return typeof Node === "function" && value instanceof Node;
|
|
1355
|
-
};
|
|
1356
|
-
function _executeHooks(hooks2, currentNode, data) {
|
|
1357
|
-
arrayForEach(hooks2, (hook) => {
|
|
1358
|
-
hook.call(DOMPurify, currentNode, data, CONFIG);
|
|
1359
|
-
});
|
|
1360
|
-
}
|
|
1361
|
-
const _sanitizeElements = function _sanitizeElements2(currentNode) {
|
|
1362
|
-
let content = null;
|
|
1363
|
-
_executeHooks(hooks.beforeSanitizeElements, currentNode, null);
|
|
1364
|
-
if (_isClobbered(currentNode)) {
|
|
1365
|
-
_forceRemove(currentNode);
|
|
1366
|
-
return true;
|
|
1367
|
-
}
|
|
1368
|
-
const tagName = transformCaseFunc(currentNode.nodeName);
|
|
1369
|
-
_executeHooks(hooks.uponSanitizeElement, currentNode, {
|
|
1370
|
-
tagName,
|
|
1371
|
-
allowedTags: ALLOWED_TAGS
|
|
1372
|
-
});
|
|
1373
|
-
if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w!]/g, currentNode.innerHTML) && regExpTest(/<[/\w!]/g, currentNode.textContent)) {
|
|
1374
|
-
_forceRemove(currentNode);
|
|
1375
|
-
return true;
|
|
1376
|
-
}
|
|
1377
|
-
if (currentNode.nodeType === NODE_TYPE.progressingInstruction) {
|
|
1378
|
-
_forceRemove(currentNode);
|
|
1379
|
-
return true;
|
|
1380
|
-
}
|
|
1381
|
-
if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, currentNode.data)) {
|
|
1382
|
-
_forceRemove(currentNode);
|
|
1383
|
-
return true;
|
|
1384
|
-
}
|
|
1385
|
-
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
1386
|
-
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
1387
|
-
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
1388
|
-
return false;
|
|
1389
|
-
}
|
|
1390
|
-
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
|
1391
|
-
return false;
|
|
1392
|
-
}
|
|
1393
|
-
}
|
|
1394
|
-
if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
|
|
1395
|
-
const parentNode = getParentNode(currentNode) || currentNode.parentNode;
|
|
1396
|
-
const childNodes = getChildNodes(currentNode) || currentNode.childNodes;
|
|
1397
|
-
if (childNodes && parentNode) {
|
|
1398
|
-
const childCount = childNodes.length;
|
|
1399
|
-
for (let i = childCount - 1; i >= 0; --i) {
|
|
1400
|
-
const childClone = cloneNode(childNodes[i], true);
|
|
1401
|
-
childClone.__removalCount = (currentNode.__removalCount || 0) + 1;
|
|
1402
|
-
parentNode.insertBefore(childClone, getNextSibling(currentNode));
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
_forceRemove(currentNode);
|
|
1407
|
-
return true;
|
|
1408
|
-
}
|
|
1409
|
-
if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {
|
|
1410
|
-
_forceRemove(currentNode);
|
|
1411
|
-
return true;
|
|
1412
|
-
}
|
|
1413
|
-
if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, currentNode.innerHTML)) {
|
|
1414
|
-
_forceRemove(currentNode);
|
|
1415
|
-
return true;
|
|
1416
|
-
}
|
|
1417
|
-
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
|
|
1418
|
-
content = currentNode.textContent;
|
|
1419
|
-
arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
|
|
1420
|
-
content = stringReplace(content, expr, " ");
|
|
1421
|
-
});
|
|
1422
|
-
if (currentNode.textContent !== content) {
|
|
1423
|
-
arrayPush(DOMPurify.removed, {
|
|
1424
|
-
element: currentNode.cloneNode()
|
|
1425
|
-
});
|
|
1426
|
-
currentNode.textContent = content;
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
_executeHooks(hooks.afterSanitizeElements, currentNode, null);
|
|
1430
|
-
return false;
|
|
1431
|
-
};
|
|
1432
|
-
const _isValidAttribute = function _isValidAttribute2(lcTag, lcName, value) {
|
|
1433
|
-
if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document2 || value in formElement)) {
|
|
1434
|
-
return false;
|
|
1435
|
-
}
|
|
1436
|
-
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR2, lcName)) ;
|
|
1437
|
-
else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR2, lcName)) ;
|
|
1438
|
-
else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
1439
|
-
if (
|
|
1440
|
-
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
1441
|
-
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1442
|
-
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
1443
|
-
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName, lcTag)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
1444
|
-
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1445
|
-
lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))
|
|
1446
|
-
) ;
|
|
1447
|
-
else {
|
|
1448
|
-
return false;
|
|
1449
|
-
}
|
|
1450
|
-
} else if (URI_SAFE_ATTRIBUTES[lcName]) ;
|
|
1451
|
-
else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
|
|
1452
|
-
else if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) ;
|
|
1453
|
-
else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA2, stringReplace(value, ATTR_WHITESPACE2, ""))) ;
|
|
1454
|
-
else if (value) {
|
|
1455
|
-
return false;
|
|
1456
|
-
} else ;
|
|
1457
|
-
return true;
|
|
1458
|
-
};
|
|
1459
|
-
const _isBasicCustomElement = function _isBasicCustomElement2(tagName) {
|
|
1460
|
-
return tagName !== "annotation-xml" && stringMatch(tagName, CUSTOM_ELEMENT2);
|
|
1461
|
-
};
|
|
1462
|
-
const _sanitizeAttributes = function _sanitizeAttributes2(currentNode) {
|
|
1463
|
-
_executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
|
|
1464
|
-
const {
|
|
1465
|
-
attributes
|
|
1466
|
-
} = currentNode;
|
|
1467
|
-
if (!attributes || _isClobbered(currentNode)) {
|
|
1468
|
-
return;
|
|
1469
|
-
}
|
|
1470
|
-
const hookEvent = {
|
|
1471
|
-
attrName: "",
|
|
1472
|
-
attrValue: "",
|
|
1473
|
-
keepAttr: true,
|
|
1474
|
-
allowedAttributes: ALLOWED_ATTR,
|
|
1475
|
-
forceKeepAttr: void 0
|
|
1476
|
-
};
|
|
1477
|
-
let l = attributes.length;
|
|
1478
|
-
while (l--) {
|
|
1479
|
-
const attr = attributes[l];
|
|
1480
|
-
const {
|
|
1481
|
-
name,
|
|
1482
|
-
namespaceURI,
|
|
1483
|
-
value: attrValue
|
|
1484
|
-
} = attr;
|
|
1485
|
-
const lcName = transformCaseFunc(name);
|
|
1486
|
-
const initValue = attrValue;
|
|
1487
|
-
let value = name === "value" ? initValue : stringTrim(initValue);
|
|
1488
|
-
hookEvent.attrName = lcName;
|
|
1489
|
-
hookEvent.attrValue = value;
|
|
1490
|
-
hookEvent.keepAttr = true;
|
|
1491
|
-
hookEvent.forceKeepAttr = void 0;
|
|
1492
|
-
_executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
|
|
1493
|
-
value = hookEvent.attrValue;
|
|
1494
|
-
if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name")) {
|
|
1495
|
-
_removeAttribute(name, currentNode);
|
|
1496
|
-
value = SANITIZE_NAMED_PROPS_PREFIX + value;
|
|
1497
|
-
}
|
|
1498
|
-
if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, value)) {
|
|
1499
|
-
_removeAttribute(name, currentNode);
|
|
1500
|
-
continue;
|
|
1501
|
-
}
|
|
1502
|
-
if (lcName === "attributename" && stringMatch(value, "href")) {
|
|
1503
|
-
_removeAttribute(name, currentNode);
|
|
1504
|
-
continue;
|
|
1505
|
-
}
|
|
1506
|
-
if (hookEvent.forceKeepAttr) {
|
|
1507
|
-
continue;
|
|
1508
|
-
}
|
|
1509
|
-
if (!hookEvent.keepAttr) {
|
|
1510
|
-
_removeAttribute(name, currentNode);
|
|
1511
|
-
continue;
|
|
1512
|
-
}
|
|
1513
|
-
if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\/>/i, value)) {
|
|
1514
|
-
_removeAttribute(name, currentNode);
|
|
1515
|
-
continue;
|
|
1516
|
-
}
|
|
1517
|
-
if (SAFE_FOR_TEMPLATES) {
|
|
1518
|
-
arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
|
|
1519
|
-
value = stringReplace(value, expr, " ");
|
|
1520
|
-
});
|
|
1521
|
-
}
|
|
1522
|
-
const lcTag = transformCaseFunc(currentNode.nodeName);
|
|
1523
|
-
if (!_isValidAttribute(lcTag, lcName, value)) {
|
|
1524
|
-
_removeAttribute(name, currentNode);
|
|
1525
|
-
continue;
|
|
1526
|
-
}
|
|
1527
|
-
if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function") {
|
|
1528
|
-
if (namespaceURI) ;
|
|
1529
|
-
else {
|
|
1530
|
-
switch (trustedTypes.getAttributeType(lcTag, lcName)) {
|
|
1531
|
-
case "TrustedHTML": {
|
|
1532
|
-
value = trustedTypesPolicy.createHTML(value);
|
|
1533
|
-
break;
|
|
1534
|
-
}
|
|
1535
|
-
case "TrustedScriptURL": {
|
|
1536
|
-
value = trustedTypesPolicy.createScriptURL(value);
|
|
1537
|
-
break;
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
if (value !== initValue) {
|
|
1543
|
-
try {
|
|
1544
|
-
if (namespaceURI) {
|
|
1545
|
-
currentNode.setAttributeNS(namespaceURI, name, value);
|
|
1546
|
-
} else {
|
|
1547
|
-
currentNode.setAttribute(name, value);
|
|
1548
|
-
}
|
|
1549
|
-
if (_isClobbered(currentNode)) {
|
|
1550
|
-
_forceRemove(currentNode);
|
|
1551
|
-
} else {
|
|
1552
|
-
arrayPop(DOMPurify.removed);
|
|
1553
|
-
}
|
|
1554
|
-
} catch (_) {
|
|
1555
|
-
_removeAttribute(name, currentNode);
|
|
1556
|
-
}
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
_executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
|
|
1560
|
-
};
|
|
1561
|
-
const _sanitizeShadowDOM = function _sanitizeShadowDOM2(fragment) {
|
|
1562
|
-
let shadowNode = null;
|
|
1563
|
-
const shadowIterator = _createNodeIterator(fragment);
|
|
1564
|
-
_executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
|
|
1565
|
-
while (shadowNode = shadowIterator.nextNode()) {
|
|
1566
|
-
_executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
|
|
1567
|
-
_sanitizeElements(shadowNode);
|
|
1568
|
-
_sanitizeAttributes(shadowNode);
|
|
1569
|
-
if (shadowNode.content instanceof DocumentFragment) {
|
|
1570
|
-
_sanitizeShadowDOM2(shadowNode.content);
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
_executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
|
|
1574
|
-
};
|
|
1575
|
-
DOMPurify.sanitize = function(dirty) {
|
|
1576
|
-
let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1577
|
-
let body = null;
|
|
1578
|
-
let importedNode = null;
|
|
1579
|
-
let currentNode = null;
|
|
1580
|
-
let returnNode = null;
|
|
1581
|
-
IS_EMPTY_INPUT = !dirty;
|
|
1582
|
-
if (IS_EMPTY_INPUT) {
|
|
1583
|
-
dirty = "<!-->";
|
|
1584
|
-
}
|
|
1585
|
-
if (typeof dirty !== "string" && !_isNode(dirty)) {
|
|
1586
|
-
if (typeof dirty.toString === "function") {
|
|
1587
|
-
dirty = dirty.toString();
|
|
1588
|
-
if (typeof dirty !== "string") {
|
|
1589
|
-
throw typeErrorCreate("dirty is not a string, aborting");
|
|
1590
|
-
}
|
|
1591
|
-
} else {
|
|
1592
|
-
throw typeErrorCreate("toString is not a function");
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
if (!DOMPurify.isSupported) {
|
|
1596
|
-
return dirty;
|
|
1597
|
-
}
|
|
1598
|
-
if (!SET_CONFIG) {
|
|
1599
|
-
_parseConfig(cfg);
|
|
1600
|
-
}
|
|
1601
|
-
DOMPurify.removed = [];
|
|
1602
|
-
if (typeof dirty === "string") {
|
|
1603
|
-
IN_PLACE = false;
|
|
1604
|
-
}
|
|
1605
|
-
if (IN_PLACE) {
|
|
1606
|
-
if (dirty.nodeName) {
|
|
1607
|
-
const tagName = transformCaseFunc(dirty.nodeName);
|
|
1608
|
-
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
1609
|
-
throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
} else if (dirty instanceof Node) {
|
|
1613
|
-
body = _initDocument("<!---->");
|
|
1614
|
-
importedNode = body.ownerDocument.importNode(dirty, true);
|
|
1615
|
-
if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") {
|
|
1616
|
-
body = importedNode;
|
|
1617
|
-
} else if (importedNode.nodeName === "HTML") {
|
|
1618
|
-
body = importedNode;
|
|
1619
|
-
} else {
|
|
1620
|
-
body.appendChild(importedNode);
|
|
1621
|
-
}
|
|
1622
|
-
} else {
|
|
1623
|
-
if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes
|
|
1624
|
-
dirty.indexOf("<") === -1) {
|
|
1625
|
-
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;
|
|
1626
|
-
}
|
|
1627
|
-
body = _initDocument(dirty);
|
|
1628
|
-
if (!body) {
|
|
1629
|
-
return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
if (body && FORCE_BODY) {
|
|
1633
|
-
_forceRemove(body.firstChild);
|
|
1634
|
-
}
|
|
1635
|
-
const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
|
|
1636
|
-
while (currentNode = nodeIterator.nextNode()) {
|
|
1637
|
-
_sanitizeElements(currentNode);
|
|
1638
|
-
_sanitizeAttributes(currentNode);
|
|
1639
|
-
if (currentNode.content instanceof DocumentFragment) {
|
|
1640
|
-
_sanitizeShadowDOM(currentNode.content);
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
if (IN_PLACE) {
|
|
1644
|
-
return dirty;
|
|
1645
|
-
}
|
|
1646
|
-
if (RETURN_DOM) {
|
|
1647
|
-
if (RETURN_DOM_FRAGMENT) {
|
|
1648
|
-
returnNode = createDocumentFragment.call(body.ownerDocument);
|
|
1649
|
-
while (body.firstChild) {
|
|
1650
|
-
returnNode.appendChild(body.firstChild);
|
|
1651
|
-
}
|
|
1652
|
-
} else {
|
|
1653
|
-
returnNode = body;
|
|
1654
|
-
}
|
|
1655
|
-
if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {
|
|
1656
|
-
returnNode = importNode.call(originalDocument, returnNode, true);
|
|
1657
|
-
}
|
|
1658
|
-
return returnNode;
|
|
1659
|
-
}
|
|
1660
|
-
let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
|
|
1661
|
-
if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {
|
|
1662
|
-
serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
|
|
1663
|
-
}
|
|
1664
|
-
if (SAFE_FOR_TEMPLATES) {
|
|
1665
|
-
arrayForEach([MUSTACHE_EXPR2, ERB_EXPR2, TMPLIT_EXPR2], (expr) => {
|
|
1666
|
-
serializedHTML = stringReplace(serializedHTML, expr, " ");
|
|
1667
|
-
});
|
|
1668
|
-
}
|
|
1669
|
-
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
|
|
1670
|
-
};
|
|
1671
|
-
DOMPurify.setConfig = function() {
|
|
1672
|
-
let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1673
|
-
_parseConfig(cfg);
|
|
1674
|
-
SET_CONFIG = true;
|
|
1675
|
-
};
|
|
1676
|
-
DOMPurify.clearConfig = function() {
|
|
1677
|
-
CONFIG = null;
|
|
1678
|
-
SET_CONFIG = false;
|
|
1679
|
-
};
|
|
1680
|
-
DOMPurify.isValidAttribute = function(tag, attr, value) {
|
|
1681
|
-
if (!CONFIG) {
|
|
1682
|
-
_parseConfig({});
|
|
1683
|
-
}
|
|
1684
|
-
const lcTag = transformCaseFunc(tag);
|
|
1685
|
-
const lcName = transformCaseFunc(attr);
|
|
1686
|
-
return _isValidAttribute(lcTag, lcName, value);
|
|
1687
|
-
};
|
|
1688
|
-
DOMPurify.addHook = function(entryPoint, hookFunction) {
|
|
1689
|
-
if (typeof hookFunction !== "function") {
|
|
1690
|
-
return;
|
|
1691
|
-
}
|
|
1692
|
-
arrayPush(hooks[entryPoint], hookFunction);
|
|
1693
|
-
};
|
|
1694
|
-
DOMPurify.removeHook = function(entryPoint, hookFunction) {
|
|
1695
|
-
if (hookFunction !== void 0) {
|
|
1696
|
-
const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
|
|
1697
|
-
return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
|
|
1698
|
-
}
|
|
1699
|
-
return arrayPop(hooks[entryPoint]);
|
|
1700
|
-
};
|
|
1701
|
-
DOMPurify.removeHooks = function(entryPoint) {
|
|
1702
|
-
hooks[entryPoint] = [];
|
|
1703
|
-
};
|
|
1704
|
-
DOMPurify.removeAllHooks = function() {
|
|
1705
|
-
hooks = _createHooksMap();
|
|
1706
|
-
};
|
|
1707
|
-
return DOMPurify;
|
|
1708
|
-
}
|
|
1709
|
-
var purify = createDOMPurify();
|
|
1710
|
-
|
|
1711
|
-
// ../../node_modules/.pnpm/mermaid@11.12.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.mjs
|
|
1712
|
-
var frontMatterRegex = /^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;
|
|
1713
|
-
var directiveRegex = /%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi;
|
|
1714
|
-
var anyCommentRegex = /\s*%%.*\n/gm;
|
|
1715
|
-
var UnknownDiagramError = class extends Error {
|
|
1716
|
-
static {
|
|
1717
|
-
__name(this, "UnknownDiagramError");
|
|
1718
|
-
}
|
|
1719
|
-
constructor(message) {
|
|
1720
|
-
super(message);
|
|
1721
|
-
this.name = "UnknownDiagramError";
|
|
1722
|
-
}
|
|
1723
|
-
};
|
|
1724
|
-
var detectors = {};
|
|
1725
|
-
var detectType = /* @__PURE__ */ __name(function(text2, config2) {
|
|
1726
|
-
text2 = text2.replace(frontMatterRegex, "").replace(directiveRegex, "").replace(anyCommentRegex, "\n");
|
|
1727
|
-
for (const [key, { detector }] of Object.entries(detectors)) {
|
|
1728
|
-
const diagram = detector(text2, config2);
|
|
1729
|
-
if (diagram) {
|
|
1730
|
-
return key;
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
throw new UnknownDiagramError(
|
|
1734
|
-
`No diagram type detected matching given configuration for text: ${text2}`
|
|
1735
|
-
);
|
|
1736
|
-
}, "detectType");
|
|
1737
|
-
var registerLazyLoadedDiagrams = /* @__PURE__ */ __name((...diagrams2) => {
|
|
1738
|
-
for (const { id, detector, loader } of diagrams2) {
|
|
1739
|
-
addDetector(id, detector, loader);
|
|
1740
|
-
}
|
|
1741
|
-
}, "registerLazyLoadedDiagrams");
|
|
1742
|
-
var addDetector = /* @__PURE__ */ __name((key, detector, loader) => {
|
|
1743
|
-
if (detectors[key]) {
|
|
1744
|
-
log.warn(`Detector with key ${key} already exists. Overwriting.`);
|
|
1745
|
-
}
|
|
1746
|
-
detectors[key] = { detector, loader };
|
|
1747
|
-
log.debug(`Detector with key ${key} added${loader ? " with loader" : ""}`);
|
|
1748
|
-
}, "addDetector");
|
|
1749
|
-
var getDiagramLoader = /* @__PURE__ */ __name((key) => {
|
|
1750
|
-
return detectors[key].loader;
|
|
1751
|
-
}, "getDiagramLoader");
|
|
1752
|
-
var assignWithDepth = /* @__PURE__ */ __name((dst, src, { depth = 2, clobber = false } = {}) => {
|
|
1753
|
-
const config2 = { depth, clobber };
|
|
1754
|
-
if (Array.isArray(src) && !Array.isArray(dst)) {
|
|
1755
|
-
src.forEach((s) => assignWithDepth(dst, s, config2));
|
|
1756
|
-
return dst;
|
|
1757
|
-
} else if (Array.isArray(src) && Array.isArray(dst)) {
|
|
1758
|
-
src.forEach((s) => {
|
|
1759
|
-
if (!dst.includes(s)) {
|
|
1760
|
-
dst.push(s);
|
|
1761
|
-
}
|
|
1762
|
-
});
|
|
1763
|
-
return dst;
|
|
1764
|
-
}
|
|
1765
|
-
if (dst === void 0 || depth <= 0) {
|
|
1766
|
-
if (dst !== void 0 && dst !== null && typeof dst === "object" && typeof src === "object") {
|
|
1767
|
-
return Object.assign(dst, src);
|
|
1768
|
-
} else {
|
|
1769
|
-
return src;
|
|
1770
|
-
}
|
|
1771
|
-
}
|
|
1772
|
-
if (src !== void 0 && typeof dst === "object" && typeof src === "object") {
|
|
1773
|
-
Object.keys(src).forEach((key) => {
|
|
1774
|
-
if (typeof src[key] === "object" && (dst[key] === void 0 || typeof dst[key] === "object")) {
|
|
1775
|
-
if (dst[key] === void 0) {
|
|
1776
|
-
dst[key] = Array.isArray(src[key]) ? [] : {};
|
|
1777
|
-
}
|
|
1778
|
-
dst[key] = assignWithDepth(dst[key], src[key], { depth: depth - 1, clobber });
|
|
1779
|
-
} else if (clobber || typeof dst[key] !== "object" && typeof src[key] !== "object") {
|
|
1780
|
-
dst[key] = src[key];
|
|
1781
|
-
}
|
|
1782
|
-
});
|
|
1783
|
-
}
|
|
1784
|
-
return dst;
|
|
1785
|
-
}, "assignWithDepth");
|
|
1786
|
-
var assignWithDepth_default = assignWithDepth;
|
|
1787
|
-
var oldAttributeBackgroundColorOdd = "#ffffff";
|
|
1788
|
-
var oldAttributeBackgroundColorEven = "#f2f2f2";
|
|
1789
|
-
var mkBorder = /* @__PURE__ */ __name((col, darkMode) => darkMode ? adjust_default(col, { s: -40, l: 10 }) : adjust_default(col, { s: -40, l: -10 }), "mkBorder");
|
|
1790
|
-
var Theme = class {
|
|
1791
|
-
static {
|
|
1792
|
-
__name(this, "Theme");
|
|
1793
|
-
}
|
|
1794
|
-
constructor() {
|
|
1795
|
-
this.background = "#f4f4f4";
|
|
1796
|
-
this.primaryColor = "#fff4dd";
|
|
1797
|
-
this.noteBkgColor = "#fff5ad";
|
|
1798
|
-
this.noteTextColor = "#333";
|
|
1799
|
-
this.THEME_COLOR_LIMIT = 12;
|
|
1800
|
-
this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
|
|
1801
|
-
this.fontSize = "16px";
|
|
1802
|
-
}
|
|
1803
|
-
updateColors() {
|
|
1804
|
-
this.primaryTextColor = this.primaryTextColor || (this.darkMode ? "#eee" : "#333");
|
|
1805
|
-
this.secondaryColor = this.secondaryColor || adjust_default(this.primaryColor, { h: -120 });
|
|
1806
|
-
this.tertiaryColor = this.tertiaryColor || adjust_default(this.primaryColor, { h: 180, l: 5 });
|
|
1807
|
-
this.primaryBorderColor = this.primaryBorderColor || mkBorder(this.primaryColor, this.darkMode);
|
|
1808
|
-
this.secondaryBorderColor = this.secondaryBorderColor || mkBorder(this.secondaryColor, this.darkMode);
|
|
1809
|
-
this.tertiaryBorderColor = this.tertiaryBorderColor || mkBorder(this.tertiaryColor, this.darkMode);
|
|
1810
|
-
this.noteBorderColor = this.noteBorderColor || mkBorder(this.noteBkgColor, this.darkMode);
|
|
1811
|
-
this.noteBkgColor = this.noteBkgColor || "#fff5ad";
|
|
1812
|
-
this.noteTextColor = this.noteTextColor || "#333";
|
|
1813
|
-
this.secondaryTextColor = this.secondaryTextColor || invert_default(this.secondaryColor);
|
|
1814
|
-
this.tertiaryTextColor = this.tertiaryTextColor || invert_default(this.tertiaryColor);
|
|
1815
|
-
this.lineColor = this.lineColor || invert_default(this.background);
|
|
1816
|
-
this.arrowheadColor = this.arrowheadColor || invert_default(this.background);
|
|
1817
|
-
this.textColor = this.textColor || this.primaryTextColor;
|
|
1818
|
-
this.border2 = this.border2 || this.tertiaryBorderColor;
|
|
1819
|
-
this.nodeBkg = this.nodeBkg || this.primaryColor;
|
|
1820
|
-
this.mainBkg = this.mainBkg || this.primaryColor;
|
|
1821
|
-
this.nodeBorder = this.nodeBorder || this.primaryBorderColor;
|
|
1822
|
-
this.clusterBkg = this.clusterBkg || this.tertiaryColor;
|
|
1823
|
-
this.clusterBorder = this.clusterBorder || this.tertiaryBorderColor;
|
|
1824
|
-
this.defaultLinkColor = this.defaultLinkColor || this.lineColor;
|
|
1825
|
-
this.titleColor = this.titleColor || this.tertiaryTextColor;
|
|
1826
|
-
this.edgeLabelBackground = this.edgeLabelBackground || (this.darkMode ? darken_default(this.secondaryColor, 30) : this.secondaryColor);
|
|
1827
|
-
this.nodeTextColor = this.nodeTextColor || this.primaryTextColor;
|
|
1828
|
-
this.actorBorder = this.actorBorder || this.primaryBorderColor;
|
|
1829
|
-
this.actorBkg = this.actorBkg || this.mainBkg;
|
|
1830
|
-
this.actorTextColor = this.actorTextColor || this.primaryTextColor;
|
|
1831
|
-
this.actorLineColor = this.actorLineColor || this.actorBorder;
|
|
1832
|
-
this.labelBoxBkgColor = this.labelBoxBkgColor || this.actorBkg;
|
|
1833
|
-
this.signalColor = this.signalColor || this.textColor;
|
|
1834
|
-
this.signalTextColor = this.signalTextColor || this.textColor;
|
|
1835
|
-
this.labelBoxBorderColor = this.labelBoxBorderColor || this.actorBorder;
|
|
1836
|
-
this.labelTextColor = this.labelTextColor || this.actorTextColor;
|
|
1837
|
-
this.loopTextColor = this.loopTextColor || this.actorTextColor;
|
|
1838
|
-
this.activationBorderColor = this.activationBorderColor || darken_default(this.secondaryColor, 10);
|
|
1839
|
-
this.activationBkgColor = this.activationBkgColor || this.secondaryColor;
|
|
1840
|
-
this.sequenceNumberColor = this.sequenceNumberColor || invert_default(this.lineColor);
|
|
1841
|
-
this.sectionBkgColor = this.sectionBkgColor || this.tertiaryColor;
|
|
1842
|
-
this.altSectionBkgColor = this.altSectionBkgColor || "white";
|
|
1843
|
-
this.sectionBkgColor = this.sectionBkgColor || this.secondaryColor;
|
|
1844
|
-
this.sectionBkgColor2 = this.sectionBkgColor2 || this.primaryColor;
|
|
1845
|
-
this.excludeBkgColor = this.excludeBkgColor || "#eeeeee";
|
|
1846
|
-
this.taskBorderColor = this.taskBorderColor || this.primaryBorderColor;
|
|
1847
|
-
this.taskBkgColor = this.taskBkgColor || this.primaryColor;
|
|
1848
|
-
this.activeTaskBorderColor = this.activeTaskBorderColor || this.primaryColor;
|
|
1849
|
-
this.activeTaskBkgColor = this.activeTaskBkgColor || lighten_default(this.primaryColor, 23);
|
|
1850
|
-
this.gridColor = this.gridColor || "lightgrey";
|
|
1851
|
-
this.doneTaskBkgColor = this.doneTaskBkgColor || "lightgrey";
|
|
1852
|
-
this.doneTaskBorderColor = this.doneTaskBorderColor || "grey";
|
|
1853
|
-
this.critBorderColor = this.critBorderColor || "#ff8888";
|
|
1854
|
-
this.critBkgColor = this.critBkgColor || "red";
|
|
1855
|
-
this.todayLineColor = this.todayLineColor || "red";
|
|
1856
|
-
this.vertLineColor = this.vertLineColor || "navy";
|
|
1857
|
-
this.taskTextColor = this.taskTextColor || this.textColor;
|
|
1858
|
-
this.taskTextOutsideColor = this.taskTextOutsideColor || this.textColor;
|
|
1859
|
-
this.taskTextLightColor = this.taskTextLightColor || this.textColor;
|
|
1860
|
-
this.taskTextColor = this.taskTextColor || this.primaryTextColor;
|
|
1861
|
-
this.taskTextDarkColor = this.taskTextDarkColor || this.textColor;
|
|
1862
|
-
this.taskTextClickableColor = this.taskTextClickableColor || "#003163";
|
|
1863
|
-
this.personBorder = this.personBorder || this.primaryBorderColor;
|
|
1864
|
-
this.personBkg = this.personBkg || this.mainBkg;
|
|
1865
|
-
if (this.darkMode) {
|
|
1866
|
-
this.rowOdd = this.rowOdd || darken_default(this.mainBkg, 5) || "#ffffff";
|
|
1867
|
-
this.rowEven = this.rowEven || darken_default(this.mainBkg, 10);
|
|
1868
|
-
} else {
|
|
1869
|
-
this.rowOdd = this.rowOdd || lighten_default(this.mainBkg, 75) || "#ffffff";
|
|
1870
|
-
this.rowEven = this.rowEven || lighten_default(this.mainBkg, 5);
|
|
1871
|
-
}
|
|
1872
|
-
this.transitionColor = this.transitionColor || this.lineColor;
|
|
1873
|
-
this.transitionLabelColor = this.transitionLabelColor || this.textColor;
|
|
1874
|
-
this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
|
|
1875
|
-
this.stateBkg = this.stateBkg || this.mainBkg;
|
|
1876
|
-
this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
|
|
1877
|
-
this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
|
|
1878
|
-
this.altBackground = this.altBackground || this.tertiaryColor;
|
|
1879
|
-
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
|
1880
|
-
this.compositeBorder = this.compositeBorder || this.nodeBorder;
|
|
1881
|
-
this.innerEndBackground = this.nodeBorder;
|
|
1882
|
-
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
|
1883
|
-
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
|
1884
|
-
this.transitionColor = this.transitionColor || this.lineColor;
|
|
1885
|
-
this.specialStateColor = this.lineColor;
|
|
1886
|
-
this.cScale0 = this.cScale0 || this.primaryColor;
|
|
1887
|
-
this.cScale1 = this.cScale1 || this.secondaryColor;
|
|
1888
|
-
this.cScale2 = this.cScale2 || this.tertiaryColor;
|
|
1889
|
-
this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 });
|
|
1890
|
-
this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 });
|
|
1891
|
-
this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 });
|
|
1892
|
-
this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 });
|
|
1893
|
-
this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 });
|
|
1894
|
-
this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210, l: 150 });
|
|
1895
|
-
this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 });
|
|
1896
|
-
this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 });
|
|
1897
|
-
this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 });
|
|
1898
|
-
if (this.darkMode) {
|
|
1899
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
1900
|
-
this["cScale" + i] = darken_default(this["cScale" + i], 75);
|
|
1901
|
-
}
|
|
1902
|
-
} else {
|
|
1903
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
1904
|
-
this["cScale" + i] = darken_default(this["cScale" + i], 25);
|
|
1905
|
-
}
|
|
1906
|
-
}
|
|
1907
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
1908
|
-
this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]);
|
|
1909
|
-
}
|
|
1910
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
1911
|
-
if (this.darkMode) {
|
|
1912
|
-
this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10);
|
|
1913
|
-
} else {
|
|
1914
|
-
this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 10);
|
|
1915
|
-
}
|
|
1916
|
-
}
|
|
1917
|
-
this.scaleLabelColor = this.scaleLabelColor || this.labelTextColor;
|
|
1918
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
1919
|
-
this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
|
|
1920
|
-
}
|
|
1921
|
-
const multiplier = this.darkMode ? -4 : -1;
|
|
1922
|
-
for (let i = 0; i < 5; i++) {
|
|
1923
|
-
this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 180, s: -15, l: multiplier * (5 + i * 3) });
|
|
1924
|
-
this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 180, s: -15, l: multiplier * (8 + i * 3) });
|
|
1925
|
-
}
|
|
1926
|
-
this.classText = this.classText || this.textColor;
|
|
1927
|
-
this.fillType0 = this.fillType0 || this.primaryColor;
|
|
1928
|
-
this.fillType1 = this.fillType1 || this.secondaryColor;
|
|
1929
|
-
this.fillType2 = this.fillType2 || adjust_default(this.primaryColor, { h: 64 });
|
|
1930
|
-
this.fillType3 = this.fillType3 || adjust_default(this.secondaryColor, { h: 64 });
|
|
1931
|
-
this.fillType4 = this.fillType4 || adjust_default(this.primaryColor, { h: -64 });
|
|
1932
|
-
this.fillType5 = this.fillType5 || adjust_default(this.secondaryColor, { h: -64 });
|
|
1933
|
-
this.fillType6 = this.fillType6 || adjust_default(this.primaryColor, { h: 128 });
|
|
1934
|
-
this.fillType7 = this.fillType7 || adjust_default(this.secondaryColor, { h: 128 });
|
|
1935
|
-
this.pie1 = this.pie1 || this.primaryColor;
|
|
1936
|
-
this.pie2 = this.pie2 || this.secondaryColor;
|
|
1937
|
-
this.pie3 = this.pie3 || this.tertiaryColor;
|
|
1938
|
-
this.pie4 = this.pie4 || adjust_default(this.primaryColor, { l: -10 });
|
|
1939
|
-
this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -10 });
|
|
1940
|
-
this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { l: -10 });
|
|
1941
|
-
this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -10 });
|
|
1942
|
-
this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -10 });
|
|
1943
|
-
this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: 0 });
|
|
1944
|
-
this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -20 });
|
|
1945
|
-
this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -60, l: -20 });
|
|
1946
|
-
this.pie12 = this.pie12 || adjust_default(this.primaryColor, { h: 120, l: -10 });
|
|
1947
|
-
this.pieTitleTextSize = this.pieTitleTextSize || "25px";
|
|
1948
|
-
this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
|
|
1949
|
-
this.pieSectionTextSize = this.pieSectionTextSize || "17px";
|
|
1950
|
-
this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
|
|
1951
|
-
this.pieLegendTextSize = this.pieLegendTextSize || "17px";
|
|
1952
|
-
this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
|
|
1953
|
-
this.pieStrokeColor = this.pieStrokeColor || "black";
|
|
1954
|
-
this.pieStrokeWidth = this.pieStrokeWidth || "2px";
|
|
1955
|
-
this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
|
|
1956
|
-
this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
|
|
1957
|
-
this.pieOpacity = this.pieOpacity || "0.7";
|
|
1958
|
-
this.radar = {
|
|
1959
|
-
axisColor: this.radar?.axisColor || this.lineColor,
|
|
1960
|
-
axisStrokeWidth: this.radar?.axisStrokeWidth || 2,
|
|
1961
|
-
axisLabelFontSize: this.radar?.axisLabelFontSize || 12,
|
|
1962
|
-
curveOpacity: this.radar?.curveOpacity || 0.5,
|
|
1963
|
-
curveStrokeWidth: this.radar?.curveStrokeWidth || 2,
|
|
1964
|
-
graticuleColor: this.radar?.graticuleColor || "#DEDEDE",
|
|
1965
|
-
graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,
|
|
1966
|
-
graticuleOpacity: this.radar?.graticuleOpacity || 0.3,
|
|
1967
|
-
legendBoxSize: this.radar?.legendBoxSize || 12,
|
|
1968
|
-
legendFontSize: this.radar?.legendFontSize || 12
|
|
1969
|
-
};
|
|
1970
|
-
this.archEdgeColor = this.archEdgeColor || "#777";
|
|
1971
|
-
this.archEdgeArrowColor = this.archEdgeArrowColor || "#777";
|
|
1972
|
-
this.archEdgeWidth = this.archEdgeWidth || "3";
|
|
1973
|
-
this.archGroupBorderColor = this.archGroupBorderColor || "#000";
|
|
1974
|
-
this.archGroupBorderWidth = this.archGroupBorderWidth || "2px";
|
|
1975
|
-
this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
|
|
1976
|
-
this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
|
|
1977
|
-
this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
|
|
1978
|
-
this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
|
|
1979
|
-
this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
|
|
1980
|
-
this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
|
|
1981
|
-
this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
|
|
1982
|
-
this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
|
|
1983
|
-
this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
|
|
1984
|
-
this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
|
|
1985
|
-
this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
|
|
1986
|
-
this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
|
|
1987
|
-
this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
|
|
1988
|
-
this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
|
|
1989
|
-
this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
|
|
1990
|
-
this.xyChart = {
|
|
1991
|
-
backgroundColor: this.xyChart?.backgroundColor || this.background,
|
|
1992
|
-
titleColor: this.xyChart?.titleColor || this.primaryTextColor,
|
|
1993
|
-
xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,
|
|
1994
|
-
xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,
|
|
1995
|
-
xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,
|
|
1996
|
-
xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,
|
|
1997
|
-
yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,
|
|
1998
|
-
yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,
|
|
1999
|
-
yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,
|
|
2000
|
-
yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,
|
|
2001
|
-
plotColorPalette: this.xyChart?.plotColorPalette || "#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"
|
|
2002
|
-
};
|
|
2003
|
-
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
|
2004
|
-
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
|
2005
|
-
this.requirementBorderSize = this.requirementBorderSize || "1";
|
|
2006
|
-
this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
|
|
2007
|
-
this.relationColor = this.relationColor || this.lineColor;
|
|
2008
|
-
this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken_default(this.secondaryColor, 30) : this.secondaryColor);
|
|
2009
|
-
this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
|
|
2010
|
-
this.git0 = this.git0 || this.primaryColor;
|
|
2011
|
-
this.git1 = this.git1 || this.secondaryColor;
|
|
2012
|
-
this.git2 = this.git2 || this.tertiaryColor;
|
|
2013
|
-
this.git3 = this.git3 || adjust_default(this.primaryColor, { h: -30 });
|
|
2014
|
-
this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 });
|
|
2015
|
-
this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 });
|
|
2016
|
-
this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 });
|
|
2017
|
-
this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 });
|
|
2018
|
-
if (this.darkMode) {
|
|
2019
|
-
this.git0 = lighten_default(this.git0, 25);
|
|
2020
|
-
this.git1 = lighten_default(this.git1, 25);
|
|
2021
|
-
this.git2 = lighten_default(this.git2, 25);
|
|
2022
|
-
this.git3 = lighten_default(this.git3, 25);
|
|
2023
|
-
this.git4 = lighten_default(this.git4, 25);
|
|
2024
|
-
this.git5 = lighten_default(this.git5, 25);
|
|
2025
|
-
this.git6 = lighten_default(this.git6, 25);
|
|
2026
|
-
this.git7 = lighten_default(this.git7, 25);
|
|
2027
|
-
} else {
|
|
2028
|
-
this.git0 = darken_default(this.git0, 25);
|
|
2029
|
-
this.git1 = darken_default(this.git1, 25);
|
|
2030
|
-
this.git2 = darken_default(this.git2, 25);
|
|
2031
|
-
this.git3 = darken_default(this.git3, 25);
|
|
2032
|
-
this.git4 = darken_default(this.git4, 25);
|
|
2033
|
-
this.git5 = darken_default(this.git5, 25);
|
|
2034
|
-
this.git6 = darken_default(this.git6, 25);
|
|
2035
|
-
this.git7 = darken_default(this.git7, 25);
|
|
2036
|
-
}
|
|
2037
|
-
this.gitInv0 = this.gitInv0 || invert_default(this.git0);
|
|
2038
|
-
this.gitInv1 = this.gitInv1 || invert_default(this.git1);
|
|
2039
|
-
this.gitInv2 = this.gitInv2 || invert_default(this.git2);
|
|
2040
|
-
this.gitInv3 = this.gitInv3 || invert_default(this.git3);
|
|
2041
|
-
this.gitInv4 = this.gitInv4 || invert_default(this.git4);
|
|
2042
|
-
this.gitInv5 = this.gitInv5 || invert_default(this.git5);
|
|
2043
|
-
this.gitInv6 = this.gitInv6 || invert_default(this.git6);
|
|
2044
|
-
this.gitInv7 = this.gitInv7 || invert_default(this.git7);
|
|
2045
|
-
this.branchLabelColor = this.branchLabelColor || (this.darkMode ? "black" : this.labelTextColor);
|
|
2046
|
-
this.gitBranchLabel0 = this.gitBranchLabel0 || this.branchLabelColor;
|
|
2047
|
-
this.gitBranchLabel1 = this.gitBranchLabel1 || this.branchLabelColor;
|
|
2048
|
-
this.gitBranchLabel2 = this.gitBranchLabel2 || this.branchLabelColor;
|
|
2049
|
-
this.gitBranchLabel3 = this.gitBranchLabel3 || this.branchLabelColor;
|
|
2050
|
-
this.gitBranchLabel4 = this.gitBranchLabel4 || this.branchLabelColor;
|
|
2051
|
-
this.gitBranchLabel5 = this.gitBranchLabel5 || this.branchLabelColor;
|
|
2052
|
-
this.gitBranchLabel6 = this.gitBranchLabel6 || this.branchLabelColor;
|
|
2053
|
-
this.gitBranchLabel7 = this.gitBranchLabel7 || this.branchLabelColor;
|
|
2054
|
-
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
|
2055
|
-
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
|
2056
|
-
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
|
2057
|
-
this.tagLabelFontSize = this.tagLabelFontSize || "10px";
|
|
2058
|
-
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
|
2059
|
-
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
|
2060
|
-
this.commitLabelFontSize = this.commitLabelFontSize || "10px";
|
|
2061
|
-
this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;
|
|
2062
|
-
this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;
|
|
2063
|
-
}
|
|
2064
|
-
calculate(overrides) {
|
|
2065
|
-
if (typeof overrides !== "object") {
|
|
2066
|
-
this.updateColors();
|
|
2067
|
-
return;
|
|
2068
|
-
}
|
|
2069
|
-
const keys = Object.keys(overrides);
|
|
2070
|
-
keys.forEach((k) => {
|
|
2071
|
-
this[k] = overrides[k];
|
|
2072
|
-
});
|
|
2073
|
-
this.updateColors();
|
|
2074
|
-
keys.forEach((k) => {
|
|
2075
|
-
this[k] = overrides[k];
|
|
2076
|
-
});
|
|
2077
|
-
}
|
|
2078
|
-
};
|
|
2079
|
-
var getThemeVariables = /* @__PURE__ */ __name((userOverrides) => {
|
|
2080
|
-
const theme = new Theme();
|
|
2081
|
-
theme.calculate(userOverrides);
|
|
2082
|
-
return theme;
|
|
2083
|
-
}, "getThemeVariables");
|
|
2084
|
-
var Theme2 = class {
|
|
2085
|
-
static {
|
|
2086
|
-
__name(this, "Theme");
|
|
2087
|
-
}
|
|
2088
|
-
constructor() {
|
|
2089
|
-
this.background = "#333";
|
|
2090
|
-
this.primaryColor = "#1f2020";
|
|
2091
|
-
this.secondaryColor = lighten_default(this.primaryColor, 16);
|
|
2092
|
-
this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 });
|
|
2093
|
-
this.primaryBorderColor = invert_default(this.background);
|
|
2094
|
-
this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
|
|
2095
|
-
this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
|
|
2096
|
-
this.primaryTextColor = invert_default(this.primaryColor);
|
|
2097
|
-
this.secondaryTextColor = invert_default(this.secondaryColor);
|
|
2098
|
-
this.tertiaryTextColor = invert_default(this.tertiaryColor);
|
|
2099
|
-
this.lineColor = invert_default(this.background);
|
|
2100
|
-
this.textColor = invert_default(this.background);
|
|
2101
|
-
this.mainBkg = "#1f2020";
|
|
2102
|
-
this.secondBkg = "calculated";
|
|
2103
|
-
this.mainContrastColor = "lightgrey";
|
|
2104
|
-
this.darkTextColor = lighten_default(invert_default("#323D47"), 10);
|
|
2105
|
-
this.lineColor = "calculated";
|
|
2106
|
-
this.border1 = "#ccc";
|
|
2107
|
-
this.border2 = rgba_default(255, 255, 255, 0.25);
|
|
2108
|
-
this.arrowheadColor = "calculated";
|
|
2109
|
-
this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
|
|
2110
|
-
this.fontSize = "16px";
|
|
2111
|
-
this.labelBackground = "#181818";
|
|
2112
|
-
this.textColor = "#ccc";
|
|
2113
|
-
this.THEME_COLOR_LIMIT = 12;
|
|
2114
|
-
this.nodeBkg = "calculated";
|
|
2115
|
-
this.nodeBorder = "calculated";
|
|
2116
|
-
this.clusterBkg = "calculated";
|
|
2117
|
-
this.clusterBorder = "calculated";
|
|
2118
|
-
this.defaultLinkColor = "calculated";
|
|
2119
|
-
this.titleColor = "#F9FFFE";
|
|
2120
|
-
this.edgeLabelBackground = "calculated";
|
|
2121
|
-
this.actorBorder = "calculated";
|
|
2122
|
-
this.actorBkg = "calculated";
|
|
2123
|
-
this.actorTextColor = "calculated";
|
|
2124
|
-
this.actorLineColor = "calculated";
|
|
2125
|
-
this.signalColor = "calculated";
|
|
2126
|
-
this.signalTextColor = "calculated";
|
|
2127
|
-
this.labelBoxBkgColor = "calculated";
|
|
2128
|
-
this.labelBoxBorderColor = "calculated";
|
|
2129
|
-
this.labelTextColor = "calculated";
|
|
2130
|
-
this.loopTextColor = "calculated";
|
|
2131
|
-
this.noteBorderColor = "calculated";
|
|
2132
|
-
this.noteBkgColor = "#fff5ad";
|
|
2133
|
-
this.noteTextColor = "calculated";
|
|
2134
|
-
this.activationBorderColor = "calculated";
|
|
2135
|
-
this.activationBkgColor = "calculated";
|
|
2136
|
-
this.sequenceNumberColor = "black";
|
|
2137
|
-
this.sectionBkgColor = darken_default("#EAE8D9", 30);
|
|
2138
|
-
this.altSectionBkgColor = "calculated";
|
|
2139
|
-
this.sectionBkgColor2 = "#EAE8D9";
|
|
2140
|
-
this.excludeBkgColor = darken_default(this.sectionBkgColor, 10);
|
|
2141
|
-
this.taskBorderColor = rgba_default(255, 255, 255, 70);
|
|
2142
|
-
this.taskBkgColor = "calculated";
|
|
2143
|
-
this.taskTextColor = "calculated";
|
|
2144
|
-
this.taskTextLightColor = "calculated";
|
|
2145
|
-
this.taskTextOutsideColor = "calculated";
|
|
2146
|
-
this.taskTextClickableColor = "#003163";
|
|
2147
|
-
this.activeTaskBorderColor = rgba_default(255, 255, 255, 50);
|
|
2148
|
-
this.activeTaskBkgColor = "#81B1DB";
|
|
2149
|
-
this.gridColor = "calculated";
|
|
2150
|
-
this.doneTaskBkgColor = "calculated";
|
|
2151
|
-
this.doneTaskBorderColor = "grey";
|
|
2152
|
-
this.critBorderColor = "#E83737";
|
|
2153
|
-
this.critBkgColor = "#E83737";
|
|
2154
|
-
this.taskTextDarkColor = "calculated";
|
|
2155
|
-
this.todayLineColor = "#DB5757";
|
|
2156
|
-
this.vertLineColor = "#00BFFF";
|
|
2157
|
-
this.personBorder = this.primaryBorderColor;
|
|
2158
|
-
this.personBkg = this.mainBkg;
|
|
2159
|
-
this.archEdgeColor = "calculated";
|
|
2160
|
-
this.archEdgeArrowColor = "calculated";
|
|
2161
|
-
this.archEdgeWidth = "3";
|
|
2162
|
-
this.archGroupBorderColor = this.primaryBorderColor;
|
|
2163
|
-
this.archGroupBorderWidth = "2px";
|
|
2164
|
-
this.rowOdd = this.rowOdd || lighten_default(this.mainBkg, 5) || "#ffffff";
|
|
2165
|
-
this.rowEven = this.rowEven || darken_default(this.mainBkg, 10);
|
|
2166
|
-
this.labelColor = "calculated";
|
|
2167
|
-
this.errorBkgColor = "#a44141";
|
|
2168
|
-
this.errorTextColor = "#ddd";
|
|
2169
|
-
}
|
|
2170
|
-
updateColors() {
|
|
2171
|
-
this.secondBkg = lighten_default(this.mainBkg, 16);
|
|
2172
|
-
this.lineColor = this.mainContrastColor;
|
|
2173
|
-
this.arrowheadColor = this.mainContrastColor;
|
|
2174
|
-
this.nodeBkg = this.mainBkg;
|
|
2175
|
-
this.nodeBorder = this.border1;
|
|
2176
|
-
this.clusterBkg = this.secondBkg;
|
|
2177
|
-
this.clusterBorder = this.border2;
|
|
2178
|
-
this.defaultLinkColor = this.lineColor;
|
|
2179
|
-
this.edgeLabelBackground = lighten_default(this.labelBackground, 25);
|
|
2180
|
-
this.actorBorder = this.border1;
|
|
2181
|
-
this.actorBkg = this.mainBkg;
|
|
2182
|
-
this.actorTextColor = this.mainContrastColor;
|
|
2183
|
-
this.actorLineColor = this.actorBorder;
|
|
2184
|
-
this.signalColor = this.mainContrastColor;
|
|
2185
|
-
this.signalTextColor = this.mainContrastColor;
|
|
2186
|
-
this.labelBoxBkgColor = this.actorBkg;
|
|
2187
|
-
this.labelBoxBorderColor = this.actorBorder;
|
|
2188
|
-
this.labelTextColor = this.mainContrastColor;
|
|
2189
|
-
this.loopTextColor = this.mainContrastColor;
|
|
2190
|
-
this.noteBorderColor = this.secondaryBorderColor;
|
|
2191
|
-
this.noteBkgColor = this.secondBkg;
|
|
2192
|
-
this.noteTextColor = this.secondaryTextColor;
|
|
2193
|
-
this.activationBorderColor = this.border1;
|
|
2194
|
-
this.activationBkgColor = this.secondBkg;
|
|
2195
|
-
this.altSectionBkgColor = this.background;
|
|
2196
|
-
this.taskBkgColor = lighten_default(this.mainBkg, 23);
|
|
2197
|
-
this.taskTextColor = this.darkTextColor;
|
|
2198
|
-
this.taskTextLightColor = this.mainContrastColor;
|
|
2199
|
-
this.taskTextOutsideColor = this.taskTextLightColor;
|
|
2200
|
-
this.gridColor = this.mainContrastColor;
|
|
2201
|
-
this.doneTaskBkgColor = this.mainContrastColor;
|
|
2202
|
-
this.taskTextDarkColor = this.darkTextColor;
|
|
2203
|
-
this.archEdgeColor = this.lineColor;
|
|
2204
|
-
this.archEdgeArrowColor = this.lineColor;
|
|
2205
|
-
this.transitionColor = this.transitionColor || this.lineColor;
|
|
2206
|
-
this.transitionLabelColor = this.transitionLabelColor || this.textColor;
|
|
2207
|
-
this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
|
|
2208
|
-
this.stateBkg = this.stateBkg || this.mainBkg;
|
|
2209
|
-
this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
|
|
2210
|
-
this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
|
|
2211
|
-
this.altBackground = this.altBackground || "#555";
|
|
2212
|
-
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
|
2213
|
-
this.compositeBorder = this.compositeBorder || this.nodeBorder;
|
|
2214
|
-
this.innerEndBackground = this.primaryBorderColor;
|
|
2215
|
-
this.specialStateColor = "#f4f4f4";
|
|
2216
|
-
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
|
2217
|
-
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
|
2218
|
-
this.fillType0 = this.primaryColor;
|
|
2219
|
-
this.fillType1 = this.secondaryColor;
|
|
2220
|
-
this.fillType2 = adjust_default(this.primaryColor, { h: 64 });
|
|
2221
|
-
this.fillType3 = adjust_default(this.secondaryColor, { h: 64 });
|
|
2222
|
-
this.fillType4 = adjust_default(this.primaryColor, { h: -64 });
|
|
2223
|
-
this.fillType5 = adjust_default(this.secondaryColor, { h: -64 });
|
|
2224
|
-
this.fillType6 = adjust_default(this.primaryColor, { h: 128 });
|
|
2225
|
-
this.fillType7 = adjust_default(this.secondaryColor, { h: 128 });
|
|
2226
|
-
this.cScale1 = this.cScale1 || "#0b0000";
|
|
2227
|
-
this.cScale2 = this.cScale2 || "#4d1037";
|
|
2228
|
-
this.cScale3 = this.cScale3 || "#3f5258";
|
|
2229
|
-
this.cScale4 = this.cScale4 || "#4f2f1b";
|
|
2230
|
-
this.cScale5 = this.cScale5 || "#6e0a0a";
|
|
2231
|
-
this.cScale6 = this.cScale6 || "#3b0048";
|
|
2232
|
-
this.cScale7 = this.cScale7 || "#995a01";
|
|
2233
|
-
this.cScale8 = this.cScale8 || "#154706";
|
|
2234
|
-
this.cScale9 = this.cScale9 || "#161722";
|
|
2235
|
-
this.cScale10 = this.cScale10 || "#00296f";
|
|
2236
|
-
this.cScale11 = this.cScale11 || "#01629c";
|
|
2237
|
-
this.cScale12 = this.cScale12 || "#010029";
|
|
2238
|
-
this.cScale0 = this.cScale0 || this.primaryColor;
|
|
2239
|
-
this.cScale1 = this.cScale1 || this.secondaryColor;
|
|
2240
|
-
this.cScale2 = this.cScale2 || this.tertiaryColor;
|
|
2241
|
-
this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 });
|
|
2242
|
-
this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 });
|
|
2243
|
-
this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 });
|
|
2244
|
-
this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 });
|
|
2245
|
-
this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 });
|
|
2246
|
-
this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 });
|
|
2247
|
-
this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 });
|
|
2248
|
-
this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 });
|
|
2249
|
-
this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 });
|
|
2250
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2251
|
-
this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]);
|
|
2252
|
-
}
|
|
2253
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2254
|
-
this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10);
|
|
2255
|
-
}
|
|
2256
|
-
for (let i = 0; i < 5; i++) {
|
|
2257
|
-
this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(-10 + i * 4) });
|
|
2258
|
-
this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(-7 + i * 4) });
|
|
2259
|
-
}
|
|
2260
|
-
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
|
|
2261
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2262
|
-
this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
|
|
2263
|
-
}
|
|
2264
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2265
|
-
this["pie" + i] = this["cScale" + i];
|
|
2266
|
-
}
|
|
2267
|
-
this.pieTitleTextSize = this.pieTitleTextSize || "25px";
|
|
2268
|
-
this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
|
|
2269
|
-
this.pieSectionTextSize = this.pieSectionTextSize || "17px";
|
|
2270
|
-
this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
|
|
2271
|
-
this.pieLegendTextSize = this.pieLegendTextSize || "17px";
|
|
2272
|
-
this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
|
|
2273
|
-
this.pieStrokeColor = this.pieStrokeColor || "black";
|
|
2274
|
-
this.pieStrokeWidth = this.pieStrokeWidth || "2px";
|
|
2275
|
-
this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
|
|
2276
|
-
this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
|
|
2277
|
-
this.pieOpacity = this.pieOpacity || "0.7";
|
|
2278
|
-
this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
|
|
2279
|
-
this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
|
|
2280
|
-
this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
|
|
2281
|
-
this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
|
|
2282
|
-
this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
|
|
2283
|
-
this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
|
|
2284
|
-
this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
|
|
2285
|
-
this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
|
|
2286
|
-
this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
|
|
2287
|
-
this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
|
|
2288
|
-
this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
|
|
2289
|
-
this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
|
|
2290
|
-
this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
|
|
2291
|
-
this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
|
|
2292
|
-
this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
|
|
2293
|
-
this.xyChart = {
|
|
2294
|
-
backgroundColor: this.xyChart?.backgroundColor || this.background,
|
|
2295
|
-
titleColor: this.xyChart?.titleColor || this.primaryTextColor,
|
|
2296
|
-
xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,
|
|
2297
|
-
xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,
|
|
2298
|
-
xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,
|
|
2299
|
-
xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,
|
|
2300
|
-
yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,
|
|
2301
|
-
yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,
|
|
2302
|
-
yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,
|
|
2303
|
-
yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,
|
|
2304
|
-
plotColorPalette: this.xyChart?.plotColorPalette || "#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"
|
|
2305
|
-
};
|
|
2306
|
-
this.packet = {
|
|
2307
|
-
startByteColor: this.primaryTextColor,
|
|
2308
|
-
endByteColor: this.primaryTextColor,
|
|
2309
|
-
labelColor: this.primaryTextColor,
|
|
2310
|
-
titleColor: this.primaryTextColor,
|
|
2311
|
-
blockStrokeColor: this.primaryTextColor,
|
|
2312
|
-
blockFillColor: this.background
|
|
2313
|
-
};
|
|
2314
|
-
this.radar = {
|
|
2315
|
-
axisColor: this.radar?.axisColor || this.lineColor,
|
|
2316
|
-
axisStrokeWidth: this.radar?.axisStrokeWidth || 2,
|
|
2317
|
-
axisLabelFontSize: this.radar?.axisLabelFontSize || 12,
|
|
2318
|
-
curveOpacity: this.radar?.curveOpacity || 0.5,
|
|
2319
|
-
curveStrokeWidth: this.radar?.curveStrokeWidth || 2,
|
|
2320
|
-
graticuleColor: this.radar?.graticuleColor || "#DEDEDE",
|
|
2321
|
-
graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,
|
|
2322
|
-
graticuleOpacity: this.radar?.graticuleOpacity || 0.3,
|
|
2323
|
-
legendBoxSize: this.radar?.legendBoxSize || 12,
|
|
2324
|
-
legendFontSize: this.radar?.legendFontSize || 12
|
|
2325
|
-
};
|
|
2326
|
-
this.classText = this.primaryTextColor;
|
|
2327
|
-
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
|
2328
|
-
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
|
2329
|
-
this.requirementBorderSize = this.requirementBorderSize || "1";
|
|
2330
|
-
this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
|
|
2331
|
-
this.relationColor = this.relationColor || this.lineColor;
|
|
2332
|
-
this.relationLabelBackground = this.relationLabelBackground || (this.darkMode ? darken_default(this.secondaryColor, 30) : this.secondaryColor);
|
|
2333
|
-
this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
|
|
2334
|
-
this.git0 = lighten_default(this.secondaryColor, 20);
|
|
2335
|
-
this.git1 = lighten_default(this.pie2 || this.secondaryColor, 20);
|
|
2336
|
-
this.git2 = lighten_default(this.pie3 || this.tertiaryColor, 20);
|
|
2337
|
-
this.git3 = lighten_default(this.pie4 || adjust_default(this.primaryColor, { h: -30 }), 20);
|
|
2338
|
-
this.git4 = lighten_default(this.pie5 || adjust_default(this.primaryColor, { h: -60 }), 20);
|
|
2339
|
-
this.git5 = lighten_default(this.pie6 || adjust_default(this.primaryColor, { h: -90 }), 10);
|
|
2340
|
-
this.git6 = lighten_default(this.pie7 || adjust_default(this.primaryColor, { h: 60 }), 10);
|
|
2341
|
-
this.git7 = lighten_default(this.pie8 || adjust_default(this.primaryColor, { h: 120 }), 20);
|
|
2342
|
-
this.gitInv0 = this.gitInv0 || invert_default(this.git0);
|
|
2343
|
-
this.gitInv1 = this.gitInv1 || invert_default(this.git1);
|
|
2344
|
-
this.gitInv2 = this.gitInv2 || invert_default(this.git2);
|
|
2345
|
-
this.gitInv3 = this.gitInv3 || invert_default(this.git3);
|
|
2346
|
-
this.gitInv4 = this.gitInv4 || invert_default(this.git4);
|
|
2347
|
-
this.gitInv5 = this.gitInv5 || invert_default(this.git5);
|
|
2348
|
-
this.gitInv6 = this.gitInv6 || invert_default(this.git6);
|
|
2349
|
-
this.gitInv7 = this.gitInv7 || invert_default(this.git7);
|
|
2350
|
-
this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor);
|
|
2351
|
-
this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;
|
|
2352
|
-
this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;
|
|
2353
|
-
this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(this.labelTextColor);
|
|
2354
|
-
this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;
|
|
2355
|
-
this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;
|
|
2356
|
-
this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;
|
|
2357
|
-
this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;
|
|
2358
|
-
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
|
2359
|
-
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
|
2360
|
-
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
|
2361
|
-
this.tagLabelFontSize = this.tagLabelFontSize || "10px";
|
|
2362
|
-
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
|
2363
|
-
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
|
2364
|
-
this.commitLabelFontSize = this.commitLabelFontSize || "10px";
|
|
2365
|
-
this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || lighten_default(this.background, 12);
|
|
2366
|
-
this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || lighten_default(this.background, 2);
|
|
2367
|
-
this.nodeBorder = this.nodeBorder || "#999";
|
|
2368
|
-
}
|
|
2369
|
-
calculate(overrides) {
|
|
2370
|
-
if (typeof overrides !== "object") {
|
|
2371
|
-
this.updateColors();
|
|
2372
|
-
return;
|
|
2373
|
-
}
|
|
2374
|
-
const keys = Object.keys(overrides);
|
|
2375
|
-
keys.forEach((k) => {
|
|
2376
|
-
this[k] = overrides[k];
|
|
2377
|
-
});
|
|
2378
|
-
this.updateColors();
|
|
2379
|
-
keys.forEach((k) => {
|
|
2380
|
-
this[k] = overrides[k];
|
|
2381
|
-
});
|
|
2382
|
-
}
|
|
2383
|
-
};
|
|
2384
|
-
var getThemeVariables2 = /* @__PURE__ */ __name((userOverrides) => {
|
|
2385
|
-
const theme = new Theme2();
|
|
2386
|
-
theme.calculate(userOverrides);
|
|
2387
|
-
return theme;
|
|
2388
|
-
}, "getThemeVariables");
|
|
2389
|
-
var Theme3 = class {
|
|
2390
|
-
static {
|
|
2391
|
-
__name(this, "Theme");
|
|
2392
|
-
}
|
|
2393
|
-
constructor() {
|
|
2394
|
-
this.background = "#f4f4f4";
|
|
2395
|
-
this.primaryColor = "#ECECFF";
|
|
2396
|
-
this.secondaryColor = adjust_default(this.primaryColor, { h: 120 });
|
|
2397
|
-
this.secondaryColor = "#ffffde";
|
|
2398
|
-
this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 });
|
|
2399
|
-
this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);
|
|
2400
|
-
this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
|
|
2401
|
-
this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
|
|
2402
|
-
this.primaryTextColor = invert_default(this.primaryColor);
|
|
2403
|
-
this.secondaryTextColor = invert_default(this.secondaryColor);
|
|
2404
|
-
this.tertiaryTextColor = invert_default(this.tertiaryColor);
|
|
2405
|
-
this.lineColor = invert_default(this.background);
|
|
2406
|
-
this.textColor = invert_default(this.background);
|
|
2407
|
-
this.background = "white";
|
|
2408
|
-
this.mainBkg = "#ECECFF";
|
|
2409
|
-
this.secondBkg = "#ffffde";
|
|
2410
|
-
this.lineColor = "#333333";
|
|
2411
|
-
this.border1 = "#9370DB";
|
|
2412
|
-
this.border2 = "#aaaa33";
|
|
2413
|
-
this.arrowheadColor = "#333333";
|
|
2414
|
-
this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
|
|
2415
|
-
this.fontSize = "16px";
|
|
2416
|
-
this.labelBackground = "rgba(232,232,232, 0.8)";
|
|
2417
|
-
this.textColor = "#333";
|
|
2418
|
-
this.THEME_COLOR_LIMIT = 12;
|
|
2419
|
-
this.nodeBkg = "calculated";
|
|
2420
|
-
this.nodeBorder = "calculated";
|
|
2421
|
-
this.clusterBkg = "calculated";
|
|
2422
|
-
this.clusterBorder = "calculated";
|
|
2423
|
-
this.defaultLinkColor = "calculated";
|
|
2424
|
-
this.titleColor = "calculated";
|
|
2425
|
-
this.edgeLabelBackground = "calculated";
|
|
2426
|
-
this.actorBorder = "calculated";
|
|
2427
|
-
this.actorBkg = "calculated";
|
|
2428
|
-
this.actorTextColor = "black";
|
|
2429
|
-
this.actorLineColor = "calculated";
|
|
2430
|
-
this.signalColor = "calculated";
|
|
2431
|
-
this.signalTextColor = "calculated";
|
|
2432
|
-
this.labelBoxBkgColor = "calculated";
|
|
2433
|
-
this.labelBoxBorderColor = "calculated";
|
|
2434
|
-
this.labelTextColor = "calculated";
|
|
2435
|
-
this.loopTextColor = "calculated";
|
|
2436
|
-
this.noteBorderColor = "calculated";
|
|
2437
|
-
this.noteBkgColor = "#fff5ad";
|
|
2438
|
-
this.noteTextColor = "calculated";
|
|
2439
|
-
this.activationBorderColor = "#666";
|
|
2440
|
-
this.activationBkgColor = "#f4f4f4";
|
|
2441
|
-
this.sequenceNumberColor = "white";
|
|
2442
|
-
this.sectionBkgColor = "calculated";
|
|
2443
|
-
this.altSectionBkgColor = "calculated";
|
|
2444
|
-
this.sectionBkgColor2 = "calculated";
|
|
2445
|
-
this.excludeBkgColor = "#eeeeee";
|
|
2446
|
-
this.taskBorderColor = "calculated";
|
|
2447
|
-
this.taskBkgColor = "calculated";
|
|
2448
|
-
this.taskTextLightColor = "calculated";
|
|
2449
|
-
this.taskTextColor = this.taskTextLightColor;
|
|
2450
|
-
this.taskTextDarkColor = "calculated";
|
|
2451
|
-
this.taskTextOutsideColor = this.taskTextDarkColor;
|
|
2452
|
-
this.taskTextClickableColor = "calculated";
|
|
2453
|
-
this.activeTaskBorderColor = "calculated";
|
|
2454
|
-
this.activeTaskBkgColor = "calculated";
|
|
2455
|
-
this.gridColor = "calculated";
|
|
2456
|
-
this.doneTaskBkgColor = "calculated";
|
|
2457
|
-
this.doneTaskBorderColor = "calculated";
|
|
2458
|
-
this.critBorderColor = "calculated";
|
|
2459
|
-
this.critBkgColor = "calculated";
|
|
2460
|
-
this.todayLineColor = "calculated";
|
|
2461
|
-
this.vertLineColor = "calculated";
|
|
2462
|
-
this.sectionBkgColor = rgba_default(102, 102, 255, 0.49);
|
|
2463
|
-
this.altSectionBkgColor = "white";
|
|
2464
|
-
this.sectionBkgColor2 = "#fff400";
|
|
2465
|
-
this.taskBorderColor = "#534fbc";
|
|
2466
|
-
this.taskBkgColor = "#8a90dd";
|
|
2467
|
-
this.taskTextLightColor = "white";
|
|
2468
|
-
this.taskTextColor = "calculated";
|
|
2469
|
-
this.taskTextDarkColor = "black";
|
|
2470
|
-
this.taskTextOutsideColor = "calculated";
|
|
2471
|
-
this.taskTextClickableColor = "#003163";
|
|
2472
|
-
this.activeTaskBorderColor = "#534fbc";
|
|
2473
|
-
this.activeTaskBkgColor = "#bfc7ff";
|
|
2474
|
-
this.gridColor = "lightgrey";
|
|
2475
|
-
this.doneTaskBkgColor = "lightgrey";
|
|
2476
|
-
this.doneTaskBorderColor = "grey";
|
|
2477
|
-
this.critBorderColor = "#ff8888";
|
|
2478
|
-
this.critBkgColor = "red";
|
|
2479
|
-
this.todayLineColor = "red";
|
|
2480
|
-
this.vertLineColor = "navy";
|
|
2481
|
-
this.personBorder = this.primaryBorderColor;
|
|
2482
|
-
this.personBkg = this.mainBkg;
|
|
2483
|
-
this.archEdgeColor = "calculated";
|
|
2484
|
-
this.archEdgeArrowColor = "calculated";
|
|
2485
|
-
this.archEdgeWidth = "3";
|
|
2486
|
-
this.archGroupBorderColor = this.primaryBorderColor;
|
|
2487
|
-
this.archGroupBorderWidth = "2px";
|
|
2488
|
-
this.rowOdd = "calculated";
|
|
2489
|
-
this.rowEven = "calculated";
|
|
2490
|
-
this.labelColor = "black";
|
|
2491
|
-
this.errorBkgColor = "#552222";
|
|
2492
|
-
this.errorTextColor = "#552222";
|
|
2493
|
-
this.updateColors();
|
|
2494
|
-
}
|
|
2495
|
-
updateColors() {
|
|
2496
|
-
this.cScale0 = this.cScale0 || this.primaryColor;
|
|
2497
|
-
this.cScale1 = this.cScale1 || this.secondaryColor;
|
|
2498
|
-
this.cScale2 = this.cScale2 || this.tertiaryColor;
|
|
2499
|
-
this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 });
|
|
2500
|
-
this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 });
|
|
2501
|
-
this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 });
|
|
2502
|
-
this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 });
|
|
2503
|
-
this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 });
|
|
2504
|
-
this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 });
|
|
2505
|
-
this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 });
|
|
2506
|
-
this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 });
|
|
2507
|
-
this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 });
|
|
2508
|
-
this["cScalePeer1"] = this["cScalePeer1"] || darken_default(this.secondaryColor, 45);
|
|
2509
|
-
this["cScalePeer2"] = this["cScalePeer2"] || darken_default(this.tertiaryColor, 40);
|
|
2510
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2511
|
-
this["cScale" + i] = darken_default(this["cScale" + i], 10);
|
|
2512
|
-
this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 25);
|
|
2513
|
-
}
|
|
2514
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2515
|
-
this["cScaleInv" + i] = this["cScaleInv" + i] || adjust_default(this["cScale" + i], { h: 180 });
|
|
2516
|
-
}
|
|
2517
|
-
for (let i = 0; i < 5; i++) {
|
|
2518
|
-
this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, l: -(5 + i * 5) });
|
|
2519
|
-
this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, l: -(7 + i * 5) });
|
|
2520
|
-
}
|
|
2521
|
-
this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor;
|
|
2522
|
-
if (this.labelTextColor !== "calculated") {
|
|
2523
|
-
this.cScaleLabel0 = this.cScaleLabel0 || invert_default(this.labelTextColor);
|
|
2524
|
-
this.cScaleLabel3 = this.cScaleLabel3 || invert_default(this.labelTextColor);
|
|
2525
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2526
|
-
this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.labelTextColor;
|
|
2527
|
-
}
|
|
2528
|
-
}
|
|
2529
|
-
this.nodeBkg = this.mainBkg;
|
|
2530
|
-
this.nodeBorder = this.border1;
|
|
2531
|
-
this.clusterBkg = this.secondBkg;
|
|
2532
|
-
this.clusterBorder = this.border2;
|
|
2533
|
-
this.defaultLinkColor = this.lineColor;
|
|
2534
|
-
this.titleColor = this.textColor;
|
|
2535
|
-
this.edgeLabelBackground = this.labelBackground;
|
|
2536
|
-
this.actorBorder = lighten_default(this.border1, 23);
|
|
2537
|
-
this.actorBkg = this.mainBkg;
|
|
2538
|
-
this.labelBoxBkgColor = this.actorBkg;
|
|
2539
|
-
this.signalColor = this.textColor;
|
|
2540
|
-
this.signalTextColor = this.textColor;
|
|
2541
|
-
this.labelBoxBorderColor = this.actorBorder;
|
|
2542
|
-
this.labelTextColor = this.actorTextColor;
|
|
2543
|
-
this.loopTextColor = this.actorTextColor;
|
|
2544
|
-
this.noteBorderColor = this.border2;
|
|
2545
|
-
this.noteTextColor = this.actorTextColor;
|
|
2546
|
-
this.actorLineColor = this.actorBorder;
|
|
2547
|
-
this.taskTextColor = this.taskTextLightColor;
|
|
2548
|
-
this.taskTextOutsideColor = this.taskTextDarkColor;
|
|
2549
|
-
this.archEdgeColor = this.lineColor;
|
|
2550
|
-
this.archEdgeArrowColor = this.lineColor;
|
|
2551
|
-
this.rowOdd = this.rowOdd || lighten_default(this.primaryColor, 75) || "#ffffff";
|
|
2552
|
-
this.rowEven = this.rowEven || lighten_default(this.primaryColor, 1);
|
|
2553
|
-
this.transitionColor = this.transitionColor || this.lineColor;
|
|
2554
|
-
this.transitionLabelColor = this.transitionLabelColor || this.textColor;
|
|
2555
|
-
this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
|
|
2556
|
-
this.stateBkg = this.stateBkg || this.mainBkg;
|
|
2557
|
-
this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
|
|
2558
|
-
this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
|
|
2559
|
-
this.altBackground = this.altBackground || "#f0f0f0";
|
|
2560
|
-
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
|
2561
|
-
this.compositeBorder = this.compositeBorder || this.nodeBorder;
|
|
2562
|
-
this.innerEndBackground = this.nodeBorder;
|
|
2563
|
-
this.specialStateColor = this.lineColor;
|
|
2564
|
-
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
|
2565
|
-
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
|
2566
|
-
this.transitionColor = this.transitionColor || this.lineColor;
|
|
2567
|
-
this.classText = this.primaryTextColor;
|
|
2568
|
-
this.fillType0 = this.primaryColor;
|
|
2569
|
-
this.fillType1 = this.secondaryColor;
|
|
2570
|
-
this.fillType2 = adjust_default(this.primaryColor, { h: 64 });
|
|
2571
|
-
this.fillType3 = adjust_default(this.secondaryColor, { h: 64 });
|
|
2572
|
-
this.fillType4 = adjust_default(this.primaryColor, { h: -64 });
|
|
2573
|
-
this.fillType5 = adjust_default(this.secondaryColor, { h: -64 });
|
|
2574
|
-
this.fillType6 = adjust_default(this.primaryColor, { h: 128 });
|
|
2575
|
-
this.fillType7 = adjust_default(this.secondaryColor, { h: 128 });
|
|
2576
|
-
this.pie1 = this.pie1 || this.primaryColor;
|
|
2577
|
-
this.pie2 = this.pie2 || this.secondaryColor;
|
|
2578
|
-
this.pie3 = this.pie3 || adjust_default(this.tertiaryColor, { l: -40 });
|
|
2579
|
-
this.pie4 = this.pie4 || adjust_default(this.primaryColor, { l: -10 });
|
|
2580
|
-
this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -30 });
|
|
2581
|
-
this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { l: -20 });
|
|
2582
|
-
this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -20 });
|
|
2583
|
-
this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -40 });
|
|
2584
|
-
this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: -40 });
|
|
2585
|
-
this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -40 });
|
|
2586
|
-
this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -90, l: -40 });
|
|
2587
|
-
this.pie12 = this.pie12 || adjust_default(this.primaryColor, { h: 120, l: -30 });
|
|
2588
|
-
this.pieTitleTextSize = this.pieTitleTextSize || "25px";
|
|
2589
|
-
this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
|
|
2590
|
-
this.pieSectionTextSize = this.pieSectionTextSize || "17px";
|
|
2591
|
-
this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
|
|
2592
|
-
this.pieLegendTextSize = this.pieLegendTextSize || "17px";
|
|
2593
|
-
this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
|
|
2594
|
-
this.pieStrokeColor = this.pieStrokeColor || "black";
|
|
2595
|
-
this.pieStrokeWidth = this.pieStrokeWidth || "2px";
|
|
2596
|
-
this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
|
|
2597
|
-
this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
|
|
2598
|
-
this.pieOpacity = this.pieOpacity || "0.7";
|
|
2599
|
-
this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
|
|
2600
|
-
this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
|
|
2601
|
-
this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
|
|
2602
|
-
this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
|
|
2603
|
-
this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
|
|
2604
|
-
this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
|
|
2605
|
-
this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
|
|
2606
|
-
this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
|
|
2607
|
-
this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
|
|
2608
|
-
this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
|
|
2609
|
-
this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
|
|
2610
|
-
this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
|
|
2611
|
-
this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
|
|
2612
|
-
this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
|
|
2613
|
-
this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
|
|
2614
|
-
this.radar = {
|
|
2615
|
-
axisColor: this.radar?.axisColor || this.lineColor,
|
|
2616
|
-
axisStrokeWidth: this.radar?.axisStrokeWidth || 2,
|
|
2617
|
-
axisLabelFontSize: this.radar?.axisLabelFontSize || 12,
|
|
2618
|
-
curveOpacity: this.radar?.curveOpacity || 0.5,
|
|
2619
|
-
curveStrokeWidth: this.radar?.curveStrokeWidth || 2,
|
|
2620
|
-
graticuleColor: this.radar?.graticuleColor || "#DEDEDE",
|
|
2621
|
-
graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,
|
|
2622
|
-
graticuleOpacity: this.radar?.graticuleOpacity || 0.3,
|
|
2623
|
-
legendBoxSize: this.radar?.legendBoxSize || 12,
|
|
2624
|
-
legendFontSize: this.radar?.legendFontSize || 12
|
|
2625
|
-
};
|
|
2626
|
-
this.xyChart = {
|
|
2627
|
-
backgroundColor: this.xyChart?.backgroundColor || this.background,
|
|
2628
|
-
titleColor: this.xyChart?.titleColor || this.primaryTextColor,
|
|
2629
|
-
xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,
|
|
2630
|
-
xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,
|
|
2631
|
-
xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,
|
|
2632
|
-
xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,
|
|
2633
|
-
yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,
|
|
2634
|
-
yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,
|
|
2635
|
-
yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,
|
|
2636
|
-
yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,
|
|
2637
|
-
plotColorPalette: this.xyChart?.plotColorPalette || "#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"
|
|
2638
|
-
};
|
|
2639
|
-
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
|
2640
|
-
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
|
2641
|
-
this.requirementBorderSize = this.requirementBorderSize || "1";
|
|
2642
|
-
this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
|
|
2643
|
-
this.relationColor = this.relationColor || this.lineColor;
|
|
2644
|
-
this.relationLabelBackground = this.relationLabelBackground || this.labelBackground;
|
|
2645
|
-
this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
|
|
2646
|
-
this.git0 = this.git0 || this.primaryColor;
|
|
2647
|
-
this.git1 = this.git1 || this.secondaryColor;
|
|
2648
|
-
this.git2 = this.git2 || this.tertiaryColor;
|
|
2649
|
-
this.git3 = this.git3 || adjust_default(this.primaryColor, { h: -30 });
|
|
2650
|
-
this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 });
|
|
2651
|
-
this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 });
|
|
2652
|
-
this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 });
|
|
2653
|
-
this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 });
|
|
2654
|
-
if (this.darkMode) {
|
|
2655
|
-
this.git0 = lighten_default(this.git0, 25);
|
|
2656
|
-
this.git1 = lighten_default(this.git1, 25);
|
|
2657
|
-
this.git2 = lighten_default(this.git2, 25);
|
|
2658
|
-
this.git3 = lighten_default(this.git3, 25);
|
|
2659
|
-
this.git4 = lighten_default(this.git4, 25);
|
|
2660
|
-
this.git5 = lighten_default(this.git5, 25);
|
|
2661
|
-
this.git6 = lighten_default(this.git6, 25);
|
|
2662
|
-
this.git7 = lighten_default(this.git7, 25);
|
|
2663
|
-
} else {
|
|
2664
|
-
this.git0 = darken_default(this.git0, 25);
|
|
2665
|
-
this.git1 = darken_default(this.git1, 25);
|
|
2666
|
-
this.git2 = darken_default(this.git2, 25);
|
|
2667
|
-
this.git3 = darken_default(this.git3, 25);
|
|
2668
|
-
this.git4 = darken_default(this.git4, 25);
|
|
2669
|
-
this.git5 = darken_default(this.git5, 25);
|
|
2670
|
-
this.git6 = darken_default(this.git6, 25);
|
|
2671
|
-
this.git7 = darken_default(this.git7, 25);
|
|
2672
|
-
}
|
|
2673
|
-
this.gitInv0 = this.gitInv0 || darken_default(invert_default(this.git0), 25);
|
|
2674
|
-
this.gitInv1 = this.gitInv1 || invert_default(this.git1);
|
|
2675
|
-
this.gitInv2 = this.gitInv2 || invert_default(this.git2);
|
|
2676
|
-
this.gitInv3 = this.gitInv3 || invert_default(this.git3);
|
|
2677
|
-
this.gitInv4 = this.gitInv4 || invert_default(this.git4);
|
|
2678
|
-
this.gitInv5 = this.gitInv5 || invert_default(this.git5);
|
|
2679
|
-
this.gitInv6 = this.gitInv6 || invert_default(this.git6);
|
|
2680
|
-
this.gitInv7 = this.gitInv7 || invert_default(this.git7);
|
|
2681
|
-
this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor);
|
|
2682
|
-
this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;
|
|
2683
|
-
this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;
|
|
2684
|
-
this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(this.labelTextColor);
|
|
2685
|
-
this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;
|
|
2686
|
-
this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;
|
|
2687
|
-
this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;
|
|
2688
|
-
this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;
|
|
2689
|
-
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
|
2690
|
-
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
|
2691
|
-
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
|
2692
|
-
this.tagLabelFontSize = this.tagLabelFontSize || "10px";
|
|
2693
|
-
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
|
2694
|
-
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
|
2695
|
-
this.commitLabelFontSize = this.commitLabelFontSize || "10px";
|
|
2696
|
-
this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;
|
|
2697
|
-
this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;
|
|
2698
|
-
}
|
|
2699
|
-
calculate(overrides) {
|
|
2700
|
-
Object.keys(this).forEach((k) => {
|
|
2701
|
-
if (this[k] === "calculated") {
|
|
2702
|
-
this[k] = void 0;
|
|
2703
|
-
}
|
|
2704
|
-
});
|
|
2705
|
-
if (typeof overrides !== "object") {
|
|
2706
|
-
this.updateColors();
|
|
2707
|
-
return;
|
|
2708
|
-
}
|
|
2709
|
-
const keys = Object.keys(overrides);
|
|
2710
|
-
keys.forEach((k) => {
|
|
2711
|
-
this[k] = overrides[k];
|
|
2712
|
-
});
|
|
2713
|
-
this.updateColors();
|
|
2714
|
-
keys.forEach((k) => {
|
|
2715
|
-
this[k] = overrides[k];
|
|
2716
|
-
});
|
|
2717
|
-
}
|
|
2718
|
-
};
|
|
2719
|
-
var getThemeVariables3 = /* @__PURE__ */ __name((userOverrides) => {
|
|
2720
|
-
const theme = new Theme3();
|
|
2721
|
-
theme.calculate(userOverrides);
|
|
2722
|
-
return theme;
|
|
2723
|
-
}, "getThemeVariables");
|
|
2724
|
-
var Theme4 = class {
|
|
2725
|
-
static {
|
|
2726
|
-
__name(this, "Theme");
|
|
2727
|
-
}
|
|
2728
|
-
constructor() {
|
|
2729
|
-
this.background = "#f4f4f4";
|
|
2730
|
-
this.primaryColor = "#cde498";
|
|
2731
|
-
this.secondaryColor = "#cdffb2";
|
|
2732
|
-
this.background = "white";
|
|
2733
|
-
this.mainBkg = "#cde498";
|
|
2734
|
-
this.secondBkg = "#cdffb2";
|
|
2735
|
-
this.lineColor = "green";
|
|
2736
|
-
this.border1 = "#13540c";
|
|
2737
|
-
this.border2 = "#6eaa49";
|
|
2738
|
-
this.arrowheadColor = "green";
|
|
2739
|
-
this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
|
|
2740
|
-
this.fontSize = "16px";
|
|
2741
|
-
this.tertiaryColor = lighten_default("#cde498", 10);
|
|
2742
|
-
this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);
|
|
2743
|
-
this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
|
|
2744
|
-
this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
|
|
2745
|
-
this.primaryTextColor = invert_default(this.primaryColor);
|
|
2746
|
-
this.secondaryTextColor = invert_default(this.secondaryColor);
|
|
2747
|
-
this.tertiaryTextColor = invert_default(this.primaryColor);
|
|
2748
|
-
this.lineColor = invert_default(this.background);
|
|
2749
|
-
this.textColor = invert_default(this.background);
|
|
2750
|
-
this.THEME_COLOR_LIMIT = 12;
|
|
2751
|
-
this.nodeBkg = "calculated";
|
|
2752
|
-
this.nodeBorder = "calculated";
|
|
2753
|
-
this.clusterBkg = "calculated";
|
|
2754
|
-
this.clusterBorder = "calculated";
|
|
2755
|
-
this.defaultLinkColor = "calculated";
|
|
2756
|
-
this.titleColor = "#333";
|
|
2757
|
-
this.edgeLabelBackground = "#e8e8e8";
|
|
2758
|
-
this.actorBorder = "calculated";
|
|
2759
|
-
this.actorBkg = "calculated";
|
|
2760
|
-
this.actorTextColor = "black";
|
|
2761
|
-
this.actorLineColor = "calculated";
|
|
2762
|
-
this.signalColor = "#333";
|
|
2763
|
-
this.signalTextColor = "#333";
|
|
2764
|
-
this.labelBoxBkgColor = "calculated";
|
|
2765
|
-
this.labelBoxBorderColor = "#326932";
|
|
2766
|
-
this.labelTextColor = "calculated";
|
|
2767
|
-
this.loopTextColor = "calculated";
|
|
2768
|
-
this.noteBorderColor = "calculated";
|
|
2769
|
-
this.noteBkgColor = "#fff5ad";
|
|
2770
|
-
this.noteTextColor = "calculated";
|
|
2771
|
-
this.activationBorderColor = "#666";
|
|
2772
|
-
this.activationBkgColor = "#f4f4f4";
|
|
2773
|
-
this.sequenceNumberColor = "white";
|
|
2774
|
-
this.sectionBkgColor = "#6eaa49";
|
|
2775
|
-
this.altSectionBkgColor = "white";
|
|
2776
|
-
this.sectionBkgColor2 = "#6eaa49";
|
|
2777
|
-
this.excludeBkgColor = "#eeeeee";
|
|
2778
|
-
this.taskBorderColor = "calculated";
|
|
2779
|
-
this.taskBkgColor = "#487e3a";
|
|
2780
|
-
this.taskTextLightColor = "white";
|
|
2781
|
-
this.taskTextColor = "calculated";
|
|
2782
|
-
this.taskTextDarkColor = "black";
|
|
2783
|
-
this.taskTextOutsideColor = "calculated";
|
|
2784
|
-
this.taskTextClickableColor = "#003163";
|
|
2785
|
-
this.activeTaskBorderColor = "calculated";
|
|
2786
|
-
this.activeTaskBkgColor = "calculated";
|
|
2787
|
-
this.gridColor = "lightgrey";
|
|
2788
|
-
this.doneTaskBkgColor = "lightgrey";
|
|
2789
|
-
this.doneTaskBorderColor = "grey";
|
|
2790
|
-
this.critBorderColor = "#ff8888";
|
|
2791
|
-
this.critBkgColor = "red";
|
|
2792
|
-
this.todayLineColor = "red";
|
|
2793
|
-
this.vertLineColor = "#00BFFF";
|
|
2794
|
-
this.personBorder = this.primaryBorderColor;
|
|
2795
|
-
this.personBkg = this.mainBkg;
|
|
2796
|
-
this.archEdgeColor = "calculated";
|
|
2797
|
-
this.archEdgeArrowColor = "calculated";
|
|
2798
|
-
this.archEdgeWidth = "3";
|
|
2799
|
-
this.archGroupBorderColor = this.primaryBorderColor;
|
|
2800
|
-
this.archGroupBorderWidth = "2px";
|
|
2801
|
-
this.labelColor = "black";
|
|
2802
|
-
this.errorBkgColor = "#552222";
|
|
2803
|
-
this.errorTextColor = "#552222";
|
|
2804
|
-
}
|
|
2805
|
-
updateColors() {
|
|
2806
|
-
this.actorBorder = darken_default(this.mainBkg, 20);
|
|
2807
|
-
this.actorBkg = this.mainBkg;
|
|
2808
|
-
this.labelBoxBkgColor = this.actorBkg;
|
|
2809
|
-
this.labelTextColor = this.actorTextColor;
|
|
2810
|
-
this.loopTextColor = this.actorTextColor;
|
|
2811
|
-
this.noteBorderColor = this.border2;
|
|
2812
|
-
this.noteTextColor = this.actorTextColor;
|
|
2813
|
-
this.actorLineColor = this.actorBorder;
|
|
2814
|
-
this.cScale0 = this.cScale0 || this.primaryColor;
|
|
2815
|
-
this.cScale1 = this.cScale1 || this.secondaryColor;
|
|
2816
|
-
this.cScale2 = this.cScale2 || this.tertiaryColor;
|
|
2817
|
-
this.cScale3 = this.cScale3 || adjust_default(this.primaryColor, { h: 30 });
|
|
2818
|
-
this.cScale4 = this.cScale4 || adjust_default(this.primaryColor, { h: 60 });
|
|
2819
|
-
this.cScale5 = this.cScale5 || adjust_default(this.primaryColor, { h: 90 });
|
|
2820
|
-
this.cScale6 = this.cScale6 || adjust_default(this.primaryColor, { h: 120 });
|
|
2821
|
-
this.cScale7 = this.cScale7 || adjust_default(this.primaryColor, { h: 150 });
|
|
2822
|
-
this.cScale8 = this.cScale8 || adjust_default(this.primaryColor, { h: 210 });
|
|
2823
|
-
this.cScale9 = this.cScale9 || adjust_default(this.primaryColor, { h: 270 });
|
|
2824
|
-
this.cScale10 = this.cScale10 || adjust_default(this.primaryColor, { h: 300 });
|
|
2825
|
-
this.cScale11 = this.cScale11 || adjust_default(this.primaryColor, { h: 330 });
|
|
2826
|
-
this["cScalePeer1"] = this["cScalePeer1"] || darken_default(this.secondaryColor, 45);
|
|
2827
|
-
this["cScalePeer2"] = this["cScalePeer2"] || darken_default(this.tertiaryColor, 40);
|
|
2828
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2829
|
-
this["cScale" + i] = darken_default(this["cScale" + i], 10);
|
|
2830
|
-
this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 25);
|
|
2831
|
-
}
|
|
2832
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2833
|
-
this["cScaleInv" + i] = this["cScaleInv" + i] || adjust_default(this["cScale" + i], { h: 180 });
|
|
2834
|
-
}
|
|
2835
|
-
this.scaleLabelColor = this.scaleLabelColor !== "calculated" && this.scaleLabelColor ? this.scaleLabelColor : this.labelTextColor;
|
|
2836
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
2837
|
-
this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
|
|
2838
|
-
}
|
|
2839
|
-
for (let i = 0; i < 5; i++) {
|
|
2840
|
-
this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(5 + i * 5) });
|
|
2841
|
-
this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { h: 30, s: -30, l: -(8 + i * 5) });
|
|
2842
|
-
}
|
|
2843
|
-
this.nodeBkg = this.mainBkg;
|
|
2844
|
-
this.nodeBorder = this.border1;
|
|
2845
|
-
this.clusterBkg = this.secondBkg;
|
|
2846
|
-
this.clusterBorder = this.border2;
|
|
2847
|
-
this.defaultLinkColor = this.lineColor;
|
|
2848
|
-
this.taskBorderColor = this.border1;
|
|
2849
|
-
this.taskTextColor = this.taskTextLightColor;
|
|
2850
|
-
this.taskTextOutsideColor = this.taskTextDarkColor;
|
|
2851
|
-
this.activeTaskBorderColor = this.taskBorderColor;
|
|
2852
|
-
this.activeTaskBkgColor = this.mainBkg;
|
|
2853
|
-
this.archEdgeColor = this.lineColor;
|
|
2854
|
-
this.archEdgeArrowColor = this.lineColor;
|
|
2855
|
-
this.rowOdd = this.rowOdd || lighten_default(this.mainBkg, 75) || "#ffffff";
|
|
2856
|
-
this.rowEven = this.rowEven || lighten_default(this.mainBkg, 20);
|
|
2857
|
-
this.transitionColor = this.transitionColor || this.lineColor;
|
|
2858
|
-
this.transitionLabelColor = this.transitionLabelColor || this.textColor;
|
|
2859
|
-
this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
|
|
2860
|
-
this.stateBkg = this.stateBkg || this.mainBkg;
|
|
2861
|
-
this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
|
|
2862
|
-
this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
|
|
2863
|
-
this.altBackground = this.altBackground || "#f0f0f0";
|
|
2864
|
-
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
|
2865
|
-
this.compositeBorder = this.compositeBorder || this.nodeBorder;
|
|
2866
|
-
this.innerEndBackground = this.primaryBorderColor;
|
|
2867
|
-
this.specialStateColor = this.lineColor;
|
|
2868
|
-
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
|
2869
|
-
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
|
2870
|
-
this.transitionColor = this.transitionColor || this.lineColor;
|
|
2871
|
-
this.classText = this.primaryTextColor;
|
|
2872
|
-
this.fillType0 = this.primaryColor;
|
|
2873
|
-
this.fillType1 = this.secondaryColor;
|
|
2874
|
-
this.fillType2 = adjust_default(this.primaryColor, { h: 64 });
|
|
2875
|
-
this.fillType3 = adjust_default(this.secondaryColor, { h: 64 });
|
|
2876
|
-
this.fillType4 = adjust_default(this.primaryColor, { h: -64 });
|
|
2877
|
-
this.fillType5 = adjust_default(this.secondaryColor, { h: -64 });
|
|
2878
|
-
this.fillType6 = adjust_default(this.primaryColor, { h: 128 });
|
|
2879
|
-
this.fillType7 = adjust_default(this.secondaryColor, { h: 128 });
|
|
2880
|
-
this.pie1 = this.pie1 || this.primaryColor;
|
|
2881
|
-
this.pie2 = this.pie2 || this.secondaryColor;
|
|
2882
|
-
this.pie3 = this.pie3 || this.tertiaryColor;
|
|
2883
|
-
this.pie4 = this.pie4 || adjust_default(this.primaryColor, { l: -30 });
|
|
2884
|
-
this.pie5 = this.pie5 || adjust_default(this.secondaryColor, { l: -30 });
|
|
2885
|
-
this.pie6 = this.pie6 || adjust_default(this.tertiaryColor, { h: 40, l: -40 });
|
|
2886
|
-
this.pie7 = this.pie7 || adjust_default(this.primaryColor, { h: 60, l: -10 });
|
|
2887
|
-
this.pie8 = this.pie8 || adjust_default(this.primaryColor, { h: -60, l: -10 });
|
|
2888
|
-
this.pie9 = this.pie9 || adjust_default(this.primaryColor, { h: 120, l: 0 });
|
|
2889
|
-
this.pie10 = this.pie10 || adjust_default(this.primaryColor, { h: 60, l: -50 });
|
|
2890
|
-
this.pie11 = this.pie11 || adjust_default(this.primaryColor, { h: -60, l: -50 });
|
|
2891
|
-
this.pie12 = this.pie12 || adjust_default(this.primaryColor, { h: 120, l: -50 });
|
|
2892
|
-
this.pieTitleTextSize = this.pieTitleTextSize || "25px";
|
|
2893
|
-
this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
|
|
2894
|
-
this.pieSectionTextSize = this.pieSectionTextSize || "17px";
|
|
2895
|
-
this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
|
|
2896
|
-
this.pieLegendTextSize = this.pieLegendTextSize || "17px";
|
|
2897
|
-
this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
|
|
2898
|
-
this.pieStrokeColor = this.pieStrokeColor || "black";
|
|
2899
|
-
this.pieStrokeWidth = this.pieStrokeWidth || "2px";
|
|
2900
|
-
this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
|
|
2901
|
-
this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
|
|
2902
|
-
this.pieOpacity = this.pieOpacity || "0.7";
|
|
2903
|
-
this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
|
|
2904
|
-
this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
|
|
2905
|
-
this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
|
|
2906
|
-
this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
|
|
2907
|
-
this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
|
|
2908
|
-
this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
|
|
2909
|
-
this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
|
|
2910
|
-
this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
|
|
2911
|
-
this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
|
|
2912
|
-
this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
|
|
2913
|
-
this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
|
|
2914
|
-
this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
|
|
2915
|
-
this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
|
|
2916
|
-
this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
|
|
2917
|
-
this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
|
|
2918
|
-
this.packet = {
|
|
2919
|
-
startByteColor: this.primaryTextColor,
|
|
2920
|
-
endByteColor: this.primaryTextColor,
|
|
2921
|
-
labelColor: this.primaryTextColor,
|
|
2922
|
-
titleColor: this.primaryTextColor,
|
|
2923
|
-
blockStrokeColor: this.primaryTextColor,
|
|
2924
|
-
blockFillColor: this.mainBkg
|
|
2925
|
-
};
|
|
2926
|
-
this.radar = {
|
|
2927
|
-
axisColor: this.radar?.axisColor || this.lineColor,
|
|
2928
|
-
axisStrokeWidth: this.radar?.axisStrokeWidth || 2,
|
|
2929
|
-
axisLabelFontSize: this.radar?.axisLabelFontSize || 12,
|
|
2930
|
-
curveOpacity: this.radar?.curveOpacity || 0.5,
|
|
2931
|
-
curveStrokeWidth: this.radar?.curveStrokeWidth || 2,
|
|
2932
|
-
graticuleColor: this.radar?.graticuleColor || "#DEDEDE",
|
|
2933
|
-
graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,
|
|
2934
|
-
graticuleOpacity: this.radar?.graticuleOpacity || 0.3,
|
|
2935
|
-
legendBoxSize: this.radar?.legendBoxSize || 12,
|
|
2936
|
-
legendFontSize: this.radar?.legendFontSize || 12
|
|
2937
|
-
};
|
|
2938
|
-
this.xyChart = {
|
|
2939
|
-
backgroundColor: this.xyChart?.backgroundColor || this.background,
|
|
2940
|
-
titleColor: this.xyChart?.titleColor || this.primaryTextColor,
|
|
2941
|
-
xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,
|
|
2942
|
-
xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,
|
|
2943
|
-
xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,
|
|
2944
|
-
xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,
|
|
2945
|
-
yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,
|
|
2946
|
-
yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,
|
|
2947
|
-
yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,
|
|
2948
|
-
yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,
|
|
2949
|
-
plotColorPalette: this.xyChart?.plotColorPalette || "#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"
|
|
2950
|
-
};
|
|
2951
|
-
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
|
2952
|
-
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
|
2953
|
-
this.requirementBorderSize = this.requirementBorderSize || "1";
|
|
2954
|
-
this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
|
|
2955
|
-
this.relationColor = this.relationColor || this.lineColor;
|
|
2956
|
-
this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;
|
|
2957
|
-
this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
|
|
2958
|
-
this.git0 = this.git0 || this.primaryColor;
|
|
2959
|
-
this.git1 = this.git1 || this.secondaryColor;
|
|
2960
|
-
this.git2 = this.git2 || this.tertiaryColor;
|
|
2961
|
-
this.git3 = this.git3 || adjust_default(this.primaryColor, { h: -30 });
|
|
2962
|
-
this.git4 = this.git4 || adjust_default(this.primaryColor, { h: -60 });
|
|
2963
|
-
this.git5 = this.git5 || adjust_default(this.primaryColor, { h: -90 });
|
|
2964
|
-
this.git6 = this.git6 || adjust_default(this.primaryColor, { h: 60 });
|
|
2965
|
-
this.git7 = this.git7 || adjust_default(this.primaryColor, { h: 120 });
|
|
2966
|
-
if (this.darkMode) {
|
|
2967
|
-
this.git0 = lighten_default(this.git0, 25);
|
|
2968
|
-
this.git1 = lighten_default(this.git1, 25);
|
|
2969
|
-
this.git2 = lighten_default(this.git2, 25);
|
|
2970
|
-
this.git3 = lighten_default(this.git3, 25);
|
|
2971
|
-
this.git4 = lighten_default(this.git4, 25);
|
|
2972
|
-
this.git5 = lighten_default(this.git5, 25);
|
|
2973
|
-
this.git6 = lighten_default(this.git6, 25);
|
|
2974
|
-
this.git7 = lighten_default(this.git7, 25);
|
|
2975
|
-
} else {
|
|
2976
|
-
this.git0 = darken_default(this.git0, 25);
|
|
2977
|
-
this.git1 = darken_default(this.git1, 25);
|
|
2978
|
-
this.git2 = darken_default(this.git2, 25);
|
|
2979
|
-
this.git3 = darken_default(this.git3, 25);
|
|
2980
|
-
this.git4 = darken_default(this.git4, 25);
|
|
2981
|
-
this.git5 = darken_default(this.git5, 25);
|
|
2982
|
-
this.git6 = darken_default(this.git6, 25);
|
|
2983
|
-
this.git7 = darken_default(this.git7, 25);
|
|
2984
|
-
}
|
|
2985
|
-
this.gitInv0 = this.gitInv0 || invert_default(this.git0);
|
|
2986
|
-
this.gitInv1 = this.gitInv1 || invert_default(this.git1);
|
|
2987
|
-
this.gitInv2 = this.gitInv2 || invert_default(this.git2);
|
|
2988
|
-
this.gitInv3 = this.gitInv3 || invert_default(this.git3);
|
|
2989
|
-
this.gitInv4 = this.gitInv4 || invert_default(this.git4);
|
|
2990
|
-
this.gitInv5 = this.gitInv5 || invert_default(this.git5);
|
|
2991
|
-
this.gitInv6 = this.gitInv6 || invert_default(this.git6);
|
|
2992
|
-
this.gitInv7 = this.gitInv7 || invert_default(this.git7);
|
|
2993
|
-
this.gitBranchLabel0 = this.gitBranchLabel0 || invert_default(this.labelTextColor);
|
|
2994
|
-
this.gitBranchLabel1 = this.gitBranchLabel1 || this.labelTextColor;
|
|
2995
|
-
this.gitBranchLabel2 = this.gitBranchLabel2 || this.labelTextColor;
|
|
2996
|
-
this.gitBranchLabel3 = this.gitBranchLabel3 || invert_default(this.labelTextColor);
|
|
2997
|
-
this.gitBranchLabel4 = this.gitBranchLabel4 || this.labelTextColor;
|
|
2998
|
-
this.gitBranchLabel5 = this.gitBranchLabel5 || this.labelTextColor;
|
|
2999
|
-
this.gitBranchLabel6 = this.gitBranchLabel6 || this.labelTextColor;
|
|
3000
|
-
this.gitBranchLabel7 = this.gitBranchLabel7 || this.labelTextColor;
|
|
3001
|
-
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
|
3002
|
-
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
|
3003
|
-
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
|
3004
|
-
this.tagLabelFontSize = this.tagLabelFontSize || "10px";
|
|
3005
|
-
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
|
3006
|
-
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
|
3007
|
-
this.commitLabelFontSize = this.commitLabelFontSize || "10px";
|
|
3008
|
-
this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;
|
|
3009
|
-
this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;
|
|
3010
|
-
}
|
|
3011
|
-
calculate(overrides) {
|
|
3012
|
-
if (typeof overrides !== "object") {
|
|
3013
|
-
this.updateColors();
|
|
3014
|
-
return;
|
|
3015
|
-
}
|
|
3016
|
-
const keys = Object.keys(overrides);
|
|
3017
|
-
keys.forEach((k) => {
|
|
3018
|
-
this[k] = overrides[k];
|
|
3019
|
-
});
|
|
3020
|
-
this.updateColors();
|
|
3021
|
-
keys.forEach((k) => {
|
|
3022
|
-
this[k] = overrides[k];
|
|
3023
|
-
});
|
|
3024
|
-
}
|
|
3025
|
-
};
|
|
3026
|
-
var getThemeVariables4 = /* @__PURE__ */ __name((userOverrides) => {
|
|
3027
|
-
const theme = new Theme4();
|
|
3028
|
-
theme.calculate(userOverrides);
|
|
3029
|
-
return theme;
|
|
3030
|
-
}, "getThemeVariables");
|
|
3031
|
-
var Theme5 = class {
|
|
3032
|
-
static {
|
|
3033
|
-
__name(this, "Theme");
|
|
3034
|
-
}
|
|
3035
|
-
constructor() {
|
|
3036
|
-
this.primaryColor = "#eee";
|
|
3037
|
-
this.contrast = "#707070";
|
|
3038
|
-
this.secondaryColor = lighten_default(this.contrast, 55);
|
|
3039
|
-
this.background = "#ffffff";
|
|
3040
|
-
this.tertiaryColor = adjust_default(this.primaryColor, { h: -160 });
|
|
3041
|
-
this.primaryBorderColor = mkBorder(this.primaryColor, this.darkMode);
|
|
3042
|
-
this.secondaryBorderColor = mkBorder(this.secondaryColor, this.darkMode);
|
|
3043
|
-
this.tertiaryBorderColor = mkBorder(this.tertiaryColor, this.darkMode);
|
|
3044
|
-
this.primaryTextColor = invert_default(this.primaryColor);
|
|
3045
|
-
this.secondaryTextColor = invert_default(this.secondaryColor);
|
|
3046
|
-
this.tertiaryTextColor = invert_default(this.tertiaryColor);
|
|
3047
|
-
this.lineColor = invert_default(this.background);
|
|
3048
|
-
this.textColor = invert_default(this.background);
|
|
3049
|
-
this.mainBkg = "#eee";
|
|
3050
|
-
this.secondBkg = "calculated";
|
|
3051
|
-
this.lineColor = "#666";
|
|
3052
|
-
this.border1 = "#999";
|
|
3053
|
-
this.border2 = "calculated";
|
|
3054
|
-
this.note = "#ffa";
|
|
3055
|
-
this.text = "#333";
|
|
3056
|
-
this.critical = "#d42";
|
|
3057
|
-
this.done = "#bbb";
|
|
3058
|
-
this.arrowheadColor = "#333333";
|
|
3059
|
-
this.fontFamily = '"trebuchet ms", verdana, arial, sans-serif';
|
|
3060
|
-
this.fontSize = "16px";
|
|
3061
|
-
this.THEME_COLOR_LIMIT = 12;
|
|
3062
|
-
this.nodeBkg = "calculated";
|
|
3063
|
-
this.nodeBorder = "calculated";
|
|
3064
|
-
this.clusterBkg = "calculated";
|
|
3065
|
-
this.clusterBorder = "calculated";
|
|
3066
|
-
this.defaultLinkColor = "calculated";
|
|
3067
|
-
this.titleColor = "calculated";
|
|
3068
|
-
this.edgeLabelBackground = "white";
|
|
3069
|
-
this.actorBorder = "calculated";
|
|
3070
|
-
this.actorBkg = "calculated";
|
|
3071
|
-
this.actorTextColor = "calculated";
|
|
3072
|
-
this.actorLineColor = this.actorBorder;
|
|
3073
|
-
this.signalColor = "calculated";
|
|
3074
|
-
this.signalTextColor = "calculated";
|
|
3075
|
-
this.labelBoxBkgColor = "calculated";
|
|
3076
|
-
this.labelBoxBorderColor = "calculated";
|
|
3077
|
-
this.labelTextColor = "calculated";
|
|
3078
|
-
this.loopTextColor = "calculated";
|
|
3079
|
-
this.noteBorderColor = "calculated";
|
|
3080
|
-
this.noteBkgColor = "calculated";
|
|
3081
|
-
this.noteTextColor = "calculated";
|
|
3082
|
-
this.activationBorderColor = "#666";
|
|
3083
|
-
this.activationBkgColor = "#f4f4f4";
|
|
3084
|
-
this.sequenceNumberColor = "white";
|
|
3085
|
-
this.sectionBkgColor = "calculated";
|
|
3086
|
-
this.altSectionBkgColor = "white";
|
|
3087
|
-
this.sectionBkgColor2 = "calculated";
|
|
3088
|
-
this.excludeBkgColor = "#eeeeee";
|
|
3089
|
-
this.taskBorderColor = "calculated";
|
|
3090
|
-
this.taskBkgColor = "calculated";
|
|
3091
|
-
this.taskTextLightColor = "white";
|
|
3092
|
-
this.taskTextColor = "calculated";
|
|
3093
|
-
this.taskTextDarkColor = "calculated";
|
|
3094
|
-
this.taskTextOutsideColor = "calculated";
|
|
3095
|
-
this.taskTextClickableColor = "#003163";
|
|
3096
|
-
this.activeTaskBorderColor = "calculated";
|
|
3097
|
-
this.activeTaskBkgColor = "calculated";
|
|
3098
|
-
this.gridColor = "calculated";
|
|
3099
|
-
this.doneTaskBkgColor = "calculated";
|
|
3100
|
-
this.doneTaskBorderColor = "calculated";
|
|
3101
|
-
this.critBkgColor = "calculated";
|
|
3102
|
-
this.critBorderColor = "calculated";
|
|
3103
|
-
this.todayLineColor = "calculated";
|
|
3104
|
-
this.vertLineColor = "calculated";
|
|
3105
|
-
this.personBorder = this.primaryBorderColor;
|
|
3106
|
-
this.personBkg = this.mainBkg;
|
|
3107
|
-
this.archEdgeColor = "calculated";
|
|
3108
|
-
this.archEdgeArrowColor = "calculated";
|
|
3109
|
-
this.archEdgeWidth = "3";
|
|
3110
|
-
this.archGroupBorderColor = this.primaryBorderColor;
|
|
3111
|
-
this.archGroupBorderWidth = "2px";
|
|
3112
|
-
this.rowOdd = this.rowOdd || lighten_default(this.mainBkg, 75) || "#ffffff";
|
|
3113
|
-
this.rowEven = this.rowEven || "#f4f4f4";
|
|
3114
|
-
this.labelColor = "black";
|
|
3115
|
-
this.errorBkgColor = "#552222";
|
|
3116
|
-
this.errorTextColor = "#552222";
|
|
3117
|
-
}
|
|
3118
|
-
updateColors() {
|
|
3119
|
-
this.secondBkg = lighten_default(this.contrast, 55);
|
|
3120
|
-
this.border2 = this.contrast;
|
|
3121
|
-
this.actorBorder = lighten_default(this.border1, 23);
|
|
3122
|
-
this.actorBkg = this.mainBkg;
|
|
3123
|
-
this.actorTextColor = this.text;
|
|
3124
|
-
this.actorLineColor = this.actorBorder;
|
|
3125
|
-
this.signalColor = this.text;
|
|
3126
|
-
this.signalTextColor = this.text;
|
|
3127
|
-
this.labelBoxBkgColor = this.actorBkg;
|
|
3128
|
-
this.labelBoxBorderColor = this.actorBorder;
|
|
3129
|
-
this.labelTextColor = this.text;
|
|
3130
|
-
this.loopTextColor = this.text;
|
|
3131
|
-
this.noteBorderColor = "#999";
|
|
3132
|
-
this.noteBkgColor = "#666";
|
|
3133
|
-
this.noteTextColor = "#fff";
|
|
3134
|
-
this.cScale0 = this.cScale0 || "#555";
|
|
3135
|
-
this.cScale1 = this.cScale1 || "#F4F4F4";
|
|
3136
|
-
this.cScale2 = this.cScale2 || "#555";
|
|
3137
|
-
this.cScale3 = this.cScale3 || "#BBB";
|
|
3138
|
-
this.cScale4 = this.cScale4 || "#777";
|
|
3139
|
-
this.cScale5 = this.cScale5 || "#999";
|
|
3140
|
-
this.cScale6 = this.cScale6 || "#DDD";
|
|
3141
|
-
this.cScale7 = this.cScale7 || "#FFF";
|
|
3142
|
-
this.cScale8 = this.cScale8 || "#DDD";
|
|
3143
|
-
this.cScale9 = this.cScale9 || "#BBB";
|
|
3144
|
-
this.cScale10 = this.cScale10 || "#999";
|
|
3145
|
-
this.cScale11 = this.cScale11 || "#777";
|
|
3146
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
3147
|
-
this["cScaleInv" + i] = this["cScaleInv" + i] || invert_default(this["cScale" + i]);
|
|
3148
|
-
}
|
|
3149
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
3150
|
-
if (this.darkMode) {
|
|
3151
|
-
this["cScalePeer" + i] = this["cScalePeer" + i] || lighten_default(this["cScale" + i], 10);
|
|
3152
|
-
} else {
|
|
3153
|
-
this["cScalePeer" + i] = this["cScalePeer" + i] || darken_default(this["cScale" + i], 10);
|
|
3154
|
-
}
|
|
3155
|
-
}
|
|
3156
|
-
this.scaleLabelColor = this.scaleLabelColor || (this.darkMode ? "black" : this.labelTextColor);
|
|
3157
|
-
this.cScaleLabel0 = this.cScaleLabel0 || this.cScale1;
|
|
3158
|
-
this.cScaleLabel2 = this.cScaleLabel2 || this.cScale1;
|
|
3159
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
3160
|
-
this["cScaleLabel" + i] = this["cScaleLabel" + i] || this.scaleLabelColor;
|
|
3161
|
-
}
|
|
3162
|
-
for (let i = 0; i < 5; i++) {
|
|
3163
|
-
this["surface" + i] = this["surface" + i] || adjust_default(this.mainBkg, { l: -(5 + i * 5) });
|
|
3164
|
-
this["surfacePeer" + i] = this["surfacePeer" + i] || adjust_default(this.mainBkg, { l: -(8 + i * 5) });
|
|
3165
|
-
}
|
|
3166
|
-
this.nodeBkg = this.mainBkg;
|
|
3167
|
-
this.nodeBorder = this.border1;
|
|
3168
|
-
this.clusterBkg = this.secondBkg;
|
|
3169
|
-
this.clusterBorder = this.border2;
|
|
3170
|
-
this.defaultLinkColor = this.lineColor;
|
|
3171
|
-
this.titleColor = this.text;
|
|
3172
|
-
this.sectionBkgColor = lighten_default(this.contrast, 30);
|
|
3173
|
-
this.sectionBkgColor2 = lighten_default(this.contrast, 30);
|
|
3174
|
-
this.taskBorderColor = darken_default(this.contrast, 10);
|
|
3175
|
-
this.taskBkgColor = this.contrast;
|
|
3176
|
-
this.taskTextColor = this.taskTextLightColor;
|
|
3177
|
-
this.taskTextDarkColor = this.text;
|
|
3178
|
-
this.taskTextOutsideColor = this.taskTextDarkColor;
|
|
3179
|
-
this.activeTaskBorderColor = this.taskBorderColor;
|
|
3180
|
-
this.activeTaskBkgColor = this.mainBkg;
|
|
3181
|
-
this.gridColor = lighten_default(this.border1, 30);
|
|
3182
|
-
this.doneTaskBkgColor = this.done;
|
|
3183
|
-
this.doneTaskBorderColor = this.lineColor;
|
|
3184
|
-
this.critBkgColor = this.critical;
|
|
3185
|
-
this.critBorderColor = darken_default(this.critBkgColor, 10);
|
|
3186
|
-
this.todayLineColor = this.critBkgColor;
|
|
3187
|
-
this.vertLineColor = this.critBkgColor;
|
|
3188
|
-
this.archEdgeColor = this.lineColor;
|
|
3189
|
-
this.archEdgeArrowColor = this.lineColor;
|
|
3190
|
-
this.transitionColor = this.transitionColor || "#000";
|
|
3191
|
-
this.transitionLabelColor = this.transitionLabelColor || this.textColor;
|
|
3192
|
-
this.stateLabelColor = this.stateLabelColor || this.stateBkg || this.primaryTextColor;
|
|
3193
|
-
this.stateBkg = this.stateBkg || this.mainBkg;
|
|
3194
|
-
this.labelBackgroundColor = this.labelBackgroundColor || this.stateBkg;
|
|
3195
|
-
this.compositeBackground = this.compositeBackground || this.background || this.tertiaryColor;
|
|
3196
|
-
this.altBackground = this.altBackground || "#f4f4f4";
|
|
3197
|
-
this.compositeTitleBackground = this.compositeTitleBackground || this.mainBkg;
|
|
3198
|
-
this.stateBorder = this.stateBorder || "#000";
|
|
3199
|
-
this.innerEndBackground = this.primaryBorderColor;
|
|
3200
|
-
this.specialStateColor = "#222";
|
|
3201
|
-
this.errorBkgColor = this.errorBkgColor || this.tertiaryColor;
|
|
3202
|
-
this.errorTextColor = this.errorTextColor || this.tertiaryTextColor;
|
|
3203
|
-
this.classText = this.primaryTextColor;
|
|
3204
|
-
this.fillType0 = this.primaryColor;
|
|
3205
|
-
this.fillType1 = this.secondaryColor;
|
|
3206
|
-
this.fillType2 = adjust_default(this.primaryColor, { h: 64 });
|
|
3207
|
-
this.fillType3 = adjust_default(this.secondaryColor, { h: 64 });
|
|
3208
|
-
this.fillType4 = adjust_default(this.primaryColor, { h: -64 });
|
|
3209
|
-
this.fillType5 = adjust_default(this.secondaryColor, { h: -64 });
|
|
3210
|
-
this.fillType6 = adjust_default(this.primaryColor, { h: 128 });
|
|
3211
|
-
this.fillType7 = adjust_default(this.secondaryColor, { h: 128 });
|
|
3212
|
-
for (let i = 0; i < this.THEME_COLOR_LIMIT; i++) {
|
|
3213
|
-
this["pie" + i] = this["cScale" + i];
|
|
3214
|
-
}
|
|
3215
|
-
this.pie12 = this.pie0;
|
|
3216
|
-
this.pieTitleTextSize = this.pieTitleTextSize || "25px";
|
|
3217
|
-
this.pieTitleTextColor = this.pieTitleTextColor || this.taskTextDarkColor;
|
|
3218
|
-
this.pieSectionTextSize = this.pieSectionTextSize || "17px";
|
|
3219
|
-
this.pieSectionTextColor = this.pieSectionTextColor || this.textColor;
|
|
3220
|
-
this.pieLegendTextSize = this.pieLegendTextSize || "17px";
|
|
3221
|
-
this.pieLegendTextColor = this.pieLegendTextColor || this.taskTextDarkColor;
|
|
3222
|
-
this.pieStrokeColor = this.pieStrokeColor || "black";
|
|
3223
|
-
this.pieStrokeWidth = this.pieStrokeWidth || "2px";
|
|
3224
|
-
this.pieOuterStrokeWidth = this.pieOuterStrokeWidth || "2px";
|
|
3225
|
-
this.pieOuterStrokeColor = this.pieOuterStrokeColor || "black";
|
|
3226
|
-
this.pieOpacity = this.pieOpacity || "0.7";
|
|
3227
|
-
this.quadrant1Fill = this.quadrant1Fill || this.primaryColor;
|
|
3228
|
-
this.quadrant2Fill = this.quadrant2Fill || adjust_default(this.primaryColor, { r: 5, g: 5, b: 5 });
|
|
3229
|
-
this.quadrant3Fill = this.quadrant3Fill || adjust_default(this.primaryColor, { r: 10, g: 10, b: 10 });
|
|
3230
|
-
this.quadrant4Fill = this.quadrant4Fill || adjust_default(this.primaryColor, { r: 15, g: 15, b: 15 });
|
|
3231
|
-
this.quadrant1TextFill = this.quadrant1TextFill || this.primaryTextColor;
|
|
3232
|
-
this.quadrant2TextFill = this.quadrant2TextFill || adjust_default(this.primaryTextColor, { r: -5, g: -5, b: -5 });
|
|
3233
|
-
this.quadrant3TextFill = this.quadrant3TextFill || adjust_default(this.primaryTextColor, { r: -10, g: -10, b: -10 });
|
|
3234
|
-
this.quadrant4TextFill = this.quadrant4TextFill || adjust_default(this.primaryTextColor, { r: -15, g: -15, b: -15 });
|
|
3235
|
-
this.quadrantPointFill = this.quadrantPointFill || is_dark_default(this.quadrant1Fill) ? lighten_default(this.quadrant1Fill) : darken_default(this.quadrant1Fill);
|
|
3236
|
-
this.quadrantPointTextFill = this.quadrantPointTextFill || this.primaryTextColor;
|
|
3237
|
-
this.quadrantXAxisTextFill = this.quadrantXAxisTextFill || this.primaryTextColor;
|
|
3238
|
-
this.quadrantYAxisTextFill = this.quadrantYAxisTextFill || this.primaryTextColor;
|
|
3239
|
-
this.quadrantInternalBorderStrokeFill = this.quadrantInternalBorderStrokeFill || this.primaryBorderColor;
|
|
3240
|
-
this.quadrantExternalBorderStrokeFill = this.quadrantExternalBorderStrokeFill || this.primaryBorderColor;
|
|
3241
|
-
this.quadrantTitleFill = this.quadrantTitleFill || this.primaryTextColor;
|
|
3242
|
-
this.xyChart = {
|
|
3243
|
-
backgroundColor: this.xyChart?.backgroundColor || this.background,
|
|
3244
|
-
titleColor: this.xyChart?.titleColor || this.primaryTextColor,
|
|
3245
|
-
xAxisTitleColor: this.xyChart?.xAxisTitleColor || this.primaryTextColor,
|
|
3246
|
-
xAxisLabelColor: this.xyChart?.xAxisLabelColor || this.primaryTextColor,
|
|
3247
|
-
xAxisTickColor: this.xyChart?.xAxisTickColor || this.primaryTextColor,
|
|
3248
|
-
xAxisLineColor: this.xyChart?.xAxisLineColor || this.primaryTextColor,
|
|
3249
|
-
yAxisTitleColor: this.xyChart?.yAxisTitleColor || this.primaryTextColor,
|
|
3250
|
-
yAxisLabelColor: this.xyChart?.yAxisLabelColor || this.primaryTextColor,
|
|
3251
|
-
yAxisTickColor: this.xyChart?.yAxisTickColor || this.primaryTextColor,
|
|
3252
|
-
yAxisLineColor: this.xyChart?.yAxisLineColor || this.primaryTextColor,
|
|
3253
|
-
plotColorPalette: this.xyChart?.plotColorPalette || "#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"
|
|
3254
|
-
};
|
|
3255
|
-
this.radar = {
|
|
3256
|
-
axisColor: this.radar?.axisColor || this.lineColor,
|
|
3257
|
-
axisStrokeWidth: this.radar?.axisStrokeWidth || 2,
|
|
3258
|
-
axisLabelFontSize: this.radar?.axisLabelFontSize || 12,
|
|
3259
|
-
curveOpacity: this.radar?.curveOpacity || 0.5,
|
|
3260
|
-
curveStrokeWidth: this.radar?.curveStrokeWidth || 2,
|
|
3261
|
-
graticuleColor: this.radar?.graticuleColor || "#DEDEDE",
|
|
3262
|
-
graticuleStrokeWidth: this.radar?.graticuleStrokeWidth || 1,
|
|
3263
|
-
graticuleOpacity: this.radar?.graticuleOpacity || 0.3,
|
|
3264
|
-
legendBoxSize: this.radar?.legendBoxSize || 12,
|
|
3265
|
-
legendFontSize: this.radar?.legendFontSize || 12
|
|
3266
|
-
};
|
|
3267
|
-
this.requirementBackground = this.requirementBackground || this.primaryColor;
|
|
3268
|
-
this.requirementBorderColor = this.requirementBorderColor || this.primaryBorderColor;
|
|
3269
|
-
this.requirementBorderSize = this.requirementBorderSize || "1";
|
|
3270
|
-
this.requirementTextColor = this.requirementTextColor || this.primaryTextColor;
|
|
3271
|
-
this.relationColor = this.relationColor || this.lineColor;
|
|
3272
|
-
this.relationLabelBackground = this.relationLabelBackground || this.edgeLabelBackground;
|
|
3273
|
-
this.relationLabelColor = this.relationLabelColor || this.actorTextColor;
|
|
3274
|
-
this.git0 = darken_default(this.pie1, 25) || this.primaryColor;
|
|
3275
|
-
this.git1 = this.pie2 || this.secondaryColor;
|
|
3276
|
-
this.git2 = this.pie3 || this.tertiaryColor;
|
|
3277
|
-
this.git3 = this.pie4 || adjust_default(this.primaryColor, { h: -30 });
|
|
3278
|
-
this.git4 = this.pie5 || adjust_default(this.primaryColor, { h: -60 });
|
|
3279
|
-
this.git5 = this.pie6 || adjust_default(this.primaryColor, { h: -90 });
|
|
3280
|
-
this.git6 = this.pie7 || adjust_default(this.primaryColor, { h: 60 });
|
|
3281
|
-
this.git7 = this.pie8 || adjust_default(this.primaryColor, { h: 120 });
|
|
3282
|
-
this.gitInv0 = this.gitInv0 || invert_default(this.git0);
|
|
3283
|
-
this.gitInv1 = this.gitInv1 || invert_default(this.git1);
|
|
3284
|
-
this.gitInv2 = this.gitInv2 || invert_default(this.git2);
|
|
3285
|
-
this.gitInv3 = this.gitInv3 || invert_default(this.git3);
|
|
3286
|
-
this.gitInv4 = this.gitInv4 || invert_default(this.git4);
|
|
3287
|
-
this.gitInv5 = this.gitInv5 || invert_default(this.git5);
|
|
3288
|
-
this.gitInv6 = this.gitInv6 || invert_default(this.git6);
|
|
3289
|
-
this.gitInv7 = this.gitInv7 || invert_default(this.git7);
|
|
3290
|
-
this.branchLabelColor = this.branchLabelColor || this.labelTextColor;
|
|
3291
|
-
this.gitBranchLabel0 = this.branchLabelColor;
|
|
3292
|
-
this.gitBranchLabel1 = "white";
|
|
3293
|
-
this.gitBranchLabel2 = this.branchLabelColor;
|
|
3294
|
-
this.gitBranchLabel3 = "white";
|
|
3295
|
-
this.gitBranchLabel4 = this.branchLabelColor;
|
|
3296
|
-
this.gitBranchLabel5 = this.branchLabelColor;
|
|
3297
|
-
this.gitBranchLabel6 = this.branchLabelColor;
|
|
3298
|
-
this.gitBranchLabel7 = this.branchLabelColor;
|
|
3299
|
-
this.tagLabelColor = this.tagLabelColor || this.primaryTextColor;
|
|
3300
|
-
this.tagLabelBackground = this.tagLabelBackground || this.primaryColor;
|
|
3301
|
-
this.tagLabelBorder = this.tagBorder || this.primaryBorderColor;
|
|
3302
|
-
this.tagLabelFontSize = this.tagLabelFontSize || "10px";
|
|
3303
|
-
this.commitLabelColor = this.commitLabelColor || this.secondaryTextColor;
|
|
3304
|
-
this.commitLabelBackground = this.commitLabelBackground || this.secondaryColor;
|
|
3305
|
-
this.commitLabelFontSize = this.commitLabelFontSize || "10px";
|
|
3306
|
-
this.attributeBackgroundColorOdd = this.attributeBackgroundColorOdd || oldAttributeBackgroundColorOdd;
|
|
3307
|
-
this.attributeBackgroundColorEven = this.attributeBackgroundColorEven || oldAttributeBackgroundColorEven;
|
|
3308
|
-
}
|
|
3309
|
-
calculate(overrides) {
|
|
3310
|
-
if (typeof overrides !== "object") {
|
|
3311
|
-
this.updateColors();
|
|
3312
|
-
return;
|
|
3313
|
-
}
|
|
3314
|
-
const keys = Object.keys(overrides);
|
|
3315
|
-
keys.forEach((k) => {
|
|
3316
|
-
this[k] = overrides[k];
|
|
3317
|
-
});
|
|
3318
|
-
this.updateColors();
|
|
3319
|
-
keys.forEach((k) => {
|
|
3320
|
-
this[k] = overrides[k];
|
|
3321
|
-
});
|
|
3322
|
-
}
|
|
3323
|
-
};
|
|
3324
|
-
var getThemeVariables5 = /* @__PURE__ */ __name((userOverrides) => {
|
|
3325
|
-
const theme = new Theme5();
|
|
3326
|
-
theme.calculate(userOverrides);
|
|
3327
|
-
return theme;
|
|
3328
|
-
}, "getThemeVariables");
|
|
3329
|
-
var themes_default = {
|
|
3330
|
-
base: {
|
|
3331
|
-
getThemeVariables
|
|
3332
|
-
},
|
|
3333
|
-
dark: {
|
|
3334
|
-
getThemeVariables: getThemeVariables2
|
|
3335
|
-
},
|
|
3336
|
-
default: {
|
|
3337
|
-
getThemeVariables: getThemeVariables3
|
|
3338
|
-
},
|
|
3339
|
-
forest: {
|
|
3340
|
-
getThemeVariables: getThemeVariables4
|
|
3341
|
-
},
|
|
3342
|
-
neutral: {
|
|
3343
|
-
getThemeVariables: getThemeVariables5
|
|
3344
|
-
}
|
|
3345
|
-
};
|
|
3346
|
-
var config_schema_default = {
|
|
3347
|
-
"flowchart": {
|
|
3348
|
-
"useMaxWidth": true,
|
|
3349
|
-
"titleTopMargin": 25,
|
|
3350
|
-
"subGraphTitleMargin": {
|
|
3351
|
-
"top": 0,
|
|
3352
|
-
"bottom": 0
|
|
3353
|
-
},
|
|
3354
|
-
"diagramPadding": 8,
|
|
3355
|
-
"htmlLabels": true,
|
|
3356
|
-
"nodeSpacing": 50,
|
|
3357
|
-
"rankSpacing": 50,
|
|
3358
|
-
"curve": "basis",
|
|
3359
|
-
"padding": 15,
|
|
3360
|
-
"defaultRenderer": "dagre-wrapper",
|
|
3361
|
-
"wrappingWidth": 200,
|
|
3362
|
-
"inheritDir": false
|
|
3363
|
-
},
|
|
3364
|
-
"sequence": {
|
|
3365
|
-
"useMaxWidth": true,
|
|
3366
|
-
"hideUnusedParticipants": false,
|
|
3367
|
-
"activationWidth": 10,
|
|
3368
|
-
"diagramMarginX": 50,
|
|
3369
|
-
"diagramMarginY": 10,
|
|
3370
|
-
"actorMargin": 50,
|
|
3371
|
-
"width": 150,
|
|
3372
|
-
"height": 65,
|
|
3373
|
-
"boxMargin": 10,
|
|
3374
|
-
"boxTextMargin": 5,
|
|
3375
|
-
"noteMargin": 10,
|
|
3376
|
-
"messageMargin": 35,
|
|
3377
|
-
"messageAlign": "center",
|
|
3378
|
-
"mirrorActors": true,
|
|
3379
|
-
"forceMenus": false,
|
|
3380
|
-
"bottomMarginAdj": 1,
|
|
3381
|
-
"rightAngles": false,
|
|
3382
|
-
"showSequenceNumbers": false,
|
|
3383
|
-
"actorFontSize": 14,
|
|
3384
|
-
"actorFontFamily": '"Open Sans", sans-serif',
|
|
3385
|
-
"actorFontWeight": 400,
|
|
3386
|
-
"noteFontSize": 14,
|
|
3387
|
-
"noteFontFamily": '"trebuchet ms", verdana, arial, sans-serif',
|
|
3388
|
-
"noteFontWeight": 400,
|
|
3389
|
-
"noteAlign": "center",
|
|
3390
|
-
"messageFontSize": 16,
|
|
3391
|
-
"messageFontFamily": '"trebuchet ms", verdana, arial, sans-serif',
|
|
3392
|
-
"messageFontWeight": 400,
|
|
3393
|
-
"wrap": false,
|
|
3394
|
-
"wrapPadding": 10,
|
|
3395
|
-
"labelBoxWidth": 50,
|
|
3396
|
-
"labelBoxHeight": 20
|
|
3397
|
-
},
|
|
3398
|
-
"gantt": {
|
|
3399
|
-
"useMaxWidth": true,
|
|
3400
|
-
"titleTopMargin": 25,
|
|
3401
|
-
"barHeight": 20,
|
|
3402
|
-
"barGap": 4,
|
|
3403
|
-
"topPadding": 50,
|
|
3404
|
-
"rightPadding": 75,
|
|
3405
|
-
"leftPadding": 75,
|
|
3406
|
-
"gridLineStartPadding": 35,
|
|
3407
|
-
"fontSize": 11,
|
|
3408
|
-
"sectionFontSize": 11,
|
|
3409
|
-
"numberSectionStyles": 4,
|
|
3410
|
-
"axisFormat": "%Y-%m-%d",
|
|
3411
|
-
"topAxis": false,
|
|
3412
|
-
"displayMode": "",
|
|
3413
|
-
"weekday": "sunday"
|
|
3414
|
-
},
|
|
3415
|
-
"journey": {
|
|
3416
|
-
"useMaxWidth": true,
|
|
3417
|
-
"diagramMarginX": 50,
|
|
3418
|
-
"diagramMarginY": 10,
|
|
3419
|
-
"leftMargin": 150,
|
|
3420
|
-
"maxLabelWidth": 360,
|
|
3421
|
-
"width": 150,
|
|
3422
|
-
"height": 50,
|
|
3423
|
-
"boxMargin": 10,
|
|
3424
|
-
"boxTextMargin": 5,
|
|
3425
|
-
"noteMargin": 10,
|
|
3426
|
-
"messageMargin": 35,
|
|
3427
|
-
"messageAlign": "center",
|
|
3428
|
-
"bottomMarginAdj": 1,
|
|
3429
|
-
"rightAngles": false,
|
|
3430
|
-
"taskFontSize": 14,
|
|
3431
|
-
"taskFontFamily": '"Open Sans", sans-serif',
|
|
3432
|
-
"taskMargin": 50,
|
|
3433
|
-
"activationWidth": 10,
|
|
3434
|
-
"textPlacement": "fo",
|
|
3435
|
-
"actorColours": [
|
|
3436
|
-
"#8FBC8F",
|
|
3437
|
-
"#7CFC00",
|
|
3438
|
-
"#00FFFF",
|
|
3439
|
-
"#20B2AA",
|
|
3440
|
-
"#B0E0E6",
|
|
3441
|
-
"#FFFFE0"
|
|
3442
|
-
],
|
|
3443
|
-
"sectionFills": [
|
|
3444
|
-
"#191970",
|
|
3445
|
-
"#8B008B",
|
|
3446
|
-
"#4B0082",
|
|
3447
|
-
"#2F4F4F",
|
|
3448
|
-
"#800000",
|
|
3449
|
-
"#8B4513",
|
|
3450
|
-
"#00008B"
|
|
3451
|
-
],
|
|
3452
|
-
"sectionColours": [
|
|
3453
|
-
"#fff"
|
|
3454
|
-
],
|
|
3455
|
-
"titleColor": "",
|
|
3456
|
-
"titleFontFamily": '"trebuchet ms", verdana, arial, sans-serif',
|
|
3457
|
-
"titleFontSize": "4ex"
|
|
3458
|
-
},
|
|
3459
|
-
"class": {
|
|
3460
|
-
"useMaxWidth": true,
|
|
3461
|
-
"titleTopMargin": 25,
|
|
3462
|
-
"arrowMarkerAbsolute": false,
|
|
3463
|
-
"dividerMargin": 10,
|
|
3464
|
-
"padding": 5,
|
|
3465
|
-
"textHeight": 10,
|
|
3466
|
-
"defaultRenderer": "dagre-wrapper",
|
|
3467
|
-
"htmlLabels": false,
|
|
3468
|
-
"hideEmptyMembersBox": false
|
|
3469
|
-
},
|
|
3470
|
-
"state": {
|
|
3471
|
-
"useMaxWidth": true,
|
|
3472
|
-
"titleTopMargin": 25,
|
|
3473
|
-
"dividerMargin": 10,
|
|
3474
|
-
"sizeUnit": 5,
|
|
3475
|
-
"padding": 8,
|
|
3476
|
-
"textHeight": 10,
|
|
3477
|
-
"titleShift": -15,
|
|
3478
|
-
"noteMargin": 10,
|
|
3479
|
-
"forkWidth": 70,
|
|
3480
|
-
"forkHeight": 7,
|
|
3481
|
-
"miniPadding": 2,
|
|
3482
|
-
"fontSizeFactor": 5.02,
|
|
3483
|
-
"fontSize": 24,
|
|
3484
|
-
"labelHeight": 16,
|
|
3485
|
-
"edgeLengthFactor": "20",
|
|
3486
|
-
"compositTitleSize": 35,
|
|
3487
|
-
"radius": 5,
|
|
3488
|
-
"defaultRenderer": "dagre-wrapper"
|
|
3489
|
-
},
|
|
3490
|
-
"er": {
|
|
3491
|
-
"useMaxWidth": true,
|
|
3492
|
-
"titleTopMargin": 25,
|
|
3493
|
-
"diagramPadding": 20,
|
|
3494
|
-
"layoutDirection": "TB",
|
|
3495
|
-
"minEntityWidth": 100,
|
|
3496
|
-
"minEntityHeight": 75,
|
|
3497
|
-
"entityPadding": 15,
|
|
3498
|
-
"nodeSpacing": 140,
|
|
3499
|
-
"rankSpacing": 80,
|
|
3500
|
-
"stroke": "gray",
|
|
3501
|
-
"fill": "honeydew",
|
|
3502
|
-
"fontSize": 12
|
|
3503
|
-
},
|
|
3504
|
-
"pie": {
|
|
3505
|
-
"useMaxWidth": true,
|
|
3506
|
-
"textPosition": 0.75
|
|
3507
|
-
},
|
|
3508
|
-
"quadrantChart": {
|
|
3509
|
-
"useMaxWidth": true,
|
|
3510
|
-
"chartWidth": 500,
|
|
3511
|
-
"chartHeight": 500,
|
|
3512
|
-
"titleFontSize": 20,
|
|
3513
|
-
"titlePadding": 10,
|
|
3514
|
-
"quadrantPadding": 5,
|
|
3515
|
-
"xAxisLabelPadding": 5,
|
|
3516
|
-
"yAxisLabelPadding": 5,
|
|
3517
|
-
"xAxisLabelFontSize": 16,
|
|
3518
|
-
"yAxisLabelFontSize": 16,
|
|
3519
|
-
"quadrantLabelFontSize": 16,
|
|
3520
|
-
"quadrantTextTopPadding": 5,
|
|
3521
|
-
"pointTextPadding": 5,
|
|
3522
|
-
"pointLabelFontSize": 12,
|
|
3523
|
-
"pointRadius": 5,
|
|
3524
|
-
"xAxisPosition": "top",
|
|
3525
|
-
"yAxisPosition": "left",
|
|
3526
|
-
"quadrantInternalBorderStrokeWidth": 1,
|
|
3527
|
-
"quadrantExternalBorderStrokeWidth": 2
|
|
3528
|
-
},
|
|
3529
|
-
"xyChart": {
|
|
3530
|
-
"useMaxWidth": true,
|
|
3531
|
-
"width": 700,
|
|
3532
|
-
"height": 500,
|
|
3533
|
-
"titleFontSize": 20,
|
|
3534
|
-
"titlePadding": 10,
|
|
3535
|
-
"showDataLabel": false,
|
|
3536
|
-
"showTitle": true,
|
|
3537
|
-
"xAxis": {
|
|
3538
|
-
"$ref": "#/$defs/XYChartAxisConfig",
|
|
3539
|
-
"showLabel": true,
|
|
3540
|
-
"labelFontSize": 14,
|
|
3541
|
-
"labelPadding": 5,
|
|
3542
|
-
"showTitle": true,
|
|
3543
|
-
"titleFontSize": 16,
|
|
3544
|
-
"titlePadding": 5,
|
|
3545
|
-
"showTick": true,
|
|
3546
|
-
"tickLength": 5,
|
|
3547
|
-
"tickWidth": 2,
|
|
3548
|
-
"showAxisLine": true,
|
|
3549
|
-
"axisLineWidth": 2
|
|
3550
|
-
},
|
|
3551
|
-
"yAxis": {
|
|
3552
|
-
"$ref": "#/$defs/XYChartAxisConfig",
|
|
3553
|
-
"showLabel": true,
|
|
3554
|
-
"labelFontSize": 14,
|
|
3555
|
-
"labelPadding": 5,
|
|
3556
|
-
"showTitle": true,
|
|
3557
|
-
"titleFontSize": 16,
|
|
3558
|
-
"titlePadding": 5,
|
|
3559
|
-
"showTick": true,
|
|
3560
|
-
"tickLength": 5,
|
|
3561
|
-
"tickWidth": 2,
|
|
3562
|
-
"showAxisLine": true,
|
|
3563
|
-
"axisLineWidth": 2
|
|
3564
|
-
},
|
|
3565
|
-
"chartOrientation": "vertical",
|
|
3566
|
-
"plotReservedSpacePercent": 50
|
|
3567
|
-
},
|
|
3568
|
-
"requirement": {
|
|
3569
|
-
"useMaxWidth": true,
|
|
3570
|
-
"rect_fill": "#f9f9f9",
|
|
3571
|
-
"text_color": "#333",
|
|
3572
|
-
"rect_border_size": "0.5px",
|
|
3573
|
-
"rect_border_color": "#bbb",
|
|
3574
|
-
"rect_min_width": 200,
|
|
3575
|
-
"rect_min_height": 200,
|
|
3576
|
-
"fontSize": 14,
|
|
3577
|
-
"rect_padding": 10,
|
|
3578
|
-
"line_height": 20
|
|
3579
|
-
},
|
|
3580
|
-
"mindmap": {
|
|
3581
|
-
"useMaxWidth": true,
|
|
3582
|
-
"padding": 10,
|
|
3583
|
-
"maxNodeWidth": 200,
|
|
3584
|
-
"layoutAlgorithm": "cose-bilkent"
|
|
3585
|
-
},
|
|
3586
|
-
"kanban": {
|
|
3587
|
-
"useMaxWidth": true,
|
|
3588
|
-
"padding": 8,
|
|
3589
|
-
"sectionWidth": 200,
|
|
3590
|
-
"ticketBaseUrl": ""
|
|
3591
|
-
},
|
|
3592
|
-
"timeline": {
|
|
3593
|
-
"useMaxWidth": true,
|
|
3594
|
-
"diagramMarginX": 50,
|
|
3595
|
-
"diagramMarginY": 10,
|
|
3596
|
-
"leftMargin": 150,
|
|
3597
|
-
"width": 150,
|
|
3598
|
-
"height": 50,
|
|
3599
|
-
"boxMargin": 10,
|
|
3600
|
-
"boxTextMargin": 5,
|
|
3601
|
-
"noteMargin": 10,
|
|
3602
|
-
"messageMargin": 35,
|
|
3603
|
-
"messageAlign": "center",
|
|
3604
|
-
"bottomMarginAdj": 1,
|
|
3605
|
-
"rightAngles": false,
|
|
3606
|
-
"taskFontSize": 14,
|
|
3607
|
-
"taskFontFamily": '"Open Sans", sans-serif',
|
|
3608
|
-
"taskMargin": 50,
|
|
3609
|
-
"activationWidth": 10,
|
|
3610
|
-
"textPlacement": "fo",
|
|
3611
|
-
"actorColours": [
|
|
3612
|
-
"#8FBC8F",
|
|
3613
|
-
"#7CFC00",
|
|
3614
|
-
"#00FFFF",
|
|
3615
|
-
"#20B2AA",
|
|
3616
|
-
"#B0E0E6",
|
|
3617
|
-
"#FFFFE0"
|
|
3618
|
-
],
|
|
3619
|
-
"sectionFills": [
|
|
3620
|
-
"#191970",
|
|
3621
|
-
"#8B008B",
|
|
3622
|
-
"#4B0082",
|
|
3623
|
-
"#2F4F4F",
|
|
3624
|
-
"#800000",
|
|
3625
|
-
"#8B4513",
|
|
3626
|
-
"#00008B"
|
|
3627
|
-
],
|
|
3628
|
-
"sectionColours": [
|
|
3629
|
-
"#fff"
|
|
3630
|
-
],
|
|
3631
|
-
"disableMulticolor": false
|
|
3632
|
-
},
|
|
3633
|
-
"gitGraph": {
|
|
3634
|
-
"useMaxWidth": true,
|
|
3635
|
-
"titleTopMargin": 25,
|
|
3636
|
-
"diagramPadding": 8,
|
|
3637
|
-
"nodeLabel": {
|
|
3638
|
-
"width": 75,
|
|
3639
|
-
"height": 100,
|
|
3640
|
-
"x": -25,
|
|
3641
|
-
"y": 0
|
|
3642
|
-
},
|
|
3643
|
-
"mainBranchName": "main",
|
|
3644
|
-
"mainBranchOrder": 0,
|
|
3645
|
-
"showCommitLabel": true,
|
|
3646
|
-
"showBranches": true,
|
|
3647
|
-
"rotateCommitLabel": true,
|
|
3648
|
-
"parallelCommits": false,
|
|
3649
|
-
"arrowMarkerAbsolute": false
|
|
3650
|
-
},
|
|
3651
|
-
"c4": {
|
|
3652
|
-
"useMaxWidth": true,
|
|
3653
|
-
"diagramMarginX": 50,
|
|
3654
|
-
"diagramMarginY": 10,
|
|
3655
|
-
"c4ShapeMargin": 50,
|
|
3656
|
-
"c4ShapePadding": 20,
|
|
3657
|
-
"width": 216,
|
|
3658
|
-
"height": 60,
|
|
3659
|
-
"boxMargin": 10,
|
|
3660
|
-
"c4ShapeInRow": 4,
|
|
3661
|
-
"nextLinePaddingX": 0,
|
|
3662
|
-
"c4BoundaryInRow": 2,
|
|
3663
|
-
"personFontSize": 14,
|
|
3664
|
-
"personFontFamily": '"Open Sans", sans-serif',
|
|
3665
|
-
"personFontWeight": "normal",
|
|
3666
|
-
"external_personFontSize": 14,
|
|
3667
|
-
"external_personFontFamily": '"Open Sans", sans-serif',
|
|
3668
|
-
"external_personFontWeight": "normal",
|
|
3669
|
-
"systemFontSize": 14,
|
|
3670
|
-
"systemFontFamily": '"Open Sans", sans-serif',
|
|
3671
|
-
"systemFontWeight": "normal",
|
|
3672
|
-
"external_systemFontSize": 14,
|
|
3673
|
-
"external_systemFontFamily": '"Open Sans", sans-serif',
|
|
3674
|
-
"external_systemFontWeight": "normal",
|
|
3675
|
-
"system_dbFontSize": 14,
|
|
3676
|
-
"system_dbFontFamily": '"Open Sans", sans-serif',
|
|
3677
|
-
"system_dbFontWeight": "normal",
|
|
3678
|
-
"external_system_dbFontSize": 14,
|
|
3679
|
-
"external_system_dbFontFamily": '"Open Sans", sans-serif',
|
|
3680
|
-
"external_system_dbFontWeight": "normal",
|
|
3681
|
-
"system_queueFontSize": 14,
|
|
3682
|
-
"system_queueFontFamily": '"Open Sans", sans-serif',
|
|
3683
|
-
"system_queueFontWeight": "normal",
|
|
3684
|
-
"external_system_queueFontSize": 14,
|
|
3685
|
-
"external_system_queueFontFamily": '"Open Sans", sans-serif',
|
|
3686
|
-
"external_system_queueFontWeight": "normal",
|
|
3687
|
-
"boundaryFontSize": 14,
|
|
3688
|
-
"boundaryFontFamily": '"Open Sans", sans-serif',
|
|
3689
|
-
"boundaryFontWeight": "normal",
|
|
3690
|
-
"messageFontSize": 12,
|
|
3691
|
-
"messageFontFamily": '"Open Sans", sans-serif',
|
|
3692
|
-
"messageFontWeight": "normal",
|
|
3693
|
-
"containerFontSize": 14,
|
|
3694
|
-
"containerFontFamily": '"Open Sans", sans-serif',
|
|
3695
|
-
"containerFontWeight": "normal",
|
|
3696
|
-
"external_containerFontSize": 14,
|
|
3697
|
-
"external_containerFontFamily": '"Open Sans", sans-serif',
|
|
3698
|
-
"external_containerFontWeight": "normal",
|
|
3699
|
-
"container_dbFontSize": 14,
|
|
3700
|
-
"container_dbFontFamily": '"Open Sans", sans-serif',
|
|
3701
|
-
"container_dbFontWeight": "normal",
|
|
3702
|
-
"external_container_dbFontSize": 14,
|
|
3703
|
-
"external_container_dbFontFamily": '"Open Sans", sans-serif',
|
|
3704
|
-
"external_container_dbFontWeight": "normal",
|
|
3705
|
-
"container_queueFontSize": 14,
|
|
3706
|
-
"container_queueFontFamily": '"Open Sans", sans-serif',
|
|
3707
|
-
"container_queueFontWeight": "normal",
|
|
3708
|
-
"external_container_queueFontSize": 14,
|
|
3709
|
-
"external_container_queueFontFamily": '"Open Sans", sans-serif',
|
|
3710
|
-
"external_container_queueFontWeight": "normal",
|
|
3711
|
-
"componentFontSize": 14,
|
|
3712
|
-
"componentFontFamily": '"Open Sans", sans-serif',
|
|
3713
|
-
"componentFontWeight": "normal",
|
|
3714
|
-
"external_componentFontSize": 14,
|
|
3715
|
-
"external_componentFontFamily": '"Open Sans", sans-serif',
|
|
3716
|
-
"external_componentFontWeight": "normal",
|
|
3717
|
-
"component_dbFontSize": 14,
|
|
3718
|
-
"component_dbFontFamily": '"Open Sans", sans-serif',
|
|
3719
|
-
"component_dbFontWeight": "normal",
|
|
3720
|
-
"external_component_dbFontSize": 14,
|
|
3721
|
-
"external_component_dbFontFamily": '"Open Sans", sans-serif',
|
|
3722
|
-
"external_component_dbFontWeight": "normal",
|
|
3723
|
-
"component_queueFontSize": 14,
|
|
3724
|
-
"component_queueFontFamily": '"Open Sans", sans-serif',
|
|
3725
|
-
"component_queueFontWeight": "normal",
|
|
3726
|
-
"external_component_queueFontSize": 14,
|
|
3727
|
-
"external_component_queueFontFamily": '"Open Sans", sans-serif',
|
|
3728
|
-
"external_component_queueFontWeight": "normal",
|
|
3729
|
-
"wrap": true,
|
|
3730
|
-
"wrapPadding": 10,
|
|
3731
|
-
"person_bg_color": "#08427B",
|
|
3732
|
-
"person_border_color": "#073B6F",
|
|
3733
|
-
"external_person_bg_color": "#686868",
|
|
3734
|
-
"external_person_border_color": "#8A8A8A",
|
|
3735
|
-
"system_bg_color": "#1168BD",
|
|
3736
|
-
"system_border_color": "#3C7FC0",
|
|
3737
|
-
"system_db_bg_color": "#1168BD",
|
|
3738
|
-
"system_db_border_color": "#3C7FC0",
|
|
3739
|
-
"system_queue_bg_color": "#1168BD",
|
|
3740
|
-
"system_queue_border_color": "#3C7FC0",
|
|
3741
|
-
"external_system_bg_color": "#999999",
|
|
3742
|
-
"external_system_border_color": "#8A8A8A",
|
|
3743
|
-
"external_system_db_bg_color": "#999999",
|
|
3744
|
-
"external_system_db_border_color": "#8A8A8A",
|
|
3745
|
-
"external_system_queue_bg_color": "#999999",
|
|
3746
|
-
"external_system_queue_border_color": "#8A8A8A",
|
|
3747
|
-
"container_bg_color": "#438DD5",
|
|
3748
|
-
"container_border_color": "#3C7FC0",
|
|
3749
|
-
"container_db_bg_color": "#438DD5",
|
|
3750
|
-
"container_db_border_color": "#3C7FC0",
|
|
3751
|
-
"container_queue_bg_color": "#438DD5",
|
|
3752
|
-
"container_queue_border_color": "#3C7FC0",
|
|
3753
|
-
"external_container_bg_color": "#B3B3B3",
|
|
3754
|
-
"external_container_border_color": "#A6A6A6",
|
|
3755
|
-
"external_container_db_bg_color": "#B3B3B3",
|
|
3756
|
-
"external_container_db_border_color": "#A6A6A6",
|
|
3757
|
-
"external_container_queue_bg_color": "#B3B3B3",
|
|
3758
|
-
"external_container_queue_border_color": "#A6A6A6",
|
|
3759
|
-
"component_bg_color": "#85BBF0",
|
|
3760
|
-
"component_border_color": "#78A8D8",
|
|
3761
|
-
"component_db_bg_color": "#85BBF0",
|
|
3762
|
-
"component_db_border_color": "#78A8D8",
|
|
3763
|
-
"component_queue_bg_color": "#85BBF0",
|
|
3764
|
-
"component_queue_border_color": "#78A8D8",
|
|
3765
|
-
"external_component_bg_color": "#CCCCCC",
|
|
3766
|
-
"external_component_border_color": "#BFBFBF",
|
|
3767
|
-
"external_component_db_bg_color": "#CCCCCC",
|
|
3768
|
-
"external_component_db_border_color": "#BFBFBF",
|
|
3769
|
-
"external_component_queue_bg_color": "#CCCCCC",
|
|
3770
|
-
"external_component_queue_border_color": "#BFBFBF"
|
|
3771
|
-
},
|
|
3772
|
-
"sankey": {
|
|
3773
|
-
"useMaxWidth": true,
|
|
3774
|
-
"width": 600,
|
|
3775
|
-
"height": 400,
|
|
3776
|
-
"linkColor": "gradient",
|
|
3777
|
-
"nodeAlignment": "justify",
|
|
3778
|
-
"showValues": true,
|
|
3779
|
-
"prefix": "",
|
|
3780
|
-
"suffix": ""
|
|
3781
|
-
},
|
|
3782
|
-
"block": {
|
|
3783
|
-
"useMaxWidth": true,
|
|
3784
|
-
"padding": 8
|
|
3785
|
-
},
|
|
3786
|
-
"packet": {
|
|
3787
|
-
"useMaxWidth": true,
|
|
3788
|
-
"rowHeight": 32,
|
|
3789
|
-
"bitWidth": 32,
|
|
3790
|
-
"bitsPerRow": 32,
|
|
3791
|
-
"showBits": true,
|
|
3792
|
-
"paddingX": 5,
|
|
3793
|
-
"paddingY": 5
|
|
3794
|
-
},
|
|
3795
|
-
"architecture": {
|
|
3796
|
-
"useMaxWidth": true,
|
|
3797
|
-
"padding": 40,
|
|
3798
|
-
"iconSize": 80,
|
|
3799
|
-
"fontSize": 16
|
|
3800
|
-
},
|
|
3801
|
-
"radar": {
|
|
3802
|
-
"useMaxWidth": true,
|
|
3803
|
-
"width": 600,
|
|
3804
|
-
"height": 600,
|
|
3805
|
-
"marginTop": 50,
|
|
3806
|
-
"marginRight": 50,
|
|
3807
|
-
"marginBottom": 50,
|
|
3808
|
-
"marginLeft": 50,
|
|
3809
|
-
"axisScaleFactor": 1,
|
|
3810
|
-
"axisLabelFactor": 1.05,
|
|
3811
|
-
"curveTension": 0.17
|
|
3812
|
-
},
|
|
3813
|
-
"theme": "default",
|
|
3814
|
-
"look": "classic",
|
|
3815
|
-
"handDrawnSeed": 0,
|
|
3816
|
-
"layout": "dagre",
|
|
3817
|
-
"maxTextSize": 5e4,
|
|
3818
|
-
"maxEdges": 500,
|
|
3819
|
-
"darkMode": false,
|
|
3820
|
-
"fontFamily": '"trebuchet ms", verdana, arial, sans-serif;',
|
|
3821
|
-
"logLevel": 5,
|
|
3822
|
-
"securityLevel": "strict",
|
|
3823
|
-
"startOnLoad": true,
|
|
3824
|
-
"arrowMarkerAbsolute": false,
|
|
3825
|
-
"secure": [
|
|
3826
|
-
"secure",
|
|
3827
|
-
"securityLevel",
|
|
3828
|
-
"startOnLoad",
|
|
3829
|
-
"maxTextSize",
|
|
3830
|
-
"suppressErrorRendering",
|
|
3831
|
-
"maxEdges"
|
|
3832
|
-
],
|
|
3833
|
-
"legacyMathML": false,
|
|
3834
|
-
"forceLegacyMathML": false,
|
|
3835
|
-
"deterministicIds": false,
|
|
3836
|
-
"fontSize": 16,
|
|
3837
|
-
"markdownAutoWrap": true,
|
|
3838
|
-
"suppressErrorRendering": false
|
|
3839
|
-
};
|
|
3840
|
-
var config = {
|
|
3841
|
-
...config_schema_default,
|
|
3842
|
-
// Set, even though they're `undefined` so that `configKeys` finds these keys
|
|
3843
|
-
// TODO: Should we replace these with `null` so that they can go in the JSON Schema?
|
|
3844
|
-
deterministicIDSeed: void 0,
|
|
3845
|
-
elk: {
|
|
3846
|
-
// mergeEdges is needed here to be considered
|
|
3847
|
-
mergeEdges: false,
|
|
3848
|
-
nodePlacementStrategy: "BRANDES_KOEPF",
|
|
3849
|
-
forceNodeModelOrder: false,
|
|
3850
|
-
considerModelOrder: "NODES_AND_EDGES"
|
|
3851
|
-
},
|
|
3852
|
-
themeCSS: void 0,
|
|
3853
|
-
// add non-JSON default config values
|
|
3854
|
-
themeVariables: themes_default.default.getThemeVariables(),
|
|
3855
|
-
sequence: {
|
|
3856
|
-
...config_schema_default.sequence,
|
|
3857
|
-
messageFont: /* @__PURE__ */ __name(function() {
|
|
3858
|
-
return {
|
|
3859
|
-
fontFamily: this.messageFontFamily,
|
|
3860
|
-
fontSize: this.messageFontSize,
|
|
3861
|
-
fontWeight: this.messageFontWeight
|
|
3862
|
-
};
|
|
3863
|
-
}, "messageFont"),
|
|
3864
|
-
noteFont: /* @__PURE__ */ __name(function() {
|
|
3865
|
-
return {
|
|
3866
|
-
fontFamily: this.noteFontFamily,
|
|
3867
|
-
fontSize: this.noteFontSize,
|
|
3868
|
-
fontWeight: this.noteFontWeight
|
|
3869
|
-
};
|
|
3870
|
-
}, "noteFont"),
|
|
3871
|
-
actorFont: /* @__PURE__ */ __name(function() {
|
|
3872
|
-
return {
|
|
3873
|
-
fontFamily: this.actorFontFamily,
|
|
3874
|
-
fontSize: this.actorFontSize,
|
|
3875
|
-
fontWeight: this.actorFontWeight
|
|
3876
|
-
};
|
|
3877
|
-
}, "actorFont")
|
|
3878
|
-
},
|
|
3879
|
-
class: {
|
|
3880
|
-
hideEmptyMembersBox: false
|
|
3881
|
-
},
|
|
3882
|
-
gantt: {
|
|
3883
|
-
...config_schema_default.gantt,
|
|
3884
|
-
tickInterval: void 0,
|
|
3885
|
-
useWidth: void 0
|
|
3886
|
-
// can probably be removed since `configKeys` already includes this
|
|
3887
|
-
},
|
|
3888
|
-
c4: {
|
|
3889
|
-
...config_schema_default.c4,
|
|
3890
|
-
useWidth: void 0,
|
|
3891
|
-
personFont: /* @__PURE__ */ __name(function() {
|
|
3892
|
-
return {
|
|
3893
|
-
fontFamily: this.personFontFamily,
|
|
3894
|
-
fontSize: this.personFontSize,
|
|
3895
|
-
fontWeight: this.personFontWeight
|
|
3896
|
-
};
|
|
3897
|
-
}, "personFont"),
|
|
3898
|
-
flowchart: {
|
|
3899
|
-
...config_schema_default.flowchart,
|
|
3900
|
-
inheritDir: false
|
|
3901
|
-
// default to legacy behavior
|
|
3902
|
-
},
|
|
3903
|
-
external_personFont: /* @__PURE__ */ __name(function() {
|
|
3904
|
-
return {
|
|
3905
|
-
fontFamily: this.external_personFontFamily,
|
|
3906
|
-
fontSize: this.external_personFontSize,
|
|
3907
|
-
fontWeight: this.external_personFontWeight
|
|
3908
|
-
};
|
|
3909
|
-
}, "external_personFont"),
|
|
3910
|
-
systemFont: /* @__PURE__ */ __name(function() {
|
|
3911
|
-
return {
|
|
3912
|
-
fontFamily: this.systemFontFamily,
|
|
3913
|
-
fontSize: this.systemFontSize,
|
|
3914
|
-
fontWeight: this.systemFontWeight
|
|
3915
|
-
};
|
|
3916
|
-
}, "systemFont"),
|
|
3917
|
-
external_systemFont: /* @__PURE__ */ __name(function() {
|
|
3918
|
-
return {
|
|
3919
|
-
fontFamily: this.external_systemFontFamily,
|
|
3920
|
-
fontSize: this.external_systemFontSize,
|
|
3921
|
-
fontWeight: this.external_systemFontWeight
|
|
3922
|
-
};
|
|
3923
|
-
}, "external_systemFont"),
|
|
3924
|
-
system_dbFont: /* @__PURE__ */ __name(function() {
|
|
3925
|
-
return {
|
|
3926
|
-
fontFamily: this.system_dbFontFamily,
|
|
3927
|
-
fontSize: this.system_dbFontSize,
|
|
3928
|
-
fontWeight: this.system_dbFontWeight
|
|
3929
|
-
};
|
|
3930
|
-
}, "system_dbFont"),
|
|
3931
|
-
external_system_dbFont: /* @__PURE__ */ __name(function() {
|
|
3932
|
-
return {
|
|
3933
|
-
fontFamily: this.external_system_dbFontFamily,
|
|
3934
|
-
fontSize: this.external_system_dbFontSize,
|
|
3935
|
-
fontWeight: this.external_system_dbFontWeight
|
|
3936
|
-
};
|
|
3937
|
-
}, "external_system_dbFont"),
|
|
3938
|
-
system_queueFont: /* @__PURE__ */ __name(function() {
|
|
3939
|
-
return {
|
|
3940
|
-
fontFamily: this.system_queueFontFamily,
|
|
3941
|
-
fontSize: this.system_queueFontSize,
|
|
3942
|
-
fontWeight: this.system_queueFontWeight
|
|
3943
|
-
};
|
|
3944
|
-
}, "system_queueFont"),
|
|
3945
|
-
external_system_queueFont: /* @__PURE__ */ __name(function() {
|
|
3946
|
-
return {
|
|
3947
|
-
fontFamily: this.external_system_queueFontFamily,
|
|
3948
|
-
fontSize: this.external_system_queueFontSize,
|
|
3949
|
-
fontWeight: this.external_system_queueFontWeight
|
|
3950
|
-
};
|
|
3951
|
-
}, "external_system_queueFont"),
|
|
3952
|
-
containerFont: /* @__PURE__ */ __name(function() {
|
|
3953
|
-
return {
|
|
3954
|
-
fontFamily: this.containerFontFamily,
|
|
3955
|
-
fontSize: this.containerFontSize,
|
|
3956
|
-
fontWeight: this.containerFontWeight
|
|
3957
|
-
};
|
|
3958
|
-
}, "containerFont"),
|
|
3959
|
-
external_containerFont: /* @__PURE__ */ __name(function() {
|
|
3960
|
-
return {
|
|
3961
|
-
fontFamily: this.external_containerFontFamily,
|
|
3962
|
-
fontSize: this.external_containerFontSize,
|
|
3963
|
-
fontWeight: this.external_containerFontWeight
|
|
3964
|
-
};
|
|
3965
|
-
}, "external_containerFont"),
|
|
3966
|
-
container_dbFont: /* @__PURE__ */ __name(function() {
|
|
3967
|
-
return {
|
|
3968
|
-
fontFamily: this.container_dbFontFamily,
|
|
3969
|
-
fontSize: this.container_dbFontSize,
|
|
3970
|
-
fontWeight: this.container_dbFontWeight
|
|
3971
|
-
};
|
|
3972
|
-
}, "container_dbFont"),
|
|
3973
|
-
external_container_dbFont: /* @__PURE__ */ __name(function() {
|
|
3974
|
-
return {
|
|
3975
|
-
fontFamily: this.external_container_dbFontFamily,
|
|
3976
|
-
fontSize: this.external_container_dbFontSize,
|
|
3977
|
-
fontWeight: this.external_container_dbFontWeight
|
|
3978
|
-
};
|
|
3979
|
-
}, "external_container_dbFont"),
|
|
3980
|
-
container_queueFont: /* @__PURE__ */ __name(function() {
|
|
3981
|
-
return {
|
|
3982
|
-
fontFamily: this.container_queueFontFamily,
|
|
3983
|
-
fontSize: this.container_queueFontSize,
|
|
3984
|
-
fontWeight: this.container_queueFontWeight
|
|
3985
|
-
};
|
|
3986
|
-
}, "container_queueFont"),
|
|
3987
|
-
external_container_queueFont: /* @__PURE__ */ __name(function() {
|
|
3988
|
-
return {
|
|
3989
|
-
fontFamily: this.external_container_queueFontFamily,
|
|
3990
|
-
fontSize: this.external_container_queueFontSize,
|
|
3991
|
-
fontWeight: this.external_container_queueFontWeight
|
|
3992
|
-
};
|
|
3993
|
-
}, "external_container_queueFont"),
|
|
3994
|
-
componentFont: /* @__PURE__ */ __name(function() {
|
|
3995
|
-
return {
|
|
3996
|
-
fontFamily: this.componentFontFamily,
|
|
3997
|
-
fontSize: this.componentFontSize,
|
|
3998
|
-
fontWeight: this.componentFontWeight
|
|
3999
|
-
};
|
|
4000
|
-
}, "componentFont"),
|
|
4001
|
-
external_componentFont: /* @__PURE__ */ __name(function() {
|
|
4002
|
-
return {
|
|
4003
|
-
fontFamily: this.external_componentFontFamily,
|
|
4004
|
-
fontSize: this.external_componentFontSize,
|
|
4005
|
-
fontWeight: this.external_componentFontWeight
|
|
4006
|
-
};
|
|
4007
|
-
}, "external_componentFont"),
|
|
4008
|
-
component_dbFont: /* @__PURE__ */ __name(function() {
|
|
4009
|
-
return {
|
|
4010
|
-
fontFamily: this.component_dbFontFamily,
|
|
4011
|
-
fontSize: this.component_dbFontSize,
|
|
4012
|
-
fontWeight: this.component_dbFontWeight
|
|
4013
|
-
};
|
|
4014
|
-
}, "component_dbFont"),
|
|
4015
|
-
external_component_dbFont: /* @__PURE__ */ __name(function() {
|
|
4016
|
-
return {
|
|
4017
|
-
fontFamily: this.external_component_dbFontFamily,
|
|
4018
|
-
fontSize: this.external_component_dbFontSize,
|
|
4019
|
-
fontWeight: this.external_component_dbFontWeight
|
|
4020
|
-
};
|
|
4021
|
-
}, "external_component_dbFont"),
|
|
4022
|
-
component_queueFont: /* @__PURE__ */ __name(function() {
|
|
4023
|
-
return {
|
|
4024
|
-
fontFamily: this.component_queueFontFamily,
|
|
4025
|
-
fontSize: this.component_queueFontSize,
|
|
4026
|
-
fontWeight: this.component_queueFontWeight
|
|
4027
|
-
};
|
|
4028
|
-
}, "component_queueFont"),
|
|
4029
|
-
external_component_queueFont: /* @__PURE__ */ __name(function() {
|
|
4030
|
-
return {
|
|
4031
|
-
fontFamily: this.external_component_queueFontFamily,
|
|
4032
|
-
fontSize: this.external_component_queueFontSize,
|
|
4033
|
-
fontWeight: this.external_component_queueFontWeight
|
|
4034
|
-
};
|
|
4035
|
-
}, "external_component_queueFont"),
|
|
4036
|
-
boundaryFont: /* @__PURE__ */ __name(function() {
|
|
4037
|
-
return {
|
|
4038
|
-
fontFamily: this.boundaryFontFamily,
|
|
4039
|
-
fontSize: this.boundaryFontSize,
|
|
4040
|
-
fontWeight: this.boundaryFontWeight
|
|
4041
|
-
};
|
|
4042
|
-
}, "boundaryFont"),
|
|
4043
|
-
messageFont: /* @__PURE__ */ __name(function() {
|
|
4044
|
-
return {
|
|
4045
|
-
fontFamily: this.messageFontFamily,
|
|
4046
|
-
fontSize: this.messageFontSize,
|
|
4047
|
-
fontWeight: this.messageFontWeight
|
|
4048
|
-
};
|
|
4049
|
-
}, "messageFont")
|
|
4050
|
-
},
|
|
4051
|
-
pie: {
|
|
4052
|
-
...config_schema_default.pie,
|
|
4053
|
-
useWidth: 984
|
|
4054
|
-
},
|
|
4055
|
-
xyChart: {
|
|
4056
|
-
...config_schema_default.xyChart,
|
|
4057
|
-
useWidth: void 0
|
|
4058
|
-
},
|
|
4059
|
-
requirement: {
|
|
4060
|
-
...config_schema_default.requirement,
|
|
4061
|
-
useWidth: void 0
|
|
4062
|
-
},
|
|
4063
|
-
packet: {
|
|
4064
|
-
...config_schema_default.packet
|
|
4065
|
-
},
|
|
4066
|
-
radar: {
|
|
4067
|
-
...config_schema_default.radar
|
|
4068
|
-
},
|
|
4069
|
-
treemap: {
|
|
4070
|
-
useMaxWidth: true,
|
|
4071
|
-
padding: 10,
|
|
4072
|
-
diagramPadding: 8,
|
|
4073
|
-
showValues: true,
|
|
4074
|
-
nodeWidth: 100,
|
|
4075
|
-
nodeHeight: 40,
|
|
4076
|
-
borderWidth: 1,
|
|
4077
|
-
valueFontSize: 12,
|
|
4078
|
-
labelFontSize: 14,
|
|
4079
|
-
valueFormat: ","
|
|
4080
|
-
}
|
|
4081
|
-
};
|
|
4082
|
-
var keyify = /* @__PURE__ */ __name((obj, prefix = "") => Object.keys(obj).reduce((res, el) => {
|
|
4083
|
-
if (Array.isArray(obj[el])) {
|
|
4084
|
-
return res;
|
|
4085
|
-
} else if (typeof obj[el] === "object" && obj[el] !== null) {
|
|
4086
|
-
return [...res, prefix + el, ...keyify(obj[el], "")];
|
|
4087
|
-
}
|
|
4088
|
-
return [...res, prefix + el];
|
|
4089
|
-
}, []), "keyify");
|
|
4090
|
-
var configKeys = new Set(keyify(config, ""));
|
|
4091
|
-
var defaultConfig_default = config;
|
|
4092
|
-
var sanitizeDirective = /* @__PURE__ */ __name((args) => {
|
|
4093
|
-
log.debug("sanitizeDirective called with", args);
|
|
4094
|
-
if (typeof args !== "object" || args == null) {
|
|
4095
|
-
return;
|
|
4096
|
-
}
|
|
4097
|
-
if (Array.isArray(args)) {
|
|
4098
|
-
args.forEach((arg) => sanitizeDirective(arg));
|
|
4099
|
-
return;
|
|
4100
|
-
}
|
|
4101
|
-
for (const key of Object.keys(args)) {
|
|
4102
|
-
log.debug("Checking key", key);
|
|
4103
|
-
if (key.startsWith("__") || key.includes("proto") || key.includes("constr") || !configKeys.has(key) || args[key] == null) {
|
|
4104
|
-
log.debug("sanitize deleting key: ", key);
|
|
4105
|
-
delete args[key];
|
|
4106
|
-
continue;
|
|
4107
|
-
}
|
|
4108
|
-
if (typeof args[key] === "object") {
|
|
4109
|
-
log.debug("sanitizing object", key);
|
|
4110
|
-
sanitizeDirective(args[key]);
|
|
4111
|
-
continue;
|
|
4112
|
-
}
|
|
4113
|
-
const cssMatchers = ["themeCSS", "fontFamily", "altFontFamily"];
|
|
4114
|
-
for (const cssKey of cssMatchers) {
|
|
4115
|
-
if (key.includes(cssKey)) {
|
|
4116
|
-
log.debug("sanitizing css option", key);
|
|
4117
|
-
args[key] = sanitizeCss(args[key]);
|
|
4118
|
-
}
|
|
4119
|
-
}
|
|
4120
|
-
}
|
|
4121
|
-
if (args.themeVariables) {
|
|
4122
|
-
for (const k of Object.keys(args.themeVariables)) {
|
|
4123
|
-
const val = args.themeVariables[k];
|
|
4124
|
-
if (val?.match && !val.match(/^[\d "#%(),.;A-Za-z]+$/)) {
|
|
4125
|
-
args.themeVariables[k] = "";
|
|
4126
|
-
}
|
|
4127
|
-
}
|
|
4128
|
-
}
|
|
4129
|
-
log.debug("After sanitization", args);
|
|
4130
|
-
}, "sanitizeDirective");
|
|
4131
|
-
var sanitizeCss = /* @__PURE__ */ __name((str) => {
|
|
4132
|
-
let startCnt = 0;
|
|
4133
|
-
let endCnt = 0;
|
|
4134
|
-
for (const element of str) {
|
|
4135
|
-
if (startCnt < endCnt) {
|
|
4136
|
-
return "{ /* ERROR: Unbalanced CSS */ }";
|
|
4137
|
-
}
|
|
4138
|
-
if (element === "{") {
|
|
4139
|
-
startCnt++;
|
|
4140
|
-
} else if (element === "}") {
|
|
4141
|
-
endCnt++;
|
|
4142
|
-
}
|
|
4143
|
-
}
|
|
4144
|
-
if (startCnt !== endCnt) {
|
|
4145
|
-
return "{ /* ERROR: Unbalanced CSS */ }";
|
|
4146
|
-
}
|
|
4147
|
-
return str;
|
|
4148
|
-
}, "sanitizeCss");
|
|
4149
|
-
var defaultConfig = Object.freeze(defaultConfig_default);
|
|
4150
|
-
var siteConfig = assignWithDepth_default({}, defaultConfig);
|
|
4151
|
-
var configFromInitialize;
|
|
4152
|
-
var directives = [];
|
|
4153
|
-
var currentConfig = assignWithDepth_default({}, defaultConfig);
|
|
4154
|
-
var updateCurrentConfig = /* @__PURE__ */ __name((siteCfg, _directives) => {
|
|
4155
|
-
let cfg = assignWithDepth_default({}, siteCfg);
|
|
4156
|
-
let sumOfDirectives = {};
|
|
4157
|
-
for (const d of _directives) {
|
|
4158
|
-
sanitize(d);
|
|
4159
|
-
sumOfDirectives = assignWithDepth_default(sumOfDirectives, d);
|
|
4160
|
-
}
|
|
4161
|
-
cfg = assignWithDepth_default(cfg, sumOfDirectives);
|
|
4162
|
-
if (sumOfDirectives.theme && sumOfDirectives.theme in themes_default) {
|
|
4163
|
-
const tmpConfigFromInitialize = assignWithDepth_default({}, configFromInitialize);
|
|
4164
|
-
const themeVariables = assignWithDepth_default(
|
|
4165
|
-
tmpConfigFromInitialize.themeVariables || {},
|
|
4166
|
-
sumOfDirectives.themeVariables
|
|
4167
|
-
);
|
|
4168
|
-
if (cfg.theme && cfg.theme in themes_default) {
|
|
4169
|
-
cfg.themeVariables = themes_default[cfg.theme].getThemeVariables(themeVariables);
|
|
4170
|
-
}
|
|
4171
|
-
}
|
|
4172
|
-
currentConfig = cfg;
|
|
4173
|
-
checkConfig(currentConfig);
|
|
4174
|
-
return currentConfig;
|
|
4175
|
-
}, "updateCurrentConfig");
|
|
4176
|
-
var setSiteConfig = /* @__PURE__ */ __name((conf) => {
|
|
4177
|
-
siteConfig = assignWithDepth_default({}, defaultConfig);
|
|
4178
|
-
siteConfig = assignWithDepth_default(siteConfig, conf);
|
|
4179
|
-
if (conf.theme && themes_default[conf.theme]) {
|
|
4180
|
-
siteConfig.themeVariables = themes_default[conf.theme].getThemeVariables(conf.themeVariables);
|
|
4181
|
-
}
|
|
4182
|
-
updateCurrentConfig(siteConfig, directives);
|
|
4183
|
-
return siteConfig;
|
|
4184
|
-
}, "setSiteConfig");
|
|
4185
|
-
var saveConfigFromInitialize = /* @__PURE__ */ __name((conf) => {
|
|
4186
|
-
configFromInitialize = assignWithDepth_default({}, conf);
|
|
4187
|
-
}, "saveConfigFromInitialize");
|
|
4188
|
-
var updateSiteConfig = /* @__PURE__ */ __name((conf) => {
|
|
4189
|
-
siteConfig = assignWithDepth_default(siteConfig, conf);
|
|
4190
|
-
updateCurrentConfig(siteConfig, directives);
|
|
4191
|
-
return siteConfig;
|
|
4192
|
-
}, "updateSiteConfig");
|
|
4193
|
-
var getSiteConfig = /* @__PURE__ */ __name(() => {
|
|
4194
|
-
return assignWithDepth_default({}, siteConfig);
|
|
4195
|
-
}, "getSiteConfig");
|
|
4196
|
-
var setConfig = /* @__PURE__ */ __name((conf) => {
|
|
4197
|
-
checkConfig(conf);
|
|
4198
|
-
assignWithDepth_default(currentConfig, conf);
|
|
4199
|
-
return getConfig();
|
|
4200
|
-
}, "setConfig");
|
|
4201
|
-
var getConfig = /* @__PURE__ */ __name(() => {
|
|
4202
|
-
return assignWithDepth_default({}, currentConfig);
|
|
4203
|
-
}, "getConfig");
|
|
4204
|
-
var sanitize = /* @__PURE__ */ __name((options) => {
|
|
4205
|
-
if (!options) {
|
|
4206
|
-
return;
|
|
4207
|
-
}
|
|
4208
|
-
["secure", ...siteConfig.secure ?? []].forEach((key) => {
|
|
4209
|
-
if (Object.hasOwn(options, key)) {
|
|
4210
|
-
log.debug(`Denied attempt to modify a secure key ${key}`, options[key]);
|
|
4211
|
-
delete options[key];
|
|
4212
|
-
}
|
|
4213
|
-
});
|
|
4214
|
-
Object.keys(options).forEach((key) => {
|
|
4215
|
-
if (key.startsWith("__")) {
|
|
4216
|
-
delete options[key];
|
|
4217
|
-
}
|
|
4218
|
-
});
|
|
4219
|
-
Object.keys(options).forEach((key) => {
|
|
4220
|
-
if (typeof options[key] === "string" && (options[key].includes("<") || options[key].includes(">") || options[key].includes("url(data:"))) {
|
|
4221
|
-
delete options[key];
|
|
4222
|
-
}
|
|
4223
|
-
if (typeof options[key] === "object") {
|
|
4224
|
-
sanitize(options[key]);
|
|
4225
|
-
}
|
|
4226
|
-
});
|
|
4227
|
-
}, "sanitize");
|
|
4228
|
-
var addDirective = /* @__PURE__ */ __name((directive) => {
|
|
4229
|
-
sanitizeDirective(directive);
|
|
4230
|
-
if (directive.fontFamily && !directive.themeVariables?.fontFamily) {
|
|
4231
|
-
directive.themeVariables = {
|
|
4232
|
-
...directive.themeVariables,
|
|
4233
|
-
fontFamily: directive.fontFamily
|
|
4234
|
-
};
|
|
4235
|
-
}
|
|
4236
|
-
directives.push(directive);
|
|
4237
|
-
updateCurrentConfig(siteConfig, directives);
|
|
4238
|
-
}, "addDirective");
|
|
4239
|
-
var reset = /* @__PURE__ */ __name((config2 = siteConfig) => {
|
|
4240
|
-
directives = [];
|
|
4241
|
-
updateCurrentConfig(config2, directives);
|
|
4242
|
-
}, "reset");
|
|
4243
|
-
var ConfigWarning = {
|
|
4244
|
-
LAZY_LOAD_DEPRECATED: "The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."
|
|
4245
|
-
};
|
|
4246
|
-
var issuedWarnings = {};
|
|
4247
|
-
var issueWarning = /* @__PURE__ */ __name((warning) => {
|
|
4248
|
-
if (issuedWarnings[warning]) {
|
|
4249
|
-
return;
|
|
4250
|
-
}
|
|
4251
|
-
log.warn(ConfigWarning[warning]);
|
|
4252
|
-
issuedWarnings[warning] = true;
|
|
4253
|
-
}, "issueWarning");
|
|
4254
|
-
var checkConfig = /* @__PURE__ */ __name((config2) => {
|
|
4255
|
-
if (!config2) {
|
|
4256
|
-
return;
|
|
4257
|
-
}
|
|
4258
|
-
if (config2.lazyLoadedDiagrams || config2.loadExternalDiagramsAtStartup) {
|
|
4259
|
-
issueWarning("LAZY_LOAD_DEPRECATED");
|
|
4260
|
-
}
|
|
4261
|
-
}, "checkConfig");
|
|
4262
|
-
var getUserDefinedConfig = /* @__PURE__ */ __name(() => {
|
|
4263
|
-
let userConfig = {};
|
|
4264
|
-
if (configFromInitialize) {
|
|
4265
|
-
userConfig = assignWithDepth_default(userConfig, configFromInitialize);
|
|
4266
|
-
}
|
|
4267
|
-
for (const d of directives) {
|
|
4268
|
-
userConfig = assignWithDepth_default(userConfig, d);
|
|
4269
|
-
}
|
|
4270
|
-
return userConfig;
|
|
4271
|
-
}, "getUserDefinedConfig");
|
|
4272
|
-
var lineBreakRegex = /<br\s*\/?>/gi;
|
|
4273
|
-
var getRows = /* @__PURE__ */ __name((s) => {
|
|
4274
|
-
if (!s) {
|
|
4275
|
-
return [""];
|
|
4276
|
-
}
|
|
4277
|
-
const str = breakToPlaceholder(s).replace(/\\n/g, "#br#");
|
|
4278
|
-
return str.split("#br#");
|
|
4279
|
-
}, "getRows");
|
|
4280
|
-
var setupDompurifyHooksIfNotSetup = /* @__PURE__ */ (() => {
|
|
4281
|
-
let setup = false;
|
|
4282
|
-
return () => {
|
|
4283
|
-
if (!setup) {
|
|
4284
|
-
setupDompurifyHooks();
|
|
4285
|
-
setup = true;
|
|
4286
|
-
}
|
|
4287
|
-
};
|
|
4288
|
-
})();
|
|
4289
|
-
function setupDompurifyHooks() {
|
|
4290
|
-
const TEMPORARY_ATTRIBUTE = "data-temp-href-target";
|
|
4291
|
-
purify.addHook("beforeSanitizeAttributes", (node) => {
|
|
4292
|
-
if (node.tagName === "A" && node.hasAttribute("target")) {
|
|
4293
|
-
node.setAttribute(TEMPORARY_ATTRIBUTE, node.getAttribute("target") ?? "");
|
|
4294
|
-
}
|
|
4295
|
-
});
|
|
4296
|
-
purify.addHook("afterSanitizeAttributes", (node) => {
|
|
4297
|
-
if (node.tagName === "A" && node.hasAttribute(TEMPORARY_ATTRIBUTE)) {
|
|
4298
|
-
node.setAttribute("target", node.getAttribute(TEMPORARY_ATTRIBUTE) ?? "");
|
|
4299
|
-
node.removeAttribute(TEMPORARY_ATTRIBUTE);
|
|
4300
|
-
if (node.getAttribute("target") === "_blank") {
|
|
4301
|
-
node.setAttribute("rel", "noopener");
|
|
4302
|
-
}
|
|
4303
|
-
}
|
|
4304
|
-
});
|
|
4305
|
-
}
|
|
4306
|
-
__name(setupDompurifyHooks, "setupDompurifyHooks");
|
|
4307
|
-
var removeScript = /* @__PURE__ */ __name((txt) => {
|
|
4308
|
-
setupDompurifyHooksIfNotSetup();
|
|
4309
|
-
const sanitizedText = purify.sanitize(txt);
|
|
4310
|
-
return sanitizedText;
|
|
4311
|
-
}, "removeScript");
|
|
4312
|
-
var sanitizeMore = /* @__PURE__ */ __name((text2, config2) => {
|
|
4313
|
-
if (config2.flowchart?.htmlLabels !== false) {
|
|
4314
|
-
const level = config2.securityLevel;
|
|
4315
|
-
if (level === "antiscript" || level === "strict") {
|
|
4316
|
-
text2 = removeScript(text2);
|
|
4317
|
-
} else if (level !== "loose") {
|
|
4318
|
-
text2 = breakToPlaceholder(text2);
|
|
4319
|
-
text2 = text2.replace(/</g, "<").replace(/>/g, ">");
|
|
4320
|
-
text2 = text2.replace(/=/g, "=");
|
|
4321
|
-
text2 = placeholderToBreak(text2);
|
|
4322
|
-
}
|
|
4323
|
-
}
|
|
4324
|
-
return text2;
|
|
4325
|
-
}, "sanitizeMore");
|
|
4326
|
-
var sanitizeText = /* @__PURE__ */ __name((text2, config2) => {
|
|
4327
|
-
if (!text2) {
|
|
4328
|
-
return text2;
|
|
4329
|
-
}
|
|
4330
|
-
if (config2.dompurifyConfig) {
|
|
4331
|
-
text2 = purify.sanitize(sanitizeMore(text2, config2), config2.dompurifyConfig).toString();
|
|
4332
|
-
} else {
|
|
4333
|
-
text2 = purify.sanitize(sanitizeMore(text2, config2), {
|
|
4334
|
-
FORBID_TAGS: ["style"]
|
|
4335
|
-
}).toString();
|
|
4336
|
-
}
|
|
4337
|
-
return text2;
|
|
4338
|
-
}, "sanitizeText");
|
|
4339
|
-
var sanitizeTextOrArray = /* @__PURE__ */ __name((a, config2) => {
|
|
4340
|
-
if (typeof a === "string") {
|
|
4341
|
-
return sanitizeText(a, config2);
|
|
4342
|
-
}
|
|
4343
|
-
return a.flat().map((x) => sanitizeText(x, config2));
|
|
4344
|
-
}, "sanitizeTextOrArray");
|
|
4345
|
-
var hasBreaks = /* @__PURE__ */ __name((text2) => {
|
|
4346
|
-
return lineBreakRegex.test(text2);
|
|
4347
|
-
}, "hasBreaks");
|
|
4348
|
-
var splitBreaks = /* @__PURE__ */ __name((text2) => {
|
|
4349
|
-
return text2.split(lineBreakRegex);
|
|
4350
|
-
}, "splitBreaks");
|
|
4351
|
-
var placeholderToBreak = /* @__PURE__ */ __name((s) => {
|
|
4352
|
-
return s.replace(/#br#/g, "<br/>");
|
|
4353
|
-
}, "placeholderToBreak");
|
|
4354
|
-
var breakToPlaceholder = /* @__PURE__ */ __name((s) => {
|
|
4355
|
-
return s.replace(lineBreakRegex, "#br#");
|
|
4356
|
-
}, "breakToPlaceholder");
|
|
4357
|
-
var getUrl = /* @__PURE__ */ __name((useAbsolute) => {
|
|
4358
|
-
let url = "";
|
|
4359
|
-
if (useAbsolute) {
|
|
4360
|
-
url = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search;
|
|
4361
|
-
url = CSS.escape(url);
|
|
4362
|
-
}
|
|
4363
|
-
return url;
|
|
4364
|
-
}, "getUrl");
|
|
4365
|
-
var evaluate = /* @__PURE__ */ __name((val) => val === false || ["false", "null", "0"].includes(String(val).trim().toLowerCase()) ? false : true, "evaluate");
|
|
4366
|
-
var getMax = /* @__PURE__ */ __name(function(...values) {
|
|
4367
|
-
const newValues = values.filter((value) => {
|
|
4368
|
-
return !isNaN(value);
|
|
4369
|
-
});
|
|
4370
|
-
return Math.max(...newValues);
|
|
4371
|
-
}, "getMax");
|
|
4372
|
-
var getMin = /* @__PURE__ */ __name(function(...values) {
|
|
4373
|
-
const newValues = values.filter((value) => {
|
|
4374
|
-
return !isNaN(value);
|
|
4375
|
-
});
|
|
4376
|
-
return Math.min(...newValues);
|
|
4377
|
-
}, "getMin");
|
|
4378
|
-
var parseGenericTypes = /* @__PURE__ */ __name(function(input) {
|
|
4379
|
-
const inputSets = input.split(/(,)/);
|
|
4380
|
-
const output = [];
|
|
4381
|
-
for (let i = 0; i < inputSets.length; i++) {
|
|
4382
|
-
let thisSet = inputSets[i];
|
|
4383
|
-
if (thisSet === "," && i > 0 && i + 1 < inputSets.length) {
|
|
4384
|
-
const previousSet = inputSets[i - 1];
|
|
4385
|
-
const nextSet = inputSets[i + 1];
|
|
4386
|
-
if (shouldCombineSets(previousSet, nextSet)) {
|
|
4387
|
-
thisSet = previousSet + "," + nextSet;
|
|
4388
|
-
i++;
|
|
4389
|
-
output.pop();
|
|
4390
|
-
}
|
|
4391
|
-
}
|
|
4392
|
-
output.push(processSet(thisSet));
|
|
4393
|
-
}
|
|
4394
|
-
return output.join("");
|
|
4395
|
-
}, "parseGenericTypes");
|
|
4396
|
-
var countOccurrence = /* @__PURE__ */ __name((string, substring) => {
|
|
4397
|
-
return Math.max(0, string.split(substring).length - 1);
|
|
4398
|
-
}, "countOccurrence");
|
|
4399
|
-
var shouldCombineSets = /* @__PURE__ */ __name((previousSet, nextSet) => {
|
|
4400
|
-
const prevCount = countOccurrence(previousSet, "~");
|
|
4401
|
-
const nextCount = countOccurrence(nextSet, "~");
|
|
4402
|
-
return prevCount === 1 && nextCount === 1;
|
|
4403
|
-
}, "shouldCombineSets");
|
|
4404
|
-
var processSet = /* @__PURE__ */ __name((input) => {
|
|
4405
|
-
const tildeCount = countOccurrence(input, "~");
|
|
4406
|
-
let hasStartingTilde = false;
|
|
4407
|
-
if (tildeCount <= 1) {
|
|
4408
|
-
return input;
|
|
4409
|
-
}
|
|
4410
|
-
if (tildeCount % 2 !== 0 && input.startsWith("~")) {
|
|
4411
|
-
input = input.substring(1);
|
|
4412
|
-
hasStartingTilde = true;
|
|
4413
|
-
}
|
|
4414
|
-
const chars = [...input];
|
|
4415
|
-
let first = chars.indexOf("~");
|
|
4416
|
-
let last = chars.lastIndexOf("~");
|
|
4417
|
-
while (first !== -1 && last !== -1 && first !== last) {
|
|
4418
|
-
chars[first] = "<";
|
|
4419
|
-
chars[last] = ">";
|
|
4420
|
-
first = chars.indexOf("~");
|
|
4421
|
-
last = chars.lastIndexOf("~");
|
|
4422
|
-
}
|
|
4423
|
-
if (hasStartingTilde) {
|
|
4424
|
-
chars.unshift("~");
|
|
4425
|
-
}
|
|
4426
|
-
return chars.join("");
|
|
4427
|
-
}, "processSet");
|
|
4428
|
-
var isMathMLSupported = /* @__PURE__ */ __name(() => window.MathMLElement !== void 0, "isMathMLSupported");
|
|
4429
|
-
var katexRegex = /\$\$(.*)\$\$/g;
|
|
4430
|
-
var hasKatex = /* @__PURE__ */ __name((text2) => (text2.match(katexRegex)?.length ?? 0) > 0, "hasKatex");
|
|
4431
|
-
var calculateMathMLDimensions = /* @__PURE__ */ __name(async (text2, config2) => {
|
|
4432
|
-
const divElem = document.createElement("div");
|
|
4433
|
-
divElem.innerHTML = await renderKatexSanitized(text2, config2);
|
|
4434
|
-
divElem.id = "katex-temp";
|
|
4435
|
-
divElem.style.visibility = "hidden";
|
|
4436
|
-
divElem.style.position = "absolute";
|
|
4437
|
-
divElem.style.top = "0";
|
|
4438
|
-
const body = document.querySelector("body");
|
|
4439
|
-
body?.insertAdjacentElement("beforeend", divElem);
|
|
4440
|
-
const dim = { width: divElem.clientWidth, height: divElem.clientHeight };
|
|
4441
|
-
divElem.remove();
|
|
4442
|
-
return dim;
|
|
4443
|
-
}, "calculateMathMLDimensions");
|
|
4444
|
-
var renderKatexUnsanitized = /* @__PURE__ */ __name(async (text2, config2) => {
|
|
4445
|
-
if (!hasKatex(text2)) {
|
|
4446
|
-
return text2;
|
|
4447
|
-
}
|
|
4448
|
-
if (!(isMathMLSupported() || config2.legacyMathML || config2.forceLegacyMathML)) {
|
|
4449
|
-
return text2.replace(katexRegex, "MathML is unsupported in this environment.");
|
|
4450
|
-
}
|
|
4451
|
-
{
|
|
4452
|
-
const { default: katex } = await import('./katex-4R42CMCB.mjs');
|
|
4453
|
-
const outputMode = config2.forceLegacyMathML || !isMathMLSupported() && config2.legacyMathML ? "htmlAndMathml" : "mathml";
|
|
4454
|
-
return text2.split(lineBreakRegex).map(
|
|
4455
|
-
(line) => hasKatex(line) ? `<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${line}</div>` : `<div>${line}</div>`
|
|
4456
|
-
).join("").replace(
|
|
4457
|
-
katexRegex,
|
|
4458
|
-
(_, c) => katex.renderToString(c, {
|
|
4459
|
-
throwOnError: true,
|
|
4460
|
-
displayMode: true,
|
|
4461
|
-
output: outputMode
|
|
4462
|
-
}).replace(/\n/g, " ").replace(/<annotation.*<\/annotation>/g, "")
|
|
4463
|
-
);
|
|
4464
|
-
}
|
|
4465
|
-
}, "renderKatexUnsanitized");
|
|
4466
|
-
var renderKatexSanitized = /* @__PURE__ */ __name(async (text2, config2) => {
|
|
4467
|
-
return sanitizeText(await renderKatexUnsanitized(text2, config2), config2);
|
|
4468
|
-
}, "renderKatexSanitized");
|
|
4469
|
-
var common_default = {
|
|
4470
|
-
getRows,
|
|
4471
|
-
sanitizeText,
|
|
4472
|
-
sanitizeTextOrArray,
|
|
4473
|
-
hasBreaks,
|
|
4474
|
-
splitBreaks,
|
|
4475
|
-
lineBreakRegex,
|
|
4476
|
-
removeScript,
|
|
4477
|
-
getUrl,
|
|
4478
|
-
evaluate,
|
|
4479
|
-
getMax,
|
|
4480
|
-
getMin
|
|
4481
|
-
};
|
|
4482
|
-
var d3Attrs = /* @__PURE__ */ __name(function(d3Elem, attrs) {
|
|
4483
|
-
for (let attr of attrs) {
|
|
4484
|
-
d3Elem.attr(attr[0], attr[1]);
|
|
4485
|
-
}
|
|
4486
|
-
}, "d3Attrs");
|
|
4487
|
-
var calculateSvgSizeAttrs = /* @__PURE__ */ __name(function(height, width, useMaxWidth) {
|
|
4488
|
-
let attrs = /* @__PURE__ */ new Map();
|
|
4489
|
-
if (useMaxWidth) {
|
|
4490
|
-
attrs.set("width", "100%");
|
|
4491
|
-
attrs.set("style", `max-width: ${width}px;`);
|
|
4492
|
-
} else {
|
|
4493
|
-
attrs.set("height", height);
|
|
4494
|
-
attrs.set("width", width);
|
|
4495
|
-
}
|
|
4496
|
-
return attrs;
|
|
4497
|
-
}, "calculateSvgSizeAttrs");
|
|
4498
|
-
var configureSvgSize = /* @__PURE__ */ __name(function(svgElem, height, width, useMaxWidth) {
|
|
4499
|
-
const attrs = calculateSvgSizeAttrs(height, width, useMaxWidth);
|
|
4500
|
-
d3Attrs(svgElem, attrs);
|
|
4501
|
-
}, "configureSvgSize");
|
|
4502
|
-
var setupGraphViewbox = /* @__PURE__ */ __name(function(graph, svgElem, padding, useMaxWidth) {
|
|
4503
|
-
const svgBounds = svgElem.node().getBBox();
|
|
4504
|
-
const sWidth = svgBounds.width;
|
|
4505
|
-
const sHeight = svgBounds.height;
|
|
4506
|
-
log.info(`SVG bounds: ${sWidth}x${sHeight}`, svgBounds);
|
|
4507
|
-
let width = 0;
|
|
4508
|
-
let height = 0;
|
|
4509
|
-
log.info(`Graph bounds: ${width}x${height}`, graph);
|
|
4510
|
-
width = sWidth + padding * 2;
|
|
4511
|
-
height = sHeight + padding * 2;
|
|
4512
|
-
log.info(`Calculated bounds: ${width}x${height}`);
|
|
4513
|
-
configureSvgSize(svgElem, height, width, useMaxWidth);
|
|
4514
|
-
const vBox = `${svgBounds.x - padding} ${svgBounds.y - padding} ${svgBounds.width + 2 * padding} ${svgBounds.height + 2 * padding}`;
|
|
4515
|
-
svgElem.attr("viewBox", vBox);
|
|
4516
|
-
}, "setupGraphViewbox");
|
|
4517
|
-
var themes = {};
|
|
4518
|
-
var getStyles = /* @__PURE__ */ __name((type, userStyles, options) => {
|
|
4519
|
-
let diagramStyles = "";
|
|
4520
|
-
if (type in themes && themes[type]) {
|
|
4521
|
-
diagramStyles = themes[type](options);
|
|
4522
|
-
} else {
|
|
4523
|
-
log.warn(`No theme found for ${type}`);
|
|
4524
|
-
}
|
|
4525
|
-
return ` & {
|
|
4526
|
-
font-family: ${options.fontFamily};
|
|
4527
|
-
font-size: ${options.fontSize};
|
|
4528
|
-
fill: ${options.textColor}
|
|
4529
|
-
}
|
|
4530
|
-
@keyframes edge-animation-frame {
|
|
4531
|
-
from {
|
|
4532
|
-
stroke-dashoffset: 0;
|
|
4533
|
-
}
|
|
4534
|
-
}
|
|
4535
|
-
@keyframes dash {
|
|
4536
|
-
to {
|
|
4537
|
-
stroke-dashoffset: 0;
|
|
4538
|
-
}
|
|
4539
|
-
}
|
|
4540
|
-
& .edge-animation-slow {
|
|
4541
|
-
stroke-dasharray: 9,5 !important;
|
|
4542
|
-
stroke-dashoffset: 900;
|
|
4543
|
-
animation: dash 50s linear infinite;
|
|
4544
|
-
stroke-linecap: round;
|
|
4545
|
-
}
|
|
4546
|
-
& .edge-animation-fast {
|
|
4547
|
-
stroke-dasharray: 9,5 !important;
|
|
4548
|
-
stroke-dashoffset: 900;
|
|
4549
|
-
animation: dash 20s linear infinite;
|
|
4550
|
-
stroke-linecap: round;
|
|
4551
|
-
}
|
|
4552
|
-
/* Classes common for multiple diagrams */
|
|
4553
|
-
|
|
4554
|
-
& .error-icon {
|
|
4555
|
-
fill: ${options.errorBkgColor};
|
|
4556
|
-
}
|
|
4557
|
-
& .error-text {
|
|
4558
|
-
fill: ${options.errorTextColor};
|
|
4559
|
-
stroke: ${options.errorTextColor};
|
|
4560
|
-
}
|
|
4561
|
-
|
|
4562
|
-
& .edge-thickness-normal {
|
|
4563
|
-
stroke-width: 1px;
|
|
4564
|
-
}
|
|
4565
|
-
& .edge-thickness-thick {
|
|
4566
|
-
stroke-width: 3.5px
|
|
4567
|
-
}
|
|
4568
|
-
& .edge-pattern-solid {
|
|
4569
|
-
stroke-dasharray: 0;
|
|
4570
|
-
}
|
|
4571
|
-
& .edge-thickness-invisible {
|
|
4572
|
-
stroke-width: 0;
|
|
4573
|
-
fill: none;
|
|
4574
|
-
}
|
|
4575
|
-
& .edge-pattern-dashed{
|
|
4576
|
-
stroke-dasharray: 3;
|
|
4577
|
-
}
|
|
4578
|
-
.edge-pattern-dotted {
|
|
4579
|
-
stroke-dasharray: 2;
|
|
4580
|
-
}
|
|
4581
|
-
|
|
4582
|
-
& .marker {
|
|
4583
|
-
fill: ${options.lineColor};
|
|
4584
|
-
stroke: ${options.lineColor};
|
|
4585
|
-
}
|
|
4586
|
-
& .marker.cross {
|
|
4587
|
-
stroke: ${options.lineColor};
|
|
4588
|
-
}
|
|
4589
|
-
|
|
4590
|
-
& svg {
|
|
4591
|
-
font-family: ${options.fontFamily};
|
|
4592
|
-
font-size: ${options.fontSize};
|
|
4593
|
-
}
|
|
4594
|
-
& p {
|
|
4595
|
-
margin: 0
|
|
4596
|
-
}
|
|
4597
|
-
|
|
4598
|
-
${diagramStyles}
|
|
4599
|
-
|
|
4600
|
-
${userStyles}
|
|
4601
|
-
`;
|
|
4602
|
-
}, "getStyles");
|
|
4603
|
-
var addStylesForDiagram = /* @__PURE__ */ __name((type, diagramTheme) => {
|
|
4604
|
-
if (diagramTheme !== void 0) {
|
|
4605
|
-
themes[type] = diagramTheme;
|
|
4606
|
-
}
|
|
4607
|
-
}, "addStylesForDiagram");
|
|
4608
|
-
var styles_default = getStyles;
|
|
4609
|
-
var commonDb_exports = {};
|
|
4610
|
-
__export(commonDb_exports, {
|
|
4611
|
-
clear: () => clear,
|
|
4612
|
-
getAccDescription: () => getAccDescription,
|
|
4613
|
-
getAccTitle: () => getAccTitle,
|
|
4614
|
-
getDiagramTitle: () => getDiagramTitle,
|
|
4615
|
-
setAccDescription: () => setAccDescription,
|
|
4616
|
-
setAccTitle: () => setAccTitle,
|
|
4617
|
-
setDiagramTitle: () => setDiagramTitle
|
|
4618
|
-
});
|
|
4619
|
-
var accTitle = "";
|
|
4620
|
-
var diagramTitle = "";
|
|
4621
|
-
var accDescription = "";
|
|
4622
|
-
var sanitizeText2 = /* @__PURE__ */ __name((txt) => sanitizeText(txt, getConfig()), "sanitizeText");
|
|
4623
|
-
var clear = /* @__PURE__ */ __name(() => {
|
|
4624
|
-
accTitle = "";
|
|
4625
|
-
accDescription = "";
|
|
4626
|
-
diagramTitle = "";
|
|
4627
|
-
}, "clear");
|
|
4628
|
-
var setAccTitle = /* @__PURE__ */ __name((txt) => {
|
|
4629
|
-
accTitle = sanitizeText2(txt).replace(/^\s+/g, "");
|
|
4630
|
-
}, "setAccTitle");
|
|
4631
|
-
var getAccTitle = /* @__PURE__ */ __name(() => accTitle, "getAccTitle");
|
|
4632
|
-
var setAccDescription = /* @__PURE__ */ __name((txt) => {
|
|
4633
|
-
accDescription = sanitizeText2(txt).replace(/\n\s+/g, "\n");
|
|
4634
|
-
}, "setAccDescription");
|
|
4635
|
-
var getAccDescription = /* @__PURE__ */ __name(() => accDescription, "getAccDescription");
|
|
4636
|
-
var setDiagramTitle = /* @__PURE__ */ __name((txt) => {
|
|
4637
|
-
diagramTitle = sanitizeText2(txt);
|
|
4638
|
-
}, "setDiagramTitle");
|
|
4639
|
-
var getDiagramTitle = /* @__PURE__ */ __name(() => diagramTitle, "getDiagramTitle");
|
|
4640
|
-
var log2 = log;
|
|
4641
|
-
var setLogLevel2 = setLogLevel;
|
|
4642
|
-
var getConfig2 = getConfig;
|
|
4643
|
-
var setConfig2 = setConfig;
|
|
4644
|
-
var defaultConfig2 = defaultConfig;
|
|
4645
|
-
var sanitizeText3 = /* @__PURE__ */ __name((text2) => sanitizeText(text2, getConfig2()), "sanitizeText");
|
|
4646
|
-
var setupGraphViewbox2 = setupGraphViewbox;
|
|
4647
|
-
var getCommonDb = /* @__PURE__ */ __name(() => {
|
|
4648
|
-
return commonDb_exports;
|
|
4649
|
-
}, "getCommonDb");
|
|
4650
|
-
var diagrams = {};
|
|
4651
|
-
var registerDiagram = /* @__PURE__ */ __name((id, diagram, detector) => {
|
|
4652
|
-
if (diagrams[id]) {
|
|
4653
|
-
log2.warn(`Diagram with id ${id} already registered. Overwriting.`);
|
|
4654
|
-
}
|
|
4655
|
-
diagrams[id] = diagram;
|
|
4656
|
-
if (detector) {
|
|
4657
|
-
addDetector(id, detector);
|
|
4658
|
-
}
|
|
4659
|
-
addStylesForDiagram(id, diagram.styles);
|
|
4660
|
-
diagram.injectUtils?.(
|
|
4661
|
-
log2,
|
|
4662
|
-
setLogLevel2,
|
|
4663
|
-
getConfig2,
|
|
4664
|
-
sanitizeText3,
|
|
4665
|
-
setupGraphViewbox2,
|
|
4666
|
-
getCommonDb(),
|
|
4667
|
-
() => {
|
|
4668
|
-
}
|
|
4669
|
-
);
|
|
4670
|
-
}, "registerDiagram");
|
|
4671
|
-
var getDiagram = /* @__PURE__ */ __name((name) => {
|
|
4672
|
-
if (name in diagrams) {
|
|
4673
|
-
return diagrams[name];
|
|
4674
|
-
}
|
|
4675
|
-
throw new DiagramNotFoundError(name);
|
|
4676
|
-
}, "getDiagram");
|
|
4677
|
-
var DiagramNotFoundError = class extends Error {
|
|
4678
|
-
static {
|
|
4679
|
-
__name(this, "DiagramNotFoundError");
|
|
4680
|
-
}
|
|
4681
|
-
constructor(name) {
|
|
4682
|
-
super(`Diagram ${name} not found.`);
|
|
4683
|
-
}
|
|
4684
|
-
};
|
|
4685
|
-
/*! Bundled license information:
|
|
4686
|
-
|
|
4687
|
-
dompurify/dist/purify.es.mjs:
|
|
4688
|
-
(*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE *)
|
|
4689
|
-
*/
|
|
4690
|
-
|
|
4691
|
-
export { UnknownDiagramError, addDirective, assignWithDepth_default, calculateMathMLDimensions, channel_default2 as channel_default, clear, commonDb_exports, common_default, configureSvgSize, darken_default, defaultConfig, defaultConfig2, defaultConfig_default, detectType, detectors, directiveRegex, evaluate, frontMatterRegex, getAccDescription, getAccTitle, getConfig, getConfig2, getDiagram, getDiagramLoader, getDiagramTitle, getSiteConfig, getThemeVariables3, getUrl, getUserDefinedConfig, hasKatex, is_dark_default, lighten_default, lineBreakRegex, parseGenericTypes, purify, registerDiagram, registerLazyLoadedDiagrams, renderKatexSanitized, reset, rgba_default, sanitizeDirective, sanitizeText, sanitizeText3, saveConfigFromInitialize, setAccDescription, setAccTitle, setConfig, setConfig2, setDiagramTitle, setSiteConfig, setupGraphViewbox, setupGraphViewbox2, styles_default, themes_default, updateSiteConfig };
|
|
4692
|
-
//# sourceMappingURL=chunk-HNKEYT4A.mjs.map
|
|
4693
|
-
//# sourceMappingURL=chunk-HNKEYT4A.mjs.map
|