@wandox/sdk 0.1.0
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/README.md +59 -0
- package/dist/arc-BJMRTG9S.cjs +1 -0
- package/dist/arc-Vdco0qfw.js +83 -0
- package/dist/architectureDiagram-3BPJPVTR-BjEqcvey.js +4695 -0
- package/dist/architectureDiagram-3BPJPVTR-BvjJfAkh.cjs +36 -0
- package/dist/blockDiagram-GPEHLZMM-B1xf7RE9.js +2427 -0
- package/dist/blockDiagram-GPEHLZMM-B5VqovGY.cjs +132 -0
- package/dist/c4Diagram-AAUBKEIU-C4kjMRea.js +1578 -0
- package/dist/c4Diagram-AAUBKEIU-Ck5uEnJI.cjs +10 -0
- package/dist/channel-DlRtLuYv.js +5 -0
- package/dist/channel-Dm_yrRYJ.cjs +1 -0
- package/dist/chunk-2J33WTMH-CG2n_n4y.cjs +1 -0
- package/dist/chunk-2J33WTMH-CWvmGb4H.js +20 -0
- package/dist/chunk-4BX2VUAB-Bq3GzsD8.js +9 -0
- package/dist/chunk-4BX2VUAB-CdMctZeT.cjs +1 -0
- package/dist/chunk-55IACEB6-BdJhzL0d.js +8 -0
- package/dist/chunk-55IACEB6-sHyHtvg8.cjs +1 -0
- package/dist/chunk-727SXJPM-D-Vmam30.cjs +206 -0
- package/dist/chunk-727SXJPM-DmruCqjM.js +1529 -0
- package/dist/chunk-AQP2D5EJ-CWhKjcV3.cjs +231 -0
- package/dist/chunk-AQP2D5EJ-Ca0ak6w7.js +1399 -0
- package/dist/chunk-FMBD7UC4-CqV0NWQQ.js +19 -0
- package/dist/chunk-FMBD7UC4-DOxtd0OO.cjs +15 -0
- package/dist/chunk-ND2GUHAM-6EMX5Mu8.js +68 -0
- package/dist/chunk-ND2GUHAM-BXeDBtSC.cjs +1 -0
- package/dist/chunk-QZHKN3VN-B7FSI55w.js +15 -0
- package/dist/chunk-QZHKN3VN-CbbdNKnD.cjs +1 -0
- package/dist/classDiagram-4FO5ZUOK-0Kaf7WfA.js +16 -0
- package/dist/classDiagram-4FO5ZUOK-C4it2xBI.cjs +1 -0
- package/dist/classDiagram-v2-Q7XG4LA2-Byom5adL.js +16 -0
- package/dist/classDiagram-v2-Q7XG4LA2-C4it2xBI.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-CuUv9oIm.js +2606 -0
- package/dist/cose-bilkent-S5V4N54A-Dh6nTopA.cjs +1 -0
- package/dist/cytoscape.esm-Cp8cXbK2.js +18729 -0
- package/dist/cytoscape.esm-fcqEUasK.cjs +331 -0
- package/dist/dagre-BM42HDAG-CwxJjZ2n.cjs +4 -0
- package/dist/dagre-BM42HDAG-DMBidMxP.js +448 -0
- package/dist/defaultLocale-BDVPUiG2.js +171 -0
- package/dist/defaultLocale-k2G_58r6.cjs +1 -0
- package/dist/diagram-2AECGRRQ-B2a4nXgJ.js +221 -0
- package/dist/diagram-2AECGRRQ-r7De7taS.cjs +43 -0
- package/dist/diagram-5GNKFQAL-CDiO79WC.cjs +10 -0
- package/dist/diagram-5GNKFQAL-DrHBNZzF.js +123 -0
- package/dist/diagram-KO2AKTUF-BcjWCXZr.js +466 -0
- package/dist/diagram-KO2AKTUF-CDlJCxVO.cjs +3 -0
- package/dist/diagram-LMA3HP47-BXFSAyNV.cjs +24 -0
- package/dist/diagram-LMA3HP47-DJxmyqn0.js +143 -0
- package/dist/diagram-OG6HWLK6-ATK__ca8.js +531 -0
- package/dist/diagram-OG6HWLK6-CgIyEO8_.cjs +24 -0
- package/dist/erDiagram-TEJ5UH35-D4baWNzQ.js +900 -0
- package/dist/erDiagram-TEJ5UH35-Dyuc5EB6.cjs +85 -0
- package/dist/flowDiagram-I6XJVG4X-BMZOncyU.js +1635 -0
- package/dist/flowDiagram-I6XJVG4X-C45fICr4.cjs +162 -0
- package/dist/ganttDiagram-6RSMTGT7-CiYZmmke.js +2526 -0
- package/dist/ganttDiagram-6RSMTGT7-Cxoj6IK8.cjs +292 -0
- package/dist/gitGraphDiagram-PVQCEYII-CQ9bNuwN.js +828 -0
- package/dist/gitGraphDiagram-PVQCEYII-rlaY9dfj.cjs +106 -0
- package/dist/graph-CBizzZ7K.js +1545 -0
- package/dist/graph-V5BNIbHU.cjs +1 -0
- package/dist/index-jBRold1l.js +173159 -0
- package/dist/index-sFrjovbM.cjs +804 -0
- package/dist/index.d.ts +54 -0
- package/dist/infoDiagram-5YYISTIA-CAzYIvUX.js +24 -0
- package/dist/infoDiagram-5YYISTIA-zX5rQglQ.cjs +2 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/ishikawaDiagram-YF4QCWOH-09prKBsn.cjs +70 -0
- package/dist/ishikawaDiagram-YF4QCWOH-Co8BnN24.js +622 -0
- package/dist/journeyDiagram-JHISSGLW-DkdWRF_-.cjs +139 -0
- package/dist/journeyDiagram-JHISSGLW-riCLiMCC.js +836 -0
- package/dist/kanban-definition-UN3LZRKU-DWipOCsx.cjs +89 -0
- package/dist/kanban-definition-UN3LZRKU-SRyCSn2H.js +725 -0
- package/dist/katex-Cf_UVKIT.cjs +257 -0
- package/dist/katex-RNjvZ8pg.js +11681 -0
- package/dist/layout-CbksXFOD.js +1728 -0
- package/dist/layout-Dh52gsIJ.cjs +1 -0
- package/dist/linear-C3xSMJV8.cjs +1 -0
- package/dist/linear-CmUCzX9U.js +259 -0
- package/dist/mermaid.core-BzNKr-OJ.cjs +308 -0
- package/dist/mermaid.core-CdBIz6FY.js +15475 -0
- package/dist/mindmap-definition-RKZ34NQL-Cs63oyIX.cjs +96 -0
- package/dist/mindmap-definition-RKZ34NQL-Gcma5iTd.js +830 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/pieDiagram-4H26LBE5-CBGkD8dp.cjs +30 -0
- package/dist/pieDiagram-4H26LBE5-DSL8cVK1.js +164 -0
- package/dist/quadrantDiagram-W4KKPZXB-D3nCWRjF.cjs +7 -0
- package/dist/quadrantDiagram-W4KKPZXB-uod6bhUy.js +1026 -0
- package/dist/requirementDiagram-4Y6WPE33-Bc_6y7SM.js +884 -0
- package/dist/requirementDiagram-4Y6WPE33-D2mHlh5i.cjs +84 -0
- package/dist/sankeyDiagram-5OEKKPKP-DL_kXejW.cjs +40 -0
- package/dist/sankeyDiagram-5OEKKPKP-DMsjY4G4.js +847 -0
- package/dist/sequenceDiagram-3UESZ5HK-CBGalGOV.cjs +162 -0
- package/dist/sequenceDiagram-3UESZ5HK-CH2Z-Pis.js +2901 -0
- package/dist/stateDiagram-AJRCARHV-gEqlAI6t.js +263 -0
- package/dist/stateDiagram-AJRCARHV-rNMrAI-A.cjs +1 -0
- package/dist/stateDiagram-v2-BHNVJYJU-CDj7L1wi.js +16 -0
- package/dist/stateDiagram-v2-BHNVJYJU-LLlFJ1GM.cjs +1 -0
- package/dist/timeline-definition-PNZ67QCA-Bbuv3uu-.cjs +120 -0
- package/dist/timeline-definition-PNZ67QCA-DrGFbQdC.js +1068 -0
- package/dist/types.d.ts +295 -0
- package/dist/vennDiagram-CIIHVFJN-CGcAwVxU.js +1564 -0
- package/dist/vennDiagram-CIIHVFJN-DsSjXluJ.cjs +34 -0
- package/dist/wandox.cjs +1 -0
- package/dist/wandox.css +1 -0
- package/dist/wandox.js +6 -0
- package/dist/wandox.umd.js +4172 -0
- package/dist/wardley-L42UT6IY-DUnkyH_z.js +22539 -0
- package/dist/wardley-L42UT6IY-tDp0NbFW.cjs +165 -0
- package/dist/wardleyDiagram-YWT4CUSO-CB_Qa4lR.js +684 -0
- package/dist/wardleyDiagram-YWT4CUSO-D0BUmvVW.cjs +78 -0
- package/dist/xychartDiagram-2RQKCTM6-Bcq-ACuw.js +1342 -0
- package/dist/xychartDiagram-2RQKCTM6-BjeAPKLo.cjs +7 -0
- package/package.json +42 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
"use strict";var ky=Object.defineProperty;var Ty=(e,t,r)=>t in e?ky(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var mt=(e,t,r)=>Ty(e,typeof t!="symbol"?t+"":t,r);const me=require("./index-sFrjovbM.cjs");var gc=Object.defineProperty,f=(e,t)=>gc(e,"name",{value:t,configurable:!0}),mc=(e,t)=>{for(var r in t)gc(e,r,{get:t[r],enumerable:!0})},Ne={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},D={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},gn=f(function(e="fatal"){let t=Ne.fatal;typeof e=="string"?e.toLowerCase()in Ne&&(t=Ne[e]):typeof e=="number"&&(t=e),D.trace=()=>{},D.debug=()=>{},D.info=()=>{},D.warn=()=>{},D.error=()=>{},D.fatal=()=>{},t<=Ne.fatal&&(D.fatal=void 0),t<=Ne.error&&(D.error=void 0),t<=Ne.warn&&(D.warn=void 0),t<=Ne.info&&(D.info=void 0),t<=Ne.debug&&(D.debug=void 0),t<=Ne.trace&&(D.trace=void 0)},"setLogLevel");const Bs={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;switch(i){case"r":return Bs.hue2rgb(o,s,e+1/3)*255;case"g":return Bs.hue2rgb(o,s,e)*255;case"b":return Bs.hue2rgb(o,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),o=Math.min(e,t,r),a=(s+o)/2;if(i==="l")return a*100;if(s===o)return 0;const n=s-o,l=a>.5?n/(2-s-o):n/(s+o);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Sy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},wy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},it={channel:Bs,lang:Sy,unit:wy},Qe={};for(let e=0;e<=255;e++)Qe[e]=it.unit.dec2hex(e);const Nt={ALL:0,RGB:1,HSL:2};let _y=class{constructor(){this.type=Nt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Nt.ALL}is(t){return this.type===t}};class By{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new _y}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Nt.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=it.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=it.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=it.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=it.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=it.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=it.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Nt.HSL)&&r!==void 0?r:(this._ensureHSL(),it.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Nt.RGB)&&r!==void 0?r:(this._ensureRGB(),it.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Nt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Nt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Nt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Nt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Nt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Nt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const go=new By({r:0,g:0,b:0,a:0},"transparent"),Yr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Yr.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,o=s%4===0,a=s>4,n=a?1:17,l=a?8:4,h=o?0:-1,c=a?255:15;return go.set({r:(i>>l*(h+3)&c)*n,g:(i>>l*(h+2)&c)*n,b:(i>>l*(h+1)&c)*n,a:o?(i&c)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Qe[Math.round(t)]}${Qe[Math.round(r)]}${Qe[Math.round(i)]}${Qe[Math.round(s*255)]}`:`#${Qe[Math.round(t)]}${Qe[Math.round(r)]}${Qe[Math.round(i)]}`}},pr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(pr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return it.channel.clamp.h(parseFloat(r)*.9);case"rad":return it.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return it.channel.clamp.h(parseFloat(r)*360)}}return it.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(pr.re);if(!r)return;const[,i,s,o,a,n]=r;return go.set({h:pr._hue2deg(i),s:it.channel.clamp.s(parseFloat(s)),l:it.channel.clamp.l(parseFloat(o)),a:a?it.channel.clamp.a(n?parseFloat(a)/100:parseFloat(a)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%, ${s})`:`hsl(${it.lang.round(t)}, ${it.lang.round(r)}%, ${it.lang.round(i)}%)`}},zi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=zi.colors[e];if(t)return Yr.parse(t)},stringify:e=>{const t=Yr.stringify(e);for(const r in zi.colors)if(zi.colors[r]===t)return r}},Mi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Mi.re);if(!r)return;const[,i,s,o,a,n,l,h,c]=r;return go.set({r:it.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:it.channel.clamp.g(a?parseFloat(o)*2.55:parseFloat(o)),b:it.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:h?it.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)}, ${it.lang.round(s)})`:`rgb(${it.lang.round(t)}, ${it.lang.round(r)}, ${it.lang.round(i)})`}},Te={format:{keyword:zi,hex:Yr,rgb:Mi,rgba:Mi,hsl:pr,hsla:pr},parse:e=>{if(typeof e!="string")return e;const t=Yr.parse(e)||Mi.parse(e)||pr.parse(e)||zi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Nt.HSL)||e.data.r===void 0?pr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Mi.stringify(e):Yr.stringify(e)},yc=(e,t)=>{const r=Te.parse(e);for(const i in t)r[i]=it.channel.clamp[i](t[i]);return Te.stringify(r)},Ye=(e,t,r=0,i=1)=>{if(typeof e!="number")return yc(e,{a:t});const s=go.set({r:it.channel.clamp.r(e),g:it.channel.clamp.g(t),b:it.channel.clamp.b(r),a:it.channel.clamp.a(i)});return Te.stringify(s)},vy=e=>{const{r:t,g:r,b:i}=Te.parse(e),s=.2126*it.channel.toLinear(t)+.7152*it.channel.toLinear(r)+.0722*it.channel.toLinear(i);return it.lang.round(s)},Ly=e=>vy(e)>=.5,he=e=>!Ly(e),mn=(e,t,r)=>{const i=Te.parse(e),s=i[t],o=it.channel.clamp[t](s+r);return s!==o&&(i[t]=o),Te.stringify(i)},A=(e,t)=>mn(e,"l",t),E=(e,t)=>mn(e,"l",-t),x=(e,t)=>{const r=Te.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return yc(e,i)},Fy=(e,t,r=50)=>{const{r:i,g:s,b:o,a}=Te.parse(e),{r:n,g:l,b:h,a:c}=Te.parse(t),u=r/100,p=u*2-1,d=a-c,g=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,m=1-g,C=i*g+n*m,b=s*g+l*m,k=o*g+h*m,S=a*u+c*(1-u);return Ye(C,b,k,S)},v=(e,t=100)=>{const r=Te.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Fy(r,e,t)};/*! @license DOMPurify 3.4.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.4.7/LICENSE */function zl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Ay(e){if(Array.isArray(e))return e}function Ey(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,o,a,n=[],l=!0,h=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(i=o.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(c){h=!0,s=c}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(h)throw s}}return n}}function My(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $y(e,t){return Ay(e)||Ey(e,t)||Oy(e,t)||My()}function Oy(e,t){if(e){if(typeof e=="string")return zl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zl(e,t):void 0}}const Cc=Object.entries,Wl=Object.setPrototypeOf,Iy=Object.isFrozen,Dy=Object.getPrototypeOf,Py=Object.getOwnPropertyDescriptor;let Qt=Object.freeze,ne=Object.seal,Rr=Object.create,xc=typeof Reflect<"u"&&Reflect,ga=xc.apply,ma=xc.construct;Qt||(Qt=function(t){return t});ne||(ne=function(t){return t});ga||(ga=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return t.apply(r,s)});ma||(ma=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const $r=Lt(Array.prototype.forEach),Ry=Lt(Array.prototype.lastIndexOf),Hl=Lt(Array.prototype.pop),Or=Lt(Array.prototype.push),qy=Lt(Array.prototype.splice),jt=Array.isArray,$i=Lt(String.prototype.toLowerCase),Zo=Lt(String.prototype.toString),Ul=Lt(String.prototype.match),Ir=Lt(String.prototype.replace),Yl=Lt(String.prototype.indexOf),Ny=Lt(String.prototype.trim),zy=Lt(Number.prototype.toString),Wy=Lt(Boolean.prototype.toString),Gl=typeof BigInt>"u"?null:Lt(BigInt.prototype.toString),Xl=typeof Symbol>"u"?null:Lt(Symbol.prototype.toString),St=Lt(Object.prototype.hasOwnProperty),wi=Lt(Object.prototype.toString),It=Lt(RegExp.prototype.test),_i=Hy(TypeError);function Lt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return ga(e,t,i)}}function Hy(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return ma(e,r)}}function at(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$i;if(Wl&&Wl(e,null),!jt(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const o=r(s);o!==s&&(Iy(t)||(t[i]=o),s=o)}e[s]=!0}return e}function Uy(e){for(let t=0;t<e.length;t++)St(e,t)||(e[t]=null);return e}function qt(e){const t=Rr(null);for(const i of Cc(e)){var r=$y(i,2);const s=r[0],o=r[1];St(e,s)&&(jt(o)?t[s]=Uy(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=qt(o):t[s]=o)}return t}function Yy(e){switch(typeof e){case"string":return e;case"number":return zy(e);case"boolean":return Wy(e);case"bigint":return Gl?Gl(e):"0";case"symbol":return Xl?Xl(e):"Symbol()";case"undefined":return wi(e);case"function":case"object":{if(e===null)return wi(e);const t=e,r=Fe(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:wi(i)}return wi(e)}default:return wi(e)}}function Fe(e,t){for(;e!==null;){const i=Py(e,t);if(i){if(i.get)return Lt(i.get);if(typeof i.value=="function")return Lt(i.value)}e=Dy(e)}function r(){return null}return r}function Gy(e){try{return It(e,""),!0}catch{return!1}}const jl=Qt(["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"]),Ko=Qt(["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","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Qo=Qt(["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"]),Xy=Qt(["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"]),Jo=Qt(["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"]),jy=Qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Vl=Qt(["#text"]),Zl=Qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","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"]),ta=Qt(["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","mask-type","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"]),Kl=Qt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),gs=Qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vy=ne(/{{[\w\W]*|^[\w\W]*}}/g),Zy=ne(/<%[\w\W]*|^[\w\W]*%>/g),Ky=ne(/\${[\w\W]*/g),Qy=ne(/^data-[\-\w.\u00B7-\uFFFF]+$/),Jy=ne(/^aria-[\-\w]+$/),Ql=ne(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),t0=ne(/^(?:\w+script|data):/i),e0=ne(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),r0=ne(/^html$/i),i0=ne(/^[a-z][.\w]*(-[.\w]+)+$/i),Le={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},s0=function(){return typeof window>"u"?null:window},o0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return null}},Jl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function bc(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:s0();const t=K=>bc(K);if(t.version="3.4.7",t.removed=[],!e||!e.document||e.document.nodeType!==Le.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,h=e.NamedNodeMap;h===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const c=e.DOMParser,u=e.trustedTypes,p=n.prototype,d=Fe(p,"cloneNode"),y=Fe(p,"remove"),g=Fe(p,"nextSibling"),m=Fe(p,"childNodes"),C=Fe(p,"parentNode"),b=Fe(p,"shadowRoot"),k=Fe(p,"attributes"),S=a&&a.prototype?Fe(a.prototype,"nodeType"):null,w=a&&a.prototype?Fe(a.prototype,"nodeName"):null;if(typeof o=="function"){const K=r.createElement("template");K.content&&K.content.ownerDocument&&(r=K.content.ownerDocument)}let _,F="";const L=r,q=L.implementation,M=L.createNodeIterator,$=L.createDocumentFragment,H=L.getElementsByTagName,N=i.importNode;let I=Jl();t.isSupported=typeof Cc=="function"&&typeof C=="function"&&q&&q.createHTMLDocument!==void 0;const z=Vy,P=Zy,W=Ky,R=Qy,B=Jy,U=t0,At=e0,Gt=i0;let Rt=Ql,lt=null;const wt=at({},[...jl,...Ko,...Qo,...Jo,...Vl]);let ut=null;const ce=at({},[...Zl,...ta,...Kl,...gs]);let yt=Object.seal(Rr(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ke=null,st=null;const ot=Object.seal(Rr(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let kt=!0,Ot=!0,we=!1,ue=!0,de=!1,vr=!0,pe=!1,qo=!1,No=!1,Lr=!1,ls=!1,hs=!1,Sl=!0,wl=!1;const _l="user-content-";let zo=!0,ki=!1,Fr={},_e=null;const Wo=at({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Bl=null;const vl=at({},["audio","video","img","source","image","track"]);let Ho=null;const Ll=at({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),cs="http://www.w3.org/1998/Math/MathML",us="http://www.w3.org/2000/svg",Be="http://www.w3.org/1999/xhtml";let Ar=Be,Uo=!1,Yo=null;const fy=at({},[cs,us,Be],Zo);let Go=at({},["mi","mo","mn","ms","mtext"]),Xo=at({},["annotation-xml"]);const gy=at({},["title","style","font","a","script"]);let Ti=null;const my=["application/xhtml+xml","text/html"],yy="text/html";let _t=null,Er=null;const Cy=r.createElement("form"),Fl=function(T){return T instanceof RegExp||T instanceof Function},jo=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Er&&Er===T)return;(!T||typeof T!="object")&&(T={}),T=qt(T),Ti=my.indexOf(T.PARSER_MEDIA_TYPE)===-1?yy:T.PARSER_MEDIA_TYPE,_t=Ti==="application/xhtml+xml"?Zo:$i,lt=St(T,"ALLOWED_TAGS")&&jt(T.ALLOWED_TAGS)?at({},T.ALLOWED_TAGS,_t):wt,ut=St(T,"ALLOWED_ATTR")&&jt(T.ALLOWED_ATTR)?at({},T.ALLOWED_ATTR,_t):ce,Yo=St(T,"ALLOWED_NAMESPACES")&&jt(T.ALLOWED_NAMESPACES)?at({},T.ALLOWED_NAMESPACES,Zo):fy,Ho=St(T,"ADD_URI_SAFE_ATTR")&&jt(T.ADD_URI_SAFE_ATTR)?at(qt(Ll),T.ADD_URI_SAFE_ATTR,_t):Ll,Bl=St(T,"ADD_DATA_URI_TAGS")&&jt(T.ADD_DATA_URI_TAGS)?at(qt(vl),T.ADD_DATA_URI_TAGS,_t):vl,_e=St(T,"FORBID_CONTENTS")&&jt(T.FORBID_CONTENTS)?at({},T.FORBID_CONTENTS,_t):Wo,Ke=St(T,"FORBID_TAGS")&&jt(T.FORBID_TAGS)?at({},T.FORBID_TAGS,_t):qt({}),st=St(T,"FORBID_ATTR")&&jt(T.FORBID_ATTR)?at({},T.FORBID_ATTR,_t):qt({}),Fr=St(T,"USE_PROFILES")?T.USE_PROFILES&&typeof T.USE_PROFILES=="object"?qt(T.USE_PROFILES):T.USE_PROFILES:!1,kt=T.ALLOW_ARIA_ATTR!==!1,Ot=T.ALLOW_DATA_ATTR!==!1,we=T.ALLOW_UNKNOWN_PROTOCOLS||!1,ue=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,de=T.SAFE_FOR_TEMPLATES||!1,vr=T.SAFE_FOR_XML!==!1,pe=T.WHOLE_DOCUMENT||!1,Lr=T.RETURN_DOM||!1,ls=T.RETURN_DOM_FRAGMENT||!1,hs=T.RETURN_TRUSTED_TYPE||!1,No=T.FORCE_BODY||!1,Sl=T.SANITIZE_DOM!==!1,wl=T.SANITIZE_NAMED_PROPS||!1,zo=T.KEEP_CONTENT!==!1,ki=T.IN_PLACE||!1,Rt=Gy(T.ALLOWED_URI_REGEXP)?T.ALLOWED_URI_REGEXP:Ql,Ar=typeof T.NAMESPACE=="string"?T.NAMESPACE:Be,Go=St(T,"MATHML_TEXT_INTEGRATION_POINTS")&&T.MATHML_TEXT_INTEGRATION_POINTS&&typeof T.MATHML_TEXT_INTEGRATION_POINTS=="object"?qt(T.MATHML_TEXT_INTEGRATION_POINTS):at({},["mi","mo","mn","ms","mtext"]),Xo=St(T,"HTML_INTEGRATION_POINTS")&&T.HTML_INTEGRATION_POINTS&&typeof T.HTML_INTEGRATION_POINTS=="object"?qt(T.HTML_INTEGRATION_POINTS):at({},["annotation-xml"]);const O=St(T,"CUSTOM_ELEMENT_HANDLING")&&T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING=="object"?qt(T.CUSTOM_ELEMENT_HANDLING):Rr(null);if(yt=Rr(null),St(O,"tagNameCheck")&&Fl(O.tagNameCheck)&&(yt.tagNameCheck=O.tagNameCheck),St(O,"attributeNameCheck")&&Fl(O.attributeNameCheck)&&(yt.attributeNameCheck=O.attributeNameCheck),St(O,"allowCustomizedBuiltInElements")&&typeof O.allowCustomizedBuiltInElements=="boolean"&&(yt.allowCustomizedBuiltInElements=O.allowCustomizedBuiltInElements),de&&(Ot=!1),ls&&(Lr=!0),Fr&&(lt=at({},Vl),ut=Rr(null),Fr.html===!0&&(at(lt,jl),at(ut,Zl)),Fr.svg===!0&&(at(lt,Ko),at(ut,ta),at(ut,gs)),Fr.svgFilters===!0&&(at(lt,Qo),at(ut,ta),at(ut,gs)),Fr.mathMl===!0&&(at(lt,Jo),at(ut,Kl),at(ut,gs))),ot.tagCheck=null,ot.attributeCheck=null,St(T,"ADD_TAGS")&&(typeof T.ADD_TAGS=="function"?ot.tagCheck=T.ADD_TAGS:jt(T.ADD_TAGS)&&(lt===wt&&(lt=qt(lt)),at(lt,T.ADD_TAGS,_t))),St(T,"ADD_ATTR")&&(typeof T.ADD_ATTR=="function"?ot.attributeCheck=T.ADD_ATTR:jt(T.ADD_ATTR)&&(ut===ce&&(ut=qt(ut)),at(ut,T.ADD_ATTR,_t))),St(T,"ADD_URI_SAFE_ATTR")&&jt(T.ADD_URI_SAFE_ATTR)&&at(Ho,T.ADD_URI_SAFE_ATTR,_t),St(T,"FORBID_CONTENTS")&&jt(T.FORBID_CONTENTS)&&(_e===Wo&&(_e=qt(_e)),at(_e,T.FORBID_CONTENTS,_t)),St(T,"ADD_FORBID_CONTENTS")&&jt(T.ADD_FORBID_CONTENTS)&&(_e===Wo&&(_e=qt(_e)),at(_e,T.ADD_FORBID_CONTENTS,_t)),zo&&(lt["#text"]=!0),pe&&at(lt,["html","head","body"]),lt.table&&(at(lt,["tbody"]),delete Ke.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw _i('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw _i('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');_=T.TRUSTED_TYPES_POLICY,F=_.createHTML("")}else _===void 0&&(_=o0(u,s)),_!==null&&typeof F=="string"&&(F=_.createHTML(""));(I.uponSanitizeElement.length>0||I.uponSanitizeAttribute.length>0)&<===wt&&(lt=qt(lt)),I.uponSanitizeAttribute.length>0&&ut===ce&&(ut=qt(ut)),Qt&&Qt(T),Er=T},Al=at({},[...Ko,...Qo,...Xy]),El=at({},[...Jo,...jy]),xy=function(T){let O=C(T);(!O||!O.tagName)&&(O={namespaceURI:Ar,tagName:"template"});const Y=$i(T.tagName),ft=$i(O.tagName);return Yo[T.namespaceURI]?T.namespaceURI===us?O.namespaceURI===Be?Y==="svg":O.namespaceURI===cs?Y==="svg"&&(ft==="annotation-xml"||Go[ft]):!!Al[Y]:T.namespaceURI===cs?O.namespaceURI===Be?Y==="math":O.namespaceURI===us?Y==="math"&&Xo[ft]:!!El[Y]:T.namespaceURI===Be?O.namespaceURI===us&&!Xo[ft]||O.namespaceURI===cs&&!Go[ft]?!1:!El[Y]&&(gy[Y]||!Al[Y]):!!(Ti==="application/xhtml+xml"&&Yo[T.namespaceURI]):!1},fe=function(T){Or(t.removed,{element:T});try{C(T).removeChild(T)}catch{y(T)}},nr=function(T,O){try{Or(t.removed,{attribute:O.getAttributeNode(T),from:O})}catch{Or(t.removed,{attribute:null,from:O})}if(O.removeAttribute(T),T==="is")if(Lr||ls)try{fe(O)}catch{}else try{O.setAttribute(T,"")}catch{}},Ml=function(T){let O=null,Y=null;if(No)T="<remove></remove>"+T;else{const Ct=Ul(T,/^[\r\n\t ]+/);Y=Ct&&Ct[0]}Ti==="application/xhtml+xml"&&Ar===Be&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");const ft=_?_.createHTML(T):T;if(Ar===Be)try{O=new c().parseFromString(ft,Ti)}catch{}if(!O||!O.documentElement){O=q.createDocument(Ar,"template",null);try{O.documentElement.innerHTML=Uo?F:ft}catch{}}const ht=O.body||O.documentElement;return T&&Y&&ht.insertBefore(r.createTextNode(Y),ht.childNodes[0]||null),Ar===Be?H.call(O,pe?"html":"body")[0]:pe?O.documentElement:ht},$l=function(T){return M.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ol=function(T){T.normalize();const O=M.call(T.ownerDocument||T,T,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let Y=O.nextNode();for(;Y;){let ft=Y.data;$r([z,P,W],ht=>{ft=Ir(ft,ht," ")}),Y.data=ft,Y=O.nextNode()}},ds=function(T){const O=w?w(T):null;return typeof O!="string"||_t(O)!=="form"?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||T.attributes!==k(T)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function"||T.nodeType!==S(T)||T.childNodes!==m(T)},Si=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return S(T)===Le.documentFragment}catch{return!1}},ps=function(T){if(!S||typeof T!="object"||T===null)return!1;try{return typeof S(T)=="number"}catch{return!1}};function qe(K,T,O){$r(K,Y=>{Y.call(t,T,O,Er)})}const Il=function(T){let O=null;if(qe(I.beforeSanitizeElements,T,null),ds(T))return fe(T),!0;const Y=_t(T.nodeName);if(qe(I.uponSanitizeElement,T,{tagName:Y,allowedTags:lt}),vr&&T.hasChildNodes()&&!ps(T.firstElementChild)&&It(/<[/\w!]/g,T.innerHTML)&&It(/<[/\w!]/g,T.textContent)||vr&&T.namespaceURI===Be&&Y==="style"&&ps(T.firstElementChild)||T.nodeType===Le.progressingInstruction||vr&&T.nodeType===Le.comment&&It(/<[/\w]/g,T.data))return fe(T),!0;if(Ke[Y]||!(ot.tagCheck instanceof Function&&ot.tagCheck(Y))&&!lt[Y]){if(!Ke[Y]&&Pl(Y)&&(yt.tagNameCheck instanceof RegExp&&It(yt.tagNameCheck,Y)||yt.tagNameCheck instanceof Function&&yt.tagNameCheck(Y)))return!1;if(zo&&!_e[Y]){const ht=C(T),Ct=m(T);if(Ct&&ht){const oe=Ct.length;for(let ve=oe-1;ve>=0;--ve){const ge=d(Ct[ve],!0);ht.insertBefore(ge,g(T))}}}return fe(T),!0}return(S?S(T):T.nodeType)===Le.element&&!xy(T)||(Y==="noscript"||Y==="noembed"||Y==="noframes")&&It(/<\/no(script|embed|frames)/i,T.innerHTML)?(fe(T),!0):(de&&T.nodeType===Le.text&&(O=T.textContent,$r([z,P,W],ht=>{O=Ir(O,ht," ")}),T.textContent!==O&&(Or(t.removed,{element:T.cloneNode()}),T.textContent=O)),qe(I.afterSanitizeElements,T,null),!1)},Dl=function(T,O,Y){if(st[O]||Sl&&(O==="id"||O==="name")&&(Y in r||Y in Cy))return!1;const ft=ut[O]||ot.attributeCheck instanceof Function&&ot.attributeCheck(O,T);if(!(Ot&&!st[O]&&It(R,O))){if(!(kt&&It(B,O))){if(!ft||st[O]){if(!(Pl(T)&&(yt.tagNameCheck instanceof RegExp&&It(yt.tagNameCheck,T)||yt.tagNameCheck instanceof Function&&yt.tagNameCheck(T))&&(yt.attributeNameCheck instanceof RegExp&&It(yt.attributeNameCheck,O)||yt.attributeNameCheck instanceof Function&&yt.attributeNameCheck(O,T))||O==="is"&&yt.allowCustomizedBuiltInElements&&(yt.tagNameCheck instanceof RegExp&&It(yt.tagNameCheck,Y)||yt.tagNameCheck instanceof Function&&yt.tagNameCheck(Y))))return!1}else if(!Ho[O]){if(!It(Rt,Ir(Y,At,""))){if(!((O==="src"||O==="xlink:href"||O==="href")&&T!=="script"&&Yl(Y,"data:")===0&&Bl[T])){if(!(we&&!It(U,Ir(Y,At,"")))){if(Y)return!1}}}}}}return!0},by=at({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Pl=function(T){return!by[$i(T)]&&It(Gt,T)},Rl=function(T){qe(I.beforeSanitizeAttributes,T,null);const O=T.attributes;if(!O||ds(T))return;const Y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ut,forceKeepAttr:void 0};let ft=O.length;for(;ft--;){const ht=O[ft],Ct=ht.name,oe=ht.namespaceURI,ve=ht.value,ge=_t(Ct),Vo=ve;let Et=Ct==="value"?Vo:Ny(Vo);if(Y.attrName=ge,Y.attrValue=Et,Y.keepAttr=!0,Y.forceKeepAttr=void 0,qe(I.uponSanitizeAttribute,T,Y),Et=Y.attrValue,wl&&(ge==="id"||ge==="name")&&Yl(Et,_l)!==0&&(nr(Ct,T),Et=_l+Et),vr&&It(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Et)){nr(Ct,T);continue}if(ge==="attributename"&&Ul(Et,"href")){nr(Ct,T);continue}if(Y.forceKeepAttr)continue;if(!Y.keepAttr){nr(Ct,T);continue}if(!ue&&It(/\/>/i,Et)){nr(Ct,T);continue}de&&$r([z,P,W],Nl=>{Et=Ir(Et,Nl," ")});const ql=_t(T.nodeName);if(!Dl(ql,ge,Et)){nr(Ct,T);continue}if(_&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!oe)switch(u.getAttributeType(ql,ge)){case"TrustedHTML":{Et=_.createHTML(Et);break}case"TrustedScriptURL":{Et=_.createScriptURL(Et);break}}if(Et!==Vo)try{oe?T.setAttributeNS(oe,Ct,Et):T.setAttribute(Ct,Et),ds(T)?fe(T):Hl(t.removed)}catch{nr(Ct,T)}}qe(I.afterSanitizeAttributes,T,null)},fs=function(T){let O=null;const Y=$l(T);for(qe(I.beforeSanitizeShadowDOM,T,null);O=Y.nextNode();)if(qe(I.uponSanitizeShadowNode,O,null),Il(O),Rl(O),Si(O.content)&&fs(O.content),(S?S(O):O.nodeType)===Le.element){const ht=b?b(O):O.shadowRoot;Si(ht)&&(Mr(ht),fs(ht))}qe(I.afterSanitizeShadowDOM,T,null)},Mr=function(T){const O=S?S(T):T.nodeType;if(O===Le.element){const ht=b?b(T):T.shadowRoot;Si(ht)&&(Mr(ht),fs(ht))}const Y=m?m(T):T.childNodes;if(!Y)return;const ft=[];$r(Y,ht=>{Or(ft,ht)});for(const ht of ft)Mr(ht);if(O===Le.element){const ht=w?w(T):null;if(typeof ht=="string"&&_t(ht)==="template"){const Ct=T.content;Si(Ct)&&Mr(Ct)}}};return t.sanitize=function(K){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=null,Y=null,ft=null,ht=null;if(Uo=!K,Uo&&(K="<!-->"),typeof K!="string"&&!ps(K)&&(K=Yy(K),typeof K!="string"))throw _i("dirty is not a string, aborting");if(!t.isSupported)return K;if(qo||jo(T),t.removed=[],typeof K=="string"&&(ki=!1),ki){const ve=w?w(K):K.nodeName;if(typeof ve=="string"){const ge=_t(ve);if(!lt[ge]||Ke[ge])throw _i("root node is forbidden and cannot be sanitized in-place")}if(ds(K))throw _i("root node is clobbered and cannot be sanitized in-place");Mr(K)}else if(ps(K))O=Ml("<!---->"),Y=O.ownerDocument.importNode(K,!0),Y.nodeType===Le.element&&Y.nodeName==="BODY"||Y.nodeName==="HTML"?O=Y:O.appendChild(Y),Mr(Y);else{if(!Lr&&!de&&!pe&&K.indexOf("<")===-1)return _&&hs?_.createHTML(K):K;if(O=Ml(K),!O)return Lr?null:hs?F:""}O&&No&&fe(O.firstChild);const Ct=$l(ki?K:O);for(;ft=Ct.nextNode();)Il(ft),Rl(ft),Si(ft.content)&&fs(ft.content);if(ki)return de&&Ol(K),K;if(Lr){if(de&&Ol(O),ls)for(ht=$.call(O.ownerDocument);O.firstChild;)ht.appendChild(O.firstChild);else ht=O;return(ut.shadowroot||ut.shadowrootmode)&&(ht=N.call(i,ht,!0)),ht}let oe=pe?O.outerHTML:O.innerHTML;return pe&<["!doctype"]&&O.ownerDocument&&O.ownerDocument.doctype&&O.ownerDocument.doctype.name&&It(r0,O.ownerDocument.doctype.name)&&(oe="<!DOCTYPE "+O.ownerDocument.doctype.name+`>
|
|
3
|
+
`+oe),de&&$r([z,P,W],ve=>{oe=Ir(oe,ve," ")}),_&&hs?_.createHTML(oe):oe},t.setConfig=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};jo(K),qo=!0},t.clearConfig=function(){Er=null,qo=!1},t.isValidAttribute=function(K,T,O){Er||jo({});const Y=_t(K),ft=_t(T);return Dl(Y,ft,O)},t.addHook=function(K,T){typeof T=="function"&&Or(I[K],T)},t.removeHook=function(K,T){if(T!==void 0){const O=Ry(I[K],T);return O===-1?void 0:qy(I[K],O,1)[0]}return Hl(I[K])},t.removeHooks=function(K){I[K]=[]},t.removeAllHooks=function(){I=Jl()},t}var xr=bc(),kc=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Wi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,a0=/\s*%%.*\n/gm,Xr,Tc=(Xr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Xr,"UnknownDiagramError"),Xr),br={},yn=f(function(e,t){e=e.replace(kc,"").replace(Wi,"").replace(a0,`
|
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(br))if(i(e,t))return r;throw new Tc(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),ya=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Sc(t,r,i)},"registerLazyLoadedDiagrams"),Sc=f((e,t,r)=>{br[e]&&D.warn(`Detector with key ${e} already exists. Overwriting.`),br[e]={detector:t,loader:r},D.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),n0=f(e=>br[e].loader,"getDiagramLoader"),Ca=f((e,t,{depth:r=2,clobber:i=!1}={})=>{const s={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(o=>Ca(e,o,s)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(o=>{e.includes(o)||e.push(o)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(o=>{typeof t[o]=="object"&&t[o]!==null&&(e[o]===void 0||typeof e[o]=="object")?(e[o]===void 0&&(e[o]=Array.isArray(t[o])?[]:{}),e[o]=Ca(e[o],t[o],{depth:r-1,clobber:i})):(i||typeof e[o]!="object"&&typeof t[o]!="object")&&(e[o]=t[o])}),e)},"assignWithDepth"),vt=Ca,Ie="#ffffff",De="#f2f2f2",rt=f((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),jr,l0=(jr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,o,a,n,l,h,c,u,p,d,y,g,m,C,b,k,S,w,_,F,L,q,M,$,H,N,I,z,P,W,R,B;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||E(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||A(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||E(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||E(this.mainBkg,10)):(this.rowOdd=this.rowOdd||A(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScale"+U]=E(this["cScale"+U],75);else for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScale"+U]=E(this["cScale"+U],25);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleInv"+U]=this["cScaleInv"+U]||v(this["cScale"+U]);for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this.darkMode?this["cScalePeer"+U]=this["cScalePeer"+U]||A(this["cScale"+U],10):this["cScalePeer"+U]=this["cScalePeer"+U]||E(this["cScale"+U],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let U=0;U<this.THEME_COLOR_LIMIT;U++)this["cScaleLabel"+U]=this["cScaleLabel"+U]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let U=0;U<5;U++)this["surface"+U]=this["surface"+U]||x(this.mainBkg,{h:180,s:-15,l:t*(5+U*3)}),this["surfacePeer"+U]=this["surfacePeer"+U]||x(this.mainBkg,{h:180,s:-15,l:t*(8+U*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((i=this.radar)==null?void 0:i.axisStrokeWidth)||2,axisLabelFontSize:((s=this.radar)==null?void 0:s.axisLabelFontSize)||12,curveOpacity:((o=this.radar)==null?void 0:o.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((n=this.radar)==null?void 0:n.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((h=this.radar)==null?void 0:h.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((p=this.wardley)==null?void 0:p.backgroundColor)||this.background,axisColor:((d=this.wardley)==null?void 0:d.axisColor)||this.lineColor,axisTextColor:((y=this.wardley)==null?void 0:y.axisTextColor)||this.primaryTextColor,gridColor:((g=this.wardley)==null?void 0:g.gridColor)||this.gridColor,componentFill:((m=this.wardley)==null?void 0:m.componentFill)||this.background,componentStroke:((C=this.wardley)==null?void 0:C.componentStroke)||this.lineColor,componentLabelColor:((b=this.wardley)==null?void 0:b.componentLabelColor)||this.primaryTextColor,linkStroke:((k=this.wardley)==null?void 0:k.linkStroke)||this.lineColor,evolutionStroke:((S=this.wardley)==null?void 0:S.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((w=this.wardley)==null?void 0:w.annotationStroke)||this.lineColor,annotationTextColor:((_=this.wardley)==null?void 0:_.annotationTextColor)||this.primaryTextColor,annotationFill:((F=this.wardley)==null?void 0:F.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((L=this.xyChart)==null?void 0:L.backgroundColor)||this.background,titleColor:((q=this.xyChart)==null?void 0:q.titleColor)||this.primaryTextColor,dataLabelColor:((M=this.xyChart)==null?void 0:M.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:(($=this.xyChart)==null?void 0:$.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((H=this.xyChart)==null?void 0:H.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((N=this.xyChart)==null?void 0:N.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((I=this.xyChart)==null?void 0:I.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((z=this.xyChart)==null?void 0:z.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((P=this.xyChart)==null?void 0:P.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((W=this.xyChart)==null?void 0:W.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((R=this.xyChart)==null?void 0:R.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((B=this.xyChart)==null?void 0:B.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(jr,"Theme"),jr),h0=f(e=>{const t=new l0;return t.calculate(e),t},"getThemeVariables"),Vr,c0=(Vr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=A(v("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=E("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=E(this.sectionBkgColor,10),this.taskBorderColor=Ye(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ye(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||A(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||E(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,o,a,n,l,h,c,u,p,d,y,g,m,C,b,k,S,w,_,F,L,q,M,$,H,N,I,z,P,W,R;this.secondBkg=A(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=A(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=A(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=v(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleInv"+B]=this["cScaleInv"+B]||v(this["cScale"+B]);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScalePeer"+B]=this["cScalePeer"+B]||A(this["cScale"+B],10);for(let B=0;B<5;B++)this["surface"+B]=this["surface"+B]||x(this.mainBkg,{h:30,s:-30,l:-(-10+B*4)}),this["surfacePeer"+B]=this["surfacePeer"+B]||x(this.mainBkg,{h:30,s:-30,l:-(-7+B*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleLabel"+B]=this["cScaleLabel"+B]||this.scaleLabelColor;for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["pie"+B]=this["cScale"+B];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let B=0;B<8;B++)this["venn"+(B+1)]=this["venn"+(B+1)]??A(this["cScale"+B],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((_=this.radar)==null?void 0:_.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((F=this.wardley)==null?void 0:F.backgroundColor)||this.background,axisColor:((L=this.wardley)==null?void 0:L.axisColor)||this.lineColor,axisTextColor:((q=this.wardley)==null?void 0:q.axisTextColor)||this.primaryTextColor,gridColor:((M=this.wardley)==null?void 0:M.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.mainBkg,componentStroke:((H=this.wardley)==null?void 0:H.componentStroke)||this.lineColor,componentLabelColor:((N=this.wardley)==null?void 0:N.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((z=this.wardley)==null?void 0:z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((P=this.wardley)==null?void 0:P.annotationStroke)||this.lineColor,annotationTextColor:((W=this.wardley)==null?void 0:W.annotationTextColor)||this.primaryTextColor,annotationFill:((R=this.wardley)==null?void 0:R.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.secondaryColor,20),this.git1=A(this.pie2||this.secondaryColor,20),this.git2=A(this.pie3||this.tertiaryColor,20),this.git3=A(this.pie4||x(this.primaryColor,{h:-30}),20),this.git4=A(this.pie5||x(this.primaryColor,{h:-60}),20),this.git5=A(this.pie6||x(this.primaryColor,{h:-90}),10),this.git6=A(this.pie7||x(this.primaryColor,{h:60}),10),this.git7=A(this.pie8||x(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||A("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||A("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||A("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||A("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||A(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||A(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||A(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||A(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Vr,"Theme"),Vr),u0=f(e=>{const t=new c0;return t.calculate(e),t},"getThemeVariables"),Zr,d0=(Zr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=rt(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ye(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,o,a,n,l,h,c,u,p,d,y,g,m,C,b,k,S,w,_,F,L,q,M,$,H,N,I,z,P,W,R;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||E(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||E(this.tertiaryColor,40);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=E(this["cScale"+B],10),this["cScalePeer"+B]=this["cScalePeer"+B]||E(this["cScale"+B],25);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleInv"+B]=this["cScaleInv"+B]||x(this["cScale"+B],{h:180});for(let B=0;B<5;B++)this["surface"+B]=this["surface"+B]||x(this.mainBkg,{h:30,l:-(5+B*5)}),this["surfacePeer"+B]=this["surfacePeer"+B]||x(this.mainBkg,{h:30,l:-(7+B*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||v(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||v(this.labelTextColor);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleLabel"+B]=this["cScaleLabel"+B]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||A(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||A(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||x(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||x(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((a=this.radar)==null?void 0:a.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((_=this.wardley)==null?void 0:_.annotationFill)||this.background},this.xyChart={backgroundColor:((F=this.xyChart)==null?void 0:F.backgroundColor)||this.background,titleColor:((L=this.xyChart)==null?void 0:L.titleColor)||this.primaryTextColor,dataLabelColor:((q=this.xyChart)==null?void 0:q.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((M=this.xyChart)==null?void 0:M.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(($=this.xyChart)==null?void 0:$.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((H=this.xyChart)==null?void 0:H.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((N=this.xyChart)==null?void 0:N.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((z=this.xyChart)==null?void 0:z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((P=this.xyChart)==null?void 0:P.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((W=this.xyChart)==null?void 0:W.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((R=this.xyChart)==null?void 0:R.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||E(v(this.git0),25),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Zr,"Theme"),Zr),wc=f(e=>{const t=new d0;return t.calculate(e),t},"getThemeVariables"),Kr,p0=(Kr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=A("#cde498",10),this.primaryBorderColor=rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.primaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,o,a,n,l,h,c,u,p,d,y,g,m,C,b,k,S,w,_,F,L,q,M,$,H,N,I,z,P,W,R;this.actorBorder=E(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||E(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||E(this.tertiaryColor,40);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=E(this["cScale"+B],10),this["cScalePeer"+B]=this["cScalePeer"+B]||E(this["cScale"+B],25);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleInv"+B]=this["cScaleInv"+B]||x(this["cScale"+B],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleLabel"+B]=this["cScaleLabel"+B]||this.scaleLabelColor;for(let B=0;B<5;B++)this["surface"+B]=this["surface"+B]||x(this.mainBkg,{h:30,s:-30,l:-(5+B*5)}),this["surfacePeer"+B]=this["surfacePeer"+B]||x(this.mainBkg,{h:30,s:-30,l:-(8+B*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||A(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||A(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-30}),this.pie5=this.pie5||x(this.secondaryColor,{l:-30}),this.pie6=this.pie6||x(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??x(this.primaryColor,{l:-30}),this.venn2=this.venn2??x(this.secondaryColor,{l:-30}),this.venn3=this.venn3??x(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??x(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??x(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??x(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??x(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??x(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((t=this.radar)==null?void 0:t.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((s=this.radar)==null?void 0:s.curveOpacity)||.5,curveStrokeWidth:((o=this.radar)==null?void 0:o.curveStrokeWidth)||2,graticuleColor:((a=this.radar)==null?void 0:a.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((n=this.radar)==null?void 0:n.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((h=this.radar)==null?void 0:h.legendBoxSize)||12,legendFontSize:((c=this.radar)==null?void 0:c.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((u=this.wardley)==null?void 0:u.backgroundColor)||this.background,axisColor:((p=this.wardley)==null?void 0:p.axisColor)||this.lineColor,axisTextColor:((d=this.wardley)==null?void 0:d.axisTextColor)||this.primaryTextColor,gridColor:((y=this.wardley)==null?void 0:y.gridColor)||this.gridColor,componentFill:((g=this.wardley)==null?void 0:g.componentFill)||this.background,componentStroke:((m=this.wardley)==null?void 0:m.componentStroke)||this.lineColor,componentLabelColor:((C=this.wardley)==null?void 0:C.componentLabelColor)||this.primaryTextColor,linkStroke:((b=this.wardley)==null?void 0:b.linkStroke)||this.lineColor,evolutionStroke:((k=this.wardley)==null?void 0:k.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((S=this.wardley)==null?void 0:S.annotationStroke)||this.lineColor,annotationTextColor:((w=this.wardley)==null?void 0:w.annotationTextColor)||this.primaryTextColor,annotationFill:((_=this.wardley)==null?void 0:_.annotationFill)||this.background},this.xyChart={backgroundColor:((F=this.xyChart)==null?void 0:F.backgroundColor)||this.background,titleColor:((L=this.xyChart)==null?void 0:L.titleColor)||this.primaryTextColor,dataLabelColor:((q=this.xyChart)==null?void 0:q.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((M=this.xyChart)==null?void 0:M.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:(($=this.xyChart)==null?void 0:$.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((H=this.xyChart)==null?void 0:H.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((N=this.xyChart)==null?void 0:N.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((I=this.xyChart)==null?void 0:I.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((z=this.xyChart)==null?void 0:z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((P=this.xyChart)==null?void 0:P.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((W=this.xyChart)==null?void 0:W.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((R=this.xyChart)==null?void 0:R.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||v(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||v(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Kr,"Theme"),Kr),f0=f(e=>{const t=new p0;return t.calculate(e),t},"getThemeVariables"),Qr,g0=(Qr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=A(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.lineColor=v(this.background),this.textColor=v(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||A(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,o,a,n,l,h,c,u,p,d,y,g,m,C,b,k,S,w,_,F,L,q,M,$,H,N,I,z,P,W,R;this.secondBkg=A(this.contrast,55),this.border2=this.contrast,this.actorBorder=A(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleInv"+B]=this["cScaleInv"+B]||v(this["cScale"+B]);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this.darkMode?this["cScalePeer"+B]=this["cScalePeer"+B]||A(this["cScale"+B],10):this["cScalePeer"+B]=this["cScalePeer"+B]||E(this["cScale"+B],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleLabel"+B]=this["cScaleLabel"+B]||this.scaleLabelColor;for(let B=0;B<5;B++)this["surface"+B]=this["surface"+B]||x(this.mainBkg,{l:-(5+B*5)}),this["surfacePeer"+B]=this["surfacePeer"+B]||x(this.mainBkg,{l:-(8+B*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=A(this.contrast,30),this.sectionBkgColor2=A(this.contrast,30),this.taskBorderColor=E(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=A(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=E(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(this.secondaryColor,{h:128});for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["pie"+B]=this["cScale"+B];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let B=0;B<8;B++)this["venn"+(B+1)]=this["venn"+(B+1)]??this["cScale"+B];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((t=this.xyChart)==null?void 0:t.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,dataLabelColor:((i=this.xyChart)==null?void 0:i.dataLabelColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((g=this.radar)==null?void 0:g.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((C=this.radar)==null?void 0:C.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((k=this.radar)==null?void 0:k.graticuleStrokeWidth)||1,graticuleOpacity:((S=this.radar)==null?void 0:S.graticuleOpacity)||.3,legendBoxSize:((w=this.radar)==null?void 0:w.legendBoxSize)||12,legendFontSize:((_=this.radar)==null?void 0:_.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((F=this.wardley)==null?void 0:F.backgroundColor)||this.background,axisColor:((L=this.wardley)==null?void 0:L.axisColor)||this.lineColor,axisTextColor:((q=this.wardley)==null?void 0:q.axisTextColor)||this.primaryTextColor,gridColor:((M=this.wardley)==null?void 0:M.gridColor)||this.gridColor,componentFill:(($=this.wardley)==null?void 0:$.componentFill)||this.background,componentStroke:((H=this.wardley)==null?void 0:H.componentStroke)||this.lineColor,componentLabelColor:((N=this.wardley)==null?void 0:N.componentLabelColor)||this.primaryTextColor,linkStroke:((I=this.wardley)==null?void 0:I.linkStroke)||this.lineColor,evolutionStroke:((z=this.wardley)==null?void 0:z.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((P=this.wardley)==null?void 0:P.annotationStroke)||this.lineColor,annotationTextColor:((W=this.wardley)==null?void 0:W.annotationTextColor)||this.primaryTextColor,annotationFill:((R=this.wardley)==null?void 0:R.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=E(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||x(this.primaryColor,{h:-30}),this.git4=this.pie5||x(this.primaryColor,{h:-60}),this.git5=this.pie6||x(this.primaryColor,{h:-90}),this.git6=this.pie7||x(this.primaryColor,{h:60}),this.git7=this.pie8||x(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Qr,"Theme"),Qr),m0=f(e=>{const t=new g0;return t.calculate(e),t},"getThemeVariables"),Jr,y0=(Jr=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=rt(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var o,a,n,l,h,c,u,p,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||E(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||A(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=E(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=E(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||v(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||E(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Jr,"Theme"),Jr),C0=f(e=>{const t=new y0;return t.calculate(e),t},"getThemeVariables"),ti,x0=(ti=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=A(v("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,o,a,n,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||E(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||A(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=E(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=E(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||v(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||E(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ti,"Theme"),ti),b0=f(e=>{const t=new x0;return t.calculate(e),t},"getThemeVariables"),ei,k0=(ei=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=rt("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var o,a,n,l,h,c,u,p,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||E(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||A(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=this.mainBkg;if(this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=E(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=E(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||v(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||E(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ei,"Theme"),ei),T0=f(e=>{const t=new k0;return t.calculate(e),t},"getThemeVariables"),ri,S0=(ri=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=A(v("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,o,a,n,l,h,c,u,p;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||E(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||A(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=E(this["cScale"+d],75);else for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScale"+d]=E(this["cScale"+d],25);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||v(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||E(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=this["cScaleLabel"+d]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ri,"Theme"),ri),w0=f(e=>{const t=new S0;return t.calculate(e),t},"getThemeVariables"),ii,_0=(ii=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=rt(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var o,a,n,l,h,c,u,p,d,y,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||E(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor);const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||A(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||v(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||A(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||E(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||x(this.mainBkg,{h:180,s:-15,l:s*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||x(t,{h:64}),this.fillType3=this.fillType3||x(r,{h:64}),this.fillType4=this.fillType4||x(t,{h:-64}),this.fillType5=this.fillType5||x(r,{h:-64}),this.fillType6=this.fillType6||x(t,{h:128}),this.fillType7=this.fillType7||x(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||x(t,{l:-10}),this.pie5=this.pie5||x(r,{l:-10}),this.pie6=this.pie6||x(i,{l:-10}),this.pie7=this.pie7||x(t,{h:60,l:-10}),this.pie8=this.pie8||x(t,{h:-60,l:-10}),this.pie9=this.pie9||x(t,{h:120,l:0}),this.pie10=this.pie10||x(t,{h:60,l:-20}),this.pie11=this.pie11||x(t,{h:-60,l:-20}),this.pie12=this.pie12||x(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||x(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((l=this.xyChart)==null?void 0:l.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((p=this.xyChart)==null?void 0:p.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||x(t,{h:-30}),this.git4=this.git4||x(t,{h:-60}),this.git5=this.git5||x(t,{h:-90}),this.git6=this.git6||x(t,{h:60}),this.git7=this.git7||x(t,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ii,"Theme"),ii),B0=f(e=>{const t=new _0;return t.calculate(e),t},"getThemeVariables"),si,v0=(si=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=A(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.background),this.secondaryBorderColor=rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=rt(this.tertiaryColor,this.darkMode),this.primaryTextColor=v(this.primaryColor),this.secondaryTextColor=v(this.secondaryColor),this.tertiaryTextColor=v(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=A(v("#323D47"),10),this.border1="#ccc",this.border2=Ye(255,255,255,.25),this.arrowheadColor=v(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,o,a,n,l,h,c,u,p;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||rt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||rt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||rt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||rt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||v(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||v(this.tertiaryColor),this.lineColor=this.lineColor||v(this.background),this.arrowheadColor=this.arrowheadColor||v(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||E(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||v(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||A(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleInv"+d]=this["cScaleInv"+d]||v(this["cScale"+d]);for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this.darkMode?this["cScalePeer"+d]=this["cScalePeer"+d]||A(this["cScale"+d],10):this["cScalePeer"+d]=this["cScalePeer"+d]||E(this["cScale"+d],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let d=0;d<this.THEME_COLOR_LIMIT;d++)this["cScaleLabel"+d]=E(this["cScale"+d],75);const t=this.darkMode?-4:-1;for(let d=0;d<5;d++)this["surface"+d]=this["surface"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(5+d*3)}),this["surfacePeer"+d]=this["surfacePeer"+d]||x(this.mainBkg,{h:180,s:-15,l:t*(8+d*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||x(this.primaryColor,{h:64}),this.fillType3=this.fillType3||x(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||x(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||x(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||x(this.primaryColor,{h:128}),this.fillType7=this.fillType7||x(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||x(this.primaryColor,{l:-10}),this.pie5=this.pie5||x(this.secondaryColor,{l:-10}),this.pie6=this.pie6||x(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||x(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||x(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||x(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||x(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||x(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||x(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||x(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||x(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||x(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||x(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||x(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||x(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||he(this.quadrant1Fill)?A(this.quadrant1Fill):E(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,xAxisTitleColor:((s=this.xyChart)==null?void 0:s.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((n=this.xyChart)==null?void 0:n.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((p=this.xyChart)==null?void 0:p.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?E(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||x(this.primaryColor,{h:-30}),this.git4=this.git4||x(this.primaryColor,{h:-60}),this.git5=this.git5||x(this.primaryColor,{h:-90}),this.git6=this.git6||x(this.primaryColor,{h:60}),this.git7=this.git7||x(this.primaryColor,{h:120}),this.darkMode?(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)):(this.git0=E(this.git0,25),this.git1=E(this.git1,25),this.git2=E(this.git2,25),this.git3=E(this.git3,25),this.git4=E(this.git4,25),this.git5=E(this.git5,25),this.git6=E(this.git6,25),this.git7=E(this.git7,25)),this.gitInv0=this.gitInv0||v(this.git0),this.gitInv1=this.gitInv1||v(this.git1),this.gitInv2=this.gitInv2||v(this.git2),this.gitInv3=this.gitInv3||v(this.git3),this.gitInv4=this.gitInv4||v(this.git4),this.gitInv5=this.gitInv5||v(this.git5),this.gitInv6=this.gitInv6||v(this.git6),this.gitInv7=this.gitInv7||v(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ie,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||De}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(si,"Theme"),si),L0=f(e=>{const t=new v0;return t.calculate(e),t},"getThemeVariables"),Ge={base:{getThemeVariables:h0},dark:{getThemeVariables:u0},default:{getThemeVariables:wc},forest:{getThemeVariables:f0},neutral:{getThemeVariables:m0},neo:{getThemeVariables:C0},"neo-dark":{getThemeVariables:b0},redux:{getThemeVariables:T0},"redux-dark":{getThemeVariables:w0},"redux-color":{getThemeVariables:B0},"redux-dark-color":{getThemeVariables:L0}},Xt={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},_c={...Xt,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ge.default.getThemeVariables(),sequence:{...Xt.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...Xt.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Xt.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Xt.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Xt.pie,useWidth:984},xyChart:{...Xt.xyChart,useWidth:void 0},requirement:{...Xt.requirement,useWidth:void 0},packet:{...Xt.packet},eventmodeling:{...Xt.eventmodeling},treeView:{...Xt.treeView,useWidth:void 0},radar:{...Xt.radar},ishikawa:{...Xt.ishikawa},sankey:{...Xt.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Xt.venn}},Bc=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Bc(e[i],"")]:[...r,t+i],[]),"keyify"),F0=new Set(Bc(_c,"")),Cn=_c,Ds=f(e=>{if(D.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Ds(t));return}for(const t of Object.keys(e)){if(D.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!F0.has(t)||e[t]==null){D.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){if(t==="nodeColors"){const i=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(const s of Object.keys(e[t]))(typeof e[t][s]!="string"||!i.test(e[t][s]))&&(D.debug("sanitize deleting invalid color:",s,e[t][s]),delete e[t][s])}else D.debug("sanitizing object",t),Ds(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(D.debug("sanitizing css option",t),e[t]=vc(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}D.debug("After sanitization",e)}},"sanitizeDirective"),vc=f(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),ni=Object.freeze(Cn),Ve=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),te=vt({},ni),Ps,kr=[],Hi=vt({},ni),mo=f((e,t)=>{let r=vt({},e),i={};for(const s of t)Ac(s),i=vt(i,s);if(r=vt(r,i),i.theme&&i.theme in Ge){const s=vt({},Ps),o=vt(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Ge&&(r.themeVariables=Ge[r.theme].getThemeVariables(o))}return Hi=r,Mc(Hi),Hi},"updateCurrentConfig"),A0=f(e=>(te=vt({},ni),te=vt(te,e),e.theme&&Ge[e.theme]&&(te.themeVariables=Ge[e.theme].getThemeVariables(e.themeVariables)),mo(te,kr),te),"setSiteConfig"),E0=f(e=>{Ps=vt({},e)},"saveConfigFromInitialize"),M0=f(e=>(te=vt(te,e),mo(te,kr),te),"updateSiteConfig"),Lc=f(()=>vt({},te),"getSiteConfig"),Fc=f(e=>(Mc(e),vt(Hi,e),bt()),"setConfig"),bt=f(()=>vt({},Hi),"getConfig"),Ac=f(e=>{e&&(["secure",...te.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(D.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Ac(e[t])}))},"sanitize"),$0=f(e=>{var t;Ds(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),kr.push(e),mo(te,kr)},"addDirective"),Rs=f((e=te)=>{kr=[],mo(e,kr)},"reset"),O0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},th={},Ec=f(e=>{th[e]||(D.warn(O0[e]),th[e]=!0)},"issueWarning"),Mc=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Ec("LAZY_LOAD_DEPRECATED")},"checkConfig"),I0=f(()=>{let e={};Ps&&(e=vt(e,Ps));for(const t of kr)e=vt(e,t);return e},"getUserDefinedConfig"),Ut=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Ec("FLOWCHART_HTML_LABELS_DEPRECATED"),Ve(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),fi=/<br\s*\/?>/gi,D0=f(e=>e?Ic(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),P0=(()=>{let e=!1;return()=>{e||($c(),e=!0)}})();function $c(){const e="data-temp-href-target";xr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),xr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}f($c,"setupDompurifyHooks");var Oc=f(e=>(P0(),xr.sanitize(e)),"removeScript"),eh=f((e,t)=>{if(Ut(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Oc(e):r!=="loose"&&(e=Ic(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=z0(e))}return e},"sanitizeMore"),le=f((e,t)=>e&&(t.dompurifyConfig?e=xr.sanitize(eh(e,t),t.dompurifyConfig).toString():e=xr.sanitize(eh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),R0=f((e,t)=>typeof e=="string"?le(e,t):e.flat().map(r=>le(r,t)),"sanitizeTextOrArray"),q0=f(e=>fi.test(e),"hasBreaks"),N0=f(e=>e.split(fi),"splitBreaks"),z0=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ic=f(e=>e.replace(fi,"#br#"),"breakToPlaceholder"),Dc=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),W0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),H0=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),xa=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];U0(o,a)&&(s=o+","+a,i++,r.pop())}r.push(Y0(s))}return r.join("")},"parseGenericTypes"),ba=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),U0=f((e,t)=>{const r=ba(e,"~"),i=ba(t,"~");return r===1&&i===1},"shouldCombineSets"),Y0=f(e=>{const t=ba(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),rh=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ka=/\$\$(.*)\$\$/g,li=f(e=>{var t;return(((t=e.match(ka))==null?void 0:t.length)??0)>0},"hasKatex"),G0=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await xn(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),X0=f(async(e,t)=>{if(!li(e))return e;if(!(rh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ka,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>require("./katex-Cf_UVKIT.cjs")),i=t.forceLegacyMathML||!rh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(fi).map(s=>li(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(ka,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),xn=f(async(e,t)=>le(await X0(e,t),t),"renderKatexSanitized"),gi={getRows:D0,sanitizeText:le,sanitizeTextOrArray:R0,hasBreaks:q0,splitBreaks:N0,lineBreakRegex:fi,removeScript:Oc,getUrl:Dc,evaluate:Ve,getMax:W0,getMin:H0},j0=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),V0=f(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),bn=f(function(e,t,r,i){const s=V0(t,r,i);j0(e,s)},"configureSvgSize"),Pc=f(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;D.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;D.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,D.info(`Calculated bounds: ${n}x${l}`),bn(t,l,n,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),vs={};function Ta(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
5
|
+
`)}f(Ta,"cssStyleSheetToString");var Z0=f((e,t,r,i)=>{let s="";return e in vs&&vs[e]?s=vs[e]({...r,svgId:i}):D.warn(`No theme found for ${e}`),` & {
|
|
6
|
+
font-family: ${r.fontFamily};
|
|
7
|
+
font-size: ${r.fontSize};
|
|
8
|
+
fill: ${r.textColor}
|
|
9
|
+
}
|
|
10
|
+
@keyframes edge-animation-frame {
|
|
11
|
+
from {
|
|
12
|
+
stroke-dashoffset: 0;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@keyframes dash {
|
|
16
|
+
to {
|
|
17
|
+
stroke-dashoffset: 0;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
& .edge-animation-slow {
|
|
21
|
+
stroke-dasharray: 9,5 !important;
|
|
22
|
+
stroke-dashoffset: 900;
|
|
23
|
+
animation: dash 50s linear infinite;
|
|
24
|
+
stroke-linecap: round;
|
|
25
|
+
}
|
|
26
|
+
& .edge-animation-fast {
|
|
27
|
+
stroke-dasharray: 9,5 !important;
|
|
28
|
+
stroke-dashoffset: 900;
|
|
29
|
+
animation: dash 20s linear infinite;
|
|
30
|
+
stroke-linecap: round;
|
|
31
|
+
}
|
|
32
|
+
/* Classes common for multiple diagrams */
|
|
33
|
+
|
|
34
|
+
& .error-icon {
|
|
35
|
+
fill: ${r.errorBkgColor};
|
|
36
|
+
}
|
|
37
|
+
& .error-text {
|
|
38
|
+
fill: ${r.errorTextColor};
|
|
39
|
+
stroke: ${r.errorTextColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& .edge-thickness-normal {
|
|
43
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
44
|
+
}
|
|
45
|
+
& .edge-thickness-thick {
|
|
46
|
+
stroke-width: 3.5px
|
|
47
|
+
}
|
|
48
|
+
& .edge-pattern-solid {
|
|
49
|
+
stroke-dasharray: 0;
|
|
50
|
+
}
|
|
51
|
+
& .edge-thickness-invisible {
|
|
52
|
+
stroke-width: 0;
|
|
53
|
+
fill: none;
|
|
54
|
+
}
|
|
55
|
+
& .edge-pattern-dashed{
|
|
56
|
+
stroke-dasharray: 3;
|
|
57
|
+
}
|
|
58
|
+
.edge-pattern-dotted {
|
|
59
|
+
stroke-dasharray: 2;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
& .marker {
|
|
63
|
+
fill: ${r.lineColor};
|
|
64
|
+
stroke: ${r.lineColor};
|
|
65
|
+
}
|
|
66
|
+
& .marker.cross {
|
|
67
|
+
stroke: ${r.lineColor};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
& svg {
|
|
71
|
+
font-family: ${r.fontFamily};
|
|
72
|
+
font-size: ${r.fontSize};
|
|
73
|
+
}
|
|
74
|
+
& p {
|
|
75
|
+
margin: 0
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
${s}
|
|
79
|
+
.node .neo-node {
|
|
80
|
+
stroke: ${r.nodeBorder};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
84
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
85
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
[data-look="neo"].node path {
|
|
90
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
91
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-look="neo"].node .outer-path {
|
|
95
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-look="neo"].node .neo-line path {
|
|
99
|
+
stroke: ${r.nodeBorder};
|
|
100
|
+
filter: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-look="neo"].node circle{
|
|
104
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
105
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[data-look="neo"].node circle .state-start{
|
|
109
|
+
fill: #000000;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[data-look="neo"].icon-shape .icon {
|
|
113
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
114
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
118
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
119
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
${t}
|
|
123
|
+
`},"getStyles"),K0=f((e,t)=>{t!==void 0&&(vs[e]=t)},"addStylesForDiagram"),Q0=Z0,kn={};mc(kn,{clear:()=>Rc,getAccDescription:()=>Wc,getAccTitle:()=>Nc,getDiagramTitle:()=>Uc,setAccDescription:()=>zc,setAccTitle:()=>qc,setDiagramTitle:()=>Hc});var Tn="",Sn="",wn="",_n=f(e=>le(e,bt()),"sanitizeText"),Rc=f(()=>{Tn="",wn="",Sn=""},"clear"),qc=f(e=>{Tn=_n(e).replace(/^\s+/g,"")},"setAccTitle"),Nc=f(()=>Tn,"getAccTitle"),zc=f(e=>{wn=_n(e).replace(/\n\s+/g,`
|
|
124
|
+
`)},"setAccDescription"),Wc=f(()=>wn,"getAccDescription"),Hc=f(e=>{Sn=_n(e)},"setDiagramTitle"),Uc=f(()=>Sn,"getDiagramTitle"),ih=D,J0=gn,dt=bt,tC=Fc,eC=ni,Bn=f(e=>le(e,dt()),"sanitizeText"),Yc=Pc,rC=f(()=>kn,"getCommonDb"),qs={},Ns=f((e,t,r)=>{var i;qs[e]&&ih.warn(`Diagram with id ${e} already registered. Overwriting.`),qs[e]=t,r&&Sc(e,r),K0(e,t.styles),(i=t.injectUtils)==null||i.call(t,ih,J0,dt,Bn,Yc,rC(),()=>{})},"registerDiagram"),Sa=f(e=>{if(e in qs)return qs[e];throw new iC(e)},"getDiagram"),oi,iC=(oi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(oi,"DiagramNotFoundError"),oi),sC={value:()=>{}};function Gc(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ls(r)}function Ls(e){this._=e}function oC(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");if(s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ls.prototype=Gc.prototype={constructor:Ls,on:function(e,t){var r=this._,i=oC(e+"",r),s,o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((s=(e=i[o]).type)&&(s=aC(r[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(s=(e=i[o]).type)r[s]=sh(r[s],e.name,t);else if(t==null)for(s in r)r[s]=sh(r[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Ls(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var r=new Array(s),i=0,s,o;i<s;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],i=0,s=o.length;i<s;++i)o[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,o=i.length;s<o;++s)i[s].value.apply(t,r)}};function aC(e,t){for(var r=0,i=e.length,s;r<i;++r)if((s=e[r]).name===t)return s.value}function sh(e,t,r){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=sC,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var wa="http://www.w3.org/1999/xhtml";const oh={svg:"http://www.w3.org/2000/svg",xhtml:wa,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function yo(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),oh.hasOwnProperty(t)?{space:oh[t],local:e}:e}function nC(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===wa&&t.documentElement.namespaceURI===wa?t.createElement(e):t.createElementNS(r,e)}}function lC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Xc(e){var t=yo(e);return(t.local?lC:nC)(t)}function hC(){}function vn(e){return e==null?hC:function(){return this.querySelector(e)}}function cC(e){typeof e!="function"&&(e=vn(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=new Array(a),l,h,c=0;c<a;++c)(l=o[c])&&(h=e.call(l,l.__data__,c,o))&&("__data__"in l&&(h.__data__=l.__data__),n[c]=h);return new se(i,this._parents)}function uC(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function dC(){return[]}function jc(e){return e==null?dC:function(){return this.querySelectorAll(e)}}function pC(e){return function(){return uC(e.apply(this,arguments))}}function fC(e){typeof e=="function"?e=pC(e):e=jc(e);for(var t=this._groups,r=t.length,i=[],s=[],o=0;o<r;++o)for(var a=t[o],n=a.length,l,h=0;h<n;++h)(l=a[h])&&(i.push(e.call(l,l.__data__,h,a)),s.push(l));return new se(i,s)}function Vc(e){return function(){return this.matches(e)}}function Zc(e){return function(t){return t.matches(e)}}var gC=Array.prototype.find;function mC(e){return function(){return gC.call(this.children,e)}}function yC(){return this.firstElementChild}function CC(e){return this.select(e==null?yC:mC(typeof e=="function"?e:Zc(e)))}var xC=Array.prototype.filter;function bC(){return Array.from(this.children)}function kC(e){return function(){return xC.call(this.children,e)}}function TC(e){return this.selectAll(e==null?bC:kC(typeof e=="function"?e:Zc(e)))}function SC(e){typeof e!="function"&&(e=Vc(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,h=0;h<a;++h)(l=o[h])&&e.call(l,l.__data__,h,o)&&n.push(l);return new se(i,this._parents)}function Kc(e){return new Array(e.length)}function wC(){return new se(this._enter||this._groups.map(Kc),this._parents)}function zs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}zs.prototype={constructor:zs,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function _C(e){return function(){return e}}function BC(e,t,r,i,s,o){for(var a=0,n,l=t.length,h=o.length;a<h;++a)(n=t[a])?(n.__data__=o[a],i[a]=n):r[a]=new zs(e,o[a]);for(;a<l;++a)(n=t[a])&&(s[a]=n)}function vC(e,t,r,i,s,o,a){var n,l,h=new Map,c=t.length,u=o.length,p=new Array(c),d;for(n=0;n<c;++n)(l=t[n])&&(p[n]=d=a.call(l,l.__data__,n,t)+"",h.has(d)?s[n]=l:h.set(d,l));for(n=0;n<u;++n)d=a.call(e,o[n],n,o)+"",(l=h.get(d))?(i[n]=l,l.__data__=o[n],h.delete(d)):r[n]=new zs(e,o[n]);for(n=0;n<c;++n)(l=t[n])&&h.get(p[n])===l&&(s[n]=l)}function LC(e){return e.__data__}function FC(e,t){if(!arguments.length)return Array.from(this,LC);var r=t?vC:BC,i=this._parents,s=this._groups;typeof e!="function"&&(e=_C(e));for(var o=s.length,a=new Array(o),n=new Array(o),l=new Array(o),h=0;h<o;++h){var c=i[h],u=s[h],p=u.length,d=AC(e.call(c,c&&c.__data__,h,i)),y=d.length,g=n[h]=new Array(y),m=a[h]=new Array(y),C=l[h]=new Array(p);r(c,u,g,m,C,d,t);for(var b=0,k=0,S,w;b<y;++b)if(S=g[b]){for(b>=k&&(k=b+1);!(w=m[k])&&++k<y;);S._next=w||null}}return a=new se(a,i),a._enter=n,a._exit=l,a}function AC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function EC(){return new se(this._exit||this._groups.map(Kc),this._parents)}function MC(e,t,r){var i=this.enter(),s=this,o=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),r==null?o.remove():r(o),i&&s?i.merge(s).order():s}function $C(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,s=r.length,o=i.length,a=Math.min(s,o),n=new Array(s),l=0;l<a;++l)for(var h=r[l],c=i[l],u=h.length,p=n[l]=new Array(u),d,y=0;y<u;++y)(d=h[y]||c[y])&&(p[y]=d);for(;l<s;++l)n[l]=r[l];return new se(n,this._parents)}function OC(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],s=i.length-1,o=i[s],a;--s>=0;)(a=i[s])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function IC(e){e||(e=DC);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var r=this._groups,i=r.length,s=new Array(i),o=0;o<i;++o){for(var a=r[o],n=a.length,l=s[o]=new Array(n),h,c=0;c<n;++c)(h=a[c])&&(l[c]=h);l.sort(t)}return new se(s,this._parents).order()}function DC(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function PC(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function RC(){return Array.from(this)}function qC(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length;s<o;++s){var a=i[s];if(a)return a}return null}function NC(){let e=0;for(const t of this)++e;return e}function zC(){return!this.node()}function WC(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],o=0,a=s.length,n;o<a;++o)(n=s[o])&&e.call(n,n.__data__,o,s);return this}function HC(e){return function(){this.removeAttribute(e)}}function UC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function YC(e,t){return function(){this.setAttribute(e,t)}}function GC(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function XC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function jC(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function VC(e,t){var r=yo(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?UC:HC:typeof t=="function"?r.local?jC:XC:r.local?GC:YC)(r,t))}function Qc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ZC(e){return function(){this.style.removeProperty(e)}}function KC(e,t,r){return function(){this.style.setProperty(e,t,r)}}function QC(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function JC(e,t,r){return arguments.length>1?this.each((t==null?ZC:typeof t=="function"?QC:KC)(e,t,r??"")):hi(this.node(),e)}function hi(e,t){return e.style.getPropertyValue(t)||Qc(e).getComputedStyle(e,null).getPropertyValue(t)}function tx(e){return function(){delete this[e]}}function ex(e,t){return function(){this[e]=t}}function rx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function ix(e,t){return arguments.length>1?this.each((t==null?tx:typeof t=="function"?rx:ex)(e,t)):this.node()[e]}function Jc(e){return e.trim().split(/^|\s+/)}function Ln(e){return e.classList||new tu(e)}function tu(e){this._node=e,this._names=Jc(e.getAttribute("class")||"")}tu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function eu(e,t){for(var r=Ln(e),i=-1,s=t.length;++i<s;)r.add(t[i])}function ru(e,t){for(var r=Ln(e),i=-1,s=t.length;++i<s;)r.remove(t[i])}function sx(e){return function(){eu(this,e)}}function ox(e){return function(){ru(this,e)}}function ax(e,t){return function(){(t.apply(this,arguments)?eu:ru)(this,e)}}function nx(e,t){var r=Jc(e+"");if(arguments.length<2){for(var i=Ln(this.node()),s=-1,o=r.length;++s<o;)if(!i.contains(r[s]))return!1;return!0}return this.each((typeof t=="function"?ax:t?sx:ox)(r,t))}function lx(){this.textContent=""}function hx(e){return function(){this.textContent=e}}function cx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function ux(e){return arguments.length?this.each(e==null?lx:(typeof e=="function"?cx:hx)(e)):this.node().textContent}function dx(){this.innerHTML=""}function px(e){return function(){this.innerHTML=e}}function fx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function gx(e){return arguments.length?this.each(e==null?dx:(typeof e=="function"?fx:px)(e)):this.node().innerHTML}function mx(){this.nextSibling&&this.parentNode.appendChild(this)}function yx(){return this.each(mx)}function Cx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xx(){return this.each(Cx)}function bx(e){var t=typeof e=="function"?e:Xc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function kx(){return null}function Tx(e,t){var r=typeof e=="function"?e:Xc(e),i=t==null?kx:typeof t=="function"?t:vn(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function Sx(){var e=this.parentNode;e&&e.removeChild(this)}function wx(){return this.each(Sx)}function _x(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Bx(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vx(e){return this.select(e?Bx:_x)}function Lx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Fx(e){return function(t){e.call(this,t,this.__data__)}}function Ax(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Ex(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,s=t.length,o;r<s;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++i]=o;++i?t.length=i:delete this.__on}}}function Mx(e,t,r){return function(){var i=this.__on,s,o=Fx(t);if(i){for(var a=0,n=i.length;a<n;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=o,s.options=r),s.value=t;return}}this.addEventListener(e.type,o,r),s={type:e.type,name:e.name,value:t,listener:o,options:r},i?i.push(s):this.__on=[s]}}function $x(e,t,r){var i=Ax(e+""),s,o=i.length,a;if(arguments.length<2){var n=this.node().__on;if(n){for(var l=0,h=n.length,c;l<h;++l)for(s=0,c=n[l];s<o;++s)if((a=i[s]).type===c.type&&a.name===c.name)return c.value}return}for(n=t?Mx:Ex,s=0;s<o;++s)this.each(n(i[s],t,r));return this}function iu(e,t,r){var i=Qc(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,r):(s=i.document.createEvent("Event"),r?(s.initEvent(t,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function Ox(e,t){return function(){return iu(this,e,t)}}function Ix(e,t){return function(){return iu(this,e,t.apply(this,arguments))}}function Dx(e,t){return this.each((typeof t=="function"?Ix:Ox)(e,t))}function*Px(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],s=0,o=i.length,a;s<o;++s)(a=i[s])&&(yield a)}var su=[null];function se(e,t){this._groups=e,this._parents=t}function rs(){return new se([[document.documentElement]],su)}function Rx(){return this}se.prototype=rs.prototype={constructor:se,select:cC,selectAll:fC,selectChild:CC,selectChildren:TC,filter:SC,data:FC,enter:wC,exit:EC,join:MC,merge:$C,selection:Rx,order:OC,sort:IC,call:PC,nodes:RC,node:qC,size:NC,empty:zC,each:WC,attr:VC,style:JC,property:ix,classed:nx,text:ux,html:gx,raise:yx,lower:xx,append:bx,insert:Tx,remove:wx,clone:vx,datum:Lx,on:$x,dispatch:Dx,[Symbol.iterator]:Px};function nt(e){return typeof e=="string"?new se([[document.querySelector(e)]],[document.documentElement]):new se([[e]],su)}function Co(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Fn(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function mi(){}var Xi=.7,Ws=1/Xi,Gr="\\s*([+-]?\\d+)\\s*",ji="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qx=/^#([0-9a-f]{3,8})$/,Nx=new RegExp(`^rgb\\(${Gr},${Gr},${Gr}\\)$`),zx=new RegExp(`^rgb\\(${Me},${Me},${Me}\\)$`),Wx=new RegExp(`^rgba\\(${Gr},${Gr},${Gr},${ji}\\)$`),Hx=new RegExp(`^rgba\\(${Me},${Me},${Me},${ji}\\)$`),Ux=new RegExp(`^hsl\\(${ji},${Me},${Me}\\)$`),Yx=new RegExp(`^hsla\\(${ji},${Me},${Me},${ji}\\)$`),ah={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Co(mi,ci,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:nh,formatHex:nh,formatHex8:Gx,formatHsl:Xx,formatRgb:lh,toString:lh});function nh(){return this.rgb().formatHex()}function Gx(){return this.rgb().formatHex8()}function Xx(){return au(this).formatHsl()}function lh(){return this.rgb().formatRgb()}function ci(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qx.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?hh(t):r===3?new Vt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ms(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ms(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Nx.exec(e))?new Vt(t[1],t[2],t[3],1):(t=zx.exec(e))?new Vt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Wx.exec(e))?ms(t[1],t[2],t[3],t[4]):(t=Hx.exec(e))?ms(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Ux.exec(e))?dh(t[1],t[2]/100,t[3]/100,1):(t=Yx.exec(e))?dh(t[1],t[2]/100,t[3]/100,t[4]):ah.hasOwnProperty(e)?hh(ah[e]):e==="transparent"?new Vt(NaN,NaN,NaN,0):null}function hh(e){return new Vt(e>>16&255,e>>8&255,e&255,1)}function ms(e,t,r,i){return i<=0&&(e=t=r=NaN),new Vt(e,t,r,i)}function ou(e){return e instanceof mi||(e=ci(e)),e?(e=e.rgb(),new Vt(e.r,e.g,e.b,e.opacity)):new Vt}function _a(e,t,r,i){return arguments.length===1?ou(e):new Vt(e,t,r,i??1)}function Vt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Co(Vt,_a,Fn(mi,{brighter(e){return e=e==null?Ws:Math.pow(Ws,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Xi:Math.pow(Xi,e),new Vt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Vt(yr(this.r),yr(this.g),yr(this.b),Hs(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ch,formatHex:ch,formatHex8:jx,formatRgb:uh,toString:uh}));function ch(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}`}function jx(){return`#${fr(this.r)}${fr(this.g)}${fr(this.b)}${fr((isNaN(this.opacity)?1:this.opacity)*255)}`}function uh(){const e=Hs(this.opacity);return`${e===1?"rgb(":"rgba("}${yr(this.r)}, ${yr(this.g)}, ${yr(this.b)}${e===1?")":`, ${e})`}`}function Hs(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function yr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function fr(e){return e=yr(e),(e<16?"0":"")+e.toString(16)}function dh(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new be(e,t,r,i)}function au(e){if(e instanceof be)return new be(e.h,e.s,e.l,e.opacity);if(e instanceof mi||(e=ci(e)),!e)return new be;if(e instanceof be)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,s=Math.min(t,r,i),o=Math.max(t,r,i),a=NaN,n=o-s,l=(o+s)/2;return n?(t===o?a=(r-i)/n+(r<i)*6:r===o?a=(i-t)/n+2:a=(t-r)/n+4,n/=l<.5?o+s:2-o-s,a*=60):n=l>0&&l<1?0:a,new be(a,n,l,e.opacity)}function Vx(e,t,r,i){return arguments.length===1?au(e):new be(e,t,r,i??1)}function be(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Co(be,Vx,Fn(mi,{brighter(e){return e=e==null?Ws:Math.pow(Ws,e),new be(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Xi:Math.pow(Xi,e),new be(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,s=2*r-i;return new Vt(ea(e>=240?e-240:e+120,s,i),ea(e,s,i),ea(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new be(ph(this.h),ys(this.s),ys(this.l),Hs(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Hs(this.opacity);return`${e===1?"hsl(":"hsla("}${ph(this.h)}, ${ys(this.s)*100}%, ${ys(this.l)*100}%${e===1?")":`, ${e})`}`}}));function ph(e){return e=(e||0)%360,e<0?e+360:e}function ys(e){return Math.max(0,Math.min(1,e||0))}function ea(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const xo=e=>()=>e;function nu(e,t){return function(r){return e+r*t}}function Zx(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function Kx(e,t){var r=t-e;return r?nu(e,r>180||r<-180?r-360*Math.round(r/360):r):xo(isNaN(e)?t:e)}function Qx(e){return(e=+e)==1?An:function(t,r){return r-t?Zx(t,r,e):xo(isNaN(t)?r:t)}}function An(e,t){var r=t-e;return r?nu(e,r):xo(isNaN(e)?t:e)}const Ba=function e(t){var r=Qx(t);function i(s,o){var a=r((s=_a(s)).r,(o=_a(o)).r),n=r(s.g,o.g),l=r(s.b,o.b),h=An(s.opacity,o.opacity);return function(c){return s.r=a(c),s.g=n(c),s.b=l(c),s.opacity=h(c),s+""}}return i.gamma=e,i}(1);function Ue(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var va=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ra=new RegExp(va.source,"g");function Jx(e){return function(){return e}}function tb(e){return function(t){return e(t)+""}}function lu(e,t){var r=va.lastIndex=ra.lastIndex=0,i,s,o,a=-1,n=[],l=[];for(e=e+"",t=t+"";(i=va.exec(e))&&(s=ra.exec(t));)(o=s.index)>r&&(o=t.slice(r,o),n[a]?n[a]+=o:n[++a]=o),(i=i[0])===(s=s[0])?n[a]?n[a]+=s:n[++a]=s:(n[++a]=null,l.push({i:a,x:Ue(i,s)})),r=ra.lastIndex;return r<t.length&&(o=t.slice(r),n[a]?n[a]+=o:n[++a]=o),n.length<2?l[0]?tb(l[0].x):Jx(t):(t=l.length,function(h){for(var c=0,u;c<t;++c)n[(u=l[c]).i]=u.x(h);return n.join("")})}var fh=180/Math.PI,La={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hu(e,t,r,i,s,o){var a,n,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(n=Math.sqrt(r*r+i*i))&&(r/=n,i/=n,l/=n),e*i<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:s,translateY:o,rotate:Math.atan2(t,e)*fh,skewX:Math.atan(l)*fh,scaleX:a,scaleY:n}}var Cs;function eb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?La:hu(t.a,t.b,t.c,t.d,t.e,t.f)}function rb(e){return e==null||(Cs||(Cs=document.createElementNS("http://www.w3.org/2000/svg","g")),Cs.setAttribute("transform",e),!(e=Cs.transform.baseVal.consolidate()))?La:(e=e.matrix,hu(e.a,e.b,e.c,e.d,e.e,e.f))}function cu(e,t,r,i){function s(h){return h.length?h.pop()+" ":""}function o(h,c,u,p,d,y){if(h!==u||c!==p){var g=d.push("translate(",null,t,null,r);y.push({i:g-4,x:Ue(h,u)},{i:g-2,x:Ue(c,p)})}else(u||p)&&d.push("translate("+u+t+p+r)}function a(h,c,u,p){h!==c?(h-c>180?c+=360:c-h>180&&(h+=360),p.push({i:u.push(s(u)+"rotate(",null,i)-2,x:Ue(h,c)})):c&&u.push(s(u)+"rotate("+c+i)}function n(h,c,u,p){h!==c?p.push({i:u.push(s(u)+"skewX(",null,i)-2,x:Ue(h,c)}):c&&u.push(s(u)+"skewX("+c+i)}function l(h,c,u,p,d,y){if(h!==u||c!==p){var g=d.push(s(d)+"scale(",null,",",null,")");y.push({i:g-4,x:Ue(h,u)},{i:g-2,x:Ue(c,p)})}else(u!==1||p!==1)&&d.push(s(d)+"scale("+u+","+p+")")}return function(h,c){var u=[],p=[];return h=e(h),c=e(c),o(h.translateX,h.translateY,c.translateX,c.translateY,u,p),a(h.rotate,c.rotate,u,p),n(h.skewX,c.skewX,u,p),l(h.scaleX,h.scaleY,c.scaleX,c.scaleY,u,p),h=c=null,function(d){for(var y=-1,g=p.length,m;++y<g;)u[(m=p[y]).i]=m.x(d);return u.join("")}}}var ib=cu(eb,"px, ","px)","deg)"),sb=cu(rb,", ",")",")"),ui=0,Oi=0,Bi=0,uu=1e3,Us,Ii,Ys=0,Tr=0,bo=0,Vi=typeof performance=="object"&&performance.now?performance:Date,du=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function En(){return Tr||(du(ob),Tr=Vi.now()+bo)}function ob(){Tr=0}function Gs(){this._call=this._time=this._next=null}Gs.prototype=pu.prototype={constructor:Gs,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?En():+r)+(t==null?0:+t),!this._next&&Ii!==this&&(Ii?Ii._next=this:Us=this,Ii=this),this._call=e,this._time=r,Fa()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fa())}};function pu(e,t,r){var i=new Gs;return i.restart(e,t,r),i}function ab(){En(),++ui;for(var e=Us,t;e;)(t=Tr-e._time)>=0&&e._call.call(null,t),e=e._next;--ui}function gh(){Tr=(Ys=Vi.now())+bo,ui=Oi=0;try{ab()}finally{ui=0,lb(),Tr=0}}function nb(){var e=Vi.now(),t=e-Ys;t>uu&&(bo-=t,Ys=e)}function lb(){for(var e,t=Us,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Us=r);Ii=e,Fa(i)}function Fa(e){if(!ui){Oi&&(Oi=clearTimeout(Oi));var t=e-Tr;t>24?(e<1/0&&(Oi=setTimeout(gh,e-Vi.now()-bo)),Bi&&(Bi=clearInterval(Bi))):(Bi||(Ys=Vi.now(),Bi=setInterval(nb,uu)),ui=1,du(gh))}}function mh(e,t,r){var i=new Gs;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,r),i}var hb=Gc("start","end","cancel","interrupt"),cb=[],fu=0,yh=1,Aa=2,Fs=3,Ch=4,Ea=5,As=6;function ko(e,t,r,i,s,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;ub(e,r,{name:t,index:i,group:s,on:hb,tween:cb,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:fu})}function Mn(e,t){var r=Se(e,t);if(r.state>fu)throw new Error("too late; already scheduled");return r}function Pe(e,t){var r=Se(e,t);if(r.state>Fs)throw new Error("too late; already running");return r}function Se(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function ub(e,t,r){var i=e.__transition,s;i[t]=r,r.timer=pu(o,0,r.time);function o(h){r.state=yh,r.timer.restart(a,r.delay,r.time),r.delay<=h&&a(h-r.delay)}function a(h){var c,u,p,d;if(r.state!==yh)return l();for(c in i)if(d=i[c],d.name===r.name){if(d.state===Fs)return mh(a);d.state===Ch?(d.state=As,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+c<t&&(d.state=As,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete i[c])}if(mh(function(){r.state===Fs&&(r.state=Ch,r.timer.restart(n,r.delay,r.time),n(h))}),r.state=Aa,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Aa){for(r.state=Fs,s=new Array(p=r.tween.length),c=0,u=-1;c<p;++c)(d=r.tween[c].value.call(e,e.__data__,r.index,r.group))&&(s[++u]=d);s.length=u+1}}function n(h){for(var c=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(l),r.state=Ea,1),u=-1,p=s.length;++u<p;)s[u].call(e,c);r.state===Ea&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=As,r.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function db(e,t){var r=e.__transition,i,s,o=!0,a;if(r){t=t==null?null:t+"";for(a in r){if((i=r[a]).name!==t){o=!1;continue}s=i.state>Aa&&i.state<Ea,i.state=As,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[a]}o&&delete e.__transition}}function pb(e){return this.each(function(){db(this,e)})}function fb(e,t){var r,i;return function(){var s=Pe(this,e),o=s.tween;if(o!==r){i=r=o;for(var a=0,n=i.length;a<n;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function gb(e,t,r){var i,s;if(typeof r!="function")throw new Error;return function(){var o=Pe(this,e),a=o.tween;if(a!==i){s=(i=a).slice();for(var n={name:t,value:r},l=0,h=s.length;l<h;++l)if(s[l].name===t){s[l]=n;break}l===h&&s.push(n)}o.tween=s}}function mb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=Se(this.node(),r).tween,s=0,o=i.length,a;s<o;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?fb:gb)(r,e,t))}function $n(e,t,r){var i=e._id;return e.each(function(){var s=Pe(this,i);(s.value||(s.value={}))[t]=r.apply(this,arguments)}),function(s){return Se(s,i).value[t]}}function gu(e,t){var r;return(typeof t=="number"?Ue:t instanceof ci?Ba:(r=ci(t))?(t=r,Ba):lu)(e,t)}function yb(e){return function(){this.removeAttribute(e)}}function Cb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xb(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttribute(e);return a===s?null:a===i?o:o=t(i=a,r)}}function bb(e,t,r){var i,s=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?o:o=t(i=a,r)}}function kb(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function Tb(e,t,r){var i,s,o;return function(){var a,n=r(this),l;return n==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=n+"",a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n)))}}function Sb(e,t){var r=yo(e),i=r==="transform"?sb:gu;return this.attrTween(e,typeof t=="function"?(r.local?Tb:kb)(r,i,$n(this,"attr."+e,t)):t==null?(r.local?Cb:yb)(r):(r.local?bb:xb)(r,i,t))}function wb(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function _b(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Bb(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&_b(e,o)),r}return s._value=t,s}function vb(e,t){var r,i;function s(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&wb(e,o)),r}return s._value=t,s}function Lb(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=yo(e);return this.tween(r,(i.local?Bb:vb)(i,t))}function Fb(e,t){return function(){Mn(this,e).delay=+t.apply(this,arguments)}}function Ab(e,t){return t=+t,function(){Mn(this,e).delay=t}}function Eb(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fb:Ab)(t,e)):Se(this.node(),t).delay}function Mb(e,t){return function(){Pe(this,e).duration=+t.apply(this,arguments)}}function $b(e,t){return t=+t,function(){Pe(this,e).duration=t}}function Ob(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Mb:$b)(t,e)):Se(this.node(),t).duration}function Ib(e,t){if(typeof t!="function")throw new Error;return function(){Pe(this,e).ease=t}}function Db(e){var t=this._id;return arguments.length?this.each(Ib(t,e)):Se(this.node(),t).ease}function Pb(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Pe(this,e).ease=r}}function Rb(e){if(typeof e!="function")throw new Error;return this.each(Pb(this._id,e))}function qb(e){typeof e!="function"&&(e=Vc(e));for(var t=this._groups,r=t.length,i=new Array(r),s=0;s<r;++s)for(var o=t[s],a=o.length,n=i[s]=[],l,h=0;h<a;++h)(l=o[h])&&e.call(l,l.__data__,h,o)&&n.push(l);return new je(i,this._parents,this._name,this._id)}function Nb(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,s=r.length,o=Math.min(i,s),a=new Array(i),n=0;n<o;++n)for(var l=t[n],h=r[n],c=l.length,u=a[n]=new Array(c),p,d=0;d<c;++d)(p=l[d]||h[d])&&(u[d]=p);for(;n<i;++n)a[n]=t[n];return new je(a,this._parents,this._name,this._id)}function zb(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function Wb(e,t,r){var i,s,o=zb(t)?Mn:Pe;return function(){var a=o(this,e),n=a.on;n!==i&&(s=(i=n).copy()).on(t,r),a.on=s}}function Hb(e,t){var r=this._id;return arguments.length<2?Se(this.node(),r).on.on(e):this.each(Wb(r,e,t))}function Ub(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Yb(){return this.on("end.remove",Ub(this._id))}function Gb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=vn(e));for(var i=this._groups,s=i.length,o=new Array(s),a=0;a<s;++a)for(var n=i[a],l=n.length,h=o[a]=new Array(l),c,u,p=0;p<l;++p)(c=n[p])&&(u=e.call(c,c.__data__,p,n))&&("__data__"in c&&(u.__data__=c.__data__),h[p]=u,ko(h[p],t,r,p,h,Se(c,r)));return new je(o,this._parents,t,r)}function Xb(e){var t=this._name,r=this._id;typeof e!="function"&&(e=jc(e));for(var i=this._groups,s=i.length,o=[],a=[],n=0;n<s;++n)for(var l=i[n],h=l.length,c,u=0;u<h;++u)if(c=l[u]){for(var p=e.call(c,c.__data__,u,l),d,y=Se(c,r),g=0,m=p.length;g<m;++g)(d=p[g])&&ko(d,t,r,g,p,y);o.push(p),a.push(c)}return new je(o,a,t,r)}var jb=rs.prototype.constructor;function Vb(){return new jb(this._groups,this._parents)}function Zb(e,t){var r,i,s;return function(){var o=hi(this,e),a=(this.style.removeProperty(e),hi(this,e));return o===a?null:o===r&&a===i?s:s=t(r=o,i=a)}}function mu(e){return function(){this.style.removeProperty(e)}}function Kb(e,t,r){var i,s=r+"",o;return function(){var a=hi(this,e);return a===s?null:a===i?o:o=t(i=a,r)}}function Qb(e,t,r){var i,s,o;return function(){var a=hi(this,e),n=r(this),l=n+"";return n==null&&(l=n=(this.style.removeProperty(e),hi(this,e))),a===l?null:a===i&&l===s?o:(s=l,o=t(i=a,n))}}function Jb(e,t){var r,i,s,o="style."+t,a="end."+o,n;return function(){var l=Pe(this,e),h=l.on,c=l.value[o]==null?n||(n=mu(t)):void 0;(h!==r||s!==c)&&(i=(r=h).copy()).on(a,s=c),l.on=i}}function t1(e,t,r){var i=(e+="")=="transform"?ib:gu;return t==null?this.styleTween(e,Zb(e,i)).on("end.style."+e,mu(e)):typeof t=="function"?this.styleTween(e,Qb(e,i,$n(this,"style."+e,t))).each(Jb(this._id,e)):this.styleTween(e,Kb(e,i,t),r).on("end.style."+e,null)}function e1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function r1(e,t,r){var i,s;function o(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&e1(e,a,r)),i}return o._value=t,o}function i1(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,r1(e,t,r??""))}function s1(e){return function(){this.textContent=e}}function o1(e){return function(){var t=e(this);this.textContent=t??""}}function a1(e){return this.tween("text",typeof e=="function"?o1($n(this,"text",e)):s1(e==null?"":e+""))}function n1(e){return function(t){this.textContent=e.call(this,t)}}function l1(e){var t,r;function i(){var s=e.apply(this,arguments);return s!==r&&(t=(r=s)&&n1(s)),t}return i._value=e,i}function h1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,l1(e))}function c1(){for(var e=this._name,t=this._id,r=yu(),i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,h=0;h<n;++h)if(l=a[h]){var c=Se(l,t);ko(l,e,r,h,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new je(i,this._parents,e,r)}function u1(){var e,t,r=this,i=r._id,s=r.size();return new Promise(function(o,a){var n={value:a},l={value:function(){--s===0&&o()}};r.each(function(){var h=Pe(this,i),c=h.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(n),t._.interrupt.push(n),t._.end.push(l)),h.on=t}),s===0&&o()})}var d1=0;function je(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function yu(){return++d1}var ze=rs.prototype;je.prototype={constructor:je,select:Gb,selectAll:Xb,selectChild:ze.selectChild,selectChildren:ze.selectChildren,filter:qb,merge:Nb,selection:Vb,transition:c1,call:ze.call,nodes:ze.nodes,node:ze.node,size:ze.size,empty:ze.empty,each:ze.each,on:Hb,attr:Sb,attrTween:Lb,style:t1,styleTween:i1,text:a1,textTween:h1,remove:Yb,tween:mb,delay:Eb,duration:Ob,ease:Db,easeVarying:Rb,end:u1,[Symbol.iterator]:ze[Symbol.iterator]};function p1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var f1={time:null,delay:0,duration:250,ease:p1};function g1(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function m1(e){var t,r;e instanceof je?(t=e._id,e=e._name):(t=yu(),(r=f1).time=En(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,o=0;o<s;++o)for(var a=i[o],n=a.length,l,h=0;h<n;++h)(l=a[h])&&ko(l,e,t,h,a,r||g1(l,t));return new je(i,this._parents,e,t)}rs.prototype.interrupt=pb;rs.prototype.transition=m1;const Ma=Math.PI,$a=2*Ma,cr=1e-6,y1=$a-cr;function Cu(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function C1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Cu;const r=10**t;return function(i){this._+=i[0];for(let s=1,o=i.length;s<o;++s)this._+=Math.round(arguments[s]*r)/r+i[s]}}let x1=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Cu:C1(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,s){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+s}`}bezierCurveTo(t,r,i,s,o,a){this._append`C${+t},${+r},${+i},${+s},${this._x1=+o},${this._y1=+a}`}arcTo(t,r,i,s,o){if(t=+t,r=+r,i=+i,s=+s,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,n=this._y1,l=i-t,h=s-r,c=a-t,u=n-r,p=c*c+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>cr)if(!(Math.abs(u*l-h*c)>cr)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-a,y=s-n,g=l*l+h*h,m=d*d+y*y,C=Math.sqrt(g),b=Math.sqrt(p),k=o*Math.tan((Ma-Math.acos((g+p-m)/(2*C*b)))/2),S=k/b,w=k/C;Math.abs(S-1)>cr&&this._append`L${t+S*c},${r+S*u}`,this._append`A${o},${o},0,0,${+(u*d>c*y)},${this._x1=t+w*l},${this._y1=r+w*h}`}}arc(t,r,i,s,o,a){if(t=+t,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let n=i*Math.cos(s),l=i*Math.sin(s),h=t+n,c=r+l,u=1^a,p=a?s-o:o-s;this._x1===null?this._append`M${h},${c}`:(Math.abs(this._x1-h)>cr||Math.abs(this._y1-c)>cr)&&this._append`L${h},${c}`,i&&(p<0&&(p=p%$a+$a),p>y1?this._append`A${i},${i},0,1,${u},${t-n},${r-l}A${i},${i},0,1,${u},${this._x1=h},${this._y1=c}`:p>cr&&this._append`A${i},${i},0,${+(p>=Ma)},${u},${this._x1=t+i*Math.cos(o)},${this._y1=r+i*Math.sin(o)}`)}rect(t,r,i,s){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+s}h${-i}Z`}toString(){return this._}};function ur(e){return function(){return e}}const b1=Math.abs,k1=Math.atan2,T1=Math.cos,S1=Math.max,w1=Math.min,_1=Math.sin,B1=Math.sqrt,Oa=1e-12,To=Math.PI,Ia=To/2,v1=2*To;function L1(e){return e>1?0:e<-1?To:Math.acos(e)}function F1(e){return e>=1?Ia:e<=-1?-Ia:Math.asin(e)}function xu(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new x1(t)}function bu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ku(e){this._context=e}ku.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Ui(e){return new ku(e)}function A1(e){return e[0]}function E1(e){return e[1]}function Tu(e,t){var r=ur(!0),i=null,s=Ui,o=null,a=xu(n);e=typeof e=="function"?e:e===void 0?A1:ur(e),t=typeof t=="function"?t:t===void 0?E1:ur(t);function n(l){var h,c=(l=bu(l)).length,u,p=!1,d;for(i==null&&(o=s(d=a())),h=0;h<=c;++h)!(h<c&&r(u=l[h],h,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+e(u,h,l),+t(u,h,l));if(d)return o=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:ur(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:ur(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ur(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(o=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=o=null:o=s(i=l),n):i},n}class Su{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function wu(e){return new Su(e,!0)}function _u(e){return new Su(e,!1)}function er(){}function Xs(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function So(e){this._context=e}So.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Xs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Xs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function js(e){return new So(e)}function Bu(e){this._context=e}Bu.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Xs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function M1(e){return new Bu(e)}function vu(e){this._context=e}vu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Xs(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $1(e){return new vu(e)}function Lu(e,t){this._basis=new So(e),this._beta=t}Lu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],o=e[r]-i,a=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*o),this._beta*t[n]+(1-this._beta)*(s+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const O1=function e(t){function r(i){return t===1?new So(i):new Lu(i,t)}return r.beta=function(i){return e(+i)},r}(.85);function Vs(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function On(e,t){this._context=e,this._k=(1-t)/6}On.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Vs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Vs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Fu=function e(t){function r(i){return new On(i,t)}return r.tension=function(i){return e(+i)},r}(0);function In(e,t){this._context=e,this._k=(1-t)/6}In.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Vs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const I1=function e(t){function r(i){return new In(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Dn(e,t){this._context=e,this._k=(1-t)/6}Dn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vs(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const D1=function e(t){function r(i){return new Dn(i,t)}return r.tension=function(i){return e(+i)},r}(0);function Pn(e,t,r){var i=e._x1,s=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Oa){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Oa){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*h+e._x1*e._l23_2a-t*e._l12_2a)/c,a=(a*h+e._y1*e._l23_2a-r*e._l12_2a)/c}e._context.bezierCurveTo(i,s,o,a,e._x2,e._y2)}function Au(e,t){this._context=e,this._alpha=t}Au.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Pn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Eu=function e(t){function r(i){return t?new Au(i,t):new On(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Mu(e,t){this._context=e,this._alpha=t}Mu.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Pn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const P1=function e(t){function r(i){return t?new Mu(i,t):new In(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function $u(e,t){this._context=e,this._alpha=t}$u.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Pn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const R1=function e(t){function r(i){return t?new $u(i,t):new Dn(i,0)}return r.alpha=function(i){return e(+i)},r}(.5);function Ou(e){this._context=e}Ou.prototype={areaStart:er,areaEnd:er,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function q1(e){return new Ou(e)}function xh(e){return e<0?-1:1}function bh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,o=(e._y1-e._y0)/(i||s<0&&-0),a=(r-e._y1)/(s||i<0&&-0),n=(o*s+a*i)/(i+s);return(xh(o)+xh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(n))||0}function kh(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ia(e,t,r){var i=e._x0,s=e._y0,o=e._x1,a=e._y1,n=(o-i)/3;e._context.bezierCurveTo(i+n,s+n*t,o-n,a-n*r,o,a)}function Zs(e){this._context=e}Zs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ia(this,this._t0,kh(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ia(this,kh(this,r=bh(this,e,t)),r);break;default:ia(this,this._t0,r=bh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Iu(e){this._context=new Du(e)}(Iu.prototype=Object.create(Zs.prototype)).point=function(e,t){Zs.prototype.point.call(this,t,e)};function Du(e){this._context=e}Du.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,o){this._context.bezierCurveTo(t,e,i,r,o,s)}};function Pu(e){return new Zs(e)}function Ru(e){return new Iu(e)}function qu(e){this._context=e}qu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Th(e),s=Th(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],s[0][o],i[1][o],s[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Th(e){var t,r=e.length-1,i,s=new Array(r),o=new Array(r),a=new Array(r);for(s[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/o[t-1],o[t]-=i,a[t]-=i*a[t-1];for(s[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)s[t]=(a[t]-s[t+1])/o[t];for(o[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-s[t+1];return[s,o]}function Nu(e){return new qu(e)}function wo(e,t){this._context=e,this._t=t}wo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function zu(e){return new wo(e,.5)}function Wu(e){return new wo(e,0)}function Hu(e){return new wo(e,1)}function Di(e,t,r){this.k=e,this.x=t,this.y=r}Di.prototype={constructor:Di,scale:function(e){return e===1?this:new Di(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Di(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};Di.prototype;var Uu=f(e=>{var s;const{securityLevel:t}=dt();let r=nt("body");if(t==="sandbox"){const a=((s=nt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=nt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function Rn(e){return typeof e>"u"||e===null}f(Rn,"isNothing");function Yu(e){return typeof e=="object"&&e!==null}f(Yu,"isObject");function Gu(e){return Array.isArray(e)?e:Rn(e)?[]:[e]}f(Gu,"toArray");function Xu(e,t){var r,i,s,o;if(t)for(o=Object.keys(t),r=0,i=o.length;r<i;r+=1)s=o[r],e[s]=t[s];return e}f(Xu,"extend");function ju(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}f(ju,"repeat");function Vu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}f(Vu,"isNegativeZero");var N1=Rn,z1=Yu,W1=Gu,H1=ju,U1=Vu,Y1=Xu,Ft={isNothing:N1,isObject:z1,toArray:W1,repeat:H1,isNegativeZero:U1,extend:Y1};function qn(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
125
|
+
|
|
126
|
+
`+e.mark.snippet),i+" "+r):i}f(qn,"formatError");function di(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=qn(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}f(di,"YAMLException$1");di.prototype=Object.create(Error.prototype);di.prototype.constructor=di;di.prototype.toString=f(function(t){return this.name+": "+qn(this,t)},"toString");var ee=di;function Es(e,t,r,i,s){var o="",a="",n=Math.floor(s/2)-1;return i-t>n&&(o=" ... ",t=i-n+o.length),r-i>n&&(a=" ...",r=i+n-a.length),{str:o+e.slice(t,r).replace(/\t/g,"→")+a,pos:i-t+o.length}}f(Es,"getLine");function Ms(e,t){return Ft.repeat(" ",t-e.length)+e}f(Ms,"padStart");function Zu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],s=[],o,a=-1;o=r.exec(e.buffer);)s.push(o.index),i.push(o.index+o[0].length),e.position<=o.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var n="",l,h,c=Math.min(e.line+t.linesAfter,s.length).toString().length,u=t.maxLength-(t.indent+c+3);for(l=1;l<=t.linesBefore&&!(a-l<0);l++)h=Es(e.buffer,i[a-l],s[a-l],e.position-(i[a]-i[a-l]),u),n=Ft.repeat(" ",t.indent)+Ms((e.line-l+1).toString(),c)+" | "+h.str+`
|
|
127
|
+
`+n;for(h=Es(e.buffer,i[a],s[a],e.position,u),n+=Ft.repeat(" ",t.indent)+Ms((e.line+1).toString(),c)+" | "+h.str+`
|
|
128
|
+
`,n+=Ft.repeat("-",t.indent+c+3+h.pos)+`^
|
|
129
|
+
`,l=1;l<=t.linesAfter&&!(a+l>=s.length);l++)h=Es(e.buffer,i[a+l],s[a+l],e.position-(i[a]-i[a+l]),u),n+=Ft.repeat(" ",t.indent)+Ms((e.line+l+1).toString(),c)+" | "+h.str+`
|
|
130
|
+
`;return n.replace(/\n$/,"")}f(Zu,"makeSnippet");var G1=Zu,X1=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],j1=["scalar","sequence","mapping"];function Ku(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}f(Ku,"compileStyleAliases");function Qu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(X1.indexOf(r)===-1)throw new ee('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Ku(t.styleAliases||null),j1.indexOf(this.kind)===-1)throw new ee('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}f(Qu,"Type$1");var Ht=Qu;function Da(e,t){var r=[];return e[t].forEach(function(i){var s=r.length;r.forEach(function(o,a){o.tag===i.tag&&o.kind===i.kind&&o.multi===i.multi&&(s=a)}),r[s]=i}),r}f(Da,"compileList");function Ju(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(s){s.multi?(e.multi[s.kind].push(s),e.multi.fallback.push(s)):e[s.kind][s.tag]=e.fallback[s.tag]=s}for(f(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}f(Ju,"compileMap");function Ks(e){return this.extend(e)}f(Ks,"Schema$1");Ks.prototype.extend=f(function(t){var r=[],i=[];if(t instanceof Ht)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new ee("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(o){if(!(o instanceof Ht))throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(o.loadKind&&o.loadKind!=="scalar")throw new ee("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(o.multi)throw new ee("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(o){if(!(o instanceof Ht))throw new ee("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var s=Object.create(Ks.prototype);return s.implicit=(this.implicit||[]).concat(r),s.explicit=(this.explicit||[]).concat(i),s.compiledImplicit=Da(s,"implicit"),s.compiledExplicit=Da(s,"explicit"),s.compiledTypeMap=Ju(s.compiledImplicit,s.compiledExplicit),s},"extend");var V1=Ks,Z1=new Ht("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(e){return e!==null?e:""},"construct")}),K1=new Ht("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(e){return e!==null?e:[]},"construct")}),Q1=new Ht("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(e){return e!==null?e:{}},"construct")}),J1=new V1({explicit:[Z1,K1,Q1]});function td(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}f(td,"resolveYamlNull");function ed(){return null}f(ed,"constructYamlNull");function rd(e){return e===null}f(rd,"isNull");var tk=new Ht("tag:yaml.org,2002:null",{kind:"scalar",resolve:td,construct:ed,predicate:rd,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"});function id(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}f(id,"resolveYamlBoolean");function sd(e){return e==="true"||e==="True"||e==="TRUE"}f(sd,"constructYamlBoolean");function od(e){return Object.prototype.toString.call(e)==="[object Boolean]"}f(od,"isBoolean");var ek=new Ht("tag:yaml.org,2002:bool",{kind:"scalar",resolve:id,construct:sd,predicate:od,represent:{lowercase:f(function(e){return e?"true":"false"},"lowercase"),uppercase:f(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function ad(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}f(ad,"isHexCode");function nd(e){return 48<=e&&e<=55}f(nd,"isOctCode");function ld(e){return 48<=e&&e<=57}f(ld,"isDecCode");function hd(e){if(e===null)return!1;var t=e.length,r=0,i=!1,s;if(!t)return!1;if(s=e[r],(s==="-"||s==="+")&&(s=e[++r]),s==="0"){if(r+1===t)return!0;if(s=e[++r],s==="b"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(s!=="0"&&s!=="1")return!1;i=!0}return i&&s!=="_"}if(s==="x"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!ad(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}if(s==="o"){for(r++;r<t;r++)if(s=e[r],s!=="_"){if(!nd(e.charCodeAt(r)))return!1;i=!0}return i&&s!=="_"}}if(s==="_")return!1;for(;r<t;r++)if(s=e[r],s!=="_"){if(!ld(e.charCodeAt(r)))return!1;i=!0}return!(!i||s==="_")}f(hd,"resolveYamlInteger");function cd(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}f(cd,"constructYamlInteger");function ud(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Ft.isNegativeZero(e)}f(ud,"isInteger");var rk=new Ht("tag:yaml.org,2002:int",{kind:"scalar",resolve:hd,construct:cd,predicate:ud,represent:{binary:f(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:f(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:f(function(e){return e.toString(10)},"decimal"),hexadecimal:f(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ik=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function dd(e){return!(e===null||!ik.test(e)||e[e.length-1]==="_")}f(dd,"resolveYamlFloat");function pd(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}f(pd,"constructYamlFloat");var sk=/^[-+]?[0-9]+e/;function fd(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Ft.isNegativeZero(e))return"-0.0";return r=e.toString(10),sk.test(r)?r.replace("e",".e"):r}f(fd,"representYamlFloat");function gd(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ft.isNegativeZero(e))}f(gd,"isFloat");var ok=new Ht("tag:yaml.org,2002:float",{kind:"scalar",resolve:dd,construct:pd,predicate:gd,represent:fd,defaultStyle:"lowercase"}),md=J1.extend({implicit:[tk,ek,rk,ok]}),ak=md,yd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Cd=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function xd(e){return e===null?!1:yd.exec(e)!==null||Cd.exec(e)!==null}f(xd,"resolveYamlTimestamp");function bd(e){var t,r,i,s,o,a,n,l=0,h=null,c,u,p;if(t=yd.exec(e),t===null&&(t=Cd.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,s=+t[3],!t[4])return new Date(Date.UTC(r,i,s));if(o=+t[4],a=+t[5],n=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(c=+t[10],u=+(t[11]||0),h=(c*60+u)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,i,s,o,a,n,l)),h&&p.setTime(p.getTime()-h),p}f(bd,"constructYamlTimestamp");function kd(e){return e.toISOString()}f(kd,"representYamlTimestamp");var nk=new Ht("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:xd,construct:bd,instanceOf:Date,represent:kd});function Td(e){return e==="<<"||e===null}f(Td,"resolveYamlMerge");var lk=new Ht("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Td}),Nn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
131
|
+
\r`;function Sd(e){if(e===null)return!1;var t,r,i=0,s=e.length,o=Nn;for(r=0;r<s;r++)if(t=o.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}f(Sd,"resolveYamlBinary");function wd(e){var t,r,i=e.replace(/[\r\n=]/g,""),s=i.length,o=Nn,a=0,n=[];for(t=0;t<s;t++)t%4===0&&t&&(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)),a=a<<6|o.indexOf(i.charAt(t));return r=s%4*6,r===0?(n.push(a>>16&255),n.push(a>>8&255),n.push(a&255)):r===18?(n.push(a>>10&255),n.push(a>>2&255)):r===12&&n.push(a>>4&255),new Uint8Array(n)}f(wd,"constructYamlBinary");function _d(e){var t="",r=0,i,s,o=e.length,a=Nn;for(i=0;i<o;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return s=o%3,s===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):s===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):s===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}f(_d,"representYamlBinary");function Bd(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}f(Bd,"isBinary");var hk=new Ht("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Sd,construct:wd,predicate:Bd,represent:_d}),ck=Object.prototype.hasOwnProperty,uk=Object.prototype.toString;function vd(e){if(e===null)return!0;var t=[],r,i,s,o,a,n=e;for(r=0,i=n.length;r<i;r+=1){if(s=n[r],a=!1,uk.call(s)!=="[object Object]")return!1;for(o in s)if(ck.call(s,o))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(o)===-1)t.push(o);else return!1}return!0}f(vd,"resolveYamlOmap");function Ld(e){return e!==null?e:[]}f(Ld,"constructYamlOmap");var dk=new Ht("tag:yaml.org,2002:omap",{kind:"sequence",resolve:vd,construct:Ld}),pk=Object.prototype.toString;function Fd(e){if(e===null)return!0;var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],pk.call(i)!=="[object Object]"||(s=Object.keys(i),s.length!==1))return!1;o[t]=[s[0],i[s[0]]]}return!0}f(Fd,"resolveYamlPairs");function Ad(e){if(e===null)return[];var t,r,i,s,o,a=e;for(o=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],s=Object.keys(i),o[t]=[s[0],i[s[0]]];return o}f(Ad,"constructYamlPairs");var fk=new Ht("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Fd,construct:Ad}),gk=Object.prototype.hasOwnProperty;function Ed(e){if(e===null)return!0;var t,r=e;for(t in r)if(gk.call(r,t)&&r[t]!==null)return!1;return!0}f(Ed,"resolveYamlSet");function Md(e){return e!==null?e:{}}f(Md,"constructYamlSet");var mk=new Ht("tag:yaml.org,2002:set",{kind:"mapping",resolve:Ed,construct:Md}),$d=ak.extend({implicit:[nk,lk],explicit:[hk,dk,fk,mk]}),rr=Object.prototype.hasOwnProperty,Qs=1,Od=2,Id=3,Js=4,sa=1,yk=2,Sh=3,Ck=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xk=/[\x85\u2028\u2029]/,bk=/[,\[\]\{\}]/,Dd=/^(?:!|!!|![a-z\-]+!)$/i,Pd=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Pa(e){return Object.prototype.toString.call(e)}f(Pa,"_class");function ke(e){return e===10||e===13}f(ke,"is_EOL");function tr(e){return e===9||e===32}f(tr,"is_WHITE_SPACE");function Zt(e){return e===9||e===32||e===10||e===13}f(Zt,"is_WS_OR_EOL");function gr(e){return e===44||e===91||e===93||e===123||e===125}f(gr,"is_FLOW_INDICATOR");function Rd(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}f(Rd,"fromHexCode");function qd(e){return e===120?2:e===117?4:e===85?8:0}f(qd,"escapedHexLen");function Nd(e){return 48<=e&&e<=57?e-48:-1}f(Nd,"fromDecimalCode");function Ra(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
132
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}f(Ra,"simpleEscapeSequence");function zd(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}f(zd,"charFromCodepoint");function zn(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}f(zn,"setProperty");var Wd=new Array(256),Hd=new Array(256);for(lr=0;lr<256;lr++)Wd[lr]=Ra(lr)?1:0,Hd[lr]=Ra(lr);var lr;function Ud(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||$d,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}f(Ud,"State$1");function Wn(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=G1(r),new ee(t,r)}f(Wn,"generateError");function Q(e,t){throw Wn(e,t)}f(Q,"throwError");function Zi(e,t){e.onWarning&&e.onWarning.call(null,Wn(e,t))}f(Zi,"throwWarning");var wh={YAML:f(function(t,r,i){var s,o,a;t.version!==null&&Q(t,"duplication of %YAML directive"),i.length!==1&&Q(t,"YAML directive accepts exactly one argument"),s=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),s===null&&Q(t,"ill-formed argument of the YAML directive"),o=parseInt(s[1],10),a=parseInt(s[2],10),o!==1&&Q(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&Zi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(t,r,i){var s,o;i.length!==2&&Q(t,"TAG directive accepts exactly two arguments"),s=i[0],o=i[1],Dd.test(s)||Q(t,"ill-formed tag handle (first argument) of the TAG directive"),rr.call(t.tagMap,s)&&Q(t,'there is a previously declared suffix for "'+s+'" tag handle'),Pd.test(o)||Q(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch{Q(t,"tag prefix is malformed: "+o)}t.tagMap[s]=o},"handleTagDirective")};function Xe(e,t,r,i){var s,o,a,n;if(t<r){if(n=e.input.slice(t,r),i)for(s=0,o=n.length;s<o;s+=1)a=n.charCodeAt(s),a===9||32<=a&&a<=1114111||Q(e,"expected valid JSON character");else Ck.test(n)&&Q(e,"the stream contains non-printable characters");e.result+=n}}f(Xe,"captureSegment");function qa(e,t,r,i){var s,o,a,n;for(Ft.isObject(r)||Q(e,"cannot merge mappings; the provided source object is unacceptable"),s=Object.keys(r),a=0,n=s.length;a<n;a+=1)o=s[a],rr.call(t,o)||(zn(t,o,r[o]),i[o]=!0)}f(qa,"mergeMappings");function mr(e,t,r,i,s,o,a,n,l){var h,c;if(Array.isArray(s))for(s=Array.prototype.slice.call(s),h=0,c=s.length;h<c;h+=1)Array.isArray(s[h])&&Q(e,"nested arrays are not supported inside keys"),typeof s=="object"&&Pa(s[h])==="[object Object]"&&(s[h]="[object Object]");if(typeof s=="object"&&Pa(s)==="[object Object]"&&(s="[object Object]"),s=String(s),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(o))for(h=0,c=o.length;h<c;h+=1)qa(e,t,o[h],r);else qa(e,t,o,r);else!e.json&&!rr.call(r,s)&&rr.call(t,s)&&(e.line=a||e.line,e.lineStart=n||e.lineStart,e.position=l||e.position,Q(e,"duplicated mapping key")),zn(t,s,o),delete r[s];return t}f(mr,"storeMappingPair");function _o(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Q(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}f(_o,"readLineBreak");function Bt(e,t,r){for(var i=0,s=e.input.charCodeAt(e.position);s!==0;){for(;tr(s);)s===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),s=e.input.charCodeAt(++e.position);if(t&&s===35)do s=e.input.charCodeAt(++e.position);while(s!==10&&s!==13&&s!==0);if(ke(s))for(_o(e),s=e.input.charCodeAt(e.position),i++,e.lineIndent=0;s===32;)e.lineIndent++,s=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&Zi(e,"deficient indentation"),i}f(Bt,"skipSeparationSpace");function is(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Zt(r)))}f(is,"testDocumentSeparator");function Bo(e,t){t===1?e.result+=" ":t>1&&(e.result+=Ft.repeat(`
|
|
133
|
+
`,t-1))}f(Bo,"writeFoldedLines");function Yd(e,t,r){var i,s,o,a,n,l,h,c,u=e.kind,p=e.result,d;if(d=e.input.charCodeAt(e.position),Zt(d)||gr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(s=e.input.charCodeAt(e.position+1),Zt(s)||r&&gr(s)))return!1;for(e.kind="scalar",e.result="",o=a=e.position,n=!1;d!==0;){if(d===58){if(s=e.input.charCodeAt(e.position+1),Zt(s)||r&&gr(s))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),Zt(i))break}else{if(e.position===e.lineStart&&is(e)||r&&gr(d))break;if(ke(d))if(l=e.line,h=e.lineStart,c=e.lineIndent,Bt(e,!1,-1),e.lineIndent>=t){n=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=l,e.lineStart=h,e.lineIndent=c;break}}n&&(Xe(e,o,a,!1),Bo(e,e.line-l),o=a=e.position,n=!1),tr(d)||(a=e.position+1),d=e.input.charCodeAt(++e.position)}return Xe(e,o,a,!1),e.result?!0:(e.kind=u,e.result=p,!1)}f(Yd,"readPlainScalar");function Gd(e,t){var r,i,s;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=s=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(Xe(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,s=e.position;else return!0;else ke(r)?(Xe(e,i,s,!0),Bo(e,Bt(e,!1,t)),i=s=e.position):e.position===e.lineStart&&is(e)?Q(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);Q(e,"unexpected end of the stream within a single quoted scalar")}f(Gd,"readSingleQuotedScalar");function Xd(e,t){var r,i,s,o,a,n;if(n=e.input.charCodeAt(e.position),n!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;){if(n===34)return Xe(e,r,e.position,!0),e.position++,!0;if(n===92){if(Xe(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),ke(n))Bt(e,!1,t);else if(n<256&&Wd[n])e.result+=Hd[n],e.position++;else if((a=qd(n))>0){for(s=a,o=0;s>0;s--)n=e.input.charCodeAt(++e.position),(a=Rd(n))>=0?o=(o<<4)+a:Q(e,"expected hexadecimal character");e.result+=zd(o),e.position++}else Q(e,"unknown escape sequence");r=i=e.position}else ke(n)?(Xe(e,r,i,!0),Bo(e,Bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&is(e)?Q(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Q(e,"unexpected end of the stream within a double quoted scalar")}f(Xd,"readDoubleQuotedScalar");function jd(e,t){var r=!0,i,s,o,a=e.tag,n,l=e.anchor,h,c,u,p,d,y=Object.create(null),g,m,C,b;if(b=e.input.charCodeAt(e.position),b===91)c=93,d=!1,n=[];else if(b===123)c=125,d=!0,n={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=n),b=e.input.charCodeAt(++e.position);b!==0;){if(Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===c)return e.position++,e.tag=a,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=n,!0;r?b===44&&Q(e,"expected the node content, but found ','"):Q(e,"missed comma between flow collection entries"),m=g=C=null,u=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Zt(h)&&(u=p=!0,e.position++,Bt(e,!0,t))),i=e.line,s=e.lineStart,o=e.position,Sr(e,t,Qs,!1,!0),m=e.tag,g=e.result,Bt(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),Bt(e,!0,t),Sr(e,t,Qs,!1,!0),C=e.result),d?mr(e,n,y,m,g,C,i,s,o):u?n.push(mr(e,null,y,m,g,C,i,s,o)):n.push(g),Bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}Q(e,"unexpected end of the stream within a flow collection")}f(jd,"readFlowCollection");function Vd(e,t){var r,i,s=sa,o=!1,a=!1,n=t,l=0,h=!1,c,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)sa===s?s=u===43?Sh:yk:Q(e,"repeat of a chomping mode identifier");else if((c=Nd(u))>=0)c===0?Q(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Q(e,"repeat of an indentation width identifier"):(n=t+c-1,a=!0);else break;if(tr(u)){do u=e.input.charCodeAt(++e.position);while(tr(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ke(u)&&u!==0)}for(;u!==0;){for(_o(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!a||e.lineIndent<n)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>n&&(n=e.lineIndent),ke(u)){l++;continue}if(e.lineIndent<n){s===Sh?e.result+=Ft.repeat(`
|
|
134
|
+
`,o?1+l:l):s===sa&&o&&(e.result+=`
|
|
135
|
+
`);break}for(i?tr(u)?(h=!0,e.result+=Ft.repeat(`
|
|
136
|
+
`,o?1+l:l)):h?(h=!1,e.result+=Ft.repeat(`
|
|
137
|
+
`,l+1)):l===0?o&&(e.result+=" "):e.result+=Ft.repeat(`
|
|
138
|
+
`,l):e.result+=Ft.repeat(`
|
|
139
|
+
`,o?1+l:l),o=!0,a=!0,l=0,r=e.position;!ke(u)&&u!==0;)u=e.input.charCodeAt(++e.position);Xe(e,r,e.position,!1)}return!0}f(Vd,"readBlockScalar");function Na(e,t){var r,i=e.tag,s=e.anchor,o=[],a,n=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,"tab characters must not be used in indentation")),!(l!==45||(a=e.input.charCodeAt(e.position+1),!Zt(a))));){if(n=!0,e.position++,Bt(e,!0,-1)&&e.lineIndent<=t){o.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,Sr(e,t,Id,!1,!0),o.push(e.result),Bt(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)Q(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return n?(e.tag=i,e.anchor=s,e.kind="sequence",e.result=o,!0):!1}f(Na,"readBlockSequence");function Zd(e,t,r){var i,s,o,a,n,l,h=e.tag,c=e.anchor,u={},p=Object.create(null),d=null,y=null,g=null,m=!1,C=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!m&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),o=e.line,(b===63||b===58)&&Zt(i))b===63?(m&&(mr(e,u,p,d,y,null,a,n,l),d=y=g=null),C=!0,m=!0,s=!0):m?(m=!1,s=!0):Q(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(a=e.line,n=e.lineStart,l=e.position,!Sr(e,r,Od,!1,!0))break;if(e.line===o){for(b=e.input.charCodeAt(e.position);tr(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),Zt(b)||Q(e,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(mr(e,u,p,d,y,null,a,n,l),d=y=g=null),C=!0,m=!1,s=!1,d=e.tag,y=e.result;else if(C)Q(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=h,e.anchor=c,!0}else if(C)Q(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=h,e.anchor=c,!0}if((e.line===o||e.lineIndent>t)&&(m&&(a=e.line,n=e.lineStart,l=e.position),Sr(e,t,Js,!0,s)&&(m?y=e.result:g=e.result),m||(mr(e,u,p,d,y,g,a,n,l),d=y=g=null),Bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&b!==0)Q(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return m&&mr(e,u,p,d,y,null,a,n,l),C&&(e.tag=h,e.anchor=c,e.kind="mapping",e.result=u),C}f(Zd,"readBlockMapping");function Kd(e){var t,r=!1,i=!1,s,o,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&Q(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,s="!!",a=e.input.charCodeAt(++e.position)):s="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(o=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):Q(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Zt(a);)a===33&&(i?Q(e,"tag suffix cannot contain exclamation marks"):(s=e.input.slice(t-1,e.position+1),Dd.test(s)||Q(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);o=e.input.slice(t,e.position),bk.test(o)&&Q(e,"tag suffix cannot contain flow indicator characters")}o&&!Pd.test(o)&&Q(e,"tag name cannot contain such characters: "+o);try{o=decodeURIComponent(o)}catch{Q(e,"tag name is malformed: "+o)}return r?e.tag=o:rr.call(e.tagMap,s)?e.tag=e.tagMap[s]+o:s==="!"?e.tag="!"+o:s==="!!"?e.tag="tag:yaml.org,2002:"+o:Q(e,'undeclared tag handle "'+s+'"'),!0}f(Kd,"readTagProperty");function Qd(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Q(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Zt(r)&&!gr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}f(Qd,"readAnchorProperty");function Jd(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Zt(i)&&!gr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),rr.call(e.anchorMap,r)||Q(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Bt(e,!0,-1),!0}f(Jd,"readAlias");function Sr(e,t,r,i,s){var o,a,n,l=1,h=!1,c=!1,u,p,d,y,g,m;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,o=a=n=Js===r||Id===r,i&&Bt(e,!0,-1)&&(h=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;Kd(e)||Qd(e);)Bt(e,!0,-1)?(h=!0,n=o,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):n=!1;if(n&&(n=h||s),(l===1||Js===r)&&(Qs===r||Od===r?g=t:g=t+1,m=e.position-e.lineStart,l===1?n&&(Na(e,m)||Zd(e,m,g))||jd(e,g)?c=!0:(a&&Vd(e,g)||Gd(e,g)||Xd(e,g)?c=!0:Jd(e)?(c=!0,(e.tag!==null||e.anchor!==null)&&Q(e,"alias node should not have any properties")):Yd(e,g,Qs===r)&&(c=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(c=n&&Na(e,m))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Q(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,p=e.implicitTypes.length;u<p;u+=1)if(y=e.implicitTypes[u],y.resolve(e.result)){e.result=y.construct(e.result),e.tag=y.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(rr.call(e.typeMap[e.kind||"fallback"],e.tag))y=e.typeMap[e.kind||"fallback"][e.tag];else for(y=null,d=e.typeMap.multi[e.kind||"fallback"],u=0,p=d.length;u<p;u+=1)if(e.tag.slice(0,d[u].tag.length)===d[u].tag){y=d[u];break}y||Q(e,"unknown tag !<"+e.tag+">"),e.result!==null&&y.kind!==e.kind&&Q(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+y.kind+'", not "'+e.kind+'"'),y.resolve(e.result,e.tag)?(e.result=y.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Q(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||c}f(Sr,"composeNode");function tp(e){var t=e.position,r,i,s,o=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(Bt(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(o=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Zt(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),s=[],i.length<1&&Q(e,"directive name must not be less than one character in length");a!==0;){for(;tr(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!ke(a));break}if(ke(a))break;for(r=e.position;a!==0&&!Zt(a);)a=e.input.charCodeAt(++e.position);s.push(e.input.slice(r,e.position))}a!==0&&_o(e),rr.call(wh,i)?wh[i](e,i,s):Zi(e,'unknown document directive "'+i+'"')}if(Bt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Bt(e,!0,-1)):o&&Q(e,"directives end mark is expected"),Sr(e,e.lineIndent-1,Js,!1,!0),Bt(e,!0,-1),e.checkLineBreaks&&xk.test(e.input.slice(t,e.position))&&Zi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&is(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Bt(e,!0,-1));return}if(e.position<e.length-1)Q(e,"end of the stream or a document separator is expected");else return}f(tp,"readDocument");function Hn(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
140
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Ud(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Q(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)tp(r);return r.documents}f(Hn,"loadDocuments");function kk(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Hn(e,r);if(typeof t!="function")return i;for(var s=0,o=i.length;s<o;s+=1)t(i[s])}f(kk,"loadAll$1");function ep(e,t){var r=Hn(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new ee("expected a single document in the stream, but found more")}}f(ep,"load$1");var Tk=ep,Sk={load:Tk},rp=Object.prototype.toString,ip=Object.prototype.hasOwnProperty,Un=65279,wk=9,Ki=10,_k=13,Bk=32,vk=33,Lk=34,za=35,Fk=37,Ak=38,Ek=39,Mk=42,sp=44,$k=45,to=58,Ok=61,Ik=62,Dk=63,Pk=64,op=91,ap=93,Rk=96,np=123,qk=124,lp=125,Yt={};Yt[0]="\\0";Yt[7]="\\a";Yt[8]="\\b";Yt[9]="\\t";Yt[10]="\\n";Yt[11]="\\v";Yt[12]="\\f";Yt[13]="\\r";Yt[27]="\\e";Yt[34]='\\"';Yt[92]="\\\\";Yt[133]="\\N";Yt[160]="\\_";Yt[8232]="\\L";Yt[8233]="\\P";var Nk=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],zk=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function hp(e,t){var r,i,s,o,a,n,l;if(t===null)return{};for(r={},i=Object.keys(t),s=0,o=i.length;s<o;s+=1)a=i[s],n=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),l=e.compiledTypeMap.fallback[a],l&&ip.call(l.styleAliases,n)&&(n=l.styleAliases[n]),r[a]=n;return r}f(hp,"compileStyleMap");function cp(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new ee("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Ft.repeat("0",i-t.length)+t}f(cp,"encodeHex");var Wk=1,Qi=2;function up(e){this.schema=e.schema||$d,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ft.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=hp(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Qi:Wk,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(up,"State");function Wa(e,t){for(var r=Ft.repeat(" ",t),i=0,s=-1,o="",a,n=e.length;i<n;)s=e.indexOf(`
|
|
141
|
+
`,i),s===-1?(a=e.slice(i),i=n):(a=e.slice(i,s+1),i=s+1),a.length&&a!==`
|
|
142
|
+
`&&(o+=r),o+=a;return o}f(Wa,"indentString");function eo(e,t){return`
|
|
143
|
+
`+Ft.repeat(" ",e.indent*t)}f(eo,"generateNextLine");function dp(e,t){var r,i,s;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(s=e.implicitTypes[r],s.resolve(t))return!0;return!1}f(dp,"testImplicitResolving");function Ji(e){return e===Bk||e===wk}f(Ji,"isWhitespace");function pi(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Un||65536<=e&&e<=1114111}f(pi,"isPrintable");function Ha(e){return pi(e)&&e!==Un&&e!==_k&&e!==Ki}f(Ha,"isNsCharOrWhitespace");function Ua(e,t,r){var i=Ha(e),s=i&&!Ji(e);return(r?i:i&&e!==sp&&e!==op&&e!==ap&&e!==np&&e!==lp)&&e!==za&&!(t===to&&!s)||Ha(t)&&!Ji(t)&&e===za||t===to&&s}f(Ua,"isPlainSafe");function pp(e){return pi(e)&&e!==Un&&!Ji(e)&&e!==$k&&e!==Dk&&e!==to&&e!==sp&&e!==op&&e!==ap&&e!==np&&e!==lp&&e!==za&&e!==Ak&&e!==Mk&&e!==vk&&e!==qk&&e!==Ok&&e!==Ik&&e!==Ek&&e!==Lk&&e!==Fk&&e!==Pk&&e!==Rk}f(pp,"isPlainSafeFirst");function fp(e){return!Ji(e)&&e!==to}f(fp,"isPlainSafeLast");function Hr(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}f(Hr,"codePointAt");function Yn(e){var t=/^\n* /;return t.test(e)}f(Yn,"needIndentIndicator");var gp=1,Ya=2,mp=3,yp=4,qr=5;function Cp(e,t,r,i,s,o,a,n){var l,h=0,c=null,u=!1,p=!1,d=i!==-1,y=-1,g=pp(Hr(e,0))&&fp(Hr(e,e.length-1));if(t||a)for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Hr(e,l),!pi(h))return qr;g=g&&Ua(h,c,n),c=h}else{for(l=0;l<e.length;h>=65536?l+=2:l++){if(h=Hr(e,l),h===Ki)u=!0,d&&(p=p||l-y-1>i&&e[y+1]!==" ",y=l);else if(!pi(h))return qr;g=g&&Ua(h,c,n),c=h}p=p||d&&l-y-1>i&&e[y+1]!==" "}return!u&&!p?g&&!a&&!s(e)?gp:o===Qi?qr:Ya:r>9&&Yn(e)?qr:a?o===Qi?qr:Ya:p?yp:mp}f(Cp,"chooseScalarStyle");function xp(e,t,r,i,s){e.dump=function(){if(t.length===0)return e.quotingType===Qi?'""':"''";if(!e.noCompatMode&&(Nk.indexOf(t)!==-1||zk.test(t)))return e.quotingType===Qi?'"'+t+'"':"'"+t+"'";var o=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),n=i||e.flowLevel>-1&&r>=e.flowLevel;function l(h){return dp(e,h)}switch(f(l,"testAmbiguity"),Cp(t,n,e.indent,a,l,e.quotingType,e.forceQuotes&&!i,s)){case gp:return t;case Ya:return"'"+t.replace(/'/g,"''")+"'";case mp:return"|"+Ga(t,e.indent)+Xa(Wa(t,o));case yp:return">"+Ga(t,e.indent)+Xa(Wa(bp(t,a),o));case qr:return'"'+kp(t)+'"';default:throw new ee("impossible error: invalid scalar style")}}()}f(xp,"writeScalar");function Ga(e,t){var r=Yn(e)?String(t):"",i=e[e.length-1]===`
|
|
144
|
+
`,s=i&&(e[e.length-2]===`
|
|
145
|
+
`||e===`
|
|
146
|
+
`),o=s?"+":i?"":"-";return r+o+`
|
|
147
|
+
`}f(Ga,"blockHeader");function Xa(e){return e[e.length-1]===`
|
|
148
|
+
`?e.slice(0,-1):e}f(Xa,"dropEndingNewline");function bp(e,t){for(var r=/(\n+)([^\n]*)/g,i=function(){var h=e.indexOf(`
|
|
149
|
+
`);return h=h!==-1?h:e.length,r.lastIndex=h,ja(e.slice(0,h),t)}(),s=e[0]===`
|
|
150
|
+
`||e[0]===" ",o,a;a=r.exec(e);){var n=a[1],l=a[2];o=l[0]===" ",i+=n+(!s&&!o&&l!==""?`
|
|
151
|
+
`:"")+ja(l,t),s=o}return i}f(bp,"foldString");function ja(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,s=0,o,a=0,n=0,l="";i=r.exec(e);)n=i.index,n-s>t&&(o=a>s?a:n,l+=`
|
|
152
|
+
`+e.slice(s,o),s=o+1),a=n;return l+=`
|
|
153
|
+
`,e.length-s>t&&a>s?l+=e.slice(s,a)+`
|
|
154
|
+
`+e.slice(a+1):l+=e.slice(s),l.slice(1)}f(ja,"foldLine");function kp(e){for(var t="",r=0,i,s=0;s<e.length;r>=65536?s+=2:s++)r=Hr(e,s),i=Yt[r],!i&&pi(r)?(t+=e[s],r>=65536&&(t+=e[s+1])):t+=i||cp(r);return t}f(kp,"escapeString");function Tp(e,t,r){var i="",s=e.tag,o,a,n;for(o=0,a=r.length;o<a;o+=1)n=r[o],e.replacer&&(n=e.replacer.call(r,String(o),n)),($e(e,t,n,!1,!1)||typeof n>"u"&&$e(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=s,e.dump="["+i+"]"}f(Tp,"writeFlowSequence");function Va(e,t,r,i){var s="",o=e.tag,a,n,l;for(a=0,n=r.length;a<n;a+=1)l=r[a],e.replacer&&(l=e.replacer.call(r,String(a),l)),($e(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&$e(e,t+1,null,!0,!0,!1,!0))&&((!i||s!=="")&&(s+=eo(e,t)),e.dump&&Ki===e.dump.charCodeAt(0)?s+="-":s+="- ",s+=e.dump);e.tag=o,e.dump=s||"[]"}f(Va,"writeBlockSequence");function Sp(e,t,r){var i="",s=e.tag,o=Object.keys(r),a,n,l,h,c;for(a=0,n=o.length;a<n;a+=1)c="",i!==""&&(c+=", "),e.condenseFlow&&(c+='"'),l=o[a],h=r[l],e.replacer&&(h=e.replacer.call(r,l,h)),$e(e,t,l,!1,!1)&&(e.dump.length>1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),$e(e,t,h,!1,!1)&&(c+=e.dump,i+=c));e.tag=s,e.dump="{"+i+"}"}f(Sp,"writeFlowMapping");function wp(e,t,r,i){var s="",o=e.tag,a=Object.keys(r),n,l,h,c,u,p;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new ee("sortKeys must be a boolean or a function");for(n=0,l=a.length;n<l;n+=1)p="",(!i||s!=="")&&(p+=eo(e,t)),h=a[n],c=r[h],e.replacer&&(c=e.replacer.call(r,h,c)),$e(e,t+1,h,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Ki===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,u&&(p+=eo(e,t)),$e(e,t+1,c,!0,u)&&(e.dump&&Ki===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,s+=p));e.tag=o,e.dump=s||"{}"}f(wp,"writeBlockMapping");function Za(e,t,r){var i,s,o,a,n,l;for(s=r?e.explicitTypes:e.implicitTypes,o=0,a=s.length;o<a;o+=1)if(n=s[o],(n.instanceOf||n.predicate)&&(!n.instanceOf||typeof t=="object"&&t instanceof n.instanceOf)&&(!n.predicate||n.predicate(t))){if(r?n.multi&&n.representName?e.tag=n.representName(t):e.tag=n.tag:e.tag="?",n.represent){if(l=e.styleMap[n.tag]||n.defaultStyle,rp.call(n.represent)==="[object Function]")i=n.represent(t,l);else if(ip.call(n.represent,l))i=n.represent[l](t,l);else throw new ee("!<"+n.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}f(Za,"detectType");function $e(e,t,r,i,s,o,a){e.tag=null,e.dump=r,Za(e,r,!1)||Za(e,r,!0);var n=rp.call(e.dump),l=i,h;i&&(i=e.flowLevel<0||e.flowLevel>t);var c=n==="[object Object]"||n==="[object Array]",u,p;if(c&&(u=e.duplicates.indexOf(r),p=u!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(s=!1),p&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(c&&p&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),n==="[object Object]")i&&Object.keys(e.dump).length!==0?(wp(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(Sp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?Va(e,t-1,e.dump,s):Va(e,t,e.dump,s),p&&(e.dump="&ref_"+u+e.dump)):(Tp(e,t,e.dump),p&&(e.dump="&ref_"+u+" "+e.dump));else if(n==="[object String]")e.tag!=="?"&&xp(e,e.dump,t,o,l);else{if(n==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new ee("unacceptable kind of an object to dump "+n)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}f($e,"writeNode");function _p(e,t){var r=[],i=[],s,o;for(ro(e,r,i),s=0,o=i.length;s<o;s+=1)t.duplicates.push(r[i[s]]);t.usedDuplicates=new Array(o)}f(_p,"getDuplicateReferences");function ro(e,t,r){var i,s,o;if(e!==null&&typeof e=="object")if(s=t.indexOf(e),s!==-1)r.indexOf(s)===-1&&r.push(s);else if(t.push(e),Array.isArray(e))for(s=0,o=e.length;s<o;s+=1)ro(e[s],t,r);else for(i=Object.keys(e),s=0,o=i.length;s<o;s+=1)ro(e[i[s]],t,r)}f(ro,"inspectNode");function Hk(e,t){t=t||{};var r=new up(t);r.noRefs||_p(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),$e(r,0,i,!0,!0)?r.dump+`
|
|
155
|
+
`:""}f(Hk,"dump$1");function Uk(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}f(Uk,"renamed");var Bp=md,vp=Sk.load;/*! Bundled license information:
|
|
156
|
+
|
|
157
|
+
js-yaml/dist/js-yaml.mjs:
|
|
158
|
+
(*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *)
|
|
159
|
+
*/var Nr=f((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Wt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},_h={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Pi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=xt(e),t=xt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}f(Pi,"calculateDeltaAndAngle");var xt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Lp=f(e=>({x:f(function(t,r,i){let s=0;const o=xt(i[0]).x<xt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Wt,e.arrowTypeStart)){const{angle:d,deltaX:y}=Pi(i[0],i[1]);s=Wt[e.arrowTypeStart]*Math.cos(d)*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Wt,e.arrowTypeEnd)){const{angle:d,deltaX:y}=Pi(i[i.length-1],i[i.length-2]);s=Wt[e.arrowTypeEnd]*Math.cos(d)*(y>=0?1:-1)}const a=Math.abs(xt(t).x-xt(i[i.length-1]).x),n=Math.abs(xt(t).y-xt(i[i.length-1]).y),l=Math.abs(xt(t).x-xt(i[0]).x),h=Math.abs(xt(t).y-xt(i[0]).y),c=Wt[e.arrowTypeStart],u=Wt[e.arrowTypeEnd],p=1;if(a<u&&a>0&&n<u){let d=u+p-a;d*=o==="right"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=o==="right"?-1:1,s+=d}return xt(t).x+s},"x"),y:f(function(t,r,i){let s=0;const o=xt(i[0]).y<xt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Wt,e.arrowTypeStart)){const{angle:d,deltaY:y}=Pi(i[0],i[1]);s=Wt[e.arrowTypeStart]*Math.abs(Math.sin(d))*(y>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Wt,e.arrowTypeEnd)){const{angle:d,deltaY:y}=Pi(i[i.length-1],i[i.length-2]);s=Wt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(y>=0?1:-1)}const a=Math.abs(xt(t).y-xt(i[i.length-1]).y),n=Math.abs(xt(t).x-xt(i[i.length-1]).x),l=Math.abs(xt(t).y-xt(i[0]).y),h=Math.abs(xt(t).x-xt(i[0]).x),c=Wt[e.arrowTypeStart],u=Wt[e.arrowTypeEnd],p=1;if(a<u&&a>0&&n<u){let d=u+p-a;d*=o==="up"?-1:1,s-=d}if(l<c&&l>0&&h<c){let d=c+p-l;d*=o==="up"?-1:1,s+=d}return xt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Fp={},Mt={};Object.defineProperty(Mt,"__esModule",{value:!0});Mt.BLANK_URL=Mt.relativeFirstCharacters=Mt.whitespaceEscapeCharsRegex=Mt.urlSchemeRegex=Mt.ctrlCharactersRegex=Mt.htmlCtrlEntityRegex=Mt.htmlEntitiesRegex=Mt.invalidProtocolRegex=void 0;Mt.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;Mt.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;Mt.htmlCtrlEntityRegex=/&(newline|tab);/gi;Mt.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;Mt.urlSchemeRegex=/^.+(:|:)/gim;Mt.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;Mt.relativeFirstCharacters=[".","/"];Mt.BLANK_URL="about:blank";Object.defineProperty(Fp,"__esModule",{value:!0});var Ap=Fp.sanitizeUrl=jk,zt=Mt;function Yk(e){return zt.relativeFirstCharacters.indexOf(e[0])>-1}function Gk(e){var t=e.replace(zt.ctrlCharactersRegex,"");return t.replace(zt.htmlEntitiesRegex,function(r,i){return String.fromCharCode(i)})}function Xk(e){return URL.canParse(e)}function Bh(e){try{return decodeURIComponent(e)}catch{return e}}function jk(e){if(!e)return zt.BLANK_URL;var t,r=Bh(e.trim());do r=Gk(r).replace(zt.htmlCtrlEntityRegex,"").replace(zt.ctrlCharactersRegex,"").replace(zt.whitespaceEscapeCharsRegex,"").trim(),r=Bh(r),t=r.match(zt.ctrlCharactersRegex)||r.match(zt.htmlEntitiesRegex)||r.match(zt.htmlCtrlEntityRegex)||r.match(zt.whitespaceEscapeCharsRegex);while(t&&t.length>0);var i=r;if(!i)return zt.BLANK_URL;if(Yk(i))return i;var s=i.trimStart(),o=s.match(zt.urlSchemeRegex);if(!o)return i;var a=o[0].toLowerCase().trim();if(zt.invalidProtocolRegex.test(a))return zt.BLANK_URL;var n=s.replace(/\\/g,"/");if(a==="mailto:"||a.includes("://"))return n;if(a==="http:"||a==="https:"){if(!Xk(n))return zt.BLANK_URL;var l=new URL(n);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return n}function oa(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Vk(){}function Ep(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function vo(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Mp="[object RegExp]",Gn="[object String]",Xn="[object Number]",jn="[object Boolean]",Vn="[object Arguments]",$p="[object Symbol]",Op="[object Date]",Ip="[object Map]",Dp="[object Set]",Pp="[object Array]",Rp="[object ArrayBuffer]",qp="[object Object]",Np="[object DataView]",zp="[object Uint8Array]",Wp="[object Uint8ClampedArray]",Hp="[object Uint16Array]",Up="[object Uint32Array]",Yp="[object Int8Array]",Gp="[object Int16Array]",Xp="[object Int32Array]",jp="[object Float32Array]",Vp="[object Float64Array]",vh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||function(){return this}()||Function("return this")();function Zn(e){return typeof vh.Buffer<"u"&&vh.Buffer.isBuffer(e)}function Zk(e){return Number.isSafeInteger(e)&&e>=0}function Zp(e){return e!=null&&typeof e!="function"&&Zk(e.length)}function Kk(e){return e==="__proto__"}function Lo(e){return e==null||typeof e!="object"&&typeof e!="function"}function Kn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Qk(e,t){return Ur(e,void 0,e,new Map,t)}function Ur(e,t,r,i=new Map,s=void 0){const o=s==null?void 0:s(e,t,r,i);if(o!==void 0)return o;if(Lo(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ur(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,Ur(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(Ur(n,void 0,r,i,s));return a}if(Zn(e))return e.subarray();if(Kn(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=Ur(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),ye(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),ye(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),ye(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,ye(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),ye(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),ye(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),ye(a,e,r,i,s),a}if(typeof e=="object"&&Jk(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),ye(a,e,r,i,s),a}return e}function ye(e,t,r=e,i,s){const o=[...Object.keys(t),...Ep(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=Ur(t[n],n,r,i,s))}}function Jk(e){switch(vo(e)){case Vn:case Pp:case Rp:case Np:case jn:case Op:case jp:case Vp:case Yp:case Gp:case Xp:case Ip:case Xn:case qp:case Mp:case Dp:case Gn:case $p:case zp:case Wp:case Hp:case Up:return!0;default:return!1}}function t2(e,t){return Qk(e,(r,i,s,o)=>{if(typeof e=="object"){if(vo(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),ye(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Xn:case Gn:case jn:{const a=new e.constructor(e==null?void 0:e.valueOf());return ye(a,e),a}case Vn:{const a={};return ye(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function Lh(e){return t2(e)}function Ka(e){return e!==null&&typeof e=="object"&&vo(e)==="[object Arguments]"}function Qa(e){return typeof e=="object"&&e!==null}function e2(e){return Qa(e)&&Zp(e)}function ss(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(ss.Cache||Map),r}ss.Cache=Map;function Yi(e){return Kn(e)}function r2(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function i2(e){if(Lo(e))return e;if(Array.isArray(e)||Kn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function s2(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=$s(s,a,i,new Map)}return s}function $s(e,t,r,i){if(Lo(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return i2(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...Ep(t)];for(let o=0;o<s.length;o++){const a=s[o];if(Kk(a))continue;let n=t[a],l=e[a];if(Ka(n)&&(n={...n}),Ka(l)&&(l={...l}),Zn(n)&&(n=Lh(n)),Array.isArray(n))if(Array.isArray(l)){const c=[],u=Reflect.ownKeys(l);for(let p=0;p<u.length;p++){const d=u[p];c[d]=l[d]}l=c}else if(e2(l)){const c=[];for(let u=0;u<l.length;u++)c[u]=l[u];l=c}else l=[];const h=r(l,n,a,e,t,i);h!==void 0?e[a]=h:Array.isArray(n)||Qa(l)&&Qa(n)&&(oa(l)||oa(n)||Yi(l)||Yi(n))?e[a]=$s(l,n,r,i):l==null&&oa(n)?e[a]=$s({},n,r,i):l==null&&Yi(n)?e[a]=Lh(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function o2(e,...t){return s2(e,...t,Vk)}function Fh(e){if(e==null)return!0;if(Zp(e))return typeof e.splice!="function"&&typeof e!="string"&&!Zn(e)&&!Yi(e)&&!Ka(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return r2(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Kp="",a2={curveBasis:js,curveBasisClosed:M1,curveBasisOpen:$1,curveBumpX:wu,curveBumpY:_u,curveBundle:O1,curveCardinalClosed:I1,curveCardinalOpen:D1,curveCardinal:Fu,curveCatmullRomClosed:P1,curveCatmullRomOpen:R1,curveCatmullRom:Eu,curveLinear:Ui,curveLinearClosed:q1,curveMonotoneX:Pu,curveMonotoneY:Ru,curveNatural:Nu,curveStep:zu,curveStepAfter:Hu,curveStepBefore:Wu},n2=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,l2=f(function(e,t){const r=Qp(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Ds(a),i=vt(i,[...a])}else i=r.args;if(!i)return;let s=yn(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),Qp=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${n2.source})(?=[}][%]{2}).*
|
|
160
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),D.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let o;const a=[];for(;(o=Wi.exec(e))!==null;)if(o.index===Wi.lastIndex&&Wi.lastIndex++,o&&!t||t&&((r=o[1])!=null&&r.match(t))||t&&((i=o[2])!=null&&i.match(t))){const n=o[1]?o[1]:o[2],l=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;a.push({type:n,args:l})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(s){return D.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),h2=f(function(e){return e.replace(Wi,"")},"removeDirectives"),c2=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Qn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return a2[r]??t}f(Qn,"interpolateToCurve");function Jp(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Ap(r):r}f(Jp,"formatUrl");var u2=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){D.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function Jn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(Jn,"distance");function tf(e){let t,r=0;e.forEach(s=>{r+=Jn(s,t),t=s});const i=r/2;return tl(e,i)}f(tf,"traverseEdge");function ef(e){return e.length===1?e[0]:tf(e)}f(ef,"calcLabelPosition");var Ah=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),tl=f((e,t)=>{let r,i=t;for(const s of e){if(r){const o=Jn(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:Ah((1-a)*r.x+a*s.x,5),y:Ah((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),d2=f((e,t,r)=>{D.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=tl(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function rf(e,t,r){const i=structuredClone(r);D.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=tl(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}f(rf,"calcTerminalLabelPosition");function el(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}f(el,"getStylesFromArray");var Eh=0,sf=f(()=>(Eh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Eh),"generateId");function of(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(of,"makeRandomHex");var af=f(e=>of(e.length),"random"),p2=f(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),f2=f(function(e,t){const r=t.text.replace(gi.lineBreakRegex," "),[,i]=os(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),nf=ss((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),gi.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=Oe(`${a} `,r),h=Oe(o,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=g2(a,t,"-",r);s.push(o,...p),o=d}else h+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),g2=ss((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const h=`${a}${n}`;if(Oe(h,i)>=t){const u=l+1,p=s.length===u,d=`${h}${r}`;o.push(p?h:d),a=""}else a=h}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function rl(e,t){return Fo(e,t).height}f(rl,"calculateTextHeight");function Oe(e,t){return Fo(e,t).width}f(Oe,"calculateTextWidth");var Fo=ss((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=os(r),a=["sans-serif",i],n=e.split(gi.lineBreakRegex),l=[],h=nt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const c=h.append("svg");for(const p of a){let d=0;const y={width:0,height:0,lineHeight:0};for(const g of n){const m=p2();m.text=g||Kp;const C=f2(c,m).style("font-size",o).style("font-weight",s).style("font-family",p),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");y.width=Math.round(Math.max(y.width,b.width)),d=Math.round(b.height),y.height+=d,y.lineHeight=Math.round(Math.max(y.lineHeight,d))}l.push(y)}c.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ai,m2=(ai=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(ai,"InitIDGenerator"),ai),xs,y2=f(function(e){return xs=xs||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),xs.innerHTML=e,unescape(xs.textContent)},"entityDecode");function il(e){return"str"in e}f(il,"isDetailedError");var C2=f((e,t,r,i)=>{var o;if(!i)return;const s=(o=e.node())==null?void 0:o.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),os=f(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Ao(e,t){return o2({},e,t)}f(Ao,"cleanAndMerge");var ae={assignWithDepth:vt,wrapLabel:nf,calculateTextHeight:rl,calculateTextWidth:Oe,calculateTextDimensions:Fo,cleanAndMerge:Ao,detectInit:l2,detectDirective:Qp,isSubstringInArray:c2,interpolateToCurve:Qn,calcLabelPosition:ef,calcCardinalityPosition:d2,calcTerminalLabelPosition:rf,formatUrl:Jp,getStylesFromArray:el,generateId:sf,random:af,runFunc:u2,entityDecode:y2,insertTitle:C2,isLabelCoordinateInPath:lf,parseFontSize:os,InitIDGenerator:m2},x2=f(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),ir=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),b2=f((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function $t(e){return e??null}f($t,"handleUndefinedAttr");function lf(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(lf,"isLabelCoordinateInPath");var Eo=f(({flowchart:e})=>{var s,o;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((o=e==null?void 0:e.subGraphTitleMargin)==null?void 0:o.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function sl(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(s=>new Promise(o=>{function a(){if(s.style.display="flex",s.style.flexDirection="column",i){const n=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[h=Cn.fontSize]=os(n),c=h*l+"px";s.style.minWidth=c,s.style.maxWidth=c}else s.style.width="100%";o(s)}f(a,"setupImage"),setTimeout(()=>{s.complete&&a()}),s.addEventListener("error",a),s.addEventListener("load",a)})))}f(sl,"configureLabelImages");var k2=f(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),yi=f(e=>{const t=T2([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),T2=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),ol=f(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),V=f(e=>{const{stylesArray:t}=yi(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];ol(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),j=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=yi(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:((l=a.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:S2(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),S2=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const w2=Object.freeze({left:0,top:0,width:16,height:16}),io=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),hf=Object.freeze({...w2,...io}),_2=Object.freeze({...hf,body:"",hidden:!1}),B2=Object.freeze({width:null,height:null}),v2=Object.freeze({...B2,...io}),L2=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),h={provider:s.length>0?s[0]:i,prefix:l,name:n};return aa(h)?h:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return aa(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return aa(n,r)?n:null}return null},aa=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function F2(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Mh(e,t){const r=F2(e,t);for(const i in _2)i in io?i in e&&!(i in r)&&(r[i]=io[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function A2(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function $h(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Mh(i[n]||s[n],o)}return a(t),r.forEach(a),Mh(e,o)}function E2(e,t){if(e.icons[t])return $h(e,t,[]);const r=A2(e,[t])[t];return r?$h(e,t,r):null}const M2=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$2=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Oh(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(M2);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=$2.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function O2(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function I2(e,t){return e?"<defs>"+e+"</defs>"+t:t}function D2(e,t,r){const i=O2(e);return I2(i.defs,t+i.content+r)}const P2=e=>e==="unset"||e==="undefined"||e==="none";function R2(e,t){const r={...hf,...e},i={...v2,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(g=>{const m=[],C=g.hFlip,b=g.vFlip;let k=g.rotate;C?b?k+=2:(m.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),m.push("scale(-1 1)"),s.top=s.left=0):b&&(m.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),m.push("scale(1 -1)"),s.top=s.left=0);let S;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:S=s.height/2+s.top,m.unshift("rotate(90 "+S.toString()+" "+S.toString()+")");break;case 2:m.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:S=s.width/2+s.left,m.unshift("rotate(-90 "+S.toString()+" "+S.toString()+")");break}k%2===1&&(s.left!==s.top&&(S=s.left,s.left=s.top,s.top=S),s.width!==s.height&&(S=s.width,s.width=s.height,s.height=S)),m.length&&(o=D2(o,'<g transform="'+m.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,h=s.height;let c,u;a===null?(u=n===null?"1em":n==="auto"?h:n,c=Oh(u,l/h)):(c=a==="auto"?l:a,u=n===null?Oh(c,h/l):n==="auto"?h:n);const p={},d=(g,m)=>{P2(m)||(p[g]=m.toString())};d("width",c),d("height",u);const y=[s.left,s.top,l,h];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:o}}const q2=/\sid="(\S+)"/g,Ih=new Map;function N2(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Ih.get(e)||0;return Ih.set(e,t+1),t?`${e}${t}`:e}function z2(e){const t=[];let r;for(;r=q2.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const o=N2(s),a=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+a+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function W2(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function al(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Br=al();function cf(e){Br=e}var Gi={exec:()=>null};function pt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(Kt.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var H2=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Kt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},U2=/^(?:[ \t]*(?:\n|$))+/,Y2=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,G2=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,as=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,X2=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nl=/(?:[*+-]|\d{1,9}[.)])/,uf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,df=pt(uf).replace(/bull/g,nl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),j2=pt(uf).replace(/bull/g,nl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ll=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,V2=/^[^\n]+/,hl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Z2=pt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",hl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),K2=pt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nl).getRegex(),Mo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",cl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Q2=pt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",cl).replace("tag",Mo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),pf=pt(ll).replace("hr",as).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex(),J2=pt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",pf).getRegex(),ul={blockquote:J2,code:Y2,def:Z2,fences:G2,heading:X2,hr:as,html:Q2,lheading:df,list:K2,newline:U2,paragraph:pf,table:Gi,text:V2},Dh=pt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",as).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex(),tT={...ul,lheading:j2,table:Dh,paragraph:pt(ll).replace("hr",as).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dh).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Mo).getRegex()},eT={...ul,html:pt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",cl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Gi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:pt(ll).replace("hr",as).replace("heading",` *#{1,6} *[^
|
|
161
|
+
]`).replace("lheading",df).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},rT=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iT=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ff=/^( {2,}|\\)\n(?!\s*$)/,sT=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$o=/[\p{P}\p{S}]/u,dl=/[\s\p{P}\p{S}]/u,gf=/[^\s\p{P}\p{S}]/u,oT=pt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dl).getRegex(),mf=/(?!~)[\p{P}\p{S}]/u,aT=/(?!~)[\s\p{P}\p{S}]/u,nT=/(?:[^\s\p{P}\p{S}]|~)/u,lT=pt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",H2?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),yf=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,hT=pt(yf,"u").replace(/punct/g,$o).getRegex(),cT=pt(yf,"u").replace(/punct/g,mf).getRegex(),Cf="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",uT=pt(Cf,"gu").replace(/notPunctSpace/g,gf).replace(/punctSpace/g,dl).replace(/punct/g,$o).getRegex(),dT=pt(Cf,"gu").replace(/notPunctSpace/g,nT).replace(/punctSpace/g,aT).replace(/punct/g,mf).getRegex(),pT=pt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gf).replace(/punctSpace/g,dl).replace(/punct/g,$o).getRegex(),fT=pt(/\\(punct)/,"gu").replace(/punct/g,$o).getRegex(),gT=pt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mT=pt(cl).replace("(?:-->|$)","-->").getRegex(),yT=pt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",mT).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),so=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,CT=pt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",so).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xf=pt(/^!?\[(label)\]\[(ref)\]/).replace("label",so).replace("ref",hl).getRegex(),bf=pt(/^!?\[(ref)\](?:\[\])?/).replace("ref",hl).getRegex(),xT=pt("reflink|nolink(?!\\()","g").replace("reflink",xf).replace("nolink",bf).getRegex(),Ph=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,pl={_backpedal:Gi,anyPunctuation:fT,autolink:gT,blockSkip:lT,br:ff,code:iT,del:Gi,emStrongLDelim:hT,emStrongRDelimAst:uT,emStrongRDelimUnd:pT,escape:rT,link:CT,nolink:bf,punctuation:oT,reflink:xf,reflinkSearch:xT,tag:yT,text:sT,url:Gi},bT={...pl,link:pt(/^!?\[(label)\]\((.*?)\)/).replace("label",so).getRegex(),reflink:pt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",so).getRegex()},Ja={...pl,emStrongRDelimAst:dT,emStrongLDelim:cT,url:pt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ph).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:pt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ph).getRegex()},kT={...Ja,br:pt(ff).replace("{2,}","*").getRegex(),text:pt(Ja.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},bs={normal:ul,gfm:tT,pedantic:eT},vi={normal:pl,gfm:Ja,breaks:kT,pedantic:bT},TT={"&":"&","<":"<",">":">",'"':""","'":"'"},Rh=e=>TT[e];function Ae(e,t){if(t){if(Kt.escapeTest.test(e))return e.replace(Kt.escapeReplace,Rh)}else if(Kt.escapeTestNoEncode.test(e))return e.replace(Kt.escapeReplaceNoEncode,Rh);return e}function qh(e){try{e=encodeURI(e).replace(Kt.percentDecode,"%")}catch{return null}return e}function Nh(e,t){var o;let r=e.replace(Kt.findPipe,(a,n,l)=>{let h=!1,c=n;for(;--c>=0&&l[c]==="\\";)h=!h;return h?"|":" |"}),i=r.split(Kt.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((o=i.at(-1))!=null&&o.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Kt.slashPipe,"|");return i}function Li(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function ST(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function zh(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function wT(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
162
|
+
`).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
|
|
163
|
+
`)}var oo=class{constructor(t){mt(this,"options");mt(this,"rules");mt(this,"lexer");this.options=t||Br}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Li(i,`
|
|
164
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=wT(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Li(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Li(r[0],`
|
|
165
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Li(r[0],`
|
|
166
|
+
`).split(`
|
|
167
|
+
`),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))l.push(i[h]),n=!0;else if(!n)l.push(i[h]);else break;i=i.slice(h);let c=l.join(`
|
|
168
|
+
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
169
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
170
|
+
${c}`:c,o=o?`${o}
|
|
171
|
+
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,a,!0),this.lexer.state.top=p,i.length===0)break;let d=a.at(-1);if((d==null?void 0:d.type)==="code")break;if((d==null?void 0:d.type)==="blockquote"){let y=d,g=y.raw+`
|
|
172
|
+
`+i.join(`
|
|
173
|
+
`),m=this.blockquote(g);a[a.length-1]=m,s=s.substring(0,s.length-y.raw.length)+m.raw,o=o.substring(0,o.length-y.text.length)+m.text;break}else if((d==null?void 0:d.type)==="list"){let y=d,g=y.raw+`
|
|
174
|
+
`+i.join(`
|
|
175
|
+
`),m=this.list(g);a[a.length-1]=m,s=s.substring(0,s.length-d.raw.length)+m.raw,o=o.substring(0,o.length-y.raw.length)+m.raw,i=g.substring(a.at(-1).raw.length).split(`
|
|
176
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let h=!1,c="",u="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;c=r[0],t=t.substring(c.length);let p=r[2].split(`
|
|
177
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(`
|
|
178
|
+
`,1)[0],y=!p.trim(),g=0;if(this.options.pedantic?(g=2,u=p.trimStart()):y?g=r[1].length+1:(g=r[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,u=p.slice(g),g+=r[1].length),y&&this.rules.other.blankLine.test(d)&&(c+=d+`
|
|
179
|
+
`,t=t.substring(d.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(g),k=this.rules.other.hrRegex(g),S=this.rules.other.fencesBeginRegex(g),w=this.rules.other.headingBeginRegex(g),_=this.rules.other.htmlBeginRegex(g);for(;t;){let F=t.split(`
|
|
180
|
+
`,1)[0],L;if(d=F,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),L=d):L=d.replace(this.rules.other.tabCharGlobal," "),S.test(d)||w.test(d)||_.test(d)||b.test(d)||k.test(d))break;if(L.search(this.rules.other.nonSpaceChar)>=g||!d.trim())u+=`
|
|
181
|
+
`+L.slice(g);else{if(y||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(p)||w.test(p)||k.test(p))break;u+=`
|
|
182
|
+
`+d}!y&&!d.trim()&&(y=!0),c+=F+`
|
|
183
|
+
`,t=t.substring(F.length+1),p=L.slice(g)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(n=!0));let m=null,C;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(C=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:c,task:!!m,checked:C,loose:!1,text:u,tokens:[]}),o.raw+=c}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let h=0;h<o.items.length;h++)if(this.lexer.state.top=!1,o.items[h].tokens=this.lexer.blockTokens(o.items[h].text,[]),!o.loose){let c=o.items[h].tokens.filter(p=>p.type==="space"),u=c.length>0&&c.some(p=>this.rules.other.anyLine.test(p.raw));o.loose=u}if(o.loose)for(let h=0;h<o.items.length;h++)o.items[h].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=Nh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
184
|
+
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<i.length;l++)a.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:a.align[l]});for(let l of o)a.rows.push(Nh(l,a.header.length).map((h,c)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:a.align[c]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
185
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=Li(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=ST(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),zh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return zh(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,h=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,r=r.slice(-1*t.length+o);(s=c.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){h+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+h);let u=[...s[0]][0].length,p=t.slice(0,o+s.index+u+n);if(Math.min(o,n)%2){let y=p.slice(1,-1);return{type:"em",raw:p,text:y,tokens:this.lexer.inlineTokens(y)}}let d=p.slice(2,-2);return{type:"strong",raw:p,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,o;if(r[2]==="@")s=r[0],o="mailto:"+s;else{let a;do a=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(a!==r[0]);s=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ce=class tn{constructor(t){mt(this,"tokens");mt(this,"options");mt(this,"state");mt(this,"tokenizer");mt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Br,this.options.tokenizer=this.options.tokenizer||new oo,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Kt,block:bs.normal,inline:vi.normal};this.options.pedantic?(r.block=bs.pedantic,r.inline=vi.pedantic):this.options.gfm&&(r.block=bs.gfm,this.options.breaks?r.inline=vi.breaks:r.inline=vi.gfm),this.tokenizer.rules=r}static get rules(){return{block:bs,inline:vi}}static lex(t,r){return new tn(r).lex(t)}static lexInline(t,r){return new tn(r).inlineTokens(t)}lex(t){t=t.replace(Kt.carriageReturn,`
|
|
186
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,o,a;for(this.options.pedantic&&(t=t.replace(Kt.tabCharGlobal," ").replace(Kt.spaceLine,""));t;){let n;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(h=>(n=h.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let h=r.at(-1);n.raw.length===1&&h!==void 0?h.raw+=`
|
|
187
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
188
|
+
`)?"":`
|
|
189
|
+
`)+n.raw,h.text+=`
|
|
190
|
+
`+n.text,this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
191
|
+
`)?"":`
|
|
192
|
+
`)+n.raw,h.text+=`
|
|
193
|
+
`+n.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((a=this.options.extensions)!=null&&a.startBlock){let h=1/0,c=t.slice(1),u;this.options.extensions.startBlock.forEach(p=>{u=p.call({lexer:this},c),typeof u=="number"&&u>=0&&(h=Math.min(h,u))}),h<1/0&&h>=0&&(l=t.substring(0,h+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
194
|
+
`)?"":`
|
|
195
|
+
`)+n.raw,h.text+=`
|
|
196
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
197
|
+
`)?"":`
|
|
198
|
+
`)+n.raw,h.text+=`
|
|
199
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(n);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent)break;throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var l,h,c,u,p;let i=t,s=null;if(this.tokens.links){let d=Object.keys(this.tokens.links);if(d.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)o=s[2]?s[2].length:0,i=i.slice(0,s.index+o)+"["+"a".repeat(s[0].length-o-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let a=!1,n="";for(;t;){a||(n=""),a=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},t,r))?(t=t.substring(d.raw.length),r.push(d),!0):!1))continue;if(d=this.tokenizer.escape(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.tag(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.link(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(d.raw.length);let g=r.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(d=this.tokenizer.emStrong(t,i,n)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.codespan(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.br(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.del(t)){t=t.substring(d.raw.length),r.push(d);continue}if(d=this.tokenizer.autolink(t)){t=t.substring(d.raw.length),r.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(t))){t=t.substring(d.raw.length),r.push(d);continue}let y=t;if((p=this.options.extensions)!=null&&p.startInline){let g=1/0,m=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},m),typeof C=="number"&&C>=0&&(g=Math.min(g,C))}),g<1/0&&g>=0&&(y=t.substring(0,g+1))}if(d=this.tokenizer.inlineText(y)){t=t.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(n=d.raw.slice(-1)),a=!0;let g=r.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):r.push(d);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent)break;throw new Error(g)}}return r}},ao=class{constructor(t){mt(this,"options");mt(this,"parser");this.options=t||Br}space(t){return""}code({text:t,lang:r,escaped:i}){var a;let s=(a=(r||"").match(Kt.notSpaceStart))==null?void 0:a[0],o=t.replace(Kt.endingNewline,"")+`
|
|
200
|
+
`;return s?'<pre><code class="language-'+Ae(s)+'">'+(i?o:Ae(o,!0))+`</code></pre>
|
|
201
|
+
`:"<pre><code>"+(i?o:Ae(o,!0))+`</code></pre>
|
|
202
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
203
|
+
${this.parser.parse(t)}</blockquote>
|
|
204
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
205
|
+
`}hr(t){return`<hr>
|
|
206
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
|
|
207
|
+
`+s+"</"+o+`>
|
|
208
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Ae(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
209
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
210
|
+
`}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
211
|
+
<thead>
|
|
212
|
+
`+r+`</thead>
|
|
213
|
+
`+s+`</table>
|
|
214
|
+
`}tablerow({text:t}){return`<tr>
|
|
215
|
+
${t}</tr>
|
|
216
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
217
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ae(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=qh(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+Ae(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=qh(t);if(o===null)return Ae(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${Ae(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ae(t.text)}},fl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},xe=class en{constructor(t){mt(this,"options");mt(this,"renderer");mt(this,"textRenderer");this.options=t||Br,this.options.renderer=this.options.renderer||new ao,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fl}static parse(t,r){return new en(r).parse(t)}static parseInline(t,r){return new en(r).parseInline(t)}parse(t,r=!0){var s,o;let i="";for(let a=0;a<t.length;a++){let n=t[a];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[n.type]){let h=n,c=this.options.extensions.renderers[h.type].call({parser:this},h);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=c||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let h=l,c=this.renderer.text(h);for(;a+1<t.length&&t[a+1].type==="text";)h=t[++a],c+=`
|
|
218
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):i+=c;continue}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,o;let i="";for(let a=0;a<t.length;a++){let n=t[a];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[n.type]){let h=this.options.extensions.renderers[n.type].call({parser:this},n);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=h||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let h='Token with "'+l.type+'" type was not found.';if(this.options.silent)return"";throw new Error(h)}}}return i}},_s,Ri=(_s=class{constructor(t){mt(this,"options");mt(this,"block");this.options=t||Br}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ce.lex:Ce.lexInline}provideParser(){return this.block?xe.parse:xe.parseInline}},mt(_s,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),mt(_s,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),_s),_T=class{constructor(...t){mt(this,"defaults",al());mt(this,"options",this.setOptions);mt(this,"parse",this.parseMarkdown(!0));mt(this,"parseInline",this.parseMarkdown(!1));mt(this,"Parser",xe);mt(this,"Renderer",ao);mt(this,"TextRenderer",fl);mt(this,"Lexer",Ce);mt(this,"Tokenizer",oo);mt(this,"Hooks",Ri);this.use(...t)}walkTokens(t,r){var s,o;let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let n=a;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let h of l)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let n=a;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=a;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let h=n[l].flat(1/0);i=i.concat(this.walkTokens(h,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new ao(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],h=o[n];o[n]=(...c)=>{let u=l.apply(o,c);return u===!1&&(u=h.apply(o,c)),u||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new oo(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],h=o[n];o[n]=(...c)=>{let u=l.apply(o,c);return u===!1&&(u=h.apply(o,c)),u}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Ri;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],h=o[n];Ri.passThroughHooks.has(a)?o[n]=c=>{if(this.defaults.async&&Ri.passThroughHooksRespectAsync.has(a))return(async()=>{let p=await l.call(o,c);return h.call(o,p)})();let u=l.call(o,c);return h.call(o,u)}:o[n]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await l.apply(o,c);return p===!1&&(p=await h.apply(o,c)),p})();let u=l.apply(o,c);return u===!1&&(u=h.apply(o,c)),u}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ce.lex(t,r??this.defaults)}parser(t,r){return xe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(n,o),h=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(h,o.walkTokens));let c=await(o.hooks?await o.hooks.provideParser():t?xe.parse:xe.parseInline)(h,o);return o.hooks?await o.hooks.postprocess(c):c})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?Ce.lex:Ce.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?xe.parse:xe.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
219
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Ae(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},wr=new _T;function gt(e,t){return wr.parse(e,t)}gt.options=gt.setOptions=function(e){return wr.setOptions(e),gt.defaults=wr.defaults,cf(gt.defaults),gt};gt.getDefaults=al;gt.defaults=Br;gt.use=function(...e){return wr.use(...e),gt.defaults=wr.defaults,cf(gt.defaults),gt};gt.walkTokens=function(e,t){return wr.walkTokens(e,t)};gt.parseInline=wr.parseInline;gt.Parser=xe;gt.parser=xe.parse;gt.Renderer=ao;gt.TextRenderer=fl;gt.Lexer=Ce;gt.lexer=Ce.lex;gt.Tokenizer=oo;gt.Hooks=Ri;gt.parse=gt;gt.options;gt.setOptions;gt.use;gt.walkTokens;gt.parseInline;xe.parse;Ce.lex;function kf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(n,l){var h=l.match(/\n([\t ]+|(?!\s).)/g);return h?n.concat(h.map(function(c){var u,p;return(p=(u=c.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&p!==void 0?p:0})):n},[]);if(s.length){var o=new RegExp(`
|
|
220
|
+
[ ]{`+Math.min.apply(Math,s)+"}","g");i=i.map(function(n){return n.replace(o,`
|
|
221
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return t.forEach(function(n,l){var h=a.match(/(?:^|\n)( *)$/),c=h?h[1]:"",u=n;typeof n=="string"&&n.includes(`
|
|
222
|
+
`)&&(u=String(n).split(`
|
|
223
|
+
`).map(function(p,d){return d===0?p:""+c+p}).join(`
|
|
224
|
+
`)),a+=u+i[l+1]}),a}var Tf={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},rn=new Map,Sf=new Map,wf=f(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(D.debug("Registering icon pack:",t.name),"loader"in t)Sf.set(t.name,t.loader);else if("icons"in t)rn.set(t.name,t.icons);else throw D.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),_f=f(async(e,t)=>{const r=L2(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=rn.get(i);if(!s){const a=Sf.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},rn.set(i,s)}catch(n){throw D.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=E2(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),BT=f(async e=>{try{return await _f(e),!0}catch{return!1}},"isIconAvailable"),Ci=f(async(e,t,r)=>{let i;try{i=await _f(e,t==null?void 0:t.fallbackPrefix)}catch(a){D.error(a),i=Tf}const s=R2(i,t),o=W2(z2(s.body),{...s.attributes,...r});return le(o,bt())},"getIconSVG");function Bf(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
225
|
+
`).replace(/\n{2,}/g,`
|
|
226
|
+
`);return kf(i)}f(Bf,"preprocessMarkdown");function vf(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}f(vf,"nonMarkdownToLines");function Lf(e,t={}){const r=Bf(e,t),i=gt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
|
|
227
|
+
`).forEach((c,u)=>{u!==0&&(o++,s.push([])),c.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&s[o].push({content:p,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(h=>{a(h,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return f(a,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(h=>{a(h)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}f(Lf,"markdownToLines");function Ff(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(Ff,"nonMarkdownToHTML");function Af(e,{markdownAutoWrap:t}={}){const r=gt.lexer(e);function i(s){var o,a,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(o=s.tokens)==null?void 0:o.map(i).join("")}</strong>`:s.type==="em"?`<em>${(a=s.tokens)==null?void 0:a.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(D.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(Af,"markdownToHTML");function Ef(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(Ef,"splitTextToChars");function Mf(e,t){const r=Ef(t.content);return gl(e,[],r,t.type)}f(Mf,"splitWordToFitWidth");function gl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?gl(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(gl,"splitWordToFitWidthRecursion");function $f(e,t){if(e.some(({content:r})=>r.includes(`
|
|
228
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return no(e,t)}f($f,"splitLineToFitWidth");function no(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return no(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=Mf(t,o);r.push([n]),l.content&&e.unshift(l)}return no(e,t,r)}f(no,"splitLineToFitWidthRecursion");function sn(e,t){t&&e.attr("style",t)}f(sn,"applyStyle");var Wh=16384;async function Of(e,t,r,i,s=!1,o=bt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,Wh)}px`),a.attr("height",`${Math.min(10*r,Wh)}px`);const n=a.append("xhtml:div"),l=li(t.label)?await xn(t.label.replace(gi.lineBreakRegex,`
|
|
229
|
+
`),o):le(t.label,o),h=t.isNode?"nodeLabel":"edgeLabel",c=n.append("span");c.html(l),sn(c,t.labelStyle),c.attr("class",`${h} ${i}`),sn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg");let u=n.node().getBoundingClientRect();return u.width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px"),u=n.node().getBoundingClientRect()),a.node()}f(Of,"addHtmlSpan");function Oo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(Oo,"createTspan");function If(e,t,r){const i=e.append("text"),s=Oo(i,1,t);Io(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}f(If,"computeWidthOfText");function Df(e,t,r){var a;const i=e.append("text"),s=Oo(i,1,t);Io(s,[{content:r,type:"normal"}]);const o=(a=s.node())==null?void 0:a.getBoundingClientRect();return o&&i.remove(),o}f(Df,"computeDimensionOfText");function Pf(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let h=0;for(const c of r){const u=f(d=>If(a,1.1,d)<=e,"checkWidth"),p=u(c)?[c]:$f(c,u);for(const d of p){const y=Oo(l,h,1.1,s);Io(y,d),h++}}if(i){const c=l.node().getBBox(),u=2;return n.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),a.node()}else return l.node()}f(Pf,"createFormattedText");function on(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}f(on,"decodeHTMLEntities");function Io(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(on(r.content)):s.text(" "+on(r.content))})}f(Io,"updateTextContentAndStyles");async function Rf(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await BT(n)?await Ci(n,void 0,{class:"label-icon"}):`<i class='${le(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(Rf,"replaceIconSubstring");var Re=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:h=!1}={},c)=>{if(D.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",h),o){const u=a?Af(t,c):Ff(t),p=await Rf(ir(u),c),d=t.replace(/\\\\/g,"\\"),y={isNode:n,label:li(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Of(e,y,l,s,h,c)}else{const u=ir(t.replace(/<br\s*\/?>/g,"<br/>")),p=a?Lf(u.replace("<br>","<br/>"),c):vf(u),d=Pf(l,e,p,t?h:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");nt(d).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");nt(d).select("rect").attr("style",y.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");nt(d).select("text").attr("style",g)}return i?nt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):nt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function na(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[h,c]=l;l[0]=(h-i)*a-(c-s)*n+i,l[1]=(h-i)*n+(c-s)*a+s}}}function vT(e,t){return e[0]===t[0]&&e[1]===t[1]}function LT(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const h of a)na(h,n,s);const l=function(h,c,u){const p=[];for(const b of h){const k=[...b];vT(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&p.push(k)}const d=[];c=Math.max(c,.1);const y=[];for(const b of p)for(let k=0;k<b.length-1;k++){const S=b[k],w=b[k+1];if(S[1]!==w[1]){const _=Math.min(S[1],w[1]);y.push({ymin:_,ymax:Math.max(S[1],w[1]),x:_===S[1]?S[0]:w[0],islope:(w[0]-S[0])/(w[1]-S[1])})}}if(y.sort((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax)),!y.length)return d;let g=[],m=y[0].ymin,C=0;for(;g.length||y.length;){if(y.length){let b=-1;for(let k=0;k<y.length&&!(y[k].ymin>m);k++)b=k;y.splice(0,b+1).forEach(k=>{g.push({s:m,edge:k})})}if(g=g.filter(b=>!(b.edge.ymax<=m)),g.sort((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x)),(u!==1||C%c==0)&&g.length>1)for(let b=0;b<g.length;b+=2){const k=b+1;if(k>=g.length)break;const S=g[b].edge,w=g[k].edge;d.push([[Math.round(S.x),m],[Math.round(w.x),m]])}m+=u,g.forEach(b=>{b.edge.x=b.edge.x+u*b.edge.islope}),C++}return d}(a,o,i);if(s){for(const h of a)na(h,n,-s);(function(h,c,u){const p=[];h.forEach(d=>p.push(...d)),na(p,c,u)})(l,n,-s)}return l}function ns(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),LT(e,s,i,o||1)}class ml{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=ns(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Do(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class FT extends ml{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=ns(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[h,c]of s)Do([h,c])&&a.push([[h[0]-n,h[1]+l],[...c]],[[h[0]+n,h[1]-l],[...c]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class AT extends ml{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}let ET=class{constructor(t){this.helper=t}fillPolygons(t,r){const i=ns(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=Do(n),h=l/s,c=Math.ceil(h)-1,u=l-c*s,p=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let y=0;y<c;y++){const g=d+u+y*s,m=p-a+2*Math.random()*a,C=g-a+2*Math.random()*a,b=this.helper.ellipse(m,C,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}},MT=class{constructor(t){this.helper=t}fillPolygons(t,r){const i=ns(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach(a=>{const n=Do(a),l=Math.floor(n/(i+s)),h=(n+s-l*(i+s))/2;let c=a[0],u=a[1];c[0]>u[0]&&(c=a[1],u=a[0]);const p=Math.atan((u[1]-c[1])/(u[0]-c[0]));for(let d=0;d<l;d++){const y=d*(i+s),g=y+i,m=[c[0]+y*Math.cos(p)+h*Math.cos(p),c[1]+y*Math.sin(p)+h*Math.sin(p)],C=[c[0]+g*Math.cos(p)+h*Math.cos(p),c[1]+g*Math.sin(p)+h*Math.sin(p)];o.push(...this.helper.doubleLineOps(m[0],m[1],C[0],C[1],r))}}),o}};class $T{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=ns(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach(o=>{const a=Do(o),n=Math.round(a/(2*r));let l=o[0],h=o[1];l[0]>h[0]&&(l=o[1],h=o[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let u=0;u<n;u++){const p=2*u*r,d=2*(u+1)*r,y=Math.sqrt(2*Math.pow(r,2)),g=[l[0]+p*Math.cos(c),l[1]+p*Math.sin(c)],m=[l[0]+d*Math.cos(c),l[1]+d*Math.sin(c)],C=[g[0]+y*Math.cos(c+Math.PI/4),g[1]+y*Math.sin(c+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],m[0],m[1],i))}}),s}}const Jt={};let OT=class{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};const IT=0,la=1,Hh=2,ks={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function ha(e,t){return e.type===t}function yl(e){const t=[],r=function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:IT,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:la,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Hh,text:""},n}(e);let i="BOD",s=0,o=r[s];for(;!ha(o,Hh);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return yl("M0,0"+e);s++,a=ks[o.text],i=o.text}else ha(o,la)?a=ks[i]:(s++,a=ks[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const h=r[l];if(!ha(h,la))throw new Error("Param not a number: "+i+","+h.text);n[n.length]=+h.text}if(typeof ks[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function qf(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map((h,c)=>c%2?h+r:h+t);o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map((h,c)=>c%2?h+r:h+t);o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map((h,c)=>c%2?h+r:h+t);o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function Nf(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:h,data:c}of e){switch(h){case"M":t.push({key:"M",data:[...c]}),[i,s]=c,[o,a]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],s=c[5],n=c[2],l=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,s]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,s]});break;case"V":s=c[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...c]}),n=c[0],l=c[1],i=c[2],s=c[3];break}case"T":{const[u,p]=c;let d=0,y=0;r==="Q"||r==="T"?(d=i+(i-n),y=s+(s-l)):(d=i,y=s);const g=i+2*(d-i)/3,m=s+2*(y-s)/3,C=u+2*(d-u)/3,b=p+2*(y-p)/3;t.push({key:"C",data:[g,m,C,b,u,p]}),n=d,l=y,i=u,s=p;break}case"Q":{const[u,p,d,y]=c,g=i+2*(u-i)/3,m=s+2*(p-s)/3,C=d+2*(u-d)/3,b=y+2*(p-y)/3;t.push({key:"C",data:[g,m,C,b,d,y]}),n=u,l=p,i=d,s=y;break}case"A":{const u=Math.abs(c[0]),p=Math.abs(c[1]),d=c[2],y=c[3],g=c[4],m=c[5],C=c[6];u===0||p===0?(t.push({key:"C",data:[i,s,m,C,m,C]}),i=m,s=C):(i!==m||s!==C)&&(zf(i,s,m,C,u,p,d,y,g).forEach(function(b){t.push({key:"C",data:b})}),i=m,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=h}return t}function Fi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function zf(e,t,r,i,s,o,a,n,l,h){const c=(u=a,Math.PI*u/180);var u;let p=[],d=0,y=0,g=0,m=0;if(h)[d,y,g,m]=h;else{[e,t]=Fi(e,t,-c),[r,i]=Fi(r,i,-c);const N=(e-r)/2,I=(t-i)/2;let z=N*N/(s*s)+I*I/(o*o);z>1&&(z=Math.sqrt(z),s*=z,o*=z);const P=s*s,W=o*o,R=P*W-P*I*I-W*N*N,B=P*I*I+W*N*N,U=(n===l?-1:1)*Math.sqrt(Math.abs(R/B));g=U*s*I/o+(e+r)/2,m=U*-o*N/s+(t+i)/2,d=Math.asin(parseFloat(((t-m)/o).toFixed(9))),y=Math.asin(parseFloat(((i-m)/o).toFixed(9))),e<g&&(d=Math.PI-d),r<g&&(y=Math.PI-y),d<0&&(d=2*Math.PI+d),y<0&&(y=2*Math.PI+y),l&&d>y&&(d-=2*Math.PI),!l&&y>d&&(y-=2*Math.PI)}let C=y-d;if(Math.abs(C)>120*Math.PI/180){const N=y,I=r,z=i;y=l&&y>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=zf(r=g+s*Math.cos(y),i=m+o*Math.sin(y),I,z,s,o,a,0,l,[y,N,g,m])}C=y-d;const b=Math.cos(d),k=Math.sin(d),S=Math.cos(y),w=Math.sin(y),_=Math.tan(C/4),F=4/3*s*_,L=4/3*o*_,q=[e,t],M=[e+F*k,t-L*b],$=[r+F*w,i-L*S],H=[r,i];if(M[0]=2*q[0]-M[0],M[1]=2*q[1]-M[1],h)return[M,$,H].concat(p);{p=[M,$,H].concat(p);const N=[];for(let I=0;I<p.length;I+=3){const z=Fi(p[I][0],p[I][1],c),P=Fi(p[I+1][0],p[I+1][1],c),W=Fi(p[I+2][0],p[I+2][1],c);N.push([z[0],z[1],P[0],P[1],W[0],W[1]])}return N}}const DT={randOffset:function(e,t){return et(e,t)},randOffsetWithRange:function(e,t,r){return lo(e,t,r)},ellipse:function(e,t,r,i,s){const o=Hf(r,i,s);return an(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return sr(e,t,r,i,s,!0)}};function Wf(e,t,r,i,s){return{type:"path",ops:sr(e,t,r,i,s)}}function Os(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...sr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...sr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Wf(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function PT(e,t,r,i,s){return function(o,a){return Os(o,!0,a)}([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function Uh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ts(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ts(r[0],1.5*(1+.22*t.roughness),Xh(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Ts(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ts(a,1.5*(1+.22*t.roughness),Xh(t));for(const h of n)h.op!=="move"&&i.push(h);for(const h of l)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Hf(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=et(a*l,r),n+=et(n*l,r),{increment:o,rx:a,ry:n}}function an(e,t,r,i){const[s,o]=jh(i.increment,e,t,i.rx,i.ry,1,i.increment*lo(.1,lo(.4,1,r),r),r);let a=ho(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=jh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=ho(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function Yh(e,t,r,i,s,o,a,n,l){const h=e,c=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=et(.01*u,l),p+=et(.01*p,l);let d=s,y=o;for(;d<0;)d+=2*Math.PI,y+=2*Math.PI;y-d>2*Math.PI&&(d=0,y=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(y-d)/2),C=Vh(m,h,c,u,p,d,y,1,l);if(!l.disableMultiStroke){const b=Vh(m,h,c,u,p,d,y,1.5,l);C.push(...b)}return a&&(n?C.push(...sr(h,c,h+u*Math.cos(d),c+p*Math.sin(d),l),...sr(h,c,h+u*Math.cos(y),c+p*Math.sin(y),l)):C.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(d),c+p*Math.sin(d)]})),{type:"path",ops:C}}function Gh(e,t){const r=Nf(qf(yl(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...sr(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,h,c,u,p,d]=n;i.push(...RT(l,h,c,u,p,d,o,t)),o=[p,d];break}case"Z":i.push(...sr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function ca(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+et(s,t),i[0][1]+et(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+et(s,t),i[a][1]+et(s,t)]})}}return{type:"fillPath",ops:r}}function Dr(e,t){return function(r,i){let s=r.fillStyle||"hachure";if(!Jt[s])switch(s){case"zigzag":Jt[s]||(Jt[s]=new FT(i));break;case"cross-hatch":Jt[s]||(Jt[s]=new AT(i));break;case"dots":Jt[s]||(Jt[s]=new ET(i));break;case"dashed":Jt[s]||(Jt[s]=new MT(i));break;case"zigzag-line":Jt[s]||(Jt[s]=new $T(i));break;default:s="hachure",Jt[s]||(Jt[s]=new ml(i))}return Jt[s]}(t,DT).fillPolygons(e,t)}function Xh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Uf(e){return e.randomizer||(e.randomizer=new OT(e.seed||0)),e.randomizer.next()}function lo(e,t,r,i=1){return r.roughness*i*(Uf(r)*(t-e)+e)}function et(e,t,r=1){return lo(-e,e,t,r)}function sr(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=nn(e,t,r,i,s,!0,!1);if(a)return n;const l=nn(e,t,r,i,s,!0,!0);return n.concat(l)}function nn(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=s.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const u=c/2,p=.2+.2*Uf(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,y=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=et(d,s,h),y=et(y,s,h);const g=[],m=()=>et(u,s,h),C=()=>et(c,s,h),b=s.preserveVertices;return a?g.push({op:"move",data:[e+(b?0:m()),t+(b?0:m())]}):g.push({op:"move",data:[e+(b?0:et(c,s,h)),t+(b?0:et(c,s,h))]}),a?g.push({op:"bcurveTo",data:[d+e+(r-e)*p+m(),y+t+(i-t)*p+m(),d+e+2*(r-e)*p+m(),y+t+2*(i-t)*p+m(),r+(b?0:m()),i+(b?0:m())]}):g.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),y+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),y+t+2*(i-t)*p+C(),r+(b?0:C()),i+(b?0:C())]}),g}function Ts(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+et(t,r),e[0][1]+et(t,r)]),i.push([e[0][0]+et(t,r),e[0][1]+et(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+et(t,r),e[s][1]+et(t,r)]),s===e.length-1&&i.push([e[s][0]+et(t,r),e[s][1]+et(t,r)]);return ho(i,null,r)}function ho(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...nn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function jh(e,t,r,i,s,o,a,n){const l=[],h=[];if(n.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let c=0;c<=2*Math.PI;c+=e){const u=[t+i*Math.cos(c),r+s*Math.sin(c)];l.push(u),h.push(u)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const c=et(.5,n)-Math.PI/2;h.push([et(o,n)+t+.9*i*Math.cos(c-e),et(o,n)+r+.9*s*Math.sin(c-e)]);const u=2*Math.PI+c-.01;for(let p=c;p<u;p+=e){const d=[et(o,n)+t+i*Math.cos(p),et(o,n)+r+s*Math.sin(p)];l.push(d),h.push(d)}h.push([et(o,n)+t+i*Math.cos(c+2*Math.PI+.5*a),et(o,n)+r+s*Math.sin(c+2*Math.PI+.5*a)]),h.push([et(o,n)+t+.98*i*Math.cos(c+a),et(o,n)+r+.98*s*Math.sin(c+a)]),h.push([et(o,n)+t+.9*i*Math.cos(c+.5*a),et(o,n)+r+.9*s*Math.sin(c+.5*a)])}return[h,l]}function Vh(e,t,r,i,s,o,a,n,l){const h=o+et(.1,l),c=[];c.push([et(n,l)+t+.9*i*Math.cos(h-e),et(n,l)+r+.9*s*Math.sin(h-e)]);for(let u=h;u<=a;u+=e)c.push([et(n,l)+t+i*Math.cos(u),et(n,l)+r+s*Math.sin(u)]);return c.push([t+i*Math.cos(a),r+s*Math.sin(a)]),c.push([t+i*Math.cos(a),r+s*Math.sin(a)]),ho(c,null,l)}function RT(e,t,r,i,s,o,a,n){const l=[],h=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let c=[0,0];const u=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(p?0:et(h[0],n)),a[1]+(p?0:et(h[0],n))]}),c=p?[s,o]:[s+et(h[d],n),o+et(h[d],n)],l.push({op:"bcurveTo",data:[e+et(h[d],n),t+et(h[d],n),r+et(h[d],n),i+et(h[d],n),c[0],c[1]]});return l}function Ai(e){return[...e]}function Zh(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Ai(e[0]),Ai(e[1]),Ai(e[2]),Ai(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(Ai(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function Is(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function qT(e,t,r){const i=Is(t,r);if(i===0)return Is(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Is(e,dr(t,r,s))}function dr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function ln(e,t,r,i){const s=i||[];if(function(n,l){const h=n[l+0],c=n[l+1],u=n[l+2],p=n[l+3];let d=3*c[0]-2*h[0]-p[0];d*=d;let y=3*c[1]-2*h[1]-p[1];y*=y;let g=3*u[0]-2*p[0]-h[0];g*=g;let m=3*u[1]-2*p[1]-h[1];return m*=m,d<g&&(d=g),y<m&&(y=m),d+y}(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(Is(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],h=e[t+1],c=e[t+2],u=e[t+3],p=dr(l,h,.5),d=dr(h,c,.5),y=dr(c,u,.5),g=dr(p,d,.5),m=dr(d,y,.5),C=dr(g,m,.5);ln([l,p,g,C],0,r,s),ln([C,m,y,u],0,r,s)}var o,a;return s}function NT(e,t){return co(e,0,e.length,t)}function co(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,h=1;for(let c=t+1;c<r-1;++c){const u=qT(e[c],a,n);u>l&&(l=u,h=c)}return Math.sqrt(l)>i?(co(e,t,h+1,i,o),co(e,h,r,i,o)):(o.length||o.push(a),o.push(n)),o}function ua(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)ln(e,3*o,t,i);return r&&r>0?co(i,0,i.length,r):i}const re="none";class uo{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[Wf(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=PT(t,r,i,s,a);if(a.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(ca([h],a)):n.push(Dr([h],a))}return a.stroke!==re&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=Hf(i,s,a),h=an(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const c=an(t,r,a,l).opset;c.type="fillPath",n.push(c)}else n.push(Dr([h.estimatedPoints],a));return a.stroke!==re&&n.push(h.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Os(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const h=this._o(l),c=[],u=Yh(t,r,i,s,o,a,n,!0,h);if(n&&h.fill)if(h.fillStyle==="solid"){const p=Object.assign({},h);p.disableMultiStroke=!0;const d=Yh(t,r,i,s,o,a,!0,!1,p);d.type="fillPath",c.push(d)}else c.push(function(p,d,y,g,m,C,b){const k=p,S=d;let w=Math.abs(y/2),_=Math.abs(g/2);w+=et(.01*w,b),_+=et(.01*_,b);let F=m,L=C;for(;F<0;)F+=2*Math.PI,L+=2*Math.PI;L-F>2*Math.PI&&(F=0,L=2*Math.PI);const q=(L-F)/b.curveStepCount,M=[];for(let $=F;$<=L;$+=q)M.push([k+w*Math.cos($),S+_*Math.sin($)]);return M.push([k+w*Math.cos(L),S+_*Math.sin(L)]),M.push([k,S]),Dr([M],b)}(t,r,i,s,o,a,h));return h.stroke!==re&&c.push(u),this._d("arc",c,h)}curve(t,r){const i=this._o(r),s=[],o=Uh(t,i);if(i.fill&&i.fill!==re)if(i.fillStyle==="solid"){const a=Uh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const h of l)h.length<3?a.push(...h):h.length===3?a.push(...ua(Zh([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):a.push(...ua(Zh(h),10,(1+i.roughness)/2))}a.length&&s.push(Dr([a],i))}return i.stroke!==re&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=Os(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ca([t],i)):s.push(Dr([t],i))),i.stroke!==re&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==re,a=i.stroke!==re,n=!!(i.simplification&&i.simplification<1),l=function(c,u,p){const d=Nf(qf(yl(c))),y=[];let g=[],m=[0,0],C=[];const b=()=>{C.length>=4&&g.push(...ua(C,u)),C=[]},k=()=>{b(),g.length&&(y.push(g),g=[])};for(const{key:w,data:_}of d)switch(w){case"M":k(),m=[_[0],_[1]],g.push(m);break;case"L":b(),g.push([_[0],_[1]]);break;case"C":if(!C.length){const F=g.length?g[g.length-1]:m;C.push([F[0],F[1]])}C.push([_[0],_[1]]),C.push([_[2],_[3]]),C.push([_[4],_[5]]);break;case"Z":b(),g.push([m[0],m[1]])}if(k(),!p)return y;const S=[];for(const w of y){const _=NT(w,p);_.length&&S.push(_)}return S}(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),h=Gh(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const c=Gh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(c.ops)})}else s.push(ca(l,i));else s.push(Dr(l,i));return a&&(n?l.forEach(c=>{s.push(Os(c,!1,i))}):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map(a=>+a.toFixed(r)):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:re};break;case"fillPath":a={d:this.opsToPath(o),stroke:re,strokeWidth:0,fill:i.fill||re};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||re,strokeWidth:i,fill:re}}_mergedShape(t){return t.filter((r,i)=>i===0||r.op!=="move")}}class zT{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new uo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map(n=>+n.toFixed(i)):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const h=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Ss="http://www.w3.org/2000/svg";class WT{constructor(t,r){this.svg=t,this.gen=new uo(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(Ss,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Ss,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Ss,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(Ss,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const h=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var X={canvas:(e,t)=>new zT(e,t),svg:(e,t)=>new WT(e,t),generator:e=>new uo(e),newSeed:()=>uo.newSeed()},tt=f(async(e,t,r)=>{var d,y;let i;const s=t.useHtmlLabels||Ve((d=dt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",$t(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,h=t.labelType==="markdown",c=await Re(a,le(ir(n),dt()),{useHtmlLabels:s,width:t.width||((y=dt().flowchart)==null?void 0:y.wrappingWidth),classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:h},dt());let u=c.getBBox();const p=((t==null?void 0:t.padding)??0)/2;if(s){const g=c.children[0],m=nt(c);await sl(g,n),u=g.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}return s?a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):a.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:u,halfPadding:p,label:a}},"labelHelper"),da=f(async(e,t,r)=>{var l,h;const i=r.useHtmlLabels??Ut(dt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Re(s,le(ir(t),dt()),{useHtmlLabels:i,width:r.width||((h=(l=dt())==null?void 0:l.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let a=o.getBBox();const n=r.padding/2;if(Ut(dt())){const c=o.children[0],u=nt(o);a=c.getBoundingClientRect(),u.attr("width",a.width),u.attr("height",a.height)}return i?s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"):s.attr("transform","translate(0, "+-a.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:a,halfPadding:n,label:s}},"insertLabel"),Z=f((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),J=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ct(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(ct,"createPathFromPoints");function or(e,t,r,i,s,o){const a=[],l=r-e,h=i-t,c=l/o,u=2*Math.PI/c,p=t+h/2;for(let d=0;d<=50;d++){const y=d/50,g=e+y*l,m=p+s*Math.sin(u*(g-e));a.push({x:g,y:m})}return a}f(or,"generateFullSineWavePoints");function ts(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),y=t+r*Math.sin(p);a.push({x:-d,y:-y})}return a}f(ts,"generateCirclePoints");function hn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=f((l,h)=>(l==null?void 0:l.getAttribute(h))??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([h,c])=>{c&&r.setAttribute(h,c)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(hn,"mergePaths");var HT=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,h;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,h=n):(s<0&&(a=-a),l=a,h=s===0?0:a*o/s),{x:r+l,y:i+h}},"intersectRect"),xi=HT,UT=f(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=dt(),n=Ut(a);return await Re(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Je=UT,ar=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Yf=f(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Ut(r),d=u.insert("g").attr("class","cluster-label ");let y;t.labelType==="markdown"?y=await Re(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):y=await Je(d,t.label,t.labelStyle||"",!1,!0);let g=y.getBBox();if(Ut(r)){const F=y.children[0],L=nt(y);g=F.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;D.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const F=X.svg(u),L=j(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),q=F.path(ar(b,k,m,C,0),L);S=u.insert(()=>(D.debug("Rough node insert CXC",q),q),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:w}=Eo(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),n){const F=d.select("span");F&&F.attr("style",n)}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(F){return xi(t,F)},{cluster:u,labelBBox:g}},"rect"),YT=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return xi(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),GT=f(async(e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),c=h.insert("g",":first-child"),u=h.insert("g").attr("class","cluster-label");let p=h.append("rect");const d=await Je(u,t.label,t.labelStyle,void 0,!0);let y=d.getBBox();if(Ut(r)){const q=d.children[0],M=nt(d);y=q.getBoundingClientRect(),M.attr("width",y.width),M.attr("height",y.height)}const g=0*t.padding,m=g/2,C=(t.width<=y.width+t.padding?y.width+t.padding:t.width)+g;t.width<=y.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+g,k=t.height+g-y.height-6,S=t.x-C/2,w=t.y-b/2;t.width=C;const _=t.y-t.height/2-m+y.height+2;let F;if(t.look==="handDrawn"){const q=t.cssClasses.includes("statediagram-cluster-alt"),M=X.svg(h),$=t.rx||t.ry?M.path(ar(S,w,C,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):M.rectangle(S,w,C,b,{seed:s});F=h.insert(()=>$,":first-child");const H=M.rectangle(S,_,C,k,{fill:q?o:a,fillStyle:q?"hachure":"solid",stroke:l,seed:s});F=h.insert(()=>$,":first-child"),p=h.insert(()=>H)}else F=c.insert("rect",":first-child"),F.attr("class","outer").attr("x",S).attr("y",w).attr("width",C).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",S).attr("y",_).attr("width",C).attr("height",k);u.attr("transform",`translate(${t.x-y.width/2}, ${w+1-(Ut(r)?0:3)})`);const L=F.node().getBBox();return t.height=L.height,t.offsetX=0,t.offsetY=y.height-t.padding/2,t.labelBBox=y,t.intersect=function(q){return xi(t,q)},{cluster:h,labelBBox:y}},"roundedWithTitle"),XT=f(async(e,t)=>{D.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:h,backgroundStyles:c}=V(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Ut(r),d=u.insert("g").attr("class","cluster-label "),y=await Re(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let g=y.getBBox();if(Ut(r)){const F=y.children[0],L=nt(y);g=F.getBoundingClientRect(),L.attr("width",g.width),L.attr("height",g.height)}const m=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(m-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-m/2,k=t.y-C/2;D.trace("Data ",t,JSON.stringify(t));let S;if(t.look==="handDrawn"){const F=X.svg(u),L=j(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),q=F.path(ar(b,k,m,C,t.rx),L);S=u.insert(()=>(D.debug("Rough node insert CXC",q),q),":first-child"),S.select("path:nth-child(2)").attr("style",h.join(";")),S.select("path").attr("style",c.join(";").replace("fill","stroke"))}else S=u.insert("rect",":first-child"),S.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",m).attr("height",C);const{subGraphTitleTopMargin:w}=Eo(r);if(d.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+w})`),n){const F=d.select("span");F&&F.attr("style",n)}const _=S.node().getBBox();return t.offsetX=0,t.width=_.width,t.height=_.height,t.offsetY=g.height-t.padding/2,t.intersect=function(F){return xi(t,F)},{cluster:u,labelBBox:g}},"kanbanSection"),jT=f((e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,h=t.width+l;t.diff=-t.padding;const c=t.height+l,u=t.x-h/2,p=t.y-c/2;t.width=h;let d;if(t.look==="handDrawn"){const m=X.svg(a).rectangle(u,p,h,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});d=a.insert(()=>m,":first-child")}else{d=n.insert("rect",":first-child");let g="outer";t.look,g="divider",d.attr("class",g).attr("x",u).attr("y",p).attr("width",h).attr("height",c).attr("data-look",t.look)}const y=d.node().getBBox();return t.height=y.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return xi(t,g)},{cluster:a,labelBBox:{}}},"divider"),VT=Yf,ZT={rect:Yf,squareRect:VT,roundedWithTitle:GT,noteGroup:YT,divider:jT,kanbanSection:XT},Gf=new Map,Xf=f(async(e,t)=>{const r=t.shape||"rect",i=await ZT[r](e,t);return Gf.set(t.id,i),i},"insertCluster"),KT=f(()=>{Gf=new Map},"clear");function jf(e,t){return e.intersect(t)}f(jf,"intersectNode");var QT=jf;function Vf(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),h=Math.abs(t*r*a/l);i.x<s&&(h=-h);var c=Math.abs(t*r*n/l);return i.y<o&&(c=-c),{x:s+h,y:o+c}}f(Vf,"intersectEllipse");var Zf=Vf;function Kf(e,t,r){return Zf(e,t,t,r)}f(Kf,"intersectCircle");var JT=Kf;function Qf(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,h=1e-6;if(n!==0&&l!==0&&cn(n,l))return;const c=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=c*e.x+u*e.y+p,y=c*t.x+u*t.y+p;if(Math.abs(d)<h&&Math.abs(y)<h&&cn(d,y))return;const g=s*u-c*o;if(g===0)return;const m=Math.abs(g/2);let C=o*p-u*a;const b=C<0?(C-m)/g:(C+m)/g;C=c*a-s*p;const k=C<0?(C-m)/g:(C+m)/g;return{x:b,y:k}}}f(Qf,"intersectLine");function cn(e,t){return e*t>0}f(cn,"sameSign");var tS=Qf;function Jf(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(c){a=Math.min(a,c.x),n=Math.min(n,c.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,h=s-e.height/2-n;for(let c=0;c<t.length;c++){let u=t[c],p=t[c<t.length-1?c+1:0],d=tS(e,r,{x:l+u.x,y:h+u.y},{x:l+p.x,y:h+p.y});d&&o.push(d)}return o.length?(o.length>1&&o.sort(function(c,u){let p=c.x-r.x,d=c.y-r.y,y=Math.sqrt(p*p+d*d),g=u.x-r.x,m=u.y-r.y,C=Math.sqrt(g*g+m*m);return y<C?-1:y===C?0:1}),o[0]):e}f(Jf,"intersectPolygon");var eS=Jf,G={node:QT,circle:JT,ellipse:Zf,polygon:eS,rect:xi};function tg(e,t){const{labelStyles:r}=V(t);t.labelStyle=r;const i=J(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=X.svg(o),h=j(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const c=l.circle(0,0,a*2,h),u=o.insert(()=>c,":first-child");return u.attr("class","anchor").attr("style",$t(n)),Z(t,u),t.intersect=function(p){return D.info("Circle intersect",t,a,p),G.circle(t,a,p)},o}f(tg,"anchor");function un(e,t,r,i,s,o,a){const l=(e+r)/2,h=(t+i)/2,c=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,y=p/o,g=Math.sqrt(d**2+y**2);if(g>1)throw new Error("The given radii are too small to create an arc between the points.");const m=Math.sqrt(1-g**2),C=l+m*o*Math.sin(c)*(a?-1:1),b=h-m*s*Math.cos(c)*(a?-1:1),k=Math.atan2((t-b)/o,(e-C)/s);let w=Math.atan2((i-b)/o,(r-C)/s)-k;a&&w<0&&(w+=2*Math.PI),!a&&w>0&&(w-=2*Math.PI);const _=[];for(let F=0;F<20;F++){const L=F/19,q=k+L*w,M=C+s*Math.cos(q),$=b+o*Math.sin(q);_.push({x:M,y:$})}return _}f(un,"generateArcPoints");function eg(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(eg,"calculateArcSagitta");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=f(q=>q+a,"calcTotalHeight"),l=f(q=>{const M=q/2;return[M/(2.5+q/50),M]},"calcEllipseRadius"),{shapeSvg:h,bbox:c}=await tt(e,t,J(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:c.height),[p,d]=l(u),y=eg(u,p,d),m=(t!=null&&t.width?t==null?void 0:t.width:c.width)+o*2+y-y,C=u,{cssStyles:b}=t,k=[{x:m/2,y:-C/2},{x:-m/2,y:-C/2},...un(-m/2,-C/2,-m/2,C/2,p,d,!1),{x:m/2,y:C/2},...un(m/2,C/2,m/2,-C/2,p,d,!0)],S=X.svg(h),w=j(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=ct(k),F=S.path(_,w),L=h.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${p/2}, 0)`),Z(t,L),t.intersect=function(q){return G.polygon(t,k,q)},h}f(rg,"bowTieRect");function Ze(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(Ze,"insertPolygonShape");var ws=12;async function ig(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o+ws),c=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?a*2:a),u=0,p=h,d=-c,y=0,g=[{x:u+ws,y:d},{x:p,y:d},{x:p,y},{x:u,y},{x:u,y:d+ws},{x:u+ws,y:d}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(n),k=j(t,{}),S=ct(g),w=b.path(S,k);m=n.insert(()=>w,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),C&&m.attr("style",C)}else m=Ze(n,h,c,g);return i&&m.attr("style",i),Z(t,m),t.intersect=function(b){return G.polygon(t,g,b)},n}f(ig,"card");function sg(e,t){const{nodeStyles:r}=V(t);t.label="";const i=e.insert("g").attr("class",J(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=X.svg(i),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=ct(a),c=n.path(h,l),u=i.insert(()=>c,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return G.polygon(t,a,p)},i}f(sg,"choice");async function Cl(e,t,r){const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await tt(e,t,J(t)),l=16,h=(r==null?void 0:r.padding)??n,c=t.look==="neo"?a.width/2+l*2:a.width/2+h;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=X.svg(o),y=j(t,{}),g=d.circle(0,0,c*2,y);u=o.insert(()=>g,":first-child"),u.attr("class","basic label-container").attr("style",$t(p))}else u=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0);return Z(t,u),t.calcIntersect=function(d,y){const g=d.width/2;return G.circle(d,g,y)},t.intersect=function(d){return D.info("Circle intersect",t,c,d),G.circle(t,c,d)},o}f(Cl,"circle");function og(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
|
|
230
|
+
M ${s.x},${s.y} L ${a.x},${a.y}`}f(og,"createLine");function ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",J(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:a}=t,n=X.svg(s),l=j(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const h=n.circle(0,0,o*2,l),c=og(o),u=n.path(c,l),p=s.insert(()=>h,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),a&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Z(t,p),t.intersect=function(d){return D.info("crossedCircle intersect",t,{radius:o,point:d}),G.circle(t,o,d)},s}f(ag,"crossedCircle");function We(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),y=t+r*Math.sin(p);a.push({x:-d,y:-y})}return a}f(We,"generateCirclePoints");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await tt(e,t,J(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=o.width+n,c=o.height+l,u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...We(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...We(h/2+u*2,-u,u,20,-180,-270),...We(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...We(h/2,c/2,u,20,0,90)],y=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...We(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...We(h/2+h*.1,-u,u,20,-180,-270),...We(h/2+h*.1,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...We(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2,y:c/2+u}],g=X.svg(s),m=j(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=ct(d).replace("Z",""),k=g.path(b,m),S=ct(y),w=g.path(S,{...m}),_=s.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${u}, 0)`),a.attr("transform",`translate(${-h/2+u-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Z(t,_),t.intersect=function(F){return G.polygon(t,y,F)},s}f(ng,"curlyBraceLeft");function He(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),y=t+r*Math.sin(p);a.push({x:d,y})}return a}f(He,"generateCirclePoints");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await tt(e,t,J(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=o.width+(t.look==="neo"?n*2:n),c=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...He(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...He(h/2+u*2,-u,u,20,-180,-270),...He(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...He(h/2,c/2,u,20,0,90)],y=[{x:-h/2,y:-c/2-u},{x:h/2,y:-c/2-u},...He(h/2,-c/2,u,20,-90,0),{x:h/2+u,y:-u},...He(h/2+u*2,-u,u,20,-180,-270),...He(h/2+u*2,u,u,20,-90,-180),{x:h/2+u,y:c/2},...He(h/2,c/2,u,20,0,90),{x:h/2,y:c/2+u},{x:-h/2,y:c/2+u}],g=X.svg(s),m=j(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=ct(d).replace("Z",""),k=g.path(b,m),S=ct(y),w=g.path(S,{...m}),_=s.insert("g",":first-child");return _.insert(()=>w,":first-child").attr("stroke-opacity",0),_.insert(()=>k,":first-child"),_.attr("class","text"),p&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${-u}, 0)`),a.attr("transform",`translate(${-h/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Z(t,_),t.intersect=function(F){return G.polygon(t,y,F)},s}f(lg,"curlyBraceRight");function Dt(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,c=(o*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*c,d=e+r*Math.cos(p),y=t+r*Math.sin(p);a.push({x:-d,y:-y})}return a}f(Dt,"generateCirclePoints");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await tt(e,t,J(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,h=o.width+(t.look==="neo"?n*2:n),c=o.height+(t.look==="neo"?l*2:l),u=Math.max(5,c*.1),{cssStyles:p}=t,d=[...Dt(h/2,-c/2,u,30,-90,0),{x:-h/2-u,y:u},...Dt(h/2+u*2,-u,u,20,-180,-270),...Dt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:-c/2},...Dt(h/2,c/2,u,20,0,90)],y=[...Dt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Dt(-h/2-u/2,-u,u,20,0,90),...Dt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Dt(-h/2+u+u/2,c/2,u,30,-180,-270)],g=[{x:h/2,y:-c/2-u},{x:-h/2,y:-c/2-u},...Dt(h/2,-c/2,u,20,-90,0),{x:-h/2-u,y:-u},...Dt(h/2+u*2,-u,u,20,-180,-270),...Dt(h/2+u*2,u,u,20,-90,-180),{x:-h/2-u,y:c/2},...Dt(h/2,c/2,u,20,0,90),{x:-h/2,y:c/2+u},{x:h/2-u-u/2,y:c/2+u},...Dt(-h/2+u+u/2,-c/2,u,20,-90,-180),{x:h/2-u/2,y:u},...Dt(-h/2-u/2,-u,u,20,0,90),...Dt(-h/2-u/2,u,u,20,-90,0),{x:h/2-u/2,y:-u},...Dt(-h/2+u+u/2,c/2,u,30,-180,-270)],m=X.svg(s),C=j(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=ct(d).replace("Z",""),S=m.path(k,C),_=ct(y).replace("Z",""),F=m.path(_,C),L=ct(g),q=m.path(L,{...C}),M=s.insert("g",":first-child");return M.insert(()=>q,":first-child").attr("stroke-opacity",0),M.insert(()=>S,":first-child"),M.insert(()=>F,":first-child"),M.attr("class","text"),p&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${u-u/4}, 0)`),a.attr("transform",`translate(${-h/2+(t.padding??0)/2-(o.x-(o.left??0))},${-c/2+(t.padding??0)/2-(o.y-(o.top??0))})`),Z(t,M),t.intersect=function($){return G.polygon(t,g,$)},s}f(hg,"curlyBraces");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:h,bbox:c}=await tt(e,t,J(t)),u=Math.max(n,(c.width+o*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,c.height+a*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:y}=t,g=X.svg(h),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=u,b=p,k=C-d,S=b/4,w=[{x:k,y:0},{x:S,y:0},{x:0,y:b/2},{x:S,y:b},{x:k,y:b},...ts(-k,-b/2,d,50,270,90)],_=ct(w),F=g.path(_,m),L=h.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-u/2}, ${-p/2})`),Z(t,L),t.intersect=function(q){return G.polygon(t,w,q)},h}f(cg,"curvedTrapezoid");var rS=f((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),iS=f((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),sS=f((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Kh=8,Qh=8;async function ug(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s;if(t.width||t.height){const m=t.width??0;t.width=(t.width??0)-a,t.width<Qh&&(t.width=Qh);const b=m/2/(2.5+m/50);t.height=(t.height??0)-o-b*3,t.height<Kh&&(t.height=Kh)}const{shapeSvg:n,bbox:l,label:h}=await tt(e,t,J(t)),c=(t.width?t.width:l.width)+a,u=c/2,p=u/(2.5+c/50),d=(t.height?t.height:l.height)+o+p;let y;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=X.svg(n),C=iS(0,0,c,d,u,p),b=sS(0,p,c,d,u,p),k=j(t,{}),S=m.path(C,k),w=m.path(b,j(t,{fill:"none"}));y=n.insert(()=>w,":first-child"),y=n.insert(()=>S,":first-child"),y.attr("class","basic label-container"),g&&y.attr("style",g)}else{const m=rS(0,0,c,d,u,p);y=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container outer-path").attr("style",$t(g)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),Z(t,y),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+(t.padding??0)/1.5-(l.y-(l.top??0))})`),t.intersect=function(m){const C=G.rect(t,m),b=C.x-(t.x??0);if(u!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(C.y-(t.y??0))>(t.height??0)/2-p)){let k=p*p*(1-b*b/(u*u));k>0&&(k=Math.sqrt(k)),k=p-k,m.y-(t.y??0)>0&&(k=-k),C.y+=k}return C},n}f(ug,"cylinder");async function bi(e,t,r){const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await tt(e,t,J(t)),n=Math.max(a.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(a.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-n/2,c=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:y}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const g=X.svg(o),m=j(t,{}),C=p||d?g.path(ar(h,c,n,l,p||0),m):g.rectangle(h,c,n,l,m);u=o.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",$t(y))}else u=o.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",$t(p)).attr("ry",$t(d)).attr("x",h).attr("y",c).attr("width",n).attr("height",l);return Z(t,u),t.calcIntersect=function(g,m){return G.rect(g,m)},t.intersect=function(g){return G.rect(t,g)},o}f(bi,"drawRect");async function dg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},h=await bi(e,t,l);if(t.look==="handDrawn"){const d=X.svg(h),y=j(t,{}),g=h.select(".basic.label-container > path:nth-child(2)"),m=g.node();if(!m)return h;let C=null;if(m instanceof SVGGraphicsElement)C=m.getBBox();else return h;return h.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,y),".basic.label-container g.label"),h.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,y),".basic.label-container g.label"),g.remove(),h}const c=h.select(".basic.label-container"),u=(Number(c.attr("width"))||a)??0,p=(Number(c.attr("height"))||n)??0;return u>0&&p>0&&c.attr("stroke-dasharray",`${u} ${p}`),h}f(dg,"datastore");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await tt(e,t,J(t)),h=n.width+s,c=n.height+o,u=c*.2,p=-h/2,d=-c/2-u/2,{cssStyles:y}=t,g=X.svg(a),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],b=g.polygon(C.map(S=>[S.x,S.y]),m),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),Z(t,k),t.intersect=function(S){return G.rect(t,S)},a}f(pg,"dividedRectangle");async function fg(e,t){var d,y;const{labelStyles:r,nodeStyles:i}=V(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(a??0),c=h-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const g=X.svg(n),m=j(t,{roughness:.2,strokeWidth:2.5}),C=j(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,h*2,m),k=g.circle(0,0,c*2,C);u=n.insert("g",":first-child"),u.attr("class",$t(t.cssClasses)).attr("style",$t(p)),(d=u.node())==null||d.appendChild(b),(y=u.node())==null||y.appendChild(k)}else{u=n.insert("g",":first-child");const g=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Z(t,u),t.intersect=function(g){return D.info("DoubleCircle intersect",t,h,g),G.circle(t,h,g)},n}f(fg,"doublecircle");function gg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=V(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",J(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=X.svg(o),{nodeBorder:h}=r,c=j(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,a*2,c),p=o.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),Z(t,p),t.intersect=function(d){return D.info("filledCircle intersect",t,{radius:a,point:d}),G.circle(t,a,d)},o}f(gg,"filledCircle");var Jh=10,tc=10;async function mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Jh&&(t.height=Jh),t.width=((t==null?void 0:t.width)??0)-o-o/2,t.width<tc&&(t.width=tc));const{shapeSvg:a,bbox:n,label:l}=await tt(e,t,J(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(o??0),c=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=c,p=[{x:0,y:-c},{x:u,y:-c},{x:u/2,y:0}],{cssStyles:d}=t,y=X.svg(a),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ct(p),C=y.path(m,g),b=a.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=c,Z(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-c/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(k){return D.info("Triangle intersect",t,p,k),G.polygon(t,p,k)},a}f(mg,"flippedTriangle");function yg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=V(t);t.label="";const a=e.insert("g").attr("class",J(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const c=-1*l/2,u=-1*h/2,p=X.svg(a),d=j(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const y=p.rectangle(c,u,l,h,d),g=a.insert(()=>y,":first-child");n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",o),Z(t,g);const m=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=m/2||0,t.height+=m/2||0),t.intersect=function(C){return G.rect(t,C)},a}f(yg,"forkJoin");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<o&&(t.height=o),t.width=((t==null?void 0:t.width)??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:h}=await tt(e,t,J(t)),c=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width))+a*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(o,h.height))+n*2,p=u/2,{cssStyles:d}=t,y=X.svg(l),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-c/2,y:-u/2},{x:c/2-p,y:-u/2},...ts(-c/2+p,0,p,50,90,270),{x:c/2-p,y:u/2},{x:-c/2,y:u/2}],C=ct(m),b=y.path(C,g),k=l.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Z(t,k),t.intersect=function(S){return D.info("Pill intersect",t,{radius:p,point:S}),G.polygon(t,m,S)},l}f(Cg,"halfRoundedRectangle");var oS=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=V(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,h=t.look==="neo"?n:o;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-l}const{shapeSvg:c,bbox:u}=await tt(e,t,J(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,y=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+h,g=[{x:d,y:0},{x:y-d,y:0},{x:y,y:-p/2},{x:y-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let m;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=X.svg(c),k=j(t,{}),S=oS(0,0,y,p,d),w=b.path(S,k);m=c.insert(()=>w,":first-child").attr("transform",`translate(${-y/2}, ${p/2})`),C&&m.attr("style",C)}else m=Ze(c,y,p,g);return i&&m.attr("style",i),t.width=y,t.height=p,Z(t,m),t.intersect=function(b){return G.polygon(t,g,b)},c}f(xg,"hexagon");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await tt(e,t,J(t)),o=Math.max(30,(t==null?void 0:t.width)??0),a=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=X.svg(s),h=j(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const c=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],u=ct(c),p=l.path(u,h),d=s.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-o/2}, ${-a/2})`),Z(t,d),t.intersect=function(y){return D.info("Pill intersect",t,{points:c}),G.polygon(t,c,y)},s}f(bg,"hourglass");async function kg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=V(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await tt(e,t,"icon-shape default"),p=t.pos==="t",d=n,y=n,{nodeBorder:g}=r,{stylesMap:m}=yi(t),C=-y/2,b=-d/2,k=t.label?8:0,S=X.svg(h),w=j(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=S.rectangle(C,b,y,d,w),F=Math.max(y,c.width),L=d+c.height+k,q=S.rectangle(-F/2,-L/2,F,L,{...w,fill:"transparent",stroke:"none"}),M=h.insert(()=>_,":first-child"),$=h.insert(()=>q);if(t.icon){const H=h.append("g");H.html(`<g>${await Ci(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const N=H.node().getBBox(),I=N.width,z=N.height,P=N.x,W=N.y;H.attr("transform",`translate(${-I/2-P},${p?c.height/2+k/2-z/2-W:-c.height/2-k/2-z/2-W})`),H.attr("style",`color: ${m.get("stroke")??g};`)}return u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${p?-L/2:L/2-c.height})`),M.attr("transform",`translate(0,${p?c.height/2+k/2:-c.height/2-k/2})`),Z(t,$),t.intersect=function(H){if(D.info("iconSquare intersect",t,H),!t.label)return G.rect(t,H);const N=t.x??0,I=t.y??0,z=t.height??0;let P=[];return p?P=[{x:N-c.width/2,y:I-z/2},{x:N+c.width/2,y:I-z/2},{x:N+c.width/2,y:I-z/2+c.height+k},{x:N+y/2,y:I-z/2+c.height+k},{x:N+y/2,y:I+z/2},{x:N-y/2,y:I+z/2},{x:N-y/2,y:I-z/2+c.height+k},{x:N-c.width/2,y:I-z/2+c.height+k}]:P=[{x:N-y/2,y:I-z/2},{x:N+y/2,y:I-z/2},{x:N+y/2,y:I-z/2+d},{x:N+c.width/2,y:I-z/2+d},{x:N+c.width/2/2,y:I+z/2},{x:N-c.width/2,y:I+z/2},{x:N-c.width/2,y:I-z/2+d},{x:N-y/2,y:I-z/2+d}],G.polygon(t,P,H)},h}f(kg,"icon");async function Tg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=V(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,label:u}=await tt(e,t,"icon-shape default"),p=20,d=t.label?8:0,y=t.pos==="t",{nodeBorder:g,mainBkg:m}=r,{stylesMap:C}=yi(t),b=X.svg(h),k=j(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=C.get("fill");k.stroke=S??m;const w=h.append("g");t.icon&&w.html(`<g>${await Ci(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const _=w.node().getBBox(),F=_.width,L=_.height,q=_.x,M=_.y,$=Math.max(F,L)*Math.SQRT2+p*2,H=b.circle(0,0,$,k),N=Math.max($,c.width),I=$+c.height+d,z=b.rectangle(-N/2,-I/2,N,I,{...k,fill:"transparent",stroke:"none"}),P=h.insert(()=>H,":first-child"),W=h.insert(()=>z);return w.attr("transform",`translate(${-F/2-q},${y?c.height/2+d/2-L/2-M:-c.height/2-d/2-L/2-M})`),w.attr("style",`color: ${C.get("stroke")??g};`),u.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${y?-I/2:I/2-c.height})`),P.attr("transform",`translate(0,${y?c.height/2+d/2:-c.height/2-d/2})`),Z(t,W),t.intersect=function(R){return D.info("iconSquare intersect",t,R),G.rect(t,R)},h}f(Tg,"iconCircle");async function Sg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=V(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await tt(e,t,"icon-shape default"),d=t.pos==="t",y=n+u*2,g=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=yi(t),k=-g/2,S=-y/2,w=t.label?8:0,_=X.svg(h),F=j(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const L=b.get("fill");F.stroke=L??C;const q=_.path(ar(k,S,g,y,5),F),M=Math.max(g,c.width),$=y+c.height+w,H=_.rectangle(-M/2,-$/2,M,$,{...F,fill:"transparent",stroke:"none"}),N=h.insert(()=>q,":first-child").attr("class","icon-shape2"),I=h.insert(()=>H);if(t.icon){const z=h.append("g");z.html(`<g>${await Ci(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const P=z.node().getBBox(),W=P.width,R=P.height,B=P.x,U=P.y;z.attr("transform",`translate(${-W/2-B},${d?c.height/2+w/2-R/2-U:-c.height/2-w/2-R/2-U})`),z.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-$/2:$/2-c.height})`),N.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),Z(t,I),t.intersect=function(z){if(D.info("iconSquare intersect",t,z),!t.label)return G.rect(t,z);const P=t.x??0,W=t.y??0,R=t.height??0;let B=[];return d?B=[{x:P-c.width/2,y:W-R/2},{x:P+c.width/2,y:W-R/2},{x:P+c.width/2,y:W-R/2+c.height+w},{x:P+g/2,y:W-R/2+c.height+w},{x:P+g/2,y:W+R/2},{x:P-g/2,y:W+R/2},{x:P-g/2,y:W-R/2+c.height+w},{x:P-c.width/2,y:W-R/2+c.height+w}]:B=[{x:P-g/2,y:W-R/2},{x:P+g/2,y:W-R/2},{x:P+g/2,y:W-R/2+y},{x:P+c.width/2,y:W-R/2+y},{x:P+c.width/2/2,y:W+R/2},{x:P-c.width/2,y:W+R/2},{x:P-c.width/2,y:W-R/2+y},{x:P-g/2,y:W-R/2+y}],G.polygon(t,B,z)},h}f(Sg,"iconRounded");async function wg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=V(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:h,bbox:c,halfPadding:u,label:p}=await tt(e,t,"icon-shape default"),d=t.pos==="t",y=n+u*2,g=n+u*2,{nodeBorder:m,mainBkg:C}=r,{stylesMap:b}=yi(t),k=-g/2,S=-y/2,w=t.label?8:0,_=X.svg(h),F=j(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const L=b.get("fill");F.stroke=L??C;const q=_.path(ar(k,S,g,y,.1),F),M=Math.max(g,c.width),$=y+c.height+w,H=_.rectangle(-M/2,-$/2,M,$,{...F,fill:"transparent",stroke:"none"}),N=h.insert(()=>q,":first-child"),I=h.insert(()=>H);if(t.icon){const z=h.append("g");z.html(`<g>${await Ci(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const P=z.node().getBBox(),W=P.width,R=P.height,B=P.x,U=P.y;z.attr("transform",`translate(${-W/2-B},${d?c.height/2+w/2-R/2-U:-c.height/2-w/2-R/2-U})`),z.attr("style",`color: ${b.get("stroke")??m};`)}return p.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))},${d?-$/2:$/2-c.height})`),N.attr("transform",`translate(0,${d?c.height/2+w/2:-c.height/2-w/2})`),Z(t,I),t.intersect=function(z){if(D.info("iconSquare intersect",t,z),!t.label)return G.rect(t,z);const P=t.x??0,W=t.y??0,R=t.height??0;let B=[];return d?B=[{x:P-c.width/2,y:W-R/2},{x:P+c.width/2,y:W-R/2},{x:P+c.width/2,y:W-R/2+c.height+w},{x:P+g/2,y:W-R/2+c.height+w},{x:P+g/2,y:W+R/2},{x:P-g/2,y:W+R/2},{x:P-g/2,y:W-R/2+c.height+w},{x:P-c.width/2,y:W-R/2+c.height+w}]:B=[{x:P-g/2,y:W-R/2},{x:P+g/2,y:W-R/2},{x:P+g/2,y:W-R/2+y},{x:P+c.width/2,y:W-R/2+y},{x:P+c.width/2/2,y:W+R/2},{x:P-c.width/2,y:W+R/2},{x:P-c.width/2,y:W-R/2+y},{x:P-g/2,y:W-R/2+y}],G.polygon(t,B,z)},h}f(wg,"iconSquare");async function _g(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=V(t);t.labelStyle=a;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,c=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(h,n??0);const{shapeSvg:u,bbox:p,label:d}=await tt(e,t,"image-shape default"),y=t.pos==="t",g=-h/2,m=-c/2,C=t.label?8:0,b=X.svg(u),k=j(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=b.rectangle(g,m,h,c,k),w=Math.max(h,p.width),_=c+p.height+C,F=b.rectangle(-w/2,-_/2,w,_,{...k,fill:"none",stroke:"none"}),L=u.insert(()=>S,":first-child"),q=u.insert(()=>F);if(t.img){const M=u.append("image");M.attr("href",t.img),M.attr("width",h),M.attr("height",c),M.attr("preserveAspectRatio","none"),M.attr("transform",`translate(${-h/2},${y?_/2-c:-_/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${y?-c/2-p.height/2-C/2:c/2-p.height/2+C/2})`),L.attr("transform",`translate(0,${y?p.height/2+C/2:-p.height/2-C/2})`),Z(t,q),t.intersect=function(M){if(D.info("iconSquare intersect",t,M),!t.label)return G.rect(t,M);const $=t.x??0,H=t.y??0,N=t.height??0;let I=[];return y?I=[{x:$-p.width/2,y:H-N/2},{x:$+p.width/2,y:H-N/2},{x:$+p.width/2,y:H-N/2+p.height+C},{x:$+h/2,y:H-N/2+p.height+C},{x:$+h/2,y:H+N/2},{x:$-h/2,y:H+N/2},{x:$-h/2,y:H-N/2+p.height+C},{x:$-p.width/2,y:H-N/2+p.height+C}]:I=[{x:$-h/2,y:H-N/2},{x:$+h/2,y:H-N/2},{x:$+h/2,y:H-N/2+c},{x:$+p.width/2,y:H-N/2+c},{x:$+p.width/2/2,y:H+N/2},{x:$-p.width/2,y:H+N/2},{x:$-p.width/2,y:H-N/2+c},{x:$-h/2,y:H-N/2+c}],G.polygon(t,I,M)},u}f(_g,"imageSquare");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=Math.max(l.width+(a??0)*2,(t==null?void 0:t.width)??0),c=Math.max(l.height+(o??0)*2,(t==null?void 0:t.height)??0),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=X.svg(n),g=j(t,{}),m=ct(u),C=y.path(m,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=Ze(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Z(t,p),t.intersect=function(y){return G.polygon(t,u,y)},n}f(Bg,"inv_trapezoid");async function vg(e,t){const{shapeSvg:r,bbox:i,label:s}=await tt(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Z(t,o),t.intersect=function(l){return G.rect(t,l)},r}f(vg,"labelRect");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=((t==null?void 0:t.height)??l.height)+o,c=((t==null?void 0:t.width)??l.width)+a,u=[{x:0,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:-(3*h)/6,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=X.svg(n),g=j(t,{}),m=ct(u),C=y.path(m,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ze(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,Z(t,p),t.intersect=function(y){return G.polygon(t,u,y)},n}f(Lg,"lean_left");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=((t==null?void 0:t.height)??l.height)+o,c=((t==null?void 0:t.width)??l.width)+a,u=[{x:-3*h/6,y:0},{x:c,y:0},{x:c+3*h/6,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=X.svg(n),g=j(t,{}),m=ct(u),C=y.path(m,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ze(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,Z(t,p),t.intersect=function(y){return G.polygon(t,u,y)},n}f(Fg,"lean_right");function Ag(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",J(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,h=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],c=X.svg(s),u=j(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=ct(h),d=c.path(p,u),y=s.insert(()=>d,":first-child");return y.attr("class","outer-path"),o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(-${a/2},${-n})`),Z(t,y),t.intersect=function(g){return D.info("lightningBolt intersect",t,g),G.polygon(t,h,g)},s}f(Ag,"lightningBolt");var aS=f((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),nS=f((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lS=f((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),ec=10,rc=10;async function Eg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-o,t.width<rc&&(t.width=rc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-a-k*3,t.height<ec&&(t.height=ec)}const{shapeSvg:n,bbox:l,label:h}=await tt(e,t,J(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=c/2,p=u/(2.5+c/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+a*2,y=d*.1;let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const C=X.svg(n),b=nS(0,0,c,d,u,p,y),k=lS(0,p,c,d,u,p),S=j(t,{}),w=C.path(b,S),_=C.path(k,S);n.insert(()=>_,":first-child").attr("class","line"),g=n.insert(()=>w,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{const C=aS(0,0,c,d,u,p,y);g=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",$t(m)).attr("style",i)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-c/2}, ${-(d/2+p)})`),Z(t,g),h.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const b=G.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let S=p*p*(1-k*k/(u*u));S>0&&(S=Math.sqrt(S)),S=p-S,C.y-(t.y??0)>0&&(S=-S),b.y+=S}return b},n}f(Eg,"linedCylinder");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const S=t.width;t.width=(S??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:h}=await tt(e,t,J(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(o??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(a??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:y}=t,g=X.svg(n),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2-c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:d/2},...or(-c/2-c/2*.1,d/2,c/2+c/2*.1,d/2,p,.8),{x:c/2+c/2*.1,y:-d/2},{x:-c/2-c/2*.1,y:-d/2},{x:-c/2,y:-d/2},{x:-c/2,y:d/2*1.1},{x:-c/2,y:-d/2}],b=g.polygon(C.map(S=>[S.x,S.y]),m),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-c/2+(t.padding??0)+c/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),Z(t,k),t.intersect=function(S){return G.polygon(t,C,S)},n}f(Mg,"linedWaveEdgedRect");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-2*n,10));const{shapeSvg:l,bbox:h,label:c}=await tt(e,t,J(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+a*2+2*n,d=u-2*n,y=p-2*n,g=-d/2,m=-y/2,{cssStyles:C}=t,b=X.svg(l),k=j(t,{}),S=[{x:g-n,y:m+n},{x:g-n,y:m+y+n},{x:g+d-n,y:m+y+n},{x:g+d-n,y:m+y},{x:g+d,y:m+y},{x:g+d,y:m+y-n},{x:g+d+n,y:m+y-n},{x:g+d+n,y:m-n},{x:g+n,y:m-n},{x:g+n,y:m},{x:g,y:m},{x:g,y:m+n}],w=[{x:g,y:m+n},{x:g+d-n,y:m+n},{x:g+d-n,y:m+y},{x:g+d,y:m+y},{x:g+d,y:m},{x:g,y:m}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ct(S);let F=b.path(_,k);const L=ct(w);let q=b.path(L,k);t.look!=="handDrawn"&&(F=hn(F),q=hn(q));const M=l.insert("g",":first-child");return M.insert(()=>F),M.insert(()=>q),M.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(h.width/2)-n-(h.x-(h.left??0))}, ${-(h.height/2)+n-(h.y-(h.top??0))})`),Z(t,M),t.intersect=function($){return G.polygon(t,S,$)},l}f($g,"multiRect");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await tt(e,t,J(t)),n=t.padding??0,l=t.look==="neo"?16:n,h=t.look==="neo"?12:n;let c=!0;(t.width||t.height)&&(c=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-h*3);const u=Math.max(o.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(o.height,(t==null?void 0:t.height)??0)+h*3,d=t.look==="neo"?p/4:p/8,y=p+(c?d/2:-d/2),g=-u/2,m=-y/2,C=10,{cssStyles:b}=t,k=or(g-C,m+y+C,g+u-C,m+y+C,d,.8),S=k==null?void 0:k[k.length-1],w=[{x:g-C,y:m+C},{x:g-C,y:m+y+C},...k,{x:g+u-C,y:S.y-C},{x:g+u,y:S.y-C},{x:g+u,y:S.y-2*C},{x:g+u+C,y:S.y-2*C},{x:g+u+C,y:m-C},{x:g+C,y:m-C},{x:g+C,y:m},{x:g,y:m},{x:g,y:m+C}],_=[{x:g,y:m+C},{x:g+u-C,y:m+C},{x:g+u-C,y:S.y-C},{x:g+u,y:S.y-C},{x:g+u,y:m},{x:g,y:m}],F=X.svg(s),L=j(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const q=ct(w),M=F.path(q,L),$=ct(_),H=F.path($,L),N=s.insert(()=>M,":first-child");return N.insert(()=>H),N.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-d/2})`),a.attr("transform",`translate(${-(o.width/2)-C-(o.x-(o.left??0))}, ${-(o.height/2)+C-d/2-(o.y-(o.top??0))})`),Z(t,N),t.intersect=function(I){return G.polygon(t,w,I)},s}f(Og,"multiWaveEdgedRectangle");async function Ig(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i,t.useHtmlLabels||Ut(bt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await tt(e,t,J(t)),h=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-h/2,p=-c/2,{cssStyles:d}=t,y=X.svg(a),g=j(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=y.rectangle(u,p,h,c,g),C=a.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,C),t.intersect=function(b){return G.rect(t,b)},a}f(Ig,"note");var hS=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await tt(e,t,J(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,h=.5,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=X.svg(s),y=j(t,{}),g=hS(0,0,l),m=d.path(g,y);u=s.insert(()=>m,":first-child").attr("transform",`translate(${-l/2+h}, ${l/2})`),p&&u.attr("style",p)}else u=Ze(s,l,l,c),u.attr("transform",`translate(${-l/2+h}, ${l/2})`);return i&&u.attr("style",i),Z(t,u),t.calcIntersect=function(d,y){const g=d.width,m=[{x:g/2,y:0},{x:g,y:-g/2},{x:g/2,y:-g},{x:0,y:-g/2}],C=G.polygon(d,m,y);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(Dg,"question");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:h}=await tt(e,t,J(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o),u=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?a*2:a),p=-c/2,d=-u/2,y=d/2,g=[{x:p+y,y:d},{x:p,y:0},{x:p+y,y:-d},{x:-p,y:-d},{x:-p,y:d}],{cssStyles:m}=t,C=X.svg(n),b=j(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=ct(g),S=C.path(k,b),w=n.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-y/2},0)`),h.attr("transform",`translate(${-y/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Z(t,w),t.intersect=function(_){return G.polygon(t,g,_)},n}f(Pg,"rect_left_inv_arrow");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,h=t.label,c=await Je(n,h,t.labelStyle,!0,!0);let u={width:0,height:0};if(Ut(dt())){const L=c.children[0],q=nt(c);u=L.getBoundingClientRect(),q.attr("width",u.width),q.attr("height",u.height)}D.info("Text 2",l);const p=l||[],d=c.getBBox(),y=await Je(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),g=y.children[0],m=nt(y);u=g.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height);const C=(t.padding||0)/2;nt(y).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),nt(c).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const b=u.width+(t.padding||0),k=u.height+(t.padding||0),S=-u.width/2-C,w=-u.height/2-C;let _,F;if(t.look==="handDrawn"){const L=X.svg(o),q=j(t,{}),M=L.path(ar(S,w,b,k,t.rx||0),q),$=L.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,q);F=o.insert(()=>(D.debug("Rough node insert CXC",M),$),":first-child"),_=o.insert(()=>(D.debug("Rough node insert CXC",M),M),":first-child")}else _=a.insert("rect",":first-child"),F=a.insert("line"),_.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),F.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return Z(t,_),t.intersect=function(L){return G.rect(t,L)},o}f(Rg,"rectWithTitle");async function qg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return bi(e,t,s)}f(qg,"roundedRect");var hr=8;async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await tt(e,t,J(t)),h=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?hr:hr*2),c=((t==null?void 0:t.height)??n.height)+o*2,u=h-hr,p=c,d=hr-h/2,y=-c/2,{cssStyles:g}=t,m=X.svg(a),C=j(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:d,y},{x:d+u,y},{x:d+u,y:y+p},{x:d-hr,y:y+p},{x:d-hr,y},{x:d,y},{x:d,y:y+p}],k=m.polygon(b.map(w=>[w.x,w.y]),C),S=a.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path").attr("style",$t(g)),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${hr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,S),t.intersect=function(w){return G.rect(t,w)},a}f(Ng,"shadedProcess");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:h}=await tt(e,t,J(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2)*1.5,p=c,d=u/1.5,y=-p/2,g=-d/2,{cssStyles:m}=t,C=X.svg(n),b=j(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:y,y:g},{x:y,y:g+d},{x:y+p,y:g+d},{x:y+p,y:g-d/2}],S=ct(k),w=C.path(S,b),_=n.insert(()=>w,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${d/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),Z(t,_),t.intersect=function(F){return G.polygon(t,k,F)},n}f(zg,"slopedRect");async function Wg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return bi(e,t,o)}f(Wg,"squareRect");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=l.height+(t.look==="neo"?a*2:a),c=l.width+h/4+(t.look==="neo"?o*2:o),u=h/2,{cssStyles:p}=t,d=X.svg(n),y=j(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const g=[{x:-c/2+u,y:-h/2},{x:c/2-u,y:-h/2},...ts(-c/2+u,0,u,50,90,270),{x:c/2-u,y:h/2},...ts(c/2-u,0,u,50,270,450)],m=ct(g),C=d.path(m,y),b=n.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Z(t,b),t.intersect=function(k){return G.polygon(t,g,k)},n}f(Hg,"stadium");async function Ug(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return bi(e,t,r)}f(Ug,"state");function Yg(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const c=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=X.svg(c),p=j(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:a,strokeWidth:2}),y=n??l,g=(t.width??0)*5/14,m=u.circle(0,0,g,{...p,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),C=c.insert(()=>d,":first-child");if(C.insert(()=>m),t.look!=="handDrawn"&&C.attr("class","outer-path"),o&&C.selectAll("path").attr("style",o),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const S=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",w=S?`${S}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${w})`)}return Z(t,C),t.intersect=function(S){return G.circle(t,(t.width??0)/2,S)},c}f(Yg,"stateEnd");function Gg(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const c=X.svg(o).circle(0,0,t.width,k2(i));a=o.insert(()=>c),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",c=h?`${h}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${c})`)}return Z(t,a),t.intersect=function(h){return G.circle(t,(t.width??7)/2,h)},o}f(Gg,"stateStart");var Pr=8;async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=((t==null?void 0:t.width)??l.width)+2*Pr+o,c=((t==null?void 0:t.height)??l.height)+a,u=h-2*Pr,p=c,d=-h/2,y=-c/2,g=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const m=X.svg(n),C=j(t,{}),b=m.rectangle(d,y,u+16,p,C),k=m.line(d+Pr,y,d+Pr,y+p,C),S=m.line(d+Pr+u,y,d+Pr+u,y+p,C);n.insert(()=>k,":first-child"),n.insert(()=>S,":first-child");const w=n.insert(()=>b,":first-child"),{cssStyles:_}=t;w.attr("class","basic label-container").attr("style",$t(_)),Z(t,w)}else{const m=Ze(n,u,p,g);i&&m.attr("style",i),Z(t,m)}return t.intersect=function(m){return G.polygon(t,g,m)},n}f(Xg,"subroutine");var pa=.2;async function jg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-a*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-pa*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2,c=pa*h,u=pa*h,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2+c-c,y=h,g=-d/2,m=-y/2,{cssStyles:C}=t,b=X.svg(n),k=j(t,{}),S=[{x:g-c/2,y:m},{x:g+d+c/2,y:m},{x:g+d+c/2,y:m+y},{x:g-c/2,y:m+y}],w=[{x:g+d-c/2,y:m+y},{x:g+d+c/2,y:m+y},{x:g+d+c/2,y:m+y-u}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const _=ct(S),F=b.path(_,k),L=ct(w),q=b.path(L,{...k,fillStyle:"solid"}),M=n.insert(()=>q,":first-child");return M.insert(()=>F,":first-child"),M.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&M.selectAll("path").attr("style",i),Z(t,M),t.intersect=function($){return G.polygon(t,S,$)},n}f(jg,"taggedRect");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await tt(e,t,J(t)),n=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=l/8,c=.2*n,u=.2*l,p=l+h,{cssStyles:d}=t,y=X.svg(s),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-n/2-n/2*.1,y:p/2},...or(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,h,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,b=-p/2-u*.4,k=[{x:C+n-c,y:(b+l)*1.3},{x:C+n,y:b+l-u},{x:C+n,y:(b+l)*.9},...or(C+n,(b+l)*1.25,C+n-c,(b+l)*1.3,-l*.02,.5)],S=ct(m),w=y.path(S,g),_=ct(k),F=y.path(_,{...g,fillStyle:"solid"}),L=s.insert(()=>F,":first-child");return L.insert(()=>w,":first-child"),L.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-h/2-(o.y-(o.top??0))})`),Z(t,L),t.intersect=function(q){return G.polygon(t,m,q)},s}f(Vg,"taggedWaveEdgedRectangle");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await tt(e,t,J(t)),a=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-a/2,h=-n/2,c=s.insert("rect",":first-child");return c.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",h).attr("width",a).attr("height",n),Z(t,c),t.intersect=function(u){return G.rect(t,u)},s}f(Zg,"text");var cS=f((e,t,r,i,s,o)=>`M${e},${t}
|
|
231
|
+
a${s},${o} 0,0,1 0,${-i}
|
|
232
|
+
l${r},0
|
|
233
|
+
a${s},${o} 0,0,1 0,${i}
|
|
234
|
+
M${r},${-i}
|
|
235
|
+
a${s},${o} 0,0,0 0,${i}
|
|
236
|
+
l${-r},0`,"createCylinderPathD"),uS=f((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),dS=f((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),ic=5,sc=10;async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2;if(t.width||t.height){const g=t.height??0;t.height=(t.height??0)-o,t.height<ic&&(t.height=ic);const C=g/2/(2.5+g/50);t.width=(t.width??0)-o-C*3,t.width<sc&&(t.width=sc)}const{shapeSvg:a,bbox:n,label:l}=await tt(e,t,J(t)),h=(t.height?t.height:n.height)+o,c=h/2,u=c/(2.5+h/50),p=(t.width?t.width:n.width)+u+o,{cssStyles:d}=t;let y;if(t.look==="handDrawn"){const g=X.svg(a),m=uS(0,0,p,h,u,c),C=dS(0,0,p,h,u,c),b=g.path(m,j(t,{})),k=g.path(C,j(t,{fill:"none"}));y=a.insert(()=>k,":first-child"),y=a.insert(()=>b,":first-child"),y.attr("class","basic label-container"),d&&y.attr("style",d)}else{const g=cS(0,0,p,h,u,c);y=a.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",$t(d)).attr("style",i),y.attr("class","basic label-container outer-path"),d&&y.selectAll("path").attr("style",d),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",u),y.attr("transform",`translate(${-p/2}, ${h/2} )`),l.attr("transform",`translate(${-(n.width/2)-u-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Z(t,y),t.intersect=function(g){const m=G.rect(t,g),C=m.y-(t.y??0);if(c!=0&&(Math.abs(C)<(t.height??0)/2||Math.abs(C)==(t.height??0)/2&&Math.abs(m.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-C*C/(c*c));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,g.x-(t.x??0)>0&&(b=-b),m.x+=b}return m},a}f(Kg,"tiltedCylinder");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=((t==null?void 0:t.height)??l.height)+o,c=((t==null?void 0:t.width)??l.width)+a,u=[{x:-3*h/6,y:0},{x:c+3*h/6,y:0},{x:c,y:-h},{x:0,y:-h}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const y=X.svg(n),g=j(t,{}),m=ct(u),C=y.path(m,g);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),d&&p.attr("style",d)}else p=Ze(n,c,h,u);return i&&p.attr("style",i),t.width=c,t.height=h,Z(t,p),t.intersect=function(y){return G.polygon(t,u,y)},n}f(Qg,"trapezoid");async function Jg(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:h,bbox:c}=await tt(e,t,J(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+o*2,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+a*2,{cssStyles:d}=t,y=X.svg(h),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-u/2*.8,y:-p/2},{x:u/2*.8,y:-p/2},{x:u/2,y:-p/2*.6},{x:u/2,y:p/2},{x:-u/2,y:p/2},{x:-u/2,y:-p/2*.6}],C=ct(m),b=y.path(C,g),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Z(t,k),t.intersect=function(S){return G.polygon(t,m,S)},h}f(Jg,"trapezoidalPentagon");var oc=10,ac=10;async function tm(e,t){var S;const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-o)/2,t.width<ac&&(t.width=ac),t.height=(t==null?void 0:t.height)??0,t.height<oc&&(t.height=oc));const{shapeSvg:a,bbox:n,label:l}=await tt(e,t,J(t)),h=Ve((S=dt().flowchart)==null?void 0:S.htmlLabels),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+o,u=t!=null&&t.height?t==null?void 0:t.height:c+n.height,p=u,d=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-u}],{cssStyles:y}=t,g=X.svg(a),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=ct(d),b=g.path(C,m),k=a.insert(()=>b,":first-child").attr("transform",`translate(${-u/2}, ${u/2})`).attr("class","outer-path");return y&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",y),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=u,Z(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${u/2-(n.height+(t.padding??0)/(h?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(w){return D.info("Triangle intersect",t,d,w),G.polygon(t,d,w)},a}f(tm,"triangle");async function em(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:h,label:c}=await tt(e,t,J(t)),u=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(o??0)*2,p=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(a??0)*2,d=t.look==="neo"?p/4:p/8,y=p+(n?d:-d),{cssStyles:g}=t,C=14-u,b=C>0?C/2:0,k=X.svg(l),S=j(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=[{x:-u/2-b,y:y/2},...or(-u/2-b,y/2,u/2+b,y/2,d,.8),{x:u/2+b,y:-y/2},{x:-u/2-b,y:-y/2}],_=ct(w),F=k.path(_,S),L=l.insert(()=>F,":first-child");return L.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(0,${-d/2})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-d-(h.y-(h.top??0))})`),Z(t,L),t.intersect=function(q){return G.polygon(t,w,q)},l}f(em,"waveEdgedRectangle");async function rm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const S=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-S*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await tt(e,t,J(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a,u=c/8,p=c+u*2,{cssStyles:d}=t,y=X.svg(n),g=j(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-h/2,y:p/2},...or(-h/2,p/2,h/2,p/2,u,1),{x:h/2,y:-p/2},...or(h/2,-p/2,-h/2,-p/2,u,-1)],C=ct(m),b=y.path(C,g),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Z(t,k),t.intersect=function(S){return G.polygon(t,m,S)},n}f(rm,"waveRectangle");var Tt=10;async function im(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-Tt,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-Tt,10));const{shapeSvg:a,bbox:n,label:l}=await tt(e,t,J(t)),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+Tt,c=(t!=null&&t.height?t==null?void 0:t.height:n.height)+o*2+Tt,u=h-Tt,p=c-Tt,d=-u/2,y=-p/2,{cssStyles:g}=t,m=X.svg(a),C=j(t,{}),b=[{x:d-Tt,y:y-Tt},{x:d-Tt,y:y+p},{x:d+u,y:y+p},{x:d+u,y:y-Tt}],k=`M${d-Tt},${y-Tt} L${d+u},${y-Tt} L${d+u},${y+p} L${d-Tt},${y+p} L${d-Tt},${y-Tt}
|
|
237
|
+
M${d-Tt},${y} L${d+u},${y}
|
|
238
|
+
M${d},${y-Tt} L${d},${y+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=m.path(k,C),w=a.insert(()=>S,":first-child");return w.attr("transform",`translate(${Tt/2}, ${Tt/2})`),w.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+Tt/2-(n.x-(n.left??0))}, ${-(n.height/2)+Tt/2-(n.y-(n.top??0))})`),Z(t,w),t.intersect=function(_){return G.polygon(t,b,_)},a}f(im,"windowPane");var nc=new Set(["redux-color","redux-dark-color"]),pS=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function xl(e,t){var ut,ce,yt,Ke;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=bt(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:st}=bt(),{background:ot}=st,kt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${ot}`]};await xl(e,kt)}const h=bt();t.useHtmlLabels=h.htmlLabels;let c=((ut=h.er)==null?void 0:ut.diagramPadding)??10,u=((ce=h.er)==null?void 0:ce.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:y}=V(t);if(r.attributes.length===0&&t.label){const st={rx:0,ry:0,labelPaddingX:c,labelPaddingY:c*1.5};Oe(t.label,h)+st.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const ot=await bi(e,t,st);if(i!=null&&nc.has(i)){const kt=r.colorIndex??0;ot.attr("data-color-id",`color-${kt%l.length}`)}if(!Ve(h.htmlLabels)){const kt=ot.select("text"),Ot=(yt=kt.node())==null?void 0:yt.getBBox();kt.attr("transform",`translate(${-Ot.width/2}, 0)`)}return ot}h.htmlLabels||(c*=1.25,u*=1.25);let g=J(t);g||(g="node default");const m=e.insert("g").attr("class",g).attr("id",t.domId||t.id),C=await zr(m,t.label??"",h,0,0,["name"],d);C.height+=u;let b=0;const k=[],S=[];let w=0,_=0,F=0,L=0,q=!0,M=!0;for(const st of r.attributes){const ot=await zr(m,st.type,h,0,b,["attribute-type"],d);w=Math.max(w,ot.width+c);const kt=await zr(m,st.name,h,0,b,["attribute-name"],d);_=Math.max(_,kt.width+c);const Ot=await zr(m,st.keys.join(),h,0,b,["attribute-keys"],d);F=Math.max(F,Ot.width+c);const we=await zr(m,st.comment,h,0,b,["attribute-comment"],d);L=Math.max(L,we.width+c);const ue=Math.max(ot.height,kt.height,Ot.height,we.height)+u;S.push({yOffset:b,rowHeight:ue}),b+=ue}let $=4;F<=c&&(q=!1,F=0,$--),L<=c&&(M=!1,L=0,$--);const H=m.node().getBBox();if(C.width+c*2-(w+_+F+L)>0){const st=C.width+c*2-(w+_+F+L);w+=st/$,_+=st/$,F>0&&(F+=st/$),L>0&&(L+=st/$)}const N=w+_+F+L,I=X.svg(m),z=j(t,{});t.look!=="handDrawn"&&(z.roughness=0,z.fillStyle="solid");let P=0;S.length>0&&(P=S.reduce((st,ot)=>st+((ot==null?void 0:ot.rowHeight)??0),0));const W=Math.max(H.width+c*2,(t==null?void 0:t.width)||0,N),R=Math.max((P??0)+C.height,(t==null?void 0:t.height)||0),B=-W/2,U=-R/2;if(m.selectAll("g:not(:first-child)").each((st,ot,kt)=>{const Ot=nt(kt[ot]),we=Ot.attr("transform");let ue=0,de=0;if(we){const pe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(we);pe&&(ue=parseFloat(pe[1]),de=parseFloat(pe[2]),Ot.attr("class").includes("attribute-name")?ue+=w:Ot.attr("class").includes("attribute-keys")?ue+=w+_:Ot.attr("class").includes("attribute-comment")&&(ue+=w+_+F))}Ot.attr("transform",`translate(${B+c/2+ue}, ${de+U+C.height+u/2})`)}),m.select(".name").attr("transform","translate("+-C.width/2+", "+(U+u/2)+")"),i!=null&&nc.has(i)){const st=r.colorIndex??0;m.attr("data-color-id",`color-${st%l.length}`)}const At=I.rectangle(B,U,W,R,z),Gt=m.insert(()=>At,":first-child").attr("class","outer-path").attr("style",p.join(""));k.push(0);for(const[st,ot]of S.entries()){const Ot=(st+1)%2===0&&ot.yOffset!==0,we=I.rectangle(B,C.height+U+(ot==null?void 0:ot.yOffset),W,ot==null?void 0:ot.rowHeight,{...z,fill:Ot?o:a,stroke:n});m.insert(()=>we,"g.label").attr("style",p.join("")).attr("class",`row-rect-${Ot?"even":"odd"}`)}const Rt=1e-4;let lt=Wr(B,C.height+U,W+B,C.height+U,Rt),wt=I.polygon(lt.map(st=>[st.x,st.y]),z);if(m.insert(()=>wt).attr("class","divider"),lt=Wr(w+B,C.height+U,w+B,R+U,Rt),wt=I.polygon(lt.map(st=>[st.x,st.y]),z),m.insert(()=>wt).attr("class","divider"),q){const st=w+_+B;lt=Wr(st,C.height+U,st,R+U,Rt),wt=I.polygon(lt.map(ot=>[ot.x,ot.y]),z),m.insert(()=>wt).attr("class","divider")}if(M){const st=w+_+F+B;lt=Wr(st,C.height+U,st,R+U,Rt),wt=I.polygon(lt.map(ot=>[ot.x,ot.y]),z),m.insert(()=>wt).attr("class","divider")}for(const st of k){const ot=C.height+U+st;lt=Wr(B,ot,W+B,ot,Rt),wt=I.polygon(lt.map(kt=>[kt.x,kt.y]),z),m.insert(()=>wt).attr("class","divider")}if(Z(t,Gt),y&&t.look!=="handDrawn")if(i!=null&&pS.has(i))m.selectAll("path").attr("style",y);else{const st=y.split(";"),ot=(Ke=st==null?void 0:st.filter(kt=>kt.includes("stroke")))==null?void 0:Ke.map(kt=>`${kt}`).join("; ");m.selectAll("path").attr("style",ot??""),m.selectAll(".row-rect-even path").attr("style",y)}return t.intersect=function(st){return G.rect(t,st)},m}f(xl,"erBox");async function zr(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==xa(t)&&(t=xa(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Re(n,t,{width:Oe(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let c=l.children[0];for(c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">");c.childNodes[0];)c=c.childNodes[0],c.textContent=c.textContent.replaceAll("<","<").replaceAll(">",">")}let h=l.getBBox();if(Ve(r.htmlLabels)){const c=l.children[0];c.style.textAlign="start";const u=nt(l);h=c.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}return h}f(zr,"addText");function Wr(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(Wr,"lineToPolygon");async function sm(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",J(t)).attr("id",t.domId||t.id);let n=null,l=null,h=null,c=null,u=0,p=0,d=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await qi(n,{text:`«${b}»`},0),u=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await qi(l,t,0,["font-weight: bolder"]);const y=l.node().getBBox();p=y.height,h=a.insert("g").attr("class","members-group text");let g=0;for(const b of t.members){const k=await qi(h,b,g,[b.parseClassifier()]);g+=k+o}d=h.node().getBBox().height,d<=0&&(d=s/2),c=a.insert("g").attr("class","methods-group text");let m=0;for(const b of t.methods){const k=await qi(c,b,m,[b.parseClassifier()]);m+=k+o}let C=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-y.width/2}, ${u})`),C=a.node().getBBox(),h.attr("transform",`translate(0, ${u+p+s*2})`),C=a.node().getBBox(),c.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),C=a.node().getBBox(),{shapeSvg:a,bbox:C}}f(sm,"textHelper");async function qi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=bt();let a="useHtmlLabels"in t?t.useHtmlLabels:Ve(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),li(n)&&(a=!0);const l=await Re(s,Bn(ir(n)),{width:Oe(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let h,c=1;if(a){const u=l.children[0],p=nt(l);c=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(c+=u.innerHTML.split("<mrow>").length-1);const d=u.getElementsByTagName("img");if(d){const y=n.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...d].map(g=>new Promise(m=>{function C(){var b;if(g.style.display="flex",g.style.flexDirection="column",y){const k=((b=o.fontSize)==null?void 0:b.toString())??window.getComputedStyle(document.body).fontSize,w=parseInt(k,10)*5+"px";g.style.minWidth=w,g.style.maxWidth=w}else g.style.width="100%";m(g)}f(C,"setupImage"),setTimeout(()=>{g.complete&&C()}),g.addEventListener("error",C),g.addEventListener("load",C)})))}h=u.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{i.includes("font-weight: bolder")&&nt(l).selectAll("tspan").attr("font-weight",""),c=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),h=l.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*c)+r)+")"),h.height}f(qi,"addText");async function om(e,t){var I,z;const r=dt(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??Ve(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:h,bbox:c}=await sm(e,t,r,n,a),{labelStyles:u,nodeStyles:p}=V(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((I=l.styles)==null?void 0:I.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const y=l.members.length===0&&l.methods.length===0&&!((z=r.class)!=null&&z.hideEmptyMembersBox),g=X.svg(h),m=j(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const C=Math.max(t.width??0,c.width);let b=Math.max(t.height??0,c.height);const k=(t.height??0)>c.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const S=-C/2,w=-b/2;let _=y?o*2:l.members.length===0&&l.methods.length===0?-o:0;k&&(_=o*2);const F=g.rectangle(S-o,w-o-(y?o:l.members.length===0&&l.methods.length===0?-o/2:0),C+2*o,b+2*o+_,m),L=h.insert(()=>F,":first-child");L.attr("class","basic label-container outer-path");const q=L.node().getBBox(),M=h.select(".annotation-group").node().getBBox().height-(y?o/2:0)||0,$=h.select(".label-group").node().getBBox().height-(y?o/2:0)||0,H=h.select(".members-group").node().getBBox().height-(y?o/2:0)||0,N=(M+$+w+o-(w-o-(y?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(h.selectAll(".text").each((P,W,R)=>{var lt,wt;const B=nt(R[W]),U=B.attr("transform");let At=0;if(U){const ce=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(U);ce&&(At=parseFloat(ce[2]))}let Gt=At+w+o-(y?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(B.attr("class").includes("methods-group")){const ut=Math.max(H,a/2);k?Gt=Math.max(N,M+$+ut+w+a*2+o)+a*2:Gt=M+$+ut+w+a*4+o}l.members.length===0&&l.methods.length===0&&((lt=r.class)!=null&<.hideEmptyMembersBox)&&(l.annotations.length>0?Gt=At-a:Gt=At),n||(Gt-=4);let Rt=S;(B.attr("class").includes("label-group")||B.attr("class").includes("annotation-group"))&&(Rt=-((wt=B.node())==null?void 0:wt.getBBox().width)/2||0,h.selectAll("text").each(function(ut,ce,yt){window.getComputedStyle(yt[ce]).textAnchor==="middle"&&(Rt=0)})),B.attr("transform",`translate(${Rt}, ${Gt})`)}),l.members.length>0||l.methods.length>0||y){const P=M+$+w+o,W=g.line(q.x,P,q.x+q.width,P+.001,m);h.insert(()=>W).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(y||l.members.length>0||l.methods.length>0){const P=M+$+H+w+a*2+o,W=g.line(q.x,k?Math.max(N,P):P,q.x+q.width,(k?Math.max(N,P):P)+.001,m);h.insert(()=>W).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&h.selectAll("path").attr("style",d),L.select(":nth-child(2)").attr("style",d),h.selectAll(".divider").select("path").attr("style",d),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",d),!n){const P=RegExp(/color\s*:\s*([^;]*)/),W=P.exec(d);if(W){const R=W[0].replace("color","fill");h.selectAll("tspan").attr("style",R)}else if(u){const R=P.exec(u);if(R){const B=R[0].replace("color","fill");h.selectAll("tspan").attr("style",B)}}}return Z(t,L),t.intersect=function(P){return G.rect(t,P)},h}f(om,"classBox");async function am(e,t){var q,M;const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,h=J(t),{themeVariables:c}=dt(),{borderColorArray:u,requirementEdgeLabelBackground:p}=c,d=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let y;l?y=await Ee(d,`<<${s.type}>>`,0,t.labelStyle):y=await Ee(d,"<<Element>>",0,t.labelStyle);let g=y;const m=await Ee(d,s.name,g,t.labelStyle+"; font-weight: bold;");if(g+=m+n,l){const $=await Ee(d,`${s.requirementId?`ID: ${s.requirementId}`:""}`,g,t.labelStyle);g+=$;const H=await Ee(d,`${s.text?`Text: ${s.text}`:""}`,g,t.labelStyle);g+=H;const N=await Ee(d,`${s.risk?`Risk: ${s.risk}`:""}`,g,t.labelStyle);g+=N,await Ee(d,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,g,t.labelStyle)}else{const $=await Ee(d,`${o.type?`Type: ${o.type}`:""}`,g,t.labelStyle);g+=$,await Ee(d,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,g,t.labelStyle)}const C=(((q=d.node())==null?void 0:q.getBBox().width)??200)+a,b=(((M=d.node())==null?void 0:M.getBBox().height)??200)+a,k=-C/2,S=-b/2,w=X.svg(d),_=j(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const F=w.rectangle(k,S,C,b,_),L=d.insert(()=>F,":first-child");if(L.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const $=t.colorIndex??0;d.attr("data-color-id",`color-${$%u.length}`)}if(d.selectAll(".label").each(($,H,N)=>{const I=nt(N[H]),z=I.attr("transform");let P=0,W=0;if(z){const At=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(z);At&&(P=parseFloat(At[1]),W=parseFloat(At[2]))}const R=W-b/2;let B=k+a/2;(H===0||H===1)&&(B=P),I.attr("transform",`translate(${B}, ${R+a})`)}),g>y+m+n){const $=S+y+m+n;let H;if(t.look==="neo"){const z=[[k,$],[k+C,$],[k+C,$+.001],[k,$+.001]];H=w.polygon(z,_)}else H=w.line(k,$,k+C,$,_);d.insert(()=>H).attr("class","divider")}return Z(t,L),t.intersect=function($){return G.rect(t,$)},i&&t.look!=="handDrawn"&&(p||u!=null&&u.length)&&d.selectAll("path").attr("style",i),d}f(am,"requirementBox");async function Ee(e,t,r,i=""){if(t==="")return 0;const s=e.insert("g").attr("class","label").attr("style",i),o=dt(),a=o.htmlLabels??!0,n=await Re(s,Bn(ir(t)),{width:Oe(t,o)+50,classes:"markdown-node-label",useHtmlLabels:a,style:i},o);let l;if(a){const h=n.children[0],c=nt(n);l=h.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)}else{const h=n.children[0];for(const c of h.children)i&&c.setAttribute("style",i);l=n.getBBox(),l.height+=6}return s.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}f(Ee,"addText");var fS=f(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function nm(e,t,{config:r}){var H,N;const{labelStyles:i,nodeStyles:s}=V(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await tt(e,t,J(t)),c=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((H=r==null?void 0:r.kanban)!=null&&H.ticketBaseUrl)&&(u=(N=r==null?void 0:r.kanban)==null?void 0:N.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let y,g;p?{label:y,bbox:g}=await da(p,"ticket"in t&&t.ticket||"",d):{label:y,bbox:g}=await da(n,"ticket"in t&&t.ticket||"",d);const{label:m,bbox:C}=await da(n,"assigned"in t&&t.assigned||"",d);t.width=a;const b=10,k=(t==null?void 0:t.width)||0,S=Math.max(g.height,C.height)/2,w=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+S,_=-k/2,F=-w/2;h.attr("transform","translate("+(c-k/2)+", "+(-S-l.height/2)+")"),y.attr("transform","translate("+(c-k/2)+", "+(-S+l.height/2)+")"),m.attr("transform","translate("+(c+k/2-C.width-2*o)+", "+(-S+l.height/2)+")");let L;const{rx:q,ry:M}=t,{cssStyles:$}=t;if(t.look==="handDrawn"){const I=X.svg(n),z=j(t,{}),P=q||M?I.path(ar(_,F,k,w,q||0),z):I.rectangle(_,F,k,w,z);L=n.insert(()=>P,":first-child"),L.attr("class","basic label-container").attr("style",$||null)}else{L=n.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",s).attr("rx",q??5).attr("ry",M??5).attr("x",_).attr("y",F).attr("width",k).attr("height",w);const I="priority"in t&&t.priority;if(I){const z=n.append("line"),P=_+2,W=F+Math.floor((q??0)/2),R=F+w-Math.floor((q??0)/2);z.attr("x1",P).attr("y1",W).attr("x2",P).attr("y2",R).attr("stroke-width","4").attr("stroke",fS(I))}}return Z(t,L),t.height=w,t.intersect=function(I){return G.rect(t,I)},n}f(nm,"kanbanItem");async function lm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await tt(e,t,J(t)),l=o.width+10*a,h=o.height+8*a,c=.15*l,{cssStyles:u}=t,p=o.width+20,d=o.height+20,y=Math.max(l,p),g=Math.max(h,d);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let m;const C=`M0 0
|
|
239
|
+
a${c},${c} 1 0,0 ${y*.25},${-1*g*.1}
|
|
240
|
+
a${c},${c} 1 0,0 ${y*.25},0
|
|
241
|
+
a${c},${c} 1 0,0 ${y*.25},0
|
|
242
|
+
a${c},${c} 1 0,0 ${y*.25},${g*.1}
|
|
243
|
+
|
|
244
|
+
a${c},${c} 1 0,0 ${y*.15},${g*.33}
|
|
245
|
+
a${c*.8},${c*.8} 1 0,0 0,${g*.34}
|
|
246
|
+
a${c},${c} 1 0,0 ${-1*y*.15},${g*.33}
|
|
247
|
+
|
|
248
|
+
a${c},${c} 1 0,0 ${-1*y*.25},${g*.15}
|
|
249
|
+
a${c},${c} 1 0,0 ${-1*y*.25},0
|
|
250
|
+
a${c},${c} 1 0,0 ${-1*y*.25},0
|
|
251
|
+
a${c},${c} 1 0,0 ${-1*y*.25},${-1*g*.15}
|
|
252
|
+
|
|
253
|
+
a${c},${c} 1 0,0 ${-1*y*.1},${-1*g*.33}
|
|
254
|
+
a${c*.8},${c*.8} 1 0,0 0,${-1*g*.34}
|
|
255
|
+
a${c},${c} 1 0,0 ${y*.1},${-1*g*.33}
|
|
256
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=X.svg(s),k=j(t,{}),S=b.path(C,k);m=s.insert(()=>S,":first-child"),m.attr("class","basic label-container").attr("style",$t(u))}else m=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return m.attr("transform",`translate(${-y/2}, ${-g/2})`),Z(t,m),t.calcIntersect=function(b,k){return G.rect(b,k)},t.intersect=function(b){return D.info("Bang intersect",t,b),G.rect(t,b)},s}f(lm,"bang");async function hm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await tt(e,t,J(t)),l=o.width+2*a,h=o.height+2*a,c=.15*l,u=.25*l,p=.35*l,d=.2*l,{cssStyles:y}=t;let g;const m=`M0 0
|
|
257
|
+
a${c},${c} 0 0,1 ${l*.25},${-1*l*.1}
|
|
258
|
+
a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}
|
|
259
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
260
|
+
|
|
261
|
+
a${c},${c} 1 0,1 ${l*.15},${h*.35}
|
|
262
|
+
a${d},${d} 1 0,1 ${-1*l*.15},${h*.65}
|
|
263
|
+
|
|
264
|
+
a${u},${c} 1 0,1 ${-1*l*.25},${l*.15}
|
|
265
|
+
a${p},${p} 1 0,1 ${-1*l*.5},0
|
|
266
|
+
a${c},${c} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
267
|
+
|
|
268
|
+
a${c},${c} 1 0,1 ${-1*l*.1},${-1*h*.35}
|
|
269
|
+
a${d},${d} 1 0,1 ${l*.1},${-1*h*.65}
|
|
270
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=X.svg(s),b=j(t,{}),k=C.path(m,b);g=s.insert(()=>k,":first-child"),g.attr("class","basic label-container").attr("style",$t(y))}else g=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",m);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),g.attr("transform",`translate(${-l/2}, ${-h/2})`),Z(t,g),t.calcIntersect=function(C,b){return G.rect(C,b)},t.intersect=function(C){return D.info("Cloud intersect",t,C),G.rect(t,C)},s}f(hm,"cloud");async function cm(e,t){const{labelStyles:r,nodeStyles:i}=V(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await tt(e,t,J(t)),l=o.width+8*a,h=o.height+2*a,c=5,u=t.look==="neo"?`
|
|
271
|
+
M${-l/2} ${h/2-c}
|
|
272
|
+
v${-h+2*c}
|
|
273
|
+
q0,-${c} ${c},-${c}
|
|
274
|
+
h${l-2*c}
|
|
275
|
+
q${c},0 ${c},${c}
|
|
276
|
+
v${h-c}
|
|
277
|
+
H${-l/2}
|
|
278
|
+
Z
|
|
279
|
+
`:`
|
|
280
|
+
M${-l/2} ${h/2-c}
|
|
281
|
+
v${-h+2*c}
|
|
282
|
+
q0,-${c} ${c},-${c}
|
|
283
|
+
h${l-2*c}
|
|
284
|
+
q${c},0 ${c},${c}
|
|
285
|
+
v${h-2*c}
|
|
286
|
+
q0,${c} ${-c},${c}
|
|
287
|
+
h${-(l-2*c)}
|
|
288
|
+
q${-c},0 ${-c},${-c}
|
|
289
|
+
Z
|
|
290
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",h/2).attr("x2",l/2).attr("y2",h/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),Z(t,p),t.calcIntersect=function(d,y){return G.rect(d,y)},t.intersect=function(d){return G.rect(t,d)},s}f(cm,"defaultMindmapNode");async function um(e,t){const r={padding:t.padding??0};return Cl(e,t,r)}f(um,"mindmapCircle");var gS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Wg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:qg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Hg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Xg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ug},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:dg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Cl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:lm},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:hm},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Dg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:xg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Fg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Lg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Qg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Bg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:fg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ig},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Ng},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Gg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Yg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:yg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:bg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ng},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:lg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:hg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Ag},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:em},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:Cg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Kg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Eg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:cg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:pg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tm},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:im},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:gg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Jg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:mg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:zg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Og},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$g},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:rg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:ag},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:jg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:rm},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Pg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Mg}],mS=f(()=>{const t=[...Object.entries({state:Ug,choice:sg,note:Ig,rectWithTitle:Rg,labelRect:vg,iconSquare:wg,iconCircle:Tg,icon:kg,iconRounded:Sg,imageSquare:_g,anchor:tg,kanbanItem:nm,mindmapCircle:um,defaultMindmapNode:cm,classBox:om,erBox:xl,requirementBox:am}),...gS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),dm=mS();function pm(e){return e in dm}f(pm,"isValidShape");var Po=new Map;async function bl(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?dm[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",$t(t.look)),t.tooltip&&s.attr("title",t.tooltip),Po.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(bl,"insertNode");var yS=f((e,t)=>{Po.set(t.id,e)},"setNodeElem"),CS=f(()=>{Po.clear()},"clear"),xS=f(e=>{const t=Po.get(e.id);D.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),bS=f((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&lc(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&lc(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),kS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},TS=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],lc=f((e,t,r,i,s,o,a=!1,n)=>{var y;const l=kS[r],h=l&&TS.includes(l.type);if(!l){D.warn(`Unknown arrow type: ${r}`);return}const c=l.type,d=`${s}_${o}-${c}${t==="start"?"Start":"End"}${a&&h?"-margin":""}`;if(n&&n.trim()!==""){const g=n.replace(/[^\dA-Za-z]/g,"_"),m=`${d}_${g}`;if(!document.getElementById(m)){const C=document.getElementById(d);if(C){const b=C.cloneNode(!0);b.id=m,b.querySelectorAll("path, circle, line").forEach(S=>{S.setAttribute("stroke",n),l.fill&&S.setAttribute("fill",n)}),(y=C.parentNode)==null||y.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${m})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),SS=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=dt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),po=new Map,Pt=new Map,wS=f(()=>{po.clear(),Pt.clear()},"clear"),Ei=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),fm=f(async(e,t)=>{const r=dt();let i=Ut(r);const{labelStyles:s}=V(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",h=await Re(e,t.label,{style:Ei(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(h),D.info("abc82",t,t.labelType);let c=h.getBBox(),u=c;if(i){const d=h.children[0],y=nt(h);c=d.getBoundingClientRect(),u=c,y.attr("width",c.width),y.attr("height",c.height)}else{const d=nt(h).select("text").node();d&&typeof d.getBBox=="function"&&(u=d.getBBox())}a.attr("transform",Nr(u,i)),po.set(t.id,o),t.width=c.width,t.height=c.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await Je(y,t.startLabelLeft,Ei(t.labelStyle)||"",!1,!1);p=g;let m=g.getBBox();if(i){const C=g.children[0],b=nt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",Nr(m,i)),Pt.get(t.id)||Pt.set(t.id,{}),Pt.get(t.id).startLeft=d,Ni(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await Je(y,t.startLabelRight,Ei(t.labelStyle)||"",!1,!1);p=g;let m=g.getBBox();if(i){const C=g.children[0],b=nt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",Nr(m,i)),Pt.get(t.id)||Pt.set(t.id,{}),Pt.get(t.id).startRight=d,Ni(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await Je(d,t.endLabelLeft,Ei(t.labelStyle)||"",!1,!1);p=g;let m=g.getBBox();if(i){const C=g.children[0],b=nt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",Nr(m,i)),Pt.get(t.id)||Pt.set(t.id,{}),Pt.get(t.id).endLeft=d,Ni(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),y=d.insert("g").attr("class","inner"),g=await Je(d,t.endLabelRight,Ei(t.labelStyle)||"",!1,!1);p=g;let m=g.getBBox();if(i){const C=g.children[0],b=nt(g);m=C.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}y.attr("transform",Nr(m,i)),Pt.get(t.id)||Pt.set(t.id,{}),Pt.get(t.id).endRight=d,Ni(p,t.endLabelRight)}return h},"insertEdgeLabel");function Ni(e,t){Ut(dt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Ni,"setTerminalWidth");var gm=f((e,t)=>{D.debug("Moving label abc88 ",e.id,e.label,po.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:s}=Eo(i);if(e.label){const o=po.get(e.id);let a=e.x,n=e.y;if(r){const l=ae.calcLabelPosition(r);D.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=Pt.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=Pt.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=Pt.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=Pt.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=ae.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),_S=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),BS=f((e,t,r)=>{D.debug(`intersection calc abc89:
|
|
291
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
292
|
+
insidePoint : ${JSON.stringify(r)}
|
|
293
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,h=Math.abs(t.y-r.y),c=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=c*u/h;const p={x:r.x<t.x?r.x+n:r.x-c+n,y:r.y<t.y?r.y+h-u:r.y-h+u};return n===0&&(p.x=t.x,p.y=t.y),c===0&&(p.x=t.x),h===0&&(p.y=t.y),D.debug(`abc89 top/bottom calc, Q ${h}, q ${u}, R ${c}, r ${n}`,p),p}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let u=h*n/c,p=r.x<t.x?r.x+c-n:r.x-c+n,d=r.y<t.y?r.y+u:r.y-u;return D.debug(`sides calc abc89, Q ${h}, q ${u}, R ${c}, r ${n}`,{_x:p,_y:d}),n===0&&(p=t.x,d=t.y),c===0&&(p=t.x),h===0&&(d=t.y),{x:p,y:d}}},"intersection"),hc=f((e,t)=>{D.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(D.info("abc88 checking point",o,t),!_S(t,o)&&!s){const a=BS(t,i,o);D.debug("abc88 inside",o,i,a),D.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?D.warn("abc88 no intersect",a,r):r.push(a),s=!0}else D.warn("abc88 outside",o,i),i=o,s||r.push(o)}),D.debug("returning points",r),r},"cutPathAtIntersect");function mm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(mm,"extractCornerPoints");var cc=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),vS=f(function(e){const{cornerPointPositions:t}=mm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=cc(s,a,5),l=cc(o,a,5),h=l.x-n.x,c=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let p={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){D.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const d=5;a.x===n.x?p={x:h<0?n.x-d+u:n.x+d-u,y:c<0?n.y-u:n.y+u}:p={x:h<0?n.x-u:n.x+u,y:c<0?n.y-d+u:n.y+d-u}}else D.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),LS=f((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Array(n).fill(`${s} ${o}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),ym=f(function(e,t,r,i,s,o,a,n=!1){var W;if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l}=dt();let h=t.points,c=!1;const u=s;var p=o;const d=[];for(const R in t.cssCompiledStyles)ol(R)||d.push(t.cssCompiledStyles[R]);D.debug("UIO intersect check",t.points,p.x,u.x),p.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),D.debug("Last point UIO",t.start,"-->",t.end,h[h.length-1],p,p.intersect(h[h.length-1])),h.push(p.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(D.info("to cluster abc88",r.get(t.toCluster)),h=hc(t.points,r.get(t.toCluster).node),c=!0),t.fromCluster&&(D.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=hc(h.reverse(),r.get(t.fromCluster).node).reverse(),c=!0);let g=h.filter(R=>!Number.isNaN(R.y));const m=SS(t.curve);m!=="rounded"&&(g=vS(g));let C=Ui;switch(m){case"linear":C=Ui;break;case"basis":C=js;break;case"cardinal":C=Fu;break;case"bumpX":C=wu;break;case"bumpY":C=_u;break;case"catmullRom":C=Eu;break;case"monotoneX":C=Pu;break;case"monotoneY":C=Ru;break;case"natural":C=Nu;break;case"step":C=zu;break;case"stepAfter":C=Hu;break;case"stepBefore":C=Wu;break;case"rounded":C=Ui;break;default:C=js}const{x:b,y:k}=Lp(t),S=Tu().x(b).y(k).curve(C);let w;switch(t.thickness){case"normal":w="edge-thickness-normal";break;case"thick":w="edge-thickness-thick";break;case"invisible":w="edge-thickness-invisible";break;default:w="edge-thickness-normal"}switch(t.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed";break;default:w+=" edge-pattern-solid"}let _,F=m==="rounded"?Cm(xm(g,t),5):S(g);const L=Array.isArray(t.style)?t.style:[t.style];let q=L.find(R=>R==null?void 0:R.startsWith("stroke:")),M="";t.animate&&(M="edge-animation-fast"),t.animation&&(M="edge-animation-"+t.animation);let $=!1;if(t.look==="handDrawn"){const R=X.svg(e);Object.assign([],g);const B=R.path(F,{roughness:.3,seed:l});w+=" transition",_=nt(B).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",L?L.reduce((At,Gt)=>At+";"+Gt,""):"");let U=_.attr("d");_.attr("d",U),e.node().appendChild(_.node())}else{const R=d.join(";"),B=L?L.reduce((wt,ut)=>wt+ut+";",""):"",U=(R?R+";"+B+";":B)+";"+(L?L.reduce((wt,ut)=>wt+";"+ut,""):"");_=e.append("path").attr("d",F).attr("id",`${a}-${t.id}`).attr("class"," "+w+(t.classes?" "+t.classes:"")+(M?" "+M:"")).attr("style",U),q=(W=U.match(/stroke:([^;]+)/))==null?void 0:W[1],$=t.animate===!0||!!t.animation||R.includes("animation");const At=_.node(),Gt=typeof At.getTotalLength=="function"?At.getTotalLength():0,Rt=_h[t.arrowTypeStart]||0,lt=_h[t.arrowTypeEnd]||0;if(t.look==="neo"&&!$){const ut=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?LS(Gt,Rt,lt):`0 ${Rt} ${Gt-Rt-lt} ${lt}`}; stroke-dashoffset: 0;`;_.attr("style",ut+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",t.id),_.attr("data-points",y),_.attr("data-look",$t(t.look)),t.showPoints&&g.forEach(R=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",R.x).attr("cy",R.y)});let H="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(H=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,H=H.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),D.info("arrowTypeStart",t.arrowTypeStart),D.info("arrowTypeEnd",t.arrowTypeEnd);const N=!$&&(t==null?void 0:t.look)==="neo";bS(_,t,H,a,i,N,q);const I=Math.floor(h.length/2),z=h[I];ae.isLabelCoordinateInPath(z,_.attr("d"))||(c=!0);let P={};return c&&(P.updatedPath=h),P.originalPath=t.points,P},"insertEdge");function Cm(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const h=a.x-n.x,c=a.y-n.y,u=l.x-a.x,p=l.y-a.y,d=Math.hypot(h,c),y=Math.hypot(u,p);if(d<s||y<s){r+=`L${a.x},${a.y}`;continue}const g=h/d,m=c/d,C=u/y,b=p/y,k=g*C+m*b,S=Math.max(-1,Math.min(1,k)),w=Math.acos(S);if(w<s||Math.abs(Math.PI-w)<s){r+=`L${a.x},${a.y}`;continue}const _=Math.min(t/Math.sin(w/2),d/2,y/2),F=a.x-g*_,L=a.y-m*_,q=a.x+C*_,M=a.y+b*_;r+=`L${F},${L}`,r+=`Q${a.x},${a.y} ${q},${M}`}}return r}f(Cm,"generateRoundedPath");function dn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}f(dn,"calculateDeltaAndAngle");function xm(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Wt[t.arrowTypeStart]){const s=Wt[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=dn(o,a),l=s*Math.cos(n),h=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+h}const i=e.length;if(i>=2&&Wt[t.arrowTypeEnd]){const s=Wt[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=dn(a,o),l=s*Math.cos(n),h=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-h}return r}f(xm,"applyMarkerOffsetsToPoints");var FS=f((e,t,r,i)=>{t.forEach(s=>{QS[s](e,r,i)})},"insertMarkers"),AS=f((e,t,r)=>{D.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),ES=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),MS=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),$S=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),OS=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),IS=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),DS=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),PS=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),RS=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),qS=f((e,t,r)=>{const i=bt(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),NS=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zS=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),WS=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),HS=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),US=f((e,t,r)=>{const i=bt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),YS=f((e,t,r)=>{const i=bt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),GS=f((e,t,r)=>{const i=bt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),XS=f((e,t,r)=>{const i=bt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),jS=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
294
|
+
L20,10
|
|
295
|
+
M20,10
|
|
296
|
+
L0,20`)},"requirement_arrow"),VS=f((e,t,r)=>{const i=bt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
297
|
+
L20,10
|
|
298
|
+
M20,10
|
|
299
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),ZS=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),KS=f((e,t,r)=>{const i=bt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo"),QS={extension:AS,composition:ES,aggregation:MS,dependency:$S,lollipop:OS,point:IS,circle:DS,cross:PS,barb:RS,barbNeo:qS,only_one:NS,zero_or_one:zS,one_or_more:WS,zero_or_more:HS,only_one_neo:US,zero_or_one_neo:YS,one_or_more_neo:GS,zero_or_more_neo:XS,requirement_arrow:jS,requirement_contains:ZS,requirement_arrow_neo:VS,requirement_contains_neo:KS},bm=FS,JS={common:gi,getConfig:bt,insertCluster:Xf,insertEdge:ym,insertEdgeLabel:fm,insertMarkers:bm,insertNode:bl,interpolateToCurve:Qn,labelHelper:tt,log:D,positionEdgeLabel:gm},es={},km=f(e=>{for(const t of e)es[t.name]=t},"registerLayoutLoaders"),tw=f(()=>{km([{name:"dagre",loader:f(async()=>await Promise.resolve().then(()=>require("./dagre-BM42HDAG-CwxJjZ2n.cjs")),"loader")},{name:"cose-bilkent",loader:f(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-Dh6nTopA.cjs")),"loader")}])},"registerDefaultLayoutLoaders");tw();var ew=f(async(e,t)=>{if(!(e.layoutAlgorithm in es))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const c of e.nodes){const u=c.domId||c.id;c.domId=`${e.diagramId}-${u}`}const r=es[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),a){const c=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");c.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),c.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,JS,{algorithm:r.algorithm})},"render"),rw=f((e="",{fallback:t="dagre"}={})=>{if(e in es)return e;if(t in es)return D.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Tm="c4",iw=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),sw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./c4Diagram-AAUBKEIU-Ck5uEnJI.cjs"));return{id:Tm,diagram:e}},"loader"),ow={id:Tm,detector:iw,loader:sw},aw=ow,Sm="flowchart",nw=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),lw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-I6XJVG4X-C45fICr4.cjs"));return{id:Sm,diagram:e}},"loader"),hw={id:Sm,detector:nw,loader:lw},cw=hw,wm="flowchart-v2",uw=f((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),dw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-I6XJVG4X-C45fICr4.cjs"));return{id:wm,diagram:e}},"loader"),pw={id:wm,detector:uw,loader:dw},fw=pw,_m="er",gw=f(e=>/^\s*erDiagram/.test(e),"detector"),mw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./erDiagram-TEJ5UH35-Dyuc5EB6.cjs"));return{id:_m,diagram:e}},"loader"),yw={id:_m,detector:gw,loader:mw},Cw=yw,Bm="gitGraph",xw=f(e=>/^\s*gitGraph/.test(e),"detector"),bw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./gitGraphDiagram-PVQCEYII-rlaY9dfj.cjs"));return{id:Bm,diagram:e}},"loader"),kw={id:Bm,detector:xw,loader:bw},Tw=kw,vm="gantt",Sw=f(e=>/^\s*gantt/.test(e),"detector"),ww=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ganttDiagram-6RSMTGT7-Cxoj6IK8.cjs"));return{id:vm,diagram:e}},"loader"),_w={id:vm,detector:Sw,loader:ww},Bw=_w,Lm="info",vw=f(e=>/^\s*info/.test(e),"detector"),Lw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./infoDiagram-5YYISTIA-zX5rQglQ.cjs"));return{id:Lm,diagram:e}},"loader"),Fw={id:Lm,detector:vw,loader:Lw},Fm="pie",Aw=f(e=>/^\s*pie/.test(e),"detector"),Ew=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./pieDiagram-4H26LBE5-CBGkD8dp.cjs"));return{id:Fm,diagram:e}},"loader"),Mw={id:Fm,detector:Aw,loader:Ew},Am="quadrantChart",$w=f(e=>/^\s*quadrantChart/.test(e),"detector"),Ow=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./quadrantDiagram-W4KKPZXB-D3nCWRjF.cjs"));return{id:Am,diagram:e}},"loader"),Iw={id:Am,detector:$w,loader:Ow},Dw=Iw,Em="xychart",Pw=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Rw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./xychartDiagram-2RQKCTM6-BjeAPKLo.cjs"));return{id:Em,diagram:e}},"loader"),qw={id:Em,detector:Pw,loader:Rw},Nw=qw,Mm="requirement",zw=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Ww=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./requirementDiagram-4Y6WPE33-D2mHlh5i.cjs"));return{id:Mm,diagram:e}},"loader"),Hw={id:Mm,detector:zw,loader:Ww},Uw=Hw,$m="sequence",Yw=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),Gw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sequenceDiagram-3UESZ5HK-CBGalGOV.cjs"));return{id:$m,diagram:e}},"loader"),Xw={id:$m,detector:Yw,loader:Gw},jw=Xw,Om="class",Vw=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),Zw=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-4FO5ZUOK-C4it2xBI.cjs"));return{id:Om,diagram:e}},"loader"),Kw={id:Om,detector:Vw,loader:Zw},Qw=Kw,Im="classDiagram",Jw=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),t_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./classDiagram-v2-Q7XG4LA2-C4it2xBI.cjs"));return{id:Im,diagram:e}},"loader"),e_={id:Im,detector:Jw,loader:t_},r_=e_,Dm="state",i_=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),s_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-AJRCARHV-rNMrAI-A.cjs"));return{id:Dm,diagram:e}},"loader"),o_={id:Dm,detector:i_,loader:s_},a_=o_,Pm="stateDiagram",n_=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),l_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./stateDiagram-v2-BHNVJYJU-LLlFJ1GM.cjs"));return{id:Pm,diagram:e}},"loader"),h_={id:Pm,detector:n_,loader:l_},c_=h_,Rm="journey",u_=f(e=>/^\s*journey/.test(e),"detector"),d_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./journeyDiagram-JHISSGLW-DkdWRF_-.cjs"));return{id:Rm,diagram:e}},"loader"),p_={id:Rm,detector:u_,loader:d_},f_=p_,g_=f((e,t,r)=>{D.debug(`rendering svg for syntax error
|
|
300
|
+
`);const i=Uu(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),bn(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),qm={draw:g_},m_=qm,y_={db:{},renderer:qm,parser:{parse:f(()=>{},"parse")}},C_=y_,Nm="flowchart-elk",x_=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),b_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./flowDiagram-I6XJVG4X-C45fICr4.cjs"));return{id:Nm,diagram:e}},"loader"),k_={id:Nm,detector:x_,loader:b_},T_=k_,zm="timeline",S_=f(e=>/^\s*timeline/.test(e),"detector"),w_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./timeline-definition-PNZ67QCA-Bbuv3uu-.cjs"));return{id:zm,diagram:e}},"loader"),__={id:zm,detector:S_,loader:w_},B_=__,Wm="mindmap",v_=f(e=>/^\s*mindmap/.test(e),"detector"),L_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./mindmap-definition-RKZ34NQL-Cs63oyIX.cjs"));return{id:Wm,diagram:e}},"loader"),F_={id:Wm,detector:v_,loader:L_},A_=F_,Hm="kanban",E_=f(e=>/^\s*kanban/.test(e),"detector"),M_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./kanban-definition-UN3LZRKU-DWipOCsx.cjs"));return{id:Hm,diagram:e}},"loader"),$_={id:Hm,detector:E_,loader:M_},O_=$_,Um="sankey",I_=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),D_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./sankeyDiagram-5OEKKPKP-DL_kXejW.cjs"));return{id:Um,diagram:e}},"loader"),P_={id:Um,detector:I_,loader:D_},R_=P_,Ym="packet",q_=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),N_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-LMA3HP47-BXFSAyNV.cjs"));return{id:Ym,diagram:e}},"loader"),z_={id:Ym,detector:q_,loader:N_},Gm="radar",W_=f(e=>/^\s*radar-beta/.test(e),"detector"),H_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-2AECGRRQ-r7De7taS.cjs"));return{id:Gm,diagram:e}},"loader"),U_={id:Gm,detector:W_,loader:H_},Xm="block",Y_=f(e=>/^\s*block(-beta)?/.test(e),"detector"),G_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./blockDiagram-GPEHLZMM-B5VqovGY.cjs"));return{id:Xm,diagram:e}},"loader"),X_={id:Xm,detector:Y_,loader:G_},j_=X_,jm="treeView",V_=f(e=>/^\s*treeView-beta/.test(e),"detector"),Z_=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-5GNKFQAL-CDiO79WC.cjs"));return{id:jm,diagram:e}},"loader"),K_={id:jm,detector:V_,loader:Z_},Q_=K_,Vm="architecture",J_=f(e=>/^\s*architecture/.test(e),"detector"),tB=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./architectureDiagram-3BPJPVTR-BvjJfAkh.cjs"));return{id:Vm,diagram:e}},"loader"),eB={id:Vm,detector:J_,loader:tB},rB=eB,Zm="eventmodeling",iB=f(e=>/^\s*eventmodeling/.test(e),"detector"),sB=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-KO2AKTUF-CDlJCxVO.cjs"));return{id:Zm,diagram:e}},"loader"),oB={id:Zm,detector:iB,loader:sB},aB=oB,Km="ishikawa",nB=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),lB=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./ishikawaDiagram-YF4QCWOH-09prKBsn.cjs"));return{id:Km,diagram:e}},"loader"),hB={id:Km,detector:nB,loader:lB},Qm="venn",cB=f(e=>/^\s*venn-beta/.test(e),"detector"),uB=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./vennDiagram-CIIHVFJN-DsSjXluJ.cjs"));return{id:Qm,diagram:e}},"loader"),dB={id:Qm,detector:cB,loader:uB},pB=dB,Jm="treemap",fB=f(e=>/^\s*treemap/.test(e),"detector"),gB=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./diagram-OG6HWLK6-CgIyEO8_.cjs"));return{id:Jm,diagram:e}},"loader"),mB={id:Jm,detector:fB,loader:gB},ty="wardley-beta",yB=f(e=>/^\s*wardley-beta/i.test(e),"detector"),CB=f(async()=>{const{diagram:e}=await Promise.resolve().then(()=>require("./wardleyDiagram-YWT4CUSO-D0BUmvVW.cjs"));return{id:ty,diagram:e}},"loader"),xB={id:ty,detector:yB,loader:CB},bB=xB,uc=!1,Ro=f(()=>{uc||(uc=!0,Ns("error",C_,e=>e.toLowerCase().trim()==="error"),Ns("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),ya(T_,A_,rB),ya(aw,O_,r_,Qw,Cw,Bw,Fw,Mw,Uw,jw,fw,cw,B_,Tw,c_,a_,f_,Dw,R_,z_,Nw,j_,aB,Q_,U_,hB,mB,pB,bB))},"addDiagrams"),kB=f(async()=>{D.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(br).map(async([r,{detector:i,loader:s}])=>{if(s)try{Sa(r)}catch{try{const{diagram:o,id:a}=await s();Ns(a,o,i)}catch(o){throw D.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete br[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){D.error(`Failed to load ${t.length} external diagrams`);for(const r of t)D.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),TB="graphics-document document";function ey(e,t){e.attr("role",TB),t!==""&&e.attr("aria-roledescription",t)}f(ey,"setA11yDiagramInfo");function ry(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(ry,"addSVGa11yTitleDescription");var Cr,pn=(Cr=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){var h,c;const i=bt(),s=yn(t,i);t=x2(t)+`
|
|
301
|
+
`;try{Sa(s)}catch{const u=n0(s);if(!u)throw new Tc(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();Ns(p,d)}const{db:o,parser:a,renderer:n,init:l}=Sa(s);return a.parser&&(a.parser.yy=o),(h=o.clear)==null||h.call(o),l==null||l(i),r.title&&((c=o.setDiagramTitle)==null||c.call(o,r.title)),await a.parse(t),new Cr(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(Cr,"Diagram"),Cr),dc=[],SB=f(()=>{dc.forEach(e=>{e()}),dc=[]},"attachFunctions"),wB=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function iy(e){const t=e.match(kc);if(!t)return{text:e,metadata:{}};let r=vp(t[1],{schema:Bp})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}f(iy,"extractFrontMatter");var _B=f(e=>e.replace(/\r\n?/g,`
|
|
302
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),BB=f(e=>{const{text:t,metadata:r}=iy(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),vB=f(e=>{const t=ae.detectInit(e)??{},r=ae.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:h2(e),directive:t}},"processDirectives");function kl(e){const t=_B(e),r=BB(t),i=vB(r.text),s=Ao(r.config,i.directive);return e=wB(i.text),{code:e,title:r.title,config:s}}f(kl,"preprocessDiagram");function sy(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(sy,"toBase64");var LB=5e4,FB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",AB="sandbox",EB="loose",MB="http://www.w3.org/2000/svg",$B="http://www.w3.org/1999/xlink",OB="http://www.w3.org/1999/xhtml",IB="100%",DB="100%",PB="border:0;margin:0;",RB="margin:0",qB="allow-top-navigation-by-user-activation allow-popups",NB='The "iframe" tag is not supported by your browser.',zB=["foreignobject"],WB=["dominant-baseline"];function Tl(e){const t=kl(e);return Rs(),$0(t.config??{}),t}f(Tl,"processAndSetConfigs");async function oy(e,t){Ro();try{const{code:r,config:i}=Tl(e);return{diagramType:(await ny(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(oy,"parse");var pc=f((e,t,r=[])=>{const i=vc(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),HB=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=Ut(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Fh(l.styles)||n.forEach(h=>{r.insertRule(pc(l.id,h,l.styles),r.cssRules.length)}),Fh(l.textStyles)||r.insertRule(pc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Ta(s)+`
|
|
303
|
+
`}else i+=`${e.themeCSS}
|
|
304
|
+
`;return i+Ta(r)},"createCssStyles"),UB=f((e,t)=>me.serialize(me.compile(`${e}{${t}}`),me.middleware([f(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===me.KEYFRAMES)return;i.props=i.props.map(n=>n.startsWith(e)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[me.MEDIA,me.SUPPORTS,me.LAYER,me.SCOPE,"@container","@starting-style"],me.KEYFRAMES].includes(i.type)||(D.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=me.COMMENT))},"addNamespace"),me.stringify])),"compileCSS"),YB=f((e,t,r,i)=>{const s=HB(e,r),o=Q0(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return UB(i,o)},"createUserStyles"),GB=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=ir(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),XB=f((e="",t)=>{var s,o;const r=(o=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&o.height?t.viewBox.baseVal.height+"px":DB,i=sy(`<body style="${RB}">${e}</body>`);return`<iframe style="width:${IB};height:${r};${PB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${qB}">
|
|
305
|
+
${NB}
|
|
306
|
+
</iframe>`},"putIntoIFrame"),fc=f((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",MB);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function fn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(fn,"sandboxedIframe");var jB=f((e,t,r,i)=>{var s,o,a;(s=e.getElementById(t))==null||s.remove(),(o=e.getElementById(r))==null||o.remove(),(a=e.getElementById(i))==null||a.remove()},"removeExistingElements"),VB=f(async function(e,t,r){var H,N,I,z,P,W;Ro();const i=Tl(t);t=i.code;const s=bt();D.debug(s),t.length>((s==null?void 0:s.maxTextSize)??LB)&&(t=FB);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,h="#"+l,c=f(()=>{const B=nt(p?n:h).node();B&&"remove"in B&&B.remove()},"removeTempElements");let u=nt(document.body);const p=s.securityLevel===AB,d=s.securityLevel===EB,y=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){const R=fn(nt(r),a);u=nt(R.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=nt(r);fc(u,e,l,`font-family: ${y}`,$B)}else{if(jB(document,e,l,a),p){const R=fn(nt(document.body),a);u=nt(R.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=nt("body");fc(u,e,l)}let g,m;try{g=await pn.fromText(t,{title:i.title})}catch(R){if(s.suppressErrorRendering)throw c(),R;g=await pn.fromText("error"),m=R}const C=u.select(h).node(),b=g.type,k=C.firstChild,S=k.firstChild,w=(N=(H=g.renderer).getClasses)==null?void 0:N.call(H,t,g),_=YB(s,b,w,o),F=document.createElement("style");F.innerHTML=_,k.insertBefore(F,S);try{await g.renderer.draw(t,e,"11.15.0",g)}catch(R){throw s.suppressErrorRendering?c():m_.draw(t,e,"11.15.0"),R}const L=u.select(`${h} svg`),q=(z=(I=g.db).getAccTitle)==null?void 0:z.call(I),M=(W=(P=g.db).getAccDescription)==null?void 0:W.call(P);ly(b,L,q,M),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",OB);let $=u.select(h).node().innerHTML;if(D.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),$=GB($,p,Ve(s.arrowMarkerAbsolute)),p){const R=u.select(h+" svg").node();$=XB($,R)}else d||($=xr.sanitize($,{ADD_TAGS:zB,ADD_ATTR:WB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(SB(),m)throw m;return c(),{diagramType:b,svg:$,bindFunctions:g.db.bindFunctions}},"render");function ay(e={}){var i;const t=vt({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),E0(t),t!=null&&t.theme&&t.theme in Ge?t.themeVariables=Ge[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Ge.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?A0(t):Lc();gn(r.logLevel),Ro()}f(ay,"initialize");var ny=f((e,t={})=>{const{code:r}=kl(e);return pn.fromText(r,t)},"getDiagramFromText");function ly(e,t,r,i){ey(t,e),ry(t,r,i,t.attr("id"))}f(ly,"addA11yInfo");var _r=Object.freeze({render:VB,parse:oy,getDiagramFromText:ny,initialize:ay,getConfig:bt,setConfig:Fc,getSiteConfig:Lc,updateSiteConfig:M0,reset:f(()=>{Rs()},"reset"),globalReset:f(()=>{Rs(ni)},"globalReset"),defaultConfig:ni});gn(bt().logLevel);Rs(bt());var ZB=f((e,t,r)=>{D.warn(e),il(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),hy=f(async function(e={querySelector:".mermaid"}){try{await KB(e)}catch(t){if(il(t)&&D.error(t.str),ie.parseError&&ie.parseError(t),!e.suppressErrors)throw D.error("Use the suppressErrors option to suppress these errors"),t}},"run"),KB=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=_r.getConfig();D.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");D.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(D.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),_r.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new ae.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(D.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const h=`mermaid-${o.next()}`;a=l.innerHTML,a=kf(ae.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const c=ae.detectInit(a);c&&D.debug("Detected early reinit: ",c);try{const{svg:u,bindFunctions:p}=await py(h,a,l);l.innerHTML=u,e&&await e(h),p&&p(l)}catch(u){ZB(u,n,ie.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),cy=f(function(e){_r.initialize(e)},"initialize"),QB=f(async function(e,t,r){D.warn("mermaid.init is deprecated. Please use run instead."),e&&cy(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await hy(i)},"init"),JB=f(async(e,{lazyLoad:t=!0}={})=>{Ro(),ya(...e),t===!1&&await kB()},"registerExternalDiagrams"),uy=f(function(){if(ie.startOnLoad){const{startOnLoad:e}=_r.getConfig();e&&ie.run().catch(t=>D.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",uy,!1);var tv=f(function(e){ie.parseError=e},"setParseErrorHandler"),fo=[],fa=!1,dy=f(async()=>{if(!fa){for(fa=!0;fo.length>0;){const e=fo.shift();if(e)try{await e()}catch(t){D.error("Error executing queue",t)}}fa=!1}},"executeQueue"),ev=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((o,a)=>{_r.parse(e,t).then(n=>{o(n),r(n)},n=>{var l;D.error("Error parsing",n),(l=ie.parseError)==null||l.call(ie,n),a(n),i(n)})}),"performCall");fo.push(s),dy().catch(i)}),"parse"),py=f((e,t,r)=>new Promise((i,s)=>{const o=f(()=>new Promise((a,n)=>{_r.render(e,t,r).then(l=>{a(l),i(l)},l=>{var h;D.error("Error parsing",l),(h=ie.parseError)==null||h.call(ie,l),n(l),s(l)})}),"performCall");fo.push(o),dy().catch(s)}),"render"),rv=f(()=>Object.keys(br).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),ie={startOnLoad:!0,mermaidAPI:_r,parse:ev,render:py,init:QB,run:hy,registerExternalDiagrams:JB,registerLayoutLoaders:km,initialize:cy,parseError:void 0,contentLoaded:uy,setParseErrorHandler:tv,detectType:yn,registerIconPacks:wf,getRegisteredDiagramsMetadata:rv},iv=ie;/*! Check if previously processed *//*!
|
|
307
|
+
* Wait for document loaded before starting the execution
|
|
308
|
+
*/const sv=Object.freeze(Object.defineProperty({__proto__:null,default:iv},Symbol.toStringTag,{value:"Module"}));exports.Color=Te;exports.Color$1=mi;exports.JSON_SCHEMA=Bp;exports.Rgb=Vt;exports.Utils=it;exports.ZERO_WIDTH_SPACE=Kp;exports.__export=mc;exports.__name=f;exports.abs=b1;exports.acos=L1;exports.adjustChannel=mn;exports.argumentsTag=Vn;exports.array=bu;exports.arrayBufferTag=Rp;exports.arrayTag=Pp;exports.asin=F1;exports.assignWithDepth_default=vt;exports.at=X;exports.atan2=k1;exports.booleanTag=jn;exports.calculateMathMLDimensions=G0;exports.calculateTextDimensions=Fo;exports.calculateTextHeight=rl;exports.calculateTextWidth=Oe;exports.cleanAndMerge=Ao;exports.clear=Rc;exports.clear$1=wS;exports.clear$2=KT;exports.clear2=CS;exports.color=ci;exports.commonDb_exports=kn;exports.common_default=gi;exports.computeDimensionOfText=Df;exports.computeLabelTransform=Nr;exports.configureLabelImages=sl;exports.configureSvgSize=bn;exports.constant=ur;exports.constant$1=xo;exports.cos=T1;exports.createText=Re;exports.curveBasis=js;exports.darken=E;exports.dataViewTag=Np;exports.dateTag=Op;exports.decodeEntities=ir;exports.defaultConfig2=eC;exports.defaultConfig_default=Cn;exports.define=Co;exports.epsilon=Oa;exports.extend=Fn;exports.float32ArrayTag=jp;exports.float64ArrayTag=Vp;exports.generateId=sf;exports.getAccDescription=Wc;exports.getAccTitle=Nc;exports.getConfig=bt;exports.getConfig2=dt;exports.getDiagramTitle=Uc;exports.getEdgeId=b2;exports.getEffectiveHtmlLabels=Ut;exports.getIconSVG=Ci;exports.getLineFunctionsWithOffset=Lp;exports.getRegisteredLayoutAlgorithm=rw;exports.getStylesFromArray=el;exports.getSubGraphTitleMargins=Eo;exports.getTag=vo;exports.getThemeVariables3=wc;exports.getUrl=Dc;exports.getUserDefinedConfig=I0;exports.halfPi=Ia;exports.hasKatex=li;exports.hue=Kx;exports.insertCluster=Xf;exports.insertEdge=ym;exports.insertEdgeLabel=fm;exports.insertNode=bl;exports.int16ArrayTag=Gp;exports.int32ArrayTag=Xp;exports.int8ArrayTag=Yp;exports.interpolateNumber=Ue;exports.interpolateRgb=Ba;exports.interpolateString=lu;exports.isDark=he;exports.isLabelStyle=ol;exports.isPrimitive=Lo;exports.isTypedArray=Yi;exports.isValidShape=pm;exports.lighten=A;exports.line=Tu;exports.lineBreakRegex=fi;exports.load=vp;exports.log=D;exports.mapTag=Ip;exports.markers_default=bm;exports.max=S1;exports.mermaid_core=sv;exports.min=w1;exports.nogamma=An;exports.numberTag=Xn;exports.objectTag=qp;exports.parseFontSize=os;exports.parseGenericTypes=xa;exports.pi=To;exports.positionEdgeLabel=gm;exports.positionNode=xS;exports.purify=xr;exports.random=af;exports.regexpTag=Mp;exports.registerIconPacks=wf;exports.render=ew;exports.renderKatexSanitized=xn;exports.rgbConvert=ou;exports.rgba=Ye;exports.sanitizeText=le;exports.sanitizeUrl_1=Ap;exports.select=nt;exports.selectSvgElement=Uu;exports.setAccDescription=zc;exports.setAccTitle=qc;exports.setConfig2=tC;exports.setDiagramTitle=Hc;exports.setNodeElem=yS;exports.setTag=Dp;exports.setupGraphViewbox=Pc;exports.setupGraphViewbox2=Yc;exports.sin=_1;exports.sqrt=B1;exports.stringTag=Gn;exports.styles2String=V;exports.symbolTag=$p;exports.tau=v1;exports.uint16ArrayTag=Hp;exports.uint32ArrayTag=Up;exports.uint8ArrayTag=zp;exports.uint8ClampedArrayTag=Wp;exports.unknownIcon=Tf;exports.updateNodeBounds=Z;exports.utils_default=ae;exports.withPath=xu;exports.wrapLabel=nf;
|