diff --git a/404.html b/404.html index 822cc1e..994840d 100644 --- a/404.html +++ b/404.html @@ -1,5 +1,5 @@ -Lost? Don't worry -
+Lost? Don't worry +
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode diff --git a/favicon/android-chrome-144x144.png b/favicon/android-chrome-144x144.png index 1d33178..e874d34 100644 Binary files a/favicon/android-chrome-144x144.png and b/favicon/android-chrome-144x144.png differ diff --git a/favicon/android-chrome-192x192.png b/favicon/android-chrome-192x192.png index ae6e07a..d694e30 100644 Binary files a/favicon/android-chrome-192x192.png and b/favicon/android-chrome-192x192.png differ diff --git a/favicon/android-chrome-256x256.png b/favicon/android-chrome-256x256.png index d52fbff..6a76f84 100644 Binary files a/favicon/android-chrome-256x256.png and b/favicon/android-chrome-256x256.png differ diff --git a/favicon/android-chrome-384x384.png b/favicon/android-chrome-384x384.png index 512949e..0f98322 100644 Binary files a/favicon/android-chrome-384x384.png and b/favicon/android-chrome-384x384.png differ diff --git a/favicon/android-chrome-48x48.png b/favicon/android-chrome-48x48.png index 9d1c7af..e2e6889 100644 Binary files a/favicon/android-chrome-48x48.png and b/favicon/android-chrome-48x48.png differ diff --git a/favicon/android-chrome-512x512.png b/favicon/android-chrome-512x512.png index d26118b..e6a2d03 100644 Binary files a/favicon/android-chrome-512x512.png and b/favicon/android-chrome-512x512.png differ diff --git a/favicon/android-chrome-72x72.png b/favicon/android-chrome-72x72.png index 100b4bd..c765202 100644 Binary files a/favicon/android-chrome-72x72.png and b/favicon/android-chrome-72x72.png differ diff --git a/favicon/android-chrome-96x96.png b/favicon/android-chrome-96x96.png index f528868..021b510 100644 Binary files a/favicon/android-chrome-96x96.png and b/favicon/android-chrome-96x96.png differ diff --git a/favicon/apple-touch-icon-1024x1024.png b/favicon/apple-touch-icon-1024x1024.png index e9049ca..8a8f441 100644 Binary files a/favicon/apple-touch-icon-1024x1024.png and b/favicon/apple-touch-icon-1024x1024.png differ diff --git a/favicon/apple-touch-icon-114x114.png b/favicon/apple-touch-icon-114x114.png index 060d467..125098a 100644 Binary files a/favicon/apple-touch-icon-114x114.png and b/favicon/apple-touch-icon-114x114.png differ diff --git a/favicon/apple-touch-icon-120x120.png b/favicon/apple-touch-icon-120x120.png index 1ffcb21..d83a0be 100644 Binary files a/favicon/apple-touch-icon-120x120.png and b/favicon/apple-touch-icon-120x120.png differ diff --git a/favicon/apple-touch-icon-144x144.png b/favicon/apple-touch-icon-144x144.png index 63465d4..c4c6a2e 100644 Binary files a/favicon/apple-touch-icon-144x144.png and b/favicon/apple-touch-icon-144x144.png differ diff --git a/favicon/apple-touch-icon-152x152.png b/favicon/apple-touch-icon-152x152.png index bbb4250..5b761a3 100644 Binary files a/favicon/apple-touch-icon-152x152.png and b/favicon/apple-touch-icon-152x152.png differ diff --git a/favicon/apple-touch-icon-167x167.png b/favicon/apple-touch-icon-167x167.png index 589a79c..2b2b328 100644 Binary files a/favicon/apple-touch-icon-167x167.png and b/favicon/apple-touch-icon-167x167.png differ diff --git a/favicon/apple-touch-icon-180x180.png b/favicon/apple-touch-icon-180x180.png index f7eab5a..b3c03d1 100644 Binary files a/favicon/apple-touch-icon-180x180.png and b/favicon/apple-touch-icon-180x180.png differ diff --git a/favicon/apple-touch-icon-57x57.png b/favicon/apple-touch-icon-57x57.png index d797100..d7fd808 100644 Binary files a/favicon/apple-touch-icon-57x57.png and b/favicon/apple-touch-icon-57x57.png differ diff --git a/favicon/apple-touch-icon-60x60.png b/favicon/apple-touch-icon-60x60.png index c1d0a6a..242fb5a 100644 Binary files a/favicon/apple-touch-icon-60x60.png and b/favicon/apple-touch-icon-60x60.png differ diff --git a/favicon/apple-touch-icon-72x72.png b/favicon/apple-touch-icon-72x72.png index beca927..0535538 100644 Binary files a/favicon/apple-touch-icon-72x72.png and b/favicon/apple-touch-icon-72x72.png differ diff --git a/favicon/apple-touch-icon-76x76.png b/favicon/apple-touch-icon-76x76.png index a41a1ca..2006da2 100644 Binary files a/favicon/apple-touch-icon-76x76.png and b/favicon/apple-touch-icon-76x76.png differ diff --git a/favicon/apple-touch-icon-precomposed.png b/favicon/apple-touch-icon-precomposed.png index f7eab5a..b3c03d1 100644 Binary files a/favicon/apple-touch-icon-precomposed.png and b/favicon/apple-touch-icon-precomposed.png differ diff --git a/favicon/apple-touch-icon.png b/favicon/apple-touch-icon.png index f7eab5a..b3c03d1 100644 Binary files a/favicon/apple-touch-icon.png and b/favicon/apple-touch-icon.png differ diff --git a/favicon/apple-touch-startup-image-1125x2436.png b/favicon/apple-touch-startup-image-1125x2436.png index 4a41033..b0f14cd 100644 Binary files a/favicon/apple-touch-startup-image-1125x2436.png and b/favicon/apple-touch-startup-image-1125x2436.png differ diff --git a/favicon/apple-touch-startup-image-1136x640.png b/favicon/apple-touch-startup-image-1136x640.png index 7571b82..4baff1b 100644 Binary files a/favicon/apple-touch-startup-image-1136x640.png and b/favicon/apple-touch-startup-image-1136x640.png differ diff --git a/favicon/apple-touch-startup-image-1170x2532.png b/favicon/apple-touch-startup-image-1170x2532.png index c105a5d..c1acf82 100644 Binary files a/favicon/apple-touch-startup-image-1170x2532.png and b/favicon/apple-touch-startup-image-1170x2532.png differ diff --git a/favicon/apple-touch-startup-image-1179x2556.png b/favicon/apple-touch-startup-image-1179x2556.png index 686de26..cf233ec 100644 Binary files a/favicon/apple-touch-startup-image-1179x2556.png and b/favicon/apple-touch-startup-image-1179x2556.png differ diff --git a/favicon/apple-touch-startup-image-1242x2208.png b/favicon/apple-touch-startup-image-1242x2208.png index 3a089fd..60ea51a 100644 Binary files a/favicon/apple-touch-startup-image-1242x2208.png and b/favicon/apple-touch-startup-image-1242x2208.png differ diff --git a/favicon/apple-touch-startup-image-1242x2688.png b/favicon/apple-touch-startup-image-1242x2688.png index b00f85b..d7b4300 100644 Binary files a/favicon/apple-touch-startup-image-1242x2688.png and b/favicon/apple-touch-startup-image-1242x2688.png differ diff --git a/favicon/apple-touch-startup-image-1284x2778.png b/favicon/apple-touch-startup-image-1284x2778.png index 73927ba..9991c44 100644 Binary files a/favicon/apple-touch-startup-image-1284x2778.png and b/favicon/apple-touch-startup-image-1284x2778.png differ diff --git a/favicon/apple-touch-startup-image-1290x2796.png b/favicon/apple-touch-startup-image-1290x2796.png index 005e6b8..17d90e8 100644 Binary files a/favicon/apple-touch-startup-image-1290x2796.png and b/favicon/apple-touch-startup-image-1290x2796.png differ diff --git a/favicon/apple-touch-startup-image-1334x750.png b/favicon/apple-touch-startup-image-1334x750.png index 199d5b5..da1eea8 100644 Binary files a/favicon/apple-touch-startup-image-1334x750.png and b/favicon/apple-touch-startup-image-1334x750.png differ diff --git a/favicon/apple-touch-startup-image-1488x2266.png b/favicon/apple-touch-startup-image-1488x2266.png index 256edf7..8b4925b 100644 Binary files a/favicon/apple-touch-startup-image-1488x2266.png and b/favicon/apple-touch-startup-image-1488x2266.png differ diff --git a/favicon/apple-touch-startup-image-1536x2048.png b/favicon/apple-touch-startup-image-1536x2048.png index 3fa3827..fe2399d 100644 Binary files a/favicon/apple-touch-startup-image-1536x2048.png and b/favicon/apple-touch-startup-image-1536x2048.png differ diff --git a/favicon/apple-touch-startup-image-1620x2160.png b/favicon/apple-touch-startup-image-1620x2160.png index fde41a7..7bb33c5 100644 Binary files a/favicon/apple-touch-startup-image-1620x2160.png and b/favicon/apple-touch-startup-image-1620x2160.png differ diff --git a/favicon/apple-touch-startup-image-1640x2160.png b/favicon/apple-touch-startup-image-1640x2160.png index 2bf4a28..41a524c 100644 Binary files a/favicon/apple-touch-startup-image-1640x2160.png and b/favicon/apple-touch-startup-image-1640x2160.png differ diff --git a/favicon/apple-touch-startup-image-1668x2224.png b/favicon/apple-touch-startup-image-1668x2224.png index 34e222e..5314bb4 100644 Binary files a/favicon/apple-touch-startup-image-1668x2224.png and b/favicon/apple-touch-startup-image-1668x2224.png differ diff --git a/favicon/apple-touch-startup-image-1668x2388.png b/favicon/apple-touch-startup-image-1668x2388.png index 79960c5..1482b74 100644 Binary files a/favicon/apple-touch-startup-image-1668x2388.png and b/favicon/apple-touch-startup-image-1668x2388.png differ diff --git a/favicon/apple-touch-startup-image-1792x828.png b/favicon/apple-touch-startup-image-1792x828.png index 0ec2177..75cde80 100644 Binary files a/favicon/apple-touch-startup-image-1792x828.png and b/favicon/apple-touch-startup-image-1792x828.png differ diff --git a/favicon/apple-touch-startup-image-2048x1536.png b/favicon/apple-touch-startup-image-2048x1536.png index 28d1467..4b372ad 100644 Binary files a/favicon/apple-touch-startup-image-2048x1536.png and b/favicon/apple-touch-startup-image-2048x1536.png differ diff --git a/favicon/apple-touch-startup-image-2048x2732.png b/favicon/apple-touch-startup-image-2048x2732.png index bb3185e..4686f2c 100644 Binary files a/favicon/apple-touch-startup-image-2048x2732.png and b/favicon/apple-touch-startup-image-2048x2732.png differ diff --git a/favicon/apple-touch-startup-image-2160x1620.png b/favicon/apple-touch-startup-image-2160x1620.png index 0b11a48..c67d989 100644 Binary files a/favicon/apple-touch-startup-image-2160x1620.png and b/favicon/apple-touch-startup-image-2160x1620.png differ diff --git a/favicon/apple-touch-startup-image-2160x1640.png b/favicon/apple-touch-startup-image-2160x1640.png index de14ec9..5224ce6 100644 Binary files a/favicon/apple-touch-startup-image-2160x1640.png and b/favicon/apple-touch-startup-image-2160x1640.png differ diff --git a/favicon/apple-touch-startup-image-2208x1242.png b/favicon/apple-touch-startup-image-2208x1242.png index 0596a00..4ed92bb 100644 Binary files a/favicon/apple-touch-startup-image-2208x1242.png and b/favicon/apple-touch-startup-image-2208x1242.png differ diff --git a/favicon/apple-touch-startup-image-2224x1668.png b/favicon/apple-touch-startup-image-2224x1668.png index 3227707..9eb92b4 100644 Binary files a/favicon/apple-touch-startup-image-2224x1668.png and b/favicon/apple-touch-startup-image-2224x1668.png differ diff --git a/favicon/apple-touch-startup-image-2266x1488.png b/favicon/apple-touch-startup-image-2266x1488.png index 76bec15..cd41465 100644 Binary files a/favicon/apple-touch-startup-image-2266x1488.png and b/favicon/apple-touch-startup-image-2266x1488.png differ diff --git a/favicon/apple-touch-startup-image-2388x1668.png b/favicon/apple-touch-startup-image-2388x1668.png index dd24358..9666a58 100644 Binary files a/favicon/apple-touch-startup-image-2388x1668.png and b/favicon/apple-touch-startup-image-2388x1668.png differ diff --git a/favicon/apple-touch-startup-image-2436x1125.png b/favicon/apple-touch-startup-image-2436x1125.png index 928a075..771fa93 100644 Binary files a/favicon/apple-touch-startup-image-2436x1125.png and b/favicon/apple-touch-startup-image-2436x1125.png differ diff --git a/favicon/apple-touch-startup-image-2532x1170.png b/favicon/apple-touch-startup-image-2532x1170.png index f3790a1..ed0ad24 100644 Binary files a/favicon/apple-touch-startup-image-2532x1170.png and b/favicon/apple-touch-startup-image-2532x1170.png differ diff --git a/favicon/apple-touch-startup-image-2556x1179.png b/favicon/apple-touch-startup-image-2556x1179.png index d96cf94..ef7a14d 100644 Binary files a/favicon/apple-touch-startup-image-2556x1179.png and b/favicon/apple-touch-startup-image-2556x1179.png differ diff --git a/favicon/apple-touch-startup-image-2688x1242.png b/favicon/apple-touch-startup-image-2688x1242.png index b9c1dd3..8f45b8c 100644 Binary files a/favicon/apple-touch-startup-image-2688x1242.png and b/favicon/apple-touch-startup-image-2688x1242.png differ diff --git a/favicon/apple-touch-startup-image-2732x2048.png b/favicon/apple-touch-startup-image-2732x2048.png index 3718f6b..06f054b 100644 Binary files a/favicon/apple-touch-startup-image-2732x2048.png and b/favicon/apple-touch-startup-image-2732x2048.png differ diff --git a/favicon/apple-touch-startup-image-2778x1284.png b/favicon/apple-touch-startup-image-2778x1284.png index 95929bf..4144f54 100644 Binary files a/favicon/apple-touch-startup-image-2778x1284.png and b/favicon/apple-touch-startup-image-2778x1284.png differ diff --git a/favicon/apple-touch-startup-image-2796x1290.png b/favicon/apple-touch-startup-image-2796x1290.png index df0a074..3c7f64b 100644 Binary files a/favicon/apple-touch-startup-image-2796x1290.png and b/favicon/apple-touch-startup-image-2796x1290.png differ diff --git a/favicon/apple-touch-startup-image-640x1136.png b/favicon/apple-touch-startup-image-640x1136.png index d021416..2fc6504 100644 Binary files a/favicon/apple-touch-startup-image-640x1136.png and b/favicon/apple-touch-startup-image-640x1136.png differ diff --git a/favicon/apple-touch-startup-image-750x1334.png b/favicon/apple-touch-startup-image-750x1334.png index 6779f96..6786ce8 100644 Binary files a/favicon/apple-touch-startup-image-750x1334.png and b/favicon/apple-touch-startup-image-750x1334.png differ diff --git a/favicon/apple-touch-startup-image-828x1792.png b/favicon/apple-touch-startup-image-828x1792.png index 04eb697..eb2911a 100644 Binary files a/favicon/apple-touch-startup-image-828x1792.png and b/favicon/apple-touch-startup-image-828x1792.png differ diff --git a/favicon/favicon-48x48.png b/favicon/favicon-48x48.png index 686c494..1584010 100644 Binary files a/favicon/favicon-48x48.png and b/favicon/favicon-48x48.png differ diff --git a/favicon/mstile-144x144.png b/favicon/mstile-144x144.png index 1d33178..e874d34 100644 Binary files a/favicon/mstile-144x144.png and b/favicon/mstile-144x144.png differ diff --git a/favicon/mstile-150x150.png b/favicon/mstile-150x150.png index b17f103..b33cb9b 100644 Binary files a/favicon/mstile-150x150.png and b/favicon/mstile-150x150.png differ diff --git a/favicon/mstile-310x150.png b/favicon/mstile-310x150.png index 2637f40..c942d58 100644 Binary files a/favicon/mstile-310x150.png and b/favicon/mstile-310x150.png differ diff --git a/favicon/mstile-310x310.png b/favicon/mstile-310x310.png index c71fa4d..0e0d0ec 100644 Binary files a/favicon/mstile-310x310.png and b/favicon/mstile-310x310.png differ diff --git a/favicon/mstile-70x70.png b/favicon/mstile-70x70.png index 271c848..5fc76e6 100644 Binary files a/favicon/mstile-70x70.png and b/favicon/mstile-70x70.png differ diff --git a/fonts/GeekdocIcons.woff b/fonts/GeekdocIcons.woff index 012e6f7..a6b8953 100644 Binary files a/fonts/GeekdocIcons.woff and b/fonts/GeekdocIcons.woff differ diff --git a/fonts/GeekdocIcons.woff2 b/fonts/GeekdocIcons.woff2 index 7e9509e..c550596 100644 Binary files a/fonts/GeekdocIcons.woff2 and b/fonts/GeekdocIcons.woff2 differ diff --git a/index.html b/index.html index 85170ad..7e7adb0 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ -zk-lib - Multipurpose Factorio library -
+zk-lib - Multipurpose Factorio library +
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode diff --git a/js/148-5c9964c4.chunk.min.js b/js/148-5c9964c4.chunk.min.js deleted file mode 100644 index 4ee6a6b..0000000 --- a/js/148-5c9964c4.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[148],{6151:(t,e,s)=>{s.d(e,{A:()=>r,P:()=>o});var i=s(798),n=s(4852),r=(0,i.K2)(((t,e)=>{let s;return"sandbox"===e&&(s=(0,n.Ltv)("#i"+t)),("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),o=(0,i.K2)(((t,e,s,n)=>{t.attr("class",s);const{width:r,height:o,x:c,y:h}=a(t,e);(0,i.a$)(t,o,r,n);const d=l(c,h,r,o,e);t.attr("viewBox",d),i.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)}),"setupViewPortForSVG"),a=(0,i.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),l=(0,i.K2)(((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`),"createViewBox")},3148:(t,e,s)=>{s.d(e,{Zk:()=>l,iP:()=>Bt,q7:()=>w,tM:()=>Ft});var i=s(6151),n=s(2602),r=s(7323),o=s(798),a=function(){var t=(0,o.K2)((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],a=[1,11],l=[1,16],c=[1,17],h=[1,18],d=[1,19],u=[1,32],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],_=[1,27],b=[1,28],T=[1,29],k=[1,30],E=[1,31],x=[1,34],D=[1,35],C=[1,36],$=[1,37],v=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],A=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],K={trace:(0,o.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,o.K2)((function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var l=r[a],c=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 34:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 35:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 36:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}}),"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,39],15:[1,40]}),t(L,[2,16]),{18:[1,41]},t(L,[2,18],{20:[1,42]}),{23:[1,43]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(L,[2,28]),{34:[1,48]},{36:[1,49]},t(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(I,[2,42],{55:[1,54]}),t(I,[2,43],{55:[1,55]}),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,6]),t(L,[2,13]),{13:56,24:u,54:v},t(L,[2,17]),t(A,n,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(L,[2,29]),t(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(L,[2,14],{14:[1,67]}),{4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(L,[2,32]),t(L,[2,33]),t(L,[2,34]),t(L,[2,35]),t(I,[2,44]),t(I,[2,45]),t(L,[2,15]),t(L,[2,19]),t(A,n,{7:72}),t(L,[2,26]),t(L,[2,27]),{4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:(0,o.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,o.K2)((function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",c=0,h=0,d=0,u=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t}),"popStack"),(0,o.K2)(S,"lex");for(var _,b,T,k,E,x,D,C,$,v={};;){if(T=s[s.length-1],this.defaultActions[T]?k=this.defaultActions[T]:(null==_&&(_=S()),k=a[T]&&a[T][_]),void 0===k||!k.length||!k[0]){var L;for(x in $=[],a[T])this.terminals_[x]&&x>2&&$.push("'"+this.terminals_[x]+"'");L=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(L,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:f,expected:$})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+_);switch(k[0]){case 1:s.push(_),n.push(p.yytext),r.push(p.yylloc),s.push(k[1]),_=null,b?(_=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(D=this.productions_[k[1]][1],v.$=n[n.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[l,h,c,y.yy,k[1],n,r].concat(u))))return E;D&&(s=s.slice(0,-1*D*2),n=n.slice(0,-1*D),r=r.slice(0,-1*D)),s.push(this.productions_[k[1]][0]),n.push(v.$),r.push(v._$),C=a[s[s.length-2]][s[s.length-1]],s.push(C);break;case 3:return!0}}return!0}),"parse")},R=function(){return{EOF:1,parseError:(0,o.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,o.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,o.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,o.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,o.K2)((function(){return this._more=!0,this}),"more"),reject:(0,o.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,o.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,o.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,o.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,o.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,o.K2)((function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,o.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,o.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,o.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,o.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,o.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,o.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)((function(t,e,s,i){switch(s){case 0:return 41;case 1:case 42:return 48;case 2:case 43:return 49;case 3:case 44:return 50;case 4:case 45:return 51;case 5:case 6:case 8:case 9:case 10:case 11:case 54:case 56:case 62:break;case 7:case 77:return 5;case 12:case 32:return this.pushState("SCALE"),17;case 13:case 33:return 18;case 14:case 20:case 34:case 49:case 52:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 35:this.pushState("STATE");break;case 36:case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:case 64:return this.popState(),"ID";case 50:return"STATE_DESCR";case 51:return 19;case 53:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 63:return"NOTE_TEXT";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 78:return"INVALID"}}),"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}}}();function w(){this.yy={}}return K.lexer=R,(0,o.K2)(w,"Parser"),w.prototype=K,K.Parser=w,new w}();a.parser=a;var l=a,c="state",h="relation",d="default",u="divider",p="fill:none",y="fill: #333",g="text",f="normal",m="rect",S="rectWithTitle",_="divider",b="roundedWithTitle",T="statediagram",k=`${T}-state`,E="transition",x=`${E} note-edge`,D=`${T}-note`,C=`${T}-cluster`,$=`${T}-cluster-alt`,v="parent",L="note",I="----",A=`${I}${L}`,K=`${I}${v}`,R=(0,o.K2)(((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s}),"getDir"),w={getClasses:(0,o.K2)((function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}),"getClasses"),draw:(0,o.K2)((async function(t,e,s,a){o.Rm.info("REF0:"),o.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:l,state:c,layout:h}=(0,o.D7)();a.db.extract(a.db.getRootDocV2());const d=a.db.getData(),u=(0,i.A)(e,l);d.type=a.type,d.layoutAlgorithm=h,d.nodeSpacing=c?.nodeSpacing||50,d.rankSpacing=c?.rankSpacing||50,d.markers=["barb"],d.diagramId=e,await(0,n.XX)(d,u),r._K.insertTitle(u,"statediagramTitleText",c?.titleTopMargin??25,a.db.getDiagramTitle()),(0,i.P)(u,8,T,c?.useMaxWidth??!0)}),"draw"),getDir:R},O=new Map,N=0;function B(t="",e=0,s="",i=I){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}(0,o.K2)(B,"stateDomId");var F=(0,o.K2)(((t,e,s,i,n,r,a,l)=>{o.Rm.trace("items",e),e.forEach((e=>{switch(e.stmt){case c:case d:z(t,e,s,i,n,r,a,l);break;case h:{z(t,e.state1,s,i,n,r,a,l),z(t,e.state2,s,i,n,r,a,l);const c={id:"edge"+N,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:p,labelStyle:"",label:o.Y2.sanitizeText(e.description,(0,o.D7)()),arrowheadStyle:y,labelpos:"c",labelType:g,thickness:f,classes:E,look:a};n.push(c),N++}}}))}),"setupDoc"),P=(0,o.K2)(((t,e="TB")=>{let s=e;if(t.doc)for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s}),"getDir");function Y(t,e,s){if(!e.id||""===e.id||""===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach((t=>{if(s.get(t)){const i=s.get(t);e.cssCompiledStyles=[...e.cssCompiledStyles,...i.styles]}})));const i=t.find((t=>t.id===e.id));i?Object.assign(i,e):t.push(e)}function G(t){return t?.classes?.join(" ")??""}function j(t){return t?.styles??[]}(0,o.K2)(Y,"insertOrUpdateNode"),(0,o.K2)(G,"getClassesFromDbInfo"),(0,o.K2)(j,"getStylesFromDbInfo");var z=(0,o.K2)(((t,e,s,i,n,r,a,l)=>{const c=e.id,h=s.get(c),T=G(h),E=j(h);if(o.Rm.info("dataFetcher parsedItem",e,h,E),"root"!==c){let s=m;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==d&&(s=e.type),O.get(c)||O.set(c,{id:c,shape:s,description:o.Y2.sanitizeText(c,(0,o.D7)()),cssClasses:`${T} ${k}`,cssStyles:E});const h=O.get(c);e.description&&(Array.isArray(h.description)?(h.shape=S,h.description.push(e.description)):h.description?.length>0?(h.shape=S,h.description===c?h.description=[e.description]:h.description=[h.description,e.description]):(h.shape=m,h.description=e.description),h.description=o.Y2.sanitizeTextOrArray(h.description,(0,o.D7)())),1===h.description?.length&&h.shape===S&&("group"===h.type?h.shape=b:h.shape=m),!h.type&&e.doc&&(o.Rm.info("Setting cluster for XCX",c,P(e)),h.type="group",h.isGroup=!0,h.dir=P(e),h.shape=e.type===u?_:b,h.cssClasses=`${h.cssClasses} ${C} ${r?$:""}`);const I={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:c,dir:h.dir,domId:B(c,N),type:h.type,isGroup:"group"===h.type,padding:8,rx:10,ry:10,look:a};if(I.shape===_&&(I.label=""),t&&"root"!==t.id&&(o.Rm.trace("Setting node ",c," to be child of its parent ",t.id),I.parentId=t.id),I.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:D,cssStyles:[],cssCompilesStyles:[],id:c+A+"-"+N,domId:B(c,N,L),type:h.type,isGroup:"group"===h.type,padding:(0,o.D7)().flowchart.padding,look:a,position:e.note.position},s=c+K,r={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:h.cssClasses,cssStyles:[],id:c+K,domId:B(c,N,v),type:"group",isGroup:!0,padding:16,look:a,position:e.note.position};N++,r.id=s,t.parentId=s,Y(i,r,l),Y(i,t,l),Y(i,I,l);let d=c,u=t.id;"left of"===e.note.position&&(d=t.id,u=c),n.push({id:d+"-"+u,start:d,end:u,arrowhead:"none",arrowTypeEnd:"",style:p,labelStyle:"",classes:x,arrowheadStyle:y,labelpos:"c",labelType:g,thickness:f,look:a})}else Y(i,I,l)}e.doc&&(o.Rm.trace("Adding nodes children "),F(e,e.doc,s,i,n,!r,a,l))}),"dataFetcher"),U=(0,o.K2)((()=>{O.clear(),N=0}),"reset"),M="[*]",X="start",V=M,W="color",H="fill";function J(){return new Map}(0,o.K2)(J,"newClassesList");var q=[],Z=[],Q="LR",tt=[],et=J(),st=(0,o.K2)((()=>({relations:[],states:new Map,documents:{}})),"newDoc"),it={root:st()},nt=it.root,rt=0,ot=0,at=(0,o.K2)((t=>JSON.parse(JSON.stringify(t))),"clone"),lt=(0,o.K2)((t=>{o.Rm.info("Setting root doc",t),tt=t}),"setRootDoc"),ct=(0,o.K2)((()=>tt),"getRootDoc"),ht=(0,o.K2)(((t,e,s)=>{if(e.stmt===h)ht(t,e.state1,!0),ht(t,e.state2,!1);else if(e.stmt===c&&("[*]"===e.id?(e.id=s?t.id+"_start":t.id+"_end",e.start=s):e.id=e.id.trim()),e.doc){const t=[];let s,i=[];for(s=0;s0&&i.length>0){const s={stmt:c,id:(0,r.$C)(),type:"divider",doc:at(i)};t.push(at(s)),e.doc=t}e.doc.forEach((t=>ht(e,t,!0)))}}),"docTranslator"),dt=(0,o.K2)((()=>(ht({id:"root"},{id:"root",doc:tt},!0),{id:"root",doc:tt})),"getRootDocV2"),ut=(0,o.K2)((t=>{let e;e=t.doc?t.doc:t,o.Rm.info(e),yt(!0),o.Rm.info("Extract initial document:",e),e.forEach((t=>{switch(o.Rm.warn("Statement",t.stmt),t.stmt){case c:pt(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case h:xt(t.state1,t.state2,t.description);break;case"classDef":vt(t.id.trim(),t.classes);break;case"style":{const e=t.id.trim().split(","),s=t.styleClass.split(",");e.forEach((t=>{let e=gt(t);if(void 0===e){const s=t.trim();pt(s),e=gt(s)}e.styles=s.map((t=>t.replace(/;/g,"")?.trim()))}))}break;case"applyClass":It(t.id.trim(),t.styleClass)}}));const s=ft(),i=(0,o.D7)().look;U(),z(void 0,dt(),s,q,Z,!0,i,et),q.forEach((t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+t.id+"]");t.label=t.label[0]}}))}),"extract"),pt=(0,o.K2)((function(t,e=d,s=null,i=null,n=null,r=null,a=null,l=null){const c=t?.trim();if(nt.states.has(c)?(nt.states.get(c).doc||(nt.states.get(c).doc=s),nt.states.get(c).type||(nt.states.get(c).type=e)):(o.Rm.info("Adding state ",c,i),nt.states.set(c,{id:c,descriptions:[],type:e,doc:s,note:n,classes:[],styles:[],textStyles:[]})),i&&(o.Rm.info("Setting state description",c,i),"string"==typeof i&&Dt(c,i.trim()),"object"==typeof i&&i.forEach((t=>Dt(c,t.trim())))),n){const t=nt.states.get(c);t.note=n,t.note.text=o.Y2.sanitizeText(t.note.text,(0,o.D7)())}r&&(o.Rm.info("Setting state classes",c,r),("string"==typeof r?[r]:r).forEach((t=>It(c,t.trim())))),a&&(o.Rm.info("Setting state styles",c,a),("string"==typeof a?[a]:a).forEach((t=>At(c,t.trim())))),l&&(o.Rm.info("Setting state styles",c,a),("string"==typeof l?[l]:l).forEach((t=>Kt(c,t.trim()))))}),"addState"),yt=(0,o.K2)((function(t){q=[],Z=[],it={root:st()},nt=it.root,rt=0,et=J(),t||(0,o.IU)()}),"clear"),gt=(0,o.K2)((function(t){return nt.states.get(t)}),"getState"),ft=(0,o.K2)((function(){return nt.states}),"getStates"),mt=(0,o.K2)((function(){o.Rm.info("Documents = ",it)}),"logDocuments"),St=(0,o.K2)((function(){return nt.relations}),"getRelations");function _t(t=""){let e=t;return t===M&&(rt++,e=`${X}${rt}`),e}function bt(t="",e=d){return t===M?X:e}function Tt(t=""){let e=t;return t===V&&(e="end"+ ++rt),e}function kt(t="",e=d){return t===V?"end":e}function Et(t,e,s){let i=_t(t.id.trim()),n=bt(t.id.trim(),t.type),r=_t(e.id.trim()),a=bt(e.id.trim(),e.type);pt(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),pt(r,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),nt.relations.push({id1:i,id2:r,relationTitle:o.Y2.sanitizeText(s,(0,o.D7)())})}(0,o.K2)(_t,"startIdIfNeeded"),(0,o.K2)(bt,"startTypeIfNeeded"),(0,o.K2)(Tt,"endIdIfNeeded"),(0,o.K2)(kt,"endTypeIfNeeded"),(0,o.K2)(Et,"addRelationObjs");var xt=(0,o.K2)((function(t,e,s){if("object"==typeof t)Et(t,e,s);else{const i=_t(t.trim()),n=bt(t),r=Tt(e.trim()),a=kt(e);pt(i,n),pt(r,a),nt.relations.push({id1:i,id2:r,title:o.Y2.sanitizeText(s,(0,o.D7)())})}}),"addRelation"),Dt=(0,o.K2)((function(t,e){const s=nt.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s.descriptions.push(o.Y2.sanitizeText(i,(0,o.D7)()))}),"addDescription"),Ct=(0,o.K2)((function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()}),"cleanupLabel"),$t=(0,o.K2)((()=>"divider-id-"+ ++ot),"getDividerId"),vt=(0,o.K2)((function(t,e=""){et.has(t)||et.set(t,{id:t,styles:[],textStyles:[]});const s=et.get(t);null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(W).exec(t)){const t=e.replace(H,"bgFill").replace(W,H);s.textStyles.push(t)}s.styles.push(e)}))}),"addStyleClass"),Lt=(0,o.K2)((function(){return et}),"getClasses"),It=(0,o.K2)((function(t,e){t.split(",").forEach((function(t){let s=gt(t);if(void 0===s){const e=t.trim();pt(e),s=gt(e)}s.classes.push(e)}))}),"setCssClass"),At=(0,o.K2)((function(t,e){const s=gt(t);void 0!==s&&s.styles.push(e)}),"setStyle"),Kt=(0,o.K2)((function(t,e){const s=gt(t);void 0!==s&&s.textStyles.push(e)}),"setTextStyle"),Rt=(0,o.K2)((()=>Q),"getDirection"),wt=(0,o.K2)((t=>{Q=t}),"setDirection"),Ot=(0,o.K2)((t=>t&&":"===t[0]?t.substr(1).trim():t.trim()),"trimColon"),Nt=(0,o.K2)((()=>{const t=(0,o.D7)();return{nodes:q,edges:Z,other:{},config:t,direction:R(dt())}}),"getData"),Bt={getConfig:(0,o.K2)((()=>(0,o.D7)().state),"getConfig"),getData:Nt,addState:pt,clear:yt,getState:gt,getStates:ft,getRelations:St,getClasses:Lt,getDirection:Rt,addRelation:xt,getDividerId:$t,setDirection:wt,cleanupLabel:Ct,lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:mt,getRootDoc:ct,setRootDoc:lt,getRootDocV2:dt,extract:ut,trimColon:Ot,getAccTitle:o.iN,setAccTitle:o.SV,getAccDescription:o.m7,setAccDescription:o.EI,addStyleClass:vt,setCssClass:It,addDescription:Dt,setDiagramTitle:o.ke,getDiagramTitle:o.ab},Ft=(0,o.K2)((t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles")}}]); \ No newline at end of file diff --git a/js/165-ccff0039.chunk.min.js b/js/165-ccff0039.chunk.min.js new file mode 100644 index 0000000..894cb7d --- /dev/null +++ b/js/165-ccff0039.chunk.min.js @@ -0,0 +1,2 @@ +/*! For license information please see 165-ccff0039.chunk.min.js.LICENSE.txt */ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[165],{165:(e,t,n)=>{function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}n.d(t,{A:()=>ju});var h="undefined"==typeof window?null:window,p=h?h.navigator:null;h&&h.document;var f=r(""),g=r({}),v=r((function(){})),y="undefined"==typeof HTMLElement?"undefined":r(HTMLElement),m=function(e){return e&&e.instanceString&&x(e.instanceString)?e.instanceString():null},b=function(e){return null!=e&&r(e)==f},x=function(e){return null!=e&&r(e)===v},w=function(e){return!S(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},E=function(e){return null!=e&&r(e)===g&&!w(e)&&e.constructor===Object},k=function(e){return null!=e&&r(e)===r(1)&&!isNaN(e)},C=function(e){return"undefined"===y?void 0:null!=e&&e instanceof HTMLElement},S=function(e){return P(e)||D(e)},P=function(e){return"collection"===m(e)&&e._private.single},D=function(e){return"collection"===m(e)&&!e._private.single},T=function(e){return"core"===m(e)},_=function(e){return"stylesheet"===m(e)},M=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},B=function(e){return function(e){return null!=e&&r(e)===g}(e)&&x(e.then)},N=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},Y=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n=t||n<0||d&&e-u>=i}function g(){var e=Q();if(f(e))return v(e);s=setTimeout(g,function(e){var n=t-(e-l);return d?ye(n,i-(e-u)):n}(e))}function v(e){return s=void 0,h&&r?p(e):(r=a=void 0,o)}function y(){var e=Q(),n=f(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(g,t),c?p(e):o}(l);if(d)return clearTimeout(s),s=setTimeout(g,t),p(l)}return void 0===s&&(s=setTimeout(g,t)),o}return t=ge(t)||0,K(n)&&(c=!!n.leading,i=(d="maxWait"in n)?ve(ge(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=a=s=void 0},y.flush=function(){return void 0===s?o:v(Q())},y},be=h?h.performance:null,xe=be&&be.now?function(){return be.now()}:function(){return Date.now()},we=function(){if(h){if(h.requestAnimationFrame)return function(e){h.requestAnimationFrame(e)};if(h.mozRequestAnimationFrame)return function(e){h.mozRequestAnimationFrame(e)};if(h.webkitRequestAnimationFrame)return function(e){h.webkitRequestAnimationFrame(e)};if(h.msRequestAnimationFrame)return function(e){h.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(xe())}),1e3/60)}}(),Ee=function(e){return we(e)},ke=xe,Ce=9261,Se=5381,Pe=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ce;!(t=e.next()).done;)n=65599*n+t.value|0;return n},De=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ce)+e|0},Te=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Se;return(t<<5)+t+e|0},_e=function(e){return 2097152*e[0]+e[1]},Me=function(e,t){return[De(e[0],t[0]),Te(e[1],t[1])]},Be=function(e,t){var n={value:0,done:!1},r=0,a=e.length;return Pe({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},$e=function(e){e.splice(0,e.length)},Qe=function(e,t,n){return n&&(t=A(n,t)),e[t]},Je=function(e,t,n,r){n&&(t=A(n,t)),e[t]=r},et="undefined"!=typeof Map?Map:function(){function e(){a(this,e),this._obj={}}return o(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),tt=function(){function e(t){if(a(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&T(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new nt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition){var i=t.renderedPosition,o=e.pan(),s=e.zoom();a.position={x:(i.x-o.x)/s,y:(i.y-o.y)/s}}var l=[];w(t.classes)?l=t.classes:b(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,a,i,o){var s;if(null==a&&(a=0),null==o&&(o=n),a<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);an;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;ig;0<=g?++h:--h)v.push(i(e,r));return v},f=function(e,t,r,a){var i,o,s;for(null==a&&(a=n),i=e[r];r>t&&a(i,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=i},g=function(e,t,r){var a,i,o,s,l;for(null==r&&(r=n),i=e.length,l=t,o=e[t],a=2*t+1;a0;){var k=y.pop(),C=g(k),S=k.id();if(d[S]=C,C!==1/0)for(var P=k.neighborhood().intersect(p),D=0;D0)for(n.unshift(t);c[a];){var i=c[a];n.unshift(i.edge),n.unshift(i.node),a=(r=i.node).id()}return o.spawn(n)}}}},dt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,a=n.length,i=new Array(a),o=n,s=function(e){for(var t=0;t0;){if(u=(l=g.pop()).id(),v.delete(u),w++,u===d){for(var E=[],k=a,C=d,S=m[C];E.unshift(k),null!=S&&E.unshift(S),null!=(k=y[C]);)S=m[C=k.id()];return{found:!0,distance:h[u],path:this.spawn(E),steps:w}}f[u]=!0;for(var P=l._private.edges,D=0;DD&&(p[P]=D,y[P]=S,m[P]=w),!a){var T=S*u+C;!a&&p[T]>D&&(p[T]=D,y[T]=C,m[T]=w)}}}for(var _=0;_1&&void 0!==arguments[1]?arguments[1]:i,r=[],a=m(e);;){if(null==a)return t.spawn();var o=y(a),l=o.edge,u=o.pred;if(r.unshift(a[0]),a.same(n)&&r.length>0)break;null!=l&&r.unshift(l),a=u}return s.spawn(r)},hasNegativeWeightCycle:f,negativeWeightCycles:g}}},mt=Math.sqrt(2),bt=function(e,t,n){0===n.length&&qe("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],a=r[1],i=r[2],o=t[a],s=t[i],l=n,u=l.length-1;u>=0;u--){var c=l[u],d=c[1],h=c[2];(t[d]===o&&t[h]===s||t[d]===s&&t[h]===o)&&l.splice(u,1)}for(var p=0;pr;){var a=Math.floor(Math.random()*t.length);t=bt(a,e,t),n--}return t},wt={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var a=n.length,i=r.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),s=Math.floor(a/mt);if(!(a<2)){for(var l=[],u=0;u0?1:e<0?-1:0},Tt=function(e,t){return Math.sqrt(_t(e,t))},_t=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Mt=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},At=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},Lt=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Ot=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Rt=function(e){var t,n,r,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=a=i[0];else if(2===i.length)t=r=i[0],a=n=i[1];else if(4===i.length){var o=l(i,4);t=o[0],n=o[1],r=o[2],a=o[3]}return e.x1-=a,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Vt=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Ft=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},jt=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},qt=function(e,t){return jt(e,t.x1,t.y1)&&jt(e,t.x2,t.y2)},Yt=function(e,t,n,r,a,i,o){var s,l,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===u?ln(a,i):u,d=a/2,h=i/2,p=(c=Math.min(c,d,h))!==d,f=c!==h;if(p){var g=r-h-o;if((s=tn(e,t,n,r,n-d+c-o,g,n+d-c+o,g,!1)).length>0)return s}if(f){var v=n+d+o;if((s=tn(e,t,n,r,v,r-h+c-o,v,r+h-c+o,!1)).length>0)return s}if(p){var y=r+h+o;if((s=tn(e,t,n,r,n-d+c-o,y,n+d-c+o,y,!1)).length>0)return s}if(f){var m=n-d-o;if((s=tn(e,t,n,r,m,r-h+c-o,m,r+h-c+o,!1)).length>0)return s}var b=n-d+c,x=r-h+c;if((l=Jt(e,t,n,r,b,x,c+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=n+d-c,E=r-h+c;if((l=Jt(e,t,n,r,w,E,c+o)).length>0&&l[0]>=w&&l[1]<=E)return[l[0],l[1]];var k=n+d-c,C=r+h-c;if((l=Jt(e,t,n,r,k,C,c+o)).length>0&&l[0]>=k&&l[1]>=C)return[l[0],l[1]];var S=n-d+c,P=r+h-c;return(l=Jt(e,t,n,r,S,P,c+o)).length>0&&l[0]<=S&&l[1]>=P?[l[0],l[1]]:[]},Xt=function(e,t,n,r,a,i,o){var s=o,l=Math.min(n,a),u=Math.max(n,a),c=Math.min(r,i),d=Math.max(r,i);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},Wt=function(e,t,n,r,a,i,o,s,l){var u=Math.min(n,o,a)-l,c=Math.max(n,o,a)+l,d=Math.min(r,s,i)-l,h=Math.max(r,s,i)+l;return!(ec||th)},Ht=function(e,t,n,r,a,i,o,s){var l,u,c,d,h,p,f,g,v,y,m,b,x,w=[];u=9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,c=3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,d=1*n*a-n*n+n*e-a*e+r*i-r*r+r*t-i*t,0===(l=1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s)&&(l=1e-5),g=-27*(d/=l)+(u/=l)*(9*(c/=l)-u*u*2),p=(f=(3*c-u*u)/9)*f*f+(g/=54)*g,(h=w)[1]=0,b=u/3,p>0?(y=(y=g+Math.sqrt(p))<0?-Math.pow(-y,1/3):Math.pow(y,1/3),m=(m=g-Math.sqrt(p))<0?-Math.pow(-m,1/3):Math.pow(m,1/3),h[0]=-b+y+m,b+=(y+m)/2,h[4]=h[2]=-b,b=Math.sqrt(3)*(-m+y)/2,h[3]=b,h[5]=-b):(h[5]=h[3]=0,0===p?(x=g<0?-Math.pow(-g,1/3):Math.pow(g,1/3),h[0]=2*x-b,h[4]=h[2]=-(x+b)):(v=(f=-f)*f*f,v=Math.acos(g/Math.sqrt(v)),x=2*Math.sqrt(f),h[0]=-b+x*Math.cos(v/3),h[2]=-b+x*Math.cos((v+2*Math.PI)/3),h[4]=-b+x*Math.cos((v+4*Math.PI)/3)));for(var E=[],k=0;k<6;k+=2)Math.abs(w[k+1])<1e-7&&w[k]>=0&&w[k]<=1&&E.push(w[k]);E.push(1),E.push(0);for(var C,S,P,D=-1,T=0;T=0?Pl?(e-a)*(e-a)+(t-i)*(t-i):u-d},Gt=function(e,t,n){for(var r,a,i,o,s=0,l=0;l=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(o-a)+a>t&&s++}return s%2!=0},Ut=function(e,t,n,r,a,i,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var d,h=Math.cos(-u),p=Math.sin(-u),f=0;f0){var g=$t(c,-l);d=Zt(g)}else d=c;return Gt(e,t,d)},Zt=function(e){for(var t,n,r,a,i,o,s,l,u=new Array(e.length/2),c=0;c=0&&f<=1&&v.push(f),g>=0&&g<=1&&v.push(g),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},en=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},tn=function(e,t,n,r,a,i,o,s,l){var u=e-a,c=n-e,d=o-a,h=t-i,p=r-t,f=s-i,g=d*h-f*u,v=c*h-p*u,y=f*c-d*p;if(0!==y){var m=g/y,b=v/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*p]:[]}return 0===g||0===v?en(e,n,o)===o?[o,s]:en(e,n,a)===a?[a,i]:en(a,o,n)===n?[n,r]:[]:[]},nn=function(e,t,n,r,a,i,o,s){var l,u,c,d,h,p,f=[],g=new Array(n.length),v=!0;if(null==i&&(v=!1),v){for(var y=0;y0){var m=$t(g,-s);u=Zt(m)}else u=g}else u=n;for(var b=0;bu&&(u=t)},d=function(e){return l[e]},h=0;h0?x.edgesTo(b)[0]:b.edgesTo(x)[0];var w=r(m);b=b.id(),h[b]>h[v]+w&&(h[b]=h[v]+w,p.nodes.indexOf(b)<0?p.push(b):p.updateItem(b),u[b]=0,l[b]=[]),h[b]==h[v]+w&&(u[b]=u[b]+u[v],l[b].push(v))}else for(var E=0;E0;){for(var P=n.pop(),D=0;D0&&o.push(n[s]);0!==o.length&&a.push(r.collection(o))}return a}(c,l,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:_n,o=r,s=0;s=2?An(e,t,n,0,Nn,zn):An(e,t,n,0,Bn)},squaredEuclidean:function(e,t,n){return An(e,t,n,0,Nn)},manhattan:function(e,t,n){return An(e,t,n,0,Bn)},max:function(e,t,n){return An(e,t,n,-1/0,In)}};function On(e,t,n,r,a,i){var o;return o=x(e)?e:Ln[e]||Ln.euclidean,0===t&&x(e)?o(a,i):o(t,n,r,a,i)}Ln["squared-euclidean"]=Ln.squaredEuclidean,Ln.squaredeuclidean=Ln.squaredEuclidean;var Rn=Ue({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Vn=function(e){return Rn(e)},Fn=function(e,t,n,r,a){var i="kMedoids"!==a?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return On(e,r.length,i,(function(e){return r[e](t)}),o,s)},jn=function(e,t,n){for(var r=n.length,a=new Array(r),i=new Array(r),o=new Array(t),s=null,l=0;ln)return!1;return!0},Hn=function(e,t,n){for(var r=0;ra&&(a=t[l][u],i=u);o[i].push(e[l])}for(var c=0;c=a.threshold||"dendrogram"===a.mode&&1===e.length)return!1;var p,f=t[o],g=t[r[o]];p="dendrogram"===a.mode?{left:f,right:g,key:f.key}:{value:f.value.concat(g.value),key:f.key},e[f.index]=p,e.splice(g.index,1),t[f.key]=p;for(var v=0;vn[g.key][y.key]&&(i=n[g.key][y.key])):"max"===a.linkage?(i=n[f.key][y.key],n[f.key][y.key]o&&(i=l,o=t[a*e+l])}i>0&&r.push(i)}for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,o=e.length-1;o>=0;o--){var s=e[o];a?isFinite(s)||(e[o]=-1/0,i++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+i]:(e[u-1+i]+e[u+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,a=0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,a=t;a=D?(T=D,D=M,_=B):M>T&&(T=M);for(var N=0;N0?1:0;C[E%u.minIterations*t+R]=V,O+=V}if(O>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var F=0,j=0;j0&&r.push(a);return r}(t,i,o),X=function(e,t,n){for(var r=ur(e,t,n),a=0;al&&(s=u,l=c)}n[a]=i[s]}return ur(e,t,n)}(t,r,Y),W={},H=0;H1)}}));var l=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(l),components:a}},fr=function(){var e=this,t={},n=0,r=[],a=[],i=e.spawn(e),o=function o(s){if(a.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=a.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),d=l.merge(c);r.push(d),i=i.difference(d)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:i,components:r}},gr={};[it,ct,dt,pt,gt,yt,wt,hn,fn,vn,mn,Tn,Qn,or,dr,{hierholzer:function(e){if(!E(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,a,i=hr(e),o=i.root,s=i.directed,l=this,u=!1;o&&(a=b(o)?this.filter(o)[0].id():o[0].id());var c={},d={};s?l.forEach((function(e){var t=e.id();if(e.isNode()){var a=e.indegree(!0),i=e.outdegree(!0),o=a-i,s=i-a;1==o?n?u=!0:n=t:1==s?r?u=!0:r=t:(s>1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else d[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):d[t]=[e.source().id(),e.target().id()]}));var h={found:!1,trail:void 0};if(u)return h;if(r&&n)if(s){if(a&&r!=a)return h;a=r}else{if(a&&r!=a&&n!=a)return h;a||(a=r)}else a||(a=l[0].id());var p=function(e){for(var t,n,r,a=e,i=[e];c[a].length;)t=c[a].shift(),n=d[t][0],a!=(r=d[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),a=r):s||a==n||(c[n]=c[n].filter((function(e){return e!=t})),a=n),i.unshift(t),i.unshift(a);return i},f=[],g=[];for(g=p(a);1!=g.length;)0==c[g[0]].length?(f.unshift(l.getElementById(g.shift())),f.unshift(l.getElementById(g.shift()))):g=p(g.shift()).concat(g);for(var v in f.unshift(l.getElementById(g.shift())),c)if(c[v].length)return h;return h.found=!0,h.trail=this.spawn(f,!0),h}},{hopcroftTarjanBiconnected:pr,htbc:pr,htb:pr,hopcroftTarjanBiconnectedComponents:pr},{tarjanStronglyConnected:fr,tsc:fr,tscc:fr,tarjanStronglyConnectedComponents:fr}].forEach((function(e){Y(gr,e)}));var vr=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};vr.prototype={fulfill:function(e){return yr(this,1,"fulfillValue",e)},reject:function(e){return yr(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new vr;return n.onFulfilled.push(xr(e,r,"fulfill")),n.onRejected.push(xr(t,r,"reject")),mr(n),r.proxy}};var yr=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,mr(e)),e},mr=function(e){1===e.state?br(e,"onFulfilled",e.fulfillValue):2===e.state&&br(e,"onRejected",e.rejectReason)},br=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var a=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1},Ur.prototype.set=function(e,t){var n=this.__data__,r=Kr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var Zr=Ur,$r=Fr($,"Map"),Qr=function(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map};function Jr(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){w(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,a=[],i=0,o=n.length;i0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};Pa.className=Pa.classNames=Pa.classes;var Da={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:O,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Da.variable="(?:[\\w-.]|(?:\\\\"+Da.metaChar+"))+",Da.className="(?:[\\w-]|(?:\\\\"+Da.metaChar+"))+",Da.value=Da.string+"|"+Da.number,Da.id=Da.variable,function(){var e,t,n;for(e=Da.comparatorOp.split("|"),n=0;n=0||"="!==t&&(Da.comparatorOp+="|\\!"+t)}();var Ta=20,_a=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*q(e,t)}(e.selector,t.selector)})),Ma=function(){for(var e,t={},n=0;n<_a.length;n++)t[(e=_a[n]).selector]=e.matches;return t}(),Ba="("+_a.map((function(e){return e.selector})).join("|")+")",Na=function(e){return e.replace(new RegExp("\\\\("+Da.metaChar+")","g"),(function(e,t){return t}))},za=function(e,t,n){e[e.length-1]=n},Ia=[{name:"group",query:!0,regex:"("+Da.group+")",populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:0,value:"*"===r?r:r+"s"})}},{name:"state",query:!0,regex:Ba,populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:7,value:r})}},{name:"id",query:!0,regex:"\\#("+Da.id+")",populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:8,value:Na(r)})}},{name:"className",query:!0,regex:"\\.("+Da.className+")",populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:9,value:Na(r)})}},{name:"dataExists",query:!0,regex:"\\[\\s*("+Da.variable+")\\s*\\]",populate:function(e,t,n){var r=l(n,1)[0];t.checks.push({type:4,field:Na(r)})}},{name:"dataCompare",query:!0,regex:"\\[\\s*("+Da.variable+")\\s*("+Da.comparatorOp+")\\s*("+Da.value+")\\s*\\]",populate:function(e,t,n){var r=l(n,3),a=r[0],i=r[1],o=r[2];o=null!=new RegExp("^"+Da.string+"$").exec(o)?o.substring(1,o.length-1):parseFloat(o),t.checks.push({type:3,field:Na(a),operator:i,value:o})}},{name:"dataBool",query:!0,regex:"\\[\\s*("+Da.boolOp+")\\s*("+Da.variable+")\\s*\\]",populate:function(e,t,n){var r=l(n,2),a=r[0],i=r[1];t.checks.push({type:5,field:Na(i),operator:a})}},{name:"metaCompare",query:!0,regex:"\\[\\[\\s*("+Da.meta+")\\s*("+Da.comparatorOp+")\\s*("+Da.number+")\\s*\\]\\]",populate:function(e,t,n){var r=l(n,3),a=r[0],i=r[1],o=r[2];t.checks.push({type:6,field:Na(a),operator:i,value:parseFloat(o)})}},{name:"nextQuery",separator:!0,regex:Da.separator,populate:function(e,t){var n=e.currentSubject,r=e.edgeCount,a=e.compoundCount,i=e[e.length-1];return null!=n&&(i.subject=n,e.currentSubject=null),i.edgeCount=r,i.compoundCount=a,e.edgeCount=0,e.compoundCount=0,e[e.length++]={checks:[]}}},{name:"directedEdge",separator:!0,regex:Da.directedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,a={checks:[]};return n.checks.push({type:11,source:r,target:a}),za(e,0,n),e.edgeCount++,a}var i={checks:[]},o=t,s={checks:[]};return i.checks.push({type:12,source:o,target:s}),za(e,0,i),e.edgeCount++,s}},{name:"undirectedEdge",separator:!0,regex:Da.undirectedEdge,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r=t,a={checks:[]};return n.checks.push({type:10,nodes:[r,a]}),za(e,0,n),e.edgeCount++,a}var i={checks:[]},o=t,s={checks:[]};return i.checks.push({type:14,node:o,neighbor:s}),za(e,0,i),s}},{name:"child",separator:!0,regex:Da.child,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},a=e[e.length-1];return n.checks.push({type:15,parent:a,child:r}),za(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var i={checks:[]},o=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return i.checks.push({type:19,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:Ta}],c.checks.push({type:Ta}),s.checks.push({type:17,parent:c,child:u}),za(e,0,i),e.currentSubject=l,e.compoundCount++,u}var d={checks:[]},h={checks:[]},p=[{type:17,parent:d,child:h}];return d.checks=t.checks,t.checks=p,e.compoundCount++,h}},{name:"descendant",separator:!0,regex:Da.descendant,populate:function(e,t){if(null==e.currentSubject){var n={checks:[]},r={checks:[]},a=e[e.length-1];return n.checks.push({type:16,ancestor:a,descendant:r}),za(e,0,n),e.compoundCount++,r}if(e.currentSubject===t){var i={checks:[]},o=e[e.length-1],s={checks:[]},l={checks:[]},u={checks:[]},c={checks:[]};return i.checks.push({type:19,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:Ta}],c.checks.push({type:Ta}),s.checks.push({type:18,ancestor:c,descendant:u}),za(e,0,i),e.currentSubject=l,e.compoundCount++,u}var d={checks:[]},h={checks:[]},p=[{type:18,ancestor:d,descendant:h}];return d.checks=t.checks,t.checks=p,e.compoundCount++,h}},{name:"subject",modifier:!0,regex:Da.subject,populate:function(e,t){if(null!=e.currentSubject&&e.currentSubject!==t)return Xe("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var n=e[e.length-1].checks[0],r=null==n?null:n.type;11===r?n.type=13:10===r&&(n.type=14,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];Ia.forEach((function(e){return e.regexObj=new RegExp("^"+e.regex)}));var Aa=function(e){for(var t,n,r,a=0;a0&&u.edgeCount>0)return Xe("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return Xe("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&Xe("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return b(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(a,i){return a.checks.reduce((function(o,s,l){return o+(i===a&&0===l?"$":"")+function(a,i){var o=a.type,s=a.value;switch(o){case 0:var l=e(s);return l.substring(0,l.length-1);case 3:var u=a.field,c=a.operator;return"["+u+n(e(c))+t(s)+"]";case 5:var d=a.operator,h=a.field;return"["+e(d)+h+"]";case 4:return"["+a.field+"]";case 6:var p=a.operator;return"[["+a.field+n(e(p))+t(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(a.parent,i)+n(">")+r(a.child,i);case 18:case 16:return r(a.ancestor,i)+" "+r(a.descendant,i);case 19:var f=r(a.left,i),g=r(a.subject,i),v=r(a.right,i);return f+(f.length>0?" ":"")+g+v;case Ta:return""}}(s,i)}),"")},a="",i=0;i1&&i=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(a=o||s?""+e:"",i=""+n),u&&(e=a=a.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=a.indexOf(i)>=0;break;case"$=":r=a.indexOf(i,a.length-i.length)>=0;break;case"^=":r=0===a.indexOf(i);break;case"=":r=e===n;break;case">":d=!0,r=e>n;break;case">=":d=!0,r=e>=n;break;case"<":d=!0,r=e0;){var u=a.shift();t(u),i.add(u.id()),o&&r(a,i,u)}return e}function Za(e,t,n){if(n.isParent())for(var r=n._private.children,a=0;a1&&void 0!==arguments[1])||arguments[1],Za)},Ga.forEachUp=function(e){return Ua(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],$a)},Ga.forEachUpAndDown=function(e){return Ua(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],Qa)},Ga.ancestors=Ga.parents,(Wa=Ha={data:Ca.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Ca.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Ca.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ca.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Ca.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Ca.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Wa.data,Wa.removeAttr=Wa.removeData;var Ja,ei,ti=Ha,ni={};function ri(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,a=n[0],i=a._private.edges,o=0;ot})),minIndegree:ai("indegree",(function(e,t){return et})),minOutdegree:ai("outdegree",(function(e,t){return et}))}),Y(ni,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var d=c?l.position():{x:0,y:0};return a={x:s.x-d.x,y:s.y-d.y},void 0===e?a:a[e]}for(var h=0;h0,v=g;g&&(f=f[0]);var y=v?f.position():{x:0,y:0};void 0!==t?p.position(e,t+y[e]):void 0!==a&&p.position({x:a.x+y.x,y:a.y+y.y})}}else if(!i)return;return this}},Ja.modelPosition=Ja.point=Ja.position,Ja.modelPositions=Ja.points=Ja.positions,Ja.renderedPoint=Ja.renderedPosition,Ja.relativePoint=Ja.relativePosition;var si,li,ui=ei;si=li={},li.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),a=n.pan(),i=t.x1*r+a.x,o=t.x2*r+a.x,s=t.y1*r+a.y,l=t.y2*r+a.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}},li.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},li.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,a={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-i.w/2,i.x2=o.x+i.w/2,i.y1=o.y-i.h/2,i.y2=o.y+i.h/2);var s=a.width.left.value;"px"===a.width.left.units&&a.width.val>0&&(s=100*s/a.width.val);var l=a.width.right.value;"px"===a.width.right.units&&a.width.val>0&&(l=100*l/a.width.val);var u=a.height.top.value;"px"===a.height.top.units&&a.height.val>0&&(u=100*u/a.height.val);var c=a.height.bottom.value;"px"===a.height.bottom.units&&a.height.val>0&&(c=100*c/a.height.val);var d=y(a.width.val-i.w,s,l),h=d.biasDiff,p=d.biasComplementDiff,f=y(a.height.val-i.h,u,c),g=f.biasDiff,v=f.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,a.width.val),o.x=(-h+i.x1+i.x2+p)/2,t.autoHeight=Math.max(i.h,a.height.val),o.y=(-g+i.y1+i.y2+v)/2}function y(e,t,n){var r=0,a=0,i=t+n;return e>0&&i>0&&(r=t/i*e,a=n/i*e),{biasDiff:r,biasComplementDiff:a}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},hi=function(e,t){return null==t?e:di(e,t.x1,t.y1,t.x2,t.y2)},pi=function(e,t,n){return Qe(e,t,n)},fi=function(e,t,n){if(!t.cy().headless()){var r,a,i=t._private,o=i.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,a=o.srcY):"target"===n?(r=o.tgtX,a=o.tgtY):(r=o.midX,a=o.midY);var l=i.arrowBounds=i.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=a-s,u.x2=r+s,u.y2=a+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Ot(u,1),di(e,u.x1,u.y1,u.x2,u.y2)}}},gi=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var a=t._private,i=a.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),d=t.pstyle("text-valign"),h=pi(i,"labelWidth",n),p=pi(i,"labelHeight",n),f=pi(i,"labelX",n),g=pi(i,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,k=p,C=h,S=C/2,P=k/2;if(m)o=f-S,s=f+S,l=g-P,u=g+P;else{switch(c.value){case"left":o=f-C,s=f;break;case"center":o=f-S,s=f+S;break;case"right":o=f,s=f+C}switch(d.value){case"top":l=g-k,u=g;break;case"center":l=g-P,u=g+P;break;case"bottom":l=g,u=g+k}}o+=v-Math.max(x,w)-E-2,s+=v+Math.max(x,w)+E+2,l+=y-Math.max(x,w)-E-2,u+=y+Math.max(x,w)+E+2;var D=n||"main",T=a.labelBounds,_=T[D]=T[D]||{};_.x1=o,_.y1=l,_.x2=s,_.y2=u,_.w=s-o,_.h=u-l;var M=m&&"autorotate"===b.strValue,B=null!=b.pfValue&&0!==b.pfValue;if(M||B){var N=M?pi(a.rstyle,"labelAngle",n):b.pfValue,z=Math.cos(N),I=Math.sin(N),A=(o+s)/2,L=(l+u)/2;if(!m){switch(c.value){case"left":A=s;break;case"right":A=o}switch(d.value){case"top":L=u;break;case"bottom":L=l}}var O=function(e,t){return{x:(e-=A)*z-(t-=L)*I+A,y:e*I+t*z+L}},R=O(o,l),V=O(o,u),F=O(s,l),j=O(s,u);o=Math.min(R.x,V.x,F.x,j.x),s=Math.max(R.x,V.x,F.x,j.x),l=Math.min(R.y,V.y,F.y,j.y),u=Math.max(R.y,V.y,F.y,j.y)}var q=D+"Rot",Y=T[q]=T[q]||{};Y.x1=o,Y.y1=l,Y.x2=s,Y.y2=u,Y.w=s-o,Y.h=u-l,di(e,o,l,s,u),di(a.labelBounds.all,o,l,s,u)}return e}},vi=function(e){var t=0,n=function(e){return(e?1:0)<0&&i>0){var o=t.pstyle("outline-offset").value,s=t.pstyle("shape").value,l=i+o,u=(e.w+2*l)/e.w,c=(e.h+2*l)/e.h,d=0;["diamond","pentagon","round-triangle"].includes(s)?(u=(e.w+2.4*l)/e.w,d=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?u=(e.w+2.4*l)/e.w:"star"===s?(u=(e.w+2.8*l)/e.w,c=(e.h+2.6*l)/e.h,d=-l/3.8):"triangle"===s?(u=(e.w+2.8*l)/e.w,c=(e.h+2.4*l)/e.h,d=-l/1.4):"vee"===s&&(u=(e.w+4.4*l)/e.w,c=(e.h+3.8*l)/e.h,d=.5*-l);var h=e.h*c-e.h,p=e.w*u-e.w;if(Rt(e,[Math.ceil(h/2),Math.ceil(p/2)]),0!==d){var f=(r=d,{x1:(n=e).x1+0,x2:n.x2+0,y1:n.y1+r,y2:n.y2+r,w:n.w,h:n.h});At(e,f)}}}}(h,e)}else if(g&&t.includeEdges)if(c&&!d){var D=e.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),a=Math.min(v.srcY,v.midY,v.tgtY),i=Math.max(v.srcY,v.midY,v.tgtY),di(h,n-=k,a-=k,r+=k,i+=k),"haystack"===D){var T=v.haystackPts;if(T&&2===T.length){if(n=T[0].x,a=T[0].y,n>(r=T[1].x)){var _=n;n=r,r=_}if(a>(i=T[1].y)){var M=a;a=i,i=M}di(h,n-k,a-k,r+k,i+k)}}else if("bezier"===D||"unbundled-bezier"===D||D.endsWith("segments")||D.endsWith("taxi")){var B;switch(D){case"bezier":case"unbundled-bezier":B=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":B=v.linePts}if(null!=B)for(var N=0;N(r=A.x)){var L=n;n=r,r=L}if((a=I.y)>(i=A.y)){var O=a;a=i,i=O}di(h,n-=k,a-=k,r+=k,i+=k)}if(c&&t.includeEdges&&g&&(fi(h,e,"mid-source"),fi(h,e,"mid-target"),fi(h,e,"source"),fi(h,e,"target")),c&&"yes"===e.pstyle("ghost").value){var R=e.pstyle("ghost-offset-x").pfValue,V=e.pstyle("ghost-offset-y").pfValue;di(h,h.x1+R,h.y1+V,h.x2+R,h.y2+V)}var F=p.bodyBounds=p.bodyBounds||{};Vt(F,h),Rt(F,y),Ot(F,1),c&&(n=h.x1,r=h.x2,a=h.y1,i=h.y2,di(h,n-E,a-E,r+E,i+E));var j=p.overlayBounds=p.overlayBounds||{};Vt(j,h),Rt(j,y),Ot(j,1);var q=p.labelBounds=p.labelBounds||{};null!=q.all?((l=q.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):q.all=It(),c&&t.includeLabels&&(t.includeMainLabels&&gi(h,e,null),g&&(t.includeSourceLabels&&gi(h,e,"source"),t.includeTargetLabels&&gi(h,e,"target")))}return h.x1=ci(h.x1),h.y1=ci(h.y1),h.x2=ci(h.x2),h.y2=ci(h.y2),h.w=ci(h.x2-h.x1),h.h=ci(h.y2-h.y1),h.w>0&&h.h>0&&b&&(Rt(h,y),Ot(h,1)),h}(e,bi),r.bbCache=n,r.bbCachePosKey=o):n=r.bbCache,!i){var c=e.isNode();n=It(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?hi(n,r.overlayBounds):hi(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!a||t.includeSourceLabels&&t.includeTargetLabels)?hi(n,r.labelBounds.all):(t.includeMainLabels&&hi(n,r.labelBounds.mainRot),t.includeSourceLabels&&hi(n,r.labelBounds.sourceRot),t.includeTargetLabels&&hi(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},bi={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},xi=vi(bi),wi=Ue(bi);li.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=It();var n=wi(e=e||bi),r=this;if(r.cy().styleEnabled())for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:Li,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},Ri.removeAllListeners=function(){return this.removeListener("*")},Ri.emit=Ri.trigger=function(e,t,n){var r=this.listeners,a=r.length;return this.emitting++,w(t)||(t=[t]),function(e,t,n){if("event"!==m(n))if(E(n))t(e,Fi(e,n));else for(var r=w(n)?n:n.split(/\s+/),a=0;a1&&!r){var a=this.length-1,i=this[a],o=i._private.data.id;this[a]=void 0,this[e]=i,n.set(o,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var a=r.index;return this.unmergeAt(a),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&b(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,a=0;ar&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,a=this,i=0;i=0&&a1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var a=n._private.style[e];return null!=a?a:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,a=n.style();if(E(e)){var i=e;a.applyBypass(this,i,r),this.emitAndNotify("style")}else if(b(e)){if(void 0===t){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}a.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?a.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),a=this;if(void 0===e)for(var i=0;i0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),ho.neighbourhood=ho.neighborhood,ho.closedNeighbourhood=ho.closedNeighborhood,ho.openNeighbourhood=ho.openNeighborhood,Y(ho,{source:Ka((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Ka((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:vo({attr:"source"}),targets:vo({attr:"target"})}),Y(ho,{edgesWith:Ka(yo(),"edgesWith"),edgesTo:Ka(yo({thisIsSrc:!0}),"edgesTo")}),Y(ho,{connectedEdges:Ka((function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),ho.componentsOf=ho.components;var bo=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var a=new et,i=!1;if(t){if(t.length>0&&E(t[0])&&!P(t[0])){i=!0;for(var o=[],s=new nt,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this,i=a.cy(),o=i._private,s=[],l=[],u=0,c=a.length;u0){for(var O=e.length===a.length?a:new bo(i,e),R=0;R0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],a={},i=n._private.cy;function o(e){var n=a[e.id()];t&&e.removed()||n||(a[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?k.emitAndNotify("remove"):t&&k.emit("remove"));for(var C=0;C=.001?function(t,r){for(var a=0;a<4;++a){var i=h(r,e,n);if(0===i)return r;r-=(d(r,e,n)-t)/i}return r}(t,o):0===l?o:function(t,r,a){var i,o,s=0;do{(i=d(o=r+(a-r)/2,e,n)-t)>0?a=o:r=o}while(Math.abs(i)>1e-7&&++s<10);return o}(t,r,r+a)}(i),t,r)};f.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var g="generateBezier("+[e,t,n,r]+")";return f.toString=function(){return g},f}var ko=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var a={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:a.v,dv:e(a)}}function n(n,r){var a={dx:n.v,dv:e(n)},i=t(n,.5*r,a),o=t(n,.5*r,i),s=t(n,r,o),l=1/6*(a.dx+2*(i.dx+o.dx)+s.dx),u=1/6*(a.dv+2*(i.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,a){var i,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,a=a||null,l.tension=t,l.friction=r,o=(i=null!==a)?(c=e(t,r))/a*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return i?function(e){return u[e*(u.length-1)|0]}:c}}(),Co=function(e,t,n,r){var a=Eo(e,t,n,r);return function(e,t,n){return e+(t-e)*a(n)}},So={linear:function(e,t,n){return e+(t-e)*n},ease:Co(.25,.1,.25,1),"ease-in":Co(.42,0,1,1),"ease-out":Co(0,0,.58,1),"ease-in-out":Co(.42,0,.58,1),"ease-in-sine":Co(.47,0,.745,.715),"ease-out-sine":Co(.39,.575,.565,1),"ease-in-out-sine":Co(.445,.05,.55,.95),"ease-in-quad":Co(.55,.085,.68,.53),"ease-out-quad":Co(.25,.46,.45,.94),"ease-in-out-quad":Co(.455,.03,.515,.955),"ease-in-cubic":Co(.55,.055,.675,.19),"ease-out-cubic":Co(.215,.61,.355,1),"ease-in-out-cubic":Co(.645,.045,.355,1),"ease-in-quart":Co(.895,.03,.685,.22),"ease-out-quart":Co(.165,.84,.44,1),"ease-in-out-quart":Co(.77,0,.175,1),"ease-in-quint":Co(.755,.05,.855,.06),"ease-out-quint":Co(.23,1,.32,1),"ease-in-out-quint":Co(.86,0,.07,1),"ease-in-expo":Co(.95,.05,.795,.035),"ease-out-expo":Co(.19,1,.22,1),"ease-in-out-expo":Co(1,0,0,1),"ease-in-circ":Co(.6,.04,.98,.335),"ease-out-circ":Co(.075,.82,.165,1),"ease-in-out-circ":Co(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return So.linear;var r=ko(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":Co};function Po(e,t,n,r,a){if(1===r)return n;if(t===n)return n;var i=a(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function Do(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function To(e,t,n,r,a){var i=null!=a?a.type:null;n<0?n=0:n>1&&(n=1);var o=Do(e,a),s=Do(t,a);if(k(o)&&k(s))return Po(i,o,s,n,r);if(w(o)&&w(s)){for(var l=[],u=0;u0?("spring"===d&&h.push(o.duration),o.easingImpl=So[d].apply(null,h)):o.easingImpl=So[d]}var p,f=o.easingImpl;if(p=0===o.duration?1:(n-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var g=o.startPosition,v=o.position;if(v&&a&&!e.locked()){var y={};Mo(g.x,v.x)&&(y.x=To(g.x,v.x,p,f)),Mo(g.y,v.y)&&(y.y=To(g.y,v.y,p,f)),e.position(y)}var m=o.startPan,x=o.pan,w=i.pan,E=null!=x&&r;E&&(Mo(m.x,x.x)&&(w.x=To(m.x,x.x,p,f)),Mo(m.y,x.y)&&(w.y=To(m.y,x.y,p,f)),e.emit("pan"));var k=o.startZoom,C=o.zoom,S=null!=C&&r;S&&(Mo(k,C)&&(i.zoom=zt(i.minZoom,To(k,C,p,f),i.maxZoom)),e.emit("zoom")),(E||S)&&e.emit("viewport");var P=o.style;if(P&&P.length>0&&a){for(var D=0;D=0;t--)(0,e[t])();e.splice(0,e.length)},c=i.length-1;c>=0;c--){var d=i[c],h=d._private;h.stopped?(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||Bo(0,d,e),_o(t,d,e,n),h.applying&&(h.applying=!1),u(h.frames),null!=h.step&&h.step(e),d.completed()&&(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.completes)),s=!0)}return n||0!==i.length||0!==o.length||r.push(t),s}for(var i=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var zo={animate:Ca.animate(),animation:Ca.animation(),animated:Ca.animated(),clearQueue:Ca.clearQueue(),delay:Ca.delay(),delayAnimation:Ca.delayAnimation(),stop:Ca.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){No(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&Ee((function(n){No(n,e),t()}))}()}}},Io={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&P(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Ao=function(e){return b(e)?new qa(e):e},Lo={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Oi(Io,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Ao(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Ao(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Ao(t),n),this},once:function(e,t,n){return this.emitter().one(e,Ao(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Ca.eventAliasesOn(Lo);var Oo={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Oo.jpeg=Oo.jpg;var Ro={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,r=e.name,a=t.extension("layout",r);if(null!=a)return n=b(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new a(Y({},e,{cy:t,eles:n}));qe("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else qe("A `name` must be specified to make a layout");else qe("Layout options must be specified to make a layout")}};Ro.createLayout=Ro.makeLayout=Ro.layout;var Vo={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var a=this.renderer();!this.destroyed()&&a&&a.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};jo.invalidateDimensions=jo.resize;var qo={collection:function(e,t){return b(e)?this.$(e):S(e)?e.collection():w(e)?(t||(t={}),new bo(this,e,t.unique,t.removed)):new bo(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};qo.elements=qo.filter=qo.$;var Yo={},Xo="t";Yo.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(h||d&&p){var f=void 0;h&&p||h?f=u.properties:p&&(f=u.mappedProperties);for(var g=0;g1&&(v=1),s.color){var w=a.valueMin[0],E=a.valueMax[0],C=a.valueMin[1],S=a.valueMax[1],P=a.valueMin[2],D=a.valueMax[2],T=null==a.valueMin[3]?1:a.valueMin[3],_=null==a.valueMax[3]?1:a.valueMax[3],M=[Math.round(w+(E-w)*v),Math.round(C+(S-C)*v),Math.round(P+(D-P)*v),Math.round(T+(_-T)*v)];n={bypass:a.bypass,name:a.name,value:M,strValue:"rgb("+M[0]+", "+M[1]+", "+M[2]+")"}}else{if(!s.number)return!1;var B=a.valueMin+(a.valueMax-a.valueMin)*v;n=this.parse(a.name,B,a.bypass,h)}if(!n)return g(),!1;n.mapping=a,a=n;break;case o.data:for(var N=a.field.split("."),z=d.data,I=0;I0&&i>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1)},Yo.checkTrigger=function(e,t,n,r,a,i){var o=this.properties[t],s=a(o);null!=s&&s(n,r)&&i(o)},Yo.checkZOrderTrigger=function(e,t,n,r){var a=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){a._private.cy.notify("zorder",e)}))},Yo.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(a){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!a.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()})),!a.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},Yo.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Wo={applyBypass:function(e,t,n,r){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;it.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");!i.match(/^\s*$/);){var l=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){Xe("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=l[0];var u=l[1];if("core"!==u&&new qa(u).invalid)Xe("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();else{var c=l[2],d=!1;n=c;for(var h=[];!n.match(/^\s*$/);){var p=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Xe("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),d=!0;break}r=p[0];var f=p[1],g=p[2];this.properties[f]?a.parse(f,g)?(h.push({name:f,val:g}),s()):(Xe("Skipping property: Invalid property definition in: "+r),s()):(Xe("Skipping property: Invalid property name in: "+r),s())}if(d){o();break}a.selector(u);for(var v=0;v=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var h=s.data;return{name:e,value:u,strValue:""+t,mapped:h,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(d.multiple)return!1;var p=s.mapData;if(!d.color&&!d.number)return!1;var f=this.parse(e,c[4]);if(!f||f.mapped)return!1;var g=this.parse(e,c[5]);if(!g||g.mapped)return!1;if(f.pfValue===g.pfValue||f.strValue===g.strValue)return Xe("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+f.strValue+"`"),this.parse(e,f.strValue);if(d.color){var v=f.value,y=g.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:f.value,valueMax:g.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):w(t)?t:[t],d.evenMultiple&&m.length%2!=0)return null;for(var E=[],C=[],S=[],P="",D=!1,T=0;T0?" ":"")+_.strValue}return d.validate&&!d.validate(E,C)?null:d.singleEnum&&D?1===E.length&&b(E[0])?{name:e,value:E[0],strValue:E[0],bypass:n}:null:{name:e,value:E,pfValue:S,strValue:P,bypass:n,units:C}}var M,B,N,I=function(){for(var r=0;rd.max||d.strictMax&&t===d.max))return null;var q={name:e,value:t,strValue:""+t+(A||""),units:A,bypass:n};return d.unitless||"px"!==A&&"em"!==A?q.pfValue=t:q.pfValue="px"!==A&&A?this.getEmSizeInPixels()*t:t,"ms"!==A&&"s"!==A||(q.pfValue="ms"===A?t:1e3*t),"deg"!==A&&"rad"!==A||(q.pfValue="rad"===A?t:(M=t,Math.PI*M/180)),"%"===A&&(q.pfValue=t/100),q}if(d.propList){var Y=[],W=""+t;if("none"===W);else{for(var H=W.split(/\s*,\s*|\s+/),K=0;K255)return;t.push(Math.floor(i))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(N)||function(e){var t,n,r,a,i,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+F+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)o=s=l=Math.round(255*a);else{var d=a<.5?a*(1+r):a+r-a*r,h=2*a-d;o=Math.round(255*u(h,d,n+1/3)),s=Math.round(255*u(h,d,n)),l=Math.round(255*u(h,d,n-1/3))}t=[o,s,l,i]}return t}(N);return U?{name:e,value:U,pfValue:U,strValue:"rgb("+U[0]+","+U[1]+","+U[2]+")",bypass:n}:null}if(d.regex||d.regexes){if(d.enums){var Z=I();if(Z)return Z}for(var $=d.regexes?d.regexes:[d.regex],Q=0;Q<$.length;Q++){var J=new RegExp($[Q]).exec(t);if(J)return{name:e,value:d.singleRegexMatchValue?J[1]:J,strValue:""+t,bypass:n}}return null}return d.string?{name:e,value:""+t,strValue:""+t,bypass:n}:d.enums?I():null};var Qo=function e(t){if(!(this instanceof e))return new e(t);T(t)?(this._private={cy:t,coreStyle:{}},this.length=0,this.resetToDefault()):qe("A style must have a core reference")},Jo=Qo.prototype;Jo.instanceString=function(){return"style"},Jo.clear=function(){for(var e=this._private,t=e.cy.elements(),n=0;n0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,a=r.pan,i=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),k(e)?n=e:E(e)&&(n=e.level,null!=e.position?t=Et(e.position,i,a):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,a.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;k(l.x)&&(t.pan.x=l.x,o=!1),k(l.y)&&(t.pan.y=l.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(b(e)){var n=e;e=this.mutableElements().filter(n)}else S(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),a=this.width(),i=this.height();return{x:(a-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=this.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};ts.centre=ts.center,ts.autolockNodes=ts.autolock,ts.autoungrabifyNodes=ts.autoungrabify;var ns={data:Ca.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Ca.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Ca.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Ca.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ns.attr=ns.data,ns.removeAttr=ns.removeData;var rs=function(e){var t=this,n=(e=Y({},e)).container;n&&!C(n)&&C(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var a=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==h&&void 0!==n&&!e.headless,o=e;o.layout=Y({name:i?"grid":"null"},o.layout),o.renderer=Y({name:i?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new bo(this),listeners:[],aniEles:new bo(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?i:o.styleEnabled,zoom:k(o.zoom)?o.zoom:1,pan:{x:E(o.pan)&&k(o.pan.x)?o.pan.x:0,y:E(o.pan)&&k(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom}),l.styleEnabled&&t.setStyle([]);var u=Y({},o,o.renderer);t.initRenderer(u),function(e,t){if(e.some(B))return Er.all(e).then(t);t(e)}([o.style,o.elements],(function(e){var n=e[0],i=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&(E(e)||w(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var i=Y({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,(function(){t.startAnimationLoop(),l.ready=!0,x(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,u=It(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(S(n.roots))e=n.roots;else if(w(n.roots)){for(var c=[],d=0;d0;){var N=_.shift(),z=T(N,M);if(z)N.outgoers().filter((function(e){return e.isNode()&&a.has(e)})).forEach(B);else if(null===z){Xe("Detected double maximal shift for node `"+N.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}D();var I=0;if(n.avoidOverlap)for(var A=0;A0&&y[0].length<=3?l/2:0),d=2*Math.PI/y[r].length*a;return 0===r&&1===y[0].length&&(c=1),{x:G+c*Math.cos(d),y:U+c*Math.sin(d)}}return{x:G+(a+1-(i+1)/2)*o,y:(r+1)*s}})),this};var cs={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function ds(e){this.options=Y({},cs,e)}ds.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var o,s=It(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),d=0,h=0;h1&&t.avoidOverlap){d*=1.75;var v=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(d*d/(v*v+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(a?1:-1),i=o*Math.cos(r),s=o*Math.sin(r);return{x:l+i,y:u+s}})),this};var hs,ps={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function fs(e){this.options=Y({},ps,e)}fs.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,a=t.eles,i=a.nodes().not(":parent"),o=It(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,d=0;d0&&Math.abs(m[0].value-x.value)>=v&&(m=[],y.push(m)),m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,k=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,k)}for(var C=0,S=0;S1&&t.avoidOverlap){var _=Math.cos(T)-Math.cos(0),M=Math.sin(T)-Math.sin(0),B=Math.sqrt(w*w/(_*_+M*M));C=Math.max(B,C)}P.r=C,C+=w}if(t.equidistant){for(var N=0,z=0,I=0;I=e.numIter||(ks(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&i(),Ee(t)):(As(r,e),s())}();else{for(;u;)u=o(l),l++;As(r,e),s()}return this},vs.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},vs.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var ys=function(e,t,n){for(var r=n.eles.edges(),a=n.eles.nodes(),i=It(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:i.w,clientHeight:i.h,boundingBox:i},s=n.eles.components(),l={},u=0;u0)for(o.graphSet.push(E),u=0;ur.count?0:r.graph},bs=function e(t,n,r,a){var i=a.graphSet[r];if(-10)var s=(u=r.nodeOverlap*o)*a/(g=Math.sqrt(a*a+i*i)),l=u*i/g;else{var u,c=Ts(e,a,i),d=Ts(t,-1*a,-1*i),h=d.x-c.x,p=d.y-c.y,f=h*h+p*p,g=Math.sqrt(f);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/f)*h/g,l=u*p/g}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Ds=function(e,t,n,r){if(n>0)var a=e.maxX-t.minX;else a=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return a>=0&&i>=0?Math.sqrt(a*a+i*i):0},Ts=function(e,t,n){var r=e.positionX,a=e.positionY,i=e.height||1,o=e.width||1,s=n/t,l=i/o,u={};return 0===t&&0n?(u.x=r,u.y=a+i/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=a-o*n/2/t,u):0=l)?(u.x=r+i*t/2/n,u.y=a+i/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-i*t/2/n,u.y=a-i/2,u):u},_s=function(e,t){for(var n=0;n1){var f=t.gravity*d/p,g=t.gravity*h/p;c.offsetX+=f,c.offsetY+=g}}}}},Bs=function(e,t){var n=[],r=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;r<=a;){var i=n[r++],o=e.idToIndex[i],s=e.layoutNodes[o],l=s.children;if(0n)var a={x:n*e/r,y:n*t/r};else a={x:e,y:t};return a},Is=function e(t,n){var r=t.parentId;if(null!=r){var a=n.layoutNodes[n.idToIndex[r]],i=!1;return(null==a.maxX||t.maxX+a.padRight>a.maxX)&&(a.maxX=t.maxX+a.padRight,i=!0),(null==a.minX||t.minX-a.padLefta.maxY)&&(a.maxY=t.maxY+a.padBottom,i=!0),(null==a.minY||t.minY-a.padTopf&&(d+=p+t.componentSpacing,c=0,h=0,p=0)}}},Ls={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Os(e){this.options=Y({},Ls,e)}Os.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));var i=It(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,(function(e){return{x:i.x1,y:i.y1}}));else{var o=a.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},h=t.rows,p=null!=t.cols?t.cols:t.columns;if(null!=h&&null!=p)l=h,u=p;else if(null!=h&&null==p)l=h,u=Math.ceil(o/l);else if(null==h&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var f=c(),g=d();(f-1)*g>=o?c(f-1):(g-1)*f>=o&&d(g-1)}else for(;u*l=o?d(y+1):c(v+1)}var m=i.w/u,b=i.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(B=0,M++)},z={},I=0;I(r=Kt(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(x=i.allpts,w=0;w+5(r=Ht(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||a.source,b=b||a.target;var E=o.getArrowWidth(l,c),k=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return Qe(e,t,n)}function x(n,r){var a,i=n._private,o=f;a=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],l=n.pstyle(a+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(i.rscratch,"labelX",r),c=b(i.rscratch,"labelY",r),d=b(i.rscratch,"labelAngle",r),h=n.pstyle(a+"text-margin-x").pfValue,p=n.pstyle(a+"text-margin-y").pfValue,g=s.x1-o-h,y=s.x2+o-h,m=s.y1-o-p,x=s.y2+o-p;if(d){var w=Math.cos(d),E=Math.sin(d),k=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},C=k(g,m),S=k(g,x),P=k(y,m),D=k(y,x),T=[C.x+h,C.y+p,P.x+h,P.y+p,D.x+h,D.y+p,S.x+h,S.y+p];if(Gt(e,t,T))return v(n),!0}else if(jt(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var a,i,o=this.getCachedZSortedEles().interactive,s=[],l=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r),h=It({x1:e=l,y1:t=c,x2:n=u,y2:r=d}),p=0;p4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(function(e,t,n,r,a){var i,o;if(e!==pl?vl(t,e,fl):((o=fl).x=-1*(i=gl).x,o.y=-1*i.y,o.nx=-1*i.nx,o.ny=-1*i.ny,o.ang=i.ang>0?-(Math.PI-i.ang):Math.PI+i.ang),vl(t,n,gl),Js=fl.nx*gl.ny-fl.ny*gl.nx,el=fl.nx*gl.nx-fl.ny*-gl.ny,rl=Math.asin(Math.max(-1,Math.min(1,Js))),Math.abs(rl)<1e-6)return $s=t.x,Qs=t.y,void(il=sl=0);tl=1,nl=!1,el<0?rl<0?rl=Math.PI+rl:(rl=Math.PI-rl,tl=-1,nl=!0):rl>0&&(tl=-1,nl=!0),sl=void 0!==t.radius?t.radius:r,al=rl/2,ll=Math.min(fl.len/2,gl.len/2),a?(ol=Math.abs(Math.cos(al)*sl/Math.sin(al)))>ll?(ol=ll,il=Math.abs(ol*Math.sin(al)/Math.cos(al))):il=sl:(ol=Math.min(ll,sl),il=Math.abs(ol*Math.sin(al)/Math.cos(al))),dl=t.x+gl.nx*ol,hl=t.y+gl.ny*ol,$s=dl-gl.ny*il*tl,Qs=hl+gl.nx*il*tl,ul=t.x+fl.nx*ol,cl=t.y+fl.ny*ol,pl=t}(e,t,n,r,a),{cx:$s,cy:Qs,radius:il,startX:ul,startY:cl,stopX:dl,stopY:hl,startAngle:fl.ang+Math.PI/2*tl,endAngle:gl.ang-Math.PI/2*tl,counterClockwise:nl})}var bl={};function xl(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},D=P(C,E),T=P(S,k),_=!1;"auto"===v?g=Math.abs(D)>Math.abs(T)?a:r:v===l||v===s?(g=r,_=!0):v!==i&&v!==o||(g=a,_=!0);var M,B=g===r,N=B?T:D,z=B?S:C,I=Dt(z),A=!1;_&&(m||x)||!(v===s&&z<0||v===l&&z>0||v===i&&z>0||v===o&&z<0)||(N=(I*=-1)*Math.abs(N),A=!0);var L=function(e){return Math.abs(e)=Math.abs(N)},O=L(M=m?(b<0?1+b:b)*N:(b<0?N:0)+b*I),R=L(Math.abs(N)-Math.abs(M));if(!O&&!R||A)if(B){var V=u.y1+M+(f?d/2*I:0),F=u.x1,j=u.x2;n.segpts=[F,V,j,V]}else{var q=u.x1+M+(f?c/2*I:0),Y=u.y1,X=u.y2;n.segpts=[q,Y,q,X]}else if(B){var W=Math.abs(z)<=d/2,H=Math.abs(C)<=h/2;if(W){var K=(u.x1+u.x2)/2,G=u.y1,U=u.y2;n.segpts=[K,G,K,U]}else if(H){var Z=(u.y1+u.y2)/2,$=u.x1,Q=u.x2;n.segpts=[$,Z,Q,Z]}else n.segpts=[u.x1,u.y2]}else{var J=Math.abs(z)<=c/2,ee=Math.abs(S)<=p/2;if(J){var te=(u.y1+u.y2)/2,ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else if(ee){var ae=(u.x1+u.x2)/2,ie=u.y1,oe=u.y2;n.segpts=[ae,ie,ae,oe]}else n.segpts=[u.x2,u.y1]}if(n.isRound){var se=e.pstyle("taxi-radius").value,le="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(le)}},bl.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,a=t.tgtPos,i=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,d=t.srcCornerRadius,h=t.tgtCornerRadius,p=t.srcRs,f=t.tgtRs,g=!k(n.startX)||!k(n.startY),v=!k(n.arrowStartX)||!k(n.arrowStartY),y=!k(n.endX)||!k(n.endY),m=!k(n.arrowEndX)||!k(n.arrowEndY),b=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,x=Tt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=xh.poolIndex()){var p=d;d=h,h=p}var f=s.srcPos=d.position(),g=s.tgtPos=h.position(),v=s.srcW=d.outerWidth(),y=s.srcH=d.outerHeight(),m=s.tgtW=h.outerWidth(),b=s.tgtH=h.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(d)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(h)],E=s.srcCornerRadius="auto"===d.pstyle("corner-radius").value?"auto":d.pstyle("corner-radius").pfValue,C=s.tgtCornerRadius="auto"===h.pstyle("corner-radius").value?"auto":h.pstyle("corner-radius").pfValue,S=s.tgtRs=h._private.rscratch,P=s.srcRs=d._private.rscratch;s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var D=0;D0){var H=u,K=_t(H,Ct(t)),G=_t(H,Ct(W)),U=K;G2&&_t(H,{x:W[2],y:W[3]})0){var le=c,ue=_t(le,Ct(t)),ce=_t(le,Ct(se)),de=ue;ce2&&_t(le,{x:se[2],y:se[3]})=u||m){c={cp:g,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-h)/x.length,E=x.t1-x.t0,k=s?x.t0+E*w:x.t1-E*w;k=zt(0,k,1),t=Nt(b.p0,b.p1,b.p2,k),a=function(e,t,n,r){var a=zt(0,r-.001,1),i=zt(0,r+.001,1),o=Nt(e,t,n,a),s=Nt(e,t,n,i);return Pl(o,s)}(b.p0,b.p1,b.p2,k);break;case"straight":case"segments":case"haystack":for(var C,S,P,D,T=0,_=r.allpts.length,M=0;M+3<_&&(s?(P={x:r.allpts[M],y:r.allpts[M+1]},D={x:r.allpts[M+2],y:r.allpts[M+3]}):(P={x:r.allpts[_-2-M],y:r.allpts[_-1-M]},D={x:r.allpts[_-4-M],y:r.allpts[_-3-M]}),S=T,!((T+=C=Tt(P,D))>=u));M+=2);var B=(u-S)/C;B=zt(0,B,1),t=function(e,t,n,r){var a=t.x-e.x,i=t.y-e.y,o=Tt(e,t),s=a/o,l=i/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(P,D,B),a=Pl(P,D)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,a)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Cl.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Cl.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),a=this.calculateLabelDimensions(e,r),i=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=Qe(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=a.height/l,c=u*i,d=a.width,h=a.height+(l-1)*(i-1)*u;Je(n.rstyle,"labelWidth",t,d),Je(n.rscratch,"labelWidth",t,d),Je(n.rstyle,"labelHeight",t,h),Je(n.rscratch,"labelHeight",t,h),Je(n.rscratch,"labelLineHeight",t,c)},Cl.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",a=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,o=function(e,r){return r?(Je(n.rscratch,e,t,r),r):Qe(n.rscratch,e,t)};if(!a)return"";"none"==i||("uppercase"==i?a=a.toUpperCase():"lowercase"==i&&(a=a.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u=a.split("\n"),c=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,p=[],f=/[\s\u200b]+|$/g,g=0;gc){var b,x="",w=0,E=d(v.matchAll(f));try{for(E.s();!(b=E.n()).done;){var k=b.value,C=k[0],S=v.substring(w,k.index);w=k.index+C.length;var P=0===x.length?S:x+S+C;this.calculateLabelDimensions(e,P).width<=c?x+=S+C:(x&&p.push(x),x=S+C)}}catch(e){E.e(e)}finally{E.f()}x.match(/^[\s\u200b]+$/)||p.push(x)}else p.push(v)}o("labelWrapCachedLines",p),a=o("labelWrapCachedText",p.join("\n")),o("labelWrapKey",l)}else if("ellipsis"===s){var D=e.pstyle("text-max-width").pfValue,T="",_=!1;if(this.calculateLabelDimensions(e,a).widthD);M++)T+=a[M],M===a.length-1&&(_=!0);return _||(T+="…"),T}return a},Cl.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Cl.calculateLabelDimensions=function(e,t){var n=this,r=n.cy.window().document,a=Be(t,e._private.labelDimsKey),i=n.labelDimCache||(n.labelDimCache=[]),o=i[a];if(null!=o)return o;var s=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,d=this.labelCalcCanvas,h=this.labelCalcCanvasContext;if(!d){d=this.labelCalcCanvas=r.createElement("canvas"),h=this.labelCalcCanvasContext=d.getContext("2d");var p=d.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}h.font="".concat(s," ").concat(c," ").concat(l,"px ").concat(u);for(var f=0,g=0,v=t.split("\n"),y=0;y1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var D=a(t);v&&(e.hoverData.tapholdCancelled=!0),n=!0,r(g,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var T=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),f[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var _={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};m?m.emit(_):o.emit(_),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&g===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=g,g&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var B=e.hoverData.mdownPos;M={x:(c[0]-B[0])*s,y:(c[1]-B[1])*s},e.hoverData.justStartedPan=!1}else M={x:b[0]*s,y:b[1]*s};o.panBy(M),o.emit("dragpan"),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=f[4]||null!=m&&!m.pannable()){if(m&&m.pannable()&&m.active()&&m.unactivate(),m&&m.grabbed()||g==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),g&&r(g,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=g),m)if(v){if(o.boxSelectionEnabled()&&D)m&&m.grabbed()&&(d(x),m.emit("freeon"),x.emit("free"),e.dragData.didDrag&&(m.emit("dragfreeon"),x.emit("dragfree"))),T();else if(m&&m.grabbed()&&e.nodeIsDraggable(m)){var N=!e.dragData.didDrag;N&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(x,{inDragLayer:!0});var z={x:0,y:0};if(k(b[0])&&k(b[1])&&(z.x+=b[0],z.y+=b[1],N)){var I=e.hoverData.dragDelta;I&&k(I[0])&&k(I[1])&&(z.x+=I[0],z.y+=I[1])}e.hoverData.draggingEles=!0,x.silentShift(z).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(b[0]),t.push(b[1])):(t[0]+=b[0],t[1]+=b[1])}();n=!0}else v&&(e.hoverData.dragging||!o.boxSelectionEnabled()||!D&&o.panningEnabled()&&o.userPanningEnabled()?!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()&&i(m,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,f[4]=0,e.data.bgActivePosistion=Ct(h),e.redrawHint("select",!0),e.redraw()):T(),m&&m.pannable()&&m.active()&&m.unactivate());return f[2]=c[0],f[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(t,"mouseup",(function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=a(t);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var p={originalEvent:t,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(p):i.emit(p),!e.hoverData.cxtDragged){var f={originalEvent:t,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(f):i.emit(f)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),b=!1,t.timeStamp-x<=i.multiClickDebounceTime()?(m&&clearTimeout(m),b=!0,x=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(m=setTimeout((function(){b||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})}),i.multiClickDebounceTime()),x=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||a(t)||(i.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=i.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(i.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),i.emit({type:"boxend",originalEvent:t,position:{x:o[0],y:o[1]}});"additive"===i.selectionType()||h||i.$(n).unmerge(g).unselect(),g.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=c&&c.grabbed();d(u),v&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}}),!1);var E,C,S,P,D,T,_,M,B,N,z,I,A,L=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),a=n.pan(),i=e.projectIntoViewport(t.clientX,t.clientY),o=[i[0]*r+a.x,i[1]*r+a.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",L,!0),e.registerBinding(t,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||L(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var O,R,V,F,j,q,Y,X=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},W=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",O=function(t){if(e.hasTouchStarted=!0,w(t)){p(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,a=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);a[0]=o[0],a[1]=o[1]}if(t.touches[1]&&(o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),a[2]=o[0],a[3]=o[1]),t.touches[2]&&(o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),a[4]=o[0],a[5]=o[1]),t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var l=e.findContainerClientCoords();B=l[0],N=l[1],z=l[2],I=l[3],E=t.touches[0].clientX-B,C=t.touches[0].clientY-N,S=t.touches[1].clientX-B,P=t.touches[1].clientY-N,A=0<=E&&E<=z&&0<=S&&S<=z&&0<=C&&C<=I&&0<=P&&P<=I;var h=n.pan(),f=n.zoom();if(D=X(E,C,S,P),T=W(E,C,S,P),M=[((_=[(E+S)/2,(C+P)/2])[0]-h.x)/f,(_[1]-h.y)/f],T<4e4&&!t.touches[2]){var g=e.findNearestElement(a[0],a[1],!0,!0),v=e.findNearestElement(a[2],a[3],!0,!0);return g&&g.isNode()?(g.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=g):v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start=v):n.emit({originalEvent:t,type:"cxttapstart",position:{x:a[0],y:a[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var y=e.findNearestElements(a[0],a[1],!0,!0),m=y[0];if(null!=m&&(m.activate(),e.touchData.start=m,e.touchData.starts=y,e.nodeIsGrabbable(m))){var b=e.dragData.touchDragEles=n.collection(),x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),m.selected()?(x=n.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(x,{addToList:b})):c(m,{addToList:b}),s(m);var k=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};m.emit(k("grabon")),x?x.forEach((function(e){e.emit(k("grab"))})):m.emit(k("grab"))}r(m,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==m&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:a[0],y:a[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var L=e.touchData.startPosition=[null,null,null,null,null,null],O=0;O=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-B,_=t.touches[0].clientY-N,z=t.touches[1].clientX-B,I=t.touches[1].clientY-N,L=W(x,_,z,I);if(L/T>=2.25||L>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var O={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(O),e.touchData.start=null):o.emit(O)}}if(n&&e.touchData.cxt){O={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(O):o.emit(O),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var R=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&R===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=R,R&&R.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",V=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",F=function(t){var a=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var h=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=h[0],u[1]=h[1]}if(t.touches[1]&&(h=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),u[2]=h[0],u[3]=h[1]),t.touches[2]&&(h=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),u[4]=h[0],u[5]=h[1]),a&&a.unactivate(),e.touchData.cxt){if(o={originalEvent:t,type:"cxttapend",position:{x:u[0],y:u[1]}},a?a.emit(o):s.emit(o),!e.touchData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:u[0],y:u[1]}};a?a.emit(p):s.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var f=s.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:t,position:{x:u[0],y:u[1]}}),f.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),f.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=a&&a.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=a){var v=a._private.grabbed;d(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&(a.emit("freeon"),g.emit("free"),e.dragData.didDrag&&(a.emit("dragfreeon"),g.emit("dragfree"))),r(a,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),a.unactivate(),e.touchData.start=null}else{var y=e.findNearestElement(u[0],u[1],!0,!0);r(y,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var m=e.touchData.startPosition[0]-u[0],b=m*m,x=e.touchData.startPosition[1]-u[1],w=(b+x*x)*l*l;e.touchData.singleTouchMoved||(a||s.$(":selected").unselect(["tapunselect"]),r(a,["tap","vclick"],t,{x:u[0],y:u[1]}),j=!1,t.timeStamp-Y<=s.multiClickDebounceTime()?(q&&clearTimeout(q),j=!0,Y=null,r(a,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):(q=setTimeout((function(){j||r(a,["onetap","voneclick"],t,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),Y=t.timeStamp)),null!=a&&!e.dragData.didDrag&&a._private.selectable&&w2){for(var p=[c[0],c[1]],f=Math.pow(p[0]-e,2)+Math.pow(p[1]-t,2),g=1;g0)return g[0]}return null},p=Object.keys(d),f=0;f0?u:Yt(a,i,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,a,i,o,s){var l=2*(s="auto"===s?ln(r,a):s);if(Ut(e,t,this.points,i,o,r,a-l,[0,-1],n))return!0;if(Ut(e,t,this.points,i,o,r-l,a,[0,-1],n))return!0;var u=r/2+2*n,c=a/2+2*n;return!!Gt(e,t,[i-u,o-c,i-u,o,i+u,o,i+u,o-c])||!!Qt(e,t,l,l,i+r/2-s,o+a/2-s,n)||!!Qt(e,t,l,l,i-r/2+s,o+a/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",an(3,0)),this.generateRoundPolygon("round-triangle",an(3,0)),this.generatePolygon("rectangle",an(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",an(5,0)),this.generateRoundPolygon("round-pentagon",an(5,0)),this.generatePolygon("hexagon",an(6,0)),this.generateRoundPolygon("round-hexagon",an(6,0)),this.generatePolygon("heptagon",an(7,0)),this.generateRoundPolygon("round-heptagon",an(7,0)),this.generatePolygon("octagon",an(8,0)),this.generateRoundPolygon("round-octagon",an(8,0));var r=new Array(20),a=sn(5,0),i=sn(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*g)break}else if(a){if(p>=e.deqCost*l||p>=e.deqAvgCost*s)break}else if(f>=e.deqNoDrawCost*Rl)break;var v=e.deq(t,d,c);if(!(v.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!a&&e.shouldRedraw(t,u,d,c)&&r())}),a(t))}}},Fl=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve;a(this,e),this.idsByKey=new et,this.keyForId=new et,this.cachesByLvl=new et,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return o(e,[{key:"getIdsFor",value:function(e){null==e&&qe("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new nt,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new et,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),jl={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},ql=Ue({getKey:null,doesEleInvalidateKey:Ve,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Re,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Yl=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=ql(t);Y(n,r),n.lookup=new Fl(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Xl=Yl.prototype;Xl.reasons=jl,Xl.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Xl.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},Xl.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new lt((function(e,t){return t.reqs-e.reqs}))},Xl.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},Xl.getElement=function(e,t,n,r,a){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Pt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,d=t.w*u,h=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,h))return null;var p,f=l.get(e,r);if(f&&f.invalidated&&(f.invalidated=!1,f.texture.invalidatedWidth-=f.width),f)return f;if(p=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||d>1024)return null;var g=i.getTextureQueue(p),v=g[g.length-2],y=function(){return i.recycleTexture(p,d)||i.addTexture(p,d)};v||(v=g[g.length-1]),v||(v=y()),v.width-v.usedWidthr;D--)S=i.getElement(e,t,n,D,jl.downscale);P()}else{var T;if(!x&&!w&&!E)for(var _=r-1;_>=-4;_--){var M=l.get(e,_);if(M){T=M;break}}if(b(T))return i.queueElement(e,r),T;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,h,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return f={x:v.usedWidth,texture:v,level:r,scale:u,width:d,height:c,scaledLabelShown:h},v.usedWidth+=Math.ceil(d+8),v.eleCaches.push(f),l.set(e,r,f),i.checkTextureFullness(v),f},Xl.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},Xl.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?Ze(t,e):e.fullnessChecks++},Xl.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;Ze(n,e),e.retired=!0;for(var a=e.eleCaches,i=0;i=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,$e(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),Ze(r,i),n.push(i),i}},Xl.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),a=this.getKey(e),i=r[a];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(o),r[a]=o}},Xl.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),a=[],i=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=i.hasCache(u,s.level);if(r[l]=null,!c){a.push(s);var d=t.getBoundingBox(u);t.getElement(u,d,e,s.level,jl.dequeue)}}return a},Xl.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),a=n[r];null!=a&&(1===a.eles.length?(a.reqs=Oe,t.updateItem(a),t.pop(),n[r]=null):a.eles.unmerge(e))},Xl.onDequeue=function(e){this.onDequeues.push(e)},Xl.offDequeue=function(e){Ze(this.onDequeues,e)},Xl.setupDequeueing=Vl({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},a=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};a(1),a(-1);for(var i=c.length-1;i>=0;i--){var o=c[i];o.invalid&&Ze(c,o)}}();var d=function(t){var a=(t=t||{}).after;if(function(){if(!o){o=It();for(var t=0;t16e6)return null;var i=r.makeLayer(o,n);if(null!=a){var s=c.indexOf(a)+1;c.splice(s,0,i)}else(void 0===t.insert||t.insert)&&c.unshift(i);return i};if(r.skipping&&!i)return null;for(var h=null,p=e.length/1,f=!i,g=0;g=p||!qt(h.bb,v.boundingBox()))&&!(h=d({insert:!0,after:h})))return null;s||f?r.queueLayer(h,v):r.drawEleInLayer(h,v,n,t),h.eles.push(v),m[n]=h}}return s||(f?null:c)},Hl.getEleLevelForLayerLevel=function(e,t){return e},Hl.drawEleInLayer=function(e,t,n,r){var a=this.renderer,i=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(i,!1),a.drawCachedElement(i,t,null,null,n,!0),a.setImgSmoothing(i,!0))},Hl.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,a=0;a0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},Hl.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},Hl.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=ke(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},Hl.invalidateLayer=function(e){if(this.lastInvalidationTime=ke(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];Ze(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var a=0;a3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,d=t.pstyle("curve-style").value,h=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,f=t.pstyle("line-cap").value,g=t.pstyle("line-outline-width").value,v=t.pstyle("line-outline-color").value,y=u*c,m=u*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===d?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=f,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,E=t.pstyle("ghost-offset-y").pfValue,k=t.pstyle("ghost-opacity").value,C=y*k;e.translate(w,E),b(C),x(C),e.translate(-w,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=p+g,e.lineCap=f,g>0?(o.colorStrokeStyle(e,v[0],v[1],v[2],n),"straight-triangle"===d?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")):e.lineCap="butt"}();a&&o.drawEdgeUnderlay(e,t),b(),x(),a&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},cu=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var a=this,i=a.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||i?t.lineCap="round":t.lineCap="butt",a.colorStrokeStyle(t,l[0],l[1],l[2],r),a.drawEdgePath(n,t,o.allpts,"solid")}}}};uu.drawEdgeOverlay=cu("overlay"),uu.drawEdgeUnderlay=cu("underlay"),uu.drawEdgePath=function(e,t,n,r){var a,i=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");i.pathCacheKey&&i.pathCacheKey===h?(a=t=i.pathCache,s=!0):(a=t=new Path2D,i.pathCacheKey=h,i.pathCache=a)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var p=2;p+35&&void 0!==arguments[5]?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+i,n),e.lineTo(t+r-i,n),e.quadraticCurveTo(t+r,n,t+r,n+i),e.lineTo(t+r,n+a-i),e.quadraticCurveTo(t+r,n+a,t+r-i,n+a),e.lineTo(t+i,n+a),e.quadraticCurveTo(t,n+a,t,n+a-i),e.lineTo(t,n+i),e.quadraticCurveTo(t,n,t+i,n),e.closePath(),o?e.stroke():e.fill()}hu.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),a=Math.ceil(Pt(n*r));t=Math.pow(2,a)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(i&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),d=t.pstyle("source-label"),h=t.pstyle("target-label");if(u||(!c||!c.value)&&(!d||!d.value)&&(!h||!h.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,f=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==a?(o.drawText(e,t,null,f,i),t.isEdge()&&(o.drawText(e,t,"source",f,i),o.drawText(e,t,"target",f,i))):o.drawText(e,t,a,f,i),n&&e.translate(p.x1,p.y1)},hu.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+a+" "+i,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},hu.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",a=e.pstyle(r+"text-rotation"),i=Qe(n,"labelAngle",t);return"autorotate"===a.strValue?e.isEdge()?i:0:"none"===a.strValue?0:a.pfValue},hu.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private.rscratch,o=a?t.effectiveOpacity():1;if(!a||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=Qe(i,"labelX",n),c=Qe(i,"labelY",n),d=this.getLabelText(t,n);if(null!=d&&""!==d&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,a);var h,p=n?n+"-":"",f=Qe(i,"labelWidth",n),g=Qe(i,"labelHeight",n),v=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=v,c+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(h),u=0,c=0),x){case"top":break;case"center":c+=g/2;break;case"bottom":c+=g}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,C=t.pstyle("text-background-padding").pfValue,S=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(w>0||k>0&&E>0){var P=u-C;switch(b){case"left":P-=f;break;case"center":P-=f/2}var D=c-g-C,T=f+2*C,_=g+2*C;if(w>0){var M=e.fillStyle,B=t.pstyle("text-background-color").value;e.fillStyle="rgba("+B[0]+","+B[1]+","+B[2]+","+w*o+")",S?pu(e,P,D,T,_,2):e.fillRect(P,D,T,_),e.fillStyle=M}if(k>0&&E>0){var N=e.strokeStyle,z=e.lineWidth,I=t.pstyle("text-border-color").value,A=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+I[0]+","+I[1]+","+I[2]+","+E*o+")",e.lineWidth=k,e.setLineDash)switch(A){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(S?pu(e,P,D,T,_,2,"stroke"):e.strokeRect(P,D,T,_),"double"===A){var L=k/2;S?pu(e,P+L,D+L,T-2*L,_-2*L,2,"stroke"):e.strokeRect(P+L,D+L,T-2*L,_-2*L)}e.setLineDash&&e.setLineDash([]),e.lineWidth=z,e.strokeStyle=N}}var O=2*t.pstyle("text-outline-width").pfValue;if(O>0&&(e.lineWidth=O),"wrap"===t.pstyle("text-wrap").value){var R=Qe(i,"labelWrapCachedLines",n),V=Qe(i,"labelLineHeight",n),F=f/2,j=this.getLabelJustification(t);switch("auto"===j||("left"===b?"left"===j?u+=-f:"center"===j&&(u+=-F):"center"===b?"left"===j?u+=-F:"right"===j&&(u+=F):"right"===b&&("center"===j?u+=F:"right"===j&&(u+=f))),x){case"top":case"center":case"bottom":c-=(R.length-1)*V}for(var q=0;q0&&e.strokeText(R[q],u,c),e.fillText(R[q],u,c),c+=V}else O>0&&e.strokeText(d,u,c),e.fillText(d,u,c);0!==h&&(e.rotate(-h),e.translate(-s,-l))}}};var fu={drawNode:function(e,t,n){var r,a,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,d=t.position();if(k(d.x)&&k(d.y)&&(!s||t.visible())){var h,p,f=s?t.effectiveOpacity():1,g=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,a=t.height()+2*y,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:T;l.eleFillStyle(e,t,n)},X=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L;l.colorStrokeStyle(e,_[0],_[1],_[2],t)},W=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F;l.colorStrokeStyle(e,R[0],R[1],R[2],t)},H=function(e,t,n,r){var a,i=l.nodePathCache=l.nodePathCache||[],o=Ne("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+q),s=i[o],u=!1;return null!=s?(a=s,u=!0,c.pathCache=a):(a=new Path2D,i[o]=c.pathCache=a),{path:a,cacheHit:u}},K=t.pstyle("shape").strValue,G=t.pstyle("shape-polygon-points").pfValue;if(g){e.translate(d.x,d.y);var U=H(r,a,K,G);h=U.path,v=U.cacheHit}var Z=function(){if(!v){var n=d;g&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(h||e,n.x,n.y,r,a,q,c)}g?e.fill(h):e.fill()},$=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=u.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;l.hasPie(t)&&(l.drawPie(e,t,i),n&&(g||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,q,c)))},J=function(){var t=(P>0?P:-P)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:f),n=P>0?0:255;0!==P&&(l.colorFillStyle(e,n,n,n,t),g?e.fill(h):e.fill())},ee=function(){if(D>0){if(e.lineWidth=D,e.lineCap=N,e.lineJoin=B,e.setLineDash)switch(M){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(I),e.lineDashOffset=A;break;case"solid":case"double":e.setLineDash([])}if("center"!==z){if(e.save(),e.lineWidth*=2,"inside"===z)g?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-D,-a/2-D,r+2*D,a+2*D),t.addPath(h),e.clip(t,"evenodd")}g?e.stroke(h):e.stroke(),e.restore()}else g?e.stroke(h):e.stroke();if("double"===M){e.lineWidth=D/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",g?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},te=function(){if(O>0){if(e.lineWidth=O,e.lineCap="butt",e.setLineDash)switch(V){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=d;g&&(n={x:0,y:0});var i=l.getNodeShape(t),o=D;"inside"===z&&(o=0),"outside"===z&&(o*=2);var s,u=(r+o+(O+j))/r,c=(a+o+(O+j))/a,h=r*u,p=a*c,f=l.nodeShapes[i].points;if(g&&(s=H(h,p,i,f).path),"ellipse"===i)l.drawEllipsePath(s||e,n.x,n.y,h,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(i)){var v=0,y=0,m=0;"round-diamond"===i?v=1.4*(o+j+O):"round-heptagon"===i?(v=1.075*(o+j+O),m=-(o/2+j+O)/35):"round-hexagon"===i?v=1.12*(o+j+O):"round-pentagon"===i?(v=1.13*(o+j+O),m=-(o/2+j+O)/15):"round-tag"===i?(v=1.12*(o+j+O),y=.07*(o/2+O+j)):"round-triangle"===i&&(v=(o+j+O)*(Math.PI/2),m=-(o+j/2+O)/Math.PI),0!==v&&(h=r*(u=(r+v)/r),["round-hexagon","round-tag"].includes(i)||(p=a*(c=(a+v)/a)));for(var b=h/2,x=p/2,w=(q="auto"===q?un(h,p):q)+(o+O+j)/2,E=new Array(f.length/2),k=new Array(f.length/2),C=0;C0){if(r=r||n.position(),null==a||null==i){var d=n.padding();a=n.width()+2*d,i=n.height()+2*d}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,a+2*o,i+2*o,c),t.fill()}}}};fu.drawNodeOverlay=gu("overlay"),fu.drawNodeUnderlay=gu("underlay"),fu.hasPie=function(e){return(e=e[0])._private.hasPie},fu.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var a=t.cy().style(),i=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,d=0;this.usePaths()&&(o=0,s=0),"%"===i.units?c*=i.pfValue:void 0!==i.pfValue&&(c=i.pfValue/2);for(var h=1;h<=a.pieBackgroundN;h++){var p=t.pstyle("pie-"+h+"-background-size").value,f=t.pstyle("pie-"+h+"-background-color").value,g=t.pstyle("pie-"+h+"-background-opacity").value*n,v=p/100;v+d>1&&(v=1-d);var y=1.5*Math.PI+2*Math.PI*d,m=y+2*Math.PI*v;0===p||d>=1||d+v>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,y,m),e.closePath(),this.colorFillStyle(e,f[0],f[1],f[2],g),e.fill(),d+=v)}};for(var vu={getPixelRatio:function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},paintCache:function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,a=0;ao.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!d&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),x=void 0!==a?a:b,w=l.pan(),E={x:w.x,y:w.y},k={zoom:b,pan:{x:w.x,y:w.y}},C=o.prevViewport;void 0===C||k.zoom!==C.zoom||k.pan.x!==C.pan.x||k.pan.y!==C.pan.y||g&&!f||(o.motionBlurPxRatio=1),i&&(E=i),x*=s,E.x*=s,E.y*=s;var S=o.getCachedZSortedEles();function P(e,t,n,r,a){var i=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,a),e.globalCompositeOperation=i}function D(e,r){var s,l,c,d;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=x,c=o.canvasWidth,d=o.canvasHeight):(s={x:w.x*p,y:w.y*p},l=b*p,c=o.canvasWidth*p,d=o.canvasHeight*p),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?P(e,0,0,c,d):t||void 0!==r&&!r||e.clearRect(0,0,c,d),n||(e.translate(s.x,s.y),e.scale(l,l)),i&&e.translate(i.x,i.y),a&&e.scale(a,a)}if(d||(o.textureDrawLastFrame=!1),d){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var T=o.data.bufferContexts[o.TEXTURE_BUFFER];T.setTransform(1,0,0,1,0,0),T.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:T,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(k=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var _=u.contexts[o.NODE],M=o.textureCache.texture;k=o.textureCache.viewport,_.setTransform(1,0,0,1,0,0),h?P(_,0,0,k.width,k.height):_.clearRect(0,0,k.width,k.height);var B=m.core("outside-texture-bg-color").value,N=m.core("outside-texture-bg-opacity").value;o.colorFillStyle(_,B[0],B[1],B[2],N),_.fillRect(0,0,k.width,k.height),b=l.zoom(),D(_,!1),_.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/s,k.height/k.zoom/s),_.drawImage(M,k.mpan.x,k.mpan.y,k.width/k.zoom/s,k.height/k.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var z=l.extent(),I=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),A=o.hideEdgesOnViewport&&I,L=[];if(L[o.NODE]=!c[o.NODE]&&h&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,L[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),L[o.DRAG]=!c[o.DRAG]&&h&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,L[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||L[o.NODE]){var O=h&&!L[o.NODE]&&1!==p;D(_=t||(O?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),h&&!O?"motionBlur":void 0),A?o.drawCachedNodes(_,S.nondrag,s,z):o.drawLayeredElements(_,S.nondrag,s,z),o.debug&&o.drawDebugPoints(_,S.nondrag),n||h||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||L[o.DRAG])&&(O=h&&!L[o.DRAG]&&1!==p,D(_=t||(O?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),h&&!O?"motionBlur":void 0),A?o.drawCachedNodes(_,S.drag,s,z):o.drawCachedElements(_,S.drag,s,z),o.debug&&o.drawDebugPoints(_,S.drag),n||h||(c[o.DRAG]=!1)),o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(D(_=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){b=o.cy.zoom();var R=m.core("selection-box-border-width").value/b;_.lineWidth=R,_.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",_.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),R>0&&(_.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",_.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){b=o.cy.zoom();var V=u.bgActivePosistion;_.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",_.beginPath(),_.arc(V.x,V.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),_.fill()}var F=o.lastRedrawTime;if(o.showFps&&F){F=Math.round(F);var j=Math.round(1e3/F);_.setTransform(1,0,0,1,0,0),_.fillStyle="rgba(255, 0, 0, 0.75)",_.strokeStyle="rgba(255, 0, 0, 0.75)",_.lineWidth=1,_.fillText("1 frame = "+F+" ms = "+j+" fps",0,20),_.strokeRect(0,30,250,20),_.fillRect(0,30,250*Math.min(j/60,1),20)}n||(c[o.SELECT_BOX]=!1)}if(h&&1!==p){var q=u.contexts[o.NODE],Y=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],X=u.contexts[o.DRAG],W=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],H=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):P(e,0,0,o.canvasWidth,o.canvasHeight);var r=p;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||L[o.NODE])&&(H(q,Y,L[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||L[o.DRAG])&&(H(X,W,L[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=k,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),h&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!d,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),100)),t||l.emit("render")}},yu={drawPolygonPath:function(e,t,n,r,a,i){var o=r/2,s=a/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*i[0],n+s*i[1]);for(var l=1;l0&&i>0){h.clearRect(0,0,a,i),h.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(e.full)h.translate(-n.x1*l,-n.y1*l),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(n.x1*l,n.y1*l);else{var f=t.pan(),g={x:f.x*l,y:f.y*l};l*=t.zoom(),h.translate(g.x,g.y),h.scale(l,l),this.drawElements(h,p),h.scale(1/l,1/l),h.translate(-g.x,-g.y)}e.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,a,i),h.fill())}return d},Cu.png=function(e){return Pu(e,this.bufferCanvasImage(e),"image/png")},Cu.jpg=function(e){return Pu(e,this.bufferCanvasImage(e),"image/jpeg")};var Du=_u,Tu=_u.prototype;function _u(e){var t=this,n=t.cy.window().document;t.data={canvases:new Array(Tu.CANVAS_LAYERS),contexts:new Array(Tu.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Tu.CANVAS_LAYERS),bufferCanvases:new Array(Tu.BUFFER_COUNT),bufferContexts:new Array(Tu.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=a,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=a;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};p&&p.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;l{e.d(i,{diagram:()=>J});var s=e(8252),n=e(7323),a=e(8852),h=e(798),o=e(4852),r=function(){var t=(0,h.K2)((function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e}),"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],a=[1,6],o=[1,7],r=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],y=[1,34],m=[1,35],b=[1,36],A=[1,37],S=[1,43],C=[1,42],w=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:(0,h.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,h.K2)((function(t,i,e,s,n,a,h){var o=a.length-1;switch(n){case 5:s.setOrientation(a[o]);break;case 9:s.setDiagramTitle(a[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},a[o]);break;case 13:s.setLineData(a[o-1],a[o]);break;case 14:s.setBarData({text:"",type:"text"},a[o]);break;case 15:s.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:s.setXAxisTitle(a[o]);break;case 23:s.setXAxisTitle(a[o-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(a[o]);break;case 26:s.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:s.setYAxisTitle(a[o]);break;case 31:s.setYAxisTitle(a[o-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}}),"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:n,35:a,36:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:a,36:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,34]),t(r,[2,35]),t(r,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:a,36:o}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,34:n,35:a,36:o}),{11:23,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:39,13:38,24:S,27:C,29:40,30:41,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:45,15:44,27:w,33:46,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:49,17:48,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:52,17:51,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:S,27:C}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:w}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,h.K2)((function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)}),"parseError"),parse:(0,h.K2)((function(t){var i=this,e=[0],s=[],n=[null],a=[],o=this.table,r="",l=0,c=0,g=0,u=a.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;a.push(f);var y=x.options&&x.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K2)((function(t){e.length=e.length-2*t,n.length=n.length-t,a.length=a.length-t}),"popStack"),(0,h.K2)(m,"lex");for(var b,A,S,C,w,k,_,T,R,D={};;){if(S=e[e.length-1],this.defaultActions[S]?C=this.defaultActions[S]:(null==b&&(b=m()),C=o[S]&&o[S][b]),void 0===C||!C.length||!C[0]){var L;for(k in R=[],o[S])this.terminals_[k]&&k>2&&R.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:R})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+b);switch(C[0]){case 1:e.push(b),n.push(x.yytext),a.push(x.yylloc),e.push(C[1]),b=null,A?(b=A,A=null):(c=x.yyleng,r=x.yytext,l=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[C[1]][1],D.$=n[n.length-_],D._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(D,[r,c,l,d.yy,C[1],n,a].concat(u))))return w;_&&(e=e.slice(0,-1*_*2),n=n.slice(0,-1*_),a=a.slice(0,-1*_)),e.push(this.productions_[C[1]][0]),n.push(D.$),a.push(D._$),T=o[e[e.length-2]][e[e.length-1]],e.push(T);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:(0,h.K2)((function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)}),"parseError"),setInput:(0,h.K2)((function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,h.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,h.K2)((function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,h.K2)((function(){return this._more=!0,this}),"more"),reject:(0,h.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,h.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,h.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,h.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,h.K2)((function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"}),"showPosition"),test_match:(0,h.K2)((function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1}),"test_match"),next:(0,h.K2)((function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ai[0].length)){if(i=e,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,h.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,h.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,h.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,h.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,h.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,h.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,h.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K2)((function(t,i,e,s){switch(e){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}}}();function E(){this.yy={}}return L.lexer=P,(0,h.K2)(E,"Parser"),E.prototype=L,L.Parser=E,new E}();r.parser=r;var l=r;function c(t){return"bar"===t.type}function g(t){return"band"===t.type}function u(t){return"linear"===t.type}(0,h.K2)(c,"isBarPlot"),(0,h.K2)(g,"isBandAxisData"),(0,h.K2)(u,"isLinearAxisData");var x=class{constructor(t){this.parentGroup=t}static{(0,h.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce(((t,i)=>Math.max(i.length,t)),0)*i,height:i};const e={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=(0,s.W6)(n,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return n.remove(),e}},d=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,h.K2)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t=>t.toString())),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+2*this.axisConfig.labelPadding;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"})))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},p=class extends d{static{(0,h.K2)(this,"BandAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=(0,o.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,o.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},f=class extends d{static{(0,h.K2)(this,"LinearAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=(0,o.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,o.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function y(t,i,e,s){const n=new x(s);return g(t)?new p(i,e,t.categories,t.title,n):new f(i,e,[t.min,t.max],t.title,n)}(0,h.K2)(y,"getAxis");var m=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,h.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function b(t,i,e,s){const n=new x(s);return new m(n,t,i,e)}(0,h.K2)(b,"getChartTitleComponent");var A=class{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}static{(0,h.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let i;return i="horizontal"===this.orientation?(0,o.n8j)().y((t=>t[0])).x((t=>t[1]))(t):(0,o.n8j)().x((t=>t[0])).y((t=>t[1]))(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},S=class{constructor(t,i,e,s,n,a){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{(0,h.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}},C=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,h.K2)(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new A(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new S(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function w(t,i,e){return new C(t,i,e)}(0,h.K2)(w,"getPlotComponent");var k,_=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:b(t,i,e,s),plot:w(t,i,e),xAxis:y(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:y(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,h.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:a});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,t>0&&(n+=t,t=0),i>0&&(a+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+a}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some((t=>c(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,n=e+o.height,t>0&&(a+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((t=>c(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},T=class{static{(0,h.K2)(this,"XYChartBuilder")}static build(t,i,e,s){return new _(t,i,e,s).getDrawableElement()}},R=0,D=$(),L=I(),P={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},E=L.plotColorPalette.split(",").map((t=>t.trim())),v=!1,K=!1;function I(){const t=(0,h.P$)(),i=(0,h.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function $(){const t=(0,h.zj)();return(0,n.$t)(h.UI.xyChart,t.xyChart)}function M(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){const i=(0,h.zj)();return(0,h.jZ)(t.trim(),i)}function z(t){k=t}function W(t){D.chartOrientation="horizontal"===t?"horizontal":"vertical"}function O(t){P.xAxis.title=B(t.text)}function F(t,i){P.xAxis={type:"linear",title:P.xAxis.title,min:t,max:i},v=!0}function N(t){P.xAxis={type:"band",title:P.xAxis.title,categories:t.map((t=>B(t.text)))},v=!0}function V(t){P.yAxis.title=B(t.text)}function X(t,i){P.yAxis={type:"linear",title:P.yAxis.title,min:t,max:i},K=!0}function Y(t){const i=Math.min(...t),e=Math.max(...t),s=u(P.yAxis)?P.yAxis.min:1/0,n=u(P.yAxis)?P.yAxis.max:-1/0;P.yAxis={type:"linear",title:P.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}function U(t){let i=[];if(0===t.length)return i;if(!v){const i=u(P.xAxis)?P.xAxis.min:1/0,e=u(P.xAxis)?P.xAxis.max:-1/0;F(Math.min(i,1),Math.max(e,t.length))}if(K||Y(t),g(P.xAxis)&&(i=P.xAxis.categories.map(((i,e)=>[i,t[e]]))),u(P.xAxis)){const e=P.xAxis.min,s=P.xAxis.max,n=(s-e)/(t.length-1),a=[];for(let t=e;t<=s;t+=n)a.push(`${t}`);i=a.map(((i,e)=>[i,t[e]]))}return i}function H(t){return E[0===t?0:t%E.length]}function j(t,i){const e=U(i);P.plots.push({type:"line",strokeFill:H(R),strokeWidth:2,data:e}),R++}function G(t,i){const e=U(i);P.plots.push({type:"bar",fill:H(R),data:e}),R++}function Q(){if(0===P.plots.length)throw Error("No Plot to render, please provide a plot with some data");return P.title=(0,h.ab)(),T.build(D,P,L,k)}function Z(){return L}function q(){return D}(0,h.K2)(I,"getChartDefaultThemeConfig"),(0,h.K2)($,"getChartDefaultConfig"),(0,h.K2)(M,"getChartDefaultData"),(0,h.K2)(B,"textSanitizer"),(0,h.K2)(z,"setTmpSVGG"),(0,h.K2)(W,"setOrientation"),(0,h.K2)(O,"setXAxisTitle"),(0,h.K2)(F,"setXAxisRangeData"),(0,h.K2)(N,"setXAxisBand"),(0,h.K2)(V,"setYAxisTitle"),(0,h.K2)(X,"setYAxisRangeData"),(0,h.K2)(Y,"setYAxisRangeFromPlotData"),(0,h.K2)(U,"transformDataWithoutCategory"),(0,h.K2)(H,"getPlotColorFromPalette"),(0,h.K2)(j,"setLineData"),(0,h.K2)(G,"setBarData"),(0,h.K2)(Q,"getDrawableElem"),(0,h.K2)(Z,"getChartThemeConfig"),(0,h.K2)(q,"getChartConfig");var J={parser:l,db:{getDrawableElem:Q,clear:(0,h.K2)((function(){(0,h.IU)(),R=0,D=$(),P={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},L=I(),E=L.plotColorPalette.split(",").map((t=>t.trim())),v=!1,K=!1}),"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:W,setXAxisTitle:O,setXAxisRangeData:F,setXAxisBand:N,setYAxisTitle:V,setYAxisRangeData:X,setLineData:j,setBarData:G,setTmpSVGG:z,getChartThemeConfig:Z,getChartConfig:q},renderer:{draw:(0,h.K2)(((t,i,e,s)=>{const n=s.db,o=n.getChartThemeConfig(),r=n.getChartConfig();function l(t){return"top"===t?"text-before-edge":"middle"}function c(t){return"left"===t?"start":"right"===t?"end":"middle"}function g(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,h.K2)(l,"getDominantBaseLine"),(0,h.K2)(c,"getTextAnchor"),(0,h.K2)(g,"getTextTransformation"),h.Rm.debug("Rendering xychart chart\n"+t);const u=(0,a.D)(i),x=u.append("g").attr("class","main"),d=x.append("rect").attr("width",r.width).attr("height",r.height).attr("class","background");(0,h.a$)(u,r.height,r.width,!0),u.attr("viewBox",`0 0 ${r.width} ${r.height}`),d.attr("fill",o.backgroundColor),n.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group"));const p=n.getDrawableElem(),f={};function y(t){let i=x,e="";for(const[s]of t.entries()){let n=x;s>0&&f[e]&&(n=f[e]),e+=t[s],i=f[e],i||(i=f[e]=n.append("g").attr("class",t[s]))}return i}(0,h.K2)(y,"getGroup");for(const t of p){if(0===t.data.length)continue;const i=y(t.groupTexts);switch(t.type){case"rect":i.selectAll("rect").data(t.data).enter().append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth));break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>l(t.verticalPos))).attr("text-anchor",(t=>c(t.horizontalPos))).attr("transform",(t=>g(t))).text((t=>t.text));break;case"path":i.selectAll("path").data(t.data).enter().append("path").attr("d",(t=>t.path)).attr("fill",(t=>t.fill?t.fill:"none")).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth))}}}),"draw")}}}}]); \ No newline at end of file diff --git a/js/205-9a3f06a7.chunk.min.js b/js/205-9a3f06a7.chunk.min.js deleted file mode 100644 index 324fba3..0000000 --- a/js/205-9a3f06a7.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[205],{7205:(e,r,a)=>{a.d(r,{diagram:()=>k});var t=a(3148),s=(a(6151),a(6578),a(2602),a(9022),a(8496),a(8252),a(7323),a(798)),k={parser:t.Zk,db:t.iP,renderer:t.q7,styles:t.tM,init:(0,s.K2)((e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,t.iP.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/207-76b424b6.chunk.min.js b/js/207-76b424b6.chunk.min.js deleted file mode 100644 index cd67f64..0000000 --- a/js/207-76b424b6.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[207],{2207:(t,e,s)=>{s.d(e,{_$:()=>a,tM:()=>J,z2:()=>q});var n=s(7323),i=s(798),u=s(4852),r=function(){var t=(0,i.K2)((function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s}),"o"),e=[1,17],s=[1,18],n=[1,19],u=[1,39],r=[1,40],a=[1,25],o=[1,23],c=[1,24],l=[1,31],h=[1,32],A=[1,33],p=[1,34],d=[1,35],y=[1,36],C=[1,26],E=[1,27],m=[1,28],g=[1,29],f=[1,43],b=[1,30],k=[1,42],T=[1,44],F=[1,41],D=[1,45],B=[1,9],_=[1,8,9],S=[1,56],N=[1,57],L=[1,58],$=[1,59],x=[1,60],I=[1,61],O=[1,62],v=[1,8,9,39],K=[1,74],R=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],w=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],P=[13,74,80,95,97,98],M=[13,64,65,74,80,95,97,98],G=[13,59,60,61,62,63,74,80,95,97,98],U=[1,93],Y=[1,110],z=[1,108],Q=[1,102],j=[1,103],W=[1,104],X=[1,105],H=[1,106],q=[1,107],J=[1,109],V=[1,8,9,37,39,42],Z=[1,8,9,21],tt=[1,8,9,78],et=[1,8,9,21,73,74,78,80,81,82,83,84,85],st={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:(0,i.K2)((function(t,e,s,n,i,u,r){var a=u.length-1;switch(i){case 8:this.$=u[a-1];break;case 9:case 11:case 12:this.$=u[a];break;case 10:case 13:case 89:this.$=u[a-1]+u[a];break;case 14:case 15:this.$=u[a-1]+"~"+u[a]+"~";break;case 16:n.addRelation(u[a]);break;case 17:u[a-1].title=n.cleanupLabel(u[a]),n.addRelation(u[a-1]);break;case 27:this.$=u[a].trim(),n.setAccTitle(this.$);break;case 28:case 29:this.$=u[a].trim(),n.setAccDescription(this.$);break;case 30:n.addClassesToNamespace(u[a-3],u[a-1]);break;case 31:n.addClassesToNamespace(u[a-4],u[a-1]);break;case 32:this.$=u[a],n.addNamespace(u[a]);break;case 33:case 43:case 86:this.$=[u[a]];break;case 34:this.$=[u[a-1]];break;case 35:u[a].unshift(u[a-2]),this.$=u[a];break;case 37:n.setCssClass(u[a-2],u[a]);break;case 38:n.addMembers(u[a-3],u[a-1]);break;case 39:n.setCssClass(u[a-5],u[a-3]),n.addMembers(u[a-5],u[a-1]);break;case 40:this.$=u[a],n.addClass(u[a]);break;case 41:this.$=u[a-1],n.addClass(u[a-1]),n.setClassLabel(u[a-1],u[a]);break;case 42:n.addAnnotation(u[a],u[a-2]);break;case 44:u[a].push(u[a-1]),this.$=u[a];break;case 45:case 47:case 48:break;case 46:n.addMember(u[a-1],n.cleanupLabel(u[a]));break;case 49:this.$={id1:u[a-2],id2:u[a],relation:u[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:u[a-3],id2:u[a],relation:u[a-1],relationTitle1:u[a-2],relationTitle2:"none"};break;case 51:this.$={id1:u[a-3],id2:u[a],relation:u[a-2],relationTitle1:"none",relationTitle2:u[a-1]};break;case 52:this.$={id1:u[a-4],id2:u[a],relation:u[a-2],relationTitle1:u[a-3],relationTitle2:u[a-1]};break;case 53:n.addNote(u[a],u[a-1]);break;case 54:n.addNote(u[a]);break;case 55:n.setDirection("TB");break;case 56:n.setDirection("BT");break;case 57:n.setDirection("RL");break;case 58:n.setDirection("LR");break;case 59:this.$={type1:u[a-2],type2:u[a],lineType:u[a-1]};break;case 60:this.$={type1:"none",type2:u[a],lineType:u[a-1]};break;case 61:this.$={type1:u[a-1],type2:"none",lineType:u[a]};break;case 62:this.$={type1:"none",type2:"none",lineType:u[a]};break;case 63:this.$=n.relationType.AGGREGATION;break;case 64:this.$=n.relationType.EXTENSION;break;case 65:this.$=n.relationType.COMPOSITION;break;case 66:this.$=n.relationType.DEPENDENCY;break;case 67:this.$=n.relationType.LOLLIPOP;break;case 68:this.$=n.lineType.LINE;break;case 69:this.$=n.lineType.DOTTED_LINE;break;case 70:case 76:this.$=u[a-2],n.setClickEvent(u[a-1],u[a]);break;case 71:case 77:this.$=u[a-3],n.setClickEvent(u[a-2],u[a-1]),n.setTooltip(u[a-2],u[a]);break;case 72:this.$=u[a-2],n.setLink(u[a-1],u[a]);break;case 73:this.$=u[a-3],n.setLink(u[a-2],u[a-1],u[a]);break;case 74:this.$=u[a-3],n.setLink(u[a-2],u[a-1]),n.setTooltip(u[a-2],u[a]);break;case 75:this.$=u[a-4],n.setLink(u[a-3],u[a-2],u[a]),n.setTooltip(u[a-3],u[a-1]);break;case 78:this.$=u[a-3],n.setClickEvent(u[a-2],u[a-1],u[a]);break;case 79:this.$=u[a-4],n.setClickEvent(u[a-3],u[a-2],u[a-1]),n.setTooltip(u[a-3],u[a]);break;case 80:this.$=u[a-3],n.setLink(u[a-2],u[a]);break;case 81:this.$=u[a-4],n.setLink(u[a-3],u[a-1],u[a]);break;case 82:this.$=u[a-4],n.setLink(u[a-3],u[a-1]),n.setTooltip(u[a-3],u[a]);break;case 83:this.$=u[a-5],n.setLink(u[a-4],u[a-2],u[a]),n.setTooltip(u[a-4],u[a-1]);break;case 84:this.$=u[a-2],n.setCssStyle(u[a-1],u[a]);break;case 85:n.setCssClass(u[a-1],u[a]);break;case 87:u[a-2].push(u[a]),this.$=u[a-2]}}),"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:s,35:n,36:21,40:u,41:22,44:r,45:a,47:o,48:c,50:l,52:h,53:A,54:p,55:d,56:y,66:C,67:E,69:m,73:g,74:f,76:b,80:k,95:T,97:F,98:D},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(B,[2,5],{8:[1,46]}),{8:[1,47]},t(_,[2,16],{21:[1,48]}),t(_,[2,18]),t(_,[2,19]),t(_,[2,20]),t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),t(_,[2,24]),t(_,[2,25]),t(_,[2,26]),{32:[1,49]},{34:[1,50]},t(_,[2,29]),t(_,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:S,60:N,61:L,62:$,63:x,64:I,65:O}),{37:[1,63]},t(v,[2,36],{37:[1,65],42:[1,64]}),t(_,[2,47]),t(_,[2,48]),{16:66,74:f,80:k,95:T,97:F},{16:37,17:67,18:38,74:f,80:k,95:T,97:F,98:D},{16:37,17:68,18:38,74:f,80:k,95:T,97:F,98:D},{16:37,17:69,18:38,74:f,80:k,95:T,97:F,98:D},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:f,80:k,95:T,97:F,98:D},{13:K,51:73},t(_,[2,55]),t(_,[2,56]),t(_,[2,57]),t(_,[2,58]),t(R,[2,11],{16:37,18:38,17:75,19:[1,76],74:f,80:k,95:T,97:F,98:D}),t(R,[2,12],{19:[1,77]}),{15:78,16:79,74:f,80:k,95:T,97:F},{16:37,17:80,18:38,74:f,80:k,95:T,97:F,98:D},t(w,[2,112]),t(w,[2,113]),t(w,[2,114]),t(w,[2,115]),t([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),t(B,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:e,33:s,35:n,40:u,44:r,45:a,47:o,48:c,50:l,52:h,53:A,54:p,55:d,56:y,66:C,67:E,69:m,73:g,74:f,76:b,80:k,95:T,97:F,98:D}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:e,33:s,35:n,36:21,40:u,41:22,44:r,45:a,47:o,48:c,50:l,52:h,53:A,54:p,55:d,56:y,66:C,67:E,69:m,73:g,74:f,76:b,80:k,95:T,97:F,98:D},t(_,[2,17]),t(_,[2,27]),t(_,[2,28]),{13:[1,84],16:37,17:83,18:38,74:f,80:k,95:T,97:F,98:D},{49:85,57:54,58:55,59:S,60:N,61:L,62:$,63:x,64:I,65:O},t(_,[2,46]),{58:86,64:I,65:O},t(P,[2,62],{57:87,59:S,60:N,61:L,62:$,63:x}),t(M,[2,63]),t(M,[2,64]),t(M,[2,65]),t(M,[2,66]),t(M,[2,67]),t(G,[2,68]),t(G,[2,69]),{8:[1,89],23:90,38:88,41:22,44:r},{16:91,74:f,80:k,95:T,97:F},{43:92,47:U},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:Y,73:z,74:Q,75:99,77:100,79:101,80:j,81:W,82:X,83:H,84:q,85:J},{74:[1,111]},{13:K,51:112},t(_,[2,54]),t(_,[2,117]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:f,80:k,95:T,97:F},t(V,[2,40],{11:114,12:[1,115]}),t(B,[2,7]),{9:[1,116]},t(Z,[2,49]),{16:37,17:117,18:38,74:f,80:k,95:T,97:F,98:D},{13:[1,119],16:37,17:118,18:38,74:f,80:k,95:T,97:F,98:D},t(P,[2,61],{57:120,59:S,60:N,61:L,62:$,63:x}),t(P,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:r},{8:[1,123],39:[2,33]},t(v,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:U},{16:37,17:127,18:38,74:f,80:k,95:T,97:F,98:D},t(_,[2,70],{13:[1,128]}),t(_,[2,72],{13:[1,130],68:[1,129]}),t(_,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},t(_,[2,84],{78:[1,134]}),t(tt,[2,86],{79:135,21:Y,73:z,74:Q,80:j,81:W,82:X,83:H,84:q,85:J}),t(et,[2,88]),t(et,[2,90]),t(et,[2,91]),t(et,[2,92]),t(et,[2,93]),t(et,[2,94]),t(et,[2,95]),t(et,[2,96]),t(et,[2,97]),t(et,[2,98]),t(_,[2,85]),t(_,[2,53]),{37:[2,10]},t(V,[2,41]),{13:[1,136]},{1:[2,4]},t(Z,[2,51]),t(Z,[2,50]),{16:37,17:137,18:38,74:f,80:k,95:T,97:F,98:D},t(P,[2,59]),t(_,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:r},{43:140,47:U},t(v,[2,38]),{39:[2,44]},t(_,[2,42]),t(_,[2,71]),t(_,[2,73]),t(_,[2,74],{68:[1,141]}),t(_,[2,77]),t(_,[2,78],{13:[1,142]}),t(_,[2,80],{13:[1,144],68:[1,143]}),{21:Y,73:z,74:Q,77:145,79:101,80:j,81:W,82:X,83:H,84:q,85:J},t(et,[2,89]),{14:[1,146]},t(Z,[2,52]),t(_,[2,31]),{39:[2,35]},{39:[1,147]},t(_,[2,75]),t(_,[2,79]),t(_,[2,81]),t(_,[2,82],{68:[1,148]}),t(tt,[2,87],{79:135,21:Y,73:z,74:Q,80:j,81:W,82:X,83:H,84:q,85:J}),t(V,[2,8]),t(v,[2,39]),t(_,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:(0,i.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,s=[0],n=[],u=[null],r=[],a=this.table,o="",c=0,l=0,h=0,A=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(d.yy[y]=this.yy[y]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var C=p.yylloc;r.push(C);var E=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){s.length=s.length-2*t,u.length=u.length-t,r.length=r.length-t}),"popStack"),(0,i.K2)(m,"lex");for(var g,f,b,k,T,F,D,B,_,S={};;){if(b=s[s.length-1],this.defaultActions[b]?k=this.defaultActions[b]:(null==g&&(g=m()),k=a[b]&&a[b][g]),void 0===k||!k.length||!k[0]){var N;for(F in _=[],a[b])this.terminals_[F]&&F>2&&_.push("'"+this.terminals_[F]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[g]||g,line:p.yylineno,loc:C,expected:_})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(k[0]){case 1:s.push(g),u.push(p.yytext),r.push(p.yylloc),s.push(k[1]),g=null,f?(g=f,f=null):(l=p.yyleng,o=p.yytext,c=p.yylineno,C=p.yylloc,h>0&&h--);break;case 2:if(D=this.productions_[k[1]][1],S.$=u[u.length-D],S._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},E&&(S._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(T=this.performAction.apply(S,[o,l,c,d.yy,k[1],u,r].concat(A))))return T;D&&(s=s.slice(0,-1*D*2),u=u.slice(0,-1*D),r=r.slice(0,-1*D)),s.push(this.productions_[k[1]][0]),u.push(S.$),r.push(S._$),B=a[s[s.length-2]][s[s.length-1]],s.push(B);break;case 3:return!0}}return!0}),"parse")},nt=function(){return{EOF:1,parseError:(0,i.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,i.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,e){var s,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var u in i)this[u]=i[u];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),u=0;ue[0].length)){if(e=s,n=u,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,i[u])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,i.K2)((function(t,e,s,n){switch(s){case 0:return 53;case 1:return 54;case 2:return 55;case 3:return 56;case 4:case 5:case 14:case 30:case 35:case 39:case 46:break;case 6:return this.begin("acc_title"),31;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),33;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 57:case 60:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 34:return 8;case 15:case 16:return 7;case 17:case 36:case 44:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 70;case 23:return 71;case 25:return"STR";case 26:this.begin("string");break;case 27:return 73;case 28:return this.begin("namespace"),40;case 29:case 38:return this.popState(),8;case 31:return this.begin("namespace-body"),37;case 32:case 42:return this.popState(),39;case 33:case 43:return"EOF_IN_STRUCT";case 37:return this.begin("class"),44;case 40:return this.popState(),this.popState(),39;case 41:return this.begin("class-body"),37;case 45:return"OPEN_IN_STRUCT";case 47:return"MEMBER";case 48:return 76;case 49:return 66;case 50:return 67;case 51:return 69;case 52:return 50;case 53:return 52;case 54:return 45;case 55:return 46;case 56:return 72;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:case 64:case 65:case 66:return 68;case 67:case 68:return 60;case 69:case 70:return 62;case 71:return 61;case 72:return 59;case 73:return 63;case 74:return 64;case 75:return 65;case 76:return 21;case 77:return 42;case 78:return 95;case 79:return"DOT";case 80:return"PLUS";case 81:return 81;case 82:return 78;case 83:case 84:return 84;case 85:return 85;case 86:case 87:return"EQUALS";case 88:return 74;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 80;case 93:return 97;case 94:case 95:return 83;case 96:return 9}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}}}();function it(){this.yy={}}return st.lexer=nt,(0,i.K2)(it,"Parser"),it.prototype=st,st.Parser=it,new it}();r.parser=r;var a=r,o=["#","+","~","-",""],c=class{static{(0,i.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="";const s=(0,i.jZ)(t,(0,i.D7)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,i.QO)(this.id);return"method"===this.memberType&&(t+=`(${(0,i.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,i.QO)(this.returnType))),t=t.trim(),{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(o.includes(t)&&(this.visibility=t),this.id=s[2].trim(),this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,n=t.substring(0,1),i=t.substring(s-1);o.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},l="classId-",h=[],A=new Map,p=[],d=0,y=new Map,C=0,E=[],m=(0,i.K2)((t=>i.Y2.sanitizeText(t,(0,i.D7)())),"sanitizeText"),g=(0,i.K2)((function(t){const e=i.Y2.sanitizeText(t,(0,i.D7)());let s="",n=e;if(e.indexOf("~")>0){const t=e.split("~");n=m(t[0]),s=m(t[1])}return{className:n,type:s}}),"splitClassNameAndType"),f=(0,i.K2)((function(t,e){const s=i.Y2.sanitizeText(t,(0,i.D7)());e&&(e=m(e));const{className:n}=g(s);A.get(n).label=e}),"setClassLabel"),b=(0,i.K2)((function(t){const e=i.Y2.sanitizeText(t,(0,i.D7)()),{className:s,type:n}=g(e);if(A.has(s))return;const u=i.Y2.sanitizeText(s,(0,i.D7)());A.set(u,{id:u,type:n,label:u,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:l+u+"-"+d}),d++}),"addClass"),k=(0,i.K2)((function(t){const e=i.Y2.sanitizeText(t,(0,i.D7)());if(A.has(e))return A.get(e).domId;throw new Error("Class not found: "+e)}),"lookUpDomId"),T=(0,i.K2)((function(){h=[],A=new Map,p=[],(E=[]).push(G),y=new Map,C=0,U="TB",(0,i.IU)()}),"clear"),F=(0,i.K2)((function(t){return A.get(t)}),"getClass"),D=(0,i.K2)((function(){return A}),"getClasses"),B=(0,i.K2)((function(){return h}),"getRelations"),_=(0,i.K2)((function(){return p}),"getNotes"),S=(0,i.K2)((function(t){i.Rm.debug("Adding relation: "+JSON.stringify(t)),b(t.id1),b(t.id2),t.id1=g(t.id1).className,t.id2=g(t.id2).className,t.relationTitle1=i.Y2.sanitizeText(t.relationTitle1.trim(),(0,i.D7)()),t.relationTitle2=i.Y2.sanitizeText(t.relationTitle2.trim(),(0,i.D7)()),h.push(t)}),"addRelation"),N=(0,i.K2)((function(t,e){const s=g(t).className;A.get(s).annotations.push(e)}),"addAnnotation"),L=(0,i.K2)((function(t,e){b(t);const s=g(t).className,n=A.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?n.annotations.push(m(t.substring(2,t.length-2))):t.indexOf(")")>0?n.methods.push(new c(t,"method")):t&&n.members.push(new c(t,"attribute"))}}),"addMember"),$=(0,i.K2)((function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>L(t,e))))}),"addMembers"),x=(0,i.K2)((function(t,e){const s={id:`note${p.length}`,class:e,text:t};p.push(s)}),"addNote"),I=(0,i.K2)((function(t){return t.startsWith(":")&&(t=t.substring(1)),m(t.trim())}),"cleanupLabel"),O=(0,i.K2)((function(t,e){t.split(",").forEach((function(t){let s=t;/\d/.exec(t[0])&&(s=l+s);const n=A.get(s);n&&n.cssClasses.push(e)}))}),"setCssClass"),v=(0,i.K2)((function(t,e){t.split(",").forEach((function(t){void 0!==e&&(A.get(t).tooltip=m(e))}))}),"setTooltip"),K=(0,i.K2)((function(t,e){return e&&y.has(e)?y.get(e).classes.get(t).tooltip:A.get(t).tooltip}),"getTooltip"),R=(0,i.K2)((function(t,e,s){const u=(0,i.D7)();t.split(",").forEach((function(t){let i=t;/\d/.exec(t[0])&&(i=l+i);const r=A.get(i);r&&(r.link=n._K.formatUrl(e,u),"sandbox"===u.securityLevel?r.linkTarget="_top":r.linkTarget="string"==typeof s?m(s):"_blank")})),O(t,"clickable")}),"setLink"),w=(0,i.K2)((function(t,e,s){t.split(",").forEach((function(t){P(t,e,s),A.get(t).haveCallback=!0})),O(t,"clickable")}),"setClickEvent"),P=(0,i.K2)((function(t,e,s){const u=i.Y2.sanitizeText(t,(0,i.D7)());if("loose"!==(0,i.D7)().securityLevel)return;if(void 0===e)return;const r=u;if(A.has(r)){const t=k(r);let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),(0,u.Ltv)(this).classed("hover",!1)}))}),"setupToolTips");E.push(G);var U="TB",Y=(0,i.K2)((()=>U),"getDirection"),z=(0,i.K2)((t=>{U=t}),"setDirection"),Q=(0,i.K2)((function(t){y.has(t)||(y.set(t,{id:t,classes:new Map,children:{},domId:l+t+"-"+C}),C++)}),"addNamespace"),j=(0,i.K2)((function(t){return y.get(t)}),"getNamespace"),W=(0,i.K2)((function(){return y}),"getNamespaces"),X=(0,i.K2)((function(t,e){if(y.has(t))for(const s of e){const{className:e}=g(s);A.get(e).parent=t,y.get(t).classes.set(e,A.get(e))}}),"addClassesToNamespace"),H=(0,i.K2)((function(t,e){const s=A.get(t);if(e&&s)for(const t of e)t.includes(",")?s.styles.push(...t.split(",")):s.styles.push(t)}),"setCssStyle"),q={setAccTitle:i.SV,getAccTitle:i.iN,getAccDescription:i.m7,setAccDescription:i.EI,getConfig:(0,i.K2)((()=>(0,i.D7)().class),"getConfig"),addClass:b,bindFunctions:M,clear:T,getClass:F,getClasses:D,getNotes:_,addAnnotation:N,addNote:x,getRelations:B,addRelation:S,getDirection:Y,setDirection:z,addMember:L,addMembers:$,cleanupLabel:I,lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:w,setCssClass:O,setLink:R,getTooltip:K,setTooltip:v,lookUpDomId:k,setDiagramTitle:i.ke,getDiagramTitle:i.ab,setClassLabel:f,addNamespace:Q,addClassesToNamespace:X,getNamespace:j,getNamespaces:W,setCssStyle:H},J=(0,i.K2)((t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles")}}]); \ No newline at end of file diff --git a/js/221-9d1089ca.chunk.min.js b/js/221-9d1089ca.chunk.min.js deleted file mode 100644 index 4857b09..0000000 --- a/js/221-9d1089ca.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[221],{6221:(e,c,k)=>{k.d(c,{createPieServices:()=>s.f});var s=k(8660);k(8546)}}]); \ No newline at end of file diff --git a/js/223-a5ce106a.chunk.min.js b/js/223-a5ce106a.chunk.min.js new file mode 100644 index 0000000..5adb968 --- /dev/null +++ b/js/223-a5ce106a.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[223],{3159:(e,t,a)=>{function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(32).K2)(i,"populateCommonDb")},3223:(e,t,a)=>{a.d(t,{diagram:()=>k});var i=a(3159),n=a(5522),l=a(1661),r=a(32),s=a(8731),o=a(4852),c=r.UI.pie,p={sections:new Map,showData:!1,config:c},d=p.sections,g=p.showData,u=structuredClone(c),h=(0,r.K2)((()=>structuredClone(u)),"getConfig"),m=(0,r.K2)((()=>{d=new Map,g=p.showData,(0,r.IU)()}),"clear"),f=(0,r.K2)((({label:e,value:t})=>{d.has(e)||(d.set(e,t),r.Rm.debug(`added new section: ${e}, with value: ${t}`))}),"addSection"),S=(0,r.K2)((()=>d),"getSections"),x=(0,r.K2)((e=>{g=e}),"setShowData"),w=(0,r.K2)((()=>g),"getShowData"),D={getConfig:h,clear:m,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:f,getSections:S,setShowData:x,getShowData:w},T=(0,r.K2)(((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)}),"populateDb"),$={parse:(0,r.K2)((async e=>{const t=await(0,s.qg)("pie",e);r.Rm.debug(t),T(t,D)}),"parse")},y=(0,r.K2)((e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`),"getStyles"),C=(0,r.K2)((e=>{const t=[...e.entries()].map((e=>({label:e[0],value:e[1]}))).sort(((e,t)=>t.value-e.value));return(0,o.rLf)().value((e=>e.value))(t)}),"createPieArcs"),k={parser:$,db:D,renderer:{draw:(0,r.K2)(((e,t,a,i)=>{r.Rm.debug("rendering pie chart\n"+e);const s=i.db,c=(0,r.D7)(),p=(0,n.$t)(s.getConfig(),c.pie),d=(0,l.D)(t),g=d.append("g");g.attr("transform","translate(225,225)");const{themeVariables:u}=c;let[h]=(0,n.I5)(u.pieOuterStrokeWidth);h??=2;const m=p.textPosition,f=Math.min(450,450)/2-40,S=(0,o.JLW)().innerRadius(0).outerRadius(f),x=(0,o.JLW)().innerRadius(f*m).outerRadius(f*m);g.append("circle").attr("cx",0).attr("cy",0).attr("r",f+h/2).attr("class","pieOuterCircle");const w=s.getSections(),D=C(w),T=[u.pie1,u.pie2,u.pie3,u.pie4,u.pie5,u.pie6,u.pie7,u.pie8,u.pie9,u.pie10,u.pie11,u.pie12],$=(0,o.UMr)(T);g.selectAll("mySlices").data(D).enter().append("path").attr("d",S).attr("fill",(e=>$(e.data.label))).attr("class","pieCircle");let y=0;w.forEach((e=>{y+=e})),g.selectAll("mySlices").data(D).enter().append("text").text((e=>(e.data.value/y*100).toFixed(0)+"%")).attr("transform",(e=>"translate("+x.centroid(e)+")")).style("text-anchor","middle").attr("class","slice"),g.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const k=g.selectAll(".legend").data($.domain()).enter().append("g").attr("class","legend").attr("transform",((e,t)=>"translate(216,"+(22*t-22*$.domain().length/2)+")"));k.append("rect").attr("width",18).attr("height",18).style("fill",$).style("stroke",$),k.data(D).append("text").attr("x",22).attr("y",14).text((e=>{const{label:t,value:a}=e.data;return s.getShowData()?`${t} [${a}]`:t}));const b=512+Math.max(...k.selectAll("text").nodes().map((e=>e?.getBoundingClientRect().width??0)));d.attr("viewBox",`0 0 ${b} 450`),(0,r.a$)(d,450,b,p.useMaxWidth)}),"draw")},styles:y}}}]); \ No newline at end of file diff --git a/js/257-acdc3108.chunk.min.js b/js/257-acdc3108.chunk.min.js deleted file mode 100644 index cbae395..0000000 --- a/js/257-acdc3108.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[257],{9323:(t,e,n)=>{n.d(e,{CP:()=>l,HT:()=>u,PB:()=>h,aC:()=>c,lC:()=>a,m:()=>o,tk:()=>r});var i=n(798),s=n(6750),r=(0,i.K2)(((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)n.attr(t,e.attrs[t]);return e.class&&n.attr("class",e.class),n}),"drawRect"),a=(0,i.K2)(((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,n).lower()}),"drawBackgroundRect"),o=(0,i.K2)(((t,e)=>{const n=e.text.replace(i.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const r=s.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),s}),"drawText"),c=(0,i.K2)(((t,e,n,i)=>{const r=t.append("image");r.attr("x",e),r.attr("y",n);const a=(0,s.J)(i);r.attr("xlink:href",a)}),"drawImage"),l=(0,i.K2)(((t,e,n,i)=>{const r=t.append("use");r.attr("x",e),r.attr("y",n);const a=(0,s.J)(i);r.attr("xlink:href",`#${a}`)}),"drawEmbeddedImage"),h=(0,i.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),u=(0,i.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")},4257:(t,e,n)=>{n.d(e,{diagram:()=>Y});var i=n(9323),s=n(798),r=n(4852),a=function(){var t=(0,s.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,14],l={trace:(0,s.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,s.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=0,y=a.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;a.push(g);var x=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,s.K2)(m,"lex");for(var k,_,b,w,v,K,$,T,M,S={};;){if(b=n[n.length-1],this.defaultActions[b]?w=this.defaultActions[b]:(null==k&&(k=m()),w=o[b]&&o[b][k]),void 0===w||!w.length||!w[0]){var E;for(K in M=[],o[b])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");E=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(E,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:g,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+k);switch(w[0]){case 1:n.push(k),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),k=null,_?(k=_,_=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,g=p.yylloc,u>0&&u--);break;case 2:if($=this.productions_[w[1]][1],S.$=r[r.length-$],S._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},x&&(S._$.range=[a[a.length-($||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(S,[c,h,l,d.yy,w[1],r,a].concat(y))))return v;$&&(n=n.slice(0,-1*$*2),r=r.slice(0,-1*$),a=a.slice(0,-1*$)),n.push(this.productions_[w[1]][0]),r.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}),"parse")},h=function(){return{EOF:1,parseError:(0,s.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,s.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,s.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,s.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,s.K2)((function(){return this._more=!0,this}),"more"),reject:(0,s.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,s.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,s.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,s.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,s.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,s.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,s.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,s.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,s.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,s.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,s.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,s.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return l.lexer=h,(0,s.K2)(u,"Parser"),u.prototype=l,l.Parser=u,new u}();a.parser=a;var o=a,c="",l=[],h=[],u=[],y=(0,s.K2)((function(){l.length=0,h.length=0,c="",u.length=0,(0,s.IU)()}),"clear"),p=(0,s.K2)((function(t){c=t,l.push(t)}),"addSection"),d=(0,s.K2)((function(){return l}),"getSections"),f=(0,s.K2)((function(){let t=k(),e=0;for(;!t&&e<100;)t=k(),e++;return h.push(...u),h}),"getTasks"),g=(0,s.K2)((function(){const t=[];return h.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}),"updateActors"),x=(0,s.K2)((function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:c,type:c,people:r,task:t,score:i};u.push(a)}),"addTask"),m=(0,s.K2)((function(t){const e={section:c,type:c,description:t,task:t,classes:[]};h.push(e)}),"addTaskOrg"),k=(0,s.K2)((function(){const t=(0,s.K2)((function(t){return u[t].processed}),"compileTask");let e=!0;for(const[n,i]of u.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),_=(0,s.K2)((function(){return g()}),"getActors"),b={getConfig:(0,s.K2)((()=>(0,s.D7)().journey),"getConfig"),clear:y,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setAccTitle:s.SV,getAccTitle:s.iN,setAccDescription:s.EI,getAccDescription:s.m7,addSection:p,getSections:d,getTasks:f,addTask:x,addTaskOrg:m,getActors:_},w=(0,s.K2)((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),v=(0,s.K2)((function(t,e){return(0,i.tk)(t,e)}),"drawRect"),K=(0,s.K2)((function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const n=(0,r.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const n=(0,r.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K2)(a,"smile"),(0,s.K2)(o,"sad"),(0,s.K2)(c,"ambivalent"),e.score>3?a(i):e.score<3?o(i):c(i),n}),"drawFace"),$=(0,s.K2)((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),T=(0,s.K2)((function(t,e){return(0,i.m)(t,e)}),"drawText"),M=(0,s.K2)((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,s.K2)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,T(t,e)}),"drawLabel"),S=(0,s.K2)((function(t,e,n){const s=t.append("g"),r=(0,i.PB)();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,v(s,r),C(n)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),E=-1,I=(0,s.K2)((function(t,e,n){const s=e.x+n.width/2,r=t.append("g");E++,r.append("line").attr("id","task"+E).attr("x1",s).attr("y1",e.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),K(r,{cx:s,cy:300+30*(5-e.score),score:e.score});const a=(0,i.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,v(r,a);let o=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};$(r,i),o+=10})),C(n)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)}),"drawTask"),P=(0,s.K2)((function(t,e){(0,i.lC)(t,e)}),"drawBackgroundRect"),C=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,y=t.split(//gi);for(let t=0;t{const s=D[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:D[i].position};A.drawCircle(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};A.drawText(t,a),n+=20}))}(0,s.K2)(L,"drawActorLegend");var V=(0,s.D7)().journey,B=V.leftMargin,O=(0,s.K2)((function(t,e,n,i){const a=(0,s.D7)().journey,o=(0,s.D7)().securityLevel;let c;"sandbox"===o&&(c=(0,r.Ltv)("#i"+e));const l="sandbox"===o?(0,r.Ltv)(c.nodes()[0].contentDocument.body):(0,r.Ltv)("body");F.init();const h=l.select("#"+e);A.initGraphics(h);const u=i.db.getTasks(),y=i.db.getDiagramTitle(),p=i.db.getActors();for(const t in D)delete D[t];let d=0;p.forEach((t=>{D[t]={color:a.actorColours[d%a.actorColours.length],position:d},d++})),L(h),F.insert(0,0,B,50*Object.keys(D).length),z(h,u,0);const f=F.getBounds();y&&h.append("text").text(y).attr("x",B).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*a.diagramMarginY,x=B+f.stopx+2*a.diagramMarginX;(0,s.a$)(h,g,x,a.useMaxWidth),h.append("line").attr("x1",B).attr("y1",4*a.height).attr("x2",x-B-4).attr("y2",4*a.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=y?70:0;h.attr("viewBox",`${f.startx} -25 ${x} ${g+m}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",g+m+25)}),"draw"),F={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,s.K2)((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:(0,s.K2)((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:(0,s.K2)((function(t,e,n,i){const r=(0,s.D7)().journey,a=this;let o=0;function c(c){return(0,s.K2)((function(s){o++;const l=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-l*r.boxMargin,Math.min),a.updateVal(s,"stopy",i+l*r.boxMargin,Math.max),a.updateVal(F.data,"startx",t-l*r.boxMargin,Math.min),a.updateVal(F.data,"stopx",n+l*r.boxMargin,Math.max),"activation"!==c&&(a.updateVal(s,"startx",t-l*r.boxMargin,Math.min),a.updateVal(s,"stopx",n+l*r.boxMargin,Math.max),a.updateVal(F.data,"starty",e-l*r.boxMargin,Math.min),a.updateVal(F.data,"stopy",i+l*r.boxMargin,Math.max))}),"updateItemBounds")}(0,s.K2)(c,"updateFn"),this.sequenceItems.forEach(c())}),"updateBounds"),insert:(0,s.K2)((function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(F.data,"startx",s,Math.min),this.updateVal(F.data,"starty",a,Math.min),this.updateVal(F.data,"stopx",r,Math.max),this.updateVal(F.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)}),"insert"),bumpVerticalPos:(0,s.K2)((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:(0,s.K2)((function(){return this.verticalPos}),"getVerticalPos"),getBounds:(0,s.K2)((function(){return this.data}),"getBounds")},N=V.sectionFills,R=V.sectionColours,z=(0,s.K2)((function(t,e,n){const i=(0,s.D7)().journey;let r="";const a=n+(2*i.height+i.diagramMarginY);let o=0,c="#CCC",l="black",h=0;for(const[n,s]of e.entries()){if(r!==s.section){c=N[o%N.length],h=o%N.length,l=R[o%R.length];let a=0;const u=s.section;for(let t=n;t(D[e]&&(t[e]=D[e]),t)),{});s.x=n*i.taskMargin+n*i.width+B,s.y=a,s.width=i.diagramMarginX,s.height=i.diagramMarginY,s.colour=l,s.fill=c,s.num=h,s.actors=u,A.drawTask(t,s,i),F.insert(s.x,s.y,s.x+s.width+i.taskMargin,450)}}),"drawTasks"),W={setConf:j,draw:O},Y={parser:o,db:b,renderer:W,styles:w,init:(0,s.K2)((t=>{W.setConf(t.journey),b.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/258-c1edc5c0.chunk.min.js b/js/258-c1edc5c0.chunk.min.js new file mode 100644 index 0000000..b97e922 --- /dev/null +++ b/js/258-c1edc5c0.chunk.min.js @@ -0,0 +1 @@ +(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[258],{7799:function(t,e,i){var n;n=function(t){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=7)}([function(e,i){e.exports=t},function(t,e,i){"use strict";var n=i(0).FDLayoutConstants;function r(){}for(var o in n)r[o]=n[o];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=r},function(t,e,i){"use strict";var n=i(0).FDLayoutEdge;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).LGraph;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).LGraphManager;function r(t){n.call(this,t)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},function(t,e,i){"use strict";var n=i(0).FDLayoutNode,r=i(0).IMath;function o(t,e,i,r){n.call(this,t,e,i,r)}for(var s in o.prototype=Object.create(n.prototype),n)o[s]=n[s];o.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,n=this.getChild().getNodes(),r=0;r0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},_.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},_.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i1)for(a=0;an&&(n=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(c.WORLD_CENTER_X-s.x/2,c.WORLD_CENTER_Y-s.y/2))},_.radialLayout=function(t,e,i){var n=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);_.branchRadialLayout(e,null,0,359,0,n);var r=y.calculateBounds(t),o=new E;o.setDeviceOrgX(r.getMinX()),o.setDeviceOrgY(r.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var E=y[0];y.splice(0,1);var m=c.indexOf(E);m>=0&&c.splice(m,1),p--,g--}u=null!=e?(c.indexOf(y[0])+1)%p:0;for(var v=Math.abs(n-i)/g,N=u;d!=g;N=++N%p){var A=c[N].getOtherEnd(t);if(A!=e){var L=(i+d*v)%360,T=(L+v)%360;_.branchRadialLayout(A,t,L,T,r+o,o),d++}}},_.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;ie&&(e=n)}return e},_.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},_.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],n=this.graphManager.getAllNodes(),r=0;r1){var n="DummyCompound_"+i;t.memberGroups[n]=e[i];var r=e[i][0].getParent(),o=new s(t.graphManager);o.id=n,o.paddingLeft=r.paddingLeft||0,o.paddingRight=r.paddingRight||0,o.paddingBottom=r.paddingBottom||0,o.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=r.getChild();h.add(o);for(var l=0;l=0;t--){var e=this.compoundOrder[t],i=e.id,n=e.paddingLeft,r=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,n,r)}},_.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(i){var n=t.idToDummyNode[i],r=n.paddingLeft,o=n.paddingTop;t.adjustLocations(e[i],n.rect.x,n.rect.y,r,o)}))},_.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var n=i.getNodes(),r=0;r0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},_.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,n=0;nh&&(h=c.rect.height)}i+=h+t.verticalPadding}},_.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(n){var r=e[n];i.tiledMemberPack[n]=i.tileNodes(t[n],r.paddingLeft+r.paddingRight),r.rect.width=i.tiledMemberPack[n].width,r.rect.height=i.tiledMemberPack[n].height}))},_.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort((function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},_.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,n=0;ni&&(e=n,i=t.rowWidth[n]);return e},_.prototype.canAddHorizontal=function(t,e,i){var n=this.getShortestRowIndex(t);if(n<0)return!0;var r=t.rowWidth[n];if(r+t.horizontalPadding+e<=t.width)return!0;var o,s,a=0;return t.rowHeight[n]0&&(a=i+t.verticalPadding-t.rowHeight[n]),o=t.width-r>=e+t.horizontalPadding?(t.height+a)/(r+e+t.horizontalPadding):(t.height+a)/t.width,a=i+t.verticalPadding,(s=t.widtho&&e!=i){n.splice(-1,1),t.rows[i].push(r),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=n[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var c=r;c<=o;c++)h[0]+=this.grid[c][s-1].length+this.grid[c][s].length-1;if(o0)for(c=s;c<=a;c++)h[3]+=this.grid[r-1][c].length+this.grid[r][c].length-1;for(var g,u,d=p.MAX_VALUE,f=0;f0&&(s=i.getGraphManager().add(i.newGraph(),o),this.processChildrenList(s,g,i))}},g.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",g)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=n(i(7799))},3143:function(t){var e;e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26)}([function(t,e,i){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(8),o=i(9);function s(t,e,i){n.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(n.prototype),n)s[a]=n[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==n)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(13),s=i(0),a=i(16),h=i(4);function l(t,e,i,s){null==i&&null==s&&(s=e),n.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var c in l.prototype=Object.create(n.prototype),n)l[c]=n[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach((function(n){if(n.target==t){if(n.source!=i)throw"Incorrect edge source!";e.push(n)}})),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach((function(n){if(n.source!=i&&n.target!=i)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)})),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}})),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>i&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-i)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-i),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var n=new h(e,i),r=t.inverseTransformPoint(n);this.setLocation(r.x,r.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(0),s=i(6),a=i(3),h=i(1),l=i(13),c=i(12),g=i(11);function u(t,e,i){n.call(this,i),this.estimatedSize=r.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in u.prototype=Object.create(n.prototype),n)u[d]=n[d];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,i){if(null==e&&null==i){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var r=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(r.source=e,r.target=i,r.isInterGraph=!1,this.getEdges().push(r),e.edges.push(r),i!=e&&i.edges.push(r),r)},u.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),n=i.length,r=0;r-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(c,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var t,e,i,n=r.MAX_VALUE,o=r.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(n=t),o>(e=l.getLeft())&&(o=e)}return n==r.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=n-i,new c(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,i,n,o,s,a=r.MAX_VALUE,h=-r.MAX_VALUE,c=r.MAX_VALUE,g=-r.MAX_VALUE,u=this.nodes,d=u.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),c>(n=f.getTop())&&(c=n),g<(o=f.getBottom())&&(g=o)}var y=new l(a,c,h-a,g-c);a==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=u[0].getParent().paddingLeft?u[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},u.calculateBounds=function(t){for(var e,i,n,o,s=r.MAX_VALUE,a=-r.MAX_VALUE,h=r.MAX_VALUE,c=-r.MAX_VALUE,g=t.length,u=0;u(e=d.getLeft())&&(s=e),a<(i=d.getRight())&&(a=i),h>(n=d.getTop())&&(h=n),c<(o=d.getBottom())&&(c=o)}return new l(s,h,a-s,c-h)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,n=0;n=this.nodes.length){var h=0;r.forEach((function(e){e.owner==t&&h++})),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=u},function(t,e,i){"use strict";var n,r=i(1);function o(t){n=i(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,n,r){if(null==i&&null==n&&null==r){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}r=i,i=t;var o=(n=e).getOwner(),s=r.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,n,r);if(i.isInterGraph=!0,i.source=n,i.target=r,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=n,i[1]=h,i[2]=o,i[3]=m,!1;if(ro)return i[0]=a,i[1]=r,i[2]=E,i[3]=s,!1;if(no?(i[0]=c,i[1]=g,L=!0):(i[0]=l,i[1]=h,L=!0):O===I&&(n>o?(i[0]=a,i[1]=h,L=!0):(i[0]=u,i[1]=g,L=!0)),-D===I?o>n?(i[2]=_,i[3]=m,T=!0):(i[2]=E,i[3]=y,T=!0):D===I&&(o>n?(i[2]=f,i[3]=y,T=!0):(i[2]=v,i[3]=m,T=!0)),L&&T)return!1;if(n>o?r>s?(w=this.getCardinalDirection(O,I,4),R=this.getCardinalDirection(D,I,2)):(w=this.getCardinalDirection(-O,I,3),R=this.getCardinalDirection(-D,I,1)):r>s?(w=this.getCardinalDirection(-O,I,1),R=this.getCardinalDirection(-D,I,3)):(w=this.getCardinalDirection(O,I,2),R=this.getCardinalDirection(D,I,4)),!L)switch(w){case 1:M=h,C=n+-p/I,i[0]=C,i[1]=M;break;case 2:C=u,M=r+d*I,i[0]=C,i[1]=M;break;case 3:M=g,C=n+p/I,i[0]=C,i[1]=M;break;case 4:C=c,M=r+-d*I,i[0]=C,i[1]=M}if(!T)switch(R){case 1:G=y,x=o+-A/I,i[2]=x,i[3]=G;break;case 2:x=v,G=s+N*I,i[2]=x,i[3]=G;break;case 3:G=m,x=o+A/I,i[2]=x,i[3]=G;break;case 4:x=_,G=s+-N*I,i[2]=x,i[3]=G}}return!1},r.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},r.getIntersection=function(t,e,i,r){if(null==r)return this.getIntersection2(t,e,i);var o,s,a,h,l,c,g,u=t.x,d=t.y,p=e.x,f=e.y,y=i.x,E=i.y,_=r.x,m=r.y;return 0==(g=(o=f-d)*(h=y-_)-(s=m-E)*(a=u-p))?null:new n((a*(c=_*E-y*m)-h*(l=p*d-u*f))/g,(s*l-o*c)/g)},r.angleOfVector=function(t,e,i,n){var r=void 0;return t!==i?(r=Math.atan((n-e)/(i-t)),i0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,i){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var c=a[0];a.splice(0,1),s.add(c);var g=c.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),r=0;r0){for(var r=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(g,1),c.getNeighborsList().forEach((function(t){if(i.indexOf(t)<0){var e=n.get(t)-1;1==e&&h.push(t),n.set(t,e)}}))}i=i.concat(h),1!=e.length&&2!=e.length||(r=!0,o=e[0])}return o},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,i){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,i){"use strict";var n=i(4);function r(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},r.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},r.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},r.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},r.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=r},function(t,e,i){"use strict";var n=i(15),r=i(7),o=i(0),s=i(8),a=i(9);function h(){n.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=r.DEFAULT_EDGE_LENGTH,this.springConstant=r.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=r.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var l in h.prototype=Object.create(n.prototype),n)h[l]=n[l];h.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,n,s,a,h=this.getGraphManager().getAllEdges(),l=0;lr.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var c=0;ct}}]),t}();t.exports=o},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=n,this.mismatch_penalty=r,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var n=this.listeners[i];n.event===t&&n.callback===e&&this.listeners.splice(i,1)}},r.emit=function(t,e){for(var i=0;i{"use strict";i.d(e,{diagram:()=>X});var n=i(2382),r=i(5522),o=i(1661),s=i(32),a=i(165),h=i(3457),l=i(4852),c=i(5097),g=i(8041),u=i(5263),d=function(){var t=(0,s.K2)((function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i}),"o"),e=[1,4],i=[1,13],n=[1,12],r=[1,15],o=[1,16],a=[1,20],h=[1,19],l=[6,7,8],c=[1,26],g=[1,24],u=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],f=[1,33],y=[1,34],E=[1,6,7,11,13,15,16,19,22],_={trace:(0,s.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,s.K2)((function(t,e,i,n,r,o,s){var a=o.length-1;switch(r){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",o[a].id),n.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:n.getLogger().trace("Icon: ",o[a]),n.decorateNode({icon:o[a]});break;case 17:case 21:n.decorateNode({class:o[a]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",o[a].id),n.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:n.decorateNode({icon:o[a]});break;case 25:n.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:n.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:n.getType(o[a-2],o[a])}}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},{6:i,9:22,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},{6:c,7:g,10:23,11:u},t(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:a,22:h}),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,23]),t(d,[2,24]),t(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:c,7:g,10:32,11:u},{1:[2,7],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:a,22:h},t(p,[2,14],{7:f,11:y}),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(d,[2,15]),t(d,[2,16]),t(d,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:f,11:y}),t(E,[2,11]),t(E,[2,12]),{21:[1,37]},t(d,[2,25]),t(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,i=[0],n=[],r=[null],o=[],a=this.table,h="",l=0,c=0,g=0,u=o.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(p.yy[f]=this.yy[f]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var y=d.yylloc;o.push(y);var E=d.options&&d.options.ranges;function _(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),(0,s.K2)(_,"lex");for(var m,v,N,A,L,T,O,D,I,w={};;){if(N=i[i.length-1],this.defaultActions[N]?A=this.defaultActions[N]:(null==m&&(m=_()),A=a[N]&&a[N][m]),void 0===A||!A.length||!A[0]){var R;for(T in I=[],a[N])this.terminals_[T]&&T>2&&I.push("'"+this.terminals_[T]+"'");R=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:y,expected:I})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+m);switch(A[0]){case 1:i.push(m),r.push(d.yytext),o.push(d.yylloc),i.push(A[1]),m=null,v?(m=v,v=null):(c=d.yyleng,h=d.yytext,l=d.yylineno,y=d.yylloc,g>0&&g--);break;case 2:if(O=this.productions_[A[1]][1],w.$=r[r.length-O],w._$={first_line:o[o.length-(O||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(O||1)].first_column,last_column:o[o.length-1].last_column},E&&(w._$.range=[o[o.length-(O||1)].range[0],o[o.length-1].range[1]]),void 0!==(L=this.performAction.apply(w,[h,c,l,p.yy,A[1],r,o].concat(u))))return L;O&&(i=i.slice(0,-1*O*2),r=r.slice(0,-1*O),o=o.slice(0,-1*O)),i.push(this.productions_[A[1]][0]),r.push(w.$),o.push(w._$),D=a[i[i.length-2]][i[i.length-1]],i.push(D);break;case 3:return!0}}return!0}),"parse")},m=function(){return{EOF:1,parseError:(0,s.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,s.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,s.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,s.K2)((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,s.K2)((function(){return this._more=!0,this}),"more"),reject:(0,s.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,s.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,s.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,s.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,s.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,s.K2)((function(t,e){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;oe[0].length)){if(e=i,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,r[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,s.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,s.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,s.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,s.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,s.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,s.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)((function(t,e,i,n){switch(i){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}}),"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function v(){this.yy={}}return _.lexer=m,(0,s.K2)(v,"Parser"),v.prototype=_,_.Parser=v,new v}();d.parser=d;var p=d,f=[],y=0,E={},_=(0,s.K2)((()=>{f=[],y=0,E={}}),"clear"),m=(0,s.K2)((function(t){for(let e=f.length-1;e>=0;e--)if(f[e].levelf.length>0?f[0]:null),"getMindmap"),N=(0,s.K2)(((t,e,i,n)=>{s.Rm.info("addNode",t,e,i,n);const r=(0,s.D7)();let o=r.mindmap?.padding??s.UI.mindmap.padding;switch(n){case A.ROUNDED_RECT:case A.RECT:case A.HEXAGON:o*=2}const a={id:y++,nodeId:(0,s.jZ)(e,r),level:t,descr:(0,s.jZ)(i,r),type:n,children:[],width:r.mindmap?.maxNodeWidth??s.UI.mindmap.maxNodeWidth,padding:o},h=m(t);if(h)h.children.push(a),f.push(a);else{if(0!==f.length)throw new Error('There can be only one root. No parent could be found for ("'+a.descr+'")');f.push(a)}}),"addNode"),A={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},L={clear:_,addNode:N,getMindmap:v,nodeType:A,getType:(0,s.K2)(((t,e)=>{switch(s.Rm.debug("In get type",t,e),t){case"[":return A.RECT;case"(":return")"===e?A.ROUNDED_RECT:A.CLOUD;case"((":return A.CIRCLE;case")":return A.CLOUD;case"))":return A.BANG;case"{{":return A.HEXAGON;default:return A.DEFAULT}}),"getType"),setElementForId:(0,s.K2)(((t,e)=>{E[t]=e}),"setElementForId"),decorateNode:(0,s.K2)((t=>{if(!t)return;const e=(0,s.D7)(),i=f[f.length-1];t.icon&&(i.icon=(0,s.jZ)(t.icon,e)),t.class&&(i.class=(0,s.jZ)(t.class,e))}),"decorateNode"),type2Str:(0,s.K2)((t=>{switch(t){case A.DEFAULT:return"no-border";case A.RECT:return"rect";case A.ROUNDED_RECT:return"rounded-rect";case A.CIRCLE:return"circle";case A.CLOUD:return"cloud";case A.BANG:return"bang";case A.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:(0,s.K2)((()=>s.Rm),"getLogger"),getElementById:(0,s.K2)((t=>E[t]),"getElementById")},T=(0,s.K2)((function(t,e,i,n){e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 ${i.height-5} v${10-i.height} q0,-5 5,-5 h${i.width-10} q5,0 5,5 v${i.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",i.height).attr("x2",i.width).attr("y2",i.height)}),"defaultBkg"),O=(0,s.K2)((function(t,e,i){e.append("rect").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("height",i.height).attr("width",i.width)}),"rectBkg"),D=(0,s.K2)((function(t,e,i){const n=i.width,r=i.height,o=.15*n,s=.25*n,a=.35*n,h=.2*n;e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 0 a${o},${o} 0 0,1 ${.25*n},${-1*n*.1}\n a${a},${a} 1 0,1 ${.4*n},${-1*n*.1}\n a${s},${s} 1 0,1 ${.35*n},${1*n*.2}\n\n a${o},${o} 1 0,1 ${.15*n},${1*r*.35}\n a${h},${h} 1 0,1 ${-1*n*.15},${1*r*.65}\n\n a${s},${o} 1 0,1 ${-1*n*.25},${.15*n}\n a${a},${a} 1 0,1 ${-1*n*.5},0\n a${o},${o} 1 0,1 ${-1*n*.25},${-1*n*.15}\n\n a${o},${o} 1 0,1 ${-1*n*.1},${-1*r*.35}\n a${h},${h} 1 0,1 ${.1*n},${-1*r*.65}\n\n H0 V0 Z`)}),"cloudBkg"),I=(0,s.K2)((function(t,e,i){const n=i.width,r=i.height,o=.15*n;e.append("path").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("d",`M0 0 a${o},${o} 1 0,0 ${.25*n},${-1*r*.1}\n a${o},${o} 1 0,0 ${.25*n},0\n a${o},${o} 1 0,0 ${.25*n},0\n a${o},${o} 1 0,0 ${.25*n},${1*r*.1}\n\n a${o},${o} 1 0,0 ${.15*n},${1*r*.33}\n a${.8*o},${.8*o} 1 0,0 0,${1*r*.34}\n a${o},${o} 1 0,0 ${-1*n*.15},${1*r*.33}\n\n a${o},${o} 1 0,0 ${-1*n*.25},${.15*r}\n a${o},${o} 1 0,0 ${-1*n*.25},0\n a${o},${o} 1 0,0 ${-1*n*.25},0\n a${o},${o} 1 0,0 ${-1*n*.25},${-1*r*.15}\n\n a${o},${o} 1 0,0 ${-1*n*.1},${-1*r*.33}\n a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34}\n a${o},${o} 1 0,0 ${.1*n},${-1*r*.33}\n\n H0 V0 Z`)}),"bangBkg"),w=(0,s.K2)((function(t,e,i){e.append("circle").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("r",i.width/2)}),"circleBkg");function R(t,e,i,n,r){return t.insert("polygon",":first-child").attr("points",n.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+(r.width-e)/2+", "+i+")")}(0,s.K2)(R,"insertPolygonShape");var C=(0,s.K2)((function(t,e,i){const n=i.height,r=n/4,o=i.width-i.padding+2*r;R(e,o,n,[{x:r,y:0},{x:o-r,y:0},{x:o,y:-n/2},{x:o-r,y:-n},{x:r,y:-n},{x:0,y:-n/2}],i)}),"hexagonBkg"),M=(0,s.K2)((function(t,e,i){e.append("rect").attr("id","node-"+i.id).attr("class","node-bkg node-"+t.type2Str(i.type)).attr("height",i.height).attr("rx",i.padding).attr("ry",i.padding).attr("width",i.width)}),"roundedRectBkg"),x=(0,s.K2)((async function(t,e,i,o,s){const a=s.htmlLabels,h=o%11,l=e.append("g");i.section=h;let c="section-"+h;h<0&&(c+=" section-root"),l.attr("class",(i.class?i.class+" ":"")+"mindmap-node "+c);const g=l.append("g"),u=l.append("g"),d=i.descr.replace(/()/g,"\n");await(0,n.GZ)(u,d,{useHtmlLabels:a,width:i.width,classes:"mindmap-node-label"},s),a||u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const p=u.node().getBBox(),[f]=(0,r.I5)(s.fontSize);if(i.height=p.height+1.1*f*.5+i.padding,i.width=p.width+2*i.padding,i.icon)if(i.type===t.nodeType.CIRCLE)i.height+=50,i.width+=50,l.append("foreignObject").attr("height","50px").attr("width",i.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+h+" "+i.icon),u.attr("transform","translate("+i.width/2+", "+(i.height/2-1.5*i.padding)+")");else{i.width+=50;const t=i.height;i.height=Math.max(t,60);const e=Math.abs(i.height-t);l.append("foreignObject").attr("width","60px").attr("height",i.height).attr("style","text-align: center;margin-top:"+e/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+h+" "+i.icon),u.attr("transform","translate("+(25+i.width/2)+", "+(e/2+i.padding/2)+")")}else if(a){const t=(i.width-p.width)/2,e=(i.height-p.height)/2;u.attr("transform","translate("+t+", "+e+")")}else{const t=i.width/2,e=i.padding/2;u.attr("transform","translate("+t+", "+e+")")}switch(i.type){case t.nodeType.DEFAULT:T(t,g,i,h);break;case t.nodeType.ROUNDED_RECT:M(t,g,i,h);break;case t.nodeType.RECT:O(t,g,i,h);break;case t.nodeType.CIRCLE:g.attr("transform","translate("+i.width/2+", "+ +i.height/2+")"),w(t,g,i,h);break;case t.nodeType.CLOUD:D(t,g,i,h);break;case t.nodeType.BANG:I(t,g,i,h);break;case t.nodeType.HEXAGON:C(t,g,i,h)}return t.setElementForId(i.id,l),i.height}),"drawNode"),G=(0,s.K2)((function(t,e){const i=t.getElementById(e.id),n=e.x||0,r=e.y||0;i.attr("transform","translate("+n+","+r+")")}),"positionNode");async function S(t,e,i,n,r){await x(t,e,i,n,r),i.children&&await Promise.all(i.children.map(((i,o)=>S(t,e,i,n<0?o:n,r))))}function b(t,e){e.edges().map(((e,i)=>{const n=e.data();if(e[0]._private.bodyBounds){const r=e[0]._private.rscratch;s.Rm.trace("Edge: ",i,n),t.insert("path").attr("d",`M ${r.startX},${r.startY} L ${r.midX},${r.midY} L${r.endX},${r.endY} `).attr("class","edge section-edge-"+n.section+" edge-depth-"+n.depth)}}))}function F(t,e,i,n){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:n,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach((r=>{F(r,e,i,n+1),e.add({group:"edges",data:{id:`${t.id}_${r.id}`,source:t.id,target:r.id,depth:n,section:r.section}})}))}function P(t,e){return new Promise((i=>{const n=(0,l.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),r=(0,a.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});n.remove(),F(t,r,e,0),r.nodes().forEach((function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}})),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready((t=>{s.Rm.info("Ready",t),i(r)}))}))}function U(t,e){e.nodes().map(((e,i)=>{const n=e.data();n.x=e.position().x,n.y=e.position().y,G(t,n);const r=t.getElementById(n.nodeId);s.Rm.info("Id:",i,"Position: (",e.position().x,", ",e.position().y,")",n),r.attr("transform",`translate(${e.position().x-n.width/2}, ${e.position().y-n.height/2})`),r.attr("attr",`apa-${i})`)}))}a.A.use(h),(0,s.K2)(S,"drawNodes"),(0,s.K2)(b,"drawEdges"),(0,s.K2)(F,"addNodes"),(0,s.K2)(P,"layoutMindmap"),(0,s.K2)(U,"positionNodes");var k={draw:(0,s.K2)((async(t,e,i,n)=>{s.Rm.debug("Rendering mindmap diagram\n"+t);const r=n.db,a=r.getMindmap();if(!a)return;const h=(0,s.D7)();h.htmlLabels=!1;const l=(0,o.D)(e),c=l.append("g");c.attr("class","mindmap-edges");const g=l.append("g");g.attr("class","mindmap-nodes"),await S(r,g,a,-1,h);const u=await P(a,h);b(c,u),U(r,u),(0,s.ot)(void 0,l,h.mindmap?.padding??s.UI.mindmap.padding,h.mindmap?.useMaxWidth??s.UI.mindmap.useMaxWidth)}),"draw")},Y=(0,s.K2)((t=>{let e="";for(let e=0;e`\n .edge {\n stroke-width: 3;\n }\n ${Y(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/265-4e4c541c.chunk.min.js b/js/265-4e4c541c.chunk.min.js new file mode 100644 index 0000000..d8ee930 --- /dev/null +++ b/js/265-4e4c541c.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[265],{4075:(e,t,n)=>{n.d(t,{M:()=>o});var i=n(9592),r=n(53),a=n(4722);function o(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:s(e),edges:d(e)};return i.A(e.graph())||(t.value=r.A(e.graph())),t}function s(e){return a.A(e.nodes(),(function(t){var n=e.node(t),r=e.parent(t),a={v:t};return i.A(n)||(a.value=n),i.A(r)||(a.parent=r),a}))}function d(e){return a.A(e.edges(),(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return i.A(t.name)||(r.name=t.name),i.A(n)||(r.value=n),r}))}n(1471)},1265:(e,t,n)=>{n.d(t,{diagram:()=>U});var i=n(3258),r=n(1805),a=n(7750),o=n(2382),s=n(5522),d=n(32),l=n(4852),c=n(697),g=n(567),h=n(4075),f={},u={},p={},m=(0,d.K2)((()=>{u={},p={},f={}}),"clear"),w=(0,d.K2)(((e,t)=>(d.Rm.trace("In isDescendant",t," ",e," = ",u[t].includes(e)),!!u[t].includes(e))),"isDescendant"),y=(0,d.K2)(((e,t)=>(d.Rm.info("Descendants of ",t," is ",u[t]),d.Rm.info("Edge is ",e),e.v!==t&&e.w!==t&&(u[t]?u[t].includes(e.v)||w(e.v,t)||w(e.w,t)||u[t].includes(e.w):(d.Rm.debug("Tilt, ",t,",not in descendants"),!1)))),"edgeInCluster"),R=(0,d.K2)(((e,t,n,i)=>{d.Rm.warn("Copying children of ",e,"root",i,"data",t.node(e),i);const r=t.children(e)||[];e!==i&&r.push(e),d.Rm.warn("Copying (nodes) clusterId",e,"nodes",r),r.forEach((r=>{if(t.children(r).length>0)R(r,t,n,i);else{const a=t.node(r);d.Rm.info("cp ",r," to ",i," with parent ",e),n.setNode(r,a),i!==t.parent(r)&&(d.Rm.warn("Setting parent",r,t.parent(r)),n.setParent(r,t.parent(r))),e!==i&&r!==e?(d.Rm.debug("Setting parent",r,e),n.setParent(r,e)):(d.Rm.info("In copy ",e,"root",i,"data",t.node(e),i),d.Rm.debug("Not Setting parent for node=",r,"cluster!==rootId",e!==i,"node!==clusterId",r!==e));const o=t.edges(r);d.Rm.debug("Copying Edges",o),o.forEach((r=>{d.Rm.info("Edge",r);const a=t.edge(r.v,r.w,r.name);d.Rm.info("Edge data",a,i);try{y(r,i)?(d.Rm.info("Copying as ",r.v,r.w,a,r.name),n.setEdge(r.v,r.w,a,r.name),d.Rm.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):d.Rm.info("Skipping copy of edge ",r.v,"--\x3e",r.w," rootId: ",i," clusterId:",e)}catch(e){d.Rm.error(e)}}))}d.Rm.debug("Removing node",r),t.removeNode(r)}))}),"copy"),b=(0,d.K2)(((e,t)=>{const n=t.children(e);let i=[...n];for(const r of n)p[r]=e,i=[...i,...b(r,t)];return i}),"extractDescendants"),v=(0,d.K2)(((e,t)=>{d.Rm.trace("Searching",e);const n=t.children(e);if(d.Rm.trace("Searching children of id ",e,n),n.length<1)return d.Rm.trace("This is a valid node",e),e;for(const i of n){const n=v(i,t);if(n)return d.Rm.trace("Found replacement for",e," => ",n),n}}),"findNonClusterChild"),x=(0,d.K2)((e=>f[e]&&f[e].externalConnections&&f[e]?f[e].id:e),"getAnchorId"),N=(0,d.K2)(((e,t)=>{if(!e||t>10)d.Rm.debug("Opting out, no graph ");else{d.Rm.debug("Opting in, graph "),e.nodes().forEach((function(t){e.children(t).length>0&&(d.Rm.warn("Cluster identified",t," Replacement id in edges: ",v(t,e)),u[t]=b(t,e),f[t]={id:v(t,e),clusterData:e.node(t)})})),e.nodes().forEach((function(t){const n=e.children(t),i=e.edges();n.length>0?(d.Rm.debug("Cluster identified",t,u),i.forEach((e=>{e.v!==t&&e.w!==t&&w(e.v,t)^w(e.w,t)&&(d.Rm.warn("Edge: ",e," leaves cluster ",t),d.Rm.warn("Descendants of XXX ",t,": ",u[t]),f[t].externalConnections=!0)}))):d.Rm.debug("Not a cluster ",t,u)}));for(let t of Object.keys(f)){const n=f[t].id,i=e.parent(n);i!==t&&f[i]&&!f[i].externalConnections&&(f[t].id=i)}e.edges().forEach((function(t){const n=e.edge(t);d.Rm.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),d.Rm.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let i=t.v,r=t.w;if(d.Rm.warn("Fix XXX",f,"ids:",t.v,t.w,"Translating: ",f[t.v]," --- ",f[t.w]),f[t.v]&&f[t.w]&&f[t.v]===f[t.w]){d.Rm.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),d.Rm.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),i=x(t.v),r=x(t.w),e.removeEdge(t.v,t.w,t.name);const a=t.w+"---"+t.v;e.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=structuredClone(n),s=structuredClone(n);o.label="",o.arrowTypeEnd="none",s.label="",o.fromCluster=t.v,s.toCluster=t.v,e.setEdge(i,a,o,t.name+"-cyclic-special"),e.setEdge(a,r,s,t.name+"-cyclic-special")}else if(f[t.v]||f[t.w]){if(d.Rm.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),i=x(t.v),r=x(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){const r=e.parent(i);f[r].externalConnections=!0,n.fromCluster=t.v}if(r!==t.w){const i=e.parent(r);f[i].externalConnections=!0,n.toCluster=t.w}d.Rm.warn("Fix Replacing with XXX",i,r,t.name),e.setEdge(i,r,n,t.name)}})),d.Rm.warn("Adjusted Graph",h.M(e)),D(e,0),d.Rm.trace(f)}}),"adjustClustersAndEdges"),D=(0,d.K2)(((e,t)=>{if(d.Rm.warn("extractor - ",t,h.M(e),e.children("D")),t>10)return void d.Rm.error("Bailing out");let n=e.nodes(),i=!1;for(const t of n){const n=e.children(t);i=i||n.length>0}if(i){d.Rm.debug("Nodes = ",n,t);for(const i of n)if(d.Rm.debug("Extracting node",i,f,f[i]&&!f[i].externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),f[i])if(!f[i].externalConnections&&e.children(i)&&e.children(i).length>0){d.Rm.warn("Cluster without external connections, without a parent and with children",i,t);let n="TB"===e.graph().rankdir?"LR":"TB";f[i]?.clusterData?.dir&&(n=f[i].clusterData.dir,d.Rm.warn("Fixing dir",f[i].clusterData.dir,n));const r=new c.T({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));d.Rm.warn("Old graph before copy",h.M(e)),R(i,e,r,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:f[i].clusterData,labelText:f[i].labelText,graph:r}),d.Rm.warn("New graph after copy node: (",i,")",h.M(r)),d.Rm.debug("Old graph after copy",h.M(e))}else d.Rm.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!f[i].externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),d.Rm.debug(f);else d.Rm.debug("Not a cluster",i,t);n=e.nodes(),d.Rm.warn("New list of nodes",n);for(const i of n){const n=e.node(i);d.Rm.warn(" Now next level",i,n),n.clusterNode&&D(n.graph,t+1)}}else d.Rm.debug("Done, no node has children",e.nodes())}),"extractor"),C=(0,d.K2)(((e,t)=>{if(0===t.length)return[];let n=Object.assign(t);return t.forEach((t=>{const i=e.children(t),r=C(e,i);n=[...n,...r]})),n}),"sorter"),T=(0,d.K2)((e=>C(e,e.children())),"sortNodesByHierarchy"),S=(0,d.K2)(((e,t)=>{d.Rm.info("Creating subgraph rect for ",t.id,t);const n=(0,d.D7)(),r=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),s=r.insert("rect",":first-child"),c=(0,d._3)(n.flowchart.htmlLabels),g=r.insert("g").attr("class","cluster-label"),h="markdown"===t.labelType?(0,o.GZ)(g,t.labelText,{style:t.labelStyle,useHtmlLabels:c},n):g.node().appendChild((0,i.DA)(t.labelText,t.labelStyle,void 0,!0));let f=h.getBBox();if((0,d._3)(n.flowchart.htmlLabels)){const e=h.children[0],t=(0,l.Ltv)(h);f=e.getBoundingClientRect(),t.attr("width",f.width),t.attr("height",f.height)}const u=0*t.padding,p=u/2,m=t.width<=f.width+u?f.width+u:t.width;t.width<=f.width+u?t.diff=(f.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,d.Rm.trace("Data ",t,JSON.stringify(t)),s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-m/2).attr("y",t.y-t.height/2-p).attr("width",m).attr("height",t.height+u);const{subGraphTitleTopMargin:w}=(0,a.O)(n);c?g.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`):g.attr("transform",`translate(${t.x}, ${t.y-t.height/2+w})`);const y=s.node().getBBox();return t.width=y.width,t.height=y.height,t.intersect=function(e){return(0,i.nM)(t,e)},r}),"rect"),E=(0,d.K2)(((e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),r=n.insert("rect",":first-child"),a=0*t.padding,o=a/2;r.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+a).attr("height",t.height+a).attr("fill","none");const s=r.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(e){return(0,i.nM)(t,e)},n}),"noteGroup"),k={rect:S,roundedWithTitle:(0,d.K2)(((e,t)=>{const n=(0,d.D7)(),r=e.insert("g").attr("class",t.classes).attr("id",t.id),o=r.insert("rect",":first-child"),s=r.insert("g").attr("class","cluster-label"),c=r.append("rect"),g=s.node().appendChild((0,i.DA)(t.labelText,t.labelStyle,void 0,!0));let h=g.getBBox();if((0,d._3)(n.flowchart.htmlLabels)){const e=g.children[0],t=(0,l.Ltv)(g);h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}h=g.getBBox();const f=0*t.padding,u=f/2,p=t.width<=h.width+t.padding?h.width+t.padding:t.width;t.width<=h.width+t.padding?t.diff=(h.width+0*t.padding-t.width)/2:t.diff=-t.padding/2,o.attr("class","outer").attr("x",t.x-p/2-u).attr("y",t.y-t.height/2-u).attr("width",p+f).attr("height",t.height+f),c.attr("class","inner").attr("x",t.x-p/2-u).attr("y",t.y-t.height/2-u+h.height-1).attr("width",p+f).attr("height",t.height+f-h.height-3);const{subGraphTitleTopMargin:m}=(0,a.O)(n);s.attr("transform",`translate(${t.x-h.width/2}, ${t.y-t.height/2-t.padding/3+((0,d._3)(n.flowchart.htmlLabels)?5:3)+m})`);const w=o.node().getBBox();return t.height=w.height,t.intersect=function(e){return(0,i.nM)(t,e)},r}),"roundedWithTitle"),noteGroup:E,divider:(0,d.K2)(((e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),r=n.insert("rect",":first-child"),a=0*t.padding,o=a/2;r.attr("class","divider").attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2).attr("width",t.width+a).attr("height",t.height+a);const s=r.node().getBBox();return t.width=s.width,t.height=s.height,t.diff=-t.padding/2,t.intersect=function(e){return(0,i.nM)(t,e)},n}),"divider")},X={},K=(0,d.K2)(((e,t)=>{d.Rm.trace("Inserting cluster");const n=t.shape||"rect";X[t.id]=k[n](e,t)}),"insertCluster"),M=(0,d.K2)((()=>{X={}}),"clear"),L=(0,d.K2)((async(e,t,n,r,o,s)=>{d.Rm.info("Graph in recursive render: XXX",h.M(t),o);const l=t.graph().rankdir;d.Rm.trace("Dir in recursive render - dir:",l);const c=e.insert("g").attr("class","root");t.nodes()?d.Rm.info("Recursive render XXX",t.nodes()):d.Rm.info("No nodes found for",t),t.edges().length>0&&d.Rm.trace("Recursive edges",t.edge(t.edges()[0]));const u=c.insert("g").attr("class","clusters"),p=c.insert("g").attr("class","edgePaths"),m=c.insert("g").attr("class","edgeLabels"),w=c.insert("g").attr("class","nodes");await Promise.all(t.nodes().map((async function(e){const a=t.node(e);if(void 0!==o){const n=JSON.parse(JSON.stringify(o.clusterData));d.Rm.info("Setting data for cluster XXX (",e,") ",n,o),t.setNode(o.id,n),t.parent(e)||(d.Rm.trace("Setting parent",e,o.id),t.setParent(e,o.id,n))}if(d.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),a?.clusterNode){d.Rm.info("Cluster identified",e,a.width,t.node(e));const{ranksep:o,nodesep:l}=t.graph();a.graph.setGraph({...a.graph.graph(),ranksep:o,nodesep:l});const c=await L(w,a.graph,n,r,t.node(e),s),g=c.elem;(0,i.lC)(a,g),a.diff=c.diff||0,d.Rm.info("Node bounds (abc123)",e,a,a.width,a.x,a.y),(0,i.U7)(g,a),d.Rm.warn("Recursive render complete ",g,a)}else t.children(e).length>0?(d.Rm.info("Cluster - the non recursive path XXX",e,a.id,a,t),d.Rm.info(v(a.id,t)),f[a.id]={id:v(a.id,t),node:a}):(d.Rm.info("Node - the non recursive path",e,a.id,a),await(0,i.on)(w,t.node(e),{config:s,dir:l}))}))),t.edges().forEach((async function(e){const n=t.edge(e.v,e.w,e.name);d.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),d.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),d.Rm.info("Fix",f,"ids:",e.v,e.w,"Translating: ",f[e.v],f[e.w]),await(0,i.jP)(m,n)})),t.edges().forEach((function(e){d.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e))})),d.Rm.info("Graph before layout:",JSON.stringify(h.M(t))),d.Rm.info("#############################################"),d.Rm.info("### Layout ###"),d.Rm.info("#############################################"),d.Rm.info(t),(0,g.Zp)(t),d.Rm.info("Graph after layout:",JSON.stringify(h.M(t)));let y=0;const{subGraphTitleTotalMargin:R}=(0,a.O)(s);return T(t).forEach((function(e){const n=t.node(e);d.Rm.info("Position "+e+": "+JSON.stringify(t.node(e))),d.Rm.info("Position "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode?(n.y+=R,(0,i.U_)(n)):t.children(e).length>0?(n.height+=R,K(u,n),f[n.id].node=n):(n.y+=R/2,(0,i.U_)(n))})),t.edges().forEach((function(e){const a=t.edge(e);d.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a),a),a.points.forEach((e=>e.y+=R/2));const o=(0,i.Jo)(p,e,a,f,n,t,r);(0,i.T_)(a,o)})),t.nodes().forEach((function(e){const n=t.node(e);d.Rm.info(e,n.type,n.diff),"group"===n.type&&(y=n.diff)})),{elem:c,diff:y}}),"recursiveRender"),B=(0,d.K2)((async(e,t,n,r,a)=>{(0,i.g0)(e,n,r,a),(0,i.IU)(),(0,i.gh)(),M(),m(),d.Rm.warn("Graph at first:",JSON.stringify(h.M(t))),N(t),d.Rm.warn("Graph after:",JSON.stringify(h.M(t)));const o=(0,d.D7)();await L(e,t,r,a,void 0,o)}),"render"),O=(0,d.K2)((e=>d.Y2.sanitizeText(e,(0,d.D7)())),"sanitizeText"),A={dividerMargin:10,padding:5,textHeight:10,curve:void 0},I=(0,d.K2)((function(e,t,n,i){d.Rm.info("keys:",[...e.keys()]),d.Rm.info(e),e.forEach((function(e){const r={shape:"rect",id:e.id,domId:e.domId,labelText:O(e.id),labelStyle:"",style:"fill: none; stroke: black",padding:(0,d.D7)().flowchart?.padding??(0,d.D7)().class?.padding};t.setNode(e.id,r),G(e.classes,t,n,i,e.id),d.Rm.info("setNode",r)}))}),"addNamespaces"),G=(0,d.K2)((function(e,t,n,i,r){d.Rm.info("keys:",[...e.keys()]),d.Rm.info(e),[...e.values()].filter((e=>e.parent===r)).forEach((function(e){const n=e.cssClasses.join(" "),a=(0,s.sM)(e.styles),o=e.label??e.id,l={labelStyle:a.labelStyle,shape:"class_box",labelText:O(o),classData:e,rx:0,ry:0,class:n,style:a.style,id:e.id,domId:e.domId,tooltip:i.db.getTooltip(e.id,r)||"",haveCallback:e.haveCallback,link:e.link,width:"group"===e.type?500:void 0,type:e.type,padding:(0,d.D7)().flowchart?.padding??(0,d.D7)().class?.padding};t.setNode(e.id,l),r&&t.setParent(e.id,r),d.Rm.info("setNode",l)}))}),"addClasses"),J=(0,d.K2)((function(e,t,n,i){d.Rm.info(e),e.forEach((function(e,r){const a=e,o=a.text,c={labelStyle:"",shape:"note",labelText:O(o),noteData:a,rx:0,ry:0,class:"",style:"",id:a.id,domId:a.id,tooltip:"",type:"note",padding:(0,d.D7)().flowchart?.padding??(0,d.D7)().class?.padding};if(t.setNode(a.id,c),d.Rm.info("setNode",c),!a.class||!i.has(a.class))return;const g=n+r,h={id:`edgeNote${g}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:(0,s.Ib)(A.curve,l.lUB)};t.setEdge(a.id,a.class,h,g)}))}),"addNotes"),_=(0,d.K2)((function(e,t){const n=(0,d.D7)().flowchart;let i=0;e.forEach((function(e){i++;const r={classes:"relation",pattern:1==e.relation.lineType?"dashed":"solid",id:(0,s.rY)(e.id1,e.id2,{prefix:"id",counter:i}),arrowhead:"arrow_open"===e.type?"none":"normal",startLabelRight:"none"===e.relationTitle1?"":e.relationTitle1,endLabelLeft:"none"===e.relationTitle2?"":e.relationTitle2,arrowTypeStart:F(e.relation.type1),arrowTypeEnd:F(e.relation.type2),style:"fill:none",labelStyle:"",curve:(0,s.Ib)(n?.curve,l.lUB)};if(d.Rm.info(r,e),void 0!==e.style){const t=(0,s.sM)(e.style);r.style=t.style,r.labelStyle=t.labelStyle}e.text=e.title,void 0===e.text?void 0!==e.style&&(r.arrowheadStyle="fill: #333"):(r.arrowheadStyle="fill: #333",r.labelpos="c",(0,d.D7)().flowchart?.htmlLabels??(0,d.D7)().htmlLabels?(r.labelType="html",r.label=''+e.text+""):(r.labelType="text",r.label=e.text.replace(d.Y2.lineBreakRegex,"\n"),void 0===e.style&&(r.style=r.style||"stroke: #333; stroke-width: 1.5px;fill:none"),r.labelStyle=r.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,r,i)}))}),"addRelations"),P=(0,d.K2)((function(e){A={...A,...e}}),"setConf"),$=(0,d.K2)((async function(e,t,n,i){d.Rm.info("Drawing class - ",t);const r=(0,d.D7)().flowchart??(0,d.D7)().class,a=(0,d.D7)().securityLevel;d.Rm.info("config:",r);const o=r?.nodeSpacing??50,g=r?.rankSpacing??50,h=new c.T({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:o,ranksep:g,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),f=i.db.getNamespaces(),u=i.db.getClasses(),p=i.db.getRelations(),m=i.db.getNotes();let w;d.Rm.info(p),I(f,h,t,i),G(u,h,t,i),_(p,h),J(m,h,p.length+1,u),"sandbox"===a&&(w=(0,l.Ltv)("#i"+t));const y="sandbox"===a?(0,l.Ltv)(w.nodes()[0].contentDocument.body):(0,l.Ltv)("body"),R=y.select(`[id="${t}"]`),b=y.select("#"+t+" g");if(await B(b,h,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),s._K.insertTitle(R,"classTitleText",r?.titleTopMargin??5,i.db.getDiagramTitle()),(0,d.ot)(h,R,r?.diagramPadding,r?.useMaxWidth),!r?.htmlLabels){const e="sandbox"===a?w.nodes()[0].contentDocument:document,n=e.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of n){const n=t.getBBox(),i=e.createElementNS("http://www.w3.org/2000/svg","rect");i.setAttribute("rx",0),i.setAttribute("ry",0),i.setAttribute("width",n.width),i.setAttribute("height",n.height),t.insertBefore(i,t.firstChild)}}}),"draw");function F(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}(0,d.K2)(F,"getArrowMarker");var j={setConf:P,draw:$},U={parser:r._$,db:r.z2,renderer:j,styles:r.tM,init:(0,d.K2)((e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,r.z2.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/278-82f9d9ad.chunk.min.js b/js/278-82f9d9ad.chunk.min.js deleted file mode 100644 index 8136d20..0000000 --- a/js/278-82f9d9ad.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[278],{2278:(e,c,k)=>{k.d(c,{createInfoServices:()=>s.v});var s=k(7010);k(8546)}}]); \ No newline at end of file diff --git a/js/3-bc686a20.chunk.min.js b/js/3-bc686a20.chunk.min.js new file mode 100644 index 0000000..94d2e45 --- /dev/null +++ b/js/3-bc686a20.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[3],{4868:(t,e,s)=>{s.d(e,{A:()=>r,P:()=>o});var i=s(32),n=s(4852),r=(0,i.K2)(((t,e)=>{let s;return"sandbox"===e&&(s=(0,n.Ltv)("#i"+t)),("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),o=(0,i.K2)(((t,e,s,n)=>{t.attr("class",s);const{width:r,height:o,x:c,y:h}=a(t,e);(0,i.a$)(t,o,r,n);const d=l(c,h,r,o,e);t.attr("viewBox",d),i.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)}),"setupViewPortForSVG"),a=(0,i.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),l=(0,i.K2)(((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`),"createViewBox")},1003:(t,e,s)=>{s.d(e,{Zk:()=>l,iP:()=>Bt,q7:()=>w,tM:()=>Ft});var i=s(4868),n=s(5388),r=s(5522),o=s(32),a=function(){var t=(0,o.K2)((function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s}),"o"),e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],a=[1,11],l=[1,16],c=[1,17],h=[1,18],d=[1,19],u=[1,32],p=[1,20],y=[1,21],g=[1,22],f=[1,23],m=[1,24],S=[1,26],_=[1,27],b=[1,28],T=[1,29],k=[1,30],E=[1,31],x=[1,34],D=[1,35],C=[1,36],$=[1,37],v=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],A=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],K={trace:(0,o.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,o.K2)((function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var l=r[a],c=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");l=h[0],c=[c,h[1]]}this.$={stmt:"state",id:l,type:"default",description:c};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 34:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 35:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 36:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}}),"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,7]),t(L,[2,8]),t(L,[2,9]),t(L,[2,10]),t(L,[2,11]),t(L,[2,12],{14:[1,39],15:[1,40]}),t(L,[2,16]),{18:[1,41]},t(L,[2,18],{20:[1,42]}),{23:[1,43]},t(L,[2,22]),t(L,[2,23]),t(L,[2,24]),t(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},t(L,[2,28]),{34:[1,48]},{36:[1,49]},t(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},t(I,[2,42],{55:[1,54]}),t(I,[2,43],{55:[1,55]}),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,6]),t(L,[2,13]),{13:56,24:u,54:v},t(L,[2,17]),t(A,n,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},t(L,[2,29]),t(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},t(L,[2,14],{14:[1,67]}),{4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},t(L,[2,32]),t(L,[2,33]),t(L,[2,34]),t(L,[2,35]),t(I,[2,44]),t(I,[2,45]),t(L,[2,15]),t(L,[2,19]),t(A,n,{7:72}),t(L,[2,26]),t(L,[2,27]),{4:r,5:a,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:d,24:u,25:p,26:y,27:g,28:f,29:m,32:25,33:S,35:_,37:b,38:T,42:k,45:E,48:x,49:D,50:C,51:$,54:v},t(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:(0,o.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,o.K2)((function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",c=0,h=0,d=0,u=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;r.push(f);var m=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t}),"popStack"),(0,o.K2)(S,"lex");for(var _,b,T,k,E,x,D,C,$,v={};;){if(T=s[s.length-1],this.defaultActions[T]?k=this.defaultActions[T]:(null==_&&(_=S()),k=a[T]&&a[T][_]),void 0===k||!k.length||!k[0]){var L;for(x in $=[],a[T])this.terminals_[x]&&x>2&&$.push("'"+this.terminals_[x]+"'");L=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(L,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:f,expected:$})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+_);switch(k[0]){case 1:s.push(_),n.push(p.yytext),r.push(p.yylloc),s.push(k[1]),_=null,b?(_=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(D=this.productions_[k[1]][1],v.$=n[n.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[l,h,c,y.yy,k[1],n,r].concat(u))))return E;D&&(s=s.slice(0,-1*D*2),n=n.slice(0,-1*D),r=r.slice(0,-1*D)),s.push(this.productions_[k[1]][0]),n.push(v.$),r.push(v._$),C=a[s[s.length-2]][s[s.length-1]],s.push(C);break;case 3:return!0}}return!0}),"parse")},R=function(){return{EOF:1,parseError:(0,o.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,o.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,o.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,o.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,o.K2)((function(){return this._more=!0,this}),"more"),reject:(0,o.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,o.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,o.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,o.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,o.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,o.K2)((function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,o.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,o.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,o.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,o.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,o.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,o.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)((function(t,e,s,i){switch(s){case 0:return 41;case 1:case 42:return 48;case 2:case 43:return 49;case 3:case 44:return 50;case 4:case 45:return 51;case 5:case 6:case 8:case 9:case 10:case 11:case 54:case 56:case 62:break;case 7:case 77:return 5;case 12:case 32:return this.pushState("SCALE"),17;case 13:case 33:return 18;case 14:case 20:case 34:case 49:case 52:this.popState();break;case 15:return this.begin("acc_title"),33;case 16:return this.popState(),"acc_title_value";case 17:return this.begin("acc_descr"),35;case 18:return this.popState(),"acc_descr_value";case 19:this.begin("acc_descr_multiline");break;case 21:return"acc_descr_multiline_value";case 22:return this.pushState("CLASSDEF"),38;case 23:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 24:return this.popState(),this.pushState("CLASSDEFID"),39;case 25:return this.popState(),40;case 26:return this.pushState("CLASS"),45;case 27:return this.popState(),this.pushState("CLASS_STYLE"),46;case 28:return this.popState(),47;case 29:return this.pushState("STYLE"),42;case 30:return this.popState(),this.pushState("STYLEDEF_STYLES"),43;case 31:return this.popState(),44;case 35:this.pushState("STATE");break;case 36:case 39:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 37:case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 38:case 41:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 46:this.pushState("STATE_STRING");break;case 47:return this.pushState("STATE_ID"),"AS";case 48:case 64:return this.popState(),"ID";case 50:return"STATE_DESCR";case 51:return 19;case 53:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),56;case 59:return this.popState(),this.pushState("NOTE_ID"),57;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 63:return"NOTE_TEXT";case 65:return this.popState(),this.pushState("NOTE_TEXT"),24;case 66:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 67:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 68:case 69:return 6;case 70:return 16;case 71:return 54;case 72:return 24;case 73:return e.yytext=e.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 55;case 78:return"INVALID"}}),"anonymous"),rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}}}();function w(){this.yy={}}return K.lexer=R,(0,o.K2)(w,"Parser"),w.prototype=K,K.Parser=w,new w}();a.parser=a;var l=a,c="state",h="relation",d="default",u="divider",p="fill:none",y="fill: #333",g="text",f="normal",m="rect",S="rectWithTitle",_="divider",b="roundedWithTitle",T="statediagram",k=`${T}-state`,E="transition",x=`${E} note-edge`,D=`${T}-note`,C=`${T}-cluster`,$=`${T}-cluster-alt`,v="parent",L="note",I="----",A=`${I}${L}`,K=`${I}${v}`,R=(0,o.K2)(((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s}),"getDir"),w={getClasses:(0,o.K2)((function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}),"getClasses"),draw:(0,o.K2)((async function(t,e,s,a){o.Rm.info("REF0:"),o.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:l,state:c,layout:h}=(0,o.D7)();a.db.extract(a.db.getRootDocV2());const d=a.db.getData(),u=(0,i.A)(e,l);d.type=a.type,d.layoutAlgorithm=h,d.nodeSpacing=c?.nodeSpacing||50,d.rankSpacing=c?.rankSpacing||50,d.markers=["barb"],d.diagramId=e,await(0,n.XX)(d,u),r._K.insertTitle(u,"statediagramTitleText",c?.titleTopMargin??25,a.db.getDiagramTitle()),(0,i.P)(u,8,T,c?.useMaxWidth??!0)}),"draw"),getDir:R},O=new Map,N=0;function B(t="",e=0,s="",i=I){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}(0,o.K2)(B,"stateDomId");var F=(0,o.K2)(((t,e,s,i,n,r,a,l)=>{o.Rm.trace("items",e),e.forEach((e=>{switch(e.stmt){case c:case d:z(t,e,s,i,n,r,a,l);break;case h:{z(t,e.state1,s,i,n,r,a,l),z(t,e.state2,s,i,n,r,a,l);const c={id:"edge"+N,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:p,labelStyle:"",label:o.Y2.sanitizeText(e.description,(0,o.D7)()),arrowheadStyle:y,labelpos:"c",labelType:g,thickness:f,classes:E,look:a};n.push(c),N++}}}))}),"setupDoc"),P=(0,o.K2)(((t,e="TB")=>{let s=e;if(t.doc)for(const e of t.doc)"dir"===e.stmt&&(s=e.value);return s}),"getDir");function Y(t,e,s){if(!e.id||""===e.id||""===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach((t=>{if(s.get(t)){const i=s.get(t);e.cssCompiledStyles=[...e.cssCompiledStyles,...i.styles]}})));const i=t.find((t=>t.id===e.id));i?Object.assign(i,e):t.push(e)}function G(t){return t?.classes?.join(" ")??""}function j(t){return t?.styles??[]}(0,o.K2)(Y,"insertOrUpdateNode"),(0,o.K2)(G,"getClassesFromDbInfo"),(0,o.K2)(j,"getStylesFromDbInfo");var z=(0,o.K2)(((t,e,s,i,n,r,a,l)=>{const c=e.id,h=s.get(c),T=G(h),E=j(h);if(o.Rm.info("dataFetcher parsedItem",e,h,E),"root"!==c){let s=m;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==d&&(s=e.type),O.get(c)||O.set(c,{id:c,shape:s,description:o.Y2.sanitizeText(c,(0,o.D7)()),cssClasses:`${T} ${k}`,cssStyles:E});const h=O.get(c);e.description&&(Array.isArray(h.description)?(h.shape=S,h.description.push(e.description)):h.description?.length>0?(h.shape=S,h.description===c?h.description=[e.description]:h.description=[h.description,e.description]):(h.shape=m,h.description=e.description),h.description=o.Y2.sanitizeTextOrArray(h.description,(0,o.D7)())),1===h.description?.length&&h.shape===S&&("group"===h.type?h.shape=b:h.shape=m),!h.type&&e.doc&&(o.Rm.info("Setting cluster for XCX",c,P(e)),h.type="group",h.isGroup=!0,h.dir=P(e),h.shape=e.type===u?_:b,h.cssClasses=`${h.cssClasses} ${C} ${r?$:""}`);const I={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:c,dir:h.dir,domId:B(c,N),type:h.type,isGroup:"group"===h.type,padding:8,rx:10,ry:10,look:a};if(I.shape===_&&(I.label=""),t&&"root"!==t.id&&(o.Rm.trace("Setting node ",c," to be child of its parent ",t.id),I.parentId=t.id),I.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:D,cssStyles:[],cssCompilesStyles:[],id:c+A+"-"+N,domId:B(c,N,L),type:h.type,isGroup:"group"===h.type,padding:(0,o.D7)().flowchart.padding,look:a,position:e.note.position},s=c+K,r={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:h.cssClasses,cssStyles:[],id:c+K,domId:B(c,N,v),type:"group",isGroup:!0,padding:16,look:a,position:e.note.position};N++,r.id=s,t.parentId=s,Y(i,r,l),Y(i,t,l),Y(i,I,l);let d=c,u=t.id;"left of"===e.note.position&&(d=t.id,u=c),n.push({id:d+"-"+u,start:d,end:u,arrowhead:"none",arrowTypeEnd:"",style:p,labelStyle:"",classes:x,arrowheadStyle:y,labelpos:"c",labelType:g,thickness:f,look:a})}else Y(i,I,l)}e.doc&&(o.Rm.trace("Adding nodes children "),F(e,e.doc,s,i,n,!r,a,l))}),"dataFetcher"),U=(0,o.K2)((()=>{O.clear(),N=0}),"reset"),M="[*]",X="start",V=M,W="color",H="fill";function J(){return new Map}(0,o.K2)(J,"newClassesList");var q=[],Z=[],Q="LR",tt=[],et=J(),st=(0,o.K2)((()=>({relations:[],states:new Map,documents:{}})),"newDoc"),it={root:st()},nt=it.root,rt=0,ot=0,at=(0,o.K2)((t=>JSON.parse(JSON.stringify(t))),"clone"),lt=(0,o.K2)((t=>{o.Rm.info("Setting root doc",t),tt=t}),"setRootDoc"),ct=(0,o.K2)((()=>tt),"getRootDoc"),ht=(0,o.K2)(((t,e,s)=>{if(e.stmt===h)ht(t,e.state1,!0),ht(t,e.state2,!1);else if(e.stmt===c&&("[*]"===e.id?(e.id=s?t.id+"_start":t.id+"_end",e.start=s):e.id=e.id.trim()),e.doc){const t=[];let s,i=[];for(s=0;s0&&i.length>0){const s={stmt:c,id:(0,r.$C)(),type:"divider",doc:at(i)};t.push(at(s)),e.doc=t}e.doc.forEach((t=>ht(e,t,!0)))}}),"docTranslator"),dt=(0,o.K2)((()=>(ht({id:"root"},{id:"root",doc:tt},!0),{id:"root",doc:tt})),"getRootDocV2"),ut=(0,o.K2)((t=>{let e;e=t.doc?t.doc:t,o.Rm.info(e),yt(!0),o.Rm.info("Extract initial document:",e),e.forEach((t=>{switch(o.Rm.warn("Statement",t.stmt),t.stmt){case c:pt(t.id.trim(),t.type,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles);break;case h:xt(t.state1,t.state2,t.description);break;case"classDef":vt(t.id.trim(),t.classes);break;case"style":{const e=t.id.trim().split(","),s=t.styleClass.split(",");e.forEach((t=>{let e=gt(t);if(void 0===e){const s=t.trim();pt(s),e=gt(s)}e.styles=s.map((t=>t.replace(/;/g,"")?.trim()))}))}break;case"applyClass":It(t.id.trim(),t.styleClass)}}));const s=ft(),i=(0,o.D7)().look;U(),z(void 0,dt(),s,q,Z,!0,i,et),q.forEach((t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&t.description.length>0)throw new Error("Group nodes can only have label. Remove the additional description for node ["+t.id+"]");t.label=t.label[0]}}))}),"extract"),pt=(0,o.K2)((function(t,e=d,s=null,i=null,n=null,r=null,a=null,l=null){const c=t?.trim();if(nt.states.has(c)?(nt.states.get(c).doc||(nt.states.get(c).doc=s),nt.states.get(c).type||(nt.states.get(c).type=e)):(o.Rm.info("Adding state ",c,i),nt.states.set(c,{id:c,descriptions:[],type:e,doc:s,note:n,classes:[],styles:[],textStyles:[]})),i&&(o.Rm.info("Setting state description",c,i),"string"==typeof i&&Dt(c,i.trim()),"object"==typeof i&&i.forEach((t=>Dt(c,t.trim())))),n){const t=nt.states.get(c);t.note=n,t.note.text=o.Y2.sanitizeText(t.note.text,(0,o.D7)())}r&&(o.Rm.info("Setting state classes",c,r),("string"==typeof r?[r]:r).forEach((t=>It(c,t.trim())))),a&&(o.Rm.info("Setting state styles",c,a),("string"==typeof a?[a]:a).forEach((t=>At(c,t.trim())))),l&&(o.Rm.info("Setting state styles",c,a),("string"==typeof l?[l]:l).forEach((t=>Kt(c,t.trim()))))}),"addState"),yt=(0,o.K2)((function(t){q=[],Z=[],it={root:st()},nt=it.root,rt=0,et=J(),t||(0,o.IU)()}),"clear"),gt=(0,o.K2)((function(t){return nt.states.get(t)}),"getState"),ft=(0,o.K2)((function(){return nt.states}),"getStates"),mt=(0,o.K2)((function(){o.Rm.info("Documents = ",it)}),"logDocuments"),St=(0,o.K2)((function(){return nt.relations}),"getRelations");function _t(t=""){let e=t;return t===M&&(rt++,e=`${X}${rt}`),e}function bt(t="",e=d){return t===M?X:e}function Tt(t=""){let e=t;return t===V&&(e="end"+ ++rt),e}function kt(t="",e=d){return t===V?"end":e}function Et(t,e,s){let i=_t(t.id.trim()),n=bt(t.id.trim(),t.type),r=_t(e.id.trim()),a=bt(e.id.trim(),e.type);pt(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),pt(r,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),nt.relations.push({id1:i,id2:r,relationTitle:o.Y2.sanitizeText(s,(0,o.D7)())})}(0,o.K2)(_t,"startIdIfNeeded"),(0,o.K2)(bt,"startTypeIfNeeded"),(0,o.K2)(Tt,"endIdIfNeeded"),(0,o.K2)(kt,"endTypeIfNeeded"),(0,o.K2)(Et,"addRelationObjs");var xt=(0,o.K2)((function(t,e,s){if("object"==typeof t)Et(t,e,s);else{const i=_t(t.trim()),n=bt(t),r=Tt(e.trim()),a=kt(e);pt(i,n),pt(r,a),nt.relations.push({id1:i,id2:r,title:o.Y2.sanitizeText(s,(0,o.D7)())})}}),"addRelation"),Dt=(0,o.K2)((function(t,e){const s=nt.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s.descriptions.push(o.Y2.sanitizeText(i,(0,o.D7)()))}),"addDescription"),Ct=(0,o.K2)((function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()}),"cleanupLabel"),$t=(0,o.K2)((()=>"divider-id-"+ ++ot),"getDividerId"),vt=(0,o.K2)((function(t,e=""){et.has(t)||et.set(t,{id:t,styles:[],textStyles:[]});const s=et.get(t);null!=e&&e.split(",").forEach((t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(W).exec(t)){const t=e.replace(H,"bgFill").replace(W,H);s.textStyles.push(t)}s.styles.push(e)}))}),"addStyleClass"),Lt=(0,o.K2)((function(){return et}),"getClasses"),It=(0,o.K2)((function(t,e){t.split(",").forEach((function(t){let s=gt(t);if(void 0===s){const e=t.trim();pt(e),s=gt(e)}s.classes.push(e)}))}),"setCssClass"),At=(0,o.K2)((function(t,e){const s=gt(t);void 0!==s&&s.styles.push(e)}),"setStyle"),Kt=(0,o.K2)((function(t,e){const s=gt(t);void 0!==s&&s.textStyles.push(e)}),"setTextStyle"),Rt=(0,o.K2)((()=>Q),"getDirection"),wt=(0,o.K2)((t=>{Q=t}),"setDirection"),Ot=(0,o.K2)((t=>t&&":"===t[0]?t.substr(1).trim():t.trim()),"trimColon"),Nt=(0,o.K2)((()=>{const t=(0,o.D7)();return{nodes:q,edges:Z,other:{},config:t,direction:R(dt())}}),"getData"),Bt={getConfig:(0,o.K2)((()=>(0,o.D7)().state),"getConfig"),getData:Nt,addState:pt,clear:yt,getState:gt,getStates:ft,getRelations:St,getClasses:Lt,getDirection:Rt,addRelation:xt,getDividerId:$t,setDirection:wt,cleanupLabel:Ct,lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:mt,getRootDoc:ct,setRootDoc:lt,getRootDocV2:dt,extract:ut,trimColon:Ot,getAccTitle:o.iN,setAccTitle:o.SV,getAccDescription:o.m7,setAccDescription:o.EI,addStyleClass:vt,setCssClass:It,addDescription:Dt,setDiagramTitle:o.ke,getDiagramTitle:o.ab},Ft=(0,o.K2)((t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles")}}]); \ No newline at end of file diff --git a/js/300-19c1a4f9.chunk.min.js b/js/300-19c1a4f9.chunk.min.js deleted file mode 100644 index ad96598..0000000 --- a/js/300-19c1a4f9.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[300],{7375:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(r)}}}()},445:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,r={},a=function(t){return(t=+t)+(t>68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=r[t];return e&&(e.indexOf?e:e.s.concat(e.f))},d=function(t,e){var n,i=r.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[s,function(t){this.afternoon=d(t,!1)}],a:[s,function(t){this.afternoon=d(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[n,o("day")],Do:[s,function(t){var e=r.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,o("month")],MM:[n,o("month")],MMM:[s,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[s,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(t){this.year=a(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function h(n){var i,s;i=n,s=r&&r.formats;for(var a=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=a.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var i=h(e)(t),s=i.year,r=i.month,a=i.day,o=i.hours,c=i.minutes,l=i.seconds,d=i.milliseconds,u=i.zone,f=new Date,y=a||(s||r?1:f.getDate()),k=s||f.getFullYear(),m=0;s&&!r||(m=r>0?r-1:f.getMonth());var p=o||0,g=c||0,b=l||0,T=d||0;return u?new Date(Date.UTC(k,m,y,p,g,b,T+60*u.offset*1e3)):n?new Date(Date.UTC(k,m,y,p,g,b,T)):new Date(k,m,y,p,g,b,T)}catch(t){return new Date("")}}(e,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),r={}}else if(o instanceof Array)for(var f=o.length,y=1;y<=f;y+=1){a[1]=o[y-1];var k=n.apply(this,a);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}y===f&&(this.$d=new Date(""))}else s.call(this,t)}}}()},8313:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},9300:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>Yt});var i=n(7323),s=n(798),r=n(6750),a=n(4353),o=n(8313),c=n(445),l=n(7375),d=n(4852),u=function(){var t=(0,s.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],y=[1,11],k=[1,12],m=[1,13],p=[1,14],g=[1,15],b=[1,16],T=[1,19],v=[1,20],x=[1,21],w=[1,22],_=[1,23],D=[1,25],$=[1,35],C={trace:(0,s.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,s.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:k,26:m,27:p,28:g,29:b,30:T,31:v,33:x,35:w,36:_,37:24,38:D,40:$},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:k,26:m,27:p,28:g,29:b,30:T,31:v,33:x,35:w,36:_,37:24,38:D,40:$},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,d=0,u=0,h=a.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(y.yy[k]=this.yy[k]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var p=f.options&&f.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||f.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,s.K2)(g,"lex");for(var b,T,v,x,w,_,D,$,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==b&&(b=g()),x=o[v]&&o[v][b]),void 0===x||!x.length||!x[0]){var K;for(_ in C=[],o[v])this.terminals_[_]&&_>2&&C.push("'"+this.terminals_[_]+"'");K=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(K,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,T?(b=T,T=null):(d=f.yyleng,c=f.yytext,l=f.yylineno,m=f.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[x[1]][1],S.$=r[r.length-D],S._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},p&&(S._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[c,d,l,y.yy,x[1],r,a].concat(h))))return w;D&&(n=n.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),r.push(S.$),a.push(S._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},S=function(){return{EOF:1,parseError:(0,s.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,s.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,s.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,s.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,s.K2)((function(){return this._more=!0,this}),"more"),reject:(0,s.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,s.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,s.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,s.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,s.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,s.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,s.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,s.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,s.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,s.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,s.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,s.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)((function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}}),"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function K(){this.yy={}}return C.lexer=S,(0,s.K2)(K,"Parser"),K.prototype=C,C.Parser=K,new K}();u.parser=u;var h=u;a.extend(o),a.extend(c),a.extend(l);var f,y,k={friday:5,saturday:6},m="",p="",g=void 0,b="",T=[],v=[],x=new Map,w=[],_=[],D="",$="",C=["active","done","crit","milestone"],S=[],K=!1,E=!1,M="sunday",A="saturday",L=0,Y=(0,s.K2)((function(){w=[],_=[],D="",S=[],ht=0,f=void 0,y=void 0,mt=[],m="",p="",$="",g=void 0,b="",T=[],v=[],K=!1,E=!1,L=0,x=new Map,(0,s.IU)(),M="sunday",A="saturday"}),"clear"),I=(0,s.K2)((function(t){p=t}),"setAxisFormat"),W=(0,s.K2)((function(){return p}),"getAxisFormat"),F=(0,s.K2)((function(t){g=t}),"setTickInterval"),O=(0,s.K2)((function(){return g}),"getTickInterval"),P=(0,s.K2)((function(t){b=t}),"setTodayMarker"),B=(0,s.K2)((function(){return b}),"getTodayMarker"),z=(0,s.K2)((function(t){m=t}),"setDateFormat"),N=(0,s.K2)((function(){K=!0}),"enableInclusiveEndDates"),G=(0,s.K2)((function(){return K}),"endDatesAreInclusive"),H=(0,s.K2)((function(){E=!0}),"enableTopAxis"),R=(0,s.K2)((function(){return E}),"topAxisEnabled"),j=(0,s.K2)((function(t){$=t}),"setDisplayMode"),U=(0,s.K2)((function(){return $}),"getDisplayMode"),V=(0,s.K2)((function(){return m}),"getDateFormat"),Z=(0,s.K2)((function(t){T=t.toLowerCase().split(/[\s,]+/)}),"setIncludes"),X=(0,s.K2)((function(){return T}),"getIncludes"),q=(0,s.K2)((function(t){v=t.toLowerCase().split(/[\s,]+/)}),"setExcludes"),Q=(0,s.K2)((function(){return v}),"getExcludes"),J=(0,s.K2)((function(){return x}),"getLinks"),tt=(0,s.K2)((function(t){D=t,w.push(t)}),"addSection"),et=(0,s.K2)((function(){return w}),"getSections"),nt=(0,s.K2)((function(){let t=vt(),e=0;for(;!t&&e<10;)t=vt(),e++;return _=mt}),"getTasks"),it=(0,s.K2)((function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!(!n.includes("weekends")||t.isoWeekday()!==k[A]&&t.isoWeekday()!==k[A]+1)||!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim())))}),"isInvalidDate"),st=(0,s.K2)((function(t){M=t}),"setWeekday"),rt=(0,s.K2)((function(){return M}),"getWeekday"),at=(0,s.K2)((function(t){A=t}),"setWeekend"),ot=(0,s.K2)((function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?a(t.startTime):a(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?a(t.endTime):a(t.endTime,e,!0);const[o,c]=ct(s,r,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c}),"checkTaskDates"),ct=(0,s.K2)((function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=it(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]}),"fixTaskDates"),lt=(0,s.K2)((function(t,e,n){n=n.trim();const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const e of i.groups.ids.split(" ")){let n=bt(e);void 0!==n&&(!t||n.endTime>t.endTime)&&(t=n)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let r=a(n,e.trim(),!0);if(r.isValid())return r.toDate();{s.Rm.debug("Invalid date:"+n),s.Rm.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}}),"getStartDate"),dt=(0,s.K2)((function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]}),"parseDuration"),ut=(0,s.K2)((function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const e of s.groups.ids.split(" ")){let n=bt(e);void 0!==n&&(!t||n.startTime{window.open(n,"_self")})),x.set(t,n))})),wt(t,"clickable")}),"setLink"),wt=(0,s.K2)((function(t,e){t.split(",").forEach((function(t){let n=bt(t);void 0!==n&&n.classes.push(e)}))}),"setClass"),_t=(0,s.K2)((function(t,e,n){if("loose"!==(0,s.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{i._K.runFunc(e,...r)}))}),"setClickFun"),Dt=(0,s.K2)((function(t,e){S.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))}),"pushFun"),$t=(0,s.K2)((function(t,e,n){t.split(",").forEach((function(t){_t(t,e,n)})),wt(t,"clickable")}),"setClickEvent"),Ct=(0,s.K2)((function(t){S.forEach((function(e){e(t)}))}),"bindFunctions"),St={getConfig:(0,s.K2)((()=>(0,s.D7)().gantt),"getConfig"),clear:Y,setDateFormat:z,getDateFormat:V,enableInclusiveEndDates:N,endDatesAreInclusive:G,enableTopAxis:H,topAxisEnabled:R,setAxisFormat:I,getAxisFormat:W,setTickInterval:F,getTickInterval:O,setTodayMarker:P,getTodayMarker:B,setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setDisplayMode:j,getDisplayMode:U,setAccDescription:s.EI,getAccDescription:s.m7,addSection:tt,getSections:et,getTasks:nt,addTask:gt,findTaskById:bt,addTaskOrg:Tt,setIncludes:Z,getIncludes:X,setExcludes:q,getExcludes:Q,setClickEvent:$t,setLink:xt,getLinks:J,bindFunctions:Ct,parseDuration:dt,isInvalidDate:it,setWeekday:st,getWeekday:rt,setWeekend:at};function Kt(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)}))}(0,s.K2)(Kt,"getTaskTags");var Et,Mt=(0,s.K2)((function(){s.Rm.debug("Something is calling, setConf, remove the call")}),"setConf"),At={monday:d.ABi,tuesday:d.PGu,wednesday:d.GuW,thursday:d.Mol,friday:d.TUC,saturday:d.rGn,sunday:d.YPH},Lt=(0,s.K2)(((t,e)=>{let n=[...t].map((()=>-1/0)),i=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),s=0;for(const t of i)for(let i=0;i=n[i]){n[i]=t.endTime,t.order=i+e,i>s&&(s=i);break}return s}),"getMaxIntersections"),Yt={parser:h,db:St,renderer:{setConf:Mt,draw:(0,s.K2)((function(t,e,n,i){const r=(0,s.D7)().gantt,o=(0,s.D7)().securityLevel;let c;"sandbox"===o&&(c=(0,d.Ltv)("#i"+e));const l="sandbox"===o?(0,d.Ltv)(c.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),u="sandbox"===o?c.nodes()[0].contentDocument:document,h=u.getElementById(e);void 0===(Et=h.parentElement.offsetWidth)&&(Et=1200),void 0!==r.useWidth&&(Et=r.useWidth);const f=i.db.getTasks();let y=[];for(const t of f)y.push(t.type);y=$(y);const k={};let m=2*r.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===r.displayMode){const t={};for(const e of f)void 0===t[e.section]?t[e.section]=[e]:t[e.section].push(e);let e=0;for(const n of Object.keys(t)){const i=Lt(t[n],e)+1;e+=i,m+=i*(r.barHeight+r.barGap),k[n]=i}}else{m+=f.length*(r.barHeight+r.barGap);for(const t of y)k[t]=f.filter((e=>e.type===t)).length}h.setAttribute("viewBox","0 0 "+Et+" "+m);const p=l.select(`[id="${e}"]`),g=(0,d.w7C)().domain([(0,d.jkA)(f,(function(t){return t.startTime})),(0,d.T9B)(f,(function(t){return t.endTime}))]).rangeRound([0,Et-r.leftPadding-r.rightPadding]);function b(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nt.order)))].map((e=>t.find((t=>t.order===e))));p.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+a-2})).attr("width",(function(){return u-r.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const f=p.append("g").selectAll("rect").data(t).enter(),k=i.db.getLinks();if(f.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+o+.5*(g(t.endTime)-g(t.startTime))-.5*c:g(t.startTime)+o})).attr("y",(function(t,e){return t.order*n+a})).attr("width",(function(t){return t.milestone?c:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",c).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+o+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+a+.5*c).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[e,i]of y.entries())t.type===i&&(n=e%r.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,i+=" "+e,"task"+i})),f.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*c),t.milestone&&(n=e+c);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>u?e+o-5:n+o+5:(n-e)/2+e+o})).attr("y",(function(t,e){return t.order*n+r.barHeight/2+(r.fontSize/2-2)+a})).attr("text-height",c).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[e,n]of y.entries())t.type===n&&(a=e%r.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+a:"activeText"+a),t.done?o=t.crit?o+" doneCritText"+a:o+" doneText"+a:t.crit&&(o=o+" critText"+a),t.milestone&&(o+=" milestoneText"),i>n-e?n+i+1.5*r.leftPadding>u?s+" taskTextOutsideLeft taskTextOutside"+a+" "+o:s+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:s+" taskText taskText"+a+" "+o+" width-"+i})),"sandbox"===(0,s.D7)().securityLevel){let t;t=(0,d.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;f.filter((function(t){return k.has(t.id)})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",k.get(t.id)),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)}))}}function x(t,e,n,o,c,l,d,u){if(0===d.length&&0===u.length)return;let h,f;for(const{startTime:t,endTime:e}of l)(void 0===h||tf)&&(f=e);if(!h||!f)return;if(a(f).diff(a(h),"year")>5)return void s.Rm.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),k=[];let m=null,b=a(h);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,y,d,u)?m?m.end=b:m={start:b,end:b}:m&&(k.push(m),m=null),b=b.add(1,"d");p.append("g").selectAll("rect").data(k).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",c-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*c).toString()+"px"})).attr("class","exclude-range")}function w(t,e,n,s){let a=(0,d.l78)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,d.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||r.tickInterval);if(null!==o){const t=o[1],e=o[2],n=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":a.ticks(d.t6C.every(t));break;case"second":a.ticks(d.ucG.every(t));break;case"minute":a.ticks(d.wXd.every(t));break;case"hour":a.ticks(d.Agd.every(t));break;case"day":a.ticks(d.UAC.every(t));break;case"week":a.ticks(At[n].every(t));break;case"month":a.ticks(d.Ui6.every(t))}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||r.topAxis){let n=(0,d.tlR)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,d.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],s=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":n.ticks(d.t6C.every(t));break;case"second":n.ticks(d.ucG.every(t));break;case"minute":n.ticks(d.wXd.every(t));break;case"hour":n.ticks(d.Agd.every(t));break;case"day":n.ticks(d.UAC.every(t));break;case"week":n.ticks(At[s].every(t));break;case"month":n.ticks(d.Ui6.every(t))}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(t,e){let n=0;const i=Object.keys(k).map((t=>[t,k[t]]));p.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(s.Y2.lineBreakRegex),n=-(e.length-1)/2,i=u.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[t,n]of e.entries()){const e=u.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),t>0&&e.setAttribute("dy","1em"),e.textContent=n,i.appendChild(e)}return i})).attr("x",10).attr("y",(function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/317-0413318d.chunk.min.js b/js/317-0413318d.chunk.min.js new file mode 100644 index 0000000..f30c4d9 --- /dev/null +++ b/js/317-0413318d.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[317],{8317:(t,n,e)=>{e.d(n,{diagram:()=>it});var i=e(32),s=e(4852);function r(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function o(t){return t.target.depth}function c(t,n){return t.sourceLinks.length?t.depth:n-1}function a(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function l(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e=n)&&(e=n);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e=s)&&(e=s)}return e}function h(t){return function(){return t}}function u(t,n){return y(t.source,n.source)||t.index-n.index}function f(t,n){return y(t.target,n.target)||t.index-n.index}function y(t,n){return t.y0-n.y0}function d(t){return t.value}function p(t){return t.index}function g(t){return t.nodes}function _(t){return t.links}function k(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function x({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const e of n.sourceLinks)e.y0=t+e.width/2,t+=e.width;for(const t of n.targetLinks)t.y1=e+t.width/2,e+=t.width}}var m=Math.PI,v=2*m,b=1e-6,w=v-b;function L(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function S(){return new L}L.prototype=S.prototype={constructor:L,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,c=e-t,a=i-n,l=r-t,h=o-n,u=l*l+h*h;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>b)if(Math.abs(h*c-a*l)>b&&s){var f=e-r,y=i-o,d=c*c+a*a,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),k=s*Math.tan((m-Math.acos((d+u-p)/(2*g*_)))/2),x=k/_,v=k/g;Math.abs(x-1)>b&&(this._+="L"+(t+x*l)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>l*y)+","+(this._x1=t+v*c)+","+(this._y1=n+v*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),c=e*Math.sin(i),a=t+o,l=n+c,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+l:(Math.abs(this._x1-a)>b||Math.abs(this._y1-l)>b)&&(this._+="L"+a+","+l),e&&(u<0&&(u=u%v+v),u>w?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-c)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=l):u>b&&(this._+="A"+e+","+e+",0,"+ +(u>=m)+","+h+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const E=S;var A=Array.prototype.slice;function K(t){return function(){return t}}function M(t){return t[0]}function I(t){return t[1]}function T(t){return t.source}function D(t){return t.target}function N(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function P(t){return[t.source.x1,t.y0]}function C(t){return[t.target.x0,t.y1]}function O(){return function(t){var n=T,e=D,i=M,s=I,r=null;function o(){var o,c=A.call(arguments),a=n.apply(this,c),l=e.apply(this,c);if(r||(r=o=E()),t(r,+i.apply(this,(c[0]=a,c)),+s.apply(this,c),+i.apply(this,(c[0]=l,c)),+s.apply(this,c)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:K(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:K(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}(N).source(P).target(C)}var $=function(){var t=(0,i.K2)((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],s=[1,5,10,12],r={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,i.K2)((function(t,n,e,i,s,r,o){var c=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[c-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[c-2].trim().replaceAll('""','"')),e=parseFloat(r[c].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[c];break;case 10:this.$=r[c-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(s,[2,8]),t(s,[2,9]),{19:[1,16]},t(s,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(s,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.K2)((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var n=this,e=[0],s=[],r=[null],o=[],c=this.table,a="",l=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;o.push(g);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||y.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){e.length=e.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),(0,i.K2)(k,"lex");for(var x,m,v,b,w,L,S,E,A,K={};;){if(v=e[e.length-1],this.defaultActions[v]?b=this.defaultActions[v]:(null==x&&(x=k()),b=c[v]&&c[v][x]),void 0===b||!b.length||!b[0]){var M;for(L in A=[],c[v])this.terminals_[L]&&L>2&&A.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:g,expected:A})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+x);switch(b[0]){case 1:e.push(x),r.push(y.yytext),o.push(y.yylloc),e.push(b[1]),x=null,m?(x=m,m=null):(h=y.yyleng,a=y.yytext,l=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[b[1]][1],K.$=r[r.length-S],K._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(K._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(K,[a,h,l,d.yy,b[1],r,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[b[1]][0]),r.push(K.$),o.push(K._$),E=c[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:(0,i.K2)((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:(0,i.K2)((function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;rn[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function c(){this.yy={}}return r.lexer=o,(0,i.K2)(c,"Parser"),c.prototype=r,r.Parser=c,new c}();$.parser=$;var j=$,z=[],U=[],F=new Map,W=(0,i.K2)((()=>{z=[],U=[],F=new Map,(0,i.IU)()}),"clear"),G=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,i.K2)(this,"SankeyLink")}},V=(0,i.K2)(((t,n,e)=>{z.push(new G(t,n,e))}),"addLink"),X=class{constructor(t){this.ID=t}static{(0,i.K2)(this,"SankeyNode")}},Y=(0,i.K2)((t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=F.get(t);return void 0===n&&(n=new X(t),F.set(t,n),U.push(n)),n}),"findOrCreateNode"),q=(0,i.K2)((()=>U),"getNodes"),Q=(0,i.K2)((()=>z),"getLinks"),R=(0,i.K2)((()=>({nodes:U.map((t=>({id:t.ID}))),links:z.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),B={nodesMap:F,getConfig:(0,i.K2)((()=>(0,i.D7)().sankey),"getConfig"),getNodes:q,getLinks:Q,getGraph:R,addLink:V,findOrCreateNode:Y,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:W},Z=class t{static{(0,i.K2)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},H={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?r(t.sourceLinks,o)-1:0},justify:c},J=(0,i.K2)((function(t,n,e,o){const{securityLevel:m,sankey:v}=(0,i.D7)(),b=i.ME.sankey;let w;"sandbox"===m&&(w=(0,s.Ltv)("#i"+n));const L="sandbox"===m?(0,s.Ltv)(w.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),S="sandbox"===m?L.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),E=v?.width??b.width,A=v?.height??b.width,K=v?.useMaxWidth??b.useMaxWidth,M=v?.nodeAlignment??b.nodeAlignment,I=v?.prefix??b.prefix,T=v?.suffix??b.suffix,D=v?.showValues??b.showValues,N=o.db.getGraph(),P=H[M];(function(){let t,n,e,i=0,s=0,o=1,m=1,v=24,b=8,w=p,L=c,S=g,E=_,A=6;function K(){const c={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,e]of t.entries())e.index=n,e.sourceLinks=[],e.targetLinks=[];const i=new Map(t.map(((n,e)=>[w(n,e,t),n])));for(const[t,e]of n.entries()){e.index=t;let{source:n,target:s}=e;"object"!=typeof n&&(n=e.source=k(i,n)),"object"!=typeof s&&(s=e.target=k(i,s)),n.sourceLinks.push(e),s.targetLinks.push(e)}if(null!=e)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(e),i.sort(e)}(c),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(a(n.sourceLinks,d),a(n.targetLinks,d)):n.fixedValue}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function(e){const c=function({nodes:t}){const e=l(t,(t=>t.depth))+1,s=(o-i-v)/(e-1),r=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+v,r[t]?r[t].push(n):r[t]=[n]}if(n)for(const t of r)t.sort(n);return r}(e);t=Math.min(b,(m-s)/(l(c,(t=>t.length))-1)),function(n){const e=r(n,(n=>(m-s-(n.length-1)*t)/a(n,d)));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(m-n+t)/(i.length+1);for(let t=0;t0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),T(r,i)}}function I(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=$(t,e)*r,i+=r}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),T(r,i)}}function T(n,e){const i=n.length>>1,r=n[i];N(n,r.y0-t,i-1,e),D(n,r.y1+t,i+1,e),N(n,m,n.length-1,e),D(n,s,0,e)}function D(n,e,i,s){for(;i1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function N(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(f);for(const{target:{targetLinks:n}}of t)n.sort(u)}}function C(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(f),e.sort(u)}function O(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return K.update=function(t){return x(t),t},K.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:h(t),K):w},K.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:h(t),K):L},K.nodeSort=function(t){return arguments.length?(n=t,K):n},K.nodeWidth=function(t){return arguments.length?(v=+t,K):v},K.nodePadding=function(n){return arguments.length?(b=t=+n,K):b},K.nodes=function(t){return arguments.length?(S="function"==typeof t?t:h(t),K):S},K.links=function(t){return arguments.length?(E="function"==typeof t?t:h(t),K):E},K.linkSort=function(t){return arguments.length?(e=t,K):e},K.size=function(t){return arguments.length?(i=s=0,o=+t[0],m=+t[1],K):[o-i,m-s]},K.extent=function(t){return arguments.length?(i=+t[0][0],o=+t[1][0],s=+t[0][1],m=+t[1][1],K):[[i,s],[o,m]]},K.iterations=function(t){return arguments.length?(A=+t,K):A},K})().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(D?15:0)).nodeAlign(P).extent([[0,0],[E,A]])(N);const C=(0,s.UMr)(s.zt);S.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=Z.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>C(t.id)));const $=(0,i.K2)((({id:t,value:n})=>D?`${t}\n${I}${Math.round(100*n)/100}${T}`:t),"getText");S.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",(t=>t.x0(t.y1+t.y0)/2)).attr("dy",(D?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0(t.uid=Z.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>C(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>C(t.target.id)))}let U;switch(z){case"gradient":U=(0,i.K2)((t=>t.uid),"coloring");break;case"source":U=(0,i.K2)((t=>C(t.source.id)),"coloring");break;case"target":U=(0,i.K2)((t=>C(t.target.id)),"coloring");break;default:U=z}j.append("path").attr("d",O()).attr("stroke",U).attr("stroke-width",(t=>Math.max(1,t.width))),(0,i.ot)(void 0,S,0,K)}),"draw"),tt={draw:J},nt=(0,i.K2)((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),et=j.parse.bind(j);j.parse=t=>et(nt(t));var it={parser:j,db:B,renderer:tt}}}]); \ No newline at end of file diff --git a/js/331-bd053b7e.chunk.min.js b/js/331-bd053b7e.chunk.min.js deleted file mode 100644 index 3dbcff2..0000000 --- a/js/331-bd053b7e.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[331],{7331:(e,r,a)=>{a.d(r,{diagram:()=>g});var t=a(261),n=a(8852),s=a(798),d=a(8731),i={parse:(0,s.K2)((async e=>{const r=await(0,d.qg)("info",e);s.Rm.debug(r)}),"parse")},o={version:t.r},g={parser:i,db:{getVersion:(0,s.K2)((()=>o.version),"getVersion")},renderer:{draw:(0,s.K2)(((e,r,a)=>{s.Rm.debug("rendering info diagram\n"+e);const t=(0,n.D)(r);(0,s.a$)(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${a}`)}),"draw")}}}}]); \ No newline at end of file diff --git a/js/334-f60074e8.chunk.min.js b/js/334-f60074e8.chunk.min.js new file mode 100644 index 0000000..53c29b1 --- /dev/null +++ b/js/334-f60074e8.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[334],{5937:(t,e,s)=>{s.d(e,{A:()=>i});var n=s(6309),r=s(1931);const i=(t,e)=>n.A.lang.round(r.A.parse(t)[e])},4868:(t,e,s)=>{s.d(e,{A:()=>i,P:()=>u});var n=s(32),r=s(4852),i=(0,n.K2)(((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),u=(0,n.K2)(((t,e,s,r)=>{t.attr("class",s);const{width:i,height:u,x:c,y:l}=a(t,e);(0,n.a$)(t,u,i,r);const h=o(c,l,i,u,e);t.attr("viewBox",h),n.Rm.debug(`viewBox configured: ${h} with padding: ${e}`)}),"setupViewPortForSVG"),a=(0,n.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),o=(0,n.K2)(((t,e,s,n,r)=>`${t-r} ${e-r} ${s} ${n}`),"createViewBox")},9334:(t,e,s)=>{s.d(e,{diagram:()=>mt});var n,r,i=s(4868),u=s(1417),a=s(5388),o=(s(3256),s(8568),s(7750),s(2382),s(5522)),c=s(32),l=s(4852),h=s(5937),d=s(5582),p=0,A=(0,c.D7)(),g=new Map,f=[],y=new Map,k=[],b=new Map,E=new Map,m=0,D=!0,x=[],C=(0,c.K2)((t=>c.Y2.sanitizeText(t,A)),"sanitizeText"),T=(0,c.K2)((function(t){for(const e of g.values())if(e.id===t)return e.domId;return t}),"lookUpDomId"),S=(0,c.K2)((function(t,e,s,n,r,i,a={},o){if(!t||0===t.trim().length)return;let l,h=g.get(t);if(void 0===h&&(h={id:t,labelType:"text",domId:"flowchart-"+t+"-"+p,styles:[],classes:[]},g.set(t,h)),p++,void 0!==e?(A=(0,c.D7)(),l=C(e.text.trim()),h.labelType=e.type,l.startsWith('"')&&l.endsWith('"')&&(l=l.substring(1,l.length-1)),h.text=l):void 0===h.text&&(h.text=t),void 0!==s&&(h.type=s),null!=n&&n.forEach((function(t){h.styles.push(t)})),null!=r&&r.forEach((function(t){h.classes.push(t)})),void 0!==i&&(h.dir=i),void 0===h.props?h.props=a:void 0!==a&&Object.assign(h.props,a),void 0!==o){let e;e=o.includes("\n")?o+"\n":"{\n"+o+"\n}";const s=(0,u.H)(e,{schema:u.r});if(s.shape&&(s.shape!==s.shape.toLowerCase()||s.shape.includes("_")))throw new Error(`No such shape: ${s.shape}. Shape names should be lowercase.`);s?.shape&&(h.type=s?.shape),s?.label&&(h.text=s?.label),s?.icon&&(h.icon=s?.icon,s.label?.trim()||h.text!==t||(h.text="")),s?.form&&(h.form=s?.form),s?.pos&&(h.pos=s?.pos),s?.img&&(h.img=s?.img,s.label?.trim()||h.text!==t||(h.text="")),s?.constraint&&(h.constraint=s.constraint),s.w&&(h.assetWidth=Number(s.w)),s.h&&(h.assetHeight=Number(s.h))}}),"addVertex"),F=(0,c.K2)((function(t,e,s){const n={start:t,end:e,type:void 0,text:"",labelType:"text"};c.Rm.info("abc78 Got edge...",n);const r=s.text;if(void 0!==r&&(n.text=C(r.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=r.type),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),!(f.length<(A.maxEdges??500)))throw new Error(`Edge limit exceeded. ${f.length} edges found, but the limit is ${A.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);c.Rm.info("Pushing edge..."),f.push(n)}),"addSingleLink"),_=(0,c.K2)((function(t,e,s){c.Rm.info("addLink",t,e,s);for(const n of t)for(const t of e)F(n,t,s)}),"addLink"),B=(0,c.K2)((function(t,e){t.forEach((function(t){"default"===t?f.defaultInterpolate=e:f[t].interpolate=e}))}),"updateLinkInterpolate"),v=(0,c.K2)((function(t,e){t.forEach((function(t){if("number"==typeof t&&t>=f.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${f.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?f.defaultStyle=e:(f[t].style=e,(f[t]?.style?.length??0)>0&&!f[t]?.style?.some((t=>t?.startsWith("fill")))&&f[t]?.style?.push("fill:none"))}))}),"updateLink"),w=(0,c.K2)((function(t,e){t.split(",").forEach((function(t){let s=y.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},y.set(t,s)),null!=e&&e.forEach((function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)}))}))}),"addClass"),$=(0,c.K2)((function(t){/.*/.exec(n)&&(n="LR"),/.*v/.exec(n)&&(n="TB"),"TD"===n&&(n="TB")}),"setDirection"),L=(0,c.K2)((function(t,e){for(const s of t.split(",")){const t=g.get(s);t&&t.classes.push(e);const n=b.get(s);n&&n.classes.push(e)}}),"setClass"),R=(0,c.K2)((function(t,e){if(void 0!==e){e=C(e);for(const s of t.split(","))E.set("gen-1"===r?T(s):s,e)}}),"setTooltip"),I=(0,c.K2)((function(t,e,s){const n=T(t);if("loose"!==(0,c.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof s){r=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),(0,l.Ltv)(this).classed("hover",!1)}))}),"setupToolTips");x.push(W);var Y=(0,c.K2)((function(t="gen-1"){g=new Map,y=new Map,f=[],x=[W],k=[],b=new Map,m=0,E=new Map,D=!0,r=t,A=(0,c.D7)(),(0,c.IU)()}),"clear"),j=(0,c.K2)((t=>{r=t||"gen-2"}),"setGen"),X=(0,c.K2)((function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}),"defaultStyle"),z=(0,c.K2)((function(t,e,s){let n=t.text.trim(),i=s.text;function u(t){const e={boolean:{},number:{},string:{}},s=[];let n;return{nodeList:t.filter((function(t){const r=typeof t;return t.stmt&&"dir"===t.stmt?(n=t.value,!1):""!==t.trim()&&(r in e?!e[r].hasOwnProperty(t)&&(e[r][t]=!0):!s.includes(t)&&s.push(t))})),dir:n}}t===s&&/\s/.exec(s.text)&&(n=void 0),(0,c.K2)(u,"uniq");const{nodeList:a,dir:o}=u(e.flat());if("gen-1"===r)for(let t=0;t2e3)return{result:!1,count:0};if(Q[q]=e,k[e].id===t)return{result:!0,count:0};let n=0,r=1;for(;n=0){const s=Z(t,e);if(s.result)return{result:!0,count:r+s.count};r+=s.count}n+=1}return{result:!1,count:r}}),"indexNodes2"),J=(0,c.K2)((function(t){return Q[t]}),"getDepthFirstPos"),tt=(0,c.K2)((function(){q=-1,k.length>0&&Z("none",k.length-1)}),"indexNodes"),et=(0,c.K2)((function(){return k}),"getSubGraphs"),st=(0,c.K2)((()=>!!D&&(D=!1,!0)),"firstGraph"),nt=(0,c.K2)((t=>{let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:s,stroke:n}}),"destructStartLink"),rt=(0,c.K2)(((t,e)=>{const s=e.length;let n=0;for(let r=0;r{const e=t.trim();let s=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,s=s.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,s=s.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,s=s.slice(1))}let r="normal",i=s.length-1;s.startsWith("=")&&(r="thick"),s.startsWith("~")&&(r="invisible");const u=rt(".",s);return u&&(r="dotted",i=u),{type:n,stroke:r,length:i}}),"destructEndLink"),ut=(0,c.K2)(((t,e)=>{const s=it(t);let n;if(e){if(n=nt(e),n.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=s.type;else{if(n.type!==s.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=s.length,n}return s}),"destructLink"),at=(0,c.K2)(((t,e)=>{for(const s of t)if(s.nodes.includes(e))return!0;return!1}),"exists"),ot=(0,c.K2)(((t,e)=>{const s=[];return t.nodes.forEach(((n,r)=>{at(e,n)||s.push(t.nodes[r])})),{nodes:s}}),"makeUniq"),ct={firstGraph:st},lt=(0,c.K2)((t=>t.img?"imageSquare":t.icon?"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon":"square"===t.type?"squareRect":"round"===t.type?"roundedRect":t.type??"squareRect"),"getTypeFromVertex"),ht=(0,c.K2)(((t,e)=>t.find((t=>t.id===e))),"findNode"),dt=(0,c.K2)((t=>{let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}),"destructEdgeType"),pt=(0,c.K2)(((t,e,s,n,r,i)=>{const u=s.get(t.id),a=n.get(t.id)??!1,o=ht(e,t.id);o?(o.cssStyles=t.styles,o.cssCompiledStyles=At(t.classes),o.cssClasses=t.classes.join(" ")):e.push({id:t.id,label:t.text,labelStyle:"",parentId:u,padding:r.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:At(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),shape:lt(t),dir:t.dir,domId:t.domId,isGroup:a,look:i,link:t.link,linkTarget:t.linkTarget,tooltip:N(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint})}),"addNodeFromVertex");function At(t){let e=[];for(const s of t){const t=y.get(s);t?.styles&&(e=[...e,...t.styles??[]].map((t=>t.trim()))),t?.textStyles&&(e=[...e,...t.textStyles??[]].map((t=>t.trim())))}return e}(0,c.K2)(At,"getCompiledStyles");var gt=(0,c.K2)((()=>{const t=(0,c.D7)(),e=[],s=[],n=et(),r=new Map,i=new Map;for(let t=n.length-1;t>=0;t--){const e=n[t];e.nodes.length>0&&i.set(e.id,!0);for(const t of e.nodes)r.set(t,e.id)}for(let s=n.length-1;s>=0;s--){const i=n[s];e.push({id:i.id,label:i.title,labelStyle:"",parentId:r.get(i.id),padding:8,cssCompiledStyles:At(i.classes),cssClasses:i.classes.join(" "),shape:"rect",dir:i.dir,isGroup:!0,look:t.look})}V().forEach((s=>{pt(s,e,r,i,t,t.look||"classic")}));const u=U();return u.forEach(((e,n)=>{const{arrowTypeStart:r,arrowTypeEnd:i}=dt(e.type),a=[...u.defaultStyle??[]];e.style&&a.push(...e.style);const c={id:(0,o.rY)(e.start,e.end,{counter:n,prefix:"L"}),start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke?"none":r,arrowTypeEnd:"invisible"===e?.stroke?"none":i,arrowheadStyle:"fill: #333",labelStyle:a,style:a,pattern:e.stroke,look:t.look};s.push(c)})),{nodes:e,edges:s,other:{},config:t}}),"getData"),ft={defaultConfig:(0,c.K2)((()=>c.ME.flowchart),"defaultConfig"),setAccTitle:c.SV,getAccTitle:c.iN,getAccDescription:c.m7,getData:gt,setAccDescription:c.EI,addVertex:S,lookUpDomId:T,addLink:_,updateLinkInterpolate:B,updateLink:v,addClass:w,setDirection:$,setClass:L,setTooltip:R,getTooltip:N,setClickEvent:P,setLink:K,bindFunctions:O,getDirection:M,getVertices:V,getEdges:U,getClasses:G,clear:Y,setGen:j,defaultStyle:X,addSubGraph:z,getDepthFirstPos:J,indexNodes:tt,getSubGraphs:et,destructLink:ut,lex:ct,exists:at,makeUniq:ot,setDiagramTitle:c.ke,getDiagramTitle:c.ab},yt={getClasses:(0,c.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),draw:(0,c.K2)((async function(t,e,s,n){c.Rm.info("REF0:"),c.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:r,flowchart:u,layout:h}=(0,c.D7)();let d;"sandbox"===r&&(d=(0,l.Ltv)("#i"+e));const p="sandbox"===r?d.nodes()[0].contentDocument:document;c.Rm.debug("Before getData: ");const A=n.db.getData();c.Rm.debug("Data: ",A);const g=(0,i.A)(e,r),f=M();A.type=n.type,A.layoutAlgorithm=(0,a.q7)(h),"dagre"===A.layoutAlgorithm&&"elk"===h&&c.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),A.direction=f,A.nodeSpacing=u?.nodeSpacing||50,A.rankSpacing=u?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=e,c.Rm.debug("REF1:",A),await(0,a.XX)(A,g);const y=A.config.flowchart?.diagramPadding??8;o._K.insertTitle(g,"flowchartTitleText",u?.titleTopMargin||0,n.db.getDiagramTitle()),(0,i.P)(g,y,"flowchart",u?.useMaxWidth||!1);for(const t of A.nodes){const s=(0,l.Ltv)(`#${e} [id="${t.id}"]`);if(!s||!t.link)continue;const n=p.createElementNS("http://www.w3.org/2000/svg","a");n.setAttributeNS("http://www.w3.org/2000/svg","class",t.cssClasses),n.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===r?n.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):t.linkTarget&&n.setAttributeNS("http://www.w3.org/2000/svg","target",t.linkTarget);const i=s.insert((function(){return n}),":first-child"),u=s.select(".label-container");u&&i.append((function(){return u.node()}));const a=s.select(".label");a&&i.append((function(){return a.node()}))}}),"draw")},kt=function(){var t=(0,c.K2)((function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s}),"o"),e=[1,4],s=[1,3],n=[1,5],r=[1,8,9,10,11,27,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],i=[2,2],u=[1,13],a=[1,14],o=[1,15],l=[1,16],h=[1,23],d=[1,25],p=[1,26],A=[1,27],g=[1,49],f=[1,48],y=[1,29],k=[1,30],b=[1,31],E=[1,32],m=[1,33],D=[1,44],x=[1,46],C=[1,42],T=[1,47],S=[1,43],F=[1,50],_=[1,45],B=[1,51],v=[1,52],w=[1,34],$=[1,35],L=[1,36],R=[1,37],I=[1,57],K=[1,8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],N=[1,61],P=[1,60],O=[1,62],M=[8,9,11,75,77],V=[1,77],U=[1,90],G=[1,95],W=[1,94],Y=[1,91],j=[1,87],X=[1,93],z=[1,89],H=[1,96],q=[1,92],Q=[1,97],Z=[1,88],J=[8,9,10,11,40,75,77],tt=[8,9,10,11,40,46,75,77],et=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,88,101,104,105,108,110,113,114,115],st=[8,9,11,44,60,75,77,88,101,104,105,108,110,113,114,115],nt=[44,60,88,101,104,105,108,110,113,114,115],rt=[1,123],it=[1,122],ut=[1,130],at=[1,144],ot=[1,145],ct=[1,146],lt=[1,147],ht=[1,132],dt=[1,134],pt=[1,138],At=[1,139],gt=[1,140],ft=[1,141],yt=[1,142],kt=[1,143],bt=[1,148],Et=[1,149],mt=[1,128],Dt=[1,129],xt=[1,136],Ct=[1,131],Tt=[1,135],St=[1,133],Ft=[8,9,10,11,27,32,34,36,38,44,60,83,84,85,86,87,88,101,104,105,108,110,113,114,115,120,121,122,123],_t=[1,151],Bt=[1,153],vt=[8,9,11],wt=[8,9,10,11,14,44,60,88,104,105,108,110,113,114,115],$t=[1,173],Lt=[1,169],Rt=[1,170],It=[1,174],Kt=[1,171],Nt=[1,172],Pt=[77,115,118],Ot=[8,9,10,11,12,14,27,29,32,44,60,75,83,84,85,86,87,88,89,104,108,110,113,114,115],Mt=[10,105],Vt=[31,49,51,53,55,57,62,64,66,67,69,71,115,116,117],Ut=[1,242],Gt=[1,240],Wt=[1,244],Yt=[1,238],jt=[1,239],Xt=[1,241],zt=[1,243],Ht=[1,245],qt=[1,263],Qt=[8,9,11,105],Zt=[8,9,10,11,60,83,104,105,108,109,110,111],Jt={trace:(0,c.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,edgeTextToken:78,STR:79,MD_STR:80,textToken:81,keywords:82,STYLE:83,LINKSTYLE:84,CLASSDEF:85,CLASS:86,CLICK:87,DOWN:88,UP:89,textNoTagsToken:90,stylesOpt:91,"idString[vertex]":92,"idString[class]":93,CALLBACKNAME:94,CALLBACKARGS:95,HREF:96,LINK_TARGET:97,"STR[link]":98,"STR[tooltip]":99,alphaNum:100,DEFAULT:101,numList:102,INTERPOLATE:103,NUM:104,COMMA:105,style:106,styleComponent:107,NODE_STRING:108,UNIT:109,BRKT:110,PCT:111,idStringToken:112,MINUS:113,MULT:114,UNICODE_TEXT:115,TEXT:116,TAGSTART:117,EDGE_TEXT:118,alphaNumToken:119,direction_tb:120,direction_bt:121,direction_rl:122,direction_lr:123,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",79:"STR",80:"MD_STR",83:"STYLE",84:"LINKSTYLE",85:"CLASSDEF",86:"CLASS",87:"CLICK",88:"DOWN",89:"UP",92:"idString[vertex]",93:"idString[class]",94:"CALLBACKNAME",95:"CALLBACKARGS",96:"HREF",97:"LINK_TARGET",98:"STR[link]",99:"STR[tooltip]",101:"DEFAULT",103:"INTERPOLATE",104:"NUM",105:"COMMA",108:"NODE_STRING",109:"UNIT",110:"BRKT",111:"PCT",113:"MINUS",114:"MULT",115:"UNICODE_TEXT",116:"TEXT",117:"TAGSTART",118:"EDGE_TEXT",120:"direction_tb",121:"direction_bt",122:"direction_rl",123:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[76,1],[76,2],[76,1],[76,1],[72,1],[73,3],[30,1],[30,2],[30,1],[30,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[102,1],[102,3],[91,1],[91,3],[106,1],[106,2],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[81,1],[81,1],[81,1],[81,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[78,1],[78,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[119,1],[47,1],[47,2],[100,1],[100,2],[33,1],[33,1],[33,1],[33,1]],performAction:(0,c.K2)((function(t,e,s,n,r,i,u){var a=i.length-1;switch(r){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(i[a])||i[a].length>0)&&i[a-1].push(i[a]),this.$=i[a-1];break;case 4:case 181:case 44:case 54:case 76:case 179:this.$=i[a];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(i[a-1]),this.$=i[a-1];break;case 27:this.$=i[a-1].nodes;break;case 33:this.$=n.addSubGraph(i[a-6],i[a-1],i[a-4]);break;case 34:this.$=n.addSubGraph(i[a-3],i[a-1],i[a-3]);break;case 35:this.$=n.addSubGraph(void 0,i[a-1],void 0);break;case 37:this.$=i[a].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=i[a].trim(),n.setAccDescription(this.$);break;case 43:case 131:this.$=i[a-1]+i[a];break;case 45:n.addVertex(i[a-1][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a]),n.addLink(i[a-3].stmt,i[a-1],i[a-2]),this.$={stmt:i[a-1],nodes:i[a-1].concat(i[a-3].nodes)};break;case 46:n.addLink(i[a-2].stmt,i[a],i[a-1]),this.$={stmt:i[a],nodes:i[a].concat(i[a-2].nodes)};break;case 47:n.addLink(i[a-3].stmt,i[a-1],i[a-2]),this.$={stmt:i[a-1],nodes:i[a-1].concat(i[a-3].nodes)};break;case 48:this.$={stmt:i[a-1],nodes:i[a-1]};break;case 49:n.addVertex(i[a-1][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a]),this.$={stmt:i[a-1],nodes:i[a-1],shapeData:i[a]};break;case 50:this.$={stmt:i[a],nodes:i[a]};break;case 51:case 126:case 128:this.$=[i[a]];break;case 52:n.addVertex(i[a-5][0],void 0,void 0,void 0,void 0,void 0,void 0,i[a-4]),this.$=i[a-5].concat(i[a]);break;case 53:this.$=i[a-4].concat(i[a]);break;case 55:this.$=i[a-2],n.setClass(i[a-2],i[a]);break;case 56:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"square");break;case 57:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"doublecircle");break;case 58:this.$=i[a-5],n.addVertex(i[a-5],i[a-2],"circle");break;case 59:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"ellipse");break;case 60:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"stadium");break;case 61:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"subroutine");break;case 62:this.$=i[a-7],n.addVertex(i[a-7],i[a-1],"rect",void 0,void 0,void 0,Object.fromEntries([[i[a-5],i[a-3]]]));break;case 63:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"cylinder");break;case 64:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"round");break;case 65:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"diamond");break;case 66:this.$=i[a-5],n.addVertex(i[a-5],i[a-2],"hexagon");break;case 67:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"odd");break;case 68:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"trapezoid");break;case 69:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"inv_trapezoid");break;case 70:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"lean_right");break;case 71:this.$=i[a-3],n.addVertex(i[a-3],i[a-1],"lean_left");break;case 72:this.$=i[a],n.addVertex(i[a]);break;case 73:i[a-1].text=i[a],this.$=i[a-1];break;case 74:case 75:i[a-2].text=i[a-1],this.$=i[a-2];break;case 77:var o=n.destructLink(i[a],i[a-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:i[a-1]};break;case 78:case 84:case 99:case 101:this.$={text:i[a],type:"text"};break;case 79:case 85:case 100:this.$={text:i[a-1].text+""+i[a],type:i[a-1].type};break;case 80:case 86:this.$={text:i[a],type:"string"};break;case 81:case 87:case 102:this.$={text:i[a],type:"markdown"};break;case 82:o=n.destructLink(i[a]),this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 83:this.$=i[a-1];break;case 103:this.$=i[a-4],n.addClass(i[a-2],i[a]);break;case 104:this.$=i[a-4],n.setClass(i[a-2],i[a]);break;case 105:case 113:this.$=i[a-1],n.setClickEvent(i[a-1],i[a]);break;case 106:case 114:this.$=i[a-3],n.setClickEvent(i[a-3],i[a-2]),n.setTooltip(i[a-3],i[a]);break;case 107:this.$=i[a-2],n.setClickEvent(i[a-2],i[a-1],i[a]);break;case 108:this.$=i[a-4],n.setClickEvent(i[a-4],i[a-3],i[a-2]),n.setTooltip(i[a-4],i[a]);break;case 109:this.$=i[a-2],n.setLink(i[a-2],i[a]);break;case 110:this.$=i[a-4],n.setLink(i[a-4],i[a-2]),n.setTooltip(i[a-4],i[a]);break;case 111:this.$=i[a-4],n.setLink(i[a-4],i[a-2],i[a]);break;case 112:this.$=i[a-6],n.setLink(i[a-6],i[a-4],i[a]),n.setTooltip(i[a-6],i[a-2]);break;case 115:this.$=i[a-1],n.setLink(i[a-1],i[a]);break;case 116:this.$=i[a-3],n.setLink(i[a-3],i[a-2]),n.setTooltip(i[a-3],i[a]);break;case 117:this.$=i[a-3],n.setLink(i[a-3],i[a-2],i[a]);break;case 118:this.$=i[a-5],n.setLink(i[a-5],i[a-4],i[a]),n.setTooltip(i[a-5],i[a-2]);break;case 119:this.$=i[a-4],n.addVertex(i[a-2],void 0,void 0,i[a]);break;case 120:this.$=i[a-4],n.updateLink([i[a-2]],i[a]);break;case 121:this.$=i[a-4],n.updateLink(i[a-2],i[a]);break;case 122:this.$=i[a-8],n.updateLinkInterpolate([i[a-6]],i[a-2]),n.updateLink([i[a-6]],i[a]);break;case 123:this.$=i[a-8],n.updateLinkInterpolate(i[a-6],i[a-2]),n.updateLink(i[a-6],i[a]);break;case 124:this.$=i[a-6],n.updateLinkInterpolate([i[a-4]],i[a]);break;case 125:this.$=i[a-6],n.updateLinkInterpolate(i[a-4],i[a]);break;case 127:case 129:i[a-2].push(i[a]),this.$=i[a-2];break;case 180:case 182:this.$=i[a-1]+""+i[a];break;case 183:this.$={stmt:"dir",value:"TB"};break;case 184:this.$={stmt:"dir",value:"BT"};break;case 185:this.$={stmt:"dir",value:"RL"};break;case 186:this.$={stmt:"dir",value:"LR"}}}),"anonymous"),table:[{3:1,4:2,9:e,10:s,12:n},{1:[3]},t(r,i,{5:6}),{4:7,9:e,10:s,12:n},{4:8,9:e,10:s,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:u,9:a,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),{8:[1,54],9:[1,55],10:I,15:53,18:56},t(K,[2,3]),t(K,[2,4]),t(K,[2,5]),t(K,[2,6]),t(K,[2,7]),t(K,[2,8]),{8:N,9:P,11:O,21:58,41:59,72:63,75:[1,64],77:[1,65]},{8:N,9:P,11:O,21:66},{8:N,9:P,11:O,21:67},{8:N,9:P,11:O,21:68},{8:N,9:P,11:O,21:69},{8:N,9:P,11:O,21:70},{8:N,9:P,10:[1,71],11:O,21:72},t(K,[2,36]),{35:[1,73]},{37:[1,74]},t(K,[2,39]),t(M,[2,50],{18:75,39:76,10:I,40:V}),{10:[1,78]},{10:[1,79]},{10:[1,80]},{10:[1,81]},{14:U,44:G,60:W,79:[1,85],88:Y,94:[1,82],96:[1,83],100:84,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},t(K,[2,183]),t(K,[2,184]),t(K,[2,185]),t(K,[2,186]),t(J,[2,51]),t(J,[2,54],{46:[1,98]}),t(tt,[2,72],{112:111,29:[1,99],44:g,48:[1,100],50:[1,101],52:[1,102],54:[1,103],56:[1,104],58:[1,105],60:f,63:[1,106],65:[1,107],67:[1,108],68:[1,109],70:[1,110],88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),t(et,[2,179]),t(et,[2,140]),t(et,[2,141]),t(et,[2,142]),t(et,[2,143]),t(et,[2,144]),t(et,[2,145]),t(et,[2,146]),t(et,[2,147]),t(et,[2,148]),t(et,[2,149]),t(et,[2,150]),t(r,[2,12]),t(r,[2,18]),t(r,[2,19]),{9:[1,112]},t(st,[2,26],{18:113,10:I}),t(K,[2,27]),{42:114,43:38,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(K,[2,40]),t(K,[2,41]),t(K,[2,42]),t(nt,[2,76],{73:115,62:[1,117],74:[1,116]}),{76:118,78:119,79:[1,120],80:[1,121],115:rt,118:it},t([44,60,62,74,88,101,104,105,108,110,113,114,115],[2,82]),t(K,[2,28]),t(K,[2,29]),t(K,[2,30]),t(K,[2,31]),t(K,[2,32]),{10:ut,12:at,14:ot,27:ct,28:124,32:lt,44:ht,60:dt,75:pt,79:[1,126],80:[1,127],82:137,83:At,84:gt,85:ft,86:yt,87:kt,88:bt,89:Et,90:125,104:mt,108:Dt,110:xt,113:Ct,114:Tt,115:St},t(Ft,i,{5:150}),t(K,[2,37]),t(K,[2,38]),t(M,[2,48],{44:_t}),t(M,[2,49],{18:152,10:I,40:Bt}),t(J,[2,44]),{44:g,47:154,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{101:[1,155],102:156,104:[1,157]},{44:g,47:158,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{44:g,47:159,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,105],{10:[1,160],95:[1,161]}),{79:[1,162]},t(vt,[2,113],{119:164,10:[1,163],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,115],{10:[1,165]}),t(wt,[2,181]),t(wt,[2,168]),t(wt,[2,169]),t(wt,[2,170]),t(wt,[2,171]),t(wt,[2,172]),t(wt,[2,173]),t(wt,[2,174]),t(wt,[2,175]),t(wt,[2,176]),t(wt,[2,177]),t(wt,[2,178]),{44:g,47:166,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{30:167,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:175,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:177,50:[1,176],67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:178,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:179,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:180,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{108:[1,181]},{30:182,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:183,65:[1,184],67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:185,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:186,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{30:187,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(et,[2,180]),t(r,[2,20]),t(st,[2,25]),t(M,[2,46],{39:188,18:189,10:I,40:V}),t(nt,[2,73],{10:[1,190]}),{10:[1,191]},{30:192,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{77:[1,193],78:194,115:rt,118:it},t(Pt,[2,78]),t(Pt,[2,80]),t(Pt,[2,81]),t(Pt,[2,166]),t(Pt,[2,167]),{8:N,9:P,10:ut,11:O,12:at,14:ot,21:196,27:ct,29:[1,195],32:lt,44:ht,60:dt,75:pt,82:137,83:At,84:gt,85:ft,86:yt,87:kt,88:bt,89:Et,90:197,104:mt,108:Dt,110:xt,113:Ct,114:Tt,115:St},t(Ot,[2,99]),t(Ot,[2,101]),t(Ot,[2,102]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,157]),t(Ot,[2,158]),t(Ot,[2,159]),t(Ot,[2,160]),t(Ot,[2,161]),t(Ot,[2,162]),t(Ot,[2,163]),t(Ot,[2,164]),t(Ot,[2,165]),t(Ot,[2,88]),t(Ot,[2,89]),t(Ot,[2,90]),t(Ot,[2,91]),t(Ot,[2,92]),t(Ot,[2,93]),t(Ot,[2,94]),t(Ot,[2,95]),t(Ot,[2,96]),t(Ot,[2,97]),t(Ot,[2,98]),{6:11,7:12,8:u,9:a,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,198],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},{10:I,18:199},{44:[1,200]},t(J,[2,43]),{10:[1,201],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{10:[1,202]},{10:[1,203],105:[1,204]},t(Mt,[2,126]),{10:[1,205],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{10:[1,206],44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:111,113:_,114:B,115:v},{79:[1,207]},t(vt,[2,107],{10:[1,208]}),t(vt,[2,109],{10:[1,209]}),{79:[1,210]},t(wt,[2,182]),{79:[1,211],97:[1,212]},t(J,[2,55],{112:111,44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),{31:[1,213],67:$t,81:214,115:It,116:Kt,117:Nt},t(Vt,[2,84]),t(Vt,[2,86]),t(Vt,[2,87]),t(Vt,[2,151]),t(Vt,[2,152]),t(Vt,[2,153]),t(Vt,[2,154]),{49:[1,215],67:$t,81:214,115:It,116:Kt,117:Nt},{30:216,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{51:[1,217],67:$t,81:214,115:It,116:Kt,117:Nt},{53:[1,218],67:$t,81:214,115:It,116:Kt,117:Nt},{55:[1,219],67:$t,81:214,115:It,116:Kt,117:Nt},{57:[1,220],67:$t,81:214,115:It,116:Kt,117:Nt},{60:[1,221]},{64:[1,222],67:$t,81:214,115:It,116:Kt,117:Nt},{66:[1,223],67:$t,81:214,115:It,116:Kt,117:Nt},{30:224,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},{31:[1,225],67:$t,81:214,115:It,116:Kt,117:Nt},{67:$t,69:[1,226],71:[1,227],81:214,115:It,116:Kt,117:Nt},{67:$t,69:[1,229],71:[1,228],81:214,115:It,116:Kt,117:Nt},t(M,[2,45],{18:152,10:I,40:Bt}),t(M,[2,47],{44:_t}),t(nt,[2,75]),t(nt,[2,74]),{62:[1,230],67:$t,81:214,115:It,116:Kt,117:Nt},t(nt,[2,77]),t(Pt,[2,79]),{30:231,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(Ft,i,{5:232}),t(Ot,[2,100]),t(K,[2,35]),{43:233,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},{10:I,18:234},{10:Ut,60:Gt,83:Wt,91:235,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:246,103:[1,247],104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:248,103:[1,249],104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{104:[1,250]},{10:Ut,60:Gt,83:Wt,91:251,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{44:g,47:252,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,106]),{79:[1,253]},{79:[1,254],97:[1,255]},t(vt,[2,114]),t(vt,[2,116],{10:[1,256]}),t(vt,[2,117]),t(tt,[2,56]),t(Vt,[2,85]),t(tt,[2,57]),{51:[1,257],67:$t,81:214,115:It,116:Kt,117:Nt},t(tt,[2,64]),t(tt,[2,59]),t(tt,[2,60]),t(tt,[2,61]),{108:[1,258]},t(tt,[2,63]),t(tt,[2,65]),{66:[1,259],67:$t,81:214,115:It,116:Kt,117:Nt},t(tt,[2,67]),t(tt,[2,68]),t(tt,[2,70]),t(tt,[2,69]),t(tt,[2,71]),t([10,44,60,88,101,104,105,108,110,113,114,115],[2,83]),{31:[1,260],67:$t,81:214,115:It,116:Kt,117:Nt},{6:11,7:12,8:u,9:a,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,261],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},t(J,[2,53]),{43:262,44:g,45:39,47:40,60:f,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v},t(vt,[2,119],{105:qt}),t(Qt,[2,128],{107:264,10:Ut,60:Gt,83:Wt,104:Yt,108:jt,109:Xt,110:zt,111:Ht}),t(Zt,[2,130]),t(Zt,[2,132]),t(Zt,[2,133]),t(Zt,[2,134]),t(Zt,[2,135]),t(Zt,[2,136]),t(Zt,[2,137]),t(Zt,[2,138]),t(Zt,[2,139]),t(vt,[2,120],{105:qt}),{10:[1,265]},t(vt,[2,121],{105:qt}),{10:[1,266]},t(Mt,[2,127]),t(vt,[2,103],{105:qt}),t(vt,[2,104],{112:111,44:g,60:f,88:D,101:x,104:C,105:T,108:S,110:F,113:_,114:B,115:v}),t(vt,[2,108]),t(vt,[2,110],{10:[1,267]}),t(vt,[2,111]),{97:[1,268]},{51:[1,269]},{62:[1,270]},{66:[1,271]},{8:N,9:P,11:O,21:272},t(K,[2,34]),t(J,[2,52]),{10:Ut,60:Gt,83:Wt,104:Yt,106:273,107:237,108:jt,109:Xt,110:zt,111:Ht},t(Zt,[2,131]),{14:U,44:G,60:W,88:Y,100:274,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},{14:U,44:G,60:W,88:Y,100:275,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z,119:86},{97:[1,276]},t(vt,[2,118]),t(tt,[2,58]),{30:277,67:$t,79:Lt,80:Rt,81:168,115:It,116:Kt,117:Nt},t(tt,[2,66]),t(Ft,i,{5:278}),t(Qt,[2,129],{107:264,10:Ut,60:Gt,83:Wt,104:Yt,108:jt,109:Xt,110:zt,111:Ht}),t(vt,[2,124],{119:164,10:[1,279],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,125],{119:164,10:[1,280],14:U,44:G,60:W,88:Y,104:j,105:X,108:z,110:H,113:q,114:Q,115:Z}),t(vt,[2,112]),{31:[1,281],67:$t,81:214,115:It,116:Kt,117:Nt},{6:11,7:12,8:u,9:a,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,282],33:24,34:d,36:p,38:A,42:28,43:38,44:g,45:39,47:40,60:f,83:y,84:k,85:b,86:E,87:m,88:D,101:x,104:C,105:T,108:S,110:F,112:41,113:_,114:B,115:v,120:w,121:$,122:L,123:R},{10:Ut,60:Gt,83:Wt,91:283,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},{10:Ut,60:Gt,83:Wt,91:284,104:Yt,106:236,107:237,108:jt,109:Xt,110:zt,111:Ht},t(tt,[2,62]),t(K,[2,33]),t(vt,[2,122],{105:qt}),t(vt,[2,123],{105:qt})],defaultActions:{},parseError:(0,c.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,c.K2)((function(t){var e=this,s=[0],n=[],r=[null],i=[],u=this.table,a="",o=0,l=0,h=0,d=i.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(A.yy[g]=this.yy[g]);p.setInput(t,A.yy),A.yy.lexer=p,A.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;i.push(f);var y=p.options&&p.options.ranges;function k(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)((function(t){s.length=s.length-2*t,r.length=r.length-t,i.length=i.length-t}),"popStack"),(0,c.K2)(k,"lex");for(var b,E,m,D,x,C,T,S,F,_={};;){if(m=s[s.length-1],this.defaultActions[m]?D=this.defaultActions[m]:(null==b&&(b=k()),D=u[m]&&u[m][b]),void 0===D||!D.length||!D[0]){var B;for(C in F=[],u[m])this.terminals_[C]&&C>2&&F.push("'"+this.terminals_[C]+"'");B=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+F.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:F})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+b);switch(D[0]){case 1:s.push(b),r.push(p.yytext),i.push(p.yylloc),s.push(D[1]),b=null,E?(b=E,E=null):(l=p.yyleng,a=p.yytext,o=p.yylineno,f=p.yylloc,h>0&&h--);break;case 2:if(T=this.productions_[D[1]][1],_.$=r[r.length-T],_._$={first_line:i[i.length-(T||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(T||1)].first_column,last_column:i[i.length-1].last_column},y&&(_._$.range=[i[i.length-(T||1)].range[0],i[i.length-1].range[1]]),void 0!==(x=this.performAction.apply(_,[a,l,o,A.yy,D[1],r,i].concat(d))))return x;T&&(s=s.slice(0,-1*T*2),r=r.slice(0,-1*T),i=i.slice(0,-1*T)),s.push(this.productions_[D[1]][0]),r.push(_.$),i.push(_._$),S=u[s[s.length-2]][s[s.length-1]],s.push(S);break;case 3:return!0}}return!0}),"parse")},te=function(){return{EOF:1,parseError:(0,c.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,c.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,c.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,c.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,c.K2)((function(){return this._more=!0,this}),"more"),reject:(0,c.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,c.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,c.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,c.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,c.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,c.K2)((function(t,e){var s,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var i in r)this[i]=r[i];return!1}return!1}),"test_match"),next:(0,c.K2)((function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),i=0;ie[0].length)){if(e=s,n=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,c.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,c.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,c.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,c.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,c.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,c.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,c.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,c.K2)((function(t,e,s,n){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"
"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 94;case 18:return 95;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 83;case 26:return 101;case 27:return 84;case 28:return 103;case 29:return 85;case 30:return 86;case 31:return 96;case 32:this.begin("click");break;case 34:return 87;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 97;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 120;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 104;case 60:case 101:return 110;case 61:return 46;case 62:return 60;case 63:case 102:return 44;case 64:return 8;case 65:return 105;case 66:case 100:return 114;case 67:case 70:case 73:return this.popState(),77;case 68:return this.pushState("edgeText"),75;case 69:case 72:case 75:return 118;case 71:return this.pushState("thickEdgeText"),75;case 74:return this.pushState("dottedEdgeText"),75;case 76:return 77;case 77:return this.popState(),53;case 78:case 114:return"TEXT";case 79:return this.pushState("ellipseText"),52;case 80:return this.popState(),55;case 81:return this.pushState("text"),54;case 82:return this.popState(),57;case 83:return this.pushState("text"),56;case 84:return 58;case 85:return this.pushState("text"),67;case 86:return this.popState(),64;case 87:return this.pushState("text"),63;case 88:return this.popState(),49;case 89:return this.pushState("text"),48;case 90:return this.popState(),69;case 91:return this.popState(),71;case 92:return 116;case 93:return this.pushState("trapText"),68;case 94:return this.pushState("trapText"),70;case 95:return 117;case 96:return 67;case 97:return 89;case 98:return"SEP";case 99:return 88;case 103:return 108;case 104:return 113;case 105:return 115;case 106:return this.popState(),62;case 107:return this.pushState("text"),62;case 108:return this.popState(),51;case 109:return this.pushState("text"),50;case 110:return this.popState(),31;case 111:return this.pushState("text"),29;case 112:return this.popState(),66;case 113:return this.pushState("text"),65;case 115:return"QUOTE";case 116:return 9;case 117:return 10;case 118:return 11}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},href:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},click:{rules:[21,24,33,34,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dottedEdgeText:{rules:[21,24,73,75,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},thickEdgeText:{rules:[21,24,70,72,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},edgeText:{rules:[21,24,67,69,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},trapText:{rules:[21,24,76,79,81,83,87,89,90,91,92,93,94,107,109,111,113],inclusive:!1},ellipseText:{rules:[21,24,76,77,78,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},text:{rules:[21,24,76,79,80,81,82,83,86,87,88,89,93,94,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_descr:{rules:[3,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},acc_title:{rules:[1,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},md_string:{rules:[19,20,21,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},string:{rules:[21,22,23,24,76,79,81,83,87,89,93,94,107,109,111,113],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,70,71,73,74,76,79,81,83,84,85,87,89,93,94,95,96,97,98,99,100,101,102,103,104,105,107,109,111,113,115,116,117,118],inclusive:!0}}}}();function ee(){this.yy={}}return Jt.lexer=te,(0,c.K2)(ee,"Parser"),ee.prototype=Jt,Jt.Parser=ee,new ee}();kt.parser=kt;var bt=kt,Et=(0,c.K2)(((t,e)=>{const s=h.A,n=s(t,"r"),r=s(t,"g"),i=s(t,"b");return d.A(n,r,i,e)}),"fade"),mt={parser:bt,db:ft,renderer:yt,styles:(0,c.K2)((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${Et(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n`),"getStyles"),init:(0,c.K2)((t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,c.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,c.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),ft.clear(),ft.setGen("gen-2")}),"init")}}}]); \ No newline at end of file diff --git a/js/339-ed783b3e.chunk.min.js b/js/339-ed783b3e.chunk.min.js deleted file mode 100644 index 0930937..0000000 --- a/js/339-ed783b3e.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[339],{3339:(t,n,e)=>{e.d(n,{diagram:()=>it});var i=e(798),s=e(4852);function r(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function o(t){return t.target.depth}function c(t,n){return t.sourceLinks.length?t.depth:n-1}function a(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function l(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e=n)&&(e=n);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e=s)&&(e=s)}return e}function h(t){return function(){return t}}function u(t,n){return y(t.source,n.source)||t.index-n.index}function f(t,n){return y(t.target,n.target)||t.index-n.index}function y(t,n){return t.y0-n.y0}function d(t){return t.value}function p(t){return t.index}function g(t){return t.nodes}function _(t){return t.links}function k(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function x({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const e of n.sourceLinks)e.y0=t+e.width/2,t+=e.width;for(const t of n.targetLinks)t.y1=e+t.width/2,e+=t.width}}var m=Math.PI,v=2*m,b=1e-6,w=v-b;function L(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function S(){return new L}L.prototype=S.prototype={constructor:L,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,c=e-t,a=i-n,l=r-t,h=o-n,u=l*l+h*h;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>b)if(Math.abs(h*c-a*l)>b&&s){var f=e-r,y=i-o,d=c*c+a*a,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),k=s*Math.tan((m-Math.acos((d+u-p)/(2*g*_)))/2),x=k/_,v=k/g;Math.abs(x-1)>b&&(this._+="L"+(t+x*l)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>l*y)+","+(this._x1=t+v*c)+","+(this._y1=n+v*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),c=e*Math.sin(i),a=t+o,l=n+c,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+l:(Math.abs(this._x1-a)>b||Math.abs(this._y1-l)>b)&&(this._+="L"+a+","+l),e&&(u<0&&(u=u%v+v),u>w?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-c)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=l):u>b&&(this._+="A"+e+","+e+",0,"+ +(u>=m)+","+h+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const E=S;var A=Array.prototype.slice;function K(t){return function(){return t}}function M(t){return t[0]}function I(t){return t[1]}function T(t){return t.source}function D(t){return t.target}function N(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function P(t){return[t.source.x1,t.y0]}function C(t){return[t.target.x0,t.y1]}function O(){return function(t){var n=T,e=D,i=M,s=I,r=null;function o(){var o,c=A.call(arguments),a=n.apply(this,c),l=e.apply(this,c);if(r||(r=o=E()),t(r,+i.apply(this,(c[0]=a,c)),+s.apply(this,c),+i.apply(this,(c[0]=l,c)),+s.apply(this,c)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:K(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:K(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}(N).source(P).target(C)}var $=function(){var t=(0,i.K2)((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],s=[1,5,10,12],r={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,i.K2)((function(t,n,e,i,s,r,o){var c=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[c-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[c-2].trim().replaceAll('""','"')),e=parseFloat(r[c].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[c];break;case 10:this.$=r[c-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(s,[2,8]),t(s,[2,9]),{19:[1,16]},t(s,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(s,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,i.K2)((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var n=this,e=[0],s=[],r=[null],o=[],c=this.table,a="",l=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;o.push(g);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=s.pop()||y.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){e.length=e.length-2*t,r.length=r.length-t,o.length=o.length-t}),"popStack"),(0,i.K2)(k,"lex");for(var x,m,v,b,w,L,S,E,A,K={};;){if(v=e[e.length-1],this.defaultActions[v]?b=this.defaultActions[v]:(null==x&&(x=k()),b=c[v]&&c[v][x]),void 0===b||!b.length||!b[0]){var M;for(L in A=[],c[v])this.terminals_[L]&&L>2&&A.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:g,expected:A})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+x);switch(b[0]){case 1:e.push(x),r.push(y.yytext),o.push(y.yylloc),e.push(b[1]),x=null,m?(x=m,m=null):(h=y.yyleng,a=y.yytext,l=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[b[1]][1],K.$=r[r.length-S],K._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(K._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(K,[a,h,l,d.yy,b[1],r,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[b[1]][0]),r.push(K.$),o.push(K._$),E=c[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:(0,i.K2)((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:(0,i.K2)((function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;rn[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function c(){this.yy={}}return r.lexer=o,(0,i.K2)(c,"Parser"),c.prototype=r,r.Parser=c,new c}();$.parser=$;var j=$,z=[],U=[],F=new Map,W=(0,i.K2)((()=>{z=[],U=[],F=new Map,(0,i.IU)()}),"clear"),G=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,i.K2)(this,"SankeyLink")}},V=(0,i.K2)(((t,n,e)=>{z.push(new G(t,n,e))}),"addLink"),X=class{constructor(t){this.ID=t}static{(0,i.K2)(this,"SankeyNode")}},Y=(0,i.K2)((t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=F.get(t);return void 0===n&&(n=new X(t),F.set(t,n),U.push(n)),n}),"findOrCreateNode"),q=(0,i.K2)((()=>U),"getNodes"),Q=(0,i.K2)((()=>z),"getLinks"),R=(0,i.K2)((()=>({nodes:U.map((t=>({id:t.ID}))),links:z.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),B={nodesMap:F,getConfig:(0,i.K2)((()=>(0,i.D7)().sankey),"getConfig"),getNodes:q,getLinks:Q,getGraph:R,addLink:V,findOrCreateNode:Y,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:W},Z=class t{static{(0,i.K2)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},H={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?r(t.sourceLinks,o)-1:0},justify:c},J=(0,i.K2)((function(t,n,e,o){const{securityLevel:m,sankey:v}=(0,i.D7)(),b=i.ME.sankey;let w;"sandbox"===m&&(w=(0,s.Ltv)("#i"+n));const L="sandbox"===m?(0,s.Ltv)(w.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),S="sandbox"===m?L.select(`[id="${n}"]`):(0,s.Ltv)(`[id="${n}"]`),E=v?.width??b.width,A=v?.height??b.width,K=v?.useMaxWidth??b.useMaxWidth,M=v?.nodeAlignment??b.nodeAlignment,I=v?.prefix??b.prefix,T=v?.suffix??b.suffix,D=v?.showValues??b.showValues,N=o.db.getGraph(),P=H[M];(function(){let t,n,e,i=0,s=0,o=1,m=1,v=24,b=8,w=p,L=c,S=g,E=_,A=6;function K(){const c={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[n,e]of t.entries())e.index=n,e.sourceLinks=[],e.targetLinks=[];const i=new Map(t.map(((n,e)=>[w(n,e,t),n])));for(const[t,e]of n.entries()){e.index=t;let{source:n,target:s}=e;"object"!=typeof n&&(n=e.source=k(i,n)),"object"!=typeof s&&(s=e.target=k(i,s)),n.sourceLinks.push(e),s.targetLinks.push(e)}if(null!=e)for(const{sourceLinks:n,targetLinks:i}of t)n.sort(e),i.sort(e)}(c),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(a(n.sourceLinks,d),a(n.targetLinks,d)):n.fixedValue}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(c),function(e){const c=function({nodes:t}){const e=l(t,(t=>t.depth))+1,s=(o-i-v)/(e-1),r=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+v,r[t]?r[t].push(n):r[t]=[n]}if(n)for(const t of r)t.sort(n);return r}(e);t=Math.min(b,(m-s)/(l(c,(t=>t.length))-1)),function(n){const e=r(n,(n=>(m-s-(n.length-1)*t)/a(n,d)));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(m-n+t)/(i.length+1);for(let t=0;t0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),T(r,i)}}function I(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=$(t,e)*r,i+=r}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(y),T(r,i)}}function T(n,e){const i=n.length>>1,r=n[i];N(n,r.y0-t,i-1,e),D(n,r.y1+t,i+1,e),N(n,m,n.length-1,e),D(n,s,0,e)}function D(n,e,i,s){for(;i1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function N(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(f);for(const{target:{targetLinks:n}}of t)n.sort(u)}}function C(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(f),e.sort(u)}function O(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return K.update=function(t){return x(t),t},K.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:h(t),K):w},K.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:h(t),K):L},K.nodeSort=function(t){return arguments.length?(n=t,K):n},K.nodeWidth=function(t){return arguments.length?(v=+t,K):v},K.nodePadding=function(n){return arguments.length?(b=t=+n,K):b},K.nodes=function(t){return arguments.length?(S="function"==typeof t?t:h(t),K):S},K.links=function(t){return arguments.length?(E="function"==typeof t?t:h(t),K):E},K.linkSort=function(t){return arguments.length?(e=t,K):e},K.size=function(t){return arguments.length?(i=s=0,o=+t[0],m=+t[1],K):[o-i,m-s]},K.extent=function(t){return arguments.length?(i=+t[0][0],o=+t[1][0],s=+t[0][1],m=+t[1][1],K):[[i,s],[o,m]]},K.iterations=function(t){return arguments.length?(A=+t,K):A},K})().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(D?15:0)).nodeAlign(P).extent([[0,0],[E,A]])(N);const C=(0,s.UMr)(s.zt);S.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=Z.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>C(t.id)));const $=(0,i.K2)((({id:t,value:n})=>D?`${t}\n${I}${Math.round(100*n)/100}${T}`:t),"getText");S.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",(t=>t.x0(t.y1+t.y0)/2)).attr("dy",(D?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0(t.uid=Z.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>C(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>C(t.target.id)))}let U;switch(z){case"gradient":U=(0,i.K2)((t=>t.uid),"coloring");break;case"source":U=(0,i.K2)((t=>C(t.source.id)),"coloring");break;case"target":U=(0,i.K2)((t=>C(t.target.id)),"coloring");break;default:U=z}j.append("path").attr("d",O()).attr("stroke",U).attr("stroke-width",(t=>Math.max(1,t.width))),(0,i.ot)(void 0,S,0,K)}),"draw"),tt={draw:J},nt=(0,i.K2)((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),et=j.parse.bind(j);j.parse=t=>et(nt(t));var it={parser:j,db:B,renderer:tt}}}]); \ No newline at end of file diff --git a/js/344-91b41751.chunk.min.js b/js/344-91b41751.chunk.min.js new file mode 100644 index 0000000..345878f --- /dev/null +++ b/js/344-91b41751.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[344],{9344:(t,i,e)=>{e.d(i,{diagram:()=>J});var s=e(2382),n=e(5522),a=e(1661),h=e(32),o=e(4852),r=function(){var t=(0,h.K2)((function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e}),"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],n=[1,5],a=[1,6],o=[1,7],r=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],y=[1,34],m=[1,35],b=[1,36],A=[1,37],S=[1,43],C=[1,42],w=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:(0,h.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,h.K2)((function(t,i,e,s,n,a,h){var o=a.length-1;switch(n){case 5:s.setOrientation(a[o]);break;case 9:s.setDiagramTitle(a[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},a[o]);break;case 13:s.setLineData(a[o-1],a[o]);break;case 14:s.setBarData({text:"",type:"text"},a[o]);break;case 15:s.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:s.setXAxisTitle(a[o]);break;case 23:s.setXAxisTitle(a[o-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(a[o]);break;case 26:s.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:s.setYAxisTitle(a[o]);break;case 31:s.setYAxisTitle(a[o-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}}),"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:n,35:a,36:o}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:n,35:a,36:o}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:a,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,34]),t(r,[2,35]),t(r,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:n,35:a,36:o}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,34:n,35:a,36:o}),{11:23,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:39,13:38,24:S,27:C,29:40,30:41,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:45,15:44,27:w,33:46,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:49,17:48,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:52,17:51,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:S,27:C}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:w}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,h.K2)((function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)}),"parseError"),parse:(0,h.K2)((function(t){var i=this,e=[0],s=[],n=[null],a=[],o=this.table,r="",l=0,c=0,g=0,u=a.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;a.push(f);var y=x.options&&x.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K2)((function(t){e.length=e.length-2*t,n.length=n.length-t,a.length=a.length-t}),"popStack"),(0,h.K2)(m,"lex");for(var b,A,S,C,w,k,_,T,R,D={};;){if(S=e[e.length-1],this.defaultActions[S]?C=this.defaultActions[S]:(null==b&&(b=m()),C=o[S]&&o[S][b]),void 0===C||!C.length||!C[0]){var L;for(k in R=[],o[S])this.terminals_[k]&&k>2&&R.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:R})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+b);switch(C[0]){case 1:e.push(b),n.push(x.yytext),a.push(x.yylloc),e.push(C[1]),b=null,A?(b=A,A=null):(c=x.yyleng,r=x.yytext,l=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[C[1]][1],D.$=n[n.length-_],D._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(D,[r,c,l,d.yy,C[1],n,a].concat(u))))return w;_&&(e=e.slice(0,-1*_*2),n=n.slice(0,-1*_),a=a.slice(0,-1*_)),e.push(this.productions_[C[1]][0]),n.push(D.$),a.push(D._$),T=o[e[e.length-2]][e[e.length-1]],e.push(T);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:(0,h.K2)((function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)}),"parseError"),setInput:(0,h.K2)((function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,h.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,h.K2)((function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,h.K2)((function(){return this._more=!0,this}),"more"),reject:(0,h.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,h.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,h.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,h.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,h.K2)((function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"}),"showPosition"),test_match:(0,h.K2)((function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1}),"test_match"),next:(0,h.K2)((function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ai[0].length)){if(i=e,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,n[a])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,h.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,h.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,h.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,h.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,h.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,h.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,h.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,h.K2)((function(t,i,e,s){switch(e){case 0:case 1:case 5:case 43:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 25:case 27:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 8;case 16:return this.pushState("axis_data"),"X_AXIS";case 17:return this.pushState("axis_data"),"Y_AXIS";case 18:return this.pushState("axis_band_data"),24;case 19:return 31;case 20:return this.pushState("data"),16;case 21:return this.pushState("data"),18;case 22:return this.pushState("data_inner"),24;case 23:return 27;case 24:return this.popState(),26;case 26:this.pushState("string");break;case 28:return"STR";case 29:return 24;case 30:return 26;case 31:return 43;case 32:return"COLON";case 33:return 44;case 34:return 28;case 35:return 45;case 36:return 46;case 37:return 48;case 38:return 50;case 39:return 47;case 40:return 41;case 41:return 49;case 42:return 42;case 44:return 35;case 45:return 36}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}}}();function E(){this.yy={}}return L.lexer=P,(0,h.K2)(E,"Parser"),E.prototype=L,L.Parser=E,new E}();r.parser=r;var l=r;function c(t){return"bar"===t.type}function g(t){return"band"===t.type}function u(t){return"linear"===t.type}(0,h.K2)(c,"isBarPlot"),(0,h.K2)(g,"isBandAxisData"),(0,h.K2)(u,"isLinearAxisData");var x=class{constructor(t){this.parentGroup=t}static{(0,h.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce(((t,i)=>Math.max(i.length,t)),0)*i,height:i};const e={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const a of t){const t=(0,s.W6)(n,1,a),h=t?t.width:a.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return n.remove(),e}},d=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,h.K2)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map((t=>t.toString())),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+2*this.axisConfig.labelPadding;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"})))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"})))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth})))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},p=class extends d{static{(0,h.K2)(this,"BandAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=(0,o.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,o.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),h.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},f=class extends d{static{(0,h.K2)(this,"LinearAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=(0,o.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,o.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function y(t,i,e,s){const n=new x(s);return g(t)?new p(i,e,t.categories,t.title,n):new f(i,e,[t.min,t.max],t.title,n)}(0,h.K2)(y,"getAxis");var m=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,h.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function b(t,i,e,s){const n=new x(s);return new m(n,t,i,e)}(0,h.K2)(b,"getChartTitleComponent");var A=class{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}static{(0,h.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]));let i;return i="horizontal"===this.orientation?(0,o.n8j)().y((t=>t[0])).x((t=>t[1]))(t):(0,o.n8j)().x((t=>t[0])).y((t=>t[1]))(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},S=class{constructor(t,i,e,s,n,a){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{(0,h.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map((t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])])),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map((t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill})))}]}},C=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,h.K2)(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new A(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new S(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function w(t,i,e){return new C(t,i,e)}(0,h.K2)(w,"getPlotComponent");var k,_=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:b(t,i,e,s),plot:w(t,i,e),xAxis:y(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:y(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,h.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:n,height:a});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,t>0&&(n+=t,t=0),i>0&&(a+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+a}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some((t=>c(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,n=e+o.height,t>0&&(a+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+a]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((t=>c(t)))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},T=class{static{(0,h.K2)(this,"XYChartBuilder")}static build(t,i,e,s){return new _(t,i,e,s).getDrawableElement()}},R=0,D=$(),L=I(),P={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},E=L.plotColorPalette.split(",").map((t=>t.trim())),v=!1,K=!1;function I(){const t=(0,h.P$)(),i=(0,h.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function $(){const t=(0,h.zj)();return(0,n.$t)(h.UI.xyChart,t.xyChart)}function M(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){const i=(0,h.zj)();return(0,h.jZ)(t.trim(),i)}function z(t){k=t}function W(t){D.chartOrientation="horizontal"===t?"horizontal":"vertical"}function O(t){P.xAxis.title=B(t.text)}function F(t,i){P.xAxis={type:"linear",title:P.xAxis.title,min:t,max:i},v=!0}function N(t){P.xAxis={type:"band",title:P.xAxis.title,categories:t.map((t=>B(t.text)))},v=!0}function V(t){P.yAxis.title=B(t.text)}function X(t,i){P.yAxis={type:"linear",title:P.yAxis.title,min:t,max:i},K=!0}function Y(t){const i=Math.min(...t),e=Math.max(...t),s=u(P.yAxis)?P.yAxis.min:1/0,n=u(P.yAxis)?P.yAxis.max:-1/0;P.yAxis={type:"linear",title:P.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}function U(t){let i=[];if(0===t.length)return i;if(!v){const i=u(P.xAxis)?P.xAxis.min:1/0,e=u(P.xAxis)?P.xAxis.max:-1/0;F(Math.min(i,1),Math.max(e,t.length))}if(K||Y(t),g(P.xAxis)&&(i=P.xAxis.categories.map(((i,e)=>[i,t[e]]))),u(P.xAxis)){const e=P.xAxis.min,s=P.xAxis.max,n=(s-e)/(t.length-1),a=[];for(let t=e;t<=s;t+=n)a.push(`${t}`);i=a.map(((i,e)=>[i,t[e]]))}return i}function H(t){return E[0===t?0:t%E.length]}function j(t,i){const e=U(i);P.plots.push({type:"line",strokeFill:H(R),strokeWidth:2,data:e}),R++}function G(t,i){const e=U(i);P.plots.push({type:"bar",fill:H(R),data:e}),R++}function Q(){if(0===P.plots.length)throw Error("No Plot to render, please provide a plot with some data");return P.title=(0,h.ab)(),T.build(D,P,L,k)}function Z(){return L}function q(){return D}(0,h.K2)(I,"getChartDefaultThemeConfig"),(0,h.K2)($,"getChartDefaultConfig"),(0,h.K2)(M,"getChartDefaultData"),(0,h.K2)(B,"textSanitizer"),(0,h.K2)(z,"setTmpSVGG"),(0,h.K2)(W,"setOrientation"),(0,h.K2)(O,"setXAxisTitle"),(0,h.K2)(F,"setXAxisRangeData"),(0,h.K2)(N,"setXAxisBand"),(0,h.K2)(V,"setYAxisTitle"),(0,h.K2)(X,"setYAxisRangeData"),(0,h.K2)(Y,"setYAxisRangeFromPlotData"),(0,h.K2)(U,"transformDataWithoutCategory"),(0,h.K2)(H,"getPlotColorFromPalette"),(0,h.K2)(j,"setLineData"),(0,h.K2)(G,"setBarData"),(0,h.K2)(Q,"getDrawableElem"),(0,h.K2)(Z,"getChartThemeConfig"),(0,h.K2)(q,"getChartConfig");var J={parser:l,db:{getDrawableElem:Q,clear:(0,h.K2)((function(){(0,h.IU)(),R=0,D=$(),P={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},L=I(),E=L.plotColorPalette.split(",").map((t=>t.trim())),v=!1,K=!1}),"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:W,setXAxisTitle:O,setXAxisRangeData:F,setXAxisBand:N,setYAxisTitle:V,setYAxisRangeData:X,setLineData:j,setBarData:G,setTmpSVGG:z,getChartThemeConfig:Z,getChartConfig:q},renderer:{draw:(0,h.K2)(((t,i,e,s)=>{const n=s.db,o=n.getChartThemeConfig(),r=n.getChartConfig();function l(t){return"top"===t?"text-before-edge":"middle"}function c(t){return"left"===t?"start":"right"===t?"end":"middle"}function g(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,h.K2)(l,"getDominantBaseLine"),(0,h.K2)(c,"getTextAnchor"),(0,h.K2)(g,"getTextTransformation"),h.Rm.debug("Rendering xychart chart\n"+t);const u=(0,a.D)(i),x=u.append("g").attr("class","main"),d=x.append("rect").attr("width",r.width).attr("height",r.height).attr("class","background");(0,h.a$)(u,r.height,r.width,!0),u.attr("viewBox",`0 0 ${r.width} ${r.height}`),d.attr("fill",o.backgroundColor),n.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group"));const p=n.getDrawableElem(),f={};function y(t){let i=x,e="";for(const[s]of t.entries()){let n=x;s>0&&f[e]&&(n=f[e]),e+=t[s],i=f[e],i||(i=f[e]=n.append("g").attr("class",t[s]))}return i}(0,h.K2)(y,"getGroup");for(const t of p){if(0===t.data.length)continue;const i=y(t.groupTexts);switch(t.type){case"rect":i.selectAll("rect").data(t.data).enter().append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth));break;case"text":i.selectAll("text").data(t.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>l(t.verticalPos))).attr("text-anchor",(t=>c(t.horizontalPos))).attr("transform",(t=>g(t))).text((t=>t.text));break;case"path":i.selectAll("path").data(t.data).enter().append("path").attr("d",(t=>t.path)).attr("fill",(t=>t.fill?t.fill:"none")).attr("stroke",(t=>t.strokeFill)).attr("stroke-width",(t=>t.strokeWidth))}}}),"draw")}}}}]); \ No newline at end of file diff --git a/js/356-34014d94.chunk.min.js b/js/356-34014d94.chunk.min.js deleted file mode 100644 index 979e988..0000000 --- a/js/356-34014d94.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[356],{2424:(t,r,e)=>{e.d(r,{m:()=>o});var n=e(798),o=class{constructor(t){this.init=t,this.records=this.init()}static{(0,n.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},7459:(t,r,e)=>{function n(t,r){t.accDescr&&r.setAccDescription?.(t.accDescr),t.accTitle&&r.setAccTitle?.(t.accTitle),t.title&&r.setDiagramTitle?.(t.title)}e.d(r,{S:()=>n}),(0,e(798).K2)(n,"populateCommonDb")},356:(t,r,e)=>{e.d(r,{diagram:()=>ft});var n=e(7459),o=e(2424),a=e(7323),c=e(798),s=e(8731),i=e(4852),h={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},d=c.UI.gitGraph,m=(0,c.K2)((()=>(0,a.$t)({...d,...(0,c.zj)().gitGraph})),"getConfig"),$=new o.m((()=>{const t=m(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}}));function l(){return(0,a.yT)({length:7})}function g(t,r){const e=Object.create(null);return t.reduce(((t,n)=>{const o=r(n);return e[o]||(e[o]=!0,t.push(n)),t}),[])}(0,c.K2)(l,"getID"),(0,c.K2)(g,"uniqBy");var y=(0,c.K2)((function(t){$.records.direction=t}),"setDirection"),p=(0,c.K2)((function(t){c.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{$.records.options=JSON.parse(t)}catch(t){c.Rm.error("error while parsing gitGraph options",t.message)}}),"setOptions"),x=(0,c.K2)((function(){return $.records.options}),"getOptions"),f=(0,c.K2)((function(t){let r=t.msg,e=t.id;const n=t.type;let o=t.tags;c.Rm.info("commit",r,e,n,o),c.Rm.debug("Entering commit:",r,e,n,o);const a=m();e=c.Y2.sanitizeText(e,a),r=c.Y2.sanitizeText(r,a),o=o?.map((t=>c.Y2.sanitizeText(t,a)));const s={id:e||$.records.seq+"-"+l(),message:r,seq:$.records.seq++,type:n??h.NORMAL,tags:o??[],parents:null==$.records.head?[]:[$.records.head.id],branch:$.records.currBranch};$.records.head=s,c.Rm.info("main branch",a.mainBranchName),$.records.commits.set(s.id,s),$.records.branches.set($.records.currBranch,s.id),c.Rm.debug("in pushCommit "+s.id)}),"commit"),u=(0,c.K2)((function(t){let r=t.name;const e=t.order;if(r=c.Y2.sanitizeText(r,m()),$.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);$.records.branches.set(r,null!=$.records.head?$.records.head.id:null),$.records.branchConfig.set(r,{name:r,order:e}),B(r),c.Rm.debug("in createBranch")}),"branch"),b=(0,c.K2)((t=>{let r=t.branch,e=t.id;const n=t.type,o=t.tags,a=m();r=c.Y2.sanitizeText(r,a),e&&(e=c.Y2.sanitizeText(e,a));const s=$.records.branches.get($.records.currBranch),i=$.records.branches.get(r),d=s?$.records.commits.get(s):void 0,g=i?$.records.commits.get(i):void 0;if(d&&g&&d.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if($.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===d||!d){const t=new Error(`Incorrect usage of "merge". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!$.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===g||!g){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(d===g){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&$.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw t.hash={text:`merge ${r} ${e} ${n} ${o?.join(" ")}`,token:`merge ${r} ${e} ${n} ${o?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${n} ${o?.join(" ")}`]},t}const y=i||"",p={id:e||`${$.records.seq}-${l()}`,message:`merged branch ${r} into ${$.records.currBranch}`,seq:$.records.seq++,parents:null==$.records.head?[]:[$.records.head.id,y],branch:$.records.currBranch,type:h.MERGE,customType:n,customId:!!e,tags:o??[]};$.records.head=p,$.records.commits.set(p.id,p),$.records.branches.set($.records.currBranch,p.id),c.Rm.debug($.records.branches),c.Rm.debug("in mergeBranch")}),"merge"),w=(0,c.K2)((function(t){let r=t.id,e=t.targetId,n=t.tags,o=t.parent;c.Rm.debug("Entering cherryPick:",r,e,n);const a=m();if(r=c.Y2.sanitizeText(r,a),e=c.Y2.sanitizeText(e,a),n=n?.map((t=>c.Y2.sanitizeText(t,a))),o=c.Y2.sanitizeText(o,a),!r||!$.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=$.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&(!Array.isArray(s.parents)||!s.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const i=s.branch;if(s.type===h.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!e||!$.records.commits.has(e)){if(i===$.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=$.records.branches.get($.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=$.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const d={id:$.records.seq+"-"+l(),message:`cherry-picked ${s?.message} into ${$.records.currBranch}`,seq:$.records.seq++,parents:null==$.records.head?[]:[$.records.head.id,s.id],branch:$.records.currBranch,type:h.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===h.MERGE?`|parent:${o}`:""}`]};$.records.head=d,$.records.commits.set(d.id,d),$.records.branches.set($.records.currBranch,d.id),c.Rm.debug($.records.branches),c.Rm.debug("in cherryPick")}}),"cherryPick"),B=(0,c.K2)((function(t){if(t=c.Y2.sanitizeText(t,m()),!$.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{$.records.currBranch=t;const r=$.records.branches.get($.records.currBranch);$.records.head=void 0!==r&&r?$.records.commits.get(r)??null:null}}),"checkout");function E(t,r,e){const n=t.indexOf(r);-1===n?t.push(e):t.splice(n,1,e)}function k(t){const r=t.reduce(((t,r)=>t.seq>r.seq?t:r),t[0]);let e="";t.forEach((function(t){e+=t===r?"\t*":"\t|"}));const n=[e,r.id,r.seq];for(const t in $.records.branches)$.records.branches.get(t)===r.id&&n.push(t);if(c.Rm.debug(n.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=$.records.commits.get(r.parents[0]);E(t,r,e),r.parents[1]&&t.push($.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=$.records.commits.get(r.parents[0]);E(t,r,e)}}k(t=g(t,(t=>t.id)))}(0,c.K2)(E,"upsert"),(0,c.K2)(k,"prettyPrintCommitHistory");var C=(0,c.K2)((function(){c.Rm.debug($.records.commits),k([R()[0]])}),"prettyPrint"),T=(0,c.K2)((function(){$.reset(),(0,c.IU)()}),"clear"),L=(0,c.K2)((function(){return[...$.records.branchConfig.values()].map(((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)})).sort(((t,r)=>(t.order??0)-(r.order??0))).map((({name:t})=>({name:t})))}),"getBranchesAsObjArray"),K=(0,c.K2)((function(){return $.records.branches}),"getBranches"),M=(0,c.K2)((function(){return $.records.commits}),"getCommits"),R=(0,c.K2)((function(){const t=[...$.records.commits.values()];return t.forEach((function(t){c.Rm.debug(t.id)})),t.sort(((t,r)=>t.seq-r.seq)),t}),"getCommitsArray"),v={commitType:h,getConfig:m,setDirection:y,setOptions:p,getOptions:x,commit:f,branch:u,merge:b,cherryPick:w,checkout:B,prettyPrint:C,clear:T,getBranchesAsObjArray:L,getBranches:K,getCommits:M,getCommitsArray:R,getCurrentBranch:(0,c.K2)((function(){return $.records.currBranch}),"getCurrentBranch"),getDirection:(0,c.K2)((function(){return $.records.direction}),"getDirection"),getHead:(0,c.K2)((function(){return $.records.head}),"getHead"),setAccTitle:c.SV,getAccTitle:c.iN,getAccDescription:c.m7,setAccDescription:c.EI,setDiagramTitle:c.ke,getDiagramTitle:c.ab},P=(0,c.K2)(((t,r)=>{(0,n.S)(t,r),t.dir&&r.setDirection(t.dir);for(const e of t.statements)I(e,r)}),"populate"),I=(0,c.K2)(((t,r)=>{const e={Commit:(0,c.K2)((t=>r.commit(A(t))),"Commit"),Branch:(0,c.K2)((t=>r.branch(G(t))),"Branch"),Merge:(0,c.K2)((t=>r.merge(O(t))),"Merge"),Checkout:(0,c.K2)((t=>r.checkout(q(t))),"Checkout"),CherryPicking:(0,c.K2)((t=>r.cherryPick(z(t))),"CherryPicking")}[t.$type];e?e(t):c.Rm.error(`Unknown statement type: ${t.$type}`)}),"parseStatement"),A=(0,c.K2)((t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?h[t.type]:h.NORMAL,tags:t.tags??void 0})),"parseCommit"),G=(0,c.K2)((t=>({name:t.name,order:t.order??0})),"parseBranch"),O=(0,c.K2)((t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?h[t.type]:void 0,tags:t.tags??void 0})),"parseMerge"),q=(0,c.K2)((t=>t.branch),"parseCheckout"),z=(0,c.K2)((t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent})),"parseCherryPicking"),H={parse:(0,c.K2)((async t=>{const r=await(0,s.qg)("gitGraph",t);c.Rm.debug(r),P(r,v)}),"parse")},S=(0,c.D7)(),D=S?.gitGraph,Y=10,N=40,j=new Map,W=new Map,_=new Map,F=[],U=0,V="LR",J=(0,c.K2)((()=>{j.clear(),W.clear(),_.clear(),U=0,F=[],V="LR"}),"clear"),Q=(0,c.K2)((t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach((t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)})),r}),"drawText"),X=(0,c.K2)((t=>{let r,e,n;return"BT"===V?(e=(0,c.K2)(((t,r)=>t<=r),"comparisonFunc"),n=1/0):(e=(0,c.K2)(((t,r)=>t>=r),"comparisonFunc"),n=0),t.forEach((t=>{const o="TB"===V||"BT"==V?W.get(t)?.y:W.get(t)?.x;void 0!==o&&e(o,n)&&(r=t,n=o)})),r}),"findClosestParent"),Z=(0,c.K2)((t=>{let r="",e=1/0;return t.forEach((t=>{const n=W.get(t).y;n<=e&&(r=t,e=n)})),r||void 0}),"findClosestParentBT"),tt=(0,c.K2)(((t,r,e)=>{let n=e,o=e;const a=[];t.forEach((t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(n=et(e),o=Math.max(n,o)):a.push(e),nt(e,n)})),n=o,a.forEach((t=>{ot(t,n,e)})),t.forEach((t=>{const e=r.get(t);if(e?.parents.length){const t=Z(e.parents);n=W.get(t).y-N,n<=o&&(o=n);const r=j.get(e.branch).pos,a=n-Y;W.set(e.id,{x:r,y:a})}}))}),"setParallelBTPos"),rt=(0,c.K2)((t=>{const r=X(t.parents.filter((t=>null!==t)));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=W.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e}),"findClosestParentPos"),et=(0,c.K2)((t=>rt(t)+N),"calculateCommitPosition"),nt=(0,c.K2)(((t,r)=>{const e=j.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const n=e.pos,o=r+Y;return W.set(t.id,{x:n,y:o}),{x:n,y:o}}),"setCommitPosition"),ot=(0,c.K2)(((t,r,e)=>{const n=j.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const o=r+e,a=n.pos;W.set(t.id,{x:a,y:o})}),"setRootPosition"),at=(0,c.K2)(((t,r,e,n,o,a)=>{if(a===h.HIGHLIGHT)t.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${o%8} ${n}-outer`),t.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${o%8} ${n}-inner`);else if(a===h.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const c=t.append("circle");if(c.attr("cx",e.x),c.attr("cy",e.y),c.attr("r",r.type===h.MERGE?9:10),c.attr("class",`commit ${r.id} commit${o%8}`),a===h.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",6),a.attr("class",`commit ${n} ${r.id} commit${o%8}`)}a===h.REVERSE&&t.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},${e.y-5}`).attr("class",`commit ${n} ${r.id} commit${o%8}`)}}),"drawCommitBullet"),ct=(0,c.K2)(((t,r,e,n)=>{if(r.type!==h.CHERRY_PICK&&(r.customId&&r.type===h.MERGE||r.type!==h.MERGE)&&D?.showCommitLabel){const o=t.append("g"),a=o.insert("rect").attr("class","commit-label-bkg"),c=o.append("text").attr("x",n).attr("y",e.y+25).attr("class","commit-label").text(r.id),s=c.node()?.getBBox();if(s&&(a.attr("x",e.posWithOffset-s.width/2-2).attr("y",e.y+13.5).attr("width",s.width+4).attr("height",s.height+4),"TB"===V||"BT"===V?(a.attr("x",e.x-(s.width+16+5)).attr("y",e.y-12),c.attr("x",e.x-(s.width+16)).attr("y",e.y+s.height-12)):c.attr("x",e.posWithOffset-s.width/2),D.rotateCommitLabel))if("TB"===V||"BT"===V)c.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),a.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(s.width+10)/25*9.5,r=10+s.width/25*8.5;o.attr("transform","translate("+t+", "+r+") rotate(-45, "+n+", "+e.y+")")}}}),"drawCommitLabel"),st=(0,c.K2)(((t,r,e,n)=>{if(r.tags.length>0){let o=0,a=0,c=0;const s=[];for(const n of r.tags.reverse()){const r=t.insert("polygon"),i=t.append("circle"),h=t.append("text").attr("y",e.y-16-o).attr("class","tag-label").text(n),d=h.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),c=Math.max(c,d.height),h.attr("x",e.posWithOffset-d.width/2),s.push({tag:h,hole:i,rect:r,yOffset:o}),o+=20}for(const{tag:t,hole:r,rect:o,yOffset:i}of s){const s=c/2,h=e.y-19.2-i;if(o.attr("class","tag-label-bkg").attr("points",`\n ${n-a/2-2},${h+2} \n ${n-a/2-2},${h-2}\n ${e.posWithOffset-a/2-4},${h-s-2}\n ${e.posWithOffset+a/2+4},${h-s-2}\n ${e.posWithOffset+a/2+4},${h+s+2}\n ${e.posWithOffset-a/2-4},${h+s+2}`),r.attr("cy",h).attr("cx",n-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===V||"BT"===V){const c=n+i;o.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${c+2}\n ${e.x},${c-2}\n ${e.x+Y},${c-s-2}\n ${e.x+Y+a+4},${c-s-2}\n ${e.x+Y+a+4},${c+s+2}\n ${e.x+Y},${c+s+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),r.attr("cx",e.x+2).attr("cy",c).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),t.attr("x",e.x+5).attr("y",c+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+n+")")}}}}),"drawCommitTags"),it=(0,c.K2)((t=>{switch(t.customType??t.type){case h.NORMAL:return"commit-normal";case h.REVERSE:return"commit-reverse";case h.HIGHLIGHT:return"commit-highlight";case h.MERGE:return"commit-merge";case h.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}}),"getCommitClassType"),ht=(0,c.K2)(((t,r,e,n)=>{const o={x:0,y:0};if(!(t.parents.length>0))return"TB"===r?30:"BT"===r?(n.get(t.id)??o).y-N:0;{const e=X(t.parents);if(e){const a=n.get(e)??o;return"TB"===r?a.y+N:"BT"===r?(n.get(t.id)??o).y-N:a.x+N}}return 0}),"calculatePosition"),dt=(0,c.K2)(((t,r,e)=>{const n="BT"===V&&e?r:r+Y,o="TB"===V||"BT"===V?n:j.get(t.branch)?.pos,a="TB"===V||"BT"===V?j.get(t.branch)?.pos:n;if(void 0===a||void 0===o)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:o,posWithOffset:n}}),"getCommitPosition"),mt=(0,c.K2)(((t,r,e)=>{if(!D)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),o=t.append("g").attr("class","commit-labels");let a="TB"===V||"BT"===V?30:0;const s=[...r.keys()],i=D?.parallelCommits??!1,h=(0,c.K2)(((t,e)=>{const n=r.get(t)?.seq,o=r.get(e)?.seq;return void 0!==n&&void 0!==o?n-o:0}),"sortKeys");let d=s.sort(h);"BT"===V&&(i&&tt(d,r,a),d=d.reverse()),d.forEach((t=>{const c=r.get(t);if(!c)throw new Error(`Commit not found for key ${t}`);i&&(a=ht(c,V,a,W));const s=dt(c,a,i);if(e){const t=it(c),r=c.customType??c.type,e=j.get(c.branch)?.index??0;at(n,c,s,t,e,r),ct(o,c,s,a),st(o,c,s,a)}"TB"===V||"BT"===V?W.set(c.id,{x:s.x,y:s.posWithOffset}):W.set(c.id,{x:s.posWithOffset,y:s.y}),a="BT"===V&&i?a+N:a+N+Y,a>U&&(U=a)}))}),"drawCommits"),$t=(0,c.K2)(((t,r,e,n,o)=>{const a=("TB"===V||"BT"===V?e.xt.branch===a),"isOnBranchToGetCurve"),i=(0,c.K2)((e=>e.seq>t.seq&&e.seqi(t)&&s(t)))}),"shouldRerouteArrow"),lt=(0,c.K2)(((t,r,e=0)=>{const n=t+Math.abs(t-r)/2;if(e>5)return n;if(F.every((t=>Math.abs(t-n)>=10)))return F.push(n),n;const o=Math.abs(t-r);return lt(t,r-o/5,e+1)}),"findLane"),gt=(0,c.K2)(((t,r,e,n)=>{const o=W.get(r.id),a=W.get(e.id);if(void 0===o||void 0===a)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=$t(r,e,o,a,n);let s,i="",d="",m=0,$=0,l=j.get(e.branch)?.index;if(e.type===h.MERGE&&r.id!==e.parents[0]&&(l=j.get(r.branch)?.index),c){i="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",m=10,$=10;const t=o.ya.x&&(i="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${d} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${i} ${a.x} ${o.y+$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):"BT"===V?(o.xa.x&&(i="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${i} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):(o.ya.y&&(s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${d} ${o.x+$} ${a.y} L ${a.x} ${a.y}`),o.y===a.y&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`));if(void 0===s)throw new Error("Line definition not found");t.append("path").attr("d",s).attr("class","arrow arrow"+l%8)}),"drawArrow"),yt=(0,c.K2)(((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach((t=>{const n=r.get(t);n.parents&&n.parents.length>0&&n.parents.forEach((t=>{gt(e,r.get(t),n,r)}))}))}),"drawArrows"),pt=(0,c.K2)(((t,r)=>{const e=t.append("g");r.forEach(((t,r)=>{const n=r%8,o=j.get(t.name)?.pos;if(void 0===o)throw new Error(`Position not found for branch ${t.name}`);const a=e.append("line");a.attr("x1",0),a.attr("y1",o),a.attr("x2",U),a.attr("y2",o),a.attr("class","branch branch"+n),"TB"===V?(a.attr("y1",30),a.attr("x1",o),a.attr("y2",U),a.attr("x2",o)):"BT"===V&&(a.attr("y1",U),a.attr("x1",o),a.attr("y2",30),a.attr("x2",o)),F.push(o);const c=t.name,s=Q(c),i=e.insert("rect"),h=e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);h.node().appendChild(s);const d=s.getBBox();i.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-d.width-4-(!0===D?.rotateCommitLabel?30:0)).attr("y",-d.height/2+8).attr("width",d.width+18).attr("height",d.height+4),h.attr("transform","translate("+(-d.width-14-(!0===D?.rotateCommitLabel?30:0))+", "+(o-d.height/2-1)+")"),"TB"===V?(i.attr("x",o-d.width/2-10).attr("y",0),h.attr("transform","translate("+(o-d.width/2-5)+", 0)")):"BT"===V?(i.attr("x",o-d.width/2-10).attr("y",U),h.attr("transform","translate("+(o-d.width/2-5)+", "+U+")")):i.attr("transform","translate(-19, "+(o-d.height/2)+")")}))}),"drawBranches"),xt=(0,c.K2)((function(t,r,e,n,o){return j.set(t,{pos:r,index:e}),r+(50+(o?40:0)+("TB"===V||"BT"===V?n.width/2:0))}),"setBranchPosition"),ft={parser:H,db:v,renderer:{draw:(0,c.K2)((function(t,r,e,n){if(J(),c.Rm.debug("in gitgraph renderer",t+"\n","id:",r,e),!D)throw new Error("GitGraph config not found");const o=D.rotateCommitLabel??!1,s=n.db;_=s.getCommits();const h=s.getBranchesAsObjArray();V=s.getDirection();const d=(0,i.Ltv)(`[id="${r}"]`);let m=0;h.forEach(((t,r)=>{const e=Q(t.name),n=d.append("g"),a=n.insert("g").attr("class","branchLabel"),c=a.insert("g").attr("class","label branch-label");c.node()?.appendChild(e);const s=e.getBBox();m=xt(t.name,m,r,s,o),c.remove(),a.remove(),n.remove()})),mt(d,_,!1),D.showBranches&&pt(d,h),yt(d,_),mt(d,_,!0),a._K.insertTitle(d,"gitTitleText",D.titleTopMargin??0,s.getDiagramTitle()),(0,c.mj)(void 0,d,D.diagramPadding,D.useMaxWidth)}),"draw")},styles:(0,c.K2)((t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((r=>`\n .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }\n .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }\n .label${r} { fill: ${t["git"+r]}; }\n .arrow${r} { stroke: ${t["git"+r]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/376-769d6d21.chunk.min.js b/js/376-769d6d21.chunk.min.js deleted file mode 100644 index e508ea0..0000000 --- a/js/376-769d6d21.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[376],{5937:(t,e,s)=>{s.d(e,{A:()=>u});var n=s(6309),r=s(1931);const u=(t,e)=>n.A.lang.round(r.A.parse(t)[e])},6151:(t,e,s)=>{s.d(e,{A:()=>u,P:()=>i});var n=s(798),r=s(4852),u=(0,n.K2)(((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)}),"getDiagramElement"),i=(0,n.K2)(((t,e,s,r)=>{t.attr("class",s);const{width:u,height:i,x:c,y:l}=a(t,e);(0,n.a$)(t,i,u,r);const h=o(c,l,u,i,e);t.attr("viewBox",h),n.Rm.debug(`viewBox configured: ${h} with padding: ${e}`)}),"setupViewPortForSVG"),a=(0,n.K2)(((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}}),"calculateDimensionsWithPadding"),o=(0,n.K2)(((t,e,s,n,r)=>`${t-r} ${e-r} ${s} ${n}`),"createViewBox")},376:(t,e,s)=>{s.d(e,{diagram:()=>Et});var n,r,u=s(6151),i=(s(6578),s(2602)),a=(s(9022),s(8496),s(8252),s(7323)),o=s(798),c=s(4852),l=s(5937),h=s(5582),d=0,p=(0,o.D7)(),A=new Map,g=[],y=new Map,f=[],k=new Map,b=new Map,E=0,D=!0,m=[],C=(0,o.K2)((t=>o.Y2.sanitizeText(t,p)),"sanitizeText"),T=(0,o.K2)((function(t){for(const e of A.values())if(e.id===t)return e.domId;return t}),"lookUpDomId"),x=(0,o.K2)((function(t,e,s,n,r,u,i={}){if(!t||0===t.trim().length)return;let a,c=A.get(t);void 0===c&&(c={id:t,labelType:"text",domId:"flowchart-"+t+"-"+d,styles:[],classes:[]},A.set(t,c)),d++,void 0!==e?(p=(0,o.D7)(),a=C(e.text.trim()),c.labelType=e.type,a.startsWith('"')&&a.endsWith('"')&&(a=a.substring(1,a.length-1)),c.text=a):void 0===c.text&&(c.text=t),void 0!==s&&(c.type=s),null!=n&&n.forEach((function(t){c.styles.push(t)})),null!=r&&r.forEach((function(t){c.classes.push(t)})),void 0!==u&&(c.dir=u),void 0===c.props?c.props=i:void 0!==i&&Object.assign(c.props,i)}),"addVertex"),F=(0,o.K2)((function(t,e,s){const n={start:t,end:e,type:void 0,text:"",labelType:"text"};o.Rm.info("abc78 Got edge...",n);const r=s.text;if(void 0!==r&&(n.text=C(r.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=r.type),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),!(g.length<(p.maxEdges??500)))throw new Error(`Edge limit exceeded. ${g.length} edges found, but the limit is ${p.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);o.Rm.info("Pushing edge..."),g.push(n)}),"addSingleLink"),S=(0,o.K2)((function(t,e,s){o.Rm.info("addLink",t,e,s);for(const n of t)for(const t of e)F(n,t,s)}),"addLink"),_=(0,o.K2)((function(t,e){t.forEach((function(t){"default"===t?g.defaultInterpolate=e:g[t].interpolate=e}))}),"updateLinkInterpolate"),B=(0,o.K2)((function(t,e){t.forEach((function(t){if("number"==typeof t&&t>=g.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${g.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?g.defaultStyle=e:(g[t].style=e,(g[t]?.style?.length??0)>0&&!g[t]?.style?.some((t=>t?.startsWith("fill")))&&g[t]?.style?.push("fill:none"))}))}),"updateLink"),v=(0,o.K2)((function(t,e){t.split(",").forEach((function(t){let s=y.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},y.set(t,s)),null!=e&&e.forEach((function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)}))}))}),"addClass"),w=(0,o.K2)((function(t){/.*/.exec(n)&&(n="LR"),/.*v/.exec(n)&&(n="TB"),"TD"===n&&(n="TB")}),"setDirection"),L=(0,o.K2)((function(t,e){for(const s of t.split(",")){const t=A.get(s);t&&t.classes.push(e);const n=k.get(s);n&&n.classes.push(e)}}),"setClass"),$=(0,o.K2)((function(t,e){if(void 0!==e){e=C(e);for(const s of t.split(","))b.set("gen-1"===r?T(s):s,e)}}),"setTooltip"),R=(0,o.K2)((function(t,e,s){const n=T(t);if("loose"!==(0,o.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof s){r=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),(0,c.Ltv)(this).classed("hover",!1)}))}),"setupToolTips");m.push(G);var W=(0,o.K2)((function(t="gen-1"){A=new Map,y=new Map,g=[],m=[G],f=[],k=new Map,E=0,b=new Map,D=!0,r=t,p=(0,o.D7)(),(0,o.IU)()}),"clear"),Y=(0,o.K2)((t=>{r=t||"gen-2"}),"setGen"),j=(0,o.K2)((function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}),"defaultStyle"),X=(0,o.K2)((function(t,e,s){let n=t.text.trim(),u=s.text;function i(t){const e={boolean:{},number:{},string:{}},s=[];let n;return{nodeList:t.filter((function(t){const r=typeof t;return t.stmt&&"dir"===t.stmt?(n=t.value,!1):""!==t.trim()&&(r in e?!e[r].hasOwnProperty(t)&&(e[r][t]=!0):!s.includes(t)&&s.push(t))})),dir:n}}t===s&&/\s/.exec(s.text)&&(n=void 0),(0,o.K2)(i,"uniq");const{nodeList:a,dir:c}=i(e.flat());if("gen-1"===r)for(let t=0;t2e3)return{result:!1,count:0};if(H[q]=e,f[e].id===t)return{result:!0,count:0};let n=0,r=1;for(;n=0){const s=Q(t,e);if(s.result)return{result:!0,count:r+s.count};r+=s.count}n+=1}return{result:!1,count:r}}),"indexNodes2"),Z=(0,o.K2)((function(t){return H[t]}),"getDepthFirstPos"),J=(0,o.K2)((function(){q=-1,f.length>0&&Q("none",f.length-1)}),"indexNodes"),tt=(0,o.K2)((function(){return f}),"getSubGraphs"),et=(0,o.K2)((()=>!!D&&(D=!1,!0)),"firstGraph"),st=(0,o.K2)((t=>{let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:s,stroke:n}}),"destructStartLink"),nt=(0,o.K2)(((t,e)=>{const s=e.length;let n=0;for(let r=0;r{const e=t.trim();let s=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,s=s.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,s=s.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,s=s.slice(1))}let r="normal",u=s.length-1;s.startsWith("=")&&(r="thick"),s.startsWith("~")&&(r="invisible");const i=nt(".",s);return i&&(r="dotted",u=i),{type:n,stroke:r,length:u}}),"destructEndLink"),ut=(0,o.K2)(((t,e)=>{const s=rt(t);let n;if(e){if(n=st(e),n.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=s.type;else{if(n.type!==s.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=s.length,n}return s}),"destructLink"),it=(0,o.K2)(((t,e)=>{for(const s of t)if(s.nodes.includes(e))return!0;return!1}),"exists"),at=(0,o.K2)(((t,e)=>{const s=[];return t.nodes.forEach(((n,r)=>{it(e,n)||s.push(t.nodes[r])})),{nodes:s}}),"makeUniq"),ot={firstGraph:et},ct=(0,o.K2)((t=>"square"===t.type?"squareRect":"round"===t.type?"roundedRect":t.type??"squareRect"),"getTypeFromVertex"),lt=(0,o.K2)(((t,e)=>t.find((t=>t.id===e))),"findNode"),ht=(0,o.K2)((t=>{let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}),"destructEdgeType"),dt=(0,o.K2)(((t,e,s,n,r,u)=>{const i=s.get(t.id),a=n.get(t.id)??!1,o=lt(e,t.id);o?(o.cssStyles=t.styles,o.cssCompiledStyles=pt(t.classes),o.cssClasses=t.classes.join(" ")):e.push({id:t.id,label:t.text,labelStyle:"",parentId:i,padding:r.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:pt(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),shape:ct(t),dir:t.dir,domId:t.domId,isGroup:a,look:u,link:t.link,linkTarget:t.linkTarget,tooltip:K(t.id)})}),"addNodeFromVertex");function pt(t){let e=[];for(const s of t){const t=y.get(s);t?.styles&&(e=[...e,...t.styles??[]].map((t=>t.trim()))),t?.textStyles&&(e=[...e,...t.textStyles??[]].map((t=>t.trim())))}return e}(0,o.K2)(pt,"getCompiledStyles");var At=(0,o.K2)((()=>{const t=(0,o.D7)(),e=[],s=[],n=tt(),r=new Map,u=new Map;for(let t=n.length-1;t>=0;t--){const e=n[t];e.nodes.length>0&&u.set(e.id,!0);for(const t of e.nodes)r.set(t,e.id)}for(let s=n.length-1;s>=0;s--){const u=n[s];e.push({id:u.id,label:u.title,labelStyle:"",parentId:r.get(u.id),padding:8,cssCompiledStyles:pt(u.classes),cssClasses:u.classes.join(" "),shape:"rect",dir:u.dir,isGroup:!0,look:t.look})}M().forEach((s=>{dt(s,e,r,u,t,t.look||"classic")}));const i=V();return i.forEach(((e,n)=>{const{arrowTypeStart:r,arrowTypeEnd:u}=ht(e.type),o=[...i.defaultStyle??[]];e.style&&o.push(...e.style);const c={id:(0,a.rY)(e.start,e.end,{counter:n,prefix:"L"}),start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke?"none":r,arrowTypeEnd:"invisible"===e?.stroke?"none":u,arrowheadStyle:"fill: #333",labelStyle:o,style:o,pattern:e.stroke,look:t.look};s.push(c)})),{nodes:e,edges:s,other:{},config:t}}),"getData"),gt={defaultConfig:(0,o.K2)((()=>o.ME.flowchart),"defaultConfig"),setAccTitle:o.SV,getAccTitle:o.iN,getAccDescription:o.m7,getData:At,setAccDescription:o.EI,addVertex:x,lookUpDomId:T,addLink:S,updateLinkInterpolate:_,updateLink:B,addClass:v,setDirection:w,setClass:L,setTooltip:$,getTooltip:K,setClickEvent:N,setLink:I,bindFunctions:P,getDirection:O,getVertices:M,getEdges:V,getClasses:U,clear:W,setGen:Y,defaultStyle:j,addSubGraph:X,getDepthFirstPos:Z,indexNodes:J,getSubGraphs:tt,destructLink:ut,lex:ot,exists:it,makeUniq:at,setDiagramTitle:o.ke,getDiagramTitle:o.ab},yt={getClasses:(0,o.K2)((function(t,e){return e.db.getClasses()}),"getClasses"),draw:(0,o.K2)((async function(t,e,s,n){o.Rm.info("REF0:"),o.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:r,flowchart:l,layout:h}=(0,o.D7)();let d;"sandbox"===r&&(d=(0,c.Ltv)("#i"+e));const p="sandbox"===r?d.nodes()[0].contentDocument:document;o.Rm.debug("Before getData: ");const A=n.db.getData();o.Rm.debug("Data: ",A);const g=(0,u.A)(e,r),y=O();A.type=n.type,A.layoutAlgorithm=(0,i.q7)(h),"dagre"===A.layoutAlgorithm&&"elk"===h&&o.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),A.direction=y,A.nodeSpacing=l?.nodeSpacing||50,A.rankSpacing=l?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=e,o.Rm.debug("REF1:",A),await(0,i.XX)(A,g);const f=A.config.flowchart?.diagramPadding??8;a._K.insertTitle(g,"flowchartTitleText",l?.titleTopMargin||0,n.db.getDiagramTitle()),(0,u.P)(g,f,"flowchart",l?.useMaxWidth||!1);for(const t of A.nodes){const s=(0,c.Ltv)(`#${e} [id="${t.id}"]`);if(!s||!t.link)continue;const n=p.createElementNS("http://www.w3.org/2000/svg","a");n.setAttributeNS("http://www.w3.org/2000/svg","class",t.cssClasses),n.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===r?n.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):t.linkTarget&&n.setAttributeNS("http://www.w3.org/2000/svg","target",t.linkTarget);const u=s.insert((function(){return n}),":first-child"),i=s.select(".label-container");i&&u.append((function(){return i.node()}));const a=s.select(".label");a&&u.append((function(){return a.node()}))}}),"draw")},ft=function(){var t=(0,o.K2)((function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s}),"o"),e=[1,4],s=[1,3],n=[1,5],r=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],u=[2,2],i=[1,13],a=[1,14],c=[1,15],l=[1,16],h=[1,23],d=[1,25],p=[1,26],A=[1,27],g=[1,49],y=[1,48],f=[1,29],k=[1,30],b=[1,31],E=[1,32],D=[1,33],m=[1,44],C=[1,46],T=[1,42],x=[1,47],F=[1,43],S=[1,50],_=[1,45],B=[1,51],v=[1,52],w=[1,34],L=[1,35],$=[1,36],R=[1,37],I=[1,57],K=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],N=[1,61],P=[1,60],O=[1,62],M=[8,9,11,73,75],V=[1,88],U=[1,93],G=[1,92],W=[1,89],Y=[1,85],j=[1,91],X=[1,87],z=[1,94],q=[1,90],H=[1,95],Q=[1,86],Z=[8,9,10,11,73,75],J=[8,9,10,11,44,73,75],tt=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],et=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],st=[42,58,86,99,102,103,106,108,111,112,113],nt=[1,121],rt=[1,120],ut=[1,128],it=[1,142],at=[1,143],ot=[1,144],ct=[1,145],lt=[1,130],ht=[1,132],dt=[1,136],pt=[1,137],At=[1,138],gt=[1,139],yt=[1,140],ft=[1,141],kt=[1,146],bt=[1,147],Et=[1,126],Dt=[1,127],mt=[1,134],Ct=[1,129],Tt=[1,133],xt=[1,131],Ft=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],St=[1,149],_t=[8,9,11],Bt=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],vt=[1,169],wt=[1,165],Lt=[1,166],$t=[1,170],Rt=[1,167],It=[1,168],Kt=[75,113,116],Nt=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],Pt=[10,103],Ot=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],Mt=[1,235],Vt=[1,233],Ut=[1,237],Gt=[1,231],Wt=[1,232],Yt=[1,234],jt=[1,236],Xt=[1,238],zt=[1,255],qt=[8,9,11,103],Ht=[8,9,10,11,58,81,102,103,106,107,108,109],Qt={trace:(0,o.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:(0,o.K2)((function(t,e,s,n,r,u,i){var a=u.length-1;switch(r){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(u[a])||u[a].length>0)&&u[a-1].push(u[a]),this.$=u[a-1];break;case 4:case 176:case 49:case 71:case 174:this.$=u[a];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(u[a-1]),this.$=u[a-1];break;case 27:this.$=u[a-1].nodes;break;case 33:this.$=n.addSubGraph(u[a-6],u[a-1],u[a-4]);break;case 34:this.$=n.addSubGraph(u[a-3],u[a-1],u[a-3]);break;case 35:this.$=n.addSubGraph(void 0,u[a-1],void 0);break;case 37:this.$=u[a].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=u[a].trim(),n.setAccDescription(this.$);break;case 43:n.addLink(u[a-2].stmt,u[a],u[a-1]),this.$={stmt:u[a],nodes:u[a].concat(u[a-2].nodes)};break;case 44:n.addLink(u[a-3].stmt,u[a-1],u[a-2]),this.$={stmt:u[a-1],nodes:u[a-1].concat(u[a-3].nodes)};break;case 45:this.$={stmt:u[a-1],nodes:u[a-1]};break;case 46:this.$={stmt:u[a],nodes:u[a]};break;case 47:case 121:case 123:this.$=[u[a]];break;case 48:this.$=u[a-4].concat(u[a]);break;case 50:this.$=u[a-2],n.setClass(u[a-2],u[a]);break;case 51:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"square");break;case 52:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"doublecircle");break;case 53:this.$=u[a-5],n.addVertex(u[a-5],u[a-2],"circle");break;case 54:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"ellipse");break;case 55:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"stadium");break;case 56:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"subroutine");break;case 57:this.$=u[a-7],n.addVertex(u[a-7],u[a-1],"rect",void 0,void 0,void 0,Object.fromEntries([[u[a-5],u[a-3]]]));break;case 58:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"cylinder");break;case 59:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"round");break;case 60:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"diamond");break;case 61:this.$=u[a-5],n.addVertex(u[a-5],u[a-2],"hexagon");break;case 62:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"odd");break;case 63:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"trapezoid");break;case 64:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"inv_trapezoid");break;case 65:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"lean_right");break;case 66:this.$=u[a-3],n.addVertex(u[a-3],u[a-1],"lean_left");break;case 67:this.$=u[a],n.addVertex(u[a]);break;case 68:u[a-1].text=u[a],this.$=u[a-1];break;case 69:case 70:u[a-2].text=u[a-1],this.$=u[a-2];break;case 72:var o=n.destructLink(u[a],u[a-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:u[a-1]};break;case 73:case 79:case 94:case 96:this.$={text:u[a],type:"text"};break;case 74:case 80:case 95:this.$={text:u[a-1].text+""+u[a],type:u[a-1].type};break;case 75:case 81:this.$={text:u[a],type:"string"};break;case 76:case 82:case 97:this.$={text:u[a],type:"markdown"};break;case 77:o=n.destructLink(u[a]),this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 78:this.$=u[a-1];break;case 98:this.$=u[a-4],n.addClass(u[a-2],u[a]);break;case 99:this.$=u[a-4],n.setClass(u[a-2],u[a]);break;case 100:case 108:this.$=u[a-1],n.setClickEvent(u[a-1],u[a]);break;case 101:case 109:this.$=u[a-3],n.setClickEvent(u[a-3],u[a-2]),n.setTooltip(u[a-3],u[a]);break;case 102:this.$=u[a-2],n.setClickEvent(u[a-2],u[a-1],u[a]);break;case 103:this.$=u[a-4],n.setClickEvent(u[a-4],u[a-3],u[a-2]),n.setTooltip(u[a-4],u[a]);break;case 104:this.$=u[a-2],n.setLink(u[a-2],u[a]);break;case 105:this.$=u[a-4],n.setLink(u[a-4],u[a-2]),n.setTooltip(u[a-4],u[a]);break;case 106:this.$=u[a-4],n.setLink(u[a-4],u[a-2],u[a]);break;case 107:this.$=u[a-6],n.setLink(u[a-6],u[a-4],u[a]),n.setTooltip(u[a-6],u[a-2]);break;case 110:this.$=u[a-1],n.setLink(u[a-1],u[a]);break;case 111:this.$=u[a-3],n.setLink(u[a-3],u[a-2]),n.setTooltip(u[a-3],u[a]);break;case 112:this.$=u[a-3],n.setLink(u[a-3],u[a-2],u[a]);break;case 113:this.$=u[a-5],n.setLink(u[a-5],u[a-4],u[a]),n.setTooltip(u[a-5],u[a-2]);break;case 114:this.$=u[a-4],n.addVertex(u[a-2],void 0,void 0,u[a]);break;case 115:this.$=u[a-4],n.updateLink([u[a-2]],u[a]);break;case 116:this.$=u[a-4],n.updateLink(u[a-2],u[a]);break;case 117:this.$=u[a-8],n.updateLinkInterpolate([u[a-6]],u[a-2]),n.updateLink([u[a-6]],u[a]);break;case 118:this.$=u[a-8],n.updateLinkInterpolate(u[a-6],u[a-2]),n.updateLink(u[a-6],u[a]);break;case 119:this.$=u[a-6],n.updateLinkInterpolate([u[a-4]],u[a]);break;case 120:this.$=u[a-6],n.updateLinkInterpolate(u[a-4],u[a]);break;case 122:case 124:u[a-2].push(u[a]),this.$=u[a-2];break;case 126:this.$=u[a-1]+u[a];break;case 175:case 177:this.$=u[a-1]+""+u[a];break;case 178:this.$={stmt:"dir",value:"TB"};break;case 179:this.$={stmt:"dir",value:"BT"};break;case 180:this.$={stmt:"dir",value:"RL"};break;case 181:this.$={stmt:"dir",value:"LR"}}}),"anonymous"),table:[{3:1,4:2,9:e,10:s,12:n},{1:[3]},t(r,u,{5:6}),{4:7,9:e,10:s,12:n},{4:8,9:e,10:s,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:i,9:a,10:c,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:h,33:24,34:d,36:p,38:A,40:28,41:38,42:g,43:39,45:40,58:y,81:f,82:k,83:b,84:E,85:D,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v,118:w,119:L,120:$,121:R},t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),{8:[1,54],9:[1,55],10:I,15:53,18:56},t(K,[2,3]),t(K,[2,4]),t(K,[2,5]),t(K,[2,6]),t(K,[2,7]),t(K,[2,8]),{8:N,9:P,11:O,21:58,39:59,70:63,73:[1,64],75:[1,65]},{8:N,9:P,11:O,21:66},{8:N,9:P,11:O,21:67},{8:N,9:P,11:O,21:68},{8:N,9:P,11:O,21:69},{8:N,9:P,11:O,21:70},{8:N,9:P,10:[1,71],11:O,21:72},t(K,[2,36]),{35:[1,73]},{37:[1,74]},t(K,[2,39]),t(M,[2,46],{18:75,10:I}),{10:[1,76]},{10:[1,77]},{10:[1,78]},{10:[1,79]},{14:V,42:U,58:G,77:[1,83],86:W,92:[1,80],94:[1,81],98:82,102:Y,103:j,106:X,108:z,111:q,112:H,113:Q,117:84},t(K,[2,178]),t(K,[2,179]),t(K,[2,180]),t(K,[2,181]),t(Z,[2,47]),t(Z,[2,49],{44:[1,96]}),t(J,[2,67],{110:109,29:[1,97],42:g,46:[1,98],48:[1,99],50:[1,100],52:[1,101],54:[1,102],56:[1,103],58:y,61:[1,104],63:[1,105],65:[1,106],66:[1,107],68:[1,108],86:m,99:C,102:T,103:x,106:F,108:S,111:_,112:B,113:v}),t(tt,[2,174]),t(tt,[2,135]),t(tt,[2,136]),t(tt,[2,137]),t(tt,[2,138]),t(tt,[2,139]),t(tt,[2,140]),t(tt,[2,141]),t(tt,[2,142]),t(tt,[2,143]),t(tt,[2,144]),t(tt,[2,145]),t(r,[2,12]),t(r,[2,18]),t(r,[2,19]),{9:[1,110]},t(et,[2,26],{18:111,10:I}),t(K,[2,27]),{40:112,41:38,42:g,43:39,45:40,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v},t(K,[2,40]),t(K,[2,41]),t(K,[2,42]),t(st,[2,71],{71:113,60:[1,115],72:[1,114]}),{74:116,76:117,77:[1,118],78:[1,119],113:nt,116:rt},t([42,58,60,72,86,99,102,103,106,108,111,112,113],[2,77]),t(K,[2,28]),t(K,[2,29]),t(K,[2,30]),t(K,[2,31]),t(K,[2,32]),{10:ut,12:it,14:at,27:ot,28:122,32:ct,42:lt,58:ht,73:dt,77:[1,124],78:[1,125],80:135,81:pt,82:At,83:gt,84:yt,85:ft,86:kt,87:bt,88:123,102:Et,106:Dt,108:mt,111:Ct,112:Tt,113:xt},t(Ft,u,{5:148}),t(K,[2,37]),t(K,[2,38]),t(M,[2,45],{42:St}),{42:g,45:150,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v},{99:[1,151],100:152,102:[1,153]},{42:g,45:154,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v},{42:g,45:155,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v},t(_t,[2,100],{10:[1,156],93:[1,157]}),{77:[1,158]},t(_t,[2,108],{117:160,10:[1,159],14:V,42:U,58:G,86:W,102:Y,103:j,106:X,108:z,111:q,112:H,113:Q}),t(_t,[2,110],{10:[1,161]}),t(Bt,[2,176]),t(Bt,[2,163]),t(Bt,[2,164]),t(Bt,[2,165]),t(Bt,[2,166]),t(Bt,[2,167]),t(Bt,[2,168]),t(Bt,[2,169]),t(Bt,[2,170]),t(Bt,[2,171]),t(Bt,[2,172]),t(Bt,[2,173]),{42:g,45:162,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v},{30:163,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:171,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:173,48:[1,172],65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:174,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:175,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:176,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{106:[1,177]},{30:178,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:179,63:[1,180],65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:181,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:182,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{30:183,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},t(tt,[2,175]),t(r,[2,20]),t(et,[2,25]),t(M,[2,43],{18:184,10:I}),t(st,[2,68],{10:[1,185]}),{10:[1,186]},{30:187,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{75:[1,188],76:189,113:nt,116:rt},t(Kt,[2,73]),t(Kt,[2,75]),t(Kt,[2,76]),t(Kt,[2,161]),t(Kt,[2,162]),{8:N,9:P,10:ut,11:O,12:it,14:at,21:191,27:ot,29:[1,190],32:ct,42:lt,58:ht,73:dt,80:135,81:pt,82:At,83:gt,84:yt,85:ft,86:kt,87:bt,88:192,102:Et,106:Dt,108:mt,111:Ct,112:Tt,113:xt},t(Nt,[2,94]),t(Nt,[2,96]),t(Nt,[2,97]),t(Nt,[2,150]),t(Nt,[2,151]),t(Nt,[2,152]),t(Nt,[2,153]),t(Nt,[2,154]),t(Nt,[2,155]),t(Nt,[2,156]),t(Nt,[2,157]),t(Nt,[2,158]),t(Nt,[2,159]),t(Nt,[2,160]),t(Nt,[2,83]),t(Nt,[2,84]),t(Nt,[2,85]),t(Nt,[2,86]),t(Nt,[2,87]),t(Nt,[2,88]),t(Nt,[2,89]),t(Nt,[2,90]),t(Nt,[2,91]),t(Nt,[2,92]),t(Nt,[2,93]),{6:11,7:12,8:i,9:a,10:c,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,193],33:24,34:d,36:p,38:A,40:28,41:38,42:g,43:39,45:40,58:y,81:f,82:k,83:b,84:E,85:D,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v,118:w,119:L,120:$,121:R},{10:I,18:194},{10:[1,195],42:g,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:109,111:_,112:B,113:v},{10:[1,196]},{10:[1,197],103:[1,198]},t(Pt,[2,121]),{10:[1,199],42:g,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:109,111:_,112:B,113:v},{10:[1,200],42:g,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:109,111:_,112:B,113:v},{77:[1,201]},t(_t,[2,102],{10:[1,202]}),t(_t,[2,104],{10:[1,203]}),{77:[1,204]},t(Bt,[2,177]),{77:[1,205],95:[1,206]},t(Z,[2,50],{110:109,42:g,58:y,86:m,99:C,102:T,103:x,106:F,108:S,111:_,112:B,113:v}),{31:[1,207],65:vt,79:208,113:$t,114:Rt,115:It},t(Ot,[2,79]),t(Ot,[2,81]),t(Ot,[2,82]),t(Ot,[2,146]),t(Ot,[2,147]),t(Ot,[2,148]),t(Ot,[2,149]),{47:[1,209],65:vt,79:208,113:$t,114:Rt,115:It},{30:210,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{49:[1,211],65:vt,79:208,113:$t,114:Rt,115:It},{51:[1,212],65:vt,79:208,113:$t,114:Rt,115:It},{53:[1,213],65:vt,79:208,113:$t,114:Rt,115:It},{55:[1,214],65:vt,79:208,113:$t,114:Rt,115:It},{58:[1,215]},{62:[1,216],65:vt,79:208,113:$t,114:Rt,115:It},{64:[1,217],65:vt,79:208,113:$t,114:Rt,115:It},{30:218,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},{31:[1,219],65:vt,79:208,113:$t,114:Rt,115:It},{65:vt,67:[1,220],69:[1,221],79:208,113:$t,114:Rt,115:It},{65:vt,67:[1,223],69:[1,222],79:208,113:$t,114:Rt,115:It},t(M,[2,44],{42:St}),t(st,[2,70]),t(st,[2,69]),{60:[1,224],65:vt,79:208,113:$t,114:Rt,115:It},t(st,[2,72]),t(Kt,[2,74]),{30:225,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},t(Ft,u,{5:226}),t(Nt,[2,95]),t(K,[2,35]),{41:227,42:g,43:39,45:40,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v},{10:Mt,58:Vt,81:Ut,89:228,102:Gt,104:229,105:230,106:Wt,107:Yt,108:jt,109:Xt},{10:Mt,58:Vt,81:Ut,89:239,101:[1,240],102:Gt,104:229,105:230,106:Wt,107:Yt,108:jt,109:Xt},{10:Mt,58:Vt,81:Ut,89:241,101:[1,242],102:Gt,104:229,105:230,106:Wt,107:Yt,108:jt,109:Xt},{102:[1,243]},{10:Mt,58:Vt,81:Ut,89:244,102:Gt,104:229,105:230,106:Wt,107:Yt,108:jt,109:Xt},{42:g,45:245,58:y,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v},t(_t,[2,101]),{77:[1,246]},{77:[1,247],95:[1,248]},t(_t,[2,109]),t(_t,[2,111],{10:[1,249]}),t(_t,[2,112]),t(J,[2,51]),t(Ot,[2,80]),t(J,[2,52]),{49:[1,250],65:vt,79:208,113:$t,114:Rt,115:It},t(J,[2,59]),t(J,[2,54]),t(J,[2,55]),t(J,[2,56]),{106:[1,251]},t(J,[2,58]),t(J,[2,60]),{64:[1,252],65:vt,79:208,113:$t,114:Rt,115:It},t(J,[2,62]),t(J,[2,63]),t(J,[2,65]),t(J,[2,64]),t(J,[2,66]),t([10,42,58,86,99,102,103,106,108,111,112,113],[2,78]),{31:[1,253],65:vt,79:208,113:$t,114:Rt,115:It},{6:11,7:12,8:i,9:a,10:c,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,254],33:24,34:d,36:p,38:A,40:28,41:38,42:g,43:39,45:40,58:y,81:f,82:k,83:b,84:E,85:D,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v,118:w,119:L,120:$,121:R},t(Z,[2,48]),t(_t,[2,114],{103:zt}),t(qt,[2,123],{105:256,10:Mt,58:Vt,81:Ut,102:Gt,106:Wt,107:Yt,108:jt,109:Xt}),t(Ht,[2,125]),t(Ht,[2,127]),t(Ht,[2,128]),t(Ht,[2,129]),t(Ht,[2,130]),t(Ht,[2,131]),t(Ht,[2,132]),t(Ht,[2,133]),t(Ht,[2,134]),t(_t,[2,115],{103:zt}),{10:[1,257]},t(_t,[2,116],{103:zt}),{10:[1,258]},t(Pt,[2,122]),t(_t,[2,98],{103:zt}),t(_t,[2,99],{110:109,42:g,58:y,86:m,99:C,102:T,103:x,106:F,108:S,111:_,112:B,113:v}),t(_t,[2,103]),t(_t,[2,105],{10:[1,259]}),t(_t,[2,106]),{95:[1,260]},{49:[1,261]},{60:[1,262]},{64:[1,263]},{8:N,9:P,11:O,21:264},t(K,[2,34]),{10:Mt,58:Vt,81:Ut,102:Gt,104:265,105:230,106:Wt,107:Yt,108:jt,109:Xt},t(Ht,[2,126]),{14:V,42:U,58:G,86:W,98:266,102:Y,103:j,106:X,108:z,111:q,112:H,113:Q,117:84},{14:V,42:U,58:G,86:W,98:267,102:Y,103:j,106:X,108:z,111:q,112:H,113:Q,117:84},{95:[1,268]},t(_t,[2,113]),t(J,[2,53]),{30:269,65:vt,77:wt,78:Lt,79:164,113:$t,114:Rt,115:It},t(J,[2,61]),t(Ft,u,{5:270}),t(qt,[2,124],{105:256,10:Mt,58:Vt,81:Ut,102:Gt,106:Wt,107:Yt,108:jt,109:Xt}),t(_t,[2,119],{117:160,10:[1,271],14:V,42:U,58:G,86:W,102:Y,103:j,106:X,108:z,111:q,112:H,113:Q}),t(_t,[2,120],{117:160,10:[1,272],14:V,42:U,58:G,86:W,102:Y,103:j,106:X,108:z,111:q,112:H,113:Q}),t(_t,[2,107]),{31:[1,273],65:vt,79:208,113:$t,114:Rt,115:It},{6:11,7:12,8:i,9:a,10:c,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:h,32:[1,274],33:24,34:d,36:p,38:A,40:28,41:38,42:g,43:39,45:40,58:y,81:f,82:k,83:b,84:E,85:D,86:m,99:C,102:T,103:x,106:F,108:S,110:41,111:_,112:B,113:v,118:w,119:L,120:$,121:R},{10:Mt,58:Vt,81:Ut,89:275,102:Gt,104:229,105:230,106:Wt,107:Yt,108:jt,109:Xt},{10:Mt,58:Vt,81:Ut,89:276,102:Gt,104:229,105:230,106:Wt,107:Yt,108:jt,109:Xt},t(J,[2,57]),t(K,[2,33]),t(_t,[2,117],{103:zt}),t(_t,[2,118],{103:zt})],defaultActions:{},parseError:(0,o.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,o.K2)((function(t){var e=this,s=[0],n=[],r=[null],u=[],i=this.table,a="",c=0,l=0,h=0,d=u.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(A.yy[g]=this.yy[g]);p.setInput(t,A.yy),A.yy.lexer=p,A.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var y=p.yylloc;u.push(y);var f=p.options&&p.options.ranges;function k(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(t){s.length=s.length-2*t,r.length=r.length-t,u.length=u.length-t}),"popStack"),(0,o.K2)(k,"lex");for(var b,E,D,m,C,T,x,F,S,_={};;){if(D=s[s.length-1],this.defaultActions[D]?m=this.defaultActions[D]:(null==b&&(b=k()),m=i[D]&&i[D][b]),void 0===m||!m.length||!m[0]){var B;for(T in S=[],i[D])this.terminals_[T]&&T>2&&S.push("'"+this.terminals_[T]+"'");B=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(B,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:y,expected:S})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+D+", token: "+b);switch(m[0]){case 1:s.push(b),r.push(p.yytext),u.push(p.yylloc),s.push(m[1]),b=null,E?(b=E,E=null):(l=p.yyleng,a=p.yytext,c=p.yylineno,y=p.yylloc,h>0&&h--);break;case 2:if(x=this.productions_[m[1]][1],_.$=r[r.length-x],_._$={first_line:u[u.length-(x||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(x||1)].first_column,last_column:u[u.length-1].last_column},f&&(_._$.range=[u[u.length-(x||1)].range[0],u[u.length-1].range[1]]),void 0!==(C=this.performAction.apply(_,[a,l,c,A.yy,m[1],r,u].concat(d))))return C;x&&(s=s.slice(0,-1*x*2),r=r.slice(0,-1*x),u=u.slice(0,-1*x)),s.push(this.productions_[m[1]][0]),r.push(_.$),u.push(_._$),F=i[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0}),"parse")},Zt=function(){return{EOF:1,parseError:(0,o.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,o.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,o.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,o.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,o.K2)((function(){return this._more=!0,this}),"more"),reject:(0,o.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,o.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,o.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,o.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,o.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,o.K2)((function(t,e){var s,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var u in r)this[u]=r[u];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),u=0;ue[0].length)){if(e=s,n=u,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[u])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,o.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,o.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,o.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,o.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,o.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,o.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,o.K2)((function(t,e,s,n){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 8:case 11:case 14:case 17:case 27:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:this.begin("callbackname");break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 92;case 12:return 93;case 13:return"MD_STR";case 15:this.begin("md_string");break;case 16:return"STR";case 18:this.pushState("string");break;case 19:return 81;case 20:return 99;case 21:return 82;case 22:return 101;case 23:return 83;case 24:return 84;case 25:return 94;case 26:this.begin("click");break;case 28:return 85;case 29:case 30:case 31:return t.lex.firstGraph()&&this.begin("dir"),12;case 32:return 27;case 33:return 32;case 34:case 35:case 36:case 37:return 95;case 38:return this.popState(),13;case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:return this.popState(),14;case 49:return 118;case 50:return 119;case 51:return 120;case 52:return 121;case 53:return 102;case 54:case 95:return 108;case 55:return 44;case 56:return 58;case 57:case 96:return 42;case 58:return 8;case 59:return 103;case 60:case 94:return 112;case 61:case 64:case 67:return this.popState(),75;case 62:return this.pushState("edgeText"),73;case 63:case 66:case 69:return 116;case 65:return this.pushState("thickEdgeText"),73;case 68:return this.pushState("dottedEdgeText"),73;case 70:return 75;case 71:return this.popState(),51;case 72:case 108:return"TEXT";case 73:return this.pushState("ellipseText"),50;case 74:return this.popState(),53;case 75:return this.pushState("text"),52;case 76:return this.popState(),55;case 77:return this.pushState("text"),54;case 78:return 56;case 79:return this.pushState("text"),65;case 80:return this.popState(),62;case 81:return this.pushState("text"),61;case 82:return this.popState(),47;case 83:return this.pushState("text"),46;case 84:return this.popState(),67;case 85:return this.popState(),69;case 86:return 114;case 87:return this.pushState("trapText"),66;case 88:return this.pushState("trapText"),68;case 89:return 115;case 90:return 65;case 91:return 87;case 92:return"SEP";case 93:return 86;case 97:return 106;case 98:return 111;case 99:return 113;case 100:return this.popState(),60;case 101:return this.pushState("text"),60;case 102:return this.popState(),49;case 103:return this.pushState("text"),48;case 104:return this.popState(),31;case 105:return this.pushState("text"),29;case 106:return this.popState(),64;case 107:return this.pushState("text"),63;case 109:return"QUOTE";case 110:return 9;case 111:return 10;case 112:return 11}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{callbackargs:{rules:[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},callbackname:{rules:[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},href:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},click:{rules:[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dottedEdgeText:{rules:[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},thickEdgeText:{rules:[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},edgeText:{rules:[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},trapText:{rules:[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],inclusive:!1},ellipseText:{rules:[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},text:{rules:[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],inclusive:!1},vertex:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dir:{rules:[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr_multiline:{rules:[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr:{rules:[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_title:{rules:[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},md_string:{rules:[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},string:{rules:[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},INITIAL:{rules:[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],inclusive:!0}}}}();function Jt(){this.yy={}}return Qt.lexer=Zt,(0,o.K2)(Jt,"Parser"),Jt.prototype=Qt,Qt.Parser=Jt,new Jt}();ft.parser=ft;var kt=ft,bt=(0,o.K2)(((t,e)=>{const s=l.A,n=s(t,"r"),r=s(t,"g"),u=s(t,"b");return h.A(n,r,u,e)}),"fade"),Et={parser:kt,db:gt,renderer:yt,styles:(0,o.K2)((t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${bt(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles"),init:(0,o.K2)((t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,o.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,o.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),gt.clear(),gt.setGen("gen-2")}),"init")}}}]); \ No newline at end of file diff --git a/js/382-2d69f8f9.chunk.min.js b/js/382-2d69f8f9.chunk.min.js new file mode 100644 index 0000000..14744f7 --- /dev/null +++ b/js/382-2d69f8f9.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[382],{8448:(t,e,a)=>{a.d(e,{m:()=>s});var r=a(32),s=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},4323:(t,e,a)=>{a.d(e,{CP:()=>l,HT:()=>h,PB:()=>d,aC:()=>c,lC:()=>n,m:()=>o,tk:()=>i});var r=a(32),s=a(6750),i=(0,r.K2)(((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a}),"drawRect"),n=(0,r.K2)(((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};i(t,a).lower()}),"drawBackgroundRect"),o=(0,r.K2)(((t,e)=>{const a=e.text.replace(r.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const i=s.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),s}),"drawText"),c=(0,r.K2)(((t,e,a,r)=>{const i=t.append("image");i.attr("x",e),i.attr("y",a);const n=(0,s.J)(r);i.attr("xlink:href",n)}),"drawImage"),l=(0,r.K2)(((t,e,a,r)=>{const i=t.append("use");i.attr("x",e),i.attr("y",a);const n=(0,s.J)(r);i.attr("xlink:href",`#${n}`)}),"drawEmbeddedImage"),d=(0,r.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),h=(0,r.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")},1:(t,e,a)=>{a.d(e,{diagram:()=>Ut});var r=a(4323),s=a(8448),i=a(5522),n=a(32),o=a(4852),c=a(6750),l=function(){var t=(0,n.K2)((function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a}),"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],o=[1,11],c=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],f=[1,31],E=[1,32],w=[1,33],I=[1,34],L=[1,35],_=[1,36],P=[1,37],k=[1,38],A=[1,39],v=[1,41],N=[1,42],M=[1,43],D=[1,44],O=[1,45],S=[1,46],K=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],R=[4,5,16,50,52,53],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],C=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],V=[68,69,70],F=[1,122],W={trace:(0,n.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:(0,n.K2)((function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=r.PLACEMENT.LEFTOF;break;case 64:this.$=r.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=r.LINETYPE.SOLID_OPEN;break;case 70:this.$=r.LINETYPE.DOTTED_OPEN;break;case 71:this.$=r.LINETYPE.SOLID;break;case 72:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=r.LINETYPE.DOTTED;break;case 74:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=r.LINETYPE.SOLID_CROSS;break;case 76:this.$=r.LINETYPE.DOTTED_CROSS;break;case 77:this.$=r.LINETYPE.SOLID_POINT;break;case 78:this.$=r.LINETYPE.DOTTED_POINT;break;case 79:this.$=r.parseMessage(i[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:o,8:8,9:10,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},t(K,[2,5]),{9:47,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},t(K,[2,7]),t(K,[2,8]),t(K,[2,14]),{12:48,50:P,52:k,53:A},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(K,[2,29]),t(K,[2,30]),{32:[1,61]},{34:[1,62]},t(K,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(K,[2,6]),t(K,[2,15]),t(R,[2,9],{10:93}),t(K,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(K,[2,21]),{5:[1,97]},{5:[1,98]},t(K,[2,24]),t(K,[2,25]),t(K,[2,26]),t(K,[2,27]),t(K,[2,28]),t(K,[2,31]),t(K,[2,32]),t(Y,s,{7:99}),t(Y,s,{7:100}),t(Y,s,{7:101}),t(C,s,{40:102,7:103}),t(B,s,{42:104,7:105}),t(B,s,{7:105,42:106}),t($,s,{45:107,7:108}),t(Y,s,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(V,[2,69]),t(V,[2,70]),t(V,[2,71]),t(V,[2,72]),t(V,[2,73]),t(V,[2,74]),t(V,[2,75]),t(V,[2,76]),t(V,[2,77]),t(V,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:F},{56:123,81:F},{56:124,81:F},{56:125,81:F},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:P,52:k,53:A},{5:[1,131]},t(K,[2,19]),t(K,[2,20]),t(K,[2,22]),t(K,[2,23]),{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,132],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,133],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,134],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,135]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,49:[1,136],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,137]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,48:[1,138],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,47:[1,141],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,142],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{15:[1,143]},t(K,[2,49]),{15:[1,144]},t(K,[2,51]),t(K,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:F},{56:148,81:F},{56:149,81:F},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(K,[2,16]),t(R,[2,10]),{12:151,50:P,52:k,53:A},t(R,[2,12]),t(R,[2,13]),t(K,[2,18]),t(K,[2,34]),t(K,[2,35]),t(K,[2,36]),t(K,[2,37]),{15:[1,152]},t(K,[2,38]),{15:[1,153]},t(K,[2,39]),t(K,[2,40]),{15:[1,154]},t(K,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:F},{56:158,81:F},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(R,[2,11]),t(C,s,{7:103,40:160}),t(B,s,{7:105,42:161}),t($,s,{7:108,45:162}),t(K,[2,48]),t(K,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:(0,n.K2)((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:(0,n.K2)((function(t){var e=this,a=[0],r=[],s=[null],i=[],o=this.table,c="",l=0,d=0,h=0,p=i.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;i.push(y);var m=g.options&&g.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)((function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t}),"popStack"),(0,n.K2)(b,"lex");for(var T,f,E,w,I,L,_,P,k,A={};;){if(E=a[a.length-1],this.defaultActions[E]?w=this.defaultActions[E]:(null==T&&(T=b()),w=o[E]&&o[E][T]),void 0===w||!w.length||!w[0]){var v;for(L in k=[],o[E])this.terminals_[L]&&L>2&&k.push("'"+this.terminals_[L]+"'");v=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==T?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(v,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:y,expected:k})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+T);switch(w[0]){case 1:a.push(T),s.push(g.yytext),i.push(g.yylloc),a.push(w[1]),T=null,f?(T=f,f=null):(d=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc,h>0&&h--);break;case 2:if(_=this.productions_[w[1]][1],A.$=s[s.length-_],A._$={first_line:i[i.length-(_||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_||1)].first_column,last_column:i[i.length-1].last_column},m&&(A._$.range=[i[i.length-(_||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(A,[c,d,l,u.yy,w[1],s,i].concat(p))))return I;_&&(a=a.slice(0,-1*_*2),s=s.slice(0,-1*_),i=i.slice(0,-1*_)),a.push(this.productions_[w[1]][0]),s.push(A.$),i.push(A._$),P=o[a[a.length-2]][a[a.length-1]],a.push(P);break;case 3:return!0}}return!0}),"parse")},q=function(){return{EOF:1,parseError:(0,n.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,n.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,n.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,n.K2)((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,n.K2)((function(){return this._more=!0,this}),"more"),reject:(0,n.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,n.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,n.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,n.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,n.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,n.K2)((function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1}),"test_match"),next:(0,n.K2)((function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,n.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,n.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,n.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,n.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,n.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,n.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,n.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)((function(t,e,a,r){switch(a){case 0:case 51:case 66:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 67:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}}}();function z(){this.yy={}}return W.lexer=q,(0,n.K2)(z,"Parser"),z.prototype=W,W.Parser=z,new z}();l.parser=l;var d=l,h=new s.m((()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}))),p=(0,n.K2)((function(t){h.records.boxes.push({name:t.text,wrap:t.wrap??M(),fill:t.color,actorKeys:[]}),h.records.currentBox=h.records.boxes.slice(-1)[0]}),"addBox"),g=(0,n.K2)((function(t,e,a,r){let s=h.records.currentBox;const i=h.records.actors.get(t);if(i){if(h.records.currentBox&&i.box&&h.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${h.records.currentBox.name}' at the same time.`);if(s=i.box?i.box:h.records.currentBox,i.box=s,i&&e===i.name&&null==a)return}if(null==a?.text&&(a={text:e,type:r}),null!=r&&null!=a.text||(a={text:e,type:r}),h.records.actors.set(t,{box:s,name:e,description:a.text,wrap:a.wrap??M(),prevActor:h.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),h.records.prevActor){const e=h.records.actors.get(h.records.prevActor);e&&(e.nextActor=t)}h.records.currentBox&&h.records.currentBox.actorKeys.push(t),h.records.prevActor=t}),"addActor"),u=(0,n.K2)((t=>{let e,a=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return h.records.messages.push({from:t,to:e,message:a?.text??"",wrap:a?.wrap??M(),type:r,activate:s}),!0}),"addSignal"),m=(0,n.K2)((function(){return h.records.boxes.length>0}),"hasAtLeastOneBox"),b=(0,n.K2)((function(){return h.records.boxes.some((t=>t.name))}),"hasAtLeastOneBoxWithTitle"),T=(0,n.K2)((function(){return h.records.messages}),"getMessages"),f=(0,n.K2)((function(){return h.records.boxes}),"getBoxes"),E=(0,n.K2)((function(){return h.records.actors}),"getActors"),w=(0,n.K2)((function(){return h.records.createdActors}),"getCreatedActors"),I=(0,n.K2)((function(){return h.records.destroyedActors}),"getDestroyedActors"),L=(0,n.K2)((function(t){return h.records.actors.get(t)}),"getActor"),_=(0,n.K2)((function(){return[...h.records.actors.keys()]}),"getActorKeys"),P=(0,n.K2)((function(){h.records.sequenceNumbersEnabled=!0}),"enableSequenceNumbers"),k=(0,n.K2)((function(){h.records.sequenceNumbersEnabled=!1}),"disableSequenceNumbers"),A=(0,n.K2)((()=>h.records.sequenceNumbersEnabled),"showSequenceNumbers"),v=(0,n.K2)((function(t){h.records.wrapEnabled=t}),"setWrap"),N=(0,n.K2)((t=>{if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}),"extractWrap"),M=(0,n.K2)((()=>void 0!==h.records.wrapEnabled?h.records.wrapEnabled:(0,n.D7)().sequence?.wrap??!1),"autoWrap"),D=(0,n.K2)((function(){h.reset(),(0,n.IU)()}),"clear"),O=(0,n.K2)((function(t){const e=t.trim(),{wrap:a,cleanedText:r}=N(e),s={text:r,wrap:a};return n.Rm.debug(`parseMessage: ${JSON.stringify(s)}`),s}),"parseMessage"),S=(0,n.K2)((function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}const{wrap:s,cleanedText:i}=N(r);return{text:i?(0,n.jZ)(i,(0,n.D7)()):void 0,color:a,wrap:s}}),"parseBoxData"),K={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},R=(0,n.K2)((function(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:a.wrap??M()},s=[].concat(t,t);h.records.notes.push(r),h.records.messages.push({from:s[0],to:s[1],message:a.text,wrap:a.wrap??M(),type:K.NOTE,placement:e})}),"addNote"),Y=(0,n.K2)((function(t,e){const a=L(t);try{let t=(0,n.jZ)(e.text,(0,n.D7)());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"="),B(a,JSON.parse(t))}catch(t){n.Rm.error("error while parsing actor link text",t)}}),"addLinks"),C=(0,n.K2)((function(t,e){const a=L(t);try{const t={};let r=(0,n.jZ)(e.text,(0,n.D7)());const s=r.indexOf("@");r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const i=r.slice(0,s-1).trim(),o=r.slice(s+1).trim();t[i]=o,B(a,t)}catch(t){n.Rm.error("error while parsing actor link text",t)}}),"addALink");function B(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}(0,n.K2)(B,"insertLinks");var $=(0,n.K2)((function(t,e){const a=L(t);try{const t=(0,n.jZ)(e.text,(0,n.D7)());V(a,JSON.parse(t))}catch(t){n.Rm.error("error while parsing actor properties text",t)}}),"addProperties");function V(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}function F(){h.records.currentBox=void 0}(0,n.K2)(V,"insertProperties"),(0,n.K2)(F,"boxEnd");var W=(0,n.K2)((function(t,e){const a=L(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&V(a,e.properties),e.links&&B(a,e.links)}catch(t){n.Rm.error("error while parsing actor details text",t)}}),"addDetails"),q=(0,n.K2)((function(t,e){if(void 0!==t?.properties)return t.properties[e]}),"getActorProperty"),z=(0,n.K2)((function(t){if(Array.isArray(t))t.forEach((function(t){z(t)}));else switch(t.type){case"sequenceIndex":h.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":g(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(h.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");h.records.lastCreated=t.actor,g(t.actor,t.actor,t.description,t.draw),h.records.createdActors.set(t.actor,h.records.messages.length);break;case"destroyParticipant":h.records.lastDestroyed=t.actor,h.records.destroyedActors.set(t.actor,h.records.messages.length);break;case"activeStart":case"activeEnd":y(t.actor,void 0,void 0,t.signalType);break;case"addNote":R(t.actor,t.placement,t.text);break;case"addLinks":Y(t.actor,t.text);break;case"addALink":C(t.actor,t.text);break;case"addProperties":$(t.actor,t.text);break;case"addDetails":W(t.actor,t.text);break;case"addMessage":if(h.records.lastCreated){if(t.to!==h.records.lastCreated)throw new Error("The created participant "+h.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");h.records.lastCreated=void 0}else if(h.records.lastDestroyed){if(t.to!==h.records.lastDestroyed&&t.from!==h.records.lastDestroyed)throw new Error("The destroyed participant "+h.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");h.records.lastDestroyed=void 0}y(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":p(t.boxData);break;case"boxEnd":F();break;case"loopStart":y(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":y(void 0,void 0,void 0,t.signalType);break;case"rectStart":y(void 0,void 0,t.color,t.signalType);break;case"optStart":y(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":y(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,n.SV)(t.text);break;case"parStart":case"and":y(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":y(void 0,void 0,t.criticalText,t.signalType);break;case"option":y(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":y(void 0,void 0,t.breakText,t.signalType)}}),"apply"),H={addActor:g,addMessage:x,addSignal:y,addLinks:Y,addDetails:W,addProperties:$,autoWrap:M,setWrap:v,enableSequenceNumbers:P,disableSequenceNumbers:k,showSequenceNumbers:A,getMessages:T,getActors:E,getCreatedActors:w,getDestroyedActors:I,getActor:L,getActorKeys:_,getActorProperty:q,getAccTitle:n.iN,getBoxes:f,getDiagramTitle:n.ab,setDiagramTitle:n.ke,getConfig:(0,n.K2)((()=>(0,n.D7)().sequence),"getConfig"),clear:D,parseMessage:O,parseBoxData:S,LINETYPE:K,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:R,setAccTitle:n.SV,apply:z,setAccDescription:n.EI,getAccDescription:n.m7,hasAtLeastOneBox:m,hasAtLeastOneBoxWithTitle:b},j=(0,n.K2)((t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`),"getStyles"),U="actor-top",J="actor-bottom",X="actor-man",G=(0,n.K2)((function(t,e){return(0,r.tk)(t,e)}),"drawRect"),Z=(0,n.K2)((function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var l="none";s&&(l="block !important");const d=t.append("g");d.attr("id","actor"+n+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",l);var h="";void 0!==o.class&&(h=" "+o.class);let p=o.width>a?o.width:a;const g=d.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",p),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=d.append("a"),y=(0,c.J)(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),It(r)(t,x,o.x+10,o.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:o.height+u,width:p}}),"drawPopup"),Q=(0,n.K2)((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),tt=(0,n.K2)((async function(t,e,a=null){let r=t.append("foreignObject");const s=await(0,n.VJ)(e.text,(0,n.zj)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){const e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]}),"drawKatex"),et=(0,n.K2)((function(t,e){let a=0,r=0;const s=e.text.split(n.Y2.lineBreakRegex),[o,c]=(0,i.I5)(e.fontSize);let l=[],d=0,h=(0,n.K2)((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":h=(0,n.K2)((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":h=(0,n.K2)((()=>Math.round(e.y+(a+r+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":h=(0,n.K2)((()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin)),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[n,p]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==o&&(d=n*o);const s=t.append("text");s.attr("x",e.x),s.attr("y",h()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==c&&s.style("font-size",c),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==d&&s.attr("dy",d);const g=p||i.pe;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else s.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),l.push(s)}return l}),"drawText"),at=(0,n.K2)((function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,n.K2)(a,"genPoints");const r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,et(t,e),r}),"drawLabel"),rt=-1,st=(0,n.K2)(((t,e,a,r)=>{t.select&&a.forEach((a=>{const s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)}))}),"fixLifeLineHeights"),it=(0,n.K2)((function(t,e,a,s){const i=s?e.stopy:e.starty,o=e.x+e.width/2,c=i+e.height,l=t.append("g").lower();var d=l;s||(rt++,Object.keys(e.links||{}).length&&!a.forceMenus&&d.attr("onclick",Q(`actor${rt}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+rt).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),d=l.append("g"),e.actorCnt=rt,null!=e.links&&d.attr("id","root-"+rt));const h=(0,r.PB)();var p="actor";e.properties?.class?p=e.properties.class:h.fill="#eaeaea",p+=s?` ${J}`:` ${U}`,h.x=e.x,h.y=i,h.width=e.width,h.height=e.height,h.class=p,h.rx=3,h.ry=3,h.name=e.name;const g=G(d,h);if(e.rectData=h,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,r.CP)(d,h.x+h.width-20,h.y+10,t.substr(1)):(0,r.aC)(d,h.x+h.width-20,h.y+10,t)}wt(a,(0,n.Wi)(e.description))(e.description,d,h.x,h.y,h.width,h.height,{class:"actor actor-box"},a);let u=e.height;if(g.node){const t=g.node().getBBox();e.height=t.height,u=t.height}return u}),"drawActorTypeParticipant"),nt=(0,n.K2)((function(t,e,a,s){const i=s?e.stopy:e.starty,o=e.x+e.width/2,c=i+80,l=t.append("g").lower();s||(rt++,l.append("line").attr("id","actor"+rt).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=rt);const d=t.append("g");let h=X;h+=s?` ${J}`:` ${U}`,d.attr("class",h),d.attr("name",e.name);const p=(0,r.PB)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",p.rx=3,p.ry=3,d.append("line").attr("id","actor-man-torso"+rt).attr("x1",o).attr("y1",i+25).attr("x2",o).attr("y2",i+45),d.append("line").attr("id","actor-man-arms"+rt).attr("x1",o-18).attr("y1",i+33).attr("x2",o+18).attr("y2",i+33),d.append("line").attr("x1",o-18).attr("y1",i+60).attr("x2",o).attr("y2",i+45),d.append("line").attr("x1",o).attr("y1",i+45).attr("x2",o+18-2).attr("y2",i+60);const g=d.append("circle");g.attr("cx",e.x+e.width/2),g.attr("cy",i+10),g.attr("r",15),g.attr("width",e.width),g.attr("height",e.height);const u=d.node().getBBox();return e.height=u.height,wt(a,(0,n.Wi)(e.description))(e.description,d,p.x,p.y+35,p.width,p.height,{class:`actor ${X}`},a),e.height}),"drawActorTypeActor"),ot=(0,n.K2)((async function(t,e,a,r){switch(e.type){case"actor":return await nt(t,e,a,r);case"participant":return await it(t,e,a,r)}}),"drawActor"),ct=(0,n.K2)((function(t,e,a){const r=t.append("g");pt(r,e),e.name&&wt(a)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()}),"drawBox"),lt=(0,n.K2)((function(t){return t.append("g")}),"anchorElement"),dt=(0,n.K2)((function(t,e,a,s,i){const n=(0,r.PB)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,G(o,n)}),"drawActivation"),ht=(0,n.K2)((async function(t,e,a,s){const{boxMargin:i,boxTextMargin:o,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=s,g=t.append("g"),u=(0,n.K2)((function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")}),"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=(0,r.HT)();x.text=a,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=c||20,x.textMargin=o,x.class="labelText",at(g,x),x=ft(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+i+o,x.anchor="middle",x.valign="middle",x.textMargin=o,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=(0,n.Wi)(x.text)?await tt(g,x,e):et(g,x);if(void 0!==e.sectionTitles)for(const[t,a]of Object.entries(e.sectionTitles))if(a.message){x.text=a.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[t].y+i+o,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,(0,n.Wi)(x.text)?(e.starty=e.sections[t].y,await tt(g,x,e)):et(g,x);let r=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[t].height+=r-(i+o)}return e.height=Math.round(e.stopy-e.starty),g}),"drawLoop"),pt=(0,n.K2)((function(t,e){(0,r.lC)(t,e)}),"drawBackgroundRect"),gt=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),ut=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),xt=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),yt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")}),"insertArrowHead"),mt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),bt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertSequenceNumber"),Tt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")}),"insertArrowCrossHead"),ft=(0,n.K2)((function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}}),"getTextObj"),Et=(0,n.K2)((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),wt=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,o,c,l,d){const{actorFontSize:h,actorFontFamily:p,actorFontWeight:g}=d,[u,x]=(0,i.I5)(h),y=t.split(n.Y2.lineBreakRegex);for(let t=0;tt.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))}),"getHeight"),clear:(0,n.K2)((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:(0,n.K2)((function(t){this.boxes.push(t)}),"addBox"),addActor:(0,n.K2)((function(t){this.actors.push(t)}),"addActor"),addLoop:(0,n.K2)((function(t){this.loops.push(t)}),"addLoop"),addMessage:(0,n.K2)((function(t){this.messages.push(t)}),"addMessage"),addNote:(0,n.K2)((function(t){this.notes.push(t)}),"addNote"),lastActor:(0,n.K2)((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:(0,n.K2)((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:(0,n.K2)((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:(0,n.K2)((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,n.K2)((function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Rt((0,n.D7)())}),"init"),updateVal:(0,n.K2)((function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])}),"updateVal"),updateBounds:(0,n.K2)((function(t,e,a,r){const s=this;let i=0;function o(o){return(0,n.K2)((function(n){i++;const c=s.sequenceItems.length-i+1;s.updateVal(n,"starty",e-c*_t.boxMargin,Math.min),s.updateVal(n,"stopy",r+c*_t.boxMargin,Math.max),s.updateVal(Pt.data,"startx",t-c*_t.boxMargin,Math.min),s.updateVal(Pt.data,"stopx",a+c*_t.boxMargin,Math.max),"activation"!==o&&(s.updateVal(n,"startx",t-c*_t.boxMargin,Math.min),s.updateVal(n,"stopx",a+c*_t.boxMargin,Math.max),s.updateVal(Pt.data,"starty",e-c*_t.boxMargin,Math.min),s.updateVal(Pt.data,"stopy",r+c*_t.boxMargin,Math.max))}),"updateItemBounds")}(0,n.K2)(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))}),"updateBounds"),insert:(0,n.K2)((function(t,e,a,r){const s=n.Y2.getMin(t,a),i=n.Y2.getMax(t,a),o=n.Y2.getMin(e,r),c=n.Y2.getMax(e,r);this.updateVal(Pt.data,"startx",s,Math.min),this.updateVal(Pt.data,"starty",o,Math.min),this.updateVal(Pt.data,"stopx",i,Math.max),this.updateVal(Pt.data,"stopy",c,Math.max),this.updateBounds(s,o,i,c)}),"insert"),newActivation:(0,n.K2)((function(t,e,a){const r=a.get(t.from),s=Yt(t.from).length||0,i=r.x+r.width/2+(s-1)*_t.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+_t.activationWidth,stopy:void 0,actor:t.from,anchored:Lt.anchorElement(e)})}),"newActivation"),endActivation:(0,n.K2)((function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from);return this.activations.splice(e,1)[0]}),"endActivation"),createLoop:(0,n.K2)((function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}}),"createLoop"),newLoop:(0,n.K2)((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:(0,n.K2)((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:(0,n.K2)((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:(0,n.K2)((function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Pt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:(0,n.K2)((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:(0,n.K2)((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:(0,n.K2)((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=n.Y2.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:(0,n.K2)((function(){return this.verticalPos}),"getVerticalPos"),getBounds:(0,n.K2)((function(){return{bounds:this.data,models:this.models}}),"getBounds")},kt=(0,n.K2)((async function(t,e){Pt.bumpVerticalPos(_t.boxMargin),e.height=_t.boxMargin,e.starty=Pt.getVerticalPos();const a=(0,r.PB)();a.x=e.startx,a.y=e.starty,a.width=e.width||_t.width,a.class="note";const s=t.append("g"),i=Lt.drawRect(s,a),o=(0,r.HT)();o.x=e.startx,o.y=e.starty,o.width=a.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=_t.noteFontFamily,o.fontSize=_t.noteFontSize,o.fontWeight=_t.noteFontWeight,o.anchor=_t.noteAlign,o.textMargin=_t.noteMargin,o.valign="center";const c=(0,n.Wi)(o.text)?await tt(s,o):et(s,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));i.attr("height",l+2*_t.noteMargin),e.height+=l+2*_t.noteMargin,Pt.bumpVerticalPos(l+2*_t.noteMargin),e.stopy=e.starty+l+2*_t.noteMargin,e.stopx=e.startx+a.width,Pt.insert(e.startx,e.starty,e.stopx,e.stopy),Pt.models.addNote(e)}),"drawNote"),At=(0,n.K2)((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),vt=(0,n.K2)((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),Nt=(0,n.K2)((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function Mt(t,e){Pt.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,o=n.Y2.splitBreaks(s).length,c=(0,n.Wi)(s),l=c?await(0,n.Dl)(s,(0,n.D7)()):i._K.calculateTextDimensions(s,At(_t));if(!c){const t=l.height/o;e.height+=t,Pt.bumpVerticalPos(t)}let d,h=l.height-10;const p=l.width;if(a===r){d=Pt.getVerticalPos()+h,_t.rightAngles||(h+=_t.boxMargin,d=Pt.getVerticalPos()+h),h+=30;const t=n.Y2.getMax(p/2,_t.width/2);Pt.insert(a-t,Pt.getVerticalPos()-10+h,r+t,Pt.getVerticalPos()+30+h)}else h+=_t.boxMargin,d=Pt.getVerticalPos()+h,Pt.insert(a,d-10,r,d);return Pt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Pt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),d}(0,n.K2)(Mt,"boundMessage");var Dt=(0,n.K2)((async function(t,e,a,s){const{startx:o,stopx:c,starty:l,message:d,type:h,sequenceIndex:p,sequenceVisible:g}=e,u=i._K.calculateTextDimensions(d,At(_t)),x=(0,r.HT)();x.x=o,x.y=l+10,x.width=c-o,x.class="messageText",x.dy="1em",x.text=d,x.fontFamily=_t.messageFontFamily,x.fontSize=_t.messageFontSize,x.fontWeight=_t.messageFontWeight,x.anchor=_t.messageAlign,x.valign="center",x.textMargin=_t.wrapPadding,x.tspan=!1,(0,n.Wi)(x.text)?await tt(t,x,{startx:o,stopx:c,starty:a}):et(t,x);const y=u.width;let m;o===c?m=_t.rightAngles?t.append("path").attr("d",`M ${o},${a} H ${o+n.Y2.getMax(_t.width/2,y/2)} V ${a+25} H ${o}`):t.append("path").attr("d","M "+o+","+a+" C "+(o+60)+","+(a-10)+" "+(o+60)+","+(a+30)+" "+o+","+(a+20)):(m=t.append("line"),m.attr("x1",o),m.attr("y1",a),m.attr("x2",c),m.attr("y2",a)),h===s.db.LINETYPE.DOTTED||h===s.db.LINETYPE.DOTTED_CROSS||h===s.db.LINETYPE.DOTTED_POINT||h===s.db.LINETYPE.DOTTED_OPEN||h===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let b="";_t.arrowMarkerAbsolute&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),h!==s.db.LINETYPE.SOLID&&h!==s.db.LINETYPE.DOTTED||m.attr("marker-end","url("+b+"#arrowhead)"),h!==s.db.LINETYPE.BIDIRECTIONAL_SOLID&&h!==s.db.LINETYPE.BIDIRECTIONAL_DOTTED||(m.attr("marker-start","url("+b+"#arrowhead)"),m.attr("marker-end","url("+b+"#arrowhead)")),h!==s.db.LINETYPE.SOLID_POINT&&h!==s.db.LINETYPE.DOTTED_POINT||m.attr("marker-end","url("+b+"#filled-head)"),h!==s.db.LINETYPE.SOLID_CROSS&&h!==s.db.LINETYPE.DOTTED_CROSS||m.attr("marker-end","url("+b+"#crosshead)"),(g||_t.showSequenceNumbers)&&(m.attr("marker-start","url("+b+"#sequencenumber)"),t.append("text").attr("x",o).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(p))}),"drawMessage"),Ot=(0,n.K2)((function(t,e,a,r,s,i,o){let c,l=0,d=0,h=0;for(const t of r){const r=e.get(t),i=r.box;c&&c!=i&&(o||Pt.models.addBox(c),d+=_t.boxMargin+c.margin),i&&i!=c&&(o||(i.x=l+d,i.y=s),d+=i.margin),r.width=r.width||_t.width,r.height=n.Y2.getMax(r.height||_t.height,_t.height),r.margin=r.margin||_t.actorMargin,h=n.Y2.getMax(h,r.height),a.get(r.name)&&(d+=r.width/2),r.x=l+d,r.starty=Pt.getVerticalPos(),Pt.insert(r.x,s,r.x+r.width,r.height),l+=r.width+d,r.box&&(r.box.width=l+i.margin-r.box.x),d=r.margin,c=r.box,Pt.models.addActor(r)}c&&!o&&Pt.models.addBox(c),Pt.bumpVerticalPos(h)}),"addActorRenderingData"),St=(0,n.K2)((async function(t,e,a,r){if(r){let r=0;Pt.bumpVerticalPos(2*_t.boxMargin);for(const s of a){const a=e.get(s);a.stopy||(a.stopy=Pt.getVerticalPos());const i=await Lt.drawActor(t,a,_t,!0);r=n.Y2.getMax(r,i)}Pt.bumpVerticalPos(r+_t.boxMargin)}else for(const r of a){const a=e.get(r);await Lt.drawActor(t,a,_t,!1)}}),"drawActors"),Kt=(0,n.K2)((function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e.get(n),o=Wt(a),c=Lt.drawPopup(t,a,o,_t,_t.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}}),"drawActorsPopup"),Rt=(0,n.K2)((function(t){(0,n.hH)(_t,t),t.fontFamily&&(_t.actorFontFamily=_t.noteFontFamily=_t.messageFontFamily=t.fontFamily),t.fontSize&&(_t.actorFontSize=_t.noteFontSize=_t.messageFontSize=t.fontSize),t.fontWeight&&(_t.actorFontWeight=_t.noteFontWeight=_t.messageFontWeight=t.fontWeight)}),"setConf"),Yt=(0,n.K2)((function(t){return Pt.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),Ct=(0,n.K2)((function(t,e){const a=e.get(t),r=Yt(t);return[r.reduce((function(t,e){return n.Y2.getMin(t,e.startx)}),a.x+a.width/2-1),r.reduce((function(t,e){return n.Y2.getMax(t,e.stopx)}),a.x+a.width/2+1)]}),"activationBounds");function Bt(t,e,a,r,s){Pt.bumpVerticalPos(a);let o=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=At(_t);e.message=i._K.wrapLabel(`[${e.message}]`,a-2*_t.wrapPadding,s),e.width=a,e.wrap=!0;const c=i._K.calculateTextDimensions(e.message,s),l=n.Y2.getMax(c.height,_t.labelBoxHeight);o=r+l,n.Rm.debug(`${l} - ${e.message}`)}s(e),Pt.bumpVerticalPos(o)}function $t(t,e,a,r,s,i,o){function c(a,r){a.x{t.add(e.from),t.add(e.to)})),y=y.filter((e=>t.has(e)))}Ot(h,p,g,y,0,m,!1);const w=await jt(m,p,E,r);function I(t,e){const a=Pt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),Lt.drawActivation(h,a,e,_t,Yt(t.from).length),Pt.insert(a.startx,e-10,a.stopx,e)}Lt.insertArrowHead(h),Lt.insertArrowCrossHead(h),Lt.insertArrowFilledHead(h),Lt.insertSequenceNumber(h),(0,n.K2)(I,"activeEnd");let L=1,_=1;const P=[],k=[];let A=0;for(const t of m){let e,a,s;switch(t.type){case r.db.LINETYPE.NOTE:Pt.resetVerticalPos(),a=t.noteModel,await kt(h,a);break;case r.db.LINETYPE.ACTIVE_START:Pt.newActivation(t,h,p);break;case r.db.LINETYPE.ACTIVE_END:I(t,Pt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.LOOP_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"loop",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:Bt(w,t,_t.boxMargin,_t.boxMargin,(t=>Pt.newLoop(void 0,t.message)));break;case r.db.LINETYPE.RECT_END:e=Pt.endLoop(),k.push(e),Pt.models.addLoop(e),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.OPT_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"opt",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.ALT_ELSE:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.ALT_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"alt",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t))),Pt.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.PAR_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"par",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:L=t.message.start||L,_=t.message.step||_,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.CRITICAL_OPTION:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.CRITICAL_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"critical",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.BREAK_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"break",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;default:try{s=t.msgModel,s.starty=Pt.getVerticalPos(),s.sequenceIndex=L,s.sequenceVisible=r.db.showSequenceNumbers();const e=await Mt(0,s);$t(t,s,e,A,p,g,u),P.push({messageModel:s,lineStartY:e}),Pt.models.addMessage(s)}catch(t){n.Rm.error("error while drawing message",t)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(L+=_),A++}n.Rm.debug("createdActors",g),n.Rm.debug("destroyedActors",u),await St(h,p,y,!1);for(const t of P)await Dt(h,t.messageModel,t.lineStartY,r);_t.mirrorActors&&await St(h,p,y,!0),k.forEach((t=>Lt.drawBackgroundRect(h,t))),st(h,p,y,_t);for(const t of Pt.models.boxes)t.height=Pt.getVerticalPos()-t.y,Pt.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",Lt.drawBox(h,t,_t);T&&Pt.bumpVerticalPos(_t.boxMargin);const v=Kt(h,p,y,d),{bounds:N}=Pt.getBounds();void 0===N.startx&&(N.startx=0),void 0===N.starty&&(N.starty=0),void 0===N.stopx&&(N.stopx=0),void 0===N.stopy&&(N.stopy=0);let M=N.stopy-N.starty;M{const a=At(_t);let r=e.actorKeys.reduce(((e,a)=>e+(t.get(a).width+(t.get(a).margin||0))),0);r-=2*_t.boxTextMargin,e.wrap&&(e.name=i._K.wrapLabel(e.name,r-2*_t.wrapPadding,a));const o=i._K.calculateTextDimensions(e.name,a);s=n.Y2.getMax(o.height,s);const c=n.Y2.getMax(r,o.width+2*_t.wrapPadding);if(e.margin=_t.boxTextMargin,rt.textMaxHeight=s)),n.Y2.getMax(r,_t.height)}(0,n.K2)(qt,"calculateActorMargins");var zt=(0,n.K2)((async function(t,e,a){const r=e.get(t.from),s=e.get(t.to),o=r.x,c=s.x,l=t.wrap&&t.message;let d=(0,n.Wi)(t.message)?await(0,n.Dl)(t.message,(0,n.D7)()):i._K.calculateTextDimensions(l?i._K.wrapLabel(t.message,_t.width,vt(_t)):t.message,vt(_t));const h={width:l?_t.width:n.Y2.getMax(_t.width,d.width+2*_t.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(h.width=l?n.Y2.getMax(_t.width,d.width):n.Y2.getMax(r.width/2+s.width/2,d.width+2*_t.noteMargin),h.startx=o+(r.width+_t.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(h.width=l?n.Y2.getMax(_t.width,d.width+2*_t.noteMargin):n.Y2.getMax(r.width/2+s.width/2,d.width+2*_t.noteMargin),h.startx=o-h.width+(r.width-_t.actorMargin)/2):t.to===t.from?(d=i._K.calculateTextDimensions(l?i._K.wrapLabel(t.message,n.Y2.getMax(_t.width,r.width),vt(_t)):t.message,vt(_t)),h.width=l?n.Y2.getMax(_t.width,r.width):n.Y2.getMax(r.width,_t.width,d.width+2*_t.noteMargin),h.startx=o+(r.width-h.width)/2):(h.width=Math.abs(o+r.width/2-(c+s.width/2))+_t.actorMargin,h.startx=o2,g=(0,n.K2)((t=>l?-t:t),"adjustValue");t.from===t.to?h=d:(t.activate&&!p&&(h+=g(_t.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=g(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(d-=g(3)));const u=[r,s,o,c],x=Math.abs(d-h);t.wrap&&t.message&&(t.message=i._K.wrapLabel(t.message,n.Y2.getMax(x+2*_t.wrapPadding,_t.width),At(_t)));const y=i._K.calculateTextDimensions(t.message,At(_t));return{width:n.Y2.getMax(t.wrap?0:y.width+2*_t.wrapPadding,x+2*_t.wrapPadding,_t.width),height:0,startx:d,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,u),toBounds:Math.max.apply(null,u)}}),"buildMessageModel"),jt=(0,n.K2)((async function(t,e,a,r){const s={},o=[];let c,l,d;for(const a of t){switch(a.id=i._K.random({length:10}),a.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:o.push({id:a.id,msg:a.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:a.message&&(c=o.pop(),s[c.id]=c,s[a.id]=c,o.push(c));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:c=o.pop(),s[c.id]=c;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(a.from?a.from:a.to.actor),r=Yt(a.from?a.from:a.to.actor).length,s=t.x+t.width/2+(r-1)*_t.activationWidth/2,i={startx:s,stopx:s+_t.activationWidth,actor:a.from,enabled:!0};Pt.activations.push(i)}break;case r.db.LINETYPE.ACTIVE_END:{const t=Pt.activations.map((t=>t.actor)).lastIndexOf(a.from);Pt.activations.splice(t,1).splice(0,1)}}void 0!==a.placement?(l=await zt(a,e,r),a.noteModel=l,o.forEach((t=>{c=t,c.from=n.Y2.getMin(c.from,l.startx),c.to=n.Y2.getMax(c.to,l.startx+l.width),c.width=n.Y2.getMax(c.width,Math.abs(c.from-c.to))-_t.labelBoxWidth}))):(d=Ht(a,e,r),a.msgModel=d,d.startx&&d.stopx&&o.length>0&&o.forEach((t=>{if(c=t,d.startx===d.stopx){const t=e.get(a.from),r=e.get(a.to);c.from=n.Y2.getMin(t.x-d.width/2,t.x-t.width/2,c.from),c.to=n.Y2.getMax(r.x+d.width/2,r.x+t.width/2,c.to),c.width=n.Y2.getMax(c.width,Math.abs(c.to-c.from))-_t.labelBoxWidth}else c.from=n.Y2.getMin(d.startx,c.from),c.to=n.Y2.getMax(d.stopx,c.to),c.width=n.Y2.getMax(c.width,d.width)-_t.labelBoxWidth})))}return Pt.activations=[],n.Rm.debug("Loop type widths:",s),s}),"calculateLoopBounds"),Ut={parser:d,db:H,renderer:{bounds:Pt,drawActors:St,drawActorsPopup:Kt,setConf:Rt,draw:Vt},styles:j,init:(0,n.K2)((({wrap:t})=>{H.setWrap(t)}),"init")}}}]); \ No newline at end of file diff --git a/js/387-3546ecdc.chunk.min.js b/js/387-3546ecdc.chunk.min.js new file mode 100644 index 0000000..75d1a60 --- /dev/null +++ b/js/387-3546ecdc.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[387],{2387:(e,c,k)=>{k.d(c,{createGitGraphServices:()=>s.b});var s=k(2785);k(9369)}}]); \ No newline at end of file diff --git a/js/4-934f5a40.chunk.min.js b/js/4-934f5a40.chunk.min.js new file mode 100644 index 0000000..dcf05e5 --- /dev/null +++ b/js/4-934f5a40.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[4],{3004:(t,e,n)=>{n.d(e,{diagram:()=>J});var i=n(32),s=n(4852),r=n(5097),a=n(8041),o=n(5263),c=function(){var t=(0,i.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],s=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,16],l=[1,17],h={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:(0,i.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:(0,i.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,n=[0],s=[],r=[null],a=[],o=this.table,c="",l=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=s.pop()||p.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,i.K2)(x,"lex");for(var b,k,_,w,v,K,S,$,E,T={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=x()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var I;for(K in E=[],o[_])this.terminals_[K]&&K>2&&E.push("'"+this.terminals_[K]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),b=null,k?(b=k,k=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(S=this.productions_[w[1]][1],T.$=r[r.length-S],T._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},m&&(T._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(T,[c,h,l,y.yy,w[1],r,a].concat(u))))return v;S&&(n=n.slice(0,-1*S*2),r=r.slice(0,-1*S),a=a.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),r.push(T.$),a.push(T._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},d=function(){return{EOF:1,parseError:(0,i.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,i.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function u(){this.yy={}}return h.lexer=d,(0,i.K2)(u,"Parser"),u.prototype=h,h.Parser=u,new u}();c.parser=c;var l=c,h={};(0,i.VA)(h,{addEvent:()=>w,addSection:()=>x,addTask:()=>_,addTaskOrg:()=>v,clear:()=>m,default:()=>S,getCommonDb:()=>f,getSections:()=>b,getTasks:()=>k});var d="",u=0,p=[],y=[],g=[],f=(0,i.K2)((()=>i.Wt),"getCommonDb"),m=(0,i.K2)((function(){p.length=0,y.length=0,d="",g.length=0,(0,i.IU)()}),"clear"),x=(0,i.K2)((function(t){d=t,p.push(t)}),"addSection"),b=(0,i.K2)((function(){return p}),"getSections"),k=(0,i.K2)((function(){let t=K(),e=0;for(;!t&&e<100;)t=K(),e++;return y.push(...g),y}),"getTasks"),_=(0,i.K2)((function(t,e,n){const i={id:u++,section:d,type:d,task:t,score:e||0,events:n?[n]:[]};g.push(i)}),"addTask"),w=(0,i.K2)((function(t){g.find((t=>t.id===u-1)).events.push(t)}),"addEvent"),v=(0,i.K2)((function(t){const e={section:d,type:d,description:t,task:t,classes:[]};y.push(e)}),"addTaskOrg"),K=(0,i.K2)((function(){const t=(0,i.K2)((function(t){return g[t].processed}),"compileTask");let e=!0;for(const[n,i]of g.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),S={clear:m,getCommonDb:f,addSection:x,getSections:b,getTasks:k,addTask:_,addTaskOrg:v,addEvent:w},$=(0,i.K2)((function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n}),"drawRect"),E=(0,i.K2)((function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const n=(0,s.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const n=(0,s.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,i.K2)(a,"smile"),(0,i.K2)(o,"sad"),(0,i.K2)(c,"ambivalent"),e.score>3?a(r):e.score<3?o(r):c(r),n}),"drawFace"),T=(0,i.K2)((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),I=(0,i.K2)((function(t,e){const n=e.text.replace(//gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(n),i}),"drawText"),R=(0,i.K2)((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,i.K2)(n,"genPoints");const s=t.append("polygon");s.attr("points",n(e.x,e.y,50,20,7)),s.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,I(t,e)}),"drawLabel"),A=(0,i.K2)((function(t,e,n){const i=t.append("g"),s=P();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,$(i,s),H(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),L=-1,M=(0,i.K2)((function(t,e,n){const i=e.x+n.width/2,s=t.append("g");L++,s.append("line").attr("id","task"+L).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),E(s,{cx:i,cy:300+30*(5-e.score),score:e.score});const r=P();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="task task-type-"+e.num,r.rx=3,r.ry=3,$(s,r),H(n)(e.task,s,r.x,r.y,r.width,r.height,{class:"task"},n,e.colour)}),"drawTask"),C=(0,i.K2)((function(t,e){$(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),N=(0,i.K2)((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),P=(0,i.K2)((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),H=function(){function t(t,e,n,i,r,a,o,c){s(e.append("text").attr("x",n+r/2).attr("y",i+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(//gi);for(let t=0;t)/).reverse(),r=[],a=n.attr("y"),o=parseFloat(n.attr("dy")),c=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let s=0;se||"
"===t)&&(r.pop(),c.text(r.join(" ").trim()),r="
"===t?[""]:[t],c=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}(0,i.K2)(j,"wrap");var D=(0,i.K2)((function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),o=r.append("g"),c=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(j,e.width).node().getBBox(),l=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=c.height+1.1*l*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),W(a,e,s,i),e}),"drawNode"),z=(0,i.K2)((function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(j,e.width).node().getBBox(),r=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding}),"getVirtualNodeHeight"),W=(0,i.K2)((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),B={drawRect:$,drawCircle:T,drawSection:A,drawText:I,drawLabel:R,drawTask:M,drawBackgroundRect:C,getTextObj:N,getNoteRect:P,initGraphics:O,drawNode:D,getVirtualNodeHeight:z},F=(0,i.K2)((function(t,e,n,r){const a=(0,i.D7)(),o=a.leftMargin??50;i.Rm.debug("timeline",r.db);const c=a.securityLevel;let l;"sandbox"===c&&(l=(0,s.Ltv)("#i"+e));const h=("sandbox"===c?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select("#"+e);h.append("g");const d=r.db.getTasks(),u=r.db.getCommonDb().getDiagramTitle();i.Rm.debug("task",d),B.initGraphics(h);const p=r.db.getSections();i.Rm.debug("sections",p);let y=0,g=0,f=0,m=0,x=50+o,b=50;m=50;let k=0,_=!0;p.forEach((function(t){const e={number:k,descr:t,section:k,width:150,padding:20,maxHeight:y},n=B.getVirtualNodeHeight(h,e,a);i.Rm.debug("sectionHeight before draw",n),y=Math.max(y,n+20)}));let w=0,v=0;i.Rm.debug("tasks.length",d.length);for(const[t,e]of d.entries()){const n={number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:g},s=B.getVirtualNodeHeight(h,n,a);i.Rm.debug("taskHeight before draw",s),g=Math.max(g,s+20),w=Math.max(w,e.events.length);let r=0;for(const t of e.events){const n={descr:t,section:e.section,number:e.section,width:150,padding:20,maxHeight:50};r+=B.getVirtualNodeHeight(h,n,a)}v=Math.max(v,r)}i.Rm.debug("maxSectionHeight before draw",y),i.Rm.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach((t=>{const e=d.filter((e=>e.section===t)),n={number:k,descr:t,section:k,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y};i.Rm.debug("sectionNode",n);const s=h.append("g"),r=B.drawNode(s,n,k,a);i.Rm.debug("sectionNode output",r),s.attr("transform",`translate(${x}, 50)`),b+=y+50,e.length>0&&V(h,e,k,x,b,g,a,w,v,y,!1),x+=200*Math.max(e.length,1),b=50,k++})):(_=!1,V(h,d,k,x,b,g,a,w,v,y,!0));const K=h.node().getBBox();i.Rm.debug("bounds",K),u&&h.append("text").text(u).attr("x",K.width/2-o).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=_?y+g+150:g+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",o).attr("y1",f).attr("x2",K.width+3*o).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.ot)(void 0,h,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)}),"draw"),V=(0,i.K2)((function(t,e,n,s,r,a,o,c,l,h,d){for(const c of e){const e={descr:c.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.Rm.debug("taskNode",e);const u=t.append("g").attr("class","taskWrapper"),p=B.drawNode(u,e,n,o).height;if(i.Rm.debug("taskHeight after draw",p),u.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,p),c.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=G(t,c.events,n,s,r,o),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!o.timeline?.disableMulticolor&&n++}r-=10}),"drawTasks"),G=(0,i.K2)((function(t,e,n,s,r,a){let o=0;const c=r;r+=100;for(const c of e){const e={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};i.Rm.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=B.drawNode(l,e,n,a).height;o+=h,l.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=c,o}),"drawEvents"),U={setConf:(0,i.K2)((()=>{}),"setConf"),draw:F},q=(0,i.K2)((t=>{let e="";for(let e=0;e`\n .edge {\n stroke-width: 3;\n }\n ${q(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/42-aadd500f.chunk.min.js b/js/42-aadd500f.chunk.min.js deleted file mode 100644 index 8337e49..0000000 --- a/js/42-aadd500f.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[42],{4075:(e,t,n)=>{n.d(t,{M:()=>o});var i=n(9592),r=n(53),a=n(4722);function o(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:s(e),edges:d(e)};return i.A(e.graph())||(t.value=r.A(e.graph())),t}function s(e){return a.A(e.nodes(),(function(t){var n=e.node(t),r=e.parent(t),a={v:t};return i.A(n)||(a.value=n),i.A(r)||(a.parent=r),a}))}function d(e){return a.A(e.edges(),(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return i.A(t.name)||(r.name=t.name),i.A(n)||(r.value=n),r}))}n(1471)},5042:(e,t,n)=>{n.d(t,{diagram:()=>z});var i=n(1953),r=n(2207),a=n(6578),o=n(8496),s=n(8252),d=n(7323),l=n(798),c=n(4852),g=n(697),h=n(567),f=n(4075),u={},p={},m={},w=(0,l.K2)((()=>{p={},m={},u={}}),"clear"),y=(0,l.K2)(((e,t)=>(l.Rm.trace("In isDescendant",t," ",e," = ",p[t].includes(e)),!!p[t].includes(e))),"isDescendant"),R=(0,l.K2)(((e,t)=>(l.Rm.info("Descendants of ",t," is ",p[t]),l.Rm.info("Edge is ",e),e.v!==t&&e.w!==t&&(p[t]?p[t].includes(e.v)||y(e.v,t)||y(e.w,t)||p[t].includes(e.w):(l.Rm.debug("Tilt, ",t,",not in descendants"),!1)))),"edgeInCluster"),b=(0,l.K2)(((e,t,n,i)=>{l.Rm.warn("Copying children of ",e,"root",i,"data",t.node(e),i);const r=t.children(e)||[];e!==i&&r.push(e),l.Rm.warn("Copying (nodes) clusterId",e,"nodes",r),r.forEach((r=>{if(t.children(r).length>0)b(r,t,n,i);else{const a=t.node(r);l.Rm.info("cp ",r," to ",i," with parent ",e),n.setNode(r,a),i!==t.parent(r)&&(l.Rm.warn("Setting parent",r,t.parent(r)),n.setParent(r,t.parent(r))),e!==i&&r!==e?(l.Rm.debug("Setting parent",r,e),n.setParent(r,e)):(l.Rm.info("In copy ",e,"root",i,"data",t.node(e),i),l.Rm.debug("Not Setting parent for node=",r,"cluster!==rootId",e!==i,"node!==clusterId",r!==e));const o=t.edges(r);l.Rm.debug("Copying Edges",o),o.forEach((r=>{l.Rm.info("Edge",r);const a=t.edge(r.v,r.w,r.name);l.Rm.info("Edge data",a,i);try{R(r,i)?(l.Rm.info("Copying as ",r.v,r.w,a,r.name),n.setEdge(r.v,r.w,a,r.name),l.Rm.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):l.Rm.info("Skipping copy of edge ",r.v,"--\x3e",r.w," rootId: ",i," clusterId:",e)}catch(e){l.Rm.error(e)}}))}l.Rm.debug("Removing node",r),t.removeNode(r)}))}),"copy"),v=(0,l.K2)(((e,t)=>{const n=t.children(e);let i=[...n];for(const r of n)m[r]=e,i=[...i,...v(r,t)];return i}),"extractDescendants"),x=(0,l.K2)(((e,t)=>{l.Rm.trace("Searching",e);const n=t.children(e);if(l.Rm.trace("Searching children of id ",e,n),n.length<1)return l.Rm.trace("This is a valid node",e),e;for(const i of n){const n=x(i,t);if(n)return l.Rm.trace("Found replacement for",e," => ",n),n}}),"findNonClusterChild"),N=(0,l.K2)((e=>u[e]&&u[e].externalConnections&&u[e]?u[e].id:e),"getAnchorId"),D=(0,l.K2)(((e,t)=>{if(!e||t>10)l.Rm.debug("Opting out, no graph ");else{l.Rm.debug("Opting in, graph "),e.nodes().forEach((function(t){e.children(t).length>0&&(l.Rm.warn("Cluster identified",t," Replacement id in edges: ",x(t,e)),p[t]=v(t,e),u[t]={id:x(t,e),clusterData:e.node(t)})})),e.nodes().forEach((function(t){const n=e.children(t),i=e.edges();n.length>0?(l.Rm.debug("Cluster identified",t,p),i.forEach((e=>{e.v!==t&&e.w!==t&&y(e.v,t)^y(e.w,t)&&(l.Rm.warn("Edge: ",e," leaves cluster ",t),l.Rm.warn("Descendants of XXX ",t,": ",p[t]),u[t].externalConnections=!0)}))):l.Rm.debug("Not a cluster ",t,p)}));for(let t of Object.keys(u)){const n=u[t].id,i=e.parent(n);i!==t&&u[i]&&!u[i].externalConnections&&(u[t].id=i)}e.edges().forEach((function(t){const n=e.edge(t);l.Rm.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),l.Rm.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e.edge(t)));let i=t.v,r=t.w;if(l.Rm.warn("Fix XXX",u,"ids:",t.v,t.w,"Translating: ",u[t.v]," --- ",u[t.w]),u[t.v]&&u[t.w]&&u[t.v]===u[t.w]){l.Rm.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),l.Rm.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),i=N(t.v),r=N(t.w),e.removeEdge(t.v,t.w,t.name);const a=t.w+"---"+t.v;e.setNode(a,{domId:a,id:a,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=structuredClone(n),s=structuredClone(n);o.label="",o.arrowTypeEnd="none",s.label="",o.fromCluster=t.v,s.toCluster=t.v,e.setEdge(i,a,o,t.name+"-cyclic-special"),e.setEdge(a,r,s,t.name+"-cyclic-special")}else if(u[t.v]||u[t.w]){if(l.Rm.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),i=N(t.v),r=N(t.w),e.removeEdge(t.v,t.w,t.name),i!==t.v){const r=e.parent(i);u[r].externalConnections=!0,n.fromCluster=t.v}if(r!==t.w){const i=e.parent(r);u[i].externalConnections=!0,n.toCluster=t.w}l.Rm.warn("Fix Replacing with XXX",i,r,t.name),e.setEdge(i,r,n,t.name)}})),l.Rm.warn("Adjusted Graph",f.M(e)),C(e,0),l.Rm.trace(u)}}),"adjustClustersAndEdges"),C=(0,l.K2)(((e,t)=>{if(l.Rm.warn("extractor - ",t,f.M(e),e.children("D")),t>10)return void l.Rm.error("Bailing out");let n=e.nodes(),i=!1;for(const t of n){const n=e.children(t);i=i||n.length>0}if(i){l.Rm.debug("Nodes = ",n,t);for(const i of n)if(l.Rm.debug("Extracting node",i,u,u[i]&&!u[i].externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),u[i])if(!u[i].externalConnections&&e.children(i)&&e.children(i).length>0){l.Rm.warn("Cluster without external connections, without a parent and with children",i,t);let n="TB"===e.graph().rankdir?"LR":"TB";u[i]?.clusterData?.dir&&(n=u[i].clusterData.dir,l.Rm.warn("Fixing dir",u[i].clusterData.dir,n));const r=new g.T({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));l.Rm.warn("Old graph before copy",f.M(e)),b(i,e,r,i),e.setNode(i,{clusterNode:!0,id:i,clusterData:u[i].clusterData,labelText:u[i].labelText,graph:r}),l.Rm.warn("New graph after copy node: (",i,")",f.M(r)),l.Rm.debug("Old graph after copy",f.M(e))}else l.Rm.warn("Cluster ** ",i," **not meeting the criteria !externalConnections:",!u[i].externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),l.Rm.debug(u);else l.Rm.debug("Not a cluster",i,t);n=e.nodes(),l.Rm.warn("New list of nodes",n);for(const i of n){const n=e.node(i);l.Rm.warn(" Now next level",i,n),n.clusterNode&&C(n.graph,t+1)}}else l.Rm.debug("Done, no node has children",e.nodes())}),"extractor"),T=(0,l.K2)(((e,t)=>{if(0===t.length)return[];let n=Object.assign(t);return t.forEach((t=>{const i=e.children(t),r=T(e,i);n=[...n,...r]})),n}),"sorter"),S=(0,l.K2)((e=>T(e,e.children())),"sortNodesByHierarchy"),E=(0,l.K2)(((e,t)=>{l.Rm.info("Creating subgraph rect for ",t.id,t);const n=(0,l.D7)(),i=e.insert("g").attr("class","cluster"+(t.class?" "+t.class:"")).attr("id",t.id),r=i.insert("rect",":first-child"),d=(0,l._3)(n.flowchart.htmlLabels),g=i.insert("g").attr("class","cluster-label"),h="markdown"===t.labelType?(0,s.GZ)(g,t.labelText,{style:t.labelStyle,useHtmlLabels:d},n):g.node().appendChild((0,a.DA)(t.labelText,t.labelStyle,void 0,!0));let f=h.getBBox();if((0,l._3)(n.flowchart.htmlLabels)){const e=h.children[0],t=(0,c.Ltv)(h);f=e.getBoundingClientRect(),t.attr("width",f.width),t.attr("height",f.height)}const u=0*t.padding,p=u/2,m=t.width<=f.width+u?f.width+u:t.width;t.width<=f.width+u?t.diff=(f.width-t.width)/2-t.padding/2:t.diff=-t.padding/2,l.Rm.trace("Data ",t,JSON.stringify(t)),r.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-m/2).attr("y",t.y-t.height/2-p).attr("width",m).attr("height",t.height+u);const{subGraphTitleTopMargin:w}=(0,o.O)(n);d?g.attr("transform",`translate(${t.x-f.width/2}, ${t.y-t.height/2+w})`):g.attr("transform",`translate(${t.x}, ${t.y-t.height/2+w})`);const y=r.node().getBBox();return t.width=y.width,t.height=y.height,t.intersect=function(e){return(0,a.nM)(t,e)},i}),"rect"),k=(0,l.K2)(((e,t)=>{const n=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=n.insert("rect",":first-child"),r=0*t.padding,o=r/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+r).attr("height",t.height+r).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(e){return(0,a.nM)(t,e)},n}),"noteGroup"),X={rect:E,roundedWithTitle:(0,l.K2)(((e,t)=>{const n=(0,l.D7)(),i=e.insert("g").attr("class",t.classes).attr("id",t.id),r=i.insert("rect",":first-child"),s=i.insert("g").attr("class","cluster-label"),d=i.append("rect"),g=s.node().appendChild((0,a.DA)(t.labelText,t.labelStyle,void 0,!0));let h=g.getBBox();if((0,l._3)(n.flowchart.htmlLabels)){const e=g.children[0],t=(0,c.Ltv)(g);h=e.getBoundingClientRect(),t.attr("width",h.width),t.attr("height",h.height)}h=g.getBBox();const f=0*t.padding,u=f/2,p=t.width<=h.width+t.padding?h.width+t.padding:t.width;t.width<=h.width+t.padding?t.diff=(h.width+0*t.padding-t.width)/2:t.diff=-t.padding/2,r.attr("class","outer").attr("x",t.x-p/2-u).attr("y",t.y-t.height/2-u).attr("width",p+f).attr("height",t.height+f),d.attr("class","inner").attr("x",t.x-p/2-u).attr("y",t.y-t.height/2-u+h.height-1).attr("width",p+f).attr("height",t.height+f-h.height-3);const{subGraphTitleTopMargin:m}=(0,o.O)(n);s.attr("transform",`translate(${t.x-h.width/2}, ${t.y-t.height/2-t.padding/3+((0,l._3)(n.flowchart.htmlLabels)?5:3)+m})`);const w=r.node().getBBox();return t.height=w.height,t.intersect=function(e){return(0,a.nM)(t,e)},i}),"roundedWithTitle"),noteGroup:k,divider:(0,l.K2)(((e,t)=>{const n=e.insert("g").attr("class",t.classes).attr("id",t.id),i=n.insert("rect",":first-child"),r=0*t.padding,o=r/2;i.attr("class","divider").attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2).attr("width",t.width+r).attr("height",t.height+r);const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.diff=-t.padding/2,t.intersect=function(e){return(0,a.nM)(t,e)},n}),"divider")},K={},M=(0,l.K2)(((e,t)=>{l.Rm.trace("Inserting cluster");const n=t.shape||"rect";K[t.id]=X[n](e,t)}),"insertCluster"),L=(0,l.K2)((()=>{K={}}),"clear"),B=(0,l.K2)((async(e,t,n,r,s,d)=>{l.Rm.info("Graph in recursive render: XXX",f.M(t),s);const c=t.graph().rankdir;l.Rm.trace("Dir in recursive render - dir:",c);const g=e.insert("g").attr("class","root");t.nodes()?l.Rm.info("Recursive render XXX",t.nodes()):l.Rm.info("No nodes found for",t),t.edges().length>0&&l.Rm.trace("Recursive edges",t.edge(t.edges()[0]));const p=g.insert("g").attr("class","clusters"),m=g.insert("g").attr("class","edgePaths"),w=g.insert("g").attr("class","edgeLabels"),y=g.insert("g").attr("class","nodes");await Promise.all(t.nodes().map((async function(e){const i=t.node(e);if(void 0!==s){const n=JSON.parse(JSON.stringify(s.clusterData));l.Rm.info("Setting data for cluster XXX (",e,") ",n,s),t.setNode(s.id,n),t.parent(e)||(l.Rm.trace("Setting parent",e,s.id),t.setParent(e,s.id,n))}if(l.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(t.node(e))),i?.clusterNode){l.Rm.info("Cluster identified",e,i.width,t.node(e));const{ranksep:o,nodesep:s}=t.graph();i.graph.setGraph({...i.graph.graph(),ranksep:o,nodesep:s});const c=await B(y,i.graph,n,r,t.node(e),d),g=c.elem;(0,a.lC)(i,g),i.diff=c.diff||0,l.Rm.info("Node bounds (abc123)",e,i,i.width,i.x,i.y),(0,a.U7)(g,i),l.Rm.warn("Recursive render complete ",g,i)}else t.children(e).length>0?(l.Rm.info("Cluster - the non recursive path XXX",e,i.id,i,t),l.Rm.info(x(i.id,t)),u[i.id]={id:x(i.id,t),node:i}):(l.Rm.info("Node - the non recursive path",e,i.id,i),await(0,a.on)(y,t.node(e),c))}))),t.edges().forEach((async function(e){const n=t.edge(e.v,e.w,e.name);l.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),l.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(t.edge(e))),l.Rm.info("Fix",u,"ids:",e.v,e.w,"Translating: ",u[e.v],u[e.w]),await(0,i.jP)(w,n)})),t.edges().forEach((function(e){l.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e))})),l.Rm.info("Graph before layout:",JSON.stringify(f.M(t))),l.Rm.info("#############################################"),l.Rm.info("### Layout ###"),l.Rm.info("#############################################"),l.Rm.info(t),(0,h.Zp)(t),l.Rm.info("Graph after layout:",JSON.stringify(f.M(t)));let R=0;const{subGraphTitleTotalMargin:b}=(0,o.O)(d);return S(t).forEach((function(e){const n=t.node(e);l.Rm.info("Position "+e+": "+JSON.stringify(t.node(e))),l.Rm.info("Position "+e+": ("+n.x,","+n.y,") width: ",n.width," height: ",n.height),n?.clusterNode?(n.y+=b,(0,a.U_)(n)):t.children(e).length>0?(n.height+=b,M(p,n),u[n.id].node=n):(n.y+=b/2,(0,a.U_)(n))})),t.edges().forEach((function(e){const a=t.edge(e);l.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a),a),a.points.forEach((e=>e.y+=b/2));const o=(0,i.Jo)(m,e,a,u,n,t,r);(0,i.T_)(a,o)})),t.nodes().forEach((function(e){const n=t.node(e);l.Rm.info(e,n.type,n.diff),"group"===n.type&&(R=n.diff)})),{elem:g,diff:R}}),"recursiveRender"),O=(0,l.K2)((async(e,t,n,r,o)=>{(0,i.g0)(e,n,r,o),(0,a.IU)(),(0,i.IU)(),L(),w(),l.Rm.warn("Graph at first:",JSON.stringify(f.M(t))),D(t),l.Rm.warn("Graph after:",JSON.stringify(f.M(t)));const s=(0,l.D7)();await B(e,t,r,o,void 0,s)}),"render"),A=(0,l.K2)((e=>l.Y2.sanitizeText(e,(0,l.D7)())),"sanitizeText"),I={dividerMargin:10,padding:5,textHeight:10,curve:void 0},G=(0,l.K2)((function(e,t,n,i){l.Rm.info("keys:",[...e.keys()]),l.Rm.info(e),e.forEach((function(e){const r={shape:"rect",id:e.id,domId:e.domId,labelText:A(e.id),labelStyle:"",style:"fill: none; stroke: black",padding:(0,l.D7)().flowchart?.padding??(0,l.D7)().class?.padding};t.setNode(e.id,r),J(e.classes,t,n,i,e.id),l.Rm.info("setNode",r)}))}),"addNamespaces"),J=(0,l.K2)((function(e,t,n,i,r){l.Rm.info("keys:",[...e.keys()]),l.Rm.info(e),[...e.values()].filter((e=>e.parent===r)).forEach((function(e){const n=e.cssClasses.join(" "),a=(0,d.sM)(e.styles),o=e.label??e.id,s={labelStyle:a.labelStyle,shape:"class_box",labelText:A(o),classData:e,rx:0,ry:0,class:n,style:a.style,id:e.id,domId:e.domId,tooltip:i.db.getTooltip(e.id,r)||"",haveCallback:e.haveCallback,link:e.link,width:"group"===e.type?500:void 0,type:e.type,padding:(0,l.D7)().flowchart?.padding??(0,l.D7)().class?.padding};t.setNode(e.id,s),r&&t.setParent(e.id,r),l.Rm.info("setNode",s)}))}),"addClasses"),_=(0,l.K2)((function(e,t,n,i){l.Rm.info(e),e.forEach((function(e,r){const a=e,o=a.text,s={labelStyle:"",shape:"note",labelText:A(o),noteData:a,rx:0,ry:0,class:"",style:"",id:a.id,domId:a.id,tooltip:"",type:"note",padding:(0,l.D7)().flowchart?.padding??(0,l.D7)().class?.padding};if(t.setNode(a.id,s),l.Rm.info("setNode",s),!a.class||!i.has(a.class))return;const g=n+r,h={id:`edgeNote${g}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:(0,d.Ib)(I.curve,c.lUB)};t.setEdge(a.id,a.class,h,g)}))}),"addNotes"),P=(0,l.K2)((function(e,t){const n=(0,l.D7)().flowchart;let i=0;e.forEach((function(e){i++;const r={classes:"relation",pattern:1==e.relation.lineType?"dashed":"solid",id:(0,d.rY)(e.id1,e.id2,{prefix:"id",counter:i}),arrowhead:"arrow_open"===e.type?"none":"normal",startLabelRight:"none"===e.relationTitle1?"":e.relationTitle1,endLabelLeft:"none"===e.relationTitle2?"":e.relationTitle2,arrowTypeStart:U(e.relation.type1),arrowTypeEnd:U(e.relation.type2),style:"fill:none",labelStyle:"",curve:(0,d.Ib)(n?.curve,c.lUB)};if(l.Rm.info(r,e),void 0!==e.style){const t=(0,d.sM)(e.style);r.style=t.style,r.labelStyle=t.labelStyle}e.text=e.title,void 0===e.text?void 0!==e.style&&(r.arrowheadStyle="fill: #333"):(r.arrowheadStyle="fill: #333",r.labelpos="c",(0,l.D7)().flowchart?.htmlLabels??(0,l.D7)().htmlLabels?(r.labelType="html",r.label=''+e.text+""):(r.labelType="text",r.label=e.text.replace(l.Y2.lineBreakRegex,"\n"),void 0===e.style&&(r.style=r.style||"stroke: #333; stroke-width: 1.5px;fill:none"),r.labelStyle=r.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,r,i)}))}),"addRelations"),$=(0,l.K2)((function(e){I={...I,...e}}),"setConf"),F=(0,l.K2)((async function(e,t,n,i){l.Rm.info("Drawing class - ",t);const r=(0,l.D7)().flowchart??(0,l.D7)().class,a=(0,l.D7)().securityLevel;l.Rm.info("config:",r);const o=r?.nodeSpacing??50,s=r?.rankSpacing??50,h=new g.T({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),f=i.db.getNamespaces(),u=i.db.getClasses(),p=i.db.getRelations(),m=i.db.getNotes();let w;l.Rm.info(p),G(f,h,t,i),J(u,h,t,i),P(p,h),_(m,h,p.length+1,u),"sandbox"===a&&(w=(0,c.Ltv)("#i"+t));const y="sandbox"===a?(0,c.Ltv)(w.nodes()[0].contentDocument.body):(0,c.Ltv)("body"),R=y.select(`[id="${t}"]`),b=y.select("#"+t+" g");if(await O(b,h,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),d._K.insertTitle(R,"classTitleText",r?.titleTopMargin??5,i.db.getDiagramTitle()),(0,l.ot)(h,R,r?.diagramPadding,r?.useMaxWidth),!r?.htmlLabels){const e="sandbox"===a?w.nodes()[0].contentDocument:document,n=e.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of n){const n=t.getBBox(),i=e.createElementNS("http://www.w3.org/2000/svg","rect");i.setAttribute("rx",0),i.setAttribute("ry",0),i.setAttribute("width",n.width),i.setAttribute("height",n.height),t.insertBefore(i,t.firstChild)}}}),"draw");function U(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}(0,l.K2)(U,"getArrowMarker");var j={setConf:$,draw:F},z={parser:r._$,db:r.z2,renderer:j,styles:r.tM,init:(0,l.K2)((e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,r.z2.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/444-671f5f2b.chunk.min.js b/js/444-671f5f2b.chunk.min.js deleted file mode 100644 index d10d245..0000000 --- a/js/444-671f5f2b.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[444],{7459:(e,t,a)=>{function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(798).K2)(i,"populateCommonDb")},8444:(e,t,a)=>{a.d(t,{diagram:()=>k});var i=a(7459),n=a(7323),l=a(8852),r=a(798),s=a(8731),o=a(4852),c=r.UI.pie,p={sections:new Map,showData:!1,config:c},d=p.sections,g=p.showData,u=structuredClone(c),h=(0,r.K2)((()=>structuredClone(u)),"getConfig"),m=(0,r.K2)((()=>{d=new Map,g=p.showData,(0,r.IU)()}),"clear"),f=(0,r.K2)((({label:e,value:t})=>{d.has(e)||(d.set(e,t),r.Rm.debug(`added new section: ${e}, with value: ${t}`))}),"addSection"),S=(0,r.K2)((()=>d),"getSections"),x=(0,r.K2)((e=>{g=e}),"setShowData"),w=(0,r.K2)((()=>g),"getShowData"),D={getConfig:h,clear:m,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:f,getSections:S,setShowData:x,getShowData:w},T=(0,r.K2)(((e,t)=>{(0,i.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)}),"populateDb"),$={parse:(0,r.K2)((async e=>{const t=await(0,s.qg)("pie",e);r.Rm.debug(t),T(t,D)}),"parse")},y=(0,r.K2)((e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`),"getStyles"),C=(0,r.K2)((e=>{const t=[...e.entries()].map((e=>({label:e[0],value:e[1]}))).sort(((e,t)=>t.value-e.value));return(0,o.rLf)().value((e=>e.value))(t)}),"createPieArcs"),k={parser:$,db:D,renderer:{draw:(0,r.K2)(((e,t,a,i)=>{r.Rm.debug("rendering pie chart\n"+e);const s=i.db,c=(0,r.D7)(),p=(0,n.$t)(s.getConfig(),c.pie),d=(0,l.D)(t),g=d.append("g");g.attr("transform","translate(225,225)");const{themeVariables:u}=c;let[h]=(0,n.I5)(u.pieOuterStrokeWidth);h??=2;const m=p.textPosition,f=Math.min(450,450)/2-40,S=(0,o.JLW)().innerRadius(0).outerRadius(f),x=(0,o.JLW)().innerRadius(f*m).outerRadius(f*m);g.append("circle").attr("cx",0).attr("cy",0).attr("r",f+h/2).attr("class","pieOuterCircle");const w=s.getSections(),D=C(w),T=[u.pie1,u.pie2,u.pie3,u.pie4,u.pie5,u.pie6,u.pie7,u.pie8,u.pie9,u.pie10,u.pie11,u.pie12],$=(0,o.UMr)(T);g.selectAll("mySlices").data(D).enter().append("path").attr("d",S).attr("fill",(e=>$(e.data.label))).attr("class","pieCircle");let y=0;w.forEach((e=>{y+=e})),g.selectAll("mySlices").data(D).enter().append("text").text((e=>(e.data.value/y*100).toFixed(0)+"%")).attr("transform",(e=>"translate("+x.centroid(e)+")")).style("text-anchor","middle").attr("class","slice"),g.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const k=g.selectAll(".legend").data($.domain()).enter().append("g").attr("class","legend").attr("transform",((e,t)=>"translate(216,"+(22*t-22*$.domain().length/2)+")"));k.append("rect").attr("width",18).attr("height",18).style("fill",$).style("stroke",$),k.data(D).append("text").attr("x",22).attr("y",14).text((e=>{const{label:t,value:a}=e.data;return s.getShowData()?`${t} [${a}]`:t}));const b=512+Math.max(...k.selectAll("text").nodes().map((e=>e?.getBoundingClientRect().width??0)));d.attr("viewBox",`0 0 ${b} 450`),(0,r.a$)(d,450,b,p.useMaxWidth)}),"draw")},styles:y}}}]); \ No newline at end of file diff --git a/js/452-e65d6d68.chunk.min.js b/js/452-e65d6d68.chunk.min.js new file mode 100644 index 0000000..34932b1 --- /dev/null +++ b/js/452-e65d6d68.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[452],{4071:(e,c,k)=>{k.d(c,{createPacketServices:()=>s.$});var s=k(1609);k(9369)}}]); \ No newline at end of file diff --git a/js/501-f9886899.chunk.min.js b/js/501-f9886899.chunk.min.js new file mode 100644 index 0000000..e903d14 --- /dev/null +++ b/js/501-f9886899.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[501],{4075:(e,n,t)=>{t.d(n,{M:()=>o});var r=t(9592),i=t(53),a=t(4722);function o(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:d(e),edges:s(e)};return r.A(e.graph())||(n.value=i.A(e.graph())),n}function d(e){return a.A(e.nodes(),(function(n){var t=e.node(n),i=e.parent(n),a={v:n};return r.A(t)||(a.value=t),r.A(i)||(a.parent=i),a}))}function s(e){return a.A(e.edges(),(function(n){var t=e.edge(n),i={v:n.v,w:n.w};return r.A(n.name)||(i.name=n.name),r.A(t)||(i.value=t),i}))}t(1471)},53:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(4507);const i=function(e){return(0,r.A)(e,4)}},501:(e,n,t)=>{t.r(n),t.d(n,{render:()=>C});var r=t(3256),i=(t(8568),t(7750)),a=(t(2382),t(5522),t(32)),o=t(567),d=t(4075),s=t(697),c=new Map,g=new Map,l=new Map,f=(0,a.K2)((()=>{g.clear(),l.clear(),c.clear()}),"clear"),h=(0,a.K2)(((e,n)=>{const t=g.get(n)||[];return a.Rm.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)}),"isDescendant"),u=(0,a.K2)(((e,n)=>{const t=g.get(n)||[];return a.Rm.info("Descendants of ",n," is ",t),a.Rm.info("Edge is ",e),e.v!==n&&e.w!==n&&(t?t.includes(e.v)||h(e.v,n)||h(e.w,n)||t.includes(e.w):(a.Rm.debug("Tilt, ",n,",not in descendants"),!1))}),"edgeInCluster"),p=(0,a.K2)(((e,n,t,r)=>{a.Rm.warn("Copying children of ",e,"root",r,"data",n.node(e),r);const i=n.children(e)||[];e!==r&&i.push(e),a.Rm.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach((i=>{if(n.children(i).length>0)p(i,n,t,r);else{const o=n.node(i);a.Rm.info("cp ",i," to ",r," with parent ",e),t.setNode(i,o),r!==n.parent(i)&&(a.Rm.warn("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(a.Rm.debug("Setting parent",i,e),t.setParent(i,e)):(a.Rm.info("In copy ",e,"root",r,"data",n.node(e),r),a.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const d=n.edges(i);a.Rm.debug("Copying Edges",d),d.forEach((i=>{a.Rm.info("Edge",i);const o=n.edge(i.v,i.w,i.name);a.Rm.info("Edge data",o,r);try{u(i,r)?(a.Rm.info("Copying as ",i.v,i.w,o,i.name),t.setEdge(i.v,i.w,o,i.name),a.Rm.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):a.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(e){a.Rm.error(e)}}))}a.Rm.debug("Removing node",i),n.removeNode(i)}))}),"copy"),m=(0,a.K2)(((e,n)=>{const t=n.children(e);let r=[...t];for(const i of t)l.set(i,e),r=[...r,...m(i,n)];return r}),"extractDescendants"),w=(0,a.K2)(((e,n,t)=>{const r=e.edges().filter((e=>e.v===n||e.w===n)),i=e.edges().filter((e=>e.v===t||e.w===t)),a=r.map((e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w}))),o=i.map((e=>({v:e.v,w:e.w})));return a.filter((e=>o.some((n=>e.v===n.v&&e.w===n.w))))}),"findCommonEdges"),R=(0,a.K2)(((e,n,t)=>{const r=n.children(e);if(a.Rm.trace("Searching children of id ",e,r),r.length<1)return e;let i;for(const e of r){const r=R(e,n,t),a=w(n,t,r);if(r){if(!(a.length>0))return r;i=r}}return i}),"findNonClusterChild"),v=(0,a.K2)((e=>c.has(e)&&c.get(e).externalConnections&&c.has(e)?c.get(e).id:e),"getAnchorId"),y=(0,a.K2)(((e,n)=>{if(!e||n>10)a.Rm.debug("Opting out, no graph ");else{a.Rm.debug("Opting in, graph "),e.nodes().forEach((function(n){e.children(n).length>0&&(a.Rm.warn("Cluster identified",n," Replacement id in edges: ",R(n,e,n)),g.set(n,m(n,e)),c.set(n,{id:R(n,e,n),clusterData:e.node(n)}))})),e.nodes().forEach((function(n){const t=e.children(n),r=e.edges();t.length>0?(a.Rm.debug("Cluster identified",n,g),r.forEach((e=>{h(e.v,n)^h(e.w,n)&&(a.Rm.warn("Edge: ",e," leaves cluster ",n),a.Rm.warn("Descendants of XXX ",n,": ",g.get(n)),c.get(n).externalConnections=!0)}))):a.Rm.debug("Not a cluster ",n,g)}));for(let n of c.keys()){const t=c.get(n).id,r=e.parent(t);r!==n&&c.has(r)&&!c.get(r).externalConnections&&(c.get(n).id=r)}e.edges().forEach((function(n){const t=e.edge(n);a.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),a.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,i=n.w;if(a.Rm.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(a.Rm.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=v(n.v),i=v(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const i=e.parent(r);c.get(i).externalConnections=!0,t.fromCluster=n.v}if(i!==n.w){const r=e.parent(i);c.get(r).externalConnections=!0,t.toCluster=n.w}a.Rm.warn("Fix Replacing with XXX",r,i,n.name),e.setEdge(r,i,t,n.name)}})),a.Rm.warn("Adjusted Graph",d.M(e)),X(e,0),a.Rm.trace(c)}}),"adjustClustersAndEdges"),X=(0,a.K2)(((e,n)=>{if(a.Rm.warn("extractor - ",n,d.M(e),e.children("D")),n>10)return void a.Rm.error("Bailing out");let t=e.nodes(),r=!1;for(const n of t){const t=e.children(n);r=r||t.length>0}if(r){a.Rm.debug("Nodes = ",t,n);for(const r of t)if(a.Rm.debug("Extracting node",r,c,c.has(r)&&!c.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),c.has(r))if(!c.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){a.Rm.warn("Cluster without external connections, without a parent and with children",r,n);let t="TB"===e.graph().rankdir?"LR":"TB";c.get(r)?.clusterData?.dir&&(t=c.get(r).clusterData.dir,a.Rm.warn("Fixing dir",c.get(r).clusterData.dir,t));const i=new s.T({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));a.Rm.warn("Old graph before copy",d.M(e)),p(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:c.get(r).clusterData,label:c.get(r).label,graph:i}),a.Rm.warn("New graph after copy node: (",r,")",d.M(i)),a.Rm.debug("Old graph after copy",d.M(e))}else a.Rm.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!c.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),a.Rm.debug(c);else a.Rm.debug("Not a cluster",r,n);t=e.nodes(),a.Rm.warn("New list of nodes",t);for(const r of t){const t=e.node(r);a.Rm.warn(" Now next level",r,t),t?.clusterNode&&X(t.graph,n+1)}}else a.Rm.debug("Done, no node has children",e.nodes())}),"extractor"),b=(0,a.K2)(((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach((n=>{const r=e.children(n),i=b(e,r);t=[...t,...i]})),t}),"sorter"),E=(0,a.K2)((e=>b(e,e.children())),"sortNodesByHierarchy"),N=(0,a.K2)((async(e,n,t,s,g,l)=>{a.Rm.warn("Graph in recursive render:XAX",d.M(n),g);const f=n.graph().rankdir;a.Rm.trace("Dir in recursive render - dir:",f);const h=e.insert("g").attr("class","root");n.nodes()?a.Rm.info("Recursive render XXX",n.nodes()):a.Rm.info("No nodes found for",n),n.edges().length>0&&a.Rm.info("Recursive edges",n.edge(n.edges()[0]));const u=h.insert("g").attr("class","clusters"),p=h.insert("g").attr("class","edgePaths"),m=h.insert("g").attr("class","edgeLabels"),w=h.insert("g").attr("class","nodes");await Promise.all(n.nodes().map((async function(e){const i=n.node(e);if(void 0!==g){const t=JSON.parse(JSON.stringify(g.clusterData));a.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",t.height,"\nParent cluster",g.height),n.setNode(g.id,t),n.parent(e)||(a.Rm.trace("Setting parent",e,g.id),n.setParent(e,g.id,t))}if(a.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),i?.clusterNode){a.Rm.info("Cluster identified XBX",e,i.width,n.node(e));const{ranksep:o,nodesep:d}=n.graph();i.graph.setGraph({...i.graph.graph(),ranksep:o+25,nodesep:d});const c=await N(w,i.graph,t,s,n.node(e),l),g=c.elem;(0,r.lC)(i,g),i.diff=c.diff||0,a.Rm.info("New compound node after recursive render XAX",e,"width",i.width,"height",i.height),(0,r.U7)(g,i)}else n.children(e).length>0?(a.Rm.trace("Cluster - the non recursive path XBX",e,i.id,i,i.width,"Graph:",n),a.Rm.trace(R(i.id,n)),c.set(i.id,{id:R(i.id,n),node:i})):(a.Rm.trace("Node - the non recursive path XAX",e,w,n.node(e),f),await(0,r.on)(w,n.node(e),{config:l,dir:f}))})));const v=(0,a.K2)((async()=>{const e=n.edges().map((async function(e){const t=n.edge(e.v,e.w,e.name);a.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),a.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),a.Rm.info("Fix",c,"ids:",e.v,e.w,"Translating: ",c.get(e.v),c.get(e.w)),await(0,r.jP)(m,t)}));await Promise.all(e)}),"processEdges");await v(),a.Rm.info("Graph before layout:",JSON.stringify(d.M(n))),a.Rm.info("############################################# XXX"),a.Rm.info("### Layout ### XXX"),a.Rm.info("############################################# XXX"),(0,o.Zp)(n),a.Rm.info("Graph after layout:",JSON.stringify(d.M(n)));let y=0,{subGraphTitleTotalMargin:X}=(0,i.O)(l);return await Promise.all(E(n).map((async function(e){const t=n.node(e);if(a.Rm.info("Position XBX => "+e+": ("+t.x,","+t.y,") width: ",t.width," height: ",t.height),t?.clusterNode)t.y+=X,a.Rm.info("A tainted cluster node XBX1",e,t.id,t.width,t.height,t.x,t.y,n.parent(e)),c.get(t.id).node=t,(0,r.U_)(t);else if(n.children(e).length>0){a.Rm.info("A pure cluster node XBX1",e,t.id,t.x,t.y,t.width,t.height,n.parent(e)),t.height+=X,n.node(t.parentId);const i=t?.padding/2||0,o=t?.labelBBox?.height||0,d=o-i||0;a.Rm.debug("OffsetY",d,"labelHeight",o,"halfPadding",i),await(0,r.U)(u,t),c.get(t.id).node=t}else{const e=n.node(t.parentId);t.y+=X/2,a.Rm.info("A regular node XBX1 - using the padding",t.id,"parent",t.parentId,t.width,t.height,t.x,t.y,"offsetY",t.offsetY,"parent",e,e?.offsetY,t),(0,r.U_)(t)}}))),n.edges().forEach((function(e){const i=n.edge(e);a.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(i),i),i.points.forEach((e=>e.y+=X/2));const o=n.node(e.v);var d=n.node(e.w);const g=(0,r.Jo)(p,i,c,t,o,d,s);(0,r.T_)(i,g)})),n.nodes().forEach((function(e){const t=n.node(e);a.Rm.info(e,t.type,t.diff),t.isGroup&&(y=t.diff)})),a.Rm.warn("Returning from recursive render XAX",h,y),{elem:h,diff:y}}),"recursiveRender"),C=(0,a.K2)((async(e,n)=>{const t=new s.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),i=n.select("g");(0,r.g0)(i,e.markers,e.type,e.diagramId),(0,r.nA)(),(0,r.gh)(),(0,r.IU)(),f(),e.nodes.forEach((e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)})),a.Rm.debug("Edges:",e.edges),e.edges.forEach((e=>{if(e.start===e.end){const n=e.start,r=n+"---"+n+"---1",i=n+"---"+n+"---2",a=t.node(n);t.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(r,a.parentId),t.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(i,a.parentId);const o=structuredClone(e),d=structuredClone(e),s=structuredClone(e);o.label="",o.arrowTypeEnd="none",o.id=n+"-cyclic-special-1",d.arrowTypeEnd="none",d.id=n+"-cyclic-special-mid",s.label="",a.isGroup&&(o.fromCluster=n,s.toCluster=n),s.id=n+"-cyclic-special-2",t.setEdge(n,r,o,n+"-cyclic-special-0"),t.setEdge(r,i,d,n+"-cyclic-special-1"),t.setEdge(i,n,s,n+"-cyc{t.d(n,{M:()=>o});var r=t(9592),i=t(53),a=t(4722);function o(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:d(e),edges:s(e)};return r.A(e.graph())||(n.value=i.A(e.graph())),n}function d(e){return a.A(e.nodes(),(function(n){var t=e.node(n),i=e.parent(n),a={v:n};return r.A(t)||(a.value=t),r.A(i)||(a.parent=i),a}))}function s(e){return a.A(e.edges(),(function(n){var t=e.edge(n),i={v:n.v,w:n.w};return r.A(n.name)||(i.name=n.name),r.A(t)||(i.value=t),i}))}t(1471)},53:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(4507);const i=function(e){return(0,r.A)(e,4)}},1051:(e,n,t)=>{t.r(n),t.d(n,{render:()=>C});var r=t(9022),i=t(8496),a=(t(8252),t(7323),t(798)),o=t(567),d=t(4075),s=t(697),c=new Map,g=new Map,l=new Map,f=(0,a.K2)((()=>{g.clear(),l.clear(),c.clear()}),"clear"),h=(0,a.K2)(((e,n)=>{const t=g.get(n)||[];return a.Rm.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)}),"isDescendant"),m=(0,a.K2)(((e,n)=>{const t=g.get(n)||[];return a.Rm.info("Descendants of ",n," is ",t),a.Rm.info("Edge is ",e),e.v!==n&&e.w!==n&&(t?t.includes(e.v)||h(e.v,n)||h(e.w,n)||t.includes(e.w):(a.Rm.debug("Tilt, ",n,",not in descendants"),!1))}),"edgeInCluster"),u=(0,a.K2)(((e,n,t,r)=>{a.Rm.warn("Copying children of ",e,"root",r,"data",n.node(e),r);const i=n.children(e)||[];e!==r&&i.push(e),a.Rm.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach((i=>{if(n.children(i).length>0)u(i,n,t,r);else{const o=n.node(i);a.Rm.info("cp ",i," to ",r," with parent ",e),t.setNode(i,o),r!==n.parent(i)&&(a.Rm.warn("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(a.Rm.debug("Setting parent",i,e),t.setParent(i,e)):(a.Rm.info("In copy ",e,"root",r,"data",n.node(e),r),a.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const d=n.edges(i);a.Rm.debug("Copying Edges",d),d.forEach((i=>{a.Rm.info("Edge",i);const o=n.edge(i.v,i.w,i.name);a.Rm.info("Edge data",o,r);try{m(i,r)?(a.Rm.info("Copying as ",i.v,i.w,o,i.name),t.setEdge(i.v,i.w,o,i.name),a.Rm.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):a.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(e){a.Rm.error(e)}}))}a.Rm.debug("Removing node",i),n.removeNode(i)}))}),"copy"),p=(0,a.K2)(((e,n)=>{const t=n.children(e);let r=[...t];for(const i of t)l.set(i,e),r=[...r,...p(i,n)];return r}),"extractDescendants"),w=(0,a.K2)(((e,n,t)=>{const r=e.edges().filter((e=>e.v===n||e.w===n)),i=e.edges().filter((e=>e.v===t||e.w===t)),a=r.map((e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w}))),o=i.map((e=>({v:e.v,w:e.w})));return a.filter((e=>o.some((n=>e.v===n.v&&e.w===n.w))))}),"findCommonEdges"),R=(0,a.K2)(((e,n,t)=>{const r=n.children(e);if(a.Rm.trace("Searching children of id ",e,r),r.length<1)return e;let i;for(const e of r){const r=R(e,n,t),a=w(n,t,r);if(r){if(!(a.length>0))return r;i=r}}return i}),"findNonClusterChild"),v=(0,a.K2)((e=>c.has(e)&&c.get(e).externalConnections&&c.has(e)?c.get(e).id:e),"getAnchorId"),y=(0,a.K2)(((e,n)=>{if(!e||n>10)a.Rm.debug("Opting out, no graph ");else{a.Rm.debug("Opting in, graph "),e.nodes().forEach((function(n){e.children(n).length>0&&(a.Rm.warn("Cluster identified",n," Replacement id in edges: ",R(n,e,n)),g.set(n,p(n,e)),c.set(n,{id:R(n,e,n),clusterData:e.node(n)}))})),e.nodes().forEach((function(n){const t=e.children(n),r=e.edges();t.length>0?(a.Rm.debug("Cluster identified",n,g),r.forEach((e=>{h(e.v,n)^h(e.w,n)&&(a.Rm.warn("Edge: ",e," leaves cluster ",n),a.Rm.warn("Descendants of XXX ",n,": ",g.get(n)),c.get(n).externalConnections=!0)}))):a.Rm.debug("Not a cluster ",n,g)}));for(let n of c.keys()){const t=c.get(n).id,r=e.parent(t);r!==n&&c.has(r)&&!c.get(r).externalConnections&&(c.get(n).id=r)}e.edges().forEach((function(n){const t=e.edge(n);a.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),a.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,i=n.w;if(a.Rm.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)&&c.get(n.w)&&c.get(n.v)===c.get(n.w)){a.Rm.warn("Fixing and trying link to self - removing XXX",n.v,n.w,n.name),a.Rm.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=v(n.v),i=v(n.w),e.removeEdge(n.v,n.w,n.name);const o=n.w+"---"+n.v+"---1",d=n.w+"---"+n.v+"---2";e.setNode(o,{domId:o,id:o,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),e.setNode(d,{domId:d,id:d,labelStyle:"",padding:0,shape:"labelRect",style:"",width:10,height:10});const s=structuredClone(t),c=structuredClone(t),g=structuredClone(t);s.label="",s.arrowTypeEnd="none",s.id=n.name+"-cyclic-special-1",c.arrowTypeEnd="none",c.id=n.name+"-cyclic-special-mid",g.label="",s.fromCluster=n.v,g.toCluster=n.v,g.id=n.name+"-cyclic-special-2",e.setEdge(r,o,s,n.name+"-cyclic-special-0"),e.setEdge(o,d,c,n.name+"-cyclic-special-1"),e.setEdge(d,i,g,n.name+"-cyclic-special-2")}else if(c.get(n.v)||c.get(n.w)){if(a.Rm.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=v(n.v),i=v(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const i=e.parent(r);c.get(i).externalConnections=!0,t.fromCluster=n.v}if(i!==n.w){const r=e.parent(i);c.get(r).externalConnections=!0,t.toCluster=n.w}a.Rm.warn("Fix Replacing with XXX",r,i,n.name),e.setEdge(r,i,t,n.name)}})),a.Rm.warn("Adjusted Graph",d.M(e)),X(e,0),a.Rm.trace(c)}}),"adjustClustersAndEdges"),X=(0,a.K2)(((e,n)=>{if(a.Rm.warn("extractor - ",n,d.M(e),e.children("D")),n>10)return void a.Rm.error("Bailing out");let t=e.nodes(),r=!1;for(const n of t){const t=e.children(n);r=r||t.length>0}if(r){a.Rm.debug("Nodes = ",t,n);for(const r of t)if(a.Rm.debug("Extracting node",r,c,c.has(r)&&!c.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),c.has(r))if(!c.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){a.Rm.warn("Cluster without external connections, without a parent and with children",r,n);let t="TB"===e.graph().rankdir?"LR":"TB";c.get(r)?.clusterData?.dir&&(t=c.get(r).clusterData.dir,a.Rm.warn("Fixing dir",c.get(r).clusterData.dir,t));const i=new s.T({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));a.Rm.warn("Old graph before copy",d.M(e)),u(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:c.get(r).clusterData,label:c.get(r).label,graph:i}),a.Rm.warn("New graph after copy node: (",r,")",d.M(i)),a.Rm.debug("Old graph after copy",d.M(e))}else a.Rm.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!c.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),a.Rm.debug(c);else a.Rm.debug("Not a cluster",r,n);t=e.nodes(),a.Rm.warn("New list of nodes",t);for(const r of t){const t=e.node(r);a.Rm.warn(" Now next level",r,t),t.clusterNode&&X(t.graph,n+1)}}else a.Rm.debug("Done, no node has children",e.nodes())}),"extractor"),E=(0,a.K2)(((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach((n=>{const r=e.children(n),i=E(e,r);t=[...t,...i]})),t}),"sorter"),b=(0,a.K2)((e=>E(e,e.children())),"sortNodesByHierarchy"),N=(0,a.K2)((async(e,n,t,s,g,l)=>{a.Rm.info("Graph in recursive render: XXX",d.M(n),g);const f=n.graph().rankdir;a.Rm.trace("Dir in recursive render - dir:",f);const h=e.insert("g").attr("class","root");n.nodes()?a.Rm.info("Recursive render XXX",n.nodes()):a.Rm.info("No nodes found for",n),n.edges().length>0&&a.Rm.info("Recursive edges",n.edge(n.edges()[0]));const m=h.insert("g").attr("class","clusters"),u=h.insert("g").attr("class","edgePaths"),p=h.insert("g").attr("class","edgeLabels"),w=h.insert("g").attr("class","nodes");await Promise.all(n.nodes().map((async function(e){const i=n.node(e);if(void 0!==g){const t=JSON.parse(JSON.stringify(g.clusterData));a.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",t.height,"\nParent cluster",g.height),n.setNode(g.id,t),n.parent(e)||(a.Rm.trace("Setting parent",e,g.id),n.setParent(e,g.id,t))}if(a.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),i?.clusterNode){a.Rm.info("Cluster identified XBX",e,i.width,n.node(e));const{ranksep:o,nodesep:d}=n.graph();i.graph.setGraph({...i.graph.graph(),ranksep:o+25,nodesep:d});const c=await N(w,i.graph,t,s,n.node(e),l),g=c.elem;(0,r.lC)(i,g),i.diff=c.diff||0,a.Rm.info("New compound node after recursive render XAX",e,"width",i.width,"height",i.height),(0,r.U7)(g,i)}else n.children(e).length>0?(a.Rm.info("Cluster - the non recursive path XBX",e,i.id,i,i.width,"Graph:",n),a.Rm.info(R(i.id,n)),c.set(i.id,{id:R(i.id,n),node:i})):(a.Rm.trace("Node - the non recursive path XAX",e,i.id,i),await(0,r.on)(w,n.node(e),f))})));const v=(0,a.K2)((async()=>{const e=n.edges().map((async function(e){const t=n.edge(e.v,e.w,e.name);a.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),a.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),a.Rm.info("Fix",c,"ids:",e.v,e.w,"Translating: ",c.get(e.v),c.get(e.w)),await(0,r.jP)(p,t)}));await Promise.all(e)}),"processEdges");await v(),a.Rm.info("Graph before layout:",JSON.stringify(d.M(n))),a.Rm.info("############################################# XXX"),a.Rm.info("### Layout ### XXX"),a.Rm.info("############################################# XXX"),(0,o.Zp)(n),a.Rm.info("Graph after layout:",JSON.stringify(d.M(n)));let y=0,{subGraphTitleTotalMargin:X}=(0,i.O)(l);return await Promise.all(b(n).map((async function(e){const t=n.node(e);if(a.Rm.info("Position XBX => "+e+": ("+t.x,","+t.y,") width: ",t.width," height: ",t.height),t?.clusterNode)t.y+=X,a.Rm.info("A tainted cluster node XBX1",e,t.id,t.width,t.height,t.x,t.y,n.parent(e)),c.get(t.id).node=t,(0,r.U_)(t);else if(n.children(e).length>0){a.Rm.info("A pure cluster node XBX1",e,t.id,t.x,t.y,t.width,t.height,n.parent(e)),t.height+=X,n.node(t.parentId);const i=t?.padding/2||0,o=t?.labelBBox?.height||0,d=o-i||0;a.Rm.debug("OffsetY",d,"labelHeight",o,"halfPadding",i),await(0,r.U)(m,t),c.get(t.id).node=t}else{const e=n.node(t.parentId);t.y+=X/2,a.Rm.info("A regular node XBX1 - using the padding",t.id,"parent",t.parentId,t.width,t.height,t.x,t.y,"offsetY",t.offsetY,"parent",e,e?.offsetY,t),(0,r.U_)(t)}}))),n.edges().forEach((function(e){const i=n.edge(e);a.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(i),i),i.points.forEach((e=>e.y+=X/2));const o=n.node(e.v);var d=n.node(e.w);const g=(0,r.Jo)(u,i,c,t,o,d,s);(0,r.T_)(i,g)})),n.nodes().forEach((function(e){const t=n.node(e);a.Rm.info(e,t.type,t.diff),t.isGroup&&(y=t.diff)})),a.Rm.warn("Returning from recursive render XAX",h,y),{elem:h,diff:y}}),"recursiveRender"),C=(0,a.K2)((async(e,n)=>{const t=new s.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),i=n.select("g");(0,r.g0)(i,e.markers,e.type,e.diagramId),(0,r.nA)(),(0,r.gh)(),(0,r.IU)(),f(),e.nodes.forEach((e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)})),a.Rm.debug("Edges:",e.edges),e.edges.forEach((e=>{t.setEdge(e.start,e.end,{...e},e.id)})),a.Rm.warn("Graph at first:",JSON.stringify(d.M(t))),y(t),a.Rm.warn("Graph after:",JSON.stringify(d.M(t)));const o=(0,a.D7)();await N(i,t,e.type,e.diagramId,void 0,o)}),"render")}}]); \ No newline at end of file diff --git a/js/533-e75dcf61.chunk.min.js b/js/533-e75dcf61.chunk.min.js deleted file mode 100644 index 48b580f..0000000 --- a/js/533-e75dcf61.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[533],{5533:(e,t,i)=>{i.d(t,{diagram:()=>Y});var n=i(798),r=i(4852),s=i(567),a=i(697),l=function(){var e=(0,n.K2)((function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i}),"o"),t=[1,3],i=[1,4],r=[1,5],s=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],l=[1,18],o=[2,7],h=[1,22],c=[1,23],u=[1,24],d=[1,25],y=[1,26],p=[1,27],_=[1,20],g=[1,28],E=[1,29],R=[62,63],m=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],f=[1,47],I=[1,48],S=[1,49],k=[1,50],N=[1,51],b=[1,52],T=[1,53],x=[53,54],w=[1,64],A=[1,60],q=[1,61],v=[1,62],K=[1,63],$=[1,65],O=[1,69],L=[1,70],C=[1,67],M=[1,68],F=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],D={trace:(0,n.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:(0,n.K2)((function(e,t,i,n,r,s,a){var l=s.length-1;switch(r){case 4:this.$=s[l].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[l].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[l-3],s[l-4]);break;case 14:n.setNewReqId(s[l-2]);break;case 15:n.setNewReqText(s[l-2]);break;case 16:n.setNewReqRisk(s[l-2]);break;case 17:n.setNewReqVerifyMethod(s[l-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[l-3]);break;case 34:n.setNewElementType(s[l-2]);break;case 35:n.setNewElementDocRef(s[l-2]);break;case 38:n.addRelationship(s[l-2],s[l],s[l-4]);break;case 39:n.addRelationship(s[l-2],s[l-4],s[l]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}}),"anonymous"),table:[{3:1,4:2,6:t,9:i,11:r,13:s},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:i,11:r,13:s},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:i,11:r,13:s},{1:[2,2]},{4:17,5:l,7:13,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:l,7:31,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:32,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:33,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:34,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:35,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(R,[2,20]),e(R,[2,21]),e(R,[2,22]),e(R,[2,23]),e(R,[2,24]),e(R,[2,25]),e(m,[2,49]),e(m,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:f,56:I,57:S,58:k,59:N,60:b,61:T},{52:54,55:f,56:I,57:S,58:k,59:N,60:b,61:T},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(x,[2,40]),e(x,[2,41]),e(x,[2,42]),e(x,[2,43]),e(x,[2,44]),e(x,[2,45]),e(x,[2,46]),{54:[1,58]},{5:w,20:59,21:A,24:q,26:v,28:K,30:$},{5:O,30:L,46:66,47:C,49:M},{23:71,62:g,63:E},{23:72,62:g,63:E},e(F,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:w,20:77,21:A,24:q,26:v,28:K,30:$},e(F,[2,19]),e(F,[2,33]),{22:[1,78]},{22:[1,79]},{5:O,30:L,46:80,47:C,49:M},e(F,[2,37]),e(F,[2,38]),e(F,[2,39]),{23:81,62:g,63:E},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(F,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(F,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:w,20:106,21:A,24:q,26:v,28:K,30:$},{5:w,20:107,21:A,24:q,26:v,28:K,30:$},{5:w,20:108,21:A,24:q,26:v,28:K,30:$},{5:w,20:109,21:A,24:q,26:v,28:K,30:$},{5:O,30:L,46:110,47:C,49:M},{5:O,30:L,46:111,47:C,49:M},e(F,[2,14]),e(F,[2,15]),e(F,[2,16]),e(F,[2,17]),e(F,[2,34]),e(F,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:(0,n.K2)((function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)}),"parseError"),parse:(0,n.K2)((function(e){var t=this,i=[0],r=[],s=[null],a=[],l=this.table,o="",h=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(e,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;a.push(g);var E=y.options&&y.options.ranges;function R(){var e;return"number"!=typeof(e=r.pop()||y.lex()||1)&&(e instanceof Array&&(e=(r=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)((function(e){i.length=i.length-2*e,s.length=s.length-e,a.length=a.length-e}),"popStack"),(0,n.K2)(R,"lex");for(var m,f,I,S,k,N,b,T,x,w={};;){if(I=i[i.length-1],this.defaultActions[I]?S=this.defaultActions[I]:(null==m&&(m=R()),S=l[I]&&l[I][m]),void 0===S||!S.length||!S[0]){var A;for(N in x=[],l[I])this.terminals_[N]&&N>2&&x.push("'"+this.terminals_[N]+"'");A=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:x})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+m);switch(S[0]){case 1:i.push(m),s.push(y.yytext),a.push(y.yylloc),i.push(S[1]),m=null,f?(m=f,f=null):(c=y.yyleng,o=y.yytext,h=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(b=this.productions_[S[1]][1],w.$=s[s.length-b],w._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},E&&(w._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(w,[o,c,h,p.yy,S[1],s,a].concat(d))))return k;b&&(i=i.slice(0,-1*b*2),s=s.slice(0,-1*b),a=a.slice(0,-1*b)),i.push(this.productions_[S[1]][0]),s.push(w.$),a.push(w._$),T=l[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:(0,n.K2)((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:(0,n.K2)((function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,n.K2)((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:(0,n.K2)((function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,n.K2)((function(){return this._more=!0,this}),"more"),reject:(0,n.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,n.K2)((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:(0,n.K2)((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,n.K2)((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,n.K2)((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:(0,n.K2)((function(e,t){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:(0,n.K2)((function(){if(this.done)return this.EOF;var e,t,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;st[0].length)){if(t=i,n=s,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,r[s])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,n.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,n.K2)((function(e){this.conditionStack.push(e)}),"begin"),popState:(0,n.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,n.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,n.K2)((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:(0,n.K2)((function(e){this.begin(e)}),"pushState"),stateStackSize:(0,n.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)((function(e,t,i,n){switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return t.yytext=t.yytext.trim(),62}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}}}();function V(){this.yy={}}return D.lexer=P,(0,n.K2)(V,"Parser"),V.prototype=D,D.Parser=V,new V}();l.parser=l;var o=l,h=[],c={},u=new Map,d={},y=new Map,p=(0,n.K2)(((e,t)=>(u.has(e)||u.set(e,{name:e,type:t,id:c.id,text:c.text,risk:c.risk,verifyMethod:c.verifyMethod}),c={},u.get(e))),"addRequirement"),_=(0,n.K2)((()=>u),"getRequirements"),g=(0,n.K2)((e=>{void 0!==c&&(c.id=e)}),"setNewReqId"),E=(0,n.K2)((e=>{void 0!==c&&(c.text=e)}),"setNewReqText"),R=(0,n.K2)((e=>{void 0!==c&&(c.risk=e)}),"setNewReqRisk"),m=(0,n.K2)((e=>{void 0!==c&&(c.verifyMethod=e)}),"setNewReqVerifyMethod"),f=(0,n.K2)((e=>(y.has(e)||(y.set(e,{name:e,type:d.type,docRef:d.docRef}),n.Rm.info("Added new requirement: ",e)),d={},y.get(e))),"addElement"),I=(0,n.K2)((()=>y),"getElements"),S=(0,n.K2)((e=>{void 0!==d&&(d.type=e)}),"setNewElementType"),k=(0,n.K2)((e=>{void 0!==d&&(d.docRef=e)}),"setNewElementDocRef"),N=(0,n.K2)(((e,t,i)=>{h.push({type:e,src:t,dst:i})}),"addRelationship"),b=(0,n.K2)((()=>h),"getRelationships"),T=(0,n.K2)((()=>{h=[],c={},u=new Map,d={},y=new Map,(0,n.IU)()}),"clear"),x={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:(0,n.K2)((()=>(0,n.D7)().req),"getConfig"),addRequirement:p,getRequirements:_,setNewReqId:g,setNewReqText:E,setNewReqRisk:R,setNewReqVerifyMethod:m,setAccTitle:n.SV,getAccTitle:n.iN,setAccDescription:n.EI,getAccDescription:n.m7,addElement:f,getElements:I,setNewElementType:S,setNewElementDocRef:k,addRelationship:N,getRelationships:b,clear:T},w=(0,n.K2)((e=>`\n\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n\n`),"getStyles"),A={CONTAINS:"contains",ARROW:"arrow"},q={ReqMarkers:A,insertLineEndings:(0,n.K2)(((e,t)=>{let i=e.append("defs").append("marker").attr("id",A.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",A.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${t.line_height},${t.line_height/2}\n M${t.line_height},${t.line_height/2}\n L0,${t.line_height}`).attr("stroke-width",1)}),"insertLineEndings")},v={},K=0,$=(0,n.K2)(((e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",v.rect_min_width+"px").attr("height",v.rect_min_height+"px")),"newRectNode"),O=(0,n.K2)(((e,t,i)=>{let n=v.rect_min_width/2,r=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",n).attr("y",v.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((e=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",v.rect_min_width/2).attr("dy",0).text(e):r.append("tspan").attr("text-anchor","middle").attr("x",v.rect_min_width/2).attr("dy",.75*v.line_height).text(e),s++}));let a=1.5*v.rect_padding+s*v.line_height*.75;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",v.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}}),"newTitleNode"),L=(0,n.K2)(((e,t,i,n)=>{let r=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",v.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0,a=[];return i.forEach((e=>{let t=e.length;for(;t>30&&s<3;){let i=e.substring(0,30);t=(e=e.substring(30,e.length)).length,a[a.length]=i,s++}if(3==s){let e=a[a.length-1];a[a.length-1]=e.substring(0,e.length-4)+"..."}else a[a.length]=e;s=0})),a.forEach((e=>{r.append("tspan").attr("x",v.rect_padding).attr("dy",v.line_height).text(e)})),r}),"newBodyNode"),C=(0,n.K2)(((e,t,i,n)=>{const r=t.node().getTotalLength(),s=t.node().getPointAtLength(.5*r),a="rel"+K;K++;const l=e.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();e.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")}),"addEdgeLabel"),M=(0,n.K2)((function(e,t,i,s,a){const l=i.edge(U(t.src),U(t.dst)),o=(0,r.n8j)().x((function(e){return e.x})).y((function(e){return e.y})),h=e.insert("path","#"+s).attr("class","er relationshipLine").attr("d",o(l.points)).attr("fill","none");t.type==a.db.Relationships.CONTAINS?h.attr("marker-start","url("+n.Y2.getUrl(v.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+n.Y2.getUrl(v.arrowMarkerAbsolute)+"#"+q.ReqMarkers.ARROW+"_line_ending)")),C(e,h,v,`<<${t.type}>>`)}),"drawRelationshipFromLayout"),F=(0,n.K2)(((e,t,i)=>{e.forEach(((e,r)=>{r=U(r),n.Rm.info("Added new requirement: ",r);const s=i.append("g").attr("id",r),a=$(s,"req-"+r);let l=[],o=O(s,r+"_title",[`<<${e.type}>>`,`${e.name}`]);l.push(o.titleNode);let h=L(s,r+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],o.y);l.push(h);const c=a.node().getBBox();t.setNode(r,{width:c.width,height:c.height,shape:"rect",id:r})}))}),"drawReqs"),D=(0,n.K2)(((e,t,i)=>{e.forEach(((e,n)=>{const r=U(n),s=i.append("g").attr("id",r),a="element-"+r,l=$(s,a);let o=[],h=O(s,a+"_title",["<>",`${n}`]);o.push(h.titleNode);let c=L(s,a+"_body",[`Type: ${e.type||"Not Specified"}`,`Doc Ref: ${e.docRef||"None"}`],h.y);o.push(c);const u=l.node().getBBox();t.setNode(r,{width:u.width,height:u.height,shape:"rect",id:r})}))}),"drawElements"),P=(0,n.K2)(((e,t)=>(e.forEach((function(e){let i=U(e.src),n=U(e.dst);t.setEdge(i,n,{relationship:e})})),e)),"addRelationships"),V=(0,n.K2)((function(e,t){t.nodes().forEach((function(i){void 0!==i&&void 0!==t.node(i)&&(e.select("#"+i),e.select("#"+i).attr("transform","translate("+(t.node(i).x-t.node(i).width/2)+","+(t.node(i).y-t.node(i).height/2)+" )"))}))}),"adjustEntities"),U=(0,n.K2)((e=>e.replace(/\s/g,"").replace(/\./g,"_")),"elementString"),Y={parser:o,db:x,renderer:{draw:(0,n.K2)(((e,t,i,l)=>{const o=(v=(0,n.D7)().requirement).securityLevel;let h;"sandbox"===o&&(h=(0,r.Ltv)("#i"+t));const c=("sandbox"===o?(0,r.Ltv)(h.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id='${t}']`);q.insertLineEndings(c,v);const u=new a.T({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:v.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let d=l.db.getRequirements(),y=l.db.getElements(),p=l.db.getRelationships();F(d,u,c),D(y,u,c),P(p,u),(0,s.Zp)(u),V(c,u),p.forEach((function(e){M(c,e,u,t,l)}));const _=v.rect_padding,g=c.node().getBBox(),E=g.width+2*_,R=g.height+2*_;(0,n.a$)(c,R,E,v.useMaxWidth),c.attr("viewBox",`${g.x-_} ${g.y-_} ${E} ${R}`)}),"draw")},styles:w}}}]); \ No newline at end of file diff --git a/js/557-be45235e.chunk.min.js b/js/557-be45235e.chunk.min.js deleted file mode 100644 index f149839..0000000 --- a/js/557-be45235e.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[557],{53:(t,r,a)=>{a.d(r,{A:()=>n});var e=a(4507);const n=function(t){return(0,e.A)(t,4)}},1953:(t,r,a)=>{a.d(r,{IU:()=>y,Jo:()=>_,T_:()=>x,g0:()=>p,jP:()=>b});var e=a(6578),n=a(8496),s=a(8252),i=a(7323),d=a(798),o=a(4852),l=(0,d.K2)(((t,r,a,e)=>{r.forEach((r=>{c[r](t,a,e)}))}),"insertMarkers"),c={extension:(0,d.K2)(((t,r,a)=>{d.Rm.trace("Making markers for ",a),t.append("defs").append("marker").attr("id",a+"_"+r+"-extensionStart").attr("class","marker extension "+r).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",a+"_"+r+"-extensionEnd").attr("class","marker extension "+r).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")}),"extension"),composition:(0,d.K2)(((t,r,a)=>{t.append("defs").append("marker").attr("id",a+"_"+r+"-compositionStart").attr("class","marker composition "+r).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"),t.append("defs").append("marker").attr("id",a+"_"+r+"-compositionEnd").attr("class","marker composition "+r).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")}),"composition"),aggregation:(0,d.K2)(((t,r,a)=>{t.append("defs").append("marker").attr("id",a+"_"+r+"-aggregationStart").attr("class","marker aggregation "+r).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"),t.append("defs").append("marker").attr("id",a+"_"+r+"-aggregationEnd").attr("class","marker aggregation "+r).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")}),"aggregation"),dependency:(0,d.K2)(((t,r,a)=>{t.append("defs").append("marker").attr("id",a+"_"+r+"-dependencyStart").attr("class","marker dependency "+r).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"),t.append("defs").append("marker").attr("id",a+"_"+r+"-dependencyEnd").attr("class","marker dependency "+r).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")}),"dependency"),lollipop:(0,d.K2)(((t,r,a)=>{t.append("defs").append("marker").attr("id",a+"_"+r+"-lollipopStart").attr("class","marker lollipop "+r).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",a+"_"+r+"-lollipopEnd").attr("class","marker lollipop "+r).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:(0,d.K2)(((t,r,a)=>{t.append("marker").attr("id",a+"_"+r+"-pointEnd").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+r+"-pointStart").attr("class","marker "+r).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),circle:(0,d.K2)(((t,r,a)=>{t.append("marker").attr("id",a+"_"+r+"-circleEnd").attr("class","marker "+r).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"),t.append("marker").attr("id",a+"_"+r+"-circleStart").attr("class","marker "+r).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")}),"circle"),cross:(0,d.K2)(((t,r,a)=>{t.append("marker").attr("id",a+"_"+r+"-crossEnd").attr("class","marker cross "+r).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"),t.append("marker").attr("id",a+"_"+r+"-crossStart").attr("class","marker cross "+r).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")}),"cross"),barb:(0,d.K2)(((t,r,a)=>{t.append("defs").append("marker").attr("id",a+"_"+r+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb")},p=l,h=(0,d.K2)(((t,r,a,e,n)=>{r.arrowTypeStart&&m(t,"start",r.arrowTypeStart,a,e,n),r.arrowTypeEnd&&m(t,"end",r.arrowTypeEnd,a,e,n)}),"addEdgeMarkers"),g={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},m=(0,d.K2)(((t,r,a,e,n,s)=>{const i=g[a];if(!i)return void d.Rm.warn(`Unknown arrow type: ${a}`);const o="start"===r?"Start":"End";t.attr(`marker-${r}`,`url(${e}#${n}_${s}-${i}${o})`)}),"addEdgeMarker"),k={},f={},y=(0,d.K2)((()=>{k={},f={}}),"clear"),b=(0,d.K2)(((t,r)=>{const a=(0,d.D7)(),n=(0,d._3)(a.flowchart.htmlLabels),i="markdown"===r.labelType?(0,s.GZ)(t,r.label,{style:r.labelStyle,useHtmlLabels:n,addSvgBackground:!0},a):(0,e.DA)(r.label,r.labelStyle),l=t.insert("g").attr("class","edgeLabel"),c=l.insert("g").attr("class","label");c.node().appendChild(i);let p,h=i.getBBox();if(n){const t=i.children[0],r=(0,o.Ltv)(i);h=t.getBoundingClientRect(),r.attr("width",h.width),r.attr("height",h.height)}if(c.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),k[r.id]=l,r.width=h.width,r.height=h.height,r.startLabelLeft){const a=(0,e.DA)(r.startLabelLeft,r.labelStyle),n=t.insert("g").attr("class","edgeTerminals"),s=n.insert("g").attr("class","inner");p=s.node().appendChild(a);const i=a.getBBox();s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),f[r.id]||(f[r.id]={}),f[r.id].startLeft=n,u(p,r.startLabelLeft)}if(r.startLabelRight){const a=(0,e.DA)(r.startLabelRight,r.labelStyle),n=t.insert("g").attr("class","edgeTerminals"),s=n.insert("g").attr("class","inner");p=n.node().appendChild(a),s.node().appendChild(a);const i=a.getBBox();s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),f[r.id]||(f[r.id]={}),f[r.id].startRight=n,u(p,r.startLabelRight)}if(r.endLabelLeft){const a=(0,e.DA)(r.endLabelLeft,r.labelStyle),n=t.insert("g").attr("class","edgeTerminals"),s=n.insert("g").attr("class","inner");p=s.node().appendChild(a);const i=a.getBBox();s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),n.node().appendChild(a),f[r.id]||(f[r.id]={}),f[r.id].endLeft=n,u(p,r.endLabelLeft)}if(r.endLabelRight){const a=(0,e.DA)(r.endLabelRight,r.labelStyle),n=t.insert("g").attr("class","edgeTerminals"),s=n.insert("g").attr("class","inner");p=s.node().appendChild(a);const i=a.getBBox();s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),n.node().appendChild(a),f[r.id]||(f[r.id]={}),f[r.id].endRight=n,u(p,r.endLabelRight)}return i}),"insertEdgeLabel");function u(t,r){(0,d.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*r.length+"px",t.style.height="12px")}(0,d.K2)(u,"setTerminalWidth");var x=(0,d.K2)(((t,r)=>{d.Rm.debug("Moving label abc88 ",t.id,t.label,k[t.id],r);let a=r.updatedPath?r.updatedPath:r.originalPath;const e=(0,d.D7)(),{subGraphTitleTotalMargin:s}=(0,n.O)(e);if(t.label){const e=k[t.id];let n=t.x,o=t.y;if(a){const e=i._K.calcLabelPosition(a);d.Rm.debug("Moving label "+t.label+" from (",n,",",o,") to (",e.x,",",e.y,") abc88"),r.updatedPath&&(n=e.x,o=e.y)}e.attr("transform",`translate(${n}, ${o+s/2})`)}if(t.startLabelLeft){const r=f[t.id].startLeft;let e=t.x,n=t.y;if(a){const r=i._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",a);e=r.x,n=r.y}r.attr("transform",`translate(${e}, ${n})`)}if(t.startLabelRight){const r=f[t.id].startRight;let e=t.x,n=t.y;if(a){const r=i._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",a);e=r.x,n=r.y}r.attr("transform",`translate(${e}, ${n})`)}if(t.endLabelLeft){const r=f[t.id].endLeft;let e=t.x,n=t.y;if(a){const r=i._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",a);e=r.x,n=r.y}r.attr("transform",`translate(${e}, ${n})`)}if(t.endLabelRight){const r=f[t.id].endRight;let e=t.x,n=t.y;if(a){const r=i._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",a);e=r.x,n=r.y}r.attr("transform",`translate(${e}, ${n})`)}}),"positionEdgeLabel"),w=(0,d.K2)(((t,r)=>{const a=t.x,e=t.y,n=Math.abs(r.x-a),s=Math.abs(r.y-e),i=t.width/2,d=t.height/2;return n>=i||s>=d}),"outsideNode"),L=(0,d.K2)(((t,r,a)=>{d.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(r)}\n insidePoint : ${JSON.stringify(a)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const e=t.x,n=t.y,s=Math.abs(e-a.x),i=t.width/2;let o=a.xMath.abs(e-r.x)*l){let t=a.y{d.Rm.debug("abc88 cutPathAtIntersect",t,r);let a=[],e=t[0],n=!1;return t.forEach((t=>{if(w(r,t)||n)e=t,n||a.push(t);else{const s=L(r,e,t);let i=!1;a.forEach((t=>{i=i||t.x===s.x&&t.y===s.y})),a.some((t=>t.x===s.x&&t.y===s.y))||a.push(s),n=!0}})),a}),"cutPathAtIntersect"),_=(0,d.K2)((function(t,r,a,e,s,i,l){let c=a.points;d.Rm.debug("abc88 InsertEdge: edge=",a,"e=",r);let p=!1;const g=i.node(r.v);var m=i.node(r.w);m?.intersect&&g?.intersect&&(c=c.slice(1,a.points.length-1),c.unshift(g.intersect(c[0])),c.push(m.intersect(c[c.length-1]))),a.toCluster&&(d.Rm.debug("to cluster abc88",e[a.toCluster]),c=M(a.points,e[a.toCluster].node),p=!0),a.fromCluster&&(d.Rm.debug("from cluster abc88",e[a.fromCluster]),c=M(c.reverse(),e[a.fromCluster].node).reverse(),p=!0);const k=c.filter((t=>!Number.isNaN(t.y)));let f=o.qrM;!a.curve||"graph"!==s&&"flowchart"!==s||(f=a.curve);const{x:y,y:b}=(0,n.R)(a),u=(0,o.n8j)().x(y).y(b).curve(f);let x;switch(a.thickness){case"normal":x="edge-thickness-normal";break;case"thick":case"invisible":x="edge-thickness-thick";break;default:x=""}switch(a.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed"}const w=t.append("path").attr("d",u(k)).attr("id",a.id).attr("class"," "+x+(a.classes?" "+a.classes:"")).attr("style",a.style);let L="";((0,d.D7)().flowchart.arrowMarkerAbsolute||(0,d.D7)().state.arrowMarkerAbsolute)&&(L=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,L=L.replace(/\(/g,"\\("),L=L.replace(/\)/g,"\\)")),h(w,a,L,l,s);let _={};return p&&(_.updatedPath=c),_.originalPath=a.points,_}),"insertEdge")}}]); \ No newline at end of file diff --git a/js/564-301f7508.chunk.min.js b/js/564-301f7508.chunk.min.js new file mode 100644 index 0000000..f75df9a --- /dev/null +++ b/js/564-301f7508.chunk.min.js @@ -0,0 +1 @@ +(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[564],{7375:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(r)}}}()},445:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=r.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,y=s.week,k=new Date,m=o||(r||a?1:k.getDate()),p=r||k.getFullYear(),g=0;r&&!a||(g=a>0?a-1:k.getMonth());var b,T=c||0,v=l||0,x=d||0,w=u||0;return h?new Date(Date.UTC(p,g,m,T,v,x,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,m,T,v,x,w)):(b=new Date(p,g,m,T,v,x,w),y&&(b=i(b).week(y).toDate()),b)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,y=1;y<=h;y+=1){r[1]=o[y-1];var k=n.apply(this,r);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}y===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()},8313:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},2564:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>Yt});var i=n(5522),s=n(32),r=n(6750),a=n(4353),o=n(8313),c=n(445),l=n(7375),d=n(4852),u=function(){var t=(0,s.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],y=[1,11],k=[1,12],m=[1,13],p=[1,14],g=[1,15],b=[1,16],T=[1,19],v=[1,20],x=[1,21],w=[1,22],_=[1,23],D=[1,25],$=[1,35],C={trace:(0,s.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,s.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:k,26:m,27:p,28:g,29:b,30:T,31:v,33:x,35:w,36:_,37:24,38:D,40:$},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:k,26:m,27:p,28:g,29:b,30:T,31:v,33:x,35:w,36:_,37:24,38:D,40:$},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,d=0,u=0,h=a.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(y.yy[k]=this.yy[k]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var m=f.yylloc;a.push(m);var p=f.options&&f.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||f.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,s.K2)(g,"lex");for(var b,T,v,x,w,_,D,$,C,S={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==b&&(b=g()),x=o[v]&&o[v][b]),void 0===x||!x.length||!x[0]){var K;for(_ in C=[],o[v])this.terminals_[_]&&_>2&&C.push("'"+this.terminals_[_]+"'");K=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(K,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:m,expected:C})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+b);switch(x[0]){case 1:n.push(b),r.push(f.yytext),a.push(f.yylloc),n.push(x[1]),b=null,T?(b=T,T=null):(d=f.yyleng,c=f.yytext,l=f.yylineno,m=f.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[x[1]][1],S.$=r[r.length-D],S._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},p&&(S._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(S,[c,d,l,y.yy,x[1],r,a].concat(h))))return w;D&&(n=n.slice(0,-1*D*2),r=r.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[x[1]][0]),r.push(S.$),a.push(S._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},S=function(){return{EOF:1,parseError:(0,s.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,s.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,s.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,s.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,s.K2)((function(){return this._more=!0,this}),"more"),reject:(0,s.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,s.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,s.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,s.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,s.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,s.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,s.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,s.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,s.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,s.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,s.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,s.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)((function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}}),"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function K(){this.yy={}}return C.lexer=S,(0,s.K2)(K,"Parser"),K.prototype=C,C.Parser=K,new K}();u.parser=u;var h=u;a.extend(o),a.extend(c),a.extend(l);var f,y,k={friday:5,saturday:6},m="",p="",g=void 0,b="",T=[],v=[],x=new Map,w=[],_=[],D="",$="",C=["active","done","crit","milestone"],S=[],K=!1,E=!1,M="sunday",A="saturday",L=0,Y=(0,s.K2)((function(){w=[],_=[],D="",S=[],ht=0,f=void 0,y=void 0,mt=[],m="",p="",$="",g=void 0,b="",T=[],v=[],K=!1,E=!1,L=0,x=new Map,(0,s.IU)(),M="sunday",A="saturday"}),"clear"),I=(0,s.K2)((function(t){p=t}),"setAxisFormat"),W=(0,s.K2)((function(){return p}),"getAxisFormat"),F=(0,s.K2)((function(t){g=t}),"setTickInterval"),O=(0,s.K2)((function(){return g}),"getTickInterval"),P=(0,s.K2)((function(t){b=t}),"setTodayMarker"),B=(0,s.K2)((function(){return b}),"getTodayMarker"),z=(0,s.K2)((function(t){m=t}),"setDateFormat"),N=(0,s.K2)((function(){K=!0}),"enableInclusiveEndDates"),G=(0,s.K2)((function(){return K}),"endDatesAreInclusive"),H=(0,s.K2)((function(){E=!0}),"enableTopAxis"),R=(0,s.K2)((function(){return E}),"topAxisEnabled"),j=(0,s.K2)((function(t){$=t}),"setDisplayMode"),U=(0,s.K2)((function(){return $}),"getDisplayMode"),V=(0,s.K2)((function(){return m}),"getDateFormat"),Z=(0,s.K2)((function(t){T=t.toLowerCase().split(/[\s,]+/)}),"setIncludes"),X=(0,s.K2)((function(){return T}),"getIncludes"),q=(0,s.K2)((function(t){v=t.toLowerCase().split(/[\s,]+/)}),"setExcludes"),Q=(0,s.K2)((function(){return v}),"getExcludes"),J=(0,s.K2)((function(){return x}),"getLinks"),tt=(0,s.K2)((function(t){D=t,w.push(t)}),"addSection"),et=(0,s.K2)((function(){return w}),"getSections"),nt=(0,s.K2)((function(){let t=vt(),e=0;for(;!t&&e<10;)t=vt(),e++;return _=mt}),"getTasks"),it=(0,s.K2)((function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!(!n.includes("weekends")||t.isoWeekday()!==k[A]&&t.isoWeekday()!==k[A]+1)||!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim())))}),"isInvalidDate"),st=(0,s.K2)((function(t){M=t}),"setWeekday"),rt=(0,s.K2)((function(){return M}),"getWeekday"),at=(0,s.K2)((function(t){A=t}),"setWeekend"),ot=(0,s.K2)((function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?a(t.startTime):a(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?a(t.endTime):a(t.endTime,e,!0);const[o,c]=ct(s,r,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c}),"checkTaskDates"),ct=(0,s.K2)((function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=it(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]}),"fixTaskDates"),lt=(0,s.K2)((function(t,e,n){n=n.trim();const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const e of i.groups.ids.split(" ")){let n=bt(e);void 0!==n&&(!t||n.endTime>t.endTime)&&(t=n)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let r=a(n,e.trim(),!0);if(r.isValid())return r.toDate();{s.Rm.debug("Invalid date:"+n),s.Rm.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}}),"getStartDate"),dt=(0,s.K2)((function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]}),"parseDuration"),ut=(0,s.K2)((function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const e of s.groups.ids.split(" ")){let n=bt(e);void 0!==n&&(!t||n.startTime{window.open(n,"_self")})),x.set(t,n))})),wt(t,"clickable")}),"setLink"),wt=(0,s.K2)((function(t,e){t.split(",").forEach((function(t){let n=bt(t);void 0!==n&&n.classes.push(e)}))}),"setClass"),_t=(0,s.K2)((function(t,e,n){if("loose"!==(0,s.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{i._K.runFunc(e,...r)}))}),"setClickFun"),Dt=(0,s.K2)((function(t,e){S.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))}),"pushFun"),$t=(0,s.K2)((function(t,e,n){t.split(",").forEach((function(t){_t(t,e,n)})),wt(t,"clickable")}),"setClickEvent"),Ct=(0,s.K2)((function(t){S.forEach((function(e){e(t)}))}),"bindFunctions"),St={getConfig:(0,s.K2)((()=>(0,s.D7)().gantt),"getConfig"),clear:Y,setDateFormat:z,getDateFormat:V,enableInclusiveEndDates:N,endDatesAreInclusive:G,enableTopAxis:H,topAxisEnabled:R,setAxisFormat:I,getAxisFormat:W,setTickInterval:F,getTickInterval:O,setTodayMarker:P,getTodayMarker:B,setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setDisplayMode:j,getDisplayMode:U,setAccDescription:s.EI,getAccDescription:s.m7,addSection:tt,getSections:et,getTasks:nt,addTask:gt,findTaskById:bt,addTaskOrg:Tt,setIncludes:Z,getIncludes:X,setExcludes:q,getExcludes:Q,setClickEvent:$t,setLink:xt,getLinks:J,bindFunctions:Ct,parseDuration:dt,isInvalidDate:it,setWeekday:st,getWeekday:rt,setWeekend:at};function Kt(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)}))}(0,s.K2)(Kt,"getTaskTags");var Et,Mt=(0,s.K2)((function(){s.Rm.debug("Something is calling, setConf, remove the call")}),"setConf"),At={monday:d.ABi,tuesday:d.PGu,wednesday:d.GuW,thursday:d.Mol,friday:d.TUC,saturday:d.rGn,sunday:d.YPH},Lt=(0,s.K2)(((t,e)=>{let n=[...t].map((()=>-1/0)),i=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),s=0;for(const t of i)for(let i=0;i=n[i]){n[i]=t.endTime,t.order=i+e,i>s&&(s=i);break}return s}),"getMaxIntersections"),Yt={parser:h,db:St,renderer:{setConf:Mt,draw:(0,s.K2)((function(t,e,n,i){const r=(0,s.D7)().gantt,o=(0,s.D7)().securityLevel;let c;"sandbox"===o&&(c=(0,d.Ltv)("#i"+e));const l="sandbox"===o?(0,d.Ltv)(c.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),u="sandbox"===o?c.nodes()[0].contentDocument:document,h=u.getElementById(e);void 0===(Et=h.parentElement.offsetWidth)&&(Et=1200),void 0!==r.useWidth&&(Et=r.useWidth);const f=i.db.getTasks();let y=[];for(const t of f)y.push(t.type);y=$(y);const k={};let m=2*r.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===r.displayMode){const t={};for(const e of f)void 0===t[e.section]?t[e.section]=[e]:t[e.section].push(e);let e=0;for(const n of Object.keys(t)){const i=Lt(t[n],e)+1;e+=i,m+=i*(r.barHeight+r.barGap),k[n]=i}}else{m+=f.length*(r.barHeight+r.barGap);for(const t of y)k[t]=f.filter((e=>e.type===t)).length}h.setAttribute("viewBox","0 0 "+Et+" "+m);const p=l.select(`[id="${e}"]`),g=(0,d.w7C)().domain([(0,d.jkA)(f,(function(t){return t.startTime})),(0,d.T9B)(f,(function(t){return t.endTime}))]).rangeRound([0,Et-r.leftPadding-r.rightPadding]);function b(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nt.order)))].map((e=>t.find((t=>t.order===e))));p.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+a-2})).attr("width",(function(){return u-r.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const f=p.append("g").selectAll("rect").data(t).enter(),k=i.db.getLinks();if(f.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+o+.5*(g(t.endTime)-g(t.startTime))-.5*c:g(t.startTime)+o})).attr("y",(function(t,e){return t.order*n+a})).attr("width",(function(t){return t.milestone?c:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",c).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+o+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+a+.5*c).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[e,i]of y.entries())t.type===i&&(n=e%r.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,i+=" "+e,"task"+i})),f.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*c),t.milestone&&(n=e+c);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>u?e+o-5:n+o+5:(n-e)/2+e+o})).attr("y",(function(t,e){return t.order*n+r.barHeight/2+(r.fontSize/2-2)+a})).attr("text-height",c).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[e,n]of y.entries())t.type===n&&(a=e%r.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+a:"activeText"+a),t.done?o=t.crit?o+" doneCritText"+a:o+" doneText"+a:t.crit&&(o=o+" critText"+a),t.milestone&&(o+=" milestoneText"),i>n-e?n+i+1.5*r.leftPadding>u?s+" taskTextOutsideLeft taskTextOutside"+a+" "+o:s+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:s+" taskText taskText"+a+" "+o+" width-"+i})),"sandbox"===(0,s.D7)().securityLevel){let t;t=(0,d.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;f.filter((function(t){return k.has(t.id)})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",k.get(t.id)),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)}))}}function x(t,e,n,o,c,l,d,u){if(0===d.length&&0===u.length)return;let h,f;for(const{startTime:t,endTime:e}of l)(void 0===h||tf)&&(f=e);if(!h||!f)return;if(a(f).diff(a(h),"year")>5)return void s.Rm.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),k=[];let m=null,b=a(h);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,y,d,u)?m?m.end=b:m={start:b,end:b}:m&&(k.push(m),m=null),b=b.add(1,"d");p.append("g").selectAll("rect").data(k).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",c-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*c).toString()+"px"})).attr("class","exclude-range")}function w(t,e,n,s){let a=(0,d.l78)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,d.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||r.tickInterval);if(null!==o){const t=o[1],e=o[2],n=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":a.ticks(d.t6C.every(t));break;case"second":a.ticks(d.ucG.every(t));break;case"minute":a.ticks(d.wXd.every(t));break;case"hour":a.ticks(d.Agd.every(t));break;case"day":a.ticks(d.UAC.every(t));break;case"week":a.ticks(At[n].every(t));break;case"month":a.ticks(d.Ui6.every(t))}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||r.topAxis){let n=(0,d.tlR)(g).tickSize(-s+e+r.gridLineStartPadding).tickFormat((0,d.DCK)(i.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],s=i.db.getWeekday()||r.weekday;switch(e){case"millisecond":n.ticks(d.t6C.every(t));break;case"second":n.ticks(d.ucG.every(t));break;case"minute":n.ticks(d.wXd.every(t));break;case"hour":n.ticks(d.Agd.every(t));break;case"day":n.ticks(d.UAC.every(t));break;case"week":n.ticks(At[s].every(t));break;case"month":n.ticks(d.Ui6.every(t))}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(t,e){let n=0;const i=Object.keys(k).map((t=>[t,k[t]]));p.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(s.Y2.lineBreakRegex),n=-(e.length-1)/2,i=u.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[t,n]of e.entries()){const e=u.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),t>0&&e.setAttribute("dy","1em"),e.textContent=n,i.appendChild(e)}return i})).attr("x",10).attr("y",(function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/573-ba5e956a.chunk.min.js b/js/573-ba5e956a.chunk.min.js new file mode 100644 index 0000000..aff26bb --- /dev/null +++ b/js/573-ba5e956a.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[573],{6573:(e,t,i)=>{i.d(t,{diagram:()=>Y});var n=i(32),r=i(4852),s=i(567),a=i(697),l=function(){var e=(0,n.K2)((function(e,t,i,n){for(i=i||{},n=e.length;n--;i[e[n]]=t);return i}),"o"),t=[1,3],i=[1,4],r=[1,5],s=[1,6],a=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],l=[1,18],o=[2,7],h=[1,22],c=[1,23],u=[1,24],d=[1,25],y=[1,26],p=[1,27],_=[1,20],g=[1,28],E=[1,29],R=[62,63],m=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],f=[1,47],I=[1,48],S=[1,49],k=[1,50],N=[1,51],b=[1,52],T=[1,53],x=[53,54],w=[1,64],A=[1,60],q=[1,61],v=[1,62],K=[1,63],$=[1,65],O=[1,69],L=[1,70],C=[1,67],M=[1,68],F=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],D={trace:(0,n.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:(0,n.K2)((function(e,t,i,n,r,s,a){var l=s.length-1;switch(r){case 4:this.$=s[l].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=s[l].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(s[l-3],s[l-4]);break;case 14:n.setNewReqId(s[l-2]);break;case 15:n.setNewReqText(s[l-2]);break;case 16:n.setNewReqRisk(s[l-2]);break;case 17:n.setNewReqVerifyMethod(s[l-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(s[l-3]);break;case 34:n.setNewElementType(s[l-2]);break;case 35:n.setNewElementDocRef(s[l-2]);break;case 38:n.addRelationship(s[l-2],s[l],s[l-4]);break;case 39:n.addRelationship(s[l-2],s[l-4],s[l]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}}),"anonymous"),table:[{3:1,4:2,6:t,9:i,11:r,13:s},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:i,11:r,13:s},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:i,11:r,13:s},{1:[2,2]},{4:17,5:l,7:13,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:l,7:31,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:32,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:33,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:34,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{4:17,5:l,7:35,8:o,9:i,11:r,13:s,14:14,15:15,16:16,17:19,23:21,31:h,32:c,33:u,34:d,35:y,36:p,44:_,62:g,63:E},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(R,[2,20]),e(R,[2,21]),e(R,[2,22]),e(R,[2,23]),e(R,[2,24]),e(R,[2,25]),e(m,[2,49]),e(m,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:f,56:I,57:S,58:k,59:N,60:b,61:T},{52:54,55:f,56:I,57:S,58:k,59:N,60:b,61:T},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(x,[2,40]),e(x,[2,41]),e(x,[2,42]),e(x,[2,43]),e(x,[2,44]),e(x,[2,45]),e(x,[2,46]),{54:[1,58]},{5:w,20:59,21:A,24:q,26:v,28:K,30:$},{5:O,30:L,46:66,47:C,49:M},{23:71,62:g,63:E},{23:72,62:g,63:E},e(F,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:w,20:77,21:A,24:q,26:v,28:K,30:$},e(F,[2,19]),e(F,[2,33]),{22:[1,78]},{22:[1,79]},{5:O,30:L,46:80,47:C,49:M},e(F,[2,37]),e(F,[2,38]),e(F,[2,39]),{23:81,62:g,63:E},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(F,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(F,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:w,20:106,21:A,24:q,26:v,28:K,30:$},{5:w,20:107,21:A,24:q,26:v,28:K,30:$},{5:w,20:108,21:A,24:q,26:v,28:K,30:$},{5:w,20:109,21:A,24:q,26:v,28:K,30:$},{5:O,30:L,46:110,47:C,49:M},{5:O,30:L,46:111,47:C,49:M},e(F,[2,14]),e(F,[2,15]),e(F,[2,16]),e(F,[2,17]),e(F,[2,34]),e(F,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:(0,n.K2)((function(e,t){if(!t.recoverable){var i=new Error(e);throw i.hash=t,i}this.trace(e)}),"parseError"),parse:(0,n.K2)((function(e){var t=this,i=[0],r=[],s=[null],a=[],l=this.table,o="",h=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(e,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;a.push(g);var E=y.options&&y.options.ranges;function R(){var e;return"number"!=typeof(e=r.pop()||y.lex()||1)&&(e instanceof Array&&(e=(r=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)((function(e){i.length=i.length-2*e,s.length=s.length-e,a.length=a.length-e}),"popStack"),(0,n.K2)(R,"lex");for(var m,f,I,S,k,N,b,T,x,w={};;){if(I=i[i.length-1],this.defaultActions[I]?S=this.defaultActions[I]:(null==m&&(m=R()),S=l[I]&&l[I][m]),void 0===S||!S.length||!S[0]){var A;for(N in x=[],l[I])this.terminals_[N]&&N>2&&x.push("'"+this.terminals_[N]+"'");A=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:x})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+m);switch(S[0]){case 1:i.push(m),s.push(y.yytext),a.push(y.yylloc),i.push(S[1]),m=null,f?(m=f,f=null):(c=y.yyleng,o=y.yytext,h=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(b=this.productions_[S[1]][1],w.$=s[s.length-b],w._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},E&&(w._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(k=this.performAction.apply(w,[o,c,h,p.yy,S[1],s,a].concat(d))))return k;b&&(i=i.slice(0,-1*b*2),s=s.slice(0,-1*b),a=a.slice(0,-1*b)),i.push(this.productions_[S[1]][0]),s.push(w.$),a.push(w._$),T=l[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0}),"parse")},P=function(){return{EOF:1,parseError:(0,n.K2)((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:(0,n.K2)((function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,n.K2)((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:(0,n.K2)((function(e){var t=e.length,i=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,n.K2)((function(){return this._more=!0,this}),"more"),reject:(0,n.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,n.K2)((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:(0,n.K2)((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,n.K2)((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,n.K2)((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:(0,n.K2)((function(e,t){var i,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:(0,n.K2)((function(){if(this.done)return this.EOF;var e,t,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;st[0].length)){if(t=i,n=s,this.options.backtrack_lexer){if(!1!==(e=this.test_match(i,r[s])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,r[n]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,n.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,n.K2)((function(e){this.conditionStack.push(e)}),"begin"),popState:(0,n.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,n.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,n.K2)((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:(0,n.K2)((function(e){this.begin(e)}),"pushState"),stateStackSize:(0,n.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)((function(e,t,i,n){switch(i){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 48:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 5;case 9:case 10:case 11:break;case 12:return 8;case 13:return 6;case 14:return 19;case 15:return 30;case 16:return 22;case 17:return 21;case 18:return 24;case 19:return 26;case 20:return 28;case 21:return 31;case 22:return 32;case 23:return 33;case 24:return 34;case 25:return 35;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:return 40;case 31:return 41;case 32:return 42;case 33:return 43;case 34:return 44;case 35:return 55;case 36:return 56;case 37:return 57;case 38:return 58;case 39:return 59;case 40:return 60;case 41:return 61;case 42:return 47;case 43:return 49;case 44:return 51;case 45:return 54;case 46:return 53;case 47:this.begin("string");break;case 49:return"qString";case 50:return t.yytext=t.yytext.trim(),62}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}}}();function V(){this.yy={}}return D.lexer=P,(0,n.K2)(V,"Parser"),V.prototype=D,D.Parser=V,new V}();l.parser=l;var o=l,h=[],c={},u=new Map,d={},y=new Map,p=(0,n.K2)(((e,t)=>(u.has(e)||u.set(e,{name:e,type:t,id:c.id,text:c.text,risk:c.risk,verifyMethod:c.verifyMethod}),c={},u.get(e))),"addRequirement"),_=(0,n.K2)((()=>u),"getRequirements"),g=(0,n.K2)((e=>{void 0!==c&&(c.id=e)}),"setNewReqId"),E=(0,n.K2)((e=>{void 0!==c&&(c.text=e)}),"setNewReqText"),R=(0,n.K2)((e=>{void 0!==c&&(c.risk=e)}),"setNewReqRisk"),m=(0,n.K2)((e=>{void 0!==c&&(c.verifyMethod=e)}),"setNewReqVerifyMethod"),f=(0,n.K2)((e=>(y.has(e)||(y.set(e,{name:e,type:d.type,docRef:d.docRef}),n.Rm.info("Added new requirement: ",e)),d={},y.get(e))),"addElement"),I=(0,n.K2)((()=>y),"getElements"),S=(0,n.K2)((e=>{void 0!==d&&(d.type=e)}),"setNewElementType"),k=(0,n.K2)((e=>{void 0!==d&&(d.docRef=e)}),"setNewElementDocRef"),N=(0,n.K2)(((e,t,i)=>{h.push({type:e,src:t,dst:i})}),"addRelationship"),b=(0,n.K2)((()=>h),"getRelationships"),T=(0,n.K2)((()=>{h=[],c={},u=new Map,d={},y=new Map,(0,n.IU)()}),"clear"),x={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},getConfig:(0,n.K2)((()=>(0,n.D7)().req),"getConfig"),addRequirement:p,getRequirements:_,setNewReqId:g,setNewReqText:E,setNewReqRisk:R,setNewReqVerifyMethod:m,setAccTitle:n.SV,getAccTitle:n.iN,setAccDescription:n.EI,getAccDescription:n.m7,addElement:f,getElements:I,setNewElementType:S,setNewElementDocRef:k,addRelationship:N,getRelationships:b,clear:T},w=(0,n.K2)((e=>`\n\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n\n`),"getStyles"),A={CONTAINS:"contains",ARROW:"arrow"},q={ReqMarkers:A,insertLineEndings:(0,n.K2)(((e,t)=>{let i=e.append("defs").append("marker").attr("id",A.CONTAINS+"_line_ending").attr("refX",0).attr("refY",t.line_height/2).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("g");i.append("circle").attr("cx",t.line_height/2).attr("cy",t.line_height/2).attr("r",t.line_height/2).attr("fill","none"),i.append("line").attr("x1",0).attr("x2",t.line_height).attr("y1",t.line_height/2).attr("y2",t.line_height/2).attr("stroke-width",1),i.append("line").attr("y1",0).attr("y2",t.line_height).attr("x1",t.line_height/2).attr("x2",t.line_height/2).attr("stroke-width",1),e.append("defs").append("marker").attr("id",A.ARROW+"_line_ending").attr("refX",t.line_height).attr("refY",.5*t.line_height).attr("markerWidth",t.line_height).attr("markerHeight",t.line_height).attr("orient","auto").append("path").attr("d",`M0,0\n L${t.line_height},${t.line_height/2}\n M${t.line_height},${t.line_height/2}\n L0,${t.line_height}`).attr("stroke-width",1)}),"insertLineEndings")},v={},K=0,$=(0,n.K2)(((e,t)=>e.insert("rect","#"+t).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",v.rect_min_width+"px").attr("height",v.rect_min_height+"px")),"newRectNode"),O=(0,n.K2)(((e,t,i)=>{let n=v.rect_min_width/2,r=e.append("text").attr("class","req reqLabel reqTitle").attr("id",t).attr("x",n).attr("y",v.rect_padding).attr("dominant-baseline","hanging"),s=0;i.forEach((e=>{0==s?r.append("tspan").attr("text-anchor","middle").attr("x",v.rect_min_width/2).attr("dy",0).text(e):r.append("tspan").attr("text-anchor","middle").attr("x",v.rect_min_width/2).attr("dy",.75*v.line_height).text(e),s++}));let a=1.5*v.rect_padding+s*v.line_height*.75;return e.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",v.rect_min_width).attr("y1",a).attr("y2",a),{titleNode:r,y:a}}),"newTitleNode"),L=(0,n.K2)(((e,t,i,n)=>{let r=e.append("text").attr("class","req reqLabel").attr("id",t).attr("x",v.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),s=0,a=[];return i.forEach((e=>{let t=e.length;for(;t>30&&s<3;){let i=e.substring(0,30);t=(e=e.substring(30,e.length)).length,a[a.length]=i,s++}if(3==s){let e=a[a.length-1];a[a.length-1]=e.substring(0,e.length-4)+"..."}else a[a.length]=e;s=0})),a.forEach((e=>{r.append("tspan").attr("x",v.rect_padding).attr("dy",v.line_height).text(e)})),r}),"newBodyNode"),C=(0,n.K2)(((e,t,i,n)=>{const r=t.node().getTotalLength(),s=t.node().getPointAtLength(.5*r),a="rel"+K;K++;const l=e.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();e.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")}),"addEdgeLabel"),M=(0,n.K2)((function(e,t,i,s,a){const l=i.edge(U(t.src),U(t.dst)),o=(0,r.n8j)().x((function(e){return e.x})).y((function(e){return e.y})),h=e.insert("path","#"+s).attr("class","er relationshipLine").attr("d",o(l.points)).attr("fill","none");t.type==a.db.Relationships.CONTAINS?h.attr("marker-start","url("+n.Y2.getUrl(v.arrowMarkerAbsolute)+"#"+t.type+"_line_ending)"):(h.attr("stroke-dasharray","10,7"),h.attr("marker-end","url("+n.Y2.getUrl(v.arrowMarkerAbsolute)+"#"+q.ReqMarkers.ARROW+"_line_ending)")),C(e,h,v,`<<${t.type}>>`)}),"drawRelationshipFromLayout"),F=(0,n.K2)(((e,t,i)=>{e.forEach(((e,r)=>{r=U(r),n.Rm.info("Added new requirement: ",r);const s=i.append("g").attr("id",r),a=$(s,"req-"+r);let l=[],o=O(s,r+"_title",[`<<${e.type}>>`,`${e.name}`]);l.push(o.titleNode);let h=L(s,r+"_body",[`Id: ${e.id}`,`Text: ${e.text}`,`Risk: ${e.risk}`,`Verification: ${e.verifyMethod}`],o.y);l.push(h);const c=a.node().getBBox();t.setNode(r,{width:c.width,height:c.height,shape:"rect",id:r})}))}),"drawReqs"),D=(0,n.K2)(((e,t,i)=>{e.forEach(((e,n)=>{const r=U(n),s=i.append("g").attr("id",r),a="element-"+r,l=$(s,a);let o=[],h=O(s,a+"_title",["<>",`${n}`]);o.push(h.titleNode);let c=L(s,a+"_body",[`Type: ${e.type||"Not Specified"}`,`Doc Ref: ${e.docRef||"None"}`],h.y);o.push(c);const u=l.node().getBBox();t.setNode(r,{width:u.width,height:u.height,shape:"rect",id:r})}))}),"drawElements"),P=(0,n.K2)(((e,t)=>(e.forEach((function(e){let i=U(e.src),n=U(e.dst);t.setEdge(i,n,{relationship:e})})),e)),"addRelationships"),V=(0,n.K2)((function(e,t){t.nodes().forEach((function(i){void 0!==i&&void 0!==t.node(i)&&(e.select("#"+i),e.select("#"+i).attr("transform","translate("+(t.node(i).x-t.node(i).width/2)+","+(t.node(i).y-t.node(i).height/2)+" )"))}))}),"adjustEntities"),U=(0,n.K2)((e=>e.replace(/\s/g,"").replace(/\./g,"_")),"elementString"),Y={parser:o,db:x,renderer:{draw:(0,n.K2)(((e,t,i,l)=>{const o=(v=(0,n.D7)().requirement).securityLevel;let h;"sandbox"===o&&(h=(0,r.Ltv)("#i"+t));const c=("sandbox"===o?(0,r.Ltv)(h.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id='${t}']`);q.insertLineEndings(c,v);const u=new a.T({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:v.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));let d=l.db.getRequirements(),y=l.db.getElements(),p=l.db.getRelationships();F(d,u,c),D(y,u,c),P(p,u),(0,s.Zp)(u),V(c,u),p.forEach((function(e){M(c,e,u,t,l)}));const _=v.rect_padding,g=c.node().getBBox(),E=g.width+2*_,R=g.height+2*_;(0,n.a$)(c,R,E,v.useMaxWidth),c.attr("viewBox",`${g.x-_} ${g.y-_} ${E} ${R}`)}),"draw")},styles:w}}}]); \ No newline at end of file diff --git a/js/578-d3d4963d.chunk.min.js b/js/578-d3d4963d.chunk.min.js deleted file mode 100644 index 0410d7d..0000000 --- a/js/578-d3d4963d.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[578],{6578:(t,e,a)=>{a.d(e,{DA:()=>o,IU:()=>rt,U7:()=>at,U_:()=>it,lC:()=>c,nM:()=>D,on:()=>et});var r=a(8252),i=a(7323),n=a(798),s=a(4852);function l(t,e){e&&t.attr("style",e)}function d(t){const e=(0,s.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),r=t.label,i=t.isNode?"nodeLabel":"edgeLabel",n=a.append("span");return n.html(r),l(n,t.labelStyle),n.attr("class",i),l(a,t.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,n.K2)(l,"applyStyle"),(0,n.K2)(d,"addHtmlLabel");var o=(0,n.K2)(((t,e,a,s)=>{let l=t||"";if("object"==typeof l&&(l=l[0]),(0,n._3)((0,n.D7)().flowchart.htmlLabels))return l=l.replace(/\\n|\n/g,"
"),n.Rm.debug("vertexText"+l),d({isNode:s,label:(0,r.hE)((0,i.Sm)(l)),labelStyle:e.replace("fill:","color:")});{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let r=[];r="string"==typeof l?l.split(/\\n|\n|/gi):Array.isArray(l)?l:[];for(const e of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),a?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}}),"createLabel"),h=(0,n.K2)((async(t,e,a,l)=>{const d=(0,n.D7)();let h;const c=e.useHtmlLabels||(0,n._3)(d.flowchart.htmlLabels);h=a||"node default";const y=t.insert("g").attr("class",h).attr("id",e.domId||e.id),g=y.insert("g").attr("class","label").attr("style",e.labelStyle);let x;x=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const p=g.node();let w;w="markdown"===e.labelType?(0,r.GZ)(g,(0,n.jZ)((0,i.Sm)(x),d),{useHtmlLabels:c,width:e.width||d.flowchart.wrappingWidth,classes:"markdown-node-label"},d):p.appendChild(o((0,n.jZ)((0,i.Sm)(x),d),e.labelStyle,!1,l));let u=w.getBBox();const f=e.padding/2;if((0,n._3)(d.flowchart.htmlLabels)){const t=w.children[0],e=(0,s.Ltv)(w),a=t.getElementsByTagName("img");if(a){const t=""===x.replace(/]*>/g,"").trim();await Promise.all([...a].map((e=>new Promise((a=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=d.fontSize?d.fontSize:window.getComputedStyle(document.body).fontSize,a=5,r=parseInt(t,10)*a+"px";e.style.minWidth=r,e.style.maxWidth=r}else e.style.width="100%";a(e)}(0,n.K2)(r,"setupImage"),setTimeout((()=>{e.complete&&r()})),e.addEventListener("error",r),e.addEventListener("load",r)})))))}u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return c?g.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):g.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:y,bbox:u,halfPadding:f,label:g}}),"labelHelper"),c=(0,n.K2)(((t,e)=>{const a=e.node().getBBox();t.width=a.width,t.height=a.height}),"updateNodeBounds");function y(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}(0,n.K2)(y,"insertPolygonShape");var g=(0,n.K2)((t=>{const e=new Set;for(const a of t)switch(a){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(a)}return e}),"expandAndDeduplicateDirections"),x=(0,n.K2)(((t,e,a)=>{const r=g(t),i=e.height+2*a.padding,n=i/2,s=e.width+2*n+a.padding,l=a.padding/2;return r.has("right")&&r.has("left")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:n,y:0},{x:s/2,y:2*l},{x:s-n,y:0},{x:s,y:0},{x:s,y:-i/3},{x:s+2*l,y:-i/2},{x:s,y:-2*i/3},{x:s,y:-i},{x:s-n,y:-i},{x:s/2,y:-i-2*l},{x:n,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*l,y:-i/2},{x:0,y:-i/3}]:r.has("right")&&r.has("left")&&r.has("up")?[{x:n,y:0},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}]:r.has("right")&&r.has("left")&&r.has("down")?[{x:0,y:0},{x:n,y:-i},{x:s-n,y:-i},{x:s,y:0}]:r.has("right")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:s,y:-n},{x:s,y:-i+n},{x:0,y:-i}]:r.has("left")&&r.has("up")&&r.has("down")?[{x:s,y:0},{x:0,y:-n},{x:0,y:-i+n},{x:s,y:-i}]:r.has("right")&&r.has("left")?[{x:n,y:0},{x:n,y:-l},{x:s-n,y:-l},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:s-n,y:-i+l},{x:n,y:-i+l},{x:n,y:-i},{x:0,y:-i/2}]:r.has("up")&&r.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-i+l},{x:0,y:-i+l},{x:s/2,y:-i},{x:s,y:-i+l},{x:s-n,y:-i+l},{x:s-n,y:-l},{x:s,y:-l}]:r.has("right")&&r.has("up")?[{x:0,y:0},{x:s,y:-n},{x:0,y:-i}]:r.has("right")&&r.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-i}]:r.has("left")&&r.has("up")?[{x:s,y:0},{x:0,y:-n},{x:s,y:-i}]:r.has("left")&&r.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-i}]:r.has("right")?[{x:n,y:-l},{x:n,y:-l},{x:s-n,y:-l},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:s-n,y:-i+l},{x:n,y:-i+l},{x:n,y:-i+l}]:r.has("left")?[{x:n,y:0},{x:n,y:-l},{x:s-n,y:-l},{x:s-n,y:-i+l},{x:n,y:-i+l},{x:n,y:-i},{x:0,y:-i/2}]:r.has("up")?[{x:n,y:-l},{x:n,y:-i+l},{x:0,y:-i+l},{x:s/2,y:-i},{x:s,y:-i+l},{x:s-n,y:-i+l},{x:s-n,y:-l}]:r.has("down")?[{x:s/2,y:0},{x:0,y:-l},{x:n,y:-l},{x:n,y:-i+l},{x:s-n,y:-i+l},{x:s-n,y:-l},{x:s,y:-l}]:[{x:0,y:0}]}),"getArrowPoints");function p(t,e){return t.intersect(e)}(0,n.K2)(p,"intersectNode");var w=p;function u(t,e,a,r){var i=t.x,n=t.y,s=i-r.x,l=n-r.y,d=Math.sqrt(e*e*l*l+a*a*s*s),o=Math.abs(e*a*s/d);r.x0}(0,n.K2)(v,"intersectLine"),(0,n.K2)(S,"sameSign");var K=v,L=_;function _(t,e,a){var r=t.x,i=t.y,n=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),l=Math.min(l,t.y)})):(s=Math.min(s,e.x),l=Math.min(l,e.y));for(var d=r-t.width/2-s,o=i-t.height/2-l,h=0;h1&&n.sort((function(t,e){var r=t.x-a.x,i=t.y-a.y,n=Math.sqrt(r*r+i*i),s=e.x-a.x,l=e.y-a.y,d=Math.sqrt(s*s+l*l);return n{var a,r,i=t.x,n=t.y,s=e.x-i,l=e.y-n,d=t.width/2,o=t.height/2;return Math.abs(l)*d>Math.abs(s)*o?(l<0&&(o=-o),a=0===l?0:o*s/l,r=o):(s<0&&(d=-d),a=d,r=0===s?0:d*l/s),{x:i+a,y:n+r}}),"intersectRect"),k={node:w,circle:m,ellipse:f,polygon:L,rect:D},B=(0,n.K2)((async(t,e)=>{e.useHtmlLabels||(0,n.D7)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:a,bbox:r,halfPadding:i}=await h(t,e,"node "+e.classes,!0);n.Rm.info("Classes = ",e.classes);const s=a.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-i).attr("y",-r.height/2-i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),c(e,s),e.intersect=function(t){return k.rect(e,t)},a}),"note"),C=(0,n.K2)((t=>t?" "+t:""),"formatClass"),R=(0,n.K2)(((t,e)=>`${e||"node default"}${C(t.classes)} ${C(t.class)}`),"getClassesFromNode"),T=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.width+e.padding+(r.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];n.Rm.info("Question main (Circle)");const l=y(a,i,i,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return n.Rm.warn("Intersect called"),k.polygon(e,s,t)},a}),"question"),I=(0,n.K2)(((t,e)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return a.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return k.circle(e,14,t)},a}),"choice"),N=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.height+e.padding,n=i/4,s=r.width+2*n+e.padding,l=[{x:n,y:0},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}],d=y(a,s,i,l);return d.attr("style",e.style),c(e,d),e.intersect=function(t){return k.polygon(e,l,t)},a}),"hexagon"),E=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,void 0,!0),i=r.height+2*e.padding,n=i/2,s=r.width+2*n+e.padding,l=x(e.directions,r,e),d=y(a,s,i,l);return d.attr("style",e.style),c(e,d),e.intersect=function(t){return k.polygon(e,l,t)},a}),"block_arrow"),M=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.width+e.padding,n=r.height+e.padding,s=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}];return y(a,i,n,s).attr("style",e.style),e.width=i+n,e.height=n,e.intersect=function(t){return k.polygon(e,s,t)},a}),"rect_left_inv_arrow"),j=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e),!0),i=r.width+e.padding,n=r.height+e.padding,s=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],l=y(a,i,n,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return k.polygon(e,s,t)},a}),"lean_right"),P=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.width+e.padding,n=r.height+e.padding,s=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],l=y(a,i,n,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return k.polygon(e,s,t)},a}),"lean_left"),A=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.width+e.padding,n=r.height+e.padding,s=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],l=y(a,i,n,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return k.polygon(e,s,t)},a}),"trapezoid"),z=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.width+e.padding,n=r.height+e.padding,s=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],l=y(a,i,n,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return k.polygon(e,s,t)},a}),"inv_trapezoid"),q=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.width+e.padding,n=r.height+e.padding,s=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],l=y(a,i,n,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return k.polygon(e,s,t)},a}),"rect_right_inv_arrow"),O=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.width+e.padding,n=i/2,s=n/(2.5+i/50),l=r.height+s+e.padding,d="M 0,"+s+" a "+n+","+s+" 0,0,0 "+i+" 0 a "+n+","+s+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+n+","+s+" 0,0,0 "+i+" 0 l 0,"+-l,o=a.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",d).attr("transform","translate("+-i/2+","+-(l/2+s)+")");return c(e,o),e.intersect=function(t){const a=k.rect(e,t),r=a.x-e.x;if(0!=n&&(Math.abs(r)e.height/2-s)){let i=s*s*(1-r*r/(n*n));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),a.y+=i}return a},a}),"cylinder"),U=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r,halfPadding:i}=await h(t,e,"node "+e.classes+" "+e.class,!0),s=a.insert("rect",":first-child"),l=e.positioned?e.width:r.width+e.padding,d=e.positioned?e.height:r.height+e.padding,o=e.positioned?-l/2:-r.width/2-i,y=e.positioned?-d/2:-r.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",y).attr("width",l).attr("height",d),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(W(s,e.props.borders,l,d),t.delete("borders")),t.forEach((t=>{n.Rm.warn(`Unknown node property ${t}`)}))}return c(e,s),e.intersect=function(t){return k.rect(e,t)},a}),"rect"),$=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r,halfPadding:i}=await h(t,e,"node "+e.classes,!0),s=a.insert("rect",":first-child"),l=e.positioned?e.width:r.width+e.padding,d=e.positioned?e.height:r.height+e.padding,o=e.positioned?-l/2:-r.width/2-i,y=e.positioned?-d/2:-r.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",y).attr("width",l).attr("height",d),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(W(s,e.props.borders,l,d),t.delete("borders")),t.forEach((t=>{n.Rm.warn(`Unknown node property ${t}`)}))}return c(e,s),e.intersect=function(t){return k.rect(e,t)},a}),"composite"),H=(0,n.K2)((async(t,e)=>{const{shapeSvg:a}=await h(t,e,"label",!0);n.Rm.trace("Classes = ",e.class);const r=a.insert("rect",":first-child");if(r.attr("width",0).attr("height",0),a.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(W(r,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{n.Rm.warn(`Unknown node property ${t}`)}))}return c(e,r),e.intersect=function(t){return k.rect(e,t)},a}),"labelRect");function W(t,e,a,r){const i=[],s=(0,n.K2)((t=>{i.push(t,0)}),"addBorder"),l=(0,n.K2)((t=>{i.push(0,t)}),"skipBorder");e.includes("t")?(n.Rm.debug("add top border"),s(a)):l(a),e.includes("r")?(n.Rm.debug("add right border"),s(r)):l(r),e.includes("b")?(n.Rm.debug("add bottom border"),s(a)):l(a),e.includes("l")?(n.Rm.debug("add left border"),s(r)):l(r),t.attr("stroke-dasharray",i.join(" "))}(0,n.K2)(W,"applyNodePropertyBorders");var F=(0,n.K2)(((t,e)=>{let a;a=e.classes?"node "+e.classes:"node default";const r=t.insert("g").attr("class",a).attr("id",e.domId||e.id),i=r.insert("rect",":first-child"),l=r.insert("line"),d=r.insert("g").attr("class","label"),h=e.labelText.flat?e.labelText.flat():e.labelText;let y="";y="object"==typeof h?h[0]:h,n.Rm.info("Label text abc79",y,h,"object"==typeof h);const g=d.node().appendChild(o(y,e.labelStyle,!0,!0));let x={width:0,height:0};if((0,n._3)((0,n.D7)().flowchart.htmlLabels)){const t=g.children[0],e=(0,s.Ltv)(g);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}n.Rm.info("Text 2",h);const p=h.slice(1,h.length);let w=g.getBBox();const u=d.node().appendChild(o(p.join?p.join("
"):p,e.labelStyle,!0,!0));if((0,n._3)((0,n.D7)().flowchart.htmlLabels)){const t=u.children[0],e=(0,s.Ltv)(u);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}const f=e.padding/2;return(0,s.Ltv)(u).attr("transform","translate( "+(x.width>w.width?0:(w.width-x.width)/2)+", "+(w.height+f+5)+")"),(0,s.Ltv)(g).attr("transform","translate( "+(x.width{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.height+e.padding,n=r.width+i/4+e.padding,s=a.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return c(e,s),e.intersect=function(t){return k.rect(e,t)},a}),"stadium"),V=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r,halfPadding:i}=await h(t,e,R(e,void 0),!0),s=a.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),n.Rm.info("Circle main"),c(e,s),e.intersect=function(t){return n.Rm.info("Circle intersect",e,r.width/2+i,t),k.circle(e,r.width/2+i,t)},a}),"circle"),Y=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r,halfPadding:i}=await h(t,e,R(e,void 0),!0),s=a.insert("g",":first-child"),l=s.insert("circle"),d=s.insert("circle");return s.attr("class",e.class),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i+5).attr("width",r.width+e.padding+10).attr("height",r.height+e.padding+10),d.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+i).attr("width",r.width+e.padding).attr("height",r.height+e.padding),n.Rm.info("DoubleCircle main"),c(e,l),e.intersect=function(t){return n.Rm.info("DoubleCircle intersect",e,r.width/2+i+5,t),k.circle(e,r.width/2+i+5,t)},a}),"doublecircle"),G=(0,n.K2)((async(t,e)=>{const{shapeSvg:a,bbox:r}=await h(t,e,R(e,void 0),!0),i=r.width+e.padding,n=r.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],l=y(a,i,n,s);return l.attr("style",e.style),c(e,l),e.intersect=function(t){return k.polygon(e,s,t)},a}),"subroutine"),J=(0,n.K2)(((t,e)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),c(e,r),e.intersect=function(t){return k.circle(e,7,t)},a}),"start"),Q=(0,n.K2)(((t,e,a)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,n=10;"LR"===a&&(i=10,n=70);const s=r.append("rect").attr("x",-1*i/2).attr("y",-1*n/2).attr("width",i).attr("height",n).attr("class","fork-join");return c(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return k.rect(e,t)},r}),"forkJoin"),X={rhombus:T,composite:$,question:T,rect:U,labelRect:H,rectWithTitle:F,choice:I,circle:V,doublecircle:Y,stadium:Z,hexagon:N,block_arrow:E,rect_left_inv_arrow:M,lean_right:j,lean_left:P,trapezoid:A,inv_trapezoid:z,rect_right_inv_arrow:q,cylinder:O,start:J,end:(0,n.K2)(((t,e)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child"),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),c(e,i),e.intersect=function(t){return k.circle(e,7,t)},a}),"end"),note:B,subroutine:G,fork:Q,join:Q,class_box:(0,n.K2)(((t,e)=>{const a=e.padding/2;let r;r=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),l=i.insert("rect",":first-child"),d=i.insert("line"),h=i.insert("line");let y=0,g=4;const x=i.insert("g").attr("class","label");let p=0;const w=e.classData.annotations?.[0],u=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",f=x.node().appendChild(o(u,e.labelStyle,!0,!0));let b=f.getBBox();if((0,n._3)((0,n.D7)().flowchart.htmlLabels)){const t=f.children[0],e=(0,s.Ltv)(f);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}e.classData.annotations[0]&&(g+=b.height+4,y+=b.width);let m=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,n.D7)().flowchart.htmlLabels?m+="<"+e.classData.type+">":m+="<"+e.classData.type+">");const v=x.node().appendChild(o(m,e.labelStyle,!0,!0));(0,s.Ltv)(v).attr("class","classTitle");let S=v.getBBox();if((0,n._3)((0,n.D7)().flowchart.htmlLabels)){const t=v.children[0],e=(0,s.Ltv)(v);S=t.getBoundingClientRect(),e.attr("width",S.width),e.attr("height",S.height)}g+=S.height+4,S.width>y&&(y=S.width);const K=[];e.classData.members.forEach((t=>{const a=t.getDisplayDetails();let r=a.displayText;(0,n.D7)().flowchart.htmlLabels&&(r=r.replace(//g,">"));const i=x.node().appendChild(o(r,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0));let l=i.getBBox();if((0,n._3)((0,n.D7)().flowchart.htmlLabels)){const t=i.children[0],e=(0,s.Ltv)(i);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l.width>y&&(y=l.width),g+=l.height+4,K.push(i)})),g+=8;const L=[];if(e.classData.methods.forEach((t=>{const a=t.getDisplayDetails();let r=a.displayText;(0,n.D7)().flowchart.htmlLabels&&(r=r.replace(//g,">"));const i=x.node().appendChild(o(r,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0));let l=i.getBBox();if((0,n._3)((0,n.D7)().flowchart.htmlLabels)){const t=i.children[0],e=(0,s.Ltv)(i);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}l.width>y&&(y=l.width),g+=l.height+4,L.push(i)})),g+=8,w){let t=(y-b.width)/2;(0,s.Ltv)(f).attr("transform","translate( "+(-1*y/2+t)+", "+-1*g/2+")"),p=b.height+4}let _=(y-S.width)/2;return(0,s.Ltv)(v).attr("transform","translate( "+(-1*y/2+_)+", "+(-1*g/2+p)+")"),p+=S.height+4,d.attr("class","divider").attr("x1",-y/2-a).attr("x2",y/2+a).attr("y1",-g/2-a+8+p).attr("y2",-g/2-a+8+p),p+=8,K.forEach((t=>{(0,s.Ltv)(t).attr("transform","translate( "+-y/2+", "+(-1*g/2+p+4)+")");const e=t?.getBBox();p+=(e?.height??0)+4})),p+=8,h.attr("class","divider").attr("x1",-y/2-a).attr("x2",y/2+a).attr("y1",-g/2-a+8+p).attr("y2",-g/2-a+8+p),p+=8,L.forEach((t=>{(0,s.Ltv)(t).attr("transform","translate( "+-y/2+", "+(-1*g/2+p)+")");const e=t?.getBBox();p+=(e?.height??0)+4})),l.attr("style",e.style).attr("class","outer title-state").attr("x",-y/2-a).attr("y",-g/2-a).attr("width",y+e.padding).attr("height",g+e.padding),c(e,l),e.intersect=function(t){return k.rect(e,t)},i}),"class_box")},tt={},et=(0,n.K2)((async(t,e,a)=>{let r,i;if(e.link){let s;"sandbox"===(0,n.D7)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await X[e.shape](r,e,a)}else i=await X[e.shape](t,e,a),r=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),tt[e.id]=r,e.haveCallback&&tt[e.id].attr("class",tt[e.id].attr("class")+" clickable"),r}),"insertNode"),at=(0,n.K2)(((t,e)=>{tt[e.id]=t}),"setNodeElem"),rt=(0,n.K2)((()=>{tt={}}),"clear"),it=(0,n.K2)((t=>{const e=tt[t.id];n.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a}),"positionNode")}}]); \ No newline at end of file diff --git a/js/589-841514a2.chunk.min.js b/js/589-841514a2.chunk.min.js deleted file mode 100644 index b95ec87..0000000 --- a/js/589-841514a2.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[589],{9323:(t,e,a)=>{a.d(e,{CP:()=>l,HT:()=>h,PB:()=>d,aC:()=>c,lC:()=>n,m:()=>o,tk:()=>i});var r=a(798),s=a(6750),i=(0,r.K2)(((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a}),"drawRect"),n=(0,r.K2)(((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};i(t,a).lower()}),"drawBackgroundRect"),o=(0,r.K2)(((t,e)=>{const a=e.text.replace(r.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const i=s.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),s}),"drawText"),c=(0,r.K2)(((t,e,a,r)=>{const i=t.append("image");i.attr("x",e),i.attr("y",a);const n=(0,s.J)(r);i.attr("xlink:href",n)}),"drawImage"),l=(0,r.K2)(((t,e,a,r)=>{const i=t.append("use");i.attr("x",e),i.attr("y",a);const n=(0,s.J)(r);i.attr("xlink:href",`#${n}`)}),"drawEmbeddedImage"),d=(0,r.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),h=(0,r.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")},2424:(t,e,a)=>{a.d(e,{m:()=>s});var r=a(798),s=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},3589:(t,e,a)=>{a.d(e,{diagram:()=>Ut});var r=a(9323),s=a(2424),i=a(7323),n=a(798),o=a(4852),c=a(6750),l=function(){var t=(0,n.K2)((function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a}),"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],o=[1,11],c=[1,13],l=[1,14],d=[1,16],h=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],f=[1,31],E=[1,32],w=[1,33],I=[1,34],L=[1,35],_=[1,36],P=[1,37],k=[1,38],A=[1,39],v=[1,41],N=[1,42],M=[1,43],D=[1,44],O=[1,45],S=[1,46],K=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],R=[4,5,16,50,52,53],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],C=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],V=[68,69,70],F=[1,122],W={trace:(0,n.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:(0,n.K2)((function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 62:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 53:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 54:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 55:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-2],i[o]];break;case 63:this.$=r.PLACEMENT.LEFTOF;break;case 64:this.$=r.PLACEMENT.RIGHTOF;break;case 65:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 67:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 68:this.$={type:"addParticipant",actor:i[o]};break;case 69:this.$=r.LINETYPE.SOLID_OPEN;break;case 70:this.$=r.LINETYPE.DOTTED_OPEN;break;case 71:this.$=r.LINETYPE.SOLID;break;case 72:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=r.LINETYPE.DOTTED;break;case 74:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=r.LINETYPE.SOLID_CROSS;break;case 76:this.$=r.LINETYPE.DOTTED_CROSS;break;case 77:this.$=r.LINETYPE.SOLID_POINT;break;case 78:this.$=r.LINETYPE.DOTTED_POINT;break;case 79:this.$=r.parseMessage(i[o].trim().substring(1))}}),"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:o,8:8,9:10,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},t(K,[2,5]),{9:47,12:12,13:c,14:l,17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},t(K,[2,7]),t(K,[2,8]),t(K,[2,14]),{12:48,50:P,52:k,53:A},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:S},{22:55,70:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(K,[2,29]),t(K,[2,30]),{32:[1,61]},{34:[1,62]},t(K,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:S},{22:72,70:S},{22:73,70:S},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:S},{22:90,70:S},{22:91,70:S},{22:92,70:S},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(K,[2,6]),t(K,[2,15]),t(R,[2,9],{10:93}),t(K,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(K,[2,21]),{5:[1,97]},{5:[1,98]},t(K,[2,24]),t(K,[2,25]),t(K,[2,26]),t(K,[2,27]),t(K,[2,28]),t(K,[2,31]),t(K,[2,32]),t(Y,s,{7:99}),t(Y,s,{7:100}),t(Y,s,{7:101}),t(C,s,{40:102,7:103}),t(B,s,{42:104,7:105}),t(B,s,{7:105,42:106}),t($,s,{45:107,7:108}),t(Y,s,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:S},t(V,[2,69]),t(V,[2,70]),t(V,[2,71]),t(V,[2,72]),t(V,[2,73]),t(V,[2,74]),t(V,[2,75]),t(V,[2,76]),t(V,[2,77]),t(V,[2,78]),{22:118,70:S},{22:120,58:119,70:S},{70:[2,63]},{70:[2,64]},{56:121,81:F},{56:123,81:F},{56:124,81:F},{56:125,81:F},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:P,52:k,53:A},{5:[1,131]},t(K,[2,19]),t(K,[2,20]),t(K,[2,22]),t(K,[2,23]),{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,132],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,133],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,134],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,135]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,46],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,49:[1,136],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,137]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,44],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,48:[1,138],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{16:[1,139]},{16:[1,140]},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[2,42],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,47:[1,141],50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{4:i,5:o,8:8,9:10,12:12,13:c,14:l,16:[1,142],17:15,18:d,21:h,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:A,54:v,59:N,60:M,61:D,62:O,70:S},{15:[1,143]},t(K,[2,49]),{15:[1,144]},t(K,[2,51]),t(K,[2,52]),{22:145,70:S},{22:146,70:S},{56:147,81:F},{56:148,81:F},{56:149,81:F},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(K,[2,16]),t(R,[2,10]),{12:151,50:P,52:k,53:A},t(R,[2,12]),t(R,[2,13]),t(K,[2,18]),t(K,[2,34]),t(K,[2,35]),t(K,[2,36]),t(K,[2,37]),{15:[1,152]},t(K,[2,38]),{15:[1,153]},t(K,[2,39]),t(K,[2,40]),{15:[1,154]},t(K,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:F},{56:158,81:F},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:S},t(R,[2,11]),t(C,s,{7:103,40:160}),t(B,s,{7:105,42:161}),t($,s,{7:108,45:162}),t(K,[2,48]),t(K,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:(0,n.K2)((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:(0,n.K2)((function(t){var e=this,a=[0],r=[],s=[null],i=[],o=this.table,c="",l=0,d=0,h=0,p=i.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;i.push(y);var m=g.options&&g.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)((function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t}),"popStack"),(0,n.K2)(b,"lex");for(var T,f,E,w,I,L,_,P,k,A={};;){if(E=a[a.length-1],this.defaultActions[E]?w=this.defaultActions[E]:(null==T&&(T=b()),w=o[E]&&o[E][T]),void 0===w||!w.length||!w[0]){var v;for(L in k=[],o[E])this.terminals_[L]&&L>2&&k.push("'"+this.terminals_[L]+"'");v=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==T?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(v,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:y,expected:k})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+T);switch(w[0]){case 1:a.push(T),s.push(g.yytext),i.push(g.yylloc),a.push(w[1]),T=null,f?(T=f,f=null):(d=g.yyleng,c=g.yytext,l=g.yylineno,y=g.yylloc,h>0&&h--);break;case 2:if(_=this.productions_[w[1]][1],A.$=s[s.length-_],A._$={first_line:i[i.length-(_||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_||1)].first_column,last_column:i[i.length-1].last_column},m&&(A._$.range=[i[i.length-(_||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(A,[c,d,l,u.yy,w[1],s,i].concat(p))))return I;_&&(a=a.slice(0,-1*_*2),s=s.slice(0,-1*_),i=i.slice(0,-1*_)),a.push(this.productions_[w[1]][0]),s.push(A.$),i.push(A._$),P=o[a[a.length-2]][a[a.length-1]],a.push(P);break;case 3:return!0}}return!0}),"parse")},q=function(){return{EOF:1,parseError:(0,n.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,n.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,n.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,n.K2)((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,n.K2)((function(){return this._more=!0,this}),"more"),reject:(0,n.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,n.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,n.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,n.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,n.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,n.K2)((function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1}),"test_match"),next:(0,n.K2)((function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,n.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,n.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,n.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,n.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,n.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,n.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,n.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)((function(t,e,a,r){switch(a){case 0:case 51:case 66:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("LINE"),14;case 8:return this.begin("ID"),50;case 9:return this.begin("ID"),52;case 10:return 13;case 11:return this.begin("ID"),53;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),70;case 13:return this.popState(),this.popState(),this.begin("LINE"),51;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),36;case 16:return this.begin("LINE"),37;case 17:return this.begin("LINE"),38;case 18:return this.begin("LINE"),39;case 19:return this.begin("LINE"),49;case 20:return this.begin("LINE"),41;case 21:return this.begin("LINE"),43;case 22:return this.begin("LINE"),48;case 23:return this.begin("LINE"),44;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),46;case 26:return this.popState(),15;case 27:return 16;case 28:return 65;case 29:return 66;case 30:return 59;case 31:return 60;case 32:return 61;case 33:return 62;case 34:return 57;case 35:return 54;case 36:return this.begin("ID"),21;case 37:return this.begin("ID"),23;case 38:return 29;case 39:return 30;case 40:return this.begin("acc_title"),31;case 41:return this.popState(),"acc_title_value";case 42:return this.begin("acc_descr"),33;case 43:return this.popState(),"acc_descr_value";case 44:this.begin("acc_descr_multiline");break;case 45:this.popState();break;case 46:return"acc_descr_multiline_value";case 47:return 6;case 48:return 18;case 49:return 20;case 50:return 64;case 52:return e.yytext=e.yytext.trim(),70;case 53:return 73;case 54:return 74;case 55:return 75;case 56:return 76;case 57:return 71;case 58:return 72;case 59:return 77;case 60:return 78;case 61:return 79;case 62:return 80;case 63:return 81;case 64:return 68;case 65:return 69;case 67:return"INVALID"}}),"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^\<->\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}}}();function z(){this.yy={}}return W.lexer=q,(0,n.K2)(z,"Parser"),z.prototype=W,W.Parser=z,new z}();l.parser=l;var d=l,h=new s.m((()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0}))),p=(0,n.K2)((function(t){h.records.boxes.push({name:t.text,wrap:t.wrap??M(),fill:t.color,actorKeys:[]}),h.records.currentBox=h.records.boxes.slice(-1)[0]}),"addBox"),g=(0,n.K2)((function(t,e,a,r){let s=h.records.currentBox;const i=h.records.actors.get(t);if(i){if(h.records.currentBox&&i.box&&h.records.currentBox!==i.box)throw new Error(`A same participant should only be defined in one Box: ${i.name} can't be in '${i.box.name}' and in '${h.records.currentBox.name}' at the same time.`);if(s=i.box?i.box:h.records.currentBox,i.box=s,i&&e===i.name&&null==a)return}if(null==a?.text&&(a={text:e,type:r}),null!=r&&null!=a.text||(a={text:e,type:r}),h.records.actors.set(t,{box:s,name:e,description:a.text,wrap:a.wrap??M(),prevActor:h.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),h.records.prevActor){const e=h.records.actors.get(h.records.prevActor);e&&(e.nextActor=t)}h.records.currentBox&&h.records.currentBox.actorKeys.push(t),h.records.prevActor=t}),"addActor"),u=(0,n.K2)((t=>{let e,a=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}return h.records.messages.push({from:t,to:e,message:a?.text??"",wrap:a?.wrap??M(),type:r,activate:s}),!0}),"addSignal"),m=(0,n.K2)((function(){return h.records.boxes.length>0}),"hasAtLeastOneBox"),b=(0,n.K2)((function(){return h.records.boxes.some((t=>t.name))}),"hasAtLeastOneBoxWithTitle"),T=(0,n.K2)((function(){return h.records.messages}),"getMessages"),f=(0,n.K2)((function(){return h.records.boxes}),"getBoxes"),E=(0,n.K2)((function(){return h.records.actors}),"getActors"),w=(0,n.K2)((function(){return h.records.createdActors}),"getCreatedActors"),I=(0,n.K2)((function(){return h.records.destroyedActors}),"getDestroyedActors"),L=(0,n.K2)((function(t){return h.records.actors.get(t)}),"getActor"),_=(0,n.K2)((function(){return[...h.records.actors.keys()]}),"getActorKeys"),P=(0,n.K2)((function(){h.records.sequenceNumbersEnabled=!0}),"enableSequenceNumbers"),k=(0,n.K2)((function(){h.records.sequenceNumbersEnabled=!1}),"disableSequenceNumbers"),A=(0,n.K2)((()=>h.records.sequenceNumbersEnabled),"showSequenceNumbers"),v=(0,n.K2)((function(t){h.records.wrapEnabled=t}),"setWrap"),N=(0,n.K2)((t=>{if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}),"extractWrap"),M=(0,n.K2)((()=>void 0!==h.records.wrapEnabled?h.records.wrapEnabled:(0,n.D7)().sequence?.wrap??!1),"autoWrap"),D=(0,n.K2)((function(){h.reset(),(0,n.IU)()}),"clear"),O=(0,n.K2)((function(t){const e=t.trim(),{wrap:a,cleanedText:r}=N(e),s={text:r,wrap:a};return n.Rm.debug(`parseMessage: ${JSON.stringify(s)}`),s}),"parseMessage"),S=(0,n.K2)((function(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}const{wrap:s,cleanedText:i}=N(r);return{text:i?(0,n.jZ)(i,(0,n.D7)()):void 0,color:a,wrap:s}}),"parseBoxData"),K={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},R=(0,n.K2)((function(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:a.wrap??M()},s=[].concat(t,t);h.records.notes.push(r),h.records.messages.push({from:s[0],to:s[1],message:a.text,wrap:a.wrap??M(),type:K.NOTE,placement:e})}),"addNote"),Y=(0,n.K2)((function(t,e){const a=L(t);try{let t=(0,n.jZ)(e.text,(0,n.D7)());t=t.replace(/&/g,"&"),t=t.replace(/=/g,"="),B(a,JSON.parse(t))}catch(t){n.Rm.error("error while parsing actor link text",t)}}),"addLinks"),C=(0,n.K2)((function(t,e){const a=L(t);try{const t={};let r=(0,n.jZ)(e.text,(0,n.D7)());const s=r.indexOf("@");r=r.replace(/&/g,"&"),r=r.replace(/=/g,"=");const i=r.slice(0,s-1).trim(),o=r.slice(s+1).trim();t[i]=o,B(a,t)}catch(t){n.Rm.error("error while parsing actor link text",t)}}),"addALink");function B(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}(0,n.K2)(B,"insertLinks");var $=(0,n.K2)((function(t,e){const a=L(t);try{const t=(0,n.jZ)(e.text,(0,n.D7)());V(a,JSON.parse(t))}catch(t){n.Rm.error("error while parsing actor properties text",t)}}),"addProperties");function V(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}function F(){h.records.currentBox=void 0}(0,n.K2)(V,"insertProperties"),(0,n.K2)(F,"boxEnd");var W=(0,n.K2)((function(t,e){const a=L(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&V(a,e.properties),e.links&&B(a,e.links)}catch(t){n.Rm.error("error while parsing actor details text",t)}}),"addDetails"),q=(0,n.K2)((function(t,e){if(void 0!==t?.properties)return t.properties[e]}),"getActorProperty"),z=(0,n.K2)((function(t){if(Array.isArray(t))t.forEach((function(t){z(t)}));else switch(t.type){case"sequenceIndex":h.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":g(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(h.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");h.records.lastCreated=t.actor,g(t.actor,t.actor,t.description,t.draw),h.records.createdActors.set(t.actor,h.records.messages.length);break;case"destroyParticipant":h.records.lastDestroyed=t.actor,h.records.destroyedActors.set(t.actor,h.records.messages.length);break;case"activeStart":case"activeEnd":y(t.actor,void 0,void 0,t.signalType);break;case"addNote":R(t.actor,t.placement,t.text);break;case"addLinks":Y(t.actor,t.text);break;case"addALink":C(t.actor,t.text);break;case"addProperties":$(t.actor,t.text);break;case"addDetails":W(t.actor,t.text);break;case"addMessage":if(h.records.lastCreated){if(t.to!==h.records.lastCreated)throw new Error("The created participant "+h.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");h.records.lastCreated=void 0}else if(h.records.lastDestroyed){if(t.to!==h.records.lastDestroyed&&t.from!==h.records.lastDestroyed)throw new Error("The destroyed participant "+h.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");h.records.lastDestroyed=void 0}y(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":p(t.boxData);break;case"boxEnd":F();break;case"loopStart":y(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":y(void 0,void 0,void 0,t.signalType);break;case"rectStart":y(void 0,void 0,t.color,t.signalType);break;case"optStart":y(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":y(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,n.SV)(t.text);break;case"parStart":case"and":y(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":y(void 0,void 0,t.criticalText,t.signalType);break;case"option":y(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":y(void 0,void 0,t.breakText,t.signalType)}}),"apply"),H={addActor:g,addMessage:x,addSignal:y,addLinks:Y,addDetails:W,addProperties:$,autoWrap:M,setWrap:v,enableSequenceNumbers:P,disableSequenceNumbers:k,showSequenceNumbers:A,getMessages:T,getActors:E,getCreatedActors:w,getDestroyedActors:I,getActor:L,getActorKeys:_,getActorProperty:q,getAccTitle:n.iN,getBoxes:f,getDiagramTitle:n.ab,setDiagramTitle:n.ke,getConfig:(0,n.K2)((()=>(0,n.D7)().sequence),"getConfig"),clear:D,parseMessage:O,parseBoxData:S,LINETYPE:K,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:R,setAccTitle:n.SV,apply:z,setAccDescription:n.EI,getAccDescription:n.m7,hasAtLeastOneBox:m,hasAtLeastOneBoxWithTitle:b},j=(0,n.K2)((t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n`),"getStyles"),U="actor-top",J="actor-bottom",X="actor-man",G=(0,n.K2)((function(t,e){return(0,r.tk)(t,e)}),"drawRect"),Z=(0,n.K2)((function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var l="none";s&&(l="block !important");const d=t.append("g");d.attr("id","actor"+n+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",l);var h="";void 0!==o.class&&(h=" "+o.class);let p=o.width>a?o.width:a;const g=d.append("rect");if(g.attr("class","actorPopupMenuPanel"+h),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",p),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=d.append("a"),y=(0,c.J)(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),It(r)(t,x,o.x+10,o.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:o.height+u,width:p}}),"drawPopup"),Q=(0,n.K2)((function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"}),"popupMenuToggle"),tt=(0,n.K2)((async function(t,e,a=null){let r=t.append("foreignObject");const s=await(0,n.VJ)(e.text,(0,n.zj)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){const e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]}),"drawKatex"),et=(0,n.K2)((function(t,e){let a=0,r=0;const s=e.text.split(n.Y2.lineBreakRegex),[o,c]=(0,i.I5)(e.fontSize);let l=[],d=0,h=(0,n.K2)((()=>e.y),"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":h=(0,n.K2)((()=>Math.round(e.y+e.textMargin)),"yfunc");break;case"middle":case"center":h=(0,n.K2)((()=>Math.round(e.y+(a+r+e.textMargin)/2)),"yfunc");break;case"bottom":case"end":h=(0,n.K2)((()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin)),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[n,p]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==o&&(d=n*o);const s=t.append("text");s.attr("x",e.x),s.attr("y",h()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==c&&s.style("font-size",c),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==d&&s.attr("dy",d);const g=p||i.pe;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else s.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),l.push(s)}return l}),"drawText"),at=(0,n.K2)((function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,n.K2)(a,"genPoints");const r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,et(t,e),r}),"drawLabel"),rt=-1,st=(0,n.K2)(((t,e,a,r)=>{t.select&&a.forEach((a=>{const s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)}))}),"fixLifeLineHeights"),it=(0,n.K2)((function(t,e,a,s){const i=s?e.stopy:e.starty,o=e.x+e.width/2,c=i+5,l=t.append("g").lower();var d=l;s||(rt++,Object.keys(e.links||{}).length&&!a.forceMenus&&d.attr("onclick",Q(`actor${rt}_popup`)).attr("cursor","pointer"),d.append("line").attr("id","actor"+rt).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),d=l.append("g"),e.actorCnt=rt,null!=e.links&&d.attr("id","root-"+rt));const h=(0,r.PB)();var p="actor";e.properties?.class?p=e.properties.class:h.fill="#eaeaea",p+=s?` ${J}`:` ${U}`,h.x=e.x,h.y=i,h.width=e.width,h.height=e.height,h.class=p,h.rx=3,h.ry=3,h.name=e.name;const g=G(d,h);if(e.rectData=h,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,r.CP)(d,h.x+h.width-20,h.y+10,t.substr(1)):(0,r.aC)(d,h.x+h.width-20,h.y+10,t)}wt(a,(0,n.Wi)(e.description))(e.description,d,h.x,h.y,h.width,h.height,{class:"actor actor-box"},a);let u=e.height;if(g.node){const t=g.node().getBBox();e.height=t.height,u=t.height}return u}),"drawActorTypeParticipant"),nt=(0,n.K2)((function(t,e,a,s){const i=s?e.stopy:e.starty,o=e.x+e.width/2,c=i+80,l=t.append("g").lower();s||(rt++,l.append("line").attr("id","actor"+rt).attr("x1",o).attr("y1",c).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=rt);const d=t.append("g");let h=X;h+=s?` ${J}`:` ${U}`,d.attr("class",h),d.attr("name",e.name);const p=(0,r.PB)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",p.rx=3,p.ry=3,d.append("line").attr("id","actor-man-torso"+rt).attr("x1",o).attr("y1",i+25).attr("x2",o).attr("y2",i+45),d.append("line").attr("id","actor-man-arms"+rt).attr("x1",o-18).attr("y1",i+33).attr("x2",o+18).attr("y2",i+33),d.append("line").attr("x1",o-18).attr("y1",i+60).attr("x2",o).attr("y2",i+45),d.append("line").attr("x1",o).attr("y1",i+45).attr("x2",o+18-2).attr("y2",i+60);const g=d.append("circle");g.attr("cx",e.x+e.width/2),g.attr("cy",i+10),g.attr("r",15),g.attr("width",e.width),g.attr("height",e.height);const u=d.node().getBBox();return e.height=u.height,wt(a,(0,n.Wi)(e.description))(e.description,d,p.x,p.y+35,p.width,p.height,{class:`actor ${X}`},a),e.height}),"drawActorTypeActor"),ot=(0,n.K2)((async function(t,e,a,r){switch(e.type){case"actor":return await nt(t,e,a,r);case"participant":return await it(t,e,a,r)}}),"drawActor"),ct=(0,n.K2)((function(t,e,a){const r=t.append("g");pt(r,e),e.name&&wt(a)(e.name,r,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()}),"drawBox"),lt=(0,n.K2)((function(t){return t.append("g")}),"anchorElement"),dt=(0,n.K2)((function(t,e,a,s,i){const n=(0,r.PB)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,G(o,n)}),"drawActivation"),ht=(0,n.K2)((async function(t,e,a,s){const{boxMargin:i,boxTextMargin:o,labelBoxHeight:c,labelBoxWidth:l,messageFontFamily:d,messageFontSize:h,messageFontWeight:p}=s,g=t.append("g"),u=(0,n.K2)((function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")}),"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));let x=(0,r.HT)();x.text=a,x.x=e.startx,x.y=e.starty,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.anchor="middle",x.valign="middle",x.tspan=!1,x.width=l||50,x.height=c||20,x.textMargin=o,x.class="labelText",at(g,x),x=ft(),x.text=e.title,x.x=e.startx+l/2+(e.stopx-e.startx)/2,x.y=e.starty+i+o,x.anchor="middle",x.valign="middle",x.textMargin=o,x.class="loopText",x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=!0;let y=(0,n.Wi)(x.text)?await tt(g,x,e):et(g,x);if(void 0!==e.sectionTitles)for(const[t,a]of Object.entries(e.sectionTitles))if(a.message){x.text=a.message,x.x=e.startx+(e.stopx-e.startx)/2,x.y=e.sections[t].y+i+o,x.class="loopText",x.anchor="middle",x.valign="middle",x.tspan=!1,x.fontFamily=d,x.fontSize=h,x.fontWeight=p,x.wrap=e.wrap,(0,n.Wi)(x.text)?(e.starty=e.sections[t].y,await tt(g,x,e)):et(g,x);let r=Math.round(y.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));e.sections[t].height+=r-(i+o)}return e.height=Math.round(e.stopy-e.starty),g}),"drawLoop"),pt=(0,n.K2)((function(t,e){(0,r.lC)(t,e)}),"drawBackgroundRect"),gt=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),ut=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),xt=(0,n.K2)((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),yt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")}),"insertArrowHead"),mt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"insertArrowFilledHead"),bt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertSequenceNumber"),Tt=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")}),"insertArrowCrossHead"),ft=(0,n.K2)((function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}}),"getTextObj"),Et=(0,n.K2)((function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),wt=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,o,c,l,d){const{actorFontSize:h,actorFontFamily:p,actorFontWeight:g}=d,[u,x]=(0,i.I5)(h),y=t.split(n.Y2.lineBreakRegex);for(let t=0;tt.height||0)))+(0===this.loops.length?0:this.loops.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.messages.length?0:this.messages.map((t=>t.height||0)).reduce(((t,e)=>t+e)))+(0===this.notes.length?0:this.notes.map((t=>t.height||0)).reduce(((t,e)=>t+e)))}),"getHeight"),clear:(0,n.K2)((function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]}),"clear"),addBox:(0,n.K2)((function(t){this.boxes.push(t)}),"addBox"),addActor:(0,n.K2)((function(t){this.actors.push(t)}),"addActor"),addLoop:(0,n.K2)((function(t){this.loops.push(t)}),"addLoop"),addMessage:(0,n.K2)((function(t){this.messages.push(t)}),"addMessage"),addNote:(0,n.K2)((function(t){this.notes.push(t)}),"addNote"),lastActor:(0,n.K2)((function(){return this.actors[this.actors.length-1]}),"lastActor"),lastLoop:(0,n.K2)((function(){return this.loops[this.loops.length-1]}),"lastLoop"),lastMessage:(0,n.K2)((function(){return this.messages[this.messages.length-1]}),"lastMessage"),lastNote:(0,n.K2)((function(){return this.notes[this.notes.length-1]}),"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,n.K2)((function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Rt((0,n.D7)())}),"init"),updateVal:(0,n.K2)((function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])}),"updateVal"),updateBounds:(0,n.K2)((function(t,e,a,r){const s=this;let i=0;function o(o){return(0,n.K2)((function(n){i++;const c=s.sequenceItems.length-i+1;s.updateVal(n,"starty",e-c*_t.boxMargin,Math.min),s.updateVal(n,"stopy",r+c*_t.boxMargin,Math.max),s.updateVal(Pt.data,"startx",t-c*_t.boxMargin,Math.min),s.updateVal(Pt.data,"stopx",a+c*_t.boxMargin,Math.max),"activation"!==o&&(s.updateVal(n,"startx",t-c*_t.boxMargin,Math.min),s.updateVal(n,"stopx",a+c*_t.boxMargin,Math.max),s.updateVal(Pt.data,"starty",e-c*_t.boxMargin,Math.min),s.updateVal(Pt.data,"stopy",r+c*_t.boxMargin,Math.max))}),"updateItemBounds")}(0,n.K2)(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))}),"updateBounds"),insert:(0,n.K2)((function(t,e,a,r){const s=n.Y2.getMin(t,a),i=n.Y2.getMax(t,a),o=n.Y2.getMin(e,r),c=n.Y2.getMax(e,r);this.updateVal(Pt.data,"startx",s,Math.min),this.updateVal(Pt.data,"starty",o,Math.min),this.updateVal(Pt.data,"stopx",i,Math.max),this.updateVal(Pt.data,"stopy",c,Math.max),this.updateBounds(s,o,i,c)}),"insert"),newActivation:(0,n.K2)((function(t,e,a){const r=a.get(t.from),s=Yt(t.from).length||0,i=r.x+r.width/2+(s-1)*_t.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+_t.activationWidth,stopy:void 0,actor:t.from,anchored:Lt.anchorElement(e)})}),"newActivation"),endActivation:(0,n.K2)((function(t){const e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from);return this.activations.splice(e,1)[0]}),"endActivation"),createLoop:(0,n.K2)((function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}}),"createLoop"),newLoop:(0,n.K2)((function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))}),"newLoop"),endLoop:(0,n.K2)((function(){return this.sequenceItems.pop()}),"endLoop"),isLoopOverlap:(0,n.K2)((function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap}),"isLoopOverlap"),addSectionToLoop:(0,n.K2)((function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Pt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)}),"addSectionToLoop"),saveVerticalPos:(0,n.K2)((function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)}),"saveVerticalPos"),resetVerticalPos:(0,n.K2)((function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)}),"resetVerticalPos"),bumpVerticalPos:(0,n.K2)((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=n.Y2.getMax(this.data.stopy,this.verticalPos)}),"bumpVerticalPos"),getVerticalPos:(0,n.K2)((function(){return this.verticalPos}),"getVerticalPos"),getBounds:(0,n.K2)((function(){return{bounds:this.data,models:this.models}}),"getBounds")},kt=(0,n.K2)((async function(t,e){Pt.bumpVerticalPos(_t.boxMargin),e.height=_t.boxMargin,e.starty=Pt.getVerticalPos();const a=(0,r.PB)();a.x=e.startx,a.y=e.starty,a.width=e.width||_t.width,a.class="note";const s=t.append("g"),i=Lt.drawRect(s,a),o=(0,r.HT)();o.x=e.startx,o.y=e.starty,o.width=a.width,o.dy="1em",o.text=e.message,o.class="noteText",o.fontFamily=_t.noteFontFamily,o.fontSize=_t.noteFontSize,o.fontWeight=_t.noteFontWeight,o.anchor=_t.noteAlign,o.textMargin=_t.noteMargin,o.valign="center";const c=(0,n.Wi)(o.text)?await tt(s,o):et(s,o),l=Math.round(c.map((t=>(t._groups||t)[0][0].getBBox().height)).reduce(((t,e)=>t+e)));i.attr("height",l+2*_t.noteMargin),e.height+=l+2*_t.noteMargin,Pt.bumpVerticalPos(l+2*_t.noteMargin),e.stopy=e.starty+l+2*_t.noteMargin,e.stopx=e.startx+a.width,Pt.insert(e.startx,e.starty,e.stopx,e.stopy),Pt.models.addNote(e)}),"drawNote"),At=(0,n.K2)((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont"),vt=(0,n.K2)((t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight})),"noteFont"),Nt=(0,n.K2)((t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight})),"actorFont");async function Mt(t,e){Pt.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,o=n.Y2.splitBreaks(s).length,c=(0,n.Wi)(s),l=c?await(0,n.Dl)(s,(0,n.D7)()):i._K.calculateTextDimensions(s,At(_t));if(!c){const t=l.height/o;e.height+=t,Pt.bumpVerticalPos(t)}let d,h=l.height-10;const p=l.width;if(a===r){d=Pt.getVerticalPos()+h,_t.rightAngles||(h+=_t.boxMargin,d=Pt.getVerticalPos()+h),h+=30;const t=n.Y2.getMax(p/2,_t.width/2);Pt.insert(a-t,Pt.getVerticalPos()-10+h,r+t,Pt.getVerticalPos()+30+h)}else h+=_t.boxMargin,d=Pt.getVerticalPos()+h,Pt.insert(a,d-10,r,d);return Pt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Pt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),d}(0,n.K2)(Mt,"boundMessage");var Dt=(0,n.K2)((async function(t,e,a,s){const{startx:o,stopx:c,starty:l,message:d,type:h,sequenceIndex:p,sequenceVisible:g}=e,u=i._K.calculateTextDimensions(d,At(_t)),x=(0,r.HT)();x.x=o,x.y=l+10,x.width=c-o,x.class="messageText",x.dy="1em",x.text=d,x.fontFamily=_t.messageFontFamily,x.fontSize=_t.messageFontSize,x.fontWeight=_t.messageFontWeight,x.anchor=_t.messageAlign,x.valign="center",x.textMargin=_t.wrapPadding,x.tspan=!1,(0,n.Wi)(x.text)?await tt(t,x,{startx:o,stopx:c,starty:a}):et(t,x);const y=u.width;let m;o===c?m=_t.rightAngles?t.append("path").attr("d",`M ${o},${a} H ${o+n.Y2.getMax(_t.width/2,y/2)} V ${a+25} H ${o}`):t.append("path").attr("d","M "+o+","+a+" C "+(o+60)+","+(a-10)+" "+(o+60)+","+(a+30)+" "+o+","+(a+20)):(m=t.append("line"),m.attr("x1",o),m.attr("y1",a),m.attr("x2",c),m.attr("y2",a)),h===s.db.LINETYPE.DOTTED||h===s.db.LINETYPE.DOTTED_CROSS||h===s.db.LINETYPE.DOTTED_POINT||h===s.db.LINETYPE.DOTTED_OPEN||h===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let b="";_t.arrowMarkerAbsolute&&(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,b=b.replace(/\(/g,"\\("),b=b.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),h!==s.db.LINETYPE.SOLID&&h!==s.db.LINETYPE.DOTTED||m.attr("marker-end","url("+b+"#arrowhead)"),h!==s.db.LINETYPE.BIDIRECTIONAL_SOLID&&h!==s.db.LINETYPE.BIDIRECTIONAL_DOTTED||(m.attr("marker-start","url("+b+"#arrowhead)"),m.attr("marker-end","url("+b+"#arrowhead)")),h!==s.db.LINETYPE.SOLID_POINT&&h!==s.db.LINETYPE.DOTTED_POINT||m.attr("marker-end","url("+b+"#filled-head)"),h!==s.db.LINETYPE.SOLID_CROSS&&h!==s.db.LINETYPE.DOTTED_CROSS||m.attr("marker-end","url("+b+"#crosshead)"),(g||_t.showSequenceNumbers)&&(m.attr("marker-start","url("+b+"#sequencenumber)"),t.append("text").attr("x",o).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(p))}),"drawMessage"),Ot=(0,n.K2)((function(t,e,a,r,s,i,o){let c,l=0,d=0,h=0;for(const t of r){const r=e.get(t),i=r.box;c&&c!=i&&(o||Pt.models.addBox(c),d+=_t.boxMargin+c.margin),i&&i!=c&&(o||(i.x=l+d,i.y=s),d+=i.margin),r.width=r.width||_t.width,r.height=n.Y2.getMax(r.height||_t.height,_t.height),r.margin=r.margin||_t.actorMargin,h=n.Y2.getMax(h,r.height),a.get(r.name)&&(d+=r.width/2),r.x=l+d,r.starty=Pt.getVerticalPos(),Pt.insert(r.x,s,r.x+r.width,r.height),l+=r.width+d,r.box&&(r.box.width=l+i.margin-r.box.x),d=r.margin,c=r.box,Pt.models.addActor(r)}c&&!o&&Pt.models.addBox(c),Pt.bumpVerticalPos(h)}),"addActorRenderingData"),St=(0,n.K2)((async function(t,e,a,r){if(r){let r=0;Pt.bumpVerticalPos(2*_t.boxMargin);for(const s of a){const a=e.get(s);a.stopy||(a.stopy=Pt.getVerticalPos());const i=await Lt.drawActor(t,a,_t,!0);r=n.Y2.getMax(r,i)}Pt.bumpVerticalPos(r+_t.boxMargin)}else for(const r of a){const a=e.get(r);await Lt.drawActor(t,a,_t,!1)}}),"drawActors"),Kt=(0,n.K2)((function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e.get(n),o=Wt(a),c=Lt.drawPopup(t,a,o,_t,_t.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}}),"drawActorsPopup"),Rt=(0,n.K2)((function(t){(0,n.hH)(_t,t),t.fontFamily&&(_t.actorFontFamily=_t.noteFontFamily=_t.messageFontFamily=t.fontFamily),t.fontSize&&(_t.actorFontSize=_t.noteFontSize=_t.messageFontSize=t.fontSize),t.fontWeight&&(_t.actorFontWeight=_t.noteFontWeight=_t.messageFontWeight=t.fontWeight)}),"setConf"),Yt=(0,n.K2)((function(t){return Pt.activations.filter((function(e){return e.actor===t}))}),"actorActivations"),Ct=(0,n.K2)((function(t,e){const a=e.get(t),r=Yt(t);return[r.reduce((function(t,e){return n.Y2.getMin(t,e.startx)}),a.x+a.width/2-1),r.reduce((function(t,e){return n.Y2.getMax(t,e.stopx)}),a.x+a.width/2+1)]}),"activationBounds");function Bt(t,e,a,r,s){Pt.bumpVerticalPos(a);let o=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=At(_t);e.message=i._K.wrapLabel(`[${e.message}]`,a-2*_t.wrapPadding,s),e.width=a,e.wrap=!0;const c=i._K.calculateTextDimensions(e.message,s),l=n.Y2.getMax(c.height,_t.labelBoxHeight);o=r+l,n.Rm.debug(`${l} - ${e.message}`)}s(e),Pt.bumpVerticalPos(o)}function $t(t,e,a,r,s,i,o){function c(a,r){a.x{t.add(e.from),t.add(e.to)})),y=y.filter((e=>t.has(e)))}Ot(h,p,g,y,0,m,!1);const w=await jt(m,p,E,r);function I(t,e){const a=Pt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),Lt.drawActivation(h,a,e,_t,Yt(t.from).length),Pt.insert(a.startx,e-10,a.stopx,e)}Lt.insertArrowHead(h),Lt.insertArrowCrossHead(h),Lt.insertArrowFilledHead(h),Lt.insertSequenceNumber(h),(0,n.K2)(I,"activeEnd");let L=1,_=1;const P=[],k=[];let A=0;for(const t of m){let e,a,s;switch(t.type){case r.db.LINETYPE.NOTE:Pt.resetVerticalPos(),a=t.noteModel,await kt(h,a);break;case r.db.LINETYPE.ACTIVE_START:Pt.newActivation(t,h,p);break;case r.db.LINETYPE.ACTIVE_END:I(t,Pt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.LOOP_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"loop",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.RECT_START:Bt(w,t,_t.boxMargin,_t.boxMargin,(t=>Pt.newLoop(void 0,t.message)));break;case r.db.LINETYPE.RECT_END:e=Pt.endLoop(),k.push(e),Pt.models.addLoop(e),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.OPT_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"opt",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.ALT_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.ALT_ELSE:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.ALT_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"alt",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t))),Pt.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.PAR_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"par",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.AUTONUMBER:L=t.message.start||L,_=t.message.step||_,t.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.CRITICAL_OPTION:Bt(w,t,_t.boxMargin+_t.boxTextMargin,_t.boxMargin,(t=>Pt.addSectionToLoop(t)));break;case r.db.LINETYPE.CRITICAL_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"critical",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;case r.db.LINETYPE.BREAK_START:Bt(w,t,_t.boxMargin,_t.boxMargin+_t.boxTextMargin,(t=>Pt.newLoop(t)));break;case r.db.LINETYPE.BREAK_END:e=Pt.endLoop(),await Lt.drawLoop(h,e,"break",_t),Pt.bumpVerticalPos(e.stopy-Pt.getVerticalPos()),Pt.models.addLoop(e);break;default:try{s=t.msgModel,s.starty=Pt.getVerticalPos(),s.sequenceIndex=L,s.sequenceVisible=r.db.showSequenceNumbers();const e=await Mt(0,s);$t(t,s,e,A,p,g,u),P.push({messageModel:s,lineStartY:e}),Pt.models.addMessage(s)}catch(t){n.Rm.error("error while drawing message",t)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(L+=_),A++}n.Rm.debug("createdActors",g),n.Rm.debug("destroyedActors",u),await St(h,p,y,!1);for(const t of P)await Dt(h,t.messageModel,t.lineStartY,r);_t.mirrorActors&&await St(h,p,y,!0),k.forEach((t=>Lt.drawBackgroundRect(h,t))),st(h,p,y,_t);for(const t of Pt.models.boxes)t.height=Pt.getVerticalPos()-t.y,Pt.insert(t.x,t.y,t.x+t.width,t.height),t.startx=t.x,t.starty=t.y,t.stopx=t.startx+t.width,t.stopy=t.starty+t.height,t.stroke="rgb(0,0,0, 0.5)",Lt.drawBox(h,t,_t);T&&Pt.bumpVerticalPos(_t.boxMargin);const v=Kt(h,p,y,d),{bounds:N}=Pt.getBounds();void 0===N.startx&&(N.startx=0),void 0===N.starty&&(N.starty=0),void 0===N.stopx&&(N.stopx=0),void 0===N.stopy&&(N.stopy=0);let M=N.stopy-N.starty;M{const a=At(_t);let r=e.actorKeys.reduce(((e,a)=>e+(t.get(a).width+(t.get(a).margin||0))),0);r-=2*_t.boxTextMargin,e.wrap&&(e.name=i._K.wrapLabel(e.name,r-2*_t.wrapPadding,a));const o=i._K.calculateTextDimensions(e.name,a);s=n.Y2.getMax(o.height,s);const c=n.Y2.getMax(r,o.width+2*_t.wrapPadding);if(e.margin=_t.boxTextMargin,rt.textMaxHeight=s)),n.Y2.getMax(r,_t.height)}(0,n.K2)(qt,"calculateActorMargins");var zt=(0,n.K2)((async function(t,e,a){const r=e.get(t.from),s=e.get(t.to),o=r.x,c=s.x,l=t.wrap&&t.message;let d=(0,n.Wi)(t.message)?await(0,n.Dl)(t.message,(0,n.D7)()):i._K.calculateTextDimensions(l?i._K.wrapLabel(t.message,_t.width,vt(_t)):t.message,vt(_t));const h={width:l?_t.width:n.Y2.getMax(_t.width,d.width+2*_t.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(h.width=l?n.Y2.getMax(_t.width,d.width):n.Y2.getMax(r.width/2+s.width/2,d.width+2*_t.noteMargin),h.startx=o+(r.width+_t.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(h.width=l?n.Y2.getMax(_t.width,d.width+2*_t.noteMargin):n.Y2.getMax(r.width/2+s.width/2,d.width+2*_t.noteMargin),h.startx=o-h.width+(r.width-_t.actorMargin)/2):t.to===t.from?(d=i._K.calculateTextDimensions(l?i._K.wrapLabel(t.message,n.Y2.getMax(_t.width,r.width),vt(_t)):t.message,vt(_t)),h.width=l?n.Y2.getMax(_t.width,r.width):n.Y2.getMax(r.width,_t.width,d.width+2*_t.noteMargin),h.startx=o+(r.width-h.width)/2):(h.width=Math.abs(o+r.width/2-(c+s.width/2))+_t.actorMargin,h.startx=o2,g=(0,n.K2)((t=>l?-t:t),"adjustValue");t.from===t.to?h=d:(t.activate&&!p&&(h+=g(_t.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(h+=g(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(d-=g(3)));const u=[r,s,o,c],x=Math.abs(d-h);t.wrap&&t.message&&(t.message=i._K.wrapLabel(t.message,n.Y2.getMax(x+2*_t.wrapPadding,_t.width),At(_t)));const y=i._K.calculateTextDimensions(t.message,At(_t));return{width:n.Y2.getMax(t.wrap?0:y.width+2*_t.wrapPadding,x+2*_t.wrapPadding,_t.width),height:0,startx:d,stopx:h,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,u),toBounds:Math.max.apply(null,u)}}),"buildMessageModel"),jt=(0,n.K2)((async function(t,e,a,r){const s={},o=[];let c,l,d;for(const a of t){switch(a.id=i._K.random({length:10}),a.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:o.push({id:a.id,msg:a.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:a.message&&(c=o.pop(),s[c.id]=c,s[a.id]=c,o.push(c));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:c=o.pop(),s[c.id]=c;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(a.from?a.from:a.to.actor),r=Yt(a.from?a.from:a.to.actor).length,s=t.x+t.width/2+(r-1)*_t.activationWidth/2,i={startx:s,stopx:s+_t.activationWidth,actor:a.from,enabled:!0};Pt.activations.push(i)}break;case r.db.LINETYPE.ACTIVE_END:{const t=Pt.activations.map((t=>t.actor)).lastIndexOf(a.from);Pt.activations.splice(t,1).splice(0,1)}}void 0!==a.placement?(l=await zt(a,e,r),a.noteModel=l,o.forEach((t=>{c=t,c.from=n.Y2.getMin(c.from,l.startx),c.to=n.Y2.getMax(c.to,l.startx+l.width),c.width=n.Y2.getMax(c.width,Math.abs(c.from-c.to))-_t.labelBoxWidth}))):(d=Ht(a,e,r),a.msgModel=d,d.startx&&d.stopx&&o.length>0&&o.forEach((t=>{if(c=t,d.startx===d.stopx){const t=e.get(a.from),r=e.get(a.to);c.from=n.Y2.getMin(t.x-d.width/2,t.x-t.width/2,c.from),c.to=n.Y2.getMax(r.x+d.width/2,r.x+t.width/2,c.to),c.width=n.Y2.getMax(c.width,Math.abs(c.to-c.from))-_t.labelBoxWidth}else c.from=n.Y2.getMin(d.startx,c.from),c.to=n.Y2.getMax(d.stopx,c.to),c.width=n.Y2.getMax(c.width,d.width)-_t.labelBoxWidth})))}return Pt.activations=[],n.Rm.debug("Loop type widths:",s),s}),"calculateLoopBounds"),Ut={parser:d,db:H,renderer:{bounds:Pt,drawActors:St,drawActorsPopup:Kt,setConf:Rt,draw:Vt},styles:j,init:(0,n.K2)((({wrap:t})=>{H.setWrap(t)}),"init")}}}]); \ No newline at end of file diff --git a/js/590-754a9e66.chunk.min.js b/js/590-754a9e66.chunk.min.js new file mode 100644 index 0000000..2918bb5 --- /dev/null +++ b/js/590-754a9e66.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[590],{4590:(t,e,a)=>{a.d(e,{diagram:()=>L});var i,n=a(1003),r=(a(4868),a(5388),a(3256),a(8568),a(7750),a(2382),a(5522)),d=a(32),s=a(4852),o=a(567),g=a(697),c={},p=(0,d.K2)(((t,e)=>{c[t]=e}),"set"),h=(0,d.K2)((t=>c[t]),"get"),l=(0,d.K2)((()=>Object.keys(c)),"keys"),x=(0,d.K2)((()=>l().length),"size"),D={get:h,set:p,keys:l,size:x},u=(0,d.K2)((t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit)),"drawStartState"),f=(0,d.K2)((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),y=(0,d.K2)(((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a}),"drawSimpleState"),w=(0,d.K2)(((t,e)=>{const a=(0,d.K2)((function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)}),"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let s=!0,o=!0;e.descriptions.forEach((function(t){s||(a(r,t,o),o=!1),s=!1}));const g=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),c=r.node().getBBox(),p=Math.max(c.width,i.width);return g.attr("x2",p+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",p+2*(0,d.D7)().state.padding).attr("height",c.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t}),"drawDescrState"),m=(0,d.K2)(((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),c=g.node().getBBox().width+n;let p,h=Math.max(c,s);h===s&&(h+=n);const l=t.node().getBBox();e.doc,p=o-i,c>s&&(p=(s-h)/2+i),Math.abs(o-l.x)s&&(p=o-(c-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",p+i),c<=s&&g.attr("x",o+(h-n)/2-c/2+i),t.insert("rect",":first-child").attr("x",p).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",h).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",h).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t}),"addTitleAndBox"),b=(0,d.K2)((t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2))),"drawEndState"),B=(0,d.K2)(((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)}),"drawForkJoinState"),k=(0,d.K2)(((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"
");s=s.replace(/\n/g,"
");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const t of o){const i=t.trim();if(i.length>0){const t=r.append("tspan");t.text(i),0===g&&(g+=t.node().getBBox().height),n+=g,t.attr("x",e+(0,d.D7)().state.noteMargin),t.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}}),"_drawLongText"),S=(0,d.K2)(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=k(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a}),"drawNote"),N=(0,d.K2)((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&u(n),"end"===e.type&&b(n),"fork"!==e.type&&"join"!==e.type||B(n,e),"note"===e.type&&S(e.note.text,n),"divider"===e.type&&f(n),"default"===e.type&&0===e.descriptions.length&&y(n,e),"default"===e.type&&e.descriptions.length>0&&w(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,D.set(a,i),i}),"drawState"),E=0,K=(0,d.K2)((function(t,e,a){const i=(0,d.K2)((function(t){switch(t){case n.iP.relationType.AGGREGATION:return"aggregation";case n.iP.relationType.EXTENSION:return"extension";case n.iP.relationType.COMPOSITION:return"composition";case n.iP.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const o=e.points,g=(0,s.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.qrM),c=t.append("path").attr("d",g(o)).attr("id","edge"+E).attr("class","transition");let p="";if((0,d.D7)().state.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)")),c.attr("marker-end","url("+p+"#"+i(n.iP.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:s}=r._K.calcLabelPosition(e.points),o=d.Y2.getRows(a.title);let g=0;const c=[];let p=0,h=0;for(let t=0;t<=o.length;t++){const e=i.append("text").attr("text-anchor","middle").text(o[t]).attr("x",n).attr("y",s+g),a=e.node().getBBox();if(p=Math.max(p,a.width),h=Math.min(h,a.x),d.Rm.info(a.x,n,s+g),0===g){const t=e.node().getBBox();g=t.height,d.Rm.info("Title height",g,s)}c.push(e)}let l=g*o.length;if(o.length>1){const t=(o.length-1)*g*.5;c.forEach(((e,a)=>e.attr("y",s+a*g-t))),l=g*o.length}const x=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-p/2-(0,d.D7)().state.padding/2).attr("y",s-l/2-(0,d.D7)().state.padding/2-3.5).attr("width",p+(0,d.D7)().state.padding).attr("height",l+(0,d.D7)().state.padding),d.Rm.info(x)}E++}),"drawEdge"),M={},v=(0,d.K2)((function(){}),"setConf"),R=(0,d.K2)((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),z=(0,d.K2)((function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let o;"sandbox"===r&&(o=(0,s.Ltv)("#i"+e));const g="sandbox"===r?(0,s.Ltv)(o.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),c="sandbox"===r?o.nodes()[0].contentDocument:document;d.Rm.debug("Rendering diagram "+t);const p=g.select(`[id='${e}']`);R(p);const h=n.db.getRootDoc();T(h,p,void 0,!1,g,c,n);const l=i.padding,x=p.node().getBBox(),D=x.width+2*l,u=x.height+2*l,f=1.75*D;(0,d.a$)(p,u,f,i.useMaxWidth),p.attr("viewBox",`${x.x-i.padding} ${x.y-i.padding} `+D+" "+u)}),"draw"),H=(0,d.K2)((t=>t?t.length*i.fontSizeFactor:1),"getLabelWidth"),T=(0,d.K2)(((t,e,a,n,r,s,c)=>{const p=new g.T({compound:!0,multigraph:!0});let h,l=!0;for(h=0;h{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))):d.Rm.debug("No Node "+t+": "+JSON.stringify(p.node(t)))}));let w=y.getBBox();p.edges().forEach((function(t){void 0!==t&&void 0!==p.edge(t)&&(d.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(p.edge(t))),K(e,p.edge(t),p.edge(t).relation))})),w=y.getBBox();const b={id:a||"root",label:a||"root",width:0,height:0};return b.width=w.width+2*i.padding,b.height=w.height+2*i.padding,d.Rm.debug("Doc rendered",b,p),b}),"renderDoc"),P={setConf:v,draw:z},L={parser:n.Zk,db:n.iP,renderer:P,styles:n.tM,init:(0,d.K2)((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n.iP.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/604-d2d497f5.chunk.min.js b/js/604-d2d497f5.chunk.min.js new file mode 100644 index 0000000..066f703 --- /dev/null +++ b/js/604-d2d497f5.chunk.min.js @@ -0,0 +1 @@ +(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[604],{6527:function(t,e,i){var r;r=function(t){return(()=>{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),r=1;r{var r=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],r=!0,n=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);r=!0);}catch(t){n=!0,o=t}finally{try{!r&&a.return&&a.return()}finally{if(n)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},n=i(140).layoutBase.LinkedList,o={getTopMostNodes:function(t){for(var e={},i=0;i0&&l.merge(t)}));for(var c=0;c1){l=a[0],c=l.connectedEdges().length,a.forEach((function(t){t.connectedEdges().length0&&r.set("dummy"+(r.size+1),u),p},relocateComponent:function(t,e,i){if(!i.fixedNodeConstraint){var n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if("draft"==i.quality){var h=!0,l=!1,c=void 0;try{for(var d,g=e.nodeIndexes[Symbol.iterator]();!(h=(d=g.next()).done);h=!0){var u=d.value,p=r(u,2),f=p[0],y=p[1],v=i.cy.getElementById(f);if(v){var m=v.boundingBox(),E=e.xCoords[y]-m.w/2,N=e.xCoords[y]+m.w/2,T=e.yCoords[y]-m.h/2,A=e.yCoords[y]+m.h/2;Eo&&(o=N),Ta&&(a=A)}}}catch(t){l=!0,c=t}finally{try{!h&&g.return&&g.return()}finally{if(l)throw c}}var w=t.x-(o+n)/2,L=t.y-(a+s)/2;e.xCoords=e.xCoords.map((function(t){return t+w})),e.yCoords=e.yCoords.map((function(t){return t+L}))}else{Object.keys(e).forEach((function(t){var i=e[t],r=i.getRect().x,h=i.getRect().x+i.getRect().width,l=i.getRect().y,c=i.getRect().y+i.getRect().height;ro&&(o=h),la&&(a=c)}));var I=t.x-(o+n)/2,_=t.y-(a+s)/2;Object.keys(e).forEach((function(t){var i=e[t];i.setCenter(i.getCenterX()+I,i.getCenterY()+_)}))}}},calcBoundingBox:function(t,e,i,r){for(var n=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,h=void 0,l=void 0,c=void 0,d=void 0,g=t.descendants().not(":parent"),u=g.length,p=0;p(h=e[r.get(f.id())]-f.width()/2)&&(n=h),o<(l=e[r.get(f.id())]+f.width()/2)&&(o=l),s>(c=i[r.get(f.id())]-f.height()/2)&&(s=c),a<(d=i[r.get(f.id())]+f.height()/2)&&(a=d)}var y={};return y.topLeftX=n,y.topLeftY=s,y.width=o-n,y.height=a-s,y},calcParentsWithoutChildren:function(t,e){var i=t.collection();return e.nodes(":parent").forEach((function(t){var e=!1;t.children().forEach((function(t){"none"!=t.css("display")&&(e=!0)})),e||i.merge(t)})),i}};t.exports=o},816:(t,e,i)=>{var r=i(548),n=i(140).CoSELayout,o=i(140).CoSENode,s=i(140).layoutBase.PointD,a=i(140).layoutBase.DimensionD,h=i(140).layoutBase.LayoutConstants,l=i(140).layoutBase.FDLayoutConstants,c=i(140).CoSEConstants;t.exports={coseLayout:function(t,e){var i=t.cy,d=t.eles,g=d.nodes(),u=d.edges(),p=void 0,f=void 0,y=void 0,v={};t.randomize&&(p=e.nodeIndexes,f=e.xCoords,y=e.yCoords);var m=function(t){return"function"==typeof t},E=function(t,e){return m(t)?t(e):t},N=r.calcParentsWithoutChildren(i,d);null!=t.nestingFactor&&(c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(c.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(c.MAX_ITERATIONS=l.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(c.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(c.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(c.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?h.QUALITY=2:h.QUALITY=0,c.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!t.randomize,c.ANIMATE=l.ANIMATE=h.ANIMATE=t.animate,c.TILE=t.tile,c.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,c.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,c.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,c.PURE_INCREMENTAL=!t.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!1),"enforced"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!1),"cose"==t.step&&(c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!1,c.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?c.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:c.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,c.ENFORCE_CONSTRAINTS=!0,c.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?c.TREE_REDUCTION_ON_INCREMENTAL=!1:c.TREE_REDUCTION_ON_INCREMENTAL=!0;var T=new n,A=T.newGraphManager();return function t(e,i,n,h){for(var l=i.length,c=0;c0&&t(n.getGraphManager().add(n.newGraph(),u),g,n,h)}}(A.addRoot(),r.getTopMostNodes(g),T,t),function(e,i,r){for(var n=0,o=0,s=0;s0?c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=n/o:m(t.idealEdgeLength)?c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:c.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,c.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,c.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)}(T,A,u),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(T,t),T.runLayout(),v}}},212:(t,e,i)=>{var r=function(){function t(t,e){for(var i=0;i0)if(d){var g=o.getTopMostNodes(t.eles.nodes());if((h=o.connectComponents(e,t.eles,g)).forEach((function(t){var e=t.boundingBox();l.push({x:e.x1+e.w/2,y:e.y1+e.h/2})})),t.randomize&&h.forEach((function(e){t.eles=e,r.push(s(t))})),"default"==t.quality||"proof"==t.quality){var u=e.collection();if(t.tile){var p=new Map,f=0,y={nodeIndexes:p,xCoords:[],yCoords:[]},v=[];if(h.forEach((function(t,e){0==t.edges().length&&(t.nodes().forEach((function(e,i){u.merge(t.nodes()[i]),e.isParent()||(y.nodeIndexes.set(t.nodes()[i].id(),f++),y.xCoords.push(t.nodes()[0].position().x),y.yCoords.push(t.nodes()[0].position().y))})),v.push(e))})),u.length>1){var m=u.boundingBox();l.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),h.push(u),r.push(y);for(var E=v.length-1;E>=0;E--)h.splice(v[E],1),r.splice(v[E],1),l.splice(v[E],1)}}h.forEach((function(e,i){t.eles=e,n.push(a(t,r[i])),o.relocateComponent(l[i],n[i],t)}))}else h.forEach((function(e,i){o.relocateComponent(l[i],r[i],t)}));var N=new Set;if(h.length>1){var T=[],A=i.filter((function(t){return"none"==t.css("display")}));h.forEach((function(e,i){var s=void 0;if("draft"==t.quality&&(s=r[i].nodeIndexes),e.nodes().not(A).length>0){var a={edges:[],nodes:[]},h=void 0;e.nodes().not(A).forEach((function(e){if("draft"==t.quality)if(e.isParent()){var l=o.calcBoundingBox(e,r[i].xCoords,r[i].yCoords,s);a.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else h=s.get(e.id()),a.nodes.push({x:r[i].xCoords[h]-e.boundingbox().w/2,y:r[i].yCoords[h]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else n[i][e.id()]&&a.nodes.push({x:n[i][e.id()].getLeft(),y:n[i][e.id()].getTop(),width:n[i][e.id()].getWidth(),height:n[i][e.id()].getHeight()})})),e.edges().forEach((function(e){var h=e.source(),l=e.target();if("none"!=h.css("display")&&"none"!=l.css("display"))if("draft"==t.quality){var c=s.get(h.id()),d=s.get(l.id()),g=[],u=[];if(h.isParent()){var p=o.calcBoundingBox(h,r[i].xCoords,r[i].yCoords,s);g.push(p.topLeftX+p.width/2),g.push(p.topLeftY+p.height/2)}else g.push(r[i].xCoords[c]),g.push(r[i].yCoords[c]);if(l.isParent()){var f=o.calcBoundingBox(l,r[i].xCoords,r[i].yCoords,s);u.push(f.topLeftX+f.width/2),u.push(f.topLeftY+f.height/2)}else u.push(r[i].xCoords[d]),u.push(r[i].yCoords[d]);a.edges.push({startX:g[0],startY:g[1],endX:u[0],endY:u[1]})}else n[i][h.id()]&&n[i][l.id()]&&a.edges.push({startX:n[i][h.id()].getCenterX(),startY:n[i][h.id()].getCenterY(),endX:n[i][l.id()].getCenterX(),endY:n[i][l.id()].getCenterY()})})),a.nodes.length>0&&(T.push(a),N.add(i))}}));var w=c.packComponents(T,t.randomize).shifts;if("draft"==t.quality)r.forEach((function(t,e){var i=t.xCoords.map((function(t){return t+w[e].dx})),r=t.yCoords.map((function(t){return t+w[e].dy}));t.xCoords=i,t.yCoords=r}));else{var L=0;N.forEach((function(t){Object.keys(n[t]).forEach((function(e){var i=n[t][e];i.setCenter(i.getCenterX()+w[L].dx,i.getCenterY()+w[L].dy)})),L++}))}}}else{var I=t.eles.boundingBox();if(l.push({x:I.x1+I.w/2,y:I.y1+I.h/2}),t.randomize){var _=s(t);r.push(_)}"default"==t.quality||"proof"==t.quality?(n.push(a(t,r[0])),o.relocateComponent(l[0],n[0],t)):o.relocateComponent(l[0],r[0],t)}var C=function(e,i){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=i);var o=void 0,s=void 0,a=e.data("id");return n.forEach((function(t){a in t&&(o={x:t[a].getRect().getCenterX(),y:t[a].getRect().getCenterY()},s=t[a])})),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?o.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(o.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?o.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(o.y-=s.labelHeight/2))),null==o&&(o={x:e.position("x"),y:e.position("y")}),{x:o.x,y:o.y}}var h=void 0;return r.forEach((function(t){var i=t.nodeIndexes.get(e.id());null!=i&&(h={x:t.xCoords[i],y:t.yCoords[i]})})),null==h&&(h={x:e.position("x"),y:e.position("y")}),{x:h.x,y:h.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var M=o.calcParentsWithoutChildren(e,i),x=i.filter((function(t){return"none"==t.css("display")}));t.eles=i.not(x),i.nodes().not(":parent").not(x).layoutPositions(this,t,C),M.length>0&&M.forEach((function(t){t.position(C(t))}))}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),t}();t.exports=l},657:(t,e,i)=>{var r=i(548),n=i(140).layoutBase.Matrix,o=i(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,i=t.eles,s=i.nodes(),a=i.nodes(":parent"),h=new Map,l=new Map,c=new Map,d=[],g=[],u=[],p=[],f=[],y=[],v=[],m=[],E=void 0,N=1e8,T=1e-9,A=t.piTol,w=t.samplingType,L=t.nodeSeparation,I=void 0,_=function(t,e,i){for(var r=[],n=0,o=0,s=0,a=void 0,h=[],c=0,g=1,u=0;u=n;){s=r[n++];for(var p=d[s],v=0;vc&&(c=f[T],g=T)}return g};r.connectComponents(e,i,r.getTopMostNodes(s),h),a.forEach((function(t){r.connectComponents(e,i,r.getTopMostNodes(t.descendants().intersection(i)),h)}));for(var C=0,M=0;M0&&(r.isParent()?d[e].push(c.get(r.id())):d[e].push(r.id()))}))}));var S=function(t){var i=l.get(t),r=void 0;h.get(t).forEach((function(n){r=e.getElementById(n).isParent()?c.get(n):n,d[i].push(r),d[l.get(r)].push(t)}))},P=!0,U=!1,Y=void 0;try{for(var k,H=h.keys()[Symbol.iterator]();!(P=(k=H.next()).done);P=!0)S(k.value)}catch(t){U=!0,Y=t}finally{try{!P&&H.return&&H.return()}finally{if(U)throw Y}}var X=void 0;if((E=l.size)>2){I=E=1)break;l=h}for(var p=0;p=1)break;l=h}for(var v=0;v{var r=i(212),n=function(t){t&&t("layout","fcose",r)};"undefined"!=typeof cytoscape&&n(cytoscape),t.exports=n},140:e=>{e.exports=t}},i={},r=function t(r){var n=i[r];if(void 0!==n)return n.exports;var o=i[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(579);return r})()},t.exports=r(i(1709))},1709:function(t,e,i){var r;r=function(t){return(()=>{"use strict";var e={45:(t,e,i)=>{var r={};r.layoutBase=i(551),r.CoSEConstants=i(806),r.CoSEEdge=i(767),r.CoSEGraph=i(880),r.CoSEGraphManager=i(578),r.CoSELayout=i(765),r.CoSENode=i(991),r.ConstraintHandler=i(902),t.exports=r},806:(t,e,i)=>{var r=i(551).FDLayoutConstants;function n(){}for(var o in r)n[o]=r[o];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,n.ENFORCE_CONSTRAINTS=!0,n.APPLY_LAYOUT=!0,n.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,n.TREE_REDUCTION_ON_INCREMENTAL=!0,n.PURE_INCREMENTAL=n.DEFAULT_INCREMENTAL,t.exports=n},767:(t,e,i)=>{var r=i(551).FDLayoutEdge;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},880:(t,e,i)=>{var r=i(551).LGraph;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},578:(t,e,i)=>{var r=i(551).LGraphManager;function n(t){r.call(this,t)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},765:(t,e,i)=>{var r=i(551).FDLayout,n=i(578),o=i(880),s=i(991),a=i(767),h=i(806),l=i(902),c=i(551).FDLayoutConstants,d=i(551).LayoutConstants,g=i(551).Point,u=i(551).PointD,p=i(551).DimensionD,f=i(551).Layout,y=i(551).Integer,v=i(551).IGeometry,m=i(551).LGraph,E=i(551).Transform,N=i(551).LinkedList;function T(){r.call(this),this.toBeTiled={},this.constraints={}}for(var A in T.prototype=Object.create(r.prototype),r)T[A]=r[A];T.prototype.newGraphManager=function(){var t=new n(this);return this.graphManager=t,t},T.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},T.prototype.newNode=function(t){return new s(this.graphManager,t)},T.prototype.newEdge=function(t){return new a(null,null,t)},T.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=c.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=c.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},T.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/c.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},T.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%c.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=c.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i0&&this.updateDisplacements(),e=0;e0&&(r.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var s=new Map,a=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach((function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var l=this.constraints.alignmentConstraint.vertical;for(i=0;i=2*t.length/3;r--)e=Math.floor(Math.random()*(r+1)),i=t[r],t[r]=t[e],t[e]=i;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach((function(e){if(e.left){var i=s.has(e.left)?s.get(e.left):e.left,r=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),t.nodesInRelativeHorizontal.includes(r)||(t.nodesInRelativeHorizontal.push(r),t.nodeToRelativeConstraintMapHorizontal.set(r,[]),t.dummyToNodeForVerticalAlignment.has(r)?t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(r,t.idToNodeMap.get(r).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(i).push({right:r,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(r).push({left:i,gap:e.gap})}else{var n=a.has(e.top)?a.get(e.top):e.top,o=a.has(e.bottom)?a.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(n)||(t.nodesInRelativeVertical.push(n),t.nodeToRelativeConstraintMapVertical.set(n,[]),t.dummyToNodeForHorizontalAlignment.has(n)?t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(n)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(n,t.idToNodeMap.get(n).getCenterY())),t.nodesInRelativeVertical.includes(o)||(t.nodesInRelativeVertical.push(o),t.nodeToRelativeConstraintMapVertical.set(o,[]),t.dummyToNodeForHorizontalAlignment.has(o)?t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(o)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(o).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(n).push({bottom:o,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(o).push({top:n,gap:e.gap})}}));else{var d=new Map,g=new Map;this.constraints.relativePlacementConstraint.forEach((function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,i=s.has(t.right)?s.get(t.right):t.right;d.has(e)?d.get(e).push(i):d.set(e,[i]),d.has(i)?d.get(i).push(e):d.set(i,[e])}else{var r=a.has(t.top)?a.get(t.top):t.top,n=a.has(t.bottom)?a.get(t.bottom):t.bottom;g.has(r)?g.get(r).push(n):g.set(r,[n]),g.has(n)?g.get(n).push(r):g.set(n,[r])}}));var u=function(t,e){var i=[],r=[],n=new N,o=new Set,s=0;return t.forEach((function(a,h){if(!o.has(h)){i[s]=[],r[s]=!1;var l=h;for(n.push(l),o.add(l),i[s].push(l);0!=n.length;)l=n.shift(),e.has(l)&&(r[s]=!0),t.get(l).forEach((function(t){o.has(t)||(n.push(t),o.add(t),i[s].push(t))}));s++}})),{components:i,isFixed:r}},p=u(d,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=p.components,this.fixedComponentsOnHorizontal=p.isFixed;var f=u(g,t.fixedNodesOnVertical);this.componentsOnVertical=f.components,this.fixedComponentsOnVertical=f.isFixed}}},T.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach((function(e){var i=t.idToNodeMap.get(e.nodeId);i.displacementX=0,i.displacementY=0})),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i1)for(a=0;ar&&(r=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},T.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(e,null,0,359,0,r);var n=m.calculateBounds(t),o=new E;o.setDeviceOrgX(n.getMinX()),o.setDeviceOrgY(n.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var y=f[0];f.splice(0,1);var m=c.indexOf(y);m>=0&&c.splice(m,1),p--,d--}g=null!=e?(c.indexOf(f[0])+1)%p:0;for(var E=Math.abs(r-i)/d,N=g;u!=d;N=++N%p){var A=c[N].getOtherEnd(t);if(A!=e){var w=(i+u*E)%360,L=(w+E)%360;T.branchRadialLayout(A,t,w,L,n+o,o),u++}}},T.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,i=0;ie&&(e=r)}return e},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),n=0;n1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var n=e[i][0].getParent(),o=new s(t.graphManager);o.id=r,o.paddingLeft=n.paddingLeft||0,o.paddingRight=n.paddingRight||0,o.paddingBottom=n.paddingBottom||0,o.paddingTop=n.paddingTop||0,t.idToDummyNode[r]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=n.getChild();h.add(o);for(var l=0;ln?(r.rect.x-=(r.labelWidth-n)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-n)/2):"right"==r.labelPosHorizontal&&r.setWidth(n+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(o+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>o?(r.rect.y-=(r.labelHeight-o)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-o)/2):"bottom"==r.labelPosVertical&&r.setHeight(o+r.labelHeight))}}))},T.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,n=e.paddingTop,o=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,n,o,s)}},T.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(i){var r=t.idToDummyNode[i],n=r.paddingLeft,o=r.paddingTop,s=r.labelMarginLeft,a=r.labelMarginTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,n,o,s,a)}))},T.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),n=0;n0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},T.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;rc&&(c=g.rect.height)}i+=c+t.verticalPadding}},T.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(r){var n=e[r];if(i.tiledMemberPack[r]=i.tileNodes(t[r],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[r].width,n.rect.height=i.tiledMemberPack[r].height,n.setCenter(i.tiledMemberPack[r].centerX,i.tiledMemberPack[r].centerY),n.labelMarginLeft=0,n.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var o=n.rect.width,s=n.rect.height;n.labelWidth&&("left"==n.labelPosHorizontal?(n.rect.x-=n.labelWidth,n.setWidth(o+n.labelWidth),n.labelMarginLeft=n.labelWidth):"center"==n.labelPosHorizontal&&n.labelWidth>o?(n.rect.x-=(n.labelWidth-o)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-o)/2):"right"==n.labelPosHorizontal&&n.setWidth(o+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(s+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>s?(n.rect.y-=(n.labelHeight-s)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-s)/2):"bottom"==n.labelPosVertical&&n.setHeight(s+n.labelHeight))}}))},T.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0),r=this.tileNodesByFavoringDim(t,e,!1),n=this.getOrgRatio(i);return this.getOrgRatio(r)a&&(a=t.getWidth())}));var l,c=o/n,d=s/n,g=Math.pow(i-r,2)+4*(c+r)*(d+i)*n,u=(r-i+Math.sqrt(g))/(2*(c+r));e?(l=Math.ceil(u))==u&&l++:l=Math.floor(u);var p=l*(c+r)-r;return a>p&&(p=a),p+2*r},T.prototype.tileNodesByFavoringDim=function(t,e,i){var r=h.TILING_PADDING_VERTICAL,n=h.TILING_PADDING_HORIZONTAL,o=h.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:r,horizontalPadding:n,centerX:0,centerY:0};o&&(s.idealRowWidth=this.calcIdealRowWidth(t,i));var a=function(t){return t.rect.width*t.rect.height},l=function(t,e){return a(e)-a(t)};t.sort((function(t,e){var i=l;return s.idealRowWidth?(i=o)(t.id,e.id):i(t,e)}));for(var c=0,d=0,g=0;g0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},T.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;ri&&(e=r,i=t.rowWidth[r]);return e},T.prototype.canAddHorizontal=function(t,e,i){if(t.idealRowWidth){var r=t.rows.length-1;return t.rowWidth[r]+e+t.horizontalPadding<=t.idealRowWidth}var n=this.getShortestRowIndex(t);if(n<0)return!0;var o=t.rowWidth[n];if(o+t.horizontalPadding+e<=t.width)return!0;var s,a,h=0;return t.rowHeight[n]0&&(h=i+t.verticalPadding-t.rowHeight[n]),s=t.width-o>=e+t.horizontalPadding?(t.height+h)/(o+e+t.horizontalPadding):(t.height+h)/t.width,h=i+t.verticalPadding,(a=t.widtho&&e!=i){r.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=r[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var d=n;d<=o;d++)l[0]+=this.grid[d][s-1].length+this.grid[d][s].length-1;if(o0)for(d=s;d<=a;d++)l[3]+=this.grid[n-1][d].length+this.grid[n][d].length-1;for(var g,u,p=y.MAX_VALUE,f=0;f{var r=i(551).FDLayoutNode,n=i(551).IMath;function o(t,e,i,n){r.call(this,t,e,i,n)}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),n=0;n{function r(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e0){var o=0;r.forEach((function(t){"horizontal"==e?(d.set(t,h.has(t)?l[h.get(t)]:n.get(t)),o+=d.get(t)):(d.set(t,h.has(t)?c[h.get(t)]:n.get(t)),o+=d.get(t))})),o/=r.length,t.forEach((function(t){i.has(t)||d.set(t,o)}))}else{var s=0;t.forEach((function(t){s+="horizontal"==e?h.has(t)?l[h.get(t)]:n.get(t):h.has(t)?c[h.get(t)]:n.get(t)})),s/=t.length,t.forEach((function(t){d.set(t,s)}))}}));for(var p=function(){var r=u.shift();t.get(r).forEach((function(t){if(d.get(t.id)s&&(s=v),Ea&&(a=E)}}catch(t){u=!0,p=t}finally{try{!g&&y.return&&y.return()}finally{if(u)throw p}}var N=(r+s)/2-(o+a)/2,T=!0,A=!1,w=void 0;try{for(var L,I=t[Symbol.iterator]();!(T=(L=I.next()).done);T=!0){var _=L.value;d.set(_,d.get(_)+N)}}catch(t){A=!0,w=t}finally{try{!T&&I.return&&I.return()}finally{if(A)throw w}}}))}return d},v=function(t){var e=0,i=0,r=0,n=0;if(t.forEach((function(t){t.left?l[h.get(t.left)]-l[h.get(t.right)]>=0?e++:i++:c[h.get(t.top)]-c[h.get(t.bottom)]>=0?r++:n++})),e>i&&r>n)for(var o=0;oi)for(var s=0;sn)for(var a=0;a1)e.fixedNodeConstraint.forEach((function(t,e){T[e]=[t.position.x,t.position.y],A[e]=[l[h.get(t.nodeId)],c[h.get(t.nodeId)]]})),w=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var i=e.alignmentConstraint.vertical,n=function(e){var n=new Set;i[e].forEach((function(t){n.add(t)}));var o,s=new Set([].concat(r(n)).filter((function(t){return I.has(t)})));o=s.size>0?l[h.get(s.values().next().value)]:f(n).x,i[e].forEach((function(e){T[t]=[o,c[h.get(e)]],A[t]=[l[h.get(e)],c[h.get(e)]],t++}))},o=0;o0?l[h.get(o.values().next().value)]:f(i).y,s[e].forEach((function(e){T[t]=[l[h.get(e)],n],A[t]=[l[h.get(e)],c[h.get(e)]],t++}))},d=0;dx&&(x=M[D].length,O=D);if(x0){var j={x:0,y:0};e.fixedNodeConstraint.forEach((function(t,e){var i,r,n=(r={x:l[h.get(t.nodeId)],y:c[h.get(t.nodeId)]},{x:(i=t.position).x-r.x,y:i.y-r.y});j.x+=n.x,j.y+=n.y})),j.x/=e.fixedNodeConstraint.length,j.y/=e.fixedNodeConstraint.length,l.forEach((function(t,e){l[e]+=j.x})),c.forEach((function(t,e){c[e]+=j.y})),e.fixedNodeConstraint.forEach((function(t){l[h.get(t.nodeId)]=t.position.x,c[h.get(t.nodeId)]=t.position.y}))}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var q=e.alignmentConstraint.vertical,$=function(t){var e=new Set;q[t].forEach((function(t){e.add(t)}));var i,n=new Set([].concat(r(e)).filter((function(t){return I.has(t)})));i=n.size>0?l[h.get(n.values().next().value)]:f(e).x,e.forEach((function(t){I.has(t)||(l[h.get(t)]=i)}))},K=0;K0?c[h.get(n.values().next().value)]:f(e).y,e.forEach((function(t){I.has(t)||(c[h.get(t)]=i)}))},J=0;J{e.exports=t}},i={},r=function t(r){var n=i[r];if(void 0!==n)return n.exports;var o=i[r]={exports:{}};return e[r](o,o.exports,t),o.exports}(45);return r})()},t.exports=r(i(4298))},4298:function(t){var e;e=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)}([function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(r.prototype),r)s[a]=r[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),a=i(16),h=i(5);function l(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var c in l.prototype=Object.create(r.prototype),r)l[c]=r[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach((function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}})),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach((function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)})),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}})),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(i+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>i?(this.rect.y-=(this.labelHeight-i)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(i+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new h(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";var r=i(0);function n(){}for(var o in r)n[o]=r[o];n.MAX_ITERATIONS=2500,n.DEFAULT_EDGE_LENGTH=50,n.DEFAULT_SPRING_STRENGTH=.45,n.DEFAULT_REPULSION_STRENGTH=4500,n.DEFAULT_GRAVITY_STRENGTH=.4,n.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,n.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,n.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,n.COOLING_ADAPTATION_FACTOR=.33,n.ADAPTATION_LOWER_NODE_LIMIT=1e3,n.ADAPTATION_UPPER_NODE_LIMIT=5e3,n.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,n.MAX_NODE_DISPLACEMENT=3*n.MAX_NODE_DISPLACEMENT_INCREMENTAL,n.MIN_REPULSION_DIST=n.DEFAULT_EDGE_LENGTH/10,n.CONVERGENCE_CHECK_PERIOD=100,n.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,n.MIN_EDGE_LENGTH=1,n.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=n},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(7),a=i(3),h=i(1),l=i(13),c=i(12),d=i(11);function g(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var u in g.prototype=Object.create(r.prototype),r)g[u]=r[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(t,e,i){if(null==e&&null==i){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},g.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),r=i.length,n=0;n-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(c,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},g.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(r=t),o>(e=l.getLeft())&&(o=e)}return r==n.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new c(this.left,this.top))},g.prototype.updateBounds=function(t){for(var e,i,r,o,s,a=n.MAX_VALUE,h=-n.MAX_VALUE,c=n.MAX_VALUE,d=-n.MAX_VALUE,g=this.nodes,u=g.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),c>(r=f.getTop())&&(c=r),d<(o=f.getBottom())&&(d=o)}var y=new l(a,c,h-a,d-c);a==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},g.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,a=-n.MAX_VALUE,h=n.MAX_VALUE,c=-n.MAX_VALUE,d=t.length,g=0;g(e=u.getLeft())&&(s=e),a<(i=u.getRight())&&(a=i),h>(r=u.getTop())&&(h=r),c<(o=u.getBottom())&&(c=o)}return new l(s,h,a-s,c-h)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r=this.nodes.length){var h=0;n.forEach((function(e){e.owner==t&&h++})),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=g},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,i=t;var o=(r=e).getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=r,i[1]=h,i[2]=o,i[3]=E,!1;if(no)return i[0]=a,i[1]=n,i[2]=v,i[3]=s,!1;if(ro?(i[0]=c,i[1]=d,w=!0):(i[0]=l,i[1]=h,w=!0):I===C&&(r>o?(i[0]=a,i[1]=h,w=!0):(i[0]=g,i[1]=d,w=!0)),-_===C?o>r?(i[2]=m,i[3]=E,L=!0):(i[2]=v,i[3]=y,L=!0):_===C&&(o>r?(i[2]=f,i[3]=y,L=!0):(i[2]=N,i[3]=E,L=!0)),w&&L)return!1;if(r>o?n>s?(M=this.getCardinalDirection(I,C,4),x=this.getCardinalDirection(_,C,2)):(M=this.getCardinalDirection(-I,C,3),x=this.getCardinalDirection(-_,C,1)):n>s?(M=this.getCardinalDirection(-I,C,1),x=this.getCardinalDirection(-_,C,3)):(M=this.getCardinalDirection(I,C,2),x=this.getCardinalDirection(_,C,4)),!w)switch(M){case 1:D=h,O=r+-p/C,i[0]=O,i[1]=D;break;case 2:O=g,D=n+u*C,i[0]=O,i[1]=D;break;case 3:D=d,O=r+p/C,i[0]=O,i[1]=D;break;case 4:O=c,D=n+-u*C,i[0]=O,i[1]=D}if(!L)switch(x){case 1:b=y,R=o+-A/C,i[2]=R,i[3]=b;break;case 2:R=N,b=s+T*C,i[2]=R,i[3]=b;break;case 3:b=E,R=o+A/C,i[2]=R,i[3]=b;break;case 4:R=m,b=s+-T*C,i[2]=R,i[3]=b}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o,s,a,h,l,c,d,g=t.x,u=t.y,p=e.x,f=e.y,y=i.x,v=i.y,m=n.x,E=n.y;return 0==(d=(o=f-u)*(h=y-m)-(s=E-v)*(a=g-p))?null:new r((a*(c=m*v-y*E)-h*(l=p*u-g*f))/d,(s*l-o*c)/d)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i=0){var c=(-h+Math.sqrt(h*h-4*a*l))/(2*a),d=(-h-Math.sqrt(h*h-4*a*l))/(2*a);return c>=0&&c<=1?[c]:d>=0&&d<=1?[d]:null}return null},n.HALF_PI=.5*Math.PI,n.ONE_AND_HALF_PI=1.5*Math.PI,n.TWO_PI=2*Math.PI,n.THREE_PI=3*Math.PI,t.exports=n},function(t,e,i){"use strict";function r(){}r.sign=function(t){return t>0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var c=a[0];a.splice(0,1),s.add(c);var d=c.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},g.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n0){for(var n=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(d,1),c.getNeighborsList().forEach((function(t){if(i.indexOf(t)<0){var e=r.get(t)-1;1==e&&h.push(t),r.set(t,e)}}))}i=i.concat(h),1!=e.length&&2!=e.length||(n=!0,o=e[0])}return o},g.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=g},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(5);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";var r=i(15),n=i(4),o=i(0),s=i(8),a=i(9);function h(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var l in h.prototype=Object.create(r.prototype),r)h[l]=r[l];h.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,s,a,h,l=this.getGraphManager().getAllEdges(),c=0;cn.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var c=0;ct}}]),t}();t.exports=o},function(t,e,i){"use strict";function r(){}r.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var i=[],r=0;r0;)e.push(0);return e}(this.n),s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),a=Math.min(this.m-1,this.n),h=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;x--)if(0!==this.s[x]){for(var O=x+1;O=0;P--){if(function(t,e){return t&&e}(P0;){var W=void 0,j=void 0;for(W=_-2;W>=-1&&-1!==W;W--)if(Math.abs(o[W])<=B+V*(Math.abs(this.s[W])+Math.abs(this.s[W+1]))){o[W]=0;break}if(W===_-2)j=4;else{var q=void 0;for(q=_-1;q>=W&&q!==W;q--){var $=(q!==_?Math.abs(o[q]):0)+(q!==W+1?Math.abs(o[q-1]):0);if(Math.abs(this.s[q])<=B+V*$){this.s[q]=0;break}}q===W?j=3:q===_-1?j=1:(j=2,W=q)}switch(W++,j){case 1:var K=o[_-2];o[_-2]=0;for(var Z=_-2;Z>=W;Z--){var Q=r.hypot(this.s[Z],K),J=this.s[Z]/Q,tt=K/Q;this.s[Z]=Q,Z!==W&&(K=-tt*o[Z-1],o[Z-1]=J*o[Z-1]);for(var et=0;et=this.s[W+1]);){var _t=this.s[W];if(this.s[W]=this.s[W+1],this.s[W+1]=_t,WMath.abs(e)?(i=e/t,i=Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,i=Math.abs(e)*Math.sqrt(1+i*i)):i=0,i},t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;i{"use strict";i.d(e,{diagram:()=>dt});var r=i(8568),n=i(2382),o=i(3159),s=i(8448),a=(i(5522),i(1661)),h=i(32),l=i(8731),c=i(165),d=i(6527),g=i(4852),u={L:"left",R:"right",T:"top",B:"bottom"},p={L:(0,h.K2)((t=>`${t},${t/2} 0,${t} 0,0`),"L"),R:(0,h.K2)((t=>`0,${t/2} ${t},0 ${t},${t}`),"R"),T:(0,h.K2)((t=>`0,0 ${t},0 ${t/2},${t}`),"T"),B:(0,h.K2)((t=>`${t/2},0 ${t},${t} 0,${t}`),"B")},f={L:(0,h.K2)(((t,e)=>t-e+2),"L"),R:(0,h.K2)(((t,e)=>t-2),"R"),T:(0,h.K2)(((t,e)=>t-e+2),"T"),B:(0,h.K2)(((t,e)=>t-2),"B")},y=(0,h.K2)((function(t){return m(t)?"L"===t?"R":"L":"T"===t?"B":"T"}),"getOppositeArchitectureDirection"),v=(0,h.K2)((function(t){return"L"===t||"R"===t||"T"===t||"B"===t}),"isArchitectureDirection"),m=(0,h.K2)((function(t){return"L"===t||"R"===t}),"isArchitectureDirectionX"),E=(0,h.K2)((function(t){return"T"===t||"B"===t}),"isArchitectureDirectionY"),N=(0,h.K2)((function(t,e){const i=m(t)&&E(e),r=E(t)&&m(e);return i||r}),"isArchitectureDirectionXY"),T=(0,h.K2)((function(t){const e=t[0],i=t[1],r=m(e)&&E(i),n=E(e)&&m(i);return r||n}),"isArchitecturePairXY"),A=(0,h.K2)((function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t}),"isValidArchitectureDirectionPair"),w=(0,h.K2)((function(t,e){const i=`${t}${e}`;return A(i)?i:void 0}),"getArchitectureDirectionPair"),L=(0,h.K2)((function([t,e],i){const r=i[0],n=i[1];return m(r)?E(n)?[t+("L"===r?-1:1),e+("T"===n?1:-1)]:[t+("L"===r?-1:1),e]:m(n)?[t+("L"===n?1:-1),e+("T"===r?1:-1)]:[t,e+("T"===r?1:-1)]}),"shiftPositionByArchitectureDirectionPair"),I=(0,h.K2)((function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]}),"getArchitectureDirectionXYFactors"),_=(0,h.K2)((function(t){return"service"===t.type}),"isArchitectureService"),C=(0,h.K2)((function(t){return"junction"===t.type}),"isArchitectureJunction"),M=(0,h.K2)((t=>t.data()),"edgeData"),x=(0,h.K2)((t=>t.data()),"nodeData"),O=h.UI.architecture,D=new s.m((()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:O,dataStructures:void 0,elements:{}}))),R=(0,h.K2)((()=>{D.reset(),(0,h.IU)()}),"clear"),b=(0,h.K2)((function({id:t,icon:e,in:i,title:r,iconText:n}){if(void 0!==D.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${D.records.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===D.records.registeredIds[i])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===D.records.registeredIds[i])throw new Error(`The service [${t}]'s parent is not a group`)}D.records.registeredIds[t]="node",D.records.nodes[t]={id:t,type:"service",icon:e,iconText:n,title:r,edges:[],in:i}}),"addService"),G=(0,h.K2)((()=>Object.values(D.records.nodes).filter(_)),"getServices"),F=(0,h.K2)((function({id:t,in:e}){D.records.registeredIds[t]="node",D.records.nodes[t]={id:t,type:"junction",edges:[],in:e}}),"addJunction"),S=(0,h.K2)((()=>Object.values(D.records.nodes).filter(C)),"getJunctions"),P=(0,h.K2)((()=>Object.values(D.records.nodes)),"getNodes"),U=(0,h.K2)((t=>D.records.nodes[t]),"getNode"),Y=(0,h.K2)((function({id:t,icon:e,in:i,title:r}){if(void 0!==D.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another ${D.records.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===D.records.registeredIds[i])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===D.records.registeredIds[i])throw new Error(`The group [${t}]'s parent is not a group`)}D.records.registeredIds[t]="group",D.records.groups[t]={id:t,icon:e,title:r,in:i}}),"addGroup"),k=(0,h.K2)((()=>Object.values(D.records.groups)),"getGroups"),H=(0,h.K2)((function({lhsId:t,rhsId:e,lhsDir:i,rhsDir:r,lhsInto:n,rhsInto:o,lhsGroup:s,rhsGroup:a,title:h}){if(!v(i))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${i}`);if(!v(r))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${r}`);if(void 0===D.records.nodes[t]&&void 0===D.records.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===D.records.nodes[e]&&void 0===D.records.groups[t])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const l=D.records.nodes[t].in,c=D.records.nodes[e].in;if(s&&l&&c&&l==c)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&l&&c&&l==c)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const d={lhsId:t,lhsDir:i,lhsInto:n,lhsGroup:s,rhsId:e,rhsDir:r,rhsInto:o,rhsGroup:a,title:h};D.records.edges.push(d),D.records.nodes[t]&&D.records.nodes[e]&&(D.records.nodes[t].edges.push(D.records.edges[D.records.edges.length-1]),D.records.nodes[e].edges.push(D.records.edges[D.records.edges.length-1]))}),"addEdge"),X=(0,h.K2)((()=>D.records.edges),"getEdges"),z=(0,h.K2)((()=>{if(void 0===D.records.dataStructures){const t=Object.entries(D.records.nodes).reduce(((t,[e,i])=>(t[e]=i.edges.reduce(((t,i)=>{if(i.lhsId===e){const e=w(i.lhsDir,i.rhsDir);e&&(t[e]=i.rhsId)}else{const e=w(i.rhsDir,i.lhsDir);e&&(t[e]=i.lhsId)}return t}),{}),t)),{}),e=Object.keys(t)[0],i={[e]:1},r=Object.keys(t).reduce(((t,i)=>i===e?t:{...t,[i]:1}),{}),n=(0,h.K2)((e=>{const n={[e]:[0,0]},o=[e];for(;o.length>0;){const e=o.shift();if(e){i[e]=1,delete r[e];const s=t[e],[a,h]=n[e];Object.entries(s).forEach((([t,e])=>{i[e]||(n[e]=L([a,h],t),o.push(e))}))}}return n}),"BFS"),o=[n(e)];for(;Object.keys(r).length>0;)o.push(n(Object.keys(r)[0]));D.records.dataStructures={adjList:t,spatialMaps:o}}return D.records.dataStructures}),"getDataStructures"),V=(0,h.K2)(((t,e)=>{D.records.elements[t]=e}),"setElementForId"),B=(0,h.K2)((t=>D.records.elements[t]),"getElementById"),W={clear:R,setDiagramTitle:h.ke,getDiagramTitle:h.ab,setAccTitle:h.SV,getAccTitle:h.iN,setAccDescription:h.EI,getAccDescription:h.m7,addService:b,getServices:G,addJunction:F,getJunctions:S,getNodes:P,getNode:U,addGroup:Y,getGroups:k,addEdge:H,getEdges:X,setElementForId:V,getElementById:B,getDataStructures:z};function j(t){const e=(0,h.D7)().architecture;return e?.[t]?e[t]:O[t]}(0,h.K2)(j,"getConfigField");var q=(0,h.K2)(((t,e)=>{(0,o.S)(t,e),t.groups.map(e.addGroup),t.services.map((t=>e.addService({...t,type:"service"}))),t.junctions.map((t=>e.addJunction({...t,type:"junction"}))),t.edges.map(e.addEdge)}),"populateDb"),$={parse:(0,h.K2)((async t=>{const e=await(0,l.qg)("architecture",t);h.Rm.debug(e),q(e,W)}),"parse")},K=(0,h.K2)((t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`),"getStyles"),Z=(0,h.K2)((t=>`${t}`),"wrapIcon"),Q={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Z('')},server:{body:Z('')},disk:{body:Z('')},internet:{body:Z('')},cloud:{body:Z('')},unknown:r.Gc,blank:{body:Z("")}}},J=(0,h.K2)((async function(t,e){const i=j("padding"),r=j("iconSize"),o=r/2,s=r/6,a=s/2;await Promise.all(e.edges().map((async e=>{const{source:r,sourceDir:l,sourceArrow:c,sourceGroup:d,target:g,targetDir:u,targetArrow:y,targetGroup:v,label:A}=M(e);let{x:L,y:_}=e[0].sourceEndpoint();const{x:C,y:x}=e[0].midpoint();let{x:O,y:D}=e[0].targetEndpoint();const R=i+4;if(d&&(m(l)?L+="L"===l?-R:R:_+="T"===l?-R:R+18),v&&(m(u)?O+="L"===u?-R:R:D+="T"===u?-R:R+18),d||"junction"!==W.getNode(r)?.type||(m(l)?L+="L"===l?o:-o:_+="T"===l?o:-o),v||"junction"!==W.getNode(g)?.type||(m(u)?O+="L"===u?o:-o:D+="T"===u?o:-o),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${L},${_} L ${C},${x} L${O},${D} `).attr("class","edge"),c){const t=m(l)?f[l](L,s):L-a,i=E(l)?f[l](_,s):_-a;e.insert("polygon").attr("points",p[l](s)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(y){const t=m(u)?f[u](O,s):O-a,i=E(u)?f[u](D,s):D-a;e.insert("polygon").attr("points",p[u](s)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(A){const t=N(l,u)?"XY":m(l)?"X":"Y";let i=0;i="X"===t?Math.abs(L-O):"Y"===t?Math.abs(_-D)/1.5:Math.abs(L-O)/2;const r=e.append("g");if(await(0,n.GZ)(r,A,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},(0,h.D7)()),r.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)r.attr("transform","translate("+C+", "+x+")");else if("Y"===t)r.attr("transform","translate("+C+", "+x+") rotate(-90)");else if("XY"===t){const t=w(l,u);if(t&&T(t)){const e=r.node().getBoundingClientRect(),[i,n]=I(t);r.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*i*n*45})`);const o=r.node().getBoundingClientRect();r.attr("transform",`\n translate(${C}, ${x-e.height/2})\n translate(${i*o.width/2}, ${n*o.height/2})\n rotate(${-1*i*n*45}, 0, ${e.height/2})\n `)}}}}})))}),"drawEdges"),tt=(0,h.K2)((async function(t,e){const i=.75*j("padding"),o=j("fontSize"),s=j("iconSize")/2;await Promise.all(e.nodes().map((async e=>{const a=x(e);if("group"===a.type){const{h:l,w:c,x1:d,y1:g}=e.boundingBox();t.append("rect").attr("x",d+s).attr("y",g+s).attr("width",c).attr("height",l).attr("class","node-bkg");const u=t.append("g");let p=d,f=g;if(a.icon){const t=u.append("g");t.html(`${await(0,r.WY)(a.icon,{height:i,width:i,fallbackPrefix:Q.prefix})}`),t.attr("transform","translate("+(p+s+1)+", "+(f+s+1)+")"),p+=i,f+=o/2-1-2}if(a.label){const t=u.append("g");await(0,n.GZ)(t,a.label,{useHtmlLabels:!1,width:c,classes:"architecture-service-label"},(0,h.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(p+s+4)+", "+(f+s+2)+")")}}})))}),"drawGroups"),et=(0,h.K2)((async function(t,e,i){for(const o of i){const i=e.append("g"),s=j("iconSize");if(o.title){const t=i.append("g");await(0,n.GZ)(t,o.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},(0,h.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+s/2+", "+s+")")}const a=i.append("g");if(o.icon)a.html(`${await(0,r.WY)(o.icon,{height:s,width:s,fallbackPrefix:Q.prefix})}`);else if(o.iconText){a.html(`${await(0,r.WY)("blank",{height:s,width:s,fallbackPrefix:Q.prefix})}`);const t=a.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html(o.iconText),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/e)};`)}else a.append("path").attr("class","node-bkg").attr("id","node-"+o.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`);i.attr("class","architecture-service");const{width:l,height:c}=i._groups[0][0].getBBox();o.width=l,o.height=c,t.setElementForId(o.id,i)}return 0}),"drawServices"),it=(0,h.K2)((function(t,e,i){i.forEach((i=>{const r=e.append("g"),n=j("iconSize");r.append("g").append("rect").attr("id","node-"+i.id).attr("fill-opacity","0").attr("width",n).attr("height",n),r.attr("class","architecture-junction");const{width:o,height:s}=r._groups[0][0].getBBox();r.width=o,r.height=s,t.setElementForId(i.id,r)}))}),"drawJunctions");function rt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:j("iconSize"),height:j("iconSize")},classes:"node-service"})}))}function nt(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:j("iconSize"),height:j("iconSize")},classes:"node-junction"})}))}function ot(t,e){e.nodes().map((e=>{const i=x(e);"group"!==i.type&&(i.x=e.position().x,i.y=e.position().y,t.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")"))}))}function st(t,e){t.forEach((t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})}))}function at(t,e){t.forEach((t=>{const{lhsId:i,rhsId:r,lhsInto:n,lhsGroup:o,rhsInto:s,lhsDir:a,rhsDir:h,rhsGroup:l,title:c}=t,d=N(t.lhsDir,t.rhsDir)?"segments":"straight",g={id:`${i}-${r}`,label:c,source:i,sourceDir:a,sourceArrow:n,sourceGroup:o,sourceEndpoint:"L"===a?"0 50%":"R"===a?"100% 50%":"T"===a?"50% 0":"50% 100%",target:r,targetDir:h,targetArrow:s,targetGroup:l,targetEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%"};e.add({group:"edges",data:g,classes:d})}))}function ht(t){const e=t.map((t=>{const e={},i={};return Object.entries(t).forEach((([t,[r,n]])=>{e[n]||(e[n]=[]),i[r]||(i[r]=[]),e[n].push(t),i[r].push(t)})),{horiz:Object.values(e).filter((t=>t.length>1)),vert:Object.values(i).filter((t=>t.length>1))}})),[i,r]=e.reduce((([t,e],{horiz:i,vert:r})=>[[...t,...i],[...e,...r]]),[[],[]]);return{horizontal:i,vertical:r}}function lt(t){const e=[],i=(0,h.K2)((t=>`${t[0]},${t[1]}`),"posToStr"),r=(0,h.K2)((t=>t.split(",").map((t=>parseInt(t)))),"strToPos");return t.forEach((t=>{const n=Object.fromEntries(Object.entries(t).map((([t,e])=>[i(e),t]))),o=[i([0,0])],s={},a={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;o.length>0;){const t=o.shift();if(t){s[t]=1;const h=n[t];if(h){const l=r(t);Object.entries(a).forEach((([t,r])=>{const a=i([l[0]+r[0],l[1]+r[1]]),c=n[a];c&&!s[a]&&(o.push(a),e.push({[u[t]]:c,[u[y(t)]]:h,gap:1.5*j("iconSize")}))}))}}}})),e}function ct(t,e,i,r,{spatialMaps:n}){return new Promise((o=>{const s=(0,g.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),a=(0,c.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${j("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${j("padding")}px`}}]});s.remove(),st(i,a),rt(t,a),nt(e,a),at(r,a);const l=ht(n),d=lt(n),u=a.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,i]=t.connectedNodes(),{parent:r}=x(e),{parent:n}=x(i);return r===n?1.5*j("iconSize"):.5*j("iconSize")},edgeElasticity(t){const[e,i]=t.connectedNodes(),{parent:r}=x(e),{parent:n}=x(i);return r===n?.45:.001},alignmentConstraint:l,relativePlacementConstraint:d});u.one("layoutstop",(()=>{function t(t,e,i,r){let n,o;const{x:s,y:a}=t,{x:h,y:l}=e;o=(r-a+(s-i)*(a-l)/(s-h))/Math.sqrt(1+Math.pow((a-l)/(s-h),2)),n=Math.sqrt(Math.pow(r-a,2)+Math.pow(i-s,2)-Math.pow(o,2)),n/=Math.sqrt(Math.pow(h-s,2)+Math.pow(l-a,2));let c=(h-s)*(r-a)-(l-a)*(i-s);switch(!0){case c>=0:c=1;break;case c<0:c=-1}let d=(h-s)*(i-s)+(l-a)*(r-a);switch(!0){case d>=0:d=1;break;case d<0:d=-1}return o=Math.abs(o)*c,n*=d,{distances:o,weights:n}}(0,h.K2)(t,"getSegmentWeights"),a.startBatch();for(const e of Object.values(a.edges()))if(e.data?.()){const{x:i,y:r}=e.source().position(),{x:n,y:o}=e.target().position();if(i!==n&&r!==o){const i=e.sourceEndpoint(),r=e.targetEndpoint(),{sourceDir:n}=M(e),[o,s]=E(n)?[i.x,r.y]:[r.x,i.y],{weights:a,distances:h}=t(i,r,o,s);e.style("segment-distances",h),e.style("segment-weights",a)}}a.endBatch(),u.run()})),u.run(),a.ready((t=>{h.Rm.info("Ready",t),o(a)}))}))}(0,r.pC)([{name:Q.prefix,icons:Q}]),c.A.use(d),(0,h.K2)(rt,"addServices"),(0,h.K2)(nt,"addJunctions"),(0,h.K2)(ot,"positionNodes"),(0,h.K2)(st,"addGroups"),(0,h.K2)(at,"addEdges"),(0,h.K2)(ht,"getAlignments"),(0,h.K2)(lt,"getRelativeConstraints"),(0,h.K2)(ct,"layoutArchitecture");var dt={parser:$,db:W,renderer:{draw:(0,h.K2)((async(t,e,i,r)=>{const n=r.db,o=n.getServices(),s=n.getJunctions(),l=n.getGroups(),c=n.getEdges(),d=n.getDataStructures(),g=(0,a.D)(e),u=g.append("g");u.attr("class","architecture-edges");const p=g.append("g");p.attr("class","architecture-services");const f=g.append("g");f.attr("class","architecture-groups"),await et(n,p,o),it(n,p,s);const y=await ct(o,s,l,c,d);await J(u,y),await tt(f,y),ot(n,y),(0,h.ot)(void 0,g,j("padding"),j("useMaxWidth"))}),"draw")},styles:K}},8448:(t,e,i)=>{"use strict";i.d(e,{m:()=>n});var r=i(32),n=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},3159:(t,e,i)=>{"use strict";function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}i.d(e,{S:()=>r}),(0,i(32).K2)(r,"populateCommonDb")}}]); \ No newline at end of file diff --git a/js/650-4e563e3b.chunk.min.js b/js/650-4e563e3b.chunk.min.js deleted file mode 100644 index 0052936..0000000 --- a/js/650-4e563e3b.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[650],{1650:(t,e,a)=>{a.d(e,{diagram:()=>b});var r=a(2207),i=a(7323),n=a(798),d=a(4852),o=a(567),s=a(697),l=0,p=(0,n.K2)((function(t,e,a,r,o){const s=(0,n.K2)((function(t){switch(t){case o.db.relationType.AGGREGATION:return"aggregation";case o.db.relationType.EXTENSION:return"extension";case o.db.relationType.COMPOSITION:return"composition";case o.db.relationType.DEPENDENCY:return"dependency";case o.db.relationType.LOLLIPOP:return"lollipop"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const p=e.points,g=(0,d.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(d.qrM),c=t.append("path").attr("d",g(p)).attr("id","edge"+l).attr("class","relation");let h,f,x="";r.arrowMarkerAbsolute&&(x=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,x=x.replace(/\(/g,"\\("),x=x.replace(/\)/g,"\\)")),1==a.relation.lineType&&c.attr("class","relation dashed-line"),10==a.relation.lineType&&c.attr("class","relation dotted-line"),"none"!==a.relation.type1&&c.attr("marker-start","url("+x+"#"+s(a.relation.type1)+"Start)"),"none"!==a.relation.type2&&c.attr("marker-end","url("+x+"#"+s(a.relation.type2)+"End)");const y=e.points.length;let u,m,w,b,k=i._K.calcLabelPosition(e.points);if(h=k.x,f=k.y,y%2!=0&&y>1){let t=i._K.calcCardinalityPosition("none"!==a.relation.type1,e.points,e.points[0]),r=i._K.calcCardinalityPosition("none"!==a.relation.type2,e.points,e.points[y-1]);n.Rm.debug("cardinality_1_point "+JSON.stringify(t)),n.Rm.debug("cardinality_2_point "+JSON.stringify(r)),u=t.x,m=t.y,w=r.x,b=r.y}if(void 0!==a.title){const e=t.append("g").attr("class","classLabel"),i=e.append("text").attr("class","label").attr("x",h).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(a.title);window.label=i;const n=i.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",n.x-r.padding/2).attr("y",n.y-r.padding/2).attr("width",n.width+r.padding).attr("height",n.height+r.padding)}n.Rm.info("Rendering relation "+JSON.stringify(a)),void 0!==a.relationTitle1&&"none"!==a.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",m).attr("fill","black").attr("font-size","6").text(a.relationTitle1),void 0!==a.relationTitle2&&"none"!==a.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",b).attr("fill","black").attr("font-size","6").text(a.relationTitle2),l++}),"drawEdge"),g=(0,n.K2)((function(t,e,a,r){n.Rm.debug("Rendering class ",e,a);const i=e.id,d={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",r.db.lookUpDomId(i)).attr("class","classGroup");let s;s=e.link?o.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",a.textHeight+a.padding).attr("x",0):o.append("text").attr("y",a.textHeight+a.padding).attr("x",0);let l=!0;e.annotations.forEach((function(t){const e=s.append("tspan").text("«"+t+"»");l||e.attr("dy",a.textHeight),l=!1}));let p=c(e);const g=s.append("tspan").text(p).attr("class","title");l||g.attr("dy",a.textHeight);const h=s.node().getBBox().height;let x,y,u;if(e.members.length>0){x=o.append("line").attr("x1",0).attr("y1",a.padding+h+a.dividerMargin/2).attr("y2",a.padding+h+a.dividerMargin/2);const t=o.append("text").attr("x",a.padding).attr("y",h+a.dividerMargin+a.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach((function(e){f(t,e,l,a),l=!1})),y=t.node().getBBox()}if(e.methods.length>0){u=o.append("line").attr("x1",0).attr("y1",a.padding+h+a.dividerMargin+y.height).attr("y2",a.padding+h+a.dividerMargin+y.height);const t=o.append("text").attr("x",a.padding).attr("y",h+2*a.dividerMargin+y.height+a.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach((function(e){f(t,e,l,a),l=!1}))}const m=o.node().getBBox();var w=" ";e.cssClasses.length>0&&(w+=e.cssClasses.join(" "));const b=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*a.padding).attr("height",m.height+a.padding+.5*a.dividerMargin).attr("class",w).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&s.insert("title").text(e.tooltip),x&&x.attr("x2",b),u&&u.attr("x2",b),d.width=b,d.height=m.height+a.padding+.5*a.dividerMargin,d}),"drawClass"),c=(0,n.K2)((function(t){let e=t.id;return t.type&&(e+="<"+(0,n.QO)(t.type)+">"),e}),"getClassTitleString"),h=(0,n.K2)((function(t,e,a,r){n.Rm.debug("Rendering note ",e,a);const i=e.id,d={id:i,text:e.text,width:0,height:0},o=t.append("g").attr("id",i).attr("class","classGroup");let s=o.append("text").attr("y",a.textHeight+a.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split("\n");l.forEach((function(t){n.Rm.debug(`Adding line: ${t}`),s.append("tspan").text(t).attr("class","title").attr("dy",a.textHeight)}));const p=o.node().getBBox(),g=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",p.width+2*a.padding).attr("height",p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(g-t.getBBox().width)/2)})),d.width=g,d.height=p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin,d}),"drawNote"),f=(0,n.K2)((function(t,e,a,r){const{displayText:i,cssStyle:n}=e.getDisplayDetails(),d=t.append("tspan").attr("x",r.padding).text(i);""!==n&&d.attr("style",e.cssStyle),a||d.attr("dy",r.textHeight)}),"addTspan"),x={getClassTitleString:c,drawClass:g,drawEdge:p,drawNote:h},y={},u=(0,n.K2)((function(t){const e=Object.entries(y).find((e=>e[1].label===t));if(e)return e[0]}),"getGraphId"),m=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).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"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).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"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).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"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).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"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).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")}),"insertMarkers"),w={draw:(0,n.K2)((function(t,e,a,r){const i=(0,n.D7)().class;y={},n.Rm.info("Rendering diagram "+t);const l=(0,n.D7)().securityLevel;let p;"sandbox"===l&&(p=(0,d.Ltv)("#i"+e));const g="sandbox"===l?(0,d.Ltv)(p.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),c=g.select(`[id='${e}']`);m(c);const h=new s.T({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel((function(){return{}}));const f=r.db.getClasses(),w=[...f.keys()];for(const t of w){const e=f.get(t),a=x.drawClass(c,e,i,r);y[a.id]=a,h.setNode(a.id,a),n.Rm.info("Org height: "+a.height)}r.db.getRelations().forEach((function(t){n.Rm.info("tjoho"+u(t.id1)+u(t.id2)+JSON.stringify(t)),h.setEdge(u(t.id1),u(t.id2),{relation:t},t.title||"DEFAULT")})),r.db.getNotes().forEach((function(t){n.Rm.debug(`Adding note: ${JSON.stringify(t)}`);const e=x.drawNote(c,t,i,r);y[e.id]=e,h.setNode(e.id,e),t.class&&f.has(t.class)&&h.setEdge(t.id,u(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,o.Zp)(h),h.nodes().forEach((function(t){void 0!==t&&void 0!==h.node(t)&&(n.Rm.debug("Node "+t+": "+JSON.stringify(h.node(t))),g.select("#"+(r.db.lookUpDomId(t)||t)).attr("transform","translate("+(h.node(t).x-h.node(t).width/2)+","+(h.node(t).y-h.node(t).height/2)+" )"))})),h.edges().forEach((function(t){void 0!==t&&void 0!==h.edge(t)&&(n.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(h.edge(t))),x.drawEdge(c,h.edge(t),h.edge(t).relation,i,r))}));const b=c.node().getBBox(),k=b.width+40,L=b.height+40;(0,n.a$)(c,L,k,i.useMaxWidth);const E=`${b.x-20} ${b.y-20} ${k} ${L}`;n.Rm.debug(`viewBox ${E}`),c.attr("viewBox",E)}),"draw")},b={parser:r._$,db:r.z2,renderer:w,styles:r.tM,init:(0,n.K2)((t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,r.z2.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/654-9045dc15.chunk.min.js b/js/654-9045dc15.chunk.min.js deleted file mode 100644 index 4f1866f..0000000 --- a/js/654-9045dc15.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[654],{1471:(e,t,s)=>{s.d(t,{T:()=>L});var i=s(9622),n=s(9142),r=s(9610),o=s(5041),a=s(4092),l=s(6401),c=s(8058),h=s(9592),d=s(7671),u=s(4326),g=s(7371),p=s(3533);const y=(0,u.A)((function(e){return(0,g.A)((0,d.A)(e,1,p.A,!0))}));var b=s(2866),_=s(3130),f="\0",m="\0",x="";class L{constructor(e={}){this._isDirected=!i.A(e,"directed")||e.directed,this._isMultigraph=!!i.A(e,"multigraph")&&e.multigraph,this._isCompound=!!i.A(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=n.A(void 0),this._defaultEdgeLabelFn=n.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[m]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return r.A(e)||(e=n.A(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return o.A(this._nodes)}sources(){var e=this;return a.A(this.nodes(),(function(t){return l.A(e._in[t])}))}sinks(){var e=this;return a.A(this.nodes(),(function(t){return l.A(e._out[t])}))}setNodes(e,t){var s=arguments,i=this;return c.A(e,(function(e){s.length>1?i.setNode(e,t):i.setNode(e)})),this}setNode(e,t){return i.A(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=m,this._children[e]={},this._children[m][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return i.A(this._nodes,e)}removeNode(e){var t=this;if(i.A(this._nodes,e)){var s=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c.A(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),c.A(o.A(this._in[e]),s),delete this._in[e],delete this._preds[e],c.A(o.A(this._out[e]),s),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h.A(t))t=m;else{for(var s=t+="";!h.A(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==m)return t}}children(e){if(h.A(e)&&(e=m),this._isCompound){var t=this._children[e];if(t)return o.A(t)}else{if(e===m)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return o.A(t)}successors(e){var t=this._sucs[e];if(t)return o.A(t)}neighbors(e){var t=this.predecessors(e);if(t)return y(t,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;c.A(this._nodes,(function(s,i){e(i)&&t.setNode(i,s)})),c.A(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,s.edge(e))}));var i={};function n(e){var r=s.parent(e);return void 0===r||t.hasNode(r)?(i[e]=r,r):r in i?i[r]:n(r)}return this._isCompound&&c.A(t.nodes(),(function(e){t.setParent(e,n(e))})),t}setDefaultEdgeLabel(e){return r.A(e)||(e=n.A(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return b.A(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return _.A(e,(function(e,n){return i.length>1?s.setEdge(e,n,t):s.setEdge(e,n),n})),this}setEdge(){var e,t,s,n,r=!1,o=arguments[0];"object"==typeof o&&null!==o&&"v"in o?(e=o.v,t=o.w,s=o.name,2===arguments.length&&(n=arguments[1],r=!0)):(e=o,t=arguments[1],s=arguments[3],arguments.length>2&&(n=arguments[2],r=!0)),e=""+e,t=""+t,h.A(s)||(s=""+s);var a=E(this._isDirected,e,t,s);if(i.A(this._edgeLabels,a))return r&&(this._edgeLabels[a]=n),this;if(!h.A(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=r?n:this._defaultEdgeLabelFn(e,t,s);var l=function(e,t,s,i){var n=""+t,r=""+s;if(!e&&n>r){var o=n;n=r,r=o}var a={v:n,w:r};return i&&(a.name=i),a}(this._isDirected,e,t,s);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[a]=l,S(this._preds[t],e),S(this._sucs[e],t),this._in[t][a]=l,this._out[e][a]=l,this._edgeCount++,this}edge(e,t,s){var i=1===arguments.length?w(this._isDirected,arguments[0]):E(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var n=1===arguments.length?w(this._isDirected,arguments[0]):E(this._isDirected,e,t,s);return i.A(this._edgeLabels,n)}removeEdge(e,t,s){var i=1===arguments.length?w(this._isDirected,arguments[0]):E(this._isDirected,e,t,s),n=this._edgeObjs[i];return n&&(e=n.v,t=n.w,delete this._edgeLabels[i],delete this._edgeObjs[i],k(this._preds[t],e),k(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=b.A(s);return t?a.A(i,(function(e){return e.v===t})):i}}outEdges(e,t){var s=this._out[e];if(s){var i=b.A(s);return t?a.A(i,(function(e){return e.w===t})):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}function S(e,t){e[t]?e[t]++:e[t]=1}function k(e,t){--e[t]||delete e[t]}function E(e,t,s,i){var n=""+t,r=""+s;if(!e&&n>r){var o=n;n=r,r=o}return n+x+r+x+(h.A(i)?f:i)}function w(e,t){return E(e,t.v,t.w,t.name)}L.prototype._nodeCount=0,L.prototype._edgeCount=0},697:(e,t,s)=>{s.d(t,{T:()=>i.T});var i=s(1471)},5937:(e,t,s)=>{s.d(t,{A:()=>r});var i=s(6309),n=s(1931);const r=(e,t)=>i.A.lang.round(n.A.parse(e)[t])},2654:(e,t,s)=>{s.d(t,{diagram:()=>ae});var i=s(1953),n=s(6578),r=(s(8496),s(8252),s(7323)),o=s(798),a=s(53),l=s(5937),c=s(5582),h=s(4852),d=s(697),u=function(){var e=(0,o.K2)((function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s}),"o"),t=[1,7],s=[1,13],i=[1,14],n=[1,15],r=[1,19],a=[1,16],l=[1,17],c=[1,18],h=[8,30],d=[8,21,28,29,30,31,32,40,44,47],u=[1,23],g=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],y=[8,15,16,21,27,28,29,30,31,32,40,44,47],b=[1,49],_={trace:(0,o.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,o.K2)((function(e,t,s,i,n,r,o){var a=r.length-1;switch(n){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",r[a-1]),i.setHierarchy(r[a-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",r[a]),"number"==typeof r[a].length?this.$=r[a]:this.$=[r[a]];break;case 13:i.getLogger().debug("Rule: statement #2: ",r[a-1]),this.$=[r[a-1]].concat(r[a]);break;case 14:i.getLogger().debug("Rule: link: ",r[a],e),this.$={edgeTypeStr:r[a],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",r[a-3],r[a-1],r[a]),this.$={edgeTypeStr:r[a],label:r[a-1]};break;case 18:const t=parseInt(r[a]),s=i.generateId();this.$={id:s,type:"space",label:"",width:t,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",r[a-2],r[a-1],r[a]," typestr: ",r[a-1].edgeTypeStr);const n=i.edgeStrToEdgeData(r[a-1].edgeTypeStr);this.$=[{id:r[a-2].id,label:r[a-2].label,type:r[a-2].type,directions:r[a-2].directions},{id:r[a-2].id+"-"+r[a].id,start:r[a-2].id,end:r[a].id,label:r[a-1].label,type:"edge",directions:r[a].directions,arrowTypeEnd:n,arrowTypeStart:"arrow_open"},{id:r[a].id,label:r[a].label,type:i.typeStr2Type(r[a].typeStr),directions:r[a].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[a-1],r[a]),this.$={id:r[a-1].id,label:r[a-1].label,type:i.typeStr2Type(r[a-1].typeStr),directions:r[a-1].directions,widthInColumns:parseInt(r[a],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",r[a]),this.$={id:r[a].id,label:r[a].label,type:i.typeStr2Type(r[a].typeStr),directions:r[a].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this?this:"na"),i.getLogger().debug("COLUMNS: ",r[a]),this.$={type:"column-setting",columns:"auto"===r[a]?-1:parseInt(r[a])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",r[a-2],r[a-1]),i.generateId(),this.$={...r[a-2],type:"composite",children:r[a-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",r[a-2],r[a-1],r[a]);const o=i.generateId();this.$={id:o,type:"composite",label:"",children:r[a-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",r[a]),this.$={id:r[a]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[a-1],r[a]),this.$={id:r[a-1],label:r[a].label,typeStr:r[a].typeStr,directions:r[a].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",r[a]),this.$=[r[a]];break;case 32:i.getLogger().debug("Rule: dirList: ",r[a-1],r[a]),this.$=[r[a-1]].concat(r[a]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",r[a-2],r[a-1],r[a]),this.$={typeStr:r[a-2]+r[a],label:r[a-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[a-3],r[a-2]," #3:",r[a-1],r[a]),this.$={typeStr:r[a-3]+r[a],label:r[a-2],directions:r[a-1]};break;case 35:case 36:this.$={type:"classDef",id:r[a-1].trim(),css:r[a].trim()};break;case 37:this.$={type:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:this.$={type:"applyStyles",id:r[a-1].trim(),stylesStr:r[a].trim()}}}),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,32:r,40:a,44:l,47:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:s,29:i,31:n,32:r,40:a,44:l,47:c}),e(d,[2,16],{14:22,15:u,16:g}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(p,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,32:r},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,32:r,40:a,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(y,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:r},{32:[2,14]},{17:[1,36]},e(p,[2,24]),{11:37,13:4,14:22,15:u,16:g,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,32:r,40:a,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(p,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{37:[1,47]},{34:48,35:b},{15:[1,50]},e(d,[2,27]),e(y,[2,33]),{39:[1,51]},{34:52,35:b,39:[2,31]},{32:[2,15]},e(y,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,o.K2)((function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)}),"parseError"),parse:(0,o.K2)((function(e){var t=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",c=0,h=0,d=0,u=r.slice.call(arguments,1),g=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);g.setInput(e,p.yy),p.yy.lexer=g,p.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var b=g.yylloc;r.push(b);var _=g.options&&g.options.ranges;function f(){var e;return"number"!=typeof(e=i.pop()||g.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)((function(e){s.length=s.length-2*e,n.length=n.length-e,r.length=r.length-e}),"popStack"),(0,o.K2)(f,"lex");for(var m,x,L,S,k,E,w,D,A,N={};;){if(L=s[s.length-1],this.defaultActions[L]?S=this.defaultActions[L]:(null==m&&(m=f()),S=a[L]&&a[L][m]),void 0===S||!S.length||!S[0]){var v;for(E in A=[],a[L])this.terminals_[E]&&E>2&&A.push("'"+this.terminals_[E]+"'");v=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(v,{text:g.match,token:this.terminals_[m]||m,line:g.yylineno,loc:b,expected:A})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+m);switch(S[0]){case 1:s.push(m),n.push(g.yytext),r.push(g.yylloc),s.push(S[1]),m=null,x?(m=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,b=g.yylloc,d>0&&d--);break;case 2:if(w=this.productions_[S[1]][1],N.$=n[n.length-w],N._$={first_line:r[r.length-(w||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(w||1)].first_column,last_column:r[r.length-1].last_column},_&&(N._$.range=[r[r.length-(w||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(N,[l,h,c,p.yy,S[1],n,r].concat(u))))return k;w&&(s=s.slice(0,-1*w*2),n=n.slice(0,-1*w),r=r.slice(0,-1*w)),s.push(this.productions_[S[1]][0]),n.push(N.$),r.push(N._$),D=a[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0}),"parse")},f=function(){return{EOF:1,parseError:(0,o.K2)((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:(0,o.K2)((function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,o.K2)((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:(0,o.K2)((function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,o.K2)((function(){return this._more=!0,this}),"more"),reject:(0,o.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,o.K2)((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:(0,o.K2)((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,o.K2)((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,o.K2)((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:(0,o.K2)((function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;rt[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,o.K2)((function(e){this.conditionStack.push(e)}),"begin"),popState:(0,o.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,o.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,o.K2)((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:(0,o.K2)((function(e){this.begin(e)}),"pushState"),stateStackSize:(0,o.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,o.K2)((function(e,t,s,i){switch(s){case 0:return 10;case 1:return e.getLogger().debug("Found space-block"),31;case 2:return e.getLogger().debug("Found nl-block"),31;case 3:return e.getLogger().debug("Found space-block"),29;case 4:e.getLogger().debug(".",t.yytext);break;case 5:e.getLogger().debug("_",t.yytext);break;case 6:return 5;case 7:return t.yytext=-1,28;case 8:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 14:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 15:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 16:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),38;case 75:return e.getLogger().debug("Lex: NODE_ID",t.yytext),32;case 76:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 79:return"NODE_DESCR";case 81:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 84:e.getLogger().debug("LEX POPPING"),this.popState();break;case 85:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 91:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 92:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 94:case 95:case 96:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 97:case 98:case 99:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 101:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 103:case 104:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 105:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}}),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}}}();function m(){this.yy={}}return _.lexer=f,(0,o.K2)(m,"Parser"),m.prototype=_,_.Parser=m,new m}();u.parser=u;var g=u,p=new Map,y=[],b=new Map,_="color",f="fill",m=(0,o.D7)(),x=new Map,L=(0,o.K2)((e=>o.Y2.sanitizeText(e,m)),"sanitizeText"),S=(0,o.K2)((function(e,t=""){let s=x.get(e);s||(s={id:e,styles:[],textStyles:[]},x.set(e,s)),null!=t&&t.split(",").forEach((e=>{const t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(_).exec(e)){const e=t.replace(f,"bgFill").replace(_,f);s.textStyles.push(e)}s.styles.push(t)}))}),"addStyleClass"),k=(0,o.K2)((function(e,t=""){const s=p.get(e);null!=t&&(s.styles=t.split(","))}),"addStyle2Node"),E=(0,o.K2)((function(e,t){e.split(",").forEach((function(e){let s=p.get(e);if(void 0===s){const t=e.trim();s={id:t,type:"na",children:[]},p.set(t,s)}s.classes||(s.classes=[]),s.classes.push(t)}))}),"setCssClass"),w=(0,o.K2)(((e,t)=>{const s=e.flat(),i=[];for(const e of s)if(e.label&&(e.label=L(e.label)),"classDef"!==e.type)if("applyClass"!==e.type)if("applyStyles"!==e.type)if("column-setting"===e.type)t.columns=e.columns??-1;else if("edge"===e.type){const t=(b.get(e.id)??0)+1;b.set(e.id,t),e.id=t+"-"+e.id,y.push(e)}else{e.label||("composite"===e.type?e.label="":e.label=e.id);const t=p.get(e.id);if(void 0===t?p.set(e.id,e):("na"!==e.type&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&w(e.children,e),"space"===e.type){const t=e.width??1;for(let s=0;s{o.Rm.debug("Clear called"),(0,o.IU)(),A={id:"root",type:"composite",children:[],columns:-1},p=new Map([["root",A]]),D=[],x=new Map,y=[],b=new Map}),"clear");function v(e){switch(o.Rm.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return o.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function C(e){return o.Rm.debug("typeStr2Type",e),"=="===e?"thick":"normal"}function $(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}(0,o.K2)(v,"typeStr2Type"),(0,o.K2)(C,"edgeTypeStr2Type"),(0,o.K2)($,"edgeStrToEdgeData");var T=0,R=(0,o.K2)((()=>(T++,"id-"+Math.random().toString(36).substr(2,12)+"-"+T)),"generateId"),I=(0,o.K2)((e=>{A.children=e,w(e,A),D=A.children}),"setHierarchy"),z=(0,o.K2)((e=>{const t=p.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1}),"getColumns"),O=(0,o.K2)((()=>[...p.values()]),"getBlocksFlat"),K=(0,o.K2)((()=>D||[]),"getBlocks"),B=(0,o.K2)((()=>y),"getEdges"),P=(0,o.K2)((e=>p.get(e)),"getBlock"),F=(0,o.K2)((e=>{p.set(e.id,e)}),"setBlock"),M=(0,o.K2)((()=>console),"getLogger"),Y=(0,o.K2)((function(){return x}),"getClasses"),X={getConfig:(0,o.K2)((()=>(0,o.zj)().block),"getConfig"),typeStr2Type:v,edgeTypeStr2Type:C,edgeStrToEdgeData:$,getLogger:M,getBlocksFlat:O,getBlocks:K,getEdges:B,setHierarchy:I,getBlock:P,setBlock:F,getColumns:z,getClasses:Y,clear:N,generateId:R},j=(0,o.K2)(((e,t)=>{const s=l.A,i=s(e,"r"),n=s(e,"g"),r=s(e,"b");return c.A(i,n,r,t)}),"fade"),W=(0,o.K2)((e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${j(e.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${j(e.mainBkg,.5)};\n fill: ${j(e.clusterBkg,.5)};\n stroke: ${j(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`),"getStyles"),U=(0,o.D7)()?.block?.padding??8;function H(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);return e<0?{px:t,py:0}:1===e?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}(0,o.K2)(H,"calculateBlockPosition");var G=(0,o.K2)((e=>{let t=0,s=0;for(const i of e.children){const{width:n,height:r,x:a,y:l}=i.size??{width:0,height:0,x:0,y:0};o.Rm.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",r,"x:",a,"y:",l,i.type),"space"!==i.type&&(n>t&&(t=n/(e.widthInColumns??1)),r>s&&(s=r))}return{width:t,height:s}}),"getMaxChildSize");function q(e,t,s=0,i=0){o.Rm.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"sieblingWidth",s),e?.size?.width||(e.size={width:s,height:i,x:0,y:0});let n=0,r=0;if(e.children?.length>0){for(const s of e.children)q(s,t);const a=G(e);n=a.width,r=a.height,o.Rm.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",n,r);for(const t of e.children)t.size&&(o.Rm.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${n} ${r} ${JSON.stringify(t.size)}`),t.size.width=n*(t.widthInColumns??1)+U*((t.widthInColumns??1)-1),t.size.height=r,t.size.x=0,t.size.y=0,o.Rm.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${n} maxHeight:${r}`));for(const s of e.children)q(s,t,n,r);const l=e.columns??-1;let c=0;for(const t of e.children)c+=t.widthInColumns??1;let h=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(t>0){const s=(u-t*U-U)/t;o.Rm.debug("abc95 (growing to fit) width",e.id,u,e.size?.width,s);for(const t of e.children)t.size&&(t.size.width=s)}}e.size={width:u,height:g,x:0,y:0}}o.Rm.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function J(e,t){o.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const s=e.columns??-1;if(o.Rm.debug("layoutBlocks columns abc95",e.id,"=>",s,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,n=e.children.length*i+(e.children.length-1)*U;o.Rm.debug("widthOfChildren 88",n,"posX");let r=0;o.Rm.debug("abc91 block?.size?.x",e.id,e?.size?.x);let a=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-U,l=0;for(const i of e.children){const n=e;if(!i.size)continue;const{width:c,height:h}=i.size,{px:d,py:u}=H(s,r);if(u!=l&&(l=u,a=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-U,o.Rm.debug("New row in layout for block",e.id," and child ",i.id,l)),o.Rm.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${r} (px, py) ${d},${u} (${n?.size?.x},${n?.size?.y}) parent: ${n.id} width: ${c}${U}`),n.size){const e=c/2;i.size.x=a+U+e,o.Rm.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${a} new startingPosX${i.size.x} ${e} padding=${U} width=${c} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${c*(i?.widthInColumns??1)/2}`),a=i.size.x+e,i.size.y=n.size.y-n.size.height/2+u*(h+U)+h/2+U,o.Rm.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${a}${U}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${c*(i?.widthInColumns??1)/2}`)}i.children&&J(i,t),r+=i?.widthInColumns??1,o.Rm.debug("abc88 columnsPos",i,r)}}o.Rm.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function Z(e,{minX:t,minY:s,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){const{x:r,y:o,width:a,height:l}=e.size;r-a/2i&&(i=r+a/2),o+l/2>n&&(n=o+l/2)}if(e.children)for(const r of e.children)({minX:t,minY:s,maxX:i,maxY:n}=Z(r,{minX:t,minY:s,maxX:i,maxY:n}));return{minX:t,minY:s,maxX:i,maxY:n}}function Q(e){const t=e.getBlock("root");if(!t)return;q(t,e,0,0),J(t,e),o.Rm.debug("getBlocks",JSON.stringify(t,null,2));const{minX:s,minY:i,maxX:n,maxY:r}=Z(t);return{x:s,y:i,width:n-s,height:r-i}}function V(e,t,s=!1){const i=e;let n="default";(i?.classes?.length||0)>0&&(n=(i?.classes??[]).join(" ")),n+=" flowchart-label";let a,l=0,c="";switch(i.type){case"round":l=5,c="rect";break;case"composite":l=0,c="composite",a=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const h=(0,r.sM)(i?.styles??[]),d=i.label,u=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:h.labelStyle,shape:c,labelText:d,rx:l,ry:l,class:n,style:h.style,id:i.id,directions:i.directions,width:u.width,height:u.height,x:u.x,y:u.y,positioned:s,intersect:void 0,type:i.type,padding:a??(0,o.zj)()?.block?.padding??0}}async function ee(e,t,s){const i=V(t,0,!1);if("group"===i.type)return;const r=await(0,n.on)(e,i),o=r.node().getBBox(),a=s.getBlock(i.id);a.size={width:o.width,height:o.height,x:0,y:0,node:r},s.setBlock(a),r.remove()}async function te(e,t,s){const i=V(t,0,!0);"space"!==s.getBlock(i.id).type&&(await(0,n.on)(e,i),t.intersect=i?.intersect,(0,n.U_)(i))}async function se(e,t,s,i){for(const n of t)await i(e,n,s),n.children&&await se(e,n.children,s,i)}async function ie(e,t,s){await se(e,t,s,ee)}async function ne(e,t,s){await se(e,t,s,te)}async function re(e,t,s,n,r){const o=new d.T({multigraph:!0,compound:!0});o.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const e of s)e.size&&o.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(const s of t)if(s.start&&s.end){const t=n.getBlock(s.start),a=n.getBlock(s.end);if(t?.size&&a?.size){const n=t.size,l=a.size,c=[{x:n.x,y:n.y},{x:n.x+(l.x-n.x)/2,y:n.y+(l.y-n.y)/2},{x:l.x,y:l.y}];(0,i.Jo)(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",o,r),s.label&&(await(0,i.jP)(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),(0,i.T_)({...s,x:c[1].x,y:c[1].y},{originalPath:c}))}}}(0,o.K2)(q,"setBlockSizes"),(0,o.K2)(J,"layoutBlocks"),(0,o.K2)(Z,"findBounds"),(0,o.K2)(Q,"layout"),(0,o.K2)(V,"getNodeFromBlock"),(0,o.K2)(ee,"calculateBlockSize"),(0,o.K2)(te,"insertBlockPositioned"),(0,o.K2)(se,"performOperations"),(0,o.K2)(ie,"calculateBlockSizes"),(0,o.K2)(ne,"insertBlocks"),(0,o.K2)(re,"insertEdges");var oe=(0,o.K2)((function(e,t){return t.db.getClasses()}),"getClasses"),ae={parser:g,db:X,renderer:{draw:(0,o.K2)((async function(e,t,s,n){const{securityLevel:r,block:a}=(0,o.zj)(),l=n.db;let c;"sandbox"===r&&(c=(0,h.Ltv)("#i"+t));const d="sandbox"===r?(0,h.Ltv)(c.nodes()[0].contentDocument.body):(0,h.Ltv)("body"),u="sandbox"===r?d.select(`[id="${t}"]`):(0,h.Ltv)(`[id="${t}"]`);(0,i.g0)(u,["point","circle","cross"],n.type,t);const g=l.getBlocks(),p=l.getBlocksFlat(),y=l.getEdges(),b=u.insert("g").attr("class","block");await ie(b,g,l);const _=Q(l);if(await ne(b,g,l),await re(b,y,p,l,t),_){const e=_,t=Math.max(1,Math.round(e.width/e.height*.125)),s=e.height+t+10,i=e.width+10,{useMaxWidth:n}=a;(0,o.a$)(u,s,i,!!n),o.Rm.debug("Here Bounds",_,e),u.attr("viewBox",`${e.x-5} ${e.y-5} ${e.width+10} ${e.height+10}`)}}),"draw"),getClasses:oe},styles:W}}}]); \ No newline at end of file diff --git a/js/657-d323ea06.chunk.min.js b/js/657-d323ea06.chunk.min.js deleted file mode 100644 index fbb3a2d..0000000 --- a/js/657-d323ea06.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[657],{8657:(t,e,a)=>{a.d(e,{diagram:()=>L});var i,n=a(3148),r=(a(6151),a(6578),a(2602),a(9022),a(8496),a(8252),a(7323)),d=a(798),s=a(4852),o=a(567),g=a(697),c={},p=(0,d.K2)(((t,e)=>{c[t]=e}),"set"),h=(0,d.K2)((t=>c[t]),"get"),l=(0,d.K2)((()=>Object.keys(c)),"keys"),x=(0,d.K2)((()=>l().length),"size"),D={get:h,set:p,keys:l,size:x},u=(0,d.K2)((t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit)),"drawStartState"),f=(0,d.K2)((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),y=(0,d.K2)(((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a}),"drawSimpleState"),w=(0,d.K2)(((t,e)=>{const a=(0,d.K2)((function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)}),"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let s=!0,o=!0;e.descriptions.forEach((function(t){s||(a(r,t,o),o=!1),s=!1}));const g=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),c=r.node().getBBox(),p=Math.max(c.width,i.width);return g.attr("x2",p+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",p+2*(0,d.D7)().state.padding).attr("height",c.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t}),"drawDescrState"),m=(0,d.K2)(((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),c=g.node().getBBox().width+n;let p,h=Math.max(c,s);h===s&&(h+=n);const l=t.node().getBBox();e.doc,p=o-i,c>s&&(p=(s-h)/2+i),Math.abs(o-l.x)s&&(p=o-(c-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",h).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",p+i),c<=s&&g.attr("x",o+(h-n)/2-c/2+i),t.insert("rect",":first-child").attr("x",p).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",h).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",h).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t}),"addTitleAndBox"),b=(0,d.K2)((t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2))),"drawEndState"),B=(0,d.K2)(((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)}),"drawForkJoinState"),k=(0,d.K2)(((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"
");s=s.replace(/\n/g,"
");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const t of o){const i=t.trim();if(i.length>0){const t=r.append("tspan");t.text(i),0===g&&(g+=t.node().getBBox().height),n+=g,t.attr("x",e+(0,d.D7)().state.noteMargin),t.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}}),"_drawLongText"),S=(0,d.K2)(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=k(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a}),"drawNote"),N=(0,d.K2)((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&u(n),"end"===e.type&&b(n),"fork"!==e.type&&"join"!==e.type||B(n,e),"note"===e.type&&S(e.note.text,n),"divider"===e.type&&f(n),"default"===e.type&&0===e.descriptions.length&&y(n,e),"default"===e.type&&e.descriptions.length>0&&w(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,D.set(a,i),i}),"drawState"),E=0,K=(0,d.K2)((function(t,e,a){const i=(0,d.K2)((function(t){switch(t){case n.iP.relationType.AGGREGATION:return"aggregation";case n.iP.relationType.EXTENSION:return"extension";case n.iP.relationType.COMPOSITION:return"composition";case n.iP.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const o=e.points,g=(0,s.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.qrM),c=t.append("path").attr("d",g(o)).attr("id","edge"+E).attr("class","transition");let p="";if((0,d.D7)().state.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)")),c.attr("marker-end","url("+p+"#"+i(n.iP.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:s}=r._K.calcLabelPosition(e.points),o=d.Y2.getRows(a.title);let g=0;const c=[];let p=0,h=0;for(let t=0;t<=o.length;t++){const e=i.append("text").attr("text-anchor","middle").text(o[t]).attr("x",n).attr("y",s+g),a=e.node().getBBox();if(p=Math.max(p,a.width),h=Math.min(h,a.x),d.Rm.info(a.x,n,s+g),0===g){const t=e.node().getBBox();g=t.height,d.Rm.info("Title height",g,s)}c.push(e)}let l=g*o.length;if(o.length>1){const t=(o.length-1)*g*.5;c.forEach(((e,a)=>e.attr("y",s+a*g-t))),l=g*o.length}const x=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-p/2-(0,d.D7)().state.padding/2).attr("y",s-l/2-(0,d.D7)().state.padding/2-3.5).attr("width",p+(0,d.D7)().state.padding).attr("height",l+(0,d.D7)().state.padding),d.Rm.info(x)}E++}),"drawEdge"),M={},v=(0,d.K2)((function(){}),"setConf"),R=(0,d.K2)((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),z=(0,d.K2)((function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let o;"sandbox"===r&&(o=(0,s.Ltv)("#i"+e));const g="sandbox"===r?(0,s.Ltv)(o.nodes()[0].contentDocument.body):(0,s.Ltv)("body"),c="sandbox"===r?o.nodes()[0].contentDocument:document;d.Rm.debug("Rendering diagram "+t);const p=g.select(`[id='${e}']`);R(p);const h=n.db.getRootDoc();T(h,p,void 0,!1,g,c,n);const l=i.padding,x=p.node().getBBox(),D=x.width+2*l,u=x.height+2*l,f=1.75*D;(0,d.a$)(p,u,f,i.useMaxWidth),p.attr("viewBox",`${x.x-i.padding} ${x.y-i.padding} `+D+" "+u)}),"draw"),H=(0,d.K2)((t=>t?t.length*i.fontSizeFactor:1),"getLabelWidth"),T=(0,d.K2)(((t,e,a,n,r,s,c)=>{const p=new g.T({compound:!0,multigraph:!0});let h,l=!0;for(h=0;h{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))):d.Rm.debug("No Node "+t+": "+JSON.stringify(p.node(t)))}));let w=y.getBBox();p.edges().forEach((function(t){void 0!==t&&void 0!==p.edge(t)&&(d.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(p.edge(t))),K(e,p.edge(t),p.edge(t).relation))})),w=y.getBBox();const b={id:a||"root",label:a||"root",width:0,height:0};return b.width=w.width+2*i.padding,b.height=w.height+2*i.padding,d.Rm.debug("Doc rendered",b,p),b}),"renderDoc"),P={setConf:v,draw:z},L={parser:n.Zk,db:n.iP,renderer:P,styles:n.tM,init:(0,d.K2)((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,n.iP.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/663-31678b4b.chunk.min.js b/js/663-31678b4b.chunk.min.js new file mode 100644 index 0000000..feca80e --- /dev/null +++ b/js/663-31678b4b.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[663],{4663:(t,e,r)=>{r.d(e,{diagram:()=>F});var a=r(5522),i=r(32),n=r(697),s=r(4852),o=r(567);const c=[];for(let t=0;t<256;++t)c.push((t+256).toString(16).slice(1));const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,h=function(t){if(!function(t){return"string"==typeof t&&l.test(t)}(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};function d(t,e,r,a){switch(t){case 0:return e&r^~e&a;case 1:case 3:return e^r^a;case 2:return e&r^e&a^r&a}}function u(t,e){return t<>>32-e}const y=function(){function t(t,e,r,a){var i;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>0;l=c,c=o,o=u(s,30)>>>0,s=i,i=n}r[0]=r[0]+i>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}(n),n[6]=15&n[6]|80,n[8]=63&n[8]|128,r){a=a||0;for(let t=0;t<16;++t)r[a+t]=n[t];return r}return function(t,e=0){return c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]}(n)}try{t.name="v5"}catch(t){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}();var p=function(){var t=(0,i.K2)((function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r}),"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],a=[1,11],n=[1,12],s=[1,13],o=[1,14],c=[1,15],l=[1,21],h=[1,22],d=[1,23],u=[1,24],y=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],_=[1,34],f=[27,28,46,47],E=[41,42,43,44,45],g=[17,34],m=[1,54],O=[1,53],k=[17,34,36,38],b={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:(0,i.K2)((function(t,e,r,a,i,n,s){var o=n.length-1;switch(i){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=n[o];break;case 8:a.addEntity(n[o-4]),a.addEntity(n[o-2]),a.addRelationship(n[o-4],n[o],n[o-2],n[o-3]);break;case 9:a.addEntity(n[o-3]),a.addAttributes(n[o-3],n[o-1]);break;case 10:a.addEntity(n[o-2]);break;case 11:a.addEntity(n[o]);break;case 12:a.addEntity(n[o-6],n[o-4]),a.addAttributes(n[o-6],n[o-1]);break;case 13:a.addEntity(n[o-5],n[o-3]);break;case 14:a.addEntity(n[o-3],n[o-1]);break;case 15:case 16:this.$=n[o].trim(),a.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),a.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=n[o].replace(/"/g,"");break;case 21:case 29:this.$=[n[o]];break;case 22:n[o].push(n[o-1]),this.$=n[o];break;case 23:this.$={attributeType:n[o-1],attributeName:n[o]};break;case 24:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeKeyTypeList:n[o]};break;case 25:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeComment:n[o]};break;case 26:this.$={attributeType:n[o-3],attributeName:n[o-2],attributeKeyTypeList:n[o-1],attributeComment:n[o]};break;case 30:n[o-2].push(n[o]),this.$=n[o-2];break;case 33:this.$={cardA:n[o],relType:n[o-1],cardB:n[o-2]};break;case 34:this.$=a.Cardinality.ZERO_OR_ONE;break;case 35:this.$=a.Cardinality.ZERO_OR_MORE;break;case 36:this.$=a.Cardinality.ONE_OR_MORE;break;case 37:this.$=a.Cardinality.ONLY_ONE;break;case 38:this.$=a.Cardinality.MD_PARENT;break;case 39:this.$=a.Identification.NON_IDENTIFYING;break;case 40:this.$=a.Identification.IDENTIFYING}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:a,24:n,26:s,27:o,28:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:a,24:n,26:s,27:o,28:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:l,42:h,43:d,44:u,45:y}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:o,28:c},{16:30,17:[1,31],29:32,30:33,34:_},{11:35,27:o,28:c},{40:36,46:[1,37],47:[1,38]},t(f,[2,34]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:_},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:l,42:h,43:d,44:u,45:y},t(E,[2,39]),t(E,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(g,[2,23],{32:50,33:51,35:52,37:m,38:O}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(g,[2,24],{33:56,36:[1,57],38:O}),t(g,[2,25]),t(k,[2,29]),t(g,[2,32]),t(k,[2,31]),{16:58,17:[1,59],29:32,30:33,34:_},t(g,[2,26]),{35:60,37:m},{17:[1,61]},t(e,[2,13]),t(k,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:(0,i.K2)((function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,r=[0],a=[],n=[null],s=[],o=this.table,c="",l=0,h=0,d=0,u=s.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;s.push(f);var E=y.options&&y.options.ranges;function g(){var t;return"number"!=typeof(t=a.pop()||y.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){r.length=r.length-2*t,n.length=n.length-t,s.length=s.length-t}),"popStack"),(0,i.K2)(g,"lex");for(var m,O,k,b,R,N,x,T,A,M={};;){if(k=r[r.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==m&&(m=g()),b=o[k]&&o[k][m]),void 0===b||!b.length||!b[0]){var w;for(N in A=[],o[k])this.terminals_[N]&&N>2&&A.push("'"+this.terminals_[N]+"'");w=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(w,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:f,expected:A})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(b[0]){case 1:r.push(m),n.push(y.yytext),s.push(y.yylloc),r.push(b[1]),m=null,O?(m=O,O=null):(h=y.yyleng,c=y.yytext,l=y.yylineno,f=y.yylloc,d>0&&d--);break;case 2:if(x=this.productions_[b[1]][1],M.$=n[n.length-x],M._$={first_line:s[s.length-(x||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(x||1)].first_column,last_column:s[s.length-1].last_column},E&&(M._$.range=[s[s.length-(x||1)].range[0],s[s.length-1].range[1]]),void 0!==(R=this.performAction.apply(M,[c,h,l,p.yy,b[1],n,s].concat(u))))return R;x&&(r=r.slice(0,-1*x*2),n=n.slice(0,-1*x),s=s.slice(0,-1*x)),r.push(this.productions_[b[1]][0]),n.push(M.$),s.push(M._$),T=o[r[r.length-2]][r[r.length-1]],r.push(T);break;case 3:return!0}}return!0}),"parse")},R=function(){return{EOF:1,parseError:(0,i.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,i.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in i)this[n]=i[n];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),n=0;ne[0].length)){if(e=r,a=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,e,r,a){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:case 15:case 20:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;case 55:return 6}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}}}();function N(){this.yy={}}return b.lexer=R,(0,i.K2)(N,"Parser"),N.prototype=b,b.Parser=N,new N}();p.parser=p;var _=p,f=new Map,E=[],g=(0,i.K2)((function(t,e=void 0){return f.has(t)?!f.get(t).alias&&e&&(f.get(t).alias=e,i.Rm.info(`Add alias '${e}' to entity '${t}'`)):(f.set(t,{attributes:[],alias:e}),i.Rm.info("Added new entity :",t)),f.get(t)}),"addEntity"),m=(0,i.K2)((()=>f),"getEntities"),O=(0,i.K2)((function(t,e){let r,a=g(t);for(r=e.length-1;r>=0;r--)a.attributes.push(e[r]),i.Rm.debug("Added attribute ",e[r].attributeName)}),"addAttributes"),k=(0,i.K2)((function(t,e,r,a){let n={entityA:t,roleA:e,entityB:r,relSpec:a};E.push(n),i.Rm.debug("Added new relationship :",n)}),"addRelationship"),b=(0,i.K2)((()=>E),"getRelationships"),R=(0,i.K2)((function(){f=new Map,E=[],(0,i.IU)()}),"clear"),N={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:(0,i.K2)((()=>(0,i.D7)().er),"getConfig"),addEntity:g,addAttributes:O,getEntities:m,addRelationship:k,getRelationships:b,clear:R,setAccTitle:i.SV,getAccTitle:i.iN,setAccDescription:i.EI,getAccDescription:i.m7,setDiagramTitle:i.ke,getDiagramTitle:i.ab},x={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},T={ERMarkers:x,insertMarkers:(0,i.K2)((function(t,e){let r;t.append("defs").append("marker").attr("id",x.MD_PARENT_START).attr("refX",0).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"),t.append("defs").append("marker").attr("id",x.MD_PARENT_END).attr("refX",19).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"),t.append("defs").append("marker").attr("id",x.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",x.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",x.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",x.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",x.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",x.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",x.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",x.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}),"insertMarkers")},A=/[^\dA-Za-z](\W)*/g,M={},w=new Map,I=(0,i.K2)((function(t){const e=Object.keys(t);for(const r of e)M[r]=t[r]}),"setConf"),D=(0,i.K2)(((t,e,r)=>{const a=M.entityPadding/3,n=M.entityPadding/3,s=.85*M.fontSize,o=e.node().getBBox(),c=[];let l=!1,h=!1,d=0,u=0,y=0,p=0,_=o.height+2*a,f=1;r.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(h=!0)})),r.forEach((r=>{const n=`${e.node().id}-attr-${f}`;let o=0;const E=(0,i.QO)(r.attributeType),g=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(E),m=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(r.attributeName),O={};O.tn=g,O.nn=m;const k=g.node().getBBox(),b=m.node().getBBox();if(d=Math.max(d,k.width),u=Math.max(u,b.width),o=Math.max(k.height,b.height),l){const e=void 0!==r.attributeKeyTypeList?r.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(e);O.kn=a;const c=a.node().getBBox();y=Math.max(y,c.width),o=Math.max(o,c.height)}if(h){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(r.attributeComment||"");O.cn=e;const a=e.node().getBBox();p=Math.max(p,a.width),o=Math.max(o,a.height)}O.height=o,c.push(O),_+=o+2*a,f+=1}));let E=4;l&&(E+=2),h&&(E+=2);const g=d+u+y+p,m={width:Math.max(M.minEntityWidth,Math.max(o.width+2*M.entityPadding,g+n*E)),height:r.length>0?_:Math.max(M.minEntityHeight,o.height+2*M.entityPadding)};if(r.length>0){const r=Math.max(0,(m.width-g-n*E)/(E/2));e.attr("transform","translate("+m.width/2+","+(a+o.height/2)+")");let i=o.height+2*a,s="attributeBoxOdd";c.forEach((e=>{const o=i+a+e.height/2;e.tn.attr("transform","translate("+n+","+o+")");const c=t.insert("rect","#"+e.tn.node().id).classed(`er ${s}`,!0).attr("x",0).attr("y",i).attr("width",d+2*n+r).attr("height",e.height+2*a),_=parseFloat(c.attr("x"))+parseFloat(c.attr("width"));e.nn.attr("transform","translate("+(_+n)+","+o+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${s}`,!0).attr("x",_).attr("y",i).attr("width",u+2*n+r).attr("height",e.height+2*a);let E=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(E+n)+","+o+")");const c=t.insert("rect","#"+e.kn.node().id).classed(`er ${s}`,!0).attr("x",E).attr("y",i).attr("width",y+2*n+r).attr("height",e.height+2*a);E=parseFloat(c.attr("x"))+parseFloat(c.attr("width"))}h&&(e.cn.attr("transform","translate("+(E+n)+","+o+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${s}`,"true").attr("x",E).attr("y",i).attr("width",p+2*n+r).attr("height",e.height+2*a)),i+=e.height+2*a,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"}))}else m.height=Math.max(M.minEntityHeight,_),e.attr("transform","translate("+m.width/2+","+m.height/2+")");return m}),"drawAttributes"),S=(0,i.K2)((function(t,e,r){let a;return[...e.keys()].forEach((function(n){const s=Y(n,"entity");w.set(n,s);const o=t.append("g").attr("id",s);a=void 0===a?s:a;const c="text-"+s,l=o.append("text").classed("er entityLabel",!0).attr("id",c).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",(0,i.D7)().fontFamily).style("font-size",M.fontSize+"px").text(e.get(n).alias??n),{width:h,height:d}=D(o,l,e.get(n).attributes),u=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})),a}),"drawEntities"),v=(0,i.K2)((function(t,e){e.nodes().forEach((function(r){void 0!==r&&void 0!==e.node(r)&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")}))}),"adjustEntities"),L=(0,i.K2)((function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")}),"getEdgeName"),$=(0,i.K2)((function(t,e){return t.forEach((function(t){e.setEdge(w.get(t.entityA),w.get(t.entityB),{relationship:t},L(t))})),t}),"addRelationships"),K=0,C=(0,i.K2)((function(t,e,r,a,n){K++;const o=r.edge(w.get(e.entityA),w.get(e.entityB),L(e)),c=(0,s.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.qrM),l=t.insert("path","#"+a).classed("er relationshipLine",!0).attr("d",c(o.points)).style("stroke",M.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let h="";switch(M.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+h+"#"+T.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+h+"#"+T.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+h+"#"+T.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+h+"#"+T.ERMarkers.ONLY_ONE_END+")");break;case n.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+h+"#"+T.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+h+"#"+T.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+h+"#"+T.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+h+"#"+T.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+h+"#"+T.ERMarkers.ONLY_ONE_START+")");break;case n.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+h+"#"+T.ERMarkers.MD_PARENT_START+")")}const d=l.node().getTotalLength(),u=l.node().getPointAtLength(.5*d),y="rel"+K,p=e.roleA.split(/
/g),_=t.append("text").classed("er relationshipLabel",!0).attr("id",y).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",(0,i.D7)().fontFamily).style("font-size",M.fontSize+"px");if(1==p.length)_.text(e.roleA);else{const t=.5*-(p.length-1);p.forEach(((e,r)=>{_.append("tspan").attr("x",u.x).attr("dy",`${0===r?t:1}em`).text(e)}))}const f=_.node().getBBox();t.insert("rect","#"+y).classed("er relationshipLabelBox",!0).attr("x",u.x-f.width/2).attr("y",u.y-f.height/2).attr("width",f.width).attr("height",f.height)}),"drawRelationshipFromLayout"),B=(0,i.K2)((function(t,e,r,c){M=(0,i.D7)().er,i.Rm.info("Drawing ER diagram");const l=(0,i.D7)().securityLevel;let h;"sandbox"===l&&(h=(0,s.Ltv)("#i"+e));const d=("sandbox"===l?(0,s.Ltv)(h.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id='${e}']`);let u;T.insertMarkers(d,M),u=new n.T({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:M.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const y=S(d,c.db.getEntities(),u),p=$(c.db.getRelationships(),u);(0,o.Zp)(u),v(d,u),p.forEach((function(t){C(d,t,u,y,c)}));const _=M.diagramPadding;a._K.insertTitle(d,"entityTitleText",M.titleTopMargin,c.db.getDiagramTitle());const f=d.node().getBBox(),E=f.width+2*_,g=f.height+2*_;(0,i.a$)(d,g,E,M.useMaxWidth),d.attr("viewBox",`${f.x-_} ${f.y-_} ${E} ${g}`)}),"draw"),P="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function Y(t="",e=""){const r=t.replace(A,"");return`${Z(e)}${Z(r)}${y(t,P)}`}function Z(t=""){return t.length>0?`${t}-`:""}(0,i.K2)(Y,"generateId"),(0,i.K2)(Z,"strWithHyphen");var F={parser:_,db:N,renderer:{setConf:I,draw:B},styles:(0,i.K2)((t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/670-2fb0c100.chunk.min.js b/js/670-2fb0c100.chunk.min.js new file mode 100644 index 0000000..dd7a7b8 --- /dev/null +++ b/js/670-2fb0c100.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[670],{53:(t,e,r)=>{r.d(e,{A:()=>i});var a=r(4507);const i=function(t){return(0,a.A)(t,4)}},3258:(t,e,r)=>{r.d(e,{DA:()=>p,IU:()=>dt,Jo:()=>kt,T_:()=>ut,U7:()=>st,U_:()=>lt,g0:()=>h,gh:()=>gt,jP:()=>xt,lC:()=>x,nM:()=>C,on:()=>nt});var a=r(7750),i=r(2382),n=r(5522),s=r(32),d=r(4852),l=(0,s.K2)(((t,e,r,a)=>{e.forEach((e=>{o[e](t,r,a)}))}),"insertMarkers"),o={extension:(0,s.K2)(((t,e,r)=>{s.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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")}),"extension"),composition:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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")}),"composition"),aggregation:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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")}),"aggregation"),dependency:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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")}),"dependency"),lollipop:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:(0,s.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),circle:(0,s.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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")}),"circle"),cross:(0,s.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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")}),"cross"),barb:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb")},h=l;function c(t,e){e&&t.attr("style",e)}function y(t){const e=(0,d.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),a=t.label,i=t.isNode?"nodeLabel":"edgeLabel",n=r.append("span");return n.html(a),c(n,t.labelStyle),n.attr("class",i),c(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,s.K2)(c,"applyStyle"),(0,s.K2)(y,"addHtmlLabel");var p=(0,s.K2)(((t,e,r,a)=>{let d=t||"";if("object"==typeof d&&(d=d[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels))return d=d.replace(/\\n|\n/g,"
"),s.Rm.debug("vertexText"+d),y({isNode:a,label:(0,i.hE)((0,n.Sm)(d)),labelStyle:e.replace("fill:","color:")});{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let a=[];a="string"==typeof d?d.split(/\\n|\n|/gi):Array.isArray(d)?d:[];for(const e of a){const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),r?a.setAttribute("class","title-row"):a.setAttribute("class","row"),a.textContent=e.trim(),t.appendChild(a)}return t}}),"createLabel"),g=(0,s.K2)((async(t,e,r,a)=>{const l=(0,s.D7)();let o;const h=e.useHtmlLabels||(0,s._3)(l.flowchart.htmlLabels);o=r||"node default";const c=t.insert("g").attr("class",o).attr("id",e.domId||e.id),y=c.insert("g").attr("class","label").attr("style",e.labelStyle);let g;g=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const x=y.node();let f;f="markdown"===e.labelType?(0,i.GZ)(y,(0,s.jZ)((0,n.Sm)(g),l),{useHtmlLabels:h,width:e.width||l.flowchart.wrappingWidth,classes:"markdown-node-label"},l):x.appendChild(p((0,s.jZ)((0,n.Sm)(g),l),e.labelStyle,!1,a));let u=f.getBBox();const w=e.padding/2;if((0,s._3)(l.flowchart.htmlLabels)){const t=f.children[0],e=(0,d.Ltv)(f),r=t.getElementsByTagName("img");if(r){const t=""===g.replace(/]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function a(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=l.fontSize?l.fontSize:window.getComputedStyle(document.body).fontSize,r=5,a=parseInt(t,10)*r+"px";e.style.minWidth=a,e.style.maxWidth=a}else e.style.width="100%";r(e)}(0,s.K2)(a,"setupImage"),setTimeout((()=>{e.complete&&a()})),e.addEventListener("error",a),e.addEventListener("load",a)})))))}u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return h?y.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):y.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&y.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),y.insert("rect",":first-child"),{shapeSvg:c,bbox:u,halfPadding:w,label:y}}),"labelHelper"),x=(0,s.K2)(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds");function f(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,s.K2)(f,"insertPolygonShape");var u=(0,s.K2)((t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e}),"expandAndDeduplicateDirections"),w=(0,s.K2)(((t,e,r)=>{const a=u(t),i=e.height+2*r.padding,n=i/2,s=e.width+2*n+r.padding,d=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:n,y:0},{x:s/2,y:2*d},{x:s-n,y:0},{x:s,y:0},{x:s,y:-i/3},{x:s+2*d,y:-i/2},{x:s,y:-2*i/3},{x:s,y:-i},{x:s-n,y:-i},{x:s/2,y:-i-2*d},{x:n,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*d,y:-i/2},{x:0,y:-i/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:n,y:0},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:n,y:-i},{x:s-n,y:-i},{x:s,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:s,y:-n},{x:s,y:-i+n},{x:0,y:-i}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:s,y:0},{x:0,y:-n},{x:0,y:-i+n},{x:s,y:-i}]:a.has("right")&&a.has("left")?[{x:n,y:0},{x:n,y:-d},{x:s-n,y:-d},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:s-n,y:-i+d},{x:n,y:-i+d},{x:n,y:-i},{x:0,y:-i/2}]:a.has("up")&&a.has("down")?[{x:s/2,y:0},{x:0,y:-d},{x:n,y:-d},{x:n,y:-i+d},{x:0,y:-i+d},{x:s/2,y:-i},{x:s,y:-i+d},{x:s-n,y:-i+d},{x:s-n,y:-d},{x:s,y:-d}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:s,y:-n},{x:0,y:-i}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-i}]:a.has("left")&&a.has("up")?[{x:s,y:0},{x:0,y:-n},{x:s,y:-i}]:a.has("left")&&a.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-i}]:a.has("right")?[{x:n,y:-d},{x:n,y:-d},{x:s-n,y:-d},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:s-n,y:-i+d},{x:n,y:-i+d},{x:n,y:-i+d}]:a.has("left")?[{x:n,y:0},{x:n,y:-d},{x:s-n,y:-d},{x:s-n,y:-i+d},{x:n,y:-i+d},{x:n,y:-i},{x:0,y:-i/2}]:a.has("up")?[{x:n,y:-d},{x:n,y:-i+d},{x:0,y:-i+d},{x:s/2,y:-i},{x:s,y:-i+d},{x:s-n,y:-i+d},{x:s-n,y:-d}]:a.has("down")?[{x:s/2,y:0},{x:0,y:-d},{x:n,y:-d},{x:n,y:-i+d},{x:s-n,y:-i+d},{x:s-n,y:-d},{x:s,y:-d}]:[{x:0,y:0}]}),"getArrowPoints");function b(t,e){return t.intersect(e)}(0,s.K2)(b,"intersectNode");var m=b;function k(t,e,r,a){var i=t.x,n=t.y,s=i-a.x,d=n-a.y,l=Math.sqrt(e*e*d*d+r*r*s*s),o=Math.abs(e*r*s/l);a.x0}(0,s.K2)(K,"intersectLine"),(0,s.K2)(_,"sameSign");var M=K,R=B;function B(t,e,r){var a=t.x,i=t.y,n=[],s=Number.POSITIVE_INFINITY,d=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){s=Math.min(s,t.x),d=Math.min(d,t.y)})):(s=Math.min(s,e.x),d=Math.min(d,e.y));for(var l=a-t.width/2-s,o=i-t.height/2-d,h=0;h1&&n.sort((function(t,e){var a=t.x-r.x,i=t.y-r.y,n=Math.sqrt(a*a+i*i),s=e.x-r.x,d=e.y-r.y,l=Math.sqrt(s*s+d*d);return n{var r,a,i=t.x,n=t.y,s=e.x-i,d=e.y-n,l=t.width/2,o=t.height/2;return Math.abs(d)*l>Math.abs(s)*o?(d<0&&(o=-o),r=0===d?0:o*s/d,a=o):(s<0&&(l=-l),r=l,a=0===s?0:l*d/s),{x:i+r,y:n+a}}),"intersectRect"),T={node:m,circle:S,ellipse:L,polygon:R,rect:C},E=(0,s.K2)((async(t,e)=>{e.useHtmlLabels||(0,s.D7)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:i}=await g(t,e,"node "+e.classes,!0);s.Rm.info("Classes = ",e.classes);const n=r.insert("rect",":first-child");return n.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),x(e,n),e.intersect=function(t){return T.rect(e,t)},r}),"note"),D=(0,s.K2)((t=>t?" "+t:""),"formatClass"),$=(0,s.K2)(((t,e)=>`${e||"node default"}${D(t.classes)} ${D(t.class)}`),"getClassesFromNode"),P=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),n=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];s.Rm.info("Question main (Circle)");const d=f(r,i,i,n);return d.attr("style",e.style),x(e,d),e.intersect=function(t){return s.Rm.warn("Intersect called"),T.polygon(e,n,t)},r}),"question"),N=(0,s.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return r.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return T.circle(e,14,t)},r}),"choice"),I=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.height+e.padding,n=i/4,s=a.width+2*n+e.padding,d=[{x:n,y:0},{x:s-n,y:0},{x:s,y:-i/2},{x:s-n,y:-i},{x:n,y:-i},{x:0,y:-i/2}],l=f(r,s,i,d);return l.attr("style",e.style),x(e,l),e.intersect=function(t){return T.polygon(e,d,t)},r}),"hexagon"),W=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,void 0,!0),i=a.height+2*e.padding,n=i/2,s=a.width+2*n+e.padding,d=w(e.directions,a,e),l=f(r,s,i,d);return l.attr("style",e.style),x(e,l),e.intersect=function(t){return T.polygon(e,d,t)},r}),"block_arrow"),H=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}];return f(r,i,n,s).attr("style",e.style),e.width=i+n,e.height=n,e.intersect=function(t){return T.polygon(e,s,t)},r}),"rect_left_inv_arrow"),U=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],d=f(r,i,n,s);return d.attr("style",e.style),x(e,d),e.intersect=function(t){return T.polygon(e,s,t)},r}),"lean_right"),Y=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],d=f(r,i,n,s);return d.attr("style",e.style),x(e,d),e.intersect=function(t){return T.polygon(e,s,t)},r}),"lean_left"),j=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],d=f(r,i,n,s);return d.attr("style",e.style),x(e,d),e.intersect=function(t){return T.polygon(e,s,t)},r}),"trapezoid"),X=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],d=f(r,i,n,s);return d.attr("style",e.style),x(e,d),e.intersect=function(t){return T.polygon(e,s,t)},r}),"inv_trapezoid"),A=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],d=f(r,i,n,s);return d.attr("style",e.style),x(e,d),e.intersect=function(t){return T.polygon(e,s,t)},r}),"rect_right_inv_arrow"),O=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.width+e.padding,n=i/2,s=n/(2.5+i/50),d=a.height+s+e.padding,l="M 0,"+s+" a "+n+","+s+" 0,0,0 "+i+" 0 a "+n+","+s+" 0,0,0 "+-i+" 0 l 0,"+d+" a "+n+","+s+" 0,0,0 "+i+" 0 l 0,"+-d,o=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(d/2+s)+")");return x(e,o),e.intersect=function(t){const r=T.rect(e,t),a=r.x-e.x;if(0!=n&&(Math.abs(a)e.height/2-s)){let i=s*s*(1-a*a/(n*n));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r}),"cylinder"),Z=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await g(t,e,"node "+e.classes+" "+e.class,!0),n=r.insert("rect",":first-child"),d=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,o=e.positioned?-d/2:-a.width/2-i,h=e.positioned?-l/2:-a.height/2-i;if(n.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",h).attr("width",d).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(J(n,e.props.borders,d,l),t.delete("borders")),t.forEach((t=>{s.Rm.warn(`Unknown node property ${t}`)}))}return x(e,n),e.intersect=function(t){return T.rect(e,t)},r}),"rect"),q=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await g(t,e,"node "+e.classes,!0),n=r.insert("rect",":first-child"),d=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,o=e.positioned?-d/2:-a.width/2-i,h=e.positioned?-l/2:-a.height/2-i;if(n.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",h).attr("width",d).attr("height",l),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(J(n,e.props.borders,d,l),t.delete("borders")),t.forEach((t=>{s.Rm.warn(`Unknown node property ${t}`)}))}return x(e,n),e.intersect=function(t){return T.rect(e,t)},r}),"composite"),z=(0,s.K2)((async(t,e)=>{const{shapeSvg:r}=await g(t,e,"label",!0);s.Rm.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(J(a,e.props.borders,0,0),t.delete("borders")),t.forEach((t=>{s.Rm.warn(`Unknown node property ${t}`)}))}return x(e,a),e.intersect=function(t){return T.rect(e,t)},r}),"labelRect");function J(t,e,r,a){const i=[],n=(0,s.K2)((t=>{i.push(t,0)}),"addBorder"),d=(0,s.K2)((t=>{i.push(0,t)}),"skipBorder");e.includes("t")?(s.Rm.debug("add top border"),n(r)):d(r),e.includes("r")?(s.Rm.debug("add right border"),n(a)):d(a),e.includes("b")?(s.Rm.debug("add bottom border"),n(r)):d(r),e.includes("l")?(s.Rm.debug("add left border"),n(a)):d(a),t.attr("stroke-dasharray",i.join(" "))}(0,s.K2)(J,"applyNodePropertyBorders");var V=(0,s.K2)(((t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),n=a.insert("line"),l=a.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let h="";h="object"==typeof o?o[0]:o,s.Rm.info("Label text abc79",h,o,"object"==typeof o);const c=l.node().appendChild(p(h,e.labelStyle,!0,!0));let y={width:0,height:0};if((0,s._3)((0,s.D7)().flowchart.htmlLabels)){const t=c.children[0],e=(0,d.Ltv)(c);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}s.Rm.info("Text 2",o);const g=o.slice(1,o.length);let f=c.getBBox();const u=l.node().appendChild(p(g.join?g.join("
"):g,e.labelStyle,!0,!0));if((0,s._3)((0,s.D7)().flowchart.htmlLabels)){const t=u.children[0],e=(0,d.Ltv)(u);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const w=e.padding/2;return(0,d.Ltv)(u).attr("transform","translate( "+(y.width>f.width?0:(f.width-y.width)/2)+", "+(f.height+w+5)+")"),(0,d.Ltv)(c).attr("transform","translate( "+(y.width{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.height+e.padding,n=a.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return x(e,s),e.intersect=function(t){return T.rect(e,t)},r}),"stadium"),G=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await g(t,e,$(e,void 0),!0),n=r.insert("circle",":first-child");return n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),s.Rm.info("Circle main"),x(e,n),e.intersect=function(t){return s.Rm.info("Circle intersect",e,a.width/2+i,t),T.circle(e,a.width/2+i,t)},r}),"circle"),Q=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await g(t,e,$(e,void 0),!0),n=r.insert("g",":first-child"),d=n.insert("circle"),l=n.insert("circle");return n.attr("class",e.class),d.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),s.Rm.info("DoubleCircle main"),x(e,d),e.intersect=function(t){return s.Rm.info("DoubleCircle intersect",e,a.width/2+i+5,t),T.circle(e,a.width/2+i+5,t)},r}),"doublecircle"),tt=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:a}=await g(t,e,$(e,void 0),!0),i=a.width+e.padding,n=a.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],d=f(r,i,n,s);return d.attr("style",e.style),x(e,d),e.intersect=function(t){return T.polygon(e,s,t)},r}),"subroutine"),et=(0,s.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),x(e,a),e.intersect=function(t){return T.circle(e,7,t)},r}),"start"),rt=(0,s.K2)(((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,n=10;"LR"===r&&(i=10,n=70);const s=a.append("rect").attr("x",-1*i/2).attr("y",-1*n/2).attr("width",i).attr("height",n).attr("class","fork-join");return x(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return T.rect(e,t)},a}),"forkJoin"),at={rhombus:P,composite:q,question:P,rect:Z,labelRect:z,rectWithTitle:V,choice:N,circle:G,doublecircle:Q,stadium:F,hexagon:I,block_arrow:W,rect_left_inv_arrow:H,lean_right:U,lean_left:Y,trapezoid:j,inv_trapezoid:X,rect_right_inv_arrow:A,cylinder:O,start:et,end:(0,s.K2)(((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),x(e,i),e.intersect=function(t){return T.circle(e,7,t)},r}),"end"),note:E,subroutine:tt,fork:rt,join:rt,class_box:(0,s.K2)(((t,e)=>{const r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),n=i.insert("rect",":first-child"),l=i.insert("line"),o=i.insert("line");let h=0,c=4;const y=i.insert("g").attr("class","label");let g=0;const f=e.classData.annotations?.[0],u=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",w=y.node().appendChild(p(u,e.labelStyle,!0,!0));let b=w.getBBox();if((0,s._3)((0,s.D7)().flowchart.htmlLabels)){const t=w.children[0],e=(0,d.Ltv)(w);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}e.classData.annotations[0]&&(c+=b.height+4,h+=b.width);let m=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,s.D7)().flowchart.htmlLabels?m+="<"+e.classData.type+">":m+="<"+e.classData.type+">");const k=y.node().appendChild(p(m,e.labelStyle,!0,!0));(0,d.Ltv)(k).attr("class","classTitle");let L=k.getBBox();if((0,s._3)((0,s.D7)().flowchart.htmlLabels)){const t=k.children[0],e=(0,d.Ltv)(k);L=t.getBoundingClientRect(),e.attr("width",L.width),e.attr("height",L.height)}c+=L.height+4,L.width>h&&(h=L.width);const v=[];e.classData.members.forEach((t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,s.D7)().flowchart.htmlLabels&&(a=a.replace(//g,">"));const i=y.node().appendChild(p(a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let n=i.getBBox();if((0,s._3)((0,s.D7)().flowchart.htmlLabels)){const t=i.children[0],e=(0,d.Ltv)(i);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}n.width>h&&(h=n.width),c+=n.height+4,v.push(i)})),c+=8;const S=[];if(e.classData.methods.forEach((t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,s.D7)().flowchart.htmlLabels&&(a=a.replace(//g,">"));const i=y.node().appendChild(p(a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let n=i.getBBox();if((0,s._3)((0,s.D7)().flowchart.htmlLabels)){const t=i.children[0],e=(0,d.Ltv)(i);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}n.width>h&&(h=n.width),c+=n.height+4,S.push(i)})),c+=8,f){let t=(h-b.width)/2;(0,d.Ltv)(w).attr("transform","translate( "+(-1*h/2+t)+", "+-1*c/2+")"),g=b.height+4}let K=(h-L.width)/2;return(0,d.Ltv)(k).attr("transform","translate( "+(-1*h/2+K)+", "+(-1*c/2+g)+")"),g+=L.height+4,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-c/2-r+8+g).attr("y2",-c/2-r+8+g),g+=8,v.forEach((t=>{(0,d.Ltv)(t).attr("transform","translate( "+-h/2+", "+(-1*c/2+g+4)+")");const e=t?.getBBox();g+=(e?.height??0)+4})),g+=8,o.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-c/2-r+8+g).attr("y2",-c/2-r+8+g),g+=8,S.forEach((t=>{(0,d.Ltv)(t).attr("transform","translate( "+-h/2+", "+(-1*c/2+g)+")");const e=t?.getBBox();g+=(e?.height??0)+4})),n.attr("style",e.style).attr("class","outer title-state").attr("x",-h/2-r).attr("y",-c/2-r).attr("width",h+e.padding).attr("height",c+e.padding),x(e,n),e.intersect=function(t){return T.rect(e,t)},i}),"class_box")},it={},nt=(0,s.K2)((async(t,e,r)=>{let a,i;if(e.link){let n;"sandbox"===(0,s.D7)().securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n),i=await at[e.shape](a,e,r)}else i=await at[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),it[e.id]=a,e.haveCallback&&it[e.id].attr("class",it[e.id].attr("class")+" clickable"),a}),"insertNode"),st=(0,s.K2)(((t,e)=>{it[e.id]=t}),"setNodeElem"),dt=(0,s.K2)((()=>{it={}}),"clear"),lt=(0,s.K2)((t=>{const e=it[t.id];s.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode"),ot=(0,s.K2)(((t,e,r,a,i)=>{e.arrowTypeStart&&ct(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&ct(t,"end",e.arrowTypeEnd,r,a,i)}),"addEdgeMarkers"),ht={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ct=(0,s.K2)(((t,e,r,a,i,n)=>{const d=ht[r];if(!d)return void s.Rm.warn(`Unknown arrow type: ${r}`);const l="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${i}_${n}-${d}${l})`)}),"addEdgeMarker"),yt={},pt={},gt=(0,s.K2)((()=>{yt={},pt={}}),"clear"),xt=(0,s.K2)(((t,e)=>{const r=(0,s.D7)(),a=(0,s._3)(r.flowchart.htmlLabels),n="markdown"===e.labelType?(0,i.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:!0},r):p(e.label,e.labelStyle),l=t.insert("g").attr("class","edgeLabel"),o=l.insert("g").attr("class","label");o.node().appendChild(n);let h,c=n.getBBox();if(a){const t=n.children[0],e=(0,d.Ltv)(n);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),yt[e.id]=l,e.width=c.width,e.height=c.height,e.startLabelLeft){const r=p(e.startLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),i=a.insert("g").attr("class","inner");h=i.node().appendChild(r);const n=r.getBBox();i.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),pt[e.id]||(pt[e.id]={}),pt[e.id].startLeft=a,ft(h,e.startLabelLeft)}if(e.startLabelRight){const r=p(e.startLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),i=a.insert("g").attr("class","inner");h=a.node().appendChild(r),i.node().appendChild(r);const n=r.getBBox();i.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),pt[e.id]||(pt[e.id]={}),pt[e.id].startRight=a,ft(h,e.startLabelRight)}if(e.endLabelLeft){const r=p(e.endLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),i=a.insert("g").attr("class","inner");h=i.node().appendChild(r);const n=r.getBBox();i.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),a.node().appendChild(r),pt[e.id]||(pt[e.id]={}),pt[e.id].endLeft=a,ft(h,e.endLabelLeft)}if(e.endLabelRight){const r=p(e.endLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),i=a.insert("g").attr("class","inner");h=i.node().appendChild(r);const n=r.getBBox();i.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),a.node().appendChild(r),pt[e.id]||(pt[e.id]={}),pt[e.id].endRight=a,ft(h,e.endLabelRight)}return n}),"insertEdgeLabel");function ft(t,e){(0,s.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,s.K2)(ft,"setTerminalWidth");var ut=(0,s.K2)(((t,e)=>{s.Rm.debug("Moving label abc88 ",t.id,t.label,yt[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=(0,s.D7)(),{subGraphTitleTotalMargin:d}=(0,a.O)(i);if(t.label){const a=yt[t.id];let i=t.x,l=t.y;if(r){const a=n._K.calcLabelPosition(r);s.Rm.debug("Moving label "+t.label+" from (",i,",",l,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(i=a.x,l=a.y)}a.attr("transform",`translate(${i}, ${l+d/2})`)}if(t.startLabelLeft){const e=pt[t.id].startLeft;let a=t.x,i=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){const e=pt[t.id].startRight;let a=t.x,i=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){const e=pt[t.id].endLeft;let a=t.x,i=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){const e=pt[t.id].endRight;let a=t.x,i=t.y;if(r){const e=n._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}}),"positionEdgeLabel"),wt=(0,s.K2)(((t,e)=>{const r=t.x,a=t.y,i=Math.abs(e.x-r),n=Math.abs(e.y-a),s=t.width/2,d=t.height/2;return i>=s||n>=d}),"outsideNode"),bt=(0,s.K2)(((t,e,r)=>{s.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,i=t.y,n=Math.abs(a-r.x),d=t.width/2;let l=r.xMath.abs(a-e.x)*o){let t=r.y{s.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach((t=>{if(wt(e,t)||i)a=t,i||r.push(t);else{const n=bt(e,a,t);let s=!1;r.forEach((t=>{s=s||t.x===n.x&&t.y===n.y})),r.some((t=>t.x===n.x&&t.y===n.y))||r.push(n),i=!0}})),r}),"cutPathAtIntersect"),kt=(0,s.K2)((function(t,e,r,i,n,l,o){let h=r.points;s.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let c=!1;const y=l.node(e.v);var p=l.node(e.w);p?.intersect&&y?.intersect&&(h=h.slice(1,r.points.length-1),h.unshift(y.intersect(h[0])),h.push(p.intersect(h[h.length-1]))),r.toCluster&&(s.Rm.debug("to cluster abc88",i[r.toCluster]),h=mt(r.points,i[r.toCluster].node),c=!0),r.fromCluster&&(s.Rm.debug("from cluster abc88",i[r.fromCluster]),h=mt(h.reverse(),i[r.fromCluster].node).reverse(),c=!0);const g=h.filter((t=>!Number.isNaN(t.y)));let x=d.qrM;!r.curve||"graph"!==n&&"flowchart"!==n||(x=r.curve);const{x:f,y:u}=(0,a.R)(r),w=(0,d.n8j)().x(f).y(u).curve(x);let b;switch(r.thickness){case"normal":b="edge-thickness-normal";break;case"thick":case"invisible":b="edge-thickness-thick";break;default:b=""}switch(r.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed"}const m=t.append("path").attr("d",w(g)).attr("id",r.id).attr("class"," "+b+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";((0,s.D7)().flowchart.arrowMarkerAbsolute||(0,s.D7)().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),ot(m,r,k,o,n);let L={};return c&&(L.updatedPath=h),L.originalPath=r.points,L}),"insertEdge")}}]); \ No newline at end of file diff --git a/js/593-bfe7ed66.chunk.min.js b/js/674-17bd4f73.chunk.min.js similarity index 99% rename from js/593-bfe7ed66.chunk.min.js rename to js/674-17bd4f73.chunk.min.js index d2465af..26a38b9 100644 --- a/js/593-bfe7ed66.chunk.min.js +++ b/js/674-17bd4f73.chunk.min.js @@ -1 +1 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[593],{593:(t,e,i)=>{i.d(e,{diagram:()=>v});var a=i(798),n=i(4852),s=function(){var t=(0,a.K2)((function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i}),"o"),e=[1,3],i=[1,4],n=[1,5],s=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,14],T=[1,23],m=[1,18],q=[1,19],A=[1,20],_=[1,21],b=[1,22],S=[1,24],k=[1,25],F=[1,26],P=[1,27],C=[1,28],L=[1,29],v=[1,32],I=[1,33],E=[1,34],D=[1,39],z=[1,40],w=[1,42],K=[1,44],U=[1,62],N=[1,61],R=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],B=[1,65],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],it=[1,99],at=[1,93],nt=[1,96],st=[1,94],rt=[1,95],ot=[1,97],lt=[1,98],ht=[1,102],ct=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ut={trace:(0,a.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,a.K2)((function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" ⟶ ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" ⟶ ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}}),"anonymous"),table:[{18:e,26:1,27:2,28:i,55:n,56:s,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:n,56:s,57:r},{18:e,26:9,27:2,28:i,55:n,56:s,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(o,[2,34]),{27:45,55:n,56:s,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(h,[2,45]),t(h,[2,46]),{18:[1,50]},{4:d,5:u,10:x,12:g,13:f,14:p,43:51,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:52,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:53,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:54,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:55,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:56,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,44:[1,57],47:[1,58],58:60,59:59,63:E,64:D,65:z,66:w,67:K},t(R,[2,64]),t(R,[2,66]),t(R,[2,67]),t(R,[2,70]),t(R,[2,71]),t(R,[2,72]),t(R,[2,73]),t(R,[2,74]),t(R,[2,75]),t(R,[2,76]),t(R,[2,77]),t(R,[2,78]),t(R,[2,79]),t(R,[2,80]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:64,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,21:63},t(h,[2,53],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,77],63:E,64:D,65:z,66:w,67:K}),t(h,[2,56],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,78],63:E,64:D,65:z,66:w,67:K}),t(h,[2,57],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,58],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,59],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,60],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),{45:[1,79]},{44:[1,80]},t(R,[2,65]),t(R,[2,81]),t(R,[2,82]),t(R,[2,83]),{3:82,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(h,[2,52],{58:31,43:83,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,55],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:88,23:87},t(Z,[2,24]),t(h,[2,51],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,54],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{46:[1,101]},t(h,[2,29],{10:ht}),t(ct,[2,27],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(h,[2,49],{10:ht}),t(h,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:105},t(dt,[2,26]),t(h,[2,50],{10:ht}),t(ct,[2,28],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,a.K2)((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:(0,a.K2)((function(t){var e=this,i=[0],n=[],s=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=n.pop()||x.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)((function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),(0,a.K2)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L;for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),s.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=s[s.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],s,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),s=s.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),s.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0}),"parse")},xt=function(){return{EOF:1,parseError:(0,a.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,a.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,a.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,a.K2)((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,a.K2)((function(){return this._more=!0,this}),"more"),reject:(0,a.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,a.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,a.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,a.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,a.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,a.K2)((function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1}),"test_match"),next:(0,a.K2)((function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;se[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,a.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,a.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,a.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,a.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,a.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,a.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,a.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)((function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function gt(){this.yy={}}return ut.lexer=xt,(0,a.K2)(gt,"Parser"),gt.prototype=ut,ut.Parser=gt,new gt}();s.parser=s;var r=s,o=(0,a.P$)(),l=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,a.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:o.quadrant1Fill,quadrant2Fill:o.quadrant2Fill,quadrant3Fill:o.quadrant3Fill,quadrant4Fill:o.quadrant4Fill,quadrant1TextFill:o.quadrant1TextFill,quadrant2TextFill:o.quadrant2TextFill,quadrant3TextFill:o.quadrant3TextFill,quadrant4TextFill:o.quadrant4TextFill,quadrantPointFill:o.quadrantPointFill,quadrantPointTextFill:o.quadrantPointTextFill,quadrantXAxisTextFill:o.quadrantXAxisTextFill,quadrantYAxisTextFill:o.quadrantYAxisTextFill,quadrantTitleFill:o.quadrantTitleFill,quadrantInternalBorderStrokeFill:o.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:o.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,a.Rm.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){a.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){a.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const t of r)t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:s,quadrantWidth:r}=e,o=(0,n.m4Y)().domain([0,1]).range([a,r+a]),l=(0,n.m4Y)().domain([0,1]).range([i+s,s]);return this.data.points.map((t=>{const e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}}))}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},h=class extends Error{static{(0,a.K2)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function c(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function d(t){return!/^\d+$/.test(t)}function u(t){return!/^\d+px$/.test(t)}(0,a.K2)(c,"validateHexCode"),(0,a.K2)(d,"validateNumber"),(0,a.K2)(u,"validateSizeInPixels");var x=(0,a.D7)();function g(t){return(0,a.jZ)(t.trim(),x)}(0,a.K2)(g,"textSanitizer");var f=new l;function p(t){f.setData({quadrant1Text:g(t.text)})}function y(t){f.setData({quadrant2Text:g(t.text)})}function T(t){f.setData({quadrant3Text:g(t.text)})}function m(t){f.setData({quadrant4Text:g(t.text)})}function q(t){f.setData({xAxisLeftText:g(t.text)})}function A(t){f.setData({xAxisRightText:g(t.text)})}function _(t){f.setData({yAxisTopText:g(t.text)})}function b(t){f.setData({yAxisBottomText:g(t.text)})}function S(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(d(a))throw new h(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(c(a))throw new h(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(c(a))throw new h(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(u(a))throw new h(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function k(t,e,i,a,n){const s=S(n);f.addPoints([{x:i,y:a,text:g(t.text),className:e,...s}])}function F(t,e){f.addClass(t,S(e))}function P(t){f.setConfig({chartWidth:t})}function C(t){f.setConfig({chartHeight:t})}function L(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&f.setConfig(i),f.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),f.setData({titleText:(0,a.ab)()}),f.build()}(0,a.K2)(p,"setQuadrant1Text"),(0,a.K2)(y,"setQuadrant2Text"),(0,a.K2)(T,"setQuadrant3Text"),(0,a.K2)(m,"setQuadrant4Text"),(0,a.K2)(q,"setXAxisLeftText"),(0,a.K2)(A,"setXAxisRightText"),(0,a.K2)(_,"setYAxisTopText"),(0,a.K2)(b,"setYAxisBottomText"),(0,a.K2)(S,"parseStyles"),(0,a.K2)(k,"addPoint"),(0,a.K2)(F,"addClass"),(0,a.K2)(P,"setWidth"),(0,a.K2)(C,"setHeight"),(0,a.K2)(L,"getQuadrantData");var v={parser:r,db:{setWidth:P,setHeight:C,setQuadrant1Text:p,setQuadrant2Text:y,setQuadrant3Text:T,setQuadrant4Text:m,setXAxisLeftText:q,setXAxisRightText:A,setYAxisTopText:_,setYAxisBottomText:b,parseStyles:S,addPoint:k,addClass:F,getQuadrantData:L,clear:(0,a.K2)((function(){f.clear(),(0,a.IU)()}),"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,a.K2)(((t,e,i,s)=>{function r(t){return"top"===t?"hanging":"middle"}function o(t){return"left"===t?"start":"middle"}function l(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,a.K2)(r,"getDominantBaseLine"),(0,a.K2)(o,"getTextAnchor"),(0,a.K2)(l,"getTransformation");const h=(0,a.D7)();a.Rm.debug("Rendering quadrant chart\n"+t);const c=h.securityLevel;let d;"sandbox"===c&&(d=(0,n.Ltv)("#i"+e));const u=("sandbox"===c?(0,n.Ltv)(d.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${e}"]`),x=u.append("g").attr("class","main"),g=h.quadrantChart?.chartWidth??500,f=h.quadrantChart?.chartHeight??500;(0,a.a$)(u,f,g,h.quadrantChart?.useMaxWidth??!0),u.attr("viewBox","0 0 "+g+" "+f),s.db.setHeight(f),s.db.setWidth(g);const p=s.db.getQuadrantData(),y=x.append("g").attr("class","quadrants"),T=x.append("g").attr("class","border"),m=x.append("g").attr("class","data-points"),q=x.append("g").attr("class","labels"),A=x.append("g").attr("class","title");p.title&&A.append("text").attr("x",0).attr("y",0).attr("fill",p.title.fill).attr("font-size",p.title.fontSize).attr("dominant-baseline",r(p.title.horizontalPos)).attr("text-anchor",o(p.title.verticalPos)).attr("transform",l(p.title)).text(p.title.text),p.borderLines&&T.selectAll("line").data(p.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const _=y.selectAll("g.quadrant").data(p.quadrants).enter().append("g").attr("class","quadrant");_.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),_.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>r(t.text.horizontalPos))).attr("text-anchor",(t=>o(t.text.verticalPos))).attr("transform",(t=>l(t.text))).text((t=>t.text.text)),q.selectAll("g.label").data(p.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>r(t.horizontalPos))).attr("text-anchor",(t=>o(t.verticalPos))).attr("transform",(t=>l(t)));const b=m.selectAll("g.data-point").data(p.points).enter().append("g").attr("class","data-point");b.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeColor)).attr("stroke-width",(t=>t.strokeWidth)),b.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>r(t.text.horizontalPos))).attr("text-anchor",(t=>o(t.text.verticalPos))).attr("transform",(t=>l(t.text)))}),"draw")},styles:(0,a.K2)((()=>""),"styles")}}}]); \ No newline at end of file +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[674],{7674:(t,e,i)=>{i.d(e,{diagram:()=>v});var a=i(32),n=i(4852),s=function(){var t=(0,a.K2)((function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i}),"o"),e=[1,3],i=[1,4],n=[1,5],s=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,14],T=[1,23],m=[1,18],q=[1,19],A=[1,20],_=[1,21],b=[1,22],S=[1,24],k=[1,25],F=[1,26],P=[1,27],C=[1,28],L=[1,29],v=[1,32],I=[1,33],E=[1,34],D=[1,39],z=[1,40],w=[1,42],K=[1,44],U=[1,62],N=[1,61],R=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],B=[1,65],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],it=[1,99],at=[1,93],nt=[1,96],st=[1,94],rt=[1,95],ot=[1,97],lt=[1,98],ht=[1,102],ct=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ut={trace:(0,a.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,a.K2)((function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" ⟶ ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" ⟶ ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}}),"anonymous"),table:[{18:e,26:1,27:2,28:i,55:n,56:s,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:n,56:s,57:r},{18:e,26:9,27:2,28:i,55:n,56:s,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(o,[2,34]),{27:45,55:n,56:s,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(h,[2,45]),t(h,[2,46]),{18:[1,50]},{4:d,5:u,10:x,12:g,13:f,14:p,43:51,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:52,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:53,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:54,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:55,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:56,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,44:[1,57],47:[1,58],58:60,59:59,63:E,64:D,65:z,66:w,67:K},t(R,[2,64]),t(R,[2,66]),t(R,[2,67]),t(R,[2,70]),t(R,[2,71]),t(R,[2,72]),t(R,[2,73]),t(R,[2,74]),t(R,[2,75]),t(R,[2,76]),t(R,[2,77]),t(R,[2,78]),t(R,[2,79]),t(R,[2,80]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:64,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,21:63},t(h,[2,53],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,77],63:E,64:D,65:z,66:w,67:K}),t(h,[2,56],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,78],63:E,64:D,65:z,66:w,67:K}),t(h,[2,57],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,58],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,59],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,60],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),{45:[1,79]},{44:[1,80]},t(R,[2,65]),t(R,[2,81]),t(R,[2,82]),t(R,[2,83]),{3:82,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(h,[2,52],{58:31,43:83,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,55],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:88,23:87},t(Z,[2,24]),t(h,[2,51],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,54],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{46:[1,101]},t(h,[2,29],{10:ht}),t(ct,[2,27],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(h,[2,49],{10:ht}),t(h,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:105},t(dt,[2,26]),t(h,[2,50],{10:ht}),t(ct,[2,28],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,a.K2)((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:(0,a.K2)((function(t){var e=this,i=[0],n=[],s=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=n.pop()||x.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)((function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),(0,a.K2)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L;for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),s.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=s[s.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],s,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),s=s.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),s.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0}),"parse")},xt=function(){return{EOF:1,parseError:(0,a.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,a.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,a.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,a.K2)((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,a.K2)((function(){return this._more=!0,this}),"more"),reject:(0,a.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,a.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,a.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,a.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,a.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,a.K2)((function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1}),"test_match"),next:(0,a.K2)((function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;se[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,a.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,a.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,a.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,a.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,a.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,a.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,a.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)((function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function gt(){this.yy={}}return ut.lexer=xt,(0,a.K2)(gt,"Parser"),gt.prototype=ut,ut.Parser=gt,new gt}();s.parser=s;var r=s,o=(0,a.P$)(),l=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,a.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:o.quadrant1Fill,quadrant2Fill:o.quadrant2Fill,quadrant3Fill:o.quadrant3Fill,quadrant4Fill:o.quadrant4Fill,quadrant1TextFill:o.quadrant1TextFill,quadrant2TextFill:o.quadrant2TextFill,quadrant3TextFill:o.quadrant3TextFill,quadrant4TextFill:o.quadrant4TextFill,quadrantPointFill:o.quadrantPointFill,quadrantPointTextFill:o.quadrantPointTextFill,quadrantXAxisTextFill:o.quadrantXAxisTextFill,quadrantYAxisTextFill:o.quadrantYAxisTextFill,quadrantTitleFill:o.quadrantTitleFill,quadrantInternalBorderStrokeFill:o.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:o.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,a.Rm.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){a.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){a.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const t of r)t.text.x=t.x+t.width/2,0===this.data.points.length?(t.text.y=t.y+t.height/2,t.text.horizontalPos="middle"):(t.text.y=t.y+this.config.quadrantTextTopPadding,t.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:s,quadrantWidth:r}=e,o=(0,n.m4Y)().domain([0,1]).range([a,r+a]),l=(0,n.m4Y)().domain([0,1]).range([i+s,s]);return this.data.points.map((t=>{const e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}}))}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},h=class extends Error{static{(0,a.K2)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function c(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function d(t){return!/^\d+$/.test(t)}function u(t){return!/^\d+px$/.test(t)}(0,a.K2)(c,"validateHexCode"),(0,a.K2)(d,"validateNumber"),(0,a.K2)(u,"validateSizeInPixels");var x=(0,a.D7)();function g(t){return(0,a.jZ)(t.trim(),x)}(0,a.K2)(g,"textSanitizer");var f=new l;function p(t){f.setData({quadrant1Text:g(t.text)})}function y(t){f.setData({quadrant2Text:g(t.text)})}function T(t){f.setData({quadrant3Text:g(t.text)})}function m(t){f.setData({quadrant4Text:g(t.text)})}function q(t){f.setData({xAxisLeftText:g(t.text)})}function A(t){f.setData({xAxisRightText:g(t.text)})}function _(t){f.setData({yAxisTopText:g(t.text)})}function b(t){f.setData({yAxisBottomText:g(t.text)})}function S(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(d(a))throw new h(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(c(a))throw new h(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(c(a))throw new h(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(u(a))throw new h(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function k(t,e,i,a,n){const s=S(n);f.addPoints([{x:i,y:a,text:g(t.text),className:e,...s}])}function F(t,e){f.addClass(t,S(e))}function P(t){f.setConfig({chartWidth:t})}function C(t){f.setConfig({chartHeight:t})}function L(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&f.setConfig(i),f.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),f.setData({titleText:(0,a.ab)()}),f.build()}(0,a.K2)(p,"setQuadrant1Text"),(0,a.K2)(y,"setQuadrant2Text"),(0,a.K2)(T,"setQuadrant3Text"),(0,a.K2)(m,"setQuadrant4Text"),(0,a.K2)(q,"setXAxisLeftText"),(0,a.K2)(A,"setXAxisRightText"),(0,a.K2)(_,"setYAxisTopText"),(0,a.K2)(b,"setYAxisBottomText"),(0,a.K2)(S,"parseStyles"),(0,a.K2)(k,"addPoint"),(0,a.K2)(F,"addClass"),(0,a.K2)(P,"setWidth"),(0,a.K2)(C,"setHeight"),(0,a.K2)(L,"getQuadrantData");var v={parser:r,db:{setWidth:P,setHeight:C,setQuadrant1Text:p,setQuadrant2Text:y,setQuadrant3Text:T,setQuadrant4Text:m,setXAxisLeftText:q,setXAxisRightText:A,setYAxisTopText:_,setYAxisBottomText:b,parseStyles:S,addPoint:k,addClass:F,getQuadrantData:L,clear:(0,a.K2)((function(){f.clear(),(0,a.IU)()}),"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,a.K2)(((t,e,i,s)=>{function r(t){return"top"===t?"hanging":"middle"}function o(t){return"left"===t?"start":"middle"}function l(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,a.K2)(r,"getDominantBaseLine"),(0,a.K2)(o,"getTextAnchor"),(0,a.K2)(l,"getTransformation");const h=(0,a.D7)();a.Rm.debug("Rendering quadrant chart\n"+t);const c=h.securityLevel;let d;"sandbox"===c&&(d=(0,n.Ltv)("#i"+e));const u=("sandbox"===c?(0,n.Ltv)(d.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${e}"]`),x=u.append("g").attr("class","main"),g=h.quadrantChart?.chartWidth??500,f=h.quadrantChart?.chartHeight??500;(0,a.a$)(u,f,g,h.quadrantChart?.useMaxWidth??!0),u.attr("viewBox","0 0 "+g+" "+f),s.db.setHeight(f),s.db.setWidth(g);const p=s.db.getQuadrantData(),y=x.append("g").attr("class","quadrants"),T=x.append("g").attr("class","border"),m=x.append("g").attr("class","data-points"),q=x.append("g").attr("class","labels"),A=x.append("g").attr("class","title");p.title&&A.append("text").attr("x",0).attr("y",0).attr("fill",p.title.fill).attr("font-size",p.title.fontSize).attr("dominant-baseline",r(p.title.horizontalPos)).attr("text-anchor",o(p.title.verticalPos)).attr("transform",l(p.title)).text(p.title.text),p.borderLines&&T.selectAll("line").data(p.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const _=y.selectAll("g.quadrant").data(p.quadrants).enter().append("g").attr("class","quadrant");_.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),_.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>r(t.text.horizontalPos))).attr("text-anchor",(t=>o(t.text.verticalPos))).attr("transform",(t=>l(t.text))).text((t=>t.text.text)),q.selectAll("g.label").data(p.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>r(t.horizontalPos))).attr("text-anchor",(t=>o(t.verticalPos))).attr("transform",(t=>l(t)));const b=m.selectAll("g.data-point").data(p.points).enter().append("g").attr("class","data-point");b.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeColor)).attr("stroke-width",(t=>t.strokeWidth)),b.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>r(t.text.horizontalPos))).attr("text-anchor",(t=>o(t.text.verticalPos))).attr("transform",(t=>l(t.text)))}),"draw")},styles:(0,a.K2)((()=>""),"styles")}}}]); \ No newline at end of file diff --git a/js/70-826e03f2.chunk.min.js b/js/70-826e03f2.chunk.min.js new file mode 100644 index 0000000..a58482b --- /dev/null +++ b/js/70-826e03f2.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[70],{1471:(e,t,s)=>{s.d(t,{T:()=>L});var i=s(9622),n=s(9142),r=s(9610),o=s(5041),a=s(4092),l=s(6401),c=s(8058),h=s(9592),d=s(7671),u=s(4326),g=s(7371),p=s(3533);const y=(0,u.A)((function(e){return(0,g.A)((0,d.A)(e,1,p.A,!0))}));var b=s(2866),_=s(3130),f="\0",m="\0",x="";class L{constructor(e={}){this._isDirected=!i.A(e,"directed")||e.directed,this._isMultigraph=!!i.A(e,"multigraph")&&e.multigraph,this._isCompound=!!i.A(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=n.A(void 0),this._defaultEdgeLabelFn=n.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[m]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return r.A(e)||(e=n.A(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return o.A(this._nodes)}sources(){var e=this;return a.A(this.nodes(),(function(t){return l.A(e._in[t])}))}sinks(){var e=this;return a.A(this.nodes(),(function(t){return l.A(e._out[t])}))}setNodes(e,t){var s=arguments,i=this;return c.A(e,(function(e){s.length>1?i.setNode(e,t):i.setNode(e)})),this}setNode(e,t){return i.A(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=m,this._children[e]={},this._children[m][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return i.A(this._nodes,e)}removeNode(e){var t=this;if(i.A(this._nodes,e)){var s=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],c.A(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),c.A(o.A(this._in[e]),s),delete this._in[e],delete this._preds[e],c.A(o.A(this._out[e]),s),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h.A(t))t=m;else{for(var s=t+="";!h.A(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==m)return t}}children(e){if(h.A(e)&&(e=m),this._isCompound){var t=this._children[e];if(t)return o.A(t)}else{if(e===m)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return o.A(t)}successors(e){var t=this._sucs[e];if(t)return o.A(t)}neighbors(e){var t=this.predecessors(e);if(t)return y(t,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;c.A(this._nodes,(function(s,i){e(i)&&t.setNode(i,s)})),c.A(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,s.edge(e))}));var i={};function n(e){var r=s.parent(e);return void 0===r||t.hasNode(r)?(i[e]=r,r):r in i?i[r]:n(r)}return this._isCompound&&c.A(t.nodes(),(function(e){t.setParent(e,n(e))})),t}setDefaultEdgeLabel(e){return r.A(e)||(e=n.A(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return b.A(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return _.A(e,(function(e,n){return i.length>1?s.setEdge(e,n,t):s.setEdge(e,n),n})),this}setEdge(){var e,t,s,n,r=!1,o=arguments[0];"object"==typeof o&&null!==o&&"v"in o?(e=o.v,t=o.w,s=o.name,2===arguments.length&&(n=arguments[1],r=!0)):(e=o,t=arguments[1],s=arguments[3],arguments.length>2&&(n=arguments[2],r=!0)),e=""+e,t=""+t,h.A(s)||(s=""+s);var a=E(this._isDirected,e,t,s);if(i.A(this._edgeLabels,a))return r&&(this._edgeLabels[a]=n),this;if(!h.A(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=r?n:this._defaultEdgeLabelFn(e,t,s);var l=function(e,t,s,i){var n=""+t,r=""+s;if(!e&&n>r){var o=n;n=r,r=o}var a={v:n,w:r};return i&&(a.name=i),a}(this._isDirected,e,t,s);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[a]=l,S(this._preds[t],e),S(this._sucs[e],t),this._in[t][a]=l,this._out[e][a]=l,this._edgeCount++,this}edge(e,t,s){var i=1===arguments.length?w(this._isDirected,arguments[0]):E(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var n=1===arguments.length?w(this._isDirected,arguments[0]):E(this._isDirected,e,t,s);return i.A(this._edgeLabels,n)}removeEdge(e,t,s){var i=1===arguments.length?w(this._isDirected,arguments[0]):E(this._isDirected,e,t,s),n=this._edgeObjs[i];return n&&(e=n.v,t=n.w,delete this._edgeLabels[i],delete this._edgeObjs[i],k(this._preds[t],e),k(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=b.A(s);return t?a.A(i,(function(e){return e.v===t})):i}}outEdges(e,t){var s=this._out[e];if(s){var i=b.A(s);return t?a.A(i,(function(e){return e.w===t})):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}function S(e,t){e[t]?e[t]++:e[t]=1}function k(e,t){--e[t]||delete e[t]}function E(e,t,s,i){var n=""+t,r=""+s;if(!e&&n>r){var o=n;n=r,r=o}return n+x+r+x+(h.A(i)?f:i)}function w(e,t){return E(e,t.v,t.w,t.name)}L.prototype._nodeCount=0,L.prototype._edgeCount=0},697:(e,t,s)=>{s.d(t,{T:()=>i.T});var i=s(1471)},5937:(e,t,s)=>{s.d(t,{A:()=>r});var i=s(6309),n=s(1931);const r=(e,t)=>i.A.lang.round(n.A.parse(e)[t])},4070:(e,t,s)=>{s.d(t,{diagram:()=>oe});var i=s(3258),n=(s(7750),s(2382),s(5522)),r=s(32),o=s(53),a=s(5937),l=s(5582),c=s(4852),h=s(697),d=function(){var e=(0,r.K2)((function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s}),"o"),t=[1,7],s=[1,13],i=[1,14],n=[1,15],o=[1,19],a=[1,16],l=[1,17],c=[1,18],h=[8,30],d=[8,21,28,29,30,31,32,40,44,47],u=[1,23],g=[1,24],p=[8,15,16,21,28,29,30,31,32,40,44,47],y=[8,15,16,21,27,28,29,30,31,32,40,44,47],b=[1,49],_={trace:(0,r.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,r.K2)((function(e,t,s,i,n,r,o){var a=r.length-1;switch(n){case 4:i.getLogger().debug("Rule: separator (NL) ");break;case 5:i.getLogger().debug("Rule: separator (Space) ");break;case 6:i.getLogger().debug("Rule: separator (EOF) ");break;case 7:i.getLogger().debug("Rule: hierarchy: ",r[a-1]),i.setHierarchy(r[a-1]);break;case 8:i.getLogger().debug("Stop NL ");break;case 9:i.getLogger().debug("Stop EOF ");break;case 10:i.getLogger().debug("Stop NL2 ");break;case 11:i.getLogger().debug("Stop EOF2 ");break;case 12:i.getLogger().debug("Rule: statement: ",r[a]),"number"==typeof r[a].length?this.$=r[a]:this.$=[r[a]];break;case 13:i.getLogger().debug("Rule: statement #2: ",r[a-1]),this.$=[r[a-1]].concat(r[a]);break;case 14:i.getLogger().debug("Rule: link: ",r[a],e),this.$={edgeTypeStr:r[a],label:""};break;case 15:i.getLogger().debug("Rule: LABEL link: ",r[a-3],r[a-1],r[a]),this.$={edgeTypeStr:r[a],label:r[a-1]};break;case 18:const t=parseInt(r[a]),s=i.generateId();this.$={id:s,type:"space",label:"",width:t,children:[]};break;case 23:i.getLogger().debug("Rule: (nodeStatement link node) ",r[a-2],r[a-1],r[a]," typestr: ",r[a-1].edgeTypeStr);const n=i.edgeStrToEdgeData(r[a-1].edgeTypeStr);this.$=[{id:r[a-2].id,label:r[a-2].label,type:r[a-2].type,directions:r[a-2].directions},{id:r[a-2].id+"-"+r[a].id,start:r[a-2].id,end:r[a].id,label:r[a-1].label,type:"edge",directions:r[a].directions,arrowTypeEnd:n,arrowTypeStart:"arrow_open"},{id:r[a].id,label:r[a].label,type:i.typeStr2Type(r[a].typeStr),directions:r[a].directions}];break;case 24:i.getLogger().debug("Rule: nodeStatement (abc88 node size) ",r[a-1],r[a]),this.$={id:r[a-1].id,label:r[a-1].label,type:i.typeStr2Type(r[a-1].typeStr),directions:r[a-1].directions,widthInColumns:parseInt(r[a],10)};break;case 25:i.getLogger().debug("Rule: nodeStatement (node) ",r[a]),this.$={id:r[a].id,label:r[a].label,type:i.typeStr2Type(r[a].typeStr),directions:r[a].directions,widthInColumns:1};break;case 26:i.getLogger().debug("APA123",this?this:"na"),i.getLogger().debug("COLUMNS: ",r[a]),this.$={type:"column-setting",columns:"auto"===r[a]?-1:parseInt(r[a])};break;case 27:i.getLogger().debug("Rule: id-block statement : ",r[a-2],r[a-1]),i.generateId(),this.$={...r[a-2],type:"composite",children:r[a-1]};break;case 28:i.getLogger().debug("Rule: blockStatement : ",r[a-2],r[a-1],r[a]);const o=i.generateId();this.$={id:o,type:"composite",label:"",children:r[a-1]};break;case 29:i.getLogger().debug("Rule: node (NODE_ID separator): ",r[a]),this.$={id:r[a]};break;case 30:i.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",r[a-1],r[a]),this.$={id:r[a-1],label:r[a].label,typeStr:r[a].typeStr,directions:r[a].directions};break;case 31:i.getLogger().debug("Rule: dirList: ",r[a]),this.$=[r[a]];break;case 32:i.getLogger().debug("Rule: dirList: ",r[a-1],r[a]),this.$=[r[a-1]].concat(r[a]);break;case 33:i.getLogger().debug("Rule: nodeShapeNLabel: ",r[a-2],r[a-1],r[a]),this.$={typeStr:r[a-2]+r[a],label:r[a-1]};break;case 34:i.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",r[a-3],r[a-2]," #3:",r[a-1],r[a]),this.$={typeStr:r[a-3]+r[a],label:r[a-2],directions:r[a-1]};break;case 35:case 36:this.$={type:"classDef",id:r[a-1].trim(),css:r[a].trim()};break;case 37:this.$={type:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:this.$={type:"applyStyles",id:r[a-1].trim(),stylesStr:r[a].trim()}}}),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,32:o,40:a,44:l,47:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:t,28:s,29:i,31:n,32:o,40:a,44:l,47:c}),e(d,[2,16],{14:22,15:u,16:g}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(p,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,32:o},{11:27,13:4,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,32:o,40:a,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(y,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:o},{32:[2,14]},{17:[1,36]},e(p,[2,24]),{11:37,13:4,14:22,15:u,16:g,19:5,20:6,21:t,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:n,32:o,40:a,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(y,[2,30]),{18:[1,43]},{18:[1,44]},e(p,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{37:[1,47]},{34:48,35:b},{15:[1,50]},e(d,[2,27]),e(y,[2,33]),{39:[1,51]},{34:52,35:b,39:[2,31]},{32:[2,15]},e(y,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,r.K2)((function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)}),"parseError"),parse:(0,r.K2)((function(e){var t=this,s=[0],i=[],n=[null],o=[],a=this.table,l="",c=0,h=0,d=0,u=o.slice.call(arguments,1),g=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);g.setInput(e,p.yy),p.yy.lexer=g,p.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var b=g.yylloc;o.push(b);var _=g.options&&g.options.ranges;function f(){var e;return"number"!=typeof(e=i.pop()||g.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)((function(e){s.length=s.length-2*e,n.length=n.length-e,o.length=o.length-e}),"popStack"),(0,r.K2)(f,"lex");for(var m,x,L,S,k,E,w,D,A,N={};;){if(L=s[s.length-1],this.defaultActions[L]?S=this.defaultActions[L]:(null==m&&(m=f()),S=a[L]&&a[L][m]),void 0===S||!S.length||!S[0]){var v;for(E in A=[],a[L])this.terminals_[E]&&E>2&&A.push("'"+this.terminals_[E]+"'");v=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(v,{text:g.match,token:this.terminals_[m]||m,line:g.yylineno,loc:b,expected:A})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+m);switch(S[0]){case 1:s.push(m),n.push(g.yytext),o.push(g.yylloc),s.push(S[1]),m=null,x?(m=x,x=null):(h=g.yyleng,l=g.yytext,c=g.yylineno,b=g.yylloc,d>0&&d--);break;case 2:if(w=this.productions_[S[1]][1],N.$=n[n.length-w],N._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column},_&&(N._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]),void 0!==(k=this.performAction.apply(N,[l,h,c,p.yy,S[1],n,o].concat(u))))return k;w&&(s=s.slice(0,-1*w*2),n=n.slice(0,-1*w),o=o.slice(0,-1*w)),s.push(this.productions_[S[1]][0]),n.push(N.$),o.push(N._$),D=a[s[s.length-2]][s[s.length-1]],s.push(D);break;case 3:return!0}}return!0}),"parse")},f=function(){return{EOF:1,parseError:(0,r.K2)((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:(0,r.K2)((function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,r.K2)((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:(0,r.K2)((function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,r.K2)((function(){return this._more=!0,this}),"more"),reject:(0,r.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,r.K2)((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:(0,r.K2)((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,r.K2)((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,r.K2)((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:(0,r.K2)((function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:(0,r.K2)((function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;rt[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,r.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,r.K2)((function(e){this.conditionStack.push(e)}),"begin"),popState:(0,r.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,r.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,r.K2)((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:(0,r.K2)((function(e){this.begin(e)}),"pushState"),stateStackSize:(0,r.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,r.K2)((function(e,t,s,i){switch(s){case 0:return 10;case 1:return e.getLogger().debug("Found space-block"),31;case 2:return e.getLogger().debug("Found nl-block"),31;case 3:return e.getLogger().debug("Found space-block"),29;case 4:e.getLogger().debug(".",t.yytext);break;case 5:e.getLogger().debug("_",t.yytext);break;case 6:return 5;case 7:return t.yytext=-1,28;case 8:return t.yytext=t.yytext.replace(/columns\s+/,""),e.getLogger().debug("COLUMNS (LEX)",t.yytext),28;case 9:case 77:case 78:case 100:this.pushState("md_string");break;case 10:return"MD_STR";case 11:case 35:case 80:this.popState();break;case 12:this.pushState("string");break;case 13:e.getLogger().debug("LEX: POPPING STR:",t.yytext),this.popState();break;case 14:return e.getLogger().debug("LEX: STR end:",t.yytext),"STR";case 15:return t.yytext=t.yytext.replace(/space\:/,""),e.getLogger().debug("SPACE NUM (LEX)",t.yytext),21;case 16:return t.yytext="1",e.getLogger().debug("COLUMNS (LEX)",t.yytext),21;case 17:return 43;case 18:return"LINKSTYLE";case 19:return"INTERPOLATE";case 20:return this.pushState("CLASSDEF"),40;case 21:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 22:return this.popState(),this.pushState("CLASSDEFID"),41;case 23:return this.popState(),42;case 24:return this.pushState("CLASS"),44;case 25:return this.popState(),this.pushState("CLASS_STYLE"),45;case 26:return this.popState(),46;case 27:return this.pushState("STYLE_STMNT"),47;case 28:return this.popState(),this.pushState("STYLE_DEFINITION"),48;case 29:return this.popState(),49;case 30:return this.pushState("acc_title"),"acc_title";case 31:return this.popState(),"acc_title_value";case 32:return this.pushState("acc_descr"),"acc_descr";case 33:return this.popState(),"acc_descr_value";case 34:this.pushState("acc_descr_multiline");break;case 36:return"acc_descr_multiline_value";case 37:return 30;case 38:case 39:case 41:case 42:case 45:return this.popState(),e.getLogger().debug("Lex: (("),"NODE_DEND";case 40:return this.popState(),e.getLogger().debug("Lex: ))"),"NODE_DEND";case 43:return this.popState(),e.getLogger().debug("Lex: (-"),"NODE_DEND";case 44:return this.popState(),e.getLogger().debug("Lex: -)"),"NODE_DEND";case 46:return this.popState(),e.getLogger().debug("Lex: ]]"),"NODE_DEND";case 47:return this.popState(),e.getLogger().debug("Lex: ("),"NODE_DEND";case 48:return this.popState(),e.getLogger().debug("Lex: ])"),"NODE_DEND";case 49:case 50:return this.popState(),e.getLogger().debug("Lex: /]"),"NODE_DEND";case 51:return this.popState(),e.getLogger().debug("Lex: )]"),"NODE_DEND";case 52:return this.popState(),e.getLogger().debug("Lex: )"),"NODE_DEND";case 53:return this.popState(),e.getLogger().debug("Lex: ]>"),"NODE_DEND";case 54:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:case 60:case 61:case 62:case 65:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 63:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),38;case 75:return e.getLogger().debug("Lex: NODE_ID",t.yytext),32;case 76:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 79:return"NODE_DESCR";case 81:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 84:e.getLogger().debug("LEX POPPING"),this.popState();break;case 85:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 91:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 92:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 94:case 95:case 96:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 97:case 98:case 99:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 101:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 103:case 104:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 105:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}}),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}}}();function m(){this.yy={}}return _.lexer=f,(0,r.K2)(m,"Parser"),m.prototype=_,_.Parser=m,new m}();d.parser=d;var u=d,g=new Map,p=[],y=new Map,b="color",_="fill",f=(0,r.D7)(),m=new Map,x=(0,r.K2)((e=>r.Y2.sanitizeText(e,f)),"sanitizeText"),L=(0,r.K2)((function(e,t=""){let s=m.get(e);s||(s={id:e,styles:[],textStyles:[]},m.set(e,s)),null!=t&&t.split(",").forEach((e=>{const t=e.replace(/([^;]*);/,"$1").trim();if(RegExp(b).exec(e)){const e=t.replace(_,"bgFill").replace(b,_);s.textStyles.push(e)}s.styles.push(t)}))}),"addStyleClass"),S=(0,r.K2)((function(e,t=""){const s=g.get(e);null!=t&&(s.styles=t.split(","))}),"addStyle2Node"),k=(0,r.K2)((function(e,t){e.split(",").forEach((function(e){let s=g.get(e);if(void 0===s){const t=e.trim();s={id:t,type:"na",children:[]},g.set(t,s)}s.classes||(s.classes=[]),s.classes.push(t)}))}),"setCssClass"),E=(0,r.K2)(((e,t)=>{const s=e.flat(),i=[];for(const e of s)if(e.label&&(e.label=x(e.label)),"classDef"!==e.type)if("applyClass"!==e.type)if("applyStyles"!==e.type)if("column-setting"===e.type)t.columns=e.columns??-1;else if("edge"===e.type){const t=(y.get(e.id)??0)+1;y.set(e.id,t),e.id=t+"-"+e.id,p.push(e)}else{e.label||("composite"===e.type?e.label="":e.label=e.id);const t=g.get(e.id);if(void 0===t?g.set(e.id,e):("na"!==e.type&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&E(e.children,e),"space"===e.type){const t=e.width??1;for(let s=0;s{r.Rm.debug("Clear called"),(0,r.IU)(),D={id:"root",type:"composite",children:[],columns:-1},g=new Map([["root",D]]),w=[],m=new Map,p=[],y=new Map}),"clear");function N(e){switch(r.Rm.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return r.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function v(e){return r.Rm.debug("typeStr2Type",e),"=="===e?"thick":"normal"}function C(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}(0,r.K2)(N,"typeStr2Type"),(0,r.K2)(v,"edgeTypeStr2Type"),(0,r.K2)(C,"edgeStrToEdgeData");var $=0,T=(0,r.K2)((()=>($++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$)),"generateId"),R=(0,r.K2)((e=>{D.children=e,E(e,D),w=D.children}),"setHierarchy"),I=(0,r.K2)((e=>{const t=g.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1}),"getColumns"),z=(0,r.K2)((()=>[...g.values()]),"getBlocksFlat"),O=(0,r.K2)((()=>w||[]),"getBlocks"),K=(0,r.K2)((()=>p),"getEdges"),B=(0,r.K2)((e=>g.get(e)),"getBlock"),P=(0,r.K2)((e=>{g.set(e.id,e)}),"setBlock"),F=(0,r.K2)((()=>console),"getLogger"),M=(0,r.K2)((function(){return m}),"getClasses"),Y={getConfig:(0,r.K2)((()=>(0,r.zj)().block),"getConfig"),typeStr2Type:N,edgeTypeStr2Type:v,edgeStrToEdgeData:C,getLogger:F,getBlocksFlat:z,getBlocks:O,getEdges:K,setHierarchy:R,getBlock:B,setBlock:P,getColumns:I,getClasses:M,clear:A,generateId:T},X=(0,r.K2)(((e,t)=>{const s=a.A,i=s(e,"r"),n=s(e,"g"),r=s(e,"b");return l.A(i,n,r,t)}),"fade"),j=(0,r.K2)((e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${X(e.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${X(e.mainBkg,.5)};\n fill: ${X(e.clusterBkg,.5)};\n stroke: ${X(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`),"getStyles"),W=(0,r.D7)()?.block?.padding??8;function U(e,t){if(0===e||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);return e<0?{px:t,py:0}:1===e?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}(0,r.K2)(U,"calculateBlockPosition");var H=(0,r.K2)((e=>{let t=0,s=0;for(const i of e.children){const{width:n,height:o,x:a,y:l}=i.size??{width:0,height:0,x:0,y:0};r.Rm.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",o,"x:",a,"y:",l,i.type),"space"!==i.type&&(n>t&&(t=n/(e.widthInColumns??1)),o>s&&(s=o))}return{width:t,height:s}}),"getMaxChildSize");function G(e,t,s=0,i=0){r.Rm.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"sieblingWidth",s),e?.size?.width||(e.size={width:s,height:i,x:0,y:0});let n=0,o=0;if(e.children?.length>0){for(const s of e.children)G(s,t);const a=H(e);n=a.width,o=a.height,r.Rm.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",n,o);for(const t of e.children)t.size&&(r.Rm.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${n} ${o} ${JSON.stringify(t.size)}`),t.size.width=n*(t.widthInColumns??1)+W*((t.widthInColumns??1)-1),t.size.height=o,t.size.x=0,t.size.y=0,r.Rm.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${n} maxHeight:${o}`));for(const s of e.children)G(s,t,n,o);const l=e.columns??-1;let c=0;for(const t of e.children)c+=t.widthInColumns??1;let h=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(t>0){const s=(u-t*W-W)/t;r.Rm.debug("abc95 (growing to fit) width",e.id,u,e.size?.width,s);for(const t of e.children)t.size&&(t.size.width=s)}}e.size={width:u,height:g,x:0,y:0}}r.Rm.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function q(e,t){r.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const s=e.columns??-1;if(r.Rm.debug("layoutBlocks columns abc95",e.id,"=>",s,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,n=e.children.length*i+(e.children.length-1)*W;r.Rm.debug("widthOfChildren 88",n,"posX");let o=0;r.Rm.debug("abc91 block?.size?.x",e.id,e?.size?.x);let a=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-W,l=0;for(const i of e.children){const n=e;if(!i.size)continue;const{width:c,height:h}=i.size,{px:d,py:u}=U(s,o);if(u!=l&&(l=u,a=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-W,r.Rm.debug("New row in layout for block",e.id," and child ",i.id,l)),r.Rm.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${o} (px, py) ${d},${u} (${n?.size?.x},${n?.size?.y}) parent: ${n.id} width: ${c}${W}`),n.size){const e=c/2;i.size.x=a+W+e,r.Rm.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${a} new startingPosX${i.size.x} ${e} padding=${W} width=${c} halfWidth=${e} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 ${c*(i?.widthInColumns??1)/2}`),a=i.size.x+e,i.size.y=n.size.y-n.size.height/2+u*(h+W)+h/2+W,r.Rm.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${a}${W}${e}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2${c*(i?.widthInColumns??1)/2}`)}i.children&&q(i,t),o+=i?.widthInColumns??1,r.Rm.debug("abc88 columnsPos",i,o)}}r.Rm.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function J(e,{minX:t,minY:s,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&"root"!==e.id){const{x:r,y:o,width:a,height:l}=e.size;r-a/2i&&(i=r+a/2),o+l/2>n&&(n=o+l/2)}if(e.children)for(const r of e.children)({minX:t,minY:s,maxX:i,maxY:n}=J(r,{minX:t,minY:s,maxX:i,maxY:n}));return{minX:t,minY:s,maxX:i,maxY:n}}function Z(e){const t=e.getBlock("root");if(!t)return;G(t,e,0,0),q(t,e),r.Rm.debug("getBlocks",JSON.stringify(t,null,2));const{minX:s,minY:i,maxX:n,maxY:o}=J(t);return{x:s,y:i,width:n-s,height:o-i}}function Q(e,t,s=!1){const i=e;let o="default";(i?.classes?.length||0)>0&&(o=(i?.classes??[]).join(" ")),o+=" flowchart-label";let a,l=0,c="";switch(i.type){case"round":l=5,c="rect";break;case"composite":l=0,c="composite",a=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const h=(0,n.sM)(i?.styles??[]),d=i.label,u=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:h.labelStyle,shape:c,labelText:d,rx:l,ry:l,class:o,style:h.style,id:i.id,directions:i.directions,width:u.width,height:u.height,x:u.x,y:u.y,positioned:s,intersect:void 0,type:i.type,padding:a??(0,r.zj)()?.block?.padding??0}}async function V(e,t,s){const n=Q(t,0,!1);if("group"===n.type)return;const o=(0,r.zj)(),a=await(0,i.on)(e,n,{config:o}),l=a.node().getBBox(),c=s.getBlock(n.id);c.size={width:l.width,height:l.height,x:0,y:0,node:a},s.setBlock(c),a.remove()}async function ee(e,t,s){const n=Q(t,0,!0);if("space"!==s.getBlock(n.id).type){const s=(0,r.zj)();await(0,i.on)(e,n,{config:s}),t.intersect=n?.intersect,(0,i.U_)(n)}}async function te(e,t,s,i){for(const n of t)await i(e,n,s),n.children&&await te(e,n.children,s,i)}async function se(e,t,s){await te(e,t,s,V)}async function ie(e,t,s){await te(e,t,s,ee)}async function ne(e,t,s,n,r){const o=new h.T({multigraph:!0,compound:!0});o.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const e of s)e.size&&o.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(const s of t)if(s.start&&s.end){const t=n.getBlock(s.start),a=n.getBlock(s.end);if(t?.size&&a?.size){const n=t.size,l=a.size,c=[{x:n.x,y:n.y},{x:n.x+(l.x-n.x)/2,y:n.y+(l.y-n.y)/2},{x:l.x,y:l.y}];(0,i.Jo)(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",o,r),s.label&&(await(0,i.jP)(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:c,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),(0,i.T_)({...s,x:c[1].x,y:c[1].y},{originalPath:c}))}}}(0,r.K2)(G,"setBlockSizes"),(0,r.K2)(q,"layoutBlocks"),(0,r.K2)(J,"findBounds"),(0,r.K2)(Z,"layout"),(0,r.K2)(Q,"getNodeFromBlock"),(0,r.K2)(V,"calculateBlockSize"),(0,r.K2)(ee,"insertBlockPositioned"),(0,r.K2)(te,"performOperations"),(0,r.K2)(se,"calculateBlockSizes"),(0,r.K2)(ie,"insertBlocks"),(0,r.K2)(ne,"insertEdges");var re=(0,r.K2)((function(e,t){return t.db.getClasses()}),"getClasses"),oe={parser:u,db:Y,renderer:{draw:(0,r.K2)((async function(e,t,s,n){const{securityLevel:o,block:a}=(0,r.zj)(),l=n.db;let h;"sandbox"===o&&(h=(0,c.Ltv)("#i"+t));const d="sandbox"===o?(0,c.Ltv)(h.nodes()[0].contentDocument.body):(0,c.Ltv)("body"),u="sandbox"===o?d.select(`[id="${t}"]`):(0,c.Ltv)(`[id="${t}"]`);(0,i.g0)(u,["point","circle","cross"],n.type,t);const g=l.getBlocks(),p=l.getBlocksFlat(),y=l.getEdges(),b=u.insert("g").attr("class","block");await se(b,g,l);const _=Z(l);if(await ie(b,g,l),await ne(b,y,p,l,t),_){const e=_,t=Math.max(1,Math.round(e.width/e.height*.125)),s=e.height+t+10,i=e.width+10,{useMaxWidth:n}=a;(0,r.a$)(u,s,i,!!n),r.Rm.debug("Here Bounds",_,e),u.attr("viewBox",`${e.x-5} ${e.y-5} ${e.width+10} ${e.height+10}`)}}),"draw"),getClasses:re},styles:j}}}]); \ No newline at end of file diff --git a/js/720-970f726e.chunk.min.js b/js/720-970f726e.chunk.min.js new file mode 100644 index 0000000..158ba0e --- /dev/null +++ b/js/720-970f726e.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[720],{9720:(e,c,k)=>{k.d(c,{createArchitectureServices:()=>r.S});var r=k(9936);k(9369)}}]); \ No newline at end of file diff --git a/js/723-47eb515a.chunk.min.js b/js/723-47eb515a.chunk.min.js new file mode 100644 index 0000000..128f897 --- /dev/null +++ b/js/723-47eb515a.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[723],{7723:(e,c,k)=>{k.d(c,{createPieServices:()=>s.f});var s=k(8685);k(9369)}}]); \ No newline at end of file diff --git a/js/731-7b5d66f3.chunk.min.js b/js/731-7b5d66f3.chunk.min.js new file mode 100644 index 0000000..5b522e1 --- /dev/null +++ b/js/731-7b5d66f3.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[731],{9850:(e,t,n)=>{t.Qi=t.XO=void 0;const r=n(9590),i=n(8585),s=n(2676);var a;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(a||(t.XO=a={}));const o=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.Qi=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=a.None}}},2676:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9590);var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=a,a._noop=function(){}},8585:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},9590:(e,t)=>{let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},7021:(e,t,n)=>{n.d(t,{v:()=>o});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.e5,a);return t.ServiceRegistry.register(n),{shared:t,Info:n}}(0,r.K2)(o,"createInfoServices")},8685:(e,t,n)=>{n.d(t,{f:()=>c});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},a=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new a),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.KX,o);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}(0,r.K2)(c,"createPieServices")},1609:(e,t,n)=>{n.d(t,{$:()=>o});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.AM,a);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}(0,r.K2)(o,"createPacketServices")},9936:(e,t,n)=>{n.d(t,{S:()=>c});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},a=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new a),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.jE,o);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}(0,r.K2)(c,"createArchitectureServices")},2785:(e,t,n)=>{n.d(t,{b:()=>o});var r=n(9369),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function o(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.eZ,a);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}(0,r.K2)(o,"createGitGraphServices")},9369:(e,t,n)=>{n.d(t,{AM:()=>$,K2:()=>s,KX:()=>w,Tm:()=>P,dg:()=>_,e5:()=>C,eZ:()=>O,jE:()=>L,mR:()=>M,sr:()=>N});var r=n(3707),i=Object.defineProperty,s=(e,t)=>i(e,"name",{value:t,configurable:!0});s((function(e){return g.isInstance(e,"Architecture")}),"isArchitecture");var a="Branch";s((function(e){return g.isInstance(e,a)}),"isBranch");var o="Commit";s((function(e){return g.isInstance(e,o)}),"isCommit"),s((function(e){return g.isInstance(e,"Common")}),"isCommon");var c="GitGraph";s((function(e){return g.isInstance(e,c)}),"isGitGraph"),s((function(e){return g.isInstance(e,"Info")}),"isInfo");var l="Merge";s((function(e){return g.isInstance(e,l)}),"isMerge"),s((function(e){return g.isInstance(e,"Packet")}),"isPacket"),s((function(e){return g.isInstance(e,"PacketBlock")}),"isPacketBlock"),s((function(e){return g.isInstance(e,"Pie")}),"isPie"),s((function(e){return g.isInstance(e,"PieSection")}),"isPieSection");var u,d,h,f,p,m=class extends r.kD{static{s(this,"MermaidAstReflection")}getAllTypes(){return["Architecture","Branch","Checkout","CherryPicking","Commit","Common","Direction","Edge","GitGraph","Group","Info","Junction","Merge","Packet","PacketBlock","Pie","PieSection","Service","Statement"]}computeIsSubtype(e,t){switch(e){case a:case"Checkout":case"CherryPicking":case o:case l:return this.isSubtype("Statement",t);case"Direction":return this.isSubtype(c,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;throw new Error(`${t} is not a valid reference id.`)}getTypeMetaData(e){switch(e){case"Architecture":return{name:"Architecture",properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Junction":return{name:"Junction",properties:[{name:"id"},{name:"in"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Service":return{name:"Service",properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},g=new m,y=s((()=>u??(u=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"InfoGrammar"),A=s((()=>d??(d=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PacketGrammar"),T=s((()=>h??(h=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PieGrammar"),v=s((()=>f??(f=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","name":"Architecture","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","fragment":true,"definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"LeftPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"RightPort","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Arrow","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ID","definition":{"$type":"RegexToken","regex":"/[\\\\w]+/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TEXT_ICON","definition":{"$type":"RegexToken","regex":"/\\\\(\\"[^\\"]+\\"\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"ArchitectureGrammar"),R=s((()=>p??(p=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}'))),"GitGraphGrammar"),E={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},k={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},x={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},I={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},S={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},N={AstReflection:s((()=>new m),"AstReflection")},C={Grammar:s((()=>y()),"Grammar"),LanguageMetaData:s((()=>E),"LanguageMetaData"),parser:{}},$={Grammar:s((()=>A()),"Grammar"),LanguageMetaData:s((()=>k),"LanguageMetaData"),parser:{}},w={Grammar:s((()=>T()),"Grammar"),LanguageMetaData:s((()=>x),"LanguageMetaData"),parser:{}},L={Grammar:s((()=>v()),"Grammar"),LanguageMetaData:s((()=>I),"LanguageMetaData"),parser:{}},O={Grammar:s((()=>R()),"Grammar"),LanguageMetaData:s((()=>S),"LanguageMetaData"),parser:{}},b={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},_=class extends r.dM{static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return void 0===r&&(r=this.runCustomConverter(e,t,n)),void 0===r?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){const r=b[e.name];if(void 0===r)return;const i=r.exec(t);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},P=class extends _{static{s(this,"CommonValueConverter")}runCustomConverter(e,t,n){}},M=class extends r.QU{static{s(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);return r.forEach((e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))})),r}};(class extends M{static{s(this,"CommonTokenBuilder")}})},8731:(e,t,n)=>{n.d(t,{qg:()=>a}),n(2785),n(7021),n(1609),n(8685),n(9936);var r=n(9369),i={},s={info:(0,r.K2)((async()=>{const{createInfoServices:e}=await n.e(890).then(n.bind(n,890)),t=e().Info.parser.LangiumParser;i.info=t}),"info"),packet:(0,r.K2)((async()=>{const{createPacketServices:e}=await n.e(452).then(n.bind(n,4071)),t=e().Packet.parser.LangiumParser;i.packet=t}),"packet"),pie:(0,r.K2)((async()=>{const{createPieServices:e}=await n.e(723).then(n.bind(n,7723)),t=e().Pie.parser.LangiumParser;i.pie=t}),"pie"),architecture:(0,r.K2)((async()=>{const{createArchitectureServices:e}=await n.e(720).then(n.bind(n,9720)),t=e().Architecture.parser.LangiumParser;i.architecture=t}),"architecture"),gitGraph:(0,r.K2)((async()=>{const{createGitGraphServices:e}=await n.e(387).then(n.bind(n,2387)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t}),"gitGraph")};async function a(e,t){const n=s[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();const r=i[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o(r);return r.value}(0,r.K2)(a,"parse");var o=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map((e=>e.message)).join("\n")} ${e.parserErrors.map((e=>e.message)).join("\n")}`),this.result=e}static{(0,r.K2)(this,"MermaidParseError")}}},3707:(e,t,n)=>{function r(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function i(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText}function s(e){return"object"==typeof e&&null!==e&&r(e.container)&&i(e.reference)&&"string"==typeof e.message}n.d(t,{kD:()=>a,QU:()=>Ic,dM:()=>Sc,DD:()=>lu,tG:()=>eu,uM:()=>tu,WQ:()=>nu,y0:()=>hu});class a{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const r=n[t];if(void 0!==r)return r;{const r=this.computeIsSubtype(e,t);return n[t]=r,r}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),n=[];for(const r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}}function o(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function c(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function l(e){return o(e)&&"string"==typeof e.fullText}class u{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){const e=[],t=this.iterator();let n;do{n=t.next(),void 0!==n.value&&e.push(n.value)}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map((n=>[e?e(n):n,t?t(n):n]));return new Map(n)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new u((()=>({first:this.startFn(),firstDone:!1})),(e=>{let n;if(!e.firstDone){do{if(n=this.nextFn(e.first),!n.done)return n}while(!n.done);e.firstDone=!0}do{if(n=t.next(),!n.done)return n}while(!n.done);return f}))}join(e=","){const t=this.iterator();let n,r="",i=!1;do{n=t.next(),n.done||(i&&(r+=e),r+="string"==typeof(s=n.value)?s:void 0===s?"undefined":"function"==typeof s.toString?s.toString():Object.prototype.toString.call(s)),i=!0}while(!n.done);var s;return r}indexOf(e,t=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new u(this.startFn,(t=>{const{done:n,value:r}=this.nextFn(t);return n?f:{done:!1,value:e(r)}}))}filter(e){return new u(this.startFn,(t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return f}))}nonNullable(){return this.filter((e=>null!=e))}reduce(e,t){const n=this.iterator();let r=t,i=n.next();for(;!i.done;)r=void 0===r?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done)return n;const i=this.recursiveReduce(e,t,n);return void 0===i?r.value:t(i,r.value)}find(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new u((()=>({this:this.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!d(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return f}))}flat(e){if(void 0===e&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new u((()=>({this:t.startFn()})),(e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(!d(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return f}))}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new u((()=>{const t=this.startFn();for(let n=0;n({size:0,state:this.startFn()})),(t=>(t.size++,t.size>e?f:this.nextFn(t.state))))}distinct(e){const t=new Set;return this.filter((n=>{const r=e?e(n):n;return!t.has(r)&&(t.add(r),!0)}))}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter((e=>{const r=t?t(e):e;return!n.has(r)}))}}function d(e){return!!e&&"function"==typeof e[Symbol.iterator]}const h=new u((()=>{}),(()=>f)),f=Object.freeze({done:!0,value:void 0});function p(...e){if(1===e.length){const t=e[0];if(t instanceof u)return t;if(d(t))return new u((()=>t[Symbol.iterator]()),(e=>e.next()));if("number"==typeof t.length)return new u((()=>({index:0})),(e=>e.index1?new u((()=>({collIndex:0,arrIndex:0})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:(null==n?void 0:n.includeRoot)?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1})),(e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const n=e.iterators[e.iterators.length-1].next();if(!n.done)return e.iterators.push(t(n.value)[Symbol.iterator]()),n;e.iterators.pop()}return f}))}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var g,y;function A(e){return new m(e,(e=>o(e)?e.content:[]),{includeRoot:!0})}function T(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function v(e){if(!e)return;const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}!function(e){e.sum=function(e){return e.reduce(((e,t)=>e+t),0)},e.product=function(e){return e.reduce(((e,t)=>e*t),0)},e.min=function(e){return e.reduce(((e,t)=>Math.min(e,t)))},e.max=function(e){return e.reduce(((e,t)=>Math.max(e,t)))}}(g||(g={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside"}(y||(y={}));const R=/^[\w\p{L}]$/u;function E(e,t){return c(e)&&t.includes(e.tokenType.name)}class k extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function x(e){throw new Error("Error! The input value was not handled.")}const I="AbstractRule",S="AbstractType",N="Condition",C="ValueLiteral",$="AbstractElement",w="BooleanLiteral",L="Conjunction",O="Disjunction",b="InferredType";function _(e){return ve.isInstance(e,b)}const P="Interface";function M(e){return ve.isInstance(e,P)}const D="Negation",U="ParameterReference",F="ParserRule";function G(e){return ve.isInstance(e,F)}const K="ReturnType",B="SimpleType",j="TerminalRule";function V(e){return ve.isInstance(e,j)}const H="Type";function W(e){return ve.isInstance(e,H)}const z="Action";function Y(e){return ve.isInstance(e,z)}const X="Alternatives";function q(e){return ve.isInstance(e,X)}const Q="Assignment";function J(e){return ve.isInstance(e,Q)}const Z="CharacterRange",ee="CrossReference";function te(e){return ve.isInstance(e,ee)}const ne="EndOfFile",re="Group";function ie(e){return ve.isInstance(e,re)}const se="Keyword";function ae(e){return ve.isInstance(e,se)}const oe="NegatedToken",ce="RegexToken",le="RuleCall";function ue(e){return ve.isInstance(e,le)}const de="TerminalAlternatives",he="TerminalGroup",fe="TerminalRuleCall";function pe(e){return ve.isInstance(e,fe)}const me="UnorderedGroup";function ge(e){return ve.isInstance(e,me)}const ye="UntilToken",Ae="Wildcard";class Te extends a{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case z:case X:case Q:case Z:case ee:case ne:case re:case se:case oe:case ce:case le:case de:case he:case fe:case me:case ye:case Ae:return this.isSubtype($,t);case"ArrayLiteral":case"NumberLiteral":case"StringLiteral":return this.isSubtype(C,t);case"ArrayType":case"ReferenceType":case B:case"UnionType":return this.isSubtype("TypeDefinition",t);case w:return this.isSubtype(N,t)||this.isSubtype(C,t);case L:case O:case D:case U:return this.isSubtype(N,t);case b:case P:case H:return this.isSubtype(S,t);case F:return this.isSubtype(I,t)||this.isSubtype(S,t);case j:return this.isSubtype(I,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return S;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return I;case"Grammar:usedGrammars":return"Grammar";case"NamedArgument:parameter":case"ParameterReference:parameter":return"Parameter";case"TerminalRuleCall:rule":return j;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const ve=new Te;function Re(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function Ee(e){const t=function(e){for(;e.$container;)e=e.$container;return e}(e),n=t.$document;if(!n)throw new Error("AST node has no document.");return n}function ke(e,t){if(!e)throw new Error("Node must be an AstNode.");const n=null==t?void 0:t.range;return new u((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{for(;t.keyIndexke(e,t)))}function Ie(e,t){if(!e)throw new Error("Root node must be an AstNode.");return(null==t?void 0:t.range)&&!Se(e,t.range)?new m(e,(()=>[])):new m(e,(e=>ke(e,t)),{includeRoot:!0})}function Se(e,t){var n;if(!t)return!0;const r=null===(n=e.$cstNode)||void 0===n?void 0:n.range;return!!r&&function(e,t){const n=function(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>t.end.character)return y.After;const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.liney.After}(r,t)}function Ne(e){return new u((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{for(;t.keyIndex=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class Be{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((e=>{this.visit(e)}),this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const je=/\r?\n/gm,Ve=new Ke,He=new class extends Be{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=Ye(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}};function We(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),He.reset(e),He.visit(Ve.pattern(e)),He.multiline}catch(e){return!1}}function ze(e){return("string"==typeof e?new RegExp(e):e).test(" ")}function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xe(e,t){const n=new Set,r=function(e){return e.rules.find((e=>G(e)&&e.entry))}(e);if(!r)return new Set(e.rules);const i=[r].concat(function(e){return e.rules.filter((e=>V(e)&&e.hidden))}(e));for(const e of i)qe(e,n,t);const s=new Set;for(const t of e.rules)(n.has(t.name)||V(t)&&t.hidden)&&s.add(t);return s}function qe(e,t,n){t.add(e.name),xe(e).forEach((e=>{if(ue(e)||n&&pe(e)){const r=e.rule.ref;r&&!t.has(r.name)&&qe(r,t,n)}}))}function Qe(e,t,n){if(!e||!t)return;const r=Je(e,t,e.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function Je(e,t,n,r){if(!r){const n=Re(e.grammarSource,J);if(n&&n.feature===t)return[e]}return o(e)&&e.astNode===n?e.content.flatMap((e=>Je(e,t,n,!1))):[]}function Ze(e){let t=e;return _(t)&&(Y(t.$container)?t=t.$container.$container:G(t.$container)?t=t.$container:x(t.$container)),et(e,t,new Map)}function et(e,t,n){var r,i;function s(t,r){let i;return Re(t,J)||(i=et(r,r,n)),n.set(e,i),i}if(n.has(e))return n.get(e);n.set(e,void 0);for(const a of xe(t)){if(J(a)&&"name"===a.feature.toLowerCase())return n.set(e,a),a;if(ue(a)&&G(a.rule.ref))return s(a,a.rule.ref);if(i=a,ve.isInstance(i,B)&&(null===(r=a.typeRef)||void 0===r?void 0:r.ref))return s(a,a.typeRef.ref)}}function tt(e){return nt(e,new Set)}function nt(e,t){if(t.has(e))return!0;t.add(e);for(const n of xe(e))if(ue(n)){if(!n.rule.ref)return!1;if(G(n.rule.ref)&&!nt(n.rule.ref,t))return!1}else{if(J(n))return!1;if(Y(n))return!1}return Boolean(e.definition)}function rt(e){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t){if(G(t))return t.name;if(M(t)||W(t))return t.name}}}function it(e){var t,n;if(G(e))return tt(e)?e.name:null!==(t=rt(e))&&void 0!==t?t:e.name;if(M(e)||W(e)||(n=e,ve.isInstance(n,K)))return e.name;if(Y(e)){const t=function(e){var t;return e.inferredType?e.inferredType.name:(null===(t=e.type)||void 0===t?void 0:t.ref)?it(e.type.ref):void 0}(e);if(t)return t}else if(_(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function st(e){const t={s:!1,i:!1,u:!1},n=ot(e.definition,t),r=Object.entries(t).filter((([,e])=>e)).map((([e])=>e)).join("");return new RegExp(n,r)}const at=/[\s\S]/.source;function ot(e,t){if(o=e,ve.isInstance(o,de))return lt((a=e).elements.map((e=>ot(e))).join("|"),{cardinality:a.cardinality,lookahead:a.lookahead});if(function(e){return ve.isInstance(e,he)}(e))return lt((s=e).elements.map((e=>ot(e))).join(""),{cardinality:s.cardinality,lookahead:s.lookahead});if(function(e){return ve.isInstance(e,Z)}(e))return(n=e).right?lt(`[${ct(n.left)}-${ct(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1}):lt(ct(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1});var n,r,i,s,a,o;if(pe(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return lt(ot(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead})}if(function(e){return ve.isInstance(e,oe)}(e))return lt(`(?!${ot((r=e).terminal)})${at}*?`,{cardinality:r.cardinality,lookahead:r.lookahead});if(function(e){return ve.isInstance(e,ye)}(e))return lt(`${at}*?${ot((i=e).terminal)}`,{cardinality:i.cardinality,lookahead:i.lookahead});if(function(e){return ve.isInstance(e,ce)}(e)){const n=e.regex.lastIndexOf("/"),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),lt(r,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}if(function(e){return ve.isInstance(e,Ae)}(e))return lt(at,{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error(`Invalid terminal element: ${null==e?void 0:e.$type}`)}function ct(e){return Ye(e.value)}function lt(e,t){var n;return(!1!==t.wrap||t.lookahead)&&(e=`(${null!==(n=t.lookahead)&&void 0!==n?n:""}${e})`),t.cardinality?`${e}${t.cardinality}`:e}var ut=n(8058),dt=n(2866),ht=n(6401),ft=n(4722),pt=n(9622),mt=n(53);function gt(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}return r(),r(),e}const yt=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r{t.accept(e)}))}}class Kt extends Gt{constructor(e){super([]),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Bt extends Gt{constructor(e){super(e.definition),this.orgText="",Ct(this,bt(e,(e=>void 0!==e)))}}class jt extends Gt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Ct(this,bt(e,(e=>void 0!==e)))}}class Vt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class Ht extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class Wt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class zt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class Yt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}}class Xt extends Gt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ct(this,bt(e,(e=>void 0!==e)))}}class qt{constructor(e){this.idx=1,Ct(this,bt(e,(e=>void 0!==e)))}accept(e){e.visit(this)}}function Qt(e){function t(e){return(0,ft.A)(e,Qt)}if(e instanceof Kt){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return(0,vt.A)(e.label)&&(t.label=e.label),t}if(e instanceof jt)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Vt)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ht)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Wt)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Qt(new qt({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Yt)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Qt(new qt({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof zt)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Xt)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof qt){const t={type:"Terminal",name:e.terminalType.name,label:(n=e.terminalType,r=n,(0,vt.A)(r.LABEL)&&""!==r.LABEL?n.LABEL:n.name),idx:e.idx};(0,vt.A)(e.label)&&(t.terminalLabel=e.label);const i=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=Ft(i)?i.source:i),t}var n,r;if(e instanceof Bt)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}class Jt{visit(e){const t=e;switch(t.constructor){case Kt:return this.visitNonTerminal(t);case jt:return this.visitAlternative(t);case Vt:return this.visitOption(t);case Ht:return this.visitRepetitionMandatory(t);case Wt:return this.visitRepetitionMandatoryWithSeparator(t);case Yt:return this.visitRepetitionWithSeparator(t);case zt:return this.visitRepetition(t);case Xt:return this.visitAlternation(t);case qt:return this.visitTerminal(t);case Bt:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}var Zt=n(3736),en=n(4288);const tn=function(e,t){var n;return(0,en.A)(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n};var nn=n(2049),rn=n(6832);const sn=function(e,t,n){var r=(0,nn.A)(e)?Zt.A:tn;return n&&(0,rn.A)(e,t,n)&&(t=void 0),r(e,(0,wt.A)(t,3))};var an=n(5205),on=Math.max;const cn=function(e,t,n,r){e=(0,xt.A)(e)?e:(0,dt.A)(e),n=n&&!r?(0,At.A)(n):0;var i=e.length;return n<0&&(n=on(i+n,0)),(0,vt.A)(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&(0,an.A)(e,t,n)>-1},ln=function(e,t){for(var n=-1,r=null==e?0:e.length;++nhn(e,t))):!(e instanceof Kt&&cn(t,e))&&e instanceof Gt&&(e instanceof Kt&&t.push(e),dn(e.definition,(e=>hn(e,t)))))}function fn(e){if(e instanceof Kt)return"SUBRULE";if(e instanceof Vt)return"OPTION";if(e instanceof Xt)return"OR";if(e instanceof Ht)return"AT_LEAST_ONE";if(e instanceof Wt)return"AT_LEAST_ONE_SEP";if(e instanceof Yt)return"MANY_SEP";if(e instanceof zt)return"MANY";if(e instanceof qt)return"CONSUME";throw Error("non exhaustive match")}class pn{walk(e,t=[]){(0,ut.A)(e.definition,((n,r)=>{const i=Tt(e.definition,r+1);if(n instanceof Kt)this.walkProdRef(n,i,t);else if(n instanceof qt)this.walkTerminal(n,i,t);else if(n instanceof jt)this.walkFlat(n,i,t);else if(n instanceof Vt)this.walkOption(n,i,t);else if(n instanceof Ht)this.walkAtLeastOne(n,i,t);else if(n instanceof Wt)this.walkAtLeastOneSep(n,i,t);else if(n instanceof Yt)this.walkManySep(n,i,t);else if(n instanceof zt)this.walkMany(n,i,t);else{if(!(n instanceof Xt))throw Error("non exhaustive match");this.walkOr(n,i,t)}}))}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new Vt({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=mn(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new Vt({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=mn(e,t,n);this.walk(e,r)}walkOr(e,t,n){const r=t.concat(n);(0,ut.A)(e.definition,(e=>{const t=new jt({definition:[e]});this.walk(t,r)}))}}function mn(e,t,n){return[new Vt({definition:[new qt({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}var gn=n(7371);const yn=function(e){return e&&e.length?(0,gn.A)(e):[]};var An=n(4098);function Tn(e){if(e instanceof Kt)return Tn(e.referencedRule);if(e instanceof qt)return[e.terminalType];if(function(e){return e instanceof jt||e instanceof Vt||e instanceof zt||e instanceof Ht||e instanceof Wt||e instanceof Yt||e instanceof qt||e instanceof Bt}(e))return function(e){let t=[];const n=e.definition;let r,i=0,s=n.length>i,a=!0;for(;s&&a;)r=n[i],a=hn(r),t=t.concat(Tn(r)),i+=1,s=n.length>i;return yn(t)}(e);if(function(e){return e instanceof Xt}(e))return function(e){const t=(0,ft.A)(e.definition,(e=>Tn(e)));return yn((0,An.A)(t))}(e);throw Error("non exhaustive match")}const vn="_~IN~_";class Rn extends pn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+vn+this.topProd.name);var i,s;const a=t.concat(n),o=Tn(new jt({definition:a}));this.follows[r]=o}}var En=n(9592),kn=n(3068),xn=n(2634),In=n(1790);const Sn=function(e,t){return((0,nn.A)(e)?xn.A:In.A)(e,function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}((0,wt.A)(t,3)))};var Nn=n(9610),Cn=Math.max;const $n=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:(0,At.A)(n);return i<0&&(i=Cn(r+i,0)),(0,an.A)(e,t,i)};var wn=n(3130),Ln=n(4092),On=n(8300),bn=n(5530),_n=n(7809),Pn=n(4099);var Mn=n(7671),Dn=n(4326),Un=n(3533);const Fn=(0,Dn.A)((function(e,t){return(0,Un.A)(e)?function(e,t,n,r){var i=-1,s=bn.A,a=!0,o=e.length,c=[],l=t.length;if(!o)return c;n&&(t=(0,$t.A)(t,(0,Mt.A)(n))),r?(s=_n.A,a=!1):t.length>=200&&(s=Pn.A,a=!1,t=new On.A(t));e:for(;++i\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),jn(`${Xn}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Qn(e,t,n){switch(e.type){case"Disjunction":for(let r=0;r{if("number"==typeof e)Jn(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)Jn(e,t,n);else{for(let e=r.from;e<=r.to&&e=yr){const e=r.from>=yr?r.from:yr,n=r.to,i=Tr(e),s=Tr(n);for(let e=i;e<=s;e++)t[e]=e}}}}));break;case"Group":Qn(s.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===er(s)||"Group"!==s.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return(0,dt.A)(t)}function Jn(e,t,n){const r=Tr(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=Tr(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=Tr(e.charCodeAt(0));t[n]=n}}}(e,t)}function Zn(e,t){return(0,Bn.A)(e.value,(e=>{if("number"==typeof e)return cn(t,e);{const n=e;return void 0!==(0,Bn.A)(t,(e=>n.from<=e&&e<=n.to))}}))}function er(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&((0,nn.A)(e.value)?dn(e.value,er):er(e.value))}class tr extends Be{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}super.visitChildren(e)}}visitCharacter(e){cn(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===Zn(e,this.targetCharCodes)&&(this.found=!0):void 0!==Zn(e,this.targetCharCodes)&&(this.found=!0)}}function nr(e,t){if(t instanceof RegExp){const n=zn(t),r=new tr(e);return r.visit(n),r.found}return void 0!==(0,Bn.A)(t,(t=>cn(e,t.charCodeAt(0))))}const rr="PATTERN",ir="defaultMode",sr="modes";let ar="boolean"==typeof new RegExp("(?:)").sticky;const or=/[^\\][$]/,cr=/[^\\[][\^]|^\^/;function lr(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function ur(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function dr(e){const t=e.PATTERN;if(Ft(t))return!1;if((0,Nn.A)(t))return!0;if((0,pt.A)(t,"exec"))return!0;if((0,vt.A)(t))return!1;throw Error("non exhaustive match")}function hr(e){return!(!(0,vt.A)(e)||1!==e.length)&&e.charCodeAt(0)}const fr={test:function(e){const t=e.length;for(let n=this.lastIndex;n(0,vt.A)(e)?e.charCodeAt(0):e))}function gr(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const yr=256;let Ar=[];function Tr(e){return ee.CATEGORIES))));const e=Fn(n,t);t=t.concat(e),(0,ht.A)(e)?r=!1:n=e}return t}(e);!function(e){(0,ut.A)(e,(e=>{var t;wr(e)||(Nr[Sr]=e,e.tokenTypeIdx=Sr++),Lr(e)&&!(0,nn.A)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Lr(e)||(e.CATEGORIES=[]),t=e,(0,pt.A)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,pt.A)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})}))}(t),function(e){(0,ut.A)(e,(e=>{$r([],e)}))}(t),function(e){(0,ut.A)(e,(e=>{e.categoryMatches=[],(0,ut.A)(e.categoryMatchesMap,((t,n)=>{e.categoryMatches.push(Nr[n].tokenTypeIdx)}))}))}(t),(0,ut.A)(t,(e=>{e.isParent=e.categoryMatches.length>0}))}function $r(e,t){(0,ut.A)(e,(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0})),(0,ut.A)(t.CATEGORIES,(n=>{const r=e.concat(t);cn(r,n)||$r(r,n)}))}function wr(e){return(0,pt.A)(e,"tokenTypeIdx")}function Lr(e){return(0,pt.A)(e,"CATEGORIES")}function Or(e){return(0,pt.A)(e,"tokenTypeIdx")}var br;!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(br||(br={}));const _r={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:{buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`},traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(_r);class Pr{constructor(e,t=_r){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=kr(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Ct({},_r,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(()=>{let n,r=!0;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===_r.lineTerminatorsPattern)this.config.lineTerminatorsPattern=fr;else if(this.config.lineTerminatorCharacters===_r.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,nn.A)(e)?n={modes:{defaultMode:(0,mt.A)(e)},defaultMode:ir}:(r=!1,n=(0,mt.A)(e))})),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){const t=[];return(0,pt.A)(e,ir)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+ir+"> property in its definition\n",type:br.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,pt.A)(e,sr)||t.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:br.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,pt.A)(e,sr)&&(0,pt.A)(e,ir)&&!(0,pt.A)(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${ir}: <${e.defaultMode}>which does not exist\n`,type:br.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,pt.A)(e,sr)&&(0,ut.A)(e.modes,((e,n)=>{(0,ut.A)(e,((r,i)=>{if((0,En.A)(r))t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${i}>\n`,type:br.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,pt.A)(r,"LONGER_ALT")){const i=(0,nn.A)(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];(0,ut.A)(i,(i=>{(0,En.A)(i)||cn(e,i)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${r.name}> outside of mode <${n}>\n`,type:br.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))}}))})),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(function(e,t,n){const r=[];let i=!1;const s=Gn((0,An.A)((0,dt.A)(e.modes))),a=Sn(s,(e=>e[rr]===Pr.NA)),o=mr(n);return t&&(0,ut.A)(a,(e=>{const t=pr(e,o);if(!1!==t){const n=function(e,t){if(t.issue===br.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===br.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),i={message:n,type:t.issue,tokenType:e};r.push(i)}else(0,pt.A)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):nr(o,e.PATTERN)&&(i=!0)})),t&&!i&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:br.NO_LINE_BREAKS_FLAGS}),r}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},(0,ut.A)(n.modes,((e,t)=>{n.modes[t]=Sn(e,(e=>(0,En.A)(e)))}));const i=(0,St.A)(n.modes);if((0,ut.A)(n.modes,((e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e,t){let n=[];const r=function(e){const t=(0,Ln.A)(e,(e=>!(0,pt.A)(e,rr)));return{errors:(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:br.MISSING_PATTERN,tokenTypes:[e]}))),valid:Fn(e,t)}}(e);n=n.concat(r.errors);const i=function(e){const t=(0,Ln.A)(e,(e=>{const t=e[rr];return!(Ft(t)||(0,Nn.A)(t)||(0,pt.A)(t,"exec")||(0,vt.A)(t))}));return{errors:(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:br.INVALID_PATTERN,tokenTypes:[e]}))),valid:Fn(e,t)}}(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(function(e){let t=[];const n=(0,Ln.A)(e,(e=>Ft(e[rr])));return t=t.concat(function(e){class t extends Be{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=(0,Ln.A)(e,(e=>{const n=e.PATTERN;try{const e=zn(n),r=new t;return r.visit(e),r.found}catch(e){return or.test(n.source)}}));return(0,ft.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:br.EOI_ANCHOR_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){class t extends Be{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=(0,Ln.A)(e,(e=>{const n=e.PATTERN;try{const e=zn(n),r=new t;return r.visit(e),r.found}catch(e){return cr.test(n.source)}}));return(0,ft.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:br.SOI_ANCHOR_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){const t=(0,Ln.A)(e,(e=>{const t=e[rr];return t instanceof RegExp&&(t.multiline||t.global)}));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:br.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){const t=[];let n=(0,ft.A)(e,(n=>(0,wn.A)(e,((e,r)=>(n.PATTERN.source!==r.PATTERN.source||cn(t,r)||r.PATTERN===Pr.NA||(t.push(r),e.push(r)),e)),[])));n=Gn(n);const r=(0,Ln.A)(n,(e=>e.length>1));return(0,ft.A)(r,(e=>{const t=(0,ft.A)(e,(e=>e.name));return{message:`The same RegExp pattern ->${Kn(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:br.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}))}(n)),t=t.concat(function(e){const t=(0,Ln.A)(e,(e=>e.PATTERN.test("")));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:br.EMPTY_MATCH_PATTERN,tokenTypes:[e]})))}(n)),t}(s)),n=n.concat(function(e){const t=(0,Ln.A)(e,(e=>{if(!(0,pt.A)(e,"GROUP"))return!1;const t=e.GROUP;return t!==Pr.SKIPPED&&t!==Pr.NA&&!(0,vt.A)(t)}));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:br.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})))}(s)),n=n.concat(function(e,t){const n=(0,Ln.A)(e,(e=>void 0!==e.PUSH_MODE&&!cn(t,e.PUSH_MODE)));return(0,ft.A)(n,(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:br.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]})))}(s,t)),n=n.concat(function(e){const t=[],n=(0,wn.A)(e,((e,t,n)=>{const r=t.PATTERN;return r===Pr.NA||((0,vt.A)(r)?e.push({str:r,idx:n,tokenType:t}):Ft(r)&&(i=r,void 0===(0,Bn.A)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(e=>-1!==i.source.indexOf(e))))&&e.push({str:r.source,idx:n,tokenType:t})),e;var i}),[]);return(0,ut.A)(e,((e,r)=>{(0,ut.A)(n,(({str:n,idx:i,tokenType:s})=>{if(r${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:br.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))})),t}(s)),n}(e,i))})),(0,ht.A)(this.lexerDefinitionErrors)){let r;Cr(e),this.TRACE_INIT("analyzeTokenTypes",(()=>{r=function(e,t){const n=(t=(0,kn.A)(t,{useSticky:ar,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer;let r;n("initCharCodeToOptimizedIndexMap",(()=>{!function(){if((0,ht.A)(Ar)){Ar=new Array(65536);for(let e=0;e<65536;e++)Ar[e]=e>255?255+~~(e/255):e}}()})),n("Reject Lexer.NA",(()=>{r=Sn(e,(e=>e[rr]===Pr.NA))}));let i,s,a,o,c,l,u,d,h,f,p,m=!1;n("Transform Patterns",(()=>{m=!1,i=(0,ft.A)(r,(e=>{const n=e[rr];if(Ft(n)){const e=n.source;return 1!==e.length||"^"===e||"$"===e||"."===e||n.ignoreCase?2!==e.length||"\\"!==e[0]||cn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?t.useSticky?ur(n):lr(n):e[1]:e}if((0,Nn.A)(n))return m=!0,{exec:n};if("object"==typeof n)return m=!0,n;if("string"==typeof n){if(1===n.length)return n;{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(e);return t.useSticky?ur(r):lr(r)}}throw Error("non exhaustive match")}))})),n("misc mapping",(()=>{s=(0,ft.A)(r,(e=>e.tokenTypeIdx)),a=(0,ft.A)(r,(e=>{const t=e.GROUP;if(t!==Pr.SKIPPED){if((0,vt.A)(t))return t;if((0,En.A)(t))return!1;throw Error("non exhaustive match")}})),o=(0,ft.A)(r,(e=>{const t=e.LONGER_ALT;if(t)return(0,nn.A)(t)?(0,ft.A)(t,(e=>$n(r,e))):[$n(r,t)]})),c=(0,ft.A)(r,(e=>e.PUSH_MODE)),l=(0,ft.A)(r,(e=>(0,pt.A)(e,"POP_MODE")))})),n("Line Terminator Handling",(()=>{const e=mr(t.lineTerminatorCharacters);u=(0,ft.A)(r,(e=>!1)),"onlyOffset"!==t.positionTracking&&(u=(0,ft.A)(r,(t=>(0,pt.A)(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===pr(t,e)&&nr(e,t.PATTERN))))})),n("Misc Mapping #2",(()=>{d=(0,ft.A)(r,dr),h=(0,ft.A)(i,hr),f=(0,wn.A)(r,((e,t)=>{const n=t.GROUP;return(0,vt.A)(n)&&n!==Pr.SKIPPED&&(e[n]=[]),e}),{}),p=(0,ft.A)(i,((e,t)=>({pattern:i[t],longerAlt:o[t],canLineTerminator:u[t],isCustom:d[t],short:h[t],group:a[t],push:c[t],pop:l[t],tokenTypeIdx:s[t],tokenType:r[t]})))}));let g=!0,y=[];return t.safeMode||n("First Char Optimization",(()=>{y=(0,wn.A)(r,((e,n,r)=>{if("string"==typeof n.PATTERN){const t=Tr(n.PATTERN.charCodeAt(0));gr(e,t,p[r])}else if((0,nn.A)(n.START_CHARS_HINT)){let t;(0,ut.A)(n.START_CHARS_HINT,(n=>{const i=Tr("string"==typeof n?n.charCodeAt(0):n);t!==i&&(t=i,gr(e,i,p[r]))}))}else if(Ft(n.PATTERN))if(n.PATTERN.unicode)g=!1,t.ensureOptimizations&&jn(`${Xn}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const i=qn(n.PATTERN,t.ensureOptimizations);(0,ht.A)(i)&&(g=!1),(0,ut.A)(i,(t=>{gr(e,t,p[r])}))}else t.ensureOptimizations&&jn(`${Xn}\tTokenType: <${n.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return e}),[])})),{emptyGroups:f,patternIdxToConfig:p,charCodeToPatternIdxToConfig:y,hasCustom:m,canBeOptimized:g}}(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})})),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=Ct({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}}))})),this.defaultMode=n.defaultMode,!(0,ht.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,ft.A)(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}(0,ut.A)(this.lexerDefinitionWarning,(e=>{Vn(e.message)})),this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(ar?(this.chopInput=vr.A,this.match=this.matchWithTest):(this.updateLastIndex=Rr.A,this.match=this.matchWithExec),r&&(this.handleModes=Rr.A),!1===this.trackStartLines&&(this.computeNewColumn=vr.A),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=Rr.A),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)})),this.TRACE_INIT("Failed Optimization Warnings",(()=>{const e=(0,wn.A)(this.canModeBeOptimized,((e,t,n)=>(!1===t&&e.push(n),e)),[]);if(t.ensureOptimizations&&!(0,ht.A)(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)})),this.TRACE_INIT("clearRegExpParserCache",(()=>{Hn={}})),this.TRACE_INIT("toFastProperties",(()=>{gt(this)}))}))}tokenize(e,t=this.defaultMode){if(!(0,ht.A)(this.lexerDefinitionErrors)){const e=(0,ft.A)(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,a,o,c,l,u,d,h,f,p,m,g;const y=e,A=y.length;let T=0,v=0;const R=this.hasCustom?0:Math.floor(e.length/10),E=new Array(R),k=[];let x=this.trackStartLines?1:void 0,I=this.trackStartLines?1:void 0;const S=function(e){const t={},n=(0,St.A)(e);return(0,ut.A)(n,(n=>{const r=e[n];if(!(0,nn.A)(r))throw Error("non exhaustive match");t[n]=[]})),t}(this.emptyGroups),N=this.trackStartLines,C=this.config.lineTerminatorsPattern;let $=0,w=[],L=[];const O=[],b=[];let _;function P(){return w}function M(e){const t=Tr(e),n=L[t];return void 0===n?b:n}Object.freeze(b);const D=e=>{if(1===O.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);k.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{O.pop();const e=(0,Er.A)(O);w=this.patternIdxToConfig[e],L=this.charCodeToPatternIdxToConfig[e],$=w.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;_=L&&t?M:P}};function U(e){O.push(e),L=this.charCodeToPatternIdxToConfig[e],w=this.patternIdxToConfig[e],$=w.length,$=w.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;_=L&&t?M:P}let F;U.call(this,t);const G=this.config.recoveryEnabled;for(;To.length){o=s,c=l,F=t;break}}}break}}if(null!==o){if(u=o.length,d=F.group,void 0!==d&&(h=F.tokenTypeIdx,f=this.createTokenInstance(o,T,h,F.tokenType,x,I,u),this.handlePayload(f,c),!1===d?v=this.addToken(E,v,f):S[d].push(f)),e=this.chopInput(e,u),T+=u,I=this.computeNewColumn(I,u),!0===N&&!0===F.canLineTerminator){let e,t,n=0;C.lastIndex=0;do{e=C.test(o),!0===e&&(t=C.lastIndex-1,n++)}while(!0===e);0!==n&&(x+=n,I=u-t,this.updateTokenEndLineColumnLocation(f,d,t,n,x,I,u))}this.handleModes(F,D,U,f)}else{const t=T,n=x,i=I;let s=!1===G;for(;!1===s&&T`Expecting ${Dr(e)?`--\x3e ${Mr(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",a="\nbut found: '"+Kn(t).image+"'";if(r)return s+r+a;{const t=(0,wn.A)(e,((e,t)=>e.concat(t)),[]),n=(0,ft.A)(t,(e=>`[${(0,ft.A)(e,(e=>Mr(e))).join(", ")}]`));return s+`one of these possible Token sequences:\n${(0,ft.A)(n,((e,t)=>` ${t+1}. ${e}`)).join("\n")}`+a}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ",s="\nbut found: '"+Kn(t).image+"'";return n?i+n+s:i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,ft.A)(e,(e=>`[${(0,ft.A)(e,(e=>Mr(e))).join(",")}]`)).join(" ,")}>`+s}};Object.freeze(qr);const Qr={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},Jr={buildDuplicateFoundError(e,t){const n=e.name,r=Kn(t),i=r.idx,s=fn(r),a=(o=r)instanceof qt?o.terminalType.name:o instanceof Kt?o.nonTerminalName:"";var o;let c=`->${s}${i>0?i:""}<- ${a?`with argument: ->${a}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,"\n"),c},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(e){let t=fn(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${t} --\x3e ${(0,ft.A)(e.leftRecursionPath,(e=>e.name)).concat([t]).join(" --\x3e ")}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof Bt?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class Zr extends Jt{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){(0,ut.A)((0,dt.A)(this.nameToTopRule),(e=>{this.currTopLevel=e,e.accept(this)}))}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Cs.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}const ei=function(e,t){return(0,Mn.A)((0,ft.A)(e,t),1)};var ti=n(2528);const ni=function(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i{!1===(0,ht.A)(e.definition)&&(r=s(e.definition))})),r;if(!(t instanceof qt))throw Error("non exhaustive match");n.push(t.terminalType)}}i++}return r.push({partialPath:n,suffixDef:Tt(e,i)}),r}function yi(e,t,n,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const c=t.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,ht.A)(d);){const e=d.pop();if(e===a){o&&(0,Er.A)(d).idx<=l&&d.pop();continue}const r=e.def,h=e.idx,f=e.ruleStack,p=e.occurrenceStack;if((0,ht.A)(r))continue;const m=r[0];if(m===i){const e={idx:h,def:Tt(r),ruleStack:ci(f),occurrenceStack:ci(p)};d.push(e)}else if(m instanceof qt)if(h=0;e--){const t={idx:h,def:m.definition[e].definition.concat(Tt(r)),ruleStack:f,occurrenceStack:p};d.push(t),d.push(a)}else if(m instanceof jt)d.push({idx:h,def:m.definition.concat(Tt(r)),ruleStack:f,occurrenceStack:p});else{if(!(m instanceof Bt))throw Error("non exhaustive match");d.push(Ai(m,h,f,p))}}return u}function Ai(e,t,n,r){const i=(0,mt.A)(n);i.push(e.name);const s=(0,mt.A)(r);return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var Ti;function vi(e){if(e instanceof Vt||"Option"===e)return Ti.OPTION;if(e instanceof zt||"Repetition"===e)return Ti.REPETITION;if(e instanceof Ht||"RepetitionMandatory"===e)return Ti.REPETITION_MANDATORY;if(e instanceof Wt||"RepetitionMandatoryWithSeparator"===e)return Ti.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Yt||"RepetitionWithSeparator"===e)return Ti.REPETITION_WITH_SEPARATOR;if(e instanceof Xt||"Alternation"===e)return Ti.ALTERNATION;throw Error("non exhaustive match")}function Ri(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,s=vi(r);return s===Ti.ALTERNATION?wi(t,n,i):Li(t,n,s,i)}function Ei(e,t,n,r){const i=e.length,s=dn(e,(e=>dn(e,(e=>1===e.length))));if(t)return function(t){const r=(0,ft.A)(t,(e=>e.GATE));for(let t=0;t(0,An.A)(e))),n=(0,wn.A)(t,((e,t,n)=>((0,ut.A)(t,(t=>{(0,pt.A)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),(0,ut.A)(t.categoryMatches,(t=>{(0,pt.A)(e,t)||(e[t]=n)}))})),e)),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}return function(){for(let t=0;t1===e.length)),i=e.length;if(r&&!n){const t=(0,An.A)(e);if(1===t.length&&(0,ht.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,wn.A)(t,((e,t,n)=>(e[t.tokenTypeIdx]=!0,(0,ut.A)(t.categoryMatches,(t=>{e[t]=!0})),e)),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;ngi([e],1))),r=Si(n.length),i=(0,ft.A)(n,(e=>{const t={};return(0,ut.A)(e,(e=>{const n=Ni(e.partialPath);(0,ut.A)(n,(e=>{t[e]=!0}))})),t}));let s=n;for(let e=1;e<=t;e++){const n=s;s=Si(n.length);for(let a=0;a{const t=Ni(e.partialPath);(0,ut.A)(t,(e=>{i[a][e]=!0}))}))}}}}return r}function wi(e,t,n,r){const i=new Ii(e,Ti.ALTERNATION,r);return t.accept(i),$i(i.result,n)}function Li(e,t,n,r){const i=new Ii(e,n);t.accept(i);const s=i.result,a=new xi(t,e,n).startWalking();return $i([new jt({definition:s}),new jt({definition:a})],r)}function Oi(e,t){e:for(let n=0;ndn(e,(e=>dn(e,(e=>(0,ht.A)(e.categoryMatches)))))))}function _i(e){return`${fn(e)}_#_${e.idx}_#_${Pi(e)}`}function Pi(e){return e instanceof qt?e.terminalType.name:e instanceof Kt?e.nonTerminalName:""}class Mi extends Jt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function Di(e,t,n,r=[]){const i=[],s=Ui(t.definition);if((0,ht.A)(s))return[];{const t=e.name;cn(s,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Cs.LEFT_RECURSION,ruleName:t});const a=Fn(s,r.concat([e])),o=ei(a,(t=>{const i=(0,mt.A)(r);return i.push(t),Di(e,t,n,i)}));return i.concat(o)}}function Ui(e){let t=[];if((0,ht.A)(e))return t;const n=Kn(e);if(n instanceof Kt)t.push(n.referencedRule);else if(n instanceof jt||n instanceof Vt||n instanceof Ht||n instanceof Wt||n instanceof Yt||n instanceof zt)t=t.concat(Ui(n.definition));else if(n instanceof Xt)t=(0,An.A)((0,ft.A)(n.definition,(e=>Ui(e.definition))));else if(!(n instanceof qt))throw Error("non exhaustive match");const r=hn(n),i=e.length>1;if(r&&i){const n=Tt(e);return t.concat(Ui(n))}return t}class Fi extends Jt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}class Gi extends Jt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}const Ki="MismatchedTokenException",Bi="NoViableAltException",ji="EarlyExitException",Vi="NotAllInputParsedException",Hi=[Ki,Bi,ji,Vi];function Wi(e){return cn(Hi,e.name)}Object.freeze(Hi);class zi extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Yi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Ki}}class Xi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Bi}}class qi extends zi{constructor(e,t){super(e,t),this.name=Vi}}class Qi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ji}}const Ji={},Zi="InRuleRecoveryException";class es extends Error{constructor(e){super(e),this.name=Zi}}function ts(e,t,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(void 0===c){const e=this.getCurrRuleFullName();c=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[o]=c}let l=c.token,u=c.occurrence;const d=c.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===l&&(l=zr,u=1),void 0!==l&&void 0!==u&&this.shouldInRepetitionRecoveryBeTried(l,u,a)&&this.tryInRepetitionRecovery(e,t,n,l)}const ns=1024,rs=1280,is=1536;function ss(e,t,n){return n|t|e}class as{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:Ss.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,ht.A)(t)){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return ei(e,(e=>Di(e,e,Jr)))}validateEmptyOrAlternatives(e){return ei(e,(e=>function(e,t){const n=new Fi;e.accept(n);const r=n.alternations;return ei(r,(n=>{const r=ci(n.definition);return ei(r,((r,i)=>{const s=yi([r],[],xr,1);return(0,ht.A)(s)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Cs.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]}))}))}(e,Jr)))}validateAmbiguousAlternationAlternatives(e,t){return ei(e,(e=>function(e,t,n){const r=new Fi;e.accept(r);let i=r.alternations;i=Sn(i,(e=>!0===e.ignoreAmbiguities));return ei(i,(r=>{const i=r.idx,s=r.maxLookahead||t,a=wi(i,e,s,r),o=function(e,t,n,r){const i=[],s=(0,wn.A)(e,((n,r,s)=>(!0===t.definition[s].ignoreAmbiguities||(0,ut.A)(r,(r=>{const a=[s];(0,ut.A)(e,((e,n)=>{s!==n&&Oi(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)})),a.length>1&&!Oi(i,r)&&(i.push(r),n.push({alts:a,path:r}))})),n)),[]);return(0,ft.A)(s,(e=>{const i=(0,ft.A)(e.alts,(e=>e+1));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Cs.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}}))}(a,r,e,n),c=function(e,t,n,r){const i=(0,wn.A)(e,((e,t,n)=>{const r=(0,ft.A)(t,(e=>({idx:n,path:e})));return e.concat(r)}),[]);return Gn(ei(i,(e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const s=e.idx,a=e.path,o=(0,Ln.A)(i,(e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx{const n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})));var n,r}));return(0,ft.A)(o,(e=>{const i=[e.idx+1,s+1],a=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Cs.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:a,alternatives:i}}))})))}(a,r,e,n);return o.concat(c)}))}(e,t,Jr)))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const r=[];return(0,ut.A)(e,(e=>{const i=new Gi;e.accept(i);const s=i.allProductions;(0,ut.A)(s,(i=>{const s=vi(i),a=i.maxLookahead||t,o=Li(i.idx,e,s,a)[0];if((0,ht.A)((0,An.A)(o))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:Cs.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}(e,t,Jr)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const a=wi(e,t,n);return s(a,r,bi(a)?Ir:xr,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Ei)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const a=Li(e,t,i,n),o=bi(a)?Ir:xr;return s(a[0],o,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,vi(e.prodType),ki)}}const os=new class extends Jt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function cs(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset(0,Nn.A)(e.GATE)));return s.hasPredicates=a,n.definition.push(s),(0,ut.A)(i,(e=>{const t=new jt({definition:[]});s.definition.push(t),(0,pt.A)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,pt.A)(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()})),ms}function ks(e){return 0===e?"":`${e}`}function xs(e){if(e<0||e>ys){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${ys+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const Is=Yr(zr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Is);const Ss=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:qr,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ns=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Cs,$s,ws;function Ls(e=void 0){return function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(Cs||(Cs={}));class Os{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",(()=>{gt(this)})),this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording(),(0,ut.A)(this.definedRulesNames,(e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,(()=>{n=this.topLevelRuleRecord(e,t)})),this.gastProductionsCache[e]=n}))}finally{this.disableRecording()}}));let n=[];if(this.TRACE_INIT("Grammar Resolving",(()=>{n=function(e){const t=(0,kn.A)(e,{errMsgProvider:Qr}),n={};return(0,ut.A)(e.rules,(e=>{n[e.name]=e})),function(e,t){const n=new Zr(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}({rules:(0,dt.A)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)})),this.TRACE_INIT("Grammar Validations",(()=>{if((0,ht.A)(n)&&!1===this.skipValidations){const n=(e={rules:(0,dt.A)(this.gastProductionsCache),tokenTypes:(0,dt.A)(this.tokensMap),errMsgProvider:Jr,grammarName:t},function(e,t,n,r){const i=ei(e,(e=>function(e,t){const n=new Mi;e.accept(n);const r=n.allProductions,i=si(r,_i),s=bt(i,(e=>e.length>1));return(0,ft.A)((0,dt.A)(s),(n=>{const r=Kn(n),i=t.buildDuplicateFoundError(e,n),s=fn(r),a={message:i,type:Cs.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx},o=Pi(r);return o&&(a.parameter=o),a}))}(e,n))),s=function(e,t,n){const r=[],i=(0,ft.A)(t,(e=>e.name));return(0,ut.A)(e,(e=>{const t=e.name;if(cn(i,t)){const i=n.buildNamespaceConflictError(e);r.push({message:i,type:Cs.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}(e,t,n),a=ei(e,(e=>function(e,t){const n=new Fi;e.accept(n);const r=n.alternations;return ei(r,(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Cs.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[]))}(e,n))),o=ei(e,(t=>function(e,t,n,r){const i=[],s=(0,wn.A)(t,((t,n)=>n.name===e.name?t+1:t),0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Cs.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,r,n)));return i.concat(s,a,o)}((e=(0,kn.A)(e,{errMsgProvider:Jr})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)),r=function(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,ft.A)(t,(e=>Object.assign({type:Cs.CUSTOM_LOOKAHEAD_VALIDATION},e)))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,dt.A)(this.gastProductionsCache),tokenTypes:(0,dt.A)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,r)}var e})),(0,ht.A)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",(()=>{const e=function(e){const t={};return(0,ut.A)(e,(e=>{const n=new Rn(e).startWalking();Ct(t,n)})),t}((0,dt.A)(this.gastProductionsCache));this.resyncFollows=e})),this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:(0,dt.A)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,dt.A)(this.gastProductionsCache))}))),!Os.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,ht.A)(this.definitionErrors))throw e=(0,ft.A)(this.definitionErrors,(e=>e.message)),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}))}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),(0,pt.A)(t,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=(0,pt.A)(t,"skipValidations")?t.skipValidations:Ss.skipValidations}}Os.DEFER_DEFINITION_ERRORS_HANDLING=!1,$s=Os,ws=[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,pt.A)(e,"recoveryEnabled")?e.recoveryEnabled:Ss.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=ts)}getTokenToInsert(e){const t=Yr(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType(),s=this.exportLexerState(),a=[];let o=!1;const c=this.LA(1);let l=this.LA(1);const u=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()}),n=new Yi(t,c,this.LA(0));n.resyncedTokens=ci(a),this.SAVE_ERROR(n)};for(;!o;){if(this.tokenMatcher(l,r))return void u();if(n.call(this))return u(),void e.apply(this,t);this.tokenMatcher(l,i)?o=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,a))}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new es("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,ht.A)(t))return!1;const n=this.LA(1);return void 0!==(0,Bn.A)(t,(e=>this.tokenMatcher(n,e)))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return cn(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),n=2;for(;;){const r=(0,Bn.A)(e,(e=>Xr(t,e)));if(void 0!==r)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return Ji;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return(0,ft.A)(e,((n,r)=>0===r?Ji:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])}))}flattenFollowSet(){const e=(0,ft.A)(this.buildFullFollowKeyStack(),(e=>this.getFollowSetFromFollowKey(e)));return(0,An.A)(e)}getFollowSetFromFollowKey(e){if(e===Ji)return[zr];const t=e.ruleName+e.idxInCallingRule+vn+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,zr)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return ci(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,a){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,mt.A)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return(0,ft.A)(this.RULE_STACK,(e=>this.shortRuleNameToFullName(e)))}},class{initLooksAhead(e){this.dynamicTokensEnabled=(0,pt.A)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ss.dynamicTokensEnabled,this.maxLookahead=(0,pt.A)(e,"maxLookahead")?e.maxLookahead:Ss.maxLookahead,this.lookaheadStrategy=(0,pt.A)(e,"lookaheadStrategy")?e.lookaheadStrategy:new as({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,ut.A)(e,(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,(()=>{const{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:a}=function(e){os.reset(),e.accept(os);const t=os.dslMethods;return os.reset(),t}(e);(0,ut.A)(t,(t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${fn(t)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=ss(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)}))})),(0,ut.A)(n,(t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,fn(t))})),(0,ut.A)(r,(t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,fn(t))})),(0,ut.A)(i,(t=>{this.computeLookaheadFunc(e,t.idx,ns,"RepetitionMandatory",t.maxLookahead,fn(t))})),(0,ut.A)(s,(t=>{this.computeLookaheadFunc(e,t.idx,is,"RepetitionMandatoryWithSeparator",t.maxLookahead,fn(t))})),(0,ut.A)(a,(t=>{this.computeLookaheadFunc(e,t.idx,rs,"RepetitionWithSeparator",t.maxLookahead,fn(t))}))}))}))}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),a=ss(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(a,s)}))}getKeyForAutomaticLookahead(e,t){return ss(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,pt.A)(e,"nodeLocationTracking")?e.nodeLocationTracking:Ss.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ls,this.setNodeLocationFromNode=ls,this.cstPostRule=Rr.A,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Rr.A,this.setNodeLocationFromNode=Rr.A,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=cs,this.setNodeLocationFromNode=cs,this.cstPostRule=Rr.A,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Rr.A,this.setNodeLocationFromNode=Rr.A,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=Rr.A,this.setNodeLocationFromNode=Rr.A,this.cstPostRule=Rr.A,this.setInitialNodeLocation=Rr.A}else this.cstInvocationStateUpdate=Rr.A,this.cstFinallyStateUpdate=Rr.A,this.cstPostTerminal=Rr.A,this.cstPostNonTerminal=Rr.A,this.cstPostRule=Rr.A}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,En.A)(this.baseCstVisitorConstructor)){const e=function(e,t){const n=function(){};ds(n,e+"BaseSemantics");const r={visit:function(e,t){if((0,nn.A)(e)&&(e=e[0]),!(0,En.A)(e))return this[e.name](e.children,t)},validateVisitor:function(){const e=function(e,t){const n=function(e,t){const n=(0,Ln.A)(t,(t=>!1===(0,Nn.A)(e[t]))),r=(0,ft.A)(n,(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:fs.MISSING_METHOD,methodName:t})));return Gn(r)}(e,t);return n}(this,t);if(!(0,ht.A)(e)){const t=(0,ft.A)(e,(e=>e.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=t,n}(this.className,(0,St.A)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,En.A)(this.baseCstVisitorWithDefaultsConstructor)){const e=function(e,t,n){const r=function(){};ds(r,e+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return(0,ut.A)(t,(e=>{i[e]=hs})),(r.prototype=i).constructor=r,r}(this.className,(0,St.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Is}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Is:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ir,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,pt.A)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,nn.A)(e)){if((0,ht.A)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,nn.A)(e))this.tokensMap=(0,wn.A)(e,((e,t)=>(e[t.name]=t,e)),{});else if((0,pt.A)(e,"modes")&&dn((0,An.A)((0,dt.A)(e.modes)),Or)){const t=(0,An.A)((0,dt.A)(e.modes)),n=yn(t);this.tokensMap=(0,wn.A)(n,((e,t)=>(e[t.name]=t,e)),{})}else{if(!(0,ps.A)(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,mt.A)(e)}this.tokensMap.EOF=zr;const n=(0,pt.A)(e,"modes")?(0,An.A)((0,dt.A)(e.modes)):(0,dt.A)(e),r=dn(n,(e=>(0,ht.A)(e.categoryMatches)));this.tokenMatcher=r?Ir:xr,Cr((0,dt.A)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const r=(0,pt.A)(n,"resyncEnabled")?n.resyncEnabled:Ns.resyncEnabled,i=(0,pt.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:Ns.recoveryValueFunc,s=this.ruleShortNameIdx<<12;let a;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,a=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(a,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){const r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Wi(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(ns,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Ti.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,ns,e,pi)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(is,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,Ti.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,mi],t,is,e,mi)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,hi,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(rs,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,fi],t,rs,e,fi)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,is,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),r=(0,nn.A)(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new qi(t,e))}}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw Wi(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Yi(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===Zi?n:e}}}saveRecogState(){const e=this.errors,t=(0,mt.A)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),zr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Ns){if(cn(this.definedRulesNames,e)){const t={message:Jr.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Cs.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=Ns){const r=function(e,t,n){const r=[];let i;return cn(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:Cs.INVALID_RULE_OVERRIDE,ruleName:e})),r}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(Wi(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return e=(0,dt.A)(this.gastProductionsCache),(0,ft.A)(e,Qt);var e}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=(0,pt.A)(e,"errorMessageProvider")?e.errorMessageProvider:Ss.errorMessageProvider}SAVE_ERROR(e){if(Wi(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,mt.A)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,mt.A)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=Li(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let e=1;e<=this.maxLookahead;e++)s.push(this.LA(e));const a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Qi(a,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=wi(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));const s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Xi(a,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,En.A)(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return yi([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=Kn(e.ruleStack),n=this.getGAstProductions()[t];return new ui(n,e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA}))}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Is}topLevelRuleRecord(e,t){try{const n=new Bt({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(t){throw e}throw e}}optionInternalRecord(e,t){return Rs.call(this,Vt,e,t)}atLeastOneInternalRecord(e,t){Rs.call(this,Ht,t,e)}atLeastOneSepFirstInternalRecord(e,t){Rs.call(this,Wt,t,e,gs)}manyInternalRecord(e,t){Rs.call(this,zt,t,e)}manySepFirstInternalRecord(e,t){Rs.call(this,Yt,t,e,gs)}orInternalRecord(e,t){return Es.call(this,e,t)}subruleInternalRecord(e,t,n){if(xs(t),!e||!1===(0,pt.A)(e,"ruleName")){const n=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,Er.A)(this.recordingProdStack),i=e.ruleName,s=new Kt({idx:t,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(s),this.outputCst?vs:ms}consumeInternalRecord(e,t,n){if(xs(t),!wr(e)){const n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,Er.A)(this.recordingProdStack),i=new qt({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return r.definition.push(i),Ts}},class{initPerformanceTracer(e){if((0,pt.A)(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Ss.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=kr(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}}],ws.forEach((e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach((n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty($s.prototype,n,r):$s.prototype[n]=e.prototype[n]}))}));class bs extends Os{constructor(e,t=Ss){const n=(0,mt.A)(t);n.outputCst=!1,super(e,n)}}function _s(e,t,n){return`${e.name}_${t}_${n}`}const Ps=1,Ms=4,Ds=5,Us=7,Fs=8,Gs=9,Ks=10,Bs=11,js=12;class Vs{constructor(e){this.target=e}isEpsilon(){return!1}}class Hs extends Vs{constructor(e,t){super(e),this.tokenType=t}}class Ws extends Vs{constructor(e){super(e)}isEpsilon(){return!0}}class zs extends Vs{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}}function Ys(e,t,n){return n instanceof qt?ea(e,t,n.terminalType,n):n instanceof Kt?function(e,t,n){const r=n.referencedRule,i=e.ruleToStartState.get(r),s=ra(e,t,n,{type:Ps}),a=ra(e,t,n,{type:Ps});return ia(s,new zs(i,r,a)),{left:s,right:a}}(e,t,n):n instanceof Xt?function(e,t,n){const r=ra(e,t,n,{type:Ps});Js(e,r);const i=(0,ft.A)(n.definition,(n=>Ys(e,t,n)));return Zs(e,t,r,n,...i)}(e,t,n):n instanceof Vt?function(e,t,n){const r=ra(e,t,n,{type:Ps});Js(e,r);return function(e,t,n,r){const i=r.left;return na(i,r.right),e.decisionMap[_s(t,"Option",n.idx)]=i,r}(e,t,n,Zs(e,t,r,n,Xs(e,t,n)))}(e,t,n):n instanceof zt?function(e,t,n){const r=ra(e,t,n,{type:Ds});Js(e,r);return Qs(e,t,n,Zs(e,t,r,n,Xs(e,t,n)))}(e,t,n):n instanceof Yt?function(e,t,n){const r=ra(e,t,n,{type:Ds});Js(e,r);return Qs(e,t,n,Zs(e,t,r,n,Xs(e,t,n)),ea(e,t,n.separator,n))}(e,t,n):n instanceof Ht?function(e,t,n){const r=ra(e,t,n,{type:Ms});Js(e,r);return qs(e,t,n,Zs(e,t,r,n,Xs(e,t,n)))}(e,t,n):n instanceof Wt?function(e,t,n){const r=ra(e,t,n,{type:Ms});Js(e,r);return qs(e,t,n,Zs(e,t,r,n,Xs(e,t,n)),ea(e,t,n.separator,n))}(e,t,n):Xs(e,t,n)}function Xs(e,t,n){const r=(0,Ln.A)((0,ft.A)(n.definition,(n=>Ys(e,t,n))),(e=>void 0!==e));return 1===r.length?r[0]:0===r.length?void 0:function(e,t){const n=t.length;for(let r=0;re.alt))}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function ca(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((e=>e.stateNumber.toString())).join("_")}`}var la=n(6452);const ua=function(e,t){return e&&e.length?(0,gn.A)(e,(0,wt.A)(t,2)):[]};function da(e,t){const n={};return r=>{const i=r.toString();let s=n[i];return void 0!==s||(s={atnStartState:e,decision:t,states:{}},n[i]=s),s}}class ha{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;nconsole.log(e)}initialize(e){this.atn=function(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(e,t){const n=t.length;for(let r=0;r(0,ft.A)(e,(e=>e[0]))));if(ma(l,!1)&&!i){const e=(0,wn.A)(l,((e,t,n)=>((0,ut.A)(t,(t=>{t&&(e[t.tokenTypeIdx]=n,(0,ut.A)(t.categoryMatches,(t=>{e[t]=n})))})),e)),{});return r?function(t){var n;const r=this.LA(1),i=e[r.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(n=t[i])||void 0===n?void 0:n.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){const t=new ha,n=void 0===e?0:e.length;for(let r=0;r(0,ft.A)(e,(e=>e[0]))));if(ma(l)&&l[0][0]&&!i){const e=l[0],t=(0,An.A)(e);if(1===t.length&&(0,ht.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,wn.A)(t,((e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,(0,ut.A)(t.categoryMatches,(t=>{e[t]=!0}))),e)),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=ga.call(this,s,c,fa,a);return"object"!=typeof e&&0===e}}}function ma(e,t=!0){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(void 0===i){if(t)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function ga(e,t,n,r){const i=e[t](n);let s=i.start;return void 0===s&&(s=xa(i,Ea(function(e){const t=new oa,n=e.transitions.length;for(let r=0;r0&&!function(e){for(const t of e.elements)if(t.state.type===Us)return!0;return!1}(s))for(const e of i)s.add(e);return s}(t.configs,n,i);if(0===a.size)return ka(e,t,n,aa),aa;let o=Ea(a);const c=function(e,t){let n;for(const r of e.elements)if(!0===t.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(a,i);if(void 0!==c)o.isAcceptState=!0,o.prediction=c,o.configs.uniqueAlt=c;else if(function(e){if(function(e){for(const t of e.elements)if(t.state.type!==Us)return!1;return!0}(e))return!0;const t=function(e){const t=new Map;for(const n of e){const e=ca(n,!1);let r=t.get(e);void 0===r&&(r={},t.set(e,r)),r[n.alt]=!0}return t}(e.elements);return function(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}(t)&&!function(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}(t)}(a)){const t=(0,la.A)(a.alts);o.isAcceptState=!0,o.prediction=t,o.configs.uniqueAlt=t,Ta.apply(this,[e,r,a.alts,s])}return o=ka(e,t,n,o),o}function Ta(e,t,n,r){const i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);const s=e.atnStartState;r(function(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.production.idx?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${function(e){if(e instanceof Kt)return"SUBRULE";if(e instanceof Vt)return"OPTION";if(e instanceof Xt)return"OR";if(e instanceof Ht)return"AT_LEAST_ONE";if(e instanceof Wt)return"AT_LEAST_ONE_SEP";if(e instanceof Yt)return"MANY_SEP";if(e instanceof zt)return"MANY";if(e instanceof qt)return"CONSUME";throw Error("non exhaustive match")}(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:s.rule,ambiguityIndices:n,production:s.production,prefixPath:i}))}function va(e,t,n){const r=ei(t.configs.elements,(e=>e.state.transitions));return{actualToken:n,possibleTokenTypes:ua(r.filter((e=>e instanceof Hs)).map((e=>e.tokenType)),(e=>e.tokenTypeIdx)),tokenPath:e}}function Ra(e,t){if(e instanceof Hs&&Xr(t,e.tokenType))return e.target}function Ea(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function ka(e,t,n,r){return r=xa(e,r),t.edges[n.tokenTypeIdx]=r,r}function xa(e,t){if(t===aa)return t;const n=t.configs.key,r=e.states[n];return void 0!==r?r:(t.configs.finalize(),e.states[n]=t,t)}function Ia(e,t){const n=e.state;if(n.type===Us){if(e.stack.length>0){const n=[...e.stack];Ia({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);const r=n.transitions.length;for(let i=0;i0&&(r.arguments=n),r},e.is=function(e){let t=e;return Zo.defined(t)&&Zo.string(t.title)&&Zo.string(t.command)}}(Ha||(Ha={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Zo.objectLiteral(t)&&Zo.string(t.newText)&&Oa.is(t.range)}}(Wa||(Wa={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Zo.objectLiteral(t)&&Zo.string(t.label)&&(Zo.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Zo.string(t.description)||void 0===t.description)}}(za||(za={})),function(e){e.is=function(e){const t=e;return Zo.string(t)}}(Ya||(Ya={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return Wa.is(t)&&(za.is(t.annotationId)||Ya.is(t.annotationId))}}(Xa||(Xa={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Zo.defined(t)&&ro.is(t.textDocument)&&Array.isArray(t.edits)}}(qa||(qa={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Zo.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Zo.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Zo.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ya.is(t.annotationId))}}(Qa||(Qa={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Zo.string(t.oldUri)&&Zo.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Zo.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Zo.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ya.is(t.annotationId))}}(Ja||(Ja={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Zo.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Zo.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Zo.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Ya.is(t.annotationId))}}(Za||(Za={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Zo.string(e.kind)?Qa.is(e)||Ja.is(e)||Za.is(e):qa.is(e))))}}(eo||(eo={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Zo.defined(t)&&Zo.string(t.uri)}}(to||(to={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Zo.defined(t)&&Zo.string(t.uri)&&Zo.integer(t.version)}}(no||(no={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Zo.defined(t)&&Zo.string(t.uri)&&(null===t.version||Zo.integer(t.version))}}(ro||(ro={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Zo.defined(t)&&Zo.string(t.uri)&&Zo.string(t.languageId)&&Zo.integer(t.version)&&Zo.string(t.text)}}(io||(io={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(so||(so={})),function(e){e.is=function(e){const t=e;return Zo.objectLiteral(e)&&so.is(t.kind)&&Zo.string(t.value)}}(ao||(ao={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(oo||(oo={})),function(e){e.PlainText=1,e.Snippet=2}(co||(co={})),function(e){e.Deprecated=1}(lo||(lo={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Zo.string(t.newText)&&Oa.is(t.insert)&&Oa.is(t.replace)}}(uo||(uo={})),function(e){e.asIs=1,e.adjustIndentation=2}(ho||(ho={})),function(e){e.is=function(e){const t=e;return t&&(Zo.string(t.detail)||void 0===t.detail)&&(Zo.string(t.description)||void 0===t.description)}}(fo||(fo={})),function(e){e.create=function(e){return{label:e}}}(po||(po={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(mo||(mo={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Zo.string(t)||Zo.objectLiteral(t)&&Zo.string(t.language)&&Zo.string(t.value)}}(go||(go={})),function(e){e.is=function(e){let t=e;return!!t&&Zo.objectLiteral(t)&&(ao.is(t.contents)||go.is(t.contents)||Zo.typedArray(t.contents,go.is))&&(void 0===e.range||Oa.is(e.range))}}(yo||(yo={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Ao||(Ao={})),function(e){e.create=function(e,t,...n){let r={label:e};return Zo.defined(t)&&(r.documentation=t),Zo.defined(n)?r.parameters=n:r.parameters=[],r}}(To||(To={})),function(e){e.Text=1,e.Read=2,e.Write=3}(vo||(vo={})),function(e){e.create=function(e,t){let n={range:e};return Zo.number(t)&&(n.kind=t),n}}(Ro||(Ro={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Eo||(Eo={})),function(e){e.Deprecated=1}(ko||(ko={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(xo||(xo={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(Io||(Io={})),function(e){e.create=function(e,t,n,r,i,s){let a={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(a.children=s),a},e.is=function(e){let t=e;return t&&Zo.string(t.name)&&Zo.number(t.kind)&&Oa.is(t.range)&&Oa.is(t.selectionRange)&&(void 0===t.detail||Zo.string(t.detail))&&(void 0===t.deprecated||Zo.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(So||(So={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(No||(No={})),function(e){e.Invoked=1,e.Automatic=2}(Co||(Co={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Zo.defined(t)&&Zo.typedArray(t.diagnostics,Va.is)&&(void 0===t.only||Zo.typedArray(t.only,Zo.string))&&(void 0===t.triggerKind||t.triggerKind===Co.Invoked||t.triggerKind===Co.Automatic)}}($o||($o={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):Ha.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Zo.string(t.title)&&(void 0===t.diagnostics||Zo.typedArray(t.diagnostics,Va.is))&&(void 0===t.kind||Zo.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Ha.is(t.command))&&(void 0===t.isPreferred||Zo.boolean(t.isPreferred))&&(void 0===t.edit||eo.is(t.edit))}}(wo||(wo={})),function(e){e.create=function(e,t){let n={range:e};return Zo.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Zo.defined(t)&&Oa.is(t.range)&&(Zo.undefined(t.command)||Ha.is(t.command))}}(Lo||(Lo={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Zo.defined(t)&&Zo.uinteger(t.tabSize)&&Zo.boolean(t.insertSpaces)}}(Oo||(Oo={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Zo.defined(t)&&Oa.is(t.range)&&(Zo.undefined(t.target)||Zo.string(t.target))}}(bo||(bo={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Zo.objectLiteral(n)&&Oa.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(_o||(_o={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Po||(Po={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Mo||(Mo={})),function(e){e.is=function(e){const t=e;return Zo.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Do||(Do={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&Oa.is(t.range)&&Zo.string(t.text)}}(Uo||(Uo={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&Oa.is(t.range)&&Zo.boolean(t.caseSensitiveLookup)&&(Zo.string(t.variableName)||void 0===t.variableName)}}(Fo||(Fo={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&Oa.is(t.range)&&(Zo.string(t.expression)||void 0===t.expression)}}(Go||(Go={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Zo.defined(t)&&Oa.is(e.stoppedLocation)}}(Ko||(Ko={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Bo||(Bo={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Zo.objectLiteral(t)&&(void 0===t.tooltip||Zo.string(t.tooltip)||ao.is(t.tooltip))&&(void 0===t.location||ba.is(t.location))&&(void 0===t.command||Ha.is(t.command))}}(jo||(jo={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Zo.objectLiteral(t)&&La.is(t.position)&&(Zo.string(t.label)||Zo.typedArray(t.label,jo.is))&&(void 0===t.kind||Bo.is(t.kind))&&void 0===t.textEdits||Zo.typedArray(t.textEdits,Wa.is)&&(void 0===t.tooltip||Zo.string(t.tooltip)||ao.is(t.tooltip))&&(void 0===t.paddingLeft||Zo.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Zo.boolean(t.paddingRight))}}(Vo||(Vo={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Ho||(Ho={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Wo||(Wo={})),function(e){e.create=function(e){return{items:e}}}(zo||(zo={})),function(e){e.Invoked=0,e.Automatic=1}(Yo||(Yo={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Xo||(Xo={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(qo||(qo={})),function(e){e.is=function(e){const t=e;return Zo.objectLiteral(t)&&Ca.is(t.uri)&&Zo.string(t.name)}}(Qo||(Qo={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let a=0,o=0,c=0;for(;a{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],a=e.offsetAt(n.range.start),o=e.offsetAt(n.range.end);if(!(o<=s))throw new Error("Overlapping edit");r=r.substring(0,a)+n.newText+r.substring(o,r.length),s=a}return r}}(Jo||(Jo={}));class ec{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return La.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return La.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1=0&&t.content.splice(n,1)}}construct(e){const t=this.current;"string"==typeof e.$type&&(this.current.astNode=e),e.$cstNode=t;const n=this.nodeStack.pop();0===(null==n?void 0:n.content.length)&&this.removeNode(n)}addHiddenTokens(e){for(const t of e){const e=new rc(t.startOffset,t.image.length,T(t),t.tokenType,!0);e.root=this.rootNode,this.addHiddenToken(this.rootNode,e)}}addHiddenToken(e,t){const{offset:n,end:r}=t;for(let i=0;ia&&r=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class sc extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,sc.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(const t of e)t.container=this.parent}}class ac extends ic{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=null!=e?e:""}}const oc=Symbol("Datatype");function cc(e){return e.$type===oc}const lc=e=>e.endsWith("​")?e:e+"​";class uc{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new gc(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class dc extends uc{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new tc,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const n=e.fragment?void 0:tt(e)?oc:it(e),r=this.wrapper.DEFINE_RULE(lc(e.name),this.startImplementation(n,t).bind(this));return e.entry&&(this.mainRule=r),r}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return n=>{if(!this.isRecording()){const t={$type:e};this.stack.push(t),e===oc&&(t.value="")}let r;try{r=t(n)}catch(e){r=void 0}return this.isRecording()||void 0!==r||(r=this.construct()),r}}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.nodeBuilder.buildLeafNode(r,n),{assignment:t,isCrossRef:i}=this.getAssignment(n),s=this.current;if(t){const s=ae(n)?r.image:this.converter.convert(r.image,e);this.assign(t.operator,t.feature,s,e,i)}else if(cc(s)){let t=r.image;ae(n)||(t=this.converter.convert(t,e).toString()),s.value+=t}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,n,r){let i;this.isRecording()||(i=this.nodeBuilder.buildCompositeNode(n));const s=this.wrapper.wrapSubrule(e,t,r);!this.isRecording()&&i&&i.length>0&&this.performSubruleAssignment(s,n,i)}performSubruleAssignment(e,t,n){const{assignment:r,isCrossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){const t=this.current;if(cc(t))t.value+=e.toString();else if("object"==typeof e&&e){const n=e.$type,r=this.assignWithoutOverride(e,t);n&&(r.$type=n);const i=r;this.stack.pop(),this.stack.push(i)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&t.feature&&t.operator){n=this.construct(!1);const e=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(e)}const r={$type:e};this.stack.pop(),this.stack.push(r),t.feature&&t.operator&&this.assign(t.operator,t.feature,n,n.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;const t=this.current;return function(e){for(const[t,n]of Object.entries(e))t.startsWith("$")||(Array.isArray(n)?n.forEach(((n,i)=>{r(n)&&(n.$container=e,n.$containerProperty=t,n.$containerIndex=i)})):r(n)&&(n.$container=e,n.$containerProperty=t))}(t),this.nodeBuilder.construct(t),e&&this.stack.pop(),cc(t)?this.converter.convert(t.value,t.$cstNode):(function(e,t){const n=e.getTypeMetaData(t.$type),r=t;for(const e of n.properties)void 0!==e.defaultValue&&void 0===r[e.name]&&(r[e.name]=Ce(e.defaultValue))}(this.astReflection,t),t)}getAssignment(e){if(!this.assignmentMap.has(e)){const t=Re(e,J);this.assignmentMap.set(e,{assignment:t,isCrossRef:!!t&&te(t.terminal)})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let a;switch(a=i&&"string"==typeof n?this.linker.buildReference(s,t,r,n):n,e){case"=":s[t]=a;break;case"?=":s[t]=!0;break;case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(a)}}assignWithoutOverride(e,t){for(const[n,r]of Object.entries(t)){const t=e[n];void 0===t?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class hc{buildMismatchTokenMessage(e){return qr.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return qr.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return qr.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return qr.buildEarlyExitMessage(e)}}class fc extends hc{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class pc extends uc{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e);return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(lc(e.name),this.startImplementation(t).bind(this));return e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r){this.before(n),this.wrapper.wrapSubrule(e,t,r),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const mc={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new fc};class gc extends bs{constructor(e,t){const n=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},mc),{lookaheadStrategy:n?new as({maxLookahead:t.maxLookahead}):new pa}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function yc(e,t,n){return function(e,t){const n=Xe(t,!1),r=p(t.rules).filter(G).filter((e=>n.has(e)));for(const t of r){const n=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});n.rules.set(t.name,e.parser.rule(t,Ac(n,t.definition)))}}({parser:t,tokens:n,rules:new Map,ruleNames:new Map},e),t}function Ac(e,t,n=!1){let r;if(ae(t))r=function(e,t){const n=e.consume++,r=e.tokens[t.value];if(!r)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(n,r,t)}(e,t);else if(Y(t))r=function(e,t){const n=it(t);return()=>e.parser.action(n,t)}(e,t);else if(J(t))r=Ac(e,t.terminal);else if(te(t))r=Rc(e,t);else if(ue(t))r=function(e,t){const n=t.rule.ref;if(G(n)){const r=e.subrule++,i=t.arguments.length>0?function(e,t){const n=t.map((e=>Tc(e.value)));return t=>{const r={};for(let i=0;i({});return s=>e.parser.subrule(r,kc(e,n),t,i(s))}if(V(n)){const r=e.consume++,i=xc(e,n.name);return()=>e.parser.consume(r,i,t)}if(!n)throw new k(t.$cstNode,`Undefined rule type: ${t.$type}`);x()}(e,t);else if(q(t))r=function(e,t){if(1===t.elements.length)return Ac(e,t.elements[0]);{const n=[];for(const r of t.elements){const t={ALT:Ac(e,r,!0)},i=vc(r);i&&(t.GATE=Tc(i)),n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map((e=>{const n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n})))}}(e,t);else if(ge(t))r=function(e,t){if(1===t.elements.length)return Ac(e,t.elements[0]);const n=[];for(const r of t.elements){const t={ALT:Ac(e,r,!0)},i=vc(r);i&&(t.GATE=Tc(i)),n.push(t)}const r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,s=Ec(e,vc(t),(t=>e.parser.alternatives(r,n.map(((n,s)=>{const a={ALT:()=>!0},o=e.parser;a.ALT=()=>{if(n.ALT(t),!o.isRecording()){const e=i(r,o);o.unorderedGroups.get(e)||o.unorderedGroups.set(e,[]);const t=o.unorderedGroups.get(e);void 0===(null==t?void 0:t[s])&&(t[s]=!0)}};const c=n.GATE;return a.GATE=c?()=>c(t):()=>{const e=o.unorderedGroups.get(i(r,o));return!(null==e?void 0:e[s])},a})))),"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}(e,t);else if(ie(t))r=function(e,t){const n=t.elements.map((t=>Ac(e,t)));return e=>n.forEach((t=>t(e)))}(e,t);else{if(i=t,!ve.isInstance(i,ne))throw new k(t.$cstNode,`Unexpected element type: ${t.$type}`);{const n=e.consume++;r=()=>e.parser.consume(n,zr,t)}}var i;return Ec(e,n?void 0:vc(t),r,t.cardinality)}function Tc(e){if(t=e,ve.isInstance(t,O)){const t=Tc(e.left),n=Tc(e.right);return e=>t(e)||n(e)}if(function(e){return ve.isInstance(e,L)}(e)){const t=Tc(e.left),n=Tc(e.right);return e=>t(e)&&n(e)}if(function(e){return ve.isInstance(e,D)}(e)){const t=Tc(e.value);return e=>!t(e)}if(function(e){return ve.isInstance(e,U)}(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(function(e){return ve.isInstance(e,w)}(e)){const t=Boolean(e.true);return()=>t}var t;x()}function vc(e){if(ie(e))return e.guardCondition}function Rc(e,t,n=t.terminal){if(n){if(ue(n)&&G(n.rule.ref)){const r=e.subrule++;return i=>e.parser.subrule(r,kc(e,n.rule.ref),t,i)}if(ue(n)&&V(n.rule.ref)){const r=e.consume++,i=xc(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(ae(n)){const r=e.consume++,i=xc(e,n.value);return()=>e.parser.consume(r,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const n=Ze(t.type.ref),r=null==n?void 0:n.terminal;if(!r)throw new Error("Could not find name assignment for type: "+it(t.type.ref));return Rc(e,t,r)}}function Ec(e,t,n,r){const i=t&&Tc(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:Ls(),GATE:()=>!i(r)}])}return n}if("*"===r){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:Ls(),GATE:()=>!i(s)}])}return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}if("?"===r){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}x()}function kc(e,t){const n=function(e,t){if(G(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!G(r);)(ie(r)||q(r)||ge(r))&&(i=r.elements.indexOf(n).toString()+":"+i),n=r,r=r.$container;return i=r.name+":"+i,e.ruleNames.set(t,i),i}}(e,t),r=e.rules.get(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function xc(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}class Ic{buildTokens(e,t){const n=p(Xe(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return r.forEach((e=>{const t=e.PATTERN;"object"==typeof t&&t&&"test"in t&&ze(t)?i.unshift(e):i.push(e)})),i}buildTerminalTokens(e){return e.filter(V).filter((e=>!e.fragment)).map((e=>this.buildTerminalToken(e))).toArray()}buildTerminalToken(e){const t=st(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n,LINE_BREAKS:!0};return e.hidden&&(r.GROUP=ze(t)?Pr.SKIPPED:"hidden"),r}requiresCustomPattern(e){return!!e.flags.includes("u")||!(!e.source.includes("?<=")&&!e.source.includes("?(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(G).flatMap((e=>xe(e).filter(ae))).distinct((e=>e.value)).toArray().sort(((e,t)=>t.value.length-e.value.length)).map((e=>this.buildKeywordToken(e,t,Boolean(null==n?void 0:n.caseInsensitive))))}buildKeywordToken(e,t,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(function(e){return Array.prototype.map.call(e,(e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Ye(e))).join("")}(e.value)):e.value}findLongerAlt(e,t){return t.reduce(((t,n)=>{const r=null==n?void 0:n.PATTERN;return(null==r?void 0:r.source)&&function(e,t){const n=function(e){"string"==typeof e&&(e=new RegExp(e));const t=e,n=e.source;let r=0;return new RegExp(function e(){let i,s="";function a(e){s+=n.substr(r,e),r+=e}function o(e){s+="(?:"+n.substr(r,e)+"|$)",r+=e}for(;r",r)-r+1);break;default:o(2)}break;case"[":i=/\[(?:\\.|.)*?\]/g,i.lastIndex=r,i=i.exec(n)||[],o(i[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":a(1);break;case"{":i=/\{\d+,?\d*\}/g,i.lastIndex=r,i=i.exec(n),i?a(i[0].length):o(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":s+="(?:",r+=3,s+=e()+"|$)";break;case"=":s+="(?=",r+=3,s+=e()+")";break;case"!":i=r,r+=3,e(),s+=n.substr(i,r-i);break;case"<":switch(n[r+3]){case"=":case"!":i=r,r+=4,e(),s+=n.substr(i,r-i);break;default:a(n.indexOf(">",r)-r+1),s+=e()+"|$)"}}else a(1),s+=e()+"|$)";break;case")":return++r,s;default:o(1)}return s}(),e.flags)}(e),r=t.match(n);return!!r&&r[0].length>0}("^"+r.source+"$",e.value)&&t.push(n),t}),[])}}class Sc{convert(e,t){let n=t.grammarSource;if(te(n)&&(n=function(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=Ze(e.type.ref);return null==t?void 0:t.terminal}}(n)),ue(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,e,t)}return e}runConverter(e,t,n){var r;switch(e.name.toUpperCase()){case"INT":return Nc.convertInt(t);case"STRING":return Nc.convertString(t);case"ID":return Nc.convertID(t)}switch(null===(r=function(e){var t,n,r;return V(e)?null!==(n=null===(t=e.type)||void 0===t?void 0:t.name)&&void 0!==n?n:"string":tt(e)?e.name:null!==(r=rt(e))&&void 0!==r?r:e.name}(e))||void 0===r?void 0:r.toLowerCase()){case"number":return Nc.convertNumber(t);case"boolean":return Nc.convertBoolean(t);case"bigint":return Nc.convertBigint(t);case"date":return Nc.convertDate(t);default:return t}}}var Nc;!function(e){function t(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}e.convertString=function(e){let n="";for(let r=1;r=10&&($c=t,await new Promise((e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)}))),e.isCancellationRequested)throw wc}class bc{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)}))}}class _c{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if(_c.isIncremental(t)){const e=Gc(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let a=this._lineOffsets;const o=Uc(t.text,!1,n);if(s-i===o.length)for(let e=0,t=o.length;ee?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1t&&Fc(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var Pc,Mc;function Dc(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Dc(r,t),Dc(i,t);let s=0,a=0,o=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Kc(e){const t=Gc(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new _c(e,t,n,r)},e.update=function(e,t,n){if(e instanceof _c)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=Dc(t.map(Kc),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let i=0;const s=[];for(const t of r){const r=e.offsetAt(t.range.start);if(ri&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")}}(Pc||(Pc={})),(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,a=0,o=0;o<=e.length;++o){if(o2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=o,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=o,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,o):r=e.slice(s+1,o),i=o-s-1;s=o,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(r=a+"/"+r,i=47===a.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;il){if(47===n.charCodeAt(o+d))return n.slice(o+d+1);if(0===d)return n.slice(o+d)}else a>l&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var h=e.charCodeAt(i+d);if(h!==n.charCodeAt(o+d))break;47===h&&(u=d)}var f="";for(d=i+u+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(o+u):(o+=u,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!s){i=a;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var o=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!a){i=r+1;break}}else-1===c&&(a=!1,c=r+1),o>=0&&(l===n.charCodeAt(o)?-1==--o&&(s=r):(o=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){i=r+1;break}}else-1===s&&(a=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,a=0,o=e.length-1;o>=0;--o){var c=e.charCodeAt(o);if(47!==c)-1===i&&(s=!1,i=o+1),46===c?-1===n?n=o:1!==a&&(a=1):-1!==n&&(a=-1);else if(!s){r=o+1;break}}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var a=-1,o=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===a?a=u:1!==d&&(d=1):-1!==a&&(d=-1);else if(!l){o=u+1;break}return-1===a||-1===c||0===d||1===d&&a===c-1&&a===o+1?-1!==c&&(n.base=n.name=0===o&&s?e.slice(1,c):e.slice(o,c)):(0===o&&s?(n.name=e.slice(1,a),n.base=e.slice(1,c)):(n.name=e.slice(o,a),n.base=e.slice(o,c)),n.ext=e.slice(a,c)),o>0?n.dir=e.slice(0,o-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>u,Utils:()=>x}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function a(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const o="",c="/",l=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||o,this.authority=e.authority||o,this.path=e.path||o,this.query=e.query||o,this.fragment=e.fragment||o):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||o,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||o),this.query=r||o,this.fragment=i||o,a(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=o),void 0===n?n=this.authority:null===n&&(n=o),void 0===r?r=this.path:null===r&&(r=o),void 0===i?i=this.query:null===i&&(i=o),void 0===s?s=this.fragment:null===s&&(s=o),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new h(t,n,r,i,s)}static parse(e,t=!1){const n=l.exec(e);return n?new h(n[2]||o,v(n[4]||o),v(n[5]||o),v(n[7]||o),v(n[9]||o),t):new h(o,o,o,o,o)}static file(t){let n=o;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new h("file",n,t,o,o)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return a(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class h extends u{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||n&&91===a||n&&93===a||n&&58===a)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=f[a];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function m(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?m:p;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=c,r+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){const e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){const e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=t?l:p(l,!1,!1)),r}function A(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+A(e.substr(3)):e}}const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(T)?e.replace(T,(e=>A(e))):e}var R=n(470);const E=R.posix||R,k="/";var x;!function(e){e.joinPath=function(e,...t){return e.with({path:E.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let i=E.resolve(n,...t);return r&&i[0]===k&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=E.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return E.basename(e.path)},e.extname=function(e){return E.extname(e.path)}}(x||(x={}))})(),Mc=r})();const{URI:Bc,Utils:jc}=Mc;var Vc,Hc,Wc,zc,Yc;!function(e){e.basename=jc.basename,e.dirname=jc.dirname,e.extname=jc.extname,e.joinPath=jc.joinPath,e.resolvePath=jc.resolvePath,e.equals=function(e,t){return(null==e?void 0:e.toString())===(null==t?void 0:t.toString())},e.relative=function(e,t){const n="string"==typeof e?e:e.path,r="string"==typeof t?t:t.path,i=n.split("/").filter((e=>e.length>0)),s=r.split("/").filter((e=>e.length>0));let a=0;for(;anull!=r?r:r=Pc.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,null!=t?t:"")}}class qc{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return p(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then((e=>(this.addDocument(e),e)));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString(),n=this.documentMap.get(t);return n&&(n.state=Hc.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(e){const t=e.toString(),n=this.documentMap.get(t);return n&&(n.state=Hc.Changed,this.documentMap.delete(t)),n}}class Qc{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=Cc.XO.None){for(const n of Ie(e.parseResult.value))await Oc(t),Ne(n).forEach((t=>this.doLink(t,e)))}doLink(e,t){const n=e.reference;if(void 0===n._ref)try{const t=this.getCandidate(e);if(s(t))n._ref=t;else if(n._nodeDescription=t,this.langiumDocuments().hasDocument(t.documentUri)){const r=this.loadAstNode(t);n._ref=null!=r?r:this.createLinkingError(e,t)}}catch(t){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${t}`})}t.references.push(n)}unlink(e){for(const t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){const t=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return null!=t?t:this.createLinkingError(e)}buildReference(e,t,n,i){const a=this,o={$refNode:n,$refText:i,get ref(){var n,i;if(r(this._ref))return this._ref;if("object"==typeof(i=this._nodeDescription)&&null!==i&&"string"==typeof i.name&&"string"==typeof i.type&&"string"==typeof i.path){const n=a.loadAstNode(this._nodeDescription);this._ref=null!=n?n:a.createLinkingError({reference:o,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){const r=a.getLinkedNode({reference:o,container:e,property:t});if(r.error&&Ee(e).state=e.end)return t.ref}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||function(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}(e,t)))return n}}}findDeclarationNode(e){const t=this.findDeclaration(e);if(null==t?void 0:t.$cstNode){const e=this.nameProvider.getNameNode(t);return null!=e?e:t.$cstNode}}findReferences(e,t){const n=[];if(t.includeDeclaration){const t=this.getReferenceToSelf(e);t&&n.push(t)}let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter((e=>Vc.equals(e.sourceUri,t.documentUri)))),n.push(...r),p(n)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const n=Ee(e),r=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:r,targetUri:n.uri,targetPath:r,segment:v(t),local:!0}}}}class el{constructor(e){if(this.map=new Map,e)for(const[t,n]of e)this.add(t,n)}get size(){return g.sum(p(this.map.values()).map((e=>e.length)))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0)return 1===n.length?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){var t;return null!==(t=this.map.get(e))&&void 0!==t?t:[]}has(e,t){if(void 0===t)return this.map.has(e);{const n=this.map.get(e);return!!n&&n.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach(((t,n)=>t.forEach((t=>e(t,n,this)))))}[Symbol.iterator](){return this.entries().iterator()}entries(){return p(this.map.entries()).flatMap((([e,t])=>t.map((t=>[e,t]))))}keys(){return p(this.map.keys())}values(){return p(this.map.values()).flat()}entriesGroupedByKey(){return p(this.map.entries())}}class tl{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}class nl{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=Cc.XO.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,n=ke,r=Cc.XO.None){const i=[];this.exportNode(e,i,t);for(const s of n(e))await Oc(r),this.exportNode(s,i,t);return i}exportNode(e,t,n){const r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async computeLocalScopes(e,t=Cc.XO.None){const n=e.parseResult.value,r=new el;for(const i of xe(n))await Oc(t),this.processNode(i,e,r);return r}processNode(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}}class rl{constructor(e,t,n){var r;this.elements=e,this.outerScope=t,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find((t=>t.name.toLowerCase()===e.toLowerCase())):this.elements.find((t=>t.name===e)))||(this.outerScope?this.outerScope.getElement(e):void 0)}}class il{constructor(e,t,n){var r;this.elements=new Map,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r;for(const t of e){const e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)||(this.outerScope?this.outerScope.getElement(e):void 0)}getAllElements(){let e=p(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class sl{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach((e=>e.dispose()))}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class al extends sl{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class ol extends sl{constructor(e){super(),this.cache=new Map,this.converter=null!=e?e:e=>e}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){const e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}}class cl extends al{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate((()=>{this.clear()})))}}class ll{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new cl(e.shared)}getScope(e){const t=[],n=this.reflection.getReferenceType(e),r=Ee(e.container).precomputedScopes;if(r){let i=e.container;do{const e=r.get(i);e.length>0&&t.push(p(e).filter((e=>this.reflection.isSubtype(e.type,n)))),i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new rl(p(e),t,n)}createScopeForNodes(e,t,n){const r=p(e).map((e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)})).nonNullable();return new rl(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,(()=>new il(this.indexManager.allElements(e))))}}function ul(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}class dl{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const n=null==t?void 0:t.replacer,r=(e,n)=>this.replacer(e,n,t),i=n?(e,t)=>n(e,t,r):r;try{return this.currentDocument=Ee(e),JSON.stringify(e,i,null==t?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t={}){const n=JSON.parse(e);return this.linkNode(n,n,t),n}replacer(e,t,{refText:n,sourceText:s,textRegions:a,comments:o,uriConverter:c}){var l,u,d,h;if(!this.ignoreProperties.has(e)){if(i(t)){const e=t.ref,r=n?t.$refText:void 0;if(e){const n=Ee(e);let i="";return this.currentDocument&&this.currentDocument!==n&&(i=c?c(n.uri,t):n.uri.toString()),{$ref:`${i}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:r}}return{$error:null!==(u=null===(l=t.error)||void 0===l?void 0:l.message)&&void 0!==u?u:"Could not resolve reference",$refText:r}}if(r(t)){let n;if(a&&(n=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t)),e&&!t.$document||!(null==n?void 0:n.$textRegion)||(n.$textRegion.documentURI=null===(d=this.currentDocument)||void 0===d?void 0:d.uri.toString())),s&&!e&&(null!=n||(n=Object.assign({},t)),n.$sourceText=null===(h=t.$cstNode)||void 0===h?void 0:h.text),o){null!=n||(n=Object.assign({},t));const e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,""))}return null!=n?n:t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter((e=>!e.startsWith("$"))).forEach((r=>{const i=function(e,t){return e&&t?Je(e,t,e.astNode,!0):[]}(e.$cstNode,r).map(t);0!==i.length&&(n[r]=i)})),e}}linkNode(e,t,n,i,s,a){for(const[i,s]of Object.entries(e))if(Array.isArray(s))for(let a=0;a{try{await e.call(t,n,r,i)}catch(e){if(Lc(e))throw e;console.error("An error occurred during validation:",e);const t=e instanceof Error?e.message:String(e);e instanceof Error&&e.stack&&console.error(e.stack),r("error","An error occurred during validation: "+t,{node:n})}}}addEntry(e,t){if("AstNode"!==e)for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,t);else this.entries.add("AstNode",t)}getChecks(e,t){let n=p(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(n=n.filter((e=>t.includes(e.category)))),n.map((e=>e.check))}}class ml{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},n=Cc.XO.None){const r=e.parseResult,i=[];if(await Oc(n),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===zc.LexingError})))return i;if(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===zc.ParsingError})))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===zc.LinkingError})))return i}try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(Lc(e))throw e;console.error("An error occurred during validation:",e)}return await Oc(n),i}processLexingErrors(e,t,n){for(const n of e.lexerErrors){const e={severity:yl("error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:fl(zc.LexingError),source:this.getSource()};t.push(e)}}processParsingErrors(e,t,n){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=T(n.token);if(e){const r={severity:yl("error"),range:e,message:n.message,data:fl(zc.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(const n of e.references){const e=n.error;if(e){const n={node:e.container,property:e.property,index:e.index,data:{code:zc.LinkingError,containerType:e.container.$type,property:e.property,refText:e.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=Cc.XO.None){const r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await Promise.all(Ie(e).map((async e=>{await Oc(n);const r=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of r)await t(e,i,n)}))),r}toDiagnostic(e,t,n){return{message:t,range:gl(n),severity:yl(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function gl(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=Qe(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=function(e,t,n){if(!e)return;const r=function(e,t,n){if(e.astNode!==n)return[];if(ae(e.grammarSource)&&e.grammarSource.value===t)return[e];const r=A(e).iterator();let i;const s=[];do{if(i=r.next(),!i.done){const e=i.value;e.astNode===n?ae(e.grammarSource)&&e.grammarSource.value===t&&s.push(e):r.prune()}}while(!i.done);return s}(e,t,null==e?void 0:e.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}(e.node.$cstNode,e.keyword,e.index)),null!=t||(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function yl(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}!function(e){e.LexingError="lexing-error",e.ParsingError="parsing-error",e.LinkingError="linking-error"}(zc||(zc={}));class Al{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n=Ee(e)){null!=t||(t=this.nameProvider.getName(e));const r=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${r} has no name.`);let i;const s=()=>{var t;return null!=i?i:i=v(null!==(t=this.nameProvider.getNameNode(e))&&void 0!==t?t:e.$cstNode)};return{node:e,name:t,get nameSegment(){return s()},selectionSegment:v(e.$cstNode),type:e.$type,documentUri:n.uri,path:r}}}class Tl{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Cc.XO.None){const n=[],r=e.parseResult.value;for(const e of Ie(r))await Oc(t),Ne(e).filter((e=>!s(e))).forEach((e=>{const t=this.createDescription(e);t&&n.push(t)}));return n}createDescription(e){const t=e.reference.$nodeDescription,n=e.reference.$refNode;if(!t||!n)return;const r=Ee(e.container).uri;return{sourceUri:r,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:v(n),local:Vc.equals(t.documentUri,r)}}}class vl{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce(((e,t)=>{if(!e||0===t.length)return e;const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n),i=parseInt(t.substring(n+1)),s=e[r];return null==s?void 0:s[i]}return e[t]}),e)}}class Rl{constructor(e){this._ready=new bc,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,n;this.workspaceConfig=null!==(n=null===(t=e.capabilities.workspace)||void 0===t?void 0:t.configuration)&&void 0!==n&&n}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map((e=>this.toSectionName(e.LanguageMetaData.languageId)))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map((e=>({section:this.toSectionName(e.LanguageMetaData.languageId)}))),n=await e.fetchConfiguration(t);t.forEach(((e,t)=>{this.updateSectionConfiguration(e.section,n[t])}))}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach((t=>{this.updateSectionConfiguration(t,e.settings[t])}))}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}}!function(e){e.create=function(e){return{dispose:async()=>await e()}}}(Yc||(Yc={}));class El{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new el,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Hc.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Cc.XO.None){var r,i;for(const n of e){const e=n.uri.toString();if(n.state===Hc.Validated){if("boolean"==typeof t.validation&&t.validation)n.state=Hc.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(e);else if("object"==typeof t.validation){const s=this.buildState.get(e),a=null===(r=null==s?void 0:s.result)||void 0===r?void 0:r.validationChecks;if(a){const r=(null!==(i=t.validation.categories)&&void 0!==i?i:Wc.all).filter((e=>!a.includes(e)));r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:Object.assign(Object.assign({},t.validation),{categories:r})},result:s.result}),n.state=Hc.IndexedReferences)}}}else this.buildState.delete(e)}this.currentState=Hc.Changed,await this.emitUpdate(e.map((e=>e.uri)),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Cc.XO.None){this.currentState=Hc.Changed;for(const e of t)this.langiumDocuments.deleteDocument(e),this.buildState.delete(e.toString()),this.indexManager.remove(e);for(const t of e){if(!this.langiumDocuments.invalidateDocument(t)){const e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},t);e.state=Hc.Changed,this.langiumDocuments.addDocument(e)}this.buildState.delete(t.toString())}const r=p(e).concat(t).map((e=>e.toString())).toSet();this.langiumDocuments.all.filter((e=>!r.has(e.uri.toString())&&this.shouldRelink(e,r))).forEach((e=>{this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e),e.state=Math.min(e.state,Hc.ComputedScopes),e.diagnostics=void 0})),await this.emitUpdate(e,t),await Oc(n);const i=this.langiumDocuments.all.filter((e=>{var t;return e.staten(e,t))))}shouldRelink(e,t){return!!e.references.some((e=>void 0!==e.error))||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),Yc.create((()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)}))}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Hc.Parsed,n,(e=>this.langiumDocumentFactory.update(e,n))),await this.runCancelable(e,Hc.IndexedContent,n,(e=>this.indexManager.updateContent(e,n))),await this.runCancelable(e,Hc.ComputedScopes,n,(async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,n)})),await this.runCancelable(e,Hc.Linked,n,(e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n))),await this.runCancelable(e,Hc.IndexedReferences,n,(e=>this.indexManager.updateReferences(e,n)));const r=e.filter((e=>this.shouldValidate(e)));await this.runCancelable(r,Hc.Validated,n,(e=>this.validate(e,n)));for(const t of e){const e=this.buildState.get(t.uri.toString());e&&(e.completed=!0)}}prepareBuild(e,t){for(const n of e){const e=n.uri.toString(),r=this.buildState.get(e);r&&!r.completed||this.buildState.set(e,{completed:!1,options:t,result:null==r?void 0:r.result})}}async runCancelable(e,t,n,r){const i=e.filter((e=>e.state{this.buildPhaseListeners.delete(e,t)}))}waitUntil(e,t,n){let r;if(t&&"path"in t?r=t:n=t,null!=n||(n=Cc.XO.None),r){const t=this.langiumDocuments.getDocument(r);if(t&&t.state>e)return Promise.resolve(r)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(wc):new Promise(((t,i)=>{const s=this.onBuildPhase(e,(()=>{if(s.dispose(),a.dispose(),r){const e=this.langiumDocuments.getDocument(r);t(null==e?void 0:e.uri)}else t(void 0)})),a=n.onCancellationRequested((()=>{s.dispose(),a.dispose(),i(wc)}))}))}async notifyBuildPhase(e,t,n){if(0===e.length)return;const r=this.buildPhaseListeners.get(t);for(const t of r)await Oc(n),await t(e,n)}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){var n,r;const i=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,a="object"==typeof s?s:void 0,o=await i.validateDocument(e,a,t);e.diagnostics?e.diagnostics.push(...o):e.diagnostics=o;const c=this.buildState.get(e.uri.toString());if(c){null!==(n=c.result)&&void 0!==n||(c.result={});const e=null!==(r=null==a?void 0:a.categories)&&void 0!==r?r:Wc.all;c.result.validationChecks?c.result.validationChecks.push(...e):c.result.validationChecks=[...e]}}getBuildOptions(e){var t,n;return null!==(n=null===(t=this.buildState.get(e.uri.toString()))||void 0===t?void 0:t.options)&&void 0!==n?n:{}}}class kl{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new ol,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const n=Ee(e).uri,r=[];return this.referenceIndex.forEach((e=>{e.forEach((e=>{Vc.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)}))})),p(r)}allElements(e,t){let n=p(this.symbolIndex.keys());return t&&(n=n.filter((e=>!t||t.has(e)))),n.map((t=>this.getFileDescriptions(t,e))).flat()}getFileDescriptions(e,t){var n;if(!t)return null!==(n=this.symbolIndex.get(e))&&void 0!==n?n:[];const r=this.symbolByTypeIndex.get(e,t,(()=>{var n;return(null!==(n=this.symbolIndex.get(e))&&void 0!==n?n:[]).filter((e=>this.astReflection.isSubtype(e.type,t)))}));return r}remove(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(e,t=Cc.XO.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.references.ScopeComputation.computeExports(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=Cc.XO.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());return!!n&&n.some((e=>!e.local&&t.has(e.targetUri.toString())))}}class xl{constructor(e){this.initialBuildOptions={},this._ready=new bc,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=null!==(t=e.workspaceFolders)&&void 0!==t?t:void 0}initialized(e){return this.mutex.write((e=>{var t;return this.initializeWorkspace(null!==(t=this.folders)&&void 0!==t?t:[],e)}))}async initializeWorkspace(e,t=Cc.XO.None){const n=await this.performStartup(e);await Oc(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap((e=>e.LanguageMetaData.fileExtensions)),n=[],r=e=>{n.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};return await this.loadAdditionalDocuments(e,r),await Promise.all(e.map((e=>[e,this.getRootFolder(e)])).map((async e=>this.traverseFolder(...e,t,r)))),this._ready.resolve(),n}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Bc.parse(e.uri)}async traverseFolder(e,t,n,r){const i=await this.fileSystemProvider.readDirectory(t);await Promise.all(i.map((async t=>{if(this.includeEntry(e,t,n))if(t.isDirectory)await this.traverseFolder(e,t.uri,n,r);else if(t.isFile){const e=await this.langiumDocuments.getOrCreateDocument(t.uri);r(e)}})))}includeEntry(e,t,n){const r=Vc.basename(t.uri);if(r.startsWith("."))return!1;if(t.isDirectory)return"node_modules"!==r&&"out"!==r;if(t.isFile){const e=Vc.extname(t.uri);return n.includes(e)}return!1}}class Il{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Nl(t)?Object.values(t):t;this.chevrotainLexer=new Pr(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:null!==(t=n.groups.hidden)&&void 0!==t?t:[]}}toTokenTypeDictionary(e){if(Nl(e))return e;const t=Sl(e)?Object.values(e.modes).flat():e,n={};return t.forEach((e=>n[e.name]=e)),n}}function Sl(e){return e&&"modes"in e&&"defaultMode"in e}function Nl(e){return!function(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}(e)&&!Sl(e)}function Cl(e){let t="";return t="string"==typeof e?e:e.text,t.split(je)}const $l=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,wl=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function Ll(e,t,n,r){const i=[];if(0===e.length){const e=La.create(n,r),s=La.create(n,r+t.length);i.push({type:"text",content:t,range:Oa.create(e,s)})}else{let s=0;for(const a of e){const e=a.index,o=t.substring(s,e);o.length>0&&i.push({type:"text",content:t.substring(s,e),range:Oa.create(La.create(n,s+r),La.create(n,e+r))});let c=o.length+1;const l=a[1];if(i.push({type:"inline-tag",content:l,range:Oa.create(La.create(n,s+c+r),La.create(n,s+c+l.length+r))}),c+=l.length,4===a.length){c+=a[2].length;const e=a[3];i.push({type:"text",content:e,range:Oa.create(La.create(n,s+c+r),La.create(n,s+c+e.length+r))})}else i.push({type:"text",content:"",range:Oa.create(La.create(n,s+c+r),La.create(n,s+c+r))});s=e+a[0].length}const a=t.substring(s);a.length>0&&i.push({type:"text",content:a,range:Oa.create(La.create(n,s+r),La.create(n,s+r+a.length))})}return i}const Ol=/\S/,bl=/\s*$/;function _l(e,t){const n=e.substring(t).match(Ol);return n?t+n.index:e.length}function Pl(e){const t=e.match(bl);if(t&&"number"==typeof t.index)return t.index}function Ml(e,t){const n=e.tokens[e.index];return"tag"===n.type?Fl(e,!1):"text"===n.type||"inline-tag"===n.type?Dl(e):(function(e,t){if(t){const n=new Wl("",e.range);"inlines"in t?t.inlines.push(n):t.content.inlines.push(n)}}(n,t),void e.index++)}function Dl(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(Ul(e)),r=t,t=e.tokens[e.index];return new Hl(i,Oa.create(n.range.start,r.range.end))}function Ul(e){return"inline-tag"===e.tokens[e.index].type?Fl(e,!0):Gl(e)}function Fl(e,t){const n=e.tokens[e.index++],r=n.content.substring(1),i=e.tokens[e.index];if("text"===(null==i?void 0:i.type)){if(t){const i=Gl(e);return new Vl(r,new Hl([i],i.range),t,Oa.create(n.range.start,i.range.end))}{const i=Dl(e);return new Vl(r,i,t,Oa.create(n.range.start,i.range.end))}}{const e=n.range;return new Vl(r,new Hl([],e),t,e)}}function Gl(e){const t=e.tokens[e.index++];return new Wl(t.content,t.range)}function Kl(e){if(!e)return Kl({start:"/**",end:"*/",line:"*"});const{start:t,end:n,line:r}=e;return{start:Bl(t,!0),end:Bl(n,!1),line:Bl(r,!0)}}function Bl(e,t){if("string"==typeof e||"object"==typeof e){const n="string"==typeof e?Ye(e):e.source;return t?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return e}class jl{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find((t=>t.name===e))}getTags(e){return this.getAllTags().filter((t=>t.name===e))}getAllTags(){return this.elements.filter((e=>"name"in e))}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const n=t.toString();e+=zl(e)+n}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements)if(0===t.length)t=n.toMarkdown(e);else{const r=n.toMarkdown(e);t+=zl(t)+r}return t.trim()}}class Vl{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.renderTag)||void 0===t?void 0:t.call(e,this))&&void 0!==n?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=function(e,t,n){var r,i;if("linkplain"===e||"linkcode"===e||"link"===e){const s=t.indexOf(" ");let a=t;if(s>0){const e=_l(t,s);a=t.substring(e),t=t.substring(0,s)}("linkcode"===e||"link"===e&&"code"===n.link)&&(a=`\`${a}\``);const o=null!==(i=null===(r=n.renderLink)||void 0===r?void 0:r.call(n,t,a))&&void 0!==i?i:function(e,t){try{return Bc.parse(e,!0),`[${t}](${e})`}catch(t){return e}}(t,a);return o}}(this.name,t,null!=e?e:{});if("string"==typeof n)return n}let n="";"italic"===(null==e?void 0:e.tag)||void 0===(null==e?void 0:e.tag)?n="*":"bold"===(null==e?void 0:e.tag)?n="**":"bold-italic"===(null==e?void 0:e.tag)&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} — ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}}class Hl{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tn.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let n=0;nr.range.start.line&&(t+="\n")}return t}}class Wl{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function zl(e){return e.endsWith("\n")?"\n":"\n\n"}class Yl{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&function(e){const t=Kl(void 0),n=Cl(e);if(0===n.length)return!1;const r=n[0],i=n[n.length-1],s=t.start,a=t.end;return Boolean(null==s?void 0:s.exec(r))&&Boolean(null==a?void 0:a.exec(i))}(t))return function(e,t,n){let r,i;"string"==typeof e?(i=t,r=n):(i=e.range.start,r=t),i||(i=La.create(0,0));const s=function(e){var t,n,r;const i=[];let s=e.position.line,a=e.position.character;for(let o=0;o=u.length){if(i.length>0){const e=La.create(s,a);i.push({type:"break",content:"",range:Oa.create(e,e)})}}else{$l.lastIndex=d;const e=$l.exec(u);if(e){const t=e[0],n=e[1],r=La.create(s,a+d),o=La.create(s,a+d+t.length);i.push({type:"tag",content:n,range:Oa.create(r,o)}),d+=t.length,d=_l(u,d)}if(d0&&"break"===i[i.length-1].type?i.slice(0,-1):i}({lines:Cl(e),position:i,options:Kl(r)});return function(e){var t,n,r,i;const s=La.create(e.position.line,e.position.character);if(0===e.tokens.length)return new jl([],Oa.create(s,s));const a=[];for(;e.indexthis.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}documentationLinkRenderer(e,t,n){var r;const i=null!==(r=this.findNameInPrecomputedScopes(e,t))&&void 0!==r?r:this.findNameInGlobalScope(e,t);if(i&&i.nameSegment){const e=i.nameSegment.range.start.line+1,t=i.nameSegment.range.start.character+1;return`[${n}](${i.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(e,t){const n=Ee(e).precomputedScopes;if(!n)return;let r=e;do{const e=n.get(r).find((e=>e.name===t));if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find((e=>e.name===t))}}class Xl{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return function(e){return"string"==typeof e.$comment}(e)?e.$comment:null===(t=function(e,t){if(e){const n=function(e,t=!0){for(;e.container;){const n=e.container;let r=n.content.indexOf(e);for(;r>0;){r--;const e=n.content[r];if(t||!e.hidden)return e}e=n}}(e,!0);if(n&&E(n,t))return n;if(l(e))for(let n=e.content.findIndex((e=>!e.hidden))-1;n>=0;n--){const r=e.content[n];if(E(r,t))return r}}}(e.$cstNode,this.grammarConfig().multilineCommentRules))||void 0===t?void 0:t.text}}var ql;n(2676);class Ql{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Jl{constructor(){this.previousTokenSource=new Cc.Qi,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=new Cc.Qi;return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n){const r=new bc,i={action:t,deferred:r,cancellationToken:null!=n?n:Cc.XO.None};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map((async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then((()=>e(n)));t.resolve(r)}catch(e){Lc(e)?t.resolve(void 0):t.reject(e)}}))),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Zl{constructor(e){this.grammarElementIdMap=new tl,this.tokenTypeIdMap=new tl,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map((e=>Object.assign({},e))),parserErrors:e.parserErrors.map((e=>Object.assign({},e))),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map,n=new Map;for(const n of Ie(e))t.set(n,{});if(e.$cstNode)for(const t of A(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[s,a]of Object.entries(e))if(!s.startsWith("$"))if(Array.isArray(a)){const e=[];n[s]=e;for(const n of a)r(n)?e.push(this.dehydrateAstNode(n,t)):i(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else r(a)?n[s]=this.dehydrateAstNode(a,t):i(a)?n[s]=this.dehydrateReference(a,t):void 0!==a&&(n[s]=a);return n}dehydrateReference(e,t){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);return l(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),o(e)?n.content=e.content.map((e=>this.dehydrateCstNode(e,t))):c(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const t=e.value,n=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map,n=new Map;for(const n of Ie(e))t.set(n,{});let r;if(e.$cstNode)for(const t of A(e.$cstNode)){let e;"fullText"in t?(e=new ac(t.fullText),r=e):"content"in t?e=new ic:"tokenType"in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(const[s,a]of Object.entries(e))if(!s.startsWith("$"))if(Array.isArray(a)){const e=[];n[s]=e;for(const o of a)r(o)?e.push(this.setParent(this.hydrateAstNode(o,t),n)):i(o)?e.push(this.hydrateReference(o,n,s,t)):e.push(o)}else r(a)?n[s]=this.setParent(this.hydrateAstNode(a,t),n):i(a)?n[s]=this.hydrateReference(a,n,s,t):void 0!==a&&(n[s]=a);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),o(r))for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,s=e.startColumn,a=e.endLine,o=e.endColumn,c=e.hidden;return new rc(n,r,{start:{line:i,character:s},end:{line:a,character:o}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();const t=this.grammarElementIdMap.getKey(e);if(t)return t;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(const n of Ie(this.grammar))t=n,ve.isInstance(t,$)&&this.grammarElementIdMap.set(n,e++);var t}}function eu(e){return{documentation:{CommentProvider:e=>new Xl(e),DocumentationProvider:e=>new Yl(e)},parser:{AsyncParser:e=>new Ql(e),GrammarConfig:e=>function(e){const t=[],n=e.Grammar;for(const e of n.rules)V(e)&&(r=e).hidden&&!st(r).test(" ")&&We(st(e))&&t.push(e.name);var r;return{multilineCommentRules:t,nameRegexp:R}}(e),LangiumParser:e=>function(e){const t=function(e){const t=e.Grammar,n=e.parser.Lexer;return yc(t,new dc(e),n.definition)}(e);return t.finalize(),t}(e),CompletionParser:e=>function(e){const t=e.Grammar,n=e.parser.Lexer,r=new pc(e);return yc(t,r,n.definition),r.finalize(),r}(e),ValueConverter:()=>new Sc,TokenBuilder:()=>new Ic,Lexer:e=>new Il(e),ParserErrorMessageProvider:()=>new fc},workspace:{AstNodeLocator:()=>new vl,AstNodeDescriptionProvider:e=>new Al(e),ReferenceDescriptionProvider:e=>new Tl(e)},references:{Linker:e=>new Qc(e),NameProvider:()=>new Jc,ScopeProvider:e=>new ll(e),ScopeComputation:e=>new nl(e),References:e=>new Zc(e)},serializer:{Hydrator:e=>new Zl(e),JsonSerializer:e=>new dl(e)},validation:{DocumentValidator:e=>new ml(e),ValidationRegistry:e=>new pl(e)},shared:()=>e.shared}}function tu(e){return{ServiceRegistry:()=>new hl,workspace:{LangiumDocuments:e=>new qc(e),LangiumDocumentFactory:e=>new Xc(e),DocumentBuilder:e=>new El(e),IndexManager:e=>new kl(e),WorkspaceManager:e=>new xl(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new Jl,ConfigurationProvider:e=>new Rl(e)}}}function nu(e,t,n,r,i,s,a,o,c){return iu([e,t,n,r,i,s,a,o,c].reduce(ou,{}))}!function(e){e.merge=(e,t)=>ou(ou({},e),t)}(ql||(ql={}));const ru=Symbol("isProxy");function iu(e,t){const n=new Proxy({},{deleteProperty:()=>!1,get:(r,i)=>au(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(au(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Reflect.ownKeys(e),ru]});return n[ru]=!0,n}const su=Symbol();function au(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:e[t]});if(e[t]===su)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in n){const i=n[t];e[t]=su;try{e[t]="function"==typeof i?i(r):iu(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}}function ou(e,t){if(t)for(const[n,r]of Object.entries(t))if(void 0!==r){const t=e[n];e[n]=null!==t&&null!==r&&"object"==typeof t&&"object"==typeof r?ou(t,r):r}return e}class cu{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const lu={fileSystemProvider:()=>new cu},uu={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},du={AstReflection:()=>new Te};function hu(e){var t;const n=function(){const e=nu(tu(lu),du),t=nu(eu({shared:e}),uu);return e.ServiceRegistry.register(t),t}(),r=n.serializer.JsonSerializer.deserialize(e);return n.shared.workspace.LangiumDocumentFactory.fromModel(r,Bc.parse(`memory://${null!==(t=r.name)&&void 0!==t?t:"grammar"}.langium`)),r}},2559:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(9501);const i=function(e,t,n){for(var i=-1,s=e.length;++i{n.d(t,{A:()=>r});const r=function(e,t){return e{n.d(t,{A:()=>s});var r=n(4288),i=n(8446);const s=function(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];return(0,r.A)(e,(function(e,r,i){s[++n]=t(e,r,i)})),s}},5507:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(6318),i=n(2851),s=n(1521),a=n(5353),o=n(3149),c=n(901);const l=function(e,t,n,r){if(!(0,o.A)(e))return e;for(var l=-1,u=(t=(0,s.A)(t,e)).length,d=u-1,h=e;null!=h&&++l{n.d(t,{A:()=>i});var r=n(4507);const i=function(e){return(0,r.A)(e,4)}},3068:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(4326),i=n(6984),s=n(6832),a=n(9999),o=Object.prototype,c=o.hasOwnProperty;const l=(0,r.A)((function(e,t){e=Object(e);var n=-1,r=t.length,l=r>2?t[2]:void 0;for(l&&(0,s.A)(t[0],t[1],l)&&(r=1);++n{n.d(t,{A:()=>l});var r=n(6307),i=n(8446),s=n(5041);var a=n(5707),o=n(8593),c=Math.max;const l=(u=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=null==n?0:(0,o.A)(n);return s<0&&(s=c(i+s,0)),(0,a.A)(e,(0,r.A)(t,3),s)},function(e,t,n){var a=Object(e);if(!(0,i.A)(e)){var o=(0,r.A)(t,3);e=(0,s.A)(e),t=function(e){return o(a[e],e,a)}}var c=u(e,t,n);return c>-1?a[o?e[c]:c]:void 0});var u},4098:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(7671);const i=function(e){return null!=e&&e.length?(0,r.A)(e,1):[]}},9703:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(2383),i=n(2049),s=n(3098);const a=function(e){return"string"==typeof e||!(0,i.A)(e)&&(0,s.A)(e)&&"[object String]"==(0,r.A)(e)}},6666:(e,t,n)=>{n.d(t,{A:()=>r});const r=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},4722:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(5572),i=n(6307),s=n(2568),a=n(2049);const o=function(e,t){return((0,a.A)(e)?r.A:s.A)(e,(0,i.A)(t,3))}},6452:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(2559),i=n(6224),s=n(9008);const a=function(e){return e&&e.length?(0,r.A)(e,s.A,i.A):void 0}},3631:(e,t,n)=>{n.d(t,{A:()=>f});var r=/\s/;var i=/^\s+/;const s=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}(e)+1).replace(i,""):e};var a=n(3149),o=n(9501),c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;var h=1/0;const f=function(e){return e?(e=function(e){if("number"==typeof e)return e;if((0,o.A)(e))return NaN;if((0,a.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var n=l.test(e);return n||u.test(e)?d(e.slice(2),n?2:8):c.test(e)?NaN:+e}(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8593:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(3631);const i=function(e){var t=(0,r.A)(e),n=t%1;return t==t?n?t-n:t:0}}}]); \ No newline at end of file diff --git a/js/731-a0fa9714.chunk.min.js b/js/731-a0fa9714.chunk.min.js deleted file mode 100644 index 83cfcc3..0000000 --- a/js/731-a0fa9714.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[731],{9850:(e,t,n)=>{t.Qi=t.XO=void 0;const r=n(9590),i=n(8585),s=n(2676);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o||(t.XO=o={}));const a=Object.freeze((function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}}));class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.Qi=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=o.None}}},2676:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9590);var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},8585:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},9590:(e,t)=>{let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},9222:(e,t,n)=>{n.d(t,{$:()=>a});var r=n(8546),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function a(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.AM,o);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}(0,r.K2)(a,"createPacketServices")},8660:(e,t,n)=>{n.d(t,{f:()=>c});var r=n(8546),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},o=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},a={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new o),"ValueConverter")}};function c(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.KX,a);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}(0,r.K2)(c,"createPieServices")},7010:(e,t,n)=>{n.d(t,{v:()=>a});var r=n(8546),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function a(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.e5,o);return t.ServiceRegistry.register(n),{shared:t,Info:n}}(0,r.K2)(a,"createInfoServices")},6288:(e,t,n)=>{n.d(t,{b:()=>a});var r=n(8546),i=n(3707),s=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},o={parser:{TokenBuilder:(0,r.K2)((()=>new s),"TokenBuilder"),ValueConverter:(0,r.K2)((()=>new r.Tm),"ValueConverter")}};function a(e=i.DD){const t=(0,i.WQ)((0,i.uM)(e),r.sr),n=(0,i.WQ)((0,i.tG)({shared:t}),r.eZ,o);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}(0,r.K2)(a,"createGitGraphServices")},8546:(e,t,n)=>{n.d(t,{AM:()=>S,K2:()=>s,KX:()=>N,Tm:()=>b,dg:()=>L,e5:()=>I,eZ:()=>C,mR:()=>O,sr:()=>x});var r=n(3707),i=Object.defineProperty,s=(e,t)=>i(e,"name",{value:t,configurable:!0}),o="Branch";s((function(e){return m.isInstance(e,o)}),"isBranch");var a="Commit";s((function(e){return m.isInstance(e,a)}),"isCommit"),s((function(e){return m.isInstance(e,"Common")}),"isCommon");var c="GitGraph";s((function(e){return m.isInstance(e,c)}),"isGitGraph"),s((function(e){return m.isInstance(e,"Info")}),"isInfo");var u="Merge";s((function(e){return m.isInstance(e,u)}),"isMerge"),s((function(e){return m.isInstance(e,"Packet")}),"isPacket"),s((function(e){return m.isInstance(e,"PacketBlock")}),"isPacketBlock"),s((function(e){return m.isInstance(e,"Pie")}),"isPie"),s((function(e){return m.isInstance(e,"PieSection")}),"isPieSection");var l,d,h,f,p=class extends r.kD{static{s(this,"MermaidAstReflection")}getAllTypes(){return["Branch","Checkout","CherryPicking","Commit","Common","Direction","GitGraph","Info","Merge","Packet","PacketBlock","Pie","PieSection","Statement"]}computeIsSubtype(e,t){switch(e){case o:case"Checkout":case"CherryPicking":case a:case u:return this.isSubtype("Statement",t);case"Direction":return this.isSubtype(c,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;throw new Error(`${t} is not a valid reference id.`)}getTypeMetaData(e){switch(e){case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:e,properties:[]}}}},m=new p,g=s((()=>l??(l=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"InfoGrammar"),y=s((()=>d??(d=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PacketGrammar"),A=s((()=>h??(h=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'))),"PieGrammar"),T=s((()=>f??(f=(0,r.y0)('{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}'))),"GitGraphGrammar"),v={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},E={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},R={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},k={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1},x={AstReflection:s((()=>new p),"AstReflection")},I={Grammar:s((()=>g()),"Grammar"),LanguageMetaData:s((()=>v),"LanguageMetaData"),parser:{}},S={Grammar:s((()=>y()),"Grammar"),LanguageMetaData:s((()=>E),"LanguageMetaData"),parser:{}},N={Grammar:s((()=>A()),"Grammar"),LanguageMetaData:s((()=>R),"LanguageMetaData"),parser:{}},C={Grammar:s((()=>T()),"Grammar"),LanguageMetaData:s((()=>k),"LanguageMetaData"),parser:{}},w={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},L=class extends r.dM{static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return void 0===r&&(r=this.runCustomConverter(e,t,n)),void 0===r?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){const r=w[e.name];if(void 0===r)return;const i=r.exec(t);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},b=class extends L{static{s(this,"CommonValueConverter")}runCustomConverter(e,t,n){}},O=class extends r.QU{static{s(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);return r.forEach((e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))})),r}};(class extends O{static{s(this,"CommonTokenBuilder")}})},8731:(e,t,n)=>{n.d(t,{qg:()=>o}),n(6288),n(7010),n(9222),n(8660);var r=n(8546),i={},s={info:(0,r.K2)((async()=>{const{createInfoServices:e}=await n.e(278).then(n.bind(n,2278)),t=e().Info.parser.LangiumParser;i.info=t}),"info"),packet:(0,r.K2)((async()=>{const{createPacketServices:e}=await n.e(959).then(n.bind(n,6959)),t=e().Packet.parser.LangiumParser;i.packet=t}),"packet"),pie:(0,r.K2)((async()=>{const{createPieServices:e}=await n.e(221).then(n.bind(n,6221)),t=e().Pie.parser.LangiumParser;i.pie=t}),"pie"),gitGraph:(0,r.K2)((async()=>{const{createGitGraphServices:e}=await n.e(760).then(n.bind(n,5760)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t}),"gitGraph")};async function o(e,t){const n=s[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();const r=i[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new a(r);return r.value}(0,r.K2)(o,"parse");var a=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map((e=>e.message)).join("\n")} ${e.parserErrors.map((e=>e.message)).join("\n")}`),this.result=e}static{(0,r.K2)(this,"MermaidParseError")}}},3707:(e,t,n)=>{function r(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function i(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText}function s(e){return"object"==typeof e&&null!==e&&r(e.container)&&i(e.reference)&&"string"==typeof e.message}n.d(t,{kD:()=>o,QU:()=>Ic,dM:()=>Sc,DD:()=>ul,tG:()=>el,uM:()=>tl,WQ:()=>nl,y0:()=>hl});class o{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const r=n[t];if(void 0!==r)return r;{const r=this.computeIsSubtype(e,t);return n[t]=r,r}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),n=[];for(const r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}}function a(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function c(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function u(e){return a(e)&&"string"==typeof e.fullText}class l{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){const e=[],t=this.iterator();let n;do{n=t.next(),void 0!==n.value&&e.push(n.value)}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map((n=>[e?e(n):n,t?t(n):n]));return new Map(n)}toString(){return this.join()}concat(e){const t=e[Symbol.iterator]();return new l((()=>({first:this.startFn(),firstDone:!1})),(e=>{let n;if(!e.firstDone){do{if(n=this.nextFn(e.first),!n.done)return n}while(!n.done);e.firstDone=!0}do{if(n=t.next(),!n.done)return n}while(!n.done);return f}))}join(e=","){const t=this.iterator();let n,r="",i=!1;do{n=t.next(),n.done||(i&&(r+=e),r+="string"==typeof(s=n.value)?s:void 0===s?"undefined":"function"==typeof s.toString?s.toString():Object.prototype.toString.call(s)),i=!0}while(!n.done);var s;return r}indexOf(e,t=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new l(this.startFn,(t=>{const{done:n,value:r}=this.nextFn(t);return n?f:{done:!1,value:e(r)}}))}filter(e){return new l(this.startFn,(t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return f}))}nonNullable(){return this.filter((e=>null!=e))}reduce(e,t){const n=this.iterator();let r=t,i=n.next();for(;!i.done;)r=void 0===r?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done)return n;const i=this.recursiveReduce(e,t,n);return void 0===i?r.value:t(i,r.value)}find(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new l((()=>({this:this.startFn()})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!d(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return f}))}flat(e){if(void 0===e&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new l((()=>({this:t.startFn()})),(e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(!d(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return f}))}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new l((()=>{const t=this.startFn();for(let n=0;n({size:0,state:this.startFn()})),(t=>(t.size++,t.size>e?f:this.nextFn(t.state))))}distinct(e){const t=new Set;return this.filter((n=>{const r=e?e(n):n;return!t.has(r)&&(t.add(r),!0)}))}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter((e=>{const r=t?t(e):e;return!n.has(r)}))}}function d(e){return!!e&&"function"==typeof e[Symbol.iterator]}const h=new l((()=>{}),(()=>f)),f=Object.freeze({done:!0,value:void 0});function p(...e){if(1===e.length){const t=e[0];if(t instanceof l)return t;if(d(t))return new l((()=>t[Symbol.iterator]()),(e=>e.next()));if("number"==typeof t.length)return new l((()=>({index:0})),(e=>e.index1?new l((()=>({collIndex:0,arrIndex:0})),(t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:(null==n?void 0:n.includeRoot)?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1})),(e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const n=e.iterators[e.iterators.length-1].next();if(!n.done)return e.iterators.push(t(n.value)[Symbol.iterator]()),n;e.iterators.pop()}return f}))}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var g,y;function A(e){return new m(e,(e=>a(e)?e.content:[]),{includeRoot:!0})}function T(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function v(e){if(!e)return;const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}!function(e){e.sum=function(e){return e.reduce(((e,t)=>e+t),0)},e.product=function(e){return e.reduce(((e,t)=>e*t),0)},e.min=function(e){return e.reduce(((e,t)=>Math.min(e,t)))},e.max=function(e){return e.reduce(((e,t)=>Math.max(e,t)))}}(g||(g={})),function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside"}(y||(y={}));const E=/^[\w\p{L}]$/u;function R(e,t){return c(e)&&t.includes(e.tokenType.name)}class k extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function x(e){throw new Error("Error! The input value was not handled.")}const I="AbstractRule",S="AbstractType",N="Condition",C="ValueLiteral",w="AbstractElement",L="BooleanLiteral",b="Conjunction",O="Disjunction",_="InferredType";function $(e){return ve.isInstance(e,_)}const P="Interface";function M(e){return ve.isInstance(e,P)}const D="Negation",U="ParameterReference",F="ParserRule";function G(e){return ve.isInstance(e,F)}const B="ReturnType",K="SimpleType",j="TerminalRule";function V(e){return ve.isInstance(e,j)}const W="Type";function H(e){return ve.isInstance(e,W)}const z="Action";function Y(e){return ve.isInstance(e,z)}const X="Alternatives";function q(e){return ve.isInstance(e,X)}const Q="Assignment";function Z(e){return ve.isInstance(e,Q)}const J="CharacterRange",ee="CrossReference";function te(e){return ve.isInstance(e,ee)}const ne="EndOfFile",re="Group";function ie(e){return ve.isInstance(e,re)}const se="Keyword";function oe(e){return ve.isInstance(e,se)}const ae="NegatedToken",ce="RegexToken",ue="RuleCall";function le(e){return ve.isInstance(e,ue)}const de="TerminalAlternatives",he="TerminalGroup",fe="TerminalRuleCall";function pe(e){return ve.isInstance(e,fe)}const me="UnorderedGroup";function ge(e){return ve.isInstance(e,me)}const ye="UntilToken",Ae="Wildcard";class Te extends o{getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(e,t){switch(e){case z:case X:case Q:case J:case ee:case ne:case re:case se:case ae:case ce:case ue:case de:case he:case fe:case me:case ye:case Ae:return this.isSubtype(w,t);case"ArrayLiteral":case"NumberLiteral":case"StringLiteral":return this.isSubtype(C,t);case"ArrayType":case"ReferenceType":case K:case"UnionType":return this.isSubtype("TypeDefinition",t);case L:return this.isSubtype(N,t)||this.isSubtype(C,t);case b:case O:case D:case U:return this.isSubtype(N,t);case _:case P:case W:return this.isSubtype(S,t);case F:return this.isSubtype(I,t)||this.isSubtype(S,t);case j:return this.isSubtype(I,t);default:return!1}}getReferenceType(e){const t=`${e.container.$type}:${e.property}`;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return S;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return I;case"Grammar:usedGrammars":return"Grammar";case"NamedArgument:parameter":case"ParameterReference:parameter":return"Parameter";case"TerminalRuleCall:rule":return j;default:throw new Error(`${t} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const ve=new Te;function Ee(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function Re(e){const t=function(e){for(;e.$container;)e=e.$container;return e}(e),n=t.$document;if(!n)throw new Error("AST node has no document.");return n}function ke(e,t){if(!e)throw new Error("Node must be an AstNode.");const n=null==t?void 0:t.range;return new l((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{for(;t.keyIndexke(e,t)))}function Ie(e,t){if(!e)throw new Error("Root node must be an AstNode.");return(null==t?void 0:t.range)&&!Se(e,t.range)?new m(e,(()=>[])):new m(e,(e=>ke(e,t)),{includeRoot:!0})}function Se(e,t){var n;if(!t)return!0;const r=null===(n=e.$cstNode)||void 0===n?void 0:n.range;return!!r&&function(e,t){const n=function(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>t.end.character)return y.After;const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.liney.After}(r,t)}function Ne(e){return new l((()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0})),(t=>{for(;t.keyIndex=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class Ke{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((e=>{this.visit(e)}),this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const je=/\r?\n/gm,Ve=new Be,We=new class extends Ke{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=Ye(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){"Group"===e.type&&e.quantifier||super.visitChildren(e)}};function He(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),We.reset(e),We.visit(Ve.pattern(e)),We.multiline}catch(e){return!1}}function ze(e){return("string"==typeof e?new RegExp(e):e).test(" ")}function Ye(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xe(e,t){const n=new Set,r=function(e){return e.rules.find((e=>G(e)&&e.entry))}(e);if(!r)return new Set(e.rules);const i=[r].concat(function(e){return e.rules.filter((e=>V(e)&&e.hidden))}(e));for(const e of i)qe(e,n,t);const s=new Set;for(const t of e.rules)(n.has(t.name)||V(t)&&t.hidden)&&s.add(t);return s}function qe(e,t,n){t.add(e.name),xe(e).forEach((e=>{if(le(e)||n&&pe(e)){const r=e.rule.ref;r&&!t.has(r.name)&&qe(r,t,n)}}))}function Qe(e,t,n){if(!e||!t)return;const r=Ze(e,t,e.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function Ze(e,t,n,r){if(!r){const n=Ee(e.grammarSource,Z);if(n&&n.feature===t)return[e]}return a(e)&&e.astNode===n?e.content.flatMap((e=>Ze(e,t,n,!1))):[]}function Je(e){let t=e;return $(t)&&(Y(t.$container)?t=t.$container.$container:G(t.$container)?t=t.$container:x(t.$container)),et(e,t,new Map)}function et(e,t,n){var r,i;function s(t,r){let i;return Ee(t,Z)||(i=et(r,r,n)),n.set(e,i),i}if(n.has(e))return n.get(e);n.set(e,void 0);for(const o of xe(t)){if(Z(o)&&"name"===o.feature.toLowerCase())return n.set(e,o),o;if(le(o)&&G(o.rule.ref))return s(o,o.rule.ref);if(i=o,ve.isInstance(i,K)&&(null===(r=o.typeRef)||void 0===r?void 0:r.ref))return s(o,o.typeRef.ref)}}function tt(e){return nt(e,new Set)}function nt(e,t){if(t.has(e))return!0;t.add(e);for(const n of xe(e))if(le(n)){if(!n.rule.ref)return!1;if(G(n.rule.ref)&&!nt(n.rule.ref,t))return!1}else{if(Z(n))return!1;if(Y(n))return!1}return Boolean(e.definition)}function rt(e){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t){if(G(t))return t.name;if(M(t)||H(t))return t.name}}}function it(e){var t,n;if(G(e))return tt(e)?e.name:null!==(t=rt(e))&&void 0!==t?t:e.name;if(M(e)||H(e)||(n=e,ve.isInstance(n,B)))return e.name;if(Y(e)){const t=function(e){var t;return e.inferredType?e.inferredType.name:(null===(t=e.type)||void 0===t?void 0:t.ref)?it(e.type.ref):void 0}(e);if(t)return t}else if($(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function st(e){const t={s:!1,i:!1,u:!1},n=at(e.definition,t),r=Object.entries(t).filter((([,e])=>e)).map((([e])=>e)).join("");return new RegExp(n,r)}const ot=/[\s\S]/.source;function at(e,t){if(a=e,ve.isInstance(a,de))return ut((o=e).elements.map((e=>at(e))).join("|"),{cardinality:o.cardinality,lookahead:o.lookahead});if(function(e){return ve.isInstance(e,he)}(e))return ut((s=e).elements.map((e=>at(e))).join(""),{cardinality:s.cardinality,lookahead:s.lookahead});if(function(e){return ve.isInstance(e,J)}(e))return(n=e).right?ut(`[${ct(n.left)}-${ct(n.right)}]`,{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1}):ut(ct(n.left),{cardinality:n.cardinality,lookahead:n.lookahead,wrap:!1});var n,r,i,s,o,a;if(pe(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return ut(at(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead})}if(function(e){return ve.isInstance(e,ae)}(e))return ut(`(?!${at((r=e).terminal)})${ot}*?`,{cardinality:r.cardinality,lookahead:r.lookahead});if(function(e){return ve.isInstance(e,ye)}(e))return ut(`${ot}*?${at((i=e).terminal)}`,{cardinality:i.cardinality,lookahead:i.lookahead});if(function(e){return ve.isInstance(e,ce)}(e)){const n=e.regex.lastIndexOf("/"),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),ut(r,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}if(function(e){return ve.isInstance(e,Ae)}(e))return ut(ot,{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error(`Invalid terminal element: ${null==e?void 0:e.$type}`)}function ct(e){return Ye(e.value)}function ut(e,t){var n;return(!1!==t.wrap||t.lookahead)&&(e=`(${null!==(n=t.lookahead)&&void 0!==n?n:""}${e})`),t.cardinality?`${e}${t.cardinality}`:e}var lt=n(8058),dt=n(2866),ht=n(6401),ft=n(4722),pt=n(9622),mt=n(53);function gt(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}return r(),r(),e}const yt=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r{t.accept(e)}))}}class Bt extends Gt{constructor(e){super([]),this.idx=1,Ct(this,_t(e,(e=>void 0!==e)))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Kt extends Gt{constructor(e){super(e.definition),this.orgText="",Ct(this,_t(e,(e=>void 0!==e)))}}class jt extends Gt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Ct(this,_t(e,(e=>void 0!==e)))}}class Vt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,_t(e,(e=>void 0!==e)))}}class Wt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,_t(e,(e=>void 0!==e)))}}class Ht extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,_t(e,(e=>void 0!==e)))}}class zt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,_t(e,(e=>void 0!==e)))}}class Yt extends Gt{constructor(e){super(e.definition),this.idx=1,Ct(this,_t(e,(e=>void 0!==e)))}}class Xt extends Gt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ct(this,_t(e,(e=>void 0!==e)))}}class qt{constructor(e){this.idx=1,Ct(this,_t(e,(e=>void 0!==e)))}accept(e){e.visit(this)}}function Qt(e){function t(e){return(0,ft.A)(e,Qt)}if(e instanceof Bt){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return(0,vt.A)(e.label)&&(t.label=e.label),t}if(e instanceof jt)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Vt)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Wt)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Ht)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Qt(new qt({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Yt)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Qt(new qt({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof zt)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Xt)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof qt){const t={type:"Terminal",name:e.terminalType.name,label:(n=e.terminalType,r=n,(0,vt.A)(r.LABEL)&&""!==r.LABEL?n.LABEL:n.name),idx:e.idx};(0,vt.A)(e.label)&&(t.terminalLabel=e.label);const i=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=Ft(i)?i.source:i),t}var n,r;if(e instanceof Kt)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}class Zt{visit(e){const t=e;switch(t.constructor){case Bt:return this.visitNonTerminal(t);case jt:return this.visitAlternative(t);case Vt:return this.visitOption(t);case Wt:return this.visitRepetitionMandatory(t);case Ht:return this.visitRepetitionMandatoryWithSeparator(t);case Yt:return this.visitRepetitionWithSeparator(t);case zt:return this.visitRepetition(t);case Xt:return this.visitAlternation(t);case qt:return this.visitTerminal(t);case Kt:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}var Jt=n(3736),en=n(4288);const tn=function(e,t){var n;return(0,en.A)(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n};var nn=n(2049),rn=n(6832);const sn=function(e,t,n){var r=(0,nn.A)(e)?Jt.A:tn;return n&&(0,rn.A)(e,t,n)&&(t=void 0),r(e,(0,Lt.A)(t,3))};var on=n(5205),an=Math.max;const cn=function(e,t,n,r){e=(0,xt.A)(e)?e:(0,dt.A)(e),n=n&&!r?(0,At.A)(n):0;var i=e.length;return n<0&&(n=an(i+n,0)),(0,vt.A)(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&(0,on.A)(e,t,n)>-1},un=function(e,t){for(var n=-1,r=null==e?0:e.length;++nhn(e,t))):!(e instanceof Bt&&cn(t,e))&&e instanceof Gt&&(e instanceof Bt&&t.push(e),dn(e.definition,(e=>hn(e,t)))))}function fn(e){if(e instanceof Bt)return"SUBRULE";if(e instanceof Vt)return"OPTION";if(e instanceof Xt)return"OR";if(e instanceof Wt)return"AT_LEAST_ONE";if(e instanceof Ht)return"AT_LEAST_ONE_SEP";if(e instanceof Yt)return"MANY_SEP";if(e instanceof zt)return"MANY";if(e instanceof qt)return"CONSUME";throw Error("non exhaustive match")}class pn{walk(e,t=[]){(0,lt.A)(e.definition,((n,r)=>{const i=Tt(e.definition,r+1);if(n instanceof Bt)this.walkProdRef(n,i,t);else if(n instanceof qt)this.walkTerminal(n,i,t);else if(n instanceof jt)this.walkFlat(n,i,t);else if(n instanceof Vt)this.walkOption(n,i,t);else if(n instanceof Wt)this.walkAtLeastOne(n,i,t);else if(n instanceof Ht)this.walkAtLeastOneSep(n,i,t);else if(n instanceof Yt)this.walkManySep(n,i,t);else if(n instanceof zt)this.walkMany(n,i,t);else{if(!(n instanceof Xt))throw Error("non exhaustive match");this.walkOr(n,i,t)}}))}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new Vt({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=mn(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new Vt({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=mn(e,t,n);this.walk(e,r)}walkOr(e,t,n){const r=t.concat(n);(0,lt.A)(e.definition,(e=>{const t=new jt({definition:[e]});this.walk(t,r)}))}}function mn(e,t,n){return[new Vt({definition:[new qt({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}var gn=n(7371);const yn=function(e){return e&&e.length?(0,gn.A)(e):[]};var An=n(4098);function Tn(e){if(e instanceof Bt)return Tn(e.referencedRule);if(e instanceof qt)return[e.terminalType];if(function(e){return e instanceof jt||e instanceof Vt||e instanceof zt||e instanceof Wt||e instanceof Ht||e instanceof Yt||e instanceof qt||e instanceof Kt}(e))return function(e){let t=[];const n=e.definition;let r,i=0,s=n.length>i,o=!0;for(;s&&o;)r=n[i],o=hn(r),t=t.concat(Tn(r)),i+=1,s=n.length>i;return yn(t)}(e);if(function(e){return e instanceof Xt}(e))return function(e){const t=(0,ft.A)(e.definition,(e=>Tn(e)));return yn((0,An.A)(t))}(e);throw Error("non exhaustive match")}const vn="_~IN~_";class En extends pn{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+vn+this.topProd.name);var i,s;const o=t.concat(n),a=Tn(new jt({definition:o}));this.follows[r]=a}}var Rn=n(9592),kn=n(3068),xn=n(2634),In=n(1790);const Sn=function(e,t){return((0,nn.A)(e)?xn.A:In.A)(e,function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}((0,Lt.A)(t,3)))};var Nn=n(9610),Cn=Math.max;const wn=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:(0,At.A)(n);return i<0&&(i=Cn(r+i,0)),(0,on.A)(e,t,i)};var Ln=n(3130),bn=n(4092),On=n(8300),_n=n(5530),$n=n(7809),Pn=n(4099);var Mn=n(7671),Dn=n(4326),Un=n(3533);const Fn=(0,Dn.A)((function(e,t){return(0,Un.A)(e)?function(e,t,n,r){var i=-1,s=_n.A,o=!0,a=e.length,c=[],u=t.length;if(!a)return c;n&&(t=(0,wt.A)(t,(0,Mt.A)(n))),r?(s=$n.A,o=!1):t.length>=200&&(s=Pn.A,o=!1,t=new On.A(t));e:for(;++i\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),jn(`${Xn}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Qn(e,t,n){switch(e.type){case"Disjunction":for(let r=0;r{if("number"==typeof e)Zn(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)Zn(e,t,n);else{for(let e=r.from;e<=r.to&&e=yr){const e=r.from>=yr?r.from:yr,n=r.to,i=Tr(e),s=Tr(n);for(let e=i;e<=s;e++)t[e]=e}}}}));break;case"Group":Qn(s.value,t,n);break;default:throw Error("Non Exhaustive Match")}const o=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===er(s)||"Group"!==s.type&&!1===o)break}break;default:throw Error("non exhaustive match!")}return(0,dt.A)(t)}function Zn(e,t,n){const r=Tr(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=Tr(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=Tr(e.charCodeAt(0));t[n]=n}}}(e,t)}function Jn(e,t){return(0,Kn.A)(e.value,(e=>{if("number"==typeof e)return cn(t,e);{const n=e;return void 0!==(0,Kn.A)(t,(e=>n.from<=e&&e<=n.to))}}))}function er(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&((0,nn.A)(e.value)?dn(e.value,er):er(e.value))}class tr extends Ke{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e)}super.visitChildren(e)}}visitCharacter(e){cn(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===Jn(e,this.targetCharCodes)&&(this.found=!0):void 0!==Jn(e,this.targetCharCodes)&&(this.found=!0)}}function nr(e,t){if(t instanceof RegExp){const n=zn(t),r=new tr(e);return r.visit(n),r.found}return void 0!==(0,Kn.A)(t,(t=>cn(e,t.charCodeAt(0))))}const rr="PATTERN",ir="defaultMode",sr="modes";let or="boolean"==typeof new RegExp("(?:)").sticky;const ar=/[^\\][$]/,cr=/[^\\[][\^]|^\^/;function ur(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function lr(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function dr(e){const t=e.PATTERN;if(Ft(t))return!1;if((0,Nn.A)(t))return!0;if((0,pt.A)(t,"exec"))return!0;if((0,vt.A)(t))return!1;throw Error("non exhaustive match")}function hr(e){return!(!(0,vt.A)(e)||1!==e.length)&&e.charCodeAt(0)}const fr={test:function(e){const t=e.length;for(let n=this.lastIndex;n(0,vt.A)(e)?e.charCodeAt(0):e))}function gr(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const yr=256;let Ar=[];function Tr(e){return ee.CATEGORIES))));const e=Fn(n,t);t=t.concat(e),(0,ht.A)(e)?r=!1:n=e}return t}(e);!function(e){(0,lt.A)(e,(e=>{var t;Lr(e)||(Nr[Sr]=e,e.tokenTypeIdx=Sr++),br(e)&&!(0,nn.A)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),br(e)||(e.CATEGORIES=[]),t=e,(0,pt.A)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,pt.A)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})}))}(t),function(e){(0,lt.A)(e,(e=>{wr([],e)}))}(t),function(e){(0,lt.A)(e,(e=>{e.categoryMatches=[],(0,lt.A)(e.categoryMatchesMap,((t,n)=>{e.categoryMatches.push(Nr[n].tokenTypeIdx)}))}))}(t),(0,lt.A)(t,(e=>{e.isParent=e.categoryMatches.length>0}))}function wr(e,t){(0,lt.A)(e,(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0})),(0,lt.A)(t.CATEGORIES,(n=>{const r=e.concat(t);cn(r,n)||wr(r,n)}))}function Lr(e){return(0,pt.A)(e,"tokenTypeIdx")}function br(e){return(0,pt.A)(e,"CATEGORIES")}function Or(e){return(0,pt.A)(e,"tokenTypeIdx")}var _r;!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(_r||(_r={}));const $r={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:{buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`},traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze($r);class Pr{constructor(e,t=$r){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=kr(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Ct({},$r,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(()=>{let n,r=!0;this.TRACE_INIT("Lexer Config handling",(()=>{if(this.config.lineTerminatorsPattern===$r.lineTerminatorsPattern)this.config.lineTerminatorsPattern=fr;else if(this.config.lineTerminatorCharacters===$r.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,nn.A)(e)?n={modes:{defaultMode:(0,mt.A)(e)},defaultMode:ir}:(r=!1,n=(0,mt.A)(e))})),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){const t=[];return(0,pt.A)(e,ir)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+ir+"> property in its definition\n",type:_r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,pt.A)(e,sr)||t.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:_r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,pt.A)(e,sr)&&(0,pt.A)(e,ir)&&!(0,pt.A)(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${ir}: <${e.defaultMode}>which does not exist\n`,type:_r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,pt.A)(e,sr)&&(0,lt.A)(e.modes,((e,n)=>{(0,lt.A)(e,((r,i)=>{if((0,Rn.A)(r))t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${i}>\n`,type:_r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,pt.A)(r,"LONGER_ALT")){const i=(0,nn.A)(r.LONGER_ALT)?r.LONGER_ALT:[r.LONGER_ALT];(0,lt.A)(i,(i=>{(0,Rn.A)(i)||cn(e,i)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${r.name}> outside of mode <${n}>\n`,type:_r.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))}}))})),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),this.TRACE_INIT("performWarningRuntimeChecks",(()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(function(e,t,n){const r=[];let i=!1;const s=Gn((0,An.A)((0,dt.A)(e.modes))),o=Sn(s,(e=>e[rr]===Pr.NA)),a=mr(n);return t&&(0,lt.A)(o,(e=>{const t=pr(e,a);if(!1!==t){const n=function(e,t){if(t.issue===_r.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===_r.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),i={message:n,type:t.issue,tokenType:e};r.push(i)}else(0,pt.A)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):nr(a,e.PATTERN)&&(i=!0)})),t&&!i&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:_r.NO_LINE_BREAKS_FLAGS}),r}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}))),n.modes=n.modes?n.modes:{},(0,lt.A)(n.modes,((e,t)=>{n.modes[t]=Sn(e,(e=>(0,Rn.A)(e)))}));const i=(0,St.A)(n.modes);if((0,lt.A)(n.modes,((e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,(()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",(()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e,t){let n=[];const r=function(e){const t=(0,bn.A)(e,(e=>!(0,pt.A)(e,rr)));return{errors:(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:_r.MISSING_PATTERN,tokenTypes:[e]}))),valid:Fn(e,t)}}(e);n=n.concat(r.errors);const i=function(e){const t=(0,bn.A)(e,(e=>{const t=e[rr];return!(Ft(t)||(0,Nn.A)(t)||(0,pt.A)(t,"exec")||(0,vt.A)(t))}));return{errors:(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:_r.INVALID_PATTERN,tokenTypes:[e]}))),valid:Fn(e,t)}}(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(function(e){let t=[];const n=(0,bn.A)(e,(e=>Ft(e[rr])));return t=t.concat(function(e){class t extends Ke{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=(0,bn.A)(e,(e=>{const n=e.PATTERN;try{const e=zn(n),r=new t;return r.visit(e),r.found}catch(e){return ar.test(n.source)}}));return(0,ft.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:_r.EOI_ANCHOR_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){class t extends Ke{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=(0,bn.A)(e,(e=>{const n=e.PATTERN;try{const e=zn(n),r=new t;return r.visit(e),r.found}catch(e){return cr.test(n.source)}}));return(0,ft.A)(n,(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:_r.SOI_ANCHOR_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){const t=(0,bn.A)(e,(e=>{const t=e[rr];return t instanceof RegExp&&(t.multiline||t.global)}));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:_r.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]})))}(n)),t=t.concat(function(e){const t=[];let n=(0,ft.A)(e,(n=>(0,Ln.A)(e,((e,r)=>(n.PATTERN.source!==r.PATTERN.source||cn(t,r)||r.PATTERN===Pr.NA||(t.push(r),e.push(r)),e)),[])));n=Gn(n);const r=(0,bn.A)(n,(e=>e.length>1));return(0,ft.A)(r,(e=>{const t=(0,ft.A)(e,(e=>e.name));return{message:`The same RegExp pattern ->${Bn(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:_r.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}))}(n)),t=t.concat(function(e){const t=(0,bn.A)(e,(e=>e.PATTERN.test("")));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:_r.EMPTY_MATCH_PATTERN,tokenTypes:[e]})))}(n)),t}(s)),n=n.concat(function(e){const t=(0,bn.A)(e,(e=>{if(!(0,pt.A)(e,"GROUP"))return!1;const t=e.GROUP;return t!==Pr.SKIPPED&&t!==Pr.NA&&!(0,vt.A)(t)}));return(0,ft.A)(t,(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:_r.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]})))}(s)),n=n.concat(function(e,t){const n=(0,bn.A)(e,(e=>void 0!==e.PUSH_MODE&&!cn(t,e.PUSH_MODE)));return(0,ft.A)(n,(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:_r.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]})))}(s,t)),n=n.concat(function(e){const t=[],n=(0,Ln.A)(e,((e,t,n)=>{const r=t.PATTERN;return r===Pr.NA||((0,vt.A)(r)?e.push({str:r,idx:n,tokenType:t}):Ft(r)&&(i=r,void 0===(0,Kn.A)([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(e=>-1!==i.source.indexOf(e))))&&e.push({str:r.source,idx:n,tokenType:t})),e;var i}),[]);return(0,lt.A)(e,((e,r)=>{(0,lt.A)(n,(({str:n,idx:i,tokenType:s})=>{if(r${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:_r.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))})),t}(s)),n}(e,i))})),(0,ht.A)(this.lexerDefinitionErrors)){let r;Cr(e),this.TRACE_INIT("analyzeTokenTypes",(()=>{r=function(e,t){const n=(t=(0,kn.A)(t,{useSticky:or,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer;let r;n("initCharCodeToOptimizedIndexMap",(()=>{!function(){if((0,ht.A)(Ar)){Ar=new Array(65536);for(let e=0;e<65536;e++)Ar[e]=e>255?255+~~(e/255):e}}()})),n("Reject Lexer.NA",(()=>{r=Sn(e,(e=>e[rr]===Pr.NA))}));let i,s,o,a,c,u,l,d,h,f,p,m=!1;n("Transform Patterns",(()=>{m=!1,i=(0,ft.A)(r,(e=>{const n=e[rr];if(Ft(n)){const e=n.source;return 1!==e.length||"^"===e||"$"===e||"."===e||n.ignoreCase?2!==e.length||"\\"!==e[0]||cn(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?t.useSticky?lr(n):ur(n):e[1]:e}if((0,Nn.A)(n))return m=!0,{exec:n};if("object"==typeof n)return m=!0,n;if("string"==typeof n){if(1===n.length)return n;{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(e);return t.useSticky?lr(r):ur(r)}}throw Error("non exhaustive match")}))})),n("misc mapping",(()=>{s=(0,ft.A)(r,(e=>e.tokenTypeIdx)),o=(0,ft.A)(r,(e=>{const t=e.GROUP;if(t!==Pr.SKIPPED){if((0,vt.A)(t))return t;if((0,Rn.A)(t))return!1;throw Error("non exhaustive match")}})),a=(0,ft.A)(r,(e=>{const t=e.LONGER_ALT;if(t)return(0,nn.A)(t)?(0,ft.A)(t,(e=>wn(r,e))):[wn(r,t)]})),c=(0,ft.A)(r,(e=>e.PUSH_MODE)),u=(0,ft.A)(r,(e=>(0,pt.A)(e,"POP_MODE")))})),n("Line Terminator Handling",(()=>{const e=mr(t.lineTerminatorCharacters);l=(0,ft.A)(r,(e=>!1)),"onlyOffset"!==t.positionTracking&&(l=(0,ft.A)(r,(t=>(0,pt.A)(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===pr(t,e)&&nr(e,t.PATTERN))))})),n("Misc Mapping #2",(()=>{d=(0,ft.A)(r,dr),h=(0,ft.A)(i,hr),f=(0,Ln.A)(r,((e,t)=>{const n=t.GROUP;return(0,vt.A)(n)&&n!==Pr.SKIPPED&&(e[n]=[]),e}),{}),p=(0,ft.A)(i,((e,t)=>({pattern:i[t],longerAlt:a[t],canLineTerminator:l[t],isCustom:d[t],short:h[t],group:o[t],push:c[t],pop:u[t],tokenTypeIdx:s[t],tokenType:r[t]})))}));let g=!0,y=[];return t.safeMode||n("First Char Optimization",(()=>{y=(0,Ln.A)(r,((e,n,r)=>{if("string"==typeof n.PATTERN){const t=Tr(n.PATTERN.charCodeAt(0));gr(e,t,p[r])}else if((0,nn.A)(n.START_CHARS_HINT)){let t;(0,lt.A)(n.START_CHARS_HINT,(n=>{const i=Tr("string"==typeof n?n.charCodeAt(0):n);t!==i&&(t=i,gr(e,i,p[r]))}))}else if(Ft(n.PATTERN))if(n.PATTERN.unicode)g=!1,t.ensureOptimizations&&jn(`${Xn}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const i=qn(n.PATTERN,t.ensureOptimizations);(0,ht.A)(i)&&(g=!1),(0,lt.A)(i,(t=>{gr(e,t,p[r])}))}else t.ensureOptimizations&&jn(`${Xn}\tTokenType: <${n.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return e}),[])})),{emptyGroups:f,patternIdxToConfig:p,charCodeToPatternIdxToConfig:y,hasCustom:m,canBeOptimized:g}}(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})})),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=Ct({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}}))})),this.defaultMode=n.defaultMode,!(0,ht.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,ft.A)(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}(0,lt.A)(this.lexerDefinitionWarning,(e=>{Vn(e.message)})),this.TRACE_INIT("Choosing sub-methods implementations",(()=>{if(or?(this.chopInput=vr.A,this.match=this.matchWithTest):(this.updateLastIndex=Er.A,this.match=this.matchWithExec),r&&(this.handleModes=Er.A),!1===this.trackStartLines&&(this.computeNewColumn=vr.A),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=Er.A),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)})),this.TRACE_INIT("Failed Optimization Warnings",(()=>{const e=(0,Ln.A)(this.canModeBeOptimized,((e,t,n)=>(!1===t&&e.push(n),e)),[]);if(t.ensureOptimizations&&!(0,ht.A)(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)})),this.TRACE_INIT("clearRegExpParserCache",(()=>{Wn={}})),this.TRACE_INIT("toFastProperties",(()=>{gt(this)}))}))}tokenize(e,t=this.defaultMode){if(!(0,ht.A)(this.lexerDefinitionErrors)){const e=(0,ft.A)(this.lexerDefinitionErrors,(e=>e.message)).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,o,a,c,u,l,d,h,f,p,m,g;const y=e,A=y.length;let T=0,v=0;const E=this.hasCustom?0:Math.floor(e.length/10),R=new Array(E),k=[];let x=this.trackStartLines?1:void 0,I=this.trackStartLines?1:void 0;const S=function(e){const t={},n=(0,St.A)(e);return(0,lt.A)(n,(n=>{const r=e[n];if(!(0,nn.A)(r))throw Error("non exhaustive match");t[n]=[]})),t}(this.emptyGroups),N=this.trackStartLines,C=this.config.lineTerminatorsPattern;let w=0,L=[],b=[];const O=[],_=[];let $;function P(){return L}function M(e){const t=Tr(e),n=b[t];return void 0===n?_:n}Object.freeze(_);const D=e=>{if(1===O.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);k.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{O.pop();const e=(0,Rr.A)(O);L=this.patternIdxToConfig[e],b=this.charCodeToPatternIdxToConfig[e],w=L.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;$=b&&t?M:P}};function U(e){O.push(e),b=this.charCodeToPatternIdxToConfig[e],L=this.patternIdxToConfig[e],w=L.length,w=L.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;$=b&&t?M:P}let F;U.call(this,t);const G=this.config.recoveryEnabled;for(;Ta.length){a=s,c=u,F=t;break}}}break}}if(null!==a){if(l=a.length,d=F.group,void 0!==d&&(h=F.tokenTypeIdx,f=this.createTokenInstance(a,T,h,F.tokenType,x,I,l),this.handlePayload(f,c),!1===d?v=this.addToken(R,v,f):S[d].push(f)),e=this.chopInput(e,l),T+=l,I=this.computeNewColumn(I,l),!0===N&&!0===F.canLineTerminator){let e,t,n=0;C.lastIndex=0;do{e=C.test(a),!0===e&&(t=C.lastIndex-1,n++)}while(!0===e);0!==n&&(x+=n,I=l-t,this.updateTokenEndLineColumnLocation(f,d,t,n,x,I,l))}this.handleModes(F,D,U,f)}else{const t=T,n=x,i=I;let s=!1===G;for(;!1===s&&T`Expecting ${Dr(e)?`--\x3e ${Mr(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",o="\nbut found: '"+Bn(t).image+"'";if(r)return s+r+o;{const t=(0,Ln.A)(e,((e,t)=>e.concat(t)),[]),n=(0,ft.A)(t,(e=>`[${(0,ft.A)(e,(e=>Mr(e))).join(", ")}]`));return s+`one of these possible Token sequences:\n${(0,ft.A)(n,((e,t)=>` ${t+1}. ${e}`)).join("\n")}`+o}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ",s="\nbut found: '"+Bn(t).image+"'";return n?i+n+s:i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,ft.A)(e,(e=>`[${(0,ft.A)(e,(e=>Mr(e))).join(",")}]`)).join(" ,")}>`+s}};Object.freeze(qr);const Qr={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},Zr={buildDuplicateFoundError(e,t){const n=e.name,r=Bn(t),i=r.idx,s=fn(r),o=(a=r)instanceof qt?a.terminalType.name:a instanceof Bt?a.nonTerminalName:"";var a;let c=`->${s}${i>0?i:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,"\n"),c},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(e){let t=fn(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${t} --\x3e ${(0,ft.A)(e.leftRecursionPath,(e=>e.name)).concat([t]).join(" --\x3e ")}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof Kt?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class Jr extends Zt{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){(0,lt.A)((0,dt.A)(this.nameToTopRule),(e=>{this.currTopLevel=e,e.accept(this)}))}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Cs.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}const ei=function(e,t){return(0,Mn.A)((0,ft.A)(e,t),1)};var ti=n(2528);const ni=function(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i{!1===(0,ht.A)(e.definition)&&(r=s(e.definition))})),r;if(!(t instanceof qt))throw Error("non exhaustive match");n.push(t.terminalType)}}i++}return r.push({partialPath:n,suffixDef:Tt(e,i)}),r}function yi(e,t,n,r){const i="EXIT_NONE_TERMINAL",s=[i],o="EXIT_ALTERNATIVE";let a=!1;const c=t.length,u=c-r-1,l=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,ht.A)(d);){const e=d.pop();if(e===o){a&&(0,Rr.A)(d).idx<=u&&d.pop();continue}const r=e.def,h=e.idx,f=e.ruleStack,p=e.occurrenceStack;if((0,ht.A)(r))continue;const m=r[0];if(m===i){const e={idx:h,def:Tt(r),ruleStack:ci(f),occurrenceStack:ci(p)};d.push(e)}else if(m instanceof qt)if(h=0;e--){const t={idx:h,def:m.definition[e].definition.concat(Tt(r)),ruleStack:f,occurrenceStack:p};d.push(t),d.push(o)}else if(m instanceof jt)d.push({idx:h,def:m.definition.concat(Tt(r)),ruleStack:f,occurrenceStack:p});else{if(!(m instanceof Kt))throw Error("non exhaustive match");d.push(Ai(m,h,f,p))}}return l}function Ai(e,t,n,r){const i=(0,mt.A)(n);i.push(e.name);const s=(0,mt.A)(r);return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var Ti;function vi(e){if(e instanceof Vt||"Option"===e)return Ti.OPTION;if(e instanceof zt||"Repetition"===e)return Ti.REPETITION;if(e instanceof Wt||"RepetitionMandatory"===e)return Ti.REPETITION_MANDATORY;if(e instanceof Ht||"RepetitionMandatoryWithSeparator"===e)return Ti.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Yt||"RepetitionWithSeparator"===e)return Ti.REPETITION_WITH_SEPARATOR;if(e instanceof Xt||"Alternation"===e)return Ti.ALTERNATION;throw Error("non exhaustive match")}function Ei(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,s=vi(r);return s===Ti.ALTERNATION?Li(t,n,i):bi(t,n,s,i)}function Ri(e,t,n,r){const i=e.length,s=dn(e,(e=>dn(e,(e=>1===e.length))));if(t)return function(t){const r=(0,ft.A)(t,(e=>e.GATE));for(let t=0;t(0,An.A)(e))),n=(0,Ln.A)(t,((e,t,n)=>((0,lt.A)(t,(t=>{(0,pt.A)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),(0,lt.A)(t.categoryMatches,(t=>{(0,pt.A)(e,t)||(e[t]=n)}))})),e)),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}return function(){for(let t=0;t1===e.length)),i=e.length;if(r&&!n){const t=(0,An.A)(e);if(1===t.length&&(0,ht.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,Ln.A)(t,((e,t,n)=>(e[t.tokenTypeIdx]=!0,(0,lt.A)(t.categoryMatches,(t=>{e[t]=!0})),e)),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;ngi([e],1))),r=Si(n.length),i=(0,ft.A)(n,(e=>{const t={};return(0,lt.A)(e,(e=>{const n=Ni(e.partialPath);(0,lt.A)(n,(e=>{t[e]=!0}))})),t}));let s=n;for(let e=1;e<=t;e++){const n=s;s=Si(n.length);for(let o=0;o{const t=Ni(e.partialPath);(0,lt.A)(t,(e=>{i[o][e]=!0}))}))}}}}return r}function Li(e,t,n,r){const i=new Ii(e,Ti.ALTERNATION,r);return t.accept(i),wi(i.result,n)}function bi(e,t,n,r){const i=new Ii(e,n);t.accept(i);const s=i.result,o=new xi(t,e,n).startWalking();return wi([new jt({definition:s}),new jt({definition:o})],r)}function Oi(e,t){e:for(let n=0;ndn(e,(e=>dn(e,(e=>(0,ht.A)(e.categoryMatches)))))))}function $i(e){return`${fn(e)}_#_${e.idx}_#_${Pi(e)}`}function Pi(e){return e instanceof qt?e.terminalType.name:e instanceof Bt?e.nonTerminalName:""}class Mi extends Zt{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function Di(e,t,n,r=[]){const i=[],s=Ui(t.definition);if((0,ht.A)(s))return[];{const t=e.name;cn(s,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Cs.LEFT_RECURSION,ruleName:t});const o=Fn(s,r.concat([e])),a=ei(o,(t=>{const i=(0,mt.A)(r);return i.push(t),Di(e,t,n,i)}));return i.concat(a)}}function Ui(e){let t=[];if((0,ht.A)(e))return t;const n=Bn(e);if(n instanceof Bt)t.push(n.referencedRule);else if(n instanceof jt||n instanceof Vt||n instanceof Wt||n instanceof Ht||n instanceof Yt||n instanceof zt)t=t.concat(Ui(n.definition));else if(n instanceof Xt)t=(0,An.A)((0,ft.A)(n.definition,(e=>Ui(e.definition))));else if(!(n instanceof qt))throw Error("non exhaustive match");const r=hn(n),i=e.length>1;if(r&&i){const n=Tt(e);return t.concat(Ui(n))}return t}class Fi extends Zt{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}class Gi extends Zt{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}const Bi="MismatchedTokenException",Ki="NoViableAltException",ji="EarlyExitException",Vi="NotAllInputParsedException",Wi=[Bi,Ki,ji,Vi];function Hi(e){return cn(Wi,e.name)}Object.freeze(Wi);class zi extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Yi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Bi}}class Xi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Ki}}class qi extends zi{constructor(e,t){super(e,t),this.name=Vi}}class Qi extends zi{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ji}}const Zi={},Ji="InRuleRecoveryException";class es extends Error{constructor(e){super(e),this.name=Ji}}function ts(e,t,n,r,i,s,o){const a=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[a];if(void 0===c){const e=this.getCurrRuleFullName();c=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[a]=c}let u=c.token,l=c.occurrence;const d=c.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===u&&(u=zr,l=1),void 0!==u&&void 0!==l&&this.shouldInRepetitionRecoveryBeTried(u,l,o)&&this.tryInRepetitionRecovery(e,t,n,u)}const ns=1024,rs=1280,is=1536;function ss(e,t,n){return n|t|e}class os{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:Ss.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,ht.A)(t)){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return ei(e,(e=>Di(e,e,Zr)))}validateEmptyOrAlternatives(e){return ei(e,(e=>function(e,t){const n=new Fi;e.accept(n);const r=n.alternations;return ei(r,(n=>{const r=ci(n.definition);return ei(r,((r,i)=>{const s=yi([r],[],xr,1);return(0,ht.A)(s)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Cs.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]}))}))}(e,Zr)))}validateAmbiguousAlternationAlternatives(e,t){return ei(e,(e=>function(e,t,n){const r=new Fi;e.accept(r);let i=r.alternations;i=Sn(i,(e=>!0===e.ignoreAmbiguities));return ei(i,(r=>{const i=r.idx,s=r.maxLookahead||t,o=Li(i,e,s,r),a=function(e,t,n,r){const i=[],s=(0,Ln.A)(e,((n,r,s)=>(!0===t.definition[s].ignoreAmbiguities||(0,lt.A)(r,(r=>{const o=[s];(0,lt.A)(e,((e,n)=>{s!==n&&Oi(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&o.push(n)})),o.length>1&&!Oi(i,r)&&(i.push(r),n.push({alts:o,path:r}))})),n)),[]);return(0,ft.A)(s,(e=>{const i=(0,ft.A)(e.alts,(e=>e+1));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Cs.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}}))}(o,r,e,n),c=function(e,t,n,r){const i=(0,Ln.A)(e,((e,t,n)=>{const r=(0,ft.A)(t,(e=>({idx:n,path:e})));return e.concat(r)}),[]);return Gn(ei(i,(e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const s=e.idx,o=e.path,a=(0,bn.A)(i,(e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx{const n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})));var n,r}));return(0,ft.A)(a,(e=>{const i=[e.idx+1,s+1],o=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Cs.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}}))})))}(o,r,e,n);return a.concat(c)}))}(e,t,Zr)))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const r=[];return(0,lt.A)(e,(e=>{const i=new Gi;e.accept(i);const s=i.allProductions;(0,lt.A)(s,(i=>{const s=vi(i),o=i.maxLookahead||t,a=bi(i.idx,e,s,o)[0];if((0,ht.A)((0,An.A)(a))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:Cs.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}(e,t,Zr)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const o=Li(e,t,n);return s(o,r,_i(o)?Ir:xr,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Ri)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const o=bi(e,t,i,n),a=_i(o)?Ir:xr;return s(o[0],a,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,vi(e.prodType),ki)}}const as=new class extends Zt{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function cs(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset(0,Nn.A)(e.GATE)));return s.hasPredicates=o,n.definition.push(s),(0,lt.A)(i,(e=>{const t=new jt({definition:[]});s.definition.push(t),(0,pt.A)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,pt.A)(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()})),ms}function ks(e){return 0===e?"":`${e}`}function xs(e){if(e<0||e>ys){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${ys+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const Is=Yr(zr,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Is);const Ss=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:qr,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ns=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Cs,ws,Ls;function bs(e=void 0){return function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(Cs||(Cs={}));class Os{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",(()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",(()=>{gt(this)})),this.TRACE_INIT("Grammar Recording",(()=>{try{this.enableRecording(),(0,lt.A)(this.definedRulesNames,(e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,(()=>{n=this.topLevelRuleRecord(e,t)})),this.gastProductionsCache[e]=n}))}finally{this.disableRecording()}}));let n=[];if(this.TRACE_INIT("Grammar Resolving",(()=>{n=function(e){const t=(0,kn.A)(e,{errMsgProvider:Qr}),n={};return(0,lt.A)(e.rules,(e=>{n[e.name]=e})),function(e,t){const n=new Jr(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}({rules:(0,dt.A)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)})),this.TRACE_INIT("Grammar Validations",(()=>{if((0,ht.A)(n)&&!1===this.skipValidations){const n=(e={rules:(0,dt.A)(this.gastProductionsCache),tokenTypes:(0,dt.A)(this.tokensMap),errMsgProvider:Zr,grammarName:t},function(e,t,n,r){const i=ei(e,(e=>function(e,t){const n=new Mi;e.accept(n);const r=n.allProductions,i=si(r,$i),s=_t(i,(e=>e.length>1));return(0,ft.A)((0,dt.A)(s),(n=>{const r=Bn(n),i=t.buildDuplicateFoundError(e,n),s=fn(r),o={message:i,type:Cs.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx},a=Pi(r);return a&&(o.parameter=a),o}))}(e,n))),s=function(e,t,n){const r=[],i=(0,ft.A)(t,(e=>e.name));return(0,lt.A)(e,(e=>{const t=e.name;if(cn(i,t)){const i=n.buildNamespaceConflictError(e);r.push({message:i,type:Cs.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}(e,t,n),o=ei(e,(e=>function(e,t){const n=new Fi;e.accept(n);const r=n.alternations;return ei(r,(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Cs.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[]))}(e,n))),a=ei(e,(t=>function(e,t,n,r){const i=[],s=(0,Ln.A)(t,((t,n)=>n.name===e.name?t+1:t),0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Cs.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,r,n)));return i.concat(s,o,a)}((e=(0,kn.A)(e,{errMsgProvider:Zr})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)),r=function(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,ft.A)(t,(e=>Object.assign({type:Cs.CUSTOM_LOOKAHEAD_VALIDATION},e)))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,dt.A)(this.gastProductionsCache),tokenTypes:(0,dt.A)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,r)}var e})),(0,ht.A)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",(()=>{const e=function(e){const t={};return(0,lt.A)(e,(e=>{const n=new En(e).startWalking();Ct(t,n)})),t}((0,dt.A)(this.gastProductionsCache));this.resyncFollows=e})),this.TRACE_INIT("ComputeLookaheadFunctions",(()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:(0,dt.A)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,dt.A)(this.gastProductionsCache))}))),!Os.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,ht.A)(this.definitionErrors))throw e=(0,ft.A)(this.definitionErrors,(e=>e.message)),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)}))}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),(0,pt.A)(t,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=(0,pt.A)(t,"skipValidations")?t.skipValidations:Ss.skipValidations}}Os.DEFER_DEFINITION_ERRORS_HANDLING=!1,ws=Os,Ls=[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,pt.A)(e,"recoveryEnabled")?e.recoveryEnabled:Ss.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=ts)}getTokenToInsert(e){const t=Yr(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType(),s=this.exportLexerState(),o=[];let a=!1;const c=this.LA(1);let u=this.LA(1);const l=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()}),n=new Yi(t,c,this.LA(0));n.resyncedTokens=ci(o),this.SAVE_ERROR(n)};for(;!a;){if(this.tokenMatcher(u,r))return void l();if(n.call(this))return l(),void e.apply(this,t);this.tokenMatcher(u,i)?a=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o))}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new es("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,ht.A)(t))return!1;const n=this.LA(1);return void 0!==(0,Kn.A)(t,(e=>this.tokenMatcher(n,e)))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return cn(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),n=2;for(;;){const r=(0,Kn.A)(e,(e=>Xr(t,e)));if(void 0!==r)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return Zi;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return(0,ft.A)(e,((n,r)=>0===r?Zi:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])}))}flattenFollowSet(){const e=(0,ft.A)(this.buildFullFollowKeyStack(),(e=>this.getFollowSetFromFollowKey(e)));return(0,An.A)(e)}getFollowSetFromFollowKey(e){if(e===Zi)return[zr];const t=e.ruleName+e.idxInCallingRule+vn+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,zr)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return ci(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,mt.A)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return(0,ft.A)(this.RULE_STACK,(e=>this.shortRuleNameToFullName(e)))}},class{initLooksAhead(e){this.dynamicTokensEnabled=(0,pt.A)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Ss.dynamicTokensEnabled,this.maxLookahead=(0,pt.A)(e,"maxLookahead")?e.maxLookahead:Ss.maxLookahead,this.lookaheadStrategy=(0,pt.A)(e,"lookaheadStrategy")?e.lookaheadStrategy:new os({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,lt.A)(e,(e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,(()=>{const{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:o}=function(e){as.reset(),e.accept(as);const t=as.dslMethods;return as.reset(),t}(e);(0,lt.A)(t,(t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${fn(t)}${n}`,(()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=ss(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)}))})),(0,lt.A)(n,(t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,fn(t))})),(0,lt.A)(r,(t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,fn(t))})),(0,lt.A)(i,(t=>{this.computeLookaheadFunc(e,t.idx,ns,"RepetitionMandatory",t.maxLookahead,fn(t))})),(0,lt.A)(s,(t=>{this.computeLookaheadFunc(e,t.idx,is,"RepetitionMandatoryWithSeparator",t.maxLookahead,fn(t))})),(0,lt.A)(o,(t=>{this.computeLookaheadFunc(e,t.idx,rs,"RepetitionWithSeparator",t.maxLookahead,fn(t))}))}))}))}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,(()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=ss(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,s)}))}getKeyForAutomaticLookahead(e,t){return ss(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,pt.A)(e,"nodeLocationTracking")?e.nodeLocationTracking:Ss.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=us,this.setNodeLocationFromNode=us,this.cstPostRule=Er.A,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Er.A,this.setNodeLocationFromNode=Er.A,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=cs,this.setNodeLocationFromNode=cs,this.cstPostRule=Er.A,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Er.A,this.setNodeLocationFromNode=Er.A,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=Er.A,this.setNodeLocationFromNode=Er.A,this.cstPostRule=Er.A,this.setInitialNodeLocation=Er.A}else this.cstInvocationStateUpdate=Er.A,this.cstFinallyStateUpdate=Er.A,this.cstPostTerminal=Er.A,this.cstPostNonTerminal=Er.A,this.cstPostRule=Er.A}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,Rn.A)(this.baseCstVisitorConstructor)){const e=function(e,t){const n=function(){};ds(n,e+"BaseSemantics");const r={visit:function(e,t){if((0,nn.A)(e)&&(e=e[0]),!(0,Rn.A)(e))return this[e.name](e.children,t)},validateVisitor:function(){const e=function(e,t){const n=function(e,t){const n=(0,bn.A)(t,(t=>!1===(0,Nn.A)(e[t]))),r=(0,ft.A)(n,(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:fs.MISSING_METHOD,methodName:t})));return Gn(r)}(e,t);return n}(this,t);if(!(0,ht.A)(e)){const t=(0,ft.A)(e,(e=>e.msg));throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=t,n}(this.className,(0,St.A)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,Rn.A)(this.baseCstVisitorWithDefaultsConstructor)){const e=function(e,t,n){const r=function(){};ds(r,e+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return(0,lt.A)(t,(e=>{i[e]=hs})),(r.prototype=i).constructor=r,r}(this.className,(0,St.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Is}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Is:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ir,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,pt.A)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,nn.A)(e)){if((0,ht.A)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,nn.A)(e))this.tokensMap=(0,Ln.A)(e,((e,t)=>(e[t.name]=t,e)),{});else if((0,pt.A)(e,"modes")&&dn((0,An.A)((0,dt.A)(e.modes)),Or)){const t=(0,An.A)((0,dt.A)(e.modes)),n=yn(t);this.tokensMap=(0,Ln.A)(n,((e,t)=>(e[t.name]=t,e)),{})}else{if(!(0,ps.A)(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,mt.A)(e)}this.tokensMap.EOF=zr;const n=(0,pt.A)(e,"modes")?(0,An.A)((0,dt.A)(e.modes)):(0,dt.A)(e),r=dn(n,(e=>(0,ht.A)(e.categoryMatches)));this.tokenMatcher=r?Ir:xr,Cr((0,dt.A)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const r=(0,pt.A)(n,"resyncEnabled")?n.resyncEnabled:Ns.resyncEnabled,i=(0,pt.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:Ns.recoveryValueFunc,s=this.ruleShortNameIdx<<12;let o;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,o=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){const r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Hi(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(ns,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Ti.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,ns,e,pi)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(is,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,Ti.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,mi],t,is,e,mi)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,hi,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(rs,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,fi],t,rs,e,fi)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,is,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),r=(0,nn.A)(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new qi(t,e))}}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw Hi(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Yi(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===Ji?n:e}}}saveRecogState(){const e=this.errors,t=(0,mt.A)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),zr)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=Ns){if(cn(this.definedRulesNames,e)){const t={message:Zr.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Cs.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=Ns){const r=function(e,t,n){const r=[];let i;return cn(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:Cs.INVALID_RULE_OVERRIDE,ruleName:e})),r}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(Hi(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return e=(0,dt.A)(this.gastProductionsCache),(0,ft.A)(e,Qt);var e}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=(0,pt.A)(e,"errorMessageProvider")?e.errorMessageProvider:Ss.errorMessageProvider}SAVE_ERROR(e){if(Hi(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,mt.A)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,mt.A)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=bi(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let e=1;e<=this.maxLookahead;e++)s.push(this.LA(e));const o=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Qi(o,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=Li(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));const s=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Xi(o,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,Rn.A)(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return yi([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=Bn(e.ruleStack),n=this.getGAstProductions()[t];return new li(n,e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD}))}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA}))}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Is}topLevelRuleRecord(e,t){try{const n=new Kt({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(t){throw e}throw e}}optionInternalRecord(e,t){return Es.call(this,Vt,e,t)}atLeastOneInternalRecord(e,t){Es.call(this,Wt,t,e)}atLeastOneSepFirstInternalRecord(e,t){Es.call(this,Ht,t,e,gs)}manyInternalRecord(e,t){Es.call(this,zt,t,e)}manySepFirstInternalRecord(e,t){Es.call(this,Yt,t,e,gs)}orInternalRecord(e,t){return Rs.call(this,e,t)}subruleInternalRecord(e,t,n){if(xs(t),!e||!1===(0,pt.A)(e,"ruleName")){const n=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,Rr.A)(this.recordingProdStack),i=e.ruleName,s=new Bt({idx:t,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(s),this.outputCst?vs:ms}consumeInternalRecord(e,t,n){if(xs(t),!Lr(e)){const n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,Rr.A)(this.recordingProdStack),i=new qt({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return r.definition.push(i),Ts}},class{initPerformanceTracer(e){if((0,pt.A)(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Ss.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=kr(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}}],Ls.forEach((e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach((n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(ws.prototype,n,r):ws.prototype[n]=e.prototype[n]}))}));class _s extends Os{constructor(e,t=Ss){const n=(0,mt.A)(t);n.outputCst=!1,super(e,n)}}function $s(e,t,n){return`${e.name}_${t}_${n}`}const Ps=1,Ms=4,Ds=5,Us=7,Fs=8,Gs=9,Bs=10,Ks=11,js=12;class Vs{constructor(e){this.target=e}isEpsilon(){return!1}}class Ws extends Vs{constructor(e,t){super(e),this.tokenType=t}}class Hs extends Vs{constructor(e){super(e)}isEpsilon(){return!0}}class zs extends Vs{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}}function Ys(e,t,n){return n instanceof qt?eo(e,t,n.terminalType,n):n instanceof Bt?function(e,t,n){const r=n.referencedRule,i=e.ruleToStartState.get(r),s=ro(e,t,n,{type:Ps}),o=ro(e,t,n,{type:Ps});return io(s,new zs(i,r,o)),{left:s,right:o}}(e,t,n):n instanceof Xt?function(e,t,n){const r=ro(e,t,n,{type:Ps});Zs(e,r);const i=(0,ft.A)(n.definition,(n=>Ys(e,t,n)));return Js(e,t,r,n,...i)}(e,t,n):n instanceof Vt?function(e,t,n){const r=ro(e,t,n,{type:Ps});Zs(e,r);return function(e,t,n,r){const i=r.left;return no(i,r.right),e.decisionMap[$s(t,"Option",n.idx)]=i,r}(e,t,n,Js(e,t,r,n,Xs(e,t,n)))}(e,t,n):n instanceof zt?function(e,t,n){const r=ro(e,t,n,{type:Ds});Zs(e,r);return Qs(e,t,n,Js(e,t,r,n,Xs(e,t,n)))}(e,t,n):n instanceof Yt?function(e,t,n){const r=ro(e,t,n,{type:Ds});Zs(e,r);return Qs(e,t,n,Js(e,t,r,n,Xs(e,t,n)),eo(e,t,n.separator,n))}(e,t,n):n instanceof Wt?function(e,t,n){const r=ro(e,t,n,{type:Ms});Zs(e,r);return qs(e,t,n,Js(e,t,r,n,Xs(e,t,n)))}(e,t,n):n instanceof Ht?function(e,t,n){const r=ro(e,t,n,{type:Ms});Zs(e,r);return qs(e,t,n,Js(e,t,r,n,Xs(e,t,n)),eo(e,t,n.separator,n))}(e,t,n):Xs(e,t,n)}function Xs(e,t,n){const r=(0,bn.A)((0,ft.A)(n.definition,(n=>Ys(e,t,n))),(e=>void 0!==e));return 1===r.length?r[0]:0===r.length?void 0:function(e,t){const n=t.length;for(let r=0;re.alt))}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function co(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map((e=>e.stateNumber.toString())).join("_")}`}var uo=n(6452);const lo=function(e,t){return e&&e.length?(0,gn.A)(e,(0,Lt.A)(t,2)):[]};function ho(e,t){const n={};return r=>{const i=r.toString();let s=n[i];return void 0!==s||(s={atnStartState:e,decision:t,states:{}},n[i]=s),s}}class fo{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;nconsole.log(e)}initialize(e){this.atn=function(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(e,t){const n=t.length;for(let r=0;r(0,ft.A)(e,(e=>e[0]))));if(go(u,!1)&&!i){const e=(0,Ln.A)(u,((e,t,n)=>((0,lt.A)(t,(t=>{t&&(e[t.tokenTypeIdx]=n,(0,lt.A)(t.categoryMatches,(t=>{e[t]=n})))})),e)),{});return r?function(t){var n;const r=this.LA(1),i=e[r.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(n=t[i])||void 0===n?void 0:n.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){const t=new fo,n=void 0===e?0:e.length;for(let r=0;r(0,ft.A)(e,(e=>e[0]))));if(go(u)&&u[0][0]&&!i){const e=u[0],t=(0,An.A)(e);if(1===t.length&&(0,ht.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,Ln.A)(t,((e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,(0,lt.A)(t.categoryMatches,(t=>{e[t]=!0}))),e)),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=yo.call(this,s,c,po,o);return"object"!=typeof e&&0===e}}}function go(e,t=!0){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(void 0===i){if(t)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function yo(e,t,n,r){const i=e[t](n);let s=i.start;return void 0===s&&(s=Io(i,ko(function(e){const t=new ao,n=e.transitions.length;for(let r=0;r0&&!function(e){for(const t of e.elements)if(t.state.type===Us)return!0;return!1}(s))for(const e of i)s.add(e);return s}(t.configs,n,i);if(0===o.size)return xo(e,t,n,oo),oo;let a=ko(o);const c=function(e,t){let n;for(const r of e.elements)if(!0===t.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(o,i);if(void 0!==c)a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c;else if(function(e){if(function(e){for(const t of e.elements)if(t.state.type!==Us)return!1;return!0}(e))return!0;const t=function(e){const t=new Map;for(const n of e){const e=co(n,!1);let r=t.get(e);void 0===r&&(r={},t.set(e,r)),r[n.alt]=!0}return t}(e.elements);return function(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}(t)&&!function(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}(t)}(o)){const t=(0,uo.A)(o.alts);a.isAcceptState=!0,a.prediction=t,a.configs.uniqueAlt=t,vo.apply(this,[e,r,o.alts,s])}return a=xo(e,t,n,a),a}function vo(e,t,n,r){const i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);const s=e.atnStartState;r(function(e){const t=(0,ft.A)(e.prefixPath,(e=>Mr(e))).join(", "),n=0===e.production.idx?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${function(e){if(e instanceof Bt)return"SUBRULE";if(e instanceof Vt)return"OPTION";if(e instanceof Xt)return"OR";if(e instanceof Wt)return"AT_LEAST_ONE";if(e instanceof Ht)return"AT_LEAST_ONE_SEP";if(e instanceof Yt)return"MANY_SEP";if(e instanceof zt)return"MANY";if(e instanceof qt)return"CONSUME";throw Error("non exhaustive match")}(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:s.rule,ambiguityIndices:n,production:s.production,prefixPath:i}))}function Eo(e,t,n){const r=ei(t.configs.elements,(e=>e.state.transitions));return{actualToken:n,possibleTokenTypes:lo(r.filter((e=>e instanceof Ws)).map((e=>e.tokenType)),(e=>e.tokenTypeIdx)),tokenPath:e}}function Ro(e,t){if(e instanceof Ws&&Xr(t,e.tokenType))return e.target}function ko(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function xo(e,t,n,r){return r=Io(e,r),t.edges[n.tokenTypeIdx]=r,r}function Io(e,t){if(t===oo)return t;const n=t.configs.key,r=e.states[n];return void 0!==r?r:(t.configs.finalize(),e.states[n]=t,t)}function So(e,t){const n=e.state;if(n.type===Us){if(e.stack.length>0){const n=[...e.stack];So({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);const r=n.transitions.length;for(let i=0;i0&&(r.arguments=n),r},e.is=function(e){let t=e;return Ja.defined(t)&&Ja.string(t.title)&&Ja.string(t.command)}}(Ho||(Ho={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Ja.objectLiteral(t)&&Ja.string(t.newText)&&_o.is(t.range)}}(zo||(zo={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Ja.objectLiteral(t)&&Ja.string(t.label)&&(Ja.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ja.string(t.description)||void 0===t.description)}}(Yo||(Yo={})),function(e){e.is=function(e){const t=e;return Ja.string(t)}}(Xo||(Xo={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return zo.is(t)&&(Yo.is(t.annotationId)||Xo.is(t.annotationId))}}(qo||(qo={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Ja.defined(t)&&ia.is(t.textDocument)&&Array.isArray(t.edits)}}(Qo||(Qo={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Ja.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ja.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ja.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Xo.is(t.annotationId))}}(Zo||(Zo={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Ja.string(t.oldUri)&&Ja.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ja.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ja.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Xo.is(t.annotationId))}}(Jo||(Jo={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Ja.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ja.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ja.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Xo.is(t.annotationId))}}(ea||(ea={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((e=>Ja.string(e.kind)?Zo.is(e)||Jo.is(e)||ea.is(e):Qo.is(e))))}}(ta||(ta={})),function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Ja.defined(t)&&Ja.string(t.uri)}}(na||(na={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ja.defined(t)&&Ja.string(t.uri)&&Ja.integer(t.version)}}(ra||(ra={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Ja.defined(t)&&Ja.string(t.uri)&&(null===t.version||Ja.integer(t.version))}}(ia||(ia={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Ja.defined(t)&&Ja.string(t.uri)&&Ja.string(t.languageId)&&Ja.integer(t.version)&&Ja.string(t.text)}}(sa||(sa={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(oa||(oa={})),function(e){e.is=function(e){const t=e;return Ja.objectLiteral(e)&&oa.is(t.kind)&&Ja.string(t.value)}}(aa||(aa={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(ca||(ca={})),function(e){e.PlainText=1,e.Snippet=2}(ua||(ua={})),function(e){e.Deprecated=1}(la||(la={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Ja.string(t.newText)&&_o.is(t.insert)&&_o.is(t.replace)}}(da||(da={})),function(e){e.asIs=1,e.adjustIndentation=2}(ha||(ha={})),function(e){e.is=function(e){const t=e;return t&&(Ja.string(t.detail)||void 0===t.detail)&&(Ja.string(t.description)||void 0===t.description)}}(fa||(fa={})),function(e){e.create=function(e){return{label:e}}}(pa||(pa={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(ma||(ma={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Ja.string(t)||Ja.objectLiteral(t)&&Ja.string(t.language)&&Ja.string(t.value)}}(ga||(ga={})),function(e){e.is=function(e){let t=e;return!!t&&Ja.objectLiteral(t)&&(aa.is(t.contents)||ga.is(t.contents)||Ja.typedArray(t.contents,ga.is))&&(void 0===e.range||_o.is(e.range))}}(ya||(ya={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Aa||(Aa={})),function(e){e.create=function(e,t,...n){let r={label:e};return Ja.defined(t)&&(r.documentation=t),Ja.defined(n)?r.parameters=n:r.parameters=[],r}}(Ta||(Ta={})),function(e){e.Text=1,e.Read=2,e.Write=3}(va||(va={})),function(e){e.create=function(e,t){let n={range:e};return Ja.number(t)&&(n.kind=t),n}}(Ea||(Ea={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Ra||(Ra={})),function(e){e.Deprecated=1}(ka||(ka={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(xa||(xa={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(Ia||(Ia={})),function(e){e.create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},e.is=function(e){let t=e;return t&&Ja.string(t.name)&&Ja.number(t.kind)&&_o.is(t.range)&&_o.is(t.selectionRange)&&(void 0===t.detail||Ja.string(t.detail))&&(void 0===t.deprecated||Ja.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Sa||(Sa={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Na||(Na={})),function(e){e.Invoked=1,e.Automatic=2}(Ca||(Ca={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Ja.defined(t)&&Ja.typedArray(t.diagnostics,Wo.is)&&(void 0===t.only||Ja.typedArray(t.only,Ja.string))&&(void 0===t.triggerKind||t.triggerKind===Ca.Invoked||t.triggerKind===Ca.Automatic)}}(wa||(wa={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):Ho.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Ja.string(t.title)&&(void 0===t.diagnostics||Ja.typedArray(t.diagnostics,Wo.is))&&(void 0===t.kind||Ja.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Ho.is(t.command))&&(void 0===t.isPreferred||Ja.boolean(t.isPreferred))&&(void 0===t.edit||ta.is(t.edit))}}(La||(La={})),function(e){e.create=function(e,t){let n={range:e};return Ja.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Ja.defined(t)&&_o.is(t.range)&&(Ja.undefined(t.command)||Ho.is(t.command))}}(ba||(ba={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Ja.defined(t)&&Ja.uinteger(t.tabSize)&&Ja.boolean(t.insertSpaces)}}(Oa||(Oa={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Ja.defined(t)&&_o.is(t.range)&&(Ja.undefined(t.target)||Ja.string(t.target))}}(_a||(_a={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Ja.objectLiteral(n)&&_o.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}($a||($a={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(Pa||(Pa={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(Ma||(Ma={})),function(e){e.is=function(e){const t=e;return Ja.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(Da||(Da={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&_o.is(t.range)&&Ja.string(t.text)}}(Ua||(Ua={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&_o.is(t.range)&&Ja.boolean(t.caseSensitiveLookup)&&(Ja.string(t.variableName)||void 0===t.variableName)}}(Fa||(Fa={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&_o.is(t.range)&&(Ja.string(t.expression)||void 0===t.expression)}}(Ga||(Ga={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Ja.defined(t)&&_o.is(e.stoppedLocation)}}(Ba||(Ba={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(Ka||(Ka={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Ja.objectLiteral(t)&&(void 0===t.tooltip||Ja.string(t.tooltip)||aa.is(t.tooltip))&&(void 0===t.location||$o.is(t.location))&&(void 0===t.command||Ho.is(t.command))}}(ja||(ja={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Ja.objectLiteral(t)&&Oo.is(t.position)&&(Ja.string(t.label)||Ja.typedArray(t.label,ja.is))&&(void 0===t.kind||Ka.is(t.kind))&&void 0===t.textEdits||Ja.typedArray(t.textEdits,zo.is)&&(void 0===t.tooltip||Ja.string(t.tooltip)||aa.is(t.tooltip))&&(void 0===t.paddingLeft||Ja.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Ja.boolean(t.paddingRight))}}(Va||(Va={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(Wa||(Wa={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Ha||(Ha={})),function(e){e.create=function(e){return{items:e}}}(za||(za={})),function(e){e.Invoked=0,e.Automatic=1}(Ya||(Ya={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Xa||(Xa={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(qa||(qa={})),function(e){e.is=function(e){const t=e;return Ja.objectLiteral(t)&&wo.is(t.uri)&&Ja.string(t.name)}}(Qa||(Qa={})),function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,c=0;for(;o{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(Za||(Za={}));class ec{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Oo.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return Oo.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1=0&&t.content.splice(n,1)}}construct(e){const t=this.current;"string"==typeof e.$type&&(this.current.astNode=e),e.$cstNode=t;const n=this.nodeStack.pop();0===(null==n?void 0:n.content.length)&&this.removeNode(n)}addHiddenTokens(e){for(const t of e){const e=new rc(t.startOffset,t.image.length,T(t),t.tokenType,!0);e.root=this.rootNode,this.addHiddenToken(this.rootNode,e)}}addHiddenToken(e,t){const{offset:n,end:r}=t;for(let i=0;io&&r=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class sc extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,sc.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(const t of e)t.container=this.parent}}class oc extends ic{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=null!=e?e:""}}const ac=Symbol("Datatype");function cc(e){return e.$type===ac}const uc=e=>e.endsWith("​")?e:e+"​";class lc{constructor(e){this._unorderedGroups=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition;this.wrapper=new gc(t,Object.assign(Object.assign({},e.parser.ParserConfig),{errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class dc extends lc{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new tc,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const n=e.fragment?void 0:tt(e)?ac:it(e),r=this.wrapper.DEFINE_RULE(uc(e.name),this.startImplementation(n,t).bind(this));return e.entry&&(this.mainRule=r),r}parse(e){this.nodeBuilder.buildRootNode(e);const t=this.lexer.tokenize(e);this.wrapper.input=t.tokens;const n=this.mainRule.call(this.wrapper,{});return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:n,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(e,t){return n=>{if(!this.isRecording()){const t={$type:e};this.stack.push(t),e===ac&&(t.value="")}let r;try{r=t(n)}catch(e){r=void 0}return this.isRecording()||void 0!==r||(r=this.construct()),r}}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.nodeBuilder.buildLeafNode(r,n),{assignment:t,isCrossRef:i}=this.getAssignment(n),s=this.current;if(t){const s=oe(n)?r.image:this.converter.convert(r.image,e);this.assign(t.operator,t.feature,s,e,i)}else if(cc(s)){let t=r.image;oe(n)||(t=this.converter.convert(t,e).toString()),s.value+=t}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,n,r){let i;this.isRecording()||(i=this.nodeBuilder.buildCompositeNode(n));const s=this.wrapper.wrapSubrule(e,t,r);!this.isRecording()&&i&&i.length>0&&this.performSubruleAssignment(s,n,i)}performSubruleAssignment(e,t,n){const{assignment:r,isCrossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){const t=this.current;if(cc(t))t.value+=e.toString();else if("object"==typeof e&&e){const n=e.$type,r=this.assignWithoutOverride(e,t);n&&(r.$type=n);const i=r;this.stack.pop(),this.stack.push(i)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(!n.$cstNode&&t.feature&&t.operator){n=this.construct(!1);const e=n.$cstNode.feature;this.nodeBuilder.buildCompositeNode(e)}const r={$type:e};this.stack.pop(),this.stack.push(r),t.feature&&t.operator&&this.assign(t.operator,t.feature,n,n.$cstNode,!1)}}construct(e=!0){if(this.isRecording())return;const t=this.current;return function(e){for(const[t,n]of Object.entries(e))t.startsWith("$")||(Array.isArray(n)?n.forEach(((n,i)=>{r(n)&&(n.$container=e,n.$containerProperty=t,n.$containerIndex=i)})):r(n)&&(n.$container=e,n.$containerProperty=t))}(t),this.nodeBuilder.construct(t),e&&this.stack.pop(),cc(t)?this.converter.convert(t.value,t.$cstNode):(function(e,t){const n=e.getTypeMetaData(t.$type),r=t;for(const e of n.properties)void 0!==e.defaultValue&&void 0===r[e.name]&&(r[e.name]=Ce(e.defaultValue))}(this.astReflection,t),t)}getAssignment(e){if(!this.assignmentMap.has(e)){const t=Ee(e,Z);this.assignmentMap.set(e,{assignment:t,isCrossRef:!!t&&te(t.terminal)})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let o;switch(o=i&&"string"==typeof n?this.linker.buildReference(s,t,r,n):n,e){case"=":s[t]=o;break;case"?=":s[t]=!0;break;case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(o)}}assignWithoutOverride(e,t){for(const[n,r]of Object.entries(t)){const t=e[n];void 0===t?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}return e}get definitionErrors(){return this.wrapper.definitionErrors}}class hc{buildMismatchTokenMessage(e){return qr.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return qr.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return qr.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return qr.buildEarlyExitMessage(e)}}class fc extends hc{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class pc extends lc{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e);return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(uc(e.name),this.startImplementation(t).bind(this));return e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r){this.before(n),this.wrapper.wrapSubrule(e,t,r),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const mc={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new fc};class gc extends _s{constructor(e,t){const n=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},mc),{lookaheadStrategy:n?new os({maxLookahead:t.maxLookahead}):new mo}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}}function yc(e,t,n){return function(e,t){const n=Xe(t,!1),r=p(t.rules).filter(G).filter((e=>n.has(e)));for(const t of r){const n=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});n.rules.set(t.name,e.parser.rule(t,Ac(n,t.definition)))}}({parser:t,tokens:n,rules:new Map,ruleNames:new Map},e),t}function Ac(e,t,n=!1){let r;if(oe(t))r=function(e,t){const n=e.consume++,r=e.tokens[t.value];if(!r)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(n,r,t)}(e,t);else if(Y(t))r=function(e,t){const n=it(t);return()=>e.parser.action(n,t)}(e,t);else if(Z(t))r=Ac(e,t.terminal);else if(te(t))r=Ec(e,t);else if(le(t))r=function(e,t){const n=t.rule.ref;if(G(n)){const r=e.subrule++,i=t.arguments.length>0?function(e,t){const n=t.map((e=>Tc(e.value)));return t=>{const r={};for(let i=0;i({});return s=>e.parser.subrule(r,kc(e,n),t,i(s))}if(V(n)){const r=e.consume++,i=xc(e,n.name);return()=>e.parser.consume(r,i,t)}if(!n)throw new k(t.$cstNode,`Undefined rule type: ${t.$type}`);x()}(e,t);else if(q(t))r=function(e,t){if(1===t.elements.length)return Ac(e,t.elements[0]);{const n=[];for(const r of t.elements){const t={ALT:Ac(e,r,!0)},i=vc(r);i&&(t.GATE=Tc(i)),n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map((e=>{const n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n})))}}(e,t);else if(ge(t))r=function(e,t){if(1===t.elements.length)return Ac(e,t.elements[0]);const n=[];for(const r of t.elements){const t={ALT:Ac(e,r,!0)},i=vc(r);i&&(t.GATE=Tc(i)),n.push(t)}const r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,s=Rc(e,vc(t),(t=>e.parser.alternatives(r,n.map(((n,s)=>{const o={ALT:()=>!0},a=e.parser;o.ALT=()=>{if(n.ALT(t),!a.isRecording()){const e=i(r,a);a.unorderedGroups.get(e)||a.unorderedGroups.set(e,[]);const t=a.unorderedGroups.get(e);void 0===(null==t?void 0:t[s])&&(t[s]=!0)}};const c=n.GATE;return o.GATE=c?()=>c(t):()=>{const e=a.unorderedGroups.get(i(r,a));return!(null==e?void 0:e[s])},o})))),"*");return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}(e,t);else if(ie(t))r=function(e,t){const n=t.elements.map((t=>Ac(e,t)));return e=>n.forEach((t=>t(e)))}(e,t);else{if(i=t,!ve.isInstance(i,ne))throw new k(t.$cstNode,`Unexpected element type: ${t.$type}`);{const n=e.consume++;r=()=>e.parser.consume(n,zr,t)}}var i;return Rc(e,n?void 0:vc(t),r,t.cardinality)}function Tc(e){if(t=e,ve.isInstance(t,O)){const t=Tc(e.left),n=Tc(e.right);return e=>t(e)||n(e)}if(function(e){return ve.isInstance(e,b)}(e)){const t=Tc(e.left),n=Tc(e.right);return e=>t(e)&&n(e)}if(function(e){return ve.isInstance(e,D)}(e)){const t=Tc(e.value);return e=>!t(e)}if(function(e){return ve.isInstance(e,U)}(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(function(e){return ve.isInstance(e,L)}(e)){const t=Boolean(e.true);return()=>t}var t;x()}function vc(e){if(ie(e))return e.guardCondition}function Ec(e,t,n=t.terminal){if(n){if(le(n)&&G(n.rule.ref)){const r=e.subrule++;return i=>e.parser.subrule(r,kc(e,n.rule.ref),t,i)}if(le(n)&&V(n.rule.ref)){const r=e.consume++,i=xc(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(oe(n)){const r=e.consume++,i=xc(e,n.value);return()=>e.parser.consume(r,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const n=Je(t.type.ref),r=null==n?void 0:n.terminal;if(!r)throw new Error("Could not find name assignment for type: "+it(t.type.ref));return Ec(e,t,r)}}function Rc(e,t,n,r){const i=t&&Tc(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:bs(),GATE:()=>!i(r)}])}return n}if("*"===r){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:bs(),GATE:()=>!i(s)}])}return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}if("?"===r){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}x()}function kc(e,t){const n=function(e,t){if(G(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!G(r);)(ie(r)||q(r)||ge(r))&&(i=r.elements.indexOf(n).toString()+":"+i),n=r,r=r.$container;return i=r.name+":"+i,e.ruleNames.set(t,i),i}}(e,t),r=e.rules.get(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function xc(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}class Ic{buildTokens(e,t){const n=p(Xe(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return r.forEach((e=>{const t=e.PATTERN;"object"==typeof t&&t&&"test"in t&&ze(t)?i.unshift(e):i.push(e)})),i}buildTerminalTokens(e){return e.filter(V).filter((e=>!e.fragment)).map((e=>this.buildTerminalToken(e))).toArray()}buildTerminalToken(e){const t=st(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n,LINE_BREAKS:!0};return e.hidden&&(r.GROUP=ze(t)?Pr.SKIPPED:"hidden"),r}requiresCustomPattern(e){return!!e.flags.includes("u")||!(!e.source.includes("?<=")&&!e.source.includes("?(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(G).flatMap((e=>xe(e).filter(oe))).distinct((e=>e.value)).toArray().sort(((e,t)=>t.value.length-e.value.length)).map((e=>this.buildKeywordToken(e,t,Boolean(null==n?void 0:n.caseInsensitive))))}buildKeywordToken(e,t,n){return{name:e.value,PATTERN:this.buildKeywordPattern(e,n),LONGER_ALT:this.findLongerAlt(e,t)}}buildKeywordPattern(e,t){return t?new RegExp(function(e){return Array.prototype.map.call(e,(e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Ye(e))).join("")}(e.value)):e.value}findLongerAlt(e,t){return t.reduce(((t,n)=>{const r=null==n?void 0:n.PATTERN;return(null==r?void 0:r.source)&&function(e,t){const n=function(e){"string"==typeof e&&(e=new RegExp(e));const t=e,n=e.source;let r=0;return new RegExp(function e(){let i,s="";function o(e){s+=n.substr(r,e),r+=e}function a(e){s+="(?:"+n.substr(r,e)+"|$)",r+=e}for(;r",r)-r+1);break;default:a(2)}break;case"[":i=/\[(?:\\.|.)*?\]/g,i.lastIndex=r,i=i.exec(n)||[],a(i[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":i=/\{\d+,?\d*\}/g,i.lastIndex=r,i=i.exec(n),i?o(i[0].length):a(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":s+="(?:",r+=3,s+=e()+"|$)";break;case"=":s+="(?=",r+=3,s+=e()+")";break;case"!":i=r,r+=3,e(),s+=n.substr(i,r-i);break;case"<":switch(n[r+3]){case"=":case"!":i=r,r+=4,e(),s+=n.substr(i,r-i);break;default:o(n.indexOf(">",r)-r+1),s+=e()+"|$)"}}else o(1),s+=e()+"|$)";break;case")":return++r,s;default:a(1)}return s}(),e.flags)}(e),r=t.match(n);return!!r&&r[0].length>0}("^"+r.source+"$",e.value)&&t.push(n),t}),[])}}class Sc{convert(e,t){let n=t.grammarSource;if(te(n)&&(n=function(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=Je(e.type.ref);return null==t?void 0:t.terminal}}(n)),le(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,e,t)}return e}runConverter(e,t,n){var r;switch(e.name.toUpperCase()){case"INT":return Nc.convertInt(t);case"STRING":return Nc.convertString(t);case"ID":return Nc.convertID(t)}switch(null===(r=function(e){var t,n,r;return V(e)?null!==(n=null===(t=e.type)||void 0===t?void 0:t.name)&&void 0!==n?n:"string":tt(e)?e.name:null!==(r=rt(e))&&void 0!==r?r:e.name}(e))||void 0===r?void 0:r.toLowerCase()){case"number":return Nc.convertNumber(t);case"boolean":return Nc.convertBoolean(t);case"bigint":return Nc.convertBigint(t);case"date":return Nc.convertDate(t);default:return t}}}var Nc;!function(e){function t(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}e.convertString=function(e){let n="";for(let r=1;r=10&&(wc=t,await new Promise((e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)}))),e.isCancellationRequested)throw Lc}class _c{constructor(){this.promise=new Promise(((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)}))}}class $c{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const t of e)if($c.isIncremental(t)){const e=Gc(t.range),n=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,n)+t.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let o=this._lineOffsets;const a=Uc(t.text,!1,n);if(s-i===a.length)for(let e=0,t=a.length;ee?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1t&&Fc(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var Pc,Mc;function Dc(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Dc(r,t),Dc(i,t);let s=0,o=0,a=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Bc(e){const t=Gc(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new $c(e,t,n,r)},e.update=function(e,t,n){if(e instanceof $c)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=Dc(t.map(Bc),((e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));let i=0;const s=[];for(const t of r){const r=e.offsetAt(t.range.start);if(ri&&s.push(n.substring(i,r)),t.newText.length&&s.push(t.newText),i=e.offsetAt(t.range.end)}return s.push(n.substr(i)),s.join("")}}(Pc||(Pc={})),(()=>{var e={470:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;iu){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else o>u&&(47===e.charCodeAt(i+d)?l=d:0===d&&(l=0));break}var h=e.charCodeAt(i+d);if(h!==n.charCodeAt(a+d))break;47===h&&(l=d)}var f="";for(d=i+l+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(a+l):(a+=l,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(47===u){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),a>=0&&(u===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(s=!1,i=a+1),46===c?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,c=-1,u=!0,l=e.length-1,d=0;l>=r;--l)if(47!==(i=e.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===o?o=l:1!==d&&(d=1):-1!==o&&(d=-1);else if(!u){a=l+1;break}return-1===o||-1===c||0===d||1===d&&o===c-1&&o===a+1?-1!==c&&(n.base=n.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(a,o),n.base=e.slice(a,c)),n.ext=e.slice(o,c)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{let e;if(n.r(r),n.d(r,{URI:()=>l,Utils:()=>x}),"object"==typeof process)e="win32"===process.platform;else if("object"==typeof navigator){let t=navigator.userAgent;e=t.indexOf("Windows")>=0}const t=/^\w[\w\d+.-]*$/,i=/^\//,s=/^\/\//;function o(e,n){if(!e.scheme&&n)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!t.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!i.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(s.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const a="",c="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class l{static isUri(e){return e instanceof l||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||a,this.authority=e.authority||a,this.path=e.path||a,this.query=e.query||a,this.fragment=e.fragment||a):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||a,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==c&&(t=c+t):t=c}return t}(this.scheme,n||a),this.query=r||a,this.fragment=i||a,o(this,s))}get fsPath(){return g(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=a),void 0===n?n=this.authority:null===n&&(n=a),void 0===r?r=this.path:null===r&&(r=a),void 0===i?i=this.query:null===i&&(i=a),void 0===s?s=this.fragment:null===s&&(s=a),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new h(t,n,r,i,s)}static parse(e,t=!1){const n=u.exec(e);return n?new h(n[2]||a,v(n[4]||a),v(n[5]||a),v(n[7]||a),v(n[9]||a),t):new h(a,a,a,a,a)}static file(t){let n=a;if(e&&(t=t.replace(/\\/g,c)),t[0]===c&&t[1]===c){const e=t.indexOf(c,2);-1===e?(n=t.substring(2),t=c):(n=t.substring(2,e),t=t.substring(e)||c)}return new h("file",n,t,a,a)}static from(e){const t=new h(e.scheme,e.authority,e.path,e.query,e.fragment);return o(t,!0),t}toString(e=!1){return y(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof l)return e;{const t=new h(e);return t._formatted=e.external,t._fsPath=e._sep===d?e.fsPath:null,t}}return e}}const d=e?1:void 0;class h extends l{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(e=!1){return e?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=d),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const f={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function p(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=f[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function m(e){let t;for(let n=0;n1&&"file"===t.scheme?`//${t.authority}${t.path}`:47===t.path.charCodeAt(0)&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&58===t.path.charCodeAt(2)?n?t.path.substr(1):t.path[1].toLowerCase()+t.path.substr(2):t.path,e&&(r=r.replace(/\//g,"\\")),r}function y(e,t){const n=t?m:p;let r="",{scheme:i,authority:s,path:o,query:a,fragment:u}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=c,r+=c),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),u&&(r+="#",r+=t?u:p(u,!1,!1)),r}function A(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+A(e.substr(3)):e}}const T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function v(e){return e.match(T)?e.replace(T,(e=>A(e))):e}var E=n(470);const R=E.posix||E,k="/";var x;!function(e){e.joinPath=function(e,...t){return e.with({path:R.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let i=R.resolve(n,...t);return r&&i[0]===k&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=R.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return R.basename(e.path)},e.extname=function(e){return R.extname(e.path)}}(x||(x={}))})(),Mc=r})();const{URI:Kc,Utils:jc}=Mc;var Vc,Wc,Hc,zc,Yc;!function(e){e.basename=jc.basename,e.dirname=jc.dirname,e.extname=jc.extname,e.joinPath=jc.joinPath,e.resolvePath=jc.resolvePath,e.equals=function(e,t){return(null==e?void 0:e.toString())===(null==t?void 0:t.toString())},e.relative=function(e,t){const n="string"==typeof e?e:e.path,r="string"==typeof t?t:t.path,i=n.split("/").filter((e=>e.length>0)),s=r.split("/").filter((e=>e.length>0));let o=0;for(;onull!=r?r:r=Pc.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,null!=t?t:"")}}class qc{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory}get all(){return p(this.documentMap.values())}addDocument(e){const t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){const t=e.toString();return this.documentMap.get(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then((e=>(this.addDocument(e),e)));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const t=e.toString(),n=this.documentMap.get(t);return n&&(n.state=Wc.Changed,n.precomputedScopes=void 0,n.references=[],n.diagnostics=void 0),n}deleteDocument(e){const t=e.toString(),n=this.documentMap.get(t);return n&&(n.state=Wc.Changed,this.documentMap.delete(t)),n}}class Qc{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,t=Cc.XO.None){for(const n of Ie(e.parseResult.value))await Oc(t),Ne(n).forEach((t=>this.doLink(t,e)))}doLink(e,t){const n=e.reference;if(void 0===n._ref)try{const t=this.getCandidate(e);if(s(t))n._ref=t;else if(n._nodeDescription=t,this.langiumDocuments().hasDocument(t.documentUri)){const r=this.loadAstNode(t);n._ref=null!=r?r:this.createLinkingError(e,t)}}catch(t){n._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${n.$refText}': ${t}`})}t.references.push(n)}unlink(e){for(const t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){const t=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return null!=t?t:this.createLinkingError(e)}buildReference(e,t,n,i){const o=this,a={$refNode:n,$refText:i,get ref(){var n,i;if(r(this._ref))return this._ref;if("object"==typeof(i=this._nodeDescription)&&null!==i&&"string"==typeof i.name&&"string"==typeof i.type&&"string"==typeof i.path){const n=o.loadAstNode(this._nodeDescription);this._ref=null!=n?n:o.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){const r=o.getLinkedNode({reference:a,container:e,property:t});if(r.error&&Re(e).state=e.end)return t.ref}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||function(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}(e,t)))return n}}}findDeclarationNode(e){const t=this.findDeclaration(e);if(null==t?void 0:t.$cstNode){const e=this.nameProvider.getNameNode(t);return null!=e?e:t.$cstNode}}findReferences(e,t){const n=[];if(t.includeDeclaration){const t=this.getReferenceToSelf(e);t&&n.push(t)}let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter((e=>Vc.equals(e.sourceUri,t.documentUri)))),n.push(...r),p(n)}getReferenceToSelf(e){const t=this.nameProvider.getNameNode(e);if(t){const n=Re(e),r=this.nodeLocator.getAstNodePath(e);return{sourceUri:n.uri,sourcePath:r,targetUri:n.uri,targetPath:r,segment:v(t),local:!0}}}}class eu{constructor(e){if(this.map=new Map,e)for(const[t,n]of e)this.add(t,n)}get size(){return g.sum(p(this.map.values()).map((e=>e.length)))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0)return 1===n.length?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){var t;return null!==(t=this.map.get(e))&&void 0!==t?t:[]}has(e,t){if(void 0===t)return this.map.has(e);{const n=this.map.get(e);return!!n&&n.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach(((t,n)=>t.forEach((t=>e(t,n,this)))))}[Symbol.iterator](){return this.entries().iterator()}entries(){return p(this.map.entries()).flatMap((([e,t])=>t.map((t=>[e,t]))))}keys(){return p(this.map.keys())}values(){return p(this.map.values()).flat()}entriesGroupedByKey(){return p(this.map.entries())}}class tu{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}class nu{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=Cc.XO.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,n=ke,r=Cc.XO.None){const i=[];this.exportNode(e,i,t);for(const s of n(e))await Oc(r),this.exportNode(s,i,t);return i}exportNode(e,t,n){const r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async computeLocalScopes(e,t=Cc.XO.None){const n=e.parseResult.value,r=new eu;for(const i of xe(n))await Oc(t),this.processNode(i,e,r);return r}processNode(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}}class ru{constructor(e,t,n){var r;this.elements=e,this.outerScope=t,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find((t=>t.name.toLowerCase()===e.toLowerCase())):this.elements.find((t=>t.name===e)))||(this.outerScope?this.outerScope.getElement(e):void 0)}}class iu{constructor(e,t,n){var r;this.elements=new Map,this.caseInsensitive=null!==(r=null==n?void 0:n.caseInsensitive)&&void 0!==r&&r;for(const t of e){const e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e;return this.elements.get(t)||(this.outerScope?this.outerScope.getElement(e):void 0)}getAllElements(){let e=p(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class su{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach((e=>e.dispose()))}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class ou extends su{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class au extends su{constructor(e){super(),this.cache=new Map,this.converter=null!=e?e:e=>e}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){const e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}}class cu extends ou{constructor(e){super(),this.onDispose(e.workspace.DocumentBuilder.onUpdate((()=>{this.clear()})))}}class uu{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new cu(e.shared)}getScope(e){const t=[],n=this.reflection.getReferenceType(e),r=Re(e.container).precomputedScopes;if(r){let i=e.container;do{const e=r.get(i);e.length>0&&t.push(p(e).filter((e=>this.reflection.isSubtype(e.type,n)))),i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new ru(p(e),t,n)}createScopeForNodes(e,t,n){const r=p(e).map((e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)})).nonNullable();return new ru(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,(()=>new iu(this.indexManager.allElements(e))))}}function lu(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}class du{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t={}){const n=null==t?void 0:t.replacer,r=(e,n)=>this.replacer(e,n,t),i=n?(e,t)=>n(e,t,r):r;try{return this.currentDocument=Re(e),JSON.stringify(e,i,null==t?void 0:t.space)}finally{this.currentDocument=void 0}}deserialize(e,t={}){const n=JSON.parse(e);return this.linkNode(n,n,t),n}replacer(e,t,{refText:n,sourceText:s,textRegions:o,comments:a,uriConverter:c}){var u,l,d,h;if(!this.ignoreProperties.has(e)){if(i(t)){const e=t.ref,r=n?t.$refText:void 0;if(e){const n=Re(e);let i="";return this.currentDocument&&this.currentDocument!==n&&(i=c?c(n.uri,t):n.uri.toString()),{$ref:`${i}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:r}}return{$error:null!==(l=null===(u=t.error)||void 0===u?void 0:u.message)&&void 0!==l?l:"Could not resolve reference",$refText:r}}if(r(t)){let n;if(o&&(n=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},t)),e&&!t.$document||!(null==n?void 0:n.$textRegion)||(n.$textRegion.documentURI=null===(d=this.currentDocument)||void 0===d?void 0:d.uri.toString())),s&&!e&&(null!=n||(n=Object.assign({},t)),n.$sourceText=null===(h=t.$cstNode)||void 0===h?void 0:h.text),a){null!=n||(n=Object.assign({},t));const e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,""))}return null!=n?n:t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter((e=>!e.startsWith("$"))).forEach((r=>{const i=function(e,t){return e&&t?Ze(e,t,e.astNode,!0):[]}(e.$cstNode,r).map(t);0!==i.length&&(n[r]=i)})),e}}linkNode(e,t,n,i,s,o){for(const[i,s]of Object.entries(e))if(Array.isArray(s))for(let o=0;o{try{await e.call(t,n,r,i)}catch(e){if(bc(e))throw e;console.error("An error occurred during validation:",e);const t=e instanceof Error?e.message:String(e);e instanceof Error&&e.stack&&console.error(e.stack),r("error","An error occurred during validation: "+t,{node:n})}}}addEntry(e,t){if("AstNode"!==e)for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,t);else this.entries.add("AstNode",t)}getChecks(e,t){let n=p(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(n=n.filter((e=>t.includes(e.category)))),n.map((e=>e.check))}}class mu{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},n=Cc.XO.None){const r=e.parseResult,i=[];if(await Oc(n),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===zc.LexingError})))return i;if(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===zc.ParsingError})))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some((e=>{var t;return(null===(t=e.data)||void 0===t?void 0:t.code)===zc.LinkingError})))return i}try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(bc(e))throw e;console.error("An error occurred during validation:",e)}return await Oc(n),i}processLexingErrors(e,t,n){for(const n of e.lexerErrors){const e={severity:yu("error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:fu(zc.LexingError),source:this.getSource()};t.push(e)}}processParsingErrors(e,t,n){for(const n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if("previousToken"in n){const t=n.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=T(n.token);if(e){const r={severity:yu("error"),range:e,message:n.message,data:fu(zc.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(const n of e.references){const e=n.error;if(e){const n={node:e.container,property:e.property,index:e.index,data:{code:zc.LinkingError,containerType:e.container.$type,property:e.property,refText:e.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=Cc.XO.None){const r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await Promise.all(Ie(e).map((async e=>{await Oc(n);const r=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of r)await t(e,i,n)}))),r}toDiagnostic(e,t,n){return{message:t,range:gu(n),severity:yu(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function gu(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=Qe(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=function(e,t,n){if(!e)return;const r=function(e,t,n){if(e.astNode!==n)return[];if(oe(e.grammarSource)&&e.grammarSource.value===t)return[e];const r=A(e).iterator();let i;const s=[];do{if(i=r.next(),!i.done){const e=i.value;e.astNode===n?oe(e.grammarSource)&&e.grammarSource.value===t&&s.push(e):r.prune()}}while(!i.done);return s}(e,t,null==e?void 0:e.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}(e.node.$cstNode,e.keyword,e.index)),null!=t||(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function yu(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}!function(e){e.LexingError="lexing-error",e.ParsingError="parsing-error",e.LinkingError="linking-error"}(zc||(zc={}));class Au{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n=Re(e)){null!=t||(t=this.nameProvider.getName(e));const r=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${r} has no name.`);let i;const s=()=>{var t;return null!=i?i:i=v(null!==(t=this.nameProvider.getNameNode(e))&&void 0!==t?t:e.$cstNode)};return{node:e,name:t,get nameSegment(){return s()},selectionSegment:v(e.$cstNode),type:e.$type,documentUri:n.uri,path:r}}}class Tu{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Cc.XO.None){const n=[],r=e.parseResult.value;for(const e of Ie(r))await Oc(t),Ne(e).filter((e=>!s(e))).forEach((e=>{const t=this.createDescription(e);t&&n.push(t)}));return n}createDescription(e){const t=e.reference.$nodeDescription,n=e.reference.$refNode;if(!t||!n)return;const r=Re(e.container).uri;return{sourceUri:r,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:t.documentUri,targetPath:t.path,segment:v(n),local:Vc.equals(t.documentUri,r)}}}class vu{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce(((e,t)=>{if(!e||0===t.length)return e;const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n),i=parseInt(t.substring(n+1)),s=e[r];return null==s?void 0:s[i]}return e[t]}),e)}}class Eu{constructor(e){this._ready=new _c,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var t,n;this.workspaceConfig=null!==(n=null===(t=e.capabilities.workspace)||void 0===t?void 0:t.configuration)&&void 0!==n&&n}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map((e=>this.toSectionName(e.LanguageMetaData.languageId)))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map((e=>({section:this.toSectionName(e.LanguageMetaData.languageId)}))),n=await e.fetchConfiguration(t);t.forEach(((e,t)=>{this.updateSectionConfiguration(e.section,n[t])}))}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach((t=>{this.updateSectionConfiguration(t,e.settings[t])}))}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}}!function(e){e.create=function(e){return{dispose:async()=>await e()}}}(Yc||(Yc={}));class Ru{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new eu,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Wc.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Cc.XO.None){var r,i;for(const n of e){const e=n.uri.toString();if(n.state===Wc.Validated){if("boolean"==typeof t.validation&&t.validation)n.state=Wc.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(e);else if("object"==typeof t.validation){const s=this.buildState.get(e),o=null===(r=null==s?void 0:s.result)||void 0===r?void 0:r.validationChecks;if(o){const r=(null!==(i=t.validation.categories)&&void 0!==i?i:Hc.all).filter((e=>!o.includes(e)));r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:Object.assign(Object.assign({},t.validation),{categories:r})},result:s.result}),n.state=Wc.IndexedReferences)}}}else this.buildState.delete(e)}this.currentState=Wc.Changed,await this.emitUpdate(e.map((e=>e.uri)),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Cc.XO.None){this.currentState=Wc.Changed;for(const e of t)this.langiumDocuments.deleteDocument(e),this.buildState.delete(e.toString()),this.indexManager.remove(e);for(const t of e){if(!this.langiumDocuments.invalidateDocument(t)){const e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},t);e.state=Wc.Changed,this.langiumDocuments.addDocument(e)}this.buildState.delete(t.toString())}const r=p(e).concat(t).map((e=>e.toString())).toSet();this.langiumDocuments.all.filter((e=>!r.has(e.uri.toString())&&this.shouldRelink(e,r))).forEach((e=>{this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e),e.state=Math.min(e.state,Wc.ComputedScopes),e.diagnostics=void 0})),await this.emitUpdate(e,t),await Oc(n);const i=this.langiumDocuments.all.filter((e=>{var t;return e.staten(e,t))))}shouldRelink(e,t){return!!e.references.some((e=>void 0!==e.error))||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),Yc.create((()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)}))}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Wc.Parsed,n,(e=>this.langiumDocumentFactory.update(e,n))),await this.runCancelable(e,Wc.IndexedContent,n,(e=>this.indexManager.updateContent(e,n))),await this.runCancelable(e,Wc.ComputedScopes,n,(async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,n)})),await this.runCancelable(e,Wc.Linked,n,(e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n))),await this.runCancelable(e,Wc.IndexedReferences,n,(e=>this.indexManager.updateReferences(e,n)));const r=e.filter((e=>this.shouldValidate(e)));await this.runCancelable(r,Wc.Validated,n,(e=>this.validate(e,n)));for(const t of e){const e=this.buildState.get(t.uri.toString());e&&(e.completed=!0)}}prepareBuild(e,t){for(const n of e){const e=n.uri.toString(),r=this.buildState.get(e);r&&!r.completed||this.buildState.set(e,{completed:!1,options:t,result:null==r?void 0:r.result})}}async runCancelable(e,t,n,r){const i=e.filter((e=>e.state{this.buildPhaseListeners.delete(e,t)}))}waitUntil(e,t,n){let r;if(t&&"path"in t?r=t:n=t,null!=n||(n=Cc.XO.None),r){const t=this.langiumDocuments.getDocument(r);if(t&&t.state>e)return Promise.resolve(r)}return this.currentState>=e?Promise.resolve(void 0):n.isCancellationRequested?Promise.reject(Lc):new Promise(((t,i)=>{const s=this.onBuildPhase(e,(()=>{if(s.dispose(),o.dispose(),r){const e=this.langiumDocuments.getDocument(r);t(null==e?void 0:e.uri)}else t(void 0)})),o=n.onCancellationRequested((()=>{s.dispose(),o.dispose(),i(Lc)}))}))}async notifyBuildPhase(e,t,n){if(0===e.length)return;const r=this.buildPhaseListeners.get(t);for(const t of r)await Oc(n),await t(e,n)}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){var n,r;const i=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,s=this.getBuildOptions(e).validation,o="object"==typeof s?s:void 0,a=await i.validateDocument(e,o,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;const c=this.buildState.get(e.uri.toString());if(c){null!==(n=c.result)&&void 0!==n||(c.result={});const e=null!==(r=null==o?void 0:o.categories)&&void 0!==r?r:Hc.all;c.result.validationChecks?c.result.validationChecks.push(...e):c.result.validationChecks=[...e]}}getBuildOptions(e){var t,n;return null!==(n=null===(t=this.buildState.get(e.uri.toString()))||void 0===t?void 0:t.options)&&void 0!==n?n:{}}}class ku{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new au,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const n=Re(e).uri,r=[];return this.referenceIndex.forEach((e=>{e.forEach((e=>{Vc.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)}))})),p(r)}allElements(e,t){let n=p(this.symbolIndex.keys());return t&&(n=n.filter((e=>!t||t.has(e)))),n.map((t=>this.getFileDescriptions(t,e))).flat()}getFileDescriptions(e,t){var n;if(!t)return null!==(n=this.symbolIndex.get(e))&&void 0!==n?n:[];const r=this.symbolByTypeIndex.get(e,t,(()=>{var n;return(null!==(n=this.symbolIndex.get(e))&&void 0!==n?n:[]).filter((e=>this.astReflection.isSubtype(e.type,t)))}));return r}remove(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(e,t=Cc.XO.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.references.ScopeComputation.computeExports(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=Cc.XO.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());return!!n&&n.some((e=>!e.local&&t.has(e.targetUri.toString())))}}class xu{constructor(e){this.initialBuildOptions={},this._ready=new _c,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(e){var t;this.folders=null!==(t=e.workspaceFolders)&&void 0!==t?t:void 0}initialized(e){return this.mutex.write((e=>{var t;return this.initializeWorkspace(null!==(t=this.folders)&&void 0!==t?t:[],e)}))}async initializeWorkspace(e,t=Cc.XO.None){const n=await this.performStartup(e);await Oc(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=this.serviceRegistry.all.flatMap((e=>e.LanguageMetaData.fileExtensions)),n=[],r=e=>{n.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};return await this.loadAdditionalDocuments(e,r),await Promise.all(e.map((e=>[e,this.getRootFolder(e)])).map((async e=>this.traverseFolder(...e,t,r)))),this._ready.resolve(),n}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Kc.parse(e.uri)}async traverseFolder(e,t,n,r){const i=await this.fileSystemProvider.readDirectory(t);await Promise.all(i.map((async t=>{if(this.includeEntry(e,t,n))if(t.isDirectory)await this.traverseFolder(e,t.uri,n,r);else if(t.isFile){const e=await this.langiumDocuments.getOrCreateDocument(t.uri);r(e)}})))}includeEntry(e,t,n){const r=Vc.basename(t.uri);if(r.startsWith("."))return!1;if(t.isDirectory)return"node_modules"!==r&&"out"!==r;if(t.isFile){const e=Vc.extname(t.uri);return n.includes(e)}return!1}}class Iu{constructor(e){const t=e.parser.TokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Nu(t)?Object.values(t):t;this.chevrotainLexer=new Pr(n,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(e){var t;const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:null!==(t=n.groups.hidden)&&void 0!==t?t:[]}}toTokenTypeDictionary(e){if(Nu(e))return e;const t=Su(e)?Object.values(e.modes).flat():e,n={};return t.forEach((e=>n[e.name]=e)),n}}function Su(e){return e&&"modes"in e&&"defaultMode"in e}function Nu(e){return!function(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}(e)&&!Su(e)}function Cu(e){let t="";return t="string"==typeof e?e:e.text,t.split(je)}const wu=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Lu=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function bu(e,t,n,r){const i=[];if(0===e.length){const e=Oo.create(n,r),s=Oo.create(n,r+t.length);i.push({type:"text",content:t,range:_o.create(e,s)})}else{let s=0;for(const o of e){const e=o.index,a=t.substring(s,e);a.length>0&&i.push({type:"text",content:t.substring(s,e),range:_o.create(Oo.create(n,s+r),Oo.create(n,e+r))});let c=a.length+1;const u=o[1];if(i.push({type:"inline-tag",content:u,range:_o.create(Oo.create(n,s+c+r),Oo.create(n,s+c+u.length+r))}),c+=u.length,4===o.length){c+=o[2].length;const e=o[3];i.push({type:"text",content:e,range:_o.create(Oo.create(n,s+c+r),Oo.create(n,s+c+e.length+r))})}else i.push({type:"text",content:"",range:_o.create(Oo.create(n,s+c+r),Oo.create(n,s+c+r))});s=e+o[0].length}const o=t.substring(s);o.length>0&&i.push({type:"text",content:o,range:_o.create(Oo.create(n,s+r),Oo.create(n,s+r+o.length))})}return i}const Ou=/\S/,_u=/\s*$/;function $u(e,t){const n=e.substring(t).match(Ou);return n?t+n.index:e.length}function Pu(e){const t=e.match(_u);if(t&&"number"==typeof t.index)return t.index}function Mu(e,t){const n=e.tokens[e.index];return"tag"===n.type?Fu(e,!1):"text"===n.type||"inline-tag"===n.type?Du(e):(function(e,t){if(t){const n=new Hu("",e.range);"inlines"in t?t.inlines.push(n):t.content.inlines.push(n)}}(n,t),void e.index++)}function Du(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(Uu(e)),r=t,t=e.tokens[e.index];return new Wu(i,_o.create(n.range.start,r.range.end))}function Uu(e){return"inline-tag"===e.tokens[e.index].type?Fu(e,!0):Gu(e)}function Fu(e,t){const n=e.tokens[e.index++],r=n.content.substring(1),i=e.tokens[e.index];if("text"===(null==i?void 0:i.type)){if(t){const i=Gu(e);return new Vu(r,new Wu([i],i.range),t,_o.create(n.range.start,i.range.end))}{const i=Du(e);return new Vu(r,i,t,_o.create(n.range.start,i.range.end))}}{const e=n.range;return new Vu(r,new Wu([],e),t,e)}}function Gu(e){const t=e.tokens[e.index++];return new Hu(t.content,t.range)}function Bu(e){if(!e)return Bu({start:"/**",end:"*/",line:"*"});const{start:t,end:n,line:r}=e;return{start:Ku(t,!0),end:Ku(n,!1),line:Ku(r,!0)}}function Ku(e,t){if("string"==typeof e||"object"==typeof e){const n="string"==typeof e?Ye(e):e.source;return t?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return e}class ju{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find((t=>t.name===e))}getTags(e){return this.getAllTags().filter((t=>t.name===e))}getAllTags(){return this.elements.filter((e=>"name"in e))}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const n=t.toString();e+=zu(e)+n}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements)if(0===t.length)t=n.toMarkdown(e);else{const r=n.toMarkdown(e);t+=zu(t)+r}return t.trim()}}class Vu{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.renderTag)||void 0===t?void 0:t.call(e,this))&&void 0!==n?n:this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=function(e,t,n){var r,i;if("linkplain"===e||"linkcode"===e||"link"===e){const s=t.indexOf(" ");let o=t;if(s>0){const e=$u(t,s);o=t.substring(e),t=t.substring(0,s)}("linkcode"===e||"link"===e&&"code"===n.link)&&(o=`\`${o}\``);const a=null!==(i=null===(r=n.renderLink)||void 0===r?void 0:r.call(n,t,o))&&void 0!==i?i:function(e,t){try{return Kc.parse(e,!0),`[${t}](${e})`}catch(t){return e}}(t,o);return a}}(this.name,t,null!=e?e:{});if("string"==typeof n)return n}let n="";"italic"===(null==e?void 0:e.tag)||void 0===(null==e?void 0:e.tag)?n="*":"bold"===(null==e?void 0:e.tag)?n="**":"bold-italic"===(null==e?void 0:e.tag)&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} — ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}}class Wu{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tn.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let n=0;nr.range.start.line&&(t+="\n")}return t}}class Hu{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function zu(e){return e.endsWith("\n")?"\n":"\n\n"}class Yu{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&function(e){const t=Bu(void 0),n=Cu(e);if(0===n.length)return!1;const r=n[0],i=n[n.length-1],s=t.start,o=t.end;return Boolean(null==s?void 0:s.exec(r))&&Boolean(null==o?void 0:o.exec(i))}(t))return function(e,t,n){let r,i;"string"==typeof e?(i=t,r=n):(i=e.range.start,r=t),i||(i=Oo.create(0,0));const s=function(e){var t,n,r;const i=[];let s=e.position.line,o=e.position.character;for(let a=0;a=l.length){if(i.length>0){const e=Oo.create(s,o);i.push({type:"break",content:"",range:_o.create(e,e)})}}else{wu.lastIndex=d;const e=wu.exec(l);if(e){const t=e[0],n=e[1],r=Oo.create(s,o+d),a=Oo.create(s,o+d+t.length);i.push({type:"tag",content:n,range:_o.create(r,a)}),d+=t.length,d=$u(l,d)}if(d0&&"break"===i[i.length-1].type?i.slice(0,-1):i}({lines:Cu(e),position:i,options:Bu(r)});return function(e){var t,n,r,i;const s=Oo.create(e.position.line,e.position.character);if(0===e.tokens.length)return new ju([],_o.create(s,s));const o=[];for(;e.indexthis.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}documentationLinkRenderer(e,t,n){var r;const i=null!==(r=this.findNameInPrecomputedScopes(e,t))&&void 0!==r?r:this.findNameInGlobalScope(e,t);if(i&&i.nameSegment){const e=i.nameSegment.range.start.line+1,t=i.nameSegment.range.start.character+1;return`[${n}](${i.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(e,t){const n=Re(e).precomputedScopes;if(!n)return;let r=e;do{const e=n.get(r).find((e=>e.name===t));if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find((e=>e.name===t))}}class Xu{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var t;return function(e){return"string"==typeof e.$comment}(e)?e.$comment:null===(t=function(e,t){if(e){const n=function(e,t=!0){for(;e.container;){const n=e.container;let r=n.content.indexOf(e);for(;r>0;){r--;const e=n.content[r];if(t||!e.hidden)return e}e=n}}(e,!0);if(n&&R(n,t))return n;if(u(e))for(let n=e.content.findIndex((e=>!e.hidden))-1;n>=0;n--){const r=e.content[n];if(R(r,t))return r}}}(e.$cstNode,this.grammarConfig().multilineCommentRules))||void 0===t?void 0:t.text}}var qu;n(2676);class Qu{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e){return Promise.resolve(this.syncParser.parse(e))}}class Zu{constructor(){this.previousTokenSource=new Cc.Qi,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=new Cc.Qi;return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n){const r=new _c,i={action:t,deferred:r,cancellationToken:null!=n?n:Cc.XO.None};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map((async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then((()=>e(n)));t.resolve(r)}catch(e){bc(e)?t.resolve(void 0):t.reject(e)}}))),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Ju{constructor(e){this.grammarElementIdMap=new tu,this.tokenTypeIdMap=new tu,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors.map((e=>Object.assign({},e))),parserErrors:e.parserErrors.map((e=>Object.assign({},e))),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}createDehyrationContext(e){const t=new Map,n=new Map;for(const n of Ie(e))t.set(n,{});if(e.$cstNode)for(const t of A(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[s,o]of Object.entries(e))if(!s.startsWith("$"))if(Array.isArray(o)){const e=[];n[s]=e;for(const n of o)r(n)?e.push(this.dehydrateAstNode(n,t)):i(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else r(o)?n[s]=this.dehydrateAstNode(o,t):i(o)?n[s]=this.dehydrateReference(o,t):void 0!==o&&(n[s]=o);return n}dehydrateReference(e,t){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);return u(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),a(e)?n.content=e.content.map((e=>this.dehydrateCstNode(e,t))):c(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const t=e.value,n=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map,n=new Map;for(const n of Ie(e))t.set(n,{});let r;if(e.$cstNode)for(const t of A(e.$cstNode)){let e;"fullText"in t?(e=new oc(t.fullText),r=e):"content"in t?e=new ic:"tokenType"in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(const[s,o]of Object.entries(e))if(!s.startsWith("$"))if(Array.isArray(o)){const e=[];n[s]=e;for(const a of o)r(a)?e.push(this.setParent(this.hydrateAstNode(a,t),n)):i(a)?e.push(this.hydrateReference(a,n,s,t)):e.push(a)}else r(o)?n[s]=this.setParent(this.hydrateAstNode(o,t),n):i(o)?n[s]=this.hydrateReference(o,n,s,t):void 0!==o&&(n[s]=o);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),a(r))for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,s=e.startColumn,o=e.endLine,a=e.endColumn,c=e.hidden;return new rc(n,r,{start:{line:i,character:s},end:{line:o,character:a}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();const t=this.grammarElementIdMap.getKey(e);if(t)return t;throw new Error("Invalid grammar element id: "+e)}createGrammarElementIdMap(){let e=0;for(const n of Ie(this.grammar))t=n,ve.isInstance(t,w)&&this.grammarElementIdMap.set(n,e++);var t}}function el(e){return{documentation:{CommentProvider:e=>new Xu(e),DocumentationProvider:e=>new Yu(e)},parser:{AsyncParser:e=>new Qu(e),GrammarConfig:e=>function(e){const t=[],n=e.Grammar;for(const e of n.rules)V(e)&&(r=e).hidden&&!st(r).test(" ")&&He(st(e))&&t.push(e.name);var r;return{multilineCommentRules:t,nameRegexp:E}}(e),LangiumParser:e=>function(e){const t=function(e){const t=e.Grammar,n=e.parser.Lexer;return yc(t,new dc(e),n.definition)}(e);return t.finalize(),t}(e),CompletionParser:e=>function(e){const t=e.Grammar,n=e.parser.Lexer,r=new pc(e);return yc(t,r,n.definition),r.finalize(),r}(e),ValueConverter:()=>new Sc,TokenBuilder:()=>new Ic,Lexer:e=>new Iu(e),ParserErrorMessageProvider:()=>new fc},workspace:{AstNodeLocator:()=>new vu,AstNodeDescriptionProvider:e=>new Au(e),ReferenceDescriptionProvider:e=>new Tu(e)},references:{Linker:e=>new Qc(e),NameProvider:()=>new Zc,ScopeProvider:e=>new uu(e),ScopeComputation:e=>new nu(e),References:e=>new Jc(e)},serializer:{Hydrator:e=>new Ju(e),JsonSerializer:e=>new du(e)},validation:{DocumentValidator:e=>new mu(e),ValidationRegistry:e=>new pu(e)},shared:()=>e.shared}}function tl(e){return{ServiceRegistry:()=>new hu,workspace:{LangiumDocuments:e=>new qc(e),LangiumDocumentFactory:e=>new Xc(e),DocumentBuilder:e=>new Ru(e),IndexManager:e=>new ku(e),WorkspaceManager:e=>new xu(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new Zu,ConfigurationProvider:e=>new Eu(e)}}}function nl(e,t,n,r,i,s,o,a,c){return il([e,t,n,r,i,s,o,a,c].reduce(al,{}))}!function(e){e.merge=(e,t)=>al(al({},e),t)}(qu||(qu={}));const rl=Symbol("isProxy");function il(e,t){const n=new Proxy({},{deleteProperty:()=>!1,get:(r,i)=>ol(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(ol(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Reflect.ownKeys(e),rl]});return n[rl]=!0,n}const sl=Symbol();function ol(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:e[t]});if(e[t]===sl)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in n){const i=n[t];e[t]=sl;try{e[t]="function"==typeof i?i(r):il(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}}function al(e,t){if(t)for(const[n,r]of Object.entries(t))if(void 0!==r){const t=e[n];e[n]=null!==t&&null!==r&&"object"==typeof t&&"object"==typeof r?al(t,r):r}return e}class cl{readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const ul={fileSystemProvider:()=>new cl},ll={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},dl={AstReflection:()=>new Te};function hl(e){var t;const n=function(){const e=nl(tl(ul),dl),t=nl(el({shared:e}),ll);return e.ServiceRegistry.register(t),t}(),r=n.serializer.JsonSerializer.deserialize(e);return n.shared.workspace.LangiumDocumentFactory.fromModel(r,Kc.parse(`memory://${null!==(t=r.name)&&void 0!==t?t:"grammar"}.langium`)),r}},2559:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(9501);const i=function(e,t,n){for(var i=-1,s=e.length;++i{n.d(t,{A:()=>r});const r=function(e,t){return e{n.d(t,{A:()=>s});var r=n(4288),i=n(8446);const s=function(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];return(0,r.A)(e,(function(e,r,i){s[++n]=t(e,r,i)})),s}},5507:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(6318),i=n(2851),s=n(1521),o=n(5353),a=n(3149),c=n(901);const u=function(e,t,n,r){if(!(0,a.A)(e))return e;for(var u=-1,l=(t=(0,s.A)(t,e)).length,d=l-1,h=e;null!=h&&++u{n.d(t,{A:()=>i});var r=n(4507);const i=function(e){return(0,r.A)(e,4)}},3068:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(4326),i=n(6984),s=n(6832),o=n(9999),a=Object.prototype,c=a.hasOwnProperty;const u=(0,r.A)((function(e,t){e=Object(e);var n=-1,r=t.length,u=r>2?t[2]:void 0;for(u&&(0,s.A)(t[0],t[1],u)&&(r=1);++n{n.d(t,{A:()=>u});var r=n(6307),i=n(8446),s=n(5041);var o=n(5707),a=n(8593),c=Math.max;const u=(l=function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=null==n?0:(0,a.A)(n);return s<0&&(s=c(i+s,0)),(0,o.A)(e,(0,r.A)(t,3),s)},function(e,t,n){var o=Object(e);if(!(0,i.A)(e)){var a=(0,r.A)(t,3);e=(0,s.A)(e),t=function(e){return a(o[e],e,o)}}var c=l(e,t,n);return c>-1?o[a?e[c]:c]:void 0});var l},4098:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(7671);const i=function(e){return null!=e&&e.length?(0,r.A)(e,1):[]}},9703:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2383),i=n(2049),s=n(3098);const o=function(e){return"string"==typeof e||!(0,i.A)(e)&&(0,s.A)(e)&&"[object String]"==(0,r.A)(e)}},6666:(e,t,n)=>{n.d(t,{A:()=>r});const r=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},4722:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(5572),i=n(6307),s=n(2568),o=n(2049);const a=function(e,t){return((0,o.A)(e)?r.A:s.A)(e,(0,i.A)(t,3))}},6452:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(2559),i=n(6224),s=n(9008);const o=function(e){return e&&e.length?(0,r.A)(e,s.A,i.A):void 0}},3631:(e,t,n)=>{n.d(t,{A:()=>f});var r=/\s/;var i=/^\s+/;const s=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}(e)+1).replace(i,""):e};var o=n(3149),a=n(9501),c=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,l=/^0o[0-7]+$/i,d=parseInt;var h=1/0;const f=function(e){return e?(e=function(e){if("number"==typeof e)return e;if((0,a.A)(e))return NaN;if((0,o.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,o.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=s(e);var n=u.test(e);return n||l.test(e)?d(e.slice(2),n?2:8):c.test(e)?NaN:+e}(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8593:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(3631);const i=function(e){var t=(0,r.A)(e),n=t%1;return t==t?n?t-n:t:0}}}]); \ No newline at end of file diff --git a/js/756-713e8876.chunk.min.js b/js/756-713e8876.chunk.min.js deleted file mode 100644 index c9220ea..0000000 --- a/js/756-713e8876.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[756],{7459:(t,e,a)=>{function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(798).K2)(r,"populateCommonDb")},1756:(t,e,a)=>{a.d(e,{diagram:()=>x});var r=a(7459),n=a(7323),o=a(8852),l=a(798),i=a(8731),c={packet:[]},s=structuredClone(c),d=l.UI.packet,k=(0,l.K2)((()=>{const t=(0,n.$t)({...d,...(0,l.zj)().packet});return t.showBits&&(t.paddingY+=10),t}),"getConfig"),p=(0,l.K2)((()=>s.packet),"getPacket"),b={pushWord:(0,l.K2)((t=>{t.length>0&&s.packet.push(t)}),"pushWord"),getPacket:p,getConfig:k,clear:(0,l.K2)((()=>{(0,l.IU)(),s=structuredClone(c)}),"clear"),setAccTitle:l.SV,getAccTitle:l.iN,setDiagramTitle:l.ke,getDiagramTitle:l.ab,getAccDescription:l.m7,setAccDescription:l.EI},g=(0,l.K2)((t=>{(0,r.S)(t,b);let e=-1,a=[],n=1;const{bitsPerRow:o}=b.getConfig();for(let{start:r,end:i,label:c}of t.blocks){if(i&&i{if(void 0===t.end&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*a?[t,void 0]:[{start:t.start,end:e*a-1,label:t.label},{start:e*a,end:t.end,label:t.label}]}),"getNextFittingBlock"),f={parse:(0,l.K2)((async t=>{const e=await(0,i.qg)("packet",t);l.Rm.debug(e),g(e)}),"parse")},u=(0,l.K2)(((t,e,a,r)=>{const n=r.db,i=n.getConfig(),{rowHeight:c,paddingY:s,bitWidth:d,bitsPerRow:k}=i,p=n.getPacket(),b=n.getDiagramTitle(),g=c+s,h=g*(p.length+1)-(b?0:c),f=d*k+2,u=(0,o.D)(e);u.attr("viewbox",`0 0 ${f} ${h}`),(0,l.a$)(u,h,f,i.useMaxWidth);for(const[t,e]of p.entries())$(u,e,t,i);u.append("text").text(b).attr("x",f/2).attr("y",h-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")}),"draw"),$=(0,l.K2)(((t,e,a,{rowHeight:r,paddingX:n,paddingY:o,bitWidth:l,bitsPerRow:i,showBits:c})=>{const s=t.append("g"),d=a*(r+o)+o;for(const t of e){const e=t.start%i*l+1,a=(t.end-t.start+1)*l-n;if(s.append("rect").attr("x",e).attr("y",d).attr("width",a).attr("height",r).attr("class","packetBlock"),s.append("text").attr("x",e+a/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(t.label),!c)continue;const o=t.end===t.start,k=d-2;s.append("text").attr("x",e+(o?a/2:0)).attr("y",k).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",o?"middle":"start").text(t.start),o||s.append("text").attr("x",e+a).attr("y",k).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(t.end)}}),"drawWord"),w={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},x={parser:f,db:b,renderer:{draw:u},styles:(0,l.K2)((({packet:t}={})=>{const e=(0,n.$t)(w,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`}),"styles")}}}]); \ No newline at end of file diff --git a/js/760-f618e0e3.chunk.min.js b/js/760-f618e0e3.chunk.min.js deleted file mode 100644 index 9632ead..0000000 --- a/js/760-f618e0e3.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[760],{5760:(e,c,k)=>{k.d(c,{createGitGraphServices:()=>s.b});var s=k(6288);k(8546)}}]); \ No newline at end of file diff --git a/js/799-c3a32fe5.chunk.min.js b/js/799-c3a32fe5.chunk.min.js deleted file mode 100644 index 41a9cf3..0000000 --- a/js/799-c3a32fe5.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[799],{799:(t,e,n)=>{n.d(e,{diagram:()=>J});var i=n(798),s=n(4852),r=n(5097),a=n(8041),o=n(5263),c=function(){var t=(0,i.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],s=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,16],l=[1,17],h={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:(0,i.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[o]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:s,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:(0,i.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,n=[0],s=[],r=[null],a=[],o=this.table,c="",l=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=s.pop()||p.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,i.K2)(x,"lex");for(var b,k,_,w,v,K,S,$,E,T={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=x()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var I;for(K in E=[],o[_])this.terminals_[K]&&K>2&&E.push("'"+this.terminals_[K]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),b=null,k?(b=k,k=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(S=this.productions_[w[1]][1],T.$=r[r.length-S],T._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},m&&(T._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(T,[c,h,l,y.yy,w[1],r,a].concat(u))))return v;S&&(n=n.slice(0,-1*S*2),r=r.slice(0,-1*S),a=a.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),r.push(T.$),a.push(T._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0}),"parse")},d=function(){return{EOF:1,parseError:(0,i.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,i.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s[^:\n]+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function u(){this.yy={}}return h.lexer=d,(0,i.K2)(u,"Parser"),u.prototype=h,h.Parser=u,new u}();c.parser=c;var l=c,h={};(0,i.VA)(h,{addEvent:()=>w,addSection:()=>x,addTask:()=>_,addTaskOrg:()=>v,clear:()=>m,default:()=>S,getCommonDb:()=>f,getSections:()=>b,getTasks:()=>k});var d="",u=0,p=[],y=[],g=[],f=(0,i.K2)((()=>i.Wt),"getCommonDb"),m=(0,i.K2)((function(){p.length=0,y.length=0,d="",g.length=0,(0,i.IU)()}),"clear"),x=(0,i.K2)((function(t){d=t,p.push(t)}),"addSection"),b=(0,i.K2)((function(){return p}),"getSections"),k=(0,i.K2)((function(){let t=K(),e=0;for(;!t&&e<100;)t=K(),e++;return y.push(...g),y}),"getTasks"),_=(0,i.K2)((function(t,e,n){const i={id:u++,section:d,type:d,task:t,score:e||0,events:n?[n]:[]};g.push(i)}),"addTask"),w=(0,i.K2)((function(t){g.find((t=>t.id===u-1)).events.push(t)}),"addEvent"),v=(0,i.K2)((function(t){const e={section:d,type:d,description:t,task:t,classes:[]};y.push(e)}),"addTaskOrg"),K=(0,i.K2)((function(){const t=(0,i.K2)((function(t){return g[t].processed}),"compileTask");let e=!0;for(const[n,i]of g.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),S={clear:m,getCommonDb:f,addSection:x,getSections:b,getTasks:k,addTask:_,addTaskOrg:v,addEvent:w},$=(0,i.K2)((function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n}),"drawRect"),E=(0,i.K2)((function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const n=(0,s.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const n=(0,s.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,i.K2)(a,"smile"),(0,i.K2)(o,"sad"),(0,i.K2)(c,"ambivalent"),e.score>3?a(r):e.score<3?o(r):c(r),n}),"drawFace"),T=(0,i.K2)((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),I=(0,i.K2)((function(t,e){const n=e.text.replace(//gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(n),i}),"drawText"),R=(0,i.K2)((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,i.K2)(n,"genPoints");const s=t.append("polygon");s.attr("points",n(e.x,e.y,50,20,7)),s.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,I(t,e)}),"drawLabel"),A=(0,i.K2)((function(t,e,n){const i=t.append("g"),s=P();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,$(i,s),H(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),L=-1,M=(0,i.K2)((function(t,e,n){const i=e.x+n.width/2,s=t.append("g");L++,s.append("line").attr("id","task"+L).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),E(s,{cx:i,cy:300+30*(5-e.score),score:e.score});const r=P();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="task task-type-"+e.num,r.rx=3,r.ry=3,$(s,r),H(n)(e.task,s,r.x,r.y,r.width,r.height,{class:"task"},n,e.colour)}),"drawTask"),C=(0,i.K2)((function(t,e){$(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()}),"drawBackgroundRect"),N=(0,i.K2)((function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}}),"getTextObj"),P=(0,i.K2)((function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}}),"getNoteRect"),H=function(){function t(t,e,n,i,r,a,o,c){s(e.append("text").attr("x",n+r/2).attr("y",i+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,i,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(//gi);for(let t=0;t)/).reverse(),r=[],a=n.attr("y"),o=parseFloat(n.attr("dy")),c=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let s=0;se||"
"===t)&&(r.pop(),c.text(r.join(" ").trim()),r="
"===t?[""]:[t],c=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}(0,i.K2)(j,"wrap");var D=(0,i.K2)((function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),o=r.append("g"),c=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(j,e.width).node().getBBox(),l=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=c.height+1.1*l*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),W(a,e,s,i),e}),"drawNode"),z=(0,i.K2)((function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(j,e.width).node().getBBox(),r=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding}),"getVirtualNodeHeight"),W=(0,i.K2)((function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}),"defaultBkg"),B={drawRect:$,drawCircle:T,drawSection:A,drawText:I,drawLabel:R,drawTask:M,drawBackgroundRect:C,getTextObj:N,getNoteRect:P,initGraphics:O,drawNode:D,getVirtualNodeHeight:z},F=(0,i.K2)((function(t,e,n,r){const a=(0,i.D7)(),o=a.leftMargin??50;i.Rm.debug("timeline",r.db);const c=a.securityLevel;let l;"sandbox"===c&&(l=(0,s.Ltv)("#i"+e));const h=("sandbox"===c?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select("#"+e);h.append("g");const d=r.db.getTasks(),u=r.db.getCommonDb().getDiagramTitle();i.Rm.debug("task",d),B.initGraphics(h);const p=r.db.getSections();i.Rm.debug("sections",p);let y=0,g=0,f=0,m=0,x=50+o,b=50;m=50;let k=0,_=!0;p.forEach((function(t){const e={number:k,descr:t,section:k,width:150,padding:20,maxHeight:y},n=B.getVirtualNodeHeight(h,e,a);i.Rm.debug("sectionHeight before draw",n),y=Math.max(y,n+20)}));let w=0,v=0;i.Rm.debug("tasks.length",d.length);for(const[t,e]of d.entries()){const n={number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:g},s=B.getVirtualNodeHeight(h,n,a);i.Rm.debug("taskHeight before draw",s),g=Math.max(g,s+20),w=Math.max(w,e.events.length);let r=0;for(const t of e.events){const n={descr:t,section:e.section,number:e.section,width:150,padding:20,maxHeight:50};r+=B.getVirtualNodeHeight(h,n,a)}v=Math.max(v,r)}i.Rm.debug("maxSectionHeight before draw",y),i.Rm.debug("maxTaskHeight before draw",g),p&&p.length>0?p.forEach((t=>{const e=d.filter((e=>e.section===t)),n={number:k,descr:t,section:k,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:y};i.Rm.debug("sectionNode",n);const s=h.append("g"),r=B.drawNode(s,n,k,a);i.Rm.debug("sectionNode output",r),s.attr("transform",`translate(${x}, 50)`),b+=y+50,e.length>0&&V(h,e,k,x,b,g,a,w,v,y,!1),x+=200*Math.max(e.length,1),b=50,k++})):(_=!1,V(h,d,k,x,b,g,a,w,v,y,!0));const K=h.node().getBBox();i.Rm.debug("bounds",K),u&&h.append("text").text(u).attr("x",K.width/2-o).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),f=_?y+g+150:g+100,h.append("g").attr("class","lineWrapper").append("line").attr("x1",o).attr("y1",f).attr("x2",K.width+3*o).attr("y2",f).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.ot)(void 0,h,a.timeline?.padding??50,a.timeline?.useMaxWidth??!1)}),"draw"),V=(0,i.K2)((function(t,e,n,s,r,a,o,c,l,h,d){for(const c of e){const e={descr:c.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.Rm.debug("taskNode",e);const u=t.append("g").attr("class","taskWrapper"),p=B.drawNode(u,e,n,o).height;if(i.Rm.debug("taskHeight after draw",p),u.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,p),c.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=G(t,c.events,n,s,r,o),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!o.timeline?.disableMulticolor&&n++}r-=10}),"drawTasks"),G=(0,i.K2)((function(t,e,n,s,r,a){let o=0;const c=r;r+=100;for(const c of e){const e={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};i.Rm.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=B.drawNode(l,e,n,a).height;o+=h,l.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=c,o}),"drawEvents"),U={setConf:(0,i.K2)((()=>{}),"setConf"),draw:F},q=(0,i.K2)((t=>{let e="";for(let e=0;e`\n .edge {\n stroke-width: 3;\n }\n ${q(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/805-68e3b42f.chunk.min.js b/js/805-68e3b42f.chunk.min.js new file mode 100644 index 0000000..97e5ee7 --- /dev/null +++ b/js/805-68e3b42f.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[805],{1805:(t,e,s)=>{s.d(e,{_$:()=>a,tM:()=>J,z2:()=>q});var n=s(5522),i=s(32),u=s(4852),r=function(){var t=(0,i.K2)((function(t,e,s,n){for(s=s||{},n=t.length;n--;s[t[n]]=e);return s}),"o"),e=[1,17],s=[1,18],n=[1,19],u=[1,39],r=[1,40],a=[1,25],o=[1,23],c=[1,24],l=[1,31],h=[1,32],A=[1,33],p=[1,34],d=[1,35],y=[1,36],C=[1,26],E=[1,27],m=[1,28],g=[1,29],b=[1,43],f=[1,30],k=[1,42],T=[1,44],F=[1,41],D=[1,45],B=[1,9],_=[1,8,9],S=[1,56],N=[1,57],L=[1,58],$=[1,59],x=[1,60],I=[1,61],O=[1,62],v=[1,8,9,40],K=[1,74],R=[1,8,9,12,13,22,38,40,43,60,61,62,63,64,65,66,71,73],w=[1,8,9,12,13,17,20,22,38,40,43,47,60,61,62,63,64,65,66,71,73,75,81,96,98,99],P=[13,75,81,96,98,99],M=[13,65,66,75,81,96,98,99],G=[13,60,61,62,63,64,75,81,96,98,99],U=[1,94],Y=[1,111],z=[1,109],Q=[1,103],j=[1,104],W=[1,105],X=[1,106],H=[1,107],q=[1,108],J=[1,110],V=[1,8,9,38,40,43],Z=[1,8,9,22],tt=[1,8,9,79],et=[1,8,9,22,74,75,79,81,82,83,84,85,86],st={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,DOT:17,className:18,classLiteralName:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,direction:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,namespaceIdentifier:37,STRUCT_START:38,classStatements:39,STRUCT_STOP:40,NAMESPACE:41,classIdentifier:42,STYLE_SEPARATOR:43,members:44,CLASS:45,ANNOTATION_START:46,ANNOTATION_END:47,MEMBER:48,SEPARATOR:49,relation:50,NOTE_FOR:51,noteText:52,NOTE:53,direction_tb:54,direction_bt:55,direction_rl:56,direction_lr:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,STYLE:74,ALPHA:75,stylesOpt:76,CSSCLASS:77,style:78,COMMA:79,styleComponent:80,NUM:81,COLON:82,UNIT:83,SPACE:84,BRKT:85,PCT:86,commentToken:87,textToken:88,graphCodeTokens:89,textNoTagsToken:90,TAGSTART:91,TAGEND:92,"==":93,"--":94,DEFAULT:95,MINUS:96,keywords:97,UNICODE_TEXT:98,BQUOTE_STR:99,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"DOT",20:"GENERICTYPE",22:"LABEL",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",38:"STRUCT_START",40:"STRUCT_STOP",41:"NAMESPACE",43:"STYLE_SEPARATOR",45:"CLASS",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"MEMBER",49:"SEPARATOR",51:"NOTE_FOR",53:"NOTE",54:"direction_tb",55:"direction_bt",56:"direction_rl",57:"direction_lr",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"STYLE",75:"ALPHA",77:"CSSCLASS",79:"COMMA",81:"NUM",82:"COLON",83:"UNIT",84:"SPACE",85:"BRKT",86:"PCT",89:"graphCodeTokens",91:"TAGSTART",92:"TAGEND",93:"==",94:"--",95:"DEFAULT",96:"MINUS",97:"keywords",98:"UNICODE_TEXT",99:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[37,2],[39,1],[39,2],[39,3],[24,1],[24,3],[24,4],[24,6],[42,2],[42,3],[26,4],[44,1],[44,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,1],[31,1],[31,1],[31,1],[50,3],[50,2],[50,2],[50,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[76,1],[76,3],[78,1],[78,2],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[87,1],[87,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[90,1],[90,1],[90,1],[90,1],[16,1],[16,1],[16,1],[16,1],[19,1],[52,1]],performAction:(0,i.K2)((function(t,e,s,n,i,u,r){var a=u.length-1;switch(i){case 8:this.$=u[a-1];break;case 9:case 12:case 14:this.$=u[a];break;case 10:case 13:this.$=u[a-2]+"."+u[a];break;case 11:case 15:case 91:this.$=u[a-1]+u[a];break;case 16:case 17:this.$=u[a-1]+"~"+u[a]+"~";break;case 18:n.addRelation(u[a]);break;case 19:u[a-1].title=n.cleanupLabel(u[a]),n.addRelation(u[a-1]);break;case 29:this.$=u[a].trim(),n.setAccTitle(this.$);break;case 30:case 31:this.$=u[a].trim(),n.setAccDescription(this.$);break;case 32:n.addClassesToNamespace(u[a-3],u[a-1]);break;case 33:n.addClassesToNamespace(u[a-4],u[a-1]);break;case 34:this.$=u[a],n.addNamespace(u[a]);break;case 35:case 45:case 88:this.$=[u[a]];break;case 36:this.$=[u[a-1]];break;case 37:u[a].unshift(u[a-2]),this.$=u[a];break;case 39:n.setCssClass(u[a-2],u[a]);break;case 40:n.addMembers(u[a-3],u[a-1]);break;case 41:n.setCssClass(u[a-5],u[a-3]),n.addMembers(u[a-5],u[a-1]);break;case 42:this.$=u[a],n.addClass(u[a]);break;case 43:this.$=u[a-1],n.addClass(u[a-1]),n.setClassLabel(u[a-1],u[a]);break;case 44:n.addAnnotation(u[a],u[a-2]);break;case 46:u[a].push(u[a-1]),this.$=u[a];break;case 47:case 49:case 50:break;case 48:n.addMember(u[a-1],n.cleanupLabel(u[a]));break;case 51:this.$={id1:u[a-2],id2:u[a],relation:u[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 52:this.$={id1:u[a-3],id2:u[a],relation:u[a-1],relationTitle1:u[a-2],relationTitle2:"none"};break;case 53:this.$={id1:u[a-3],id2:u[a],relation:u[a-2],relationTitle1:"none",relationTitle2:u[a-1]};break;case 54:this.$={id1:u[a-4],id2:u[a],relation:u[a-2],relationTitle1:u[a-3],relationTitle2:u[a-1]};break;case 55:n.addNote(u[a],u[a-1]);break;case 56:n.addNote(u[a]);break;case 57:n.setDirection("TB");break;case 58:n.setDirection("BT");break;case 59:n.setDirection("RL");break;case 60:n.setDirection("LR");break;case 61:this.$={type1:u[a-2],type2:u[a],lineType:u[a-1]};break;case 62:this.$={type1:"none",type2:u[a],lineType:u[a-1]};break;case 63:this.$={type1:u[a-1],type2:"none",lineType:u[a]};break;case 64:this.$={type1:"none",type2:"none",lineType:u[a]};break;case 65:this.$=n.relationType.AGGREGATION;break;case 66:this.$=n.relationType.EXTENSION;break;case 67:this.$=n.relationType.COMPOSITION;break;case 68:this.$=n.relationType.DEPENDENCY;break;case 69:this.$=n.relationType.LOLLIPOP;break;case 70:this.$=n.lineType.LINE;break;case 71:this.$=n.lineType.DOTTED_LINE;break;case 72:case 78:this.$=u[a-2],n.setClickEvent(u[a-1],u[a]);break;case 73:case 79:this.$=u[a-3],n.setClickEvent(u[a-2],u[a-1]),n.setTooltip(u[a-2],u[a]);break;case 74:this.$=u[a-2],n.setLink(u[a-1],u[a]);break;case 75:this.$=u[a-3],n.setLink(u[a-2],u[a-1],u[a]);break;case 76:this.$=u[a-3],n.setLink(u[a-2],u[a-1]),n.setTooltip(u[a-2],u[a]);break;case 77:this.$=u[a-4],n.setLink(u[a-3],u[a-2],u[a]),n.setTooltip(u[a-3],u[a-1]);break;case 80:this.$=u[a-3],n.setClickEvent(u[a-2],u[a-1],u[a]);break;case 81:this.$=u[a-4],n.setClickEvent(u[a-3],u[a-2],u[a-1]),n.setTooltip(u[a-3],u[a]);break;case 82:this.$=u[a-3],n.setLink(u[a-2],u[a]);break;case 83:this.$=u[a-4],n.setLink(u[a-3],u[a-1],u[a]);break;case 84:this.$=u[a-4],n.setLink(u[a-3],u[a-1]),n.setTooltip(u[a-3],u[a]);break;case 85:this.$=u[a-5],n.setLink(u[a-4],u[a-2],u[a]),n.setTooltip(u[a-4],u[a-1]);break;case 86:this.$=u[a-2],n.setCssStyle(u[a-1],u[a]);break;case 87:n.setCssClass(u[a-1],u[a]);break;case 89:u[a-2].push(u[a]),this.$=u[a-2]}}),"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,18:20,19:38,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:e,34:s,36:n,37:21,41:u,42:22,45:r,46:a,48:o,49:c,51:l,53:h,54:A,55:p,56:d,57:y,67:C,68:E,70:m,74:g,75:b,77:f,81:k,96:T,98:F,99:D},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(B,[2,5],{8:[1,46]}),{8:[1,47]},t(_,[2,18],{22:[1,48]}),t(_,[2,20]),t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),t(_,[2,24]),t(_,[2,25]),t(_,[2,26]),t(_,[2,27]),t(_,[2,28]),{33:[1,49]},{35:[1,50]},t(_,[2,31]),t(_,[2,47],{50:51,58:54,59:55,13:[1,52],22:[1,53],60:S,61:N,62:L,63:$,64:x,65:I,66:O}),{38:[1,63]},t(v,[2,38],{38:[1,65],43:[1,64]}),t(_,[2,49]),t(_,[2,50]),{16:66,75:b,81:k,96:T,98:F},{16:37,18:67,19:38,75:b,81:k,96:T,98:F,99:D},{16:37,18:68,19:38,75:b,81:k,96:T,98:F,99:D},{16:37,18:69,19:38,75:b,81:k,96:T,98:F,99:D},{75:[1,70]},{13:[1,71]},{16:37,18:72,19:38,75:b,81:k,96:T,98:F,99:D},{13:K,52:73},t(_,[2,57]),t(_,[2,58]),t(_,[2,59]),t(_,[2,60]),t(R,[2,12],{16:37,19:38,18:76,17:[1,75],20:[1,77],75:b,81:k,96:T,98:F,99:D}),t(R,[2,14],{20:[1,78]}),{15:79,16:80,75:b,81:k,96:T,98:F},{16:37,18:81,19:38,75:b,81:k,96:T,98:F,99:D},t(w,[2,114]),t(w,[2,115]),t(w,[2,116]),t(w,[2,117]),t([1,8,9,12,13,20,22,38,40,43,60,61,62,63,64,65,66,71,73],[2,118]),t(B,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,18:20,37:21,42:22,16:37,19:38,5:82,32:e,34:s,36:n,41:u,45:r,46:a,48:o,49:c,51:l,53:h,54:A,55:p,56:d,57:y,67:C,68:E,70:m,74:g,75:b,77:f,81:k,96:T,98:F,99:D}),{5:83,10:5,16:37,18:20,19:38,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:e,34:s,36:n,37:21,41:u,42:22,45:r,46:a,48:o,49:c,51:l,53:h,54:A,55:p,56:d,57:y,67:C,68:E,70:m,74:g,75:b,77:f,81:k,96:T,98:F,99:D},t(_,[2,19]),t(_,[2,29]),t(_,[2,30]),{13:[1,85],16:37,18:84,19:38,75:b,81:k,96:T,98:F,99:D},{50:86,58:54,59:55,60:S,61:N,62:L,63:$,64:x,65:I,66:O},t(_,[2,48]),{59:87,65:I,66:O},t(P,[2,64],{58:88,60:S,61:N,62:L,63:$,64:x}),t(M,[2,65]),t(M,[2,66]),t(M,[2,67]),t(M,[2,68]),t(M,[2,69]),t(G,[2,70]),t(G,[2,71]),{8:[1,90],24:91,39:89,42:22,45:r},{16:92,75:b,81:k,96:T,98:F},{44:93,48:U},{47:[1,95]},{13:[1,96]},{13:[1,97]},{71:[1,98],73:[1,99]},{22:Y,74:z,75:Q,76:100,78:101,80:102,81:j,82:W,83:X,84:H,85:q,86:J},{75:[1,112]},{13:K,52:113},t(_,[2,56]),t(_,[2,119]),{16:37,18:114,19:38,75:b,81:k,96:T,98:F,99:D},t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),{38:[2,34]},{15:116,16:80,17:[1,115],38:[2,9],75:b,81:k,96:T,98:F},t(V,[2,42],{11:117,12:[1,118]}),t(B,[2,7]),{9:[1,119]},t(Z,[2,51]),{16:37,18:120,19:38,75:b,81:k,96:T,98:F,99:D},{13:[1,122],16:37,18:121,19:38,75:b,81:k,96:T,98:F,99:D},t(P,[2,63],{58:123,60:S,61:N,62:L,63:$,64:x}),t(P,[2,62]),{40:[1,124]},{24:91,39:125,42:22,45:r},{8:[1,126],40:[2,35]},t(v,[2,39],{38:[1,127]}),{40:[1,128]},{40:[2,45],44:129,48:U},{16:37,18:130,19:38,75:b,81:k,96:T,98:F,99:D},t(_,[2,72],{13:[1,131]}),t(_,[2,74],{13:[1,133],69:[1,132]}),t(_,[2,78],{13:[1,134],72:[1,135]}),{13:[1,136]},t(_,[2,86],{79:[1,137]}),t(tt,[2,88],{80:138,22:Y,74:z,75:Q,81:j,82:W,83:X,84:H,85:q,86:J}),t(et,[2,90]),t(et,[2,92]),t(et,[2,93]),t(et,[2,94]),t(et,[2,95]),t(et,[2,96]),t(et,[2,97]),t(et,[2,98]),t(et,[2,99]),t(et,[2,100]),t(_,[2,87]),t(_,[2,55]),t(R,[2,13]),{15:139,16:80,75:b,81:k,96:T,98:F},{38:[2,11]},t(V,[2,43]),{13:[1,140]},{1:[2,4]},t(Z,[2,53]),t(Z,[2,52]),{16:37,18:141,19:38,75:b,81:k,96:T,98:F,99:D},t(P,[2,61]),t(_,[2,32]),{40:[1,142]},{24:91,39:143,40:[2,36],42:22,45:r},{44:144,48:U},t(v,[2,40]),{40:[2,46]},t(_,[2,44]),t(_,[2,73]),t(_,[2,75]),t(_,[2,76],{69:[1,145]}),t(_,[2,79]),t(_,[2,80],{13:[1,146]}),t(_,[2,82],{13:[1,148],69:[1,147]}),{22:Y,74:z,75:Q,78:149,80:102,81:j,82:W,83:X,84:H,85:q,86:J},t(et,[2,91]),{38:[2,10]},{14:[1,150]},t(Z,[2,54]),t(_,[2,33]),{40:[2,37]},{40:[1,151]},t(_,[2,77]),t(_,[2,81]),t(_,[2,83]),t(_,[2,84],{69:[1,152]}),t(tt,[2,89],{80:138,22:Y,74:z,75:Q,81:j,82:W,83:X,84:H,85:q,86:J}),t(V,[2,8]),t(v,[2,41]),t(_,[2,85])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],79:[2,34],116:[2,11],119:[2,4],129:[2,46],139:[2,10],143:[2,37]},parseError:(0,i.K2)((function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,s=[0],n=[],u=[null],r=[],a=this.table,o="",c=0,l=0,h=0,A=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(d.yy[y]=this.yy[y]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var C=p.yylloc;r.push(C);var E=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){s.length=s.length-2*t,u.length=u.length-t,r.length=r.length-t}),"popStack"),(0,i.K2)(m,"lex");for(var g,b,f,k,T,F,D,B,_,S={};;){if(f=s[s.length-1],this.defaultActions[f]?k=this.defaultActions[f]:(null==g&&(g=m()),k=a[f]&&a[f][g]),void 0===k||!k.length||!k[0]){var N;for(F in _=[],a[f])this.terminals_[F]&&F>2&&_.push("'"+this.terminals_[F]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[g]||g,line:p.yylineno,loc:C,expected:_})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+g);switch(k[0]){case 1:s.push(g),u.push(p.yytext),r.push(p.yylloc),s.push(k[1]),g=null,b?(g=b,b=null):(l=p.yyleng,o=p.yytext,c=p.yylineno,C=p.yylloc,h>0&&h--);break;case 2:if(D=this.productions_[k[1]][1],S.$=u[u.length-D],S._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},E&&(S._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(T=this.performAction.apply(S,[o,l,c,d.yy,k[1],u,r].concat(A))))return T;D&&(s=s.slice(0,-1*D*2),u=u.slice(0,-1*D),r=r.slice(0,-1*D)),s.push(this.productions_[k[1]][0]),u.push(S.$),r.push(S._$),B=a[s[s.length-2]][s[s.length-1]],s.push(B);break;case 3:return!0}}return!0}),"parse")},nt=function(){return{EOF:1,parseError:(0,i.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,i.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===n.length?this.yylloc.first_column:0)+n[n.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,e){var s,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var u in i)this[u]=i[u];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,s,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),u=0;ue[0].length)){if(e=s,n=u,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,i[u])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,i.K2)((function(t,e,s,n){switch(s){case 0:return 54;case 1:return 55;case 2:return 56;case 3:return 57;case 4:case 5:case 14:case 30:case 35:case 39:case 46:break;case 6:return this.begin("acc_title"),32;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),34;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 57:case 60:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 34:return 8;case 15:case 16:return 7;case 17:case 36:case 44:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 71;case 23:return 72;case 25:return"STR";case 26:this.begin("string");break;case 27:return 74;case 28:return this.begin("namespace"),41;case 29:case 38:return this.popState(),8;case 31:return this.begin("namespace-body"),38;case 32:case 42:return this.popState(),40;case 33:case 43:return"EOF_IN_STRUCT";case 37:return this.begin("class"),45;case 40:return this.popState(),this.popState(),40;case 41:return this.begin("class-body"),38;case 45:return"OPEN_IN_STRUCT";case 47:return"MEMBER";case 48:return 77;case 49:return 67;case 50:return 68;case 51:return 70;case 52:return 51;case 53:return 53;case 54:return 46;case 55:return 47;case 56:return 73;case 58:return"GENERICTYPE";case 59:this.begin("generic");break;case 61:return"BQUOTE_STR";case 62:this.begin("bqstring");break;case 63:case 64:case 65:case 66:return 69;case 67:case 68:return 61;case 69:case 70:return 63;case 71:return 62;case 72:return 60;case 73:return 64;case 74:return 65;case 75:return 66;case 76:return 22;case 77:return 43;case 78:return 96;case 79:return 17;case 80:return"PLUS";case 81:return 82;case 82:return 79;case 83:case 84:return 85;case 85:return 86;case 86:case 87:return"EQUALS";case 88:return 75;case 89:return 12;case 90:return 14;case 91:return"PUNCTUATION";case 92:return 81;case 93:return 98;case 94:case 95:return 84;case 96:return 9}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}}}();function it(){this.yy={}}return st.lexer=nt,(0,i.K2)(it,"Parser"),it.prototype=st,st.Parser=it,new it}();r.parser=r;var a=r,o=["#","+","~","-",""],c=class{static{(0,i.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="";const s=(0,i.jZ)(t,(0,i.D7)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,i.QO)(this.id);return"method"===this.memberType&&(t+=`(${(0,i.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,i.QO)(this.returnType))),t=t.trim(),{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(o.includes(t)&&(this.visibility=t),this.id=s[2].trim(),this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,n=t.substring(0,1),i=t.substring(s-1);o.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},l="classId-",h=[],A=new Map,p=[],d=0,y=new Map,C=0,E=[],m=(0,i.K2)((t=>i.Y2.sanitizeText(t,(0,i.D7)())),"sanitizeText"),g=(0,i.K2)((function(t){const e=i.Y2.sanitizeText(t,(0,i.D7)());let s="",n=e;if(e.indexOf("~")>0){const t=e.split("~");n=m(t[0]),s=m(t[1])}return{className:n,type:s}}),"splitClassNameAndType"),b=(0,i.K2)((function(t,e){const s=i.Y2.sanitizeText(t,(0,i.D7)());e&&(e=m(e));const{className:n}=g(s);A.get(n).label=e}),"setClassLabel"),f=(0,i.K2)((function(t){const e=i.Y2.sanitizeText(t,(0,i.D7)()),{className:s,type:n}=g(e);if(A.has(s))return;const u=i.Y2.sanitizeText(s,(0,i.D7)());A.set(u,{id:u,type:n,label:u,cssClasses:[],methods:[],members:[],annotations:[],styles:[],domId:l+u+"-"+d}),d++}),"addClass"),k=(0,i.K2)((function(t){const e=i.Y2.sanitizeText(t,(0,i.D7)());if(A.has(e))return A.get(e).domId;throw new Error("Class not found: "+e)}),"lookUpDomId"),T=(0,i.K2)((function(){h=[],A=new Map,p=[],(E=[]).push(G),y=new Map,C=0,U="TB",(0,i.IU)()}),"clear"),F=(0,i.K2)((function(t){return A.get(t)}),"getClass"),D=(0,i.K2)((function(){return A}),"getClasses"),B=(0,i.K2)((function(){return h}),"getRelations"),_=(0,i.K2)((function(){return p}),"getNotes"),S=(0,i.K2)((function(t){i.Rm.debug("Adding relation: "+JSON.stringify(t)),f(t.id1),f(t.id2),t.id1=g(t.id1).className,t.id2=g(t.id2).className,t.relationTitle1=i.Y2.sanitizeText(t.relationTitle1.trim(),(0,i.D7)()),t.relationTitle2=i.Y2.sanitizeText(t.relationTitle2.trim(),(0,i.D7)()),h.push(t)}),"addRelation"),N=(0,i.K2)((function(t,e){const s=g(t).className;A.get(s).annotations.push(e)}),"addAnnotation"),L=(0,i.K2)((function(t,e){f(t);const s=g(t).className,n=A.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?n.annotations.push(m(t.substring(2,t.length-2))):t.indexOf(")")>0?n.methods.push(new c(t,"method")):t&&n.members.push(new c(t,"attribute"))}}),"addMember"),$=(0,i.K2)((function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((e=>L(t,e))))}),"addMembers"),x=(0,i.K2)((function(t,e){const s={id:`note${p.length}`,class:e,text:t};p.push(s)}),"addNote"),I=(0,i.K2)((function(t){return t.startsWith(":")&&(t=t.substring(1)),m(t.trim())}),"cleanupLabel"),O=(0,i.K2)((function(t,e){t.split(",").forEach((function(t){let s=t;/\d/.exec(t[0])&&(s=l+s);const n=A.get(s);n&&n.cssClasses.push(e)}))}),"setCssClass"),v=(0,i.K2)((function(t,e){t.split(",").forEach((function(t){void 0!==e&&(A.get(t).tooltip=m(e))}))}),"setTooltip"),K=(0,i.K2)((function(t,e){return e&&y.has(e)?y.get(e).classes.get(t).tooltip:A.get(t).tooltip}),"getTooltip"),R=(0,i.K2)((function(t,e,s){const u=(0,i.D7)();t.split(",").forEach((function(t){let i=t;/\d/.exec(t[0])&&(i=l+i);const r=A.get(i);r&&(r.link=n._K.formatUrl(e,u),"sandbox"===u.securityLevel?r.linkTarget="_top":r.linkTarget="string"==typeof s?m(s):"_blank")})),O(t,"clickable")}),"setLink"),w=(0,i.K2)((function(t,e,s){t.split(",").forEach((function(t){P(t,e,s),A.get(t).haveCallback=!0})),O(t,"clickable")}),"setClickEvent"),P=(0,i.K2)((function(t,e,s){const u=i.Y2.sanitizeText(t,(0,i.D7)());if("loose"!==(0,i.D7)().securityLevel)return;if(void 0===e)return;const r=u;if(A.has(r)){const t=k(r);let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t")),t.classed("hover",!0)})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),(0,u.Ltv)(this).classed("hover",!1)}))}),"setupToolTips");E.push(G);var U="TB",Y=(0,i.K2)((()=>U),"getDirection"),z=(0,i.K2)((t=>{U=t}),"setDirection"),Q=(0,i.K2)((function(t){y.has(t)||(y.set(t,{id:t,classes:new Map,children:{},domId:l+t+"-"+C}),C++)}),"addNamespace"),j=(0,i.K2)((function(t){return y.get(t)}),"getNamespace"),W=(0,i.K2)((function(){return y}),"getNamespaces"),X=(0,i.K2)((function(t,e){if(y.has(t))for(const s of e){const{className:e}=g(s);A.get(e).parent=t,y.get(t).classes.set(e,A.get(e))}}),"addClassesToNamespace"),H=(0,i.K2)((function(t,e){const s=A.get(t);if(e&&s)for(const t of e)t.includes(",")?s.styles.push(...t.split(",")):s.styles.push(t)}),"setCssStyle"),q={setAccTitle:i.SV,getAccTitle:i.iN,getAccDescription:i.m7,setAccDescription:i.EI,getConfig:(0,i.K2)((()=>(0,i.D7)().class),"getConfig"),addClass:f,bindFunctions:M,clear:T,getClass:F,getClasses:D,getNotes:_,addAnnotation:N,addNote:x,getRelations:B,addRelation:S,getDirection:Y,setDirection:z,addMember:L,addMembers:$,cleanupLabel:I,lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},setClickEvent:w,setCssClass:O,setLink:R,getTooltip:K,setTooltip:v,lookUpDomId:k,setDiagramTitle:i.ke,getDiagramTitle:i.ab,setClassLabel:b,addNamespace:Q,addClassesToNamespace:X,getNamespace:j,getNamespaces:W,setCssStyle:H},J=(0,i.K2)((t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`),"getStyles")}}]); \ No newline at end of file diff --git a/js/81-3a33b512.chunk.min.js b/js/81-3a33b512.chunk.min.js new file mode 100644 index 0000000..4219022 --- /dev/null +++ b/js/81-3a33b512.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[81],{3081:(e,r,a)=>{a.d(r,{diagram:()=>g});var t=a(1132),n=a(1661),s=a(32),d=a(8731),i={parse:(0,s.K2)((async e=>{const r=await(0,d.qg)("info",e);s.Rm.debug(r)}),"parse")},o={version:t.r},g={parser:i,db:{getVersion:(0,s.K2)((()=>o.version),"getVersion")},renderer:{draw:(0,s.K2)(((e,r,a)=>{s.Rm.debug("rendering info diagram\n"+e);const t=(0,n.D)(r);(0,s.a$)(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${a}`)}),"draw")}}}}]); \ No newline at end of file diff --git a/js/826-2ac63153.chunk.min.js b/js/826-2ac63153.chunk.min.js new file mode 100644 index 0000000..15debd1 --- /dev/null +++ b/js/826-2ac63153.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[826],{4826:(t,e,a)=>{a.d(e,{diagram:()=>Nt});var n=a(4323),i=a(5522),r=a(32),s=a(4852),l=a(6750),o=function(){var t=(0,r.K2)((function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a}),"o"),e=[1,24],a=[1,25],n=[1,26],i=[1,27],s=[1,28],l=[1,63],o=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],g=[1,29],f=[1,30],b=[1,31],x=[1,32],_=[1,33],m=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],k=[1,40],O=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],I=[1,50],M=[1,51],j=[1,52],K=[1,53],L=[1,54],Y=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],W=[1,60],Q=[14,42],$=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[1,82],V=[1,83],G=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],at=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:(0,r.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,r.K2)((function(t,e,a,n,i,r,s){var l=r.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(r[l-3]);break;case 19:n.setTitle(r[l].substring(6)),this.$=r[l].substring(6);break;case 20:n.setAccDescription(r[l].substring(15)),this.$=r[l].substring(15);break;case 21:this.$=r[l].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[l].trim(),n.setAccDescription(this.$);break;case 28:r[l].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 29:r[l].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 30:n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 31:r[l].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[l]),this.$=r[l];break;case 32:n.addDeploymentNode("node",...r[l]),this.$=r[l];break;case 33:n.addDeploymentNode("nodeL",...r[l]),this.$=r[l];break;case 34:n.addDeploymentNode("nodeR",...r[l]),this.$=r[l];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[l]),this.$=r[l];break;case 40:n.addPersonOrSystem("external_person",...r[l]),this.$=r[l];break;case 41:n.addPersonOrSystem("system",...r[l]),this.$=r[l];break;case 42:n.addPersonOrSystem("system_db",...r[l]),this.$=r[l];break;case 43:n.addPersonOrSystem("system_queue",...r[l]),this.$=r[l];break;case 44:n.addPersonOrSystem("external_system",...r[l]),this.$=r[l];break;case 45:n.addPersonOrSystem("external_system_db",...r[l]),this.$=r[l];break;case 46:n.addPersonOrSystem("external_system_queue",...r[l]),this.$=r[l];break;case 47:n.addContainer("container",...r[l]),this.$=r[l];break;case 48:n.addContainer("container_db",...r[l]),this.$=r[l];break;case 49:n.addContainer("container_queue",...r[l]),this.$=r[l];break;case 50:n.addContainer("external_container",...r[l]),this.$=r[l];break;case 51:n.addContainer("external_container_db",...r[l]),this.$=r[l];break;case 52:n.addContainer("external_container_queue",...r[l]),this.$=r[l];break;case 53:n.addComponent("component",...r[l]),this.$=r[l];break;case 54:n.addComponent("component_db",...r[l]),this.$=r[l];break;case 55:n.addComponent("component_queue",...r[l]),this.$=r[l];break;case 56:n.addComponent("external_component",...r[l]),this.$=r[l];break;case 57:n.addComponent("external_component_db",...r[l]),this.$=r[l];break;case 58:n.addComponent("external_component_queue",...r[l]),this.$=r[l];break;case 60:n.addRel("rel",...r[l]),this.$=r[l];break;case 61:n.addRel("birel",...r[l]),this.$=r[l];break;case 62:n.addRel("rel_u",...r[l]),this.$=r[l];break;case 63:n.addRel("rel_d",...r[l]),this.$=r[l];break;case 64:n.addRel("rel_l",...r[l]),this.$=r[l];break;case 65:n.addRel("rel_r",...r[l]),this.$=r[l];break;case 66:n.addRel("rel_b",...r[l]),this.$=r[l];break;case 67:r[l].splice(0,1),n.addRel("rel",...r[l]),this.$=r[l];break;case 68:n.updateElStyle("update_el_style",...r[l]),this.$=r[l];break;case 69:n.updateRelStyle("update_rel_style",...r[l]),this.$=r[l];break;case 70:n.updateLayoutConfig("update_layout_config",...r[l]),this.$=r[l];break;case 71:this.$=[r[l]];break;case 72:r[l].unshift(r[l-1]),this.$=r[l];break;case 73:case 75:this.$=r[l].trim();break;case 74:let t={};t[r[l-1].trim()]=r[l].trim(),this.$=t;break;case 76:this.$=""}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:70,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:71,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:72,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:73,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(Q,[2,14]),t($,[2,16],{12:[1,76]}),t(Q,[2,36],{12:[1,77]}),t(H,[2,19]),t(H,[2,20]),{25:[1,78]},{27:[1,79]},t(H,[2,23]),{35:80,75:81,76:q,77:V,79:G,80:J},{35:86,75:81,76:q,77:V,79:G,80:J},{35:87,75:81,76:q,77:V,79:G,80:J},{35:88,75:81,76:q,77:V,79:G,80:J},{35:89,75:81,76:q,77:V,79:G,80:J},{35:90,75:81,76:q,77:V,79:G,80:J},{35:91,75:81,76:q,77:V,79:G,80:J},{35:92,75:81,76:q,77:V,79:G,80:J},{35:93,75:81,76:q,77:V,79:G,80:J},{35:94,75:81,76:q,77:V,79:G,80:J},{35:95,75:81,76:q,77:V,79:G,80:J},{35:96,75:81,76:q,77:V,79:G,80:J},{35:97,75:81,76:q,77:V,79:G,80:J},{35:98,75:81,76:q,77:V,79:G,80:J},{35:99,75:81,76:q,77:V,79:G,80:J},{35:100,75:81,76:q,77:V,79:G,80:J},{35:101,75:81,76:q,77:V,79:G,80:J},{35:102,75:81,76:q,77:V,79:G,80:J},{35:103,75:81,76:q,77:V,79:G,80:J},{35:104,75:81,76:q,77:V,79:G,80:J},t(Z,[2,59]),{35:105,75:81,76:q,77:V,79:G,80:J},{35:106,75:81,76:q,77:V,79:G,80:J},{35:107,75:81,76:q,77:V,79:G,80:J},{35:108,75:81,76:q,77:V,79:G,80:J},{35:109,75:81,76:q,77:V,79:G,80:J},{35:110,75:81,76:q,77:V,79:G,80:J},{35:111,75:81,76:q,77:V,79:G,80:J},{35:112,75:81,76:q,77:V,79:G,80:J},{35:113,75:81,76:q,77:V,79:G,80:J},{35:114,75:81,76:q,77:V,79:G,80:J},{35:115,75:81,76:q,77:V,79:G,80:J},{20:116,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{12:[1,118],33:[1,117]},{35:119,75:81,76:q,77:V,79:G,80:J},{35:120,75:81,76:q,77:V,79:G,80:J},{35:121,75:81,76:q,77:V,79:G,80:J},{35:122,75:81,76:q,77:V,79:G,80:J},{35:123,75:81,76:q,77:V,79:G,80:J},{35:124,75:81,76:q,77:V,79:G,80:J},{35:125,75:81,76:q,77:V,79:G,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t($,[2,17],{21:22,19:130,22:e,23:a,24:n,26:i,28:s}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:n,26:i,28:s,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(H,[2,21]),t(H,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:q,77:V,79:G,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t($,[2,18]),t(Q,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,r.K2)((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:(0,r.K2)((function(t){var e=this,a=[0],n=[],i=[null],s=[],l=this.table,o="",c=0,h=0,d=0,u=s.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var b=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)((function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t}),"popStack"),(0,r.K2)(x,"lex");for(var _,m,E,S,A,C,w,k,O,T={};;){if(E=a[a.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=x()),S=l[E]&&l[E][_]),void 0===S||!S.length||!S[0]){var v;for(C in O=[],l[E])this.terminals_[C]&&C>2&&O.push("'"+this.terminals_[C]+"'");v=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:f,expected:O})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:a.push(_),i.push(p.yytext),s.push(p.yylloc),a.push(S[1]),_=null,m?(_=m,m=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(w=this.productions_[S[1]][1],T.$=i[i.length-w],T._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},b&&(T._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(A=this.performAction.apply(T,[o,h,c,y.yy,S[1],i,s].concat(u))))return A;w&&(a=a.slice(0,-1*w*2),i=i.slice(0,-1*w),s=s.slice(0,-1*w)),a.push(this.productions_[S[1]][0]),i.push(T.$),s.push(T._$),k=l[a[a.length-2]][a[a.length-1]],a.push(k);break;case 3:return!0}}return!0}),"parse")},rt=function(){return{EOF:1,parseError:(0,r.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,r.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,r.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,r.K2)((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,r.K2)((function(){return this._more=!0,this}),"more"),reject:(0,r.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,r.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,r.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,r.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,r.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,r.K2)((function(t,e){var a,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1}),"test_match"),next:(0,r.K2)((function(){if(this.done)return this.EOF;var t,e,a,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;re[0].length)){if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,r.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,r.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,r.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,r.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,r.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,r.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,r.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,r.K2)((function(t,e,a,n){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function st(){this.yy={}}return it.lexer=rt,(0,r.K2)(st,"Parser"),st.prototype=it,it.Parser=st,new st}();o.parser=o;var h,d=o,u=[],p=[""],y="global",g="",f=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],b=[],x="",_=!1,m=4,E=2,S=(0,r.K2)((function(){return h}),"getC4Type"),A=(0,r.K2)((function(t){let e=(0,r.jZ)(t,(0,r.D7)());h=e}),"setC4Type"),C=(0,r.K2)((function(t,e,a,n,i,r,s,l,o){if(null==t||null==e||null==a||null==n)return;let c={};const h=b.find((t=>t.from===e&&t.to===a));if(h?c=h:b.push(c),c.type=t,c.from=e,c.to=a,c.label={text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=$()}),"addRel"),w=(0,r.K2)((function(t,e,a,n,i,r,s){if(null===e||null===a)return;let l={};const o=u.find((t=>t.alias===e));if(o&&e===o.alias?l=o:(l.alias=e,u.push(l)),l.label=null==a?{text:""}:{text:a},null==n)l.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.tags=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=y,l.wrap=$()}),"addPersonOrSystem"),k=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y}),"addContainer"),O=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y}),"addComponent"),T=(0,r.K2)((function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=f.find((e=>e.alias===t));if(s&&t===s.alias?r=s:(r.alias=t,f.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"system"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),g=y,y=t,p.push(g)}),"addPersonOrSystemBoundary"),v=(0,r.K2)((function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=f.find((e=>e.alias===t));if(s&&t===s.alias?r=s:(r.alias=t,f.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"container"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),g=y,y=t,p.push(g)}),"addContainerBoundary"),R=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=f.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,f.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.type={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=y,o.wrap=$(),g=y,y=e,p.push(g)}),"addDeploymentNode"),D=(0,r.K2)((function(){y=g,p.pop(),g=p.pop(),p.push(g)}),"popBoundaryParseStack"),N=(0,r.K2)((function(t,e,a,n,i,r,s,l,o,c,h){let d=u.find((t=>t.alias===e));if(void 0!==d||(d=f.find((t=>t.alias===e)),void 0!==d)){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.bgColor=a;if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.fontColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.borderColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.shadowing=r;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shape=s;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}}),"updateElStyle"),P=(0,r.K2)((function(t,e,a,n,i,r,s){const l=b.find((t=>t.from===e&&t.to===a));if(void 0!==l){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]=e}else l.textColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(r);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(s)}}),"updateRelStyle"),B=(0,r.K2)((function(t,e,a){let n=m,i=E;if("object"==typeof e){const t=Object.values(e)[0];n=parseInt(t)}else n=parseInt(e);if("object"==typeof a){const t=Object.values(a)[0];i=parseInt(t)}else i=parseInt(a);n>=1&&(m=n),i>=1&&(E=i)}),"updateLayoutConfig"),I=(0,r.K2)((function(){return m}),"getC4ShapeInRow"),M=(0,r.K2)((function(){return E}),"getC4BoundaryInRow"),j=(0,r.K2)((function(){return y}),"getCurrentBoundaryParse"),K=(0,r.K2)((function(){return g}),"getParentBoundaryParse"),L=(0,r.K2)((function(t){return null==t?u:u.filter((e=>e.parentBoundary===t))}),"getC4ShapeArray"),Y=(0,r.K2)((function(t){return u.find((e=>e.alias===t))}),"getC4Shape"),U=(0,r.K2)((function(t){return Object.keys(L(t))}),"getC4ShapeKeys"),F=(0,r.K2)((function(t){return null==t?f:f.filter((e=>e.parentBoundary===t))}),"getBoundaries"),X=F,z=(0,r.K2)((function(){return b}),"getRels"),W=(0,r.K2)((function(){return x}),"getTitle"),Q=(0,r.K2)((function(t){_=t}),"setWrap"),$=(0,r.K2)((function(){return _}),"autoWrap"),H=(0,r.K2)((function(){u=[],f=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],g="",y="global",p=[""],b=[],p=[""],x="",_=!1,m=4,E=2}),"clear"),q=(0,r.K2)((function(t){let e=(0,r.jZ)(t,(0,r.D7)());x=e}),"setTitle"),V={addPersonOrSystem:w,addPersonOrSystemBoundary:T,addContainer:k,addContainerBoundary:v,addComponent:O,addDeploymentNode:R,popBoundaryParseStack:D,addRel:C,updateElStyle:N,updateRelStyle:P,updateLayoutConfig:B,autoWrap:$,setWrap:Q,getC4ShapeArray:L,getC4Shape:Y,getC4ShapeKeys:U,getBoundaries:F,getBoundarys:X,getCurrentBoundaryParse:j,getParentBoundaryParse:K,getRels:z,getTitle:W,getC4Type:S,getC4ShapeInRow:I,getC4BoundaryInRow:M,setAccTitle:r.SV,getAccTitle:r.iN,getAccDescription:r.m7,setAccDescription:r.EI,getConfig:(0,r.K2)((()=>(0,r.D7)().c4),"getConfig"),clear:H,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:q,setC4Type:A},G=(0,r.K2)((function(t,e){return(0,n.tk)(t,e)}),"drawRect"),J=(0,r.K2)((function(t,e,a,n,i,r){const s=t.append("image");s.attr("width",e),s.attr("height",a),s.attr("x",n),s.attr("y",i);let o=r.startsWith("data:image/png;base64")?r:(0,l.J)(r);s.attr("xlink:href",o)}),"drawImage"),Z=(0,r.K2)(((t,e,a)=>{const n=t.append("g");let i=0;for(let t of e){let e=t.textColor?t.textColor:"#444444",r=t.lineColor?t.lineColor:"#444444",s=t.offsetX?parseInt(t.offsetX):0,l=t.offsetY?parseInt(t.offsetY):0,o="";if(0===i){let e=n.append("line");e.attr("x1",t.startPoint.x),e.attr("y1",t.startPoint.y),e.attr("x2",t.endPoint.x),e.attr("y2",t.endPoint.y),e.attr("stroke-width","1"),e.attr("stroke",r),e.style("fill","none"),"rel_b"!==t.type&&e.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+o+"#arrowend)"),i=-1}else{let e=n.append("path");e.attr("fill","none").attr("stroke-width","1").attr("stroke",r).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",t.startPoint.x).replaceAll("starty",t.startPoint.y).replaceAll("controlx",t.startPoint.x+(t.endPoint.x-t.startPoint.x)/2-(t.endPoint.x-t.startPoint.x)/4).replaceAll("controly",t.startPoint.y+(t.endPoint.y-t.startPoint.y)/2).replaceAll("stopx",t.endPoint.x).replaceAll("stopy",t.endPoint.y)),"rel_b"!==t.type&&e.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+o+"#arrowend)")}let c=a.messageFont();dt(a)(t.label.text,n,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+l,t.label.width,t.label.height,{fill:e},c),t.techn&&""!==t.techn.text&&(c=a.messageFont(),dt(a)("["+t.techn.text+"]",n,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+a.messageFontSize+5+l,Math.max(t.label.width,t.techn.width),t.techn.height,{fill:e,"font-style":"italic"},c))}}),"drawRels"),tt=(0,r.K2)((function(t,e,a){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",r=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:r,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};G(n,o);let c=a.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=s,dt(a)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=a.boundaryFont(),c.fontColor=s,dt(a)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=a.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=s,dt(a)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))}),"drawBoundary"),et=(0,r.K2)((function(t,e,a){let i=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const o=t.append("g");o.attr("class","person-man");const c=(0,n.PB)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=e.x,c.y=e.y,c.fill=i,c.width=e.width,c.height=e.height,c.stroke=r,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},G(o,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let h=ht(a,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":J(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,l)}let d=a[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,dt(a)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=a[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.techn&&""!==e.techn?.text?dt(a)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&""!==e.type.text&&dt(a)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&""!==e.descr.text&&(d=a.personFont(),d.fontColor=s,dt(a)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height}),"drawC4Shape"),at=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),nt=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),it=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),rt=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")}),"insertArrowHead"),st=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")}),"insertArrowEnd"),lt=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")}),"insertArrowFilledHead"),ot=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertDynamicNumber"),ct=(0,r.K2)((function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")}),"insertArrowCrossHead"),ht=(0,r.K2)(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"getC4ShapeFont"),dt=function(){function t(t,e,a,i,r,s,l){n(e.append("text").attr("x",a+r/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,a,i,s,l,o,c){const{fontSize:h,fontFamily:d,fontWeight:u}=c,p=t.split(r.Y2.lineBreakRegex);for(let t=0;t=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>gt)&&(e=this.nextData.startx+t.margin+bt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},_t(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},_t=(0,r.K2)((function(t){(0,r.hH)(bt,t),t.fontFamily&&(bt.personFontFamily=bt.systemFontFamily=bt.messageFontFamily=t.fontFamily),t.fontSize&&(bt.personFontSize=bt.systemFontSize=bt.messageFontSize=t.fontSize),t.fontWeight&&(bt.personFontWeight=bt.systemFontWeight=bt.messageFontWeight=t.fontWeight)}),"setConf"),mt=(0,r.K2)(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"c4ShapeFont"),Et=(0,r.K2)((t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight})),"boundaryFont"),St=(0,r.K2)((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont");function At(t,e,a,n,s){if(!e[t].width)if(a)e[t].text=(0,i.bH)(e[t].text,s,n),e[t].textLines=e[t].text.split(r.Y2.lineBreakRegex).length,e[t].width=s,e[t].height=(0,i.ru)(e[t].text,n);else{let a=e[t].text.split(r.Y2.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(const r of a)e[t].width=Math.max((0,i.Un)(r,n),e[t].width),s=(0,i.ru)(r,n),e[t].height=e[t].height+s}}(0,r.K2)(At,"calcC4ShapeTextWH");var Ct=(0,r.K2)((function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=bt.c4ShapeMargin-35;let n=e.wrap&&bt.wrap,r=Et(bt);r.fontSize=r.fontSize+2,r.fontWeight="bold",At("label",e,n,r,(0,i.Un)(e.label.text,r)),ut.drawBoundary(t,e,bt)}),"drawBoundary"),wt=(0,r.K2)((function(t,e,a,n){let r=0;for(const s of n){r=0;const n=a[s];let l=mt(bt,n.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,n.typeC4Shape.width=(0,i.Un)("«"+n.typeC4Shape.text+"»",l),n.typeC4Shape.height=l.fontSize+2,n.typeC4Shape.Y=bt.c4ShapePadding,r=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height);let o=n.wrap&&bt.wrap,c=bt.width-2*bt.c4ShapePadding,h=mt(bt,n.typeC4Shape.text);h.fontSize=h.fontSize+2,h.fontWeight="bold",At("label",n,o,h,c),n.label.Y=r+8,r=n.label.Y+n.label.height,n.type&&""!==n.type.text?(n.type.text="["+n.type.text+"]",At("type",n,o,mt(bt,n.typeC4Shape.text),c),n.type.Y=r+5,r=n.type.Y+n.type.height):n.techn&&""!==n.techn.text&&(n.techn.text="["+n.techn.text+"]",At("techn",n,o,mt(bt,n.techn.text),c),n.techn.Y=r+5,r=n.techn.Y+n.techn.height);let d=r,u=n.label.width;n.descr&&""!==n.descr.text&&(At("descr",n,o,mt(bt,n.typeC4Shape.text),c),n.descr.Y=r+20,r=n.descr.Y+n.descr.height,u=Math.max(n.label.width,n.descr.width),d=r-5*n.descr.textLines),u+=bt.c4ShapePadding,n.width=Math.max(n.width||bt.width,u,bt.width),n.height=Math.max(n.height||bt.height,d,bt.height),n.margin=n.margin||bt.c4ShapeMargin,t.insert(n),ut.drawC4Shape(e,n,bt)}t.bumpLastMargin(bt.c4ShapeMargin)}),"drawC4ShapeArray"),kt=class{static{(0,r.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Ot=(0,r.K2)((function(t,e){let a=t.x,n=t.y,i=e.x,r=e.y,s=a+t.width/2,l=n+t.height/2,o=Math.abs(a-i),c=Math.abs(n-r),h=c/o,d=t.height/t.width,u=null;return n==r&&ai?u=new kt(a,l):a==i&&nr&&(u=new kt(s,n)),a>i&&n=h?new kt(a,l+h*t.width/2):new kt(s-o/c*t.height/2,n+t.height):a=h?new kt(a+t.width,l+h*t.width/2):new kt(s+o/c*t.height/2,n+t.height):ar?u=d>=h?new kt(a+t.width,l-h*t.width/2):new kt(s+t.height/2*o/c,n):a>i&&n>r&&(u=d>=h?new kt(a,l-t.width/2*h):new kt(s-t.height/2*o/c,n)),u}),"getIntersectPoint"),Tt=(0,r.K2)((function(t,e){let a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;let n=Ot(t,a);return a.x=t.x+t.width/2,a.y=t.y+t.height/2,{startPoint:n,endPoint:Ot(e,a)}}),"getIntersectPoints"),vt=(0,r.K2)((function(t,e,a,n){let r=0;for(let t of e){r+=1;let e=t.wrap&&bt.wrap,s=St(bt);"C4Dynamic"===n.db.getC4Type()&&(t.label.text=r+": "+t.label.text);let l=(0,i.Un)(t.label.text,s);At("label",t,e,s,l),t.techn&&""!==t.techn.text&&(l=(0,i.Un)(t.techn.text,s),At("techn",t,e,s,l)),t.descr&&""!==t.descr.text&&(l=(0,i.Un)(t.descr.text,s),At("descr",t,e,s,l));let o=a(t.from),c=a(t.to),h=Tt(o,c);t.startPoint=h.startPoint,t.endPoint=h.endPoint}ut.drawRels(t,e,bt)}),"drawRels");function Rt(t,e,a,n,i){let r=new xt(i);r.data.widthLimit=a.data.widthLimit/Math.min(ft,n.length);for(let[s,l]of n.entries()){let n=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=n,n=l.image.Y+l.image.height);let o=l.wrap&&bt.wrap,c=Et(bt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",At("label",l,o,c,r.data.widthLimit),l.label.Y=n+8,n=l.label.Y+l.label.height,l.type&&""!==l.type.text&&(l.type.text="["+l.type.text+"]",At("type",l,o,Et(bt),r.data.widthLimit),l.type.Y=n+5,n=l.type.Y+l.type.height),l.descr&&""!==l.descr.text){let t=Et(bt);t.fontSize=t.fontSize-2,At("descr",l,o,t,r.data.widthLimit),l.descr.Y=n+20,n=l.descr.Y+l.descr.height}if(0==s||s%ft==0){let t=a.data.startx+bt.diagramMarginX,e=a.data.stopy+bt.diagramMarginY+n;r.setData(t,t,e,e)}else{let t=r.data.stopx!==r.data.startx?r.data.stopx+bt.diagramMarginX:r.data.startx,e=r.data.starty;r.setData(t,t,e,e)}r.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&wt(r,t,h,d),e=l.alias;let u=i.db.getBoundarys(e);u.length>0&&Rt(t,e,r,u,i),"global"!==l.alias&&Ct(t,l,r),a.data.stopy=Math.max(r.data.stopy+bt.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(r.data.stopx+bt.c4ShapeMargin,a.data.stopx),pt=Math.max(pt,a.data.stopx),yt=Math.max(yt,a.data.stopy)}}(0,r.K2)(Rt,"drawInsideBoundary");var Dt={drawPersonOrSystemArray:wt,drawBoundary:Ct,setConf:_t,draw:(0,r.K2)((function(t,e,a,n){bt=(0,r.D7)().c4;const i=(0,r.D7)().securityLevel;let l;"sandbox"===i&&(l=(0,s.Ltv)("#i"+e));const o="sandbox"===i?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body");let c=n.db;n.db.setWrap(bt.wrap),gt=c.getC4ShapeInRow(),ft=c.getC4BoundaryInRow(),r.Rm.debug(`C:${JSON.stringify(bt,null,2)}`);const h="sandbox"===i?o.select(`[id="${e}"]`):(0,s.Ltv)(`[id="${e}"]`);ut.insertComputerIcon(h),ut.insertDatabaseIcon(h),ut.insertClockIcon(h);let d=new xt(n);d.setData(bt.diagramMarginX,bt.diagramMarginX,bt.diagramMarginY,bt.diagramMarginY),d.data.widthLimit=screen.availWidth,pt=bt.diagramMarginX,yt=bt.diagramMarginY;const u=n.db.getTitle();Rt(h,"",d,n.db.getBoundarys(""),n),ut.insertArrowHead(h),ut.insertArrowEnd(h),ut.insertArrowCrossHead(h),ut.insertArrowFilledHead(h),vt(h,n.db.getRels(),n.db.getC4Shape,n),d.data.stopx=pt,d.data.stopy=yt;const p=d.data;let y=p.stopy-p.starty+2*bt.diagramMarginY;const g=p.stopx-p.startx+2*bt.diagramMarginX;u&&h.append("text").text(u).attr("x",(p.stopx-p.startx)/2-4*bt.diagramMarginX).attr("y",p.starty+bt.diagramMarginY),(0,r.a$)(h,y,g,bt.useMaxWidth);const f=u?60:0;h.attr("viewBox",p.startx-bt.diagramMarginX+" -"+(bt.diagramMarginY+f)+" "+g+" "+(y+f)),r.Rm.debug("models:",p)}),"draw")},Nt={parser:d,db:V,renderer:Dt,styles:(0,r.K2)((t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`),"getStyles"),init:(0,r.K2)((({c4:t,wrap:e})=>{Dt.setConf(t),V.setWrap(e)}),"init")}},4323:(t,e,a)=>{a.d(e,{CP:()=>c,HT:()=>d,PB:()=>h,aC:()=>o,lC:()=>s,m:()=>l,tk:()=>r});var n=a(32),i=a(6750),r=(0,n.K2)(((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a}),"drawRect"),s=(0,n.K2)(((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,a).lower()}),"drawBackgroundRect"),l=(0,n.K2)(((t,e)=>{const a=e.text.replace(n.H1," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(a),i}),"drawText"),o=(0,n.K2)(((t,e,a,n)=>{const r=t.append("image");r.attr("x",e),r.attr("y",a);const s=(0,i.J)(n);r.attr("xlink:href",s)}),"drawImage"),c=(0,n.K2)(((t,e,a,n)=>{const r=t.append("use");r.attr("x",e),r.attr("y",a);const s=(0,i.J)(n);r.attr("xlink:href",`#${s}`)}),"drawEmbeddedImage"),h=(0,n.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),d=(0,n.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")}}]); \ No newline at end of file diff --git a/js/862-ff5166f8.chunk.min.js b/js/862-ff5166f8.chunk.min.js new file mode 100644 index 0000000..7d8e464 --- /dev/null +++ b/js/862-ff5166f8.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[862],{4323:(t,e,n)=>{n.d(e,{CP:()=>l,HT:()=>u,PB:()=>h,aC:()=>c,lC:()=>a,m:()=>o,tk:()=>r});var i=n(32),s=n(6750),r=(0,i.K2)(((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)n.attr(t,e.attrs[t]);return e.class&&n.attr("class",e.class),n}),"drawRect"),a=(0,i.K2)(((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,n).lower()}),"drawBackgroundRect"),o=(0,i.K2)(((t,e)=>{const n=e.text.replace(i.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const r=s.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),s}),"drawText"),c=(0,i.K2)(((t,e,n,i)=>{const r=t.append("image");r.attr("x",e),r.attr("y",n);const a=(0,s.J)(i);r.attr("xlink:href",a)}),"drawImage"),l=(0,i.K2)(((t,e,n,i)=>{const r=t.append("use");r.attr("x",e),r.attr("y",n);const a=(0,s.J)(i);r.attr("xlink:href",`#${a}`)}),"drawEmbeddedImage"),h=(0,i.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),u=(0,i.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")},1481:(t,e,n)=>{n.d(e,{diagram:()=>Y});var i=n(4323),s=n(32),r=n(4852),a=function(){var t=(0,s.K2)((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,14],l={trace:(0,s.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,s.K2)((function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:r,16:a,17:o,18:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,s.K2)((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:(0,s.K2)((function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=0,y=a.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;a.push(g);var x=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)((function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),(0,s.K2)(m,"lex");for(var k,_,b,w,v,K,$,T,M,S={};;){if(b=n[n.length-1],this.defaultActions[b]?w=this.defaultActions[b]:(null==k&&(k=m()),w=o[b]&&o[b][k]),void 0===w||!w.length||!w[0]){var E;for(K in M=[],o[b])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");E=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(E,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:g,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+k);switch(w[0]){case 1:n.push(k),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),k=null,_?(k=_,_=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,g=p.yylloc,u>0&&u--);break;case 2:if($=this.productions_[w[1]][1],S.$=r[r.length-$],S._$={first_line:a[a.length-($||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-($||1)].first_column,last_column:a[a.length-1].last_column},x&&(S._$.range=[a[a.length-($||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(S,[c,h,l,d.yy,w[1],r,a].concat(y))))return v;$&&(n=n.slice(0,-1*$*2),r=r.slice(0,-1*$),a=a.slice(0,-1*$)),n.push(this.productions_[w[1]][0]),r.push(S.$),a.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0}),"parse")},h=function(){return{EOF:1,parseError:(0,s.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,s.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,s.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,s.K2)((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,s.K2)((function(){return this._more=!0,this}),"more"),reject:(0,s.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,s.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,s.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,s.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,s.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,s.K2)((function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1}),"test_match"),next:(0,s.K2)((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,s.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,s.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,s.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,s.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,s.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,s.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,s.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)((function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}}),"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return l.lexer=h,(0,s.K2)(u,"Parser"),u.prototype=l,l.Parser=u,new u}();a.parser=a;var o=a,c="",l=[],h=[],u=[],y=(0,s.K2)((function(){l.length=0,h.length=0,c="",u.length=0,(0,s.IU)()}),"clear"),p=(0,s.K2)((function(t){c=t,l.push(t)}),"addSection"),d=(0,s.K2)((function(){return l}),"getSections"),f=(0,s.K2)((function(){let t=k(),e=0;for(;!t&&e<100;)t=k(),e++;return h.push(...u),h}),"getTasks"),g=(0,s.K2)((function(){const t=[];return h.forEach((e=>{e.people&&t.push(...e.people)})),[...new Set(t)].sort()}),"updateActors"),x=(0,s.K2)((function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map((t=>t.trim())),a={section:c,type:c,people:r,task:t,score:i};u.push(a)}),"addTask"),m=(0,s.K2)((function(t){const e={section:c,type:c,description:t,task:t,classes:[]};h.push(e)}),"addTaskOrg"),k=(0,s.K2)((function(){const t=(0,s.K2)((function(t){return u[t].processed}),"compileTask");let e=!0;for(const[n,i]of u.entries())t(n),e=e&&i.processed;return e}),"compileTasks"),_=(0,s.K2)((function(){return g()}),"getActors"),b={getConfig:(0,s.K2)((()=>(0,s.D7)().journey),"getConfig"),clear:y,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setAccTitle:s.SV,getAccTitle:s.iN,setAccDescription:s.EI,getAccDescription:s.m7,addSection:p,getSections:d,getTasks:f,addTask:x,addTaskOrg:m,getActors:_},w=(0,s.K2)((t=>`.label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n`),"getStyles"),v=(0,s.K2)((function(t,e){return(0,i.tk)(t,e)}),"drawRect"),K=(0,s.K2)((function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");function a(t){const n=(0,r.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function o(t){const n=(0,r.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",n).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return i.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K2)(a,"smile"),(0,s.K2)(o,"sad"),(0,s.K2)(c,"ambivalent"),e.score>3?a(i):e.score<3?o(i):c(i),n}),"drawFace"),$=(0,s.K2)((function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n}),"drawCircle"),T=(0,s.K2)((function(t,e){return(0,i.m)(t,e)}),"drawText"),M=(0,s.K2)((function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,s.K2)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,T(t,e)}),"drawLabel"),S=(0,s.K2)((function(t,e,n){const s=t.append("g"),r=(0,i.PB)();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,v(s,r),C(n)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)}),"drawSection"),E=-1,I=(0,s.K2)((function(t,e,n){const s=e.x+n.width/2,r=t.append("g");E++,r.append("line").attr("id","task"+E).attr("x1",s).attr("y1",e.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),K(r,{cx:s,cy:300+30*(5-e.score),score:e.score});const a=(0,i.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,v(r,a);let o=e.x+14;e.people.forEach((t=>{const n=e.actors[t].color,i={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};$(r,i),o+=10})),C(n)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)}),"drawTask"),P=(0,s.K2)((function(t,e){(0,i.lC)(t,e)}),"drawBackgroundRect"),C=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:u}=c,y=t.split(//gi);for(let t=0;t{const s=D[i].color,r={cx:20,cy:n,r:7,fill:s,stroke:"#000",pos:D[i].position};A.drawCircle(t,r);const a={x:40,y:n+7,fill:"#666",text:i,textMargin:5|e.boxTextMargin};A.drawText(t,a),n+=20}))}(0,s.K2)(L,"drawActorLegend");var V=(0,s.D7)().journey,B=V.leftMargin,O=(0,s.K2)((function(t,e,n,i){const a=(0,s.D7)().journey,o=(0,s.D7)().securityLevel;let c;"sandbox"===o&&(c=(0,r.Ltv)("#i"+e));const l="sandbox"===o?(0,r.Ltv)(c.nodes()[0].contentDocument.body):(0,r.Ltv)("body");F.init();const h=l.select("#"+e);A.initGraphics(h);const u=i.db.getTasks(),y=i.db.getDiagramTitle(),p=i.db.getActors();for(const t in D)delete D[t];let d=0;p.forEach((t=>{D[t]={color:a.actorColours[d%a.actorColours.length],position:d},d++})),L(h),F.insert(0,0,B,50*Object.keys(D).length),z(h,u,0);const f=F.getBounds();y&&h.append("text").text(y).attr("x",B).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const g=f.stopy-f.starty+2*a.diagramMarginY,x=B+f.stopx+2*a.diagramMarginX;(0,s.a$)(h,g,x,a.useMaxWidth),h.append("line").attr("x1",B).attr("y1",4*a.height).attr("x2",x-B-4).attr("y2",4*a.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const m=y?70:0;h.attr("viewBox",`${f.startx} -25 ${x} ${g+m}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",g+m+25)}),"draw"),F={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,s.K2)((function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0}),"init"),updateVal:(0,s.K2)((function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])}),"updateVal"),updateBounds:(0,s.K2)((function(t,e,n,i){const r=(0,s.D7)().journey,a=this;let o=0;function c(c){return(0,s.K2)((function(s){o++;const l=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-l*r.boxMargin,Math.min),a.updateVal(s,"stopy",i+l*r.boxMargin,Math.max),a.updateVal(F.data,"startx",t-l*r.boxMargin,Math.min),a.updateVal(F.data,"stopx",n+l*r.boxMargin,Math.max),"activation"!==c&&(a.updateVal(s,"startx",t-l*r.boxMargin,Math.min),a.updateVal(s,"stopx",n+l*r.boxMargin,Math.max),a.updateVal(F.data,"starty",e-l*r.boxMargin,Math.min),a.updateVal(F.data,"stopy",i+l*r.boxMargin,Math.max))}),"updateItemBounds")}(0,s.K2)(c,"updateFn"),this.sequenceItems.forEach(c())}),"updateBounds"),insert:(0,s.K2)((function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(F.data,"startx",s,Math.min),this.updateVal(F.data,"starty",a,Math.min),this.updateVal(F.data,"stopx",r,Math.max),this.updateVal(F.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)}),"insert"),bumpVerticalPos:(0,s.K2)((function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos}),"bumpVerticalPos"),getVerticalPos:(0,s.K2)((function(){return this.verticalPos}),"getVerticalPos"),getBounds:(0,s.K2)((function(){return this.data}),"getBounds")},N=V.sectionFills,R=V.sectionColours,z=(0,s.K2)((function(t,e,n){const i=(0,s.D7)().journey;let r="";const a=n+(2*i.height+i.diagramMarginY);let o=0,c="#CCC",l="black",h=0;for(const[n,s]of e.entries()){if(r!==s.section){c=N[o%N.length],h=o%N.length,l=R[o%R.length];let a=0;const u=s.section;for(let t=n;t(D[e]&&(t[e]=D[e]),t)),{});s.x=n*i.taskMargin+n*i.width+B,s.y=a,s.width=i.diagramMarginX,s.height=i.diagramMarginY,s.colour=l,s.fill=c,s.num=h,s.actors=u,A.drawTask(t,s,i),F.insert(s.x,s.y,s.x+s.width+i.taskMargin,450)}}),"drawTasks"),W={setConf:j,draw:O},Y={parser:o,db:b,renderer:W,styles:w,init:(0,s.K2)((t=>{W.setConf(t.journey),b.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/875-2aebef6b.chunk.min.js b/js/875-2aebef6b.chunk.min.js deleted file mode 100644 index ef627b9..0000000 --- a/js/875-2aebef6b.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[875],{6875:(t,e,r)=>{r.d(e,{diagram:()=>F});var a=r(7323),i=r(798),n=r(697),s=r(4852),o=r(567);const c=[];for(let t=0;t<256;++t)c.push((t+256).toString(16).slice(1));const l=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,h=function(t){if(!function(t){return"string"==typeof t&&l.test(t)}(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r};function d(t,e,r,a){switch(t){case 0:return e&r^~e&a;case 1:case 3:return e^r^a;case 2:return e&r^e&a^r&a}}function u(t,e){return t<>>32-e}const y=function(){function t(t,e,r,a){var i;if("string"==typeof t&&(t=function(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>>0;l=c,c=o,o=u(s,30)>>>0,s=i,i=n}r[0]=r[0]+i>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+c>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}(n),n[6]=15&n[6]|80,n[8]=63&n[8]|128,r){a=a||0;for(let t=0;t<16;++t)r[a+t]=n[t];return r}return function(t,e=0){return c[t[e+0]]+c[t[e+1]]+c[t[e+2]]+c[t[e+3]]+"-"+c[t[e+4]]+c[t[e+5]]+"-"+c[t[e+6]]+c[t[e+7]]+"-"+c[t[e+8]]+c[t[e+9]]+"-"+c[t[e+10]]+c[t[e+11]]+c[t[e+12]]+c[t[e+13]]+c[t[e+14]]+c[t[e+15]]}(n)}try{t.name="v5"}catch(t){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}();var p=function(){var t=(0,i.K2)((function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r}),"o"),e=[6,8,10,20,22,24,26,27,28],r=[1,10],a=[1,11],n=[1,12],s=[1,13],o=[1,14],c=[1,15],l=[1,21],h=[1,22],d=[1,23],u=[1,24],y=[1,25],p=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],_=[1,34],f=[27,28,46,47],E=[41,42,43,44,45],g=[17,34],m=[1,54],O=[1,53],k=[17,34,36,38],b={trace:(0,i.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:(0,i.K2)((function(t,e,r,a,i,n,s){var o=n.length-1;switch(i){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:n[o-1].push(n[o]),this.$=n[o-1];break;case 4:case 5:case 19:case 43:case 27:case 28:case 31:this.$=n[o];break;case 8:a.addEntity(n[o-4]),a.addEntity(n[o-2]),a.addRelationship(n[o-4],n[o],n[o-2],n[o-3]);break;case 9:a.addEntity(n[o-3]),a.addAttributes(n[o-3],n[o-1]);break;case 10:a.addEntity(n[o-2]);break;case 11:a.addEntity(n[o]);break;case 12:a.addEntity(n[o-6],n[o-4]),a.addAttributes(n[o-6],n[o-1]);break;case 13:a.addEntity(n[o-5],n[o-3]);break;case 14:a.addEntity(n[o-3],n[o-1]);break;case 15:case 16:this.$=n[o].trim(),a.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),a.setAccDescription(this.$);break;case 20:case 41:case 42:case 32:this.$=n[o].replace(/"/g,"");break;case 21:case 29:this.$=[n[o]];break;case 22:n[o].push(n[o-1]),this.$=n[o];break;case 23:this.$={attributeType:n[o-1],attributeName:n[o]};break;case 24:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeKeyTypeList:n[o]};break;case 25:this.$={attributeType:n[o-2],attributeName:n[o-1],attributeComment:n[o]};break;case 26:this.$={attributeType:n[o-3],attributeName:n[o-2],attributeKeyTypeList:n[o-1],attributeComment:n[o]};break;case 30:n[o-2].push(n[o]),this.$=n[o-2];break;case 33:this.$={cardA:n[o],relType:n[o-1],cardB:n[o-2]};break;case 34:this.$=a.Cardinality.ZERO_OR_ONE;break;case 35:this.$=a.Cardinality.ZERO_OR_MORE;break;case 36:this.$=a.Cardinality.ONE_OR_MORE;break;case 37:this.$=a.Cardinality.ONLY_ONE;break;case 38:this.$=a.Cardinality.MD_PARENT;break;case 39:this.$=a.Identification.NON_IDENTIFYING;break;case 40:this.$=a.Identification.IDENTIFYING}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:r,22:a,24:n,26:s,27:o,28:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:16,11:9,20:r,22:a,24:n,26:s,27:o,28:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:l,42:h,43:d,44:u,45:y}),{21:[1,26]},{23:[1,27]},{25:[1,28]},t(e,[2,18]),t(p,[2,19]),t(p,[2,20]),t(e,[2,4]),{11:29,27:o,28:c},{16:30,17:[1,31],29:32,30:33,34:_},{11:35,27:o,28:c},{40:36,46:[1,37],47:[1,38]},t(f,[2,34]),t(f,[2,35]),t(f,[2,36]),t(f,[2,37]),t(f,[2,38]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),{13:[1,39]},{17:[1,40]},t(e,[2,10]),{16:41,17:[2,21],29:32,30:33,34:_},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:l,42:h,43:d,44:u,45:y},t(E,[2,39]),t(E,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},t(e,[2,9]),{17:[2,22]},t(g,[2,23],{32:50,33:51,35:52,37:m,38:O}),t([17,34,37,38],[2,28]),t(e,[2,14],{15:[1,55]}),t([27,28],[2,33]),t(e,[2,8]),t(e,[2,41]),t(e,[2,42]),t(e,[2,43]),t(g,[2,24],{33:56,36:[1,57],38:O}),t(g,[2,25]),t(k,[2,29]),t(g,[2,32]),t(k,[2,31]),{16:58,17:[1,59],29:32,30:33,34:_},t(g,[2,26]),{35:60,37:m},{17:[1,61]},t(e,[2,13]),t(k,[2,30]),t(e,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:(0,i.K2)((function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)}),"parseError"),parse:(0,i.K2)((function(t){var e=this,r=[0],a=[],n=[null],s=[],o=this.table,c="",l=0,h=0,d=0,u=s.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;s.push(f);var E=y.options&&y.options.ranges;function g(){var t;return"number"!=typeof(t=a.pop()||y.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,i.K2)((function(t){r.length=r.length-2*t,n.length=n.length-t,s.length=s.length-t}),"popStack"),(0,i.K2)(g,"lex");for(var m,O,k,b,R,N,T,x,A,M={};;){if(k=r[r.length-1],this.defaultActions[k]?b=this.defaultActions[k]:(null==m&&(m=g()),b=o[k]&&o[k][m]),void 0===b||!b.length||!b[0]){var w;for(N in A=[],o[k])this.terminals_[N]&&N>2&&A.push("'"+this.terminals_[N]+"'");w=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(w,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:f,expected:A})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(b[0]){case 1:r.push(m),n.push(y.yytext),s.push(y.yylloc),r.push(b[1]),m=null,O?(m=O,O=null):(h=y.yyleng,c=y.yytext,l=y.yylineno,f=y.yylloc,d>0&&d--);break;case 2:if(T=this.productions_[b[1]][1],M.$=n[n.length-T],M._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},E&&(M._$.range=[s[s.length-(T||1)].range[0],s[s.length-1].range[1]]),void 0!==(R=this.performAction.apply(M,[c,h,l,p.yy,b[1],n,s].concat(u))))return R;T&&(r=r.slice(0,-1*T*2),n=n.slice(0,-1*T),s=s.slice(0,-1*T)),r.push(this.productions_[b[1]][0]),n.push(M.$),s.push(M._$),x=o[r[r.length-2]][r[r.length-1]],r.push(x);break;case 3:return!0}}return!0}),"parse")},R=function(){return{EOF:1,parseError:(0,i.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,i.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,i.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,i.K2)((function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,i.K2)((function(){return this._more=!0,this}),"more"),reject:(0,i.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,i.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,i.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,i.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,i.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,i.K2)((function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var n in i)this[n]=i[n];return!1}return!1}),"test_match"),next:(0,i.K2)((function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),n=0;ne[0].length)){if(e=r,a=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,i.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,i.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,i.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,i.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,i.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,i.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,i.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,i.K2)((function(t,e,r,a){switch(r){case 0:return this.begin("acc_title"),22;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),24;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 10;case 8:case 15:case 20:break;case 9:return 8;case 10:return 28;case 11:return 48;case 12:return 4;case 13:return this.begin("block"),15;case 14:return 36;case 16:return 37;case 17:case 18:return 34;case 19:return 38;case 21:return this.popState(),17;case 22:case 54:return e.yytext[0];case 23:return 18;case 24:return 19;case 25:case 29:case 30:case 43:return 41;case 26:case 27:case 28:case 36:case 38:case 45:return 43;case 31:case 32:case 33:case 34:case 35:case 37:case 44:return 42;case 39:case 40:case 41:case 42:return 44;case 46:return 45;case 47:case 50:case 51:case 52:return 46;case 48:case 49:return 47;case 53:return 27;case 55:return 6}}),"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:,)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[14,15,16,17,18,19,20,21,22],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55],inclusive:!0}}}}();function N(){this.yy={}}return b.lexer=R,(0,i.K2)(N,"Parser"),N.prototype=b,b.Parser=N,new N}();p.parser=p;var _=p,f=new Map,E=[],g=(0,i.K2)((function(t,e=void 0){return f.has(t)?!f.get(t).alias&&e&&(f.get(t).alias=e,i.Rm.info(`Add alias '${e}' to entity '${t}'`)):(f.set(t,{attributes:[],alias:e}),i.Rm.info("Added new entity :",t)),f.get(t)}),"addEntity"),m=(0,i.K2)((()=>f),"getEntities"),O=(0,i.K2)((function(t,e){let r,a=g(t);for(r=e.length-1;r>=0;r--)a.attributes.push(e[r]),i.Rm.debug("Added attribute ",e[r].attributeName)}),"addAttributes"),k=(0,i.K2)((function(t,e,r,a){let n={entityA:t,roleA:e,entityB:r,relSpec:a};E.push(n),i.Rm.debug("Added new relationship :",n)}),"addRelationship"),b=(0,i.K2)((()=>E),"getRelationships"),R=(0,i.K2)((function(){f=new Map,E=[],(0,i.IU)()}),"clear"),N={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},getConfig:(0,i.K2)((()=>(0,i.D7)().er),"getConfig"),addEntity:g,addAttributes:O,getEntities:m,addRelationship:k,getRelationships:b,clear:R,setAccTitle:i.SV,getAccTitle:i.iN,setAccDescription:i.EI,getAccDescription:i.m7,setDiagramTitle:i.ke,getDiagramTitle:i.ab},T={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},x={ERMarkers:T,insertMarkers:(0,i.K2)((function(t,e){let r;t.append("defs").append("marker").attr("id",T.MD_PARENT_START).attr("refX",0).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"),t.append("defs").append("marker").attr("id",T.MD_PARENT_END).attr("refX",19).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"),t.append("defs").append("marker").attr("id",T.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",T.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",T.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",T.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",T.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",T.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",T.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",T.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}),"insertMarkers")},A=/[^\dA-Za-z](\W)*/g,M={},w=new Map,I=(0,i.K2)((function(t){const e=Object.keys(t);for(const r of e)M[r]=t[r]}),"setConf"),D=(0,i.K2)(((t,e,r)=>{const a=M.entityPadding/3,n=M.entityPadding/3,s=.85*M.fontSize,o=e.node().getBBox(),c=[];let l=!1,h=!1,d=0,u=0,y=0,p=0,_=o.height+2*a,f=1;r.forEach((t=>{void 0!==t.attributeKeyTypeList&&t.attributeKeyTypeList.length>0&&(l=!0),void 0!==t.attributeComment&&(h=!0)})),r.forEach((r=>{const n=`${e.node().id}-attr-${f}`;let o=0;const E=(0,i.QO)(r.attributeType),g=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(E),m=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(r.attributeName),O={};O.tn=g,O.nn=m;const k=g.node().getBBox(),b=m.node().getBBox();if(d=Math.max(d,k.width),u=Math.max(u,b.width),o=Math.max(k.height,b.height),l){const e=void 0!==r.attributeKeyTypeList?r.attributeKeyTypeList.join(","):"",a=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(e);O.kn=a;const c=a.node().getBBox();y=Math.max(y,c.width),o=Math.max(o,c.height)}if(h){const e=t.append("text").classed("er entityLabel",!0).attr("id",`${n}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",(0,i.D7)().fontFamily).style("font-size",s+"px").text(r.attributeComment||"");O.cn=e;const a=e.node().getBBox();p=Math.max(p,a.width),o=Math.max(o,a.height)}O.height=o,c.push(O),_+=o+2*a,f+=1}));let E=4;l&&(E+=2),h&&(E+=2);const g=d+u+y+p,m={width:Math.max(M.minEntityWidth,Math.max(o.width+2*M.entityPadding,g+n*E)),height:r.length>0?_:Math.max(M.minEntityHeight,o.height+2*M.entityPadding)};if(r.length>0){const r=Math.max(0,(m.width-g-n*E)/(E/2));e.attr("transform","translate("+m.width/2+","+(a+o.height/2)+")");let i=o.height+2*a,s="attributeBoxOdd";c.forEach((e=>{const o=i+a+e.height/2;e.tn.attr("transform","translate("+n+","+o+")");const c=t.insert("rect","#"+e.tn.node().id).classed(`er ${s}`,!0).attr("x",0).attr("y",i).attr("width",d+2*n+r).attr("height",e.height+2*a),_=parseFloat(c.attr("x"))+parseFloat(c.attr("width"));e.nn.attr("transform","translate("+(_+n)+","+o+")");const f=t.insert("rect","#"+e.nn.node().id).classed(`er ${s}`,!0).attr("x",_).attr("y",i).attr("width",u+2*n+r).attr("height",e.height+2*a);let E=parseFloat(f.attr("x"))+parseFloat(f.attr("width"));if(l){e.kn.attr("transform","translate("+(E+n)+","+o+")");const c=t.insert("rect","#"+e.kn.node().id).classed(`er ${s}`,!0).attr("x",E).attr("y",i).attr("width",y+2*n+r).attr("height",e.height+2*a);E=parseFloat(c.attr("x"))+parseFloat(c.attr("width"))}h&&(e.cn.attr("transform","translate("+(E+n)+","+o+")"),t.insert("rect","#"+e.cn.node().id).classed(`er ${s}`,"true").attr("x",E).attr("y",i).attr("width",p+2*n+r).attr("height",e.height+2*a)),i+=e.height+2*a,s="attributeBoxOdd"===s?"attributeBoxEven":"attributeBoxOdd"}))}else m.height=Math.max(M.minEntityHeight,_),e.attr("transform","translate("+m.width/2+","+m.height/2+")");return m}),"drawAttributes"),S=(0,i.K2)((function(t,e,r){let a;return[...e.keys()].forEach((function(n){const s=Y(n,"entity");w.set(n,s);const o=t.append("g").attr("id",s);a=void 0===a?s:a;const c="text-"+s,l=o.append("text").classed("er entityLabel",!0).attr("id",c).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",(0,i.D7)().fontFamily).style("font-size",M.fontSize+"px").text(e.get(n).alias??n),{width:h,height:d}=D(o,l,e.get(n).attributes),u=o.insert("rect","#"+c).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:u.width,height:u.height,shape:"rect",id:s})})),a}),"drawEntities"),v=(0,i.K2)((function(t,e){e.nodes().forEach((function(r){void 0!==r&&void 0!==e.node(r)&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")}))}),"adjustEntities"),L=(0,i.K2)((function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")}),"getEdgeName"),$=(0,i.K2)((function(t,e){return t.forEach((function(t){e.setEdge(w.get(t.entityA),w.get(t.entityB),{relationship:t},L(t))})),t}),"addRelationships"),K=0,C=(0,i.K2)((function(t,e,r,a,n){K++;const o=r.edge(w.get(e.entityA),w.get(e.entityB),L(e)),c=(0,s.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.qrM),l=t.insert("path","#"+a).classed("er relationshipLine",!0).attr("d",c(o.points)).style("stroke",M.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&l.attr("stroke-dasharray","8,8");let h="";switch(M.arrowMarkerAbsolute&&(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-end","url("+h+"#"+x.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-end","url("+h+"#"+x.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-end","url("+h+"#"+x.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-end","url("+h+"#"+x.ERMarkers.ONLY_ONE_END+")");break;case n.db.Cardinality.MD_PARENT:l.attr("marker-end","url("+h+"#"+x.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:l.attr("marker-start","url("+h+"#"+x.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:l.attr("marker-start","url("+h+"#"+x.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:l.attr("marker-start","url("+h+"#"+x.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:l.attr("marker-start","url("+h+"#"+x.ERMarkers.ONLY_ONE_START+")");break;case n.db.Cardinality.MD_PARENT:l.attr("marker-start","url("+h+"#"+x.ERMarkers.MD_PARENT_START+")")}const d=l.node().getTotalLength(),u=l.node().getPointAtLength(.5*d),y="rel"+K,p=t.append("text").classed("er relationshipLabel",!0).attr("id",y).attr("x",u.x).attr("y",u.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",(0,i.D7)().fontFamily).style("font-size",M.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+y).classed("er relationshipLabelBox",!0).attr("x",u.x-p.width/2).attr("y",u.y-p.height/2).attr("width",p.width).attr("height",p.height)}),"drawRelationshipFromLayout"),B=(0,i.K2)((function(t,e,r,c){M=(0,i.D7)().er,i.Rm.info("Drawing ER diagram");const l=(0,i.D7)().securityLevel;let h;"sandbox"===l&&(h=(0,s.Ltv)("#i"+e));const d=("sandbox"===l?(0,s.Ltv)(h.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id='${e}']`);let u;x.insertMarkers(d,M),u=new n.T({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:M.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));const y=S(d,c.db.getEntities(),u),p=$(c.db.getRelationships(),u);(0,o.Zp)(u),v(d,u),p.forEach((function(t){C(d,t,u,y,c)}));const _=M.diagramPadding;a._K.insertTitle(d,"entityTitleText",M.titleTopMargin,c.db.getDiagramTitle());const f=d.node().getBBox(),E=f.width+2*_,g=f.height+2*_;(0,i.a$)(d,g,E,M.useMaxWidth),d.attr("viewBox",`${f.x-_} ${f.y-_} ${E} ${g}`)}),"draw"),P="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function Y(t="",e=""){const r=t.replace(A,"");return`${Z(e)}${Z(r)}${y(t,P)}`}function Z(t=""){return t.length>0?`${t}-`:""}(0,i.K2)(Y,"generateId"),(0,i.K2)(Z,"strWithHyphen");var F={parser:_,db:N,renderer:{setConf:I,draw:B},styles:(0,i.K2)((t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxOdd {\n fill: ${t.attributeBackgroundColorOdd};\n stroke: ${t.nodeBorder};\n }\n\n .attributeBoxEven {\n fill: ${t.attributeBackgroundColorEven};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n }\n\n .entityTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n } \n #MD_PARENT_START {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n #MD_PARENT_END {\n fill: #f5f5f5 !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n \n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/890-c9907c95.chunk.min.js b/js/890-c9907c95.chunk.min.js new file mode 100644 index 0000000..3437988 --- /dev/null +++ b/js/890-c9907c95.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[890],{890:(e,c,k)=>{k.d(c,{createInfoServices:()=>s.v});var s=k(7021);k(9369)}}]); \ No newline at end of file diff --git a/js/907-a936ddbe.chunk.min.js b/js/907-a936ddbe.chunk.min.js new file mode 100644 index 0000000..90bc219 --- /dev/null +++ b/js/907-a936ddbe.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[907],{3159:(t,e,a)=>{function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(32).K2)(r,"populateCommonDb")},6907:(t,e,a)=>{a.d(e,{diagram:()=>x});var r=a(3159),n=a(5522),o=a(1661),l=a(32),i=a(8731),c={packet:[]},s=structuredClone(c),d=l.UI.packet,k=(0,l.K2)((()=>{const t=(0,n.$t)({...d,...(0,l.zj)().packet});return t.showBits&&(t.paddingY+=10),t}),"getConfig"),p=(0,l.K2)((()=>s.packet),"getPacket"),b={pushWord:(0,l.K2)((t=>{t.length>0&&s.packet.push(t)}),"pushWord"),getPacket:p,getConfig:k,clear:(0,l.K2)((()=>{(0,l.IU)(),s=structuredClone(c)}),"clear"),setAccTitle:l.SV,getAccTitle:l.iN,setDiagramTitle:l.ke,getDiagramTitle:l.ab,getAccDescription:l.m7,setAccDescription:l.EI},g=(0,l.K2)((t=>{(0,r.S)(t,b);let e=-1,a=[],n=1;const{bitsPerRow:o}=b.getConfig();for(let{start:r,end:i,label:c}of t.blocks){if(i&&i{if(void 0===t.end&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*a?[t,void 0]:[{start:t.start,end:e*a-1,label:t.label},{start:e*a,end:t.end,label:t.label}]}),"getNextFittingBlock"),f={parse:(0,l.K2)((async t=>{const e=await(0,i.qg)("packet",t);l.Rm.debug(e),g(e)}),"parse")},u=(0,l.K2)(((t,e,a,r)=>{const n=r.db,i=n.getConfig(),{rowHeight:c,paddingY:s,bitWidth:d,bitsPerRow:k}=i,p=n.getPacket(),b=n.getDiagramTitle(),g=c+s,h=g*(p.length+1)-(b?0:c),f=d*k+2,u=(0,o.D)(e);u.attr("viewbox",`0 0 ${f} ${h}`),(0,l.a$)(u,h,f,i.useMaxWidth);for(const[t,e]of p.entries())$(u,e,t,i);u.append("text").text(b).attr("x",f/2).attr("y",h-g/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")}),"draw"),$=(0,l.K2)(((t,e,a,{rowHeight:r,paddingX:n,paddingY:o,bitWidth:l,bitsPerRow:i,showBits:c})=>{const s=t.append("g"),d=a*(r+o)+o;for(const t of e){const e=t.start%i*l+1,a=(t.end-t.start+1)*l-n;if(s.append("rect").attr("x",e).attr("y",d).attr("width",a).attr("height",r).attr("class","packetBlock"),s.append("text").attr("x",e+a/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(t.label),!c)continue;const o=t.end===t.start,k=d-2;s.append("text").attr("x",e+(o?a/2:0)).attr("y",k).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",o?"middle":"start").text(t.start),o||s.append("text").attr("x",e+a).attr("y",k).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(t.end)}}),"drawWord"),w={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},x={parser:f,db:b,renderer:{draw:u},styles:(0,l.K2)((({packet:t}={})=>{const e=(0,n.$t)(w,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`}),"styles")}}}]); \ No newline at end of file diff --git a/js/911-59f72ec0.chunk.min.js b/js/911-59f72ec0.chunk.min.js new file mode 100644 index 0000000..67e7505 --- /dev/null +++ b/js/911-59f72ec0.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[911],{8448:(t,r,e)=>{e.d(r,{m:()=>o});var n=e(32),o=class{constructor(t){this.init=t,this.records=this.init()}static{(0,n.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},3159:(t,r,e)=>{function n(t,r){t.accDescr&&r.setAccDescription?.(t.accDescr),t.accTitle&&r.setAccTitle?.(t.accTitle),t.title&&r.setDiagramTitle?.(t.title)}e.d(r,{S:()=>n}),(0,e(32).K2)(n,"populateCommonDb")},4911:(t,r,e)=>{e.d(r,{diagram:()=>ft});var n=e(3159),o=e(8448),a=e(5522),c=e(32),s=e(8731),i=e(4852),h={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},d=c.UI.gitGraph,m=(0,c.K2)((()=>(0,a.$t)({...d,...(0,c.zj)().gitGraph})),"getConfig"),$=new o.m((()=>{const t=m(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}}));function l(){return(0,a.yT)({length:7})}function g(t,r){const e=Object.create(null);return t.reduce(((t,n)=>{const o=r(n);return e[o]||(e[o]=!0,t.push(n)),t}),[])}(0,c.K2)(l,"getID"),(0,c.K2)(g,"uniqBy");var y=(0,c.K2)((function(t){$.records.direction=t}),"setDirection"),p=(0,c.K2)((function(t){c.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{$.records.options=JSON.parse(t)}catch(t){c.Rm.error("error while parsing gitGraph options",t.message)}}),"setOptions"),x=(0,c.K2)((function(){return $.records.options}),"getOptions"),f=(0,c.K2)((function(t){let r=t.msg,e=t.id;const n=t.type;let o=t.tags;c.Rm.info("commit",r,e,n,o),c.Rm.debug("Entering commit:",r,e,n,o);const a=m();e=c.Y2.sanitizeText(e,a),r=c.Y2.sanitizeText(r,a),o=o?.map((t=>c.Y2.sanitizeText(t,a)));const s={id:e||$.records.seq+"-"+l(),message:r,seq:$.records.seq++,type:n??h.NORMAL,tags:o??[],parents:null==$.records.head?[]:[$.records.head.id],branch:$.records.currBranch};$.records.head=s,c.Rm.info("main branch",a.mainBranchName),$.records.commits.set(s.id,s),$.records.branches.set($.records.currBranch,s.id),c.Rm.debug("in pushCommit "+s.id)}),"commit"),u=(0,c.K2)((function(t){let r=t.name;const e=t.order;if(r=c.Y2.sanitizeText(r,m()),$.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);$.records.branches.set(r,null!=$.records.head?$.records.head.id:null),$.records.branchConfig.set(r,{name:r,order:e}),B(r),c.Rm.debug("in createBranch")}),"branch"),b=(0,c.K2)((t=>{let r=t.branch,e=t.id;const n=t.type,o=t.tags,a=m();r=c.Y2.sanitizeText(r,a),e&&(e=c.Y2.sanitizeText(e,a));const s=$.records.branches.get($.records.currBranch),i=$.records.branches.get(r),d=s?$.records.commits.get(s):void 0,g=i?$.records.commits.get(i):void 0;if(d&&g&&d.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if($.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===d||!d){const t=new Error(`Incorrect usage of "merge". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!$.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===g||!g){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(d===g){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&$.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw t.hash={text:`merge ${r} ${e} ${n} ${o?.join(" ")}`,token:`merge ${r} ${e} ${n} ${o?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${n} ${o?.join(" ")}`]},t}const y=i||"",p={id:e||`${$.records.seq}-${l()}`,message:`merged branch ${r} into ${$.records.currBranch}`,seq:$.records.seq++,parents:null==$.records.head?[]:[$.records.head.id,y],branch:$.records.currBranch,type:h.MERGE,customType:n,customId:!!e,tags:o??[]};$.records.head=p,$.records.commits.set(p.id,p),$.records.branches.set($.records.currBranch,p.id),c.Rm.debug($.records.branches),c.Rm.debug("in mergeBranch")}),"merge"),w=(0,c.K2)((function(t){let r=t.id,e=t.targetId,n=t.tags,o=t.parent;c.Rm.debug("Entering cherryPick:",r,e,n);const a=m();if(r=c.Y2.sanitizeText(r,a),e=c.Y2.sanitizeText(e,a),n=n?.map((t=>c.Y2.sanitizeText(t,a))),o=c.Y2.sanitizeText(o,a),!r||!$.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=$.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&(!Array.isArray(s.parents)||!s.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const i=s.branch;if(s.type===h.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!e||!$.records.commits.has(e)){if(i===$.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=$.records.branches.get($.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=$.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${$.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const d={id:$.records.seq+"-"+l(),message:`cherry-picked ${s?.message} into ${$.records.currBranch}`,seq:$.records.seq++,parents:null==$.records.head?[]:[$.records.head.id,s.id],branch:$.records.currBranch,type:h.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${s.id}${s.type===h.MERGE?`|parent:${o}`:""}`]};$.records.head=d,$.records.commits.set(d.id,d),$.records.branches.set($.records.currBranch,d.id),c.Rm.debug($.records.branches),c.Rm.debug("in cherryPick")}}),"cherryPick"),B=(0,c.K2)((function(t){if(t=c.Y2.sanitizeText(t,m()),!$.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{$.records.currBranch=t;const r=$.records.branches.get($.records.currBranch);$.records.head=void 0!==r&&r?$.records.commits.get(r)??null:null}}),"checkout");function E(t,r,e){const n=t.indexOf(r);-1===n?t.push(e):t.splice(n,1,e)}function k(t){const r=t.reduce(((t,r)=>t.seq>r.seq?t:r),t[0]);let e="";t.forEach((function(t){e+=t===r?"\t*":"\t|"}));const n=[e,r.id,r.seq];for(const t in $.records.branches)$.records.branches.get(t)===r.id&&n.push(t);if(c.Rm.debug(n.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=$.records.commits.get(r.parents[0]);E(t,r,e),r.parents[1]&&t.push($.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=$.records.commits.get(r.parents[0]);E(t,r,e)}}k(t=g(t,(t=>t.id)))}(0,c.K2)(E,"upsert"),(0,c.K2)(k,"prettyPrintCommitHistory");var C=(0,c.K2)((function(){c.Rm.debug($.records.commits),k([R()[0]])}),"prettyPrint"),T=(0,c.K2)((function(){$.reset(),(0,c.IU)()}),"clear"),L=(0,c.K2)((function(){return[...$.records.branchConfig.values()].map(((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)})).sort(((t,r)=>(t.order??0)-(r.order??0))).map((({name:t})=>({name:t})))}),"getBranchesAsObjArray"),K=(0,c.K2)((function(){return $.records.branches}),"getBranches"),M=(0,c.K2)((function(){return $.records.commits}),"getCommits"),R=(0,c.K2)((function(){const t=[...$.records.commits.values()];return t.forEach((function(t){c.Rm.debug(t.id)})),t.sort(((t,r)=>t.seq-r.seq)),t}),"getCommitsArray"),v={commitType:h,getConfig:m,setDirection:y,setOptions:p,getOptions:x,commit:f,branch:u,merge:b,cherryPick:w,checkout:B,prettyPrint:C,clear:T,getBranchesAsObjArray:L,getBranches:K,getCommits:M,getCommitsArray:R,getCurrentBranch:(0,c.K2)((function(){return $.records.currBranch}),"getCurrentBranch"),getDirection:(0,c.K2)((function(){return $.records.direction}),"getDirection"),getHead:(0,c.K2)((function(){return $.records.head}),"getHead"),setAccTitle:c.SV,getAccTitle:c.iN,getAccDescription:c.m7,setAccDescription:c.EI,setDiagramTitle:c.ke,getDiagramTitle:c.ab},P=(0,c.K2)(((t,r)=>{(0,n.S)(t,r),t.dir&&r.setDirection(t.dir);for(const e of t.statements)I(e,r)}),"populate"),I=(0,c.K2)(((t,r)=>{const e={Commit:(0,c.K2)((t=>r.commit(A(t))),"Commit"),Branch:(0,c.K2)((t=>r.branch(G(t))),"Branch"),Merge:(0,c.K2)((t=>r.merge(O(t))),"Merge"),Checkout:(0,c.K2)((t=>r.checkout(q(t))),"Checkout"),CherryPicking:(0,c.K2)((t=>r.cherryPick(z(t))),"CherryPicking")}[t.$type];e?e(t):c.Rm.error(`Unknown statement type: ${t.$type}`)}),"parseStatement"),A=(0,c.K2)((t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?h[t.type]:h.NORMAL,tags:t.tags??void 0})),"parseCommit"),G=(0,c.K2)((t=>({name:t.name,order:t.order??0})),"parseBranch"),O=(0,c.K2)((t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?h[t.type]:void 0,tags:t.tags??void 0})),"parseMerge"),q=(0,c.K2)((t=>t.branch),"parseCheckout"),z=(0,c.K2)((t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent})),"parseCherryPicking"),H={parse:(0,c.K2)((async t=>{const r=await(0,s.qg)("gitGraph",t);c.Rm.debug(r),P(r,v)}),"parse")},S=(0,c.D7)(),D=S?.gitGraph,Y=10,N=40,j=new Map,W=new Map,_=new Map,F=[],U=0,V="LR",J=(0,c.K2)((()=>{j.clear(),W.clear(),_.clear(),U=0,F=[],V="LR"}),"clear"),Q=(0,c.K2)((t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach((t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)})),r}),"drawText"),X=(0,c.K2)((t=>{let r,e,n;return"BT"===V?(e=(0,c.K2)(((t,r)=>t<=r),"comparisonFunc"),n=1/0):(e=(0,c.K2)(((t,r)=>t>=r),"comparisonFunc"),n=0),t.forEach((t=>{const o="TB"===V||"BT"==V?W.get(t)?.y:W.get(t)?.x;void 0!==o&&e(o,n)&&(r=t,n=o)})),r}),"findClosestParent"),Z=(0,c.K2)((t=>{let r="",e=1/0;return t.forEach((t=>{const n=W.get(t).y;n<=e&&(r=t,e=n)})),r||void 0}),"findClosestParentBT"),tt=(0,c.K2)(((t,r,e)=>{let n=e,o=e;const a=[];t.forEach((t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(n=et(e),o=Math.max(n,o)):a.push(e),nt(e,n)})),n=o,a.forEach((t=>{ot(t,n,e)})),t.forEach((t=>{const e=r.get(t);if(e?.parents.length){const t=Z(e.parents);n=W.get(t).y-N,n<=o&&(o=n);const r=j.get(e.branch).pos,a=n-Y;W.set(e.id,{x:r,y:a})}}))}),"setParallelBTPos"),rt=(0,c.K2)((t=>{const r=X(t.parents.filter((t=>null!==t)));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=W.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e}),"findClosestParentPos"),et=(0,c.K2)((t=>rt(t)+N),"calculateCommitPosition"),nt=(0,c.K2)(((t,r)=>{const e=j.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const n=e.pos,o=r+Y;return W.set(t.id,{x:n,y:o}),{x:n,y:o}}),"setCommitPosition"),ot=(0,c.K2)(((t,r,e)=>{const n=j.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const o=r+e,a=n.pos;W.set(t.id,{x:a,y:o})}),"setRootPosition"),at=(0,c.K2)(((t,r,e,n,o,a)=>{if(a===h.HIGHLIGHT)t.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${o%8} ${n}-outer`),t.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${o%8} ${n}-inner`);else if(a===h.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const c=t.append("circle");if(c.attr("cx",e.x),c.attr("cy",e.y),c.attr("r",r.type===h.MERGE?9:10),c.attr("class",`commit ${r.id} commit${o%8}`),a===h.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",6),a.attr("class",`commit ${n} ${r.id} commit${o%8}`)}a===h.REVERSE&&t.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},${e.y-5}`).attr("class",`commit ${n} ${r.id} commit${o%8}`)}}),"drawCommitBullet"),ct=(0,c.K2)(((t,r,e,n)=>{if(r.type!==h.CHERRY_PICK&&(r.customId&&r.type===h.MERGE||r.type!==h.MERGE)&&D?.showCommitLabel){const o=t.append("g"),a=o.insert("rect").attr("class","commit-label-bkg"),c=o.append("text").attr("x",n).attr("y",e.y+25).attr("class","commit-label").text(r.id),s=c.node()?.getBBox();if(s&&(a.attr("x",e.posWithOffset-s.width/2-2).attr("y",e.y+13.5).attr("width",s.width+4).attr("height",s.height+4),"TB"===V||"BT"===V?(a.attr("x",e.x-(s.width+16+5)).attr("y",e.y-12),c.attr("x",e.x-(s.width+16)).attr("y",e.y+s.height-12)):c.attr("x",e.posWithOffset-s.width/2),D.rotateCommitLabel))if("TB"===V||"BT"===V)c.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),a.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(s.width+10)/25*9.5,r=10+s.width/25*8.5;o.attr("transform","translate("+t+", "+r+") rotate(-45, "+n+", "+e.y+")")}}}),"drawCommitLabel"),st=(0,c.K2)(((t,r,e,n)=>{if(r.tags.length>0){let o=0,a=0,c=0;const s=[];for(const n of r.tags.reverse()){const r=t.insert("polygon"),i=t.append("circle"),h=t.append("text").attr("y",e.y-16-o).attr("class","tag-label").text(n),d=h.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),c=Math.max(c,d.height),h.attr("x",e.posWithOffset-d.width/2),s.push({tag:h,hole:i,rect:r,yOffset:o}),o+=20}for(const{tag:t,hole:r,rect:o,yOffset:i}of s){const s=c/2,h=e.y-19.2-i;if(o.attr("class","tag-label-bkg").attr("points",`\n ${n-a/2-2},${h+2} \n ${n-a/2-2},${h-2}\n ${e.posWithOffset-a/2-4},${h-s-2}\n ${e.posWithOffset+a/2+4},${h-s-2}\n ${e.posWithOffset+a/2+4},${h+s+2}\n ${e.posWithOffset-a/2-4},${h+s+2}`),r.attr("cy",h).attr("cx",n-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===V||"BT"===V){const c=n+i;o.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${c+2}\n ${e.x},${c-2}\n ${e.x+Y},${c-s-2}\n ${e.x+Y+a+4},${c-s-2}\n ${e.x+Y+a+4},${c+s+2}\n ${e.x+Y},${c+s+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),r.attr("cx",e.x+2).attr("cy",c).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),t.attr("x",e.x+5).attr("y",c+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+n+")")}}}}),"drawCommitTags"),it=(0,c.K2)((t=>{switch(t.customType??t.type){case h.NORMAL:return"commit-normal";case h.REVERSE:return"commit-reverse";case h.HIGHLIGHT:return"commit-highlight";case h.MERGE:return"commit-merge";case h.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}}),"getCommitClassType"),ht=(0,c.K2)(((t,r,e,n)=>{const o={x:0,y:0};if(!(t.parents.length>0))return"TB"===r?30:"BT"===r?(n.get(t.id)??o).y-N:0;{const e=X(t.parents);if(e){const a=n.get(e)??o;return"TB"===r?a.y+N:"BT"===r?(n.get(t.id)??o).y-N:a.x+N}}return 0}),"calculatePosition"),dt=(0,c.K2)(((t,r,e)=>{const n="BT"===V&&e?r:r+Y,o="TB"===V||"BT"===V?n:j.get(t.branch)?.pos,a="TB"===V||"BT"===V?j.get(t.branch)?.pos:n;if(void 0===a||void 0===o)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:o,posWithOffset:n}}),"getCommitPosition"),mt=(0,c.K2)(((t,r,e)=>{if(!D)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),o=t.append("g").attr("class","commit-labels");let a="TB"===V||"BT"===V?30:0;const s=[...r.keys()],i=D?.parallelCommits??!1,h=(0,c.K2)(((t,e)=>{const n=r.get(t)?.seq,o=r.get(e)?.seq;return void 0!==n&&void 0!==o?n-o:0}),"sortKeys");let d=s.sort(h);"BT"===V&&(i&&tt(d,r,a),d=d.reverse()),d.forEach((t=>{const c=r.get(t);if(!c)throw new Error(`Commit not found for key ${t}`);i&&(a=ht(c,V,a,W));const s=dt(c,a,i);if(e){const t=it(c),r=c.customType??c.type,e=j.get(c.branch)?.index??0;at(n,c,s,t,e,r),ct(o,c,s,a),st(o,c,s,a)}"TB"===V||"BT"===V?W.set(c.id,{x:s.x,y:s.posWithOffset}):W.set(c.id,{x:s.posWithOffset,y:s.y}),a="BT"===V&&i?a+N:a+N+Y,a>U&&(U=a)}))}),"drawCommits"),$t=(0,c.K2)(((t,r,e,n,o)=>{const a=("TB"===V||"BT"===V?e.xt.branch===a),"isOnBranchToGetCurve"),i=(0,c.K2)((e=>e.seq>t.seq&&e.seqi(t)&&s(t)))}),"shouldRerouteArrow"),lt=(0,c.K2)(((t,r,e=0)=>{const n=t+Math.abs(t-r)/2;if(e>5)return n;if(F.every((t=>Math.abs(t-n)>=10)))return F.push(n),n;const o=Math.abs(t-r);return lt(t,r-o/5,e+1)}),"findLane"),gt=(0,c.K2)(((t,r,e,n)=>{const o=W.get(r.id),a=W.get(e.id);if(void 0===o||void 0===a)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=$t(r,e,o,a,n);let s,i="",d="",m=0,$=0,l=j.get(e.branch)?.index;if(e.type===h.MERGE&&r.id!==e.parents[0]&&(l=j.get(r.branch)?.index),c){i="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",m=10,$=10;const t=o.ya.x&&(i="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${d} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${i} ${a.x} ${o.y+$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):"BT"===V?(o.xa.x&&(i="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${i} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):(o.ya.y&&(s=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${d} ${o.x+$} ${a.y} L ${a.x} ${a.y}`),o.y===a.y&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`));if(void 0===s)throw new Error("Line definition not found");t.append("path").attr("d",s).attr("class","arrow arrow"+l%8)}),"drawArrow"),yt=(0,c.K2)(((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach((t=>{const n=r.get(t);n.parents&&n.parents.length>0&&n.parents.forEach((t=>{gt(e,r.get(t),n,r)}))}))}),"drawArrows"),pt=(0,c.K2)(((t,r)=>{const e=t.append("g");r.forEach(((t,r)=>{const n=r%8,o=j.get(t.name)?.pos;if(void 0===o)throw new Error(`Position not found for branch ${t.name}`);const a=e.append("line");a.attr("x1",0),a.attr("y1",o),a.attr("x2",U),a.attr("y2",o),a.attr("class","branch branch"+n),"TB"===V?(a.attr("y1",30),a.attr("x1",o),a.attr("y2",U),a.attr("x2",o)):"BT"===V&&(a.attr("y1",U),a.attr("x1",o),a.attr("y2",30),a.attr("x2",o)),F.push(o);const c=t.name,s=Q(c),i=e.insert("rect"),h=e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);h.node().appendChild(s);const d=s.getBBox();i.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-d.width-4-(!0===D?.rotateCommitLabel?30:0)).attr("y",-d.height/2+8).attr("width",d.width+18).attr("height",d.height+4),h.attr("transform","translate("+(-d.width-14-(!0===D?.rotateCommitLabel?30:0))+", "+(o-d.height/2-1)+")"),"TB"===V?(i.attr("x",o-d.width/2-10).attr("y",0),h.attr("transform","translate("+(o-d.width/2-5)+", 0)")):"BT"===V?(i.attr("x",o-d.width/2-10).attr("y",U),h.attr("transform","translate("+(o-d.width/2-5)+", "+U+")")):i.attr("transform","translate(-19, "+(o-d.height/2)+")")}))}),"drawBranches"),xt=(0,c.K2)((function(t,r,e,n,o){return j.set(t,{pos:r,index:e}),r+(50+(o?40:0)+("TB"===V||"BT"===V?n.width/2:0))}),"setBranchPosition"),ft={parser:H,db:v,renderer:{draw:(0,c.K2)((function(t,r,e,n){if(J(),c.Rm.debug("in gitgraph renderer",t+"\n","id:",r,e),!D)throw new Error("GitGraph config not found");const o=D.rotateCommitLabel??!1,s=n.db;_=s.getCommits();const h=s.getBranchesAsObjArray();V=s.getDirection();const d=(0,i.Ltv)(`[id="${r}"]`);let m=0;h.forEach(((t,r)=>{const e=Q(t.name),n=d.append("g"),a=n.insert("g").attr("class","branchLabel"),c=a.insert("g").attr("class","label branch-label");c.node()?.appendChild(e);const s=e.getBBox();m=xt(t.name,m,r,s,o),c.remove(),a.remove(),n.remove()})),mt(d,_,!1),D.showBranches&&pt(d,h),yt(d,_),mt(d,_,!0),a._K.insertTitle(d,"gitTitleText",D.titleTopMargin??0,s.getDiagramTitle()),(0,c.mj)(void 0,d,D.diagramPadding,D.useMaxWidth)}),"draw")},styles:(0,c.K2)((t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((r=>`\n .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }\n .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }\n .label${r} { fill: ${t["git"+r]}; }\n .arrow${r} { stroke: ${t["git"+r]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/918-70ec2bcb.chunk.min.js b/js/918-70ec2bcb.chunk.min.js deleted file mode 100644 index 3d915aa..0000000 --- a/js/918-70ec2bcb.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[918],{4918:(t,e,a)=>{a.d(e,{diagram:()=>Nt});var n=a(9323),i=a(7323),r=a(798),s=a(4852),l=a(6750),o=function(){var t=(0,r.K2)((function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a}),"o"),e=[1,24],a=[1,25],n=[1,26],i=[1,27],s=[1,28],l=[1,63],o=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],g=[1,29],f=[1,30],b=[1,31],x=[1,32],_=[1,33],m=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],k=[1,40],O=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],I=[1,50],M=[1,51],j=[1,52],K=[1,53],L=[1,54],Y=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],W=[1,60],Q=[14,42],$=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[1,82],V=[1,83],G=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],at=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:(0,r.K2)((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,r.K2)((function(t,e,a,n,i,r,s){var l=r.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(r[l-3]);break;case 19:n.setTitle(r[l].substring(6)),this.$=r[l].substring(6);break;case 20:n.setAccDescription(r[l].substring(15)),this.$=r[l].substring(15);break;case 21:this.$=r[l].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[l].trim(),n.setAccDescription(this.$);break;case 28:r[l].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 29:r[l].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 30:n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 31:r[l].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[l]),this.$=r[l];break;case 32:n.addDeploymentNode("node",...r[l]),this.$=r[l];break;case 33:n.addDeploymentNode("nodeL",...r[l]),this.$=r[l];break;case 34:n.addDeploymentNode("nodeR",...r[l]),this.$=r[l];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[l]),this.$=r[l];break;case 40:n.addPersonOrSystem("external_person",...r[l]),this.$=r[l];break;case 41:n.addPersonOrSystem("system",...r[l]),this.$=r[l];break;case 42:n.addPersonOrSystem("system_db",...r[l]),this.$=r[l];break;case 43:n.addPersonOrSystem("system_queue",...r[l]),this.$=r[l];break;case 44:n.addPersonOrSystem("external_system",...r[l]),this.$=r[l];break;case 45:n.addPersonOrSystem("external_system_db",...r[l]),this.$=r[l];break;case 46:n.addPersonOrSystem("external_system_queue",...r[l]),this.$=r[l];break;case 47:n.addContainer("container",...r[l]),this.$=r[l];break;case 48:n.addContainer("container_db",...r[l]),this.$=r[l];break;case 49:n.addContainer("container_queue",...r[l]),this.$=r[l];break;case 50:n.addContainer("external_container",...r[l]),this.$=r[l];break;case 51:n.addContainer("external_container_db",...r[l]),this.$=r[l];break;case 52:n.addContainer("external_container_queue",...r[l]),this.$=r[l];break;case 53:n.addComponent("component",...r[l]),this.$=r[l];break;case 54:n.addComponent("component_db",...r[l]),this.$=r[l];break;case 55:n.addComponent("component_queue",...r[l]),this.$=r[l];break;case 56:n.addComponent("external_component",...r[l]),this.$=r[l];break;case 57:n.addComponent("external_component_db",...r[l]),this.$=r[l];break;case 58:n.addComponent("external_component_queue",...r[l]),this.$=r[l];break;case 60:n.addRel("rel",...r[l]),this.$=r[l];break;case 61:n.addRel("birel",...r[l]),this.$=r[l];break;case 62:n.addRel("rel_u",...r[l]),this.$=r[l];break;case 63:n.addRel("rel_d",...r[l]),this.$=r[l];break;case 64:n.addRel("rel_l",...r[l]),this.$=r[l];break;case 65:n.addRel("rel_r",...r[l]),this.$=r[l];break;case 66:n.addRel("rel_b",...r[l]),this.$=r[l];break;case 67:r[l].splice(0,1),n.addRel("rel",...r[l]),this.$=r[l];break;case 68:n.updateElStyle("update_el_style",...r[l]),this.$=r[l];break;case 69:n.updateRelStyle("update_rel_style",...r[l]),this.$=r[l];break;case 70:n.updateLayoutConfig("update_layout_config",...r[l]),this.$=r[l];break;case 71:this.$=[r[l]];break;case 72:r[l].unshift(r[l-1]),this.$=r[l];break;case 73:case 75:this.$=r[l].trim();break;case 74:let t={};t[r[l-1].trim()]=r[l].trim(),this.$=t;break;case 76:this.$=""}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:70,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:71,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:72,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:73,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(Q,[2,14]),t($,[2,16],{12:[1,76]}),t(Q,[2,36],{12:[1,77]}),t(H,[2,19]),t(H,[2,20]),{25:[1,78]},{27:[1,79]},t(H,[2,23]),{35:80,75:81,76:q,77:V,79:G,80:J},{35:86,75:81,76:q,77:V,79:G,80:J},{35:87,75:81,76:q,77:V,79:G,80:J},{35:88,75:81,76:q,77:V,79:G,80:J},{35:89,75:81,76:q,77:V,79:G,80:J},{35:90,75:81,76:q,77:V,79:G,80:J},{35:91,75:81,76:q,77:V,79:G,80:J},{35:92,75:81,76:q,77:V,79:G,80:J},{35:93,75:81,76:q,77:V,79:G,80:J},{35:94,75:81,76:q,77:V,79:G,80:J},{35:95,75:81,76:q,77:V,79:G,80:J},{35:96,75:81,76:q,77:V,79:G,80:J},{35:97,75:81,76:q,77:V,79:G,80:J},{35:98,75:81,76:q,77:V,79:G,80:J},{35:99,75:81,76:q,77:V,79:G,80:J},{35:100,75:81,76:q,77:V,79:G,80:J},{35:101,75:81,76:q,77:V,79:G,80:J},{35:102,75:81,76:q,77:V,79:G,80:J},{35:103,75:81,76:q,77:V,79:G,80:J},{35:104,75:81,76:q,77:V,79:G,80:J},t(Z,[2,59]),{35:105,75:81,76:q,77:V,79:G,80:J},{35:106,75:81,76:q,77:V,79:G,80:J},{35:107,75:81,76:q,77:V,79:G,80:J},{35:108,75:81,76:q,77:V,79:G,80:J},{35:109,75:81,76:q,77:V,79:G,80:J},{35:110,75:81,76:q,77:V,79:G,80:J},{35:111,75:81,76:q,77:V,79:G,80:J},{35:112,75:81,76:q,77:V,79:G,80:J},{35:113,75:81,76:q,77:V,79:G,80:J},{35:114,75:81,76:q,77:V,79:G,80:J},{35:115,75:81,76:q,77:V,79:G,80:J},{20:116,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{12:[1,118],33:[1,117]},{35:119,75:81,76:q,77:V,79:G,80:J},{35:120,75:81,76:q,77:V,79:G,80:J},{35:121,75:81,76:q,77:V,79:G,80:J},{35:122,75:81,76:q,77:V,79:G,80:J},{35:123,75:81,76:q,77:V,79:G,80:J},{35:124,75:81,76:q,77:V,79:G,80:J},{35:125,75:81,76:q,77:V,79:G,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t($,[2,17],{21:22,19:130,22:e,23:a,24:n,26:i,28:s}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:n,26:i,28:s,34:l,36:o,37:h,38:d,39:u,40:p,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(H,[2,21]),t(H,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:q,77:V,79:G,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t($,[2,18]),t(Q,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,r.K2)((function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)}),"parseError"),parse:(0,r.K2)((function(t){var e=this,a=[0],n=[],i=[null],s=[],l=this.table,o="",c=0,h=0,d=0,u=s.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;s.push(f);var b=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=n.pop()||p.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)((function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t}),"popStack"),(0,r.K2)(x,"lex");for(var _,m,E,S,A,C,w,k,O,T={};;){if(E=a[a.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=x()),S=l[E]&&l[E][_]),void 0===S||!S.length||!S[0]){var v;for(C in O=[],l[E])this.terminals_[C]&&C>2&&O.push("'"+this.terminals_[C]+"'");v=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:f,expected:O})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:a.push(_),i.push(p.yytext),s.push(p.yylloc),a.push(S[1]),_=null,m?(_=m,m=null):(h=p.yyleng,o=p.yytext,c=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(w=this.productions_[S[1]][1],T.$=i[i.length-w],T._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},b&&(T._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(A=this.performAction.apply(T,[o,h,c,y.yy,S[1],i,s].concat(u))))return A;w&&(a=a.slice(0,-1*w*2),i=i.slice(0,-1*w),s=s.slice(0,-1*w)),a.push(this.productions_[S[1]][0]),i.push(T.$),s.push(T._$),k=l[a[a.length-2]][a[a.length-1]],a.push(k);break;case 3:return!0}}return!0}),"parse")},rt=function(){return{EOF:1,parseError:(0,r.K2)((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:(0,r.K2)((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,r.K2)((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:(0,r.K2)((function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,r.K2)((function(){return this._more=!0,this}),"more"),reject:(0,r.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,r.K2)((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:(0,r.K2)((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,r.K2)((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,r.K2)((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:(0,r.K2)((function(t,e){var a,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1}),"test_match"),next:(0,r.K2)((function(){if(this.done)return this.EOF;var t,e,a,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;re[0].length)){if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,r.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,r.K2)((function(t){this.conditionStack.push(t)}),"begin"),popState:(0,r.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,r.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,r.K2)((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:(0,r.K2)((function(t){this.begin(t)}),"pushState"),stateStackSize:(0,r.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:(0,r.K2)((function(t,e,a,n){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}}),"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function st(){this.yy={}}return it.lexer=rt,(0,r.K2)(st,"Parser"),st.prototype=it,it.Parser=st,new st}();o.parser=o;var h,d=o,u=[],p=[""],y="global",g="",f=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],b=[],x="",_=!1,m=4,E=2,S=(0,r.K2)((function(){return h}),"getC4Type"),A=(0,r.K2)((function(t){let e=(0,r.jZ)(t,(0,r.D7)());h=e}),"setC4Type"),C=(0,r.K2)((function(t,e,a,n,i,r,s,l,o){if(null==t||null==e||null==a||null==n)return;let c={};const h=b.find((t=>t.from===e&&t.to===a));if(h?c=h:b.push(c),c.type=t,c.from=e,c.to=a,c.label={text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=$()}),"addRel"),w=(0,r.K2)((function(t,e,a,n,i,r,s){if(null===e||null===a)return;let l={};const o=u.find((t=>t.alias===e));if(o&&e===o.alias?l=o:(l.alias=e,u.push(l)),l.label=null==a?{text:""}:{text:a},null==n)l.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.tags=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=y,l.wrap=$()}),"addPersonOrSystem"),k=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y}),"addContainer"),O=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y}),"addComponent"),T=(0,r.K2)((function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=f.find((e=>e.alias===t));if(s&&t===s.alias?r=s:(r.alias=t,f.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"system"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),g=y,y=t,p.push(g)}),"addPersonOrSystemBoundary"),v=(0,r.K2)((function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=f.find((e=>e.alias===t));if(s&&t===s.alias?r=s:(r.alias=t,f.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"container"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),g=y,y=t,p.push(g)}),"addContainerBoundary"),R=(0,r.K2)((function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=f.find((t=>t.alias===e));if(c&&e===c.alias?o=c:(o.alias=e,f.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.type={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=y,o.wrap=$(),g=y,y=e,p.push(g)}),"addDeploymentNode"),D=(0,r.K2)((function(){y=g,p.pop(),g=p.pop(),p.push(g)}),"popBoundaryParseStack"),N=(0,r.K2)((function(t,e,a,n,i,r,s,l,o,c,h){let d=u.find((t=>t.alias===e));if(void 0!==d||(d=f.find((t=>t.alias===e)),void 0!==d)){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.bgColor=a;if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.fontColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.borderColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.shadowing=r;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shape=s;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}}),"updateElStyle"),P=(0,r.K2)((function(t,e,a,n,i,r,s){const l=b.find((t=>t.from===e&&t.to===a));if(void 0!==l){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]=e}else l.textColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(r);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(s)}}),"updateRelStyle"),B=(0,r.K2)((function(t,e,a){let n=m,i=E;if("object"==typeof e){const t=Object.values(e)[0];n=parseInt(t)}else n=parseInt(e);if("object"==typeof a){const t=Object.values(a)[0];i=parseInt(t)}else i=parseInt(a);n>=1&&(m=n),i>=1&&(E=i)}),"updateLayoutConfig"),I=(0,r.K2)((function(){return m}),"getC4ShapeInRow"),M=(0,r.K2)((function(){return E}),"getC4BoundaryInRow"),j=(0,r.K2)((function(){return y}),"getCurrentBoundaryParse"),K=(0,r.K2)((function(){return g}),"getParentBoundaryParse"),L=(0,r.K2)((function(t){return null==t?u:u.filter((e=>e.parentBoundary===t))}),"getC4ShapeArray"),Y=(0,r.K2)((function(t){return u.find((e=>e.alias===t))}),"getC4Shape"),U=(0,r.K2)((function(t){return Object.keys(L(t))}),"getC4ShapeKeys"),F=(0,r.K2)((function(t){return null==t?f:f.filter((e=>e.parentBoundary===t))}),"getBoundaries"),X=F,z=(0,r.K2)((function(){return b}),"getRels"),W=(0,r.K2)((function(){return x}),"getTitle"),Q=(0,r.K2)((function(t){_=t}),"setWrap"),$=(0,r.K2)((function(){return _}),"autoWrap"),H=(0,r.K2)((function(){u=[],f=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],g="",y="global",p=[""],b=[],p=[""],x="",_=!1,m=4,E=2}),"clear"),q=(0,r.K2)((function(t){let e=(0,r.jZ)(t,(0,r.D7)());x=e}),"setTitle"),V={addPersonOrSystem:w,addPersonOrSystemBoundary:T,addContainer:k,addContainerBoundary:v,addComponent:O,addDeploymentNode:R,popBoundaryParseStack:D,addRel:C,updateElStyle:N,updateRelStyle:P,updateLayoutConfig:B,autoWrap:$,setWrap:Q,getC4ShapeArray:L,getC4Shape:Y,getC4ShapeKeys:U,getBoundaries:F,getBoundarys:X,getCurrentBoundaryParse:j,getParentBoundaryParse:K,getRels:z,getTitle:W,getC4Type:S,getC4ShapeInRow:I,getC4BoundaryInRow:M,setAccTitle:r.SV,getAccTitle:r.iN,getAccDescription:r.m7,setAccDescription:r.EI,getConfig:(0,r.K2)((()=>(0,r.D7)().c4),"getConfig"),clear:H,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:q,setC4Type:A},G=(0,r.K2)((function(t,e){return(0,n.tk)(t,e)}),"drawRect"),J=(0,r.K2)((function(t,e,a,n,i,r){const s=t.append("image");s.attr("width",e),s.attr("height",a),s.attr("x",n),s.attr("y",i);let o=r.startsWith("data:image/png;base64")?r:(0,l.J)(r);s.attr("xlink:href",o)}),"drawImage"),Z=(0,r.K2)(((t,e,a)=>{const n=t.append("g");let i=0;for(let t of e){let e=t.textColor?t.textColor:"#444444",r=t.lineColor?t.lineColor:"#444444",s=t.offsetX?parseInt(t.offsetX):0,l=t.offsetY?parseInt(t.offsetY):0,o="";if(0===i){let e=n.append("line");e.attr("x1",t.startPoint.x),e.attr("y1",t.startPoint.y),e.attr("x2",t.endPoint.x),e.attr("y2",t.endPoint.y),e.attr("stroke-width","1"),e.attr("stroke",r),e.style("fill","none"),"rel_b"!==t.type&&e.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+o+"#arrowend)"),i=-1}else{let e=n.append("path");e.attr("fill","none").attr("stroke-width","1").attr("stroke",r).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",t.startPoint.x).replaceAll("starty",t.startPoint.y).replaceAll("controlx",t.startPoint.x+(t.endPoint.x-t.startPoint.x)/2-(t.endPoint.x-t.startPoint.x)/4).replaceAll("controly",t.startPoint.y+(t.endPoint.y-t.startPoint.y)/2).replaceAll("stopx",t.endPoint.x).replaceAll("stopy",t.endPoint.y)),"rel_b"!==t.type&&e.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==t.type&&"rel_b"!==t.type||e.attr("marker-start","url("+o+"#arrowend)")}let c=a.messageFont();dt(a)(t.label.text,n,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+l,t.label.width,t.label.height,{fill:e},c),t.techn&&""!==t.techn.text&&(c=a.messageFont(),dt(a)("["+t.techn.text+"]",n,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+a.messageFontSize+5+l,Math.max(t.label.width,t.techn.width),t.techn.height,{fill:e,"font-style":"italic"},c))}}),"drawRels"),tt=(0,r.K2)((function(t,e,a){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",r=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:r,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};G(n,o);let c=a.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=s,dt(a)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=a.boundaryFont(),c.fontColor=s,dt(a)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=a.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=s,dt(a)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))}),"drawBoundary"),et=(0,r.K2)((function(t,e,a){let i=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const o=t.append("g");o.attr("class","person-man");const c=(0,n.PB)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=e.x,c.y=e.y,c.fill=i,c.width=e.width,c.height=e.height,c.stroke=r,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},G(o,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let h=ht(a,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":J(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,l)}let d=a[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,dt(a)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=a[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.techn&&""!==e.techn?.text?dt(a)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&""!==e.type.text&&dt(a)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&""!==e.descr.text&&(d=a.personFont(),d.fontColor=s,dt(a)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height}),"drawC4Shape"),at=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")}),"insertDatabaseIcon"),nt=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")}),"insertComputerIcon"),it=(0,r.K2)((function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")}),"insertClockIcon"),rt=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")}),"insertArrowHead"),st=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")}),"insertArrowEnd"),lt=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).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")}),"insertArrowFilledHead"),ot=(0,r.K2)((function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)}),"insertDynamicNumber"),ct=(0,r.K2)((function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")}),"insertArrowCrossHead"),ht=(0,r.K2)(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"getC4ShapeFont"),dt=function(){function t(t,e,a,i,r,s,l){n(e.append("text").attr("x",a+r/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,a,i,s,l,o,c){const{fontSize:h,fontFamily:d,fontWeight:u}=c,p=t.split(r.Y2.lineBreakRegex);for(let t=0;t=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>gt)&&(e=this.nextData.startx+t.margin+bt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},_t(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},_t=(0,r.K2)((function(t){(0,r.hH)(bt,t),t.fontFamily&&(bt.personFontFamily=bt.systemFontFamily=bt.messageFontFamily=t.fontFamily),t.fontSize&&(bt.personFontSize=bt.systemFontSize=bt.messageFontSize=t.fontSize),t.fontWeight&&(bt.personFontWeight=bt.systemFontWeight=bt.messageFontWeight=t.fontWeight)}),"setConf"),mt=(0,r.K2)(((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]})),"c4ShapeFont"),Et=(0,r.K2)((t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight})),"boundaryFont"),St=(0,r.K2)((t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight})),"messageFont");function At(t,e,a,n,s){if(!e[t].width)if(a)e[t].text=(0,i.bH)(e[t].text,s,n),e[t].textLines=e[t].text.split(r.Y2.lineBreakRegex).length,e[t].width=s,e[t].height=(0,i.ru)(e[t].text,n);else{let a=e[t].text.split(r.Y2.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(const r of a)e[t].width=Math.max((0,i.Un)(r,n),e[t].width),s=(0,i.ru)(r,n),e[t].height=e[t].height+s}}(0,r.K2)(At,"calcC4ShapeTextWH");var Ct=(0,r.K2)((function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=bt.c4ShapeMargin-35;let n=e.wrap&&bt.wrap,r=Et(bt);r.fontSize=r.fontSize+2,r.fontWeight="bold",At("label",e,n,r,(0,i.Un)(e.label.text,r)),ut.drawBoundary(t,e,bt)}),"drawBoundary"),wt=(0,r.K2)((function(t,e,a,n){let r=0;for(const s of n){r=0;const n=a[s];let l=mt(bt,n.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,n.typeC4Shape.width=(0,i.Un)("«"+n.typeC4Shape.text+"»",l),n.typeC4Shape.height=l.fontSize+2,n.typeC4Shape.Y=bt.c4ShapePadding,r=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height);let o=n.wrap&&bt.wrap,c=bt.width-2*bt.c4ShapePadding,h=mt(bt,n.typeC4Shape.text);h.fontSize=h.fontSize+2,h.fontWeight="bold",At("label",n,o,h,c),n.label.Y=r+8,r=n.label.Y+n.label.height,n.type&&""!==n.type.text?(n.type.text="["+n.type.text+"]",At("type",n,o,mt(bt,n.typeC4Shape.text),c),n.type.Y=r+5,r=n.type.Y+n.type.height):n.techn&&""!==n.techn.text&&(n.techn.text="["+n.techn.text+"]",At("techn",n,o,mt(bt,n.techn.text),c),n.techn.Y=r+5,r=n.techn.Y+n.techn.height);let d=r,u=n.label.width;n.descr&&""!==n.descr.text&&(At("descr",n,o,mt(bt,n.typeC4Shape.text),c),n.descr.Y=r+20,r=n.descr.Y+n.descr.height,u=Math.max(n.label.width,n.descr.width),d=r-5*n.descr.textLines),u+=bt.c4ShapePadding,n.width=Math.max(n.width||bt.width,u,bt.width),n.height=Math.max(n.height||bt.height,d,bt.height),n.margin=n.margin||bt.c4ShapeMargin,t.insert(n),ut.drawC4Shape(e,n,bt)}t.bumpLastMargin(bt.c4ShapeMargin)}),"drawC4ShapeArray"),kt=class{static{(0,r.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Ot=(0,r.K2)((function(t,e){let a=t.x,n=t.y,i=e.x,r=e.y,s=a+t.width/2,l=n+t.height/2,o=Math.abs(a-i),c=Math.abs(n-r),h=c/o,d=t.height/t.width,u=null;return n==r&&ai?u=new kt(a,l):a==i&&nr&&(u=new kt(s,n)),a>i&&n=h?new kt(a,l+h*t.width/2):new kt(s-o/c*t.height/2,n+t.height):a=h?new kt(a+t.width,l+h*t.width/2):new kt(s+o/c*t.height/2,n+t.height):ar?u=d>=h?new kt(a+t.width,l-h*t.width/2):new kt(s+t.height/2*o/c,n):a>i&&n>r&&(u=d>=h?new kt(a,l-t.width/2*h):new kt(s-t.height/2*o/c,n)),u}),"getIntersectPoint"),Tt=(0,r.K2)((function(t,e){let a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;let n=Ot(t,a);return a.x=t.x+t.width/2,a.y=t.y+t.height/2,{startPoint:n,endPoint:Ot(e,a)}}),"getIntersectPoints"),vt=(0,r.K2)((function(t,e,a,n){let r=0;for(let t of e){r+=1;let e=t.wrap&&bt.wrap,s=St(bt);"C4Dynamic"===n.db.getC4Type()&&(t.label.text=r+": "+t.label.text);let l=(0,i.Un)(t.label.text,s);At("label",t,e,s,l),t.techn&&""!==t.techn.text&&(l=(0,i.Un)(t.techn.text,s),At("techn",t,e,s,l)),t.descr&&""!==t.descr.text&&(l=(0,i.Un)(t.descr.text,s),At("descr",t,e,s,l));let o=a(t.from),c=a(t.to),h=Tt(o,c);t.startPoint=h.startPoint,t.endPoint=h.endPoint}ut.drawRels(t,e,bt)}),"drawRels");function Rt(t,e,a,n,i){let r=new xt(i);r.data.widthLimit=a.data.widthLimit/Math.min(ft,n.length);for(let[s,l]of n.entries()){let n=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=n,n=l.image.Y+l.image.height);let o=l.wrap&&bt.wrap,c=Et(bt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",At("label",l,o,c,r.data.widthLimit),l.label.Y=n+8,n=l.label.Y+l.label.height,l.type&&""!==l.type.text&&(l.type.text="["+l.type.text+"]",At("type",l,o,Et(bt),r.data.widthLimit),l.type.Y=n+5,n=l.type.Y+l.type.height),l.descr&&""!==l.descr.text){let t=Et(bt);t.fontSize=t.fontSize-2,At("descr",l,o,t,r.data.widthLimit),l.descr.Y=n+20,n=l.descr.Y+l.descr.height}if(0==s||s%ft==0){let t=a.data.startx+bt.diagramMarginX,e=a.data.stopy+bt.diagramMarginY+n;r.setData(t,t,e,e)}else{let t=r.data.stopx!==r.data.startx?r.data.stopx+bt.diagramMarginX:r.data.startx,e=r.data.starty;r.setData(t,t,e,e)}r.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&wt(r,t,h,d),e=l.alias;let u=i.db.getBoundarys(e);u.length>0&&Rt(t,e,r,u,i),"global"!==l.alias&&Ct(t,l,r),a.data.stopy=Math.max(r.data.stopy+bt.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(r.data.stopx+bt.c4ShapeMargin,a.data.stopx),pt=Math.max(pt,a.data.stopx),yt=Math.max(yt,a.data.stopy)}}(0,r.K2)(Rt,"drawInsideBoundary");var Dt={drawPersonOrSystemArray:wt,drawBoundary:Ct,setConf:_t,draw:(0,r.K2)((function(t,e,a,n){bt=(0,r.D7)().c4;const i=(0,r.D7)().securityLevel;let l;"sandbox"===i&&(l=(0,s.Ltv)("#i"+e));const o="sandbox"===i?(0,s.Ltv)(l.nodes()[0].contentDocument.body):(0,s.Ltv)("body");let c=n.db;n.db.setWrap(bt.wrap),gt=c.getC4ShapeInRow(),ft=c.getC4BoundaryInRow(),r.Rm.debug(`C:${JSON.stringify(bt,null,2)}`);const h="sandbox"===i?o.select(`[id="${e}"]`):(0,s.Ltv)(`[id="${e}"]`);ut.insertComputerIcon(h),ut.insertDatabaseIcon(h),ut.insertClockIcon(h);let d=new xt(n);d.setData(bt.diagramMarginX,bt.diagramMarginX,bt.diagramMarginY,bt.diagramMarginY),d.data.widthLimit=screen.availWidth,pt=bt.diagramMarginX,yt=bt.diagramMarginY;const u=n.db.getTitle();Rt(h,"",d,n.db.getBoundarys(""),n),ut.insertArrowHead(h),ut.insertArrowEnd(h),ut.insertArrowCrossHead(h),ut.insertArrowFilledHead(h),vt(h,n.db.getRels(),n.db.getC4Shape,n),d.data.stopx=pt,d.data.stopy=yt;const p=d.data;let y=p.stopy-p.starty+2*bt.diagramMarginY;const g=p.stopx-p.startx+2*bt.diagramMarginX;u&&h.append("text").text(u).attr("x",(p.stopx-p.startx)/2-4*bt.diagramMarginX).attr("y",p.starty+bt.diagramMarginY),(0,r.a$)(h,y,g,bt.useMaxWidth);const f=u?60:0;h.attr("viewBox",p.startx-bt.diagramMarginX+" -"+(bt.diagramMarginY+f)+" "+g+" "+(y+f)),r.Rm.debug("models:",p)}),"draw")},Nt={parser:d,db:V,renderer:Dt,styles:(0,r.K2)((t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`),"getStyles"),init:(0,r.K2)((({c4:t,wrap:e})=>{Dt.setConf(t),V.setWrap(e)}),"init")}},9323:(t,e,a)=>{a.d(e,{CP:()=>c,HT:()=>d,PB:()=>h,aC:()=>o,lC:()=>s,m:()=>l,tk:()=>r});var n=a(798),i=a(6750),r=(0,n.K2)(((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a}),"drawRect"),s=(0,n.K2)(((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};r(t,a).lower()}),"drawBackgroundRect"),l=(0,n.K2)(((t,e)=>{const a=e.text.replace(n.H1," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(a),i}),"drawText"),o=(0,n.K2)(((t,e,a,n)=>{const r=t.append("image");r.attr("x",e),r.attr("y",a);const s=(0,i.J)(n);r.attr("xlink:href",s)}),"drawImage"),c=(0,n.K2)(((t,e,a,n)=>{const r=t.append("use");r.attr("x",e),r.attr("y",a);const s=(0,i.J)(n);r.attr("xlink:href",`#${s}`)}),"drawEmbeddedImage"),h=(0,n.K2)((()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0})),"getNoteRect"),d=(0,n.K2)((()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0})),"getTextObj")}}]); \ No newline at end of file diff --git a/js/932-3e97de09.chunk.min.js b/js/932-3e97de09.chunk.min.js new file mode 100644 index 0000000..e9677a3 --- /dev/null +++ b/js/932-3e97de09.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[932],{1932:(e,r,a)=>{a.d(r,{diagram:()=>k});var t=a(1003),s=(a(4868),a(5388),a(3256),a(8568),a(7750),a(2382),a(5522),a(32)),k={parser:t.Zk,db:t.iP,renderer:t.q7,styles:t.tM,init:(0,s.K2)((e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute,t.iP.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/959-64fbcd17.chunk.min.js b/js/959-64fbcd17.chunk.min.js deleted file mode 100644 index 07596d6..0000000 --- a/js/959-64fbcd17.chunk.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[959],{6959:(e,c,k)=>{k.d(c,{createPacketServices:()=>s.$});var s=k(9222);k(8546)}}]); \ No newline at end of file diff --git a/js/991-6e5a46d1.chunk.min.js b/js/991-6e5a46d1.chunk.min.js deleted file mode 100644 index 81e15db..0000000 --- a/js/991-6e5a46d1.chunk.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 991-6e5a46d1.chunk.min.js.LICENSE.txt */ -(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[991],{7799:function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i},function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n,r=this.getChild().getNodes(),i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},m.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},m.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1)for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(c.WORLD_CENTER_X-o.x/2,c.WORLD_CENTER_Y-o.y/2))},m.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);m.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var y=v[0];v.splice(0,1);var b=c.indexOf(y);b>=0&&c.splice(b,1),g--,h--}d=null!=t?(c.indexOf(v[0])+1)%g:0;for(var x=Math.abs(r-n)/h,w=d;p!=h;w=++w%g){var E=c[w].getOtherEnd(e);if(E!=t){var _=(n+p*x)%360,T=(_+x)%360;m.branchRadialLayout(E,e,_,T,i+a,a),p++}}},m.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},m.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},m.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r="DummyCompound_"+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},m.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach((function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)}))},m.prototype.getToBeTiled=function(e){var t=e.id;if(null!=this.toBeTiled[t])return this.toBeTiled[t];var n=e.getChild();if(null==n)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(null!=a.getChild()){if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}else this.toBeTiled[a.id]=!1}return this.toBeTiled[t]=!0,!0},m.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rl&&(l=c.rect.height)}n+=l+e.verticalPadding}},m.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach((function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height}))},m.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort((function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:e.rect.width*e.rect.height0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},m.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},m.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a,o,s=0;return e.rowHeight[r]0&&(s=n+e.verticalPadding-e.rowHeight[r]),a=e.width-i>=t+e.horizontalPadding?(e.height+s)/(i+t+e.horizontalPadding):(e.height+s)/e.width,s=n+e.verticalPadding,(o=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var c=i;c<=a;c++)l[0]+=this.grid[c][o-1].length+this.grid[c][o].length-1;if(a0)for(c=o;c<=s;c++)l[3]+=this.grid[i-1][c].length+this.grid[i][c].length-1;for(var h,d,p=g.MAX_VALUE,f=0;f0&&(o=n.getGraphManager().add(n.newGraph(),a),this.processChildrenList(o,h,n))}},h.prototype.stop=function(){return this.stopped=!0,this};var p=function(e){e("layout","cose-bilkent",h)};"undefined"!=typeof cytoscape&&p(cytoscape),e.exports=p}])},e.exports=r(n(7799))},3143:function(e){var t;t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o},function(e,t,n){"use strict";e.exports=function(e){this.vGraphObject=e}},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),l=n(4);function u(e,t,n,o){null==n&&null==o&&(o=t),r.call(this,o),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,this.rect=null!=n&&null!=t?new a(t.x,t.y,n.width,n.height):new a}for(var c in u.prototype=Object.create(r.prototype),r)u[c]=r[c];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach((function(r){if(r.target==e){if(r.source!=n)throw"Incorrect edge source!";t.push(r)}})),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach((function(r){if(r.source!=n&&r.target!=n)throw"Incorrect edge source and/or target";r.target!=e&&r.source!=e||t.push(r)})),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach((function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw"Incorrect incidency!";e.add(n.source)}})),e},u.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),n=0;nt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},e.exports=u},function(e,t,n){"use strict";function r(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),c=n(12),h=n(11);function d(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,null!=t&&t instanceof o?this.graphManager=t:null!=t&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in d.prototype=Object.create(r.prototype),r)d[p]=r[p];d.prototype.getNodes=function(){return this.nodes},d.prototype.getEdges=function(){return this.edges},d.prototype.getGraphManager=function(){return this.graphManager},d.prototype.getParent=function(){return this.parent},d.prototype.getLeft=function(){return this.left},d.prototype.getRight=function(){return this.right},d.prototype.getTop=function(){return this.top},d.prototype.getBottom=function(){return this.bottom},d.prototype.isConnected=function(){return this.isConnected},d.prototype.add=function(e,t,n){if(null==t&&null==n){var r=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(t.owner!=n.owner||t.owner!=this)throw"Both owners must be this graph!";return t.owner!=n.owner?null:(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i)},d.prototype.remove=function(e){var t=e;if(e instanceof s){if(null==t)throw"Node is null!";if(null==t.owner||t.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=t.edges.slice(),r=n.length,i=0;i-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(a.source.edges.splice(u,1),a.target!=a.source&&a.target.edges.splice(c,1),-1==(o=a.source.owner.getEdges().indexOf(a)))throw"Not in owner's edge list!";a.source.owner.getEdges().splice(o,1)}},d.prototype.updateLeftTop=function(){for(var e,t,n,r=i.MAX_VALUE,a=i.MAX_VALUE,o=this.getNodes(),s=o.length,l=0;l(e=u.getTop())&&(r=e),a>(t=u.getLeft())&&(a=t)}return r==i.MAX_VALUE?null:(n=null!=o[0].getParent().paddingLeft?o[0].getParent().paddingLeft:this.margin,this.left=a-n,this.top=r-n,new c(this.left,this.top))},d.prototype.updateBounds=function(e){for(var t,n,r,a,o,s=i.MAX_VALUE,l=-i.MAX_VALUE,c=i.MAX_VALUE,h=-i.MAX_VALUE,d=this.nodes,p=d.length,g=0;g(t=f.getLeft())&&(s=t),l<(n=f.getRight())&&(l=n),c>(r=f.getTop())&&(c=r),h<(a=f.getBottom())&&(h=a)}var v=new u(s,c,l-s,h-c);s==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),o=null!=d[0].getParent().paddingLeft?d[0].getParent().paddingLeft:this.margin,this.left=v.x-o,this.right=v.x+v.width+o,this.top=v.y-o,this.bottom=v.y+v.height+o},d.calculateBounds=function(e){for(var t,n,r,a,o=i.MAX_VALUE,s=-i.MAX_VALUE,l=i.MAX_VALUE,c=-i.MAX_VALUE,h=e.length,d=0;d(t=p.getLeft())&&(o=t),s<(n=p.getRight())&&(s=n),l>(r=p.getTop())&&(l=r),c<(a=p.getBottom())&&(c=a)}return new u(o,l,s-o,c-l)},d.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},d.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw"assert failed";return this.estimatedSize},d.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r=this.nodes.length){var l=0;i.forEach((function(t){t.owner==e&&l++})),l==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},e.exports=d},function(e,t,n){"use strict";var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(null==n&&null==r&&null==i){if(null==e)throw"Graph is null!";if(null==t)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),null!=e.parent)throw"Already has a parent!";if(null!=t.child)throw"Already has a child!";return e.parent=t,t.child=e,e}i=n,n=e;var a=(r=t).getOwner(),o=i.getOwner();if(null==a||a.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==o||o.getGraphManager()!=this)throw"Target not in this graph mgr!";if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw"Graph not in this graph mgr";if(t!=this.rootGraph&&(null==t.parent||t.parent.graphManager!=this))throw"Invalid parent node!";for(var n,a=[],o=(a=a.concat(t.getEdges())).length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(ia)return n[0]=s,n[1]=i,n[2]=y,n[3]=o,!1;if(ra?(n[0]=c,n[1]=h,_=!0):(n[0]=u,n[1]=l,_=!0):D===N&&(r>a?(n[0]=s,n[1]=l,_=!0):(n[0]=d,n[1]=h,_=!0)),-C===N?a>r?(n[2]=m,n[3]=b,T=!0):(n[2]=y,n[3]=v,T=!0):C===N&&(a>r?(n[2]=f,n[3]=v,T=!0):(n[2]=x,n[3]=b,T=!0)),_&&T)return!1;if(r>a?i>o?(A=this.getCardinalDirection(D,N,4),k=this.getCardinalDirection(C,N,2)):(A=this.getCardinalDirection(-D,N,3),k=this.getCardinalDirection(-C,N,1)):i>o?(A=this.getCardinalDirection(-D,N,1),k=this.getCardinalDirection(-C,N,3)):(A=this.getCardinalDirection(D,N,2),k=this.getCardinalDirection(C,N,4)),!_)switch(A){case 1:S=l,L=r+-g/N,n[0]=L,n[1]=S;break;case 2:L=d,S=i+p*N,n[0]=L,n[1]=S;break;case 3:S=h,L=r+g/N,n[0]=L,n[1]=S;break;case 4:L=c,S=i+-p*N,n[0]=L,n[1]=S}if(!T)switch(k){case 1:I=v,M=a+-E/N,n[2]=M,n[3]=I;break;case 2:M=x,I=o+w*N,n[2]=M,n[3]=I;break;case 3:I=b,M=a+E/N,n[2]=M,n[3]=I;break;case 4:M=m,I=o+-w*N,n[2]=M,n[3]=I}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(null==i)return this.getIntersection2(e,t,n);var a,o,s,l,u,c,h,d=e.x,p=e.y,g=t.x,f=t.y,v=n.x,y=n.y,m=i.x,b=i.y;return 0==(h=(a=f-p)*(l=v-m)-(o=b-y)*(s=d-g))?null:new r((s*(c=m*y-v*b)-l*(u=g*p-d*f))/h,(o*u-a*c)/h)},i.angleOfVector=function(e,t,n,r){var i=void 0;return e!==n?(i=Math.atan((r-t)/(n-e)),n0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r},function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(u[0]);s.length>0&&t;){var c=s[0];s.splice(0,1),o.add(c);var h=c.getEdges();for(a=0;a-1&&u.splice(f,1)}o=new Set,l=new Map}else e=[]}return e},d.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(h,1),c.getNeighborsList().forEach((function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;1==t&&l.push(e),r.set(e,t)}}))}n=n.concat(l),1!=t.length&&2!=t.length||(i=!0,a=t[0])}return a},d.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=d},function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},e.exports=r},function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return 0!=n&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return 0!=n&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return 0!=n&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return 0!=n&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i},function(e,t,n){"use strict";var r=n(15),i=n(7),a=n(0),o=n(8),s=n(9);function l(){r.call(this),this.useSmartIdealEdgeLengthCalculation=i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=i.DEFAULT_EDGE_LENGTH,this.springConstant=i.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=i.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=i.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=i.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*i.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=i.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=i.MAX_ITERATIONS}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},l.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,o,s,l=this.getGraphManager().getAllEdges(),u=0;ui.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*i.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-i.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>i.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(i.COOLING_ADAPTATION_FACTOR,1-(e-i.ADAPTATION_LOWER_NODE_LIMIT)/(i.ADAPTATION_UPPER_NODE_LIMIT-i.ADAPTATION_LOWER_NODE_LIMIT)*(1-i.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=i.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e,t=this.getAllEdges(),n=0;n0&&void 0!==arguments[0])||arguments[0],s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%i.GRID_CALCULATION_CHECK_PERIOD==1&&o&&this.updateGrid(),a=new Set,e=0;e(l=t.getEstimatedSize()*this.gravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a):(o>(l=t.getEstimatedSize()*this.compoundGravityRangeFactor)||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant)},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=s.length||u>=s[0].length))for(var c=0;ce}}]),e}();e.exports=a},function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=i,this.gap_penalty=a,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var o=0;o=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{"use strict";n.d(t,{diagram:()=>Cc});var r=n(8252),i=n(7323),a=n(8852),o=n(798);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}var v="undefined"==typeof window?null:window,y=v?v.navigator:null;v&&v.document;var m=s(""),b=s({}),x=s((function(){})),w="undefined"==typeof HTMLElement?"undefined":s(HTMLElement),E=function(e){return e&&e.instanceString&&T(e.instanceString)?e.instanceString():null},_=function(e){return null!=e&&s(e)==m},T=function(e){return null!=e&&s(e)===x},D=function(e){return!k(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},C=function(e){return null!=e&&s(e)===b&&!D(e)&&e.constructor===Object},N=function(e){return null!=e&&s(e)===s(1)&&!isNaN(e)},A=function(e){return"undefined"===w?void 0:null!=e&&e instanceof HTMLElement},k=function(e){return L(e)||S(e)},L=function(e){return"collection"===E(e)&&e._private.single},S=function(e){return"collection"===E(e)&&!e._private.single},M=function(e){return"core"===E(e)},I=function(e){return"stylesheet"===E(e)},O=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},P=function(e){return function(e){return null!=e&&s(e)===b}(e)&&T(e.then)},R=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},H=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n=t||n<0||h&&e-u>=a}function f(){var e=ne();if(g(e))return v(e);s=setTimeout(f,function(e){var n=t-(e-l);return h?we(n,a-(e-u)):n}(e))}function v(e){return s=void 0,d&&r?p(e):(r=i=void 0,o)}function y(){var e=ne(),n=g(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return u=e,s=setTimeout(f,t),c?p(e):o}(l);if(h)return clearTimeout(s),s=setTimeout(f,t),p(l)}return void 0===s&&(s=setTimeout(f,t)),o}return t=be(t)||0,Z(n)&&(c=!!n.leading,a=(h="maxWait"in n)?xe(be(n.maxWait)||0,t):a,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=l=i=s=void 0},y.flush=function(){return void 0===s?o:v(ne())},y},_e=v?v.performance:null,Te=_e&&_e.now?function(){return _e.now()}:function(){return Date.now()},De=function(){if(v){if(v.requestAnimationFrame)return function(e){v.requestAnimationFrame(e)};if(v.mozRequestAnimationFrame)return function(e){v.mozRequestAnimationFrame(e)};if(v.webkitRequestAnimationFrame)return function(e){v.webkitRequestAnimationFrame(e)};if(v.msRequestAnimationFrame)return function(e){v.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout((function(){e(Te())}),1e3/60)}}(),Ce=function(e){return De(e)},Ne=Te,Ae=9261,ke=5381,Le=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ae;!(t=e.next()).done;)n=65599*n+t.value|0;return n},Se=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ae)+e|0},Me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ke;return(t<<5)+t+e|0},Ie=function(e){return 2097152*e[0]+e[1]},Oe=function(e,t){return[Se(e[0],t[0]),Me(e[1],t[1])]},Pe=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return Le({next:function(){return r=0&&(e[r]!==t||(e.splice(r,1),!n));r--);},tt=function(e){e.splice(0,e.length)},nt=function(e,t,n){return n&&(t=z(n,t)),e[t]},rt=function(e,t,n,r){n&&(t=z(n,t)),e[t]=r},it="undefined"!=typeof Map?Map:function(){function e(){l(this,e),this._obj={}}return c(e,[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}]),e}(),at=function(){function e(t){if(l(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&M(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new ot,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==i.position.x&&(i.position.x=0),null==i.position.y&&(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];D(t.classes)?l=t.classes:_(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,i,a,o){var s;if(null==i&&(i=0),null==o&&(o=n),i<0)throw new Error("lo must be non-negative");for(null==a&&(a=e.length);in;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;af;0<=f?++d:--d)v.push(a(e,r));return v},g=function(e,t,r,i){var a,o,s;for(null==i&&(i=n),a=e[r];r>t&&i(a,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=a},f=function(e,t,r){var i,a,o,s,l;for(null==r&&(r=n),a=e.length,l=t,o=e[t],i=2*t+1;i0;){var w=y.pop(),E=f(w),T=w.id();if(h[T]=E,E!==1/0)for(var D=w.neighborhood().intersect(p),N=0;N0)for(n.unshift(t);c[i];){var a=c[i];n.unshift(a.edge),n.unshift(a.node),i=(r=a.node).id()}return o.spawn(n)}}}},ft={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,a=new Array(i),o=n,s=function(e){for(var t=0;t0;){if(u=(l=f.pop()).id(),v.delete(u),w++,u===h){for(var E=[],_=i,T=h,D=m[T];E.unshift(_),null!=D&&E.unshift(D),null!=(_=y[T]);)D=m[T=_.id()];return{found:!0,distance:d[u],path:this.spawn(E),steps:w}}g[u]=!0;for(var C=l._private.edges,N=0;NN&&(p[C]=N,y[C]=D,m[C]=x),!i){var A=D*u+T;!i&&p[A]>N&&(p[A]=N,y[A]=T,m[A]=x)}}}for(var k=0;k1&&void 0!==arguments[1]?arguments[1]:a,r=[],i=m(e);;){if(null==i)return t.spawn();var o=y(i),l=o.edge,u=o.pred;if(r.unshift(i[0]),i.same(n)&&r.length>0)break;null!=l&&r.unshift(l),i=u}return s.spawn(r)},hasNegativeWeightCycle:g,negativeWeightCycles:f}}},Et=Math.sqrt(2),_t=function(e,t,n){0===n.length&&qe("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],i=r[1],a=r[2],o=t[i],s=t[a],l=n,u=l.length-1;u>=0;u--){var c=l[u],h=c[1],d=c[2];(t[h]===o&&t[d]===s||t[h]===s&&t[d]===o)&&l.splice(u,1)}for(var p=0;pr;){var i=Math.floor(Math.random()*t.length);t=_t(i,e,t),n--}return t},Dt={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy((function(e){return e.isLoop()}));var i=n.length,a=r.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),s=Math.floor(i/Et);if(!(i<2)){for(var l=[],u=0;u0?1:e<0?-1:0},Mt=function(e,t){return Math.sqrt(It(e,t))},It=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Ot=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},zt=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},Gt=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Yt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Vt=function(e){var t,n,r,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===a.length)t=n=r=i=a[0];else if(2===a.length)t=r=a[0],i=n=a[1];else if(4===a.length){var o=d(a,4);t=o[0],n=o[1],r=o[2],i=o[3]}return e.x1-=i,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Xt=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},Ut=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},jt=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},qt=function(e,t){return jt(e,t.x1,t.y1)&&jt(e,t.x2,t.y2)},Ht=function(e,t,n,r,i,a,o){var s,l,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===u?dn(i,a):u,h=i/2,d=a/2,p=(c=Math.min(c,h,d))!==h,g=c!==d;if(p){var f=r-d-o;if((s=on(e,t,n,r,n-h+c-o,f,n+h-c+o,f,!1)).length>0)return s}if(g){var v=n+h+o;if((s=on(e,t,n,r,v,r-d+c-o,v,r+d-c+o,!1)).length>0)return s}if(p){var y=r+d+o;if((s=on(e,t,n,r,n-h+c-o,y,n+h-c+o,y,!1)).length>0)return s}if(g){var m=n-h-o;if((s=on(e,t,n,r,m,r-d+c-o,m,r+d-c+o,!1)).length>0)return s}var b=n-h+c,x=r-d+c;if((l=rn(e,t,n,r,b,x,c+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=n+h-c,E=r-d+c;if((l=rn(e,t,n,r,w,E,c+o)).length>0&&l[0]>=w&&l[1]<=E)return[l[0],l[1]];var _=n+h-c,T=r+d-c;if((l=rn(e,t,n,r,_,T,c+o)).length>0&&l[0]>=_&&l[1]>=T)return[l[0],l[1]];var D=n-h+c,C=r+d-c;return(l=rn(e,t,n,r,D,C,c+o)).length>0&&l[0]<=D&&l[1]>=C?[l[0],l[1]]:[]},Wt=function(e,t,n,r,i,a,o){var s=o,l=Math.min(n,i),u=Math.max(n,i),c=Math.min(r,a),h=Math.max(r,a);return l-s<=e&&e<=u+s&&c-s<=t&&t<=h+s},$t=function(e,t,n,r,i,a,o,s,l){var u=Math.min(n,o,i)-l,c=Math.max(n,o,i)+l,h=Math.min(r,s,a)-l,d=Math.max(r,s,a)+l;return!(ec||td)},Kt=function(e,t,n,r,i,a,o,s){var l,u,c,h,d,p,g,f,v,y,m,b,x,w=[];u=9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,c=3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,h=1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,0===(l=1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s)&&(l=1e-5),f=-27*(h/=l)+(u/=l)*(9*(c/=l)-u*u*2),p=(g=(3*c-u*u)/9)*g*g+(f/=54)*f,(d=w)[1]=0,b=u/3,p>0?(y=(y=f+Math.sqrt(p))<0?-Math.pow(-y,1/3):Math.pow(y,1/3),m=(m=f-Math.sqrt(p))<0?-Math.pow(-m,1/3):Math.pow(m,1/3),d[0]=-b+y+m,b+=(y+m)/2,d[4]=d[2]=-b,b=Math.sqrt(3)*(-m+y)/2,d[3]=b,d[5]=-b):(d[5]=d[3]=0,0===p?(x=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),d[0]=2*x-b,d[4]=d[2]=-(x+b)):(v=(g=-g)*g*g,v=Math.acos(f/Math.sqrt(v)),x=2*Math.sqrt(g),d[0]=-b+x*Math.cos(v/3),d[2]=-b+x*Math.cos((v+2*Math.PI)/3),d[4]=-b+x*Math.cos((v+4*Math.PI)/3)));for(var E=[],_=0;_<6;_+=2)Math.abs(w[_+1])<1e-7&&w[_]>=0&&w[_]<=1&&E.push(w[_]);E.push(1),E.push(0);for(var T,D,C,N=-1,A=0;A=0?Cl?(e-i)*(e-i)+(t-a)*(t-a):u-h},Qt=function(e,t,n){for(var r,i,a,o,s=0,l=0;l=e&&e>=a||r<=e&&e<=a))continue;(e-r)/(a-r)*(o-i)+i>t&&s++}return s%2!=0},Jt=function(e,t,n,r,i,a,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var h,d=Math.cos(-u),p=Math.sin(-u),g=0;g0){var f=tn(c,-l);h=en(f)}else h=c;return Qt(e,t,h)},en=function(e){for(var t,n,r,i,a,o,s,l,u=new Array(e.length/2),c=0;c=0&&g<=1&&v.push(g),f>=0&&f<=1&&v.push(f),0===v.length)return[];var y=v[0]*s[0]+e,m=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,m]:[y,m,v[1]*s[0]+e,v[1]*s[1]+t]:[y,m]},an=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},on=function(e,t,n,r,i,a,o,s,l){var u=e-i,c=n-e,h=o-i,d=t-a,p=r-t,g=s-a,f=h*d-g*u,v=c*d-p*u,y=g*c-h*p;if(0!==y){var m=f/y,b=v/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*p]:[]}return 0===f||0===v?an(e,n,o)===o?[o,s]:an(e,n,i)===i?[i,a]:an(i,o,n)===n?[n,r]:[]:[]},sn=function(e,t,n,r,i,a,o,s){var l,u,c,h,d,p,g=[],f=new Array(n.length),v=!0;if(null==a&&(v=!1),v){for(var y=0;y0){var m=tn(f,-s);u=en(m)}else u=f}else u=n;for(var b=0;bu&&(u=t)},h=function(e){return l[e]},d=0;d0?x.edgesTo(b)[0]:b.edgesTo(x)[0];var w=r(m);b=b.id(),d[b]>d[v]+w&&(d[b]=d[v]+w,p.nodes.indexOf(b)<0?p.push(b):p.updateItem(b),u[b]=0,l[b]=[]),d[b]==d[v]+w&&(u[b]=u[b]+u[v],l[b].push(v))}else for(var E=0;E0;){for(var C=n.pop(),N=0;N0&&o.push(n[s]);0!==o.length&&i.push(r.collection(o))}return i}(c,l,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:In,o=r,s=0;s=2?zn(e,t,n,0,Rn,Bn):zn(e,t,n,0,Pn)},squaredEuclidean:function(e,t,n){return zn(e,t,n,0,Rn)},manhattan:function(e,t,n){return zn(e,t,n,0,Pn)},max:function(e,t,n){return zn(e,t,n,-1/0,Fn)}};function Yn(e,t,n,r,i,a){var o;return o=T(e)?e:Gn[e]||Gn.euclidean,0===t&&T(e)?o(i,a):o(t,n,r,i,a)}Gn["squared-euclidean"]=Gn.squaredEuclidean,Gn.squaredeuclidean=Gn.squaredEuclidean;var Vn=Je({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),Xn=function(e){return Vn(e)},Un=function(e,t,n,r,i){var a="kMedoids"!==i?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return Yn(e,r.length,a,(function(e){return r[e](t)}),o,s)},jn=function(e,t,n){for(var r=n.length,i=new Array(r),a=new Array(r),o=new Array(t),s=null,l=0;ln)return!1;return!0},Kn=function(e,t,n){for(var r=0;ri&&(i=t[l][u],a=u);o[a].push(e[l])}for(var c=0;c=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var p,g=t[o],f=t[r[o]];p="dendrogram"===i.mode?{left:g,right:f,key:g.key}:{value:g.value.concat(f.value),key:g.key},e[g.index]=p,e.splice(f.index,1),t[g.key]=p;for(var v=0;vn[f.key][y.key]&&(a=n[f.key][y.key])):"max"===i.linkage?(a=n[g.key][y.key],n[g.key][y.key]o&&(a=l,o=t[i*e+l])}a>0&&r.push(a)}for(var u=0;u1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var a=0,o=e.length-1;o>=0;o--){var s=e[o];i?isFinite(s)||(e[o]=-1/0,a++):e.splice(o,1)}r&&e.sort((function(e,t){return e-t}));var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+a]:(e[u-1+a]+e[u+a])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,i=0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,i=t;i=C?(A=C,C=L,k=S):L>A&&(A=L);for(var M=0;M0?1:0;_[E%u.minIterations*t+F]=z,B+=z}if(B>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var G=0,Y=0;Y0&&r.push(i);return r}(t,a,o),U=function(e,t,n){for(var r=pr(e,t,n),i=0;il&&(s=u,l=c)}n[i]=a[s]}return pr(e,t,n)}(t,r,X),j={},q=0;q1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach((function(e){e.isEdge()&&c[t].push(e.id())}))}else h[t]=[void 0,e.target().id()]})):l.forEach((function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach((function(e){return c[t].push(e.id())}))):h[t]=[e.source().id(),e.target().id()]}));var d={found:!1,trail:void 0};if(u)return d;if(r&&n)if(s){if(i&&r!=i)return d;i=r}else{if(i&&r!=i&&n!=i)return d;i||(i=r)}else i||(i=l[0].id());var p=function(e){for(var t,n,r,i=e,a=[e];c[i].length;)t=c[i].shift(),n=h[t][0],i!=(r=h[t][1])?(c[r]=c[r].filter((function(e){return e!=t})),i=r):s||i==n||(c[n]=c[n].filter((function(e){return e!=t})),i=n),a.unshift(t),a.unshift(i);return a},g=[],f=[];for(f=p(i);1!=f.length;)0==c[f[0]].length?(g.unshift(l.getElementById(f.shift())),g.unshift(l.getElementById(f.shift()))):f=p(f.shift()).concat(f);for(var v in g.unshift(l.getElementById(f.shift())),c)if(c[v].length)return d;return d.found=!0,d.trail=this.spawn(g,!0),d}},mr=function(){var e=this,t={},n=0,r=0,i=[],a=[],o={},s=function s(l,u,c){l===c&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var h,d,p,g,f=e.getElementById(u).connectedEdges().intersection(e);0===f.size()?i.push(e.spawn(e.getElementById(u))):f.forEach((function(n){h=n.source().id(),d=n.target().id(),(p=h===u?d:h)!==c&&(g=n.id(),o[g]||(o[g]=!0,a.push({x:u,y:p,edge:n})),p in t?t[u].low=Math.min(t[u].low,t[p].id):(s(l,p,u),t[u].low=Math.min(t[u].low,t[p].low),t[u].id<=t[p].low&&(t[u].cutVertex=!0,function(n,r){for(var o=a.length-1,s=[],l=e.spawn();a[o].x!=n||a[o].y!=r;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach((function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach((function(n){var r=n.id(),i=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(i.filter((function(e){return e.isLoop()}))):l.merge(i)}))})),i.push(l)}(u,p))))}))};e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}}));var l=Object.keys(t).filter((function(e){return t[e].cutVertex})).map((function(t){return e.getElementById(t)}));return{cut:e.spawn(l),components:i}},br=function(){var e=this,t={},n=0,r=[],i=[],a=e.spawn(e),o=function o(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach((function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))})),t[s].index===t[s].low){for(var l=e.spawn();;){var u=i.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),h=l.merge(c);r.push(h),a=a.difference(h)}};return e.forEach((function(e){if(e.isNode()){var n=e.id();n in t||o(n)}})),{cut:a,components:r}},xr={};[ut,gt,ft,yt,bt,wt,Dt,vn,mn,xn,En,Mn,nr,cr,fr,yr,{hopcroftTarjanBiconnected:mr,htbc:mr,htb:mr,hopcroftTarjanBiconnectedComponents:mr},{tarjanStronglyConnected:br,tsc:br,tscc:br,tarjanStronglyConnectedComponents:br}].forEach((function(e){H(xr,e)}));var wr=function e(t){if(!(this instanceof e))return new e(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};wr.prototype={fulfill:function(e){return Er(this,1,"fulfillValue",e)},reject:function(e){return Er(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new wr;return n.onFulfilled.push(Dr(e,r,"fulfill")),n.onRejected.push(Dr(t,r,"reject")),_r(n),r.proxy}};var Er=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,_r(e)),e},_r=function(e){1===e.state?Tr(e,"onFulfilled",e.fulfillValue):2===e.state&&Tr(e,"onRejected",e.rejectReason)},Tr=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var i=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1},ei.prototype.set=function(e,t){var n=this.__data__,r=Qr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};var ti=ei,ni=jr(te,"Map"),ri=function(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map};function ii(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){D(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,i=[],a=0,o=n.length;a0&&this.spawn(i).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout((function(){n.removeClass(e)}),t),n}};Si.className=Si.classNames=Si.classes;var Mi={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:Y,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Mi.variable="(?:[\\w-.]|(?:\\\\"+Mi.metaChar+"))+",Mi.className="(?:[\\w-]|(?:\\\\"+Mi.metaChar+"))+",Mi.value=Mi.string+"|"+Mi.number,Mi.id=Mi.variable,function(){var e,t,n;for(e=Mi.comparatorOp.split("|"),n=0;n=0||"="!==t&&(Mi.comparatorOp+="|\\!"+t)}();var Ii=20,Oi=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort((function(e,t){return function(e,t){return-1*q(e,t)}(e.selector,t.selector)})),Pi=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return We("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return We("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&We("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return _(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(i,a){return i.checks.reduce((function(o,s,l){return o+(a===i&&0===l?"$":"")+function(i,a){var o=i.type,s=i.value;switch(o){case 0:var l=e(s);return l.substring(0,l.length-1);case 3:var u=i.field,c=i.operator;return"["+u+n(e(c))+t(s)+"]";case 5:var h=i.operator,d=i.field;return"["+e(h)+d+"]";case 4:return"["+i.field+"]";case 6:var p=i.operator;return"[["+i.field+n(e(p))+t(s)+"]]";case 7:return s;case 8:return"#"+s;case 9:return"."+s;case 17:case 15:return r(i.parent,a)+n(">")+r(i.child,a);case 18:case 16:return r(i.ancestor,a)+" "+r(i.descendant,a);case 19:var g=r(i.left,a),f=r(i.subject,a),v=r(i.right,a);return g+(g.length>0?" ":"")+f+v;case Ii:return""}}(s,a)}),"")},i="",a=0;a1&&a=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(i=o||s?""+e:"",a=""+n),u&&(e=i=i.toLowerCase(),n=a=a.toLowerCase()),t){case"*=":r=i.indexOf(a)>=0;break;case"$=":r=i.indexOf(a,i.length-a.length)>=0;break;case"^=":r=0===i.indexOf(a);break;case"=":r=e===n;break;case">":h=!0,r=e>n;break;case">=":h=!0,r=e>=n;break;case"<":h=!0,r=e0;){var u=i.shift();t(u),a.add(u.id()),o&&r(i,a,u)}return e}function ta(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&void 0!==arguments[1])||arguments[1],ta)},Ji.forEachUp=function(e){return ea(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],na)},Ji.forEachUpAndDown=function(e){return ea(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ra)},Ji.ancestors=Ji.parents,(Ki=Zi={data:ki.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:ki.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:ki.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ki.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:ki.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:ki.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=Ki.data,Ki.removeAttr=Ki.removeData;var ia,aa,oa=Zi,sa={};function la(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,o=0;ot})),minIndegree:ua("indegree",(function(e,t){return et})),minOutdegree:ua("outdegree",(function(e,t){return et}))}),H(sa,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var h=c?l.position():{x:0,y:0};return i={x:s.x-h.x,y:s.y-h.y},void 0===e?i:i[e]}for(var d=0;d0,v=f;f&&(g=g[0]);var y=v?g.position():{x:0,y:0};void 0!==t?p.position(e,t+y[e]):void 0!==i&&p.position({x:i.x+y.x,y:i.y+y.y})}}else if(!a)return;return this}},ia.modelPosition=ia.point=ia.position,ia.modelPositions=ia.points=ia.positions,ia.renderedPoint=ia.renderedPosition,ia.relativePoint=ia.relativePosition;var da,pa,ga=aa;da=pa={},pa.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},pa.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp((function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}})),this):this},pa.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,i={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==a.w&&0!==a.h||((a={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);var s=i.width.left.value;"px"===i.width.left.units&&i.width.val>0&&(s=100*s/i.width.val);var l=i.width.right.value;"px"===i.width.right.units&&i.width.val>0&&(l=100*l/i.width.val);var u=i.height.top.value;"px"===i.height.top.units&&i.height.val>0&&(u=100*u/i.height.val);var c=i.height.bottom.value;"px"===i.height.bottom.units&&i.height.val>0&&(c=100*c/i.height.val);var h=y(i.width.val-a.w,s,l),d=h.biasDiff,p=h.biasComplementDiff,g=y(i.height.val-a.h,u,c),f=g.biasDiff,v=g.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(a.w,a.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(a.w,i.width.val),o.x=(-d+a.x1+a.x2+p)/2,t.autoHeight=Math.max(a.h,i.height.val),o.y=(-f+a.y1+a.y2+v)/2}function y(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},ya=function(e,t){return null==t?e:va(e,t.x1,t.y1,t.x2,t.y2)},ma=function(e,t,n){return nt(e,t,n)},ba=function(e,t,n){if(!t.cy().headless()){var r,i,a=t._private,o=a.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,i=o.srcY):"target"===n?(r=o.tgtX,i=o.tgtY):(r=o.midX,i=o.midY);var l=a.arrowBounds=a.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=i-s,u.x2=r+s,u.y2=i+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Yt(u,1),va(e,u.x1,u.y1,u.x2,u.y2)}}},xa=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var i=t._private,a=i.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),h=t.pstyle("text-valign"),d=ma(a,"labelWidth",n),p=ma(a,"labelHeight",n),g=ma(a,"labelX",n),f=ma(a,"labelY",n),v=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,_=p,T=d,D=T/2,C=_/2;if(m)o=g-D,s=g+D,l=f-C,u=f+C;else{switch(c.value){case"left":o=g-T,s=g;break;case"center":o=g-D,s=g+D;break;case"right":o=g,s=g+T}switch(h.value){case"top":l=f-_,u=f;break;case"center":l=f-C,u=f+C;break;case"bottom":l=f,u=f+_}}o+=v-Math.max(x,w)-E-2,s+=v+Math.max(x,w)+E+2,l+=y-Math.max(x,w)-E-2,u+=y+Math.max(x,w)+E+2;var N=n||"main",A=i.labelBounds,k=A[N]=A[N]||{};k.x1=o,k.y1=l,k.x2=s,k.y2=u,k.w=s-o,k.h=u-l;var L=m&&"autorotate"===b.strValue,S=null!=b.pfValue&&0!==b.pfValue;if(L||S){var M=L?ma(i.rstyle,"labelAngle",n):b.pfValue,I=Math.cos(M),O=Math.sin(M),P=(o+s)/2,R=(l+u)/2;if(!m){switch(c.value){case"left":P=s;break;case"right":P=o}switch(h.value){case"top":R=u;break;case"bottom":R=l}}var B=function(e,t){return{x:(e-=P)*I-(t-=R)*O+P,y:e*O+t*I+R}},F=B(o,l),z=B(o,u),G=B(s,l),Y=B(s,u);o=Math.min(F.x,z.x,G.x,Y.x),s=Math.max(F.x,z.x,G.x,Y.x),l=Math.min(F.y,z.y,G.y,Y.y),u=Math.max(F.y,z.y,G.y,Y.y)}var V=N+"Rot",X=A[V]=A[V]||{};X.x1=o,X.y1=l,X.x2=s,X.y2=u,X.w=s-o,X.h=u-l,va(e,o,l,s,u),va(i.labelBounds.all,o,l,s,u)}return e}},wa=function(e){var t=0,n=function(e){return(e?1:0)<0&&a>0){var o=t.pstyle("outline-offset").value,s=t.pstyle("shape").value,l=a+o,u=(e.w+2*l)/e.w,c=(e.h+2*l)/e.h,h=0;["diamond","pentagon","round-triangle"].includes(s)?(u=(e.w+2.4*l)/e.w,h=-l/3.6):["concave-hexagon","rhomboid","right-rhomboid"].includes(s)?u=(e.w+2.4*l)/e.w:"star"===s?(u=(e.w+2.8*l)/e.w,c=(e.h+2.6*l)/e.h,h=-l/3.8):"triangle"===s?(u=(e.w+2.8*l)/e.w,c=(e.h+2.4*l)/e.h,h=-l/1.4):"vee"===s&&(u=(e.w+4.4*l)/e.w,c=(e.h+3.8*l)/e.h,h=.5*-l);var d=e.h*c-e.h,p=e.w*u-e.w;if(Vt(e,[Math.ceil(d/2),Math.ceil(p/2)]),0!==h){var g=(r=h,{x1:(n=e).x1+0,x2:n.x2+0,y1:n.y1+r,y2:n.y2+r,w:n.w,h:n.h});zt(e,g)}}}}(d,e)}else if(f&&t.includeEdges)if(c&&!h){var N=e.pstyle("curve-style").strValue;if(n=Math.min(v.srcX,v.midX,v.tgtX),r=Math.max(v.srcX,v.midX,v.tgtX),i=Math.min(v.srcY,v.midY,v.tgtY),a=Math.max(v.srcY,v.midY,v.tgtY),va(d,n-=_,i-=_,r+=_,a+=_),"haystack"===N){var A=v.haystackPts;if(A&&2===A.length){if(n=A[0].x,i=A[0].y,n>(r=A[1].x)){var k=n;n=r,r=k}if(i>(a=A[1].y)){var L=i;i=a,a=L}va(d,n-_,i-_,r+_,a+_)}}else if("bezier"===N||"unbundled-bezier"===N||N.endsWith("segments")||N.endsWith("taxi")){var S;switch(N){case"bezier":case"unbundled-bezier":S=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":S=v.linePts}if(null!=S)for(var M=0;M(r=P.x)){var R=n;n=r,r=R}if((i=O.y)>(a=P.y)){var B=i;i=a,a=B}va(d,n-=_,i-=_,r+=_,a+=_)}if(c&&t.includeEdges&&f&&(ba(d,e,"mid-source"),ba(d,e,"mid-target"),ba(d,e,"source"),ba(d,e,"target")),c&&"yes"===e.pstyle("ghost").value){var F=e.pstyle("ghost-offset-x").pfValue,z=e.pstyle("ghost-offset-y").pfValue;va(d,d.x1+F,d.y1+z,d.x2+F,d.y2+z)}var G=p.bodyBounds=p.bodyBounds||{};Xt(G,d),Vt(G,y),Yt(G,1),c&&(n=d.x1,r=d.x2,i=d.y1,a=d.y2,va(d,n-E,i-E,r+E,a+E));var Y=p.overlayBounds=p.overlayBounds||{};Xt(Y,d),Vt(Y,y),Yt(Y,1);var V=p.labelBounds=p.labelBounds||{};null!=V.all?((l=V.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):V.all=Ft(),c&&t.includeLabels&&(t.includeMainLabels&&xa(d,e,null),f&&(t.includeSourceLabels&&xa(d,e,"source"),t.includeTargetLabels&&xa(d,e,"target")))}return d.x1=fa(d.x1),d.y1=fa(d.y1),d.x2=fa(d.x2),d.y2=fa(d.y2),d.w=fa(d.x2-d.x1),d.h=fa(d.y2-d.y1),d.w>0&&d.h>0&&b&&(Vt(d,y),Yt(d,1)),d}(e,Ta),r.bbCache=n,r.bbCachePosKey=o):n=r.bbCache,!a){var c=e.isNode();n=Ft(),(t.includeNodes&&c||t.includeEdges&&!c)&&(t.includeOverlays?ya(n,r.overlayBounds):ya(n,r.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!i||t.includeSourceLabels&&t.includeTargetLabels)?ya(n,r.labelBounds.all):(t.includeMainLabels&&ya(n,r.labelBounds.mainRot),t.includeSourceLabels&&ya(n,r.labelBounds.sourceRot),t.includeTargetLabels&&ya(n,r.labelBounds.targetRot))),n.w=n.x2-n.x1,n.h=n.y2-n.y1}return n},Ta={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},Da=wa(Ta),Ca=Je(Ta);pa.boundingBox=function(e){var t;if(1!==this.length||null==this[0]._private.bbCache||this[0]._private.styleDirty||void 0!==e&&void 0!==e.useCache&&!0!==e.useCache){t=Ft();var n=Ca(e=e||Ta),r=this;if(r.cy().styleEnabled())for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:Ya,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},Xa.removeAllListeners=function(){return this.removeListener("*")},Xa.emit=Xa.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,D(t)||(t=[t]),function(e,t,n){if("event"!==E(n))if(C(n))t(e,ja(e,n));else for(var r=D(n)?n:n.split(/\s+/),i=0;i1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&_(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--)e(this[t])&&this.unmergeAt(t);return this},map:function(e,t){for(var n=[],r=this,i=0;ir&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,i=this,a=0;a=0&&i1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){this.cleanStyle();var i=n._private.style[e];return null!=i?i:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(C(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify("style")}else if(_(e)){if(void 0===t){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}i.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(void 0===e)for(var a=0;a0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)}),"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),yo.neighbourhood=yo.neighborhood,yo.closedNeighbourhood=yo.closedNeighborhood,yo.openNeighbourhood=yo.openNeighborhood,H(yo,{source:Qi((function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t}),"source"),target:Qi((function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t}),"target"),sources:wo({attr:"source"}),targets:wo({attr:"target"})}),H(yo,{edgesWith:Qi(Eo(),"edgesWith"),edgesTo:Qi(Eo({thisIsSrc:!0}),"edgesTo")}),H(yo,{connectedEdges:Qi((function(e){for(var t=[],n=0;n0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),yo.componentsOf=yo.components;var To=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var i=new it,a=!1;if(t){if(t.length>0&&C(t[0])&&!L(t[0])){a=!0;for(var o=[],s=new ot,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this,a=i.cy(),o=a._private,s=[],l=[],u=0,c=i.length;u0){for(var B=e.length===i.length?i:new To(a,e),F=0;F0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],i={},a=n._private.cy;function o(e){var n=i[e.id()];t&&e.removed()||n||(i[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?_.emitAndNotify("remove"):t&&_.emit("remove"));for(var T=0;T=.001?function(t,r){for(var i=0;i<4;++i){var a=d(r,e,n);if(0===a)return r;r-=(h(r,e,n)-t)/a}return r}(t,o):0===l?o:function(t,r,i){var a,o,s=0;do{(a=h(o=r+(i-r)/2,e,n)-t)>0?i=o:r=o}while(Math.abs(a)>1e-7&&++s<10);return o}(t,r,r+i)}(a),t,r)};g.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var f="generateBezier("+[e,t,n,r]+")";return g.toString=function(){return f},g}var Ao=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},a=t(n,.5*r,i),o=t(n,.5*r,a),s=t(n,r,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),u=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,i){var a,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,h=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i=i||null,l.tension=t,l.friction=r,o=(a=null!==i)?(c=e(t,r))/i*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>h&&Math.abs(s.v)>h;);return a?function(e){return u[e*(u.length-1)|0]}:c}}(),ko=function(e,t,n,r){var i=No(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},Lo={linear:function(e,t,n){return e+(t-e)*n},ease:ko(.25,.1,.25,1),"ease-in":ko(.42,0,1,1),"ease-out":ko(0,0,.58,1),"ease-in-out":ko(.42,0,.58,1),"ease-in-sine":ko(.47,0,.745,.715),"ease-out-sine":ko(.39,.575,.565,1),"ease-in-out-sine":ko(.445,.05,.55,.95),"ease-in-quad":ko(.55,.085,.68,.53),"ease-out-quad":ko(.25,.46,.45,.94),"ease-in-out-quad":ko(.455,.03,.515,.955),"ease-in-cubic":ko(.55,.055,.675,.19),"ease-out-cubic":ko(.215,.61,.355,1),"ease-in-out-cubic":ko(.645,.045,.355,1),"ease-in-quart":ko(.895,.03,.685,.22),"ease-out-quart":ko(.165,.84,.44,1),"ease-in-out-quart":ko(.77,0,.175,1),"ease-in-quint":ko(.755,.05,.855,.06),"ease-out-quint":ko(.23,1,.32,1),"ease-in-out-quint":ko(.86,0,.07,1),"ease-in-expo":ko(.95,.05,.795,.035),"ease-out-expo":ko(.19,1,.22,1),"ease-in-out-expo":ko(1,0,0,1),"ease-in-circ":ko(.6,.04,.98,.335),"ease-out-circ":ko(.075,.82,.165,1),"ease-in-out-circ":ko(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Lo.linear;var r=Ao(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":ko};function So(e,t,n,r,i){if(1===r)return n;if(t===n)return n;var a=i(t,n,r);return null==e||((e.roundValue||e.color)&&(a=Math.round(a)),void 0!==e.min&&(a=Math.max(a,e.min)),void 0!==e.max&&(a=Math.min(a,e.max))),a}function Mo(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Io(e,t,n,r,i){var a=null!=i?i.type:null;n<0?n=0:n>1&&(n=1);var o=Mo(e,i),s=Mo(t,i);if(N(o)&&N(s))return So(a,o,s,n,r);if(D(o)&&D(s)){for(var l=[],u=0;u0?("spring"===h&&d.push(o.duration),o.easingImpl=Lo[h].apply(null,d)):o.easingImpl=Lo[h]}var p,g=o.easingImpl;if(p=0===o.duration?1:(n-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var f=o.startPosition,v=o.position;if(v&&i&&!e.locked()){var y={};Po(f.x,v.x)&&(y.x=Io(f.x,v.x,p,g)),Po(f.y,v.y)&&(y.y=Io(f.y,v.y,p,g)),e.position(y)}var m=o.startPan,b=o.pan,x=a.pan,w=null!=b&&r;w&&(Po(m.x,b.x)&&(x.x=Io(m.x,b.x,p,g)),Po(m.y,b.y)&&(x.y=Io(m.y,b.y,p,g)),e.emit("pan"));var E=o.startZoom,T=o.zoom,D=null!=T&&r;D&&(Po(E,T)&&(a.zoom=Bt(a.minZoom,Io(E,T,p,g),a.maxZoom)),e.emit("zoom")),(w||D)&&e.emit("viewport");var C=o.style;if(C&&C.length>0&&i){for(var N=0;N=0;t--)(0,e[t])();e.splice(0,e.length)},c=a.length-1;c>=0;c--){var h=a[c],d=h._private;d.stopped?(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||Ro(0,h,e),Oo(t,h,e,n),d.applying&&(d.applying=!1),u(d.frames),null!=d.step&&d.step(e),h.completed()&&(a.splice(c,1),d.hooked=!1,d.playing=!1,d.started=!1,u(d.completes)),s=!0)}return n||0!==a.length||0!==o.length||r.push(t),s}for(var a=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var Fo={animate:ki.animate(),animation:ki.animation(),animated:ki.animated(),clearQueue:ki.clearQueue(),delay:ki.delay(),delayAnimation:ki.delayAnimation(),stop:ki.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender((function(t,n){Bo(n,e)}),t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&Ce((function(n){Bo(n,e),t()}))}()}}},zo={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&L(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},Go=function(e){return _(e)?new Hi(e):e},Yo={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Va(zo,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Go(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Go(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Go(t),n),this},once:function(e,t,n){return this.emitter().one(e,Go(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};ki.eventAliasesOn(Yo);var Vo={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};Vo.jpeg=Vo.jpg;var Xo={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n,r=e.name,i=t.extension("layout",r);if(null!=i)return n=_(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$(),new i(H({},e,{cy:t,eles:n}));qe("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?")}else qe("A `name` must be specified to make a layout");else qe("Layout options must be specified to make a layout")}};Xo.createLayout=Xo.makeLayout=Xo.layout;var Uo={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var i=this.renderer();!this.destroyed()&&i&&i.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach((function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)}))}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch((function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach((function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]}))},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};qo.invalidateDimensions=qo.resize;var Ho={collection:function(e,t){return _(e)?this.$(e):k(e)?e.collection():D(e)?(t||(t={}),new To(this,e,t.unique,t.removed)):new To(this)},nodes:function(e){var t=this.$((function(e){return e.isNode()}));return e?t.filter(e):t},edges:function(e){var t=this.$((function(e){return e.isEdge()}));return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Ho.elements=Ho.filter=Ho.$;var Wo={},$o="t";Wo.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(d||h&&p){var g=void 0;d&&p||d?g=u.properties:p&&(g=u.mappedProperties);for(var f=0;f1&&(v=1),s.color){var w=i.valueMin[0],E=i.valueMax[0],_=i.valueMin[1],T=i.valueMax[1],D=i.valueMin[2],C=i.valueMax[2],A=null==i.valueMin[3]?1:i.valueMin[3],k=null==i.valueMax[3]?1:i.valueMax[3],L=[Math.round(w+(E-w)*v),Math.round(_+(T-_)*v),Math.round(D+(C-D)*v),Math.round(A+(k-A)*v)];n={bypass:i.bypass,name:i.name,value:L,strValue:"rgb("+L[0]+", "+L[1]+", "+L[2]+")"}}else{if(!s.number)return!1;var S=i.valueMin+(i.valueMax-i.valueMin)*v;n=this.parse(i.name,S,i.bypass,d)}if(!n)return f(),!1;n.mapping=i,i=n;break;case o.data:for(var M=i.field.split("."),I=h.data,O=0;O0&&a>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()})).then((function(){return e.animation({style:s,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()})).then((function(){n.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1}))}else r.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),r.transitioning=!1)},Wo.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);null!=s&&s(n,r)&&a(o)},Wo.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,(function(e){return e.triggersZOrder}),(function(){i._private.cy.notify("zorder",e)}))},Wo.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,(function(e){return e.triggersBounds}),(function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache(),!i.triggersBoundsOfParallelBeziers||"curve-style"!==t||"bezier"!==n&&"bezier"!==r||e.parallelEdges().forEach((function(e){e.isBundledBezier()&&e.dirtyBoundingBoxCache()})),!i.triggersBoundsOfConnectedEdges||"display"!==t||"none"!==n&&"none"!==r||e.connectedEdges().forEach((function(e){e.dirtyBoundingBoxCache()}))}))},Wo.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r)};var Ko={applyBypass:function(e,t,n,r){var i=[];if("*"===t||"**"===t){if(void 0!==n)for(var a=0;at.length?a.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(a=a.replace(/[/][*](\s|.)+?[*][/]/g,"");!a.match(/^\s*$/);){var l=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){We("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}t=l[0];var u=l[1];if("core"!==u&&new Hi(u).invalid)We("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();else{var c=l[2],h=!1;n=c;for(var d=[];!n.match(/^\s*$/);){var p=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){We("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),h=!0;break}r=p[0];var g=p[1],f=p[2];this.properties[g]?i.parse(g,f)?(d.push({name:g,val:f}),s()):(We("Skipping property: Invalid property definition in: "+r),s()):(We("Skipping property: Invalid property name in: "+r),s())}if(h){o();break}i.selector(u);for(var v=0;v=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var d=s.data;return{name:e,value:u,strValue:""+t,mapped:d,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(h.multiple)return!1;var p=s.mapData;if(!h.color&&!h.number)return!1;var g=this.parse(e,c[4]);if(!g||g.mapped)return!1;var f=this.parse(e,c[5]);if(!f||f.mapped)return!1;if(g.pfValue===f.pfValue||g.strValue===f.strValue)return We("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(h.color){var v=g.value,y=f.value;if(!(v[0]!==y[0]||v[1]!==y[1]||v[2]!==y[2]||v[3]!==y[3]&&(null!=v[3]&&1!==v[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:p,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:g.value,valueMax:f.value,bypass:n}}}if(h.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):D(t)?t:[t],h.evenMultiple&&m.length%2!=0)return null;for(var b=[],x=[],w=[],E="",C=!1,A=0;A0?" ":"")+k.strValue}return h.validate&&!h.validate(b,x)?null:h.singleEnum&&C?1===b.length&&_(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:w,strValue:E,bypass:n,units:x}}var L,S,M,I=function(){for(var r=0;rh.max||h.strictMax&&t===h.max))return null;var z={name:e,value:t,strValue:""+t+(O||""),units:O,bypass:n};return h.unitless||"px"!==O&&"em"!==O?z.pfValue=t:z.pfValue="px"!==O&&O?this.getEmSizeInPixels()*t:t,"ms"!==O&&"s"!==O||(z.pfValue="ms"===O?t:1e3*t),"deg"!==O&&"rad"!==O||(z.pfValue="rad"===O?t:(L=t,Math.PI*L/180)),"%"===O&&(z.pfValue=t/100),z}if(h.propList){var G=[],X=""+t;if("none"===X);else{for(var j=X.split(/\s*,\s*|\s+/),q=0;q255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(M)||function(e){var t,n,r,i,a,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+U+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(i=parseFloat(c[3]))<0||i>100)return;if(i/=100,void 0!==(a=c[4])&&((a=parseFloat(a))<0||a>1))return;if(0===r)o=s=l=Math.round(255*i);else{var h=i<.5?i*(1+r):i+r-i*r,d=2*i-h;o=Math.round(255*u(d,h,n+1/3)),s=Math.round(255*u(d,h,n)),l=Math.round(255*u(d,h,n-1/3))}t=[o,s,l,a]}return t}(M);return $?{name:e,value:$,pfValue:$,strValue:"rgb("+$[0]+","+$[1]+","+$[2]+")",bypass:n}:null}if(h.regex||h.regexes){if(h.enums){var K=I();if(K)return K}for(var Z=h.regexes?h.regexes:[h.regex],Q=0;Q0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,i=r.pan,a=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),N(e)?n=e:C(e)&&(n=e.level,null!=e.position?t=Ct(e.position,a,i):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push("zoom"))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;N(l.x)&&(t.pan.x=l.x,o=!1),N(l.y)&&(t.pan.y=l.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(_(e)){var n=e;e=this.mutableElements().filter(n)}else k(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),i=this.width(),a=this.height();return{x:(i-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container;return n.sizeCache=n.sizeCache||(r?(e=this.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};os.centre=os.center,os.autolockNodes=os.autolock,os.autoungrabifyNodes=os.autoungrabify;var ss={data:ki.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:ki.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:ki.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:ki.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ss.attr=ss.data,ss.removeAttr=ss.removeData;var ls=function(e){var t=this,n=(e=H({},e)).container;n&&!A(n)&&A(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var a=void 0!==v&&void 0!==n&&!e.headless,o=e;o.layout=H({name:a?"grid":"null"},o.layout),o.renderer=H({name:a?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new To(this),listeners:[],aniEles:new To(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?a:o.styleEnabled,zoom:N(o.zoom)?o.zoom:1,pan:{x:C(o.pan)&&N(o.pan.x)?o.pan.x:0,y:C(o.pan)&&N(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom}),l.styleEnabled&&t.setStyle([]);var u=H({},o,o.renderer);t.initRenderer(u),function(e,t){if(e.some(P))return Nr.all(e).then(t);t(e)}([o.style,o.elements],(function(e){var n=e[0],a=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),null!=e&&(C(e)||D(e))&&t.add(e),t.one("layoutready",(function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")})).one("layoutstop",(function(){t.one("done",r),t.emit("done")}));var a=H({},t._private.options.layout);a.eles=t.elements(),t.layout(a).run()}(a,(function(){t.startAnimationLoop(),l.ready=!0,T(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,u=Ft(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(k(n.roots))e=n.roots;else if(D(n.roots)){for(var c=[],h=0;h0;){var M=A.shift(),I=N(M,L);if(I)M.outgoers().filter((function(e){return e.isNode()&&i.has(e)})).forEach(S);else if(null===I){We("Detected double maximal shift for node `"+M.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}C();var O=0;if(n.avoidOverlap)for(var P=0;P0&&y[0].length<=3?l/2:0),h=2*Math.PI/y[r].length*i;return 0===r&&1===y[0].length&&(c=1),{x:W+c*Math.cos(h),y:$+c*Math.sin(h)}}return{x:W+(i+1-(a+1)/2)*o,y:(r+1)*s}})),this};var fs={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function vs(e){this.options=H({},fs,e)}vs.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var o,s=Ft(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/a.length:t.sweep)/Math.max(1,a.length-1),h=0,d=0;d1&&t.avoidOverlap){h*=1.75;var v=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(h*h/(v*v+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,(function(e,n){var r=t.startAngle+n*c*(i?1:-1),a=o*Math.cos(r),s=o*Math.sin(r);return{x:l+a,y:u+s}})),this};var ys,ms={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function bs(e){this.options=H({},ms,e)}bs.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,i=t.eles,a=i.nodes().not(":parent"),o=Ft(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,h=0;h0&&Math.abs(m[0].value-x.value)>=v&&(m=[],y.push(m)),m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,_=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,_)}for(var T=0,D=0;D1&&t.avoidOverlap){var k=Math.cos(A)-Math.cos(0),L=Math.sin(A)-Math.sin(0),S=Math.sqrt(w*w/(k*k+L*L));T=Math.max(S,T)}C.r=T,T+=w}if(t.equidistant){for(var M=0,I=0,O=0;O=e.numIter||(As(r,e),r.temperature=r.temperature*e.coolingFactor,r.temperature=e.animationThreshold&&a(),Ce(t)):(Gs(r,e),s())}();else{for(;u;)u=o(l),l++;Gs(r,e),s()}return this},ws.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},ws.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Es=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=Ft(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=n.eles.components(),l={},u=0;u0)for(o.graphSet.push(w),u=0;ur.count?0:r.graph},Ts=function e(t,n,r,i){var a=i.graphSet[r];if(-10)var s=(u=r.nodeOverlap*o)*i/(f=Math.sqrt(i*i+a*a)),l=u*a/f;else{var u,c=Is(e,i,a),h=Is(t,-1*i,-1*a),d=h.x-c.x,p=h.y-c.y,g=d*d+p*p,f=Math.sqrt(g);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/g)*d/f,l=u*p/f}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Ms=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Is=function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,l=a/o,u={};return 0===t&&0n?(u.x=r,u.y=i+a/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=i-o*n/2/t,u):0=l)?(u.x=r+a*t/2/n,u.y=i+a/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-a*t/2/n,u.y=i-a/2,u):u},Os=function(e,t){for(var n=0;n1){var g=t.gravity*h/p,f=t.gravity*d/p;c.offsetX+=g,c.offsetY+=f}}}}},Rs=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],l=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else i={x:e,y:t};return i},zs=function e(t,n){var r=t.parentId;if(null!=r){var i=n.layoutNodes[n.idToIndex[r]],a=!1;return(null==i.maxX||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,a=!0),(null==i.minX||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,a=!0),(null==i.minY||t.minY-i.padTopg&&(h+=p+t.componentSpacing,c=0,d=0,p=0)}}},Ys={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Vs(e){this.options=H({},Ys,e)}Vs.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var a=Ft(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===a.h||0===a.w)r.nodes().layoutPositions(this,t,(function(e){return{x:a.x1,y:a.y1}}));else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),u=Math.round(a.w/a.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},h=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},d=t.rows,p=null!=t.cols?t.cols:t.columns;if(null!=d&&null!=p)l=d,u=p;else if(null!=d&&null==p)l=d,u=Math.ceil(o/l);else if(null==d&&null!=p)u=p,l=Math.ceil(o/u);else if(u*l>o){var g=c(),f=h();(g-1)*f>=o?c(g-1):(f-1)*g>=o&&h(f-1)}else for(;u*l=o?h(y+1):c(v+1)}var m=a.w/u,b=a.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(S=0,L++)},I={},O=0;O(r=Zt(e,t,x[w],x[w+1],x[w+2],x[w+3])))return v(n,r),!0}else if("bezier"===a.edgeType||"multibezier"===a.edgeType||"self"===a.edgeType||"compound"===a.edgeType)for(x=a.allpts,w=0;w+5(r=Kt(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return v(n,r),!0;m=m||i.source,b=b||i.target;var E=o.getArrowWidth(l,c),_=[{name:"source",x:a.arrowStartX,y:a.arrowStartY,angle:a.srcArrowAngle},{name:"target",x:a.arrowEndX,y:a.arrowEndY,angle:a.tgtArrowAngle},{name:"mid-source",x:a.midX,y:a.midY,angle:a.midsrcArrowAngle},{name:"mid-target",x:a.midX,y:a.midY,angle:a.midtgtArrowAngle}];for(w=0;w<_.length;w++){var T=_[w],D=s.arrowShapes[n.pstyle(T.name+"-arrow-shape").value],C=n.pstyle("width").pfValue;if(D.roughCollide(e,t,E,T.angle,{x:T.x,y:T.y},C,d)&&D.collide(e,t,E,T.angle,{x:T.x,y:T.y},C,d))return v(n),!0}h&&u.length>0&&(y(m),y(b))}function b(e,t,n){return nt(e,t,n)}function x(n,r){var i,a=n._private,o=g;i=r?r+"-":"",n.boundingBox();var s=a.labelBounds[r||"main"],l=n.pstyle(i+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(a.rscratch,"labelX",r),c=b(a.rscratch,"labelY",r),h=b(a.rscratch,"labelAngle",r),d=n.pstyle(i+"text-margin-x").pfValue,p=n.pstyle(i+"text-margin-y").pfValue,f=s.x1-o-d,y=s.x2+o-d,m=s.y1-o-p,x=s.y2+o-p;if(h){var w=Math.cos(h),E=Math.sin(h),_=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},T=_(f,m),D=_(f,x),C=_(y,m),N=_(y,x),A=[T.x+d,T.y+p,C.x+d,C.y+p,N.x+d,N.y+p,D.x+d,D.y+p];if(Qt(e,t,A))return v(n),!0}else if(jt(s,e,t))return v(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){for(var i,a,o=this.getCachedZSortedEles().interactive,s=[],l=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),h=Math.max(t,r),d=Ft({x1:e=l,y1:t=c,x2:n=u,y2:r=h}),p=0;p4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(function(e,t,n,r,i){var a,o;if(e!==ml?wl(t,e,bl):((o=bl).x=-1*(a=xl).x,o.y=-1*a.y,o.nx=-1*a.nx,o.ny=-1*a.ny,o.ang=a.ang>0?-(Math.PI-a.ang):Math.PI+a.ang),wl(t,n,xl),il=bl.nx*xl.ny-bl.ny*xl.nx,al=bl.nx*xl.nx-bl.ny*-xl.ny,ll=Math.asin(Math.max(-1,Math.min(1,il))),Math.abs(ll)<1e-6)return nl=t.x,rl=t.y,void(cl=dl=0);ol=1,sl=!1,al<0?ll<0?ll=Math.PI+ll:(ll=Math.PI-ll,ol=-1,sl=!0):ll>0&&(ol=-1,sl=!0),dl=void 0!==t.radius?t.radius:r,ul=ll/2,pl=Math.min(bl.len/2,xl.len/2),i?(hl=Math.abs(Math.cos(ul)*dl/Math.sin(ul)))>pl?(hl=pl,cl=Math.abs(hl*Math.sin(ul)/Math.cos(ul))):cl=dl:(hl=Math.min(pl,dl),cl=Math.abs(hl*Math.sin(ul)/Math.cos(ul))),vl=t.x+xl.nx*hl,yl=t.y+xl.ny*hl,nl=vl-xl.ny*cl*ol,rl=yl+xl.nx*cl*ol,gl=t.x+bl.nx*hl,fl=t.y+bl.ny*hl,ml=t}(e,t,n,r,i),{cx:nl,cy:rl,radius:cl,startX:gl,startY:fl,stopX:vl,stopY:yl,startAngle:bl.ang+Math.PI/2*ol,endAngle:xl.ang-Math.PI/2*ol,counterClockwise:sl})}var Tl={};function Dl(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},N=C(T,E),A=C(D,_),k=!1;"auto"===v?f=Math.abs(N)>Math.abs(A)?i:r:v===l||v===s?(f=r,k=!0):v!==a&&v!==o||(f=i,k=!0);var L,S=f===r,M=S?A:N,I=S?D:T,O=St(I),P=!1;k&&(m||x)||!(v===s&&I<0||v===l&&I>0||v===a&&I>0||v===o&&I<0)||(M=(O*=-1)*Math.abs(M),P=!0);var R=function(e){return Math.abs(e)=Math.abs(M)},B=R(L=m?(b<0?1+b:b)*M:(b<0?M:0)+b*O),F=R(Math.abs(M)-Math.abs(L));if(!B&&!F||P)if(S){var z=u.y1+L+(g?h/2*O:0),G=u.x1,Y=u.x2;n.segpts=[G,z,Y,z]}else{var V=u.x1+L+(g?c/2*O:0),X=u.y1,U=u.y2;n.segpts=[V,X,V,U]}else if(S){var j=Math.abs(I)<=h/2,q=Math.abs(T)<=d/2;if(j){var H=(u.x1+u.x2)/2,W=u.y1,$=u.y2;n.segpts=[H,W,H,$]}else if(q){var K=(u.y1+u.y2)/2,Z=u.x1,Q=u.x2;n.segpts=[Z,K,Q,K]}else n.segpts=[u.x1,u.y2]}else{var J=Math.abs(I)<=c/2,ee=Math.abs(D)<=p/2;if(J){var te=(u.y1+u.y2)/2,ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else if(ee){var ie=(u.x1+u.x2)/2,ae=u.y1,oe=u.y2;n.segpts=[ie,ae,ie,oe]}else n.segpts=[u.x2,u.y1]}if(n.isRound){var se=e.pstyle("taxi-radius").value,le="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(le)}},Tl.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,h=t.srcCornerRadius,d=t.tgtCornerRadius,p=t.srcRs,g=t.tgtRs,f=!N(n.startX)||!N(n.startY),v=!N(n.arrowStartX)||!N(n.arrowStartY),y=!N(n.endX)||!N(n.endY),m=!N(n.arrowEndX)||!N(n.arrowEndY),b=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,x=Mt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=xd.poolIndex()){var p=h;h=d,d=p}var g=s.srcPos=h.position(),f=s.tgtPos=d.position(),v=s.srcW=h.outerWidth(),y=s.srcH=h.outerHeight(),m=s.tgtW=d.outerWidth(),b=s.tgtH=d.outerHeight(),x=s.srcShape=n.nodeShapes[t.getNodeShape(h)],w=s.tgtShape=n.nodeShapes[t.getNodeShape(d)],E=s.srcCornerRadius="auto"===h.pstyle("corner-radius").value?"auto":h.pstyle("corner-radius").pfValue,_=s.tgtCornerRadius="auto"===d.pstyle("corner-radius").value?"auto":d.pstyle("corner-radius").pfValue,T=s.tgtRs=d._private.rscratch,D=s.srcRs=h._private.rscratch;s.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var C=0;C0){var q=u,H=It(q,At(t)),W=It(q,At(j)),$=H;W2&&It(q,{x:j[2],y:j[3]})<$&&(t=[j[2],j[3]])}}var K=ln(t,n,o.arrowShapes[h].spacing(e)+p),Z=ln(t,n,o.arrowShapes[h].gap(e)+p);if(m.endX=Z[0],m.endY=Z[1],m.arrowEndX=K[0],m.arrowEndY=K[1],"inside-to-node"===k)t=[u.x,u.y];else if(A.units)t=this.manualEndptToPx(s,A);else if("outside-to-line"===k)t=m.srcIntn;else if("outside-to-node"===k||"outside-to-node-or-label"===k?a=r:"outside-to-line"!==k&&"outside-to-line-or-label"!==k||(a=[c.x,c.y]),t=o.nodeShapes[this.getNodeShape(s)].intersectLine(u.x,u.y,s.outerWidth(),s.outerHeight(),a[0],a[1],0,L,f),"outside-to-node-or-label"===k||"outside-to-line-or-label"===k){var Q=s._private.rscratch,J=Q.labelWidth,ee=Q.labelHeight,te=Q.labelX,ne=Q.labelY,re=J/2,ie=ee/2,ae=s.pstyle("text-valign").value;"top"===ae?ne-=ie:"bottom"===ae&&(ne+=ie);var oe=s.pstyle("text-halign").value;"left"===oe?te-=re:"right"===oe&&(te+=re);var se=sn(a[0],a[1],[te-re,ne-ie,te+re,ne-ie,te+re,ne+ie,te-re,ne+ie],u.x,u.y);if(se.length>0){var le=c,ue=It(le,At(t)),ce=It(le,At(se)),he=ue;ce2&&It(le,{x:se[2],y:se[3]})=u||m){c={cp:f,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-d)/x.length,E=x.t1-x.t0,_=s?x.t0+E*w:x.t1-E*w;_=Bt(0,_,1),t=Rt(b.p0,b.p1,b.p2,_),i=function(e,t,n,r){var i=Bt(0,r-.001,1),a=Bt(0,r+.001,1),o=Rt(e,t,n,i),s=Rt(e,t,n,a);return Sl(o,s)}(b.p0,b.p1,b.p2,_);break;case"straight":case"segments":case"haystack":for(var T,D,C,N,A=0,k=r.allpts.length,L=0;L+3=u));L+=2);var S=(u-D)/T;S=Bt(0,S,1),t=function(e,t,n,r){var i=t.x-e.x,a=t.y-e.y,o=Mt(e,t),s=i/o,l=a/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(C,N,S),i=Sl(C,N)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,i)}};u("source"),u("target"),this.applyLabelDimensions(e)}},kl.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},kl.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=this.calculateLabelDimensions(e,r),a=e.pstyle("line-height").pfValue,o=e.pstyle("text-wrap").strValue,s=nt(n.rscratch,"labelWrapCachedLines",t)||[],l="wrap"!==o?1:Math.max(s.length,1),u=i.height/l,c=u*a,h=i.width,d=i.height+(l-1)*(a-1)*u;rt(n.rstyle,"labelWidth",t,h),rt(n.rscratch,"labelWidth",t,h),rt(n.rstyle,"labelHeight",t,d),rt(n.rscratch,"labelHeight",t,d),rt(n.rscratch,"labelLineHeight",t,c)},kl.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",i=e.pstyle(r+"label").strValue,a=e.pstyle("text-transform").value,o=function(e,r){return r?(rt(n.rscratch,e,t,r),r):nt(n.rscratch,e,t)};if(!i)return"";"none"==a||("uppercase"==a?i=i.toUpperCase():"lowercase"==a&&(i=i.toLowerCase()));var s=e.pstyle("text-wrap").value;if("wrap"===s){var l=o("labelKey");if(null!=l&&o("labelWrapKey")===l)return o("labelWrapCachedText");for(var u=i.split("\n"),c=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,d=[],p=/[\s\u200b]+|$/g,g=0;gc){var b,x="",w=0,E=f(v.matchAll(p));try{for(E.s();!(b=E.n()).done;){var _=b.value,T=_[0],D=v.substring(w,_.index);w=_.index+T.length;var C=0===x.length?D:x+D+T;this.calculateLabelDimensions(e,C).width<=c?x+=D+T:(x&&d.push(x),x=D+T)}}catch(e){E.e(e)}finally{E.f()}x.match(/^[\s\u200b]+$/)||d.push(x)}else d.push(v)}o("labelWrapCachedLines",d),i=o("labelWrapCachedText",d.join("\n")),o("labelWrapKey",l)}else if("ellipsis"===s){var N=e.pstyle("text-max-width").pfValue,A="",k=!1;if(this.calculateLabelDimensions(e,i).widthN);L++)A+=i[L],L===i.length-1&&(k=!0);return k||(A+="…"),A}return i},kl.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},kl.calculateLabelDimensions=function(e,t){var n=this,r=n.cy.window().document,i=Pe(t,e._private.labelDimsKey),a=n.labelDimCache||(n.labelDimCache=[]),o=a[i];if(null!=o)return o;var s=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("font-family").strValue,c=e.pstyle("font-weight").strValue,h=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!h){h=this.labelCalcCanvas=r.createElement("canvas"),d=this.labelCalcCanvasContext=h.getContext("2d");var p=h.style;p.position="absolute",p.left="-9999px",p.top="-9999px",p.zIndex="-1",p.visibility="hidden",p.pointerEvents="none"}d.font="".concat(s," ").concat(c," ").concat(l,"px ").concat(u);for(var g=0,f=0,v=t.split("\n"),y=0;y1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var C=i(t);v&&(e.hoverData.tapholdCancelled=!0),n=!0,r(f,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var A=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:c[0],y:c[1]}}),g[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(v){var k={originalEvent:t,type:"cxtdrag",position:{x:c[0],y:c[1]}};m?m.emit(k):o.emit(k),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&f===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:c[0],y:c[1]}}),e.hoverData.cxtOver=f,f&&f.emit({originalEvent:t,type:"cxtdragover",position:{x:c[0],y:c[1]}}))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var L;if(e.hoverData.justStartedPan){var S=e.hoverData.mdownPos;L={x:(c[0]-S[0])*s,y:(c[1]-S[1])*s},e.hoverData.justStartedPan=!1}else L={x:b[0]*s,y:b[1]*s};o.panBy(L),o.emit("dragpan"),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=g[4]||null!=m&&!m.pannable()){if(m&&m.pannable()&&m.active()&&m.unactivate(),m&&m.grabbed()||f==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),f&&r(f,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=f),m)if(v){if(o.boxSelectionEnabled()&&C)m&&m.grabbed()&&(h(x),m.emit("freeon"),x.emit("free"),e.dragData.didDrag&&(m.emit("dragfreeon"),x.emit("dragfree"))),A();else if(m&&m.grabbed()&&e.nodeIsDraggable(m)){var M=!e.dragData.didDrag;M&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(x,{inDragLayer:!0});var I={x:0,y:0};if(N(b[0])&&N(b[1])&&(I.x+=b[0],I.y+=b[1],M)){var O=e.hoverData.dragDelta;O&&N(O[0])&&N(O[1])&&(I.x+=O[0],I.y+=O[1])}e.hoverData.draggingEles=!0,x.silentShift(I).emit("position drag"),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(b[0]),t.push(b[1])):(t[0]+=b[0],t[1]+=b[1])}();n=!0}else v&&(e.hoverData.dragging||!o.boxSelectionEnabled()||!C&&o.panningEnabled()&&o.userPanningEnabled()?!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()&&a(m,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,g[4]=0,e.data.bgActivePosistion=At(d),e.redrawHint("select",!0),e.redraw()):A(),m&&m.pannable()&&m.active()&&m.unactivate());return g[2]=c[0],g[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}}),!1),e.registerBinding(t,"mouseup",(function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var a=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,d=i(t);if(e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate(),3===e.hoverData.which){var p={originalEvent:t,type:"cxttapend",position:{x:o[0],y:o[1]}};if(c?c.emit(p):a.emit(p),!e.hoverData.cxtDragged){var g={originalEvent:t,type:"cxttap",position:{x:o[0],y:o[1]}};c?c.emit(g):a.emit(g)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),b=!1,t.timeStamp-x<=a.multiClickDebounceTime()?(m&&clearTimeout(m),b=!0,x=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(m=setTimeout((function(){b||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})}),a.multiClickDebounceTime()),x=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||i(t)||(a.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=a.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===a.selectionType()||d?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):d||(a.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var f=a.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),f.length>0&&e.redrawHint("eles",!0),a.emit({type:"boxend",originalEvent:t,position:{x:o[0],y:o[1]}});"additive"===a.selectionType()||d||a.$(n).unmerge(f).unselect(),f.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var v=c&&c.grabbed();h(u),v&&(c.emit("freeon"),u.emit("free"),e.dragData.didDrag&&(c.emit("dragfreeon"),u.emit("dragfree")))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}}),!1);var E,_,T,D,C,A,k,L,S,M,I,O,P,R=function(t){if(!e.scrollingPage){var n=e.cy,r=n.zoom(),i=n.pan(),a=e.projectIntoViewport(t.clientX,t.clientY),o=[a[0]*r+i.x,a[1]*r+i.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||0!==e.selection[4])t.preventDefault();else if(n.panningEnabled()&&n.userPanningEnabled()&&n.zoomingEnabled()&&n.userZoomingEnabled()){var s;t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout((function(){e.data.wheelZooming=!1,e.redrawHint("eles",!0),e.redraw()}),150),s=null!=t.deltaY?t.deltaY/-250:null!=t.wheelDeltaY?t.wheelDeltaY/1e3:t.wheelDelta/1e3,s*=e.wheelSensitivity,1===t.deltaMode&&(s*=33);var l=n.zoom()*Math.pow(10,s);"gesturechange"===t.type&&(l=e.gestureStartZoom*t.scale),n.zoom({level:l,renderedPosition:{x:o[0],y:o[1]}}),n.emit("gesturechange"===t.type?"pinchzoom":"scrollzoom")}}};e.registerBinding(e.container,"wheel",R,!0),e.registerBinding(t,"scroll",(function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout((function(){e.scrollingPage=!1}),250)}),!0),e.registerBinding(e.container,"gesturestart",(function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()}),!0),e.registerBinding(e.container,"gesturechange",(function(t){e.hasTouchStarted||R(t)}),!0),e.registerBinding(e.container,"mouseout",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})}),!1),e.registerBinding(e.container,"mouseover",(function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})}),!1);var B,F,z,G,Y,V,X,U=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},j=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",B=function(t){if(e.hasTouchStarted=!0,w(t)){p(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,i=e.touchData.now,a=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);i[0]=o[0],i[1]=o[1]}if(t.touches[1]&&(o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),i[2]=o[0],i[3]=o[1]),t.touches[2]&&(o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),i[4]=o[0],i[5]=o[1]),t.touches[1]){e.touchData.singleTouchMoved=!0,h(e.dragData.touchDragEles);var l=e.findContainerClientCoords();S=l[0],M=l[1],I=l[2],O=l[3],E=t.touches[0].clientX-S,_=t.touches[0].clientY-M,T=t.touches[1].clientX-S,D=t.touches[1].clientY-M,P=0<=E&&E<=I&&0<=T&&T<=I&&0<=_&&_<=O&&0<=D&&D<=O;var d=n.pan(),g=n.zoom();if(C=U(E,_,T,D),A=j(E,_,T,D),L=[((k=[(E+T)/2,(_+D)/2])[0]-d.x)/g,(k[1]-d.y)/g],A<4e4&&!t.touches[2]){var f=e.findNearestElement(i[0],i[1],!0,!0),v=e.findNearestElement(i[2],i[3],!0,!0);return f&&f.isNode()?(f.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=f):v&&v.isNode()?(v.activate().emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start=v):n.emit({originalEvent:t,type:"cxttapstart",position:{x:i[0],y:i[1]}}),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var y=e.findNearestElements(i[0],i[1],!0,!0),m=y[0];if(null!=m&&(m.activate(),e.touchData.start=m,e.touchData.starts=y,e.nodeIsGrabbable(m))){var b=e.dragData.touchDragEles=n.collection(),x=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),m.selected()?(x=n.$((function(t){return t.selected()&&e.nodeIsGrabbable(t)})),u(x,{addToList:b})):c(m,{addToList:b}),s(m);var N=function(e){return{originalEvent:t,type:e,position:{x:i[0],y:i[1]}}};m.emit(N("grabon")),x?x.forEach((function(e){e.emit(N("grab"))})):m.emit(N("grab"))}r(m,["touchstart","tapstart","vmousedown"],t,{x:i[0],y:i[1]}),null==m&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout((function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:i[0],y:i[1]})}),e.tapholdDuration)}if(t.touches.length>=1){for(var R=e.touchData.startPosition=[null,null,null,null,null,null],B=0;B=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-S,k=t.touches[0].clientY-M,I=t.touches[1].clientX-S,O=t.touches[1].clientY-M,R=j(x,k,I,O);if(R/A>=2.25||R>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var B={originalEvent:t,type:"cxttapend",position:{x:s[0],y:s[1]}};e.touchData.start?(e.touchData.start.unactivate().emit(B),e.touchData.start=null):o.emit(B)}}if(n&&e.touchData.cxt){B={originalEvent:t,type:"cxtdrag",position:{x:s[0],y:s[1]}},e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(B):o.emit(B),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var F=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&F===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:s[0],y:s[1]}}),e.touchData.cxtOver=F,F&&F.emit({originalEvent:t,type:"cxtdragover",position:{x:s[0],y:s[1]}}))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit({originalEvent:t,type:"boxstart",position:{x:s[0],y:s[1]}}),e.touchData.selecting=!0,e.touchData.didSelect=!0,i[4]=1,i&&0!==i.length&&void 0!==i[0]?(i[2]=(s[0]+s[2]+s[4])/3,i[3]=(s[1]+s[3]+s[5])/3):(i[0]=(s[0]+s[2]+s[4])/3,i[1]=(s[1]+s[3]+s[5])/3,i[2]=(s[0]+s[2]+s[4])/3+1,i[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),ee=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var z=0;z0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",z=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",G=function(t){var i=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var a=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o,s=e.cy,l=s.zoom(),u=e.touchData.now,c=e.touchData.earlier;if(t.touches[0]){var d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);u[0]=d[0],u[1]=d[1]}if(t.touches[1]&&(d=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY),u[2]=d[0],u[3]=d[1]),t.touches[2]&&(d=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY),u[4]=d[0],u[5]=d[1]),i&&i.unactivate(),e.touchData.cxt){if(o={originalEvent:t,type:"cxttapend",position:{x:u[0],y:u[1]}},i?i.emit(o):s.emit(o),!e.touchData.cxtDragged){var p={originalEvent:t,type:"cxttap",position:{x:u[0],y:u[1]}};i?i.emit(p):s.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&s.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var g=s.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,e.redrawHint("select",!0),s.emit({type:"boxend",originalEvent:t,position:{x:u[0],y:u[1]}}),g.emit("box").stdFilter((function(e){return e.selectable()&&!e.selected()})).select().emit("boxselect"),g.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=i&&i.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var f=e.dragData.touchDragEles;if(null!=i){var v=i._private.grabbed;h(f),e.redrawHint("drag",!0),e.redrawHint("eles",!0),v&&(i.emit("freeon"),f.emit("free"),e.dragData.didDrag&&(i.emit("dragfreeon"),f.emit("dragfree"))),r(i,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]}),i.unactivate(),e.touchData.start=null}else{var y=e.findNearestElement(u[0],u[1],!0,!0);r(y,["touchend","tapend","vmouseup","tapdragout"],t,{x:u[0],y:u[1]})}var m=e.touchData.startPosition[0]-u[0],b=m*m,x=e.touchData.startPosition[1]-u[1],w=(b+x*x)*l*l;e.touchData.singleTouchMoved||(i||s.$(":selected").unselect(["tapunselect"]),r(i,["tap","vclick"],t,{x:u[0],y:u[1]}),Y=!1,t.timeStamp-X<=s.multiClickDebounceTime()?(V&&clearTimeout(V),Y=!0,X=null,r(i,["dbltap","vdblclick"],t,{x:u[0],y:u[1]})):(V=setTimeout((function(){Y||r(i,["onetap","voneclick"],t,{x:u[0],y:u[1]})}),s.multiClickDebounceTime()),X=t.timeStamp)),null!=i&&!e.dragData.didDrag&&i._private.selectable&&w2){for(var p=[c[0],c[1]],g=Math.pow(p[0]-e,2)+Math.pow(p[1]-t,2),f=1;f0)return f[0]}return null},p=Object.keys(h),g=0;g0?u:Ht(i,a,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,i,a,o,s){var l=2*(s="auto"===s?dn(r,i):s);if(Jt(e,t,this.points,a,o,r,i-l,[0,-1],n))return!0;if(Jt(e,t,this.points,a,o,r-l,i,[0,-1],n))return!0;var u=r/2+2*n,c=i/2+2*n;return!!Qt(e,t,[a-u,o-c,a-u,o,a+u,o,a+u,o-c])||!!nn(e,t,l,l,a+r/2-s,o+i/2-s,n)||!!nn(e,t,l,l,a-r/2+s,o+i/2-s,n)}}},registerNodeShapes:function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",un(3,0)),this.generateRoundPolygon("round-triangle",un(3,0)),this.generatePolygon("rectangle",un(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",un(5,0)),this.generateRoundPolygon("round-pentagon",un(5,0)),this.generatePolygon("hexagon",un(6,0)),this.generateRoundPolygon("round-hexagon",un(6,0)),this.generatePolygon("heptagon",un(7,0)),this.generateRoundPolygon("round-heptagon",un(7,0)),this.generatePolygon("octagon",un(8,0)),this.generateRoundPolygon("round-octagon",un(8,0));var r=new Array(20),i=hn(5,0),a=hn(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*f)break}else if(i){if(p>=e.deqCost*l||p>=e.deqAvgCost*s)break}else if(g>=e.deqNoDrawCost*Xl)break;var v=e.deq(t,h,c);if(!(v.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,h,c)&&r())}),i(t))}}},jl=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xe;l(this,e),this.idsByKey=new it,this.keyForId=new it,this.cachesByLvl=new it,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return c(e,[{key:"getIdsFor",value:function(e){null==e&&qe("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new ot,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new it,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach((function(n){return t.deleteCache(e,n)}))}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}]),e}(),ql={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Hl=Je({getKey:null,doesEleInvalidateKey:Xe,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Ve,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Wl=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=Hl(t);H(n,r),n.lookup=new jl(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},$l=Wl.prototype;$l.reasons=ql,$l.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},$l.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},$l.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new dt((function(e,t){return t.reqs-e.reqs}))},$l.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},$l.getElement=function(e,t,n,r,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Lt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,h=t.w*u,d=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,d))return null;var p,g=l.get(e,r);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;if(p=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||h>1024)return null;var f=a.getTextureQueue(p),v=f[f.length-2],y=function(){return a.recycleTexture(p,h)||a.addTexture(p,h)};v||(v=f[f.length-1]),v||(v=y()),v.width-v.usedWidthr;N--)D=a.getElement(e,t,n,N,ql.downscale);C()}else{var A;if(!x&&!w&&!E)for(var k=r-1;k>=-4;k--){var L=l.get(e,k);if(L){A=L;break}}if(b(A))return a.queueElement(e,r),A;v.context.translate(v.usedWidth,0),v.context.scale(u,u),this.drawElement(v.context,e,t,d,!1),v.context.scale(1/u,1/u),v.context.translate(-v.usedWidth,0)}return g={x:v.usedWidth,texture:v,level:r,scale:u,width:h,height:c,scaledLabelShown:d},v.usedWidth+=Math.ceil(h+8),v.eleCaches.push(g),l.set(e,r,g),a.checkTextureFullness(v),g},$l.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},$l.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?et(t,e):e.fullnessChecks++},$l.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;et(n,e),e.retired=!0;for(var i=e.eleCaches,a=0;a=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,tt(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),et(r,a),n.push(a),a}},$l.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),i=this.getKey(e),a=r[i];if(a)a.level=Math.max(a.level,t),a.eles.merge(e),a.reqs++,n.updateItem(a);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:i};n.push(o),r[i]=o}},$l.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=a.hasCache(u,s.level);if(r[l]=null,!c){i.push(s);var h=t.getBoundingBox(u);t.getElement(u,h,e,s.level,ql.dequeue)}}return i},$l.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),i=n[r];null!=i&&(1===i.eles.length?(i.reqs=Ye,t.updateItem(i),t.pop(),n[r]=null):i.eles.unmerge(e))},$l.onDequeue=function(e){this.onDequeues.push(e)},$l.offDequeue=function(e){et(this.onDequeues,e)},$l.setupDequeueing=Ul({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},i=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};i(1),i(-1);for(var a=c.length-1;a>=0;a--){var o=c[a];o.invalid&&et(c,o)}}();var h=function(t){var i=(t=t||{}).after;if(function(){if(!o){o=Ft();for(var t=0;t16e6)return null;var a=r.makeLayer(o,n);if(null!=i){var s=c.indexOf(i)+1;c.splice(s,0,a)}else(void 0===t.insert||t.insert)&&c.unshift(a);return a};if(r.skipping&&!a)return null;for(var d=null,p=e.length/1,g=!a,f=0;f=p||!qt(d.bb,v.boundingBox()))&&!(d=h({insert:!0,after:d})))return null;s||g?r.queueLayer(d,v):r.drawEleInLayer(d,v,n,t),d.eles.push(v),m[n]=d}}return s||(g?null:c)},Zl.getEleLevelForLayerLevel=function(e,t){return e},Zl.drawEleInLayer=function(e,t,n,r){var i=this.renderer,a=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),i.setImgSmoothing(a,!1),i.drawCachedElement(a,t,null,null,n,!0),i.setImgSmoothing(a,!0))},Zl.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,i=0;i0)return!1;if(a.invalid)return!1;r+=a.eles.length}return r===t.length},Zl.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},Zl.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Ne(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,(function(e,n,r){t.invalidateLayer(e)})))},Zl.invalidateLayer=function(e){if(this.lastInvalidationTime=Ne(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];et(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!a||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=a?t.pstyle("opacity").value:1,c=a?t.pstyle("line-opacity").value:1,h=t.pstyle("curve-style").value,d=t.pstyle("line-style").value,p=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,f=t.pstyle("line-outline-width").value,v=t.pstyle("line-outline-color").value,y=u*c,m=u*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===h?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=g,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,d),e.lineCap="butt")},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,E=t.pstyle("ghost-offset-y").pfValue,_=t.pstyle("ghost-opacity").value,T=y*_;e.translate(w,E),b(T),x(T),e.translate(-w,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=p+f,e.lineCap=g,f>0?(o.colorStrokeStyle(e,v[0],v[1],v[2],n),"straight-triangle"===h?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,d),e.lineCap="butt")):e.lineCap="butt"}();i&&o.drawEdgeUnderlay(e,t),b(),x(),i&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},fu=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||a?t.lineCap="round":t.lineCap="butt",i.colorStrokeStyle(t,l[0],l[1],l[2],r),i.drawEdgePath(n,t,o.allpts,"solid")}}}};gu.drawEdgeOverlay=fu("overlay"),gu.drawEdgeUnderlay=fu("underlay"),gu.drawEdgePath=function(e,t,n,r){var i,a=e._private.rscratch,o=t,s=!1,l=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,c=e.pstyle("line-dash-offset").pfValue;if(l){var h=n.join("$");a.pathCacheKey&&a.pathCacheKey===h?(i=t=a.pathCache,s=!0):(i=t=new Path2D,a.pathCacheKey=h,a.pathCache=i)}if(o.setLineDash)switch(r){case"dotted":o.setLineDash([1,1]);break;case"dashed":o.setLineDash(u),o.lineDashOffset=c;break;case"solid":o.setLineDash([])}if(!s&&!a.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),a.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var d=2;d+35&&void 0!==arguments[5]?arguments[5]:5,o=arguments.length>6?arguments[6]:void 0;e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath(),o?e.stroke():e.fill()}yu.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),i=Math.ceil(Lt(n*r));t=Math.pow(2,i)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(a&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),h=t.pstyle("source-label"),d=t.pstyle("target-label");if(u||(!c||!c.value)&&(!h||!h.value)&&(!d||!d.value))return;e.textAlign="center",e.textBaseline="bottom"}var p,g=!n;n&&(p=n,e.translate(-p.x1,-p.y1)),null==i?(o.drawText(e,t,null,g,a),t.isEdge()&&(o.drawText(e,t,"source",g,a),o.drawText(e,t,"target",g,a))):o.drawText(e,t,i,g,a),n&&e.translate(p.x1,p.y1)},yu.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+i+" "+a,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},yu.getTextAngle=function(e,t){var n=e._private.rscratch,r=t?t+"-":"",i=e.pstyle(r+"text-rotation"),a=nt(n,"labelAngle",t);return"autorotate"===i.strValue?e.isEdge()?a:0:"none"===i.strValue?0:i.pfValue},yu.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!i||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=nt(a,"labelX",n),c=nt(a,"labelY",n),h=this.getLabelText(t,n);if(null!=h&&""!==h&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,i);var d,p=n?n+"-":"",g=nt(a,"labelWidth",n),f=nt(a,"labelHeight",n),v=t.pstyle(p+"text-margin-x").pfValue,y=t.pstyle(p+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=v,c+=y,0!==(d=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(d),u=0,c=0),x){case"top":break;case"center":c+=f/2;break;case"bottom":c+=f}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,_=t.pstyle("text-border-width").pfValue,T=t.pstyle("text-background-padding").pfValue,D=0===t.pstyle("text-background-shape").strValue.indexOf("round");if(w>0||_>0&&E>0){var C=u-T;switch(b){case"left":C-=g;break;case"center":C-=g/2}var N=c-f-T,A=g+2*T,k=f+2*T;if(w>0){var L=e.fillStyle,S=t.pstyle("text-background-color").value;e.fillStyle="rgba("+S[0]+","+S[1]+","+S[2]+","+w*o+")",D?mu(e,C,N,A,k,2):e.fillRect(C,N,A,k),e.fillStyle=L}if(_>0&&E>0){var M=e.strokeStyle,I=e.lineWidth,O=t.pstyle("text-border-color").value,P=t.pstyle("text-border-style").value;if(e.strokeStyle="rgba("+O[0]+","+O[1]+","+O[2]+","+E*o+")",e.lineWidth=_,e.setLineDash)switch(P){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=_/4,e.setLineDash([]);break;case"solid":e.setLineDash([])}if(D?mu(e,C,N,A,k,2,"stroke"):e.strokeRect(C,N,A,k),"double"===P){var R=_/2;D?mu(e,C+R,N+R,A-2*R,k-2*R,2,"stroke"):e.strokeRect(C+R,N+R,A-2*R,k-2*R)}e.setLineDash&&e.setLineDash([]),e.lineWidth=I,e.strokeStyle=M}}var B=2*t.pstyle("text-outline-width").pfValue;if(B>0&&(e.lineWidth=B),"wrap"===t.pstyle("text-wrap").value){var F=nt(a,"labelWrapCachedLines",n),z=nt(a,"labelLineHeight",n),G=g/2,Y=this.getLabelJustification(t);switch("auto"===Y||("left"===b?"left"===Y?u+=-g:"center"===Y&&(u+=-G):"center"===b?"left"===Y?u+=-G:"right"===Y&&(u+=G):"right"===b&&("center"===Y?u+=G:"right"===Y&&(u+=g))),x){case"top":case"center":case"bottom":c-=(F.length-1)*z}for(var V=0;V0&&e.strokeText(F[V],u,c),e.fillText(F[V],u,c),c+=z}else B>0&&e.strokeText(h,u,c),e.fillText(h,u,c);0!==d&&(e.rotate(-d),e.translate(-s,-l))}}};var bu={drawNode:function(e,t,n){var r,i,a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,h=t.position();if(N(h.x)&&N(h.y)&&(!s||t.visible())){var d,p,g=s?t.effectiveOpacity():1,f=l.usePaths(),v=!1,y=t.padding();r=t.width()+2*y,i=t.height()+2*y,n&&(p=n,e.translate(-p.x1,-p.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:A;l.eleFillStyle(e,t,n)},U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:R;l.colorStrokeStyle(e,k[0],k[1],k[2],t)},j=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G;l.colorStrokeStyle(e,F[0],F[1],F[2],t)},q=function(e,t,n,r){var i,a=l.nodePathCache=l.nodePathCache||[],o=Re("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+V),s=a[o],u=!1;return null!=s?(i=s,u=!0,c.pathCache=i):(i=new Path2D,a[o]=c.pathCache=i),{path:i,cacheHit:u}},H=t.pstyle("shape").strValue,W=t.pstyle("shape-polygon-points").pfValue;if(f){e.translate(h.x,h.y);var $=q(r,i,H,W);d=$.path,v=$.cacheHit}var K=function(){if(!v){var n=h;f&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(d||e,n.x,n.y,r,i,V,c)}f?e.fill(d):e.fill()},Z=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=u.backgrounding,a=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g;l.hasPie(t)&&(l.drawPie(e,t,a),n&&(f||l.nodeShapes[l.getNodeShape(t)].draw(e,h.x,h.y,r,i,V,c)))},J=function(){var t=(D>0?D:-D)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:g),n=D>0?0:255;0!==D&&(l.colorFillStyle(e,n,n,n,t),f?e.fill(d):e.fill())},ee=function(){if(C>0){if(e.lineWidth=C,e.lineCap=M,e.lineJoin=S,e.setLineDash)switch(L){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(O),e.lineDashOffset=P;break;case"solid":case"double":e.setLineDash([])}if("center"!==I){if(e.save(),e.lineWidth*=2,"inside"===I)f?e.clip(d):e.clip();else{var t=new Path2D;t.rect(-r/2-C,-i/2-C,r+2*C,i+2*C),t.addPath(d),e.clip(t,"evenodd")}f?e.stroke(d):e.stroke(),e.restore()}else f?e.stroke(d):e.stroke();if("double"===L){e.lineWidth=C/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",f?e.stroke(d):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},te=function(){if(B>0){if(e.lineWidth=B,e.lineCap="butt",e.setLineDash)switch(z){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=h;f&&(n={x:0,y:0});var a=l.getNodeShape(t),o=C;"inside"===I&&(o=0),"outside"===I&&(o*=2);var s,u=(r+o+(B+Y))/r,c=(i+o+(B+Y))/i,d=r*u,p=i*c,g=l.nodeShapes[a].points;if(f&&(s=q(d,p,a,g).path),"ellipse"===a)l.drawEllipsePath(s||e,n.x,n.y,d,p);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(a)){var v=0,y=0,m=0;"round-diamond"===a?v=1.4*(o+Y+B):"round-heptagon"===a?(v=1.075*(o+Y+B),m=-(o/2+Y+B)/35):"round-hexagon"===a?v=1.12*(o+Y+B):"round-pentagon"===a?(v=1.13*(o+Y+B),m=-(o/2+Y+B)/15):"round-tag"===a?(v=1.12*(o+Y+B),y=.07*(o/2+B+Y)):"round-triangle"===a&&(v=(o+Y+B)*(Math.PI/2),m=-(o+Y/2+B)/Math.PI),0!==v&&(d=r*(u=(r+v)/r),["round-hexagon","round-tag"].includes(a)||(p=i*(c=(i+v)/i)));for(var b=d/2,x=p/2,w=(V="auto"===V?pn(d,p):V)+(o+B+Y)/2,E=new Array(g.length/2),_=new Array(g.length/2),T=0;T0){if(r=r||n.position(),null==i||null==a){var h=n.padding();i=n.width()+2*h,a=n.height()+2*h}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,i+2*o,a+2*o,c),t.fill()}}}};bu.drawNodeOverlay=xu("overlay"),bu.drawNodeUnderlay=xu("underlay"),bu.hasPie=function(e){return(e=e[0])._private.hasPie},bu.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var i=t.cy().style(),a=t.pstyle("pie-size"),o=r.x,s=r.y,l=t.width(),u=t.height(),c=Math.min(l,u)/2,h=0;this.usePaths()&&(o=0,s=0),"%"===a.units?c*=a.pfValue:void 0!==a.pfValue&&(c=a.pfValue/2);for(var d=1;d<=i.pieBackgroundN;d++){var p=t.pstyle("pie-"+d+"-background-size").value,g=t.pstyle("pie-"+d+"-background-color").value,f=t.pstyle("pie-"+d+"-background-opacity").value*n,v=p/100;v+h>1&&(v=1-h);var y=1.5*Math.PI+2*Math.PI*h,m=y+2*Math.PI*v;0===p||h>=1||h+v>1||(e.beginPath(),e.moveTo(o,s),e.arc(o,s,c,y,m),e.closePath(),this.colorFillStyle(e,g[0],g[1],g[2],f),e.fill(),h+=v)}};for(var wu={getPixelRatio:function(){var e=this.data.contexts[0];if(null!=this.forcedPixelRatio)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},paintCache:function(e){for(var t,n=this.paintCaches=this.paintCaches||[],r=!0,i=0;io.minMbLowQualFrames&&(o.motionBlurPxRatio=o.mbPxRBlurry)),o.clearingMotionBlur&&(o.motionBlurPxRatio=1),o.textureDrawLastFrame&&!h&&(c[o.NODE]=!0,c[o.SELECT_BOX]=!0);var m=l.style(),b=l.zoom(),x=void 0!==i?i:b,w=l.pan(),E={x:w.x,y:w.y},_={zoom:b,pan:{x:w.x,y:w.y}},T=o.prevViewport;void 0===T||_.zoom!==T.zoom||_.pan.x!==T.pan.x||_.pan.y!==T.pan.y||f&&!g||(o.motionBlurPxRatio=1),a&&(E=a),x*=s,E.x*=s,E.y*=s;var D=o.getCachedZSortedEles();function C(e,t,n,r,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",o.colorFillStyle(e,255,255,255,o.motionBlurTransparency),e.fillRect(t,n,r,i),e.globalCompositeOperation=a}function N(e,r){var s,l,c,h;o.clearingMotionBlur||e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]?(s=E,l=x,c=o.canvasWidth,h=o.canvasHeight):(s={x:w.x*p,y:w.y*p},l=b*p,c=o.canvasWidth*p,h=o.canvasHeight*p),e.setTransform(1,0,0,1,0,0),"motionBlur"===r?C(e,0,0,c,h):t||void 0!==r&&!r||e.clearRect(0,0,c,h),n||(e.translate(s.x,s.y),e.scale(l,l)),a&&e.translate(a.x,a.y),i&&e.scale(i,i)}if(h||(o.textureDrawLastFrame=!1),h){if(o.textureDrawLastFrame=!0,!o.textureCache){o.textureCache={},o.textureCache.bb=l.mutableElements().boundingBox(),o.textureCache.texture=o.data.bufferCanvases[o.TEXTURE_BUFFER];var A=o.data.bufferContexts[o.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,o.canvasWidth*o.textureMult,o.canvasHeight*o.textureMult),o.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:s*o.textureMult}),(_=o.textureCache.viewport={zoom:l.zoom(),pan:l.pan(),width:o.canvasWidth,height:o.canvasHeight}).mpan={x:(0-_.pan.x)/_.zoom,y:(0-_.pan.y)/_.zoom}}c[o.DRAG]=!1,c[o.NODE]=!1;var k=u.contexts[o.NODE],L=o.textureCache.texture;_=o.textureCache.viewport,k.setTransform(1,0,0,1,0,0),d?C(k,0,0,_.width,_.height):k.clearRect(0,0,_.width,_.height);var S=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;o.colorFillStyle(k,S[0],S[1],S[2],M),k.fillRect(0,0,_.width,_.height),b=l.zoom(),N(k,!1),k.clearRect(_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s),k.drawImage(L,_.mpan.x,_.mpan.y,_.width/_.zoom/s,_.height/_.zoom/s)}else o.textureOnViewport&&!t&&(o.textureCache=null);var I=l.extent(),O=o.pinching||o.hoverData.dragging||o.swipePanning||o.data.wheelZooming||o.hoverData.draggingEles||o.cy.animated(),P=o.hideEdgesOnViewport&&O,R=[];if(R[o.NODE]=!c[o.NODE]&&d&&!o.clearedForMotionBlur[o.NODE]||o.clearingMotionBlur,R[o.NODE]&&(o.clearedForMotionBlur[o.NODE]=!0),R[o.DRAG]=!c[o.DRAG]&&d&&!o.clearedForMotionBlur[o.DRAG]||o.clearingMotionBlur,R[o.DRAG]&&(o.clearedForMotionBlur[o.DRAG]=!0),c[o.NODE]||n||r||R[o.NODE]){var B=d&&!R[o.NODE]&&1!==p;N(k=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_NODE]:u.contexts[o.NODE]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(k,D.nondrag,s,I):o.drawLayeredElements(k,D.nondrag,s,I),o.debug&&o.drawDebugPoints(k,D.nondrag),n||d||(c[o.NODE]=!1)}if(!r&&(c[o.DRAG]||n||R[o.DRAG])&&(B=d&&!R[o.DRAG]&&1!==p,N(k=t||(B?o.data.bufferContexts[o.MOTIONBLUR_BUFFER_DRAG]:u.contexts[o.DRAG]),d&&!B?"motionBlur":void 0),P?o.drawCachedNodes(k,D.drag,s,I):o.drawCachedElements(k,D.drag,s,I),o.debug&&o.drawDebugPoints(k,D.drag),n||d||(c[o.DRAG]=!1)),o.showFps||!r&&c[o.SELECT_BOX]&&!n){if(N(k=t||u.contexts[o.SELECT_BOX]),1==o.selection[4]&&(o.hoverData.selecting||o.touchData.selecting)){b=o.cy.zoom();var F=m.core("selection-box-border-width").value/b;k.lineWidth=F,k.fillStyle="rgba("+m.core("selection-box-color").value[0]+","+m.core("selection-box-color").value[1]+","+m.core("selection-box-color").value[2]+","+m.core("selection-box-opacity").value+")",k.fillRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]),F>0&&(k.strokeStyle="rgba("+m.core("selection-box-border-color").value[0]+","+m.core("selection-box-border-color").value[1]+","+m.core("selection-box-border-color").value[2]+","+m.core("selection-box-opacity").value+")",k.strokeRect(o.selection[0],o.selection[1],o.selection[2]-o.selection[0],o.selection[3]-o.selection[1]))}if(u.bgActivePosistion&&!o.hoverData.selecting){b=o.cy.zoom();var z=u.bgActivePosistion;k.fillStyle="rgba("+m.core("active-bg-color").value[0]+","+m.core("active-bg-color").value[1]+","+m.core("active-bg-color").value[2]+","+m.core("active-bg-opacity").value+")",k.beginPath(),k.arc(z.x,z.y,m.core("active-bg-size").pfValue/b,0,2*Math.PI),k.fill()}var G=o.lastRedrawTime;if(o.showFps&&G){G=Math.round(G);var Y=Math.round(1e3/G);k.setTransform(1,0,0,1,0,0),k.fillStyle="rgba(255, 0, 0, 0.75)",k.strokeStyle="rgba(255, 0, 0, 0.75)",k.lineWidth=1,k.fillText("1 frame = "+G+" ms = "+Y+" fps",0,20),k.strokeRect(0,30,250,20),k.fillRect(0,30,250*Math.min(Y/60,1),20)}n||(c[o.SELECT_BOX]=!1)}if(d&&1!==p){var V=u.contexts[o.NODE],X=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_NODE],U=u.contexts[o.DRAG],j=o.data.bufferCanvases[o.MOTIONBLUR_BUFFER_DRAG],q=function(e,t,n){e.setTransform(1,0,0,1,0,0),n||!y?e.clearRect(0,0,o.canvasWidth,o.canvasHeight):C(e,0,0,o.canvasWidth,o.canvasHeight);var r=p;e.drawImage(t,0,0,o.canvasWidth*r,o.canvasHeight*r,0,0,o.canvasWidth,o.canvasHeight)};(c[o.NODE]||R[o.NODE])&&(q(V,X,R[o.NODE]),c[o.NODE]=!1),(c[o.DRAG]||R[o.DRAG])&&(q(U,j,R[o.DRAG]),c[o.DRAG]=!1)}o.prevViewport=_,o.clearingMotionBlur&&(o.clearingMotionBlur=!1,o.motionBlurCleared=!0,o.motionBlur=!0),d&&(o.motionBlurTimeout=setTimeout((function(){o.motionBlurTimeout=null,o.clearedForMotionBlur[o.NODE]=!1,o.clearedForMotionBlur[o.DRAG]=!1,o.motionBlur=!1,o.clearingMotionBlur=!h,o.mbFrames=0,c[o.NODE]=!0,c[o.DRAG]=!0,o.redraw()}),100)),t||l.emit("render")}},Eu={drawPolygonPath:function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l0&&a>0){d.clearRect(0,0,i,a),d.globalCompositeOperation="source-over";var p=this.getCachedZSortedEles();if(e.full)d.translate(-n.x1*l,-n.y1*l),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(n.x1*l,n.y1*l);else{var g=t.pan(),f={x:g.x*l,y:g.y*l};l*=t.zoom(),d.translate(f.x,f.y),d.scale(l,l),this.drawElements(d,p),d.scale(1/l,1/l),d.translate(-f.x,-f.y)}e.bg&&(d.globalCompositeOperation="destination-over",d.fillStyle=e.bg,d.rect(0,0,i,a),d.fill())}return h},ku.png=function(e){return Su(e,this.bufferCanvasImage(e),"image/png")},ku.jpg=function(e){return Su(e,this.bufferCanvasImage(e),"image/jpeg")};var Mu=Ou,Iu=Ou.prototype;function Ou(e){var t=this,n=t.cy.window().document;t.data={canvases:new Array(Iu.CANVAS_LAYERS),contexts:new Array(Iu.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Iu.CANVAS_LAYERS),bufferCanvases:new Array(Iu.BUFFER_COUNT),bufferContexts:new Array(Iu.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",i="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var a=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=i,a.position="relative",a.zIndex="0",a.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=i;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};y&&y.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;l2&&N.push("'"+this.terminals_[T]+"'");k=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+N.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(u+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(k,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:v,expected:N})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(E[0]){case 1:n.push(b),i.push(p.yytext),a.push(p.yylloc),n.push(E[1]),b=null,x?(b=x,x=null):(c=p.yyleng,l=p.yytext,u=p.yylineno,v=p.yylloc,h>0&&h--);break;case 2:if(D=this.productions_[E[1]][1],A.$=i[i.length-D],A._$={first_line:a[a.length-(D||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(D||1)].first_column,last_column:a[a.length-1].last_column},y&&(A._$.range=[a[a.length-(D||1)].range[0],a[a.length-1].range[1]]),void 0!==(_=this.performAction.apply(A,[l,c,u,g.yy,E[1],i,a].concat(d))))return _;D&&(n=n.slice(0,-1*D*2),i=i.slice(0,-1*D),a=a.slice(0,-1*D)),n.push(this.productions_[E[1]][0]),i.push(A.$),a.push(A._$),C=s[n[n.length-2]][n[n.length-1]],n.push(C);break;case 3:return!0}}return!0}),"parse")},b=function(){var e={EOF:1,parseError:(0,o.K2)((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:(0,o.K2)((function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:(0,o.K2)((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e}),"input"),unput:(0,o.K2)((function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:(0,o.K2)((function(){return this._more=!0,this}),"more"),reject:(0,o.K2)((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:(0,o.K2)((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:(0,o.K2)((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:(0,o.K2)((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:(0,o.K2)((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:(0,o.K2)((function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1}),"test_match"),next:(0,o.K2)((function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:(0,o.K2)((function(){return this.next()||this.lex()}),"lex"),begin:(0,o.K2)((function(e){this.conditionStack.push(e)}),"begin"),popState:(0,o.K2)((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:(0,o.K2)((function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules}),"_currentRules"),topState:(0,o.K2)((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:(0,o.K2)((function(e){this.begin(e)}),"pushState"),stateStackSize:(0,o.K2)((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)((function(e,t,n,r){switch(n){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}}),"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return e}();function x(){this.yy={}}return m.lexer=b,(0,o.K2)(x,"Parser"),x.prototype=m,m.Parser=x,new x}();Qu.parser=Qu;var Ju=Qu,ec=[],tc=0,nc={},rc=(0,o.K2)((()=>{ec=[],tc=0,nc={}}),"clear"),ic=(0,o.K2)((function(e){for(let t=ec.length-1;t>=0;t--)if(ec[t].levelec.length>0?ec[0]:null),"getMindmap"),oc=(0,o.K2)(((e,t,n,r)=>{o.Rm.info("addNode",e,t,n,r);const i=(0,o.D7)();let a=i.mindmap?.padding??o.UI.mindmap.padding;switch(r){case sc.ROUNDED_RECT:case sc.RECT:case sc.HEXAGON:a*=2}const s={id:tc++,nodeId:(0,o.jZ)(t,i),level:e,descr:(0,o.jZ)(n,i),type:r,children:[],width:i.mindmap?.maxNodeWidth??o.UI.mindmap.maxNodeWidth,padding:a},l=ic(e);if(l)l.children.push(s),ec.push(s);else{if(0!==ec.length)throw new Error('There can be only one root. No parent could be found for ("'+s.descr+'")');ec.push(s)}}),"addNode"),sc={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},lc={clear:rc,addNode:oc,getMindmap:ac,nodeType:sc,getType:(0,o.K2)(((e,t)=>{switch(o.Rm.debug("In get type",e,t),e){case"[":return sc.RECT;case"(":return")"===t?sc.ROUNDED_RECT:sc.CLOUD;case"((":return sc.CIRCLE;case")":return sc.CLOUD;case"))":return sc.BANG;case"{{":return sc.HEXAGON;default:return sc.DEFAULT}}),"getType"),setElementForId:(0,o.K2)(((e,t)=>{nc[e]=t}),"setElementForId"),decorateNode:(0,o.K2)((e=>{if(!e)return;const t=(0,o.D7)(),n=ec[ec.length-1];e.icon&&(n.icon=(0,o.jZ)(e.icon,t)),e.class&&(n.class=(0,o.jZ)(e.class,t))}),"decorateNode"),type2Str:(0,o.K2)((e=>{switch(e){case sc.DEFAULT:return"no-border";case sc.RECT:return"rect";case sc.ROUNDED_RECT:return"rounded-rect";case sc.CIRCLE:return"circle";case sc.CLOUD:return"cloud";case sc.BANG:return"bang";case sc.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:(0,o.K2)((()=>o.Rm),"getLogger"),getElementById:(0,o.K2)((e=>nc[e]),"getElementById")},uc=(0,o.K2)((function(e,t,n,r){t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 ${n.height-5} v${10-n.height} q0,-5 5,-5 h${n.width-10} q5,0 5,5 v${n.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",n.height).attr("x2",n.width).attr("y2",n.height)}),"defaultBkg"),cc=(0,o.K2)((function(e,t,n){t.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("height",n.height).attr("width",n.width)}),"rectBkg"),hc=(0,o.K2)((function(e,t,n){const r=n.width,i=n.height,a=.15*r,o=.25*r,s=.35*r,l=.2*r;t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*r},${-1*r*.1}\n a${s},${s} 1 0,1 ${.4*r},${-1*r*.1}\n a${o},${o} 1 0,1 ${.35*r},${1*r*.2}\n\n a${a},${a} 1 0,1 ${.15*r},${1*i*.35}\n a${l},${l} 1 0,1 ${-1*r*.15},${1*i*.65}\n\n a${o},${a} 1 0,1 ${-1*r*.25},${.15*r}\n a${s},${s} 1 0,1 ${-1*r*.5},0\n a${a},${a} 1 0,1 ${-1*r*.25},${-1*r*.15}\n\n a${a},${a} 1 0,1 ${-1*r*.1},${-1*i*.35}\n a${l},${l} 1 0,1 ${.1*r},${-1*i*.65}\n\n H0 V0 Z`)}),"cloudBkg"),dc=(0,o.K2)((function(e,t,n){const r=n.width,i=n.height,a=.15*r;t.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*r},${-1*i*.1}\n a${a},${a} 1 0,0 ${.25*r},0\n a${a},${a} 1 0,0 ${.25*r},0\n a${a},${a} 1 0,0 ${.25*r},${1*i*.1}\n\n a${a},${a} 1 0,0 ${.15*r},${1*i*.33}\n a${.8*a},${.8*a} 1 0,0 0,${1*i*.34}\n a${a},${a} 1 0,0 ${-1*r*.15},${1*i*.33}\n\n a${a},${a} 1 0,0 ${-1*r*.25},${.15*i}\n a${a},${a} 1 0,0 ${-1*r*.25},0\n a${a},${a} 1 0,0 ${-1*r*.25},0\n a${a},${a} 1 0,0 ${-1*r*.25},${-1*i*.15}\n\n a${a},${a} 1 0,0 ${-1*r*.1},${-1*i*.33}\n a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34}\n a${a},${a} 1 0,0 ${.1*r},${-1*i*.33}\n\n H0 V0 Z`)}),"bangBkg"),pc=(0,o.K2)((function(e,t,n){t.append("circle").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("r",n.width/2)}),"circleBkg");function gc(e,t,n,r,i){return e.insert("polygon",":first-child").attr("points",r.map((function(e){return e.x+","+e.y})).join(" ")).attr("transform","translate("+(i.width-t)/2+", "+n+")")}(0,o.K2)(gc,"insertPolygonShape");var fc=(0,o.K2)((function(e,t,n){const r=n.height,i=r/4,a=n.width-n.padding+2*i;gc(t,a,r,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],n)}),"hexagonBkg"),vc=(0,o.K2)((function(e,t,n){t.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+e.type2Str(n.type)).attr("height",n.height).attr("rx",n.padding).attr("ry",n.padding).attr("width",n.width)}),"roundedRectBkg"),yc=(0,o.K2)((async function(e,t,n,a,o){const s=o.htmlLabels,l=a%11,u=t.append("g");n.section=l;let c="section-"+l;l<0&&(c+=" section-root"),u.attr("class",(n.class?n.class+" ":"")+"mindmap-node "+c);const h=u.append("g"),d=u.append("g"),p=n.descr.replace(/()/g,"\n");await(0,r.GZ)(d,p,{useHtmlLabels:s,width:n.width,classes:"mindmap-node-label"},o),s||d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const g=d.node().getBBox(),[f]=(0,i.I5)(o.fontSize);if(n.height=g.height+1.1*f*.5+n.padding,n.width=g.width+2*n.padding,n.icon)if(n.type===e.nodeType.CIRCLE)n.height+=50,n.width+=50,u.append("foreignObject").attr("height","50px").attr("width",n.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+l+" "+n.icon),d.attr("transform","translate("+n.width/2+", "+(n.height/2-1.5*n.padding)+")");else{n.width+=50;const e=n.height;n.height=Math.max(e,60);const t=Math.abs(n.height-e);u.append("foreignObject").attr("width","60px").attr("height",n.height).attr("style","text-align: center;margin-top:"+t/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+l+" "+n.icon),d.attr("transform","translate("+(25+n.width/2)+", "+(t/2+n.padding/2)+")")}else if(s){const e=(n.width-g.width)/2,t=(n.height-g.height)/2;d.attr("transform","translate("+e+", "+t+")")}else{const e=n.width/2,t=n.padding/2;d.attr("transform","translate("+e+", "+t+")")}switch(n.type){case e.nodeType.DEFAULT:uc(e,h,n,l);break;case e.nodeType.ROUNDED_RECT:vc(e,h,n,l);break;case e.nodeType.RECT:cc(e,h,n,l);break;case e.nodeType.CIRCLE:h.attr("transform","translate("+n.width/2+", "+ +n.height/2+")"),pc(e,h,n,l);break;case e.nodeType.CLOUD:hc(e,h,n,l);break;case e.nodeType.BANG:dc(e,h,n,l);break;case e.nodeType.HEXAGON:fc(e,h,n,l)}return e.setElementForId(n.id,u),n.height}),"drawNode"),mc=(0,o.K2)((function(e,t){const n=e.getElementById(t.id),r=t.x||0,i=t.y||0;n.attr("transform","translate("+r+","+i+")")}),"positionNode");async function bc(e,t,n,r,i){await yc(e,t,n,r,i),n.children&&await Promise.all(n.children.map(((n,a)=>bc(e,t,n,r<0?a:r,i))))}function xc(e,t){t.edges().map(((t,n)=>{const r=t.data();if(t[0]._private.bodyBounds){const i=t[0]._private.rscratch;o.Rm.trace("Edge: ",n,r),e.insert("path").attr("d",`M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth)}}))}function wc(e,t,n,r){t.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:r,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach((i=>{wc(i,t,n,r+1),t.add({group:"edges",data:{id:`${e.id}_${i.id}`,source:e.id,target:i.id,depth:r,section:i.section}})}))}function Ec(e,t){return new Promise((n=>{const r=(0,Wu.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),i=qu({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),wc(e,i,t,0),i.nodes().forEach((function(e){e.layoutDimensions=()=>{const t=e.data();return{w:t.width,h:t.height}}})),i.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),i.ready((e=>{o.Rm.info("Ready",e),n(i)}))}))}function _c(e,t){t.nodes().map(((t,n)=>{const r=t.data();r.x=t.position().x,r.y=t.position().y,mc(e,r);const i=e.getElementById(r.nodeId);o.Rm.info("Id:",n,"Position: (",t.position().x,", ",t.position().y,")",r),i.attr("transform",`translate(${t.position().x-r.width/2}, ${t.position().y-r.height/2})`),i.attr("attr",`apa-${n})`)}))}qu.use(Hu),(0,o.K2)(bc,"drawNodes"),(0,o.K2)(xc,"drawEdges"),(0,o.K2)(wc,"addNodes"),(0,o.K2)(Ec,"layoutMindmap"),(0,o.K2)(_c,"positionNodes");var Tc={draw:(0,o.K2)((async(e,t,n,r)=>{o.Rm.debug("Rendering mindmap diagram\n"+e);const i=r.db,s=i.getMindmap();if(!s)return;const l=(0,o.D7)();l.htmlLabels=!1;const u=(0,a.D)(t),c=u.append("g");c.attr("class","mindmap-edges");const h=u.append("g");h.attr("class","mindmap-nodes"),await bc(i,h,s,-1,l);const d=await Ec(s,l);xc(c,d),_c(i,d),(0,o.ot)(void 0,u,l.mindmap?.padding??o.UI.mindmap.padding,l.mindmap?.useMaxWidth??o.UI.mindmap.useMaxWidth)}),"draw")},Dc=(0,o.K2)((e=>{let t="";for(let t=0;t`\n .edge {\n stroke-width: 3;\n }\n ${Dc(e)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${e.git0};\n }\n .section-root text {\n fill: ${e.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")}}}]); \ No newline at end of file diff --git a/js/998-31a2dbbe.chunk.min.js b/js/998-31a2dbbe.chunk.min.js new file mode 100644 index 0000000..4011cef --- /dev/null +++ b/js/998-31a2dbbe.chunk.min.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkgeekdoc=self.webpackChunkgeekdoc||[]).push([[998],{4998:(t,e,a)=>{a.d(e,{diagram:()=>b});var r=a(1805),i=a(5522),n=a(32),d=a(4852),o=a(567),s=a(697),l=0,p=(0,n.K2)((function(t,e,a,r,o){const s=(0,n.K2)((function(t){switch(t){case o.db.relationType.AGGREGATION:return"aggregation";case o.db.relationType.EXTENSION:return"extension";case o.db.relationType.COMPOSITION:return"composition";case o.db.relationType.DEPENDENCY:return"dependency";case o.db.relationType.LOLLIPOP:return"lollipop"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const p=e.points,g=(0,d.n8j)().x((function(t){return t.x})).y((function(t){return t.y})).curve(d.qrM),c=t.append("path").attr("d",g(p)).attr("id","edge"+l).attr("class","relation");let h,f,x="";r.arrowMarkerAbsolute&&(x=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,x=x.replace(/\(/g,"\\("),x=x.replace(/\)/g,"\\)")),1==a.relation.lineType&&c.attr("class","relation dashed-line"),10==a.relation.lineType&&c.attr("class","relation dotted-line"),"none"!==a.relation.type1&&c.attr("marker-start","url("+x+"#"+s(a.relation.type1)+"Start)"),"none"!==a.relation.type2&&c.attr("marker-end","url("+x+"#"+s(a.relation.type2)+"End)");const y=e.points.length;let u,m,w,b,k=i._K.calcLabelPosition(e.points);if(h=k.x,f=k.y,y%2!=0&&y>1){let t=i._K.calcCardinalityPosition("none"!==a.relation.type1,e.points,e.points[0]),r=i._K.calcCardinalityPosition("none"!==a.relation.type2,e.points,e.points[y-1]);n.Rm.debug("cardinality_1_point "+JSON.stringify(t)),n.Rm.debug("cardinality_2_point "+JSON.stringify(r)),u=t.x,m=t.y,w=r.x,b=r.y}if(void 0!==a.title){const e=t.append("g").attr("class","classLabel"),i=e.append("text").attr("class","label").attr("x",h).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(a.title);window.label=i;const n=i.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",n.x-r.padding/2).attr("y",n.y-r.padding/2).attr("width",n.width+r.padding).attr("height",n.height+r.padding)}n.Rm.info("Rendering relation "+JSON.stringify(a)),void 0!==a.relationTitle1&&"none"!==a.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",m).attr("fill","black").attr("font-size","6").text(a.relationTitle1),void 0!==a.relationTitle2&&"none"!==a.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",b).attr("fill","black").attr("font-size","6").text(a.relationTitle2),l++}),"drawEdge"),g=(0,n.K2)((function(t,e,a,r){n.Rm.debug("Rendering class ",e,a);const i=e.id,d={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",r.db.lookUpDomId(i)).attr("class","classGroup");let s;s=e.link?o.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",a.textHeight+a.padding).attr("x",0):o.append("text").attr("y",a.textHeight+a.padding).attr("x",0);let l=!0;e.annotations.forEach((function(t){const e=s.append("tspan").text("«"+t+"»");l||e.attr("dy",a.textHeight),l=!1}));let p=c(e);const g=s.append("tspan").text(p).attr("class","title");l||g.attr("dy",a.textHeight);const h=s.node().getBBox().height;let x,y,u;if(e.members.length>0){x=o.append("line").attr("x1",0).attr("y1",a.padding+h+a.dividerMargin/2).attr("y2",a.padding+h+a.dividerMargin/2);const t=o.append("text").attr("x",a.padding).attr("y",h+a.dividerMargin+a.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach((function(e){f(t,e,l,a),l=!1})),y=t.node().getBBox()}if(e.methods.length>0){u=o.append("line").attr("x1",0).attr("y1",a.padding+h+a.dividerMargin+y.height).attr("y2",a.padding+h+a.dividerMargin+y.height);const t=o.append("text").attr("x",a.padding).attr("y",h+2*a.dividerMargin+y.height+a.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach((function(e){f(t,e,l,a),l=!1}))}const m=o.node().getBBox();var w=" ";e.cssClasses.length>0&&(w+=e.cssClasses.join(" "));const b=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*a.padding).attr("height",m.height+a.padding+.5*a.dividerMargin).attr("class",w).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&s.insert("title").text(e.tooltip),x&&x.attr("x2",b),u&&u.attr("x2",b),d.width=b,d.height=m.height+a.padding+.5*a.dividerMargin,d}),"drawClass"),c=(0,n.K2)((function(t){let e=t.id;return t.type&&(e+="<"+(0,n.QO)(t.type)+">"),e}),"getClassTitleString"),h=(0,n.K2)((function(t,e,a,r){n.Rm.debug("Rendering note ",e,a);const i=e.id,d={id:i,text:e.text,width:0,height:0},o=t.append("g").attr("id",i).attr("class","classGroup");let s=o.append("text").attr("y",a.textHeight+a.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split("\n");l.forEach((function(t){n.Rm.debug(`Adding line: ${t}`),s.append("tspan").text(t).attr("class","title").attr("dy",a.textHeight)}));const p=o.node().getBBox(),g=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",p.width+2*a.padding).attr("height",p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(g-t.getBBox().width)/2)})),d.width=g,d.height=p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin,d}),"drawNote"),f=(0,n.K2)((function(t,e,a,r){const{displayText:i,cssStyle:n}=e.getDisplayDetails(),d=t.append("tspan").attr("x",r.padding).text(i);""!==n&&d.attr("style",e.cssStyle),a||d.attr("dy",r.textHeight)}),"addTspan"),x={getClassTitleString:c,drawClass:g,drawEdge:p,drawNote:h},y={},u=(0,n.K2)((function(t){const e=Object.entries(y).find((e=>e[1].label===t));if(e)return e[0]}),"getGraphId"),m=(0,n.K2)((function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).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"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).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"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).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"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).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"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).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"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).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")}),"insertMarkers"),w={draw:(0,n.K2)((function(t,e,a,r){const i=(0,n.D7)().class;y={},n.Rm.info("Rendering diagram "+t);const l=(0,n.D7)().securityLevel;let p;"sandbox"===l&&(p=(0,d.Ltv)("#i"+e));const g="sandbox"===l?(0,d.Ltv)(p.nodes()[0].contentDocument.body):(0,d.Ltv)("body"),c=g.select(`[id='${e}']`);m(c);const h=new s.T({multigraph:!0});h.setGraph({isMultiGraph:!0}),h.setDefaultEdgeLabel((function(){return{}}));const f=r.db.getClasses(),w=[...f.keys()];for(const t of w){const e=f.get(t),a=x.drawClass(c,e,i,r);y[a.id]=a,h.setNode(a.id,a),n.Rm.info("Org height: "+a.height)}r.db.getRelations().forEach((function(t){n.Rm.info("tjoho"+u(t.id1)+u(t.id2)+JSON.stringify(t)),h.setEdge(u(t.id1),u(t.id2),{relation:t},t.title||"DEFAULT")})),r.db.getNotes().forEach((function(t){n.Rm.debug(`Adding note: ${JSON.stringify(t)}`);const e=x.drawNote(c,t,i,r);y[e.id]=e,h.setNode(e.id,e),t.class&&f.has(t.class)&&h.setEdge(t.id,u(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,o.Zp)(h),h.nodes().forEach((function(t){void 0!==t&&void 0!==h.node(t)&&(n.Rm.debug("Node "+t+": "+JSON.stringify(h.node(t))),g.select("#"+(r.db.lookUpDomId(t)||t)).attr("transform","translate("+(h.node(t).x-h.node(t).width/2)+","+(h.node(t).y-h.node(t).height/2)+" )"))})),h.edges().forEach((function(t){void 0!==t&&void 0!==h.edge(t)&&(n.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(h.edge(t))),x.drawEdge(c,h.edge(t),h.edge(t).relation,i,r))}));const b=c.node().getBBox(),k=b.width+40,L=b.height+40;(0,n.a$)(c,L,k,i.useMaxWidth);const E=`${b.x-20} ${b.y-20} ${k} ${L}`;n.Rm.debug(`viewBox ${E}`),c.attr("viewBox",E)}),"draw")},b={parser:r._$,db:r.z2,renderer:w,styles:r.tM,init:(0,n.K2)((t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,r.z2.clear()}),"init")}}}]); \ No newline at end of file diff --git a/js/mermaid-3292ee5a.bundle.min.js b/js/mermaid-3292ee5a.bundle.min.js new file mode 100644 index 0000000..5761dd7 --- /dev/null +++ b/js/mermaid-3292ee5a.bundle.min.js @@ -0,0 +1,2 @@ +/*! For license information please see mermaid-3292ee5a.bundle.min.js.LICENSE.txt */ +(()=>{var t,e,r={9119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},6750:(t,e,r)=>{"use strict";e.J=void 0;var i=r(9119);function n(t){try{return decodeURIComponent(t)}catch(e){return t}}e.J=function(t){if(!t)return i.BLANK_URL;var e,r,o=n(t.trim());do{e=(o=n(o=(r=o,r.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||o.match(i.htmlEntitiesRegex)||o.match(i.htmlCtrlEntityRegex)||o.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=o;if(!a)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var s=a.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return a;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var u=new URL(c);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return c}},4353:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,r="millisecond",i="second",n="minute",o="hour",a="day",s="week",l="month",h="quarter",c="year",u="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},m={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),n=r%60;return(e<=0?"+":"-")+y(i,2,"0")+":"+y(n,2,"0")},m:function t(e,r){if(e.date()1)return t(a[0])}else{var s=e.name;b[s]=e,n=s}return!i&&n&&(x=n),n||!i&&x},_=function(t,e){if(C(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},v=m;v.l=w,v.i=C,v.w=function(t,e){return _(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var y=g.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(p);if(i){var n=i[2]-1||0,o=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return v},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var r=_(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return _(t)1?r-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:p;e&&e(t,null);let o=i.length;for(;o--;){let e=i[o];if("string"==typeof e){const t=n(e);t!==e&&(r(i)||(i[o]=t),e=t)}t[e]=!0}return t}function S(t){for(let e=0;e/gm),q=a(/\${[\w\W]*}/gm),N=a(/^data-[\-\w.\u00B7-\uFFFF]/),j=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),U=a(/^(?:\w+script|data):/i),H=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=a(/^html$/i),G=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var V=Object.freeze({__proto__:null,MUSTACHE_EXPR:z,ERB_EXPR:K,TMPLIT_EXPR:q,DATA_ATTR:N,ARIA_ATTR:j,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:U,ATTR_WHITESPACE:H,DOCTYPE_NAME:Y,CUSTOM_ELEMENT:G});const Z=1,X=3,Q=7,J=8,tt=9,et=function(){return"undefined"==typeof window?null:window};return function e(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const i=t=>e(t);if(i.version="3.1.6",i.removed=[],!r||!r.document||r.document.nodeType!==tt)return i.isSupported=!1,i;let{document:n}=r;const a=n,l=a.currentScript,{DocumentFragment:h,HTMLTemplateElement:w,Node:_,Element:S,NodeFilter:z,NamedNodeMap:K=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:q,DOMParser:N,trustedTypes:j}=r,U=S.prototype,H=A(U,"cloneNode"),G=A(U,"remove"),rt=A(U,"nextSibling"),it=A(U,"childNodes"),nt=A(U,"parentNode");if("function"==typeof w){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let ot,at="";const{implementation:st,createNodeIterator:lt,createDocumentFragment:ht,getElementsByTagName:ct}=n,{importNode:ut}=a;let dt={};i.isSupported="function"==typeof t&&"function"==typeof nt&&st&&void 0!==st.createHTMLDocument;const{MUSTACHE_EXPR:pt,ERB_EXPR:ft,TMPLIT_EXPR:gt,DATA_ATTR:yt,ARIA_ATTR:mt,IS_SCRIPT_OR_DATA:xt,ATTR_WHITESPACE:bt,CUSTOM_ELEMENT:kt}=V;let{IS_ALLOWED_URI:Ct}=V,wt=null;const _t=v({},[...M,...B,...L,...$,...D]);let vt=null;const St=v({},[...O,...I,...R,...P]);let Tt=Object.seal(s(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}})),At=null,Mt=null,Bt=!0,Lt=!0,Ft=!1,$t=!0,Et=!1,Dt=!0,Ot=!1,It=!1,Rt=!1,Pt=!1,zt=!1,Kt=!1,qt=!0,Nt=!1,jt=!0,Wt=!1,Ut={},Ht=null;const Yt=v({},["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 Gt=null;const Vt=v({},["audio","video","img","source","image","track"]);let Zt=null;const Xt=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qt="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml";let ee=te,re=!1,ie=null;const ne=v({},[Qt,Jt,te],f);let oe=null;const ae=["application/xhtml+xml","text/html"];let se=null,le=null;const he=n.createElement("form"),ce=function(t){return t instanceof RegExp||t instanceof Function},ue=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!le||le!==t){if(t&&"object"==typeof t||(t={}),t=T(t),oe=-1===ae.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,se="application/xhtml+xml"===oe?f:p,wt=b(t,"ALLOWED_TAGS")?v({},t.ALLOWED_TAGS,se):_t,vt=b(t,"ALLOWED_ATTR")?v({},t.ALLOWED_ATTR,se):St,ie=b(t,"ALLOWED_NAMESPACES")?v({},t.ALLOWED_NAMESPACES,f):ne,Zt=b(t,"ADD_URI_SAFE_ATTR")?v(T(Xt),t.ADD_URI_SAFE_ATTR,se):Xt,Gt=b(t,"ADD_DATA_URI_TAGS")?v(T(Vt),t.ADD_DATA_URI_TAGS,se):Vt,Ht=b(t,"FORBID_CONTENTS")?v({},t.FORBID_CONTENTS,se):Yt,At=b(t,"FORBID_TAGS")?v({},t.FORBID_TAGS,se):{},Mt=b(t,"FORBID_ATTR")?v({},t.FORBID_ATTR,se):{},Ut=!!b(t,"USE_PROFILES")&&t.USE_PROFILES,Bt=!1!==t.ALLOW_ARIA_ATTR,Lt=!1!==t.ALLOW_DATA_ATTR,Ft=t.ALLOW_UNKNOWN_PROTOCOLS||!1,$t=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Et=t.SAFE_FOR_TEMPLATES||!1,Dt=!1!==t.SAFE_FOR_XML,Ot=t.WHOLE_DOCUMENT||!1,Pt=t.RETURN_DOM||!1,zt=t.RETURN_DOM_FRAGMENT||!1,Kt=t.RETURN_TRUSTED_TYPE||!1,Rt=t.FORCE_BODY||!1,qt=!1!==t.SANITIZE_DOM,Nt=t.SANITIZE_NAMED_PROPS||!1,jt=!1!==t.KEEP_CONTENT,Wt=t.IN_PLACE||!1,Ct=t.ALLOWED_URI_REGEXP||W,ee=t.NAMESPACE||te,Tt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Tt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ce(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Tt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Tt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Et&&(Lt=!1),zt&&(Pt=!0),Ut&&(wt=v({},D),vt=[],!0===Ut.html&&(v(wt,M),v(vt,O)),!0===Ut.svg&&(v(wt,B),v(vt,I),v(vt,P)),!0===Ut.svgFilters&&(v(wt,L),v(vt,I),v(vt,P)),!0===Ut.mathMl&&(v(wt,$),v(vt,R),v(vt,P))),t.ADD_TAGS&&(wt===_t&&(wt=T(wt)),v(wt,t.ADD_TAGS,se)),t.ADD_ATTR&&(vt===St&&(vt=T(vt)),v(vt,t.ADD_ATTR,se)),t.ADD_URI_SAFE_ATTR&&v(Zt,t.ADD_URI_SAFE_ATTR,se),t.FORBID_CONTENTS&&(Ht===Yt&&(Ht=T(Ht)),v(Ht,t.FORBID_CONTENTS,se)),jt&&(wt["#text"]=!0),Ot&&v(wt,["html","head","body"]),wt.table&&(v(wt,["tbody"]),delete At.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw C('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ot=t.TRUSTED_TYPES_POLICY,at=ot.createHTML("")}else void 0===ot&&(ot=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const n="dompurify"+(r?"#"+r:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+n+" could not be created."),null}}(j,l)),null!==ot&&"string"==typeof at&&(at=ot.createHTML(""));o&&o(t),le=t}},de=v({},["mi","mo","mn","ms","mtext"]),pe=v({},["foreignobject","annotation-xml"]),fe=v({},["title","style","font","a","script"]),ge=v({},[...B,...L,...F]),ye=v({},[...$,...E]),me=function(t){d(i.removed,{element:t});try{nt(t).removeChild(t)}catch(e){G(t)}},xe=function(t,e){try{d(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!vt[t])if(Pt||zt)try{me(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},be=function(t){let e=null,r=null;if(Rt)t=""+t;else{const e=g(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===oe&&ee===te&&(t=''+t+"");const i=ot?ot.createHTML(t):t;if(ee===te)try{e=(new N).parseFromString(i,oe)}catch(t){}if(!e||!e.documentElement){e=st.createDocument(ee,"template",null);try{e.documentElement.innerHTML=re?at:i}catch(t){}}const o=e.body||e.documentElement;return t&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),ee===te?ct.call(e,Ot?"html":"body")[0]:Ot?e.documentElement:o},ke=function(t){return lt.call(t.ownerDocument||t,t,z.SHOW_ELEMENT|z.SHOW_COMMENT|z.SHOW_TEXT|z.SHOW_PROCESSING_INSTRUCTION|z.SHOW_CDATA_SECTION,null)},Ce=function(t){return t instanceof q&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof K)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},we=function(t){return"function"==typeof _&&t instanceof _},_e=function(t,e,r){dt[t]&&c(dt[t],(t=>{t.call(i,e,r,le)}))},ve=function(t){let e=null;if(_e("beforeSanitizeElements",t,null),Ce(t))return me(t),!0;const r=se(t.nodeName);if(_e("uponSanitizeElement",t,{tagName:r,allowedTags:wt}),t.hasChildNodes()&&!we(t.firstElementChild)&&k(/<[/\w]/g,t.innerHTML)&&k(/<[/\w]/g,t.textContent))return me(t),!0;if(t.nodeType===Q)return me(t),!0;if(Dt&&t.nodeType===J&&k(/<[/\w]/g,t.data))return me(t),!0;if(!wt[r]||At[r]){if(!At[r]&&Te(r)){if(Tt.tagNameCheck instanceof RegExp&&k(Tt.tagNameCheck,r))return!1;if(Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(r))return!1}if(jt&&!Ht[r]){const e=nt(t)||t.parentNode,r=it(t)||t.childNodes;if(r&&e)for(let i=r.length-1;i>=0;--i){const n=H(r[i],!0);n.__removalCount=(t.__removalCount||0)+1,e.insertBefore(n,rt(t))}}return me(t),!0}return t instanceof S&&!function(t){let e=nt(t);e&&e.tagName||(e={namespaceURI:ee,tagName:"template"});const r=p(t.tagName),i=p(e.tagName);return!!ie[t.namespaceURI]&&(t.namespaceURI===Jt?e.namespaceURI===te?"svg"===r:e.namespaceURI===Qt?"svg"===r&&("annotation-xml"===i||de[i]):Boolean(ge[r]):t.namespaceURI===Qt?e.namespaceURI===te?"math"===r:e.namespaceURI===Jt?"math"===r&&pe[i]:Boolean(ye[r]):t.namespaceURI===te?!(e.namespaceURI===Jt&&!pe[i])&&!(e.namespaceURI===Qt&&!de[i])&&!ye[r]&&(fe[r]||!ge[r]):!("application/xhtml+xml"!==oe||!ie[t.namespaceURI]))}(t)?(me(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!k(/<\/no(script|embed|frames)/i,t.innerHTML)?(Et&&t.nodeType===X&&(e=t.textContent,c([pt,ft,gt],(t=>{e=y(e,t," ")})),t.textContent!==e&&(d(i.removed,{element:t.cloneNode()}),t.textContent=e)),_e("afterSanitizeElements",t,null),!1):(me(t),!0)},Se=function(t,e,r){if(qt&&("id"===e||"name"===e)&&(r in n||r in he))return!1;if(Lt&&!Mt[e]&&k(yt,e));else if(Bt&&k(mt,e));else if(!vt[e]||Mt[e]){if(!(Te(t)&&(Tt.tagNameCheck instanceof RegExp&&k(Tt.tagNameCheck,t)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(t))&&(Tt.attributeNameCheck instanceof RegExp&&k(Tt.attributeNameCheck,e)||Tt.attributeNameCheck instanceof Function&&Tt.attributeNameCheck(e))||"is"===e&&Tt.allowCustomizedBuiltInElements&&(Tt.tagNameCheck instanceof RegExp&&k(Tt.tagNameCheck,r)||Tt.tagNameCheck instanceof Function&&Tt.tagNameCheck(r))))return!1}else if(Zt[e]);else if(k(Ct,y(r,bt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==m(r,"data:")||!Gt[t])if(Ft&&!k(xt,y(r,bt,"")));else if(r)return!1;return!0},Te=function(t){return"annotation-xml"!==t&&g(t,kt)},Ae=function(t){_e("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt};let n=e.length;for(;n--;){const o=e[n],{name:a,namespaceURI:s,value:l}=o,h=se(a);let d="value"===a?l:x(l);if(r.attrName=h,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,_e("uponSanitizeAttribute",t,r),d=r.attrValue,Dt&&k(/((--!?|])>)|<\/(style|title)/i,d)){xe(a,t);continue}if(r.forceKeepAttr)continue;if(xe(a,t),!r.keepAttr)continue;if(!$t&&k(/\/>/i,d)){xe(a,t);continue}Et&&c([pt,ft,gt],(t=>{d=y(d,t," ")}));const p=se(t.nodeName);if(Se(p,h,d)){if(!Nt||"id"!==h&&"name"!==h||(xe(a,t),d="user-content-"+d),ot&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(s);else switch(j.getAttributeType(p,h)){case"TrustedHTML":d=ot.createHTML(d);break;case"TrustedScriptURL":d=ot.createScriptURL(d)}try{s?t.setAttributeNS(s,a,d):t.setAttribute(a,d),Ce(t)?me(t):u(i.removed)}catch(t){}}}_e("afterSanitizeAttributes",t,null)},Me=function t(e){let r=null;const i=ke(e);for(_e("beforeSanitizeShadowDOM",e,null);r=i.nextNode();)_e("uponSanitizeShadowNode",r,null),ve(r)||(r.content instanceof h&&t(r.content),Ae(r));_e("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,n=null,o=null,s=null;if(re=!t,re&&(t="\x3c!--\x3e"),"string"!=typeof t&&!we(t)){if("function"!=typeof t.toString)throw C("toString is not a function");if("string"!=typeof(t=t.toString()))throw C("dirty is not a string, aborting")}if(!i.isSupported)return t;if(It||ue(e),i.removed=[],"string"==typeof t&&(Wt=!1),Wt){if(t.nodeName){const e=se(t.nodeName);if(!wt[e]||At[e])throw C("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof _)r=be("\x3c!----\x3e"),n=r.ownerDocument.importNode(t,!0),n.nodeType===Z&&"BODY"===n.nodeName||"HTML"===n.nodeName?r=n:r.appendChild(n);else{if(!Pt&&!Et&&!Ot&&-1===t.indexOf("<"))return ot&&Kt?ot.createHTML(t):t;if(r=be(t),!r)return Pt?null:Kt?at:""}r&&Rt&&me(r.firstChild);const l=ke(Wt?t:r);for(;o=l.nextNode();)ve(o)||(o.content instanceof h&&Me(o.content),Ae(o));if(Wt)return t;if(Pt){if(zt)for(s=ht.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(vt.shadowroot||vt.shadowrootmode)&&(s=ut.call(a,s,!0)),s}let u=Ot?r.outerHTML:r.innerHTML;return Ot&&wt["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&k(Y,r.ownerDocument.doctype.name)&&(u="\n"+u),Et&&c([pt,ft,gt],(t=>{u=y(u,t," ")})),ot&&Kt?ot.createHTML(u):u},i.setConfig=function(){ue(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),It=!0},i.clearConfig=function(){le=null,It=!1},i.isValidAttribute=function(t,e,r){le||ue({});const i=se(t),n=se(e);return Se(i,n,r)},i.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],d(dt[t],e))},i.removeHook=function(t){if(dt[t])return u(dt[t])},i.removeHooks=function(t){dt[t]&&(dt[t]=[])},i.removeAllHooks=function(){dt={}},i}()}()},7148:function(t){!function(e,r){var i={version:"2.14.3",areas:{},apis:{},nsdelim:".",inherit:function(t,e){for(var r in t)e.hasOwnProperty(r)||Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e},stringify:function(t,e){return void 0===t||"function"==typeof t?t+"":JSON.stringify(t,e||i.replace)},parse:function(t,e){try{return JSON.parse(t,e||i.revive)}catch(e){return t}},fn:function(t,e){for(var r in i.storeAPI[t]=e,i.apis)i.apis[r][t]=e},get:function(t,e){return t.getItem(e)},set:function(t,e,r){t.setItem(e,r)},remove:function(t,e){t.removeItem(e)},key:function(t,e){return t.key(e)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,e,r){var n=i.inherit(i.storeAPI,(function(t,e,r){return 0===arguments.length?n.getAll():"function"==typeof e?n.transact(t,e,r):void 0!==e?n.set(t,e,r):"string"==typeof t||"number"==typeof t?n.get(t):"function"==typeof t?n.each(t):t?n.setAll(t,e):n.clear()}));n._id=t;try{var o="__store2_test";e.setItem(o,"ok"),n._area=e,e.removeItem(o)}catch(t){n._area=i.storage("fake")}return n._ns=r||"",i.areas[t]||(i.areas[t]=n._area),i.apis[n._ns+n._id]||(i.apis[n._ns+n._id]=n),n},storeAPI:{area:function(t,e){var r=this[t];return r&&r.area||(r=i.Store(t,e,this._ns),this[t]||(this[t]=r)),r},namespace:function(t,e,r){if(r=r||this._delim||i.nsdelim,!t)return this._ns?this._ns.substring(0,this._ns.length-r.length):"";var n=t,o=this[n];if(!(o&&o.namespace||((o=i.Store(this._id,this._area,this._ns+n+r))._delim=r,this[n]||(this[n]=o),e)))for(var a in i.areas)o.area(a,i.areas[a]);return o},isFake:function(t){return t?(this._real=this._area,this._area=i.storage("fake")):!1===t&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(t){return this._area.has?this._area.has(this._in(t)):!!(this._in(t)in this._area)},size:function(){return this.keys().length},each:function(t,e){for(var r=0,n=i.length(this._area);ri.length(this._area)&&(n--,r--)}return e||this},keys:function(t){return this.each((function(t,e,r){r.push(t)}),t||[])},get:function(t,e){var r,n=i.get(this._area,this._in(t));return"function"==typeof e&&(r=e,e=null),null!==n?i.parse(n,r):null!=e?e:n},getAll:function(t){return this.each((function(t,e,r){r[t]=e}),t||{})},transact:function(t,e,r){var i=this.get(t,r),n=e(i);return this.set(t,void 0===n?i:n),this},set:function(t,e,r){var n,o=this.get(t);return null!=o&&!1===r?e:("function"==typeof r&&(n=r,r=void 0),i.set(this._area,this._in(t),i.stringify(e,n),r)||o)},setAll:function(t,e){var r,i;for(var n in t)i=t[n],this.set(n,i,e)!==i&&(r=!0);return r},add:function(t,e,r){var n=this.get(t);if(n instanceof Array)e=n.concat(e);else if(null!==n){var o=typeof n;if(o===typeof e&&"object"===o){for(var a in e)n[a]=e[a];e=n}else e=n+e}return i.set(this._area,this._in(t),i.stringify(e,r)),e},remove:function(t,e){var r=this.get(t,e);return i.remove(this._area,this._in(t)),r},clear:function(){return this._ns?this.each((function(t){i.remove(this._area,this._in(t))}),1):i.clear(this._area),this},clearAll:function(){var t=this._area;for(var e in i.areas)i.areas.hasOwnProperty(e)&&(this._area=i.areas[e],this.clear());return this._area=t,this},_in:function(t){return"string"!=typeof t&&(t=i.stringify(t)),this._ns?this._ns+t:t},_out:function(t){return this._ns?t&&0===t.indexOf(this._ns)?t.substring(this._ns.length):void 0:t}},storage:function(t){return i.inherit(i.storageAPI,{items:{},name:t})},storageAPI:{length:0,has:function(t){return this.items.hasOwnProperty(t)},key:function(t){var e=0;for(var r in this.items)if(this.has(r)&&t===e++)return r},setItem:function(t,e){this.has(t)||this.length++,this.items[t]=e},removeItem:function(t){this.has(t)&&(delete this.items[t],this.length--)},getItem:function(t){return this.has(t)?this.items[t]:null},clear:function(){for(var t in this.items)this.removeItem(t)}}},n=i.Store("local",function(){try{return localStorage}catch(t){}}());n.local=n,n._=i,n.area("session",function(){try{return sessionStorage}catch(t){}}()),n.area("page",i.storage("page")),"function"==typeof r&&void 0!==r.amd?r("store2",[],(function(){return n})):t.exports?t.exports=n:(e.store&&(i.conflict=e.store),e.store=n)}(this,this&&this.define)},513:(t,e,r)=>{"use strict";function i(t){for(var e=[],r=1;ri})},4852:(t,e,r)=>{"use strict";function i(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r=n)&&(r=n)}return r}function n(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function o(t){return t}r.d(e,{JLW:()=>ja,l78:()=>x,tlR:()=>m,qrM:()=>rs,Yu4:()=>ns,IA3:()=>as,Wi0:()=>ls,PGM:()=>hs,OEq:()=>us,y8u:()=>fs,olC:()=>ys,IrU:()=>xs,oDi:()=>Cs,Q7f:()=>_s,cVp:()=>Ss,lUB:()=>Ha,Lx9:()=>As,nVG:()=>Os,uxU:()=>Is,Xf2:()=>zs,GZz:()=>qs,UPb:()=>js,dyv:()=>Ns,bEH:()=>ei,n8j:()=>Va,T9B:()=>i,jkA:()=>n,rLf:()=>Qa,WH:()=>li,m4Y:()=>Xi,UMr:()=>si,w7C:()=>fa,zt:()=>ga,Ltv:()=>ya,UAC:()=>fn,DCK:()=>Hn,TUC:()=>_n,Agd:()=>dn,t6C:()=>ln,wXd:()=>cn,ABi:()=>bn,Ui6:()=>En,rGn:()=>vn,ucG:()=>hn,YPH:()=>xn,Mol:()=>wn,PGu:()=>kn,GuW:()=>Cn});var a=1,s=2,l=3,h=4,c=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function p(t){return e=>+t(e)}function f(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function g(){return!this.__axis}function y(t,e){var r=[],i=null,n=null,y=6,m=6,x=3,b="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,k=t===a||t===h?-1:1,C=t===h||t===s?"x":"y",w=t===a||t===l?u:d;function _(u){var d=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,_=null==n?e.tickFormat?e.tickFormat.apply(e,r):o:n,v=Math.max(y,0)+x,S=e.range(),T=+S[0]+b,A=+S[S.length-1]+b,M=(e.bandwidth?f:p)(e.copy(),b),B=u.selection?u.selection():u,L=B.selectAll(".domain").data([null]),F=B.selectAll(".tick").data(d,e).order(),$=F.exit(),E=F.enter().append("g").attr("class","tick"),D=F.select("line"),O=F.select("text");L=L.merge(L.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),F=F.merge(E),D=D.merge(E.append("line").attr("stroke","currentColor").attr(C+"2",k*y)),O=O.merge(E.append("text").attr("fill","currentColor").attr(C,k*v).attr("dy",t===a?"0em":t===l?"0.71em":"0.32em")),u!==B&&(L=L.transition(u),F=F.transition(u),D=D.transition(u),O=O.transition(u),$=$.transition(u).attr("opacity",c).attr("transform",(function(t){return isFinite(t=M(t))?w(t+b):this.getAttribute("transform")})),E.attr("opacity",c).attr("transform",(function(t){var e=this.parentNode.__axis;return w((e&&isFinite(e=e(t))?e:M(t))+b)}))),$.remove(),L.attr("d",t===h||t===s?m?"M"+k*m+","+T+"H"+b+"V"+A+"H"+k*m:"M"+b+","+T+"V"+A:m?"M"+T+","+k*m+"V"+b+"H"+A+"V"+k*m:"M"+T+","+b+"H"+A),F.attr("opacity",1).attr("transform",(function(t){return w(M(t)+b)})),D.attr(C+"2",k*y),O.attr(C,k*v).text(_),B.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===s?"start":t===h?"end":"middle"),B.each((function(){this.__axis=M}))}return _.scale=function(t){return arguments.length?(e=t,_):e},_.ticks=function(){return r=Array.from(arguments),_},_.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),_):r.slice()},_.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),_):i&&i.slice()},_.tickFormat=function(t){return arguments.length?(n=t,_):n},_.tickSize=function(t){return arguments.length?(y=m=+t,_):y},_.tickSizeInner=function(t){return arguments.length?(y=+t,_):y},_.tickSizeOuter=function(t){return arguments.length?(m=+t,_):m},_.tickPadding=function(t){return arguments.length?(x=+t,_):x},_.offset=function(t){return arguments.length?(b=+t,_):b},_}function m(t){return y(a,t)}function x(t){return y(l,t)}function b(){}function k(t){return null==t?b:function(){return this.querySelector(t)}}function C(){return[]}function w(t){return null==t?C:function(){return this.querySelectorAll(t)}}function _(t){return function(){return this.matches(t)}}function v(t){return function(e){return e.matches(t)}}var S=Array.prototype.find;function T(){return this.firstElementChild}var A=Array.prototype.filter;function M(){return Array.from(this.children)}function B(t){return new Array(t.length)}function L(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function F(t,e,r,i,n,o){for(var a,s=0,l=e.length,h=o.length;se?1:t>=e?0:NaN}L.prototype={constructor:L,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var I="http://www.w3.org/1999/xhtml";const R={svg:"http://www.w3.org/2000/svg",xhtml:I,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function P(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),R.hasOwnProperty(e)?{space:R[e],local:t}:t}function z(t){return function(){this.removeAttribute(t)}}function K(t){return function(){this.removeAttributeNS(t.space,t.local)}}function q(t,e){return function(){this.setAttribute(t,e)}}function N(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function j(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function W(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function U(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function H(t){return function(){this.style.removeProperty(t)}}function Y(t,e,r){return function(){this.style.setProperty(t,e,r)}}function G(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function V(t,e){return t.style.getPropertyValue(e)||U(t).getComputedStyle(t,null).getPropertyValue(e)}function Z(t){return function(){delete this[t]}}function X(t,e){return function(){this[t]=e}}function Q(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function J(t){return t.trim().split(/^|\s+/)}function tt(t){return t.classList||new et(t)}function et(t){this._node=t,this._names=J(t.getAttribute("class")||"")}function rt(t,e){for(var r=tt(t),i=-1,n=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var At=[null];function Mt(t,e){this._groups=t,this._parents=e}function Bt(){return new Mt([[document.documentElement]],At)}Mt.prototype=Bt.prototype={constructor:Mt,select:function(t){"function"!=typeof t&&(t=k(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n=C&&(C=k+1);!(b=m[C])&&++C=0;)(i=n[o])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=O);for(var r=this._groups,i=r.length,n=new Array(i),o=0;o1?this.each((null==e?H:"function"==typeof e?G:Y)(t,e,null==r?"":r)):V(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Z:"function"==typeof e?Q:X)(t,e)):this.node()[t]},classed:function(t,e){var r=J(t+"");if(arguments.length<2){for(var i=tt(this.node()),n=-1,o=r.length;++n=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?_t:wt,i=0;i{}};function $t(){for(var t,e=0,r=arguments.length,i={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var r,i,n=new Array(r),o=0;o=0&&e._call.call(void 0,t),e=e._next;--zt}()}finally{zt=0,function(){for(var t,e,r=Rt,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Rt=e);Pt=t,te(i)}(),Wt=0}}function Jt(){var t=Ht.now(),e=t-jt;e>Nt&&(Ut-=e,jt=t)}function te(t){zt||(Kt&&(Kt=clearTimeout(Kt)),t-Wt>24?(t<1/0&&(Kt=setTimeout(Qt,t-Ht.now()-Ut)),qt&&(qt=clearInterval(qt))):(qt||(jt=Ht.now(),qt=setInterval(Jt,Nt)),zt=1,Yt(Qt)))}function ee(t,e,r){var i=new Zt;return e=null==e?0:+e,i.restart((r=>{i.stop(),t(r+e)}),e,r),i}Zt.prototype=Xt.prototype={constructor:Zt,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Gt():+r)+(null==e?0:+e),this._next||Pt===this||(Pt?Pt._next=this:Rt=this,Pt=this),this._call=t,this._time=r,te()},stop:function(){this._call&&(this._call=null,this._time=1/0,te())}};var re=It("start","end","cancel","interrupt"),ie=[],ne=0,oe=3;function ae(t,e,r,i,n,o){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};!function(t,e,r){var i,n=t.__transition;function o(l){var h,c,u,d;if(1!==r.state)return s();for(h in n)if((d=n[h]).name===r.name){if(d.state===oe)return ee(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+hne)throw new Error("too late; already scheduled");return r}function le(t,e){var r=he(t,e);if(r.state>oe)throw new Error("too late; already running");return r}function he(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function ce(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ue,de=180/Math.PI,pe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fe(t,e,r,i,n,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i180?e+=360:e-t>180&&(t+=360),o.push({i:r.push(n(r)+"rotate(",null,i)-2,x:ce(t,e)})):e&&r.push(n(r)+"rotate("+e+i)}(o.rotate,a.rotate,s,l),function(t,e,r,o){t!==e?o.push({i:r.push(n(r)+"skewX(",null,i)-2,x:ce(t,e)}):e&&r.push(n(r)+"skewX("+e+i)}(o.skewX,a.skewX,s,l),function(t,e,r,i,o,a){if(t!==r||e!==i){var s=o.push(n(o)+"scale(",null,",",null,")");a.push({i:s-4,x:ce(t,r)},{i:s-2,x:ce(e,i)})}else 1===r&&1===i||o.push(n(o)+"scale("+r+","+i+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,r=-1,i=l.length;++r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?qe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?qe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Le.exec(t))?new We(e[1],e[2],e[3],1):(e=Fe.exec(t))?new We(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=$e.exec(t))?qe(e[1],e[2],e[3],e[4]):(e=Ee.exec(t))?qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=De.exec(t))?Ze(e[1],e[2]/100,e[3]/100,1):(e=Oe.exec(t))?Ze(e[1],e[2]/100,e[3]/100,e[4]):Ie.hasOwnProperty(t)?Ke(Ie[t]):"transparent"===t?new We(NaN,NaN,NaN,0):null}function Ke(t){return new We(t>>16&255,t>>8&255,255&t,1)}function qe(t,e,r,i){return i<=0&&(t=e=r=NaN),new We(t,e,r,i)}function Ne(t){return t instanceof _e||(t=ze(t)),t?new We((t=t.rgb()).r,t.g,t.b,t.opacity):new We}function je(t,e,r,i){return 1===arguments.length?Ne(t):new We(t,e,r,null==i?1:i)}function We(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Ue(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}`}function He(){const t=Ye(this.opacity);return`${1===t?"rgb(":"rgba("}${Ge(this.r)}, ${Ge(this.g)}, ${Ge(this.b)}${1===t?")":`, ${t})`}`}function Ye(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ge(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ve(t){return((t=Ge(t))<16?"0":"")+t.toString(16)}function Ze(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Qe(t,e,r,i)}function Xe(t){if(t instanceof Qe)return new Qe(t.h,t.s,t.l,t.opacity);if(t instanceof _e||(t=ze(t)),!t)return new Qe;if(t instanceof Qe)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),o=Math.max(e,r,i),a=NaN,s=o-n,l=(o+n)/2;return s?(a=e===o?(r-i)/s+6*(r0&&l<1?0:a,new Qe(a,s,l,t.opacity)}function Qe(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Je(t){return(t=(t||0)%360)<0?t+360:t}function tr(t){return Math.max(0,Math.min(1,t||0))}function er(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function rr(t,e,r,i,n){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*i+a*n)/6}Ce(_e,ze,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Re,formatHex:Re,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Xe(this).formatHsl()},formatRgb:Pe,toString:Pe}),Ce(We,je,we(_e,{brighter(t){return t=null==t?Se:Math.pow(Se,t),new We(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new We(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new We(Ge(this.r),Ge(this.g),Ge(this.b),Ye(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:Ue,formatHex:Ue,formatHex8:function(){return`#${Ve(this.r)}${Ve(this.g)}${Ve(this.b)}${Ve(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:He,toString:He})),Ce(Qe,(function(t,e,r,i){return 1===arguments.length?Xe(t):new Qe(t,e,r,null==i?1:i)}),we(_e,{brighter(t){return t=null==t?Se:Math.pow(Se,t),new Qe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new Qe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new We(er(t>=240?t-240:t+120,n,i),er(t,n,i),er(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new Qe(Je(this.h),tr(this.s),tr(this.l),Ye(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ye(this.opacity);return`${1===t?"hsl(":"hsla("}${Je(this.h)}, ${100*tr(this.s)}%, ${100*tr(this.l)}%${1===t?")":`, ${t})`}`}}));const ir=t=>()=>t;function nr(t,e){return function(r){return t+r*e}}function or(t,e){var r=e-t;return r?nr(t,r):ir(isNaN(t)?e:t)}const ar=function t(e){var r=function(t){return 1==(t=+t)?or:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):ir(isNaN(e)?r:e)}}(e);function i(t,e){var i=r((t=je(t)).r,(e=je(e)).r),n=r(t.g,e.g),o=r(t.b,e.b),a=or(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=n(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function sr(t){return function(e){var r,i,n=e.length,o=new Array(n),a=new Array(n),s=new Array(n);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),n=t[i],o=t[i+1],a=i>0?t[i-1]:2*n-o,s=io&&(n=e.slice(o,n),s[a]?s[a]+=n:s[++a]=n),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:ce(r,i)})),o=hr.lastIndex;return o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?se:le;return function(){var a=o(this,t),s=a.on;s!==i&&(n=(i=s).copy()).on(e,r),a.on=n}}(r,t,e))},attr:function(t,e){var r=P(t),i="transform"===r?me:ur;return this.attrTween(t,"function"==typeof e?(r.local?mr:yr)(r,i,ke(this,"attr."+t,e)):null==e?(r.local?pr:dr)(r):(r.local?gr:fr)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=P(t);return this.tween(r,(i.local?xr:br)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?ye:ur;return null==e?this.styleTween(t,function(t,e){var r,i,n;return function(){var o=V(this,t),a=(this.style.removeProperty(t),V(this,t));return o===a?null:o===r&&a===i?n:n=e(r=o,i=a)}}(t,i)).on("end.style."+t,Sr(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,n,o;return function(){var a=V(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=V(this,t)),a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s))}}(t,i,ke(this,"style."+t,e))).each(function(t,e){var r,i,n,o,a="style."+e,s="end."+a;return function(){var l=le(this,t),h=l.on,c=null==l.value[a]?o||(o=Sr(e)):void 0;h===r&&n===c||(i=(r=h).copy()).on(s,n=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,n,o=r+"";return function(){var a=V(this,t);return a===o?null:a===i?n:n=e(i=a,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,n;function o(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,o,r)),i}return o._value=e,o}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(ke(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,n=he(this.node(),r).tween,o=0,a=n.length;o2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete o[n]):a=!1;a&&delete t.__transition}}(this,t)}))},Lt.prototype.transition=function(t){var e,r;t instanceof Ar?(e=t._id,t=t._name):(e=Mr(),(r=Lr).time=Gt(),t=null==t?null:t+"");for(var i=this._groups,n=i.length,o=0;oWr?Math.pow(t,1/3):t/jr+qr}function Gr(t){return t>Nr?t*t*t:jr*(t-qr)}function Vr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Zr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Xr(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof Qr)return new Qr(t.h,t.c,t.l,t.opacity);if(t instanceof Hr||(t=Ur(t)),0===t.a&&0===t.b)return new Qr(NaN,0180||r<-180?r-360*Math.round(r/360):r):ir(isNaN(t)?e:t)}));function ri(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}ti(or);class ii extends Map{constructor(t,e=oi){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(ni(this,t))}has(t){return super.has(ni(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}(this,t))}}function ni({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function oi(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const ai=Symbol("implicit");function si(){var t=new ii,e=[],r=[],i=ai;function n(n){let o=t.get(n);if(void 0===o){if(i!==ai)return i;t.set(n,o=e.push(n)-1)}return r[o%r.length]}return n.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new ii;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return n},n.range=function(t){return arguments.length?(r=Array.from(t),n):r.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return si(e,r).unknown(i)},ri.apply(n,arguments),n}function li(){var t,e,r=si().unknown(void 0),i=r.domain,n=r.range,o=0,a=1,s=!1,l=0,h=0,c=.5;function u(){var r=i().length,u=a=hi?10:o>=ci?5:o>=ui?2:1;let s,l,h;return n<0?(h=Math.pow(10,-n)/a,s=Math.round(t*h),l=Math.round(e*h),s/he&&--l,h=-h):(h=Math.pow(10,n)*a,s=Math.round(t/h),l=Math.round(e/h),s*he&&--l),le?1:t>=e?0:NaN}function yi(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function mi(t){let e,r,i;function n(t,i,n=0,o=t.length){if(n>>1;r(t[e],i)<0?n=e+1:o=e}while(ngi(t(e),r),i=(e,r)=>t(e)-r):(e=t===gi||t===yi?t:xi,r=t,i=t),{left:n,center:function(t,e,r=0,o=t.length){const a=n(t,e,r,o-1);return a>r&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,n=0,o=t.length){if(n>>1;r(t[e],i)<=0?n=e+1:o=e}while(ne&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?Ei:$i,n=o=null,u}function u(e){return null==e||isNaN(e=+e)?r:(n||(n=i(a.map(t),s,l)))(t(h(e)))}return u.invert=function(r){return h(e((o||(o=i(s,a.map(t),ce)))(r)))},u.domain=function(t){return arguments.length?(a=Array.from(t,Mi),c()):a.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=Ai,c()},u.clamp=function(t){return arguments.length?(h=!!t||Li,c()):h!==Li},u.interpolate=function(t){return arguments.length?(l=t,c()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,i){return t=r,e=i,c()}}()(Li,Li)}var Ii,Ri=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pi(t){if(!(e=Ri.exec(t)))throw new Error("invalid format: "+t);var e;return new zi({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function zi(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ki(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function qi(t){return(t=Ki(Math.abs(t)))?t[1]:NaN}function Ni(t,e){var r=Ki(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}Pi.prototype=zi.prototype,zi.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ji={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ni(100*t,e),r:Ni,s:function(t,e){var r=Ki(t,e);if(!r)return t+"";var i=r[0],n=r[1],o=n-(Ii=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Ki(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Wi(t){return t}var Ui,Hi,Yi,Gi=Array.prototype.map,Vi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Zi(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)==(e=+e))return[t];const i=e=n))return[];const s=o-n+1,l=new Array(s);if(i)if(a<0)for(let t=0;t0;){if((n=pi(l,h,r))===i)return o[a]=l,o[s]=h,e(o);if(n>0)l=Math.floor(l/n)*n,h=Math.ceil(h/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,h=Math.floor(h*n)/n}i=n}return t},t}function Xi(){var t=Oi();return t.copy=function(){return Di(t,Xi())},ri.apply(t,arguments),Zi(t)}Ui=function(t){var e,r,i=void 0===t.grouping||void 0===t.thousands?Wi:(e=Gi.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var n=t.length,o=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(r)}),n=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Wi:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Gi.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Pi(t)).fill,r=t.align,u=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,y=t.precision,m=t.trim,x=t.type;"n"===x?(g=!0,x="g"):ji[x]||(void 0===y&&(y=12),m=!0,x="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",k="$"===d?o:/[%p]/.test(x)?l:"",C=ji[x],w=/[defgprs%]/.test(x);function _(t){var n,o,l,d=b,_=k;if("c"===x)_=C(t)+_,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:C(Math.abs(t),y),m&&(t=function(t){t:for(var e,r=t.length,i=1,n=-1;i0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),v&&0==+t&&"+"!==u&&(v=!1),d=(v?"("===u?u:h:"-"===u||"("===u?"":u)+d,_=("s"===x?Vi[8+Ii/3]:"")+_+(v&&"("===u?")":""),w)for(n=-1,o=t.length;++n(l=t.charCodeAt(n))||l>57){_=(46===l?a+t.slice(n+1):t.slice(n))+_,t=t.slice(0,n);break}}g&&!p&&(t=i(t,1/0));var S=d.length+t.length+_.length,T=S>1)+d+t+_+T.slice(S);break;default:t=T+d+t+_}return s(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),_.toString=function(){return t+""},_}return{format:u,formatPrefix:function(t,e){var r=u(((t=Pi(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(qi(e)/3))),n=Math.pow(10,-i),o=Vi[8+i/3];return function(t){return r(n*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Hi=Ui.format,Yi=Ui.formatPrefix;const Qi=1e3,Ji=6e4,tn=36e5,en=864e5,rn=6048e5,nn=31536e6,on=new Date,an=new Date;function sn(t,e,r,i){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),n.round=t=>{const e=n(t),r=n.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),n.range=(r,i,o)=>{const a=[];if(r=n.ceil(r),o=null==o?1:Math.floor(o),!(r0))return a;let s;do{a.push(s=new Date(+r)),e(r,o),t(r)}while(ssn((e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)}),((t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););})),r&&(n.count=(e,i)=>(on.setTime(+e),an.setTime(+i),t(on),t(an),Math.floor(r(on,an))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(i?e=>i(e)%t==0:e=>n.count(0,e)%t==0):n:null)),n}const ln=sn((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));ln.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?sn((e=>{e.setTime(Math.floor(e/t)*t)}),((e,r)=>{e.setTime(+e+r*t)}),((e,r)=>(r-e)/t)):ln:null),ln.range;const hn=sn((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*Qi)}),((t,e)=>(e-t)/Qi),(t=>t.getUTCSeconds())),cn=(hn.range,sn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qi)}),((t,e)=>{t.setTime(+t+e*Ji)}),((t,e)=>(e-t)/Ji),(t=>t.getMinutes()))),un=(cn.range,sn((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*Ji)}),((t,e)=>(e-t)/Ji),(t=>t.getUTCMinutes()))),dn=(un.range,sn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qi-t.getMinutes()*Ji)}),((t,e)=>{t.setTime(+t+e*tn)}),((t,e)=>(e-t)/tn),(t=>t.getHours()))),pn=(dn.range,sn((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*tn)}),((t,e)=>(e-t)/tn),(t=>t.getUTCHours()))),fn=(pn.range,sn((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ji)/en),(t=>t.getDate()-1))),gn=(fn.range,sn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/en),(t=>t.getUTCDate()-1))),yn=(gn.range,sn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/en),(t=>Math.floor(t/en))));function mn(t){return sn((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ji)/rn))}yn.range;const xn=mn(0),bn=mn(1),kn=mn(2),Cn=mn(3),wn=mn(4),_n=mn(5),vn=mn(6);function Sn(t){return sn((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/rn))}xn.range,bn.range,kn.range,Cn.range,wn.range,_n.range,vn.range;const Tn=Sn(0),An=Sn(1),Mn=Sn(2),Bn=Sn(3),Ln=Sn(4),Fn=Sn(5),$n=Sn(6),En=(Tn.range,An.range,Mn.range,Bn.range,Ln.range,Fn.range,$n.range,sn((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),Dn=(En.range,sn((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),On=(Dn.range,sn((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));On.every=t=>isFinite(t=Math.floor(t))&&t>0?sn((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,r)=>{e.setFullYear(e.getFullYear()+r*t)})):null,On.range;const In=sn((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Rn(t,e,r,i,n,o){const a=[[hn,1,Qi],[hn,5,5e3],[hn,15,15e3],[hn,30,3e4],[o,1,Ji],[o,5,3e5],[o,15,9e5],[o,30,18e5],[n,1,tn],[n,3,108e5],[n,6,216e5],[n,12,432e5],[i,1,en],[i,2,1728e5],[r,1,rn],[e,1,2592e6],[e,3,7776e6],[t,1,nn]];function s(e,r,i){const n=Math.abs(r-e)/i,o=mi((([,,t])=>t)).right(a,n);if(o===a.length)return t.every(fi(e/nn,r/nn,i));if(0===o)return ln.every(Math.max(fi(e,r,i),1));const[s,l]=a[n/a[o-1][2]isFinite(t=Math.floor(t))&&t>0?sn((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null,In.range;const[Pn,zn]=Rn(In,Dn,Tn,yn,pn,un),[Kn,qn]=Rn(On,En,xn,fn,dn,cn);function Nn(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function jn(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Wn(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var Un,Hn,Yn={"-":"",_:" ",0:"0"},Gn=/^\s*\d+/,Vn=/^%/,Zn=/[\\^$*+?|[\]().{}]/g;function Xn(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",o=n.length;return i+(o[t.toLowerCase(),e])))}function eo(t,e,r){var i=Gn.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function ro(t,e,r){var i=Gn.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function io(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function no(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function oo(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function ao(t,e,r){var i=Gn.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function so(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function lo(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function ho(t,e,r){var i=Gn.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function co(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function uo(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function po(t,e,r){var i=Gn.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function fo(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function go(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function yo(t,e,r){var i=Gn.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function mo(t,e,r){var i=Gn.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function xo(t,e,r){var i=Gn.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function bo(t,e,r){var i=Vn.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function ko(t,e,r){var i=Gn.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Co(t,e,r){var i=Gn.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function wo(t,e){return Xn(t.getDate(),e,2)}function _o(t,e){return Xn(t.getHours(),e,2)}function vo(t,e){return Xn(t.getHours()%12||12,e,2)}function So(t,e){return Xn(1+fn.count(On(t),t),e,3)}function To(t,e){return Xn(t.getMilliseconds(),e,3)}function Ao(t,e){return To(t,e)+"000"}function Mo(t,e){return Xn(t.getMonth()+1,e,2)}function Bo(t,e){return Xn(t.getMinutes(),e,2)}function Lo(t,e){return Xn(t.getSeconds(),e,2)}function Fo(t){var e=t.getDay();return 0===e?7:e}function $o(t,e){return Xn(xn.count(On(t)-1,t),e,2)}function Eo(t){var e=t.getDay();return e>=4||0===e?wn(t):wn.ceil(t)}function Do(t,e){return t=Eo(t),Xn(wn.count(On(t),t)+(4===On(t).getDay()),e,2)}function Oo(t){return t.getDay()}function Io(t,e){return Xn(bn.count(On(t)-1,t),e,2)}function Ro(t,e){return Xn(t.getFullYear()%100,e,2)}function Po(t,e){return Xn((t=Eo(t)).getFullYear()%100,e,2)}function zo(t,e){return Xn(t.getFullYear()%1e4,e,4)}function Ko(t,e){var r=t.getDay();return Xn((t=r>=4||0===r?wn(t):wn.ceil(t)).getFullYear()%1e4,e,4)}function qo(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Xn(e/60|0,"0",2)+Xn(e%60,"0",2)}function No(t,e){return Xn(t.getUTCDate(),e,2)}function jo(t,e){return Xn(t.getUTCHours(),e,2)}function Wo(t,e){return Xn(t.getUTCHours()%12||12,e,2)}function Uo(t,e){return Xn(1+gn.count(In(t),t),e,3)}function Ho(t,e){return Xn(t.getUTCMilliseconds(),e,3)}function Yo(t,e){return Ho(t,e)+"000"}function Go(t,e){return Xn(t.getUTCMonth()+1,e,2)}function Vo(t,e){return Xn(t.getUTCMinutes(),e,2)}function Zo(t,e){return Xn(t.getUTCSeconds(),e,2)}function Xo(t){var e=t.getUTCDay();return 0===e?7:e}function Qo(t,e){return Xn(Tn.count(In(t)-1,t),e,2)}function Jo(t){var e=t.getUTCDay();return e>=4||0===e?Ln(t):Ln.ceil(t)}function ta(t,e){return t=Jo(t),Xn(Ln.count(In(t),t)+(4===In(t).getUTCDay()),e,2)}function ea(t){return t.getUTCDay()}function ra(t,e){return Xn(An.count(In(t)-1,t),e,2)}function ia(t,e){return Xn(t.getUTCFullYear()%100,e,2)}function na(t,e){return Xn((t=Jo(t)).getUTCFullYear()%100,e,2)}function oa(t,e){return Xn(t.getUTCFullYear()%1e4,e,4)}function aa(t,e){var r=t.getUTCDay();return Xn((t=r>=4||0===r?Ln(t):Ln.ceil(t)).getUTCFullYear()%1e4,e,4)}function sa(){return"+0000"}function la(){return"%"}function ha(t){return+t}function ca(t){return Math.floor(+t/1e3)}function ua(t){return new Date(t)}function da(t){return t instanceof Date?+t:+new Date(+t)}function pa(t,e,r,i,n,o,a,s,l,h){var c=Oi(),u=c.invert,d=c.domain,p=h(".%L"),f=h(":%S"),g=h("%I:%M"),y=h("%I %p"),m=h("%a %d"),x=h("%b %d"),b=h("%B"),k=h("%Y");function C(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ha,s:ca,S:Lo,u:Fo,U:$o,V:Do,w:Oo,W:Io,x:null,X:null,y:Ro,Y:zo,Z:qo,"%":la},k={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:No,e:No,f:Yo,g:na,G:aa,H:jo,I:Wo,j:Uo,L:Ho,m:Go,M:Vo,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ha,s:ca,S:Zo,u:Xo,U:Qo,V:ta,w:ea,W:ra,x:null,X:null,y:ia,Y:oa,Z:sa,"%":la},C={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=f.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=u.exec(e.slice(r));return i?(t.w=d.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=g.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return v(t,e,r,i)},d:uo,e:uo,f:xo,g:so,G:ao,H:fo,I:fo,j:po,L:mo,m:co,M:go,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:ho,Q:ko,s:Co,S:yo,u:ro,U:io,V:no,w:eo,W:oo,x:function(t,e,i){return v(t,r,e,i)},X:function(t,e,r){return v(t,i,e,r)},y:so,Y:ao,Z:lo,"%":bo};function w(t,e){return function(r){var i,n,o,a=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in o||(o.w=1),"Z"in o?(n=(i=jn(Wn(o.y,0,1))).getUTCDay(),i=n>4||0===n?An.ceil(i):An(i),i=gn.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(n=(i=Nn(Wn(o.y,0,1))).getDay(),i=n>4||0===n?bn.ceil(i):bn(i),i=fn.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),n="Z"in o?jn(Wn(o.y,0,1)).getUTCDay():Nn(Wn(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(n+5)%7:o.w+7*o.U-(n+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,jn(o)):Nn(o)}}function v(t,e,r,i){for(var n,o,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(n=e.charCodeAt(a++))){if(n=e.charAt(a++),!(o=C[n in Yn?e.charAt(a++):n])||(i=o(t,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}return b.x=w(r,b),b.X=w(i,b),b.c=w(e,b),k.x=w(r,k),k.X=w(i,k),k.c=w(e,k),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=_(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",k);return e.toString=function(){return t},e},utcParse:function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Hn=Un.format,Un.parse,Un.utcFormat,Un.utcParse;const ga=function(t){for(var e=new Array(10),r=0;r<10;)e[r]="#"+t.slice(6*r,6*++r);return e}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ya(t){return"string"==typeof t?new Mt([[document.querySelector(t)]],[document.documentElement]):new Mt([[t]],At)}function ma(t){return function(){return t}}const xa=Math.abs,ba=Math.atan2,ka=Math.cos,Ca=Math.max,wa=Math.min,_a=Math.sin,va=Math.sqrt,Sa=1e-12,Ta=Math.PI,Aa=Ta/2,Ma=2*Ta;function Ba(t){return t>=1?Aa:t<=-1?-Aa:Math.asin(t)}const La=Math.PI,Fa=2*La,$a=1e-6,Ea=Fa-$a;function Da(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Da;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e$a)if(Math.abs(c*s-l*h)>$a&&n){let d=r-o,p=i-a,f=s*s+l*l,g=d*d+p*p,y=Math.sqrt(f),m=Math.sqrt(u),x=n*Math.tan((La-Math.acos((f+u-g)/(2*y*m)))/2),b=x/m,k=x/y;Math.abs(b-1)>$a&&this._append`L${t+b*h},${e+b*c}`,this._append`A${n},${n},0,0,${+(c*d>h*p)},${this._x1=t+k*s},${this._y1=e+k*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,i,n,o){if(t=+t,e=+e,o=!!o,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),s=r*Math.sin(i),l=t+a,h=e+s,c=1^o,u=o?i-n:n-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>$a||Math.abs(this._y1-h)>$a)&&this._append`L${l},${h}`,r&&(u<0&&(u=u%Fa+Fa),u>Ea?this._append`A${r},${r},0,1,${c},${t-a},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:u>$a&&this._append`A${r},${r},0,${+(u>=La)},${c},${this._x1=t+r*Math.cos(n)},${this._y1=e+r*Math.sin(n)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Ia(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Oa(e)}function Ra(t){return t.innerRadius}function Pa(t){return t.outerRadius}function za(t){return t.startAngle}function Ka(t){return t.endAngle}function qa(t){return t&&t.padAngle}function Na(t,e,r,i,n,o,a){var s=t-r,l=e-i,h=(a?o:-o)/va(s*s+l*l),c=h*l,u=-h*s,d=t+c,p=e+u,f=r+c,g=i+u,y=(d+f)/2,m=(p+g)/2,x=f-d,b=g-p,k=x*x+b*b,C=n-o,w=d*g-f*p,_=(b<0?-1:1)*va(Ca(0,C*C*k-w*w)),v=(w*b-x*_)/k,S=(-w*x-b*_)/k,T=(w*b+x*_)/k,A=(-w*x+b*_)/k,M=v-y,B=S-m,L=T-y,F=A-m;return M*M+B*B>L*L+F*F&&(v=T,S=A),{cx:v,cy:S,x01:-c,y01:-u,x11:v*(n/C-1),y11:S*(n/C-1)}}function ja(){var t=Ra,e=Pa,r=ma(0),i=null,n=za,o=Ka,a=qa,s=null,l=Ia(h);function h(){var h,c,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=n.apply(this,arguments)-Aa,g=o.apply(this,arguments)-Aa,y=xa(g-f),m=g>f;if(s||(s=h=l()),pSa)if(y>Ma-Sa)s.moveTo(p*ka(f),p*_a(f)),s.arc(0,0,p,f,g,!m),d>Sa&&(s.moveTo(d*ka(g),d*_a(g)),s.arc(0,0,d,g,f,m));else{var x,b,k=f,C=g,w=f,_=g,v=y,S=y,T=a.apply(this,arguments)/2,A=T>Sa&&(i?+i.apply(this,arguments):va(d*d+p*p)),M=wa(xa(p-d)/2,+r.apply(this,arguments)),B=M,L=M;if(A>Sa){var F=Ba(A/d*_a(T)),$=Ba(A/p*_a(T));(v-=2*F)>Sa?(w+=F*=m?1:-1,_-=F):(v=0,w=_=(f+g)/2),(S-=2*$)>Sa?(k+=$*=m?1:-1,C-=$):(S=0,k=C=(f+g)/2)}var E=p*ka(k),D=p*_a(k),O=d*ka(_),I=d*_a(_);if(M>Sa){var R,P=p*ka(C),z=p*_a(C),K=d*ka(w),q=d*_a(w);if(y1?0:u<-1?Ta:Math.acos(u))/2),Y=va(R[0]*R[0]+R[1]*R[1]);B=wa(M,(d-Y)/(H-1)),L=wa(M,(p-Y)/(H+1))}else B=L=0}S>Sa?L>Sa?(x=Na(K,q,E,D,p,L,m),b=Na(P,z,O,I,p,L,m),s.moveTo(x.cx+x.x01,x.cy+x.y01),LSa&&v>Sa?B>Sa?(x=Na(O,I,P,z,d,-B,m),b=Na(E,D,K,q,d,-B,m),s.lineTo(x.cx+x.x01,x.cy+x.y01),Bt?1:e>=t?0:NaN}function Xa(t){return t}function Qa(){var t=Xa,e=Za,r=null,i=ma(0),n=ma(Ma),o=ma(0);function a(a){var s,l,h,c,u,d=(a=Wa(a)).length,p=0,f=new Array(d),g=new Array(d),y=+i.apply(this,arguments),m=Math.min(Ma,Math.max(-Ma,n.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/d,o.apply(this,arguments)),b=x*(m<0?-1:1);for(s=0;s0&&(p+=u);for(null!=e?f.sort((function(t,r){return e(g[t],g[r])})):null!=r&&f.sort((function(t,e){return r(a[t],a[e])})),s=0,h=p?(m-d*b)/p:0;s0?u*h:0)+b,g[l]={data:a[l],index:s,value:u,startAngle:y,endAngle:c,padAngle:x};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:ma(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,r=null,a):e},a.sort=function(t){return arguments.length?(r=t,e=null,a):r},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:ma(+t),a):i},a.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:ma(+t),a):n},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:ma(+t),a):o},a}function Ja(){}function ts(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function es(t){this._context=t}function rs(t){return new es(t)}function is(t){this._context=t}function ns(t){return new is(t)}function os(t){this._context=t}function as(t){return new os(t)}Oa.prototype,Array.prototype.slice,Ua.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},es.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:ts(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ts(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},is.prototype={areaStart:Ja,areaEnd:Ja,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ts(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},os.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ts(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class ss{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function ls(t){return new ss(t,!0)}function hs(t){return new ss(t,!1)}function cs(t,e){this._basis=new es(t),this._beta=e}cs.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,n=t[0],o=e[0],a=t[r]-n,s=e[r]-o,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+i*a),this._beta*e[l]+(1-this._beta)*(o+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const us=function t(e){function r(t){return 1===e?new es(t):new cs(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function ds(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function ps(t,e){this._context=t,this._k=(1-e)/6}ps.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:ds(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ds(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fs=function t(e){function r(t){return new ps(t,e)}return r.tension=function(e){return t(+e)},r}(0);function gs(t,e){this._context=t,this._k=(1-e)/6}gs.prototype={areaStart:Ja,areaEnd:Ja,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ds(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ys=function t(e){function r(t){return new gs(t,e)}return r.tension=function(e){return t(+e)},r}(0);function ms(t,e){this._context=t,this._k=(1-e)/6}ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ds(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const xs=function t(e){function r(t){return new ms(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bs(t,e,r){var i=t._x1,n=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Sa){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Sa){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*h+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,n,o,a,t._x2,t._y2)}function ks(t,e){this._context=t,this._alpha=e}ks.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:bs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Cs=function t(e){function r(t){return e?new ks(t,e):new ps(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function ws(t,e){this._context=t,this._alpha=e}ws.prototype={areaStart:Ja,areaEnd:Ja,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _s=function t(e){function r(t){return e?new ws(t,e):new gs(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function vs(t,e){this._context=t,this._alpha=e}vs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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:bs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ss=function t(e){function r(t){return e?new vs(t,e):new ms(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Ts(t){this._context=t}function As(t){return new Ts(t)}function Ms(t){return t<0?-1:1}function Bs(t,e,r){var i=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),s=(o*n+a*i)/(i+n);return(Ms(o)+Ms(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ls(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Fs(t,e,r){var i=t._x0,n=t._y0,o=t._x1,a=t._y1,s=(o-i)/3;t._context.bezierCurveTo(i+s,n+s*e,o-s,a-s*r,o,a)}function $s(t){this._context=t}function Es(t){this._context=new Ds(t)}function Ds(t){this._context=t}function Os(t){return new $s(t)}function Is(t){return new Es(t)}function Rs(t){this._context=t}function Ps(t){var e,r,i=t.length-1,n=new Array(i),o=new Array(i),a=new Array(i);for(n[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)n[e]=(a[e]-n[e+1])/o[e];for(o[i-1]=(t[i]+n[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},Ws.prototype={constructor:Ws,scale:function(t){return 1===t?this:new Ws(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ws(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Ws(1,0,0),Ws.prototype},7266:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(6309),n=r(3122);const o=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}},a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new o}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},1931:(t,e,r)=>{"use strict";r.d(e,{A:()=>g});var i=r(7266),n=r(3122);const o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(o.re);if(!e)return;const r=e[1],n=parseInt(r,16),a=r.length,s=a%4==0,l=a>4,h=l?1:17,c=l?8:4,u=s?0:-1,d=l?255:15;return i.A.set({r:(n>>c*(u+3)&d)*h,g:(n>>c*(u+2)&d)*h,b:(n>>c*(u+1)&d)*h,a:s?(n&d)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}${n.Y[Math.round(255*o)]}`:`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}`}},a=o;var s=r(6309);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,n,o,a,h,c]=r;return i.A.set({h:l._hue2deg(n),s:s.A.channel.clamp.s(parseFloat(o)),l:s.A.channel.clamp.l(parseFloat(a)),a:h?s.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${n})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},h=l,c={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=c.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const t in c.colors)if(c.colors[t]===e)return t}},u=c,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(d.re);if(!r)return;const[,n,o,a,l,h,c,u,p]=r;return i.A.set({r:s.A.channel.clamp.r(o?2.55*parseFloat(n):parseFloat(n)),g:s.A.channel.clamp.g(l?2.55*parseFloat(a):parseFloat(a)),b:s.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:u?s.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(n)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}},p=d,f={format:{keyword:c,hex:a,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||p.parse(t)||h.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.Z.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):a.stringify(t)},g=f},3122:(t,e,r)=>{"use strict";r.d(e,{Y:()=>n,Z:()=>o});var i=r(6309);const n={};for(let t=0;t<=255;t++)n[t]=i.A.unit.dec2hex(t);const o={ALL:0,RGB:1,HSL:2}},5635:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(6309),n=r(1931);const o=(t,e,r)=>{const o=n.A.parse(t),a=o[e],s=i.A.channel.clamp[e](a+r);return a!==s&&(o[e]=s),n.A.stringify(o)}},8232:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(6309),n=r(1931);const o=(t,e)=>{const r=n.A.parse(t);for(const t in e)r[t]=i.A.channel.clamp[t](e[t]);return n.A.stringify(r)}},5263:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",-e)},5097:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(6309),n=r(1931);const o=t=>(t=>{const{r:e,g:r,b:o}=n.A.parse(t),a=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(o);return i.A.lang.round(a)})(t)>=.5,a=t=>!o(t)},8041:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",e)},5582:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(6309),n=r(7266),o=r(1931),a=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,a.A)(t,{a:e});const l=n.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return o.A.stringify(l)}},6309:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const o=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(n){case"r":return 255*i.hue2rgb(a,o,t+1/3);case"g":return 255*i.hue2rgb(a,o,t);case"b":return 255*i.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),o=Math.min(t,e,r),a=(n+o)/2;if("l"===i)return 100*a;if(n===o)return 0;const s=n-o;if("s"===i)return 100*(a>.5?s/(2-n-o):s/(n+o));switch(n){case t:return 60*((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},9469:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(6984);const n=function(t,e){for(var r=t.length;r--;)if((0,i.A)(t[r][0],e))return r;return-1};var o=Array.prototype.splice;function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1},a.prototype.set=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};const s=a},8335:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(8562),n=r(1917);const o=(0,i.A)(n.A,"Map")},2050:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});const i=(0,r(8562).A)(Object,"create");var n=Object.prototype.hasOwnProperty;var o=Object.prototype.hasOwnProperty;function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{"use strict";r.d(e,{A:()=>o});var i=r(8562),n=r(1917);const o=(0,i.A)(n.A,"Set")},2080:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(9469);var n=r(8335),o=r(2050);function a(t){var e=this.__data__=new i.A(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new i.A,this.size=0},a.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var r=this.__data__;if(r instanceof i.A){var a=r.__data__;if(!n.A||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o.A(a)}return r.set(t,e),this.size=r.size,this};const s=a},241:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=r(1917).A.Symbol},3988:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=r(1917).A.Uint8Array},2505:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var i=r(5175),n=r(2049),o=r(1200),a=r(5353),s=r(4749),l=Object.prototype.hasOwnProperty;const h=function(t,e){var r=(0,n.A)(t),h=!r&&(0,i.A)(t),c=!r&&!h&&(0,o.A)(t),u=!r&&!h&&!c&&(0,s.A)(t),d=r||h||c||u,p=d?function(t,e){for(var r=-1,i=Array(t);++r{"use strict";r.d(e,{A:()=>a});var i=r(2528),n=r(6984),o=Object.prototype.hasOwnProperty;const a=function(t,e,r){var a=t[e];o.call(t,e)&&(0,n.A)(a,r)&&(void 0!==r||e in t)||(0,i.A)(t,e,r)}},2528:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(4171);const n=function(t,e,r){"__proto__"==e&&i.A?(0,i.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},7132:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e,r){for(var i=-1,n=Object(t),o=r(t),a=o.length;a--;){var s=o[++i];if(!1===e(n[s],s,n))break}return t}},2383:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(241),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,s=i.A?i.A.toStringTag:void 0;var l=Object.prototype.toString;var h=i.A?i.A.toStringTag:void 0;const c=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":h&&h in Object(t)?function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(t){}var n=a.call(t);return i&&(e?t[s]=r:delete t[s]),n}(t):function(t){return l.call(t)}(t)}},4453:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(7271);const n=(0,r(367).A)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,i.A)(t))return n(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},4326:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(9008),n=r(5255),o=r(7424);const a=function(t,e){return(0,o.A)((0,n.A)(t,e,i.A),t+"")}},2789:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e){return t(e)}}},565:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(3988);const n=function(t){var e=new t.constructor(t.byteLength);return new i.A(e).set(new i.A(t)),e}},154:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(1917),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n?i.A.Buffer:void 0,s=a?a.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var r=t.length,i=s?s(r):new t.constructor(r);return t.copy(i),i}},1801:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(565);const n=function(t,e){var r=e?(0,i.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},9759:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r{"use strict";r.d(e,{A:()=>o});var i=r(2851),n=r(2528);const o=function(t,e,r,o){var a=!r;r||(r={});for(var s=-1,l=e.length;++s{"use strict";r.d(e,{A:()=>o});var i=r(4326),n=r(6832);const o=function(t){return(0,i.A)((function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&(0,n.A)(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++i{"use strict";r.d(e,{A:()=>n});var i=r(8562);const n=function(){try{var t=(0,i.A)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},2136:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i="object"==typeof global&&global&&global.Object===Object&&global},8562:(t,e,r)=>{"use strict";r.d(e,{A:()=>y});var i=r(9610);const n=r(1917).A["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var s=r(3149),l=r(1121),h=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,d=c.toString,p=u.hasOwnProperty,f=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(t){return!(!(0,s.A)(t)||(e=t,a&&a in e))&&((0,i.A)(t)?f:h).test((0,l.A)(t));var e},y=function(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return g(r)?r:void 0}},5647:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=(0,r(367).A)(Object.getPrototypeOf,Object)},9137:(t,e,r)=>{"use strict";r.d(e,{A:()=>_});var i=r(8562),n=r(1917);const o=(0,i.A)(n.A,"DataView");var a=r(8335);const s=(0,i.A)(n.A,"Promise");var l=r(9857);const h=(0,i.A)(n.A,"WeakMap");var c=r(2383),u=r(1121),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",y="[object DataView]",m=(0,u.A)(o),x=(0,u.A)(a.A),b=(0,u.A)(s),k=(0,u.A)(l.A),C=(0,u.A)(h),w=c.A;(o&&w(new o(new ArrayBuffer(1)))!=y||a.A&&w(new a.A)!=d||s&&w(s.resolve())!=p||l.A&&w(new l.A)!=f||h&&w(new h)!=g)&&(w=function(t){var e=(0,c.A)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,u.A)(r):"";if(i)switch(i){case m:return y;case x:return d;case b:return p;case k:return f;case C:return g}return e});const _=w},407:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(3149),n=Object.create;const o=function(){function t(){}return function(e){if(!(0,i.A)(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var a=r(5647),s=r(7271);const l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:o((0,a.A)(t))}},5353:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=/^(?:0|[1-9]\d*)$/;const n=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&i.test(t))&&t>-1&&t%1==0&&t{"use strict";r.d(e,{A:()=>s});var i=r(6984),n=r(8446),o=r(5353),a=r(3149);const s=function(t,e,r){if(!(0,a.A)(r))return!1;var s=typeof e;return!!("number"==s?(0,n.A)(r)&&(0,o.A)(e,r.length):"string"==s&&e in r)&&(0,i.A)(r[e],t)}},7271:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=Object.prototype;const n=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},4841:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(2136),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n&&i.A.process;const s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}()},367:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){return function(r){return t(e(r))}}},5255:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=Math.max;const n=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=i(n.length-e,0),s=Array(a);++o{"use strict";r.d(e,{A:()=>o});var i=r(2136),n="object"==typeof self&&self&&self.Object===Object&&self;const o=i.A||n||Function("return this")()},7424:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(9142),n=r(4171),o=r(9008);const a=n.A?function(t,e){return(0,n.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.A)(e),writable:!0})}:o.A;var s=Date.now;const l=(h=a,c=0,u=0,function(){var t=s(),e=16-(t-u);if(u=t,e>0){if(++c>=800)return arguments[0]}else c=0;return h.apply(void 0,arguments)});var h,c,u},1121:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=Function.prototype.toString;const n=function(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},9142:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return function(){return t}}},6984:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){return t===e||t!=t&&e!=e}},9008:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return t}},5175:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var i=r(2383),n=r(3098);const o=function(t){return(0,n.A)(t)&&"[object Arguments]"==(0,i.A)(t)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const h=o(function(){return arguments}())?o:function(t){return(0,n.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")}},2049:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=Array.isArray},8446:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(9610),n=r(5254);const o=function(t){return null!=t&&(0,n.A)(t.length)&&!(0,i.A)(t)}},3533:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(8446),n=r(3098);const o=function(t){return(0,n.A)(t)&&(0,i.A)(t)}},1200:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(1917);var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n?i.A.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},6401:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var i=r(4453),n=r(9137),o=r(5175),a=r(2049),s=r(8446),l=r(1200),h=r(7271),c=r(4749),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,s.A)(t)&&((0,a.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,c.A)(t)||(0,o.A)(t)))return!t.length;var e=(0,n.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,h.A)(t))return!(0,i.A)(t).length;for(var r in t)if(u.call(t,r))return!1;return!0}},9610:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(2383),n=r(3149);const o=function(t){if(!(0,n.A)(t))return!1;var e=(0,i.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3149:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3098:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return null!=t&&"object"==typeof t}},4749:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(2383),n=r(5254),o=r(3098),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=r(2789),l=r(4841),h=l.A&&l.A.isTypedArray;const c=h?(0,s.A)(h):function(t){return(0,o.A)(t)&&(0,n.A)(t.length)&&!!a[(0,i.A)(t)]}},9999:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var i=r(2505),n=r(3149),o=r(7271);var a=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,n.A)(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=(0,o.A)(t),r=[];for(var i in t)("constructor"!=i||!e&&a.call(t,i))&&r.push(i);return r};var l=r(8446);const h=function(t){return(0,l.A)(t)?(0,i.A)(t,!0):s(t)}},6632:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(2050);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return r.cache=o.set(n,a)||o,a};return r.cache=new(n.Cache||i.A),r}n.Cache=i.A;const o=n},7222:(t,e,r)=>{"use strict";r.d(e,{A:()=>$});var i=r(2080),n=r(2528),o=r(6984);const a=function(t,e,r){(void 0!==r&&!(0,o.A)(t[e],r)||void 0===r&&!(e in t))&&(0,n.A)(t,e,r)};var s=r(7132),l=r(154),h=r(1801),c=r(9759),u=r(407),d=r(5175),p=r(2049),f=r(3533),g=r(1200),y=r(9610),m=r(3149),x=r(2383),b=r(5647),k=r(3098),C=Function.prototype,w=Object.prototype,_=C.toString,v=w.hasOwnProperty,S=_.call(Object);var T=r(4749);const A=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var M=r(2031),B=r(9999);const L=function(t,e,r,i,n,o,s){var C,w=A(t,r),L=A(e,r),F=s.get(L);if(F)a(t,r,F);else{var $=o?o(w,L,r+"",t,e,s):void 0,E=void 0===$;if(E){var D=(0,p.A)(L),O=!D&&(0,g.A)(L),I=!D&&!O&&(0,T.A)(L);$=L,D||O||I?(0,p.A)(w)?$=w:(0,f.A)(w)?$=(0,c.A)(w):O?(E=!1,$=(0,l.A)(L,!0)):I?(E=!1,$=(0,h.A)(L,!0)):$=[]:function(t){if(!(0,k.A)(t)||"[object Object]"!=(0,x.A)(t))return!1;var e=(0,b.A)(t);if(null===e)return!0;var r=v.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&_.call(r)==S}(L)||(0,d.A)(L)?($=w,(0,d.A)(w)?(C=w,$=(0,M.A)(C,(0,B.A)(C))):(0,m.A)(w)&&!(0,y.A)(w)||($=(0,u.A)(L))):E=!1}E&&(s.set(L,$),n($,L,i,o,s),s.delete(L)),a(t,r,$)}},F=function t(e,r,n,o,l){e!==r&&(0,s.A)(r,(function(s,h){if(l||(l=new i.A),(0,m.A)(s))L(e,r,h,n,t,o,l);else{var c=o?o(A(e,h),s,h+"",e,r,l):void 0;void 0===c&&(c=s),a(e,h,c)}}),B.A)},$=(0,r(3767).A)((function(t,e,r){F(t,e,r)}))},8568:(t,e,r)=>{"use strict";r.d(e,{WY:()=>S,pC:()=>_,Gc:()=>k});var i=r(32);const n=/^[a-z0-9]+(-[a-z0-9]+)*$/,o=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(n)||!(e&&""===t.prefix||t.prefix.match(n))||!t.name.match(n)),a=Object.freeze({left:0,top:0,width:16,height:16}),s=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),l=Object.freeze({...a,...s}),h=Object.freeze({...l,body:"",hidden:!1});function c(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in h)i in s?i in t&&!(i in r)&&(r[i]=s[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function u(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let o={};function a(t){o=c(i[t]||n[t],o)}return a(e),r.forEach(a),c(t,o)}const d=Object.freeze({width:null,height:null}),p=Object.freeze({...d,...s}),f=/(-?[0-9.]*[0-9]+[0-9.]*)/g,g=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(f);if(null===i||!i.length)return t;const n=[];let o=i.shift(),a=g.test(o);for(;;){if(a){const t=parseFloat(o);isNaN(t)?n.push(o):n.push(Math.ceil(t*e*r)/r)}else n.push(o);if(o=i.shift(),void 0===o)return n.join("");a=!a}}const m=/\sid="(\S+)"/g,x="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let b=0;var k={body:'?',height:80,width:80},C=new Map,w=new Map,_=(0,i.K2)((t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(i.Rm.debug("Registering icon pack:",e.name),"loader"in e)w.set(e.name,e.loader);else{if(!("icons"in e))throw i.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');C.set(e.name,e.icons)}}}),"registerIconPacks"),v=(0,i.K2)((async(t,e)=>{const r=((t,e,r,i="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),r=n.pop(),a={provider:n.length>0?n[0]:i,prefix:r,name:t};return e&&!o(a)?null:a}const a=n[0],s=a.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!o(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:a};return e&&!o(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let a=C.get(n);if(!a){const t=w.get(n);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{a={...await t(),prefix:n},C.set(n,a)}catch(t){throw i.Rm.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=function(t,e){if(t.icons[e])return u(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach((function t(e){if(r[e])return n[e]=[];if(!(e in n)){n[e]=null;const r=i[e]&&i[e].parent,o=r&&t(r);o&&(n[e]=[r].concat(o))}return n[e]})),n}(t,[e])[e];return r?u(t,e,r):null}(a,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s}),"getRegisteredIconData"),S=(0,i.K2)((async(t,e)=>{let r;try{r=await v(t,e?.fallbackPrefix)}catch(t){i.Rm.error(t),r=k}const n=function(t,e){const r={...l,...t},i={...p,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach((t=>{const e=[],r=t.hFlip,i=t.vFlip;let a,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):i&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=n.height/2+n.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:a=n.width/2+n.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(n.left!==n.top&&(a=n.left,n.left=n.top,n.top=a),n.width!==n.height&&(a=n.width,n.width=n.height,n.height=a)),e.length&&(o=function(t,e){const r=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const n=t.indexOf(">",i),o=t.indexOf("",o);if(-1===a)break;r+=t.slice(n+1,o).trim(),t=t.slice(0,i).trim()+t.slice(a+1)}return{defs:r,content:t}}(t);return i=r.defs,n=e+r.content+"",i?""+i+""+n:n;var i,n}(o,''))}));const a=i.width,s=i.height,h=n.width,c=n.height;let u,d;null===a?(d=null===s?"1em":"auto"===s?c:s,u=y(d,h/c)):(u="auto"===a?h:a,d=null===s?y(u,c/h):"auto"===s?c:s);const f={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(f[t]=e.toString())};g("width",u),g("height",d);const m=[n.left,n.top,h,c];return f.viewBox=m.join(" "),{attributes:f,viewBox:m,body:o}}(r,e);return function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'"+t+""}(function(t,e=x){const r=[];let i;for(;i=m.exec(t);)r.push(i[1]);if(!r.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return r.forEach((r=>{const i="function"==typeof e?e(r):e+(b++).toString(),o=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+i+n+"$3")})),t=t.replace(new RegExp(n,"g"),"")}(n.body),n.attributes)}),"getIconSVG")},1132:(t,e,r)=>{"use strict";r.d(e,{r:()=>i});var i="11.3.0"},7750:(t,e,r)=>{"use strict";r.d(e,{O:()=>n,R:()=>l});var i=r(32),n=(0,i.K2)((({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}}),"getSubGraphTitleMargins"),o={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function a(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=s(t),e=s(e);const[r,i]=[t.x,t.y],[n,o]=[e.x,e.y],a=n-r,l=o-i;return{angle:Math.atan(l/a),deltaX:a,deltaY:l}}(0,i.K2)(a,"calculateDeltaAndAngle");var s=(0,i.K2)((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),l=(0,i.K2)((t=>({x:(0,i.K2)((function(e,r,i){let n=0;if(0===r&&Object.hasOwn(o,t.arrowTypeStart)){const{angle:e,deltaX:r}=a(i[0],i[1]);n=o[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(o,t.arrowTypeEnd)){const{angle:e,deltaX:r}=a(i[i.length-1],i[i.length-2]);n=o[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}return s(e).x+n}),"x"),y:(0,i.K2)((function(e,r,i){let n=0;if(0===r&&Object.hasOwn(o,t.arrowTypeStart)){const{angle:e,deltaY:r}=a(i[0],i[1]);n=o[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(o,t.arrowTypeEnd)){const{angle:e,deltaY:r}=a(i[i.length-1],i[i.length-2]);n=o[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}return s(e).y+n}),"y")})),"getLineFunctionsWithOffset")},1417:(t,e,r)=>{"use strict";r.d(e,{H:()=>zr,r:()=>Pr});var i=r(32);function n(t){return null==t}function o(t){return"object"==typeof t&&null!==t}function a(t){return Array.isArray(t)?t:n(t)?[]:[t]}function s(t,e){var r,i,n,o;if(e)for(r=0,i=(o=Object.keys(e)).length;rs&&(e=i-s+(o=" ... ").length),r-i>s&&(r=i+s-(a=" ...").length),{str:o+t.slice(e,r).replace(/\t/g,"→")+a,pos:i-e+o.length}}function g(t,e){return c.repeat(" ",e-t.length)+t}function y(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,n=[0],o=[],a=-1;r=i.exec(t.buffer);)o.push(r.index),n.push(r.index+r[0].length),t.position<=r.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s,l,h="",u=Math.min(t.line+e.linesAfter,o.length).toString().length,d=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=f(t.buffer,n[a-s],o[a-s],t.position-(n[a]-n[a-s]),d),h=c.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+h;for(l=f(t.buffer,n[a],o[a],t.position,d),h+=c.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",h+=c.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=o.length);s++)l=f(t.buffer,n[a+s],o[a+s],t.position-(n[a]-n[a+s]),d),h+=c.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return h.replace(/\n$/,"")}(0,i.K2)(f,"getLine"),(0,i.K2)(g,"padStart"),(0,i.K2)(y,"makeSnippet");var m=y,x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"];function k(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function C(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===x.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=k(e.styleAliases||null),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,i.K2)(k,"compileStyleAliases"),(0,i.K2)(C,"Type$1");var w=C;function _(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)})),r[e]=t})),r}function v(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,i.K2)(n,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:(0,i.K2)((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:(0,i.K2)((function(t){return t.toString(10)}),"decimal"),hexadecimal:(0,i.K2)((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),N=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function j(t){return null!==t&&!(!N.test(t)||"_"===t[t.length-1])}function W(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K2)(j,"resolveYamlFloat"),(0,i.K2)(W,"constructYamlFloat");var U=/^[-+]?[0-9]+e/;function H(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(c.isNegativeZero(t))return"-0.0";return r=t.toString(10),U.test(r)?r.replace("e",".e"):r}function Y(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||c.isNegativeZero(t))}(0,i.K2)(H,"representYamlFloat"),(0,i.K2)(Y,"isFloat");var G=new w("tag:yaml.org,2002:float",{kind:"scalar",resolve:j,construct:W,predicate:Y,represent:H,defaultStyle:"lowercase"}),V=T.extend({implicit:[L,D,q,G]}),Z=V,X=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=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 J(t){return null!==t&&(null!==X.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,i,n,o,a,s,l,h=0,c=null;if(null===(e=X.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,n,o,a,s,h)),c&&l.setTime(l.getTime()-c),l}function et(t){return t.toISOString()}(0,i.K2)(J,"resolveYamlTimestamp"),(0,i.K2)(tt,"constructYamlTimestamp"),(0,i.K2)(et,"representYamlTimestamp");var rt=new w("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function it(t){return"<<"===t||null===t}(0,i.K2)(it,"resolveYamlMerge");var nt=new w("tag:yaml.org,2002:merge",{kind:"scalar",resolve:it}),ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function at(t){if(null===t)return!1;var e,r,i=0,n=t.length,o=ot;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8==0}function st(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,o=ot,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(i.charAt(e));return 0==(r=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function lt(t){var e,r,i="",n=0,o=t.length,a=ot;for(e=0;e>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]),n=(n<<8)+t[e];return 0==(r=o%3)?(i+=a[n>>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]):2===r?(i+=a[n>>10&63],i+=a[n>>4&63],i+=a[n<<2&63],i+=a[64]):1===r&&(i+=a[n>>2&63],i+=a[n<<4&63],i+=a[64],i+=a[64]),i}function ht(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,i.K2)(at,"resolveYamlBinary"),(0,i.K2)(st,"constructYamlBinary"),(0,i.K2)(lt,"representYamlBinary"),(0,i.K2)(ht,"isBinary");var ct=new w("tag:yaml.org,2002:binary",{kind:"scalar",resolve:at,construct:st,predicate:ht,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,i,n,o,a=[],s=t;for(e=0,r=s.length;e>10),56320+(t-65536&1023))}(0,i.K2)(Pt,"_class"),(0,i.K2)(zt,"is_EOL"),(0,i.K2)(Kt,"is_WHITE_SPACE"),(0,i.K2)(qt,"is_WS_OR_EOL"),(0,i.K2)(Nt,"is_FLOW_INDICATOR"),(0,i.K2)(jt,"fromHexCode"),(0,i.K2)(Wt,"escapedHexLen"),(0,i.K2)(Ut,"fromDecimalCode"),(0,i.K2)(Ht,"simpleEscapeSequence"),(0,i.K2)(Yt,"charFromCodepoint");var Gt,Vt=new Array(256),Zt=new Array(256);for(Gt=0;Gt<256;Gt++)Vt[Gt]=Ht(Gt)?1:0,Zt[Gt]=Ht(Gt);function Xt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||vt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Qt(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=m(r),new p(e,r)}function Jt(t,e){throw Qt(t,e)}function te(t,e){t.onWarning&&t.onWarning.call(null,Qt(t,e))}(0,i.K2)(Xt,"State$1"),(0,i.K2)(Qt,"generateError"),(0,i.K2)(Jt,"throwError"),(0,i.K2)(te,"throwWarning");var ee={YAML:(0,i.K2)((function(t,e,r){var i,n,o;null!==t.version&&Jt(t,"duplication of %YAML directive"),1!==r.length&&Jt(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Jt(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),o=parseInt(i[2],10),1!==n&&Jt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&te(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:(0,i.K2)((function(t,e,r){var i,n;2!==r.length&&Jt(t,"TAG directive accepts exactly two arguments"),i=r[0],n=r[1],It.test(i)||Jt(t,"ill-formed tag handle (first argument) of the TAG directive"),St.call(t.tagMap,i)&&Jt(t,'there is a previously declared suffix for "'+i+'" tag handle'),Rt.test(n)||Jt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(e){Jt(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n}),"handleTagDirective")};function re(t,e,r,i){var n,o,a,s;if(e1&&(t.result+=c.repeat("\n",e-1))}function he(t,e,r){var i,n,o,a,s,l,h,c,u=t.kind,d=t.result;if(qt(c=t.input.charCodeAt(t.position))||Nt(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(qt(i=t.input.charCodeAt(t.position+1))||r&&Nt(i)))return!1;for(t.kind="scalar",t.result="",n=o=t.position,a=!1;0!==c;){if(58===c){if(qt(i=t.input.charCodeAt(t.position+1))||r&&Nt(i))break}else if(35===c){if(qt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&se(t)||r&&Nt(c))break;if(zt(c)){if(s=t.line,l=t.lineStart,h=t.lineIndent,ae(t,!1,-1),t.lineIndent>=e){a=!0,c=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=l,t.lineIndent=h;break}}a&&(re(t,n,o,!1),le(t,t.line-s),n=o=t.position,a=!1),Kt(c)||(o=t.position+1),c=t.input.charCodeAt(++t.position)}return re(t,n,o,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ce(t,e){var r,i,n;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(re(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,n=t.position}else zt(r)?(re(t,i,n,!0),le(t,ae(t,!1,e)),i=n=t.position):t.position===t.lineStart&&se(t)?Jt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Jt(t,"unexpected end of the stream within a single quoted scalar")}function ue(t,e){var r,i,n,o,a,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return re(t,r,t.position,!0),t.position++,!0;if(92===s){if(re(t,r,t.position,!0),zt(s=t.input.charCodeAt(++t.position)))ae(t,!1,e);else if(s<256&&Vt[s])t.result+=Zt[s],t.position++;else if((a=Wt(s))>0){for(n=a,o=0;n>0;n--)(a=jt(s=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+a:Jt(t,"expected hexadecimal character");t.result+=Yt(o),t.position++}else Jt(t,"unknown escape sequence");r=i=t.position}else zt(s)?(re(t,r,i,!0),le(t,ae(t,!1,e)),r=i=t.position):t.position===t.lineStart&&se(t)?Jt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Jt(t,"unexpected end of the stream within a double quoted scalar")}function de(t,e){var r,i,n,o,a,s,l,h,c,u,d,p,f=!0,g=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))a=93,h=!1,o=[];else{if(123!==p)return!1;a=125,h=!0,o={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),p=t.input.charCodeAt(++t.position);0!==p;){if(ae(t,!0,e),(p=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=g,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=o,!0;f?44===p&&Jt(t,"expected the node content, but found ','"):Jt(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&qt(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,ae(t,!0,e)),r=t.line,i=t.lineStart,n=t.position,be(t,e,Tt,!1,!0),u=t.tag,c=t.result,ae(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),ae(t,!0,e),be(t,e,Tt,!1,!0),d=t.result),h?ne(t,o,m,u,c,d,r,i,n):s?o.push(ne(t,null,m,u,c,d,r,i,n)):o.push(c),ae(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Jt(t,"unexpected end of the stream within a flow collection")}function pe(t,e){var r,i,n,o,a=Lt,s=!1,l=!1,h=e,u=0,d=!1;if(124===(o=t.input.charCodeAt(t.position)))i=!1;else{if(62!==o)return!1;i=!0}for(t.kind="scalar",t.result="";0!==o;)if(43===(o=t.input.charCodeAt(++t.position))||45===o)Lt===a?a=43===o?$t:Ft:Jt(t,"repeat of a chomping mode identifier");else{if(!((n=Ut(o))>=0))break;0===n?Jt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Jt(t,"repeat of an indentation width identifier"):(h=e+n-1,l=!0)}if(Kt(o)){do{o=t.input.charCodeAt(++t.position)}while(Kt(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!zt(o)&&0!==o)}for(;0!==o;){for(oe(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!l||t.lineIndenth&&(h=t.lineIndent),zt(o))u++;else{if(t.lineIndente)&&0!==i)Jt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(a=t.line,s=t.lineStart,l=t.position),be(t,e,Bt,!0,n)&&(m?g=t.result:y=t.result),m||(ne(t,d,p,f,g,y,a,s,l),f=g=y=null),ae(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==h)Jt(t,"bad indentation of a mapping entry");else if(t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&Jt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Jt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function ke(t){var e,r,i,n,o=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(ae(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(a=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!qt(n);)n=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Jt(t,"directive name must not be less than one character in length");0!==n;){for(;Kt(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!zt(n));break}if(zt(n))break;for(e=t.position;0!==n&&!qt(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&oe(t),St.call(ee,r)?ee[r](t,r,i):te(t,'unknown document directive "'+r+'"')}ae(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,ae(t,!0,-1)):a&&Jt(t,"directives end mark is expected"),be(t,t.lineIndent-1,Bt,!1,!0),ae(t,!0,-1),t.checkLineBreaks&&Dt.test(t.input.slice(o,t.position))&&te(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&se(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,ae(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function yr(t){return/^\n* /.test(t)}(0,i.K2)(or,"State"),(0,i.K2)(ar,"indentString"),(0,i.K2)(sr,"generateNextLine"),(0,i.K2)(lr,"testImplicitResolving"),(0,i.K2)(hr,"isWhitespace"),(0,i.K2)(cr,"isPrintable"),(0,i.K2)(ur,"isNsCharOrWhitespace"),(0,i.K2)(dr,"isPlainSafe"),(0,i.K2)(pr,"isPlainSafeFirst"),(0,i.K2)(fr,"isPlainSafeLast"),(0,i.K2)(gr,"codePointAt"),(0,i.K2)(yr,"needIndentIndicator");var mr=1,xr=2,br=3,kr=4,Cr=5;function wr(t,e,r,i,n,o,a,s){var l,h=0,c=null,u=!1,d=!1,p=-1!==i,f=-1,g=pr(gr(t,0))&&fr(gr(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(!cr(h=gr(t,l)))return Cr;g=g&&dr(h,c,s),c=h}else{for(l=0;l=65536?l+=2:l++){if((h=gr(t,l))===Be)u=!0,p&&(d=d||l-f-1>i&&" "!==t[f+1],f=l);else if(!cr(h))return Cr;g=g&&dr(h,c,s),c=h}d=d||p&&l-f-1>i&&" "!==t[f+1]}return u||d?r>9&&yr(t)?Cr:a?o===nr?Cr:xr:d?kr:br:!g||a||n(t)?o===nr?Cr:xr:mr}function _r(t,e,r,n,o){t.dump=function(){if(0===e.length)return t.quotingType===nr?'""':"''";if(!t.noCompatMode&&(-1!==Je.indexOf(e)||tr.test(e)))return t.quotingType===nr?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),l=n||t.flowLevel>-1&&r>=t.flowLevel;function h(e){return lr(t,e)}switch((0,i.K2)(h,"testAmbiguity"),wr(e,l,t.indent,s,h,t.quotingType,t.forceQuotes&&!n,o)){case mr:return e;case xr:return"'"+e.replace(/'/g,"''")+"'";case br:return"|"+vr(e,t.indent)+Sr(ar(e,a));case kr:return">"+vr(e,t.indent)+Sr(ar(Tr(e,s),a));case Cr:return'"'+Mr(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function vr(t,e){var r=yr(t)?String(e):"",i="\n"===t[t.length-1];return r+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function Sr(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Tr(t,e){for(var r,i,n,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=t.indexOf("\n"))?r:t.length,o.lastIndex=r,Ar(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];n=o.exec(t);){var l=n[1],h=n[2];i=" "===h[0],a+=l+(s||i||""===h?"":"\n")+Ar(h,e),s=i}return a}function Ar(t,e){if(""===t||" "===t[0])return t;for(var r,i,n=/ [^ ]/g,o=0,a=0,s=0,l="";r=n.exec(t);)(s=r.index)-o>e&&(i=a>o?a:s,l+="\n"+t.slice(o,i),o=i+1),a=s;return l+="\n",t.length-o>e&&a>o?l+=t.slice(o,a)+"\n"+t.slice(a+1):l+=t.slice(o),l.slice(1)}function Mr(t){for(var e,r="",i=0,n=0;n=65536?n+=2:n++)i=gr(t,n),!(e=Qe[i])&&cr(i)?(r+=t[n],i>=65536&&(r+=t[n+1])):r+=e||rr(i);return r}function Br(t,e,r){var i,n,o,a="",s=t.tag;for(i=0,n=r.length;i1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Dr(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=h,t.dump="{"+l+"}"}function $r(t,e,r,i){var n,o,a,s,l,h,c="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(n=0,o=d.length;n1024)&&(t.dump&&Be===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=sr(t,e)),Dr(t,e+1,s,!0,l)&&(t.dump&&Be===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=u,t.dump=c||"{}"}function Er(t,e,r){var i,n,o,a,s,l;for(o=0,a=(n=r?t.explicitTypes:t.implicitTypes).length;o tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function Dr(t,e,r,i,n,o,a){t.tag=null,t.dump=r,Er(t,r,!1)||Er(t,r,!0);var s,l=Se.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(n=!1),u&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(d&&u&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?($r(t,e,t.dump,n),u&&(t.dump="&ref_"+c+t.dump)):(Fr(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?Lr(t,e-1,t.dump,n):Lr(t,e,t.dump,n),u&&(t.dump="&ref_"+c+t.dump)):(Br(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&_r(t,t.dump,e,o,h)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Or(t,e){var r,i,n=[],o=[];for(Ir(t,n,o),r=0,i=o.length;r{"use strict";r.d(e,{IU:()=>$t,gh:()=>Pt,nA:()=>Kr,U:()=>Ft,Jo:()=>Vt,jP:()=>Kt,on:()=>Pr,Zk:()=>Jt,g0:()=>Qt,T_:()=>Nt,U_:()=>qr,U7:()=>zr,lC:()=>te});var i=r(8568),n=r(7750),o=r(2382),a=r(5522),s=r(32),l=r(4852);function h(t,e,r){if(t&&t.length){const[i,n]=e,o=Math.PI/180*r,a=Math.cos(o),s=Math.sin(o);for(const e of t){const[t,r]=e;e[0]=(t-i)*a-(r-n)*s+i,e[1]=(t-i)*s+(r-n)*a+n}}}function c(t,e){return t[0]===e[0]&&t[1]===e[1]}function u(t,e,r,i=1){const n=r,o=Math.max(e,.1),a=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,s=[0,0];if(n)for(const t of a)h(t,s,n);const l=function(t,e,r){const i=[];for(const e of t){const t=[...e];c(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const n=[];e=Math.max(e,.1);const o=[];for(const t of i)for(let e=0;et.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!o.length)return n;let a=[],s=o[0].ymin,l=0;for(;a.length||o.length;){if(o.length){let t=-1;for(let e=0;es);e++)t=e;o.splice(0,t+1).forEach((t=>{a.push({s,edge:t})}))}if(a=a.filter((t=>!(t.edge.ymax<=s))),a.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==r||l%e==0)&&a.length>1)for(let t=0;t=a.length)break;const r=a[t].edge,i=a[e].edge;n.push([[Math.round(r.x),s],[Math.round(i.x),s]])}s+=r,a.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),l++}return n}(a,o,i);if(n){for(const t of a)h(t,s,-n);!function(t,e,r){const i=[];t.forEach((t=>i.push(...t))),h(i,e,r)}(l,s,-n)}return l}function d(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=n),u(t,n,i,o||1)}class p{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=d(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function f(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class g extends p{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=d(t,Object.assign({},e,{hachureGap:r})),n=Math.PI/180*e.hachureAngle,o=[],a=.5*r*Math.cos(n),s=.5*r*Math.sin(n);for(const[t,e]of i)f([t,e])&&o.push([[t[0]-a,t[1]+s],[...e]],[[t[0]+a,t[1]-s],[...e]]);return{type:"fillSketch",ops:this.renderLines(o,e)}}}class y extends p{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,i);return r.ops=r.ops.concat(n.ops),r}}class m{constructor(t){this.helper=t}fillPolygons(t,e){const r=d(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);const o=i/4;for(const a of t){const t=f(a),s=t/i,l=Math.ceil(s)-1,h=t-l*i,c=(a[0][0]+a[1][0])/2-i/4,u=Math.min(a[0][1],a[1][1]);for(let t=0;t{const o=f(t),a=Math.floor(o/(r+i)),s=(o+i-a*(r+i))/2;let l=t[0],h=t[1];l[0]>h[0]&&(l=t[1],h=t[0]);const c=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let t=0;t{const n=f(t),o=Math.round(n/(2*e));let a=t[0],s=t[1];a[0]>s[0]&&(a=t[1],s=t[0]);const l=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let t=0;ti%2?t+r:t+e));o.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":o.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map(((t,i)=>i%2?t+r:t+e));o.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":o.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":o.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map(((t,i)=>i%2?t+r:t+e));o.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":o.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],o.push({key:"T",data:[e,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=i,r=n}return o}function B(t){const e=[];let r="",i=0,n=0,o=0,a=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,n]=c,[o,a]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],n=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,n]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,n]});break;case"V":n=c[0],e.push({key:"L",data:[i,n]});break;case"S":{let t=0,o=0;"C"===r||"S"===r?(t=i+(i-s),o=n+(n-l)):(t=i,o=n),e.push({key:"C",data:[t,o,...c]}),s=c[0],l=c[1],i=c[2],n=c[3];break}case"T":{const[t,o]=c;let a=0,h=0;"Q"===r||"T"===r?(a=i+(i-s),h=n+(n-l)):(a=i,h=n);const u=i+2*(a-i)/3,d=n+2*(h-n)/3,p=t+2*(a-t)/3,f=o+2*(h-o)/3;e.push({key:"C",data:[u,d,p,f,t,o]}),s=a,l=h,i=t,n=o;break}case"Q":{const[t,r,o,a]=c,h=i+2*(t-i)/3,u=n+2*(r-n)/3,d=o+2*(t-o)/3,p=a+2*(r-a)/3;e.push({key:"C",data:[h,u,d,p,o,a]}),s=t,l=r,i=o,n=a;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),o=c[2],a=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,n,l,h,l,h]}),i=l,n=h):i===l&&n===h||(F(i,n,l,h,t,r,o,a,s).forEach((function(t){e.push({key:"C",data:t})})),i=l,n=h);break}case"Z":e.push({key:"Z",data:[]}),i=o,n=a}r=h}return e}function L(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function F(t,e,r,i,n,o,a,s,l,h){const c=(u=a,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,y=0;if(h)[p,f,g,y]=h;else{[t,e]=L(t,e,-c),[r,i]=L(r,i,-c);const a=(t-r)/2,h=(e-i)/2;let u=a*a/(n*n)+h*h/(o*o);u>1&&(u=Math.sqrt(u),n*=u,o*=u);const d=n*n,m=o*o,x=d*m-d*h*h-m*a*a,b=d*h*h+m*a*a,k=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=k*n*h/o+(t+r)/2,y=k*-o*a/n+(e+i)/2,p=Math.asin(parseFloat(((e-y)/o).toFixed(9))),f=Math.asin(parseFloat(((i-y)/o).toFixed(9))),tf&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let m=f-p;if(Math.abs(m)>120*Math.PI/180){const t=f,e=r,s=i;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=F(r=g+n*Math.cos(f),i=y+o*Math.sin(f),e,s,n,o,a,0,l,[f,t,g,y])}m=f-p;const x=Math.cos(p),b=Math.sin(p),k=Math.cos(f),C=Math.sin(f),w=Math.tan(m/4),_=4/3*n*w,v=4/3*o*w,S=[t,e],T=[t+_*b,e-v*x],A=[r+_*C,i-v*k],M=[r,i];if(T[0]=2*S[0]-T[0],T[1]=2*S[1]-T[1],h)return[T,A,M].concat(d);{d=[T,A,M].concat(d);const t=[];for(let e=0;e2){const n=[];for(let e=0;e2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(f-p)/2),m=X(y,h,c,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=X(y,h,c,u,d,p,f,1.5,l);m.push(...t)}return a&&(s?m.push(...H(h,c,h+u*Math.cos(p),c+d*Math.sin(p),l),...H(h,c,h+u*Math.cos(f),c+d*Math.sin(f),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(p),c+d*Math.sin(p)]})),{type:"path",ops:m}}function z(t,e){const r=B(M(A(t))),i=[];let n=[0,0],o=[0,0];for(const{key:t,data:a}of r)switch(t){case"M":o=[a[0],a[1]],n=[a[0],a[1]];break;case"L":i.push(...H(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[t,r,n,s,l,h]=a;i.push(...Q(t,r,n,s,l,h,o,e)),o=[l,h];break}case"Z":i.push(...H(o[0],o[1],n[0],n[1],e)),o=[n[0],n[1]]}return{type:"path",ops:i}}function K(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+U(t,e),i[0][1]+U(t,e)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let c=n.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const u=c/2,d=.2+.2*j(n);let p=n.bowing*n.maxRandomnessOffset*(i-e)/200,f=n.bowing*n.maxRandomnessOffset*(t-r)/200;p=U(p,n,h),f=U(f,n,h);const g=[],y=()=>U(u,n,h),m=()=>U(c,n,h),x=n.preserveVertices;return o&&(a?g.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):g.push({op:"move",data:[t+(x?0:U(c,n,h)),e+(x?0:U(c,n,h))]})),a?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(i-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(i-e)*d+y(),r+(x?0:y()),i+(x?0:y())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(i-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(i-e)*d+m(),r+(x?0:m()),i+(x?0:m())]}),g}function G(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+U(e,r),t[0][1]+U(e,r)]),i.push([t[0][0]+U(e,r),t[0][1]+U(e,r)]);for(let n=1;n3){const o=[],a=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&n.push(r)):n.push(r),n.push(t[e+3])}else{const i=.5,o=t[e+0],a=t[e+1],s=t[e+2],l=t[e+3],h=it(o,a,i),c=it(a,s,i),u=it(s,l,i),d=it(h,c,i),p=it(c,u,i),f=it(d,p,i);nt([o,h,d,f],0,r,n),nt([f,p,u,l],0,r,n)}var o,a;return n}function ot(t,e){return at(t,0,t.length,e)}function at(t,e,r,i,n){const o=n||[],a=t[e],s=t[r-1];let l=0,h=1;for(let i=e+1;il&&(l=e,h=i)}return Math.sqrt(l)>i?(at(t,e,h+1,i,o),at(t,h,r,i,o)):(o.length||o.push(a),o.push(s)),o}function st(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let r=0;r0?at(i,0,i.length,r):i}const lt="none";class ht{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,n){const o=this._o(n);return this._d("line",[E(t,e,r,i,o)],o)}rectangle(t,e,r,i,n){const o=this._o(n),a=[],s=function(t,e,r,i,n){return function(t,e){return D(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],n)}(t,e,r,i,o);if(o.fill){const n=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===o.fillStyle?a.push(K([n],o)):a.push(q([n],o))}return o.stroke!==lt&&a.push(s),this._d("rectangle",a,o)}ellipse(t,e,r,i,n){const o=this._o(n),a=[],s=I(r,i,o),l=R(t,e,o,s);if(o.fill)if("solid"===o.fillStyle){const r=R(t,e,o,s).opset;r.type="fillPath",a.push(r)}else a.push(q([l.estimatedPoints],o));return o.stroke!==lt&&a.push(l.opset),this._d("ellipse",a,o)}circle(t,e,r,i){const n=this.ellipse(t,e,r,r,i);return n.shape="circle",n}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[D(t,!1,r)],r)}arc(t,e,r,i,n,o,a=!1,s){const l=this._o(s),h=[],c=P(t,e,r,i,n,o,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=P(t,e,r,i,n,o,!0,!1,a);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,n,o,a){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=U(.01*h,a),c+=U(.01*c,a);let u=n,d=o;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/a.curveStepCount,f=[];for(let t=u;t<=d;t+=p)f.push([s+h*Math.cos(t),l+c*Math.sin(t)]);return f.push([s+h*Math.cos(d),l+c*Math.sin(d)]),f.push([s,l]),q([f],a)}(t,e,r,i,n,o,l));return l.stroke!==lt&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],n=O(t,r);if(r.fill&&r.fill!==lt)if("solid"===r.fillStyle){const e=O(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],n=t;if(n.length){const t="number"==typeof n[0][0]?[n]:n;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...st(tt([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...st(tt(i),10,(1+r.roughness)/2))}e.length&&i.push(q([e],r))}return r.stroke!==lt&&i.push(n),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],n=D(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(K([t],r)):i.push(q([t],r))),r.stroke!==lt&&i.push(n),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=r.fill&&"transparent"!==r.fill&&r.fill!==lt,o=r.stroke!==lt,a=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=B(M(A(t))),n=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...st(s,1)),s=[]},h=()=>{l(),o.length&&(n.push(o),o=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),a=[e[0],e[1]],o.push(a);break;case"L":l(),o.push([e[0],e[1]]);break;case"C":if(!s.length){const t=o.length?o[o.length-1]:a;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),o.push([a[0],a[1]])}if(h(),!r)return n;const c=[];for(const t of n){const e=ot(t,r);e.length&&c.push(e)}return c}(t,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=z(t,r);if(n)if("solid"===r.fillStyle)if(1===s.length){const e=z(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(K(s,r));else i.push(q(s,r));return o&&(a?s.forEach((t=>{i.push(D(t,!1,r))})):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map((t=>+t.toFixed(e))):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:lt};break;case"fillPath":e={d:this.opsToPath(t),stroke:lt,strokeWidth:0,fill:r.fill||lt};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||lt,strokeWidth:r,fill:lt}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}const ct="http://www.w3.org/2000/svg";class ut{constructor(t,e){this.svg=t,this.gen=new ht(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,n=i.createElementNS(ct,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of e){let e=null;switch(a.type){case"path":e=i.createElementNS(ct,"path"),e.setAttribute("d",this.opsToPath(a,o)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(ct,"path"),e.setAttribute("d",this.opsToPath(a,o)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,a,r)}e&&n.appendChild(e)}return n}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const n=t.createElementNS(ct,"path");return n.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),n.setAttribute("stroke",r.fill||""),n.setAttribute("stroke-width",i+""),n.setAttribute("fill","none"),r.fillLineDash&&n.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){const o=this.gen.line(t,e,r,i,n);return this.draw(o)}rectangle(t,e,r,i,n){const o=this.gen.rectangle(t,e,r,i,n);return this.draw(o)}ellipse(t,e,r,i,n){const o=this.gen.ellipse(t,e,r,i,n);return this.draw(o)}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,n,o,a=!1,s){const l=this.gen.arc(t,e,r,i,n,o,a,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var dt=(t,e)=>new ut(t,e),pt=(0,s.K2)(((t,e)=>{var r,i,n=t.x,o=t.y,a=e.x-n,s=e.y-o,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(a)*h?(s<0&&(h=-h),r=0===s?0:h*a/s,i=h):(a<0&&(l=-l),r=l,i=0===a?0:l*s/a),{x:n+r,y:o+i}}),"intersectRect"),ft=pt;function gt(t,e){e&&t.attr("style",e)}async function yt(t){const e=(0,l.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let i=t.label;t.label&&(0,s.Wi)(t.label)&&(i=await(0,s.VJ)(t.label.replace(s.Y2.lineBreakRegex,"\n"),(0,s.D7)()));const n=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+i+""),gt(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,s.K2)(gt,"applyStyle"),(0,s.K2)(yt,"addHtmlLabel");var mt=(0,s.K2)((async(t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
"),s.Rm.info("vertexText"+n);const t={isNode:i,label:(0,a.Sm)(n).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e?e.replace("fill:","color:"):e};return await yt(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof n?n.split(/\\n|\n|/gi):Array.isArray(n)?n:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}}),"createLabel"),xt=mt,bt=(0,s.K2)(((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" ")),"createRoundedRectPathD"),kt=(0,s.K2)((t=>{const{handDrawnSeed:e}=(0,s.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),Ct=(0,s.K2)((t=>{const e=wt([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),wt=(0,s.K2)((t=>{const e=new Map;return t.forEach((t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())})),e}),"styles2Map"),_t=(0,s.K2)((t=>{const{stylesArray:e}=Ct(t),r=[],i=[],n=[],o=[];return e.forEach((t=>{const e=t[0];"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"===e?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&o.push(t.join(":")+" !important"))})),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:o}}),"styles2String"),vt=(0,s.K2)(((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=(0,s.D7)(),{nodeBorder:n,mainBkg:o}=r,{stylesMap:a}=Ct(t);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||n,seed:i,strokeWidth:a.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)}),"userNodeOverrides"),St=(0,s.K2)((async(t,e)=>{s.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:a}=r,{clusterBkg:h,clusterBorder:c}=i,{labelStyles:u,nodeStyles:d,borderStyles:p,backgroundStyles:f}=_t(e),g=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),y=(0,s._3)(r.flowchart.htmlLabels),m=g.insert("g").attr("class","cluster-label "),x=await(0,o.GZ)(m,e.label,{style:e.labelStyle,useHtmlLabels:y,isNode:!0});let b=x.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=x.children[0],e=(0,l.Ltv)(x);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}const k=e.width<=b.width+e.padding?b.width+e.padding:e.width;e.width<=b.width+e.padding?e.diff=(k-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height,w=e.x-k/2,_=e.y-C/2;let v;if(s.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=dt(g),r=vt(e,{roughness:.7,fill:h,stroke:c,fillWeight:3,seed:a}),i=t.path(bt(w,_,k,C,0),r);v=g.insert((()=>(s.Rm.debug("Rough node insert CXC",i),i)),":first-child"),v.select("path:nth-child(2)").attr("style",p.join(";")),v.select("path").attr("style",f.join(";").replace("fill","stroke"))}else v=g.insert("rect",":first-child"),v.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",w).attr("y",_).attr("width",k).attr("height",C);const{subGraphTitleTopMargin:S}=(0,n.O)(r);if(m.attr("transform",`translate(${e.x-b.width/2}, ${e.y-e.height/2+S})`),u){const t=m.select("span");t&&t.attr("style",u)}const T=v.node().getBBox();return e.offsetX=0,e.width=T.width,e.height=T.height,e.offsetY=b.height-e.padding/2,e.intersect=function(t){return ft(e,t)},{cluster:g,labelBBox:b}}),"rect"),Tt=(0,s.K2)(((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,o=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(t){return ft(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),At=(0,s.K2)((async(t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:h,nodeBorder:c}=i,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),d=u.insert("g",":first-child"),p=u.insert("g").attr("class","cluster-label");let f=u.append("rect");const g=p.node().appendChild(await xt(e.label,e.labelStyle,void 0,!0));let y=g.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=g.children[0],e=(0,l.Ltv)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const m=0*e.padding,x=m/2,b=(e.width<=y.width+e.padding?y.width+e.padding:e.width)+m;e.width<=y.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height+m,C=e.height+m-y.height-6,w=e.x-b/2,_=e.y-k/2;e.width=b;const v=e.y-e.height/2-x+y.height+2;let S;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=dt(u),i=e.rx||e.ry?r.path(bt(w,_,b,k,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:c,seed:n}):r.rectangle(w,_,b,k,{seed:n});S=u.insert((()=>i),":first-child");const s=r.rectangle(w,v,b,C,{fill:t?o:a,fillStyle:t?"hachure":"solid",stroke:c,seed:n});S=u.insert((()=>i),":first-child"),f=u.insert((()=>s))}else{S=d.insert("rect",":first-child");const t="outer";S.attr("class",t).attr("x",w).attr("y",_).attr("width",b).attr("height",k).attr("data-look",e.look),f.attr("class","inner").attr("x",w).attr("y",v).attr("width",b).attr("height",C)}p.attr("transform",`translate(${e.x-y.width/2}, ${_+1-((0,s._3)(r.flowchart.htmlLabels)?0:3)})`);const T=S.node().getBBox();return e.height=T.height,e.offsetX=0,e.offsetY=y.height-e.padding/2,e.labelBBox=y,e.intersect=function(t){return ft(e,t)},{cluster:u,labelBBox:y}}),"roundedWithTitle"),Mt=(0,s.K2)(((t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:o}=i,a=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=a.insert("g",":first-child"),h=0*e.padding,c=e.width+h;e.diff=-e.padding;const u=e.height+h,d=e.x-c/2,p=e.y-u/2;let f;if(e.width=c,"handDrawn"===e.look){const t=dt(a).rectangle(d,p,c,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:n});f=a.insert((()=>t),":first-child")}else{f=l.insert("rect",":first-child");const t="divider";f.attr("class",t).attr("x",d).attr("y",p).attr("width",c).attr("height",u).attr("data-look",e.look)}const g=f.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return ft(e,t)},{cluster:a,labelBBox:{}}}),"divider"),Bt={rect:St,squareRect:St,roundedWithTitle:At,noteGroup:Tt,divider:Mt},Lt=new Map,Ft=(0,s.K2)((async(t,e)=>{const r=e.shape||"rect",i=await Bt[r](t,e);return Lt.set(e.id,i),i}),"insertCluster"),$t=(0,s.K2)((()=>{Lt=new Map}),"clear"),Et=(0,s.K2)(((t,e,r,i,n)=>{e.arrowTypeStart&&Ot(t,"start",e.arrowTypeStart,r,i,n),e.arrowTypeEnd&&Ot(t,"end",e.arrowTypeEnd,r,i,n)}),"addEdgeMarkers"),Dt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=(0,s.K2)(((t,e,r,i,n,o)=>{const a=Dt[r];if(!a)return void s.Rm.warn(`Unknown arrow type: ${r}`);const l="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${i}#${n}_${o}-${a}${l})`)}),"addEdgeMarker"),It=new Map,Rt=new Map,Pt=(0,s.K2)((()=>{It.clear(),Rt.clear()}),"clear"),zt=(0,s.K2)((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),Kt=(0,s.K2)((async(t,e)=>{let r=(0,s._3)((0,s.D7)().flowchart.htmlLabels);const i=await(0,o.GZ)(t,e.label,{style:zt(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});s.Rm.info("abc82",e,e.labelType);const n=t.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label");a.node().appendChild(i);let h,c=i.getBBox();if(r){const t=i.children[0],e=(0,l.Ltv)(i);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(a.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),It.set(e.id,n),e.width=c.width,e.height=c.height,e.startLabelLeft){const r=await xt(e.startLabelLeft,zt(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),n=i.insert("g").attr("class","inner");h=n.node().appendChild(r);const o=r.getBBox();n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Rt.get(e.id)||Rt.set(e.id,{}),Rt.get(e.id).startLeft=i,qt(h,e.startLabelLeft)}if(e.startLabelRight){const r=await xt(e.startLabelRight,zt(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),n=i.insert("g").attr("class","inner");h=i.node().appendChild(r),n.node().appendChild(r);const o=r.getBBox();n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),Rt.get(e.id)||Rt.set(e.id,{}),Rt.get(e.id).startRight=i,qt(h,e.startLabelRight)}if(e.endLabelLeft){const r=await xt(e.endLabelLeft,zt(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),n=i.insert("g").attr("class","inner");h=n.node().appendChild(r);const o=r.getBBox();n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),Rt.get(e.id)||Rt.set(e.id,{}),Rt.get(e.id).endLeft=i,qt(h,e.endLabelLeft)}if(e.endLabelRight){const r=await xt(e.endLabelRight,zt(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),n=i.insert("g").attr("class","inner");h=n.node().appendChild(r);const o=r.getBBox();n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),Rt.get(e.id)||Rt.set(e.id,{}),Rt.get(e.id).endRight=i,qt(h,e.endLabelRight)}return i}),"insertEdgeLabel");function qt(t,e){(0,s.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,s.K2)(qt,"setTerminalWidth");var Nt=(0,s.K2)(((t,e)=>{s.Rm.debug("Moving label abc88 ",t.id,t.label,It.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=(0,s.D7)(),{subGraphTitleTotalMargin:o}=(0,n.O)(i);if(t.label){const i=It.get(t.id);let n=t.x,l=t.y;if(r){const i=a._K.calcLabelPosition(r);s.Rm.debug("Moving label "+t.label+" from (",n,",",l,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,l=i.y)}i.attr("transform",`translate(${n}, ${l+o/2})`)}if(t.startLabelLeft){const e=Rt.get(t.id).startLeft;let i=t.x,n=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){const e=Rt.get(t.id).startRight;let i=t.x,n=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){const e=Rt.get(t.id).endLeft;let i=t.x,n=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){const e=Rt.get(t.id).endRight;let i=t.x,n=t.y;if(r){const e=a._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}}),"positionEdgeLabel"),jt=(0,s.K2)(((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),o=Math.abs(e.y-i),a=t.width/2,s=t.height/2;return n>=a||o>=s}),"outsideNode"),Wt=(0,s.K2)(((t,e,r)=>{s.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,o=Math.abs(i-r.x),a=t.width/2;let l=r.xMath.abs(i-e.x)*h){let t=r.y{s.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach((t=>{if(s.Rm.info("abc88 checking point",t,e),jt(e,t)||n)s.Rm.warn("abc88 outside",t,i),i=t,n||r.push(t);else{const o=Wt(e,i,t);s.Rm.debug("abc88 inside",t,i,o),s.Rm.debug("abc88 intersection",o,e);let a=!1;r.forEach((t=>{a=a||t.x===o.x&&t.y===o.y})),r.some((t=>t.x===o.x&&t.y===o.y))?s.Rm.warn("abc88 no intersect",o,r):r.push(o),n=!0}})),s.Rm.debug("returning points",r),r}),"cutPathAtIntersect");function Ht(t){const e=[],r=[];for(let i=1;i5&&Math.abs(o.y-n.y)>5||n.y===o.y&&o.x===a.x&&Math.abs(o.x-n.x)>5&&Math.abs(o.y-a.y)>5)&&(e.push(o),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,s.K2)(Ht,"extractCornerPoints");var Yt=(0,s.K2)((function(t,e,r){const i=e.x-t.x,n=e.y-t.y,o=r/Math.sqrt(i*i+n*n);return{x:e.x-o*i,y:e.y-o*n}}),"findAdjacentPoint"),Gt=(0,s.K2)((function(t){const{cornerPointPositions:e}=Ht(t),r=[];for(let i=0;i10&&Math.abs(n.y-e.y)>=10){s.Rm.debug("Corner point fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));const t=5;d=o.x===a.x?{x:h<0?a.x-t+u:a.x+t-u,y:c<0?a.y-u:a.y+u}:{x:h<0?a.x-u:a.x+u,y:c<0?a.y-t+u:a.y+t-u}}else s.Rm.debug("Corner point skipping fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));r.push(d,l)}else r.push(t[i]);return r}),"fixCorners"),Vt=(0,s.K2)((function(t,e,r,i,o,a,h){const{handDrawnSeed:c}=(0,s.D7)();let u=e.points,d=!1;const p=o;var f=a;f.intersect&&p.intersect&&(u=u.slice(1,e.points.length-1),u.unshift(p.intersect(u[0])),s.Rm.debug("Last point APA12",e.start,"--\x3e",e.end,u[u.length-1],f,f.intersect(u[u.length-1])),u.push(f.intersect(u[u.length-1]))),e.toCluster&&(s.Rm.info("to cluster abc88",r.get(e.toCluster)),u=Ut(e.points,r.get(e.toCluster).node),d=!0),e.fromCluster&&(s.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=Ut(u.reverse(),r.get(e.fromCluster).node).reverse(),d=!0);let g=u.filter((t=>!Number.isNaN(t.y)));g=Gt(g);let y=g[g.length-1];if(g.length>1){y=g[g.length-1];const t=g[g.length-2],e=(y.x-t.x)/2,r=(y.y-t.y)/2,i={x:t.x+e,y:t.y+r};g.splice(-1,0,i)}let m=l.qrM;e.curve&&(m=e.curve);const{x,y:b}=(0,n.R)(e),k=(0,l.n8j)().x(x).y(b).curve(m);let C,w;switch(e.thickness){case"normal":default:C="edge-thickness-normal";break;case"thick":C="edge-thickness-thick";break;case"invisible":C="edge-thickness-invisible"}switch(e.pattern){case"solid":default:C+=" edge-pattern-solid";break;case"dotted":C+=" edge-pattern-dotted";break;case"dashed":C+=" edge-pattern-dashed"}let _=k(g);const v=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const r=dt(t);Object.assign([],g);const i=r.path(_,{roughness:.3,seed:c});C+=" transition",w=(0,l.Ltv)(i).select("path").attr("id",e.id).attr("class"," "+C+(e.classes?" "+e.classes:"")).attr("style",v?v.reduce(((t,e)=>t+";"+e),""):"");let n=w.attr("d");w.attr("d",n),t.node().appendChild(w.node())}else w=t.append("path").attr("d",_).attr("id",e.id).attr("class"," "+C+(e.classes?" "+e.classes:"")).attr("style",v?v.reduce(((t,e)=>t+";"+e),""):"");let S="";((0,s.D7)().flowchart.arrowMarkerAbsolute||(0,s.D7)().state.arrowMarkerAbsolute)&&(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,S=S.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),s.Rm.info("arrowTypeStart",e.arrowTypeStart),s.Rm.info("arrowTypeEnd",e.arrowTypeEnd),Et(w,e,S,h,i);let T={};return d&&(T.updatedPath=u),T.originalPath=e.points,T}),"insertEdge"),Zt=(0,s.K2)(((t,e,r,i)=>{e.forEach((e=>{Xt[e](t,r,i)}))}),"insertMarkers"),Xt={extension:(0,s.K2)(((t,e,r)=>{s.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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")}),"extension"),composition:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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")}),"composition"),aggregation:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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")}),"aggregation"),dependency:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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")}),"dependency"),lollipop:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:(0,s.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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")}),"point"),circle:(0,s.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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")}),"circle"),cross:(0,s.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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")}),"cross"),barb:(0,s.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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")},Qt=Zt,Jt=(0,s.K2)((async(t,e,r)=>{let i;const n=e.useHtmlLabels||(0,s._3)((0,s.D7)().flowchart.htmlLabels);i=r||"node default";const h=t.insert("g").attr("class",i).attr("id",e.domId||e.id),c=h.insert("g").attr("class","label").attr("style",e.labelStyle);let u,d;u=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],d=await(0,o.GZ)(c,(0,s.jZ)((0,a.Sm)(u),(0,s.D7)()),{useHtmlLabels:n,width:e.width||(0,s.D7)().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let p=d.getBBox();const f=e.padding/2;if((0,s._3)((0,s.D7)().flowchart.htmlLabels)){const t=d.children[0],e=(0,l.Ltv)(d),r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,s.K2)(i,"setupImage"),setTimeout((()=>{e.complete&&i()})),e.addEventListener("error",i),e.addEventListener("load",i)})))))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return n?c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):c.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:h,bbox:p,halfPadding:f,label:c}}),"labelHelper"),te=(0,s.K2)(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),ee=(0,s.K2)(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function re(t){const e=t.map(((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`));return e.push("Z"),e.join(" ")}function ie(t,e,r,i,n,o){const a=[],s=r-t,l=i-e,h=s/o,c=2*Math.PI/h,u=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*s,i=u+n*Math.sin(c*(r-t));a.push({x:r,y:i})}return a}function ne(t,e,r,i,n,o){const a=[],s=n*Math.PI/180,l=(o*Math.PI/180-s)/(i-1);for(let n=0;n0}(0,s.K2)(ue,"intersectLine"),(0,s.K2)(de,"sameSign");var pe=ue;function fe(t,e,r){let i=t.x,n=t.y,o=[],a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){a=Math.min(a,t.x),s=Math.min(s,t.y)})):(a=Math.min(a,e.x),s=Math.min(s,e.y));let l=i-t.width/2-a,h=n-t.height/2-s;for(let i=0;i1&&o.sort((function(t,e){let i=t.x-r.x,n=t.y-r.y,o=Math.sqrt(i*i+n*n),a=e.x-r.x,s=e.y-r.y,l=Math.sqrt(a*a+s*s);return o{const{labelStyles:i,nodeStyles:n}=_t(e);e.labelStyle=i;const{shapeSvg:o,bbox:a}=await Jt(t,e,ee(e)),s=Math.max(a.width+2*r.labelPaddingX,e?.width||0),l=Math.max(a.height+2*r.labelPaddingY,e?.height||0),h=-s/2,c=-l/2;let u,{rx:d,ry:p}=e;const{cssStyles:f}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),"handDrawn"===e.look){const t=dt(o),r=vt(e,{}),i=d||p?t.path(bt(h,c,s,l,d||0),r):t.rectangle(h,c,s,l,r);u=o.insert((()=>i),":first-child"),u.attr("class","basic label-container").attr("style",f)}else u=o.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",d).attr("ry",p).attr("x",h).attr("y",c).attr("width",s).attr("height",l);return te(e,u),e.intersect=function(t){return ge.rect(e,t)},o}),"drawRect"),me=(0,s.K2)((async(t,e)=>ye(t,e,{rx:5,ry:5,classes:"flowchart-node"})),"state"),xe=(0,s.K2)((async(t,e)=>ye(t,e,{rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})),"roundedRect"),be=(0,s.K2)((async(t,e)=>ye(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})),"squareRect"),ke=(0,s.K2)(((t,e,{config:{themeVariables:r}})=>{const{lineColor:i}=r,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if("handDrawn"===e.look){const t=dt(n).circle(0,0,14,kt(i));o=n.insert((()=>t))}else o=n.insert("circle",":first-child");return o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),te(e,o),e.intersect=function(t){return ge.circle(e,7,t)},n}),"stateStart"),Ce=(0,s.K2)(((t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:n}=_t(e);e.labelStyle=i;const{cssStyles:o}=e,{lineColor:a,stateBorder:s,nodeBorder:l}=r,h=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),c=dt(h),u=vt(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=c.circle(0,0,14,{...u,stroke:a,strokeWidth:2}),p=s??l,f=c.circle(0,0,5,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),g=h.insert((()=>d),":first-child");return g.insert((()=>f)),o&&g.selectAll("path").attr("style",o),n&&g.selectAll("path").attr("style",n),te(e,g),e.intersect=function(t){return ge.circle(e,7,t)},h}),"stateEnd"),we=(0,s.K2)(((t,e,{dir:r,config:{state:i,themeVariables:n}})=>{const{nodeStyles:o}=_t(e);e.label="";const a=t.insert("g").attr("class",ee(e)).attr("id",e.domId??e.id),{cssStyles:s}=e;let l=Math.max(70,e?.width??0),h=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),h=Math.max(70,e?.height??0));const c=-1*l/2,u=-1*h/2,d=dt(a),p=vt(e,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const f=d.rectangle(c,u,l,h,p),g=a.insert((()=>f),":first-child");s&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",o),te(e,g);const y=i?.padding??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(t){return ge.rect(e,t)},a}),"forkJoin"),_e=(0,s.K2)(((t,e)=>{const{nodeStyles:r}=_t(e);e.label="";const i=t.insert("g").attr("class",ee(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,o=Math.max(28,e.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],s=dt(i),l=vt(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");const h=re(a),c=s.path(h,l),u=i.insert((()=>c),":first-child");return n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return ge.polygon(e,a,t)},i}),"choice"),ve=(0,s.K2)((async(t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:n}=_t(e);e.labelStyle=i;const{shapeSvg:o,bbox:a}=await Jt(t,e,ee(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),h=-s/2,c=-l/2,{cssStyles:u}=e;e.useHtmlLabels||(e.centerLabel=!0);const d=dt(o),p=vt(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const f=d.rectangle(h,c,s,l,p),g=o.insert((()=>f),":first-child");return g.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),te(e,g),e.intersect=function(t){return ge.rect(e,t)},o}),"note"),Se=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=o.height+e.padding,s=o.width+a/4+e.padding;let l;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=bt(-s/2,-a/2,s,a,a/2),o=t.path(i,r);l=n.insert((()=>o),":first-child"),l.attr("class","basic label-container").attr("style",h)}else l=n.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",a/2).attr("ry",a/2).attr("x",-s/2).attr("y",-a/2).attr("width",s).attr("height",a);return te(e,l),e.intersect=function(t){return ge.rect(e,t)},n}),"stadium"),Te=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);let n;e.labelStyle=r,n=e.cssClasses?"node "+e.cssClasses:"node default";const o=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=o.insert("g"),h=o.insert("g").attr("class","label").attr("style",i),c=e.description,u=e.label,d=h.node().appendChild(await xt(u,e.labelStyle,!0,!0));let p={width:0,height:0};if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=d.children[0],e=(0,l.Ltv)(d);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}s.Rm.info("Text 2",c);const f=c||[],g=d.getBBox(),y=h.node().appendChild(await xt(f.join?f.join("
"):f,e.labelStyle,!0,!0)),m=y.children[0],x=(0,l.Ltv)(y);p=m.getBoundingClientRect(),x.attr("width",p.width),x.attr("height",p.height);const b=(e.padding||0)/2;(0,l.Ltv)(y).attr("transform","translate( "+(p.width>g.width?0:(g.width-p.width)/2)+", "+(g.height+b+5)+")"),(0,l.Ltv)(d).attr("transform","translate( "+(p.width(s.Rm.debug("Rough node insert CXC",i),n)),":first-child"),v=o.insert((()=>(s.Rm.debug("Rough node insert CXC",i),i)),":first-child")}else v=a.insert("rect",":first-child"),S=a.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),S.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+g.height+b).attr("y2",-p.height/2-b+g.height+b);return te(e,v),e.intersect=function(t){return ge.rect(e,t)},o}),"rectWithTitle");function Ae(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,s.K2)(Ae,"insertPolygonShape");var Me=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=(e?.padding||0)/2,s=o.width+e.padding,l=o.height+e.padding,h=-o.width/2-a,c=-o.height/2-a,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=t.rectangle(h-8,c,s+16,l,r),o=t.line(h,c,h,c+l,r),a=t.line(h+s,c,h+s,c+l,r);n.insert((()=>o),":first-child"),n.insert((()=>a),":first-child");const u=n.insert((()=>i),":first-child"),{cssStyles:d}=e;u.attr("class","basic label-container").attr("style",d),te(e,u)}else{const t=Ae(n,s,l,u);i&&t.attr("style",i),te(e,t)}return e.intersect=function(t){return ge.polygon(e,u,t)},n}),"subroutine"),Be=(0,s.K2)(((t,e,r,i,n,o)=>[`M${t},${e+o}`,`a${n},${o} 0,0,0 ${r},0`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createCylinderPathD"),Le=(0,s.K2)(((t,e,r,i,n,o)=>[`M${t},${e+o}`,`M${t+r},${e+o}`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createOuterCylinderPathD"),Fe=(0,s.K2)(((t,e,r,i,n,o)=>[`M${t-r/2},${-i/2}`,`a${n},${o} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),$e=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+e.padding,e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(o.height+h+e.padding,e.height??0);let u;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=dt(n),r=Le(0,0,s,c,l,h),i=Fe(0,h,s,c,l,h),o=t.path(r,vt(e,{})),a=t.path(i,vt(e,{fill:"none"}));u=n.insert((()=>a),":first-child"),u=n.insert((()=>o),":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const t=Be(0,0,s,c,l,h);u=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",d).attr("style",i)}return u.attr("label-offset-y",h),u.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),te(e,u),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+(e.padding??0)/1.5-(o.y-(o.top??0))})`),e.intersect=function(t){const r=ge.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let n=h*h*(1-i*i/(l*l));n>0&&(n=Math.sqrt(n)),n=h-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},n}),"cylinder"),Ee=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,halfPadding:a}=await Jt(t,e,ee(e)),l=o.width/2+a;let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=t.circle(0,0,2*l,r);h=n.insert((()=>i),":first-child"),h.attr("class","basic label-container").attr("style",c)}else h=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0);return te(e,h),e.intersect=function(t){return s.Rm.info("Circle intersect",e,l,t),ge.circle(e,l,t)},n}),"circle"),De=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,halfPadding:a}=await Jt(t,e,ee(e)),l=o.width/2+a+5,h=o.width/2+a;let c;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{roughness:.2,strokeWidth:2.5}),i=vt(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*l,r),a=t.circle(0,0,2*h,i);c=n.insert("g",":first-child"),c.attr("class",e.cssClasses).attr("style",u),c.node()?.appendChild(o),c.node()?.appendChild(a)}else{c=n.insert("g",":first-child");const t=c.insert("circle",":first-child"),e=c.insert("circle");c.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return te(e,c),e.intersect=function(t){return s.Rm.info("DoubleCircle intersect",e,l,t),ge.circle(e,l,t)},n}),"doublecircle"),Oe=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=-Math.max(o.width+(e.padding??0),e?.width??0)/2,l=-Math.max(o.height+(e.padding??0),e?.height??0)/2,h=l/2,c=[{x:s+h,y:l},{x:s,y:0},{x:s+h,y:-l},{x:-s,y:-l},{x:-s,y:l}],{cssStyles:u}=e,d=dt(n),p=vt(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const f=re(c),g=d.path(f,p),y=n.insert((()=>g),":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${-h/2},0)`),a.attr("transform",`translate(${-h/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),te(e,y),e.intersect=function(t){return ge.polygon(e,c,t)},n}),"rect_left_inv_arrow"),Ie=(0,s.K2)(((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createDecisionBoxPathD"),Re=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=o.width+e.padding+(o.height+e.padding),l=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=Ie(0,0,a),o=t.path(i,r);h=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${a/2})`),c&&h.attr("style",c)}else h=Ae(n,a,a,l);return i&&h.attr("style",i),te(e,h),e.intersect=function(t){return s.Rm.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",ge.polygon(e,l,t)),ge.polygon(e,l,t)},n}),"question"),Pe=(0,s.K2)(((t,e,r,i,n)=>[`M${t+n},${e}`,`L${t+r-n},${e}`,`L${t+r},${e-i/2}`,`L${t+r-n},${e-i}`,`L${t+n},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" ")),"createHexagonPathD"),ze=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=o.height+e.padding,s=a/4,l=o.width+2*s+e.padding,h=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}];let c;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=Pe(0,0,l,a,s),o=t.path(i,r);c=n.insert((()=>o),":first-child").attr("transform",`translate(${-l/2}, ${a/2})`),u&&c.attr("style",u)}else c=Ae(n,l,a,h);return i&&c.attr("style",i),e.width=l,e.height=a,te(e,c),e.intersect=function(t){return ge.polygon(e,h,t)},n}),"hexagon");async function Ke(t,e){const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(o.width+e.padding,e?.width||0),s=Math.max(o.height+e.padding,e?.height||0),l=-a/2,h=-s/2,c=n.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",s),te(e,c),e.intersect=function(t){return ge.rect(e,t)},n}async function qe(t,e){const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=o.height+e.padding,s=o.width+e.padding+12,l=-a,h=[{x:12,y:l},{x:s,y:l},{x:s,y:0},{x:0,y:0},{x:0,y:l+12},{x:12,y:l}];let c;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=re(h),o=t.path(i,r);c=n.insert((()=>o),":first-child").attr("transform",`translate(${-s/2}, ${a/2})`),u&&c.attr("style",u)}else c=Ae(n,s,a,h);return i&&c.attr("style",i),te(e,c),e.intersect=function(t){return ge.polygon(e,h,t)},n}(0,s.K2)(Ke,"text"),(0,s.K2)(qe,"card");var Ne=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=e?.padding??0,l=Math.max(o.width+2*(e.padding??0),e?.width??0),h=Math.max(o.height+2*(e.padding??0),e?.height??0),c=-o.width/2-s,u=-o.height/2-s,{cssStyles:d}=e,p=dt(n),f=vt(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=[{x:c,y:u},{x:c+l+8,y:u},{x:c+l+8,y:u+h},{x:c-8,y:u+h},{x:c-8,y:u},{x:c,y:u},{x:c,y:u+h}],y=p.polygon(g.map((t=>[t.x,t.y])),f),m=n.insert((()=>y),":first-child");return m.attr("class","basic label-container").attr("style",d),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),d&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),a.attr("transform",`translate(${-l/2+4+(e.padding??0)-(o.x-(o.left??0))},${-h/2+(e.padding??0)-(o.y-(o.top??0))})`),te(e,m),e.intersect=function(t){return ge.rect(e,t)},n}),"shadedProcess"),je=(0,s.K2)(((t,e)=>{const{labelStyles:r}=_t(e);e.labelStyle=r;const i=ee(e);let n=i;i||(n="anchor");const o=t.insert("g").attr("class",n).attr("id",e.domId||e.id),{cssStyles:a}=e,l=dt(o),h=vt(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(h.roughness=0);const c=l.circle(0,0,2,h),u=o.insert((()=>c),":first-child");return u.attr("class","anchor").attr("style",a),te(e,u),e.intersect=function(t){return s.Rm.info("Circle intersect",e,1,t),ge.circle(e,1,t)},o}),"anchor"),We=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(o.width+(e.padding??0),e?.width??0),s=Math.max(o.height+(e.padding??0),e?.height??0),l=[{x:-3*s/6,y:0},{x:a,y:0},{x:a+3*s/6,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=re(l),o=t.path(i,r);h=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),c&&h.attr("style",c)}else h=Ae(n,a,s,l);return i&&h.attr("style",i),e.width=a,e.height=s,te(e,h),e.intersect=function(t){return ge.polygon(e,l,t)},n}),"lean_right"),Ue=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(o.width+(e.padding??0),e?.width??0),s=Math.max(o.height+(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:a+3*s/6,y:0},{x:a,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=re(l),o=t.path(i,r);h=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),c&&h.attr("style",c)}else h=Ae(n,a,s,l);return i&&h.attr("style",i),e.width=a,e.height=s,te(e,h),e.intersect=function(t){return ge.polygon(e,l,t)},n}),"lean_left"),He=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=o.width+e.padding,s=o.height+e.padding,l=[{x:-3*s/6,y:0},{x:a+3*s/6,y:0},{x:a,y:-s},{x:0,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=re(l),o=t.path(i,r);h=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),c&&h.attr("style",c)}else h=Ae(n,a,s,l);return i&&h.attr("style",i),e.width=a,e.height=s,te(e,h),e.intersect=function(t){return ge.polygon(e,l,t)},n}),"trapezoid"),Ye=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(o.width+2*(e.padding??0),e?.width??0),s=Math.max(o.height+2*(e.padding??0),e?.height??0),l=[{x:0,y:0},{x:a,y:0},{x:a+3*s/6,y:-s},{x:-3*s/6,y:-s}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=dt(n),r=vt(e,{}),i=re(l),o=t.path(i,r);h=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),c&&h.attr("style",c)}else h=Ae(n,a,s,l);return i&&h.attr("style",i),e.width=a,e.height=s,te(e,h),e.intersect=function(t){return ge.polygon(e,l,t)},n}),"inv_trapezoid"),Ge=(0,s.K2)((async(t,e)=>{const{shapeSvg:r,bbox:i,label:n}=await Jt(t,e,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),te(e,o),e.intersect=function(t){return ge.rect(e,t)},r}),"labelRect"),Ve=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),l=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),h=o.width+(e.padding??0),c=h+o.height,u=h+o.height,d=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-c}],{cssStyles:p}=e,f=dt(n),g=vt(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=re(d),m=f.path(y,g),x=n.insert((()=>m),":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return p&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",p),i&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",i),e.width=h,e.height=c,te(e,x),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${c/2-(o.height+(e.padding??0)/(l?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,d,t),ge.polygon(e,d,t)},n}),"triangle"),Ze=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(80,o.width+2*(e.padding??0),e?.width??0),l=Math.max(50,o.height+2*(e.padding??0),e?.height??0),h=l/2,{cssStyles:c}=e,u=dt(n),d=vt(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const p=[{x:-a/2,y:-l/2},{x:a/2-h,y:-l/2},...ne(-a/2+h,0,h,50,90,270),{x:a/2-h,y:l/2},{x:-a/2,y:l/2}],f=re(p),g=u.path(f,d),y=n.insert((()=>g),":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",i),te(e,y),e.intersect=function(t){return s.Rm.info("Pill intersect",e,{radius:h,point:t}),ge.polygon(e,p,t)},n}),"halfRoundedRectangle"),Xe=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(80,1.25*(o.width+2*(e.padding??0)),e?.width??0),s=Math.max(20,o.height+2*(e.padding??0),e?.height??0),l=s/2,{cssStyles:h}=e,c=dt(n),u=vt(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=a-l,p=s/4,f=[{x:d,y:0},{x:p,y:0},{x:0,y:s/2},{x:p,y:s},{x:d,y:s},...ne(-d,-s/2,l,50,270,90)],g=re(f),y=c.path(g,u),m=n.insert((()=>y),":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(${-a/2}, ${-s/2})`),te(e,m),e.intersect=function(t){return ge.polygon(e,f,t)},n}),"curvedTrapezoid"),Qe=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=-s/2,c=-l/2,{cssStyles:u}=e,d=dt(n),p=vt(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const f=[{x:h,y:c},{x:h,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-l/2}],g=re(f),y=d.path(g,p),m=n.insert((()=>y),":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),m.attr("transform",`translate(0, ${l/4})`),a.attr("transform",`translate(${-s/2+(e.padding??0)-(o.x-(o.left??0))}, ${-l/4+(e.padding??0)-(o.y-(o.top??0))})`),te(e,m),e.intersect=function(t){return ge.polygon(e,f,t)},n}),"slopedRect");function Je(t,e,r,i,n,o,a){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/n,u=(i-e)/2/o,d=Math.sqrt(c**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*o*Math.sin(h)*(a?-1:1),g=l-p*n*Math.cos(h)*(a?-1:1),y=Math.atan2((e-g)/o,(t-f)/n);let m=Math.atan2((i-g)/o,(r-f)/n)-y;a&&m<0&&(m+=2*Math.PI),!a&&m>0&&(m-=2*Math.PI);const x=[];for(let t=0;t<20;t++){const e=y+t/19*m,r=f+n*Math.cos(e),i=g+o*Math.sin(e);x.push({x:r,y:i})}return x}(0,s.K2)(Je,"generateArcPoints");var tr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=o.width+e.padding+20,s=o.height+e.padding,l=s/2,h=l/(2.5+s/50),{cssStyles:c}=e,u=[{x:a/2,y:-s/2},{x:-a/2,y:-s/2},...Je(-a/2,-s/2,-a/2,s/2,h,l,!1),{x:a/2,y:s/2},...Je(a/2,s/2,a/2,-s/2,h,l,!0)],d=dt(n),p=vt(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const f=re(u),g=d.path(f,p),y=n.insert((()=>g),":first-child");return y.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${h/2}, 0)`),te(e,y),e.intersect=function(t){return ge.polygon(e,u,t)},n}),"bowTieRect"),er=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=o.width+e.padding,l=o.height+e.padding,h=.2*l,c=-s/2,u=-l/2-h/2,{cssStyles:d}=e,p=dt(n),f=vt(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=[{x:c,y:u+h},{x:-c,y:u+h},{x:-c,y:-u},{x:c,y:-u},{x:c,y:u},{x:-c,y:u},{x:-c,y:u+h}],y=p.polygon(g.map((t=>[t.x,t.y])),f),m=n.insert((()=>y),":first-child");return m.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),a.attr("transform",`translate(${c+(e.padding??0)/2-(o.x-(o.left??0))}, ${u+h+(e.padding??0)/2-(o.y-(o.top??0))})`),te(e,m),e.intersect=function(t){return ge.rect(e,t)},n}),"dividedRectangle");function rr(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}(0,s.K2)(rr,"createLine");var ir=(0,s.K2)(((t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r,e.label="";const n=t.insert("g").attr("class",ee(e)).attr("id",e.domId??e.id),o=Math.max(30,e?.width??0),{cssStyles:a}=e,l=dt(n),h=vt(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=l.circle(0,0,2*o,h),u=rr(o),d=l.path(u,h),p=n.insert((()=>c),":first-child");return p.insert((()=>d)),a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),te(e,p),e.intersect=function(t){return s.Rm.info("crossedCircle intersect",e,{radius:o,point:t}),ge.circle(e,o,t)},n}),"crossedCircle"),nr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(o.width+2*(e.padding??0),e?.width??0),s=Math.max(o.height+2*(e.padding??0),e?.height??0),l=a/s;let h=a,c=s;h>c*l?c=h/l:h=c*l,h=Math.max(h,100),c=Math.max(c,50);const u=Math.min(.2*c,c/4),d=c+2*u,{cssStyles:p}=e,f=dt(n),g=vt(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-h/2,y:d/2},...ie(-h/2,d/2,h/2,d/2,u,1),{x:h/2,y:-d/2},...ie(h/2,-d/2,-h/2,-d/2,u,-1)],m=re(y),x=f.path(m,g),b=n.insert((()=>x),":first-child");return b.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),te(e,b),e.intersect=function(t){return ge.polygon(e,y,t)},n}),"waveRectangle"),or=(0,s.K2)(((t,e,r,i,n,o)=>`M${t},${e}\n a${n},${o} 0,0,1 0,${-i}\n l${r},0\n a${n},${o} 0,0,1 0,${i}\n M${r},${-i}\n a${n},${o} 0,0,0 0,${i}\n l${-r},0`),"createCylinderPathD"),ar=(0,s.K2)(((t,e,r,i,n,o)=>[`M${t},${e}`,`M${t+r},${e}`,`a${n},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${o} 0,0,0 0,${i}`,`l${r},0`].join(" ")),"createOuterCylinderPathD"),sr=(0,s.K2)(((t,e,r,i,n,o)=>[`M${t+r/2},${-i/2}`,`a${n},${o} 0,0,0 0,${i}`].join(" ")),"createInnerCylinderPathD"),lr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a,halfPadding:s}=await Jt(t,e,ee(e)),l="neo"===e.look?2*s:s,h=o.height+l,c=h/2,u=c/(2.5+h/50),d=o.width+u+l,{cssStyles:p}=e;let f;if("handDrawn"===e.look){const t=dt(n),r=ar(0,0,d,h,u,c),i=sr(0,0,d,h,u,c),o=t.path(r,vt(e,{})),a=t.path(i,vt(e,{fill:"none"}));f=n.insert((()=>a),":first-child"),f=n.insert((()=>o),":first-child"),f.attr("class","basic label-container"),p&&f.attr("style",p)}else{const t=or(0,0,d,h,u,c);f=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",p).attr("style",i)}return f.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",i),f.attr("label-offset-x",u),f.attr("transform",`translate(${-d/2}, ${h/2} )`),a.attr("transform",`translate(${-o.width/2-u-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),te(e,f),e.intersect=function(t){const r=ge.rect(e,t),i=r.y-(e.y??0);if(0!=c&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-u)){let n=u*u*(1-i*i/(c*c));0!=n&&(n=Math.sqrt(n)),n=u-n,t.x-(e.x??0)>0&&(n=-n),r.x+=n}return r},n}),"tiltedCylinder"),hr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(60,o.width+2*(e.padding??0),e?.width??0),s=Math.max(20,o.height+2*(e.padding??0),e?.height??0),{cssStyles:l}=e,h=dt(n),c=vt(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=[{x:-a/2*.8,y:-s/2},{x:a/2*.8,y:-s/2},{x:a/2,y:-s/2*.6},{x:a/2,y:s/2},{x:-a/2,y:s/2},{x:-a/2,y:-s/2*.6}],d=re(u),p=h.path(d,c),f=n.insert((()=>p),":first-child");return f.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",l),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),te(e,f),e.intersect=function(t){return ge.polygon(e,u,t)},n}),"trapezoidalPentagon"),cr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),l=o.width+(e.padding??0),h=l+o.height,c=l+o.height,u=[{x:0,y:-h},{x:c,y:-h},{x:c/2,y:0}],{cssStyles:d}=e,p=dt(n),f=vt(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=re(u),y=p.path(g,f),m=n.insert((()=>y),":first-child").attr("transform",`translate(${-h/2}, ${h/2})`);return d&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",i),e.width=l,e.height=h,te(e,m),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-h/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return s.Rm.info("Triangle intersect",e,u,t),ge.polygon(e,u,t)},n}),"flippedTriangle"),ur=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.label="",e.labelStyle=r;const{shapeSvg:n}=await Jt(t,e,ee(e)),o=Math.max(30,e?.width??0),a=Math.max(30,e?.height??0),{cssStyles:l}=e,h=dt(n),c=vt(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=re(u),p=h.path(d,c),f=n.insert((()=>p),":first-child");return f.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",l),i&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-o/2}, ${-a/2})`),te(e,f),e.intersect=function(t){return s.Rm.info("Pill intersect",e,{points:u}),ge.polygon(e,u,t)},n}),"hourglass"),dr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Jt(t,e,ee(e)),a=Math.max(o.width+2*(e.padding??0),e?.width??0),s=Math.max(o.height+2*(e.padding??0),e?.height??0),l=-a/2,h=-s/2,c=.2*s,u=.2*s,{cssStyles:d}=e,p=dt(n),f=vt(e,{}),g=[{x:l-c/2,y:h},{x:l+a+c/2,y:h},{x:l+a+c/2,y:h+s},{x:l-c/2,y:h+s}],y=[{x:l+a-c/2,y:h+s},{x:l+a+c/2,y:h+s},{x:l+a+c/2,y:h+s-u}];"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const m=re(g),x=p.path(m,f),b=re(y),k=p.path(b,{...f,fillStyle:"solid"}),C=n.insert((()=>k),":first-child");return C.insert((()=>x),":first-child"),C.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",d),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),te(e,C),e.intersect=function(t){return ge.polygon(e,g,t)},n}),"taggedRect"),pr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=-s/2,c=-l/2,{cssStyles:u}=e,d=dt(n),p=vt(e,{}),f=[{x:h-5,y:c+5},{x:h-5,y:c+l+5},{x:h+s-5,y:c+l+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c+l-5},{x:h+s+5,y:c+l-5},{x:h+s+5,y:c-5},{x:h+5,y:c-5},{x:h+5,y:c},{x:h,y:c},{x:h,y:c+5}],g=[{x:h,y:c+5},{x:h+s-5,y:c+5},{x:h+s-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c},{x:h,y:c}];"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const y=re(f),m=d.path(y,p),x=re(g),b=d.path(x,{...p,fill:"none"}),k=n.insert((()=>b),":first-child");return k.insert((()=>m),":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",i),a.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),te(e,k),e.intersect=function(t){return ge.polygon(e,f,t)},n}),"multiRect"),fr=(0,s.K2)(((t,e,r,i,n,o,a)=>[`M${t},${e+o}`,`a${n},${o} 0,0,0 ${r},0`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+o+a}`,`a${n},${o} 0,0,0 ${r},0`].join(" ")),"createCylinderPathD"),gr=(0,s.K2)(((t,e,r,i,n,o,a)=>[`M${t},${e+o}`,`M${t+r},${e+o}`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+o+a}`,`a${n},${o} 0,0,0 ${r},0`].join(" ")),"createOuterCylinderPathD"),yr=(0,s.K2)(((t,e,r,i,n,o)=>[`M${t-r/2},${-i/2}`,`a${n},${o} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),mr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+(e.padding??0),e.width??0),l=s/2,h=l/(2.5+s/50),c=Math.max(o.height+h+(e.padding??0),e.height??0),u=.1*c;let d;const{cssStyles:p}=e;if("handDrawn"===e.look){const t=dt(n),r=gr(0,0,s,c,l,h,u),i=yr(0,h,s,c,l,h),o=vt(e,{}),a=t.path(r,o),f=t.path(i,o);n.insert((()=>f),":first-child").attr("class","line"),d=n.insert((()=>a),":first-child"),d.attr("class","basic label-container"),p&&d.attr("style",p)}else{const t=fr(0,0,s,c,l,h,u);d=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",p).attr("style",i)}return d.attr("label-offset-y",h),d.attr("transform",`translate(${-s/2}, ${-(c/2+h)})`),te(e,d),a.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-o.height/2+h-(o.y-(o.top??0))})`),e.intersect=function(t){const r=ge.rect(e,t),i=r.x-(e.x??0);if(0!=l&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-h)){let n=h*h*(1-i*i/(l*l));n>0&&(n=Math.sqrt(n)),n=h-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},n}),"linedCylinder"),xr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=l/8,c=l+h,{cssStyles:u}=e,d=70-s,p=d>0?d/2:0,f=dt(n),g=vt(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-s/2-p,y:c/2},...ie(-s/2-p,c/2,s/2+p,c/2,h,.8),{x:s/2+p,y:-c/2},{x:-s/2-p,y:-c/2}],m=re(y),x=f.path(m,g),b=n.insert((()=>x),":first-child");return b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-s/2+(e.padding??0)-(o.x-(o.left??0))},${-l/2+(e.padding??0)-h-(o.y-(o.top??0))})`),te(e,b),e.intersect=function(t){return ge.polygon(e,y,t)},n}),"waveEdgedRectangle"),br=(0,s.K2)(((t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.label="",e.labelStyle=r;const n=t.insert("g").attr("class",ee(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(35,e?.width??0),l=Math.max(35,e?.height??0),h=[{x:a,y:0},{x:0,y:l+3.5},{x:a-14,y:l+3.5},{x:0,y:2*l},{x:a,y:l-3.5},{x:14,y:l-3.5}],c=dt(n),u=vt(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=re(h),p=c.path(d,u),f=n.insert((()=>p),":first-child");return o&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",i),f.attr("transform",`translate(-${a/2},${-l})`),te(e,f),e.intersect=function(t){return s.Rm.info("lightningBolt intersect",e,t),ge.polygon(e,h,t)},n}),"lightningBolt"),kr=(0,s.K2)(((t,e,{config:{themeVariables:r}})=>{const{labelStyles:i,nodeStyles:n}=_t(e);e.label="",e.labelStyle=i;const o=t.insert("g").attr("class",ee(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,l=dt(o),{nodeBorder:h}=r,c=vt(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);const u=l.circle(0,0,14,c),d=o.insert((()=>u),":first-child");return d.selectAll("path").attr("style",`fill: ${h} !important;`),a&&a.length>0&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),te(e,d),e.intersect=function(t){return s.Rm.info("filledCircle intersect",e,{radius:7,point:t}),ge.circle(e,7,t)},o}),"filledCircle"),Cr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=l/4,c=l+h,u=-s/2,d=-c/2,{cssStyles:p}=e,f=ie(u-5,d+c+5,u+s-5,d+c+5,h,.8),g=f?.[f.length-1],y=[{x:u-5,y:d+5},{x:u-5,y:d+c+5},...f,{x:u+s-5,y:g.y-5},{x:u+s,y:g.y-5},{x:u+s,y:g.y-10},{x:u+s+5,y:g.y-10},{x:u+s+5,y:d-5},{x:u+5,y:d-5},{x:u+5,y:d},{x:u,y:d},{x:u,y:d+5}],m=[{x:u,y:d+5},{x:u+s-5,y:d+5},{x:u+s-5,y:g.y-5},{x:u+s,y:g.y-5},{x:u+s,y:d},{x:u,y:d}],x=dt(n),b=vt(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=re(y),C=x.path(k,b),w=re(m),_=x.path(w,b),v=n.insert((()=>C),":first-child");return v.insert((()=>_)),v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-h/2-(o.y-(o.top??0))})`),te(e,v),e.intersect=function(t){return ge.polygon(e,y,t)},n}),"multiWaveEdgedRectangle"),wr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=-s/2,c=-l/2,{cssStyles:u}=e,d=dt(n),p=vt(e,{}),f=[{x:h-5,y:c-5},{x:h-5,y:c+l},{x:h+s,y:c+l},{x:h+s,y:c-5}],g=`M${h-5},${c-5} L${h+s},${c-5} L${h+s},${c+l} L${h-5},${c+l} L${h-5},${c-5}\n M${h-5},${c} L${h+s},${c}\n M${h},${c-5} L${h},${c+l}`;"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const y=d.path(g,p),m=n.insert((()=>y),":first-child");return m.attr("transform","translate(2.5, 2.5)"),m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),a.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),te(e,m),e.intersect=function(t){return ge.polygon(e,f,t)},n}),"windowPane"),_r=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=l/4,c=l+h,{cssStyles:u}=e,d=dt(n),p=vt(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const f=[{x:-s/2-s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:c/2},...ie(-s/2-s/2*.1,c/2,s/2+s/2*.1,c/2,h,.8),{x:s/2+s/2*.1,y:-c/2},{x:-s/2-s/2*.1,y:-c/2},{x:-s/2,y:-c/2},{x:-s/2,y:c/2*1.1},{x:-s/2,y:-c/2}],g=d.polygon(f.map((t=>[t.x,t.y])),p),y=n.insert((()=>g),":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-s/2+(e.padding??0)+s/2*.1/2-(o.x-(o.left??0))},${-l/2+(e.padding??0)-h/2-(o.y-(o.top??0))})`),te(e,y),e.intersect=function(t){return ge.polygon(e,f,t)},n}),"linedWaveEdgedRect"),vr=(0,s.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),h=l/4,c=.2*s,u=.2*l,d=l+h,{cssStyles:p}=e,f=dt(n),g=vt(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=[{x:-s/2-s/2*.1,y:d/2},...ie(-s/2-s/2*.1,d/2,s/2+s/2*.1,d/2,h,.8),{x:s/2+s/2*.1,y:-d/2},{x:-s/2-s/2*.1,y:-d/2}],m=-s/2+s/2*.1,x=-d/2-.4*u,b=[{x:m+s-c,y:1.4*(x+l)},{x:m+s,y:x+l-u},{x:m+s,y:.9*(x+l)},...ie(m+s,1.3*(x+l),m+s-c,1.5*(x+l),.03*-l,.5)],k=re(y),C=f.path(k,g),w=re(b),_=f.path(w,{...g,fillStyle:"solid"}),v=n.insert((()=>_),":first-child");return v.insert((()=>C),":first-child"),v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-h/2})`),a.attr("transform",`translate(${-s/2+(e.padding??0)-(o.x-(o.left??0))},${-l/2+(e.padding??0)-h/2-(o.y-(o.top??0))})`),te(e,v),e.intersect=function(t){return ge.polygon(e,y,t)},n}),"taggedWaveEdgedRectangle");function Sr(t,e,r,i=100,n=0,o=180){const a=[],s=n*Math.PI/180,l=(o*Math.PI/180-s)/(i-1);for(let n=0;n{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=o.width+(e.padding??0),l=o.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,u=[...Sr(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},...Sr(s/2+2*h,-h,h,20,-180,-270),...Sr(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},...Sr(s/2,l/2,h,20,0,90)],d=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},...Sr(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},...Sr(s/2+.1*s,-h,h,20,-180,-270),...Sr(s/2+.1*s,h,h,20,-90,-180),{x:-s/2-h,y:l/2},...Sr(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2,y:l/2+h}],p=dt(n),f=vt(e,{fill:"none"});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=re(u).replace("Z",""),y=p.path(g,f),m=re(d),x=p.path(m,{...f}),b=n.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>y),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${h}, 0)`),a.attr("transform",`translate(${-s/2+h-(o.x-(o.left??0))},${-l/2+(e.padding??0)/2-(o.y-(o.top??0))})`),te(e,b),e.intersect=function(t){return ge.polygon(e,d,t)},n}),"curlyBraceLeft");function Ar(t,e,r,i=100,n=0,o=180){const a=[],s=n*Math.PI/180,l=(o*Math.PI/180-s)/(i-1);for(let n=0;n{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=o.width+(e.padding??0),l=o.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,u=[...Ar(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...Ar(s/2+2*h,-h,h,20,-180,-270),...Ar(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...Ar(s/2,l/2,h,20,0,90)],d=[{x:-s/2,y:-l/2-h},{x:s/2,y:-l/2-h},...Ar(s/2,-l/2,h,20,-90,0),{x:s/2+h,y:-h},...Ar(s/2+2*h,-h,h,20,-180,-270),...Ar(s/2+2*h,h,h,20,-90,-180),{x:s/2+h,y:l/2},...Ar(s/2,l/2,h,20,0,90),{x:s/2,y:l/2+h},{x:-s/2,y:l/2+h}],p=dt(n),f=vt(e,{fill:"none"});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=re(u).replace("Z",""),y=p.path(g,f),m=re(d),x=p.path(m,{...f}),b=n.insert("g",":first-child");return b.insert((()=>x),":first-child").attr("stroke-opacity",0),b.insert((()=>y),":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-h}, 0)`),a.attr("transform",`translate(${-s/2+(e.padding??0)/2-(o.x-(o.left??0))},${-l/2+(e.padding??0)/2-(o.y-(o.top??0))})`),te(e,b),e.intersect=function(t){return ge.polygon(e,d,t)},n}),"curlyBraceRight");function Br(t,e,r,i=100,n=0,o=180){const a=[],s=n*Math.PI/180,l=(o*Math.PI/180-s)/(i-1);for(let n=0;n{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,label:a}=await Jt(t,e,ee(e)),s=o.width+(e.padding??0),l=o.height+(e.padding??0),h=Math.max(5,.1*l),{cssStyles:c}=e,u=[...Br(s/2,-l/2,h,30,-90,0),{x:-s/2-h,y:h},...Br(s/2+2*h,-h,h,20,-180,-270),...Br(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:-l/2},...Br(s/2,l/2,h,20,0,90)],d=[...Br(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},...Br(-s/2-h/2,-h,h,20,0,90),...Br(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},...Br(-s/2+h+h/2,l/2,h,30,-180,-270)],p=[{x:s/2,y:-l/2-h},{x:-s/2,y:-l/2-h},...Br(s/2,-l/2,h,20,-90,0),{x:-s/2-h,y:-h},...Br(s/2+2*h,-h,h,20,-180,-270),...Br(s/2+2*h,h,h,20,-90,-180),{x:-s/2-h,y:l/2},...Br(s/2,l/2,h,20,0,90),{x:-s/2,y:l/2+h},{x:s/2-h-h/2,y:l/2+h},...Br(-s/2+h+h/2,-l/2,h,20,-90,-180),{x:s/2-h/2,y:h},...Br(-s/2-h/2,-h,h,20,0,90),...Br(-s/2-h/2,h,h,20,-90,0),{x:s/2-h/2,y:-h},...Br(-s/2+h+h/2,l/2,h,30,-180,-270)],f=dt(n),g=vt(e,{fill:"none"});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const y=re(u).replace("Z",""),m=f.path(y,g),x=re(d).replace("Z",""),b=f.path(x,g),k=re(p),C=f.path(k,{...g}),w=n.insert("g",":first-child");return w.insert((()=>C),":first-child").attr("stroke-opacity",0),w.insert((()=>m),":first-child"),w.insert((()=>b),":first-child"),w.attr("class","text"),c&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",c),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${h-h/4}, 0)`),a.attr("transform",`translate(${-s/2+(e.padding??0)/2-(o.x-(o.left??0))},${-l/2+(e.padding??0)/2-(o.y-(o.top??0))})`),te(e,w),e.intersect=function(t){return ge.polygon(e,p,t)},n}),"curlyBraces"),Fr=(0,s.K2)((async(t,e,{config:{themeVariables:r,flowchart:n}})=>{const{labelStyles:o}=_t(e);e.labelStyle=o;const a=e.assetHeight??48,l=e.assetWidth??48,h=Math.max(a,l),c=n?.wrappingWidth;e.width=Math.max(h,c??0);const{shapeSvg:u,bbox:d,halfPadding:p,label:f}=await Jt(t,e,"icon-shape default"),g="t"===e.pos,y=h+2*p,m=h+2*p,{nodeBorder:x,mainBkg:b}=r,{stylesMap:k}=Ct(e),C=-m/2,w=-y/2,_=e.label?8:0,v=dt(u),S=vt(e,{stroke:k.get("fill")||b});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=v.rectangle(C,w,m,y,S),A=Math.max(m,d.width),M=y+d.height+_,B=v.rectangle(-A/2,-M/2,A,M,{...S,fill:"transparent",stroke:"none"}),L=u.insert((()=>T),":first-child"),F=u.insert((()=>B));if(e.icon){const t=u.append("g");t.html(`${await(0,i.WY)(e.icon,{height:h,width:h,fallbackPrefix:""})}`);const r=t.node().getBBox(),n=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-n/2-a},${g?d.height/2+_/2-o/2-s:-d.height/2-_/2-o/2-s})`),t.selectAll("path").attr("fill",k.get("stroke")??x)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-M/2:M/2-d.height})`),L.attr("transform",`translate(0,${g?d.height/2+_/2:-d.height/2-_/2})`),te(e,F),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return ge.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let o=[];return o=g?[{x:r-d.width/2,y:i-n/2},{x:r+d.width/2,y:i-n/2},{x:r+d.width/2,y:i-n/2+d.height+_},{x:r+m/2,y:i-n/2+d.height+_},{x:r+m/2,y:i+n/2},{x:r-m/2,y:i+n/2},{x:r-m/2,y:i-n/2+d.height+_},{x:r-d.width/2,y:i-n/2+d.height+_}]:[{x:r-m/2,y:i-n/2},{x:r+m/2,y:i-n/2},{x:r+m/2,y:i-n/2+y},{x:r+d.width/2,y:i-n/2+y},{x:r+d.width/2/2,y:i+n/2},{x:r-d.width/2,y:i+n/2},{x:r-d.width/2,y:i-n/2+y},{x:r-m/2,y:i-n/2+y}],ge.polygon(e,o,t)},u}),"iconSquare"),$r=(0,s.K2)((async(t,e,{config:{themeVariables:r,flowchart:n}})=>{const{labelStyles:o}=_t(e);e.labelStyle=o;const a=e.assetHeight??48,l=e.assetWidth??48,h=Math.max(a,l),c=n?.wrappingWidth;e.width=Math.max(h,c??0);const{shapeSvg:u,bbox:d,label:p}=await Jt(t,e,"icon-shape default"),f=e.label?8:0,g="t"===e.pos,{nodeBorder:y,mainBkg:m}=r,{stylesMap:x}=Ct(e),b=dt(u),k=vt(e,{stroke:x.get("fill")||m});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=u.append("g");e.icon&&C.html(`${await(0,i.WY)(e.icon,{height:h,width:h,fallbackPrefix:""})}`);const w=C.node().getBBox(),_=w.width,v=w.height,S=w.x,T=w.y,A=Math.max(_,v)*Math.SQRT2+40,M=b.circle(0,0,A,k),B=Math.max(A,d.width),L=A+d.height+f,F=b.rectangle(-B/2,-L/2,B,L,{...k,fill:"transparent",stroke:"none"}),$=u.insert((()=>M),":first-child"),E=u.insert((()=>F));return C.attr("transform",`translate(${-_/2-S},${g?d.height/2+f/2-v/2-T:-d.height/2-f/2-v/2-T})`),C.selectAll("path").attr("fill",x.get("stroke")||y),p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-L/2:L/2-d.height})`),$.attr("transform",`translate(0,${g?d.height/2+f/2:-d.height/2-f/2})`),te(e,E),e.intersect=function(t){return s.Rm.info("iconSquare intersect",e,t),ge.rect(e,t)},u}),"iconCircle"),Er=(0,s.K2)((async(t,e,{config:{themeVariables:r,flowchart:n}})=>{const{labelStyles:o}=_t(e);e.labelStyle=o;const a=e.assetHeight??48,l=e.assetWidth??48,h=Math.max(a,l),c=n?.wrappingWidth;e.width=Math.max(h,c??0);const{shapeSvg:u,bbox:d,label:p}=await Jt(t,e,"icon-shape default"),f="t"===e.pos,g=h,y=h,{nodeBorder:m}=r,{stylesMap:x}=Ct(e),b=-y/2,k=-g/2,C=e.label?8:0,w=dt(u),_=vt(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const v=w.rectangle(b,k,y,g,_),S=Math.max(y,d.width),T=g+d.height+C,A=w.rectangle(-S/2,-T/2,S,T,{..._,fill:"transparent",stroke:"none"}),M=u.insert((()=>v),":first-child"),B=u.insert((()=>A));if(e.icon){const t=u.append("g");t.html(`${await(0,i.WY)(e.icon,{height:h,width:h,fallbackPrefix:""})}`);const r=t.node().getBBox(),n=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-n/2-a},${f?d.height/2+C/2-o/2-s:-d.height/2-C/2-o/2-s})`),t.selectAll("path").attr("fill",x.get("stroke")||m)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${f?-T/2:T/2-d.height})`),M.attr("transform",`translate(0,${f?d.height/2+C/2:-d.height/2-C/2})`),te(e,B),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return ge.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let o=[];return o=f?[{x:r-d.width/2,y:i-n/2},{x:r+d.width/2,y:i-n/2},{x:r+d.width/2,y:i-n/2+d.height+C},{x:r+y/2,y:i-n/2+d.height+C},{x:r+y/2,y:i+n/2},{x:r-y/2,y:i+n/2},{x:r-y/2,y:i-n/2+d.height+C},{x:r-d.width/2,y:i-n/2+d.height+C}]:[{x:r-y/2,y:i-n/2},{x:r+y/2,y:i-n/2},{x:r+y/2,y:i-n/2+g},{x:r+d.width/2,y:i-n/2+g},{x:r+d.width/2/2,y:i+n/2},{x:r-d.width/2,y:i+n/2},{x:r-d.width/2,y:i-n/2+g},{x:r-y/2,y:i-n/2+g}],ge.polygon(e,o,t)},u}),"icon"),Dr=(0,s.K2)((async(t,e,{config:{flowchart:r}})=>{const i=new Image;i.src=e?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/o;const{labelStyles:a}=_t(e);e.labelStyle=a;const l=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const h=Math.max(e.label?l??0:0,e?.assetWidth??n),c="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:h,u="on"===e.constraint?c/e.imageAspectRatio:e?.assetHeight??o;e.width=Math.max(c,l??0);const{shapeSvg:d,bbox:p,label:f}=await Jt(t,e,"image-shape default"),g="t"===e.pos,y=-c/2,m=-u/2,x=e.label?8:0,b=dt(d),k=vt(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const C=b.rectangle(y,m,c,u,k),w=Math.max(c,p.width),_=u+p.height+x,v=b.rectangle(-w/2,-_/2,w,_,{...k,fill:"none",stroke:"none"}),S=d.insert((()=>C),":first-child"),T=d.insert((()=>v));if(e.img){const t=d.append("image");t.attr("href",e.img),t.attr("width",c),t.attr("height",u),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-c/2},${g?_/2-u:-_/2})`)}return f.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-u/2-p.height/2-x/2:u/2-p.height/2+x/2})`),S.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),te(e,T),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return ge.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let o=[];return o=g?[{x:r-p.width/2,y:i-n/2},{x:r+p.width/2,y:i-n/2},{x:r+p.width/2,y:i-n/2+p.height+x},{x:r+c/2,y:i-n/2+p.height+x},{x:r+c/2,y:i+n/2},{x:r-c/2,y:i+n/2},{x:r-c/2,y:i-n/2+p.height+x},{x:r-p.width/2,y:i-n/2+p.height+x}]:[{x:r-c/2,y:i-n/2},{x:r+c/2,y:i-n/2},{x:r+c/2,y:i-n/2+u},{x:r+p.width/2,y:i-n/2+u},{x:r+p.width/2/2,y:i+n/2},{x:r-p.width/2,y:i+n/2},{x:r-p.width/2,y:i-n/2+u},{x:r-c/2,y:i-n/2+u}],ge.polygon(e,o,t)},d}),"imageSquare"),Or=(0,s.K2)((async(t,e,{config:{themeVariables:r,flowchart:n}})=>{const{labelStyles:o}=_t(e);e.labelStyle=o;const a=e.assetHeight??48,l=e.assetWidth??48,h=Math.max(a,l),c=n?.wrappingWidth;e.width=Math.max(h,c??0);const{shapeSvg:u,bbox:d,halfPadding:p,label:f}=await Jt(t,e,"icon-shape default"),g="t"===e.pos,y=h+2*p,m=h+2*p,{nodeBorder:x,mainBkg:b}=r,{stylesMap:k}=Ct(e),C=-m/2,w=-y/2,_=e.label?8:0,v=dt(u),S=vt(e,{stroke:k.get("fill")||b});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=v.path(bt(C,w,m,y,5),S),A=Math.max(m,d.width),M=y+d.height+_,B=v.rectangle(-A/2,-M/2,A,M,{...S,fill:"transparent",stroke:"none"}),L=u.insert((()=>T),":first-child"),F=u.insert((()=>B));if(e.icon){const t=u.append("g");t.html(`${await(0,i.WY)(e.icon,{height:h,width:h,fallbackPrefix:""})}`);const r=t.node().getBBox(),n=r.width,o=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-n/2-a},${g?d.height/2+_/2-o/2-s:-d.height/2-_/2-o/2-s})`),t.selectAll("path").attr("fill",k.get("stroke")??x)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-M/2:M/2-d.height})`),L.attr("transform",`translate(0,${g?d.height/2+_/2:-d.height/2-_/2})`),te(e,F),e.intersect=function(t){if(s.Rm.info("iconSquare intersect",e,t),!e.label)return ge.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let o=[];return o=g?[{x:r-d.width/2,y:i-n/2},{x:r+d.width/2,y:i-n/2},{x:r+d.width/2,y:i-n/2+d.height+_},{x:r+m/2,y:i-n/2+d.height+_},{x:r+m/2,y:i+n/2},{x:r-m/2,y:i+n/2},{x:r-m/2,y:i-n/2+d.height+_},{x:r-d.width/2,y:i-n/2+d.height+_}]:[{x:r-m/2,y:i-n/2},{x:r+m/2,y:i-n/2},{x:r+m/2,y:i-n/2+y},{x:r+d.width/2,y:i-n/2+y},{x:r+d.width/2/2,y:i+n/2},{x:r-d.width/2,y:i+n/2},{x:r-d.width/2,y:i-n/2+y},{x:r-m/2,y:i-n/2+y}],ge.polygon(e,o,t)},u}),"iconRounded"),Ir={state:me,stateStart:ke,stateEnd:Ce,forkJoin:we,choice:_e,note:ve,rectWithTitle:Te,roundedRect:xe,squareRect:be,rectangle:be,rect:be,process:be,proc:be,rounded:xe,event:xe,stadium:Se,pill:Se,terminal:Se,subroutine:Me,"framed-rectangle":Me,"fr-rect":Me,subprocess:Me,subproc:Me,cylinder:$e,db:$e,cyl:$e,database:$e,question:Re,diam:Re,diamond:Re,decision:Re,hexagon:ze,hex:ze,prepare:ze,lean_right:We,"lean-r":We,"lean-right":We,"in-out":We,lean_left:Ue,"lean-l":Ue,"lean-left":Ue,"out-in":Ue,trapezoid:He,"trap-b":He,"trapezoid-bottom":He,priority:He,inv_trapezoid:Ye,"inv-trapezoid":Ye,"trapezoid-top":Ye,"trap-t":Ye,manual:Ye,doublecircle:De,"dbl-circ":De,"double-circle":De,circle:Ee,circ:Ee,rect_left_inv_arrow:Oe,odd:Oe,card:qe,"notched-rectangle":qe,"notch-rect":qe,"lined-rectangle":Ne,"lin-rect":Ne,"lin-proc":Ne,"lined-process":Ne,"shaded-process":Ne,"small-circle":ke,"sm-circ":ke,start:ke,stop:Ce,"framed-circle":Ce,"fr-circ":Ce,join:we,fork:we,comment:Tr,"brace-l":Tr,bolt:br,"com-link":br,"lightning-bolt":br,doc:xr,document:xr,delay:Ze,"half-rounded-rectangle":Ze,"horizontal-cylinder":lr,"h-cyl":lr,das:lr,"lined-cylinder":mr,"lin-cyl":mr,disk:mr,"curved-trapezoid":Xe,"curv-trap":Xe,display:Xe,"divided-rectangle":er,"div-rect":er,"div-proc":er,"divided-process":er,triangle:Ve,tri:Ve,extract:Ve,"window-pane":wr,"win-pane":wr,"internal-storage":wr,"f-circ":kr,junction:kr,"filled-circle":kr,"lin-doc":_r,"lined-document":_r,"notched-pentagon":hr,"notch-pent":hr,"loop-limit":hr,"flipped-triangle":cr,"flip-tri":cr,"manual-file":cr,"sloped-rectangle":Qe,"sl-rect":Qe,"manual-input":Qe,docs:Cr,documents:Cr,"st-doc":Cr,"stacked-document":Cr,processes:pr,procs:pr,"stacked-rectangle":pr,"st-rect":pr,flag:nr,"paper-tape":nr,"bow-tie-rectangle":tr,"bow-rect":tr,"stored-data":tr,"crossed-circle":ir,"cross-circ":ir,summary:ir,"tag-doc":vr,"tagged-document":vr,"tag-rect":dr,"tagged-rectangle":dr,"tag-proc":dr,"tagged-process":dr,hourglass:ur,collate:ur,text:Ke,anchor:je,brace:Tr,labelRect:Ge,"brace-r":Mr,braces:Lr,iconSquare:Fr,iconCircle:$r,icon:Er,iconRounded:Or,imageSquare:Dr},Rr=new Map,Pr=(0,s.K2)((async(t,e,r)=>{let i,n;if("rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),!Ir[e.shape])throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===r.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o),n=await Ir[e.shape](i,e,r)}else n=await Ir[e.shape](t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),Rr.set(e.id,i),e.haveCallback&&Rr.get(e.id).attr("class",Rr.get(e.id).attr("class")+" clickable"),i}),"insertNode"),zr=(0,s.K2)(((t,e)=>{Rr.set(e.id,t)}),"setNodeElem"),Kr=(0,s.K2)((()=>{Rr.clear()}),"clear"),qr=(0,s.K2)((t=>{const e=Rr.get(t.id);s.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode")},1661:(t,e,r)=>{"use strict";r.d(e,{D:()=>o});var i=r(32),n=r(4852),o=(0,i.K2)((t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,n.Ltv)("body");if("sandbox"===e){const e=(0,n.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.Ltv)(i.body)}return r.select(`#${t}`)}),"selectSvgElement")},32:(t,e,r)=>{"use strict";r.d(e,{C0:()=>v,VA:()=>y,K2:()=>g,xA:()=>ct,hH:()=>F,Dl:()=>zt,IU:()=>ee,Wt:()=>Zt,Y2:()=>qt,a$:()=>Wt,sb:()=>Q,ME:()=>de,UI:()=>V,Ch:()=>T,mW:()=>S,DB:()=>w,_3:()=>Bt,EJ:()=>C,m7:()=>oe,iN:()=>ie,zj:()=>lt,D7:()=>ce,Gs:()=>xe,J$:()=>B,ab:()=>se,Q2:()=>at,P$:()=>K,Wi:()=>Pt,H1:()=>yt,Rm:()=>x,QO:()=>$t,Js:()=>me,Xd:()=>A,VJ:()=>Kt,cL:()=>ut,$i:()=>Z,jZ:()=>wt,wZ:()=>nt,EI:()=>ne,SV:()=>re,Nk:()=>st,XV:()=>ue,ke:()=>ae,He:()=>b,UU:()=>it,ot:()=>Ut,mj:()=>fe,tM:()=>Vt,H$:()=>W,B6:()=>ot});var i=r(4353),n=r(1931),o=r(8232);const a=(t,e)=>{const r=n.A.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,o.A)(t,i)};var s=r(5582);const l=(t,e=100)=>{const r=n.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:o,b:a,a:l}=n.A.parse(t),{r:h,g:c,b:u,a:d}=n.A.parse(e),p=r/100,f=2*p-1,g=l-d,y=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,m=1-y,x=i*y+h*m,b=o*y+c*m,k=a*y+u*m,C=l*p+d*(1-p);return(0,s.A)(x,b,k,C)})(r,t,e)};var h,c=r(5263),u=r(8041),d=r(5097),p=r(2838),f=Object.defineProperty,g=(t,e)=>f(t,"name",{value:e,configurable:!0}),y=(t,e)=>{for(var r in e)f(t,r,{get:e[r],enumerable:!0})},m={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},x={trace:g(((...t)=>{}),"trace"),debug:g(((...t)=>{}),"debug"),info:g(((...t)=>{}),"info"),warn:g(((...t)=>{}),"warn"),error:g(((...t)=>{}),"error"),fatal:g(((...t)=>{}),"fatal")},b=g((function(t="fatal"){let e=m.fatal;"string"==typeof t?t.toLowerCase()in m&&(e=m[t]):"number"==typeof t&&(e=t),x.trace=()=>{},x.debug=()=>{},x.info=()=>{},x.warn=()=>{},x.error=()=>{},x.fatal=()=>{},e<=m.fatal&&(x.fatal=console.error?console.error.bind(console,k("FATAL"),"color: orange"):console.log.bind(console,"",k("FATAL"))),e<=m.error&&(x.error=console.error?console.error.bind(console,k("ERROR"),"color: orange"):console.log.bind(console,"",k("ERROR"))),e<=m.warn&&(x.warn=console.warn?console.warn.bind(console,k("WARN"),"color: orange"):console.log.bind(console,"",k("WARN"))),e<=m.info&&(x.info=console.info?console.info.bind(console,k("INFO"),"color: lightblue"):console.log.bind(console,"",k("INFO"))),e<=m.debug&&(x.debug=console.debug?console.debug.bind(console,k("DEBUG"),"color: lightgreen"):console.log.bind(console,"",k("DEBUG"))),e<=m.trace&&(x.trace=console.debug?console.debug.bind(console,k("TRACE"),"color: lightgreen"):console.log.bind(console,"",k("TRACE")))}),"setLogLevel"),k=g((t=>`%c${i().format("ss.SSS")} : ${t} : `),"format"),C=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,w=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_=/\s*%%.*\n/gm,v=class extends Error{static{g(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},S={},T=g((function(t,e){t=t.replace(C,"").replace(w,"").replace(_,"\n");for(const[r,{detector:i}]of Object.entries(S))if(i(t,e))return r;throw new v(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),A=g(((...t)=>{for(const{id:e,detector:r,loader:i}of t)M(e,r,i)}),"registerLazyLoadedDiagrams"),M=g(((t,e,r)=>{S[t]&&x.warn(`Detector with key ${t} already exists. Overwriting.`),S[t]={detector:e,loader:r},x.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),B=g((t=>S[t].loader),"getDiagramLoader"),L=g(((t,e,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>L(t,e,n))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(i||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=L(t[n],e[n],{depth:r-1,clobber:i}))})),t)}),"assignWithDepth"),F=L,$="#ffffff",E="#f2f2f2",D=g(((t,e)=>a(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),O=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||D(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||D(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||D(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||l(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||l(this.tertiaryColor),this.lineColor=this.lineColor||l(this.background),this.arrowheadColor=this.arrowheadColor||l(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,c.A)(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||(0,c.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||l(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},I=g((t=>{const e=new O;return e.calculate(t),e}),"getThemeVariables"),R=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=l(this.background),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(l("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,c.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,c.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,u.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=(0,u.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=(0,u.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=this.darkTextColor,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=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},P=g((t=>{const e=new R;return e.calculate(t),e}),"getThemeVariables"),z=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=a(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="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.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,s.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,c.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,c.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},K=g((t=>{const e=new z;return e.calculate(t),e}),"getThemeVariables"),q=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,u.A)("#cde498",10),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.primaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,c.A)(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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,c.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,c.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},N=g((t=>{const e=new q;return e.calculate(t),e}),"getThemeVariables"),j=class{static{g(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.primaryColor,this.darkMode),this.secondaryBorderColor=D(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=D(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,u.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.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 t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},W={base:{getThemeVariables:I},dark:{getThemeVariables:P},default:{getThemeVariables:K},forest:{getThemeVariables:N},neutral:{getThemeVariables:g((t=>{const e=new j;return e.calculate(t),e}),"getThemeVariables")}},U={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},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},H={...U,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:W.default.getThemeVariables(),sequence:{...U.sequence,messageFont:g((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:g((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:g((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},gantt:{...U.gantt,tickInterval:void 0,useWidth:void 0},c4:{...U.c4,useWidth:void 0,personFont:g((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:g((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:g((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:g((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:g((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:g((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:g((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:g((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:g((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:g((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:g((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:g((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:g((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:g((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:g((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:g((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:g((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:g((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:g((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:g((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:g((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:g((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...U.pie,useWidth:984},xyChart:{...U.xyChart,useWidth:void 0},requirement:{...U.requirement,useWidth:void 0},packet:{...U.packet}},Y=g(((t,e="")=>Object.keys(t).reduce(((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Y(t[i],"")]:[...r,e+i]),[])),"keyify"),G=new Set(Y(H,"")),V=H,Z=g((t=>{if(x.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>Z(t)));else{for(const e of Object.keys(t)){if(x.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!G.has(e)||null==t[e]){x.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){x.debug("sanitizing object",e),Z(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(x.debug("sanitizing css option",e),t[e]=X(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}x.debug("After sanitization",t)}}),"sanitizeDirective"),X=g((t=>{let e=0,r=0;for(const i of t){if(e{let r=F({},t),i={};for(const t of e)ht(t),i=F(i,t);if(r=F(r,i),i.theme&&i.theme in W){const t=F({},h),e=F(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in W&&(r.themeVariables=W[r.theme].getThemeVariables(e))}return gt(et=r),et}),"updateCurrentConfig"),it=g((t=>(J=F({},Q),J=F(J,t),t.theme&&W[t.theme]&&(J.themeVariables=W[t.theme].getThemeVariables(t.themeVariables)),rt(J,tt),J)),"setSiteConfig"),nt=g((t=>{h=F({},t)}),"saveConfigFromInitialize"),ot=g((t=>(J=F(J,t),rt(J,tt),J)),"updateSiteConfig"),at=g((()=>F({},J)),"getSiteConfig"),st=g((t=>(gt(t),F(et,t),lt())),"setConfig"),lt=g((()=>F({},et)),"getConfig"),ht=g((t=>{t&&(["secure",...J.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(x.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&ht(t[e])})))}),"sanitize"),ct=g((t=>{Z(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),tt.push(t),rt(J,tt)}),"addDirective"),ut=g(((t=J)=>{rt(t,tt=[])}),"reset"),dt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},pt={},ft=g((t=>{pt[t]||(x.warn(dt[t]),pt[t]=!0)}),"issueWarning"),gt=g((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ft("LAZY_LOAD_DEPRECATED")}),"checkConfig"),yt=//gi,mt=g((t=>t?At(t).replace(/\\n/g,"#br#").split("#br#"):[""]),"getRows"),xt=(()=>{let t=!1;return()=>{t||(bt(),t=!0)}})();function bt(){const t="data-temp-href-target";p.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),p.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}g(bt,"setupDompurifyHooks");var kt=g((t=>(xt(),p.sanitize(t))),"removeScript"),Ct=g(((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=kt(t):"loose"!==r&&(t=(t=(t=At(t)).replace(//g,">")).replace(/=/g,"="),t=Tt(t))}return t}),"sanitizeMore"),wt=g(((t,e)=>t?t=e.dompurifyConfig?p.sanitize(Ct(t,e),e.dompurifyConfig).toString():p.sanitize(Ct(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),_t=g(((t,e)=>"string"==typeof t?wt(t,e):t.flat().map((t=>wt(t,e)))),"sanitizeTextOrArray"),vt=g((t=>yt.test(t)),"hasBreaks"),St=g((t=>t.split(yt)),"splitBreaks"),Tt=g((t=>t.replace(/#br#/g,"
")),"placeholderToBreak"),At=g((t=>t.replace(yt,"#br#")),"breakToPlaceholder"),Mt=g((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),Bt=g((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Lt=g((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Ft=g((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),$t=g((function(t){const e=t.split(/(,)/),r=[];for(let t=0;t0&&t+1Math.max(0,t.split(e).length-1)),"countOccurrence"),Dt=g(((t,e)=>{const r=Et(t,"~"),i=Et(e,"~");return 1===r&&1===i}),"shouldCombineSets"),Ot=g((t=>{const e=Et(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),o=i.lastIndexOf("~");for(;-1!==n&&-1!==o&&n!==o;)i[n]="<",i[o]=">",n=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")}),"processSet"),It=g((()=>void 0!==window.MathMLElement),"isMathMLSupported"),Rt=/\$\$(.*)\$\$/g,Pt=g((t=>(t.match(Rt)?.length??0)>0),"hasKatex"),zt=g((async(t,e)=>{t=await Kt(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n}),"calculateMathMLDimensions"),Kt=g((async(t,e)=>{if(!Pt(t))return t;if(!(It()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Rt,"MathML is unsupported in this environment.");const{default:i}=await r.e(130).then(r.bind(r,2130)),n=e.forceLegacyMathML||!It()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(yt).map((t=>Pt(t)?`
${t}
`:`
${t}
`)).join("").replace(Rt,((t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,"")))}),"renderKatex"),qt={getRows:mt,sanitizeText:wt,sanitizeTextOrArray:_t,hasBreaks:vt,splitBreaks:St,lineBreakRegex:yt,removeScript:kt,getUrl:Mt,evaluate:Bt,getMax:Lt,getMin:Ft},Nt=g((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),jt=g((function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i}),"calculateSvgSizeAttrs"),Wt=g((function(t,e,r,i){const n=jt(e,r,i);Nt(t,n)}),"configureSvgSize"),Ut=g((function(t,e,r,i){const n=e.node().getBBox(),o=n.width,a=n.height;x.info(`SVG bounds: ${o}x${a}`,n);let s=0,l=0;x.info(`Graph bounds: ${s}x${l}`,t),s=o+2*r,l=a+2*r,x.info(`Calculated bounds: ${s}x${l}`),Wt(e,l,s,i);const h=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",h)}),"setupGraphViewbox"),Ht={},Yt=g(((t,e,r)=>{let i="";return t in Ht&&Ht[t]?i=Ht[t](r):x.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`}),"getStyles"),Gt=g(((t,e)=>{void 0!==e&&(Ht[t]=e)}),"addStylesForDiagram"),Vt=Yt,Zt={};y(Zt,{clear:()=>ee,getAccDescription:()=>oe,getAccTitle:()=>ie,getDiagramTitle:()=>se,setAccDescription:()=>ne,setAccTitle:()=>re,setDiagramTitle:()=>ae});var Xt="",Qt="",Jt="",te=g((t=>wt(t,lt())),"sanitizeText"),ee=g((()=>{Xt="",Jt="",Qt=""}),"clear"),re=g((t=>{Xt=te(t).replace(/^\s+/g,"")}),"setAccTitle"),ie=g((()=>Xt),"getAccTitle"),ne=g((t=>{Jt=te(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),oe=g((()=>Jt),"getAccDescription"),ae=g((t=>{Qt=te(t)}),"setDiagramTitle"),se=g((()=>Qt),"getDiagramTitle"),le=x,he=b,ce=lt,ue=st,de=Q,pe=g((t=>wt(t,ce())),"sanitizeText"),fe=Ut,ge=g((()=>Zt),"getCommonDb"),ye={},me=g(((t,e,r)=>{ye[t]&&le.warn(`Diagram with id ${t} already registered. Overwriting.`),ye[t]=e,r&&M(t,r),Gt(t,e.styles),e.injectUtils?.(le,he,ce,pe,fe,ge(),(()=>{}))}),"registerDiagram"),xe=g((t=>{if(t in ye)return ye[t];throw new be(t)}),"getDiagram"),be=class extends Error{static{g(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},5522:(t,e,r)=>{"use strict";r.d(e,{$C:()=>A,$t:()=>j,C4:()=>U,I5:()=>N,Ib:()=>g,Sm:()=>H,Un:()=>O,_K:()=>W,bH:()=>$,dq:()=>K,pe:()=>l,rY:()=>Y,ru:()=>D,sM:()=>S,vU:()=>p,yT:()=>B});var i=r(32),n=r(6750),o=r(4852),a=r(6632),s=r(7222),l="​",h={curveBasis:o.qrM,curveBasisClosed:o.Yu4,curveBasisOpen:o.IA3,curveBumpX:o.Wi0,curveBumpY:o.PGM,curveBundle:o.OEq,curveCardinalClosed:o.olC,curveCardinalOpen:o.IrU,curveCardinal:o.y8u,curveCatmullRomClosed:o.Q7f,curveCatmullRomOpen:o.cVp,curveCatmullRom:o.oDi,curveLinear:o.lUB,curveLinearClosed:o.Lx9,curveMonotoneX:o.nVG,curveMonotoneY:o.uxU,curveNatural:o.Xf2,curveStep:o.GZz,curveStepAfter:o.UPb,curveStepBefore:o.dyv},c=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,u=(0,i.K2)((function(t,e){const r=d(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const t=r.map((t=>t.args));(0,i.$i)(t),n=(0,i.hH)(n,[...t])}else n=r.args;if(!n)return;let o=(0,i.Ch)(t,e);const a="config";return void 0!==n[a]&&("flowchart-v2"===o&&(o="flowchart"),n[o]=n[a],delete n[a]),n}),"detectInit"),d=(0,i.K2)((function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${c.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),i.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(n=i.DB.exec(t));)if(n.index===i.DB.lastIndex&&i.DB.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return i.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),p=(0,i.K2)((function(t){return t.replace(i.DB,"")}),"removeDirectives"),f=(0,i.K2)((function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1}),"isSubstringInArray");function g(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return h[r]??e}function y(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,n.J)(r):r}(0,i.K2)(g,"interpolateToCurve"),(0,i.K2)(y,"formatUrl");var m=(0,i.K2)(((t,...e)=>{const r=t.split("."),n=r.length-1,o=r[n];let a=window;for(let e=0;e{r+=x(t,e),e=t})),w(t,r/2)}function k(t){return 1===t.length?t[0]:b(t)}(0,i.K2)(x,"distance"),(0,i.K2)(b,"traverseEdge"),(0,i.K2)(k,"calcLabelPosition");var C=(0,i.K2)(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),w=(0,i.K2)(((t,e)=>{let r,i=e;for(const e of t){if(r){const t=x(e,r);if(t=1)return{x:e.x,y:e.y};if(n>0&&n<1)return{x:C((1-n)*r.x+n*e.x,5),y:C((1-n)*r.y+n*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),_=(0,i.K2)(((t,e,r)=>{i.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=w(e,25),o=t?10:5,a=Math.atan2(e[0].y-n.y,e[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(a)*o+(e[0].x+n.x)/2,s.y=-Math.cos(a)*o+(e[0].y+n.y)/2,s}),"calcCardinalityPosition");function v(t,e,r){const n=structuredClone(r);i.Rm.info("our points",n),"start_left"!==e&&"start_right"!==e&&n.reverse();const o=w(n,25+t),a=10+.5*t,s=Math.atan2(n[0].y-o.y,n[0].x-o.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*a+(n[0].x+o.x)/2,l.y=-Math.cos(s+Math.PI)*a+(n[0].y+o.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*a+(n[0].x+o.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(n[0].y+o.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*a+(n[0].x+o.x)/2-5,l.y=-Math.cos(s)*a+(n[0].y+o.y)/2-5):(l.x=Math.sin(s)*a+(n[0].x+o.x)/2,l.y=-Math.cos(s)*a+(n[0].y+o.y)/2),l}function S(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,i.K2)(v,"calcTerminalLabelPosition"),(0,i.K2)(S,"getStylesFromArray");var T=0,A=(0,i.K2)((()=>(T++,"id-"+Math.random().toString(36).substr(2,12)+"-"+T)),"generateId");function M(t){let e="";for(let r=0;rM(t.length)),"random"),L=(0,i.K2)((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"),F=(0,i.K2)((function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,n]=N(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",n),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o}),"drawSimpleText"),$=(0,a.A)(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),i.Y2.lineBreakRegex.test(t))return t;const n=t.split(" ").filter(Boolean),o=[];let a="";return n.forEach(((t,i)=>{const s=O(`${t} `,r),l=O(a,r);if(s>e){const{hyphenatedStrings:i,remainingWord:n}=E(t,e,"-",r);o.push(a,...i),a=n}else l+s>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");i+1===n.length&&o.push(a)})),o.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),E=(0,a.A)(((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],o=[];let a="";return n.forEach(((t,s)=>{const l=`${a}${t}`;if(O(l,i)>=e){const t=s+1,e=n.length===t,i=`${l}${r}`;o.push(e?l:i),a=""}else a=l})),{hyphenatedStrings:o,remainingWord:a}}),((t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`));function D(t,e){return R(t,e).height}function O(t,e){return R(t,e).width}(0,i.K2)(D,"calculateTextHeight"),(0,i.K2)(O,"calculateTextWidth");var I,R=(0,a.A)(((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=N(r),h=["sans-serif",n],c=t.split(i.Y2.lineBreakRegex),u=[],d=(0,o.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const t of h){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of c){const n=L();n.text=i||l;const o=F(p,n).style("font-size",s).style("font-weight",a).style("font-family",t),h=(o._groups||o)[0][0].getBBox();if(0===h.width&&0===h.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,h.width)),e=Math.round(h.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}u.push(r)}return p.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),P=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,i.K2)(this,"InitIDGenerator")}},z=(0,i.K2)((function(t){return I=I||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),I.innerHTML=t,unescape(I.textContent)}),"entityDecode");function K(t){return"str"in t}(0,i.K2)(K,"isDetailedError");var q=(0,i.K2)(((t,e,r,i)=>{if(!i)return;const n=t.node()?.getBBox();n&&t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),N=(0,i.K2)((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function j(t,e){return(0,s.A)({},t,e)}(0,i.K2)(j,"cleanAndMerge");var W={assignWithDepth:i.hH,wrapLabel:$,calculateTextHeight:D,calculateTextWidth:O,calculateTextDimensions:R,cleanAndMerge:j,detectInit:u,detectDirective:d,isSubstringInArray:f,interpolateToCurve:g,calcLabelPosition:k,calcCardinalityPosition:_,calcTerminalLabelPosition:v,formatUrl:y,getStylesFromArray:S,generateId:A,random:B,runFunc:m,entityDecode:z,insertTitle:q,parseFontSize:N,InitIDGenerator:P},U=(0,i.K2)((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),H=(0,i.K2)((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Y=(0,i.K2)(((t,e,{counter:r=0,prefix:i,suffix:n})=>`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`),"getEdgeId")},5388:(t,e,r)=>{"use strict";r.d(e,{XX:()=>h,q7:()=>c,sO:()=>l});var i=r(3256),n=r(5522),o=r(32),a={common:o.Y2,getConfig:o.zj,insertCluster:i.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:i.on,interpolateToCurve:n.Ib,labelHelper:i.Zk,log:o.Rm,positionEdgeLabel:i.T_},s={},l=(0,o.K2)((t=>{for(const e of t)s[e.name]=e}),"registerLayoutLoaders");(0,o.K2)((()=>{l([{name:"dagre",loader:(0,o.K2)((async()=>await Promise.all([r.e(913),r.e(567),r.e(501)]).then(r.bind(r,501))),"loader")}])}),"registerDefaultLayoutLoaders")();var h=(0,o.K2)((async(t,e)=>{if(!(t.layoutAlgorithm in s))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=s[t.layoutAlgorithm];return(await r.loader()).render(t,e,a,{algorithm:r.algorithm})}),"render"),c=(0,o.K2)(((t="",{fallback:e="dagre"}={})=>{if(t in s)return t;if(e in s)return o.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm")},2382:(t,e,r)=>{"use strict";r.d(e,{W6:()=>Tt,GZ:()=>Lt,hE:()=>Bt});var i=r(5522),n=r(32),o=r(4852);let a={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function s(t){a=t}const l=/[&<>"']/,h=new RegExp(l.source,"g"),c=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,u=new RegExp(c.source,"g"),d={"&":"&","<":"<",">":">",'"':""","'":"'"},p=t=>d[t];function f(t,e){if(e){if(l.test(t))return t.replace(h,p)}else if(c.test(t))return t.replace(u,p);return t}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,y=/(^|[^\[])\^/g;function m(t,e){let r="string"==typeof t?t:t.source;e=e||"";const i={replace:(t,e)=>{let n="string"==typeof e?e:e.source;return n=n.replace(y,"$1"),r=r.replace(t,n),i},getRegex:()=>new RegExp(r,e)};return i}function x(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const b={exec:()=>null};function k(t,e){const r=t.replace(/\|/g,((t,e,r)=>{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"})).split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:C(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e){const r=t.match(/^(\s+)(?:```)/);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=C(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:C(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=C(e[0],"\n").split("\n"),r="",i="";const n=[];for(;t.length>0;){let e=!1;const o=[];let a;for(a=0;a/.test(t[a]))o.push(t[a]),e=!0;else{if(e)break;o.push(t[a])}t=t.slice(a);const s=o.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;const h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,n,!0),this.lexer.state.top=h,0===t.length)break;const c=n[n.length-1];if("code"===c?.type)break;if("blockquote"===c?.type){const e=c,o=e.raw+"\n"+t.join("\n"),a=this.blockquote(o);n[n.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,i=i.substring(0,i.length-e.text.length)+a.text;break}if("list"!==c?.type);else{const e=c,o=e.raw+"\n"+t.join("\n"),a=this.list(o);n[n.length-1]=a,r=r.substring(0,r.length-c.raw.length)+a.raw,i=i.substring(0,i.length-e.raw.length)+a.raw,t=o.substring(n[n.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const o=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let a=!1;for(;t;){let r=!1,i="",s="";if(!(e=o.exec(t)))break;if(this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),h=t.split("\n",1)[0],c=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):c?u=e[1].length+1:(u=e[2].search(/[^ ]/),u=u>4?1:u,s=l.slice(u),u+=e[1].length),c&&/^ *$/.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){const e=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;t;){const a=t.split("\n",1)[0];if(h=a,this.options.pedantic&&(h=h.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),n.test(h))break;if(o.test(h))break;if(e.test(h))break;if(r.test(t))break;if(h.search(/[^ ]/)>=u||!h.trim())s+="\n"+h.slice(u);else{if(c)break;if(l.search(/[^ ]/)>=4)break;if(n.test(l))break;if(o.test(l))break;if(r.test(l))break;s+="\n"+h}c||h.trim()||(c=!0),i+=a+"\n",t=t.substring(a.length+1),l=h.slice(u)}}n.loose||(a?n.loose=!0:/\n *\n *$/.test(i)&&(a=!0));let d,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,""))),n.items.push({type:"list_item",raw:i,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),n.raw+=i}n.items[n.items.length-1].raw=n.items[n.items.length-1].raw.trimEnd(),n.items[n.items.length-1].text=n.items[n.items.length-1].text.trimEnd(),n.raw=n.raw.trimEnd();for(let t=0;t"space"===t.type)),r=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));n.loose=r}if(n.loose)for(let t=0;t$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const r=k(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),n=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const t of i)/^ *-+: *$/.test(t)?o.align.push("right"):/^ *:-+: *$/.test(t)?o.align.push("center"):/^ *:-+ *$/.test(t)?o.align.push("left"):o.align.push(null);for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]}))));return o}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:f(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;const e=C(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^$/.test(t)?r.slice(1):r.slice(1,-1)),w(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return w(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(i&&(!i[3]||!r.match(/[\p{L}\p{N}]/u))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...i[0]].length-1;let n,o,a=r,s=0;const l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(i=l.exec(e));){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n)continue;if(o=[...n].length,i[3]||i[4]){a+=o;continue}if((i[5]||i[6])&&r%3&&!((r+o)%3)){s+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+s);const e=[...i[0]][0].length,l=t.slice(0,r+i.index+e+o);if(Math.min(r,o)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=f(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=f(e[1]),r="mailto:"+t):(t=f(e[1]),r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=f(e[0]),r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=f(e[0]),r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:f(e[0]),{type:"text",raw:e[0],text:t}}}}const v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,S=/(?:[*+-]|\d{1,9}[.)])/,T=m(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,S).replace(/blockCode/g,/ {4}/).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/).getRegex(),A=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,M=/(?!\s*\])(?:\\.|[^\[\]\\])+/,B=m(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",M).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),L=m(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,S).getRegex(),F="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",$=/|$))/,E=m("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",$).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),D=m(A).replace("hr",v).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),O={blockquote:m(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",D).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:B,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:v,html:E,lheading:T,list:L,newline:/^(?: *(?:\n|$))+/,paragraph:D,table:b,text:/^[^\n]+/},I=m("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),R={...O,table:I,paragraph:m(A).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",I).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex()},P={...O,html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",$).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:b,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(A).replace("hr",v).replace("heading"," *#{1,6} *[^\n]").replace("lheading",T).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},z=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,K=/^( {2,}|\\)\n(?!\s*$)/,q="\\p{P}\\p{S}",N=m(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,q).getRegex(),j=m(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,q).getRegex(),W=m("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,q).getRegex(),U=m("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,q).getRegex(),H=m(/\\([punct])/,"gu").replace(/punct/g,q).getRegex(),Y=m(/^<(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(),G=m($).replace("(?:--\x3e|$)","--\x3e").getRegex(),V=m("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",G).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X=m(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q=m(/^!?\[(label)\]\[(ref)\]/).replace("label",Z).replace("ref",M).getRegex(),J=m(/^!?\[(ref)\](?:\[\])?/).replace("ref",M).getRegex(),tt={_backpedal:b,anyPunctuation:H,autolink:Y,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:K,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:b,emStrongLDelim:j,emStrongRDelimAst:W,emStrongRDelimUnd:U,escape:z,link:X,nolink:J,punctuation:N,reflink:Q,reflinkSearch:m("reflink|nolink(?!\\()","g").replace("reflink",Q).replace("nolink",J).getRegex(),tag:V,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\e+" ".repeat(r.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))))if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),1===i.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(i);else if(i=this.tokenizer.code(t))t=t.substring(i.raw.length),n=e[e.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?e.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.list(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.html(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.def(t))t=t.substring(i.raw.length),n=e[e.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.lheading(t))t=t.substring(i.raw.length),e.push(i);else{if(o=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startBlock.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(o=t.substring(0,e+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o)))n=e[e.length-1],r&&"paragraph"===n?.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);else if(i=this.tokenizer.text(t))t=t.substring(i.raw.length),n=e[e.length-1],n&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,n,o,a,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.emStrong(t,l,s))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.autolink(t))t=t.substring(r.raw.length),e.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(t))){if(n=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startInline.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(n))t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),a=!0,i=e[e.length-1],i&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(r.raw.length),e.push(r);return e}}class st{options;parser;constructor(t){this.options=t||a}space(t){return""}code({text:t,lang:e,escaped:r}){const i=(e||"").match(/^\S*/)?.[0],n=t.replace(/\n$/,"")+"\n";return i?'
'+(r?n:f(n,!0))+"
\n":"
"+(r?n:f(n,!0))+"
\n"}blockquote({tokens:t}){return`
\n${this.parser.parse(t)}
\n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
\n"}list(t){const e=t.ordered,r=t.start;let i="";for(let e=0;e\n"+i+"\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",r="";for(let e=0;e${i}`),"\n\n"+e+"\n"+i+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){const i=this.parser.parseInline(r),n=x(t);if(null===n)return i;let o='
    ",o}image({href:t,title:e,text:r}){const i=x(t);if(null===i)return r;let n=`${r}{const n=t[i].flat(1/0);r=r.concat(this.walkTokens(n,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new st(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const i=r;let n=t.renderer[i];t.useNewRenderer||(n=this.#e(n,i,e));const o=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new _(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const i=r,n=t.tokenizer[i],o=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new ct;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if("options"===r)continue;const i=r,n=t.hooks[i],o=e[i];ct.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async)return Promise.resolve(n.call(e,t)).then((t=>o.call(e,t)));const r=n.call(e,t);return o.call(e,r)}:e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}})),this}#e(t,e,r){switch(e){case"heading":return function(i){return i.type&&i.type===e?t.call(this,r.parser.parseInline(i.tokens),i.depth,function(t){return t.replace(g,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}(r.parser.parseInline(i.tokens,r.parser.textRenderer))):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let i="",n="";for(let t=0;t0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,o),a+=this.listitem({type:"list_item",raw:s,text:s,task:n,checked:!!i,loose:o,tokens:e.tokens})}return t.call(this,a,i,n)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return at.lex(t,e??this.defaults)}parser(t,e){return ht.parse(t,e??this.defaults)}#t(t,e){return(r,i)=>{const n={...i},o={...this.defaults,...n};!0===this.defaults.async&&!1===n.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const a=this.#r(!!o.silent,!!o.async);if(null==r)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)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.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then((e=>t(e,o))).then((t=>o.hooks?o.hooks.processAllTokens(t):t)).then((t=>o.walkTokens?Promise.all(this.walkTokens(t,o.walkTokens)).then((()=>t)):t)).then((t=>e(t,o))).then((t=>o.hooks?o.hooks.postprocess(t):t)).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let i=t(r,o);o.hooks&&(i=o.hooks.processAllTokens(i)),o.walkTokens&&this.walkTokens(i,o.walkTokens);let n=e(i,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(t){return a(t)}}}#r(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="

    An error occurred:

    "+f(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function dt(t,e){return ut.parse(t,e)}dt.options=dt.setOptions=function(t){return ut.setOptions(t),dt.defaults=ut.defaults,s(dt.defaults),dt},dt.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},dt.defaults=a,dt.use=function(...t){return ut.use(...t),dt.defaults=ut.defaults,s(dt.defaults),dt},dt.walkTokens=function(t,e){return ut.walkTokens(t,e)},dt.parseInline=ut.parseInline,dt.Parser=ht,dt.parser=ht.parse,dt.Renderer=st,dt.TextRenderer=lt,dt.Lexer=at,dt.lexer=at.lex,dt.Tokenizer=_,dt.Hooks=ct,dt.parse=dt,dt.options,dt.setOptions,dt.use,dt.walkTokens,dt.parseInline,ht.parse,at.lex;var pt=r(513);function ft(t,{markdownAutoWrap:e}){const r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n"),i=(0,pt.T)(r);return!1===e?i.replace(/ /g," "):i}function gt(t,e={}){const r=ft(t,e),i=dt.lexer(r),o=[[]];let a=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach(((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach((t=>{t&&o[a].push({content:t,type:e})}))})):"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{s(e,t.type)})):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return(0,n.K2)(s,"processNode"),i.forEach((t=>{"paragraph"===t.type?t.tokens?.forEach((t=>{s(t)})):"html"===t.type&&o[a].push({content:t.text,type:"normal"})})),o}function yt(t,{markdownAutoWrap:e}={}){const r=dt.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(i).join("")}`:"em"===t.type?`${t.tokens?.map(i).join("")}`:"paragraph"===t.type?`

    ${t.tokens?.map(i).join("")}

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:`Unsupported markdown: ${t.type}`}return(0,n.K2)(i,"output"),r.map(i).join("")}function mt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function xt(t,e){return bt(t,[],mt(e.content),e.type)}function bt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...o]=r,a=[...e,n];return t([{content:a.join(""),type:i}])?bt(t,a,o,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function kt(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return Ct(t,e)}function Ct(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());const o=t.shift()??{content:" ",type:"normal"},a=[...i];if(""!==n&&a.push({content:n,type:"normal"}),a.push(o),e(a))return Ct(t,e,r,a);if(i.length>0)r.push(i),t.unshift(o);else if(o.content){const[i,n]=xt(e,o);r.push([i]),n.content&&t.unshift(n)}return Ct(t,e,r)}function wt(t,e){e&&t.attr("style",e)}async function _t(t,e,r,i,o=!1){const a=t.append("foreignObject");a.attr("width",10*r+"px"),a.attr("height",10*r+"px");const s=a.append("xhtml:div");let l=e.label;e.label&&(0,n.Wi)(e.label)&&(l=await(0,n.VJ)(e.label.replace(n.Y2.lineBreakRegex,"\n"),(0,n.D7)()));const h=e.isNode?"nodeLabel":"edgeLabel",c=s.append("span");c.html(l),wt(c,e.labelStyle),c.attr("class",`${h} ${i}`),wt(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),a.node()}function vt(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function St(t,e,r){const i=t.append("text"),n=vt(i,1,e);Mt(n,r);const o=n.node().getComputedTextLength();return i.remove(),o}function Tt(t,e,r){const i=t.append("text"),n=vt(i,1,e);Mt(n,[{content:r,type:"normal"}]);const o=n.node()?.getBoundingClientRect();return o&&i.remove(),o}function At(t,e,r,i=!1){const o=e.append("g"),a=o.insert("rect").attr("class","background").attr("style","stroke: none"),s=o.append("text").attr("y","-10.1");let l=0;for(const e of r){const r=(0,n.K2)((e=>St(o,1.1,e)<=t),"checkWidth"),i=r(e)?[e]:kt(e,r);for(const t of i)Mt(vt(s,l,1.1),t),l++}if(i){const t=s.node().getBBox(),e=2;return a.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),o.node()}return s.node()}function Mt(t,e){t.text(""),e.forEach(((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)}))}function Bt(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>``))}(0,n.K2)(ft,"preprocessMarkdown"),(0,n.K2)(gt,"markdownToLines"),(0,n.K2)(yt,"markdownToHTML"),(0,n.K2)(mt,"splitTextToChars"),(0,n.K2)(xt,"splitWordToFitWidth"),(0,n.K2)(bt,"splitWordToFitWidthRecursion"),(0,n.K2)(kt,"splitLineToFitWidth"),(0,n.K2)(Ct,"splitLineToFitWidthRecursion"),(0,n.K2)(wt,"applyStyle"),(0,n.K2)(_t,"addHtmlSpan"),(0,n.K2)(vt,"createTspan"),(0,n.K2)(St,"computeWidthOfText"),(0,n.K2)(Tt,"computeDimensionOfText"),(0,n.K2)(At,"createFormattedText"),(0,n.K2)(Mt,"updateTextContentAndStyles"),(0,n.K2)(Bt,"replaceIconSubstring");var Lt=(0,n.K2)((async(t,e="",{style:r="",isTitle:a=!1,classes:s="",useHtmlLabels:l=!0,isNode:h=!0,width:c=200,addSvgBackground:u=!1}={},d)=>{if(n.Rm.debug("XYZ createText",e,r,a,s,l,h,"addSvgBackground: ",u),l){const o=yt(e,d),a=Bt((0,i.Sm)(o)),l=e.replace(/\\\\/g,"\\"),p={isNode:h,label:(0,n.Wi)(e)?l:a,labelStyle:r.replace("fill:","color:")};return await _t(t,p,c,s,u)}{const i=At(c,t,gt(e.replace(//g,"
    ").replace("
    ","
    "),d),!!e&&u);if(h){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,o.Ltv)(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,o.Ltv)(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,o.Ltv)(i).select("text").attr("style",e)}return i}}),"createText")}},i={};function n(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return r[t].call(o.exports,o,o.exports,n),o.exports}n.m=r,n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.f={},n.e=t=>Promise.all(Object.keys(n.f).reduce(((e,r)=>(n.f[r](t,e),e)),[])),n.u=t=>"js/"+t+"-"+{3:"bc686a20",4:"934f5a40",70:"826e03f2",81:"3a33b512",130:"395cb664",165:"ccff0039",223:"a5ce106a",258:"c1edc5c0",265:"4e4c541c",317:"0413318d",334:"f60074e8",344:"91b41751",382:"2d69f8f9",387:"3546ecdc",452:"e65d6d68",501:"f9886899",564:"301f7508",567:"38dd778c",573:"ba5e956a",590:"754a9e66",604:"d2d497f5",663:"31678b4b",670:"2fb0c100",674:"17bd4f73",720:"970f726e",723:"47eb515a",731:"7b5d66f3",805:"68e3b42f",826:"2ac63153",862:"ff5166f8",890:"c9907c95",907:"a936ddbe",911:"59f72ec0",913:"4409c8d7",932:"3e97de09",998:"31a2dbbe"}[t]+".chunk.min.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="geekdoc:",n.l=(r,i,o,a)=>{if(t[r])t[r].push(i);else{var s,l;if(void 0!==o)for(var h=document.getElementsByTagName("script"),c=0;c{s.onerror=s.onload=null,clearTimeout(p);var n=t[r];if(delete t[r],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((t=>t(i))),e)return e(i)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=r[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"})(),(()=>{var t={304:0};n.f.j=(e,r)=>{var i=n.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise(((r,n)=>i=t[e]=[r,n]));r.push(i[2]=o);var a=n.p+n.u(e),s=new Error;n.l(a,(r=>{if(n.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+e,e)}};var e=(e,r)=>{var i,o,[a,s,l]=r,h=0;if(a.some((e=>0!==t[e]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);l&&l(n)}for(e&&e(r);h{"use strict";var t=n(7148);const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var r,i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var a=[],s=0;s<256;++s)a.push((s+256).toString(16).slice(1));const l=function(t,r,i){if(e.randomUUID&&!r&&!t)return e.randomUUID();var n=(t=t||{}).random||(t.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,r){i=i||0;for(var s=0;s<16;++s)r[i+s]=n[s];return r}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(n)},h="auto";var c=n(1417),u=n(5388),d=(n(3256),n(8568)),p=(n(7750),n(2382),n(5522)),f=n(1132),g=n(1661),y=n(32),m=n(513),x=n(4852),b="comm",k="rule",C="decl",w=Math.abs,_=String.fromCharCode;function v(t){return t.trim()}function S(t,e,r){return t.replace(e,r)}function T(t,e,r){return t.indexOf(e,r)}function A(t,e){return 0|t.charCodeAt(e)}function M(t,e,r){return t.slice(e,r)}function B(t){return t.length}function L(t,e){return e.push(t),t}function F(t,e){for(var r="",i=0;i0?A(P,--I):0,D--,10===R&&(D=1,E--),R}function q(){return R=I2||U(R)>3?"":" "}function G(t,e){for(;--e&&q()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return W(t,j()+(e<6&&32==N()&&32==q()))}function V(t){for(;q();)switch(R){case t:return I;case 34:case 39:34!==t&&39!==t&&V(R);break;case 40:41===t&&V(t);break;case 92:q()}return I}function Z(t,e){for(;q()&&t+R!==57&&(t+R!==84||47!==N()););return"/*"+W(e,I-1)+"*"+_(47===t?t:q())}function X(t){for(;!U(N());)q();return W(t,I)}function Q(t){return function(t){return P="",t}(J("",null,null,null,[""],t=function(t){return E=D=1,O=B(P=t),I=0,[]}(t),0,[0],t))}function J(t,e,r,i,n,o,a,s,l){for(var h=0,c=0,u=a,d=0,p=0,f=0,g=1,y=1,m=1,x=0,b="",k=n,C=o,v=i,F=b;y;)switch(f=x,x=q()){case 40:if(108!=f&&58==A(F,u-1)){-1!=T(F+=S(H(x),"&","&\f"),"&\f",w(h?s[h-1]:0))&&(m=-1);break}case 34:case 39:case 91:F+=H(x);break;case 9:case 10:case 13:case 32:F+=Y(f);break;case 92:F+=G(j()-1,7);continue;case 47:switch(N()){case 42:case 47:L(et(Z(q(),j()),e,r,l),l),5!=U(f||1)&&5!=U(N()||1)||!B(F)||" "===M(F,-1,void 0)||(F+=" ");break;default:F+="/"}break;case 123*g:s[h++]=B(F)*m;case 125*g:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+c:-1==m&&(F=S(F,/\f/g,"")),p>0&&(B(F)-u||0===g&&47===f)&&L(p>32?rt(F+";",i,r,u-1,l):rt(S(F," ","")+";",i,r,u-2,l),l);break;case 59:F+=";";default:if(L(v=tt(F,e,r,h,c,n,s,b,k=[],C=[],u,o),o),123===x)if(0===c)J(F,e,v,v,k,o,u,s,C);else switch(99===d&&110===A(F,3)?100:d){case 100:case 108:case 109:case 115:J(t,v,v,i&&L(tt(t,v,v,0,0,n,s,b,n,k=[],u,C),C),n,C,u,s,i?k:C);break;default:J(F,v,v,v,[""],C,0,s,C)}}h=c=p=0,g=m=1,b=F="",u=a;break;case 58:u=1+B(F),p=f;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==K())continue;switch(F+=_(x),x*g){case 38:m=c>0?1:(F+="\f",-1);break;case 44:s[h++]=(B(F)-1)*m,m=1;break;case 64:45===N()&&(F+=H(q())),d=N(),c=u=B(b=F+=X(j())),x++;break;case 45:45===f&&2==B(F)&&(g=0)}}return o}function tt(t,e,r,i,n,o,a,s,l,h,c,u){for(var d=n-1,p=0===n?o:[""],f=function(t){return t.length}(p),g=0,y=0,m=0;g0?p[x]+" "+b:S(b,/&\f/g,p[x])))&&(l[m++]=C);return z(t,e,r,0===n?k:s,l,h,c,u)}function et(t,e,r,i){return z(t,e,r,b,_(R),M(t,2,-2),0,i)}function rt(t,e,r,i,n){return z(t,e,r,C,M(t,0,i),M(t,i+1,-1),i,n)}var it=n(2838),nt=n(6401),ot={id:"c4",detector:(0,y.K2)((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(826).then(n.bind(n,4826));return{id:"c4",diagram:t}}),"loader")},at="flowchart",st={id:at,detector:(0,y.K2)(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(334).then(n.bind(n,9334));return{id:at,diagram:t}}),"loader")},lt="flowchart-v2",ht={id:lt,detector:(0,y.K2)(((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t))),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(334).then(n.bind(n,9334));return{id:lt,diagram:t}}),"loader")},ct={id:"er",detector:(0,y.K2)((t=>/^\s*erDiagram/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(663)]).then(n.bind(n,4663));return{id:"er",diagram:t}}),"loader")},ut="gitGraph",dt={id:ut,detector:(0,y.K2)((t=>/^\s*gitGraph/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(911)]).then(n.bind(n,4911));return{id:ut,diagram:t}}),"loader")},pt="gantt",ft={id:pt,detector:(0,y.K2)((t=>/^\s*gantt/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(564).then(n.bind(n,2564));return{id:pt,diagram:t}}),"loader")},gt="info",yt={id:gt,detector:(0,y.K2)((t=>/^\s*info/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(81)]).then(n.bind(n,3081));return{id:gt,diagram:t}}),"loader")},mt={id:"pie",detector:(0,y.K2)((t=>/^\s*pie/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(223)]).then(n.bind(n,3223));return{id:"pie",diagram:t}}),"loader")},xt="quadrantChart",bt={id:xt,detector:(0,y.K2)((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(674).then(n.bind(n,7674));return{id:xt,diagram:t}}),"loader")},kt="xychart",Ct={id:kt,detector:(0,y.K2)((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(344).then(n.bind(n,9344));return{id:kt,diagram:t}}),"loader")},wt="requirement",_t={id:wt,detector:(0,y.K2)((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(573)]).then(n.bind(n,6573));return{id:wt,diagram:t}}),"loader")},vt="sequence",St={id:vt,detector:(0,y.K2)((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(382).then(n.bind(n,1));return{id:vt,diagram:t}}),"loader")},Tt="class",At={id:Tt,detector:(0,y.K2)(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(805),n.e(998)]).then(n.bind(n,4998));return{id:Tt,diagram:t}}),"loader")},Mt="classDiagram",Bt={id:Mt,detector:(0,y.K2)(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(670),n.e(805),n.e(265)]).then(n.bind(n,1265));return{id:Mt,diagram:t}}),"loader")},Lt="state",Ft={id:Lt,detector:(0,y.K2)(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(3),n.e(590)]).then(n.bind(n,4590));return{id:Lt,diagram:t}}),"loader")},$t="stateDiagram",Et={id:$t,detector:(0,y.K2)(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(3),n.e(932)]).then(n.bind(n,1932));return{id:$t,diagram:t}}),"loader")},Dt="journey",Ot={id:Dt,detector:(0,y.K2)((t=>/^\s*journey/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(862).then(n.bind(n,1481));return{id:Dt,diagram:t}}),"loader")},It={draw:(0,y.K2)(((t,e,r)=>{y.Rm.debug("rendering svg for syntax error\n");const i=(0,g.D)(e),n=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,y.a$)(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)}),"draw")},Rt=It,Pt={db:{},renderer:It,parser:{parse:(0,y.K2)((()=>{}),"parse")}},zt="flowchart-elk",Kt={id:zt,detector:(0,y.K2)(((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(334).then(n.bind(n,9334));return{id:zt,diagram:t}}),"loader")},qt="timeline",Nt={id:qt,detector:(0,y.K2)((t=>/^\s*timeline/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(4).then(n.bind(n,3004));return{id:qt,diagram:t}}),"loader")},jt="mindmap",Wt={id:jt,detector:(0,y.K2)((t=>/^\s*mindmap/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(165),n.e(258)]).then(n.bind(n,7258));return{id:jt,diagram:t}}),"loader")},Ut="sankey",Ht={id:Ut,detector:(0,y.K2)((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await n.e(317).then(n.bind(n,8317));return{id:Ut,diagram:t}}),"loader")},Yt="packet",Gt={id:Yt,detector:(0,y.K2)((t=>/^\s*packet-beta/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(907)]).then(n.bind(n,6907));return{id:Yt,diagram:t}}),"loader")},Vt="block",Zt={id:Vt,detector:(0,y.K2)((t=>/^\s*block-beta/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(670),n.e(70)]).then(n.bind(n,4070));return{id:Vt,diagram:t}}),"loader")},Xt="architecture",Qt={id:Xt,detector:(0,y.K2)((t=>/^\s*architecture/.test(t)),"detector"),loader:(0,y.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(165),n.e(604)]).then(n.bind(n,3604));return{id:Xt,diagram:t}}),"loader")},Jt=!1,te=(0,y.K2)((()=>{Jt||(Jt=!0,(0,y.Js)("error",Pt,(t=>"error"===t.toLowerCase().trim())),(0,y.Js)("---",{db:{clear:(0,y.K2)((()=>{}),"clear")},styles:{},renderer:{draw:(0,y.K2)((()=>{}),"draw")},parser:{parse:(0,y.K2)((()=>{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:(0,y.K2)((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),(0,y.Xd)(ot,Bt,At,ct,ft,yt,mt,_t,St,Kt,ht,st,Wt,Nt,dt,Et,Ft,Ot,bt,Ht,Gt,Ct,Zt,Qt))}),"addDiagrams"),ee=(0,y.K2)((async()=>{y.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(y.mW).map((async([t,{detector:e,loader:r}])=>{if(r)try{(0,y.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,y.Js)(i,t,e)}catch(e){throw y.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete y.mW[t],e}}})))).filter((t=>"rejected"===t.status));if(t.length>0){y.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)y.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams"),re="graphics-document document";function ie(t,e){t.attr("role",re),""!==e&&t.attr("aria-roledescription",e)}function ne(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,y.K2)(ie,"setA11yDiagramInfo"),(0,y.K2)(ne,"addSVGa11yTitleDescription");var oe=class t{constructor(t,e,r,i,n){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=n}static{(0,y.K2)(this,"Diagram")}static async fromText(e,r={}){const i=(0,y.zj)(),n=(0,y.Ch)(e,i);e=(0,p.C4)(e)+"\n";try{(0,y.Gs)(n)}catch{const t=(0,y.J$)(n);if(!t)throw new y.C0(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();(0,y.Js)(e,r)}const{db:o,parser:a,renderer:s,init:l}=(0,y.Gs)(n);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(e),new t(n,e,o,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},ae=[],se=(0,y.K2)((()=>{ae.forEach((t=>{t()})),ae=[]}),"attachFunctions"),le=(0,y.K2)((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function he(t){const e=t.match(y.EJ);if(!e)return{text:t,metadata:{}};let r=(0,c.H)(e[1],{schema:c.r})??{};r="object"!=typeof r||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:t.slice(e[0].length),metadata:i}}(0,y.K2)(he,"extractFrontMatter");var ce=(0,y.K2)((t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),ue=(0,y.K2)((t=>{const{text:e,metadata:r}=he(t),{displayMode:i,title:n,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:n,config:o,text:e}}),"processFrontmatter"),de=(0,y.K2)((t=>{const e=p._K.detectInit(t)??{},r=p._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===r?.type&&(e.wrap=!0),{text:(0,p.vU)(t),directive:e}}),"processDirectives");function pe(t){const e=ce(t),r=ue(e),i=de(r.text),n=(0,p.$t)(r.config,i.directive);return{code:t=le(i.text),title:r.title,config:n}}function fe(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}(0,y.K2)(pe,"preprocessDiagram"),(0,y.K2)(fe,"toBase64");var ge=["foreignobject"],ye=["dominant-baseline"];function me(t){const e=pe(t);return(0,y.cL)(),(0,y.xA)(e.config??{}),e}async function xe(t,e){te();try{const{code:e,config:r}=me(t);return{diagramType:(await Be(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,y.K2)(me,"processAndSetConfigs"),(0,y.K2)(xe,"parse");var be=(0,y.K2)(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),ke=(0,y.K2)(((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const i=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{(0,nt.A)(t.styles)||i.forEach((e=>{r+=be(t.id,e,t.styles)})),(0,nt.A)(t.textStyles)||(r+=be(t.id,"tspan",(t?.textStyles||[]).map((t=>t.replace("color","fill")))))}))}return r}),"createCssStyles"),Ce=(0,y.K2)(((t,e,r,i)=>{const n=ke(t,r);return F(Q(`${i}{${(0,y.tM)(e,n,t.themeVariables)}}`),$)}),"createUserStyles"),we=(0,y.K2)(((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,p.Sm)(i),i=i.replace(/
    /g,"
    "),i}),"cleanUpSvgCode"),_e=(0,y.K2)(((t="",e)=>``),"putIntoIFrame"),ve=(0,y.K2)(((t,e,r,i,n)=>{const o=t.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&a.attr("xmlns:xlink",n),a.append("g"),t}),"appendDivSvgG");function Se(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,y.K2)(Se,"sandboxedIframe");var Te=(0,y.K2)(((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()}),"removeExistingElements"),Ae=(0,y.K2)((async function(t,e,r){te();const i=me(e);e=i.code;const n=(0,y.zj)();y.Rm.debug(n),e.length>(n?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+t,a="i"+t,s="#"+a,l="d"+t,h="#"+l,c=(0,y.K2)((()=>{const t=d?s:h,e=(0,x.Ltv)(t).node();e&&"remove"in e&&e.remove()}),"removeTempElements");let u=(0,x.Ltv)("body");const d="sandbox"===n.securityLevel,p="loose"===n.securityLevel,g=n.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),d){const t=Se((0,x.Ltv)(r),a);u=(0,x.Ltv)(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=(0,x.Ltv)(r);ve(u,t,l,`font-family: ${g}`,"http://www.w3.org/1999/xlink")}else{if(Te(document,t,l,a),d){const t=Se((0,x.Ltv)("body"),a);u=(0,x.Ltv)(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=(0,x.Ltv)("body");ve(u,t,l)}let m,b;try{m=await oe.fromText(e,{title:i.title})}catch(t){if(n.suppressErrorRendering)throw c(),t;m=await oe.fromText("error"),b=t}const k=u.select(h).node(),C=m.type,w=k.firstChild,_=w.firstChild,v=m.renderer.getClasses?.(e,m),S=Ce(n,C,v,o),T=document.createElement("style");T.innerHTML=S,w.insertBefore(T,_);try{await m.renderer.draw(e,t,f.r,m)}catch(r){throw n.suppressErrorRendering?c():Rt.draw(e,t,f.r),r}const A=u.select(`${h} svg`),M=m.db.getAccTitle?.(),B=m.db.getAccDescription?.();Le(C,A,M,B),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=u.select(h).node().innerHTML;if(y.Rm.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),L=we(L,d,(0,y._3)(n.arrowMarkerAbsolute)),d){const t=u.select(h+" svg").node();L=_e(L,t)}else p||(L=it.sanitize(L,{ADD_TAGS:ge,ADD_ATTR:ye}));if(se(),b)throw b;return c(),{diagramType:C,svg:L,bindFunctions:m.db.bindFunctions}}),"render");function Me(t={}){const e=(0,y.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,y.wZ)(e),e?.theme&&e.theme in y.H$?e.themeVariables=y.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=y.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,y.UU)(e):(0,y.Q2)();(0,y.He)(r.logLevel),te()}(0,y.K2)(Me,"initialize");var Be=(0,y.K2)(((t,e={})=>{const{code:r}=pe(t);return oe.fromText(r,e)}),"getDiagramFromText");function Le(t,e,r,i){ie(e,t),ne(e,r,i,e.attr("id"))}(0,y.K2)(Le,"addA11yInfo");var Fe=Object.freeze({render:Ae,parse:xe,getDiagramFromText:Be,initialize:Me,getConfig:y.zj,setConfig:y.Nk,getSiteConfig:y.Q2,updateSiteConfig:y.B6,reset:(0,y.K2)((()=>{(0,y.cL)()}),"reset"),globalReset:(0,y.K2)((()=>{(0,y.cL)(y.sb)}),"globalReset"),defaultConfig:y.sb});(0,y.He)((0,y.zj)().logLevel),(0,y.cL)((0,y.zj)());var $e=(0,y.K2)(((t,e,r)=>{y.Rm.warn(t),(0,p.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))}),"handleError"),Ee=(0,y.K2)((async function(t={querySelector:".mermaid"}){try{await De(t)}catch(e){if((0,p.dq)(e)&&y.Rm.error(e.str),Ue.parseError&&Ue.parseError(e),!t.suppressErrors)throw y.Rm.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),De=(0,y.K2)((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Fe.getConfig();let n;if(y.Rm.debug((t?"":"No ")+"Callback function found"),r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}y.Rm.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(y.Rm.debug("Start On Load: "+i?.startOnLoad),Fe.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new p._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const s=[];for(const e of Array.from(n)){if(y.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${o.next()}`;a=e.innerHTML,a=(0,m.T)(p._K.entityDecode(a)).trim().replace(//gi,"
    ");const i=p._K.detectInit(a);i&&y.Rm.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:n}=await We(r,a,e);e.innerHTML=i,t&&await t(r),n&&n(e)}catch(t){$e(t,s,Ue.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),Oe=(0,y.K2)((function(t){Fe.initialize(t)}),"initialize"),Ie=(0,y.K2)((async function(t,e,r){y.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Oe(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Ee(i)}),"init"),Re=(0,y.K2)((async(t,{lazyLoad:e=!0}={})=>{te(),(0,y.Xd)(...t),!1===e&&await ee()}),"registerExternalDiagrams"),Pe=(0,y.K2)((function(){if(Ue.startOnLoad){const{startOnLoad:t}=Fe.getConfig();t&&Ue.run().catch((t=>y.Rm.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Pe,!1);var ze=(0,y.K2)((function(t){Ue.parseError=t}),"setParseErrorHandler"),Ke=[],qe=!1,Ne=(0,y.K2)((async()=>{if(!qe){for(qe=!0;Ke.length>0;){const t=Ke.shift();if(t)try{await t()}catch(t){y.Rm.error("Error executing queue",t)}}qe=!1}}),"executeQueue"),je=(0,y.K2)((async(t,e)=>new Promise(((r,i)=>{const n=(0,y.K2)((()=>new Promise(((n,o)=>{Fe.parse(t,e).then((t=>{n(t),r(t)}),(t=>{y.Rm.error("Error parsing",t),Ue.parseError?.(t),o(t),i(t)}))}))),"performCall");Ke.push(n),Ne().catch(i)}))),"parse"),We=(0,y.K2)(((t,e,r)=>new Promise(((i,n)=>{const o=(0,y.K2)((()=>new Promise(((o,a)=>{Fe.render(t,e,r).then((t=>{o(t),i(t)}),(t=>{y.Rm.error("Error parsing",t),Ue.parseError?.(t),a(t),n(t)}))}))),"performCall");Ke.push(o),Ne().catch(n)}))),"render"),Ue={startOnLoad:!0,mermaidAPI:Fe,parse:je,render:We,init:Ie,run:Ee,registerExternalDiagrams:Re,registerLayoutLoaders:u.sO,initialize:Oe,parseError:void 0,contentLoaded:Pe,setParseErrorHandler:ze,detectType:y.Ch,registerIconPacks:d.pC},He=Ue;document.addEventListener("DOMContentLoaded",(function(){let e=t.namespace("hugo-geekdoc").get("color-theme")||h,r=window.matchMedia("(prefers-color-scheme: dark)"),i=!1,n="default";("dark"===e||e===h&&r.matches)&&(i=!0,n="dark"),He.initialize({startOnLoad:!1,flowchart:{useMaxWidth:!0},theme:n,themeVariables:{darkMode:i}}),document.querySelectorAll(".mermaid").forEach((function(t){let e="graph-"+l();He.render(e,t.innerText).then((({svg:e,bindFunctions:r})=>{t.innerHTML=e,r?.(t)}))}))}))})()})(); \ No newline at end of file diff --git a/js/mermaid-73641aad.bundle.min.js.LICENSE.txt b/js/mermaid-3292ee5a.bundle.min.js.LICENSE.txt similarity index 58% rename from js/mermaid-73641aad.bundle.min.js.LICENSE.txt rename to js/mermaid-3292ee5a.bundle.min.js.LICENSE.txt index 9274d3b..04660fd 100644 --- a/js/mermaid-73641aad.bundle.min.js.LICENSE.txt +++ b/js/mermaid-3292ee5a.bundle.min.js.LICENSE.txt @@ -1 +1,7 @@ /*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */ + +/*! Bundled license information: + +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) +*/ diff --git a/js/mermaid-73641aad.bundle.min.js b/js/mermaid-73641aad.bundle.min.js deleted file mode 100644 index c02428a..0000000 --- a/js/mermaid-73641aad.bundle.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see mermaid-73641aad.bundle.min.js.LICENSE.txt */ -(()=>{var t,e,r={9119:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},6750:(t,e,r)=>{"use strict";e.J=void 0;var i=r(9119);function n(t){try{return decodeURIComponent(t)}catch(e){return t}}e.J=function(t){if(!t)return i.BLANK_URL;var e,r,o=n(t.trim());do{e=(o=n(o=(r=o,r.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,(function(t,e){return String.fromCharCode(e)}))).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||o.match(i.htmlEntitiesRegex)||o.match(i.htmlCtrlEntityRegex)||o.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=o;if(!a)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var s=a.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return a;var c=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(c))return i.BLANK_URL;var h=s.replace(/\\/g,"/");if("mailto:"===c||c.includes("://"))return h;if("http:"===c||"https:"===c){if(!function(t){return URL.canParse(t)}(h))return i.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h}},4353:function(t){t.exports=function(){"use strict";var t=6e4,e=36e5,r="millisecond",i="second",n="minute",o="hour",a="day",s="week",l="month",c="quarter",h="year",u="date",d="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},y=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},m={s:y,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),n=r%60;return(e<=0?"+":"-")+y(i,2,"0")+":"+y(n,2,"0")},m:function t(e,r){if(e.date()1)return t(a[0])}else{var s=e.name;b[s]=e,n=s}return!i&&n&&(x=n),n||!i&&x},w=function(t,e){if(k(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new T(r)},v=m;v.l=_,v.i=k,v.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function g(t){this.$L=_(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[C]=!0}var y=g.prototype;return y.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(p);if(i){var n=i[2]-1||0,o=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(e)}(t),this.init()},y.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},y.$utils=function(){return v},y.isValid=function(){return!(this.$d.toString()===d)},y.isSame=function(t,e){var r=w(t);return this.startOf(e)<=r&&r<=this.endOf(e)},y.isAfter=function(t,e){return w(t)1?r-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:p;e&&e(t,null);let o=i.length;for(;o--;){let e=i[o];if("string"==typeof e){const t=n(e);t!==e&&(r(i)||(i[o]=t),e=t)}t[e]=!0}return t}function T(t){for(let e=0;e/gm),z=a(/\${[\w\W]*}/gm),K=a(/^data-[\-\w.\u00B7-\uFFFF]/),j=a(/^aria-[\-\w]+$/),W=a(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),U=a(/^(?:\w+script|data):/i),H=a(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y=a(/^html$/i),V=a(/^[a-z][.\w]*(-[.\w]+)+$/i);var G=Object.freeze({__proto__:null,MUSTACHE_EXPR:N,ERB_EXPR:q,TMPLIT_EXPR:z,DATA_ATTR:K,ARIA_ATTR:j,IS_ALLOWED_URI:W,IS_SCRIPT_OR_DATA:U,ATTR_WHITESPACE:H,DOCTYPE_NAME:Y,CUSTOM_ELEMENT:V});const Z=1,X=3,Q=7,J=8,tt=9,et=function(){return"undefined"==typeof window?null:window};return function e(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:et();const i=t=>e(t);if(i.version="3.1.6",i.removed=[],!r||!r.document||r.document.nodeType!==tt)return i.isSupported=!1,i;let{document:n}=r;const a=n,l=a.currentScript,{DocumentFragment:c,HTMLTemplateElement:_,Node:w,Element:T,NodeFilter:N,NamedNodeMap:q=r.NamedNodeMap||r.MozNamedAttrMap,HTMLFormElement:z,DOMParser:K,trustedTypes:j}=r,U=T.prototype,H=A(U,"cloneNode"),V=A(U,"remove"),rt=A(U,"nextSibling"),it=A(U,"childNodes"),nt=A(U,"parentNode");if("function"==typeof _){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let ot,at="";const{implementation:st,createNodeIterator:lt,createDocumentFragment:ct,getElementsByTagName:ht}=n,{importNode:ut}=a;let dt={};i.isSupported="function"==typeof t&&"function"==typeof nt&&st&&void 0!==st.createHTMLDocument;const{MUSTACHE_EXPR:pt,ERB_EXPR:ft,TMPLIT_EXPR:gt,DATA_ATTR:yt,ARIA_ATTR:mt,IS_SCRIPT_OR_DATA:xt,ATTR_WHITESPACE:bt,CUSTOM_ELEMENT:Ct}=G;let{IS_ALLOWED_URI:kt}=G,_t=null;const wt=v({},[...M,...B,...L,...E,...O]);let vt=null;const Tt=v({},[...D,...I,...R,...P]);let St=Object.seal(s(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}})),At=null,Mt=null,Bt=!0,Lt=!0,Ft=!1,Et=!0,$t=!1,Ot=!0,Dt=!1,It=!1,Rt=!1,Pt=!1,Nt=!1,qt=!1,zt=!0,Kt=!1,jt=!0,Wt=!1,Ut={},Ht=null;const Yt=v({},["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 Vt=null;const Gt=v({},["audio","video","img","source","image","track"]);let Zt=null;const Xt=v({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qt="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",te="http://www.w3.org/1999/xhtml";let ee=te,re=!1,ie=null;const ne=v({},[Qt,Jt,te],f);let oe=null;const ae=["application/xhtml+xml","text/html"];let se=null,le=null;const ce=n.createElement("form"),he=function(t){return t instanceof RegExp||t instanceof Function},ue=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!le||le!==t){if(t&&"object"==typeof t||(t={}),t=S(t),oe=-1===ae.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,se="application/xhtml+xml"===oe?f:p,_t=b(t,"ALLOWED_TAGS")?v({},t.ALLOWED_TAGS,se):wt,vt=b(t,"ALLOWED_ATTR")?v({},t.ALLOWED_ATTR,se):Tt,ie=b(t,"ALLOWED_NAMESPACES")?v({},t.ALLOWED_NAMESPACES,f):ne,Zt=b(t,"ADD_URI_SAFE_ATTR")?v(S(Xt),t.ADD_URI_SAFE_ATTR,se):Xt,Vt=b(t,"ADD_DATA_URI_TAGS")?v(S(Gt),t.ADD_DATA_URI_TAGS,se):Gt,Ht=b(t,"FORBID_CONTENTS")?v({},t.FORBID_CONTENTS,se):Yt,At=b(t,"FORBID_TAGS")?v({},t.FORBID_TAGS,se):{},Mt=b(t,"FORBID_ATTR")?v({},t.FORBID_ATTR,se):{},Ut=!!b(t,"USE_PROFILES")&&t.USE_PROFILES,Bt=!1!==t.ALLOW_ARIA_ATTR,Lt=!1!==t.ALLOW_DATA_ATTR,Ft=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,$t=t.SAFE_FOR_TEMPLATES||!1,Ot=!1!==t.SAFE_FOR_XML,Dt=t.WHOLE_DOCUMENT||!1,Pt=t.RETURN_DOM||!1,Nt=t.RETURN_DOM_FRAGMENT||!1,qt=t.RETURN_TRUSTED_TYPE||!1,Rt=t.FORCE_BODY||!1,zt=!1!==t.SANITIZE_DOM,Kt=t.SANITIZE_NAMED_PROPS||!1,jt=!1!==t.KEEP_CONTENT,Wt=t.IN_PLACE||!1,kt=t.ALLOWED_URI_REGEXP||W,ee=t.NAMESPACE||te,St=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&he(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(St.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&he(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(St.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(St.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$t&&(Lt=!1),Nt&&(Pt=!0),Ut&&(_t=v({},O),vt=[],!0===Ut.html&&(v(_t,M),v(vt,D)),!0===Ut.svg&&(v(_t,B),v(vt,I),v(vt,P)),!0===Ut.svgFilters&&(v(_t,L),v(vt,I),v(vt,P)),!0===Ut.mathMl&&(v(_t,E),v(vt,R),v(vt,P))),t.ADD_TAGS&&(_t===wt&&(_t=S(_t)),v(_t,t.ADD_TAGS,se)),t.ADD_ATTR&&(vt===Tt&&(vt=S(vt)),v(vt,t.ADD_ATTR,se)),t.ADD_URI_SAFE_ATTR&&v(Zt,t.ADD_URI_SAFE_ATTR,se),t.FORBID_CONTENTS&&(Ht===Yt&&(Ht=S(Ht)),v(Ht,t.FORBID_CONTENTS,se)),jt&&(_t["#text"]=!0),Dt&&v(_t,["html","head","body"]),_t.table&&(v(_t,["tbody"]),delete At.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw k('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ot=t.TRUSTED_TYPES_POLICY,at=ot.createHTML("")}else void 0===ot&&(ot=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const n="dompurify"+(r?"#"+r:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+n+" could not be created."),null}}(j,l)),null!==ot&&"string"==typeof at&&(at=ot.createHTML(""));o&&o(t),le=t}},de=v({},["mi","mo","mn","ms","mtext"]),pe=v({},["foreignobject","annotation-xml"]),fe=v({},["title","style","font","a","script"]),ge=v({},[...B,...L,...F]),ye=v({},[...E,...$]),me=function(t){d(i.removed,{element:t});try{nt(t).removeChild(t)}catch(e){V(t)}},xe=function(t,e){try{d(i.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){d(i.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!vt[t])if(Pt||Nt)try{me(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},be=function(t){let e=null,r=null;if(Rt)t=""+t;else{const e=g(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===oe&&ee===te&&(t=''+t+"");const i=ot?ot.createHTML(t):t;if(ee===te)try{e=(new K).parseFromString(i,oe)}catch(t){}if(!e||!e.documentElement){e=st.createDocument(ee,"template",null);try{e.documentElement.innerHTML=re?at:i}catch(t){}}const o=e.body||e.documentElement;return t&&r&&o.insertBefore(n.createTextNode(r),o.childNodes[0]||null),ee===te?ht.call(e,Dt?"html":"body")[0]:Dt?e.documentElement:o},Ce=function(t){return lt.call(t.ownerDocument||t,t,N.SHOW_ELEMENT|N.SHOW_COMMENT|N.SHOW_TEXT|N.SHOW_PROCESSING_INSTRUCTION|N.SHOW_CDATA_SECTION,null)},ke=function(t){return t instanceof z&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof q)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},_e=function(t){return"function"==typeof w&&t instanceof w},we=function(t,e,r){dt[t]&&h(dt[t],(t=>{t.call(i,e,r,le)}))},ve=function(t){let e=null;if(we("beforeSanitizeElements",t,null),ke(t))return me(t),!0;const r=se(t.nodeName);if(we("uponSanitizeElement",t,{tagName:r,allowedTags:_t}),t.hasChildNodes()&&!_e(t.firstElementChild)&&C(/<[/\w]/g,t.innerHTML)&&C(/<[/\w]/g,t.textContent))return me(t),!0;if(t.nodeType===Q)return me(t),!0;if(Ot&&t.nodeType===J&&C(/<[/\w]/g,t.data))return me(t),!0;if(!_t[r]||At[r]){if(!At[r]&&Se(r)){if(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,r))return!1;if(St.tagNameCheck instanceof Function&&St.tagNameCheck(r))return!1}if(jt&&!Ht[r]){const e=nt(t)||t.parentNode,r=it(t)||t.childNodes;if(r&&e)for(let i=r.length-1;i>=0;--i){const n=H(r[i],!0);n.__removalCount=(t.__removalCount||0)+1,e.insertBefore(n,rt(t))}}return me(t),!0}return t instanceof T&&!function(t){let e=nt(t);e&&e.tagName||(e={namespaceURI:ee,tagName:"template"});const r=p(t.tagName),i=p(e.tagName);return!!ie[t.namespaceURI]&&(t.namespaceURI===Jt?e.namespaceURI===te?"svg"===r:e.namespaceURI===Qt?"svg"===r&&("annotation-xml"===i||de[i]):Boolean(ge[r]):t.namespaceURI===Qt?e.namespaceURI===te?"math"===r:e.namespaceURI===Jt?"math"===r&&pe[i]:Boolean(ye[r]):t.namespaceURI===te?!(e.namespaceURI===Jt&&!pe[i])&&!(e.namespaceURI===Qt&&!de[i])&&!ye[r]&&(fe[r]||!ge[r]):!("application/xhtml+xml"!==oe||!ie[t.namespaceURI]))}(t)?(me(t),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!C(/<\/no(script|embed|frames)/i,t.innerHTML)?($t&&t.nodeType===X&&(e=t.textContent,h([pt,ft,gt],(t=>{e=y(e,t," ")})),t.textContent!==e&&(d(i.removed,{element:t.cloneNode()}),t.textContent=e)),we("afterSanitizeElements",t,null),!1):(me(t),!0)},Te=function(t,e,r){if(zt&&("id"===e||"name"===e)&&(r in n||r in ce))return!1;if(Lt&&!Mt[e]&&C(yt,e));else if(Bt&&C(mt,e));else if(!vt[e]||Mt[e]){if(!(Se(t)&&(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,t)||St.tagNameCheck instanceof Function&&St.tagNameCheck(t))&&(St.attributeNameCheck instanceof RegExp&&C(St.attributeNameCheck,e)||St.attributeNameCheck instanceof Function&&St.attributeNameCheck(e))||"is"===e&&St.allowCustomizedBuiltInElements&&(St.tagNameCheck instanceof RegExp&&C(St.tagNameCheck,r)||St.tagNameCheck instanceof Function&&St.tagNameCheck(r))))return!1}else if(Zt[e]);else if(C(kt,y(r,bt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==m(r,"data:")||!Vt[t])if(Ft&&!C(xt,y(r,bt,"")));else if(r)return!1;return!0},Se=function(t){return"annotation-xml"!==t&&g(t,Ct)},Ae=function(t){we("beforeSanitizeAttributes",t,null);const{attributes:e}=t;if(!e)return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt};let n=e.length;for(;n--;){const o=e[n],{name:a,namespaceURI:s,value:l}=o,c=se(a);let d="value"===a?l:x(l);if(r.attrName=c,r.attrValue=d,r.keepAttr=!0,r.forceKeepAttr=void 0,we("uponSanitizeAttribute",t,r),d=r.attrValue,Ot&&C(/((--!?|])>)|<\/(style|title)/i,d)){xe(a,t);continue}if(r.forceKeepAttr)continue;if(xe(a,t),!r.keepAttr)continue;if(!Et&&C(/\/>/i,d)){xe(a,t);continue}$t&&h([pt,ft,gt],(t=>{d=y(d,t," ")}));const p=se(t.nodeName);if(Te(p,c,d)){if(!Kt||"id"!==c&&"name"!==c||(xe(a,t),d="user-content-"+d),ot&&"object"==typeof j&&"function"==typeof j.getAttributeType)if(s);else switch(j.getAttributeType(p,c)){case"TrustedHTML":d=ot.createHTML(d);break;case"TrustedScriptURL":d=ot.createScriptURL(d)}try{s?t.setAttributeNS(s,a,d):t.setAttribute(a,d),ke(t)?me(t):u(i.removed)}catch(t){}}}we("afterSanitizeAttributes",t,null)},Me=function t(e){let r=null;const i=Ce(e);for(we("beforeSanitizeShadowDOM",e,null);r=i.nextNode();)we("uponSanitizeShadowNode",r,null),ve(r)||(r.content instanceof c&&t(r.content),Ae(r));we("afterSanitizeShadowDOM",e,null)};return i.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,n=null,o=null,s=null;if(re=!t,re&&(t="\x3c!--\x3e"),"string"!=typeof t&&!_e(t)){if("function"!=typeof t.toString)throw k("toString is not a function");if("string"!=typeof(t=t.toString()))throw k("dirty is not a string, aborting")}if(!i.isSupported)return t;if(It||ue(e),i.removed=[],"string"==typeof t&&(Wt=!1),Wt){if(t.nodeName){const e=se(t.nodeName);if(!_t[e]||At[e])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof w)r=be("\x3c!----\x3e"),n=r.ownerDocument.importNode(t,!0),n.nodeType===Z&&"BODY"===n.nodeName||"HTML"===n.nodeName?r=n:r.appendChild(n);else{if(!Pt&&!$t&&!Dt&&-1===t.indexOf("<"))return ot&&qt?ot.createHTML(t):t;if(r=be(t),!r)return Pt?null:qt?at:""}r&&Rt&&me(r.firstChild);const l=Ce(Wt?t:r);for(;o=l.nextNode();)ve(o)||(o.content instanceof c&&Me(o.content),Ae(o));if(Wt)return t;if(Pt){if(Nt)for(s=ct.call(r.ownerDocument);r.firstChild;)s.appendChild(r.firstChild);else s=r;return(vt.shadowroot||vt.shadowrootmode)&&(s=ut.call(a,s,!0)),s}let u=Dt?r.outerHTML:r.innerHTML;return Dt&&_t["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&C(Y,r.ownerDocument.doctype.name)&&(u="\n"+u),$t&&h([pt,ft,gt],(t=>{u=y(u,t," ")})),ot&&qt?ot.createHTML(u):u},i.setConfig=function(){ue(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),It=!0},i.clearConfig=function(){le=null,It=!1},i.isValidAttribute=function(t,e,r){le||ue({});const i=se(t),n=se(e);return Te(i,n,r)},i.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],d(dt[t],e))},i.removeHook=function(t){if(dt[t])return u(dt[t])},i.removeHooks=function(t){dt[t]&&(dt[t]=[])},i.removeAllHooks=function(){dt={}},i}()}()},7148:function(t){!function(e,r){var i={version:"2.14.3",areas:{},apis:{},nsdelim:".",inherit:function(t,e){for(var r in t)e.hasOwnProperty(r)||Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));return e},stringify:function(t,e){return void 0===t||"function"==typeof t?t+"":JSON.stringify(t,e||i.replace)},parse:function(t,e){try{return JSON.parse(t,e||i.revive)}catch(e){return t}},fn:function(t,e){for(var r in i.storeAPI[t]=e,i.apis)i.apis[r][t]=e},get:function(t,e){return t.getItem(e)},set:function(t,e,r){t.setItem(e,r)},remove:function(t,e){t.removeItem(e)},key:function(t,e){return t.key(e)},length:function(t){return t.length},clear:function(t){t.clear()},Store:function(t,e,r){var n=i.inherit(i.storeAPI,(function(t,e,r){return 0===arguments.length?n.getAll():"function"==typeof e?n.transact(t,e,r):void 0!==e?n.set(t,e,r):"string"==typeof t||"number"==typeof t?n.get(t):"function"==typeof t?n.each(t):t?n.setAll(t,e):n.clear()}));n._id=t;try{var o="__store2_test";e.setItem(o,"ok"),n._area=e,e.removeItem(o)}catch(t){n._area=i.storage("fake")}return n._ns=r||"",i.areas[t]||(i.areas[t]=n._area),i.apis[n._ns+n._id]||(i.apis[n._ns+n._id]=n),n},storeAPI:{area:function(t,e){var r=this[t];return r&&r.area||(r=i.Store(t,e,this._ns),this[t]||(this[t]=r)),r},namespace:function(t,e,r){if(r=r||this._delim||i.nsdelim,!t)return this._ns?this._ns.substring(0,this._ns.length-r.length):"";var n=t,o=this[n];if(!(o&&o.namespace||((o=i.Store(this._id,this._area,this._ns+n+r))._delim=r,this[n]||(this[n]=o),e)))for(var a in i.areas)o.area(a,i.areas[a]);return o},isFake:function(t){return t?(this._real=this._area,this._area=i.storage("fake")):!1===t&&(this._area=this._real||this._area),"fake"===this._area.name},toString:function(){return"store"+(this._ns?"."+this.namespace():"")+"["+this._id+"]"},has:function(t){return this._area.has?this._area.has(this._in(t)):!!(this._in(t)in this._area)},size:function(){return this.keys().length},each:function(t,e){for(var r=0,n=i.length(this._area);ri.length(this._area)&&(n--,r--)}return e||this},keys:function(t){return this.each((function(t,e,r){r.push(t)}),t||[])},get:function(t,e){var r,n=i.get(this._area,this._in(t));return"function"==typeof e&&(r=e,e=null),null!==n?i.parse(n,r):null!=e?e:n},getAll:function(t){return this.each((function(t,e,r){r[t]=e}),t||{})},transact:function(t,e,r){var i=this.get(t,r),n=e(i);return this.set(t,void 0===n?i:n),this},set:function(t,e,r){var n,o=this.get(t);return null!=o&&!1===r?e:("function"==typeof r&&(n=r,r=void 0),i.set(this._area,this._in(t),i.stringify(e,n),r)||o)},setAll:function(t,e){var r,i;for(var n in t)i=t[n],this.set(n,i,e)!==i&&(r=!0);return r},add:function(t,e,r){var n=this.get(t);if(n instanceof Array)e=n.concat(e);else if(null!==n){var o=typeof n;if(o===typeof e&&"object"===o){for(var a in e)n[a]=e[a];e=n}else e=n+e}return i.set(this._area,this._in(t),i.stringify(e,r)),e},remove:function(t,e){var r=this.get(t,e);return i.remove(this._area,this._in(t)),r},clear:function(){return this._ns?this.each((function(t){i.remove(this._area,this._in(t))}),1):i.clear(this._area),this},clearAll:function(){var t=this._area;for(var e in i.areas)i.areas.hasOwnProperty(e)&&(this._area=i.areas[e],this.clear());return this._area=t,this},_in:function(t){return"string"!=typeof t&&(t=i.stringify(t)),this._ns?this._ns+t:t},_out:function(t){return this._ns?t&&0===t.indexOf(this._ns)?t.substring(this._ns.length):void 0:t}},storage:function(t){return i.inherit(i.storageAPI,{items:{},name:t})},storageAPI:{length:0,has:function(t){return this.items.hasOwnProperty(t)},key:function(t){var e=0;for(var r in this.items)if(this.has(r)&&t===e++)return r},setItem:function(t,e){this.has(t)||this.length++,this.items[t]=e},removeItem:function(t){this.has(t)&&(delete this.items[t],this.length--)},getItem:function(t){return this.has(t)?this.items[t]:null},clear:function(){for(var t in this.items)this.removeItem(t)}}},n=i.Store("local",function(){try{return localStorage}catch(t){}}());n.local=n,n._=i,n.area("session",function(){try{return sessionStorage}catch(t){}}()),n.area("page",i.storage("page")),"function"==typeof r&&void 0!==r.amd?r("store2",[],(function(){return n})):t.exports?t.exports=n:(e.store&&(i.conflict=e.store),e.store=n)}(this,this&&this.define)},513:(t,e,r)=>{"use strict";function i(t){for(var e=[],r=1;ri})},4852:(t,e,r)=>{"use strict";function i(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r=n)&&(r=n)}return r}function n(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function o(t){return t}r.d(e,{JLW:()=>ja,l78:()=>x,tlR:()=>m,qrM:()=>rs,Yu4:()=>ns,IA3:()=>as,Wi0:()=>ls,PGM:()=>cs,OEq:()=>us,y8u:()=>fs,olC:()=>ys,IrU:()=>xs,oDi:()=>ks,Q7f:()=>ws,cVp:()=>Ts,lUB:()=>Ha,Lx9:()=>As,nVG:()=>Ds,uxU:()=>Is,Xf2:()=>Ns,GZz:()=>zs,UPb:()=>js,dyv:()=>Ks,bEH:()=>ei,n8j:()=>Ga,T9B:()=>i,jkA:()=>n,rLf:()=>Qa,WH:()=>li,m4Y:()=>Xi,UMr:()=>si,w7C:()=>fa,zt:()=>ga,Ltv:()=>ya,UAC:()=>fn,DCK:()=>Hn,TUC:()=>wn,Agd:()=>dn,t6C:()=>ln,wXd:()=>hn,ABi:()=>bn,Ui6:()=>$n,rGn:()=>vn,ucG:()=>cn,YPH:()=>xn,Mol:()=>_n,PGu:()=>Cn,GuW:()=>kn});var a=1,s=2,l=3,c=4,h=1e-6;function u(t){return"translate("+t+",0)"}function d(t){return"translate(0,"+t+")"}function p(t){return e=>+t(e)}function f(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function g(){return!this.__axis}function y(t,e){var r=[],i=null,n=null,y=6,m=6,x=3,b="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,C=t===a||t===c?-1:1,k=t===c||t===s?"x":"y",_=t===a||t===l?u:d;function w(u){var d=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,w=null==n?e.tickFormat?e.tickFormat.apply(e,r):o:n,v=Math.max(y,0)+x,T=e.range(),S=+T[0]+b,A=+T[T.length-1]+b,M=(e.bandwidth?f:p)(e.copy(),b),B=u.selection?u.selection():u,L=B.selectAll(".domain").data([null]),F=B.selectAll(".tick").data(d,e).order(),E=F.exit(),$=F.enter().append("g").attr("class","tick"),O=F.select("line"),D=F.select("text");L=L.merge(L.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),F=F.merge($),O=O.merge($.append("line").attr("stroke","currentColor").attr(k+"2",C*y)),D=D.merge($.append("text").attr("fill","currentColor").attr(k,C*v).attr("dy",t===a?"0em":t===l?"0.71em":"0.32em")),u!==B&&(L=L.transition(u),F=F.transition(u),O=O.transition(u),D=D.transition(u),E=E.transition(u).attr("opacity",h).attr("transform",(function(t){return isFinite(t=M(t))?_(t+b):this.getAttribute("transform")})),$.attr("opacity",h).attr("transform",(function(t){var e=this.parentNode.__axis;return _((e&&isFinite(e=e(t))?e:M(t))+b)}))),E.remove(),L.attr("d",t===c||t===s?m?"M"+C*m+","+S+"H"+b+"V"+A+"H"+C*m:"M"+b+","+S+"V"+A:m?"M"+S+","+C*m+"V"+b+"H"+A+"V"+C*m:"M"+S+","+b+"H"+A),F.attr("opacity",1).attr("transform",(function(t){return _(M(t)+b)})),O.attr(k+"2",C*y),D.attr(k,C*v).text(w),B.filter(g).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===s?"start":t===c?"end":"middle"),B.each((function(){this.__axis=M}))}return w.scale=function(t){return arguments.length?(e=t,w):e},w.ticks=function(){return r=Array.from(arguments),w},w.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),w):r.slice()},w.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),w):i&&i.slice()},w.tickFormat=function(t){return arguments.length?(n=t,w):n},w.tickSize=function(t){return arguments.length?(y=m=+t,w):y},w.tickSizeInner=function(t){return arguments.length?(y=+t,w):y},w.tickSizeOuter=function(t){return arguments.length?(m=+t,w):m},w.tickPadding=function(t){return arguments.length?(x=+t,w):x},w.offset=function(t){return arguments.length?(b=+t,w):b},w}function m(t){return y(a,t)}function x(t){return y(l,t)}function b(){}function C(t){return null==t?b:function(){return this.querySelector(t)}}function k(){return[]}function _(t){return null==t?k:function(){return this.querySelectorAll(t)}}function w(t){return function(){return this.matches(t)}}function v(t){return function(e){return e.matches(t)}}var T=Array.prototype.find;function S(){return this.firstElementChild}var A=Array.prototype.filter;function M(){return Array.from(this.children)}function B(t){return new Array(t.length)}function L(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function F(t,e,r,i,n,o){for(var a,s=0,l=e.length,c=o.length;se?1:t>=e?0:NaN}L.prototype={constructor:L,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var I="http://www.w3.org/1999/xhtml";const R={svg:"http://www.w3.org/2000/svg",xhtml:I,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function P(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),R.hasOwnProperty(e)?{space:R[e],local:t}:t}function N(t){return function(){this.removeAttribute(t)}}function q(t){return function(){this.removeAttributeNS(t.space,t.local)}}function z(t,e){return function(){this.setAttribute(t,e)}}function K(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function j(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function W(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function U(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function H(t){return function(){this.style.removeProperty(t)}}function Y(t,e,r){return function(){this.style.setProperty(t,e,r)}}function V(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function G(t,e){return t.style.getPropertyValue(e)||U(t).getComputedStyle(t,null).getPropertyValue(e)}function Z(t){return function(){delete this[t]}}function X(t,e){return function(){this[t]=e}}function Q(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function J(t){return t.trim().split(/^|\s+/)}function tt(t){return t.classList||new et(t)}function et(t){this._node=t,this._names=J(t.getAttribute("class")||"")}function rt(t,e){for(var r=tt(t),i=-1,n=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var At=[null];function Mt(t,e){this._groups=t,this._parents=e}function Bt(){return new Mt([[document.documentElement]],At)}Mt.prototype=Bt.prototype={constructor:Mt,select:function(t){"function"!=typeof t&&(t=C(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n=k&&(k=C+1);!(b=m[k])&&++k=0;)(i=n[o])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=D);for(var r=this._groups,i=r.length,n=new Array(i),o=0;o1?this.each((null==e?H:"function"==typeof e?V:Y)(t,e,null==r?"":r)):G(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Z:"function"==typeof e?Q:X)(t,e)):this.node()[t]},classed:function(t,e){var r=J(t+"");if(arguments.length<2){for(var i=tt(this.node()),n=-1,o=r.length;++n=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?wt:_t,i=0;i{}};function Et(){for(var t,e=0,r=arguments.length,i={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var r,i,n=new Array(r),o=0;o=0&&e._call.call(void 0,t),e=e._next;--Nt}()}finally{Nt=0,function(){for(var t,e,r=Rt,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Rt=e);Pt=t,te(i)}(),Wt=0}}function Jt(){var t=Ht.now(),e=t-jt;e>Kt&&(Ut-=e,jt=t)}function te(t){Nt||(qt&&(qt=clearTimeout(qt)),t-Wt>24?(t<1/0&&(qt=setTimeout(Qt,t-Ht.now()-Ut)),zt&&(zt=clearInterval(zt))):(zt||(jt=Ht.now(),zt=setInterval(Jt,Kt)),Nt=1,Yt(Qt)))}function ee(t,e,r){var i=new Zt;return e=null==e?0:+e,i.restart((r=>{i.stop(),t(r+e)}),e,r),i}Zt.prototype=Xt.prototype={constructor:Zt,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Vt():+r)+(null==e?0:+e),this._next||Pt===this||(Pt?Pt._next=this:Rt=this,Pt=this),this._call=t,this._time=r,te()},stop:function(){this._call&&(this._call=null,this._time=1/0,te())}};var re=It("start","end","cancel","interrupt"),ie=[],ne=0,oe=3;function ae(t,e,r,i,n,o){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};!function(t,e,r){var i,n=t.__transition;function o(l){var c,h,u,d;if(1!==r.state)return s();for(c in n)if((d=n[c]).name===r.name){if(d.state===oe)return ee(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[c]):+cne)throw new Error("too late; already scheduled");return r}function le(t,e){var r=ce(t,e);if(r.state>oe)throw new Error("too late; already running");return r}function ce(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function he(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ue,de=180/Math.PI,pe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fe(t,e,r,i,n,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i180?e+=360:e-t>180&&(t+=360),o.push({i:r.push(n(r)+"rotate(",null,i)-2,x:he(t,e)})):e&&r.push(n(r)+"rotate("+e+i)}(o.rotate,a.rotate,s,l),function(t,e,r,o){t!==e?o.push({i:r.push(n(r)+"skewX(",null,i)-2,x:he(t,e)}):e&&r.push(n(r)+"skewX("+e+i)}(o.skewX,a.skewX,s,l),function(t,e,r,i,o,a){if(t!==r||e!==i){var s=o.push(n(o)+"scale(",null,",",null,")");a.push({i:s-4,x:he(t,r)},{i:s-2,x:he(e,i)})}else 1===r&&1===i||o.push(n(o)+"scale("+r+","+i+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,r=-1,i=l.length;++r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?ze(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?ze(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Le.exec(t))?new We(e[1],e[2],e[3],1):(e=Fe.exec(t))?new We(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ee.exec(t))?ze(e[1],e[2],e[3],e[4]):(e=$e.exec(t))?ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Oe.exec(t))?Ze(e[1],e[2]/100,e[3]/100,1):(e=De.exec(t))?Ze(e[1],e[2]/100,e[3]/100,e[4]):Ie.hasOwnProperty(t)?qe(Ie[t]):"transparent"===t?new We(NaN,NaN,NaN,0):null}function qe(t){return new We(t>>16&255,t>>8&255,255&t,1)}function ze(t,e,r,i){return i<=0&&(t=e=r=NaN),new We(t,e,r,i)}function Ke(t){return t instanceof we||(t=Ne(t)),t?new We((t=t.rgb()).r,t.g,t.b,t.opacity):new We}function je(t,e,r,i){return 1===arguments.length?Ke(t):new We(t,e,r,null==i?1:i)}function We(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Ue(){return`#${Ge(this.r)}${Ge(this.g)}${Ge(this.b)}`}function He(){const t=Ye(this.opacity);return`${1===t?"rgb(":"rgba("}${Ve(this.r)}, ${Ve(this.g)}, ${Ve(this.b)}${1===t?")":`, ${t})`}`}function Ye(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ve(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ge(t){return((t=Ve(t))<16?"0":"")+t.toString(16)}function Ze(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Qe(t,e,r,i)}function Xe(t){if(t instanceof Qe)return new Qe(t.h,t.s,t.l,t.opacity);if(t instanceof we||(t=Ne(t)),!t)return new Qe;if(t instanceof Qe)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),o=Math.max(e,r,i),a=NaN,s=o-n,l=(o+n)/2;return s?(a=e===o?(r-i)/s+6*(r0&&l<1?0:a,new Qe(a,s,l,t.opacity)}function Qe(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Je(t){return(t=(t||0)%360)<0?t+360:t}function tr(t){return Math.max(0,Math.min(1,t||0))}function er(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function rr(t,e,r,i,n){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*i+a*n)/6}ke(we,Ne,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Re,formatHex:Re,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Xe(this).formatHsl()},formatRgb:Pe,toString:Pe}),ke(We,je,_e(we,{brighter(t){return t=null==t?Te:Math.pow(Te,t),new We(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new We(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new We(Ve(this.r),Ve(this.g),Ve(this.b),Ye(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:Ue,formatHex:Ue,formatHex8:function(){return`#${Ge(this.r)}${Ge(this.g)}${Ge(this.b)}${Ge(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:He,toString:He})),ke(Qe,(function(t,e,r,i){return 1===arguments.length?Xe(t):new Qe(t,e,r,null==i?1:i)}),_e(we,{brighter(t){return t=null==t?Te:Math.pow(Te,t),new Qe(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ve:Math.pow(ve,t),new Qe(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new We(er(t>=240?t-240:t+120,n,i),er(t,n,i),er(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new Qe(Je(this.h),tr(this.s),tr(this.l),Ye(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Ye(this.opacity);return`${1===t?"hsl(":"hsla("}${Je(this.h)}, ${100*tr(this.s)}%, ${100*tr(this.l)}%${1===t?")":`, ${t})`}`}}));const ir=t=>()=>t;function nr(t,e){return function(r){return t+r*e}}function or(t,e){var r=e-t;return r?nr(t,r):ir(isNaN(t)?e:t)}const ar=function t(e){var r=function(t){return 1==(t=+t)?or:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):ir(isNaN(e)?r:e)}}(e);function i(t,e){var i=r((t=je(t)).r,(e=je(e)).r),n=r(t.g,e.g),o=r(t.b,e.b),a=or(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=n(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function sr(t){return function(e){var r,i,n=e.length,o=new Array(n),a=new Array(n),s=new Array(n);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),n=t[i],o=t[i+1],a=i>0?t[i-1]:2*n-o,s=io&&(n=e.slice(o,n),s[a]?s[a]+=n:s[++a]=n),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:he(r,i)})),o=cr.lastIndex;return o=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?se:le;return function(){var a=o(this,t),s=a.on;s!==i&&(n=(i=s).copy()).on(e,r),a.on=n}}(r,t,e))},attr:function(t,e){var r=P(t),i="transform"===r?me:ur;return this.attrTween(t,"function"==typeof e?(r.local?mr:yr)(r,i,Ce(this,"attr."+t,e)):null==e?(r.local?pr:dr)(r):(r.local?gr:fr)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=P(t);return this.tween(r,(i.local?xr:br)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?ye:ur;return null==e?this.styleTween(t,function(t,e){var r,i,n;return function(){var o=G(this,t),a=(this.style.removeProperty(t),G(this,t));return o===a?null:o===r&&a===i?n:n=e(r=o,i=a)}}(t,i)).on("end.style."+t,Tr(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,n,o;return function(){var a=G(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=G(this,t)),a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s))}}(t,i,Ce(this,"style."+t,e))).each(function(t,e){var r,i,n,o,a="style."+e,s="end."+a;return function(){var l=le(this,t),c=l.on,h=null==l.value[a]?o||(o=Tr(e)):void 0;c===r&&n===h||(i=(r=c).copy()).on(s,n=h),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,n,o=r+"";return function(){var a=G(this,t);return a===o?null:a===i?n:n=e(i=a,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,n;function o(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,o,r)),i}return o._value=e,o}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ce(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,n=ce(this.node(),r).tween,o=0,a=n.length;o2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete o[n]):a=!1;a&&delete t.__transition}}(this,t)}))},Lt.prototype.transition=function(t){var e,r;t instanceof Ar?(e=t._id,t=t._name):(e=Mr(),(r=Lr).time=Vt(),t=null==t?null:t+"");for(var i=this._groups,n=i.length,o=0;oWr?Math.pow(t,1/3):t/jr+zr}function Vr(t){return t>Kr?t*t*t:jr*(t-zr)}function Gr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Zr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Xr(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof Qr)return new Qr(t.h,t.c,t.l,t.opacity);if(t instanceof Hr||(t=Ur(t)),0===t.a&&0===t.b)return new Qr(NaN,0180||r<-180?r-360*Math.round(r/360):r):ir(isNaN(t)?e:t)}));function ri(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}ti(or);class ii extends Map{constructor(t,e=oi){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(ni(this,t))}has(t){return super.has(ni(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}(this,t))}}function ni({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function oi(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const ai=Symbol("implicit");function si(){var t=new ii,e=[],r=[],i=ai;function n(n){let o=t.get(n);if(void 0===o){if(i!==ai)return i;t.set(n,o=e.push(n)-1)}return r[o%r.length]}return n.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new ii;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return n},n.range=function(t){return arguments.length?(r=Array.from(t),n):r.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return si(e,r).unknown(i)},ri.apply(n,arguments),n}function li(){var t,e,r=si().unknown(void 0),i=r.domain,n=r.range,o=0,a=1,s=!1,l=0,c=0,h=.5;function u(){var r=i().length,u=a=ci?10:o>=hi?5:o>=ui?2:1;let s,l,c;return n<0?(c=Math.pow(10,-n)/a,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,n)*a,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),le?1:t>=e?0:NaN}function yi(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function mi(t){let e,r,i;function n(t,i,n=0,o=t.length){if(n>>1;r(t[e],i)<0?n=e+1:o=e}while(ngi(t(e),r),i=(e,r)=>t(e)-r):(e=t===gi||t===yi?t:xi,r=t,i=t),{left:n,center:function(t,e,r=0,o=t.length){const a=n(t,e,r,o-1);return a>r&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,n=0,o=t.length){if(n>>1;r(t[e],i)<=0?n=e+1:o=e}while(ne&&(r=t,t=e,e=r),c=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?$i:Ei,n=o=null,u}function u(e){return null==e||isNaN(e=+e)?r:(n||(n=i(a.map(t),s,l)))(t(c(e)))}return u.invert=function(r){return c(e((o||(o=i(s,a.map(t),he)))(r)))},u.domain=function(t){return arguments.length?(a=Array.from(t,Mi),h()):a.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=Ai,h()},u.clamp=function(t){return arguments.length?(c=!!t||Li,h()):c!==Li},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,i){return t=r,e=i,h()}}()(Li,Li)}var Ii,Ri=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pi(t){if(!(e=Ri.exec(t)))throw new Error("invalid format: "+t);var e;return new Ni({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ni(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function qi(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function zi(t){return(t=qi(Math.abs(t)))?t[1]:NaN}function Ki(t,e){var r=qi(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}Pi.prototype=Ni.prototype,Ni.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ji={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ki(100*t,e),r:Ki,s:function(t,e){var r=qi(t,e);if(!r)return t+"";var i=r[0],n=r[1],o=n-(Ii=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+qi(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Wi(t){return t}var Ui,Hi,Yi,Vi=Array.prototype.map,Gi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Zi(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)==(e=+e))return[t];const i=e=n))return[];const s=o-n+1,l=new Array(s);if(i)if(a<0)for(let t=0;t0;){if((n=pi(l,c,r))===i)return o[a]=l,o[s]=c,e(o);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}i=n}return t},t}function Xi(){var t=Di();return t.copy=function(){return Oi(t,Xi())},ri.apply(t,arguments),Zi(t)}Ui=function(t){var e,r,i=void 0===t.grouping||void 0===t.thousands?Wi:(e=Vi.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var n=t.length,o=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(r)}),n=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Wi:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Vi.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"−":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Pi(t)).fill,r=t.align,u=t.sign,d=t.symbol,p=t.zero,f=t.width,g=t.comma,y=t.precision,m=t.trim,x=t.type;"n"===x?(g=!0,x="g"):ji[x]||(void 0===y&&(y=12),m=!0,x="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var b="$"===d?n:"#"===d&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",C="$"===d?o:/[%p]/.test(x)?l:"",k=ji[x],_=/[defgprs%]/.test(x);function w(t){var n,o,l,d=b,w=C;if("c"===x)w=k(t)+w,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:k(Math.abs(t),y),m&&(t=function(t){t:for(var e,r=t.length,i=1,n=-1;i0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),v&&0==+t&&"+"!==u&&(v=!1),d=(v?"("===u?u:c:"-"===u||"("===u?"":u)+d,w=("s"===x?Gi[8+Ii/3]:"")+w+(v&&"("===u?")":""),_)for(n=-1,o=t.length;++n(l=t.charCodeAt(n))||l>57){w=(46===l?a+t.slice(n+1):t.slice(n))+w,t=t.slice(0,n);break}}g&&!p&&(t=i(t,1/0));var T=d.length+t.length+w.length,S=T>1)+d+t+w+S.slice(T);break;default:t=S+d+t+w}return s(t)}return y=void 0===y?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:u,formatPrefix:function(t,e){var r=u(((t=Pi(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(zi(e)/3))),n=Math.pow(10,-i),o=Gi[8+i/3];return function(t){return r(n*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),Hi=Ui.format,Yi=Ui.formatPrefix;const Qi=1e3,Ji=6e4,tn=36e5,en=864e5,rn=6048e5,nn=31536e6,on=new Date,an=new Date;function sn(t,e,r,i){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),n.round=t=>{const e=n(t),r=n.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),n.range=(r,i,o)=>{const a=[];if(r=n.ceil(r),o=null==o?1:Math.floor(o),!(r0))return a;let s;do{a.push(s=new Date(+r)),e(r,o),t(r)}while(ssn((e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)}),((t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););})),r&&(n.count=(e,i)=>(on.setTime(+e),an.setTime(+i),t(on),t(an),Math.floor(r(on,an))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(i?e=>i(e)%t==0:e=>n.count(0,e)%t==0):n:null)),n}const ln=sn((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));ln.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?sn((e=>{e.setTime(Math.floor(e/t)*t)}),((e,r)=>{e.setTime(+e+r*t)}),((e,r)=>(r-e)/t)):ln:null),ln.range;const cn=sn((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*Qi)}),((t,e)=>(e-t)/Qi),(t=>t.getUTCSeconds())),hn=(cn.range,sn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qi)}),((t,e)=>{t.setTime(+t+e*Ji)}),((t,e)=>(e-t)/Ji),(t=>t.getMinutes()))),un=(hn.range,sn((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*Ji)}),((t,e)=>(e-t)/Ji),(t=>t.getUTCMinutes()))),dn=(un.range,sn((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Qi-t.getMinutes()*Ji)}),((t,e)=>{t.setTime(+t+e*tn)}),((t,e)=>(e-t)/tn),(t=>t.getHours()))),pn=(dn.range,sn((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*tn)}),((t,e)=>(e-t)/tn),(t=>t.getUTCHours()))),fn=(pn.range,sn((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ji)/en),(t=>t.getDate()-1))),gn=(fn.range,sn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/en),(t=>t.getUTCDate()-1))),yn=(gn.range,sn((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/en),(t=>Math.floor(t/en))));function mn(t){return sn((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Ji)/rn))}yn.range;const xn=mn(0),bn=mn(1),Cn=mn(2),kn=mn(3),_n=mn(4),wn=mn(5),vn=mn(6);function Tn(t){return sn((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/rn))}xn.range,bn.range,Cn.range,kn.range,_n.range,wn.range,vn.range;const Sn=Tn(0),An=Tn(1),Mn=Tn(2),Bn=Tn(3),Ln=Tn(4),Fn=Tn(5),En=Tn(6),$n=(Sn.range,An.range,Mn.range,Bn.range,Ln.range,Fn.range,En.range,sn((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()))),On=($n.range,sn((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()))),Dn=(On.range,sn((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear())));Dn.every=t=>isFinite(t=Math.floor(t))&&t>0?sn((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,r)=>{e.setFullYear(e.getFullYear()+r*t)})):null,Dn.range;const In=sn((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));function Rn(t,e,r,i,n,o){const a=[[cn,1,Qi],[cn,5,5e3],[cn,15,15e3],[cn,30,3e4],[o,1,Ji],[o,5,3e5],[o,15,9e5],[o,30,18e5],[n,1,tn],[n,3,108e5],[n,6,216e5],[n,12,432e5],[i,1,en],[i,2,1728e5],[r,1,rn],[e,1,2592e6],[e,3,7776e6],[t,1,nn]];function s(e,r,i){const n=Math.abs(r-e)/i,o=mi((([,,t])=>t)).right(a,n);if(o===a.length)return t.every(fi(e/nn,r/nn,i));if(0===o)return ln.every(Math.max(fi(e,r,i),1));const[s,l]=a[n/a[o-1][2]isFinite(t=Math.floor(t))&&t>0?sn((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null,In.range;const[Pn,Nn]=Rn(In,On,Sn,yn,pn,un),[qn,zn]=Rn(Dn,$n,xn,fn,dn,hn);function Kn(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function jn(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Wn(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}var Un,Hn,Yn={"-":"",_:" ",0:"0"},Vn=/^\s*\d+/,Gn=/^%/,Zn=/[\\^$*+?|[\]().{}]/g;function Xn(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",o=n.length;return i+(o[t.toLowerCase(),e])))}function eo(t,e,r){var i=Vn.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function ro(t,e,r){var i=Vn.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function io(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function no(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function oo(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function ao(t,e,r){var i=Vn.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function so(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function lo(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function co(t,e,r){var i=Vn.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function ho(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function uo(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function po(t,e,r){var i=Vn.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function fo(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function go(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function yo(t,e,r){var i=Vn.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function mo(t,e,r){var i=Vn.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function xo(t,e,r){var i=Vn.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function bo(t,e,r){var i=Gn.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function Co(t,e,r){var i=Vn.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function ko(t,e,r){var i=Vn.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function _o(t,e){return Xn(t.getDate(),e,2)}function wo(t,e){return Xn(t.getHours(),e,2)}function vo(t,e){return Xn(t.getHours()%12||12,e,2)}function To(t,e){return Xn(1+fn.count(Dn(t),t),e,3)}function So(t,e){return Xn(t.getMilliseconds(),e,3)}function Ao(t,e){return So(t,e)+"000"}function Mo(t,e){return Xn(t.getMonth()+1,e,2)}function Bo(t,e){return Xn(t.getMinutes(),e,2)}function Lo(t,e){return Xn(t.getSeconds(),e,2)}function Fo(t){var e=t.getDay();return 0===e?7:e}function Eo(t,e){return Xn(xn.count(Dn(t)-1,t),e,2)}function $o(t){var e=t.getDay();return e>=4||0===e?_n(t):_n.ceil(t)}function Oo(t,e){return t=$o(t),Xn(_n.count(Dn(t),t)+(4===Dn(t).getDay()),e,2)}function Do(t){return t.getDay()}function Io(t,e){return Xn(bn.count(Dn(t)-1,t),e,2)}function Ro(t,e){return Xn(t.getFullYear()%100,e,2)}function Po(t,e){return Xn((t=$o(t)).getFullYear()%100,e,2)}function No(t,e){return Xn(t.getFullYear()%1e4,e,4)}function qo(t,e){var r=t.getDay();return Xn((t=r>=4||0===r?_n(t):_n.ceil(t)).getFullYear()%1e4,e,4)}function zo(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Xn(e/60|0,"0",2)+Xn(e%60,"0",2)}function Ko(t,e){return Xn(t.getUTCDate(),e,2)}function jo(t,e){return Xn(t.getUTCHours(),e,2)}function Wo(t,e){return Xn(t.getUTCHours()%12||12,e,2)}function Uo(t,e){return Xn(1+gn.count(In(t),t),e,3)}function Ho(t,e){return Xn(t.getUTCMilliseconds(),e,3)}function Yo(t,e){return Ho(t,e)+"000"}function Vo(t,e){return Xn(t.getUTCMonth()+1,e,2)}function Go(t,e){return Xn(t.getUTCMinutes(),e,2)}function Zo(t,e){return Xn(t.getUTCSeconds(),e,2)}function Xo(t){var e=t.getUTCDay();return 0===e?7:e}function Qo(t,e){return Xn(Sn.count(In(t)-1,t),e,2)}function Jo(t){var e=t.getUTCDay();return e>=4||0===e?Ln(t):Ln.ceil(t)}function ta(t,e){return t=Jo(t),Xn(Ln.count(In(t),t)+(4===In(t).getUTCDay()),e,2)}function ea(t){return t.getUTCDay()}function ra(t,e){return Xn(An.count(In(t)-1,t),e,2)}function ia(t,e){return Xn(t.getUTCFullYear()%100,e,2)}function na(t,e){return Xn((t=Jo(t)).getUTCFullYear()%100,e,2)}function oa(t,e){return Xn(t.getUTCFullYear()%1e4,e,4)}function aa(t,e){var r=t.getUTCDay();return Xn((t=r>=4||0===r?Ln(t):Ln.ceil(t)).getUTCFullYear()%1e4,e,4)}function sa(){return"+0000"}function la(){return"%"}function ca(t){return+t}function ha(t){return Math.floor(+t/1e3)}function ua(t){return new Date(t)}function da(t){return t instanceof Date?+t:+new Date(+t)}function pa(t,e,r,i,n,o,a,s,l,c){var h=Di(),u=h.invert,d=h.domain,p=c(".%L"),f=c(":%S"),g=c("%I:%M"),y=c("%I %p"),m=c("%a %d"),x=c("%b %d"),b=c("%B"),C=c("%Y");function k(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ca,s:ha,S:Lo,u:Fo,U:Eo,V:Oo,w:Do,W:Io,x:null,X:null,y:Ro,Y:No,Z:zo,"%":la},C={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ko,e:Ko,f:Yo,g:na,G:aa,H:jo,I:Wo,j:Uo,L:Ho,m:Vo,M:Go,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ca,s:ha,S:Zo,u:Xo,U:Qo,V:ta,w:ea,W:ra,x:null,X:null,y:ia,Y:oa,Z:sa,"%":la},k={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=f.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=u.exec(e.slice(r));return i?(t.w=d.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=g.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return v(t,e,r,i)},d:uo,e:uo,f:xo,g:so,G:ao,H:fo,I:fo,j:po,L:mo,m:ho,M:go,p:function(t,e,r){var i=c.exec(e.slice(r));return i?(t.p=h.get(i[0].toLowerCase()),r+i[0].length):-1},q:co,Q:Co,s:ko,S:yo,u:ro,U:io,V:no,w:eo,W:oo,x:function(t,e,i){return v(t,r,e,i)},X:function(t,e,r){return v(t,i,e,r)},y:so,Y:ao,Z:lo,"%":bo};function _(t,e){return function(r){var i,n,o,a=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in o||(o.w=1),"Z"in o?(n=(i=jn(Wn(o.y,0,1))).getUTCDay(),i=n>4||0===n?An.ceil(i):An(i),i=gn.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(n=(i=Kn(Wn(o.y,0,1))).getDay(),i=n>4||0===n?bn.ceil(i):bn(i),i=fn.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),n="Z"in o?jn(Wn(o.y,0,1)).getUTCDay():Kn(Wn(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(n+5)%7:o.w+7*o.U-(n+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,jn(o)):Kn(o)}}function v(t,e,r,i){for(var n,o,a=0,s=e.length,l=r.length;a=l)return-1;if(37===(n=e.charCodeAt(a++))){if(n=e.charAt(a++),!(o=k[n in Yn?e.charAt(a++):n])||(i=o(t,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}return b.x=_(r,b),b.X=_(i,b),b.c=_(e,b),C.x=_(r,C),C.X=_(i,C),C.c=_(e,C),{format:function(t){var e=_(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=_(t+="",C);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Hn=Un.format,Un.parse,Un.utcFormat,Un.utcParse;const ga=function(t){for(var e=new Array(10),r=0;r<10;)e[r]="#"+t.slice(6*r,6*++r);return e}("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function ya(t){return"string"==typeof t?new Mt([[document.querySelector(t)]],[document.documentElement]):new Mt([[t]],At)}function ma(t){return function(){return t}}const xa=Math.abs,ba=Math.atan2,Ca=Math.cos,ka=Math.max,_a=Math.min,wa=Math.sin,va=Math.sqrt,Ta=1e-12,Sa=Math.PI,Aa=Sa/2,Ma=2*Sa;function Ba(t){return t>=1?Aa:t<=-1?-Aa:Math.asin(t)}const La=Math.PI,Fa=2*La,Ea=1e-6,$a=Fa-Ea;function Oa(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Oa;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;eEa)if(Math.abs(h*s-l*c)>Ea&&n){let d=r-o,p=i-a,f=s*s+l*l,g=d*d+p*p,y=Math.sqrt(f),m=Math.sqrt(u),x=n*Math.tan((La-Math.acos((f+u-g)/(2*y*m)))/2),b=x/m,C=x/y;Math.abs(b-1)>Ea&&this._append`L${t+b*c},${e+b*h}`,this._append`A${n},${n},0,0,${+(h*d>c*p)},${this._x1=t+C*s},${this._y1=e+C*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,i,n,o){if(t=+t,e=+e,o=!!o,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),s=r*Math.sin(i),l=t+a,c=e+s,h=1^o,u=o?i-n:n-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Ea||Math.abs(this._y1-c)>Ea)&&this._append`L${l},${c}`,r&&(u<0&&(u=u%Fa+Fa),u>$a?this._append`A${r},${r},0,1,${h},${t-a},${e-s}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:u>Ea&&this._append`A${r},${r},0,${+(u>=La)},${h},${this._x1=t+r*Math.cos(n)},${this._y1=e+r*Math.sin(n)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function Ia(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Da(e)}function Ra(t){return t.innerRadius}function Pa(t){return t.outerRadius}function Na(t){return t.startAngle}function qa(t){return t.endAngle}function za(t){return t&&t.padAngle}function Ka(t,e,r,i,n,o,a){var s=t-r,l=e-i,c=(a?o:-o)/va(s*s+l*l),h=c*l,u=-c*s,d=t+h,p=e+u,f=r+h,g=i+u,y=(d+f)/2,m=(p+g)/2,x=f-d,b=g-p,C=x*x+b*b,k=n-o,_=d*g-f*p,w=(b<0?-1:1)*va(ka(0,k*k*C-_*_)),v=(_*b-x*w)/C,T=(-_*x-b*w)/C,S=(_*b+x*w)/C,A=(-_*x+b*w)/C,M=v-y,B=T-m,L=S-y,F=A-m;return M*M+B*B>L*L+F*F&&(v=S,T=A),{cx:v,cy:T,x01:-h,y01:-u,x11:v*(n/k-1),y11:T*(n/k-1)}}function ja(){var t=Ra,e=Pa,r=ma(0),i=null,n=Na,o=qa,a=za,s=null,l=Ia(c);function c(){var c,h,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=n.apply(this,arguments)-Aa,g=o.apply(this,arguments)-Aa,y=xa(g-f),m=g>f;if(s||(s=c=l()),pTa)if(y>Ma-Ta)s.moveTo(p*Ca(f),p*wa(f)),s.arc(0,0,p,f,g,!m),d>Ta&&(s.moveTo(d*Ca(g),d*wa(g)),s.arc(0,0,d,g,f,m));else{var x,b,C=f,k=g,_=f,w=g,v=y,T=y,S=a.apply(this,arguments)/2,A=S>Ta&&(i?+i.apply(this,arguments):va(d*d+p*p)),M=_a(xa(p-d)/2,+r.apply(this,arguments)),B=M,L=M;if(A>Ta){var F=Ba(A/d*wa(S)),E=Ba(A/p*wa(S));(v-=2*F)>Ta?(_+=F*=m?1:-1,w-=F):(v=0,_=w=(f+g)/2),(T-=2*E)>Ta?(C+=E*=m?1:-1,k-=E):(T=0,C=k=(f+g)/2)}var $=p*Ca(C),O=p*wa(C),D=d*Ca(w),I=d*wa(w);if(M>Ta){var R,P=p*Ca(k),N=p*wa(k),q=d*Ca(_),z=d*wa(_);if(y1?0:u<-1?Sa:Math.acos(u))/2),Y=va(R[0]*R[0]+R[1]*R[1]);B=_a(M,(d-Y)/(H-1)),L=_a(M,(p-Y)/(H+1))}else B=L=0}T>Ta?L>Ta?(x=Ka(q,z,$,O,p,L,m),b=Ka(P,N,D,I,p,L,m),s.moveTo(x.cx+x.x01,x.cy+x.y01),LTa&&v>Ta?B>Ta?(x=Ka(D,I,P,N,d,-B,m),b=Ka($,O,q,z,d,-B,m),s.lineTo(x.cx+x.x01,x.cy+x.y01),Bt?1:e>=t?0:NaN}function Xa(t){return t}function Qa(){var t=Xa,e=Za,r=null,i=ma(0),n=ma(Ma),o=ma(0);function a(a){var s,l,c,h,u,d=(a=Wa(a)).length,p=0,f=new Array(d),g=new Array(d),y=+i.apply(this,arguments),m=Math.min(Ma,Math.max(-Ma,n.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/d,o.apply(this,arguments)),b=x*(m<0?-1:1);for(s=0;s0&&(p+=u);for(null!=e?f.sort((function(t,r){return e(g[t],g[r])})):null!=r&&f.sort((function(t,e){return r(a[t],a[e])})),s=0,c=p?(m-d*b)/p:0;s0?u*c:0)+b,g[l]={data:a[l],index:s,value:u,startAngle:y,endAngle:h,padAngle:x};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:ma(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,r=null,a):e},a.sort=function(t){return arguments.length?(r=t,e=null,a):r},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:ma(+t),a):i},a.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:ma(+t),a):n},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:ma(+t),a):o},a}function Ja(){}function ts(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function es(t){this._context=t}function rs(t){return new es(t)}function is(t){this._context=t}function ns(t){return new is(t)}function os(t){this._context=t}function as(t){return new os(t)}Da.prototype,Array.prototype.slice,Ua.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},es.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:ts(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ts(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},is.prototype={areaStart:Ja,areaEnd:Ja,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ts(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},os.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ts(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class ss{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function ls(t){return new ss(t,!0)}function cs(t){return new ss(t,!1)}function hs(t,e){this._basis=new es(t),this._beta=e}hs.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,n=t[0],o=e[0],a=t[r]-n,s=e[r]-o,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+i*a),this._beta*e[l]+(1-this._beta)*(o+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const us=function t(e){function r(t){return 1===e?new es(t):new hs(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function ds(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function ps(t,e){this._context=t,this._k=(1-e)/6}ps.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:ds(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:ds(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fs=function t(e){function r(t){return new ps(t,e)}return r.tension=function(e){return t(+e)},r}(0);function gs(t,e){this._context=t,this._k=(1-e)/6}gs.prototype={areaStart:Ja,areaEnd:Ja,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:ds(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ys=function t(e){function r(t){return new gs(t,e)}return r.tension=function(e){return t(+e)},r}(0);function ms(t,e){this._context=t,this._k=(1-e)/6}ms.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ds(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const xs=function t(e){function r(t){return new ms(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bs(t,e,r){var i=t._x1,n=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Ta){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ta){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/h,a=(a*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(i,n,o,a,t._x2,t._y2)}function Cs(t,e){this._context=t,this._alpha=e}Cs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:bs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ks=function t(e){function r(t){return e?new Cs(t,e):new ps(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function _s(t,e){this._context=t,this._alpha=e}_s.prototype={areaStart:Ja,areaEnd:Ja,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:bs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ws=function t(e){function r(t){return e?new _s(t,e):new gs(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function vs(t,e){this._context=t,this._alpha=e}vs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;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:bs(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ts=function t(e){function r(t){return e?new vs(t,e):new ms(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Ss(t){this._context=t}function As(t){return new Ss(t)}function Ms(t){return t<0?-1:1}function Bs(t,e,r){var i=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),s=(o*n+a*i)/(i+n);return(Ms(o)+Ms(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Ls(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Fs(t,e,r){var i=t._x0,n=t._y0,o=t._x1,a=t._y1,s=(o-i)/3;t._context.bezierCurveTo(i+s,n+s*e,o-s,a-s*r,o,a)}function Es(t){this._context=t}function $s(t){this._context=new Os(t)}function Os(t){this._context=t}function Ds(t){return new Es(t)}function Is(t){return new $s(t)}function Rs(t){this._context=t}function Ps(t){var e,r,i=t.length-1,n=new Array(i),o=new Array(i),a=new Array(i);for(n[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e=0;--e)n[e]=(a[e]-n[e+1])/o[e];for(o[i-1]=(t[i]+n[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},Ws.prototype={constructor:Ws,scale:function(t){return 1===t?this:new Ws(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Ws(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Ws(1,0,0),Ws.prototype},7266:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(6309),n=r(3122);const o=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}},a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new o}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},1931:(t,e,r)=>{"use strict";r.d(e,{A:()=>g});var i=r(7266),n=r(3122);const o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(o.re);if(!e)return;const r=e[1],n=parseInt(r,16),a=r.length,s=a%4==0,l=a>4,c=l?1:17,h=l?8:4,u=s?0:-1,d=l?255:15;return i.A.set({r:(n>>h*(u+3)&d)*c,g:(n>>h*(u+2)&d)*c,b:(n>>h*(u+1)&d)*c,a:s?(n&d)*c/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}${n.Y[Math.round(255*o)]}`:`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}`}},a=o;var s=r(6309);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,n,o,a,c,h]=r;return i.A.set({h:l._hue2deg(n),s:s.A.channel.clamp.s(parseFloat(o)),l:s.A.channel.clamp.l(parseFloat(a)),a:c?s.A.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${n})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},c=l,h={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const t in h.colors)if(h.colors[t]===e)return t}},u=h,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(d.re);if(!r)return;const[,n,o,a,l,c,h,u,p]=r;return i.A.set({r:s.A.channel.clamp.r(o?2.55*parseFloat(n):parseFloat(n)),g:s.A.channel.clamp.g(l?2.55*parseFloat(a):parseFloat(a)),b:s.A.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?s.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(n)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}},p=d,f={format:{keyword:h,hex:a,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||p.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.Z.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):a.stringify(t)},g=f},3122:(t,e,r)=>{"use strict";r.d(e,{Y:()=>n,Z:()=>o});var i=r(6309);const n={};for(let t=0;t<=255;t++)n[t]=i.A.unit.dec2hex(t);const o={ALL:0,RGB:1,HSL:2}},5635:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(6309),n=r(1931);const o=(t,e,r)=>{const o=n.A.parse(t),a=o[e],s=i.A.channel.clamp[e](a+r);return a!==s&&(o[e]=s),n.A.stringify(o)}},8232:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(6309),n=r(1931);const o=(t,e)=>{const r=n.A.parse(t);for(const t in e)r[t]=i.A.channel.clamp[t](e[t]);return n.A.stringify(r)}},5263:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",-e)},5097:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(6309),n=r(1931);const o=t=>(t=>{const{r:e,g:r,b:o}=n.A.parse(t),a=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(o);return i.A.lang.round(a)})(t)>=.5,a=t=>!o(t)},8041:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",e)},5582:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(6309),n=r(7266),o=r(1931),a=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,a.A)(t,{a:e});const l=n.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return o.A.stringify(l)}},6309:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const o=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(n){case"r":return 255*i.hue2rgb(a,o,t+1/3);case"g":return 255*i.hue2rgb(a,o,t);case"b":return 255*i.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),o=Math.min(t,e,r),a=(n+o)/2;if("l"===i)return 100*a;if(n===o)return 0;const s=n-o;if("s"===i)return 100*(a>.5?s/(2-n-o):s/(n+o));switch(n){case t:return 60*((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},9469:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(6984);const n=function(t,e){for(var r=t.length;r--;)if((0,i.A)(t[r][0],e))return r;return-1};var o=Array.prototype.splice;function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1},a.prototype.set=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};const s=a},8335:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(8562),n=r(1917);const o=(0,i.A)(n.A,"Map")},2050:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});const i=(0,r(8562).A)(Object,"create");var n=Object.prototype.hasOwnProperty;var o=Object.prototype.hasOwnProperty;function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{"use strict";r.d(e,{A:()=>o});var i=r(8562),n=r(1917);const o=(0,i.A)(n.A,"Set")},2080:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(9469);var n=r(8335),o=r(2050);function a(t){var e=this.__data__=new i.A(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new i.A,this.size=0},a.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var r=this.__data__;if(r instanceof i.A){var a=r.__data__;if(!n.A||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o.A(a)}return r.set(t,e),this.size=r.size,this};const s=a},241:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=r(1917).A.Symbol},3988:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=r(1917).A.Uint8Array},2505:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(5175),n=r(2049),o=r(1200),a=r(5353),s=r(4749),l=Object.prototype.hasOwnProperty;const c=function(t,e){var r=(0,n.A)(t),c=!r&&(0,i.A)(t),h=!r&&!c&&(0,o.A)(t),u=!r&&!c&&!h&&(0,s.A)(t),d=r||c||h||u,p=d?function(t,e){for(var r=-1,i=Array(t);++r{"use strict";r.d(e,{A:()=>a});var i=r(2528),n=r(6984),o=Object.prototype.hasOwnProperty;const a=function(t,e,r){var a=t[e];o.call(t,e)&&(0,n.A)(a,r)&&(void 0!==r||e in t)||(0,i.A)(t,e,r)}},2528:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(4171);const n=function(t,e,r){"__proto__"==e&&i.A?(0,i.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},7132:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e,r){for(var i=-1,n=Object(t),o=r(t),a=o.length;a--;){var s=o[++i];if(!1===e(n[s],s,n))break}return t}},2383:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var i=r(241),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,s=i.A?i.A.toStringTag:void 0;var l=Object.prototype.toString;var c=i.A?i.A.toStringTag:void 0;const h=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(t){}var n=a.call(t);return i&&(e?t[s]=r:delete t[s]),n}(t):function(t){return l.call(t)}(t)}},4453:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(7271);const n=(0,r(367).A)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,i.A)(t))return n(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},4326:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(9008),n=r(5255),o=r(7424);const a=function(t,e){return(0,o.A)((0,n.A)(t,e,i.A),t+"")}},2789:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e){return t(e)}}},565:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(3988);const n=function(t){var e=new t.constructor(t.byteLength);return new i.A(e).set(new i.A(t)),e}},154:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(1917),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n?i.A.Buffer:void 0,s=a?a.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var r=t.length,i=s?s(r):new t.constructor(r);return t.copy(i),i}},1801:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(565);const n=function(t,e){var r=e?(0,i.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},9759:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r{"use strict";r.d(e,{A:()=>o});var i=r(2851),n=r(2528);const o=function(t,e,r,o){var a=!r;r||(r={});for(var s=-1,l=e.length;++s{"use strict";r.d(e,{A:()=>o});var i=r(4326),n=r(6832);const o=function(t){return(0,i.A)((function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&(0,n.A)(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++i{"use strict";r.d(e,{A:()=>n});var i=r(8562);const n=function(){try{var t=(0,i.A)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},2136:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i="object"==typeof global&&global&&global.Object===Object&&global},8562:(t,e,r)=>{"use strict";r.d(e,{A:()=>y});var i=r(9610);const n=r(1917).A["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var s=r(3149),l=r(1121),c=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,d=h.toString,p=u.hasOwnProperty,f=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(t){return!(!(0,s.A)(t)||(e=t,a&&a in e))&&((0,i.A)(t)?f:c).test((0,l.A)(t));var e},y=function(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return g(r)?r:void 0}},5647:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=(0,r(367).A)(Object.getPrototypeOf,Object)},9137:(t,e,r)=>{"use strict";r.d(e,{A:()=>w});var i=r(8562),n=r(1917);const o=(0,i.A)(n.A,"DataView");var a=r(8335);const s=(0,i.A)(n.A,"Promise");var l=r(9857);const c=(0,i.A)(n.A,"WeakMap");var h=r(2383),u=r(1121),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",y="[object DataView]",m=(0,u.A)(o),x=(0,u.A)(a.A),b=(0,u.A)(s),C=(0,u.A)(l.A),k=(0,u.A)(c),_=h.A;(o&&_(new o(new ArrayBuffer(1)))!=y||a.A&&_(new a.A)!=d||s&&_(s.resolve())!=p||l.A&&_(new l.A)!=f||c&&_(new c)!=g)&&(_=function(t){var e=(0,h.A)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,u.A)(r):"";if(i)switch(i){case m:return y;case x:return d;case b:return p;case C:return f;case k:return g}return e});const w=_},407:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(3149),n=Object.create;const o=function(){function t(){}return function(e){if(!(0,i.A)(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var a=r(5647),s=r(7271);const l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:o((0,a.A)(t))}},5353:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=/^(?:0|[1-9]\d*)$/;const n=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&i.test(t))&&t>-1&&t%1==0&&t{"use strict";r.d(e,{A:()=>s});var i=r(6984),n=r(8446),o=r(5353),a=r(3149);const s=function(t,e,r){if(!(0,a.A)(r))return!1;var s=typeof e;return!!("number"==s?(0,n.A)(r)&&(0,o.A)(e,r.length):"string"==s&&e in r)&&(0,i.A)(r[e],t)}},7271:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=Object.prototype;const n=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},4841:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(2136),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n&&i.A.process;const s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}()},367:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){return function(r){return t(e(r))}}},5255:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=Math.max;const n=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=i(n.length-e,0),s=Array(a);++o{"use strict";r.d(e,{A:()=>o});var i=r(2136),n="object"==typeof self&&self&&self.Object===Object&&self;const o=i.A||n||Function("return this")()},7424:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(9142),n=r(4171),o=r(9008);const a=n.A?function(t,e){return(0,n.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.A)(e),writable:!0})}:o.A;var s=Date.now;const l=(c=a,h=0,u=0,function(){var t=s(),e=16-(t-u);if(u=t,e>0){if(++h>=800)return arguments[0]}else h=0;return c.apply(void 0,arguments)});var c,h,u},1121:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=Function.prototype.toString;const n=function(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},9142:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return function(){return t}}},6984:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){return t===e||t!=t&&e!=e}},9008:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return t}},5175:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(2383),n=r(3098);const o=function(t){return(0,n.A)(t)&&"[object Arguments]"==(0,i.A)(t)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable;const c=o(function(){return arguments}())?o:function(t){return(0,n.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")}},2049:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=Array.isArray},8446:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(9610),n=r(5254);const o=function(t){return null!=t&&(0,n.A)(t.length)&&!(0,i.A)(t)}},3533:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(8446),n=r(3098);const o=function(t){return(0,n.A)(t)&&(0,i.A)(t)}},1200:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(1917);var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n?i.A.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},6401:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var i=r(4453),n=r(9137),o=r(5175),a=r(2049),s=r(8446),l=r(1200),c=r(7271),h=r(4749),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,s.A)(t)&&((0,a.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,h.A)(t)||(0,o.A)(t)))return!t.length;var e=(0,n.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.A)(t))return!(0,i.A)(t).length;for(var r in t)if(u.call(t,r))return!1;return!0}},9610:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(2383),n=r(3149);const o=function(t){if(!(0,n.A)(t))return!1;var e=(0,i.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3149:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3098:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return null!=t&&"object"==typeof t}},4749:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var i=r(2383),n=r(5254),o=r(3098),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=r(2789),l=r(4841),c=l.A&&l.A.isTypedArray;const h=c?(0,s.A)(c):function(t){return(0,o.A)(t)&&(0,n.A)(t.length)&&!!a[(0,i.A)(t)]}},9999:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(2505),n=r(3149),o=r(7271);var a=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,n.A)(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=(0,o.A)(t),r=[];for(var i in t)("constructor"!=i||!e&&a.call(t,i))&&r.push(i);return r};var l=r(8446);const c=function(t){return(0,l.A)(t)?(0,i.A)(t,!0):s(t)}},6632:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(2050);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return r.cache=o.set(n,a)||o,a};return r.cache=new(n.Cache||i.A),r}n.Cache=i.A;const o=n},7222:(t,e,r)=>{"use strict";r.d(e,{A:()=>E});var i=r(2080),n=r(2528),o=r(6984);const a=function(t,e,r){(void 0!==r&&!(0,o.A)(t[e],r)||void 0===r&&!(e in t))&&(0,n.A)(t,e,r)};var s=r(7132),l=r(154),c=r(1801),h=r(9759),u=r(407),d=r(5175),p=r(2049),f=r(3533),g=r(1200),y=r(9610),m=r(3149),x=r(2383),b=r(5647),C=r(3098),k=Function.prototype,_=Object.prototype,w=k.toString,v=_.hasOwnProperty,T=w.call(Object);var S=r(4749);const A=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var M=r(2031),B=r(9999);const L=function(t,e,r,i,n,o,s){var k,_=A(t,r),L=A(e,r),F=s.get(L);if(F)a(t,r,F);else{var E=o?o(_,L,r+"",t,e,s):void 0,$=void 0===E;if($){var O=(0,p.A)(L),D=!O&&(0,g.A)(L),I=!O&&!D&&(0,S.A)(L);E=L,O||D||I?(0,p.A)(_)?E=_:(0,f.A)(_)?E=(0,h.A)(_):D?($=!1,E=(0,l.A)(L,!0)):I?($=!1,E=(0,c.A)(L,!0)):E=[]:function(t){if(!(0,C.A)(t)||"[object Object]"!=(0,x.A)(t))return!1;var e=(0,b.A)(t);if(null===e)return!0;var r=v.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&w.call(r)==T}(L)||(0,d.A)(L)?(E=_,(0,d.A)(_)?(k=_,E=(0,M.A)(k,(0,B.A)(k))):(0,m.A)(_)&&!(0,y.A)(_)||(E=(0,u.A)(L))):$=!1}$&&(s.set(L,E),n(E,L,i,o,s),s.delete(L)),a(t,r,E)}},F=function t(e,r,n,o,l){e!==r&&(0,s.A)(r,(function(s,c){if(l||(l=new i.A),(0,m.A)(s))L(e,r,c,n,t,o,l);else{var h=o?o(A(e,c),s,c+"",e,r,l):void 0;void 0===h&&(h=s),a(e,c,h)}}),B.A)},E=(0,r(3767).A)((function(t,e,r){F(t,e,r)}))},9022:(t,e,r)=>{"use strict";r.d(e,{IU:()=>Ft,gh:()=>Rt,nA:()=>Ge,U:()=>Lt,Jo:()=>Vt,jP:()=>Nt,on:()=>Ye,Zk:()=>Qt,g0:()=>Xt,T_:()=>zt,U_:()=>Ze,U7:()=>Ve,lC:()=>Jt});var i=r(8496),n=r(8252),o=r(7323),a=r(798),s=r(4852);function l(t,e,r){if(t&&t.length){const[i,n]=e,o=Math.PI/180*r,a=Math.cos(o),s=Math.sin(o);for(const e of t){const[t,r]=e;e[0]=(t-i)*a-(r-n)*s+i,e[1]=(t-i)*s+(r-n)*a+n}}}function c(t,e){return t[0]===e[0]&&t[1]===e[1]}function h(t,e,r,i=1){const n=r,o=Math.max(e,.1),a=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,s=[0,0];if(n)for(const t of a)l(t,s,n);const h=function(t,e,r){const i=[];for(const e of t){const t=[...e];c(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const n=[];e=Math.max(e,.1);const o=[];for(const t of i)for(let e=0;et.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax))),!o.length)return n;let a=[],s=o[0].ymin,l=0;for(;a.length||o.length;){if(o.length){let t=-1;for(let e=0;es);e++)t=e;o.splice(0,t+1).forEach((t=>{a.push({s,edge:t})}))}if(a=a.filter((t=>!(t.edge.ymax<=s))),a.sort(((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x))),(1!==r||l%e==0)&&a.length>1)for(let t=0;t=a.length)break;const r=a[t].edge,i=a[e].edge;n.push([[Math.round(r.x),s],[Math.round(i.x),s]])}s+=r,a.forEach((t=>{t.edge.x=t.edge.x+r*t.edge.islope})),l++}return n}(a,o,i);if(n){for(const t of a)l(t,s,-n);!function(t,e,r){const i=[];t.forEach((t=>i.push(...t))),l(i,e,r)}(h,s,-n)}return h}function u(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=n),h(t,n,i,o||1)}class d{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=u(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function p(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class f extends d{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=u(t,Object.assign({},e,{hachureGap:r})),n=Math.PI/180*e.hachureAngle,o=[],a=.5*r*Math.cos(n),s=.5*r*Math.sin(n);for(const[t,e]of i)p([t,e])&&o.push([[t[0]-a,t[1]+s],[...e]],[[t[0]+a,t[1]-s],[...e]]);return{type:"fillSketch",ops:this.renderLines(o,e)}}}class g extends d{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,i);return r.ops=r.ops.concat(n.ops),r}}class y{constructor(t){this.helper=t}fillPolygons(t,e){const r=u(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);const o=i/4;for(const a of t){const t=p(a),s=t/i,l=Math.ceil(s)-1,c=t-l*i,h=(a[0][0]+a[1][0])/2-i/4,u=Math.min(a[0][1],a[1][1]);for(let t=0;t{const o=p(t),a=Math.floor(o/(r+i)),s=(o+i-a*(r+i))/2;let l=t[0],c=t[1];l[0]>c[0]&&(l=t[1],c=t[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let t=0;t{const n=p(t),o=Math.round(n/(2*e));let a=t[0],s=t[1];a[0]>s[0]&&(a=t[1],s=t[0]);const l=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let t=0;ti%2?t+r:t+e));o.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":o.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map(((t,i)=>i%2?t+r:t+e));o.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":o.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":o.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map(((t,i)=>i%2?t+r:t+e));o.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":o.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],o.push({key:"T",data:[e,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=i,r=n}return o}function M(t){const e=[];let r="",i=0,n=0,o=0,a=0,s=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[i,n]=h,[o,a]=h;break;case"C":e.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],e.push({key:"L",data:[i,n]});break;case"V":n=h[0],e.push({key:"L",data:[i,n]});break;case"S":{let t=0,o=0;"C"===r||"S"===r?(t=i+(i-s),o=n+(n-l)):(t=i,o=n),e.push({key:"C",data:[t,o,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[t,o]=h;let a=0,c=0;"Q"===r||"T"===r?(a=i+(i-s),c=n+(n-l)):(a=i,c=n);const u=i+2*(a-i)/3,d=n+2*(c-n)/3,p=t+2*(a-t)/3,f=o+2*(c-o)/3;e.push({key:"C",data:[u,d,p,f,t,o]}),s=a,l=c,i=t,n=o;break}case"Q":{const[t,r,o,a]=h,c=i+2*(t-i)/3,u=n+2*(r-n)/3,d=o+2*(t-o)/3,p=a+2*(r-a)/3;e.push({key:"C",data:[c,u,d,p,o,a]}),s=t,l=r,i=o,n=a;break}case"A":{const t=Math.abs(h[0]),r=Math.abs(h[1]),o=h[2],a=h[3],s=h[4],l=h[5],c=h[6];0===t||0===r?(e.push({key:"C",data:[i,n,l,c,l,c]}),i=l,n=c):i===l&&n===c||(L(i,n,l,c,t,r,o,a,s).forEach((function(t){e.push({key:"C",data:t})})),i=l,n=c);break}case"Z":e.push({key:"Z",data:[]}),i=o,n=a}r=c}return e}function B(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function L(t,e,r,i,n,o,a,s,l,c){const h=(u=a,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,y=0;if(c)[p,f,g,y]=c;else{[t,e]=B(t,e,-h),[r,i]=B(r,i,-h);const a=(t-r)/2,c=(e-i)/2;let u=a*a/(n*n)+c*c/(o*o);u>1&&(u=Math.sqrt(u),n*=u,o*=u);const d=n*n,m=o*o,x=d*m-d*c*c-m*a*a,b=d*c*c+m*a*a,C=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=C*n*c/o+(t+r)/2,y=C*-o*a/n+(e+i)/2,p=Math.asin(parseFloat(((e-y)/o).toFixed(9))),f=Math.asin(parseFloat(((i-y)/o).toFixed(9))),tf&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let m=f-p;if(Math.abs(m)>120*Math.PI/180){const t=f,e=r,s=i;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=L(r=g+n*Math.cos(f),i=y+o*Math.sin(f),e,s,n,o,a,0,l,[f,t,g,y])}m=f-p;const x=Math.cos(p),b=Math.sin(p),C=Math.cos(f),k=Math.sin(f),_=Math.tan(m/4),w=4/3*n*_,v=4/3*o*_,T=[t,e],S=[t+w*b,e-v*x],A=[r+w*k,i-v*C],M=[r,i];if(S[0]=2*T[0]-S[0],S[1]=2*T[1]-S[1],c)return[S,A,M].concat(d);{d=[S,A,M].concat(d);const t=[];for(let e=0;e2){const n=[];for(let e=0;e2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(f-p)/2),m=Z(y,c,h,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=Z(y,c,h,u,d,p,f,1.5,l);m.push(...t)}return a&&(s?m.push(...U(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...U(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l)):m.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:m}}function P(t,e){const r=M(A(S(t))),i=[];let n=[0,0],o=[0,0];for(const{key:t,data:a}of r)switch(t){case"M":o=[a[0],a[1]],n=[a[0],a[1]];break;case"L":i.push(...U(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[t,r,n,s,l,c]=a;i.push(...X(t,r,n,s,l,c,o,e)),o=[l,c];break}case"Z":i.push(...U(o[0],o[1],n[0],n[1],e)),o=[n[0],n[1]]}return{type:"path",ops:i}}function N(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+W(t,e),i[0][1]+W(t,e)]});for(let o=1;o500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*K(n);let p=n.bowing*n.maxRandomnessOffset*(i-e)/200,f=n.bowing*n.maxRandomnessOffset*(t-r)/200;p=W(p,n,c),f=W(f,n,c);const g=[],y=()=>W(u,n,c),m=()=>W(h,n,c),x=n.preserveVertices;return o&&(a?g.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):g.push({op:"move",data:[t+(x?0:W(h,n,c)),e+(x?0:W(h,n,c))]})),a?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(i-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(i-e)*d+y(),r+(x?0:y()),i+(x?0:y())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(i-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(i-e)*d+m(),r+(x?0:m()),i+(x?0:m())]}),g}function Y(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+W(e,r),t[0][1]+W(e,r)]),i.push([t[0][0]+W(e,r),t[0][1]+W(e,r)]);for(let n=1;n3){const o=[],a=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&n.push(r)):n.push(r),n.push(t[e+3])}else{const i=.5,o=t[e+0],a=t[e+1],s=t[e+2],l=t[e+3],c=rt(o,a,i),h=rt(a,s,i),u=rt(s,l,i),d=rt(c,h,i),p=rt(h,u,i),f=rt(d,p,i);it([o,c,d,f],0,r,n),it([f,p,u,l],0,r,n)}var o,a;return n}function nt(t,e){return ot(t,0,t.length,e)}function ot(t,e,r,i,n){const o=n||[],a=t[e],s=t[r-1];let l=0,c=1;for(let i=e+1;il&&(l=e,c=i)}return Math.sqrt(l)>i?(ot(t,e,c+1,i,o),ot(t,c,r,i,o)):(o.length||o.push(a),o.push(s)),o}function at(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let r=0;r0?ot(i,0,i.length,r):i}const st="none";class lt{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,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,n){const o=this._o(n);return this._d("line",[E(t,e,r,i,o)],o)}rectangle(t,e,r,i,n){const o=this._o(n),a=[],s=function(t,e,r,i,n){return function(t,e){return $(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],n)}(t,e,r,i,o);if(o.fill){const n=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===o.fillStyle?a.push(N([n],o)):a.push(q([n],o))}return o.stroke!==st&&a.push(s),this._d("rectangle",a,o)}ellipse(t,e,r,i,n){const o=this._o(n),a=[],s=D(r,i,o),l=I(t,e,o,s);if(o.fill)if("solid"===o.fillStyle){const r=I(t,e,o,s).opset;r.type="fillPath",a.push(r)}else a.push(q([l.estimatedPoints],o));return o.stroke!==st&&a.push(l.opset),this._d("ellipse",a,o)}circle(t,e,r,i){const n=this.ellipse(t,e,r,r,i);return n.shape="circle",n}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[$(t,!1,r)],r)}arc(t,e,r,i,n,o,a=!1,s){const l=this._o(s),c=[],h=R(t,e,r,i,n,o,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=R(t,e,r,i,n,o,!0,!1,a);s.type="fillPath",c.push(s)}else c.push(function(t,e,r,i,n,o,a){const s=t,l=e;let c=Math.abs(r/2),h=Math.abs(i/2);c+=W(.01*c,a),h+=W(.01*h,a);let u=n,d=o;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/a.curveStepCount,f=[];for(let t=u;t<=d;t+=p)f.push([s+c*Math.cos(t),l+h*Math.sin(t)]);return f.push([s+c*Math.cos(d),l+h*Math.sin(d)]),f.push([s,l]),q([f],a)}(t,e,r,i,n,o,l));return l.stroke!==st&&c.push(h),this._d("arc",c,l)}curve(t,e){const r=this._o(e),i=[],n=O(t,r);if(r.fill&&r.fill!==st)if("solid"===r.fillStyle){const e=O(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],n=t;if(n.length){const t="number"==typeof n[0][0]?[n]:n;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...at(J([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...at(J(i),10,(1+r.roughness)/2))}e.length&&i.push(q([e],r))}return r.stroke!==st&&i.push(n),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],n=$(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(N([t],r)):i.push(q([t],r))),r.stroke!==st&&i.push(n),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=r.fill&&"transparent"!==r.fill&&r.fill!==st,o=r.stroke!==st,a=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=M(A(S(t))),n=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...at(s,1)),s=[]},c=()=>{l(),o.length&&(n.push(o),o=[])};for(const{key:t,data:e}of i)switch(t){case"M":c(),a=[e[0],e[1]],o.push(a);break;case"L":l(),o.push([e[0],e[1]]);break;case"C":if(!s.length){const t=o.length?o[o.length-1]:a;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),o.push([a[0],a[1]])}if(c(),!r)return n;const h=[];for(const t of n){const e=nt(t,r);e.length&&h.push(e)}return h}(t,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=P(t,r);if(n)if("solid"===r.fillStyle)if(1===s.length){const e=P(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(N(s,r));else i.push(q(s,r));return o&&(a?s.forEach((t=>{i.push($(t,!1,r))})):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map((t=>+t.toFixed(e))):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:st};break;case"fillPath":e={d:this.opsToPath(t),stroke:st,strokeWidth:0,fill:r.fill||st};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||st,strokeWidth:r,fill:st}}_mergedShape(t){return t.filter(((t,e)=>0===e||"move"!==t.op))}}const ct="http://www.w3.org/2000/svg";class ht{constructor(t,e){this.svg=t,this.gen=new lt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,n=i.createElementNS(ct,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of e){let e=null;switch(a.type){case"path":e=i.createElementNS(ct,"path"),e.setAttribute("d",this.opsToPath(a,o)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(ct,"path"),e.setAttribute("d",this.opsToPath(a,o)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,a,r)}e&&n.appendChild(e)}return n}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const n=t.createElementNS(ct,"path");return n.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),n.setAttribute("stroke",r.fill||""),n.setAttribute("stroke-width",i+""),n.setAttribute("fill","none"),r.fillLineDash&&n.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){const o=this.gen.line(t,e,r,i,n);return this.draw(o)}rectangle(t,e,r,i,n){const o=this.gen.rectangle(t,e,r,i,n);return this.draw(o)}ellipse(t,e,r,i,n){const o=this.gen.ellipse(t,e,r,i,n);return this.draw(o)}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,n,o,a=!1,s){const l=this.gen.arc(t,e,r,i,n,o,a,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var ut=(t,e)=>new ht(t,e),dt=(0,a.K2)(((t,e)=>{var r,i,n=t.x,o=t.y,a=e.x-n,s=e.y-o,l=t.width/2,c=t.height/2;return Math.abs(s)*l>Math.abs(a)*c?(s<0&&(c=-c),r=0===s?0:c*a/s,i=c):(a<0&&(l=-l),r=l,i=0===a?0:l*s/a),{x:n+r,y:o+i}}),"intersectRect"),pt=dt;function ft(t,e){e&&t.attr("style",e)}async function gt(t){const e=(0,s.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div");let i=t.label;t.label&&(0,a.Wi)(t.label)&&(i=await(0,a.VJ)(t.label.replace(a.Y2.lineBreakRegex,"\n"),(0,a.D7)()));const n=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+i+""),ft(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,a.K2)(ft,"applyStyle"),(0,a.K2)(gt,"addHtmlLabel");var yt=(0,a.K2)((async(t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),(0,a._3)((0,a.D7)().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),a.Rm.info("vertexText"+n);const t={isNode:i,label:(0,o.Sm)(n).replace(/fa[blrs]?:fa-[\w-]+/g,(t=>``)),labelStyle:e?e.replace("fill:","color:"):e};return await gt(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof n?n.split(/\\n|\n|/gi):Array.isArray(n)?n:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}}),"createLabel"),mt=yt,xt=(0,a.K2)(((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" ")),"createRoundedRectPathD"),bt=(0,a.K2)((t=>{const{handDrawnSeed:e}=(0,a.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}}),"solidStateFill"),Ct=(0,a.K2)((t=>{const e=kt([...t.cssCompiledStyles||[],...t.cssStyles||[]]);return{stylesMap:e,stylesArray:[...e]}}),"compileStyles"),kt=(0,a.K2)((t=>{const e=new Map;return t.forEach((t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())})),e}),"styles2Map"),_t=(0,a.K2)((t=>{const{stylesArray:e}=Ct(t),r=[],i=[],n=[],o=[];return e.forEach((t=>{const e=t[0];"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"===e?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&o.push(t.join(":")+" !important"))})),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:o}}),"styles2String"),wt=(0,a.K2)(((t,e)=>{const{themeVariables:r,handDrawnSeed:i}=(0,a.D7)(),{nodeBorder:n,mainBkg:o}=r,{stylesMap:s}=Ct(t);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,stroke:s.get("stroke")||n,seed:i,strokeWidth:1.3},e)}),"userNodeOverrides"),vt=(0,a.K2)((async(t,e)=>{a.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,a.D7)(),{themeVariables:o,handDrawnSeed:l}=r,{clusterBkg:c,clusterBorder:h}=o,{labelStyles:u,nodeStyles:d,borderStyles:p,backgroundStyles:f}=_t(e),g=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),y=(0,a._3)(r.flowchart.htmlLabels),m=g.insert("g").attr("class","cluster-label "),x=await(0,n.GZ)(m,e.label,{style:e.labelStyle,useHtmlLabels:y,isNode:!0});let b=x.getBBox();if((0,a._3)(r.flowchart.htmlLabels)){const t=x.children[0],e=(0,s.Ltv)(x);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}const C=e.width<=b.width+e.padding?b.width+e.padding:e.width;e.width<=b.width+e.padding?e.diff=(C-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height,_=e.x-C/2,w=e.y-k/2;let v;if(a.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=ut(g),r=wt(e,{roughness:.7,fill:c,stroke:h,fillWeight:3,seed:l}),i=t.path(xt(_,w,C,k,0),r);v=g.insert((()=>(a.Rm.debug("Rough node insert CXC",i),i)),":first-child"),v.select("path:nth-child(2)").attr("style",p.join(";")),v.select("path").attr("style",f.join(";").replace("fill","stroke"))}else v=g.insert("rect",":first-child"),v.attr("style",d).attr("rx",e.rx).attr("ry",e.ry).attr("x",_).attr("y",w).attr("width",C).attr("height",k);const{subGraphTitleTopMargin:T}=(0,i.O)(r);if(m.attr("transform",`translate(${e.x-b.width/2}, ${e.y-e.height/2+T})`),u){const t=m.select("span");t&&t.attr("style",u)}const S=v.node().getBBox();return e.offsetX=0,e.width=S.width,e.height=S.height,e.offsetY=b.height-e.padding/2,e.intersect=function(t){return pt(e,t)},{cluster:g,labelBBox:b}}),"rect"),Tt=(0,a.K2)(((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,o=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-o).attr("y",e.y-e.height/2-o).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(t){return pt(e,t)},{cluster:r,labelBBox:{width:0,height:0}}}),"noteGroup"),St=(0,a.K2)((async(t,e)=>{const r=(0,a.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=i,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),d=u.insert("g",":first-child"),p=u.insert("g").attr("class","cluster-label");let f=u.append("rect");const g=p.node().appendChild(await mt(e.label,e.labelStyle,void 0,!0));let y=g.getBBox();if((0,a._3)(r.flowchart.htmlLabels)){const t=g.children[0],e=(0,s.Ltv)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}const m=0*e.padding,x=m/2,b=(e.width<=y.width+e.padding?y.width+e.padding:e.width)+m;e.width<=y.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;const C=e.height+m,k=e.height+m-y.height-6,_=e.x-b/2,w=e.y-C/2;e.width=b;const v=e.y-e.height/2-x+y.height+2;let T;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=ut(u),i=e.rx||e.ry?r.path(xt(_,w,b,C,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:n}):r.rectangle(_,w,b,C,{seed:n});T=u.insert((()=>i),":first-child");const a=r.rectangle(_,v,b,k,{fill:t?o:l,fillStyle:t?"hachure":"solid",stroke:h,seed:n});T=u.insert((()=>i),":first-child"),f=u.insert((()=>a))}else{T=d.insert("rect",":first-child");const t="outer";T.attr("class",t).attr("x",_).attr("y",w).attr("width",b).attr("height",C).attr("data-look",e.look),f.attr("class","inner").attr("x",_).attr("y",v).attr("width",b).attr("height",k)}p.attr("transform",`translate(${e.x-y.width/2}, ${w+1-((0,a._3)(r.flowchart.htmlLabels)?0:3)})`);const S=T.node().getBBox();return e.height=S.height,e.offsetX=0,e.offsetY=y.height-e.padding/2,e.labelBBox=y,e.intersect=function(t){return pt(e,t)},{cluster:u,labelBBox:y}}),"roundedWithTitle"),At=(0,a.K2)(((t,e)=>{const r=(0,a.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:o}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=s.insert("g",":first-child"),c=0*e.padding,h=e.width+c;e.diff=-e.padding;const u=e.height+c,d=e.x-h/2,p=e.y-u/2;let f;if(e.width=h,"handDrawn"===e.look){const t=ut(s).rectangle(d,p,h,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:n});f=s.insert((()=>t),":first-child")}else{f=l.insert("rect",":first-child");const t="divider";f.attr("class",t).attr("x",d).attr("y",p).attr("width",h).attr("height",u).attr("data-look",e.look)}const g=f.node().getBBox();return e.height=g.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return pt(e,t)},{cluster:s,labelBBox:{}}}),"divider"),Mt={rect:vt,squareRect:vt,roundedWithTitle:St,noteGroup:Tt,divider:At},Bt=new Map,Lt=(0,a.K2)((async(t,e)=>{const r=e.shape||"rect",i=await Mt[r](t,e);return Bt.set(e.id,i),i}),"insertCluster"),Ft=(0,a.K2)((()=>{Bt=new Map}),"clear"),Et=(0,a.K2)(((t,e,r,i,n)=>{e.arrowTypeStart&&Ot(t,"start",e.arrowTypeStart,r,i,n),e.arrowTypeEnd&&Ot(t,"end",e.arrowTypeEnd,r,i,n)}),"addEdgeMarkers"),$t={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=(0,a.K2)(((t,e,r,i,n,o)=>{const s=$t[r];if(!s)return void a.Rm.warn(`Unknown arrow type: ${r}`);const l="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${i}#${n}_${o}-${s}${l})`)}),"addEdgeMarker"),Dt=new Map,It=new Map,Rt=(0,a.K2)((()=>{Dt.clear(),It.clear()}),"clear"),Pt=(0,a.K2)((t=>t?t.reduce(((t,e)=>t+";"+e),""):""),"getLabelStyles"),Nt=(0,a.K2)((async(t,e)=>{let r=(0,a._3)((0,a.D7)().flowchart.htmlLabels);const i=await(0,n.GZ)(t,e.label,{style:Pt(e.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1});a.Rm.info("abc82",e,e.labelType);const o=t.insert("g").attr("class","edgeLabel"),l=o.insert("g").attr("class","label");l.node().appendChild(i);let c,h=i.getBBox();if(r){const t=i.children[0],e=(0,s.Ltv)(i);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}if(l.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),Dt.set(e.id,o),e.width=h.width,e.height=h.height,e.startLabelLeft){const r=await mt(e.startLabelLeft,Pt(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),n=i.insert("g").attr("class","inner");c=n.node().appendChild(r);const o=r.getBBox();n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),It.get(e.id)||It.set(e.id,{}),It.get(e.id).startLeft=i,qt(c,e.startLabelLeft)}if(e.startLabelRight){const r=await mt(e.startLabelRight,Pt(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),n=i.insert("g").attr("class","inner");c=i.node().appendChild(r),n.node().appendChild(r);const o=r.getBBox();n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),It.get(e.id)||It.set(e.id,{}),It.get(e.id).startRight=i,qt(c,e.startLabelRight)}if(e.endLabelLeft){const r=await mt(e.endLabelLeft,Pt(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),n=i.insert("g").attr("class","inner");c=n.node().appendChild(r);const o=r.getBBox();n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),It.get(e.id)||It.set(e.id,{}),It.get(e.id).endLeft=i,qt(c,e.endLabelLeft)}if(e.endLabelRight){const r=await mt(e.endLabelRight,Pt(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),n=i.insert("g").attr("class","inner");c=n.node().appendChild(r);const o=r.getBBox();n.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),It.get(e.id)||It.set(e.id,{}),It.get(e.id).endRight=i,qt(c,e.endLabelRight)}return i}),"insertEdgeLabel");function qt(t,e){(0,a.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,a.K2)(qt,"setTerminalWidth");var zt=(0,a.K2)(((t,e)=>{a.Rm.debug("Moving label abc88 ",t.id,t.label,Dt.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,a.D7)(),{subGraphTitleTotalMargin:s}=(0,i.O)(n);if(t.label){const i=Dt.get(t.id);let n=t.x,l=t.y;if(r){const i=o._K.calcLabelPosition(r);a.Rm.debug("Moving label "+t.label+" from (",n,",",l,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,l=i.y)}i.attr("transform",`translate(${n}, ${l+s/2})`)}if(t.startLabelLeft){const e=It.get(t.id).startLeft;let i=t.x,n=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){const e=It.get(t.id).startRight;let i=t.x,n=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){const e=It.get(t.id).endLeft;let i=t.x,n=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){const e=It.get(t.id).endRight;let i=t.x,n=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}}),"positionEdgeLabel"),Kt=(0,a.K2)(((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),o=Math.abs(e.y-i),a=t.width/2,s=t.height/2;return n>=a||o>=s}),"outsideNode"),jt=(0,a.K2)(((t,e,r)=>{a.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,o=Math.abs(i-r.x),s=t.width/2;let l=r.xMath.abs(i-e.x)*c){let t=r.y{a.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach((t=>{if(a.Rm.info("abc88 checking point",t,e),Kt(e,t)||n)a.Rm.warn("abc88 outside",t,i),i=t,n||r.push(t);else{const o=jt(e,i,t);a.Rm.debug("abc88 inside",t,i,o),a.Rm.debug("abc88 intersection",o,e);let s=!1;r.forEach((t=>{s=s||t.x===o.x&&t.y===o.y})),r.some((t=>t.x===o.x&&t.y===o.y))?a.Rm.warn("abc88 no intersect",o,r):r.push(o),n=!0}})),a.Rm.debug("returning points",r),r}),"cutPathAtIntersect");function Ut(t){const e=[],r=[];for(let i=1;i5&&Math.abs(o.y-n.y)>5||n.y===o.y&&o.x===a.x&&Math.abs(o.x-n.x)>5&&Math.abs(o.y-a.y)>5)&&(e.push(o),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,a.K2)(Ut,"extractCornerPoints");var Ht=(0,a.K2)((function(t,e,r){const i=e.x-t.x,n=e.y-t.y,o=r/Math.sqrt(i*i+n*n);return{x:e.x-o*i,y:e.y-o*n}}),"findAdjacentPoint"),Yt=(0,a.K2)((function(t){const{cornerPointPositions:e}=Ut(t),r=[];for(let i=0;i10&&Math.abs(n.y-e.y)>=10){a.Rm.debug("Corner point fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));const t=5;d=o.x===s.x?{x:c<0?s.x-t+u:s.x+t-u,y:h<0?s.y-u:s.y+u}:{x:c<0?s.x-u:s.x+u,y:h<0?s.y-t+u:s.y+t-u}}else a.Rm.debug("Corner point skipping fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));r.push(d,l)}else r.push(t[i]);return r}),"fixCorners"),Vt=(0,a.K2)((function(t,e,r,n,o,l,c){const{handDrawnSeed:h}=(0,a.D7)();let u=e.points,d=!1;const p=o;var f=l;f.intersect&&p.intersect&&(u=u.slice(1,e.points.length-1),u.unshift(p.intersect(u[0])),a.Rm.debug("Last point APA12",e.start,"--\x3e",e.end,u[u.length-1],f,f.intersect(u[u.length-1])),u.push(f.intersect(u[u.length-1]))),e.toCluster&&(a.Rm.info("to cluster abc88",r.get(e.toCluster)),u=Wt(e.points,r.get(e.toCluster).node),d=!0),e.fromCluster&&(a.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(u,null,2)),u=Wt(u.reverse(),r.get(e.fromCluster).node).reverse(),d=!0);let g=u.filter((t=>!Number.isNaN(t.y)));g=Yt(g);let y=g[g.length-1];if(g.length>1){y=g[g.length-1];const t=g[g.length-2],e=(y.x-t.x)/2,r=(y.y-t.y)/2,i={x:t.x+e,y:t.y+r};g.splice(-1,0,i)}let m=s.qrM;e.curve&&(m=e.curve);const{x,y:b}=(0,i.R)(e),C=(0,s.n8j)().x(x).y(b).curve(m);let k,_;switch(e.thickness){case"normal":default:k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-invisible"}switch(e.pattern){case"solid":default:k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed"}let w=C(g);const v=Array.isArray(e.style)?e.style:[e.style];if("handDrawn"===e.look){const r=ut(t);Object.assign([],g);const i=r.path(w,{roughness:.3,seed:h});k+=" transition",_=(0,s.Ltv)(i).select("path").attr("id",e.id).attr("class"," "+k+(e.classes?" "+e.classes:"")).attr("style",v?v.reduce(((t,e)=>t+";"+e),""):"");let n=_.attr("d");_.attr("d",n),t.node().appendChild(_.node())}else _=t.append("path").attr("d",w).attr("id",e.id).attr("class"," "+k+(e.classes?" "+e.classes:"")).attr("style",v?v.reduce(((t,e)=>t+";"+e),""):"");let T="";((0,a.D7)().flowchart.arrowMarkerAbsolute||(0,a.D7)().state.arrowMarkerAbsolute)&&(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,T=T.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),a.Rm.info("arrowTypeStart",e.arrowTypeStart),a.Rm.info("arrowTypeEnd",e.arrowTypeEnd),Et(_,e,T,c,n);let S={};return d&&(S.updatedPath=u),S.originalPath=e.points,S}),"insertEdge"),Gt=(0,a.K2)(((t,e,r,i)=>{e.forEach((e=>{Zt[e](t,r,i)}))}),"insertMarkers"),Zt={extension:(0,a.K2)(((t,e,r)=>{a.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).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")}),"extension"),composition:(0,a.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).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")}),"composition"),aggregation:(0,a.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).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")}),"aggregation"),dependency:(0,a.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).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"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).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")}),"dependency"),lollipop:(0,a.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:(0,a.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).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")}),"point"),circle:(0,a.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).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"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).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")}),"circle"),cross:(0,a.K2)(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).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"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).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")}),"cross"),barb:(0,a.K2)(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-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")},Xt=Gt,Qt=(0,a.K2)((async(t,e,r)=>{let i;const l=e.useHtmlLabels||(0,a._3)((0,a.D7)().flowchart.htmlLabels);i=r||"node default";const c=t.insert("g").attr("class",i).attr("id",e.domId||e.id),h=c.insert("g").attr("class","label").attr("style",e.labelStyle);let u,d;u=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],d=await(0,n.GZ)(h,(0,a.jZ)((0,o.Sm)(u),(0,a.D7)()),{useHtmlLabels:l,width:e.width||(0,a.D7)().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle});let p=d.getBBox();const f=e.padding/2;if((0,a._3)((0,a.D7)().flowchart.htmlLabels)){const t=d.children[0],e=(0,s.Ltv)(d),r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/]*>/g,"").trim();await Promise.all([...r].map((e=>new Promise((r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,a.D7)().fontSize?(0,a.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,a.K2)(i,"setupImage"),setTimeout((()=>{e.complete&&i()})),e.addEventListener("error",i),e.addEventListener("load",i)})))))}p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return l?h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):h.attr("transform","translate(0, "+-p.height/2+")"),e.centerLabel&&h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:c,bbox:p,halfPadding:f,label:h}}),"labelHelper"),Jt=(0,a.K2)(((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height}),"updateNodeBounds"),te=(0,a.K2)(((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||"")),"getNodeClasses");function ee(t,e){return t.intersect(e)}(0,a.K2)(ee,"intersectNode");var re=ee;function ie(t,e,r,i){var n=t.x,o=t.y,a=n-i.x,s=o-i.y,l=Math.sqrt(e*e*s*s+r*r*a*a),c=Math.abs(e*r*a/l);i.x0}(0,a.K2)(se,"intersectLine"),(0,a.K2)(le,"sameSign");var ce=se;function he(t,e,r){let i=t.x,n=t.y,o=[],a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){a=Math.min(a,t.x),s=Math.min(s,t.y)})):(a=Math.min(a,e.x),s=Math.min(s,e.y));let l=i-t.width/2-a,c=n-t.height/2-s;for(let i=0;i1&&o.sort((function(t,e){let i=t.x-r.x,n=t.y-r.y,o=Math.sqrt(i*i+n*n),a=e.x-r.x,s=e.y-r.y,l=Math.sqrt(a*a+s*s);return o{const{labelStyles:i,nodeStyles:n}=_t(e);e.labelStyle=i;const{shapeSvg:o,bbox:a}=await Qt(t,e,te(e)),s=Math.max(a.width+2*r.labelPaddingX,e?.width||0),l=Math.max(a.height+2*r.labelPaddingY,e?.height||0),c=-s/2,h=-l/2;let u,{rx:d,ry:p}=e;const{cssStyles:f}=e;if(r?.rx&&r.ry&&(d=r.rx,p=r.ry),"handDrawn"===e.look){const t=ut(o),r=wt(e,{}),i=d||p?t.path(xt(c,h,s,l,d||0),r):t.rectangle(c,h,s,l,r);u=o.insert((()=>i),":first-child"),u.attr("class","basic label-container").attr("style",f)}else u=o.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",d).attr("data-id","abc").attr("data-et","node").attr("ry",p).attr("x",c).attr("y",h).attr("width",s).attr("height",l);return Jt(e,u),e.intersect=function(t){return ue.rect(e,t)},o}),"drawRect"),pe=(0,a.K2)((async(t,e)=>de(t,e,{rx:5,ry:5,classes:"flowchart-node"})),"state"),fe=(0,a.K2)((async(t,e)=>de(t,e,{rx:5,ry:5,classes:"",labelPaddingX:1*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})),"roundedRect"),ge=(0,a.K2)((async(t,e)=>de(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})),"squareRect"),ye=(0,a.K2)(((t,e)=>{const{themeVariables:r}=(0,a.D7)(),{lineColor:i}=r,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if("handDrawn"===e.look){const t=ut(n).circle(0,0,14,bt(i));o=n.insert((()=>t))}else o=n.insert("circle",":first-child");return o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Jt(e,o),e.intersect=function(t){return ue.circle(e,7,t)},n}),"stateStart"),me=(0,a.K2)(((t,e)=>{const{themeVariables:r}=(0,a.D7)(),{lineColor:i}=r,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o,s;if("handDrawn"===e.look){const t=ut(n),e=t.circle(0,0,14,{...bt(i),roughness:.5}),r=t.circle(0,0,5,{...bt(i),fillStyle:"solid"});o=n.insert((()=>e)),s=n.insert((()=>r))}else s=n.insert("circle",":first-child"),o=n.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10);return Jt(e,o),e.intersect=function(t){return ue.circle(e,7,t)},n}),"stateEnd"),xe=(0,a.K2)(((t,e,r)=>{const{themeVariables:i}=(0,a.D7)(),{lineColor:n}=i,o=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s=70,l=10;"LR"===r&&(s=10,l=70);const c=-1*s/2,h=-1*l/2;let u;if("handDrawn"===e.look){const t=ut(o).rectangle(c,h,s,l,bt(n));u=o.insert((()=>t))}else u=o.append("rect").attr("x",c).attr("y",h).attr("width",s).attr("height",l).attr("class","fork-join");Jt(e,u);let d=0,p=0,f=10;return e.height&&(d=e.height),e.width&&(p=e.width),e.padding&&(f=e.padding),e.height=d+f/2,e.width=p+f/2,e.intersect=function(t){return ue.rect(e,t)},o}),"forkJoin"),be=(0,a.K2)(((t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{themeVariables:n}=(0,a.D7)(),{lineColor:o}=n,s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),l=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];let c;if("handDrawn"===e.look){const t=ut(s),e=l.map((function(t){return[t.x,t.y]})),r=t.polygon(e,bt(o));c=s.insert((()=>r))}else c=s.insert("polygon",":first-child").attr("points",l.map((function(t){return t.x+","+t.y})).join(" "));return c.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28).attr("style",i),e.width=28,e.height=28,e.intersect=function(t){return ue.circle(e,14,t)},s}),"choice"),Ce=(0,a.K2)((async(t,e)=>{const{themeVariables:r,handDrawnSeed:i}=(0,a.D7)(),{noteBorderColor:n,noteBkgColor:o}=r;e.useHtmlLabels||(e.centerLabel=!0);const{shapeSvg:s,bbox:l}=await Qt(t,e,"node "+e.cssClasses);a.Rm.info("Classes = ",e.cssClasses);const{cssStyles:c}=e;let h;const u=l.width+e.padding,d=l.height+e.padding,p=-u/2,f=-d/2;if("handDrawn"===e.look){const t=ut(s).rectangle(p,f,u,d,{roughness:.7,fill:o,fillWeight:3,seed:i,stroke:n});h=s.insert((()=>t),":first-child"),h.attr("class","basic label-container").attr("style",c)}else h=s.insert("rect",":first-child"),h.attr("rx",e.rx).attr("ry",e.ry).attr("x",p).attr("y",f).attr("width",u).attr("height",d);return Jt(e,h),e.intersect=function(t){return ue.rect(e,t)},s}),"note"),ke=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=o.height+e.padding,s=o.width+a/4+e.padding;let l;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=xt(-s/2,-a/2,s,a,a/2),o=t.path(i,r);l=n.insert((()=>o),":first-child"),l.attr("class","basic label-container").attr("style",c)}else l=n.insert("rect",":first-child"),l.attr("class","basic label-container").attr("style",i).attr("rx",a/2).attr("ry",a/2).attr("x",-s/2).attr("y",-a/2).attr("width",s).attr("height",a);return Jt(e,l),e.intersect=function(t){return ue.rect(e,t)},n}),"stadium"),_e=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);let n;e.labelStyle=r,n=e.cssClasses?"node "+e.cssClasses:"node default";const o=t.insert("g").attr("class",n).attr("id",e.domId||e.id),l=o.insert("g"),c=o.insert("g").attr("class","label").attr("style",i),h=e.description,u=e.label,d=c.node().appendChild(await mt(u,e.labelStyle,!0,!0));let p={width:0,height:0};if((0,a._3)((0,a.D7)()?.flowchart?.htmlLabels)){const t=d.children[0],e=(0,s.Ltv)(d);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}a.Rm.info("Text 2",h);const f=h||[],g=d.getBBox(),y=c.node().appendChild(await mt(f.join?f.join("
    "):f,e.labelStyle,!0,!0)),m=y.children[0],x=(0,s.Ltv)(y);p=m.getBoundingClientRect(),x.attr("width",p.width),x.attr("height",p.height);const b=(e.padding||0)/2;(0,s.Ltv)(y).attr("transform","translate( "+(p.width>g.width?0:(g.width-p.width)/2)+", "+(g.height+b+5)+")"),(0,s.Ltv)(d).attr("transform","translate( "+(p.width(a.Rm.debug("Rough node insert CXC",i),n)),":first-child"),v=o.insert((()=>(a.Rm.debug("Rough node insert CXC",i),i)),":first-child")}else v=l.insert("rect",":first-child"),T=l.insert("line"),v.attr("class","outer title-state").attr("style",i).attr("x",-p.width/2-b).attr("y",-p.height/2-b).attr("width",p.width+(e.padding||0)).attr("height",p.height+(e.padding||0)),T.attr("class","divider").attr("x1",-p.width/2-b).attr("x2",p.width/2+b).attr("y1",-p.height/2-b+g.height+b).attr("y2",-p.height/2-b+g.height+b);return Jt(e,v),e.intersect=function(t){return ue.rect(e,t)},o}),"rectWithTitle");function we(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,a.K2)(we,"insertPolygonShape");var ve=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=(e?.padding||0)/2,s=o.width+e.padding,l=o.height+e.padding,c=-o.width/2-a,h=-o.height/2-a,u=[{x:0,y:0},{x:s,y:0},{x:s,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=t.rectangle(c-8,h,s+16,l,r),o=t.line(c,h,c,h+l,r),a=t.line(c+s,h,c+s,h+l,r);n.insert((()=>o),":first-child"),n.insert((()=>a),":first-child");const u=n.insert((()=>i),":first-child"),{cssStyles:d}=e;u.attr("class","basic label-container").attr("style",d),Jt(e,u)}else{const t=we(n,s,l,u);i&&t.attr("style",i),Jt(e,t)}return e.intersect=function(t){return ue.polygon(e,u,t)},n}),"subroutine"),Te=(0,a.K2)(((t,e,r,i,n,o)=>[`M${t},${e+o}`,`a${n},${o} 0,0,0 ${r},0`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createCylinderPathD"),Se=(0,a.K2)(((t,e,r,i,n,o)=>[`M${t},${e+o}`,`M${t+r},${e+o}`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" ")),"createOuterCylinderPathD"),Ae=(0,a.K2)(((t,e,r,i,n,o)=>[`M${t-r/2},${-i/2}`,`a${n},${o} 0,0,0 ${r},0`].join(" ")),"createInnerCylinderPathD"),Me=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=o.width+e.padding,s=a/2,l=s/(2.5+a/50),c=o.height+l+e.padding;let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=ut(n),r=Se(0,0,a,c,s,l),i=Ae(0,l,a,c,s,l),o=t.path(r,wt(e,{})),d=t.path(i,wt(e,{fill:"none"}));h=n.insert((()=>d),":first-child"),h=n.insert((()=>o),":first-child"),h.attr("class","basic label-container"),u&&h.attr("style",u)}else{const t=Te(0,0,a,c,s,l);h=n.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",u).attr("style",i)}return h.attr("label-offset-y",l),h.attr("transform",`translate(${-a/2}, ${-(c/2+l)})`),Jt(e,h),e.intersect=function(t){const r=ue.rect(e,t),i=r.x-(e.x??0);if(0!=s&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-l)){let n=l*l*(1-i*i/(s*s));n>0&&(n=Math.sqrt(n)),n=l-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},n}),"cylinder"),Be=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,halfPadding:s}=await Qt(t,e,te(e)),l=o.width/2+s;let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=t.circle(0,0,2*l,r);c=n.insert((()=>i),":first-child"),c.attr("class","basic label-container").attr("style",h)}else c=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0);return Jt(e,c),e.intersect=function(t){return a.Rm.info("Circle intersect",e,l,t),ue.circle(e,l,t)},n}),"circle"),Le=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o,halfPadding:s}=await Qt(t,e,te(e)),l=o.width/2+s+5,c=o.width/2+s;let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{roughness:.2,strokeWidth:2.5}),i=wt(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*l,r),a=t.circle(0,0,2*c,i);h=n.insert("g",":first-child"),h.attr("class",e.cssClasses).attr("style",u),h.node()?.appendChild(o),h.node()?.appendChild(a)}else{h=n.insert("g",":first-child");const t=h.insert("circle",":first-child"),e=h.insert("circle");h.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return Jt(e,h),e.intersect=function(t){return a.Rm.info("DoubleCircle intersect",e,l,t),ue.circle(e,l,t)},n}),"doublecircle"),Fe=(0,a.K2)(((t,e,r,i)=>[`M${t-i/2},${e}`,`L${t+r},${e}`,`L${t+r},${e-i}`,`L${t-i/2},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" ")),"createPolygonPathD"),Ee=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=o.width+e.padding,s=o.height+e.padding,l=[{x:-s/2,y:0},{x:a,y:0},{x:a,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=Fe(0,0,a,s),o=t.path(i,r);c=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),h&&c.attr("style",h)}else c=we(n,a,s,l);return i&&c.attr("style",i),e.width=a+s,e.height=s,Jt(e,c),e.intersect=function(t){return ue.polygon(e,l,t)},n}),"rect_left_inv_arrow"),$e=(0,a.K2)(((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" ")),"createDecisionBoxPathD"),Oe=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),s=o.width+e.padding+(o.height+e.padding),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=$e(0,0,s),o=t.path(i,r);c=n.insert((()=>o),":first-child").attr("transform",`translate(${-s/2}, ${s/2})`),h&&c.attr("style",h)}else c=we(n,s,s,l);return i&&c.attr("style",i),Jt(e,c),e.intersect=function(t){return a.Rm.debug("APA12 Intersect called SPLIT\npoint:",t,"\nnode:\n",e,"\nres:",ue.polygon(e,l,t)),ue.polygon(e,l,t)},n}),"question"),De=(0,a.K2)(((t,e,r,i,n)=>[`M${t+n},${e}`,`L${t+r-n},${e}`,`L${t+r},${e-i/2}`,`L${t+r-n},${e-i}`,`L${t+n},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" ")),"createHexagonPathD"),Ie=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=o.height+e.padding,s=a/4,l=o.width+2*s+e.padding,c=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}];let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=De(0,0,l,a,s),o=t.path(i,r);h=n.insert((()=>o),":first-child").attr("transform",`translate(${-l/2}, ${a/2})`),u&&h.attr("style",u)}else h=we(n,l,a,c);return i&&h.attr("style",i),e.width=l,e.height=a,Jt(e,h),e.intersect=function(t){return ue.polygon(e,c,t)},n}),"hexagon"),Re=(0,a.K2)(((t,e,r,i)=>[`M${t-2*i/6},${e}`,`L${t+r-i/6},${e}`,`L${t+r+2*i/6},${e-i}`,`L${t+i/6},${e-i}`,"Z"].join(" ")),"createLeanRightPathD"),Pe=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=o.width+e.padding,s=o.height+e.padding,l=[{x:-2*s/6,y:0},{x:a-s/6,y:0},{x:a+2*s/6,y:-s},{x:s/6,y:-s}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=Re(0,0,a,s),o=t.path(i,r);c=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),h&&c.attr("style",h)}else c=we(n,a,s,l);return i&&c.attr("style",i),e.width=a,e.height=s,Jt(e,c),e.intersect=function(t){return ue.polygon(e,l,t)},n}),"lean_right"),Ne=(0,a.K2)(((t,e,r,i)=>[`M${t+2*i/6},${e}`,`L${t+r+i/6},${e}`,`L${t+r-2*i/6},${e-i}`,`L${t-i/6},${e-i}`,"Z"].join(" ")),"createLeanLeftPathD"),qe=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=o.width+e.padding,s=o.height+e.padding,l=[{x:2*s/6,y:0},{x:a+s/6,y:0},{x:a-2*s/6,y:-s},{x:-s/6,y:-s}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=Ne(0,0,a,s),o=t.path(i,r);c=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),h&&c.attr("style",h)}else c=we(n,a,s,l);return i&&c.attr("style",i),e.width=a,e.height=s,Jt(e,c),e.intersect=function(t){return ue.polygon(e,l,t)},n}),"lean_left"),ze=(0,a.K2)(((t,e,r,i)=>[`M${t-2*i/6},${e}`,`L${t+r+2*i/6},${e}`,`L${t+r-i/6},${e-i}`,`L${t+i/6},${e-i}`,"Z"].join(" ")),"createTrapezoidPathD"),Ke=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=o.width+e.padding,s=o.height+e.padding,l=[{x:-2*s/6,y:0},{x:a+2*s/6,y:0},{x:a-s/6,y:-s},{x:s/6,y:-s}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=ze(0,0,a,s),o=t.path(i,r);c=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),h&&c.attr("style",h)}else c=we(n,a,s,l);return i&&c.attr("style",i),e.width=a,e.height=s,Jt(e,c),e.intersect=function(t){return ue.polygon(e,l,t)},n}),"trapezoid"),je=(0,a.K2)(((t,e,r,i)=>[`M${t+i/6},${e}`,`L${t+r-i/6},${e}`,`L${t+r+2*i/6},${e-i}`,`L${t-2*i/6},${e-i}`,"Z"].join(" ")),"createInvertedTrapezoidPathD"),We=(0,a.K2)((async(t,e)=>{const{labelStyles:r,nodeStyles:i}=_t(e);e.labelStyle=r;const{shapeSvg:n,bbox:o}=await Qt(t,e,te(e)),a=o.width+e.padding,s=o.height+e.padding,l=[{x:s/6,y:0},{x:a-s/6,y:0},{x:a+2*s/6,y:-s},{x:-2*s/6,y:-s}];let c;const{cssStyles:h}=e;if("handDrawn"===e.look){const t=ut(n),r=wt(e,{}),i=je(0,0,a,s),o=t.path(i,r);c=n.insert((()=>o),":first-child").attr("transform",`translate(${-a/2}, ${s/2})`),h&&c.attr("style",h)}else c=we(n,a,s,l);return i&&c.attr("style",i),e.width=a,e.height=s,Jt(e,c),e.intersect=function(t){return ue.polygon(e,l,t)},n}),"inv_trapezoid"),Ue={state:pe,stateStart:ye,stateEnd:me,fork:xe,join:xe,choice:be,note:Ce,roundedRect:fe,rectWithTitle:_e,squareRect:ge,stadium:ke,subroutine:ve,cylinder:Me,circle:Be,doublecircle:Le,odd:Ee,diamond:Oe,hexagon:Ie,lean_right:Pe,lean_left:qe,trapezoid:Ke,inv_trapezoid:We,labelRect:(0,a.K2)((async(t,e)=>{const{shapeSvg:r}=await Qt(t,e,"label"),i=r.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),Jt(e,i),e.intersect=function(t){return ue.rect(e,t)},r}),"labelRect")},He=new Map,Ye=(0,a.K2)((async(t,e,r)=>{let i,n;if("rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect"),e.link){let o;"sandbox"===(0,a.D7)().securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o),n=await Ue[e.shape](i,e,r)}else n=await Ue[e.shape](t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),He.set(e.id,i),e.haveCallback&&He.get(e.id).attr("class",He.get(e.id).attr("class")+" clickable"),i}),"insertNode"),Ve=(0,a.K2)(((t,e)=>{He.set(e.id,t)}),"setNodeElem"),Ge=(0,a.K2)((()=>{He.clear()}),"clear"),Ze=(0,a.K2)((t=>{const e=He.get(t.id);a.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode")},8852:(t,e,r)=>{"use strict";r.d(e,{D:()=>o});var i=r(798),n=r(4852),o=(0,i.K2)((t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,n.Ltv)("body");if("sandbox"===e){const e=(0,n.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,n.Ltv)(i.body)}return r.select(`#${t}`)}),"selectSvgElement")},798:(t,e,r)=>{"use strict";r.d(e,{C0:()=>v,VA:()=>y,K2:()=>g,xA:()=>ht,hH:()=>F,Dl:()=>Nt,IU:()=>ee,Wt:()=>Zt,Y2:()=>zt,a$:()=>Wt,sb:()=>Q,ME:()=>de,UI:()=>G,Ch:()=>S,mW:()=>T,DB:()=>_,_3:()=>Bt,EJ:()=>k,m7:()=>oe,iN:()=>ie,zj:()=>lt,D7:()=>he,Gs:()=>xe,J$:()=>B,ab:()=>se,Q2:()=>at,P$:()=>q,Wi:()=>Pt,H1:()=>yt,Rm:()=>x,QO:()=>Et,Js:()=>me,Xd:()=>A,VJ:()=>qt,cL:()=>ut,$i:()=>Z,jZ:()=>_t,wZ:()=>nt,EI:()=>ne,SV:()=>re,Nk:()=>st,XV:()=>ue,ke:()=>ae,He:()=>b,UU:()=>it,ot:()=>Ut,mj:()=>fe,tM:()=>Gt,H$:()=>W,B6:()=>ot});var i=r(4353),n=r(1931),o=r(8232);const a=(t,e)=>{const r=n.A.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,o.A)(t,i)};var s=r(5582);const l=(t,e=100)=>{const r=n.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:o,b:a,a:l}=n.A.parse(t),{r:c,g:h,b:u,a:d}=n.A.parse(e),p=r/100,f=2*p-1,g=l-d,y=((f*g==-1?f:(f+g)/(1+f*g))+1)/2,m=1-y,x=i*y+c*m,b=o*y+h*m,C=a*y+u*m,k=l*p+d*(1-p);return(0,s.A)(x,b,C,k)})(r,t,e)};var c,h=r(5263),u=r(8041),d=r(5097),p=r(2838),f=Object.defineProperty,g=(t,e)=>f(t,"name",{value:e,configurable:!0}),y=(t,e)=>{for(var r in e)f(t,r,{get:e[r],enumerable:!0})},m={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},x={trace:g(((...t)=>{}),"trace"),debug:g(((...t)=>{}),"debug"),info:g(((...t)=>{}),"info"),warn:g(((...t)=>{}),"warn"),error:g(((...t)=>{}),"error"),fatal:g(((...t)=>{}),"fatal")},b=g((function(t="fatal"){let e=m.fatal;"string"==typeof t?t.toLowerCase()in m&&(e=m[t]):"number"==typeof t&&(e=t),x.trace=()=>{},x.debug=()=>{},x.info=()=>{},x.warn=()=>{},x.error=()=>{},x.fatal=()=>{},e<=m.fatal&&(x.fatal=console.error?console.error.bind(console,C("FATAL"),"color: orange"):console.log.bind(console,"",C("FATAL"))),e<=m.error&&(x.error=console.error?console.error.bind(console,C("ERROR"),"color: orange"):console.log.bind(console,"",C("ERROR"))),e<=m.warn&&(x.warn=console.warn?console.warn.bind(console,C("WARN"),"color: orange"):console.log.bind(console,"",C("WARN"))),e<=m.info&&(x.info=console.info?console.info.bind(console,C("INFO"),"color: lightblue"):console.log.bind(console,"",C("INFO"))),e<=m.debug&&(x.debug=console.debug?console.debug.bind(console,C("DEBUG"),"color: lightgreen"):console.log.bind(console,"",C("DEBUG"))),e<=m.trace&&(x.trace=console.debug?console.debug.bind(console,C("TRACE"),"color: lightgreen"):console.log.bind(console,"",C("TRACE")))}),"setLogLevel"),C=g((t=>`%c${i().format("ss.SSS")} : ${t} : `),"format"),k=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,_=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,w=/\s*%%.*\n/gm,v=class extends Error{static{g(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},T={},S=g((function(t,e){t=t.replace(k,"").replace(_,"").replace(w,"\n");for(const[r,{detector:i}]of Object.entries(T))if(i(t,e))return r;throw new v(`No diagram type detected matching given configuration for text: ${t}`)}),"detectType"),A=g(((...t)=>{for(const{id:e,detector:r,loader:i}of t)M(e,r,i)}),"registerLazyLoadedDiagrams"),M=g(((t,e,r)=>{T[t]&&x.warn(`Detector with key ${t} already exists. Overwriting.`),T[t]={detector:e,loader:r},x.debug(`Detector with key ${t} added${r?" with loader":""}`)}),"addDetector"),B=g((t=>T[t].loader),"getDiagramLoader"),L=g(((t,e,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach((e=>L(t,e,n))),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach((e=>{t.includes(e)||t.push(e)})),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach((n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(i||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=L(t[n],e[n],{depth:r-1,clobber:i}))})),t)}),"assignWithDepth"),F=L,E="#ffffff",$="#f2f2f2",O=g(((t,e)=>a(t,e?{s:-40,l:10}:{s:-40,l:-10})),"mkBorder"),D=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||a(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||a(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||O(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||O(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||O(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||l(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||l(this.tertiaryColor),this.lineColor=this.lineColor||l(this.background),this.arrowheadColor=this.arrowheadColor||l(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,h.A)(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||(0,h.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||l(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.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.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},I=g((t=>{const e=new D;return e.calculate(t),e}),"getThemeVariables"),R=class{static{g(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=l(this.background),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(l("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,h.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,h.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,u.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=(0,u.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=(0,u.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=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=a(this.primaryColor,{h:64}),this.fillType3=a(this.secondaryColor,{h:64}),this.fillType4=a(this.primaryColor,{h:-64}),this.fillType5=a(this.secondaryColor,{h:-64}),this.fillType6=a(this.primaryColor,{h:128}),this.fillType7=a(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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},P=g((t=>{const e=new R;return e.calculate(t),e}),"getThemeVariables"),N=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=a(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="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.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=(0,s.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},q=g((t=>{const e=new N;return e.calculate(t),e}),"getThemeVariables"),z=class{static{g(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,u.A)("#cde498",10),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.primaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,h.A)(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||a(this.primaryColor,{h:30}),this.cScale4=this.cScale4||a(this.primaryColor,{h:60}),this.cScale5=this.cScale5||a(this.primaryColor,{h:90}),this.cScale6=this.cScale6||a(this.primaryColor,{h:120}),this.cScale7=this.cScale7||a(this.primaryColor,{h:150}),this.cScale8=this.cScale8||a(this.primaryColor,{h:210}),this.cScale9=this.cScale9||a(this.primaryColor,{h:270}),this.cScale10=this.cScale10||a(this.primaryColor,{h:300}),this.cScale11=this.cScale11||a(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,h.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,h.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},K=g((t=>{const e=new z;return e.calculate(t),e}),"getThemeVariables"),j=class{static{g(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=a(this.primaryColor,{h:-160}),this.primaryBorderColor=O(this.primaryColor,this.darkMode),this.secondaryBorderColor=O(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=O(this.tertiaryColor,this.darkMode),this.primaryTextColor=l(this.primaryColor),this.secondaryTextColor=l(this.secondaryColor),this.tertiaryTextColor=l(this.tertiaryColor),this.lineColor=l(this.background),this.textColor=l(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=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.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,u.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.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 t=0;t{this[e]=t[e]})),this.updateColors(),e.forEach((e=>{this[e]=t[e]}))}},W={base:{getThemeVariables:I},dark:{getThemeVariables:P},default:{getThemeVariables:q},forest:{getThemeVariables:K},neutral:{getThemeVariables:g((t=>{const e=new j;return e.calculate(t),e}),"getThemeVariables")}},U={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,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:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},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},H={...U,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"SIMPLE"},themeCSS:void 0,themeVariables:W.default.getThemeVariables(),sequence:{...U.sequence,messageFont:g((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont"),noteFont:g((function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}}),"noteFont"),actorFont:g((function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}),"actorFont")},gantt:{...U.gantt,tickInterval:void 0,useWidth:void 0},c4:{...U.c4,useWidth:void 0,personFont:g((function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}}),"personFont"),external_personFont:g((function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}}),"external_personFont"),systemFont:g((function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}}),"systemFont"),external_systemFont:g((function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}}),"external_systemFont"),system_dbFont:g((function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}}),"system_dbFont"),external_system_dbFont:g((function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}}),"external_system_dbFont"),system_queueFont:g((function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}}),"system_queueFont"),external_system_queueFont:g((function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}}),"external_system_queueFont"),containerFont:g((function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}}),"containerFont"),external_containerFont:g((function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}}),"external_containerFont"),container_dbFont:g((function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}}),"container_dbFont"),external_container_dbFont:g((function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}}),"external_container_dbFont"),container_queueFont:g((function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}}),"container_queueFont"),external_container_queueFont:g((function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}}),"external_container_queueFont"),componentFont:g((function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}}),"componentFont"),external_componentFont:g((function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}}),"external_componentFont"),component_dbFont:g((function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}}),"component_dbFont"),external_component_dbFont:g((function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}}),"external_component_dbFont"),component_queueFont:g((function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}}),"component_queueFont"),external_component_queueFont:g((function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}}),"external_component_queueFont"),boundaryFont:g((function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}}),"boundaryFont"),messageFont:g((function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}),"messageFont")},pie:{...U.pie,useWidth:984},xyChart:{...U.xyChart,useWidth:void 0},requirement:{...U.requirement,useWidth:void 0},packet:{...U.packet}},Y=g(((t,e="")=>Object.keys(t).reduce(((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...Y(t[i],"")]:[...r,e+i]),[])),"keyify"),V=new Set(Y(H,"")),G=H,Z=g((t=>{if(x.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach((t=>Z(t)));else{for(const e of Object.keys(t)){if(x.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!V.has(e)||null==t[e]){x.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){x.debug("sanitizing object",e),Z(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)e.includes(i)&&(x.debug("sanitizing css option",e),t[e]=X(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}x.debug("After sanitization",t)}}),"sanitizeDirective"),X=g((t=>{let e=0,r=0;for(const i of t){if(e{let r=F({},t),i={};for(const t of e)ct(t),i=F(i,t);if(r=F(r,i),i.theme&&i.theme in W){const t=F({},c),e=F(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in W&&(r.themeVariables=W[r.theme].getThemeVariables(e))}return gt(et=r),et}),"updateCurrentConfig"),it=g((t=>(J=F({},Q),J=F(J,t),t.theme&&W[t.theme]&&(J.themeVariables=W[t.theme].getThemeVariables(t.themeVariables)),rt(J,tt),J)),"setSiteConfig"),nt=g((t=>{c=F({},t)}),"saveConfigFromInitialize"),ot=g((t=>(J=F(J,t),rt(J,tt),J)),"updateSiteConfig"),at=g((()=>F({},J)),"getSiteConfig"),st=g((t=>(gt(t),F(et,t),lt())),"setConfig"),lt=g((()=>F({},et)),"getConfig"),ct=g((t=>{t&&(["secure",...J.secure??[]].forEach((e=>{Object.hasOwn(t,e)&&(x.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])})),Object.keys(t).forEach((e=>{e.startsWith("__")&&delete t[e]})),Object.keys(t).forEach((e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&ct(t[e])})))}),"sanitize"),ht=g((t=>{Z(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),tt.push(t),rt(J,tt)}),"addDirective"),ut=g(((t=J)=>{rt(t,tt=[])}),"reset"),dt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},pt={},ft=g((t=>{pt[t]||(x.warn(dt[t]),pt[t]=!0)}),"issueWarning"),gt=g((t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&ft("LAZY_LOAD_DEPRECATED")}),"checkConfig"),yt=//gi,mt=g((t=>t?At(t).replace(/\\n/g,"#br#").split("#br#"):[""]),"getRows"),xt=(()=>{let t=!1;return()=>{t||(bt(),t=!0)}})();function bt(){const t="data-temp-href-target";p.addHook("beforeSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")})),p.addHook("afterSanitizeAttributes",(e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))}))}g(bt,"setupDompurifyHooks");var Ct=g((t=>(xt(),p.sanitize(t))),"removeScript"),kt=g(((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=Ct(t):"loose"!==r&&(t=(t=(t=At(t)).replace(//g,">")).replace(/=/g,"="),t=St(t))}return t}),"sanitizeMore"),_t=g(((t,e)=>t?t=e.dompurifyConfig?p.sanitize(kt(t,e),e.dompurifyConfig).toString():p.sanitize(kt(t,e),{FORBID_TAGS:["style"]}).toString():t),"sanitizeText"),wt=g(((t,e)=>"string"==typeof t?_t(t,e):t.flat().map((t=>_t(t,e)))),"sanitizeTextOrArray"),vt=g((t=>yt.test(t)),"hasBreaks"),Tt=g((t=>t.split(yt)),"splitBreaks"),St=g((t=>t.replace(/#br#/g,"
    ")),"placeholderToBreak"),At=g((t=>t.replace(yt,"#br#")),"breakToPlaceholder"),Mt=g((t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e}),"getUrl"),Bt=g((t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Lt=g((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.max(...e)}),"getMax"),Ft=g((function(...t){const e=t.filter((t=>!isNaN(t)));return Math.min(...e)}),"getMin"),Et=g((function(t){const e=t.split(/(,)/),r=[];for(let t=0;t0&&t+1Math.max(0,t.split(e).length-1)),"countOccurrence"),Ot=g(((t,e)=>{const r=$t(t,"~"),i=$t(e,"~");return 1===r&&1===i}),"shouldCombineSets"),Dt=g((t=>{const e=$t(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),o=i.lastIndexOf("~");for(;-1!==n&&-1!==o&&n!==o;)i[n]="<",i[o]=">",n=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")}),"processSet"),It=g((()=>void 0!==window.MathMLElement),"isMathMLSupported"),Rt=/\$\$(.*)\$\$/g,Pt=g((t=>(t.match(Rt)?.length??0)>0),"hasKatex"),Nt=g((async(t,e)=>{t=await qt(t,e);const r=document.createElement("div");r.innerHTML=t,r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n}),"calculateMathMLDimensions"),qt=g((async(t,e)=>{if(!Pt(t))return t;if(!(It()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Rt,"MathML is unsupported in this environment.");const{default:i}=await r.e(130).then(r.bind(r,2130)),n=e.forceLegacyMathML||!It()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(yt).map((t=>Pt(t)?`
    ${t}
    `:`
    ${t}
    `)).join("").replace(Rt,((t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,"")))}),"renderKatex"),zt={getRows:mt,sanitizeText:_t,sanitizeTextOrArray:wt,hasBreaks:vt,splitBreaks:Tt,lineBreakRegex:yt,removeScript:Ct,getUrl:Mt,evaluate:Bt,getMax:Lt,getMin:Ft},Kt=g((function(t,e){for(let r of e)t.attr(r[0],r[1])}),"d3Attrs"),jt=g((function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i}),"calculateSvgSizeAttrs"),Wt=g((function(t,e,r,i){const n=jt(e,r,i);Kt(t,n)}),"configureSvgSize"),Ut=g((function(t,e,r,i){const n=e.node().getBBox(),o=n.width,a=n.height;x.info(`SVG bounds: ${o}x${a}`,n);let s=0,l=0;x.info(`Graph bounds: ${s}x${l}`,t),s=o+2*r,l=a+2*r,x.info(`Calculated bounds: ${s}x${l}`),Wt(e,l,s,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",c)}),"setupGraphViewbox"),Ht={},Yt=g(((t,e,r)=>{let i="";return t in Ht&&Ht[t]?i=Ht[t](r):x.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${i}\n\n ${e}\n`}),"getStyles"),Vt=g(((t,e)=>{void 0!==e&&(Ht[t]=e)}),"addStylesForDiagram"),Gt=Yt,Zt={};y(Zt,{clear:()=>ee,getAccDescription:()=>oe,getAccTitle:()=>ie,getDiagramTitle:()=>se,setAccDescription:()=>ne,setAccTitle:()=>re,setDiagramTitle:()=>ae});var Xt="",Qt="",Jt="",te=g((t=>_t(t,lt())),"sanitizeText"),ee=g((()=>{Xt="",Jt="",Qt=""}),"clear"),re=g((t=>{Xt=te(t).replace(/^\s+/g,"")}),"setAccTitle"),ie=g((()=>Xt),"getAccTitle"),ne=g((t=>{Jt=te(t).replace(/\n\s+/g,"\n")}),"setAccDescription"),oe=g((()=>Jt),"getAccDescription"),ae=g((t=>{Qt=te(t)}),"setDiagramTitle"),se=g((()=>Qt),"getDiagramTitle"),le=x,ce=b,he=lt,ue=st,de=Q,pe=g((t=>_t(t,he())),"sanitizeText"),fe=Ut,ge=g((()=>Zt),"getCommonDb"),ye={},me=g(((t,e,r)=>{ye[t]&&le.warn(`Diagram with id ${t} already registered. Overwriting.`),ye[t]=e,r&&M(t,r),Vt(t,e.styles),e.injectUtils?.(le,ce,he,pe,fe,ge(),(()=>{}))}),"registerDiagram"),xe=g((t=>{if(t in ye)return ye[t];throw new be(t)}),"getDiagram"),be=class extends Error{static{g(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},8252:(t,e,r)=>{"use strict";r.d(e,{W6:()=>St,GZ:()=>Lt,hE:()=>Bt});var i=r(7323),n=r(798),o=r(4852);let a={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function s(t){a=t}const l=/[&<>"']/,c=new RegExp(l.source,"g"),h=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,u=new RegExp(h.source,"g"),d={"&":"&","<":"<",">":">",'"':""","'":"'"},p=t=>d[t];function f(t,e){if(e){if(l.test(t))return t.replace(c,p)}else if(h.test(t))return t.replace(u,p);return t}const g=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,y=/(^|[^\[])\^/g;function m(t,e){let r="string"==typeof t?t:t.source;e=e||"";const i={replace:(t,e)=>{let n="string"==typeof e?e:e.source;return n=n.replace(y,"$1"),r=r.replace(t,n),i},getRegex:()=>new RegExp(r,e)};return i}function x(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}const b={exec:()=>null};function C(t,e){const r=t.replace(/\|/g,((t,e,r)=>{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"})).split(/ \|/);let i=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:k(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],r=function(t,e){const r=t.match(/^(\s+)(?:```)/);if(null===r)return e;const i=r[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[r]=e;return r.length>=i.length?t.slice(i.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=k(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:k(e[0],"\n")}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let t=k(e[0],"\n").split("\n"),r="",i="";const n=[];for(;t.length>0;){let e=!1;const o=[];let a;for(a=0;a/.test(t[a]))o.push(t[a]),e=!0;else{if(e)break;o.push(t[a])}t=t.slice(a);const s=o.join("\n"),l=s.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,"\n $1").replace(/^ {0,3}>[ \t]?/gm,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,n,!0),this.lexer.state.top=c,0===t.length)break;const h=n[n.length-1];if("code"===h?.type)break;if("blockquote"===h?.type){const e=h,o=e.raw+"\n"+t.join("\n"),a=this.blockquote(o);n[n.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,i=i.substring(0,i.length-e.text.length)+a.text;break}if("list"!==h?.type);else{const e=h,o=e.raw+"\n"+t.join("\n"),a=this.list(o);n[n.length-1]=a,r=r.substring(0,r.length-h.raw.length)+a.raw,i=i.substring(0,i.length-e.raw.length)+a.raw,t=o.substring(n[n.length-1].raw.length).split("\n")}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim();const i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");const o=new RegExp(`^( {0,3}${r})((?:[\t ][^\\n]*)?(?:\\n|$))`);let a=!1;for(;t;){let r=!1,i="",s="";if(!(e=o.exec(t)))break;if(this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(/^\t+/,(t=>" ".repeat(3*t.length))),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(/[^ ]/),u=u>4?1:u,s=l.slice(u),u+=e[1].length),h&&/^ *$/.test(c)&&(i+=c+"\n",t=t.substring(c.length+1),r=!0),!r){const e=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),n=new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),o=new RegExp(`^ {0,${Math.min(3,u-1)}}#`);for(;t;){const a=t.split("\n",1)[0];if(c=a,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),n.test(c))break;if(o.test(c))break;if(e.test(c))break;if(r.test(t))break;if(c.search(/[^ ]/)>=u||!c.trim())s+="\n"+c.slice(u);else{if(h)break;if(l.search(/[^ ]/)>=4)break;if(n.test(l))break;if(o.test(l))break;if(r.test(l))break;s+="\n"+c}h||c.trim()||(h=!0),i+=a+"\n",t=t.substring(a.length+1),l=c.slice(u)}}n.loose||(a?n.loose=!0:/\n *\n *$/.test(i)&&(a=!0));let d,p=null;this.options.gfm&&(p=/^\[[ xX]\] /.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(/^\[[ xX]\] +/,""))),n.items.push({type:"list_item",raw:i,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),n.raw+=i}n.items[n.items.length-1].raw=n.items[n.items.length-1].raw.trimEnd(),n.items[n.items.length-1].text=n.items[n.items.length-1].text.trimEnd(),n.raw=n.raw.trimEnd();for(let t=0;t"space"===t.type)),r=e.length>0&&e.some((t=>/\n.*\n/.test(t.raw)));n.loose=r}if(n.loose)for(let t=0;t$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){const e=this.rules.block.table.exec(t);if(!e)return;if(!/[:|]/.test(e[2]))return;const r=C(e[1]),i=e[2].replace(/^\||\| *$/g,"").split("|"),n=e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(const t of i)/^ *-+: *$/.test(t)?o.align.push("right"):/^ *:-+: *$/.test(t)?o.align.push("center"):/^ *:-+ *$/.test(t)?o.align.push("left"):o.align.push(null);for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]}))));return o}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:f(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^
    /i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^$/.test(t))return;const e=k(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i-1){const r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),/^$/.test(t)?r.slice(1):r.slice(1,-1)),_(e,{href:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r,title:i?i.replace(this.rules.inline.anyPunctuation,"$1"):i},e[0],this.lexer)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){const t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()];if(!t){const t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return _(r,t,r[0],this.lexer)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(i&&(!i[3]||!r.match(/[\p{L}\p{N}]/u))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){const r=[...i[0]].length-1;let n,o,a=r,s=0;const l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+r);null!=(i=l.exec(e));){if(n=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!n)continue;if(o=[...n].length,i[3]||i[4]){a+=o;continue}if((i[5]||i[6])&&r%3&&!((r+o)%3)){s+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+s);const e=[...i[0]][0].length,l=t.slice(0,r+i.index+e+o);if(Math.min(r,o)%2){const t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const r=/[^ ]/.test(t),i=/^ /.test(t)&&/ $/.test(t);return r&&i&&(t=t.substring(1,t.length-1)),t=f(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=f(e[1]),r="mailto:"+t):(t=f(e[1]),r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=f(e[0]),r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=f(e[0]),r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){let t;return t=this.lexer.state.inRawBlock?e[0]:f(e[0]),{type:"text",raw:e[0],text:t}}}}const v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,T=/(?:[*+-]|\d{1,9}[.)])/,S=m(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,T).replace(/blockCode/g,/ {4}/).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/).getRegex(),A=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,M=/(?!\s*\])(?:\\.|[^\[\]\\])+/,B=m(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",M).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),L=m(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,T).getRegex(),F="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",E=/|$))/,$=m("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",E).replace("tag",F).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O=m(A).replace("hr",v).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",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),D={blockquote:m(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",O).getRegex(),code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,def:B,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:v,html:$,lheading:S,list:L,newline:/^(?: *(?:\n|$))+/,paragraph:O,table:b,text:/^[^\n]+/},I=m("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex(),R={...D,table:I,paragraph:m(A).replace("hr",v).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",I).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",F).getRegex()},P={...D,html:m("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",E).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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:b,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:m(A).replace("hr",v).replace("heading"," *#{1,6} *[^\n]").replace("lheading",S).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},N=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,q=/^( {2,}|\\)\n(?!\s*$)/,z="\\p{P}\\p{S}",K=m(/^((?![*_])[\spunctuation])/,"u").replace(/punctuation/g,z).getRegex(),j=m(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,z).getRegex(),W=m("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,z).getRegex(),U=m("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,z).getRegex(),H=m(/\\([punct])/,"gu").replace(/punct/g,z).getRegex(),Y=m(/^<(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(),V=m(E).replace("(?:--\x3e|$)","--\x3e").getRegex(),G=m("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",V).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Z=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,X=m(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",Z).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Q=m(/^!?\[(label)\]\[(ref)\]/).replace("label",Z).replace("ref",M).getRegex(),J=m(/^!?\[(ref)\](?:\[\])?/).replace("ref",M).getRegex(),tt={_backpedal:b,anyPunctuation:H,autolink:Y,blockSkip:/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g,br:q,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:b,emStrongLDelim:j,emStrongRDelimAst:W,emStrongRDelimUnd:U,escape:N,link:X,nolink:J,punctuation:K,reflink:Q,reflinkSearch:m("reflink|nolink(?!\\()","g").replace("reflink",Q).replace("nolink",J).getRegex(),tag:G,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\e+" ".repeat(r.length)));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))))if(i=this.tokenizer.space(t))t=t.substring(i.raw.length),1===i.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(i);else if(i=this.tokenizer.code(t))t=t.substring(i.raw.length),n=e[e.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?e.push(i):(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.fences(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.heading(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.hr(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.blockquote(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.list(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.html(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.def(t))t=t.substring(i.raw.length),n=e[e.length-1],!n||"paragraph"!==n.type&&"text"!==n.type?this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title}):(n.raw+="\n"+i.raw,n.text+="\n"+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text);else if(i=this.tokenizer.table(t))t=t.substring(i.raw.length),e.push(i);else if(i=this.tokenizer.lheading(t))t=t.substring(i.raw.length),e.push(i);else{if(o=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startBlock.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(o=t.substring(0,e+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o)))n=e[e.length-1],r&&"paragraph"===n?.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);else if(i=this.tokenizer.text(t))t=t.substring(i.raw.length),n=e[e.length-1],n&&"text"===n.type?(n.raw+="\n"+i.raw,n.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(i);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i,n,o,a,s,l=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(l));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(l));)l=l.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(l));)l=l.slice(0,o.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))))if(r=this.tokenizer.escape(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.tag(t))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.link(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(r.raw.length),i=e[e.length-1],i&&"text"===r.type&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(r=this.tokenizer.emStrong(t,l,s))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.codespan(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.br(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.del(t))t=t.substring(r.raw.length),e.push(r);else if(r=this.tokenizer.autolink(t))t=t.substring(r.raw.length),e.push(r);else if(this.state.inLink||!(r=this.tokenizer.url(t))){if(n=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const r=t.slice(1);let i;this.options.extensions.startInline.forEach((t=>{i=t.call({lexer:this},r),"number"==typeof i&&i>=0&&(e=Math.min(e,i))})),e<1/0&&e>=0&&(n=t.substring(0,e+1))}if(r=this.tokenizer.inlineText(n))t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),a=!0,i=e[e.length-1],i&&"text"===i.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(r.raw.length),e.push(r);return e}}class st{options;parser;constructor(t){this.options=t||a}space(t){return""}code({text:t,lang:e,escaped:r}){const i=(e||"").match(/^\S*/)?.[0],n=t.replace(/\n$/,"")+"\n";return i?'
    '+(r?n:f(n,!0))+"
    \n":"
    "+(r?n:f(n,!0))+"
    \n"}blockquote({tokens:t}){return`
    \n${this.parser.parse(t)}
    \n`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
    \n"}list(t){const e=t.ordered,r=t.start;let i="";for(let e=0;e\n"+i+"\n"}listitem(t){let e="";if(t.task){const r=this.checkbox({checked:!!t.checked});t.loose?t.tokens.length>0&&"paragraph"===t.tokens[0].type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+t.tokens[0].tokens[0].text)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" "}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",r="";for(let e=0;e${i}`),"\n\n"+e+"\n"+i+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){const e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){const i=this.parser.parseInline(r),n=x(t);if(null===n)return i;let o='
    ",o}image({href:t,title:e,text:r}){const i=x(t);if(null===i)return r;let n=`${r}{const n=t[i].flat(1/0);r=r.concat(this.walkTokens(n,e))})):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach((t=>{const r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){const r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");const r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)})),r.extensions=e),t.renderer){const e=this.defaults.renderer||new st(this.defaults);for(const r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;const i=r;let n=t.renderer[i];t.useNewRenderer||(n=this.#e(n,i,e));const o=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){const e=this.defaults.tokenizer||new w(this.defaults);for(const r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;const i=r,n=t.tokenizer[i],o=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){const e=this.defaults.hooks||new ht;for(const r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if("options"===r)continue;const i=r,n=t.hooks[i],o=e[i];ht.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async)return Promise.resolve(n.call(e,t)).then((t=>o.call(e,t)));const r=n.call(e,t);return o.call(e,r)}:e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){const e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}})),this}#e(t,e,r){switch(e){case"heading":return function(i){return i.type&&i.type===e?t.call(this,r.parser.parseInline(i.tokens),i.depth,function(t){return t.replace(g,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}(r.parser.parseInline(i.tokens,r.parser.textRenderer))):t.apply(this,arguments)};case"code":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.lang,!!r.escaped):t.apply(this,arguments)};case"table":return function(r){if(!r.type||r.type!==e)return t.apply(this,arguments);let i="",n="";for(let t=0;t0&&"paragraph"===e.tokens[0].type?(e.tokens[0].text=t+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=t+" "+e.tokens[0].tokens[0].text)):e.tokens.unshift({type:"text",text:t+" "}):s+=t+" "}s+=this.parser.parse(e.tokens,o),a+=this.listitem({type:"list_item",raw:s,text:s,task:n,checked:!!i,loose:o,tokens:e.tokens})}return t.call(this,a,i,n)};case"html":return function(r){return r.type&&r.type===e?t.call(this,r.text,r.block):t.apply(this,arguments)};case"paragraph":case"strong":case"em":case"del":return function(r){return r.type&&r.type===e?t.call(this,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"escape":case"codespan":case"text":return function(r){return r.type&&r.type===e?t.call(this,r.text):t.apply(this,arguments)};case"link":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,this.parser.parseInline(r.tokens)):t.apply(this,arguments)};case"image":return function(r){return r.type&&r.type===e?t.call(this,r.href,r.title,r.text):t.apply(this,arguments)}}return t}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return at.lex(t,e??this.defaults)}parser(t,e){return ct.parse(t,e??this.defaults)}#t(t,e){return(r,i)=>{const n={...i},o={...this.defaults,...n};!0===this.defaults.async&&!1===n.async&&(o.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),o.async=!0);const a=this.#r(!!o.silent,!!o.async);if(null==r)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof r)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.async)return Promise.resolve(o.hooks?o.hooks.preprocess(r):r).then((e=>t(e,o))).then((t=>o.hooks?o.hooks.processAllTokens(t):t)).then((t=>o.walkTokens?Promise.all(this.walkTokens(t,o.walkTokens)).then((()=>t)):t)).then((t=>e(t,o))).then((t=>o.hooks?o.hooks.postprocess(t):t)).catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let i=t(r,o);o.hooks&&(i=o.hooks.processAllTokens(i)),o.walkTokens&&this.walkTokens(i,o.walkTokens);let n=e(i,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(t){return a(t)}}}#r(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){const t="

    An error occurred:

    "+f(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function dt(t,e){return ut.parse(t,e)}dt.options=dt.setOptions=function(t){return ut.setOptions(t),dt.defaults=ut.defaults,s(dt.defaults),dt},dt.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},dt.defaults=a,dt.use=function(...t){return ut.use(...t),dt.defaults=ut.defaults,s(dt.defaults),dt},dt.walkTokens=function(t,e){return ut.walkTokens(t,e)},dt.parseInline=ut.parseInline,dt.Parser=ct,dt.parser=ct.parse,dt.Renderer=st,dt.TextRenderer=lt,dt.Lexer=at,dt.lexer=at.lex,dt.Tokenizer=w,dt.Hooks=ht,dt.parse=dt,dt.options,dt.setOptions,dt.use,dt.walkTokens,dt.parseInline,ct.parse,at.lex;var pt=r(513);function ft(t,{markdownAutoWrap:e}){const r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n"),i=(0,pt.T)(r);return!1===e?i.replace(/ /g," "):i}function gt(t,e={}){const r=ft(t,e),i=dt.lexer(r),o=[[]];let a=0;function s(t,e="normal"){"text"===t.type?t.text.split("\n").forEach(((t,r)=>{0!==r&&(a++,o.push([])),t.split(" ").forEach((t=>{t&&o[a].push({content:t,type:e})}))})):"strong"===t.type||"em"===t.type?t.tokens.forEach((e=>{s(e,t.type)})):"html"===t.type&&o[a].push({content:t.text,type:"normal"})}return(0,n.K2)(s,"processNode"),i.forEach((t=>{"paragraph"===t.type?t.tokens?.forEach((t=>{s(t)})):"html"===t.type&&o[a].push({content:t.text,type:"normal"})})),o}function yt(t,{markdownAutoWrap:e}={}){const r=dt.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(i).join("")}`:"em"===t.type?`${t.tokens?.map(i).join("")}`:"paragraph"===t.type?`

    ${t.tokens?.map(i).join("")}

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:`Unsupported markdown: ${t.type}`}return(0,n.K2)(i,"output"),r.map(i).join("")}function mt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map((t=>t.segment)):[...t]}function xt(t,e){return bt(t,[],mt(e.content),e.type)}function bt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...o]=r,a=[...e,n];return t([{content:a.join(""),type:i}])?bt(t,a,o,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Ct(t,e){if(t.some((({content:t})=>t.includes("\n"))))throw new Error("splitLineToFitWidth does not support newlines in the line");return kt(t,e)}function kt(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());const o=t.shift()??{content:" ",type:"normal"},a=[...i];if(""!==n&&a.push({content:n,type:"normal"}),a.push(o),e(a))return kt(t,e,r,a);if(i.length>0)r.push(i),t.unshift(o);else if(o.content){const[i,n]=xt(e,o);r.push([i]),n.content&&t.unshift(n)}return kt(t,e,r)}function _t(t,e){e&&t.attr("style",e)}async function wt(t,e,r,i,o=!1){const a=t.append("foreignObject"),s=a.append("xhtml:div");let l=e.label;e.label&&(0,n.Wi)(e.label)&&(l=await(0,n.VJ)(e.label.replace(n.Y2.lineBreakRegex,"\n"),(0,n.D7)()));const c=e.isNode?"nodeLabel":"edgeLabel",h=s.append("span");h.html(l),_t(h,e.labelStyle),h.attr("class",`${c} ${i}`),_t(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),o&&s.attr("class","labelBkg");let u=s.node().getBoundingClientRect();return u.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),u=s.node().getBoundingClientRect()),a.node()}function vt(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function Tt(t,e,r){const i=t.append("text"),n=vt(i,1,e);Mt(n,r);const o=n.node().getComputedTextLength();return i.remove(),o}function St(t,e,r){const i=t.append("text"),n=vt(i,1,e);Mt(n,[{content:r,type:"normal"}]);const o=n.node()?.getBoundingClientRect();return o&&i.remove(),o}function At(t,e,r,i=!1){const o=e.append("g"),a=o.insert("rect").attr("class","background").attr("style","stroke: none"),s=o.append("text").attr("y","-10.1");let l=0;for(const e of r){const r=(0,n.K2)((e=>Tt(o,1.1,e)<=t),"checkWidth"),i=r(e)?[e]:Ct(e,r);for(const t of i)Mt(vt(s,l,1.1),t),l++}if(i){const t=s.node().getBBox(),e=2;return a.attr("x",-e).attr("y",-e).attr("width",t.width+2*e).attr("height",t.height+2*e),o.node()}return s.node()}function Mt(t,e){t.text(""),e.forEach(((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)}))}function Bt(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,(t=>``))}(0,n.K2)(ft,"preprocessMarkdown"),(0,n.K2)(gt,"markdownToLines"),(0,n.K2)(yt,"markdownToHTML"),(0,n.K2)(mt,"splitTextToChars"),(0,n.K2)(xt,"splitWordToFitWidth"),(0,n.K2)(bt,"splitWordToFitWidthRecursion"),(0,n.K2)(Ct,"splitLineToFitWidth"),(0,n.K2)(kt,"splitLineToFitWidthRecursion"),(0,n.K2)(_t,"applyStyle"),(0,n.K2)(wt,"addHtmlSpan"),(0,n.K2)(vt,"createTspan"),(0,n.K2)(Tt,"computeWidthOfText"),(0,n.K2)(St,"computeDimensionOfText"),(0,n.K2)(At,"createFormattedText"),(0,n.K2)(Mt,"updateTextContentAndStyles"),(0,n.K2)(Bt,"replaceIconSubstring");var Lt=(0,n.K2)((async(t,e="",{style:r="",isTitle:a=!1,classes:s="",useHtmlLabels:l=!0,isNode:c=!0,width:h=200,addSvgBackground:u=!1}={},d)=>{if(n.Rm.info("XYZ createText",e,r,a,s,l,c,"addSvgBackground: ",u),l){const o=yt(e,d),a=Bt((0,i.Sm)(o)),l=e.replace(/\\\\/g,"\\"),p={isNode:c,label:(0,n.Wi)(e)?l:a,labelStyle:r.replace("fill:","color:")};return await wt(t,p,h,s,u)}{const i=At(h,t,gt(e.replace(//g,"
    ").replace("
    ","
    "),d),!!e&&u);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,o.Ltv)(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,o.Ltv)(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,o.Ltv)(i).select("text").attr("style",e)}return i}}),"createText")},2602:(t,e,r)=>{"use strict";r.d(e,{XX:()=>c,q7:()=>h,sO:()=>l});var i=r(9022),n=r(7323),o=r(798),a={common:o.Y2,getConfig:o.zj,insertCluster:i.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:i.on,interpolateToCurve:n.Ib,labelHelper:i.Zk,log:o.Rm,positionEdgeLabel:i.T_},s={},l=(0,o.K2)((t=>{for(const e of t)s[e.name]=e}),"registerLayoutLoaders");(0,o.K2)((()=>{l([{name:"dagre",loader:(0,o.K2)((async()=>await Promise.all([r.e(913),r.e(567),r.e(51)]).then(r.bind(r,1051))),"loader")}])}),"registerDefaultLayoutLoaders")();var c=(0,o.K2)((async(t,e)=>{if(!(t.layoutAlgorithm in s))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=s[t.layoutAlgorithm];return(await r.loader()).render(t,e,a,{algorithm:r.algorithm})}),"render"),h=(0,o.K2)(((t="",{fallback:e="dagre"}={})=>{if(t in s)return t;if(e in s)return o.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)}),"getRegisteredLayoutAlgorithm")},8496:(t,e,r)=>{"use strict";r.d(e,{O:()=>n,R:()=>l});var i=r(798),n=(0,i.K2)((({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}}),"getSubGraphTitleMargins"),o={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4};function a(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=s(t),e=s(e);const[r,i]=[t.x,t.y],[n,o]=[e.x,e.y],a=n-r,l=o-i;return{angle:Math.atan(l/a),deltaX:a,deltaY:l}}(0,i.K2)(a,"calculateDeltaAndAngle");var s=(0,i.K2)((t=>Array.isArray(t)?{x:t[0],y:t[1]}:t),"pointTransformer"),l=(0,i.K2)((t=>({x:(0,i.K2)((function(e,r,i){let n=0;if(0===r&&Object.hasOwn(o,t.arrowTypeStart)){const{angle:e,deltaX:r}=a(i[0],i[1]);n=o[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(o,t.arrowTypeEnd)){const{angle:e,deltaX:r}=a(i[i.length-1],i[i.length-2]);n=o[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}return s(e).x+n}),"x"),y:(0,i.K2)((function(e,r,i){let n=0;if(0===r&&Object.hasOwn(o,t.arrowTypeStart)){const{angle:e,deltaY:r}=a(i[0],i[1]);n=o[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(o,t.arrowTypeEnd)){const{angle:e,deltaY:r}=a(i[i.length-1],i[i.length-2]);n=o[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}return s(e).y+n}),"y")})),"getLineFunctionsWithOffset")},7323:(t,e,r)=>{"use strict";r.d(e,{$C:()=>A,$t:()=>j,C4:()=>U,I5:()=>K,Ib:()=>g,Sm:()=>H,Un:()=>D,_K:()=>W,bH:()=>E,dq:()=>q,pe:()=>l,rY:()=>Y,ru:()=>O,sM:()=>T,vU:()=>p,yT:()=>B});var i=r(798),n=r(6750),o=r(4852),a=r(6632),s=r(7222),l="​",c={curveBasis:o.qrM,curveBasisClosed:o.Yu4,curveBasisOpen:o.IA3,curveBumpX:o.Wi0,curveBumpY:o.PGM,curveBundle:o.OEq,curveCardinalClosed:o.olC,curveCardinalOpen:o.IrU,curveCardinal:o.y8u,curveCatmullRomClosed:o.Q7f,curveCatmullRomOpen:o.cVp,curveCatmullRom:o.oDi,curveLinear:o.lUB,curveLinearClosed:o.Lx9,curveMonotoneX:o.nVG,curveMonotoneY:o.uxU,curveNatural:o.Xf2,curveStep:o.GZz,curveStepAfter:o.UPb,curveStepBefore:o.dyv},h=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,u=(0,i.K2)((function(t,e){const r=d(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const t=r.map((t=>t.args));(0,i.$i)(t),n=(0,i.hH)(n,[...t])}else n=r.args;if(!n)return;let o=(0,i.Ch)(t,e);const a="config";return void 0!==n[a]&&("flowchart-v2"===o&&(o="flowchart"),n[o]=n[a],delete n[a]),n}),"detectInit"),d=(0,i.K2)((function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${h.source})(?=[}][%]{2}).*\n`,"ig");let n;t=t.trim().replace(r,"").replace(/'/gm,'"'),i.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(n=i.DB.exec(t));)if(n.index===i.DB.lastIndex&&i.DB.lastIndex++,n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e)){const t=n[1]?n[1]:n[2],e=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return i.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}}),"detectDirective"),p=(0,i.K2)((function(t){return t.replace(i.DB,"")}),"removeDirectives"),f=(0,i.K2)((function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1}),"isSubstringInArray");function g(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return c[r]??e}function y(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,n.J)(r):r}(0,i.K2)(g,"interpolateToCurve"),(0,i.K2)(y,"formatUrl");var m=(0,i.K2)(((t,...e)=>{const r=t.split("."),n=r.length-1,o=r[n];let a=window;for(let e=0;e{r+=x(t,e),e=t})),_(t,r/2)}function C(t){return 1===t.length?t[0]:b(t)}(0,i.K2)(x,"distance"),(0,i.K2)(b,"traverseEdge"),(0,i.K2)(C,"calcLabelPosition");var k=(0,i.K2)(((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r}),"roundNumber"),_=(0,i.K2)(((t,e)=>{let r,i=e;for(const e of t){if(r){const t=x(e,r);if(t=1)return{x:e.x,y:e.y};if(n>0&&n<1)return{x:k((1-n)*r.x+n*e.x,5),y:k((1-n)*r.y+n*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")}),"calculatePoint"),w=(0,i.K2)(((t,e,r)=>{i.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const n=_(e,25),o=t?10:5,a=Math.atan2(e[0].y-n.y,e[0].x-n.x),s={x:0,y:0};return s.x=Math.sin(a)*o+(e[0].x+n.x)/2,s.y=-Math.cos(a)*o+(e[0].y+n.y)/2,s}),"calcCardinalityPosition");function v(t,e,r){const n=structuredClone(r);i.Rm.info("our points",n),"start_left"!==e&&"start_right"!==e&&n.reverse();const o=_(n,25+t),a=10+.5*t,s=Math.atan2(n[0].y-o.y,n[0].x-o.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*a+(n[0].x+o.x)/2,l.y=-Math.cos(s+Math.PI)*a+(n[0].y+o.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*a+(n[0].x+o.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(n[0].y+o.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*a+(n[0].x+o.x)/2-5,l.y=-Math.cos(s)*a+(n[0].y+o.y)/2-5):(l.x=Math.sin(s)*a+(n[0].x+o.x)/2,l.y=-Math.cos(s)*a+(n[0].y+o.y)/2),l}function T(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,i.K2)(v,"calcTerminalLabelPosition"),(0,i.K2)(T,"getStylesFromArray");var S=0,A=(0,i.K2)((()=>(S++,"id-"+Math.random().toString(36).substr(2,12)+"-"+S)),"generateId");function M(t){let e="";for(let r=0;rM(t.length)),"random"),L=(0,i.K2)((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"),F=(0,i.K2)((function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,n]=K(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",n),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o}),"drawSimpleText"),E=(0,a.A)(((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},r),i.Y2.lineBreakRegex.test(t))return t;const n=t.split(" ").filter(Boolean),o=[];let a="";return n.forEach(((t,i)=>{const s=D(`${t} `,r),l=D(a,r);if(s>e){const{hyphenatedStrings:i,remainingWord:n}=$(t,e,"-",r);o.push(a,...i),a=n}else l+s>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");i+1===n.length&&o.push(a)})),o.filter((t=>""!==t)).join(r.joinWith)}),((t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`)),$=(0,a.A)(((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],o=[];let a="";return n.forEach(((t,s)=>{const l=`${a}${t}`;if(D(l,i)>=e){const t=s+1,e=n.length===t,i=`${l}${r}`;o.push(e?l:i),a=""}else a=l})),{hyphenatedStrings:o,remainingWord:a}}),((t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`));function O(t,e){return R(t,e).height}function D(t,e){return R(t,e).width}(0,i.K2)(O,"calculateTextHeight"),(0,i.K2)(D,"calculateTextWidth");var I,R=(0,a.A)(((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=K(r),c=["sans-serif",n],h=t.split(i.Y2.lineBreakRegex),u=[],d=(0,o.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const t of c){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of h){const n=L();n.text=i||l;const o=F(p,n).style("font-size",s).style("font-weight",a).style("font-family",t),c=(o._groups||o)[0][0].getBBox();if(0===c.width&&0===c.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,c.width)),e=Math.round(c.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}u.push(r)}return p.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]}),((t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`)),P=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,i.K2)(this,"InitIDGenerator")}},N=(0,i.K2)((function(t){return I=I||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),I.innerHTML=t,unescape(I.textContent)}),"entityDecode");function q(t){return"str"in t}(0,i.K2)(q,"isDetailedError");var z=(0,i.K2)(((t,e,r,i)=>{if(!i)return;const n=t.node()?.getBBox();n&&t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)}),"insertTitle"),K=(0,i.K2)((t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]}),"parseFontSize");function j(t,e){return(0,s.A)({},t,e)}(0,i.K2)(j,"cleanAndMerge");var W={assignWithDepth:i.hH,wrapLabel:E,calculateTextHeight:O,calculateTextWidth:D,calculateTextDimensions:R,cleanAndMerge:j,detectInit:u,detectDirective:d,isSubstringInArray:f,interpolateToCurve:g,calcLabelPosition:C,calcCardinalityPosition:w,calcTerminalLabelPosition:v,formatUrl:y,getStylesFromArray:T,generateId:A,random:B,runFunc:m,entityDecode:N,insertTitle:z,parseFontSize:K,InitIDGenerator:P},U=(0,i.K2)((function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})),e=e.replace(/#\w+;/g,(function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"})),e}),"encodeEntities"),H=(0,i.K2)((function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")}),"decodeEntities"),Y=(0,i.K2)(((t,e,{counter:r=0,prefix:i,suffix:n})=>`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`),"getEdgeId")},261:(t,e,r)=>{"use strict";r.d(e,{r:()=>i});var i="11.0.2"}},i={};function n(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return r[t].call(o.exports,o,o.exports,n),o.exports}n.m=r,n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.f={},n.e=t=>Promise.all(Object.keys(n.f).reduce(((e,r)=>(n.f[r](t,e),e)),[])),n.u=t=>"js/"+t+"-"+{42:"aadd500f",51:"a5b3e792",130:"395cb664",148:"5c9964c4",174:"c58623b5",205:"9a3f06a7",207:"76b424b6",221:"9d1089ca",257:"acdc3108",278:"82f9d9ad",300:"19c1a4f9",331:"bd053b7e",339:"ed783b3e",356:"34014d94",376:"769d6d21",444:"671f5f2b",533:"e75dcf61",557:"be45235e",567:"38dd778c",578:"d3d4963d",589:"841514a2",593:"bfe7ed66",650:"4e563e3b",654:"9045dc15",657:"d323ea06",731:"a0fa9714",756:"713e8876",760:"f618e0e3",799:"c3a32fe5",875:"2aebef6b",913:"4409c8d7",918:"70ec2bcb",959:"64fbcd17",991:"6e5a46d1"}[t]+".chunk.min.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="geekdoc:",n.l=(r,i,o,a)=>{if(t[r])t[r].push(i);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),h=0;h{s.onerror=s.onload=null,clearTimeout(p);var n=t[r];if(delete t[r],s.parentNode&&s.parentNode.removeChild(s),n&&n.forEach((t=>t(i))),e)return e(i)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=d.bind(null,s.onerror),s.onload=d.bind(null,s.onload),l&&document.head.appendChild(s)}},n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");if(r.length)for(var i=r.length-1;i>-1&&(!t||!/^http(s?):/.test(t));)t=r[i--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../"})(),(()=>{var t={304:0};n.f.j=(e,r)=>{var i=n.o(t,e)?t[e]:void 0;if(0!==i)if(i)r.push(i[2]);else{var o=new Promise(((r,n)=>i=t[e]=[r,n]));r.push(i[2]=o);var a=n.p+n.u(e),s=new Error;n.l(a,(r=>{if(n.o(t,e)&&(0!==(i=t[e])&&(t[e]=void 0),i)){var o=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+e+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,i[1](s)}}),"chunk-"+e,e)}};var e=(e,r)=>{var i,o,[a,s,l]=r,c=0;if(a.some((e=>0!==t[e]))){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);l&&l(n)}for(e&&e(r);c{"use strict";var t=n(7148);const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var r,i=new Uint8Array(16);function o(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}for(var a=[],s=0;s<256;++s)a.push((s+256).toString(16).slice(1));const l=function(t,r,i){if(e.randomUUID&&!r&&!t)return e.randomUUID();var n=(t=t||{}).random||(t.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,r){i=i||0;for(var s=0;s<16;++s)r[i+s]=n[s];return r}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(n)},c="auto";var h=n(2602),u=(n(9022),n(8496),n(8252),n(7323)),d=n(261),p=n(8852),f=n(798),g=n(513),y=n(4852),m="comm",x="rule",b="decl",C=Math.abs,k=String.fromCharCode;function _(t){return t.trim()}function w(t,e,r){return t.replace(e,r)}function v(t,e,r){return t.indexOf(e,r)}function T(t,e){return 0|t.charCodeAt(e)}function S(t,e,r){return t.slice(e,r)}function A(t){return t.length}function M(t,e){return e.push(t),t}function B(t,e){for(var r="",i=0;i0?T(I,--O):0,E--,10===D&&(E=1,F--),D}function N(){return D=O<$?T(I,O++):0,E++,10===D&&(E=1,F++),D}function q(){return T(I,O)}function z(){return O}function K(t,e){return S(I,t,e)}function j(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function W(t){return _(K(O-1,Y(91===t?t+2:40===t?t+1:t)))}function U(t){for(;(D=q())&&D<33;)N();return j(t)>2||j(D)>3?"":" "}function H(t,e){for(;--e&&N()&&!(D<48||D>102||D>57&&D<65||D>70&&D<97););return K(t,z()+(e<6&&32==q()&&32==N()))}function Y(t){for(;N();)switch(D){case t:return O;case 34:case 39:34!==t&&39!==t&&Y(D);break;case 40:41===t&&Y(t);break;case 92:N()}return O}function V(t,e){for(;N()&&t+D!==57&&(t+D!==84||47!==q()););return"/*"+K(e,O-1)+"*"+k(47===t?t:N())}function G(t){for(;!j(q());)N();return K(t,O)}function Z(t){return function(t){return I="",t}(X("",null,null,null,[""],t=function(t){return F=E=1,$=A(I=t),O=0,[]}(t),0,[0],t))}function X(t,e,r,i,n,o,a,s,l){for(var c=0,h=0,u=a,d=0,p=0,f=0,g=1,y=1,m=1,x=0,b="",_=n,S=o,B=i,L=b;y;)switch(f=x,x=N()){case 40:if(108!=f&&58==T(L,u-1)){-1!=v(L+=w(W(x),"&","&\f"),"&\f",C(c?s[c-1]:0))&&(m=-1);break}case 34:case 39:case 91:L+=W(x);break;case 9:case 10:case 13:case 32:L+=U(f);break;case 92:L+=H(z()-1,7);continue;case 47:switch(q()){case 42:case 47:M(J(V(N(),z()),e,r,l),l);break;default:L+="/"}break;case 123*g:s[c++]=A(L)*m;case 125*g:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+h:-1==m&&(L=w(L,/\f/g,"")),p>0&&A(L)-u&&M(p>32?tt(L+";",i,r,u-1,l):tt(w(L," ","")+";",i,r,u-2,l),l);break;case 59:L+=";";default:if(M(B=Q(L,e,r,c,h,n,s,b,_=[],S=[],u,o),o),123===x)if(0===h)X(L,e,B,B,_,o,u,s,S);else switch(99===d&&110===T(L,3)?100:d){case 100:case 108:case 109:case 115:X(t,B,B,i&&M(Q(t,B,B,0,0,n,s,b,n,_=[],u,S),S),n,S,u,s,i?_:S);break;default:X(L,B,B,B,[""],S,0,s,S)}}c=h=p=0,g=m=1,b=L="",u=a;break;case 58:u=1+A(L),p=f;default:if(g<1)if(123==x)--g;else if(125==x&&0==g++&&125==P())continue;switch(L+=k(x),x*g){case 38:m=h>0?1:(L+="\f",-1);break;case 44:s[c++]=(A(L)-1)*m,m=1;break;case 64:45===q()&&(L+=W(N())),d=q(),h=u=A(b=L+=G(z())),x++;break;case 45:45===f&&2==A(L)&&(g=0)}}return o}function Q(t,e,r,i,n,o,a,s,l,c,h,u){for(var d=n-1,p=0===n?o:[""],f=function(t){return t.length}(p),g=0,y=0,m=0;g0?p[b]+" "+k:w(k,/&\f/g,p[b])))&&(l[m++]=v);return R(t,e,r,0===n?x:s,l,c,h,u)}function J(t,e,r,i){return R(t,e,r,m,k(D),S(t,2,-2),0,i)}function tt(t,e,r,i,n){return R(t,e,r,b,S(t,0,i),S(t,i+1,-1),i,n)}var et=n(2838),rt=n(6401),it={id:"c4",detector:(0,f.K2)((t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(918).then(n.bind(n,4918));return{id:"c4",diagram:t}}),"loader")},nt="flowchart",ot={id:nt,detector:(0,f.K2)(((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(578),n.e(376)]).then(n.bind(n,376));return{id:nt,diagram:t}}),"loader")},at="flowchart-v2",st={id:at,detector:(0,f.K2)(((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&(!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t))),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(578),n.e(376)]).then(n.bind(n,376));return{id:at,diagram:t}}),"loader")},lt={id:"er",detector:(0,f.K2)((t=>/^\s*erDiagram/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(875)]).then(n.bind(n,6875));return{id:"er",diagram:t}}),"loader")},ct="gitGraph",ht={id:ct,detector:(0,f.K2)((t=>/^\s*gitGraph/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(356)]).then(n.bind(n,356));return{id:ct,diagram:t}}),"loader")},ut="gantt",dt={id:ut,detector:(0,f.K2)((t=>/^\s*gantt/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(300).then(n.bind(n,9300));return{id:ut,diagram:t}}),"loader")},pt="info",ft={id:pt,detector:(0,f.K2)((t=>/^\s*info/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(331)]).then(n.bind(n,7331));return{id:pt,diagram:t}}),"loader")},gt={id:"pie",detector:(0,f.K2)((t=>/^\s*pie/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(444)]).then(n.bind(n,8444));return{id:"pie",diagram:t}}),"loader")},yt="quadrantChart",mt={id:yt,detector:(0,f.K2)((t=>/^\s*quadrantChart/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(593).then(n.bind(n,593));return{id:yt,diagram:t}}),"loader")},xt="xychart",bt={id:xt,detector:(0,f.K2)((t=>/^\s*xychart-beta/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(174).then(n.bind(n,7174));return{id:xt,diagram:t}}),"loader")},Ct="requirement",kt={id:Ct,detector:(0,f.K2)((t=>/^\s*requirement(Diagram)?/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(533)]).then(n.bind(n,5533));return{id:Ct,diagram:t}}),"loader")},_t="sequence",wt={id:_t,detector:(0,f.K2)((t=>/^\s*sequenceDiagram/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(589).then(n.bind(n,3589));return{id:_t,diagram:t}}),"loader")},vt="class",Tt={id:vt,detector:(0,f.K2)(((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(207),n.e(650)]).then(n.bind(n,1650));return{id:vt,diagram:t}}),"loader")},St="classDiagram",At={id:St,detector:(0,f.K2)(((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(578),n.e(207),n.e(557),n.e(42)]).then(n.bind(n,5042));return{id:St,diagram:t}}),"loader")},Mt="state",Bt={id:Mt,detector:(0,f.K2)(((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(567),n.e(578),n.e(148),n.e(657)]).then(n.bind(n,8657));return{id:Mt,diagram:t}}),"loader")},Lt="stateDiagram",Ft={id:Lt,detector:(0,f.K2)(((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(578),n.e(148),n.e(205)]).then(n.bind(n,7205));return{id:Lt,diagram:t}}),"loader")},Et="journey",$t={id:Et,detector:(0,f.K2)((t=>/^\s*journey/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(257).then(n.bind(n,4257));return{id:Et,diagram:t}}),"loader")},Ot={draw:(0,f.K2)(((t,e,r)=>{f.Rm.debug("rendering svg for syntax error\n");const i=(0,p.D)(e),n=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,f.a$)(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)}),"draw")},Dt=Ot,It={db:{},renderer:Ot,parser:{parse:(0,f.K2)((()=>{}),"parse")}},Rt="flowchart-elk",Pt={id:Rt,detector:(0,f.K2)(((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(578),n.e(376)]).then(n.bind(n,376));return{id:Rt,diagram:t}}),"loader")},Nt="timeline",qt={id:Nt,detector:(0,f.K2)((t=>/^\s*timeline/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(799).then(n.bind(n,799));return{id:Nt,diagram:t}}),"loader")},zt="mindmap",Kt={id:zt,detector:(0,f.K2)((t=>/^\s*mindmap/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(991).then(n.bind(n,6991));return{id:zt,diagram:t}}),"loader")},jt="sankey",Wt={id:jt,detector:(0,f.K2)((t=>/^\s*sankey-beta/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await n.e(339).then(n.bind(n,3339));return{id:jt,diagram:t}}),"loader")},Ut="packet",Ht={id:Ut,detector:(0,f.K2)((t=>/^\s*packet-beta/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(731),n.e(756)]).then(n.bind(n,1756));return{id:Ut,diagram:t}}),"loader")},Yt="block",Vt={id:Yt,detector:(0,f.K2)((t=>/^\s*block-beta/.test(t)),"detector"),loader:(0,f.K2)((async()=>{const{diagram:t}=await Promise.all([n.e(913),n.e(578),n.e(557),n.e(654)]).then(n.bind(n,2654));return{id:Yt,diagram:t}}),"loader")},Gt=!1,Zt=(0,f.K2)((()=>{Gt||(Gt=!0,(0,f.Js)("error",It,(t=>"error"===t.toLowerCase().trim())),(0,f.Js)("---",{db:{clear:(0,f.K2)((()=>{}),"clear")},styles:{},renderer:{draw:(0,f.K2)((()=>{}),"draw")},parser:{parse:(0,f.K2)((()=>{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:(0,f.K2)((()=>null),"init")},(t=>t.toLowerCase().trimStart().startsWith("---"))),(0,f.Xd)(it,At,Tt,lt,dt,ft,gt,kt,wt,Pt,st,ot,Kt,qt,ht,Ft,Bt,$t,mt,Wt,Ht,bt,Vt))}),"addDiagrams"),Xt=(0,f.K2)((async()=>{f.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(f.mW).map((async([t,{detector:e,loader:r}])=>{if(r)try{(0,f.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,f.Js)(i,t,e)}catch(e){throw f.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete f.mW[t],e}}})))).filter((t=>"rejected"===t.status));if(t.length>0){f.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)f.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}}),"loadRegisteredDiagrams"),Qt=class t{constructor(t,e,r,i,n){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=n}static{(0,f.K2)(this,"Diagram")}static async fromText(e,r={}){const i=(0,f.zj)(),n=(0,f.Ch)(e,i);e=(0,u.C4)(e)+"\n";try{(0,f.Gs)(n)}catch{const t=(0,f.J$)(n);if(!t)throw new f.C0(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();(0,f.Js)(e,r)}const{db:o,parser:a,renderer:s,init:l}=(0,f.Gs)(n);return a.parser&&(a.parser.yy=o),o.clear?.(),l?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(e),new t(n,e,o,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},Jt=[],te=(0,f.K2)((()=>{Jt.forEach((t=>{t()})),Jt=[]}),"attachFunctions"),ee="graphics-document document";function re(t,e){t.attr("role",ee),""!==e&&t.attr("aria-roledescription",e)}function ie(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,f.K2)(re,"setA11yDiagramInfo"),(0,f.K2)(ie,"addSVGa11yTitleDescription");var ne=(0,f.K2)((t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart()),"cleanupComments");function oe(t){return null==t}function ae(t){return"object"==typeof t&&null!==t}function se(t){return Array.isArray(t)?t:oe(t)?[]:[t]}function le(t,e){var r,i,n,o;if(e)for(r=0,i=(o=Object.keys(e)).length;rs&&(e=i-s+(o=" ... ").length),r-i>s&&(r=i+s-(a=" ...").length),{str:o+t.slice(e,r).replace(/\t/g,"→")+a,pos:i-e+o.length}}function ye(t,e){return ue.repeat(" ",e-t.length)+t}function me(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,n=[0],o=[],a=-1;r=i.exec(t.buffer);)o.push(r.index),n.push(r.index+r[0].length),t.position<=r.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s,l,c="",h=Math.min(t.line+e.linesAfter,o.length).toString().length,u=e.maxLength-(e.indent+h+3);for(s=1;s<=e.linesBefore&&!(a-s<0);s++)l=ge(t.buffer,n[a-s],o[a-s],t.position-(n[a]-n[a-s]),u),c=ue.repeat(" ",e.indent)+ye((t.line-s+1).toString(),h)+" | "+l.str+"\n"+c;for(l=ge(t.buffer,n[a],o[a],t.position,u),c+=ue.repeat(" ",e.indent)+ye((t.line+1).toString(),h)+" | "+l.str+"\n",c+=ue.repeat("-",e.indent+h+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(a+s>=o.length);s++)l=ge(t.buffer,n[a+s],o[a+s],t.position-(n[a]-n[a+s]),u),c+=ue.repeat(" ",e.indent)+ye((t.line+s+1).toString(),h)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,f.K2)(ge,"getLine"),(0,f.K2)(ye,"padStart"),(0,f.K2)(me,"makeSnippet");var xe=me,be=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ce=["scalar","sequence","mapping"];function ke(t){var e={};return null!==t&&Object.keys(t).forEach((function(r){t[r].forEach((function(t){e[String(t)]=r}))})),e}function _e(t,e){if(e=e||{},Object.keys(e).forEach((function(e){if(-1===be.indexOf(e))throw new fe('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')})),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=ke(e.styleAliases||null),-1===Ce.indexOf(this.kind))throw new fe('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,f.K2)(ke,"compileStyleAliases"),(0,f.K2)(_e,"Type$1");var we=_e;function ve(t,e){var r=[];return t[e].forEach((function(t){var e=r.length;r.forEach((function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)})),r[e]=t})),r}function Te(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,f.K2)(i,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)}),"binary"),octal:(0,f.K2)((function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)}),"octal"),decimal:(0,f.K2)((function(t){return t.toString(10)}),"decimal"),hexadecimal:(0,f.K2)((function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}),"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),je=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function We(t){return null!==t&&!(!je.test(t)||"_"===t[t.length-1])}function Ue(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,f.K2)(We,"resolveYamlFloat"),(0,f.K2)(Ue,"constructYamlFloat");var He=/^[-+]?[0-9]+e/;function Ye(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(ue.isNegativeZero(t))return"-0.0";return r=t.toString(10),He.test(r)?r.replace("e",".e"):r}function Ve(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||ue.isNegativeZero(t))}(0,f.K2)(Ye,"representYamlFloat"),(0,f.K2)(Ve,"isFloat");var Ge=new we("tag:yaml.org,2002:float",{kind:"scalar",resolve:We,construct:Ue,predicate:Ve,represent:Ye,defaultStyle:"lowercase"}),Ze=Ae.extend({implicit:[Fe,De,Ke,Ge]}),Xe=Ze,Qe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Je=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 tr(t){return null!==t&&(null!==Qe.exec(t)||null!==Je.exec(t))}function er(t){var e,r,i,n,o,a,s,l,c=0,h=null;if(null===(e=Qe.exec(t))&&(e=Je.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(o=+e[4],a=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(r,i,n,o,a,s,c)),h&&l.setTime(l.getTime()-h),l}function rr(t){return t.toISOString()}(0,f.K2)(tr,"resolveYamlTimestamp"),(0,f.K2)(er,"constructYamlTimestamp"),(0,f.K2)(rr,"representYamlTimestamp");var ir=new we("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:tr,construct:er,instanceOf:Date,represent:rr});function nr(t){return"<<"===t||null===t}(0,f.K2)(nr,"resolveYamlMerge");var or=new we("tag:yaml.org,2002:merge",{kind:"scalar",resolve:nr}),ar="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function sr(t){if(null===t)return!1;var e,r,i=0,n=t.length,o=ar;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8==0}function lr(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,o=ar,a=0,s=[];for(e=0;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(i.charAt(e));return 0==(r=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18===r?(s.push(a>>10&255),s.push(a>>2&255)):12===r&&s.push(a>>4&255),new Uint8Array(s)}function cr(t){var e,r,i="",n=0,o=t.length,a=ar;for(e=0;e>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]),n=(n<<8)+t[e];return 0==(r=o%3)?(i+=a[n>>18&63],i+=a[n>>12&63],i+=a[n>>6&63],i+=a[63&n]):2===r?(i+=a[n>>10&63],i+=a[n>>4&63],i+=a[n<<2&63],i+=a[64]):1===r&&(i+=a[n>>2&63],i+=a[n<<4&63],i+=a[64],i+=a[64]),i}function hr(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,f.K2)(sr,"resolveYamlBinary"),(0,f.K2)(lr,"constructYamlBinary"),(0,f.K2)(cr,"representYamlBinary"),(0,f.K2)(hr,"isBinary");var ur=new we("tag:yaml.org,2002:binary",{kind:"scalar",resolve:sr,construct:lr,predicate:hr,represent:cr}),dr=Object.prototype.hasOwnProperty,pr=Object.prototype.toString;function fr(t){if(null===t)return!0;var e,r,i,n,o,a=[],s=t;for(e=0,r=s.length;e>10),56320+(t-65536&1023))}(0,f.K2)(Nr,"_class"),(0,f.K2)(qr,"is_EOL"),(0,f.K2)(zr,"is_WHITE_SPACE"),(0,f.K2)(Kr,"is_WS_OR_EOL"),(0,f.K2)(jr,"is_FLOW_INDICATOR"),(0,f.K2)(Wr,"fromHexCode"),(0,f.K2)(Ur,"escapedHexLen"),(0,f.K2)(Hr,"fromDecimalCode"),(0,f.K2)(Yr,"simpleEscapeSequence"),(0,f.K2)(Vr,"charFromCodepoint");var Gr,Zr=new Array(256),Xr=new Array(256);for(Gr=0;Gr<256;Gr++)Zr[Gr]=Yr(Gr)?1:0,Xr[Gr]=Yr(Gr);function Qr(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Tr,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Jr(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=xe(r),new fe(e,r)}function ti(t,e){throw Jr(t,e)}function ei(t,e){t.onWarning&&t.onWarning.call(null,Jr(t,e))}(0,f.K2)(Qr,"State$1"),(0,f.K2)(Jr,"generateError"),(0,f.K2)(ti,"throwError"),(0,f.K2)(ei,"throwWarning");var ri={YAML:(0,f.K2)((function(t,e,r){var i,n,o;null!==t.version&&ti(t,"duplication of %YAML directive"),1!==r.length&&ti(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&ti(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),o=parseInt(i[2],10),1!==n&&ti(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&ei(t,"unsupported YAML version of the document")}),"handleYamlDirective"),TAG:(0,f.K2)((function(t,e,r){var i,n;2!==r.length&&ti(t,"TAG directive accepts exactly two arguments"),i=r[0],n=r[1],Rr.test(i)||ti(t,"ill-formed tag handle (first argument) of the TAG directive"),Sr.call(t.tagMap,i)&&ti(t,'there is a previously declared suffix for "'+i+'" tag handle'),Pr.test(n)||ti(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(e){ti(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n}),"handleTagDirective")};function ii(t,e,r,i){var n,o,a,s;if(e1&&(t.result+=ue.repeat("\n",e-1))}function hi(t,e,r){var i,n,o,a,s,l,c,h,u=t.kind,d=t.result;if(Kr(h=t.input.charCodeAt(t.position))||jr(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(Kr(i=t.input.charCodeAt(t.position+1))||r&&jr(i)))return!1;for(t.kind="scalar",t.result="",n=o=t.position,a=!1;0!==h;){if(58===h){if(Kr(i=t.input.charCodeAt(t.position+1))||r&&jr(i))break}else if(35===h){if(Kr(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&li(t)||r&&jr(h))break;if(qr(h)){if(s=t.line,l=t.lineStart,c=t.lineIndent,si(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}t.position=o,t.line=s,t.lineStart=l,t.lineIndent=c;break}}a&&(ii(t,n,o,!1),ci(t,t.line-s),n=o=t.position,a=!1),zr(h)||(o=t.position+1),h=t.input.charCodeAt(++t.position)}return ii(t,n,o,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ui(t,e){var r,i,n;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(ii(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,n=t.position}else qr(r)?(ii(t,i,n,!0),ci(t,si(t,!1,e)),i=n=t.position):t.position===t.lineStart&&li(t)?ti(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);ti(t,"unexpected end of the stream within a single quoted scalar")}function di(t,e){var r,i,n,o,a,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return ii(t,r,t.position,!0),t.position++,!0;if(92===s){if(ii(t,r,t.position,!0),qr(s=t.input.charCodeAt(++t.position)))si(t,!1,e);else if(s<256&&Zr[s])t.result+=Xr[s],t.position++;else if((a=Ur(s))>0){for(n=a,o=0;n>0;n--)(a=Wr(s=t.input.charCodeAt(++t.position)))>=0?o=(o<<4)+a:ti(t,"expected hexadecimal character");t.result+=Vr(o),t.position++}else ti(t,"unknown escape sequence");r=i=t.position}else qr(s)?(ii(t,r,i,!0),ci(t,si(t,!1,e)),r=i=t.position):t.position===t.lineStart&&li(t)?ti(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}ti(t,"unexpected end of the stream within a double quoted scalar")}function pi(t,e){var r,i,n,o,a,s,l,c,h,u,d,p,f=!0,g=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))a=93,c=!1,o=[];else{if(123!==p)return!1;a=125,c=!0,o={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),p=t.input.charCodeAt(++t.position);0!==p;){if(si(t,!0,e),(p=t.input.charCodeAt(t.position))===a)return t.position++,t.tag=g,t.anchor=y,t.kind=c?"mapping":"sequence",t.result=o,!0;f?44===p&&ti(t,"expected the node content, but found ','"):ti(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&Kr(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,si(t,!0,e)),r=t.line,i=t.lineStart,n=t.position,Ci(t,e,Ar,!1,!0),u=t.tag,h=t.result,si(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),si(t,!0,e),Ci(t,e,Ar,!1,!0),d=t.result),c?oi(t,o,m,u,h,d,r,i,n):s?o.push(oi(t,null,m,u,h,d,r,i,n)):o.push(h),si(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}ti(t,"unexpected end of the stream within a flow collection")}function fi(t,e){var r,i,n,o,a=Fr,s=!1,l=!1,c=e,h=0,u=!1;if(124===(o=t.input.charCodeAt(t.position)))i=!1;else{if(62!==o)return!1;i=!0}for(t.kind="scalar",t.result="";0!==o;)if(43===(o=t.input.charCodeAt(++t.position))||45===o)Fr===a?a=43===o?$r:Er:ti(t,"repeat of a chomping mode identifier");else{if(!((n=Hr(o))>=0))break;0===n?ti(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?ti(t,"repeat of an indentation width identifier"):(c=e+n-1,l=!0)}if(zr(o)){do{o=t.input.charCodeAt(++t.position)}while(zr(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!qr(o)&&0!==o)}for(;0!==o;){for(ai(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!l||t.lineIndentc&&(c=t.lineIndent),qr(o))h++;else{if(t.lineIndente)&&0!==i)ti(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(a=t.line,s=t.lineStart,l=t.position),Ci(t,e,Lr,!0,n)&&(m?g=t.result:y=t.result),m||(oi(t,d,p,f,g,y,a,s,l),f=g=y=null),si(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===o||t.lineIndent>e)&&0!==c)ti(t,"bad indentation of a mapping entry");else if(t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&ti(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):ti(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function ki(t){var e,r,i,n,o=t.position,a=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(si(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(a=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Kr(n);)n=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&ti(t,"directive name must not be less than one character in length");0!==n;){for(;zr(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!qr(n));break}if(qr(n))break;for(e=t.position;0!==n&&!Kr(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&ai(t),Sr.call(ri,r)?ri[r](t,r,i):ei(t,'unknown document directive "'+r+'"')}si(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,si(t,!0,-1)):a&&ti(t,"directives end mark is expected"),Ci(t,t.lineIndent-1,Lr,!1,!0),si(t,!0,-1),t.checkLineBreaks&&Dr.test(t.input.slice(o,t.position))&&ei(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&li(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,si(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function xn(t){return/^\n* /.test(t)}(0,f.K2)(sn,"State"),(0,f.K2)(ln,"indentString"),(0,f.K2)(cn,"generateNextLine"),(0,f.K2)(hn,"testImplicitResolving"),(0,f.K2)(un,"isWhitespace"),(0,f.K2)(dn,"isPrintable"),(0,f.K2)(pn,"isNsCharOrWhitespace"),(0,f.K2)(fn,"isPlainSafe"),(0,f.K2)(gn,"isPlainSafeFirst"),(0,f.K2)(yn,"isPlainSafeLast"),(0,f.K2)(mn,"codePointAt"),(0,f.K2)(xn,"needIndentIndicator");var bn=1,Cn=2,kn=3,_n=4,wn=5;function vn(t,e,r,i,n,o,a,s){var l,c=0,h=null,u=!1,d=!1,p=-1!==i,f=-1,g=gn(mn(t,0))&&yn(mn(t,t.length-1));if(e||a)for(l=0;l=65536?l+=2:l++){if(!dn(c=mn(t,l)))return wn;g=g&&fn(c,h,s),h=c}else{for(l=0;l=65536?l+=2:l++){if((c=mn(t,l))===Li)u=!0,p&&(d=d||l-f-1>i&&" "!==t[f+1],f=l);else if(!dn(c))return wn;g=g&&fn(c,h,s),h=c}d=d||p&&l-f-1>i&&" "!==t[f+1]}return u||d?r>9&&xn(t)?wn:a?o===an?wn:Cn:d?_n:kn:!g||a||n(t)?o===an?wn:Cn:bn}function Tn(t,e,r,i,n){t.dump=function(){if(0===e.length)return t.quotingType===an?'""':"''";if(!t.noCompatMode&&(-1!==tn.indexOf(e)||en.test(e)))return t.quotingType===an?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),a=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),s=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return hn(t,e)}switch((0,f.K2)(l,"testAmbiguity"),vn(e,s,t.indent,a,l,t.quotingType,t.forceQuotes&&!i,n)){case bn:return e;case Cn:return"'"+e.replace(/'/g,"''")+"'";case kn:return"|"+Sn(e,t.indent)+An(ln(e,o));case _n:return">"+Sn(e,t.indent)+An(ln(Mn(e,a),o));case wn:return'"'+Ln(e)+'"';default:throw new fe("impossible error: invalid scalar style")}}()}function Sn(t,e){var r=xn(t)?String(e):"",i="\n"===t[t.length-1];return r+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function An(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Mn(t,e){for(var r,i,n,o=/(\n+)([^\n]*)/g,a=(r=-1!==(r=t.indexOf("\n"))?r:t.length,o.lastIndex=r,Bn(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];n=o.exec(t);){var l=n[1],c=n[2];i=" "===c[0],a+=l+(s||i||""===c?"":"\n")+Bn(c,e),s=i}return a}function Bn(t,e){if(""===t||" "===t[0])return t;for(var r,i,n=/ [^ ]/g,o=0,a=0,s=0,l="";r=n.exec(t);)(s=r.index)-o>e&&(i=a>o?a:s,l+="\n"+t.slice(o,i),o=i+1),a=s;return l+="\n",t.length-o>e&&a>o?l+=t.slice(o,a)+"\n"+t.slice(a+1):l+=t.slice(o),l.slice(1)}function Ln(t){for(var e,r="",i=0,n=0;n=65536?n+=2:n++)i=mn(t,n),!(e=Ji[i])&&dn(i)?(r+=t[n],i>=65536&&(r+=t[n+1])):r+=e||nn(i);return r}function Fn(t,e,r){var i,n,o,a="",s=t.tag;for(i=0,n=r.length;i1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),In(t,e,a,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}function On(t,e,r,i){var n,o,a,s,l,c,h="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new fe("sortKeys must be a boolean or a function");for(n=0,o=d.length;n1024)&&(t.dump&&Li===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=cn(t,e)),In(t,e+1,s,!0,l)&&(t.dump&&Li===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Dn(t,e,r){var i,n,o,a,s,l;for(o=0,a=(n=r?t.explicitTypes:t.implicitTypes).length;o tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function In(t,e,r,i,n,o,a){t.tag=null,t.dump=r,Dn(t,r,!1)||Dn(t,r,!0);var s,l=Si.call(t.dump),c=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var h,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(h=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(n=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(d&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(On(t,e,t.dump,n),u&&(t.dump="&ref_"+h+t.dump)):($n(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!a&&e>0?En(t,e-1,t.dump,n):En(t,e,t.dump,n),u&&(t.dump="&ref_"+h+t.dump)):(Fn(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new fe("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Tn(t,t.dump,e,o,c)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Rn(t,e){var r,i,n=[],o=[];for(Pn(t,n,o),r=0,i=o.length;rt.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,((t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"))),"cleanupText"),Wn=(0,f.K2)((t=>{const{text:e,metadata:r}=Kn(t),{displayMode:i,title:n,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:n,config:o,text:e}}),"processFrontmatter"),Un=(0,f.K2)((t=>{const e=u._K.detectInit(t)??{},r=u._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some((({type:t})=>"wrap"===t)):"wrap"===r?.type&&(e.wrap=!0),{text:(0,u.vU)(t),directive:e}}),"processDirectives");function Hn(t){const e=jn(t),r=Wn(e),i=Un(r.text),n=(0,u.$t)(r.config,i.directive);return{code:t=ne(i.text),title:r.title,config:n}}function Yn(t){const e=(new TextEncoder).encode(t),r=Array.from(e,(t=>String.fromCodePoint(t))).join("");return btoa(r)}(0,f.K2)(Hn,"preprocessDiagram"),(0,f.K2)(Yn,"toBase64");var Vn=["foreignobject"],Gn=["dominant-baseline"];function Zn(t){const e=Hn(t);return(0,f.cL)(),(0,f.xA)(e.config??{}),e}async function Xn(t,e){Zt();try{const{code:e}=Zn(t);return{diagramType:(await lo(e)).type}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,f.K2)(Zn,"processAndSetConfigs"),(0,f.K2)(Xn,"parse");var Qn=(0,f.K2)(((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`),"cssImportantStyles"),Jn=(0,f.K2)(((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const i=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach((t=>{(0,rt.A)(t.styles)||i.forEach((e=>{r+=Qn(t.id,e,t.styles)})),(0,rt.A)(t.textStyles)||(r+=Qn(t.id,"tspan",(t?.textStyles||[]).map((t=>t.replace("color","fill")))))}))}return r}),"createCssStyles"),to=(0,f.K2)(((t,e,r,i)=>{const n=Jn(t,r);return B(Z(`${i}{${(0,f.tM)(e,n,t.themeVariables)}}`),L)}),"createUserStyles"),eo=(0,f.K2)(((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,u.Sm)(i),i=i.replace(/
    /g,"
    "),i}),"cleanUpSvgCode"),ro=(0,f.K2)(((t="",e)=>``),"putIntoIFrame"),io=(0,f.K2)(((t,e,r,i,n)=>{const o=t.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&a.attr("xmlns:xlink",n),a.append("g"),t}),"appendDivSvgG");function no(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,f.K2)(no,"sandboxedIframe");var oo=(0,f.K2)(((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()}),"removeExistingElements"),ao=(0,f.K2)((async function(t,e,r){Zt();const i=Zn(e);e=i.code;const n=(0,f.zj)();f.Rm.debug(n),e.length>(n?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+t,a="i"+t,s="#"+a,l="d"+t,c="#"+l,h=(0,f.K2)((()=>{const t=p?s:c,e=(0,y.Ltv)(t).node();e&&"remove"in e&&e.remove()}),"removeTempElements");let u=(0,y.Ltv)("body");const p="sandbox"===n.securityLevel,g="loose"===n.securityLevel,m=n.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),p){const t=no((0,y.Ltv)(r),a);u=(0,y.Ltv)(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=(0,y.Ltv)(r);io(u,t,l,`font-family: ${m}`,"http://www.w3.org/1999/xlink")}else{if(oo(document,t,l,a),p){const t=no((0,y.Ltv)("body"),a);u=(0,y.Ltv)(t.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=(0,y.Ltv)("body");io(u,t,l)}let x,b;try{x=await Qt.fromText(e,{title:i.title})}catch(t){if(n.suppressErrorRendering)throw h(),t;x=await Qt.fromText("error"),b=t}const C=u.select(c).node(),k=x.type,_=C.firstChild,w=_.firstChild,v=x.renderer.getClasses?.(e,x),T=to(n,k,v,o),S=document.createElement("style");S.innerHTML=T,_.insertBefore(S,w);try{await x.renderer.draw(e,t,d.r,x)}catch(r){throw n.suppressErrorRendering?h():Dt.draw(e,t,d.r),r}const A=u.select(`${c} svg`),M=x.db.getAccTitle?.(),B=x.db.getAccDescription?.();co(k,A,M,B),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let L=u.select(c).node().innerHTML;if(f.Rm.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),L=eo(L,p,(0,f._3)(n.arrowMarkerAbsolute)),p){const t=u.select(c+" svg").node();L=ro(L,t)}else g||(L=et.sanitize(L,{ADD_TAGS:Vn,ADD_ATTR:Gn}));if(te(),b)throw b;return h(),{diagramType:k,svg:L,bindFunctions:x.db.bindFunctions}}),"render");function so(t={}){const e=(0,f.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,f.wZ)(e),e?.theme&&e.theme in f.H$?e.themeVariables=f.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=f.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,f.UU)(e):(0,f.Q2)();(0,f.He)(r.logLevel),Zt()}(0,f.K2)(so,"initialize");var lo=(0,f.K2)(((t,e={})=>{const{code:r}=Hn(t);return Qt.fromText(r,e)}),"getDiagramFromText");function co(t,e,r,i){re(e,t),ie(e,r,i,e.attr("id"))}(0,f.K2)(co,"addA11yInfo");var ho=Object.freeze({render:ao,parse:Xn,getDiagramFromText:lo,initialize:so,getConfig:f.zj,setConfig:f.Nk,getSiteConfig:f.Q2,updateSiteConfig:f.B6,reset:(0,f.K2)((()=>{(0,f.cL)()}),"reset"),globalReset:(0,f.K2)((()=>{(0,f.cL)(f.sb)}),"globalReset"),defaultConfig:f.sb});(0,f.He)((0,f.zj)().logLevel),(0,f.cL)((0,f.zj)());var uo=(0,f.K2)(((t,e,r)=>{f.Rm.warn(t),(0,u.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))}),"handleError"),po=(0,f.K2)((async function(t={querySelector:".mermaid"}){try{await fo(t)}catch(e){if((0,u.dq)(e)&&f.Rm.error(e.str),To.parseError&&To.parseError(e),!t.suppressErrors)throw f.Rm.error("Use the suppressErrors option to suppress these errors"),e}}),"run"),fo=(0,f.K2)((async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=ho.getConfig();let n;if(f.Rm.debug((t?"":"No ")+"Callback function found"),r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}f.Rm.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(f.Rm.debug("Start On Load: "+i?.startOnLoad),ho.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new u._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const s=[];for(const e of Array.from(n)){if(f.Rm.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${o.next()}`;a=e.innerHTML,a=(0,g.T)(u._K.entityDecode(a)).trim().replace(//gi,"
    ");const i=u._K.detectInit(a);i&&f.Rm.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:n}=await vo(r,a,e);e.innerHTML=i,t&&await t(r),n&&n(e)}catch(t){uo(t,s,To.parseError)}}if(s.length>0)throw s[0]}),"runThrowsErrors"),go=(0,f.K2)((function(t){ho.initialize(t)}),"initialize"),yo=(0,f.K2)((async function(t,e,r){f.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&go(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await po(i)}),"init"),mo=(0,f.K2)((async(t,{lazyLoad:e=!0}={})=>{Zt(),(0,f.Xd)(...t),!1===e&&await Xt()}),"registerExternalDiagrams"),xo=(0,f.K2)((function(){if(To.startOnLoad){const{startOnLoad:t}=ho.getConfig();t&&To.run().catch((t=>f.Rm.error("Mermaid failed to initialize",t)))}}),"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",xo,!1);var bo=(0,f.K2)((function(t){To.parseError=t}),"setParseErrorHandler"),Co=[],ko=!1,_o=(0,f.K2)((async()=>{if(!ko){for(ko=!0;Co.length>0;){const t=Co.shift();if(t)try{await t()}catch(t){f.Rm.error("Error executing queue",t)}}ko=!1}}),"executeQueue"),wo=(0,f.K2)((async(t,e)=>new Promise(((r,i)=>{const n=(0,f.K2)((()=>new Promise(((n,o)=>{ho.parse(t,e).then((t=>{n(t),r(t)}),(t=>{f.Rm.error("Error parsing",t),To.parseError?.(t),o(t),i(t)}))}))),"performCall");Co.push(n),_o().catch(i)}))),"parse"),vo=(0,f.K2)(((t,e,r)=>new Promise(((i,n)=>{const o=(0,f.K2)((()=>new Promise(((o,a)=>{ho.render(t,e,r).then((t=>{o(t),i(t)}),(t=>{f.Rm.error("Error parsing",t),To.parseError?.(t),a(t),n(t)}))}))),"performCall");Co.push(o),_o().catch(n)}))),"render"),To={startOnLoad:!0,mermaidAPI:ho,parse:wo,render:vo,init:yo,run:po,registerExternalDiagrams:mo,registerLayoutLoaders:h.sO,initialize:go,parseError:void 0,contentLoaded:xo,setParseErrorHandler:bo,detectType:f.Ch},So=To;document.addEventListener("DOMContentLoaded",(function(){let e=t.namespace("hugo-geekdoc").get("color-theme")||c,r=window.matchMedia("(prefers-color-scheme: dark)"),i=!1,n="default";("dark"===e||e===c&&r.matches)&&(i=!0,n="dark"),So.initialize({startOnLoad:!1,flowchart:{useMaxWidth:!0},theme:n,themeVariables:{darkMode:i}}),document.querySelectorAll(".mermaid").forEach((function(t){let e="graph-"+l();So.render(e,t.innerText).then((({svg:e,bindFunctions:r})=>{t.innerHTML=e,r?.(t)}))}))}))})()})(); \ No newline at end of file diff --git a/main-287d5b5c.min.css b/main-287d5b5c.min.css deleted file mode 100644 index 9553a16..0000000 --- a/main-287d5b5c.min.css +++ /dev/null @@ -1 +0,0 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0;line-height:1.2em}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.flex{display:flex}.flex-auto{flex:1 1 auto}.flex-25{flex:1 1 25%}.flex-inline{display:inline-flex}.flex-even{flex:1 1}.flex-wrap{flex-wrap:wrap}.flex-grid{flex-direction:column;border:1px solid var(--accent-color);border-radius:.15rem;background:var(--accent-color-lite)}.flex-gap{flex-wrap:wrap;gap:1rem}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.align-center{align-items:center}.mx-auto{margin:0 auto}.text-center{text-align:center}.text-right{text-align:right}.no-wrap{white-space:nowrap}.hidden{display:none !important}.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}.table-wrap{overflow:auto;margin:1rem 0}.table-wrap>table{margin:0 !important}.badge-placeholder{display:inline-block;min-width:4rem}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-Bold.woff2") format("woff2"),url("fonts/LiberationSans-Bold.woff") format("woff");font-weight:bold;font-style:normal;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-BoldItalic.woff2") format("woff2"),url("fonts/LiberationSans-BoldItalic.woff") format("woff");font-weight:bold;font-style:italic;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-Italic.woff2") format("woff2"),url("fonts/LiberationSans-Italic.woff") format("woff");font-weight:normal;font-style:italic;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans.woff2") format("woff2"),url("fonts/LiberationSans.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"Liberation Mono";src:url("fonts/LiberationMono.woff2") format("woff2"),url("fonts/LiberationMono.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"Metropolis";src:url("fonts/Metropolis.woff2") format("woff2"),url("fonts/Metropolis.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"GeekdocIcons";src:url("fonts/GeekdocIcons.woff2") format("woff2"),url("fonts/GeekdocIcons.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}body{font-family:"Liberation Sans",sans-serif}code,.gdoc-error__title{font-family:"Liberation Mono",monospace}.gdoc-header{font-family:"Metropolis",sans-serif}:root,:root[color-theme=light]{--code-max-height: none;--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: white;--body-font-color: rgb(52, 58, 64);--mark-color: rgb(255, 171, 0);--button-background: #22597d;--button-border-color: rgb(32, 83, 117);--link-color: rgb(10, 83, 154);--link-color-visited: rgb(119, 73, 191);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(206, 212, 218);--accent-color: rgb(233, 236, 239);--accent-color-lite: rgb(248, 249, 250);--control-icons: #b2bac1;--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img,:root[color-theme=light] .dark-mode-dim .gdoc-markdown img{filter:none}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock,:root[color-theme=light] .gdoc-markdown .gdoc-hint,:root[color-theme=light] .gdoc-markdown .gdoc-props__tag,:root[color-theme=light] .gdoc-markdown .admonitionblock{filter:none}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child,:root[color-theme=light] .gdoc-markdown .gdoc-hint__title,:root[color-theme=light] .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.05)}:root .chroma,:root[color-theme=light] .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl,:root[color-theme=light] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma,:root[color-theme=light] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable,:root[color-theme=light] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma,:root[color-theme=light] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code,:root[color-theme=light] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2),:root[color-theme=light] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x,:root[color-theme=light] .chroma .x{color:inherit}:root .chroma .err,:root[color-theme=light] .chroma .err{color:#a61717;background-color:#e3d2d2}:root .chroma .lntd,:root[color-theme=light] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl,:root[color-theme=light] .chroma .hl{display:block;width:100%;background-color:#ffc}:root .chroma .lnt,:root[color-theme=light] .chroma .lnt{padding:0 .8em}:root .chroma .ln,:root[color-theme=light] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em}:root .chroma .k,:root[color-theme=light] .chroma .k{color:#000;font-weight:bold}:root .chroma .kc,:root[color-theme=light] .chroma .kc{color:#000;font-weight:bold}:root .chroma .kd,:root[color-theme=light] .chroma .kd{color:#000;font-weight:bold}:root .chroma .kn,:root[color-theme=light] .chroma .kn{color:#000;font-weight:bold}:root .chroma .kp,:root[color-theme=light] .chroma .kp{color:#000;font-weight:bold}:root .chroma .kr,:root[color-theme=light] .chroma .kr{color:#000;font-weight:bold}:root .chroma .kt,:root[color-theme=light] .chroma .kt{color:#458;font-weight:bold}:root .chroma .n,:root[color-theme=light] .chroma .n{color:inherit}:root .chroma .na,:root[color-theme=light] .chroma .na{color:#006767}:root .chroma .nb,:root[color-theme=light] .chroma .nb{color:#556165}:root .chroma .bp,:root[color-theme=light] .chroma .bp{color:#676767}:root .chroma .nc,:root[color-theme=light] .chroma .nc{color:#458;font-weight:bold}:root .chroma .no,:root[color-theme=light] .chroma .no{color:#006767}:root .chroma .nd,:root[color-theme=light] .chroma .nd{color:#3c5d5d;font-weight:bold}:root .chroma .ni,:root[color-theme=light] .chroma .ni{color:purple}:root .chroma .ne,:root[color-theme=light] .chroma .ne{color:#900;font-weight:bold}:root .chroma .nf,:root[color-theme=light] .chroma .nf{color:#900;font-weight:bold}:root .chroma .fm,:root[color-theme=light] .chroma .fm{color:inherit}:root .chroma .nl,:root[color-theme=light] .chroma .nl{color:#900;font-weight:bold}:root .chroma .nn,:root[color-theme=light] .chroma .nn{color:#555}:root .chroma .nx,:root[color-theme=light] .chroma .nx{color:inherit}:root .chroma .py,:root[color-theme=light] .chroma .py{color:inherit}:root .chroma .nt,:root[color-theme=light] .chroma .nt{color:navy}:root .chroma .nv,:root[color-theme=light] .chroma .nv{color:#006767}:root .chroma .vc,:root[color-theme=light] .chroma .vc{color:#006767}:root .chroma .vg,:root[color-theme=light] .chroma .vg{color:#006767}:root .chroma .vi,:root[color-theme=light] .chroma .vi{color:#006767}:root .chroma .vm,:root[color-theme=light] .chroma .vm{color:inherit}:root .chroma .l,:root[color-theme=light] .chroma .l{color:inherit}:root .chroma .ld,:root[color-theme=light] .chroma .ld{color:inherit}:root .chroma .s,:root[color-theme=light] .chroma .s{color:#d14}:root .chroma .sa,:root[color-theme=light] .chroma .sa{color:#d14}:root .chroma .sb,:root[color-theme=light] .chroma .sb{color:#d14}:root .chroma .sc,:root[color-theme=light] .chroma .sc{color:#d14}:root .chroma .dl,:root[color-theme=light] .chroma .dl{color:#d14}:root .chroma .sd,:root[color-theme=light] .chroma .sd{color:#d14}:root .chroma .s2,:root[color-theme=light] .chroma .s2{color:#d14}:root .chroma .se,:root[color-theme=light] .chroma .se{color:#d14}:root .chroma .sh,:root[color-theme=light] .chroma .sh{color:#d14}:root .chroma .si,:root[color-theme=light] .chroma .si{color:#d14}:root .chroma .sx,:root[color-theme=light] .chroma .sx{color:#d14}:root .chroma .sr,:root[color-theme=light] .chroma .sr{color:#009926}:root .chroma .s1,:root[color-theme=light] .chroma .s1{color:#d14}:root .chroma .ss,:root[color-theme=light] .chroma .ss{color:#990073}:root .chroma .m,:root[color-theme=light] .chroma .m{color:#027e83}:root .chroma .mb,:root[color-theme=light] .chroma .mb{color:#027e83}:root .chroma .mf,:root[color-theme=light] .chroma .mf{color:#027e83}:root .chroma .mh,:root[color-theme=light] .chroma .mh{color:#027e83}:root .chroma .mi,:root[color-theme=light] .chroma .mi{color:#027e83}:root .chroma .il,:root[color-theme=light] .chroma .il{color:#027e83}:root .chroma .mo,:root[color-theme=light] .chroma .mo{color:#027e83}:root .chroma .o,:root[color-theme=light] .chroma .o{color:#000;font-weight:bold}:root .chroma .ow,:root[color-theme=light] .chroma .ow{color:#000;font-weight:bold}:root .chroma .p,:root[color-theme=light] .chroma .p{color:inherit}:root .chroma .c,:root[color-theme=light] .chroma .c{color:#676765;font-style:italic}:root .chroma .ch,:root[color-theme=light] .chroma .ch{color:#676765;font-style:italic}:root .chroma .cm,:root[color-theme=light] .chroma .cm{color:#676765;font-style:italic}:root .chroma .c1,:root[color-theme=light] .chroma .c1{color:#676765;font-style:italic}:root .chroma .cs,:root[color-theme=light] .chroma .cs{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cp,:root[color-theme=light] .chroma .cp{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cpf,:root[color-theme=light] .chroma .cpf{color:#676767;font-weight:bold;font-style:italic}:root .chroma .g,:root[color-theme=light] .chroma .g{color:inherit}:root .chroma .gd,:root[color-theme=light] .chroma .gd{color:#000;background-color:#fdd}:root .chroma .ge,:root[color-theme=light] .chroma .ge{color:#000;font-style:italic}:root .chroma .gr,:root[color-theme=light] .chroma .gr{color:#a00}:root .chroma .gh,:root[color-theme=light] .chroma .gh{color:#676767}:root .chroma .gi,:root[color-theme=light] .chroma .gi{color:#000;background-color:#dfd}:root .chroma .go,:root[color-theme=light] .chroma .go{color:#6f6f6f}:root .chroma .gp,:root[color-theme=light] .chroma .gp{color:#555}:root .chroma .gs,:root[color-theme=light] .chroma .gs{font-weight:bold}:root .chroma .gu,:root[color-theme=light] .chroma .gu{color:#5f5f5f}:root .chroma .gt,:root[color-theme=light] .chroma .gt{color:#a00}:root .chroma .gl,:root[color-theme=light] .chroma .gl{text-decoration:underline}:root .chroma .w,:root[color-theme=light] .chroma .w{color:#bbb}:root,:root[color-theme=light]{--code-background: rgb(248, 249, 250);--code-accent-color: #e6eaed;--code-accent-color-lite: #f2f4f6;--code-font-color: rgb(70, 70, 70);--code-copy-background: rgb(248, 249, 250);--code-copy-font-color: #6c6c6c;--code-copy-border-color: #797979;--code-copy-success-color: rgb(0, 200, 83)}@media(prefers-color-scheme: light){:root{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: white;--body-font-color: rgb(52, 58, 64);--mark-color: rgb(255, 171, 0);--button-background: #22597d;--button-border-color: rgb(32, 83, 117);--link-color: rgb(10, 83, 154);--link-color-visited: rgb(119, 73, 191);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(206, 212, 218);--accent-color: rgb(233, 236, 239);--accent-color-lite: rgb(248, 249, 250);--control-icons: #b2bac1;--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img{filter:none}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock{filter:none}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.05)}:root .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x{color:inherit}:root .chroma .err{color:#a61717;background-color:#e3d2d2}:root .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl{display:block;width:100%;background-color:#ffc}:root .chroma .lnt{padding:0 .8em}:root .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em}:root .chroma .k{color:#000;font-weight:bold}:root .chroma .kc{color:#000;font-weight:bold}:root .chroma .kd{color:#000;font-weight:bold}:root .chroma .kn{color:#000;font-weight:bold}:root .chroma .kp{color:#000;font-weight:bold}:root .chroma .kr{color:#000;font-weight:bold}:root .chroma .kt{color:#458;font-weight:bold}:root .chroma .n{color:inherit}:root .chroma .na{color:#006767}:root .chroma .nb{color:#556165}:root .chroma .bp{color:#676767}:root .chroma .nc{color:#458;font-weight:bold}:root .chroma .no{color:#006767}:root .chroma .nd{color:#3c5d5d;font-weight:bold}:root .chroma .ni{color:purple}:root .chroma .ne{color:#900;font-weight:bold}:root .chroma .nf{color:#900;font-weight:bold}:root .chroma .fm{color:inherit}:root .chroma .nl{color:#900;font-weight:bold}:root .chroma .nn{color:#555}:root .chroma .nx{color:inherit}:root .chroma .py{color:inherit}:root .chroma .nt{color:navy}:root .chroma .nv{color:#006767}:root .chroma .vc{color:#006767}:root .chroma .vg{color:#006767}:root .chroma .vi{color:#006767}:root .chroma .vm{color:inherit}:root .chroma .l{color:inherit}:root .chroma .ld{color:inherit}:root .chroma .s{color:#d14}:root .chroma .sa{color:#d14}:root .chroma .sb{color:#d14}:root .chroma .sc{color:#d14}:root .chroma .dl{color:#d14}:root .chroma .sd{color:#d14}:root .chroma .s2{color:#d14}:root .chroma .se{color:#d14}:root .chroma .sh{color:#d14}:root .chroma .si{color:#d14}:root .chroma .sx{color:#d14}:root .chroma .sr{color:#009926}:root .chroma .s1{color:#d14}:root .chroma .ss{color:#990073}:root .chroma .m{color:#027e83}:root .chroma .mb{color:#027e83}:root .chroma .mf{color:#027e83}:root .chroma .mh{color:#027e83}:root .chroma .mi{color:#027e83}:root .chroma .il{color:#027e83}:root .chroma .mo{color:#027e83}:root .chroma .o{color:#000;font-weight:bold}:root .chroma .ow{color:#000;font-weight:bold}:root .chroma .p{color:inherit}:root .chroma .c{color:#676765;font-style:italic}:root .chroma .ch{color:#676765;font-style:italic}:root .chroma .cm{color:#676765;font-style:italic}:root .chroma .c1{color:#676765;font-style:italic}:root .chroma .cs{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cp{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cpf{color:#676767;font-weight:bold;font-style:italic}:root .chroma .g{color:inherit}:root .chroma .gd{color:#000;background-color:#fdd}:root .chroma .ge{color:#000;font-style:italic}:root .chroma .gr{color:#a00}:root .chroma .gh{color:#676767}:root .chroma .gi{color:#000;background-color:#dfd}:root .chroma .go{color:#6f6f6f}:root .chroma .gp{color:#555}:root .chroma .gs{font-weight:bold}:root .chroma .gu{color:#5f5f5f}:root .chroma .gt{color:#a00}:root .chroma .gl{text-decoration:underline}:root .chroma .w{color:#bbb}:root{--code-background: rgb(248, 249, 250);--code-accent-color: #e6eaed;--code-accent-color-lite: #f2f4f6;--code-font-color: rgb(70, 70, 70);--code-copy-background: rgb(248, 249, 250);--code-copy-font-color: #6c6c6c;--code-copy-border-color: #797979;--code-copy-success-color: rgb(0, 200, 83)}}:root[color-theme=dark]{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: #29363e;--body-font-color: #c2cfd7;--mark-color: rgb(255, 171, 0);--button-background: #22597d;--button-border-color: rgb(32, 83, 117);--link-color: rgb(110, 168, 212);--link-color-visited: rgb(186, 142, 240);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: #192125;--accent-color: #212b32;--accent-color-lite: #253138;--control-icons: #b2bac1;--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root[color-theme=dark] .dark-mode-dim .gdoc-markdown img{filter:brightness(0.75) grayscale(0.2)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint,:root[color-theme=dark] .gdoc-markdown .gdoc-props__tag,:root[color-theme=dark] .gdoc-markdown .admonitionblock{filter:saturate(2.5) brightness(0.85)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint a,:root[color-theme=dark] .gdoc-markdown .admonitionblock a{color:var(--hint-link-color)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint a:visited,:root[color-theme=dark] .gdoc-markdown .admonitionblock a:visited{color:var(--hint-link-color-visited)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint__title,:root[color-theme=dark] .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.15)}:root[color-theme=dark] .chroma{color:var(--code-font-color)}:root[color-theme=dark] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root[color-theme=dark] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root[color-theme=dark] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root[color-theme=dark] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root[color-theme=dark] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root[color-theme=dark] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root[color-theme=dark] .chroma .x{color:inherit}:root[color-theme=dark] .chroma .err{color:inherit}:root[color-theme=dark] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root[color-theme=dark] .chroma .hl{display:block;width:100%;background-color:#4f1605}:root[color-theme=dark] .chroma .lnt{padding:0 .8em}:root[color-theme=dark] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root[color-theme=dark] .chroma .k{color:#ff79c6}:root[color-theme=dark] .chroma .kc{color:#ff79c6}:root[color-theme=dark] .chroma .kd{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .kn{color:#ff79c6}:root[color-theme=dark] .chroma .kp{color:#ff79c6}:root[color-theme=dark] .chroma .kr{color:#ff79c6}:root[color-theme=dark] .chroma .kt{color:#8be9fd}:root[color-theme=dark] .chroma .n{color:inherit}:root[color-theme=dark] .chroma .na{color:#50fa7b}:root[color-theme=dark] .chroma .nb{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .bp{color:inherit}:root[color-theme=dark] .chroma .nc{color:#50fa7b}:root[color-theme=dark] .chroma .no{color:inherit}:root[color-theme=dark] .chroma .nd{color:inherit}:root[color-theme=dark] .chroma .ni{color:inherit}:root[color-theme=dark] .chroma .ne{color:inherit}:root[color-theme=dark] .chroma .nf{color:#50fa7b}:root[color-theme=dark] .chroma .fm{color:inherit}:root[color-theme=dark] .chroma .nl{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .nn{color:inherit}:root[color-theme=dark] .chroma .nx{color:inherit}:root[color-theme=dark] .chroma .py{color:inherit}:root[color-theme=dark] .chroma .nt{color:#ff79c6}:root[color-theme=dark] .chroma .nv{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vc{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vg{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vi{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vm{color:inherit}:root[color-theme=dark] .chroma .l{color:inherit}:root[color-theme=dark] .chroma .ld{color:inherit}:root[color-theme=dark] .chroma .s{color:#f1fa8c}:root[color-theme=dark] .chroma .sa{color:#f1fa8c}:root[color-theme=dark] .chroma .sb{color:#f1fa8c}:root[color-theme=dark] .chroma .sc{color:#f1fa8c}:root[color-theme=dark] .chroma .dl{color:#f1fa8c}:root[color-theme=dark] .chroma .sd{color:#f1fa8c}:root[color-theme=dark] .chroma .s2{color:#f1fa8c}:root[color-theme=dark] .chroma .se{color:#f1fa8c}:root[color-theme=dark] .chroma .sh{color:#f1fa8c}:root[color-theme=dark] .chroma .si{color:#f1fa8c}:root[color-theme=dark] .chroma .sx{color:#f1fa8c}:root[color-theme=dark] .chroma .sr{color:#f1fa8c}:root[color-theme=dark] .chroma .s1{color:#f1fa8c}:root[color-theme=dark] .chroma .ss{color:#f1fa8c}:root[color-theme=dark] .chroma .m{color:#bd93f9}:root[color-theme=dark] .chroma .mb{color:#bd93f9}:root[color-theme=dark] .chroma .mf{color:#bd93f9}:root[color-theme=dark] .chroma .mh{color:#bd93f9}:root[color-theme=dark] .chroma .mi{color:#bd93f9}:root[color-theme=dark] .chroma .il{color:#bd93f9}:root[color-theme=dark] .chroma .mo{color:#bd93f9}:root[color-theme=dark] .chroma .o{color:#ff79c6}:root[color-theme=dark] .chroma .ow{color:#ff79c6}:root[color-theme=dark] .chroma .p{color:inherit}:root[color-theme=dark] .chroma .c{color:#96a6d8}:root[color-theme=dark] .chroma .ch{color:#96a6d8}:root[color-theme=dark] .chroma .cm{color:#96a6d8}:root[color-theme=dark] .chroma .c1{color:#96a6d8}:root[color-theme=dark] .chroma .cs{color:#96a6d8}:root[color-theme=dark] .chroma .cp{color:#ff79c6}:root[color-theme=dark] .chroma .cpf{color:#ff79c6}:root[color-theme=dark] .chroma .g{color:inherit}:root[color-theme=dark] .chroma .gd{color:#d98f90}:root[color-theme=dark] .chroma .ge{text-decoration:underline}:root[color-theme=dark] .chroma .gr{color:inherit}:root[color-theme=dark] .chroma .gh{font-weight:bold;color:inherit}:root[color-theme=dark] .chroma .gi{font-weight:bold}:root[color-theme=dark] .chroma .go{color:#8f9ea8}:root[color-theme=dark] .chroma .gp{color:inherit}:root[color-theme=dark] .chroma .gs{color:inherit}:root[color-theme=dark] .chroma .gu{font-weight:bold}:root[color-theme=dark] .chroma .gt{color:inherit}:root[color-theme=dark] .chroma .gl{text-decoration:underline}:root[color-theme=dark] .chroma .w{color:inherit}:root[color-theme=dark]{--code-background: #232e35;--code-accent-color: #1b2329;--code-accent-color-lite: #1f292f;--code-font-color: rgb(185, 185, 185);--code-copy-background: #232e35;--code-copy-font-color: #939393;--code-copy-border-color: #868686;--code-copy-success-color: rgba(0, 200, 83, 0.45)}:root[code-theme=dark] .chroma{color:var(--code-font-color)}:root[code-theme=dark] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root[code-theme=dark] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root[code-theme=dark] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root[code-theme=dark] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root[code-theme=dark] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root[code-theme=dark] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root[code-theme=dark] .chroma .x{color:inherit}:root[code-theme=dark] .chroma .err{color:inherit}:root[code-theme=dark] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root[code-theme=dark] .chroma .hl{display:block;width:100%;background-color:#4f1605}:root[code-theme=dark] .chroma .lnt{padding:0 .8em}:root[code-theme=dark] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root[code-theme=dark] .chroma .k{color:#ff79c6}:root[code-theme=dark] .chroma .kc{color:#ff79c6}:root[code-theme=dark] .chroma .kd{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .kn{color:#ff79c6}:root[code-theme=dark] .chroma .kp{color:#ff79c6}:root[code-theme=dark] .chroma .kr{color:#ff79c6}:root[code-theme=dark] .chroma .kt{color:#8be9fd}:root[code-theme=dark] .chroma .n{color:inherit}:root[code-theme=dark] .chroma .na{color:#50fa7b}:root[code-theme=dark] .chroma .nb{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .bp{color:inherit}:root[code-theme=dark] .chroma .nc{color:#50fa7b}:root[code-theme=dark] .chroma .no{color:inherit}:root[code-theme=dark] .chroma .nd{color:inherit}:root[code-theme=dark] .chroma .ni{color:inherit}:root[code-theme=dark] .chroma .ne{color:inherit}:root[code-theme=dark] .chroma .nf{color:#50fa7b}:root[code-theme=dark] .chroma .fm{color:inherit}:root[code-theme=dark] .chroma .nl{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .nn{color:inherit}:root[code-theme=dark] .chroma .nx{color:inherit}:root[code-theme=dark] .chroma .py{color:inherit}:root[code-theme=dark] .chroma .nt{color:#ff79c6}:root[code-theme=dark] .chroma .nv{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vc{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vg{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vi{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vm{color:inherit}:root[code-theme=dark] .chroma .l{color:inherit}:root[code-theme=dark] .chroma .ld{color:inherit}:root[code-theme=dark] .chroma .s{color:#f1fa8c}:root[code-theme=dark] .chroma .sa{color:#f1fa8c}:root[code-theme=dark] .chroma .sb{color:#f1fa8c}:root[code-theme=dark] .chroma .sc{color:#f1fa8c}:root[code-theme=dark] .chroma .dl{color:#f1fa8c}:root[code-theme=dark] .chroma .sd{color:#f1fa8c}:root[code-theme=dark] .chroma .s2{color:#f1fa8c}:root[code-theme=dark] .chroma .se{color:#f1fa8c}:root[code-theme=dark] .chroma .sh{color:#f1fa8c}:root[code-theme=dark] .chroma .si{color:#f1fa8c}:root[code-theme=dark] .chroma .sx{color:#f1fa8c}:root[code-theme=dark] .chroma .sr{color:#f1fa8c}:root[code-theme=dark] .chroma .s1{color:#f1fa8c}:root[code-theme=dark] .chroma .ss{color:#f1fa8c}:root[code-theme=dark] .chroma .m{color:#bd93f9}:root[code-theme=dark] .chroma .mb{color:#bd93f9}:root[code-theme=dark] .chroma .mf{color:#bd93f9}:root[code-theme=dark] .chroma .mh{color:#bd93f9}:root[code-theme=dark] .chroma .mi{color:#bd93f9}:root[code-theme=dark] .chroma .il{color:#bd93f9}:root[code-theme=dark] .chroma .mo{color:#bd93f9}:root[code-theme=dark] .chroma .o{color:#ff79c6}:root[code-theme=dark] .chroma .ow{color:#ff79c6}:root[code-theme=dark] .chroma .p{color:inherit}:root[code-theme=dark] .chroma .c{color:#96a6d8}:root[code-theme=dark] .chroma .ch{color:#96a6d8}:root[code-theme=dark] .chroma .cm{color:#96a6d8}:root[code-theme=dark] .chroma .c1{color:#96a6d8}:root[code-theme=dark] .chroma .cs{color:#96a6d8}:root[code-theme=dark] .chroma .cp{color:#ff79c6}:root[code-theme=dark] .chroma .cpf{color:#ff79c6}:root[code-theme=dark] .chroma .g{color:inherit}:root[code-theme=dark] .chroma .gd{color:#d98f90}:root[code-theme=dark] .chroma .ge{text-decoration:underline}:root[code-theme=dark] .chroma .gr{color:inherit}:root[code-theme=dark] .chroma .gh{font-weight:bold;color:inherit}:root[code-theme=dark] .chroma .gi{font-weight:bold}:root[code-theme=dark] .chroma .go{color:#8f9ea8}:root[code-theme=dark] .chroma .gp{color:inherit}:root[code-theme=dark] .chroma .gs{color:inherit}:root[code-theme=dark] .chroma .gu{font-weight:bold}:root[code-theme=dark] .chroma .gt{color:inherit}:root[code-theme=dark] .chroma .gl{text-decoration:underline}:root[code-theme=dark] .chroma .w{color:inherit}:root[code-theme=dark]{--code-background: #232e35;--code-accent-color: #1b2329;--code-accent-color-lite: #1f292f;--code-font-color: rgb(185, 185, 185);--code-copy-background: #232e35;--code-copy-font-color: #939393;--code-copy-border-color: #868686;--code-copy-success-color: rgba(0, 200, 83, 0.45)}@media(prefers-color-scheme: dark){:root{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: #29363e;--body-font-color: #c2cfd7;--mark-color: rgb(255, 171, 0);--button-background: #22597d;--button-border-color: rgb(32, 83, 117);--link-color: rgb(110, 168, 212);--link-color-visited: rgb(186, 142, 240);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: #192125;--accent-color: #212b32;--accent-color-lite: #253138;--control-icons: #b2bac1;--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img{filter:brightness(0.75) grayscale(0.2)}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock{filter:saturate(2.5) brightness(0.85)}:root .gdoc-markdown .gdoc-hint a,:root .gdoc-markdown .admonitionblock a{color:var(--hint-link-color)}:root .gdoc-markdown .gdoc-hint a:visited,:root .gdoc-markdown .admonitionblock a:visited{color:var(--hint-link-color-visited)}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.15)}:root .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x{color:inherit}:root .chroma .err{color:inherit}:root .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl{display:block;width:100%;background-color:#4f1605}:root .chroma .lnt{padding:0 .8em}:root .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root .chroma .k{color:#ff79c6}:root .chroma .kc{color:#ff79c6}:root .chroma .kd{color:#8be9fd;font-style:italic}:root .chroma .kn{color:#ff79c6}:root .chroma .kp{color:#ff79c6}:root .chroma .kr{color:#ff79c6}:root .chroma .kt{color:#8be9fd}:root .chroma .n{color:inherit}:root .chroma .na{color:#50fa7b}:root .chroma .nb{color:#8be9fd;font-style:italic}:root .chroma .bp{color:inherit}:root .chroma .nc{color:#50fa7b}:root .chroma .no{color:inherit}:root .chroma .nd{color:inherit}:root .chroma .ni{color:inherit}:root .chroma .ne{color:inherit}:root .chroma .nf{color:#50fa7b}:root .chroma .fm{color:inherit}:root .chroma .nl{color:#8be9fd;font-style:italic}:root .chroma .nn{color:inherit}:root .chroma .nx{color:inherit}:root .chroma .py{color:inherit}:root .chroma .nt{color:#ff79c6}:root .chroma .nv{color:#8be9fd;font-style:italic}:root .chroma .vc{color:#8be9fd;font-style:italic}:root .chroma .vg{color:#8be9fd;font-style:italic}:root .chroma .vi{color:#8be9fd;font-style:italic}:root .chroma .vm{color:inherit}:root .chroma .l{color:inherit}:root .chroma .ld{color:inherit}:root .chroma .s{color:#f1fa8c}:root .chroma .sa{color:#f1fa8c}:root .chroma .sb{color:#f1fa8c}:root .chroma .sc{color:#f1fa8c}:root .chroma .dl{color:#f1fa8c}:root .chroma .sd{color:#f1fa8c}:root .chroma .s2{color:#f1fa8c}:root .chroma .se{color:#f1fa8c}:root .chroma .sh{color:#f1fa8c}:root .chroma .si{color:#f1fa8c}:root .chroma .sx{color:#f1fa8c}:root .chroma .sr{color:#f1fa8c}:root .chroma .s1{color:#f1fa8c}:root .chroma .ss{color:#f1fa8c}:root .chroma .m{color:#bd93f9}:root .chroma .mb{color:#bd93f9}:root .chroma .mf{color:#bd93f9}:root .chroma .mh{color:#bd93f9}:root .chroma .mi{color:#bd93f9}:root .chroma .il{color:#bd93f9}:root .chroma .mo{color:#bd93f9}:root .chroma .o{color:#ff79c6}:root .chroma .ow{color:#ff79c6}:root .chroma .p{color:inherit}:root .chroma .c{color:#96a6d8}:root .chroma .ch{color:#96a6d8}:root .chroma .cm{color:#96a6d8}:root .chroma .c1{color:#96a6d8}:root .chroma .cs{color:#96a6d8}:root .chroma .cp{color:#ff79c6}:root .chroma .cpf{color:#ff79c6}:root .chroma .g{color:inherit}:root .chroma .gd{color:#d98f90}:root .chroma .ge{text-decoration:underline}:root .chroma .gr{color:inherit}:root .chroma .gh{font-weight:bold;color:inherit}:root .chroma .gi{font-weight:bold}:root .chroma .go{color:#8f9ea8}:root .chroma .gp{color:inherit}:root .chroma .gs{color:inherit}:root .chroma .gu{font-weight:bold}:root .chroma .gt{color:inherit}:root .chroma .gl{text-decoration:underline}:root .chroma .w{color:inherit}:root{--code-background: #232e35;--code-accent-color: #1b2329;--code-accent-color-lite: #1f292f;--code-font-color: rgb(185, 185, 185);--code-copy-background: #232e35;--code-copy-font-color: #939393;--code-copy-border-color: #868686;--code-copy-success-color: rgba(0, 200, 83, 0.45)}}html{font-size:16px;letter-spacing:.33px;scroll-behavior:smooth}html.color-toggle-hidden #gdoc-color-theme{display:none}html.color-toggle-light #gdoc-color-theme .gdoc_brightness_light{display:inline-block}html.color-toggle-light #gdoc-color-theme .gdoc_brightness_auto,html.color-toggle-light #gdoc-color-theme .gdoc_brightness_dark{display:none}html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_dark{display:inline-block}html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_auto,html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_light{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_light{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_dark{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_auto{display:inline-block}html,body{min-width:20rem;overflow-x:hidden}body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}body *{box-sizing:inherit}h1,h2,h3,h4,h5,h6{font-weight:normal;display:flex;align-items:center}h4,h5,h6{font-size:1rem !important}a{text-decoration:none;color:var(--link-color)}a:hover{text-decoration:underline}a:visited{color:var(--link-color-visited)}i.gdoc-icon{font-family:"GeekdocIcons";font-style:normal}img{vertical-align:middle}#gdoc-color-theme{cursor:pointer}.fake-link:hover{background-image:linear-gradient(var(--link-color), var(--link-color));background-position:0 100%;background-size:100% 1px;background-repeat:no-repeat;text-decoration:none}.wrapper{display:flex;flex-direction:column;min-height:100vh;color:var(--body-font-color);background:var(--body-background);font-weight:normal}.container{width:100%;max-width:82rem;margin:0 auto;padding:1.25rem}svg.gdoc-icon{display:inline-block;width:1.25rem;height:1.25rem;vertical-align:middle;stroke-width:0;stroke:currentColor;fill:currentColor;position:relative}.gdoc-header{background:var(--header-background);color:var(--header-font-color);border-bottom:.3em solid var(--footer-background)}.gdoc-header__link,.gdoc-header__link:visited{color:var(--header-font-color)}.gdoc-header__link:hover{text-decoration:none}.gdoc-header svg.gdoc-icon{width:2rem;height:2rem}.gdoc-brand{font-size:2rem;line-height:2rem}.gdoc-brand__img{margin-right:1rem;width:2rem;height:2rem}.gdoc-menu-header__items{display:flex}.gdoc-menu-header__items>span{margin-left:.5rem}.gdoc-menu-header__control,.gdoc-menu-header__home{display:none}.gdoc-menu-header__control svg.gdoc-icon,.gdoc-menu-header__home svg.gdoc-icon{cursor:pointer}.gdoc-nav{flex:0 0 18rem}.gdoc-nav nav{width:18rem;padding:1rem 2rem 1rem 0}.gdoc-nav nav>ul>li>*{font-weight:normal}.gdoc-nav nav section{margin-top:2rem}.gdoc-nav__control{display:none;margin:0;padding:0}.gdoc-nav__control svg.gdoc-icon{cursor:pointer}.gdoc-nav__control svg.gdoc-icon.gdoc_menu{display:inline-block}.gdoc-nav__control svg.gdoc-icon.gdoc_arrow_back{display:none}.gdoc-nav__list{padding-left:1rem;margin:0;padding:0;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.gdoc-nav__list ul{padding-left:1rem}.gdoc-nav__list li{margin:.75rem 0}.gdoc-nav__list svg.gdoc-icon{margin-right:.25rem}.gdoc-nav__toggle{display:none}.gdoc-nav__toggle~label{cursor:pointer}.gdoc-nav__toggle~label svg.gdoc-icon.toggle{width:1rem;height:1rem}.gdoc-nav__toggle:not(:checked)~ul,.gdoc-nav__toggle:not(:checked)~label svg.gdoc-icon.gdoc_keyboard_arrow_down{display:none}.gdoc-nav__toggle:not(:checked)~label svg.gdoc-icon.gdoc_keyboard_arrow_left{display:block}.gdoc-nav__toggle:checked~ul,.gdoc-nav__toggle:checked~label svg.gdoc-icon.gdoc_keyboard_arrow_down{display:block}.gdoc-nav__toggle:checked~label svg.gdoc-icon.gdoc_keyboard_arrow_left{display:none}.gdoc-nav--main>ul>li>span,.gdoc-nav--main>ul>li>span>a,.gdoc-nav--main>ul>li>label,.gdoc-nav--main>ul>li>label>a{font-weight:bold}.gdoc-nav__entry,.gdoc-language__entry{flex:1;color:var(--body-font-color)}.gdoc-nav__entry:hover,.gdoc-nav__entry.is-active,.gdoc-language__entry:hover,.gdoc-language__entry.is-active{text-decoration:underline;text-decoration-style:dashed !important}.gdoc-nav__entry:visited,.gdoc-language__entry:visited{color:var(--body-font-color)}.gdoc-search__list,.gdoc-language__list{background:var(--body-background);border-radius:.15rem;box-shadow:0 1px 3px 0 var(--accent-color-dark),0 1px 2px 0 var(--accent-color);position:absolute;margin:0;padding:.5rem .25rem !important;list-style:none;top:calc(100% + 0.5rem);z-index:2}.gdoc-page{min-width:18rem;flex-grow:1;padding:1rem 0}.gdoc-page h1,.gdoc-page h2,.gdoc-page h3,.gdoc-page h4,.gdoc-page h5,.gdoc-page h6{font-weight:600}.gdoc-page__header,.gdoc-page__footer{margin-bottom:1.5rem}.gdoc-page__header svg.gdoc-icon,.gdoc-page__footer svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__header a,.gdoc-page__header a:visited,.gdoc-page__footer a,.gdoc-page__footer a:visited{color:var(--link-color)}.gdoc-page__header{background:var(--accent-color-lite);padding:.5rem 1rem;border-radius:.15rem}.gdoc-page__nav:hover{background-image:linear-gradient(var(--link-color), var(--link-color));background-position:0 100%;background-size:100% 1px;background-repeat:no-repeat}.gdoc-page__anchorwrap{gap:.5em}.gdoc-page__anchorwrap:hover .gdoc-page__anchor svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__anchor svg.gdoc-icon{width:1.85em;height:1.85em;color:rgba(0,0,0,0)}.gdoc-page__anchor:focus svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__footer{margin-top:2rem}.gdoc-page__footer a:hover{text-decoration:none}.gdoc-post{word-wrap:break-word;border-top:1px dashed #868e96;padding:2rem 0}.gdoc-post:first-of-type{padding-top:0}.gdoc-post__header h1{margin-top:0}.gdoc-post__header a,.gdoc-post__header a:visited{color:var(--body-font-color);text-decoration:none}.gdoc-post__header a:hover{background:none;text-decoration:underline;color:var(--body-font-color)}.gdoc-post:first-child{border-top:0}.gdoc-post:first-child h1{margin-top:0}.gdoc-post__readmore{margin:2rem 0}.gdoc-post__readmore a,.gdoc-post__readmore a:hover,.gdoc-post__readmore a:visited{color:var(--link-color);text-decoration:none !important}.gdoc-post__meta span svg.gdoc-icon{margin-left:-5px}.gdoc-post__meta>span{margin:.25rem 0}.gdoc-post__meta>span:not(:last-child){margin-right:.5rem}.gdoc-post__meta svg.gdoc-icon{font-size:1.25rem}.gdoc-post__meta .gdoc-button{margin:0 .125rem 0 0}.gdoc-post__meta--head{margin-bottom:2rem}.gdoc-post__codecontainer{position:relative}.gdoc-post__codecontainer:hover>.gdoc-post__codecopy{visibility:visible}.gdoc-post__codecopy{visibility:hidden;position:absolute;top:.5rem;right:.5rem;border:1.5px solid var(--code-copy-border-color);border-radius:.15rem;background:var(--code-copy-background);width:2rem;height:2rem}.gdoc-post__codecopy svg.gdoc-icon{top:0;width:1.25rem;height:1.25rem;color:var(--code-copy-font-color)}.gdoc-post__codecopy:hover{cursor:pointer}.gdoc-post__codecopy--success{border-color:var(--code-copy-success-color)}.gdoc-post__codecopy--success svg.gdoc-icon{color:var(--code-copy-success-color)}.gdoc-post__codecopy--out{transition:visibility 2s ease-out}.gdoc-footer{background:var(--footer-background);color:var(--footer-font-color)}.gdoc-footer .fake-link{text-decoration:none}.gdoc-footer .fake-link:hover{background-image:linear-gradient(var(--footer-link-color), var(--footer-link-color))}.gdoc-footer__item{line-height:2rem}.gdoc-footer__item--row{margin-right:1rem}.gdoc-footer__link{text-decoration:underline;color:var(--footer-link-color)}.gdoc-footer__link:visited{color:var(--footer-link-color-visited)}.gdoc-search{position:relative}.gdoc-search svg.gdoc-icon{position:absolute;left:.5rem;color:var(--control-icons);width:1.25rem;height:1.25rem}.gdoc-search::after{display:block;content:"";clear:both}.gdoc-search__input{width:100%;padding:.5rem;padding-left:2rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;border:1px solid rgba(0,0,0,0);border-radius:.15rem;background:var(--accent-color-lite);color:var(--body-font-color)}.gdoc-search__input:focus{outline:none !important;border:1px solid var(--accent-color)}.gdoc-search__list{visibility:hidden;left:0;width:100%}.gdoc-search__list ul{list-style:none;padding-left:0}.gdoc-search__list>li>span{font-weight:bold}.gdoc-search__list>li+li{margin-top:.25rem}.gdoc-search__list svg.gdoc-icon{margin-right:.25rem}.gdoc-search__section{display:flex;flex-direction:column;padding:.25rem !important}.gdoc-search__entry{display:flex;flex-direction:column;color:var(--body-font-color);padding:.25rem !important;border-radius:.15rem}.gdoc-search__entry:hover,.gdoc-search__entry.is-active{background:var(--accent-color-lite);text-decoration:none}.gdoc-search__entry:hover .gdoc-search__entry--title,.gdoc-search__entry.is-active .gdoc-search__entry--title{text-decoration-style:dashed !important;text-decoration:underline}.gdoc-search__entry:visited{color:var(--body-font-color)}.gdoc-search__entry--description{font-size:.875rem;font-style:italic}.gdoc-search:focus-within .gdoc-search__list.has-hits,.gdoc-search__list.has-hits:hover{visibility:visible}.gdoc-language__selector{position:relative;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;margin:0;padding:0;width:100%}.gdoc-language__selector:focus .gdoc-language__list,.gdoc-language__selector:focus-within .gdoc-language__list,.gdoc-language__selector:active .gdoc-language__list{display:block}.gdoc-language__list{display:none;right:0;width:auto;white-space:nowrap}.gdoc-paging{padding:1rem 0}.gdoc-paging__item{flex:1 1 0}.gdoc-paging__item a:visited{color:var(--link-color)}.gdoc-paging__item a:hover,.gdoc-paging__item a:visited:hover{background:var(--link-color);color:#f8f9fa}.gdoc-paging__item--next{text-align:right}.gdoc-paging__item--prev{text-align:left}.gdoc-error{padding:6rem 1rem;margin:0 auto;max-width:45em}.gdoc-error svg.gdoc-icon{width:8rem;height:8rem;color:var(--body-font-color)}.gdoc-error__link,.gdoc-error__link:visited{text-decoration:underline;color:var(--link-color)}.gdoc-error__message{padding-left:4rem}.gdoc-error__line{padding:.5rem 0}.gdoc-error__title{font-size:4rem}.gdoc-error__code{font-weight:bolder}.gdoc-toc{margin:1rem 0}.gdoc-toc li{margin:.25rem 0}.gdoc-toc__level--1 ul ul,.gdoc-toc__level--2 ul ul ul,.gdoc-toc__level--3 ul ul ul ul,.gdoc-toc__level--4 ul ul ul ul ul,.gdoc-toc__level--5 ul ul ul ul ul ul,.gdoc-toc__level--6 ul ul ul ul ul ul ul{display:none}.gdoc-toc a,.gdoc-toc a:visited{text-decoration:none !important;color:var(--link-color)}.gdoc-nav nav,.gdoc-page,.markdown{transition:.2s ease-in-out;transition-property:transform,margin-left,opacity;will-change:transform,margin-left}.breadcrumb{display:inline;padding:0;margin:0}.breadcrumb li{display:inline}.gdoc-markdown{line-height:1.6rem}.gdoc-markdown h1,.gdoc-markdown h2,.gdoc-markdown h3,.gdoc-markdown h4,.gdoc-markdown h5,.gdoc-markdown h6{font-weight:600}.gdoc-markdown h1>code,.gdoc-markdown h2>code,.gdoc-markdown h3>code,.gdoc-markdown h4>code,.gdoc-markdown h5>code,.gdoc-markdown h6>code{border-top:3px solid var(--accent-color);font-size:.75rem !important}.gdoc-markdown h4>code,.gdoc-markdown h5>code,.gdoc-markdown h6>code{font-size:.875rem !important}.gdoc-markdown b,.gdoc-markdown optgroup,.gdoc-markdown strong{font-weight:bolder}.gdoc-markdown a,.gdoc-markdown__link{text-decoration:underline;border-bottom:1px solid rgba(0,0,0,0);line-height:normal}.gdoc-markdown a:hover,.gdoc-markdown__link:hover{text-decoration:underline}.gdoc-markdown__link--raw{text-decoration:none !important;color:#343a40 !important}.gdoc-markdown__link--raw:hover{text-decoration:none !important}.gdoc-markdown__link--raw:visited{color:#343a40 !important}.gdoc-markdown__link--code{text-decoration:none}.gdoc-markdown__link--code code{color:inherit !important}.gdoc-markdown__link--code:hover{background:none;color:var(--link-color) !important;text-decoration:underline}.gdoc-markdown__link--code:visited,.gdoc-markdown__link--code:visited:hover{color:var(--link-color-visited) !important}.gdoc-markdown__figure{padding:.25rem;margin:1rem 0;background-color:var(--accent-color);display:table;border-top-left-radius:.15rem;border-top-right-radius:.15rem}.gdoc-markdown__figure--round,.gdoc-markdown__figure--round img{border-radius:50% !important}.gdoc-markdown__figure figcaption{display:table-caption;caption-side:bottom;background-color:var(--accent-color);padding:0 .25rem .25rem;text-align:center;border-bottom-left-radius:.15rem;border-bottom-right-radius:.15rem}.gdoc-markdown__figure img{max-width:100%;height:auto}.gdoc-markdown img{max-width:100%;border-radius:.15rem}.gdoc-markdown blockquote{margin:1rem 0;padding:.5rem 1rem .5rem .75rem;border-left:3px solid var(--accent-color);border-radius:.15rem}.gdoc-markdown table:not(.lntable):not(.highlight){display:table;border-spacing:0;border-collapse:collapse;margin-top:1rem;margin-bottom:1rem;width:100%;text-align:left}.gdoc-markdown table:not(.lntable):not(.highlight) thead{border-bottom:3px solid var(--accent-color)}.gdoc-markdown table:not(.lntable):not(.highlight) tr th,.gdoc-markdown table:not(.lntable):not(.highlight) tr td{padding:.5rem 1rem}.gdoc-markdown table:not(.lntable):not(.highlight) tr{border-bottom:1.5px solid var(--accent-color)}.gdoc-markdown table:not(.lntable):not(.highlight) tr:nth-child(2n){background:var(--accent-color-lite)}.gdoc-markdown hr{height:1.5px;border:none;background:var(--accent-color)}.gdoc-markdown ul,.gdoc-markdown ol{padding-left:2rem}.gdoc-markdown dl dt{font-weight:bolder;margin-top:1rem}.gdoc-markdown dl dd{margin-left:2rem}.gdoc-markdown code{padding:.25rem .5rem}.gdoc-markdown pre,.gdoc-markdown code{background-color:var(--code-background);border-radius:.15rem;color:var(--code-font-color);font-size:.875rem;line-height:1rem}.gdoc-markdown pre code{display:block;padding:1rem;width:100%}.gdoc-markdown mark{background-color:var(--mark-color)}.gdoc-markdown__align{text-align:left}.gdoc-markdown__align--left h1,.gdoc-markdown__align--left h2,.gdoc-markdown__align--left h3,.gdoc-markdown__align--left h4,.gdoc-markdown__align--left h5,.gdoc-markdown__align--left h6{justify-content:flex-start}.gdoc-markdown__align--center{text-align:center}.gdoc-markdown__align--center h1,.gdoc-markdown__align--center h2,.gdoc-markdown__align--center h3,.gdoc-markdown__align--center h4,.gdoc-markdown__align--center h5,.gdoc-markdown__align--center h6{justify-content:center}.gdoc-markdown__align--right{text-align:right}.gdoc-markdown__align--right h1,.gdoc-markdown__align--right h2,.gdoc-markdown__align--right h3,.gdoc-markdown__align--right h4,.gdoc-markdown__align--right h5,.gdoc-markdown__align--right h6{justify-content:flex-end}.admonitionblock.info{border-left-color:#0091ea;background-color:#f3f9fd;color:#343a40}.admonitionblock.note{border-left-color:#0091ea;background-color:#f3f9fd;color:#343a40}.admonitionblock.ok{border-left-color:#00c853;background-color:#f2fdf6;color:#343a40}.admonitionblock.tip{border-left-color:#00c853;background-color:#f2fdf6;color:#343a40}.admonitionblock.important{border-left-color:#ffab00;background-color:#fdfaf4;color:#343a40}.admonitionblock.caution{border-left-color:#7300d3;background-color:#f8f2fd;color:#343a40}.admonitionblock.danger{border-left-color:#d50000;background-color:#fdf2f2;color:#343a40}.admonitionblock.warning{border-left-color:#d50000;background-color:#fdf2f2;color:#343a40}.admonitionblock{margin:1rem 0;padding:0;border-left:3px solid var(--accent-color);border-radius:.15rem}.admonitionblock table{margin:0 !important;padding:0 !important}.admonitionblock table tr{border:0 !important}.admonitionblock table td{display:block;padding:.25rem 1rem !important}.admonitionblock table td:first-child{background-color:rgba(134,142,150,.05);font-weight:bold}.admonitionblock table td:first-child.icon .title{display:flex;align-items:center}.admonitionblock table td:first-child.icon i.fa::after{content:attr(title);font-style:normal;padding-left:1.5rem}.admonitionblock table td:first-child.icon i.fa{color:#000;background-size:auto 90%;background-repeat:no-repeat;filter:invert(30%);margin-left:-5px}.admonitionblock table td:first-child.icon i.fa.icon-info{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.admonitionblock table td:first-child.icon i.fa.icon-note{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.admonitionblock table td:first-child.icon i.fa.icon-ok{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.admonitionblock table td:first-child.icon i.fa.icon-tip{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.admonitionblock table td:first-child.icon i.fa.icon-important{background-image:url(img/geekdoc-stack.svg#gdoc_error_outline)}.admonitionblock table td:first-child.icon i.fa.icon-caution{background-image:url(img/geekdoc-stack.svg#gdoc_dangerous)}.admonitionblock table td:first-child.icon i.fa.icon-danger{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.admonitionblock table td:first-child.icon i.fa.icon-warning{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-expand{margin:1rem 0;border:1px solid var(--accent-color);border-radius:.15rem;overflow:hidden}.gdoc-expand__head{background:var(--accent-color-lite);padding:.5rem 1rem;cursor:pointer}.gdoc-expand__content{display:none;padding:0 1rem}.gdoc-expand__control:checked+.gdoc-expand__content{display:block}.gdoc-expand .gdoc-page__anchor{display:none}.gdoc-tabs{margin:1rem 0;border:1px solid var(--accent-color);border-radius:.15rem;overflow:hidden;display:flex;flex-wrap:wrap}.gdoc-tabs__label{display:inline-block;padding:.5rem 1rem;border-bottom:1px rgba(0,0,0,0);cursor:pointer}.gdoc-tabs__content{order:999;width:100%;border-top:1px solid var(--accent-color-lite);padding:0 1rem;display:none}.gdoc-tabs__control:checked+.gdoc-tabs__label{border-bottom:1.5px solid var(--link-color)}.gdoc-tabs__control:checked+.gdoc-tabs__label+.gdoc-tabs__content{display:block}.gdoc-tabs .gdoc-page__anchor{display:none}.gdoc-columns{margin:1rem 0}.gdoc-columns--regular>:first-child{flex:1}.gdoc-columns--small>:first-child{flex:.35;min-width:7rem}.gdoc-columns--large>:first-child{flex:1.65;min-width:33rem}.gdoc-columns__content{flex:1 1;min-width:13.2rem;padding:0}.gdoc-columns .gdoc-page__anchor{display:none}.gdoc-button{margin:1rem 0;display:inline-block;background:var(--accent-color-lite);border:1px solid var(--accent-color);border-radius:.15rem;cursor:pointer}.gdoc-button__link{display:inline-block;color:inherit !important;text-decoration:none !important}.gdoc-button:hover{background:var(--button-background);border-color:var(--button-border-color);color:#f8f9fa}.gdoc-button--regular{font-size:16px}.gdoc-button--regular .gdoc-button__link{padding:.25rem .5rem}.gdoc-button--large{font-size:1.25rem}.gdoc-button--large .gdoc-button__link{padding:.5rem 1rem}.gdoc-hint.info{border-left-color:#0091ea;background-color:#f3f9fd;color:#343a40;padding:0}.gdoc-hint.info code,.gdoc-hint.info pre{background-color:#dde5ea;color:#464646}.gdoc-hint.note{border-left-color:#0091ea;background-color:#f3f9fd;color:#343a40;padding:0}.gdoc-hint.note code,.gdoc-hint.note pre{background-color:#dde5ea;color:#464646}.gdoc-hint.ok{border-left-color:#00c853;background-color:#f2fdf6;color:#343a40;padding:0}.gdoc-hint.ok code,.gdoc-hint.ok pre{background-color:#d8e8df;color:#464646}.gdoc-hint.tip{border-left-color:#00c853;background-color:#f2fdf6;color:#343a40;padding:0}.gdoc-hint.tip code,.gdoc-hint.tip pre{background-color:#d8e8df;color:#464646}.gdoc-hint.important{border-left-color:#ffab00;background-color:#fdfaf4;color:#343a40;padding:0}.gdoc-hint.important code,.gdoc-hint.important pre{background-color:#ece8df;color:#464646}.gdoc-hint.caution{border-left-color:#7300d3;background-color:#f8f2fd;color:#343a40;padding:0}.gdoc-hint.caution code,.gdoc-hint.caution pre{background-color:#e2dae9;color:#464646}.gdoc-hint.danger{border-left-color:#d50000;background-color:#fdf2f2;color:#343a40;padding:0}.gdoc-hint.danger code,.gdoc-hint.danger pre{background-color:#e9dada;color:#464646}.gdoc-hint.warning{border-left-color:#d50000;background-color:#fdf2f2;color:#343a40;padding:0}.gdoc-hint.warning code,.gdoc-hint.warning pre{background-color:#e9dada;color:#464646}.gdoc-hint__title{padding:.25rem 1rem;background-color:rgba(134,142,150,.05);font-weight:bold;color:rgba(52,58,64,.85)}.gdoc-hint__title i.fa::after{content:attr(title);font-style:normal;padding-left:1.5rem}.gdoc-hint__title i.fa{color:#000;background-size:auto 90%;background-repeat:no-repeat;filter:invert(30%);margin-left:-5px}.gdoc-hint__title i.fa.info{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.gdoc-hint__title i.fa.note{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.gdoc-hint__title i.fa.ok{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.gdoc-hint__title i.fa.tip{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.gdoc-hint__title i.fa.important{background-image:url(img/geekdoc-stack.svg#gdoc_error_outline)}.gdoc-hint__title i.fa.caution{background-image:url(img/geekdoc-stack.svg#gdoc_dangerous)}.gdoc-hint__title i.fa.danger{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-hint__title i.fa.warning{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-hint__title .gdoc-icon{width:1.5rem;height:1.5rem;margin-left:-5px}.gdoc-hint__text{padding:.25rem 1rem}.gdoc-hint .gdoc-page__anchor{display:none}.gdoc-mermaid{font-family:"Liberation Sans",sans-serif}.gdoc-mermaid>svg{height:100%;padding:.5rem}.gdoc-props__title,.gdoc-props__default{padding:0;margin:0;font-family:"Liberation Mono",monospace}.gdoc-props__meta{gap:.5em;line-height:normal;margin-bottom:.25rem}.gdoc-props__meta:hover .gdoc-page__anchor svg.gdoc-icon{color:var(--control-icons)}.gdoc-props__tag.info{border-color:#e8f4fb;background-color:#f3f9fd}.gdoc-props__tag.note{border-color:#e8f4fb;background-color:#f3f9fd}.gdoc-props__tag.ok{border-color:#e5faee;background-color:#f2fdf6}.gdoc-props__tag.tip{border-color:#e5faee;background-color:#f2fdf6}.gdoc-props__tag.important{border-color:#fbf5e9;background-color:#fdfaf4}.gdoc-props__tag.caution{border-color:#f1e6fb;background-color:#f8f2fd}.gdoc-props__tag.danger{border-color:#fbe6e6;background-color:#fdf2f2}.gdoc-props__tag.warning{border-color:#fbe6e6;background-color:#fdf2f2}.gdoc-props__tag{font-size:.875rem;font-weight:normal;background-color:#f8f9fa;border:1px solid #e9ecef;border-radius:.15rem;padding:.125rem .25rem;color:#343a40}.gdoc-props__default{font-size:.875rem}.gdoc-progress{margin-bottom:1rem}.gdoc-progress__label{padding:.25rem 0}.gdoc-progress__label--name{font-weight:bold}.gdoc-progress__wrap{background-color:var(--accent-color-lite);border-radius:1em;box-shadow:inset 0 0 0 1px var(--accent-color)}.gdoc-progress__bar{height:1em;border-radius:1em;background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.125) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.125) 50%, rgba(255, 255, 255, 0.125) 75%, transparent 75%, transparent);background-size:2.5em 2.5em;background-color:#205375 !important} \ No newline at end of file diff --git a/main-4434ec39.min.css b/main-4434ec39.min.css new file mode 100644 index 0000000..47f6f38 --- /dev/null +++ b/main-4434ec39.min.css @@ -0,0 +1 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0;line-height:1.2em}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}.flex{display:flex}.flex-auto{flex:1 1 auto}.flex-25{flex:1 1 25%}.flex-inline{display:inline-flex}.flex-even{flex:1 1}.flex-wrap{flex-wrap:wrap}.flex-grid{flex-direction:column;border:1px solid var(--accent-color);border-radius:.15rem;background:var(--accent-color-lite)}.flex-gap{flex-wrap:wrap;gap:1rem}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.align-center{align-items:center}.mx-auto{margin:0 auto}.text-center{text-align:center}.text-right{text-align:right}.no-wrap{white-space:nowrap}.hidden{display:none !important}.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}.table-wrap{overflow:auto;margin:1rem 0}.table-wrap>table{margin:0 !important}.badge-placeholder{display:inline-block;min-width:4rem}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-Bold.woff2") format("woff2"),url("fonts/LiberationSans-Bold.woff") format("woff");font-weight:bold;font-style:normal;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-BoldItalic.woff2") format("woff2"),url("fonts/LiberationSans-BoldItalic.woff") format("woff");font-weight:bold;font-style:italic;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans-Italic.woff2") format("woff2"),url("fonts/LiberationSans-Italic.woff") format("woff");font-weight:normal;font-style:italic;font-display:swap}@font-face{font-family:"Liberation Sans";src:url("fonts/LiberationSans.woff2") format("woff2"),url("fonts/LiberationSans.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"Liberation Mono";src:url("fonts/LiberationMono.woff2") format("woff2"),url("fonts/LiberationMono.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"Metropolis";src:url("fonts/Metropolis.woff2") format("woff2"),url("fonts/Metropolis.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}@font-face{font-family:"GeekdocIcons";src:url("fonts/GeekdocIcons.woff2") format("woff2"),url("fonts/GeekdocIcons.woff") format("woff");font-weight:normal;font-style:normal;font-display:swap}body{font-family:var(--body-font-family)}code,.gdoc-error__title{font-family:var(--code-font-family)}.gdoc-header{font-family:var(--header-font-family)}:root{--code-max-height: none;--header-font-family: "Metropolis", sans-serif;--body-font-family: "Liberation Sans", sans-serif;--code-font-family: "Liberation Mono", monospace}:root,:root[color-theme=light]{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: white;--body-font-color: rgb(52, 58, 64);--mark-color: rgb(255, 171, 0);--button-background: rgb(43.6295302013, 113.1640939597, 159.5204697987);--button-border-color: rgb(32, 83, 117);--link-color: rgb(10, 83, 154);--link-color-visited: rgb(119, 73, 191);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(206, 212, 218);--accent-color: rgb(233, 236, 239);--accent-color-lite: rgb(248, 249, 250);--control-icons: rgb(124.5724137931, 136.8, 149.0275862069);--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img,:root[color-theme=light] .dark-mode-dim .gdoc-markdown img{filter:none}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock,:root[color-theme=light] .gdoc-markdown .gdoc-hint,:root[color-theme=light] .gdoc-markdown .gdoc-props__tag,:root[color-theme=light] .gdoc-markdown .admonitionblock{filter:none}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child,:root[color-theme=light] .gdoc-markdown .gdoc-hint__title,:root[color-theme=light] .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.05)}:root .chroma,:root[color-theme=light] .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl,:root[color-theme=light] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma,:root[color-theme=light] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable,:root[color-theme=light] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma,:root[color-theme=light] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code,:root[color-theme=light] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2),:root[color-theme=light] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x,:root[color-theme=light] .chroma .x{color:inherit}:root .chroma .err,:root[color-theme=light] .chroma .err{color:#a61717;background-color:#e3d2d2}:root .chroma .lntd,:root[color-theme=light] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl,:root[color-theme=light] .chroma .hl{display:block;width:100%;background-color:#ffc}:root .chroma .lnt,:root[color-theme=light] .chroma .lnt{padding:0 .8em}:root .chroma .ln,:root[color-theme=light] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em}:root .chroma .k,:root[color-theme=light] .chroma .k{color:#000;font-weight:bold}:root .chroma .kc,:root[color-theme=light] .chroma .kc{color:#000;font-weight:bold}:root .chroma .kd,:root[color-theme=light] .chroma .kd{color:#000;font-weight:bold}:root .chroma .kn,:root[color-theme=light] .chroma .kn{color:#000;font-weight:bold}:root .chroma .kp,:root[color-theme=light] .chroma .kp{color:#000;font-weight:bold}:root .chroma .kr,:root[color-theme=light] .chroma .kr{color:#000;font-weight:bold}:root .chroma .kt,:root[color-theme=light] .chroma .kt{color:#458;font-weight:bold}:root .chroma .n,:root[color-theme=light] .chroma .n{color:inherit}:root .chroma .na,:root[color-theme=light] .chroma .na{color:#006767}:root .chroma .nb,:root[color-theme=light] .chroma .nb{color:#556165}:root .chroma .bp,:root[color-theme=light] .chroma .bp{color:#676767}:root .chroma .nc,:root[color-theme=light] .chroma .nc{color:#458;font-weight:bold}:root .chroma .no,:root[color-theme=light] .chroma .no{color:#006767}:root .chroma .nd,:root[color-theme=light] .chroma .nd{color:#3c5d5d;font-weight:bold}:root .chroma .ni,:root[color-theme=light] .chroma .ni{color:purple}:root .chroma .ne,:root[color-theme=light] .chroma .ne{color:#900;font-weight:bold}:root .chroma .nf,:root[color-theme=light] .chroma .nf{color:#900;font-weight:bold}:root .chroma .fm,:root[color-theme=light] .chroma .fm{color:inherit}:root .chroma .nl,:root[color-theme=light] .chroma .nl{color:#900;font-weight:bold}:root .chroma .nn,:root[color-theme=light] .chroma .nn{color:#555}:root .chroma .nx,:root[color-theme=light] .chroma .nx{color:inherit}:root .chroma .py,:root[color-theme=light] .chroma .py{color:inherit}:root .chroma .nt,:root[color-theme=light] .chroma .nt{color:navy}:root .chroma .nv,:root[color-theme=light] .chroma .nv{color:#006767}:root .chroma .vc,:root[color-theme=light] .chroma .vc{color:#006767}:root .chroma .vg,:root[color-theme=light] .chroma .vg{color:#006767}:root .chroma .vi,:root[color-theme=light] .chroma .vi{color:#006767}:root .chroma .vm,:root[color-theme=light] .chroma .vm{color:inherit}:root .chroma .l,:root[color-theme=light] .chroma .l{color:inherit}:root .chroma .ld,:root[color-theme=light] .chroma .ld{color:inherit}:root .chroma .s,:root[color-theme=light] .chroma .s{color:#d14}:root .chroma .sa,:root[color-theme=light] .chroma .sa{color:#d14}:root .chroma .sb,:root[color-theme=light] .chroma .sb{color:#d14}:root .chroma .sc,:root[color-theme=light] .chroma .sc{color:#d14}:root .chroma .dl,:root[color-theme=light] .chroma .dl{color:#d14}:root .chroma .sd,:root[color-theme=light] .chroma .sd{color:#d14}:root .chroma .s2,:root[color-theme=light] .chroma .s2{color:#d14}:root .chroma .se,:root[color-theme=light] .chroma .se{color:#d14}:root .chroma .sh,:root[color-theme=light] .chroma .sh{color:#d14}:root .chroma .si,:root[color-theme=light] .chroma .si{color:#d14}:root .chroma .sx,:root[color-theme=light] .chroma .sx{color:#d14}:root .chroma .sr,:root[color-theme=light] .chroma .sr{color:#009926}:root .chroma .s1,:root[color-theme=light] .chroma .s1{color:#d14}:root .chroma .ss,:root[color-theme=light] .chroma .ss{color:#990073}:root .chroma .m,:root[color-theme=light] .chroma .m{color:#027e83}:root .chroma .mb,:root[color-theme=light] .chroma .mb{color:#027e83}:root .chroma .mf,:root[color-theme=light] .chroma .mf{color:#027e83}:root .chroma .mh,:root[color-theme=light] .chroma .mh{color:#027e83}:root .chroma .mi,:root[color-theme=light] .chroma .mi{color:#027e83}:root .chroma .il,:root[color-theme=light] .chroma .il{color:#027e83}:root .chroma .mo,:root[color-theme=light] .chroma .mo{color:#027e83}:root .chroma .o,:root[color-theme=light] .chroma .o{color:#000;font-weight:bold}:root .chroma .ow,:root[color-theme=light] .chroma .ow{color:#000;font-weight:bold}:root .chroma .p,:root[color-theme=light] .chroma .p{color:inherit}:root .chroma .c,:root[color-theme=light] .chroma .c{color:#676765;font-style:italic}:root .chroma .ch,:root[color-theme=light] .chroma .ch{color:#676765;font-style:italic}:root .chroma .cm,:root[color-theme=light] .chroma .cm{color:#676765;font-style:italic}:root .chroma .c1,:root[color-theme=light] .chroma .c1{color:#676765;font-style:italic}:root .chroma .cs,:root[color-theme=light] .chroma .cs{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cp,:root[color-theme=light] .chroma .cp{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cpf,:root[color-theme=light] .chroma .cpf{color:#676767;font-weight:bold;font-style:italic}:root .chroma .g,:root[color-theme=light] .chroma .g{color:inherit}:root .chroma .gd,:root[color-theme=light] .chroma .gd{color:#000;background-color:#fdd}:root .chroma .ge,:root[color-theme=light] .chroma .ge{color:#000;font-style:italic}:root .chroma .gr,:root[color-theme=light] .chroma .gr{color:#a00}:root .chroma .gh,:root[color-theme=light] .chroma .gh{color:#676767}:root .chroma .gi,:root[color-theme=light] .chroma .gi{color:#000;background-color:#dfd}:root .chroma .go,:root[color-theme=light] .chroma .go{color:#6f6f6f}:root .chroma .gp,:root[color-theme=light] .chroma .gp{color:#555}:root .chroma .gs,:root[color-theme=light] .chroma .gs{font-weight:bold}:root .chroma .gu,:root[color-theme=light] .chroma .gu{color:#5f5f5f}:root .chroma .gt,:root[color-theme=light] .chroma .gt{color:#a00}:root .chroma .gl,:root[color-theme=light] .chroma .gl{text-decoration:underline}:root .chroma .w,:root[color-theme=light] .chroma .w{color:#bbb}:root,:root[color-theme=light]{--code-background: rgb(248, 249, 250);--code-accent-color: rgb(117.275, 136.95, 156.625);--code-accent-color-lite: rgb(204.425, 211.65, 218.875);--code-font-color: rgb(70, 70, 70);--code-copy-background: rgb(248, 249, 250);--code-copy-font-color: #6b6b6b;--code-copy-border-color: #909090;--code-copy-success-color: rgb(0, 200, 83)}@media(prefers-color-scheme: light){:root{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: white;--body-font-color: rgb(52, 58, 64);--mark-color: rgb(255, 171, 0);--button-background: rgb(43.6295302013, 113.1640939597, 159.5204697987);--button-border-color: rgb(32, 83, 117);--link-color: rgb(10, 83, 154);--link-color-visited: rgb(119, 73, 191);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(206, 212, 218);--accent-color: rgb(233, 236, 239);--accent-color-lite: rgb(248, 249, 250);--control-icons: rgb(124.5724137931, 136.8, 149.0275862069);--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img{filter:none}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock{filter:none}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.05)}:root .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x{color:inherit}:root .chroma .err{color:#a61717;background-color:#e3d2d2}:root .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl{display:block;width:100%;background-color:#ffc}:root .chroma .lnt{padding:0 .8em}:root .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em}:root .chroma .k{color:#000;font-weight:bold}:root .chroma .kc{color:#000;font-weight:bold}:root .chroma .kd{color:#000;font-weight:bold}:root .chroma .kn{color:#000;font-weight:bold}:root .chroma .kp{color:#000;font-weight:bold}:root .chroma .kr{color:#000;font-weight:bold}:root .chroma .kt{color:#458;font-weight:bold}:root .chroma .n{color:inherit}:root .chroma .na{color:#006767}:root .chroma .nb{color:#556165}:root .chroma .bp{color:#676767}:root .chroma .nc{color:#458;font-weight:bold}:root .chroma .no{color:#006767}:root .chroma .nd{color:#3c5d5d;font-weight:bold}:root .chroma .ni{color:purple}:root .chroma .ne{color:#900;font-weight:bold}:root .chroma .nf{color:#900;font-weight:bold}:root .chroma .fm{color:inherit}:root .chroma .nl{color:#900;font-weight:bold}:root .chroma .nn{color:#555}:root .chroma .nx{color:inherit}:root .chroma .py{color:inherit}:root .chroma .nt{color:navy}:root .chroma .nv{color:#006767}:root .chroma .vc{color:#006767}:root .chroma .vg{color:#006767}:root .chroma .vi{color:#006767}:root .chroma .vm{color:inherit}:root .chroma .l{color:inherit}:root .chroma .ld{color:inherit}:root .chroma .s{color:#d14}:root .chroma .sa{color:#d14}:root .chroma .sb{color:#d14}:root .chroma .sc{color:#d14}:root .chroma .dl{color:#d14}:root .chroma .sd{color:#d14}:root .chroma .s2{color:#d14}:root .chroma .se{color:#d14}:root .chroma .sh{color:#d14}:root .chroma .si{color:#d14}:root .chroma .sx{color:#d14}:root .chroma .sr{color:#009926}:root .chroma .s1{color:#d14}:root .chroma .ss{color:#990073}:root .chroma .m{color:#027e83}:root .chroma .mb{color:#027e83}:root .chroma .mf{color:#027e83}:root .chroma .mh{color:#027e83}:root .chroma .mi{color:#027e83}:root .chroma .il{color:#027e83}:root .chroma .mo{color:#027e83}:root .chroma .o{color:#000;font-weight:bold}:root .chroma .ow{color:#000;font-weight:bold}:root .chroma .p{color:inherit}:root .chroma .c{color:#676765;font-style:italic}:root .chroma .ch{color:#676765;font-style:italic}:root .chroma .cm{color:#676765;font-style:italic}:root .chroma .c1{color:#676765;font-style:italic}:root .chroma .cs{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cp{color:#676767;font-weight:bold;font-style:italic}:root .chroma .cpf{color:#676767;font-weight:bold;font-style:italic}:root .chroma .g{color:inherit}:root .chroma .gd{color:#000;background-color:#fdd}:root .chroma .ge{color:#000;font-style:italic}:root .chroma .gr{color:#a00}:root .chroma .gh{color:#676767}:root .chroma .gi{color:#000;background-color:#dfd}:root .chroma .go{color:#6f6f6f}:root .chroma .gp{color:#555}:root .chroma .gs{font-weight:bold}:root .chroma .gu{color:#5f5f5f}:root .chroma .gt{color:#a00}:root .chroma .gl{text-decoration:underline}:root .chroma .w{color:#bbb}:root{--code-background: rgb(248, 249, 250);--code-accent-color: rgb(117.275, 136.95, 156.625);--code-accent-color-lite: rgb(204.425, 211.65, 218.875);--code-font-color: rgb(70, 70, 70);--code-copy-background: rgb(248, 249, 250);--code-copy-font-color: #6b6b6b;--code-copy-border-color: #909090;--code-copy-success-color: rgb(0, 200, 83)}}:root[color-theme=dark]{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: rgb(40.375, 53.375, 61.875);--body-font-color: rgb(180.9769254279, 196.5292481663, 206.6980745721);--mark-color: rgb(255, 171, 0);--button-background: rgb(43.6295302013, 113.1640939597, 159.5204697987);--button-border-color: rgb(32, 83, 117);--link-color: rgb(110, 168, 212);--link-color-visited: rgb(186, 142, 240);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(16.15, 21.35, 24.75);--accent-color: rgb(28.2625, 37.3625, 43.3125);--accent-color-lite: rgb(34.31875, 45.36875, 52.59375);--control-icons: rgb(124.5724137931, 136.8, 149.0275862069);--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root[color-theme=dark] .dark-mode-dim .gdoc-markdown img{filter:brightness(0.75) grayscale(0.2)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint,:root[color-theme=dark] .gdoc-markdown .gdoc-props__tag,:root[color-theme=dark] .gdoc-markdown .admonitionblock{filter:saturate(2.5) brightness(0.85)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint a,:root[color-theme=dark] .gdoc-markdown .admonitionblock a{color:var(--hint-link-color)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint a:visited,:root[color-theme=dark] .gdoc-markdown .admonitionblock a:visited{color:var(--hint-link-color-visited)}:root[color-theme=dark] .gdoc-markdown .gdoc-hint__title,:root[color-theme=dark] .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.15)}:root[color-theme=dark] .chroma{color:var(--code-font-color)}:root[color-theme=dark] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root[color-theme=dark] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root[color-theme=dark] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root[color-theme=dark] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root[color-theme=dark] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root[color-theme=dark] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root[color-theme=dark] .chroma .x{color:inherit}:root[color-theme=dark] .chroma .err{color:inherit}:root[color-theme=dark] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root[color-theme=dark] .chroma .hl{display:block;width:100%;background-color:#4f1605}:root[color-theme=dark] .chroma .lnt{padding:0 .8em}:root[color-theme=dark] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root[color-theme=dark] .chroma .k{color:#ff79c6}:root[color-theme=dark] .chroma .kc{color:#ff79c6}:root[color-theme=dark] .chroma .kd{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .kn{color:#ff79c6}:root[color-theme=dark] .chroma .kp{color:#ff79c6}:root[color-theme=dark] .chroma .kr{color:#ff79c6}:root[color-theme=dark] .chroma .kt{color:#8be9fd}:root[color-theme=dark] .chroma .n{color:inherit}:root[color-theme=dark] .chroma .na{color:#50fa7b}:root[color-theme=dark] .chroma .nb{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .bp{color:inherit}:root[color-theme=dark] .chroma .nc{color:#50fa7b}:root[color-theme=dark] .chroma .no{color:inherit}:root[color-theme=dark] .chroma .nd{color:inherit}:root[color-theme=dark] .chroma .ni{color:inherit}:root[color-theme=dark] .chroma .ne{color:inherit}:root[color-theme=dark] .chroma .nf{color:#50fa7b}:root[color-theme=dark] .chroma .fm{color:inherit}:root[color-theme=dark] .chroma .nl{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .nn{color:inherit}:root[color-theme=dark] .chroma .nx{color:inherit}:root[color-theme=dark] .chroma .py{color:inherit}:root[color-theme=dark] .chroma .nt{color:#ff79c6}:root[color-theme=dark] .chroma .nv{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vc{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vg{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vi{color:#8be9fd;font-style:italic}:root[color-theme=dark] .chroma .vm{color:inherit}:root[color-theme=dark] .chroma .l{color:inherit}:root[color-theme=dark] .chroma .ld{color:inherit}:root[color-theme=dark] .chroma .s{color:#f1fa8c}:root[color-theme=dark] .chroma .sa{color:#f1fa8c}:root[color-theme=dark] .chroma .sb{color:#f1fa8c}:root[color-theme=dark] .chroma .sc{color:#f1fa8c}:root[color-theme=dark] .chroma .dl{color:#f1fa8c}:root[color-theme=dark] .chroma .sd{color:#f1fa8c}:root[color-theme=dark] .chroma .s2{color:#f1fa8c}:root[color-theme=dark] .chroma .se{color:#f1fa8c}:root[color-theme=dark] .chroma .sh{color:#f1fa8c}:root[color-theme=dark] .chroma .si{color:#f1fa8c}:root[color-theme=dark] .chroma .sx{color:#f1fa8c}:root[color-theme=dark] .chroma .sr{color:#f1fa8c}:root[color-theme=dark] .chroma .s1{color:#f1fa8c}:root[color-theme=dark] .chroma .ss{color:#f1fa8c}:root[color-theme=dark] .chroma .m{color:#bd93f9}:root[color-theme=dark] .chroma .mb{color:#bd93f9}:root[color-theme=dark] .chroma .mf{color:#bd93f9}:root[color-theme=dark] .chroma .mh{color:#bd93f9}:root[color-theme=dark] .chroma .mi{color:#bd93f9}:root[color-theme=dark] .chroma .il{color:#bd93f9}:root[color-theme=dark] .chroma .mo{color:#bd93f9}:root[color-theme=dark] .chroma .o{color:#ff79c6}:root[color-theme=dark] .chroma .ow{color:#ff79c6}:root[color-theme=dark] .chroma .p{color:inherit}:root[color-theme=dark] .chroma .c{color:#96a6d8}:root[color-theme=dark] .chroma .ch{color:#96a6d8}:root[color-theme=dark] .chroma .cm{color:#96a6d8}:root[color-theme=dark] .chroma .c1{color:#96a6d8}:root[color-theme=dark] .chroma .cs{color:#96a6d8}:root[color-theme=dark] .chroma .cp{color:#ff79c6}:root[color-theme=dark] .chroma .cpf{color:#ff79c6}:root[color-theme=dark] .chroma .g{color:inherit}:root[color-theme=dark] .chroma .gd{color:#d98f90}:root[color-theme=dark] .chroma .ge{text-decoration:underline}:root[color-theme=dark] .chroma .gr{color:inherit}:root[color-theme=dark] .chroma .gh{font-weight:bold;color:inherit}:root[color-theme=dark] .chroma .gi{font-weight:bold}:root[color-theme=dark] .chroma .go{color:#8f9ea8}:root[color-theme=dark] .chroma .gp{color:inherit}:root[color-theme=dark] .chroma .gs{color:inherit}:root[color-theme=dark] .chroma .gu{font-weight:bold}:root[color-theme=dark] .chroma .gt{color:inherit}:root[color-theme=dark] .chroma .gl{text-decoration:underline}:root[color-theme=dark] .chroma .w{color:inherit}:root[color-theme=dark]{--code-background: rgb(34.31875, 45.36875, 52.59375);--code-accent-color: rgb(24.023125, 31.758125, 36.815625);--code-accent-color-lite: rgb(29.1709375, 38.5634375, 44.7046875);--code-font-color: rgb(185, 185, 185);--code-copy-background: rgb(34.31875, 45.36875, 52.59375);--code-copy-font-color: rgb(157.25, 157.25, 157.25);--code-copy-border-color: #949494;--code-copy-success-color: rgba(0, 200, 83, 0.45)}:root[code-theme=dark] .chroma{color:var(--code-font-color)}:root[code-theme=dark] .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root[code-theme=dark] .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root[code-theme=dark] .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root[code-theme=dark] .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root[code-theme=dark] .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root[code-theme=dark] .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root[code-theme=dark] .chroma .x{color:inherit}:root[code-theme=dark] .chroma .err{color:inherit}:root[code-theme=dark] .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root[code-theme=dark] .chroma .hl{display:block;width:100%;background-color:#4f1605}:root[code-theme=dark] .chroma .lnt{padding:0 .8em}:root[code-theme=dark] .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root[code-theme=dark] .chroma .k{color:#ff79c6}:root[code-theme=dark] .chroma .kc{color:#ff79c6}:root[code-theme=dark] .chroma .kd{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .kn{color:#ff79c6}:root[code-theme=dark] .chroma .kp{color:#ff79c6}:root[code-theme=dark] .chroma .kr{color:#ff79c6}:root[code-theme=dark] .chroma .kt{color:#8be9fd}:root[code-theme=dark] .chroma .n{color:inherit}:root[code-theme=dark] .chroma .na{color:#50fa7b}:root[code-theme=dark] .chroma .nb{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .bp{color:inherit}:root[code-theme=dark] .chroma .nc{color:#50fa7b}:root[code-theme=dark] .chroma .no{color:inherit}:root[code-theme=dark] .chroma .nd{color:inherit}:root[code-theme=dark] .chroma .ni{color:inherit}:root[code-theme=dark] .chroma .ne{color:inherit}:root[code-theme=dark] .chroma .nf{color:#50fa7b}:root[code-theme=dark] .chroma .fm{color:inherit}:root[code-theme=dark] .chroma .nl{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .nn{color:inherit}:root[code-theme=dark] .chroma .nx{color:inherit}:root[code-theme=dark] .chroma .py{color:inherit}:root[code-theme=dark] .chroma .nt{color:#ff79c6}:root[code-theme=dark] .chroma .nv{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vc{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vg{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vi{color:#8be9fd;font-style:italic}:root[code-theme=dark] .chroma .vm{color:inherit}:root[code-theme=dark] .chroma .l{color:inherit}:root[code-theme=dark] .chroma .ld{color:inherit}:root[code-theme=dark] .chroma .s{color:#f1fa8c}:root[code-theme=dark] .chroma .sa{color:#f1fa8c}:root[code-theme=dark] .chroma .sb{color:#f1fa8c}:root[code-theme=dark] .chroma .sc{color:#f1fa8c}:root[code-theme=dark] .chroma .dl{color:#f1fa8c}:root[code-theme=dark] .chroma .sd{color:#f1fa8c}:root[code-theme=dark] .chroma .s2{color:#f1fa8c}:root[code-theme=dark] .chroma .se{color:#f1fa8c}:root[code-theme=dark] .chroma .sh{color:#f1fa8c}:root[code-theme=dark] .chroma .si{color:#f1fa8c}:root[code-theme=dark] .chroma .sx{color:#f1fa8c}:root[code-theme=dark] .chroma .sr{color:#f1fa8c}:root[code-theme=dark] .chroma .s1{color:#f1fa8c}:root[code-theme=dark] .chroma .ss{color:#f1fa8c}:root[code-theme=dark] .chroma .m{color:#bd93f9}:root[code-theme=dark] .chroma .mb{color:#bd93f9}:root[code-theme=dark] .chroma .mf{color:#bd93f9}:root[code-theme=dark] .chroma .mh{color:#bd93f9}:root[code-theme=dark] .chroma .mi{color:#bd93f9}:root[code-theme=dark] .chroma .il{color:#bd93f9}:root[code-theme=dark] .chroma .mo{color:#bd93f9}:root[code-theme=dark] .chroma .o{color:#ff79c6}:root[code-theme=dark] .chroma .ow{color:#ff79c6}:root[code-theme=dark] .chroma .p{color:inherit}:root[code-theme=dark] .chroma .c{color:#96a6d8}:root[code-theme=dark] .chroma .ch{color:#96a6d8}:root[code-theme=dark] .chroma .cm{color:#96a6d8}:root[code-theme=dark] .chroma .c1{color:#96a6d8}:root[code-theme=dark] .chroma .cs{color:#96a6d8}:root[code-theme=dark] .chroma .cp{color:#ff79c6}:root[code-theme=dark] .chroma .cpf{color:#ff79c6}:root[code-theme=dark] .chroma .g{color:inherit}:root[code-theme=dark] .chroma .gd{color:#d98f90}:root[code-theme=dark] .chroma .ge{text-decoration:underline}:root[code-theme=dark] .chroma .gr{color:inherit}:root[code-theme=dark] .chroma .gh{font-weight:bold;color:inherit}:root[code-theme=dark] .chroma .gi{font-weight:bold}:root[code-theme=dark] .chroma .go{color:#8f9ea8}:root[code-theme=dark] .chroma .gp{color:inherit}:root[code-theme=dark] .chroma .gs{color:inherit}:root[code-theme=dark] .chroma .gu{font-weight:bold}:root[code-theme=dark] .chroma .gt{color:inherit}:root[code-theme=dark] .chroma .gl{text-decoration:underline}:root[code-theme=dark] .chroma .w{color:inherit}:root[code-theme=dark]{--code-background: rgb(34.31875, 45.36875, 52.59375);--code-accent-color: rgb(24.023125, 31.758125, 36.815625);--code-accent-color-lite: rgb(29.1709375, 38.5634375, 44.7046875);--code-font-color: rgb(185, 185, 185);--code-copy-background: rgb(34.31875, 45.36875, 52.59375);--code-copy-font-color: rgb(157.25, 157.25, 157.25);--code-copy-border-color: #949494;--code-copy-success-color: rgba(0, 200, 83, 0.45)}@media(prefers-color-scheme: dark){:root{--header-background: rgb(32, 83, 117);--header-font-color: rgb(255, 255, 255);--body-background: rgb(40.375, 53.375, 61.875);--body-font-color: rgb(180.9769254279, 196.5292481663, 206.6980745721);--mark-color: rgb(255, 171, 0);--button-background: rgb(43.6295302013, 113.1640939597, 159.5204697987);--button-border-color: rgb(32, 83, 117);--link-color: rgb(110, 168, 212);--link-color-visited: rgb(186, 142, 240);--hint-link-color: rgb(10, 83, 154);--hint-link-color-visited: rgb(119, 73, 191);--accent-color-dark: rgb(16.15, 21.35, 24.75);--accent-color: rgb(28.2625, 37.3625, 43.3125);--accent-color-lite: rgb(34.31875, 45.36875, 52.59375);--control-icons: rgb(124.5724137931, 136.8, 149.0275862069);--footer-background: rgb(17, 43, 60);--footer-font-color: rgb(255, 255, 255);--footer-link-color: rgb(246, 107, 14);--footer-link-color-visited: rgb(246, 107, 14)}:root .dark-mode-dim .gdoc-markdown img{filter:brightness(0.75) grayscale(0.2)}:root .gdoc-markdown .gdoc-hint,:root .gdoc-markdown .gdoc-props__tag,:root .gdoc-markdown .admonitionblock{filter:saturate(2.5) brightness(0.85)}:root .gdoc-markdown .gdoc-hint a,:root .gdoc-markdown .admonitionblock a{color:var(--hint-link-color)}:root .gdoc-markdown .gdoc-hint a:visited,:root .gdoc-markdown .admonitionblock a:visited{color:var(--hint-link-color-visited)}:root .gdoc-markdown .gdoc-hint__title,:root .gdoc-markdown .admonitionblock table td:first-child{background-color:rgba(134,142,150,.15)}:root .chroma{color:var(--code-font-color)}:root .chroma .lntable td:nth-child(2) code .hl{width:auto;margin-left:-0.5em;padding:0 .5em}:root .highlight pre.chroma{width:100%;overflow:auto;max-height:var(--code-max-height)}:root .chroma .lntable{border:1px solid var(--code-accent-color);border-radius:.15rem;border-spacing:0;padding:0;margin:0;width:100%;display:block;max-height:var(--code-max-height);overflow:auto}:root .chroma .lntable pre.chroma{max-height:none;border-radius:0;margin:0}:root .chroma .lntable td:first-child code{background-color:var(--code-accent-color-lite);border-right:1px solid var(--code-accent-color);padding-left:0;padding-right:0;border-radius:0}:root .chroma .lntable td:nth-child(2){width:100%;margin-left:2rem}:root .chroma .x{color:inherit}:root .chroma .err{color:inherit}:root .chroma .lntd{vertical-align:top;padding:0;margin:0;border:0}:root .chroma .hl{display:block;width:100%;background-color:#4f1605}:root .chroma .lnt{padding:0 .8em}:root .chroma .ln{margin-right:.4em;padding:0 .4em 0 .4em;color:#b3b3b3}:root .chroma .k{color:#ff79c6}:root .chroma .kc{color:#ff79c6}:root .chroma .kd{color:#8be9fd;font-style:italic}:root .chroma .kn{color:#ff79c6}:root .chroma .kp{color:#ff79c6}:root .chroma .kr{color:#ff79c6}:root .chroma .kt{color:#8be9fd}:root .chroma .n{color:inherit}:root .chroma .na{color:#50fa7b}:root .chroma .nb{color:#8be9fd;font-style:italic}:root .chroma .bp{color:inherit}:root .chroma .nc{color:#50fa7b}:root .chroma .no{color:inherit}:root .chroma .nd{color:inherit}:root .chroma .ni{color:inherit}:root .chroma .ne{color:inherit}:root .chroma .nf{color:#50fa7b}:root .chroma .fm{color:inherit}:root .chroma .nl{color:#8be9fd;font-style:italic}:root .chroma .nn{color:inherit}:root .chroma .nx{color:inherit}:root .chroma .py{color:inherit}:root .chroma .nt{color:#ff79c6}:root .chroma .nv{color:#8be9fd;font-style:italic}:root .chroma .vc{color:#8be9fd;font-style:italic}:root .chroma .vg{color:#8be9fd;font-style:italic}:root .chroma .vi{color:#8be9fd;font-style:italic}:root .chroma .vm{color:inherit}:root .chroma .l{color:inherit}:root .chroma .ld{color:inherit}:root .chroma .s{color:#f1fa8c}:root .chroma .sa{color:#f1fa8c}:root .chroma .sb{color:#f1fa8c}:root .chroma .sc{color:#f1fa8c}:root .chroma .dl{color:#f1fa8c}:root .chroma .sd{color:#f1fa8c}:root .chroma .s2{color:#f1fa8c}:root .chroma .se{color:#f1fa8c}:root .chroma .sh{color:#f1fa8c}:root .chroma .si{color:#f1fa8c}:root .chroma .sx{color:#f1fa8c}:root .chroma .sr{color:#f1fa8c}:root .chroma .s1{color:#f1fa8c}:root .chroma .ss{color:#f1fa8c}:root .chroma .m{color:#bd93f9}:root .chroma .mb{color:#bd93f9}:root .chroma .mf{color:#bd93f9}:root .chroma .mh{color:#bd93f9}:root .chroma .mi{color:#bd93f9}:root .chroma .il{color:#bd93f9}:root .chroma .mo{color:#bd93f9}:root .chroma .o{color:#ff79c6}:root .chroma .ow{color:#ff79c6}:root .chroma .p{color:inherit}:root .chroma .c{color:#96a6d8}:root .chroma .ch{color:#96a6d8}:root .chroma .cm{color:#96a6d8}:root .chroma .c1{color:#96a6d8}:root .chroma .cs{color:#96a6d8}:root .chroma .cp{color:#ff79c6}:root .chroma .cpf{color:#ff79c6}:root .chroma .g{color:inherit}:root .chroma .gd{color:#d98f90}:root .chroma .ge{text-decoration:underline}:root .chroma .gr{color:inherit}:root .chroma .gh{font-weight:bold;color:inherit}:root .chroma .gi{font-weight:bold}:root .chroma .go{color:#8f9ea8}:root .chroma .gp{color:inherit}:root .chroma .gs{color:inherit}:root .chroma .gu{font-weight:bold}:root .chroma .gt{color:inherit}:root .chroma .gl{text-decoration:underline}:root .chroma .w{color:inherit}:root{--code-background: rgb(34.31875, 45.36875, 52.59375);--code-accent-color: rgb(24.023125, 31.758125, 36.815625);--code-accent-color-lite: rgb(29.1709375, 38.5634375, 44.7046875);--code-font-color: rgb(185, 185, 185);--code-copy-background: rgb(34.31875, 45.36875, 52.59375);--code-copy-font-color: rgb(157.25, 157.25, 157.25);--code-copy-border-color: #949494;--code-copy-success-color: rgba(0, 200, 83, 0.45)}}html{font-size:16px;letter-spacing:.33px;scroll-behavior:smooth}html.color-toggle-hidden #gdoc-color-theme{display:none}html.color-toggle-light #gdoc-color-theme .gdoc_brightness_light{display:inline-block}html.color-toggle-light #gdoc-color-theme .gdoc_brightness_auto,html.color-toggle-light #gdoc-color-theme .gdoc_brightness_dark{display:none}html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_dark{display:inline-block}html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_auto,html.color-toggle-dark #gdoc-color-theme .gdoc_brightness_light{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_light{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_dark{display:none}html.color-toggle-auto #gdoc-color-theme .gdoc_brightness_auto{display:inline-block}html,body{min-width:20rem;overflow-x:hidden}body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box}body *{box-sizing:inherit}h1,h2,h3,h4,h5,h6{font-weight:normal;display:flex;align-items:center}h4,h5,h6{font-size:1rem !important}a{text-decoration:none;color:var(--link-color)}a:hover{text-decoration:underline}a:visited{color:var(--link-color-visited)}i.gdoc-icon{font-family:"GeekdocIcons";font-style:normal}img{vertical-align:middle}#gdoc-color-theme{cursor:pointer}.fake-link:hover{background-image:linear-gradient(var(--link-color), var(--link-color));background-position:0 100%;background-size:100% 1px;background-repeat:no-repeat;text-decoration:none}.wrapper{display:flex;flex-direction:column;min-height:100vh;color:var(--body-font-color);background:var(--body-background);font-weight:normal}.container{width:100%;max-width:82rem;margin:0 auto;padding:1.25rem}svg.gdoc-icon{display:inline-block;width:1.25rem;height:1.25rem;vertical-align:middle;stroke-width:0;stroke:currentColor;fill:currentColor;position:relative}.gdoc-header{background:var(--header-background);color:var(--header-font-color);border-bottom:.3em solid var(--footer-background)}.gdoc-header__link,.gdoc-header__link:visited{color:var(--header-font-color)}.gdoc-header__link:hover{text-decoration:none}.gdoc-header svg.gdoc-icon{width:2rem;height:2rem}.gdoc-brand{font-size:2rem;line-height:2rem}.gdoc-brand__img{margin-right:1rem;width:2rem;height:2rem}.gdoc-menu-header__items{display:flex}.gdoc-menu-header__items>span{margin-left:.5rem}.gdoc-menu-header__control,.gdoc-menu-header__home{display:none}.gdoc-menu-header__control svg.gdoc-icon,.gdoc-menu-header__home svg.gdoc-icon{cursor:pointer}.gdoc-nav{flex:0 0 18rem}.gdoc-nav nav{width:18rem;padding:1rem 2rem 1rem 0}.gdoc-nav nav>ul>li>*{font-weight:normal}.gdoc-nav nav section{margin-top:2rem}.gdoc-nav__control{display:none;margin:0;padding:0}.gdoc-nav__control svg.gdoc-icon{cursor:pointer}.gdoc-nav__control svg.gdoc-icon.gdoc_menu{display:inline-block}.gdoc-nav__control svg.gdoc-icon.gdoc_arrow_back{display:none}.gdoc-nav__list{padding-left:1rem;margin:0;padding:0;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.gdoc-nav__list ul{padding-left:1rem}.gdoc-nav__list li{margin:.75rem 0}.gdoc-nav__list svg.gdoc-icon{margin-right:.25rem}.gdoc-nav__toggle{display:none}.gdoc-nav__toggle~label{cursor:pointer}.gdoc-nav__toggle~label svg.gdoc-icon.toggle{width:1rem;height:1rem}.gdoc-nav__toggle:not(:checked)~ul,.gdoc-nav__toggle:not(:checked)~label svg.gdoc-icon.gdoc_keyboard_arrow_down{display:none}.gdoc-nav__toggle:not(:checked)~label svg.gdoc-icon.gdoc_keyboard_arrow_left{display:block}.gdoc-nav__toggle:checked~ul,.gdoc-nav__toggle:checked~label svg.gdoc-icon.gdoc_keyboard_arrow_down{display:block}.gdoc-nav__toggle:checked~label svg.gdoc-icon.gdoc_keyboard_arrow_left{display:none}.gdoc-nav--main>ul>li>span,.gdoc-nav--main>ul>li>span>a,.gdoc-nav--main>ul>li>label,.gdoc-nav--main>ul>li>label>a{font-weight:bold}.gdoc-nav__entry,.gdoc-language__entry{flex:1;color:var(--body-font-color)}.gdoc-nav__entry:hover,.gdoc-nav__entry.is-active,.gdoc-language__entry:hover,.gdoc-language__entry.is-active{text-decoration:underline;text-decoration-style:dashed !important}.gdoc-nav__entry:visited,.gdoc-language__entry:visited{color:var(--body-font-color)}.gdoc-search__list,.gdoc-language__list{background:var(--body-background);border-radius:.15rem;box-shadow:0 1px 3px 0 var(--accent-color-dark),0 1px 2px 0 var(--accent-color);position:absolute;margin:0;padding:.5rem .25rem !important;list-style:none;top:calc(100% + 0.5rem);z-index:2}.gdoc-page{min-width:18rem;flex-grow:1;padding:1rem 0}.gdoc-page h1,.gdoc-page h2,.gdoc-page h3,.gdoc-page h4,.gdoc-page h5,.gdoc-page h6{font-weight:600}.gdoc-page__header,.gdoc-page__footer{margin-bottom:1.5rem}.gdoc-page__header svg.gdoc-icon,.gdoc-page__footer svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__header a,.gdoc-page__header a:visited,.gdoc-page__footer a,.gdoc-page__footer a:visited{color:var(--link-color)}.gdoc-page__header{background:var(--accent-color-lite);padding:.5rem 1rem;border-radius:.15rem}.gdoc-page__nav:hover{background-image:linear-gradient(var(--link-color), var(--link-color));background-position:0 100%;background-size:100% 1px;background-repeat:no-repeat}.gdoc-page__anchorwrap{gap:.5em}.gdoc-page__anchorwrap:hover .gdoc-page__anchor svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__anchor svg.gdoc-icon{width:1.85em;height:1.85em;color:rgba(0,0,0,0)}.gdoc-page__anchor:focus svg.gdoc-icon{color:var(--control-icons)}.gdoc-page__footer{margin-top:2rem}.gdoc-page__footer a:hover{text-decoration:none}.gdoc-post{word-wrap:break-word;border-top:1px dashed #868e96;padding:2rem 0}.gdoc-post:first-of-type{padding-top:0}.gdoc-post__header h1{margin-top:0}.gdoc-post__header a,.gdoc-post__header a:visited{color:var(--body-font-color);text-decoration:none}.gdoc-post__header a:hover{background:none;text-decoration:underline;color:var(--body-font-color)}.gdoc-post:first-child{border-top:0}.gdoc-post:first-child h1{margin-top:0}.gdoc-post__readmore{margin:2rem 0}.gdoc-post__readmore a,.gdoc-post__readmore a:hover,.gdoc-post__readmore a:visited{color:var(--link-color);text-decoration:none !important}.gdoc-post__meta span svg.gdoc-icon{margin-left:-5px}.gdoc-post__meta>span{margin:.25rem 0}.gdoc-post__meta>span:not(:last-child){margin-right:.5rem}.gdoc-post__meta svg.gdoc-icon{font-size:1.25rem}.gdoc-post__meta .gdoc-button{margin:0 .125rem 0 0}.gdoc-post__meta--head{margin-bottom:2rem}.gdoc-post__codecontainer{position:relative}.gdoc-post__codecontainer:hover>.gdoc-post__codecopy{visibility:visible}.gdoc-post__codecopy{visibility:hidden;position:absolute;top:.5rem;right:.5rem;border:1.5px solid var(--code-copy-border-color);border-radius:.15rem;background:var(--code-copy-background);width:2rem;height:2rem}.gdoc-post__codecopy svg.gdoc-icon{top:0;width:1.25rem;height:1.25rem;color:var(--code-copy-font-color)}.gdoc-post__codecopy:hover{cursor:pointer}.gdoc-post__codecopy--success{border-color:var(--code-copy-success-color)}.gdoc-post__codecopy--success svg.gdoc-icon{color:var(--code-copy-success-color)}.gdoc-post__codecopy--out{transition:visibility 2s ease-out}.gdoc-footer{background:var(--footer-background);color:var(--footer-font-color)}.gdoc-footer .fake-link{text-decoration:none}.gdoc-footer .fake-link:hover{background-image:linear-gradient(var(--footer-link-color), var(--footer-link-color))}.gdoc-footer__item{line-height:2rem}.gdoc-footer__item--row{margin-right:1rem}.gdoc-footer__link{text-decoration:underline;color:var(--footer-link-color)}.gdoc-footer__link:visited{color:var(--footer-link-color-visited)}.gdoc-search{position:relative}.gdoc-search svg.gdoc-icon{position:absolute;left:.5rem;color:var(--control-icons);width:1.25rem;height:1.25rem}.gdoc-search::after{display:block;content:"";clear:both}.gdoc-search__input{width:100%;padding:.5rem;padding-left:2rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;border:1px solid rgba(0,0,0,0);border-radius:.15rem;background:var(--accent-color-lite);color:var(--body-font-color)}.gdoc-search__input:focus{outline:none !important;border:1px solid var(--accent-color)}.gdoc-search__list{visibility:hidden;left:0;width:100%}.gdoc-search__list ul{list-style:none;padding-left:0}.gdoc-search__list>li>span{font-weight:bold}.gdoc-search__list>li+li{margin-top:.25rem}.gdoc-search__list svg.gdoc-icon{margin-right:.25rem}.gdoc-search__section{display:flex;flex-direction:column;padding:.25rem !important}.gdoc-search__entry{display:flex;flex-direction:column;color:var(--body-font-color);padding:.25rem !important;border-radius:.15rem}.gdoc-search__entry:hover,.gdoc-search__entry.is-active{background:var(--accent-color-lite);text-decoration:none}.gdoc-search__entry:hover .gdoc-search__entry--title,.gdoc-search__entry.is-active .gdoc-search__entry--title{text-decoration-style:dashed !important;text-decoration:underline}.gdoc-search__entry:visited{color:var(--body-font-color)}.gdoc-search__entry--description{font-size:.875rem;font-style:italic}.gdoc-search:focus-within .gdoc-search__list.has-hits,.gdoc-search__list.has-hits:hover{visibility:visible}.gdoc-language__selector{position:relative;list-style:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;margin:0;padding:0;width:100%}.gdoc-language__selector:focus .gdoc-language__list,.gdoc-language__selector:focus-within .gdoc-language__list,.gdoc-language__selector:active .gdoc-language__list{display:block}.gdoc-language__list{display:none;right:0;width:auto;white-space:nowrap}.gdoc-paging{padding:1rem 0}.gdoc-paging__item{flex:1 1 0}.gdoc-paging__item a:visited{color:var(--link-color)}.gdoc-paging__item a:hover,.gdoc-paging__item a:visited:hover{background:var(--link-color);color:#f8f9fa}.gdoc-paging__item--next{text-align:right}.gdoc-paging__item--prev{text-align:left}.gdoc-error{padding:6rem 1rem;margin:0 auto;max-width:45em}.gdoc-error svg.gdoc-icon{width:8rem;height:8rem;color:var(--body-font-color)}.gdoc-error__link,.gdoc-error__link:visited{text-decoration:underline;color:var(--link-color)}.gdoc-error__message{padding-left:4rem}.gdoc-error__line{padding:.5rem 0}.gdoc-error__title{font-size:4rem}.gdoc-error__code{font-weight:bolder}.gdoc-toc{margin:1rem 0}.gdoc-toc li{margin:.25rem 0}.gdoc-toc__level--1 ul ul,.gdoc-toc__level--2 ul ul ul,.gdoc-toc__level--3 ul ul ul ul,.gdoc-toc__level--4 ul ul ul ul ul,.gdoc-toc__level--5 ul ul ul ul ul ul,.gdoc-toc__level--6 ul ul ul ul ul ul ul{display:none}.gdoc-toc a,.gdoc-toc a:visited{text-decoration:none !important;color:var(--link-color)}.gdoc-nav nav,.gdoc-page,.markdown{transition:.2s ease-in-out;transition-property:transform,margin-left,opacity;will-change:transform,margin-left}.breadcrumb{display:inline;padding:0;margin:0}.breadcrumb li{display:inline}.gdoc-markdown{line-height:1.6rem}.gdoc-markdown h1,.gdoc-markdown h2,.gdoc-markdown h3,.gdoc-markdown h4,.gdoc-markdown h5,.gdoc-markdown h6{font-weight:600}.gdoc-markdown h1>code,.gdoc-markdown h2>code,.gdoc-markdown h3>code,.gdoc-markdown h4>code,.gdoc-markdown h5>code,.gdoc-markdown h6>code{border-top:3px solid var(--accent-color);font-size:.75rem !important}.gdoc-markdown h4>code,.gdoc-markdown h5>code,.gdoc-markdown h6>code{font-size:.875rem !important}.gdoc-markdown b,.gdoc-markdown optgroup,.gdoc-markdown strong{font-weight:bolder}.gdoc-markdown a,.gdoc-markdown__link{text-decoration:underline;border-bottom:1px solid rgba(0,0,0,0);line-height:normal}.gdoc-markdown a:hover,.gdoc-markdown__link:hover{text-decoration:underline}.gdoc-markdown__link--raw{text-decoration:none !important;color:#343a40 !important}.gdoc-markdown__link--raw:hover{text-decoration:none !important}.gdoc-markdown__link--raw:visited{color:#343a40 !important}.gdoc-markdown__link--code{text-decoration:none}.gdoc-markdown__link--code code{color:inherit !important}.gdoc-markdown__link--code:hover{background:none;color:var(--link-color) !important;text-decoration:underline}.gdoc-markdown__link--code:visited,.gdoc-markdown__link--code:visited:hover{color:var(--link-color-visited) !important}.gdoc-markdown__figure{padding:.25rem;margin:1rem 0;background-color:var(--accent-color);display:table;border-top-left-radius:.15rem;border-top-right-radius:.15rem}.gdoc-markdown__figure--round,.gdoc-markdown__figure--round img{border-radius:50% !important}.gdoc-markdown__figure figcaption{display:table-caption;caption-side:bottom;background-color:var(--accent-color);padding:0 .25rem .25rem;text-align:center;border-bottom-left-radius:.15rem;border-bottom-right-radius:.15rem}.gdoc-markdown__figure img{max-width:100%;height:auto}.gdoc-markdown img{max-width:100%;border-radius:.15rem}.gdoc-markdown blockquote{margin:1rem 0;padding:.5rem 1rem .5rem .75rem;border-left:3px solid var(--accent-color);border-radius:.15rem}.gdoc-markdown table:not(.lntable):not(.highlight){display:table;border-spacing:0;border-collapse:collapse;margin-top:1rem;margin-bottom:1rem;width:100%;text-align:left}.gdoc-markdown table:not(.lntable):not(.highlight) thead{border-bottom:3px solid var(--accent-color)}.gdoc-markdown table:not(.lntable):not(.highlight) tr th,.gdoc-markdown table:not(.lntable):not(.highlight) tr td{padding:.5rem 1rem}.gdoc-markdown table:not(.lntable):not(.highlight) tr{border-bottom:1.5px solid var(--accent-color)}.gdoc-markdown table:not(.lntable):not(.highlight) tr:nth-child(2n){background:var(--accent-color-lite)}.gdoc-markdown hr{height:1.5px;border:none;background:var(--accent-color)}.gdoc-markdown ul,.gdoc-markdown ol{padding-left:2rem}.gdoc-markdown dl dt{font-weight:bolder;margin-top:1rem}.gdoc-markdown dl dd{margin-left:2rem}.gdoc-markdown code{padding:.25rem .5rem}.gdoc-markdown pre,.gdoc-markdown code{background-color:var(--code-background);border-radius:.15rem;color:var(--code-font-color);font-size:.875rem;line-height:1rem}.gdoc-markdown pre code{display:block;padding:1rem;width:100%}.gdoc-markdown mark{background-color:var(--mark-color)}.gdoc-markdown__align{text-align:left}.gdoc-markdown__align--left h1,.gdoc-markdown__align--left h2,.gdoc-markdown__align--left h3,.gdoc-markdown__align--left h4,.gdoc-markdown__align--left h5,.gdoc-markdown__align--left h6{justify-content:flex-start}.gdoc-markdown__align--center{text-align:center}.gdoc-markdown__align--center h1,.gdoc-markdown__align--center h2,.gdoc-markdown__align--center h3,.gdoc-markdown__align--center h4,.gdoc-markdown__align--center h5,.gdoc-markdown__align--center h6{justify-content:center}.gdoc-markdown__align--right{text-align:right}.gdoc-markdown__align--right h1,.gdoc-markdown__align--right h2,.gdoc-markdown__align--right h3,.gdoc-markdown__align--right h4,.gdoc-markdown__align--right h5,.gdoc-markdown__align--right h6{justify-content:flex-end}.admonitionblock.info{border-left-color:#0091ea;background-color:rgb(243.27,249.2558974359,252.93);color:#343a40}.admonitionblock.note{border-left-color:#0091ea;background-color:rgb(243.27,249.2558974359,252.93);color:#343a40}.admonitionblock.ok{border-left-color:#00c853;background-color:hsl(144.9,70%,96.9607843137%);color:#343a40}.admonitionblock.tip{border-left-color:#00c853;background-color:hsl(144.9,70%,96.9607843137%);color:#343a40}.admonitionblock.important{border-left-color:#ffab00;background-color:hsl(40.2352941176,70%,97.5%);color:#343a40}.admonitionblock.caution{border-left-color:#7300d3;background-color:rgb(247.9961729858,242.2925,252.7575);color:#343a40}.admonitionblock.danger{border-left-color:#d50000;background-color:hsl(0,70%,97.0882352941%);color:#343a40}.admonitionblock.warning{border-left-color:#d50000;background-color:hsl(0,70%,97.0882352941%);color:#343a40}.admonitionblock{margin:1rem 0;padding:0;border-left:3px solid var(--accent-color);border-radius:.15rem}.admonitionblock table{margin:0 !important;padding:0 !important}.admonitionblock table tr{border:0 !important}.admonitionblock table td{display:block;padding:.25rem 1rem !important}.admonitionblock table td:first-child{background-color:rgba(134,142,150,.05);font-weight:bold}.admonitionblock table td:first-child.icon .title{display:flex;align-items:center}.admonitionblock table td:first-child.icon i.fa::after{content:attr(title);font-style:normal;padding-left:1.5rem}.admonitionblock table td:first-child.icon i.fa{color:#000;background-size:auto 90%;background-repeat:no-repeat;filter:invert(30%);margin-left:-5px}.admonitionblock table td:first-child.icon i.fa.icon-info{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.admonitionblock table td:first-child.icon i.fa.icon-note{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.admonitionblock table td:first-child.icon i.fa.icon-ok{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.admonitionblock table td:first-child.icon i.fa.icon-tip{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.admonitionblock table td:first-child.icon i.fa.icon-important{background-image:url(img/geekdoc-stack.svg#gdoc_error_outline)}.admonitionblock table td:first-child.icon i.fa.icon-caution{background-image:url(img/geekdoc-stack.svg#gdoc_dangerous)}.admonitionblock table td:first-child.icon i.fa.icon-danger{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.admonitionblock table td:first-child.icon i.fa.icon-warning{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-expand{margin:1rem 0;border:1px solid var(--accent-color);border-radius:.15rem;overflow:hidden}.gdoc-expand__head{background:var(--accent-color-lite);padding:.5rem 1rem;cursor:pointer}.gdoc-expand__content{display:none;padding:0 1rem}.gdoc-expand__control:checked+.gdoc-expand__content{display:block}.gdoc-expand .gdoc-page__anchor{display:none}.gdoc-tabs{margin:1rem 0;border:1px solid var(--accent-color);border-radius:.15rem;overflow:hidden;display:flex;flex-wrap:wrap}.gdoc-tabs__label{display:inline-block;padding:.5rem 1rem;border-bottom:1px rgba(0,0,0,0);cursor:pointer}.gdoc-tabs__content{order:999;width:100%;border-top:1px solid var(--accent-color-lite);padding:0 1rem;display:none}.gdoc-tabs__control:checked+.gdoc-tabs__label{border-bottom:1.5px solid var(--link-color)}.gdoc-tabs__control:checked+.gdoc-tabs__label+.gdoc-tabs__content{display:block}.gdoc-tabs .gdoc-page__anchor{display:none}.gdoc-columns{margin:1rem 0}.gdoc-columns--regular>:first-child{flex:1}.gdoc-columns--small>:first-child{flex:.35;min-width:7rem}.gdoc-columns--large>:first-child{flex:1.65;min-width:33rem}.gdoc-columns__content{flex:1 1;min-width:13.2rem;padding:0}.gdoc-columns .gdoc-page__anchor{display:none}.gdoc-button{margin:1rem 0;display:inline-block;background:var(--accent-color-lite);border:1px solid var(--accent-color);border-radius:.15rem;cursor:pointer}.gdoc-button__link{display:inline-block;color:inherit !important;text-decoration:none !important}.gdoc-button:hover{background:var(--button-background);border-color:var(--button-border-color);color:#f8f9fa}.gdoc-button--regular{font-size:16px}.gdoc-button--regular .gdoc-button__link{padding:.25rem .5rem}.gdoc-button--large{font-size:1.25rem}.gdoc-button--large .gdoc-button__link{padding:.5rem 1rem}.gdoc-hint.info{border-left-color:#0091ea;background-color:rgb(243.27,249.2558974359,252.93);color:#343a40;padding:0}.gdoc-hint.info code,.gdoc-hint.info pre{background-color:rgb(220.5,229.0512820513,234.3);color:#464646}.gdoc-hint.note{border-left-color:#0091ea;background-color:rgb(243.27,249.2558974359,252.93);color:#343a40;padding:0}.gdoc-hint.note code,.gdoc-hint.note pre{background-color:rgb(220.5,229.0512820513,234.3);color:#464646}.gdoc-hint.ok{border-left-color:#00c853;background-color:hsl(144.9,70%,96.9607843137%);color:#343a40;padding:0}.gdoc-hint.ok code,.gdoc-hint.ok pre{background-color:rgb(216.25,231.75,222.6825);color:#464646}.gdoc-hint.tip{border-left-color:#00c853;background-color:hsl(144.9,70%,96.9607843137%);color:#343a40;padding:0}.gdoc-hint.tip code,.gdoc-hint.tip pre{background-color:rgb(216.25,231.75,222.6825);color:#464646}.gdoc-hint.important{border-left-color:#ffab00;background-color:hsl(40.2352941176,70%,97.5%);color:#343a40;padding:0}.gdoc-hint.important code,.gdoc-hint.important pre{background-color:hsl(40.2352941176,25%,90%);color:#464646}.gdoc-hint.caution{border-left-color:#7300d3;background-color:rgb(247.9961729858,242.2925,252.7575);color:#343a40;padding:0}.gdoc-hint.caution code,.gdoc-hint.caution pre{background-color:rgb(225.7731042654,217.625,232.575);color:#464646}.gdoc-hint.danger{border-left-color:#d50000;background-color:hsl(0,70%,97.0882352941%);color:#343a40;padding:0}.gdoc-hint.danger code,.gdoc-hint.danger pre{background-color:hsl(0,25%,88.3529411765%);color:#464646}.gdoc-hint.warning{border-left-color:#d50000;background-color:hsl(0,70%,97.0882352941%);color:#343a40;padding:0}.gdoc-hint.warning code,.gdoc-hint.warning pre{background-color:hsl(0,25%,88.3529411765%);color:#464646}.gdoc-hint__title{padding:.25rem 1rem;background-color:rgba(134,142,150,.05);font-weight:bold;color:rgba(52,58,64,.85)}.gdoc-hint__title i.fa::after{content:attr(title);font-style:normal;padding-left:1.5rem}.gdoc-hint__title i.fa{color:#000;background-size:auto 90%;background-repeat:no-repeat;filter:invert(30%);margin-left:-5px}.gdoc-hint__title i.fa.info{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.gdoc-hint__title i.fa.note{background-image:url(img/geekdoc-stack.svg#gdoc_info_outline)}.gdoc-hint__title i.fa.ok{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.gdoc-hint__title i.fa.tip{background-image:url(img/geekdoc-stack.svg#gdoc_check_circle_outline)}.gdoc-hint__title i.fa.important{background-image:url(img/geekdoc-stack.svg#gdoc_error_outline)}.gdoc-hint__title i.fa.caution{background-image:url(img/geekdoc-stack.svg#gdoc_dangerous)}.gdoc-hint__title i.fa.danger{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-hint__title i.fa.warning{background-image:url(img/geekdoc-stack.svg#gdoc_fire)}.gdoc-hint__title .gdoc-icon{width:1.5rem;height:1.5rem;margin-left:-5px}.gdoc-hint__text{padding:.25rem 1rem}.gdoc-hint .gdoc-page__anchor{display:none}.gdoc-mermaid{font-family:var(--body-font-family)}.gdoc-mermaid>svg{height:100%;padding:.5rem}.gdoc-props__title,.gdoc-props__default{padding:0;margin:0;font-family:var(--code-font-family)}.gdoc-props__meta{gap:.5em;line-height:normal;margin-bottom:.25rem}.gdoc-props__meta:hover .gdoc-page__anchor svg.gdoc-icon{color:var(--control-icons)}.gdoc-props__tag.info{border-color:rgb(231.54,243.5117948718,250.86);background-color:rgb(243.27,249.2558974359,252.93)}.gdoc-props__tag.note{border-color:rgb(231.54,243.5117948718,250.86);background-color:rgb(243.27,249.2558974359,252.93)}.gdoc-props__tag.ok{border-color:rgb(228.65,250.35,237.6555);background-color:hsl(144.9,70%,96.9607843137%)}.gdoc-props__tag.tip{border-color:rgb(228.65,250.35,237.6555);background-color:hsl(144.9,70%,96.9607843137%)}.gdoc-props__tag.important{border-color:hsl(40.2352941176,70%,95%);background-color:hsl(40.2352941176,70%,97.5%)}.gdoc-props__tag.caution{border-color:rgb(240.9923459716,229.585,250.515);background-color:rgb(247.9961729858,242.2925,252.7575)}.gdoc-props__tag.danger{border-color:hsl(0,70%,94.1764705882%);background-color:hsl(0,70%,97.0882352941%)}.gdoc-props__tag.warning{border-color:hsl(0,70%,94.1764705882%);background-color:hsl(0,70%,97.0882352941%)}.gdoc-props__tag{font-size:.875rem;font-weight:normal;background-color:#f8f9fa;border:1px solid #e9ecef;border-radius:.15rem;padding:.125rem .25rem;color:#343a40}.gdoc-props__default{font-size:.875rem}.gdoc-progress{margin-bottom:1rem}.gdoc-progress__label{padding:.25rem 0}.gdoc-progress__label--name{font-weight:bold}.gdoc-progress__wrap{background-color:var(--accent-color-lite);border-radius:1em;box-shadow:inset 0 0 0 1px var(--accent-color)}.gdoc-progress__bar{height:1em;border-radius:1em;background-image:linear-gradient(-45deg, rgba(255, 255, 255, 0.125) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.125) 50%, rgba(255, 255, 255, 0.125) 75%, transparent 75%, transparent);background-size:2.5em 2.5em;background-color:#205375 !important} \ No newline at end of file diff --git a/tags/index.html b/tags/index.html index a53e1d8..bcf9bc5 100644 --- a/tags/index.html +++ b/tags/index.html @@ -1,5 +1,5 @@ -Tags | zk-lib - Multipurpose Factorio library -