Home
last modified time | relevance | path

Searched refs:search (Results 1 – 25 of 1061) sorted by last modified time

12345678910>>...43

/plugin/pagequery/
H A Dreadme.md9 On the surface it may appear to fill a similar role to the really excellent [[plugin:indexmenu|IndexMenu]], however pagequery's aspirations are not as lofty or elaborate. IndexMenu focuses on displaying namespaces, and the pages within. allowing you to sort the namespaces and files by many options, and actively navigate and manipulate this index. Pagequery's purpose is __displaying lists of pages__: yes, you can sort by namespace if you wish, however the main goal is to search for and list pages in any order, and then neatly display them in groups (A-Z, by year, by month, etc...) and in addition in columns — to make best use of space. If you try both of them you'll quickly see that they //"scratch different itches."//
14 * Or limit your search to a specific namespace
25 Nothing worthwhile is built in isolation: pagequery has been built on the shoulders of giants — i.e. the DokuWiki core functions. Under the skin it makes shamefaced use of the excellent built-in page and full-text [[:search]] functions available in DokuWiki, so there's no new search syntax to learn. However it does bring a little something new to the mix by providing powerful sorting and grouping options.
30 * Listing pages that discuss a particular subject (via full-text search)
60 This would retrieve results from @namespace only (as there is no other search query you would get all the pages), and the list would be sorted by the //first letter// ('sort=a') then alphabetically ('sort=name') within each letter. The //group// option will then cause the list to be grouped by the first letter only (you cannot group by name as each one is unique).
70 The same query, but now searching for pages contenting the word "help" (NOTE: ''fulltext'' means search in the page "content" not just its "name":
74 **Update:** Namespaces are now supported when searching by pagename (pageid) only. Use the same syntax as fulltext [[:search]], i.e. @namespace|^namespace. I haven't provide support for relative namespaces yet. In addition, you can use regular expressions when searching by pagename.
/plugin/nspages/fileHelper/
H A DfileHelper.php32 search($files, $conf['datadir'], 'search_universal', $opt, $this->data['wantedDir']);
/plugin/mermaid/
H A Dmermaid.min.js7 `+Zc),Ne&&(Zc=Hv(Zc,K," "),Zc=Hv(Zc,yt," "),Zc=Hv(Zc,V," ")),wt&&Br?wt.createHTML(Zc):Zc},a.setConfig=function(Gi){Ic(Gi),_e=!0},a.clearConfig=function(){d1=null,_e=!1},a.isValidAttribute=function(Gi,cn,Nr){d1||Ic({});const Si=Zs(Gi),vc=Zs(cn);return w0(Si,vc,Nr)},a.addHook=function(Gi,cn){typeof cn=="function"&&(dt[Gi]=dt[Gi]||[],vF(dt[Gi],cn))},a.removeHook=function(Gi){if(dt[Gi])return EPt(dt[Gi])},a.removeHooks=function(Gi){dt[Gi]&&(dt[Gi]=[])},a.removeAllHooks=function(){dt={}},a}var QL=MPt();const xF=/<br\s*\/?>/gi,tMe=i=>i?NPt(i).replace(/\\n/g,"#br#").split("#br#"):[""],eMe=(()=>{let i=!1;return()=>{i||(nMe(),i=!0)}})();function nMe(){const i="data-temp-href-target";QL.addHook("beforeSanitizeAttributes",a=>{a.tagName==="A"&&a.hasAttribute("target")&&a.setAttribute(i,a.getAttribute("target")||"")}),QL.addHook("afterSanitizeAttributes",a=>{a.tagName==="A"&&a.hasAttribute(i)&&(a.setAttribute("target",a.getAttribute(i)||""),a.removeAttribute(i),a.getAttribute("target")==="_blank"&&a.setAttribute("rel","noopener"))})}const IPt=i=>(eMe(),QL.sanitize(i)),OPt=(i,a)=>{var f;if(((f=a.flowchart)==null?void 0:f.htmlLabels)!==!1){const g=a.securityLevel;g==="antiscript"||g==="strict"?i=IPt(i):g!=="loose"&&(i=NPt(i),i=i.replace(/</g,"&lt;").replace(/>/g,"&gt;"),i=i.replace(/=/g,"&equals;"),i=aMe(i))}return i},Ef=(i,a)=>i&&(a.dompurifyConfig?i=QL.sanitize(OPt(i,a),a.dompurifyConfig).toString():i=QL.sanitize(OPt(i,a),{FORBID_TAGS:["style"]}).toString(),i),rMe=(i,a)=>typeof i=="string"?Ef(i,a):i.flat().map(f=>Ef(f,a)),iMe=i=>xF.test(i),sMe=i=>i.split(xF),aMe=i=>i.replace(/#br#/g,"<br/>"),NPt=i=>i.replace(xF,"#br#"),oMe=i=>{let a="";return i&&(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,a=a.replaceAll(/\(/g,"\\("),a=a.replaceAll(/\)/g,"\\)")),a},j1=i=>!(i===!1||["false","null","0"].includes(String(i).trim().toLowerCase())),cMe=function(...i){const a=i.filter(f=>!isNaN(f));return Math.max(...a)},uMe=function(...i){const a=i.filter(f=>!isNaN(f));return Math.min(...a)},kF=function(i){const a=i.split(/(,)/),f=[];for(let g=0;g<a.length;g++){let w=a[g];if(w===","&&g>0&&g+1<a.length){const v=a[g-1],b=a[g+1];lMe(v,b)&&(w=v+","+b,g++,f.pop())}f.push(hMe(w))}return f.join("")},fgt=(i,a)=>Math.max(0,i.split(a).length-1),lMe=(i,a)=>{const f=fgt(i,"~"),g=fgt(a,"~");return f===1&&g===1},hMe=i=>{const a=fgt(i,"~");let f=!1;if(a<=1)return i;a%2!==0&&i.startsWith("~")&&(i=i.substring(1),f=!0);const g=[...i];let w=g.indexOf("~"),v=g.lastIndexOf("~");for(;w!==-1&&v!==-1&&w!==v;)g[w]="<",g[v]=">",w=g.indexOf("~"),v=g.lastIndexOf("~");return f&&g.unshift("~"),g.join("")},ei={getRows:tMe,sanitizeText:Ef,sanitizeTextOrArray:rMe,hasBreaks:iMe,splitBreaks:sMe,lineBreakRegex:xF,removeScript:IPt,getUrl:oMe,evaluate:j1,getMax:cMe,getMin:uMe},qW={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:i=>i>=255?255:i<0?0:i,g:i=>i>=255?255:i<0?0:i,b:i=>i>=255?255:i<0?0:i,h:i=>i%360,s:i=>i>=100?100:i<0?0:i,l:i=>i>=100?100:i<0?0:i,a:i=>i>=1?1:i<0?0:i},toLinear:i=>{const a=i/255;return i>.03928?Math.pow((a+.055)/1.055,2.4):a/12.92},hue2rgb:(i,a,f)=>(f<0&&(f+=1),f>1&&(f-=1),f<1/6?i+(a-i)*6*f:f<1/2?a:f<2/3?i+(a-i)*(2/3-f)*6:i),hsl2rgb:({h:i,s:a,l:f},g)=>{if(!a)return f*2.55;i/=360,a/=100,f/=100;const w=f<.5?f*(1+a):f+a-f*a,v=2*f-w;switch(g){case"r":return qW.hue2rgb(v,w,i+1/3)*255;case"g":return qW.hue2rgb(v,w,i)*255;case"b":return qW.hue2rgb(v,w,i-1/3)*255}},rgb2hsl:({r:i,g:a,b:f},g)=>{i/=255,a/=255,f/=255;const w=Math.max(i,a,f),v=Math.min(i,a,f),b=(w+v)/2;if(g==="l")return b*100;if(w===v)return 0;const E=w-v,S=b>.5?E/(2-w-v):E/(w+v);if(g==="s")return S*100;switch(w){case i:return((a-f)/E+(a<f?6:0))*60;case a:return((f-i)/E+2)*60;case f:return((i-a)/E+4)*60;default:return-1}}},Ia={channel:qW,lang:{clamp:(i,a,f)=>a>f?Math.min(a,Math.max(f,i)):Math.min(f,Math.max(a,i)),round:i=>Math.round(i*1e10)/1e10},unit:{dec2hex:i=>{const a=Math.round(i).toString(16);return a.length>1?a:`0${a}`}}},g8={};for(let i=0;i<=255;i++)g8[i]=Ia.unit.dec2hex(i);const ig={ALL:0,RGB:1,HSL:2};class fMe{constructor(){this.type=ig.ALL}get(){return this.type}set(a){if(this.type&&this.type!==a)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=a}reset(){this.type=ig.ALL}is(a){return this.type===a}}const dMe=fMe;class gMe{constructor(a,f){this.color=f,this.changed=!1,this.data=a,this.type=new dMe}set(a,f){return this.color=f,this.changed=!1,this.data=a,this.type.type=ig.ALL,this}_ensureHSL(){const a=this.data,{h:f,s:g,l:w}=a;f===void 0&&(a.h=Ia.channel.rgb2hsl(a,"h")),g===void 0&&(a.s=Ia.channel.rgb2hsl(a,"s")),w===void 0&&(a.l=Ia.channel.rgb2hsl(a,"l"))}_ensureRGB(){const a=this.data,{r:f,g,b:w}=a;f===void 0&&(a.r=Ia.channel.hsl2rgb(a,"r")),g===void 0&&(a.g=Ia.channel.hsl2rgb(a,"g")),w===void 0&&(a.b=Ia.channel.hsl2rgb(a,"b"))}get r(){const a=this.data,f=a.r;return!this.type.is(ig.HSL)&&f!==void 0?f:(this._ensureHSL(),Ia.channel.hsl2rgb(a,"r"))}get g(){const a=this.data,f=a.g;return!this.type.is(ig.HSL)&&f!==void 0?f:(this._ensureHSL(),Ia.channel.hsl2rgb(a,"g"))}get b(){const a=this.data,f=a.b;return!this.type.is(ig.HSL)&&f!==void 0?f:(this._ensureHSL(),Ia.channel.hsl2rgb(a,"b"))}get h(){const a=this.data,f=a.h;return!this.type.is(ig.RGB)&&f!==void 0?f:(this._ensureRGB(),Ia.channel.rgb2hsl(a,"h"))}get s(){const a=this.data,f=a.s;return!this.type.is(ig.RGB)&&f!==void 0?f:(this._ensureRGB(),Ia.channel.rgb2hsl(a,"s"))}get l(){const a=this.data,f=a.l;return!this.type.is(ig.RGB)&&f!==void 0?f:(this._ensureRGB(),Ia.channel.rgb2hsl(a,"l"))}get a(){return this.data.a}set r(a){this.type.set(ig.RGB),this.changed=!0,this.data.r=a}set g(a){this.type.set(ig.RGB),this.changed=!0,this.data.g=a}set b(a){this.type.set(ig.RGB),this.changed=!0,this.data.b=a}set h(a){this.type.set(ig.HSL),this.changed=!0,this.data.h=a}set s(a){this.type.set(ig.HSL),this.changed=!0,this.data.s=a}set l(a){this.type.set(ig.HSL),this.changed=!0,this.data.l=a}set a(a){this.changed=!0,this.data.a=a}}const pMe=gMe,HW=new pMe({r:0,g:0,b:0,a:0},"transparent"),PPt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:i=>{if(i.charCodeAt(0)!==35)return;const a=i.match(PPt.re);if(!a)return;const f=a[1],g=parseInt(f,16),w=f.length,v=w%4===0,b=w>4,E=b?1:17,S=b?8:4,_=v?0:-1,M=b?255:15;return HW.set({r:(g>>S*(_+3)&M)*E,g:(g>>S*(_+2)&M)*E,b:(g>>S*(_+1)&M)*E,a:v?(g&M)*E/255:1},i)},stringify:i=>{const{r:a,g:f,b:g,a:w}=i;return w<1?`#${g8[Math.round(a)]}${g8[Math.round(f)]}${g8[Math.round(g)]}${g8[Math.round(w*255)]}`:`#${g8[Math.round(a)]}${g8[Math.round(f)]}${g8[Math.round(g)]}`}},EF=PPt,VW={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:i=>{const a=i.match(VW.hueRe);if(a){const[,f,g]=a;switch(g){case"grad":return Ia.channel.clamp.h(parseFloat(f)*.9);case"rad":return Ia.channel.clamp.h(parseFloat(f)*180/Math.PI);case"turn":return Ia.channel.clamp.h(parseFloat(f)*360)}}return Ia.channel.clamp.h(parseFloat(i))},parse:i=>{const a=i.charCodeAt(0);if(a!==104&&a!==72)return;const f=i.match(VW.re);if(!f)return;const[,g,w,v,b,E]=f;return HW.set({h:VW._hue2deg(g),s:Ia.channel.clamp.s(parseFloat(w)),l:Ia.channel.clamp.l(parseFloat(v)),a:b?Ia.channel.clamp.a(E?parseFloat(b)/100:parseFloat(b)):1},i)},stringify:i=>{const{h:a,s:f,l:g,a:w}=i;return w<1?`hsla(${Ia.lang.round(a)}, ${Ia.lang.round(f)}%, ${Ia.lang.round(g)}%, ${w})`:`hsl(${Ia.lang.round(a)}, ${Ia.lang.round(f)}%, ${Ia.lang.round(g)}%)`}},UW=VW,GW={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:i=>{i=i.toLowerCase();const a=GW.colors[i];if(a)return EF.parse(a)},stringify:i=>{const a=EF.stringify(i);for(const f in GW.colors)if(GW.colors[f]===a)return f}},FPt=GW,BPt={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:i=>{const a=i.charCodeAt(0);if(a!==114&&a!==82)return;const f=i.match(BPt.re);if(!f)return;const[,g,w,v,b,E,S,_,M]=f;return HW.set({r:Ia.channel.clamp.r(w?parseFloat(g)*2.55:parseFloat(g)),g:Ia.channel.clamp.g(b?parseFloat(v)*2.55:parseFloat(v)),b:Ia.channel.clamp.b(S?parseFloat(E)*2.55:parseFloat(E)),a:_?Ia.channel.clamp.a(M?parseFloat(_)/100:parseFloat(_)):1},i)},stringify:i=>{const{r:a,g:f,b:g,a:w}=i;return w<1?`rgba(${Ia.lang.round(a)}, ${Ia.lang.round(f)}, ${Ia.lang.round(g)}, ${Ia.lang.round(w)})`:`rgb(${Ia.lang.round(a)}, ${Ia.lang.round(f)}, ${Ia.lang.round(g)})`}},KW=BPt,Vv={format:{keyword:FPt,hex:EF,rgb:KW,rgba:KW,hsl:UW,hsla:UW},parse:i=>{if(typeof i!="string")return i;const a=EF.parse(i)||KW.parse(i)||UW.parse(i)||FPt.parse(i);if(a)return a;throw new Error(`Unsupported color format: "${i}"`)},stringify:i=>!i.changed&&i.color?i.color:i.type.is(ig.HSL)||i.data.r===void 0?UW.stringify(i):i.a<1||!Number.isInteger(i.r)||!Number.isInteger(i.g)||!Number.isInteger(i.b)?KW.stringify(i):EF.stringify(i)},RPt=(i,a)=>{const f=Vv.parse(i);for(const g in a)f[g]=Ia.channel.clamp[g](a[g]);return Vv.stringify(f)},g9=(i,a,f=0,g=1)=>{if(typeof i!="number")return RPt(i,{a});const w=HW.set({r:Ia.channel.clamp.r(i),g:Ia.channel.clamp.g(a),b:Ia.channel.clamp.b(f),a:Ia.channel.clamp.a(g)});return Vv.stringify(w)},jPt=(i,a)=>Ia.lang.round(Vv.parse(i)[a]),bMe=i=>{const{r:a,g:f,b:g}=Vv.parse(i),w=.2126*Ia.channel.toLinear(a)+.7152*Ia.channel.toLinear(f)+.0722*Ia.channel.toLinear(g);return Ia.lang.round(w)},wMe=i=>bMe(i)>=.5,p9=i=>!wMe(i),$Pt=(i,a,f)=>{const g=Vv.parse(i),w=g[a],v=Ia.channel.clamp[a](w+f);return w!==v&&(g[a]=v),Vv.stringify(g)},Is=(i,a)=>$Pt(i,"l",a),Js=(i,a)=>$Pt(i,"l",-a),Cn=(i,a)=>{const f=Vv.parse(i),g={};for(const w in a)a[w]&&(g[w]=f[w]+a[w]);return RPt(i,g)},mMe=(i,a,f=50)=>{const{r:g,g:w,b:v,a:b}=Vv.parse(i),{r:E,g:S,b:_,a:M}=Vv.parse(a),F=f/100,R=F*2-1,B=b-M,Y=((R*B===-1?R:(R+B)/(1+R*B))+1)/2,nt=1-Y,ot=g*Y+E*nt,ft=w*Y+S*nt,wt=v*Y+_*nt,mt=b*F+M*(1-F);return g9(ot,ft,wt,mt)},Ii=(i,a=100)=>{const f=Vv.parse(i);return f.r=255-f.r,f.g=255-f.g,f.b=255-f.b,mMe(f,i,a)},Yg=(i,a)=>a?Cn(i,{s:-40,l:10}):Cn(i,{s:-40,l:-10}),WW="#ffffff",YW="#f2f2f2";let vMe=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var f,g,w,v,b,E,S,_,M,F,R;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||Cn(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Cn(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Yg(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Yg(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Yg(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Yg(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Ii(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ii(this.tertiaryColor),this.lineColor=this.lineColor||Ii(this.background),this.arrowheadColor=this.arrowheadColor||Ii(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?Js(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Js(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Ii(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||Is(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||Cn(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Cn(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Cn(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Cn(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Cn(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Cn(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||Cn(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Cn(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Cn(this.primaryColor,{h:330}),this.darkMode)for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=Js(this["cScale"+B],75);else for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScale"+B]=Js(this["cScale"+B],25);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleInv"+B]=this["cScaleInv"+B]||Ii(this["cScale"+B]);for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this.darkMode?this["cScalePeer"+B]=this["cScalePeer"+B]||Is(this["cScale"+B],10):this["cScalePeer"+B]=this["cScalePeer"+B]||Js(this["cScale"+B],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let B=0;B<this.THEME_COLOR_LIMIT;B++)this["cScaleLabel"+B]=this["cScaleLabel"+B]||this.scaleLabelColor;const a=this.darkMode?-4:-1;for(let B=0;B<5;B++)this["surface"+B]=this["surface"+B]||Cn(this.mainBkg,{h:180,s:-15,l:a*(5+B*3)}),this["surfacePeer"+B]=this["surfacePeer"+B]||Cn(this.mainBkg,{h:180,s:-15,l:a*(8+B*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Cn(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Cn(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Cn(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Cn(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Cn(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Cn(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Cn(this.primaryColor,{l:-10}),this.pie5=this.pie5||Cn(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Cn(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Cn(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Cn(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Cn(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Cn(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Cn(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Cn(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Cn(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Cn(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Cn(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Cn(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Cn(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Cn(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||p9(this.quadrant1Fill)?Is(this.quadrant1Fill):Js(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((f=this.xyChart)==null?void 0:f.backgroundColor)||this.background,titleColor:((g=this.xyChart)==null?void 0:g.titleColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((v=this.xyChart)==null?void 0:v.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((b=this.xyChart)==null?void 0:b.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((E=this.xyChart)==null?void 0:E.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((S=this.xyChart)==null?void 0:S.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((_=this.xyChart)==null?void 0:_.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((M=this.xyChart)==null?void 0:M.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((F=this.xyChart)==null?void 0:F.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((R=this.xyChart)==null?void 0:R.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Js(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Cn(this.primaryColor,{h:-30}),this.git4=this.git4||Cn(this.primaryColor,{h:-60}),this.git5=this.git5||Cn(this.primaryColor,{h:-90}),this.git6=this.git6||Cn(this.primaryColor,{h:60}),this.git7=this.git7||Cn(this.primaryColor,{h:120}),this.darkMode?(this.git0=Is(this.git0,25),this.git1=Is(this.git1,25),this.git2=Is(this.git2,25),this.git3=Is(this.git3,25),this.git4=Is(this.git4,25),this.git5=Is(this.git5,25),this.git6=Is(this.git6,25),this.git7=Is(this.git7,25)):(this.git0=Js(this.git0,25),this.git1=Js(this.git1,25),this.git2=Js(this.git2,25),this.git3=Js(this.git3,25),this.git4=Js(this.git4,25),this.git5=Js(this.git5,25),this.git6=Js(this.git6,25),this.git7=Js(this.git7,25)),this.gitInv0=this.gitInv0||Ii(this.git0),this.gitInv1=this.gitInv1||Ii(this.git1),this.gitInv2=this.gitInv2||Ii(this.git2),this.gitInv3=this.gitInv3||Ii(this.git3),this.gitInv4=this.gitInv4||Ii(this.git4),this.gitInv5=this.gitInv5||Ii(this.git5),this.gitInv6=this.gitInv6||Ii(this.git6),this.gitInv7=this.gitInv7||Ii(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||WW,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||YW}calculate(a){if(typeof a!="object"){this.updateColors();return}const f=Object.keys(a);f.forEach(g=>{this[g]=a[g]}),this.updateColors(),f.forEach(g=>{this[g]=a[g]})}};const yMe=i=>{const a=new vMe;return a.calculate(i),a};let xMe=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Is(this.primaryColor,16),this.tertiaryColor=Cn(this.primaryColor,{h:-160}),this.primaryBorderColor=Ii(this.background),this.secondaryBorderColor=Yg(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yg(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ii(this.primaryColor),this.secondaryTextColor=Ii(this.secondaryColor),this.tertiaryTextColor=Ii(this.tertiaryColor),this.lineColor=Ii(this.background),this.textColor=Ii(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Is(Ii("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=g9(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=Js("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Js(this.sectionBkgColor,10),this.taskBorderColor=g9(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=g9(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var a,f,g,w,v,b,E,S,_,M,F;this.secondBkg=Is(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=Is(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Is(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=Cn(this.primaryColor,{h:64}),this.fillType3=Cn(this.secondaryColor,{h:64}),this.fillType4=Cn(this.primaryColor,{h:-64}),this.fillType5=Cn(this.secondaryColor,{h:-64}),this.fillType6=Cn(this.primaryColor,{h:128}),this.fillType7=Cn(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||Cn(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Cn(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Cn(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Cn(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Cn(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Cn(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Cn(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Cn(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Cn(this.primaryColor,{h:330});for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||Ii(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScalePeer"+R]=this["cScalePeer"+R]||Is(this["cScale"+R],10);for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||Cn(this.mainBkg,{h:30,s:-30,l:-(-10+R*4)}),this["surfacePeer"+R]=this["surfacePeer"+R]||Cn(this.mainBkg,{h:30,s:-30,l:-(-7+R*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["pie"+R]=this["cScale"+R];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Cn(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Cn(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Cn(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Cn(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Cn(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Cn(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||p9(this.quadrant1Fill)?Is(this.quadrant1Fill):Js(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((v=this.xyChart)==null?void 0:v.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((S=this.xyChart)==null?void 0:S.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Js(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Is(this.secondaryColor,20),this.git1=Is(this.pie2||this.secondaryColor,20),this.git2=Is(this.pie3||this.tertiaryColor,20),this.git3=Is(this.pie4||Cn(this.primaryColor,{h:-30}),20),this.git4=Is(this.pie5||Cn(this.primaryColor,{h:-60}),20),this.git5=Is(this.pie6||Cn(this.primaryColor,{h:-90}),10),this.git6=Is(this.pie7||Cn(this.primaryColor,{h:60}),10),this.git7=Is(this.pie8||Cn(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Ii(this.git0),this.gitInv1=this.gitInv1||Ii(this.git1),this.gitInv2=this.gitInv2||Ii(this.git2),this.gitInv3=this.gitInv3||Ii(this.git3),this.gitInv4=this.gitInv4||Ii(this.git4),this.gitInv5=this.gitInv5||Ii(this.git5),this.gitInv6=this.gitInv6||Ii(this.git6),this.gitInv7=this.gitInv7||Ii(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Ii(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Ii(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Is(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Is(this.background,2)}calculate(a){if(typeof a!="object"){this.updateColors();return}const f=Object.keys(a);f.forEach(g=>{this[g]=a[g]}),this.updateColors(),f.forEach(g=>{this[g]=a[g]})}};const kMe=i=>{const a=new xMe;return a.calculate(i),a};let EMe=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Cn(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Cn(this.primaryColor,{h:-160}),this.primaryBorderColor=Yg(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yg(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yg(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ii(this.primaryColor),this.secondaryTextColor=Ii(this.secondaryColor),this.tertiaryTextColor=Ii(this.tertiaryColor),this.lineColor=Ii(this.background),this.textColor=Ii(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=g9(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var a,f,g,w,v,b,E,S,_,M,F;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Cn(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Cn(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Cn(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Cn(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Cn(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Cn(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Cn(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Cn(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Cn(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||Js(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||Js(this.tertiaryColor,40);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=Js(this["cScale"+R],10),this["cScalePeer"+R]=this["cScalePeer"+R]||Js(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||Cn(this["cScale"+R],{h:180});for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||Cn(this.mainBkg,{h:30,l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||Cn(this.mainBkg,{h:30,l:-(7+R*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Ii(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Ii(this.labelTextColor);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Is(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Cn(this.primaryColor,{h:64}),this.fillType3=Cn(this.secondaryColor,{h:64}),this.fillType4=Cn(this.primaryColor,{h:-64}),this.fillType5=Cn(this.secondaryColor,{h:-64}),this.fillType6=Cn(this.primaryColor,{h:128}),this.fillType7=Cn(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Cn(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Cn(this.primaryColor,{l:-10}),this.pie5=this.pie5||Cn(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Cn(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Cn(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Cn(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Cn(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Cn(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Cn(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Cn(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Cn(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Cn(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Cn(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Cn(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Cn(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Cn(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||p9(this.quadrant1Fill)?Is(this.quadrant1Fill):Js(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((v=this.xyChart)==null?void 0:v.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((S=this.xyChart)==null?void 0:S.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Cn(this.primaryColor,{h:-30}),this.git4=this.git4||Cn(this.primaryColor,{h:-60}),this.git5=this.git5||Cn(this.primaryColor,{h:-90}),this.git6=this.git6||Cn(this.primaryColor,{h:60}),this.git7=this.git7||Cn(this.primaryColor,{h:120}),this.darkMode?(this.git0=Is(this.git0,25),this.git1=Is(this.git1,25),this.git2=Is(this.git2,25),this.git3=Is(this.git3,25),this.git4=Is(this.git4,25),this.git5=Is(this.git5,25),this.git6=Is(this.git6,25),this.git7=Is(this.git7,25)):(this.git0=Js(this.git0,25),this.git1=Js(this.git1,25),this.git2=Js(this.git2,25),this.git3=Js(this.git3,25),this.git4=Js(this.git4,25),this.git5=Js(this.git5,25),this.git6=Js(this.git6,25),this.git7=Js(this.git7,25)),this.gitInv0=this.gitInv0||Js(Ii(this.git0),25),this.gitInv1=this.gitInv1||Ii(this.git1),this.gitInv2=this.gitInv2||Ii(this.git2),this.gitInv3=this.gitInv3||Ii(this.git3),this.gitInv4=this.gitInv4||Ii(this.git4),this.gitInv5=this.gitInv5||Ii(this.git5),this.gitInv6=this.gitInv6||Ii(this.git6),this.gitInv7=this.gitInv7||Ii(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Ii(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Ii(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||WW,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||YW}calculate(a){if(typeof a!="object"){this.updateColors();return}const f=Object.keys(a);f.forEach(g=>{this[g]=a[g]}),this.updateColors(),f.forEach(g=>{this[g]=a[g]})}};const dgt=i=>{const a=new EMe;return a.calculate(i),a};let TMe=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Is("#cde498",10),this.primaryBorderColor=Yg(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yg(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yg(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ii(this.primaryColor),this.secondaryTextColor=Ii(this.secondaryColor),this.tertiaryTextColor=Ii(this.primaryColor),this.lineColor=Ii(this.background),this.textColor=Ii(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var a,f,g,w,v,b,E,S,_,M,F;this.actorBorder=Js(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||Cn(this.primaryColor,{h:30}),this.cScale4=this.cScale4||Cn(this.primaryColor,{h:60}),this.cScale5=this.cScale5||Cn(this.primaryColor,{h:90}),this.cScale6=this.cScale6||Cn(this.primaryColor,{h:120}),this.cScale7=this.cScale7||Cn(this.primaryColor,{h:150}),this.cScale8=this.cScale8||Cn(this.primaryColor,{h:210}),this.cScale9=this.cScale9||Cn(this.primaryColor,{h:270}),this.cScale10=this.cScale10||Cn(this.primaryColor,{h:300}),this.cScale11=this.cScale11||Cn(this.primaryColor,{h:330}),this["cScalePeer1"]=this["cScalePeer1"]||Js(this.secondaryColor,45),this["cScalePeer2"]=this["cScalePeer2"]||Js(this.tertiaryColor,40);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScale"+R]=Js(this["cScale"+R],10),this["cScalePeer"+R]=this["cScalePeer"+R]||Js(this["cScale"+R],25);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||Cn(this["cScale"+R],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||Cn(this.mainBkg,{h:30,s:-30,l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||Cn(this.mainBkg,{h:30,s:-30,l:-(8+R*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Cn(this.primaryColor,{h:64}),this.fillType3=Cn(this.secondaryColor,{h:64}),this.fillType4=Cn(this.primaryColor,{h:-64}),this.fillType5=Cn(this.secondaryColor,{h:-64}),this.fillType6=Cn(this.primaryColor,{h:128}),this.fillType7=Cn(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Cn(this.primaryColor,{l:-30}),this.pie5=this.pie5||Cn(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Cn(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Cn(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Cn(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Cn(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Cn(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Cn(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Cn(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Cn(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Cn(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Cn(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Cn(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Cn(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Cn(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||p9(this.quadrant1Fill)?Is(this.quadrant1Fill):Js(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((v=this.xyChart)==null?void 0:v.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((S=this.xyChart)==null?void 0:S.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||Cn(this.primaryColor,{h:-30}),this.git4=this.git4||Cn(this.primaryColor,{h:-60}),this.git5=this.git5||Cn(this.primaryColor,{h:-90}),this.git6=this.git6||Cn(this.primaryColor,{h:60}),this.git7=this.git7||Cn(this.primaryColor,{h:120}),this.darkMode?(this.git0=Is(this.git0,25),this.git1=Is(this.git1,25),this.git2=Is(this.git2,25),this.git3=Is(this.git3,25),this.git4=Is(this.git4,25),this.git5=Is(this.git5,25),this.git6=Is(this.git6,25),this.git7=Is(this.git7,25)):(this.git0=Js(this.git0,25),this.git1=Js(this.git1,25),this.git2=Js(this.git2,25),this.git3=Js(this.git3,25),this.git4=Js(this.git4,25),this.git5=Js(this.git5,25),this.git6=Js(this.git6,25),this.git7=Js(this.git7,25)),this.gitInv0=this.gitInv0||Ii(this.git0),this.gitInv1=this.gitInv1||Ii(this.git1),this.gitInv2=this.gitInv2||Ii(this.git2),this.gitInv3=this.gitInv3||Ii(this.git3),this.gitInv4=this.gitInv4||Ii(this.git4),this.gitInv5=this.gitInv5||Ii(this.git5),this.gitInv6=this.gitInv6||Ii(this.git6),this.gitInv7=this.gitInv7||Ii(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Ii(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Ii(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||WW,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||YW}calculate(a){if(typeof a!="object"){this.updateColors();return}const f=Object.keys(a);f.forEach(g=>{this[g]=a[g]}),this.updateColors(),f.forEach(g=>{this[g]=a[g]})}};const CMe=i=>{const a=new TMe;return a.calculate(i),a};class SMe{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Is(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Cn(this.primaryColor,{h:-160}),this.primaryBorderColor=Yg(this.primaryColor,this.darkMode),this.secondaryBorderColor=Yg(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Yg(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ii(this.primaryColor),this.secondaryTextColor=Ii(this.secondaryColor),this.tertiaryTextColor=Ii(this.tertiaryColor),this.lineColor=Ii(this.background),this.textColor=Ii(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var a,f,g,w,v,b,E,S,_,M,F;this.secondBkg=Is(this.contrast,55),this.border2=this.contrast,this.actorBorder=Is(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleInv"+R]=this["cScaleInv"+R]||Ii(this["cScale"+R]);for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this.darkMode?this["cScalePeer"+R]=this["cScalePeer"+R]||Is(this["cScale"+R],10):this["cScalePeer"+R]=this["cScalePeer"+R]||Js(this["cScale"+R],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["cScaleLabel"+R]=this["cScaleLabel"+R]||this.scaleLabelColor;for(let R=0;R<5;R++)this["surface"+R]=this["surface"+R]||Cn(this.mainBkg,{l:-(5+R*5)}),this["surfacePeer"+R]=this["surfacePeer"+R]||Cn(this.mainBkg,{l:-(8+R*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=Is(this.contrast,30),this.sectionBkgColor2=Is(this.contrast,30),this.taskBorderColor=Js(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Is(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Js(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Cn(this.primaryColor,{h:64}),this.fillType3=Cn(this.secondaryColor,{h:64}),this.fillType4=Cn(this.primaryColor,{h:-64}),this.fillType5=Cn(this.secondaryColor,{h:-64}),this.fillType6=Cn(this.primaryColor,{h:128}),this.fillType7=Cn(this.secondaryColor,{h:128});for(let R=0;R<this.THEME_COLOR_LIMIT;R++)this["pie"+R]=this["cScale"+R];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||Cn(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||Cn(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||Cn(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||Cn(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||Cn(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||Cn(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||p9(this.quadrant1Fill)?Is(this.quadrant1Fill):Js(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((g=this.xyChart)==null?void 0:g.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((w=this.xyChart)==null?void 0:w.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((v=this.xyChart)==null?void 0:v.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((S=this.xyChart)==null?void 0:S.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((_=this.xyChart)==null?void 0:_.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((M=this.xyChart)==null?void 0:M.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((F=this.xyChart)==null?void 0:F.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Js(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||Cn(this.primaryColor,{h:-30}),this.git4=this.pie5||Cn(this.primaryColor,{h:-60}),this.git5=this.pie6||Cn(this.primaryColor,{h:-90}),this.git6=this.pie7||Cn(this.primaryColor,{h:60}),this.git7=this.pie8||Cn(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Ii(this.git0),this.gitInv1=this.gitInv1||Ii(this.git1),this.gitInv2=this.gitInv2||Ii(this.git2),this.gitInv3=this.gitInv3||Ii(this.git3),this.gitInv4=this.gitInv4||Ii(this.git4),this.gitInv5=this.gitInv5||Ii(this.git5),this.gitInv6=this.gitInv6||Ii(this.git6),this.gitInv7=this.gitInv7||Ii(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||WW,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||YW}calculate(a){if(typeof a!="object"){this.updateColors();return}const f=Object.keys(a);f.forEach(g=>{this[g]=a[g]}),this.updateColors(),f.forEach(g=>{this[g]=a[g]})}}const Lx={base:{getThemeVariables:yMe},dark:{getThemeVariables:kMe},default:{getThemeVariables:dgt},forest:{getThemeVariables:CMe},neutral:{getThemeVariables:i=>{const a=new SMe;return a.calculate(i),a}}},Dx={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},theme:"default",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","maxEdges"],deterministicIds:!1,fontSize:16},zPt={...Dx,deterministicIDSeed:void 0,themeCSS:void 0,themeVariables:Lx.default.getThemeVariables(),sequence:{...Dx.sequence,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{...Dx.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Dx.c4,useWidth:void 0,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}}},pie:{...Dx.pie,useWidth:984},xyChart:{...Dx.xyChart,useWidth:void 0},requirement:{...Dx.requirement,useWidth:void 0},gitGraph:{...Dx.gitGraph,useMaxWidth:!1},sankey:{...Dx.sankey,useMaxWidth:!1}},qPt=(i,a="")=>Object.keys(i).reduce((f,g)=>Array.isArray(i[g])?f:typeof i[g]=="object"&&i[g]!==null?[...f,a+g,...qPt(i[g],"")]:[...f,a+g],[]),_Me=new Set(qPt(zPt,"")),Bl=zPt,XW=i=>{if(Kt.debug("sanitizeDirective called with",i),!(typeof i!="object"||i==null)){if(Array.isArray(i)){i.forEach(a=>XW(a));return}for(const a of Object.keys(i)){if(Kt.debug("Checking key",a),a.startsWith("__")||a.includes("proto")||a.includes("constr")||!_Me.has(a)||i[a]==null){Kt.debug("sanitize deleting key: ",a),delete i[a];continue}if(typeof i[a]=="object"){Kt.debug("sanitizing object",a),XW(i[a]);continue}const f=["themeCSS","fontFamily","altFontFamily"];for(const g of f)a.includes(g)&&(Kt.debug("sanitizing css option",a),i[a]=AMe(i[a]))}if(i.themeVariables)for(const a of Object.keys(i.themeVariables)){const f=i.themeVariables[a];f!=null&&f.match&&!f.match(/^[\d "#%(),.;A-Za-z]+$/)&&(i.themeVariables[a]="")}Kt.debug("After sanitization",i)}},AMe=i=>{let a=0,f=0;for(const g of i){if(a<f)return"{ /* ERROR: Unbalanced CSS */ }";g==="{"?a++:g==="}"&&f++}return a!==f?"{ /* ERROR: Unbalanced CSS */ }":i},HPt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,TF=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,LMe=/\s*%%.*\n/gm;class VPt extends Error{constructor(a){super(a),this.name="UnknownDiagramError"}}const JL={},QW=function(i,a){i=i.replace(HPt,"").replace(TF,"").replace(LMe,`
108 `),b.style===void 0&&(M.style=M.style||"stroke: #333; stroke-width: 1.5px;fill:none"),M.labelStyle=M.labelStyle.replace("color:","fill:"))),M.id=E,M.class=S+" "+_,M.minlen=b.length||1,a.setEdge(f.db.lookUpDomId(b.start),f.db.lookUpDomId(b.end),M,g)})},wUe={setConf:bUe,addVertices:v$t,addEdges:y$t,getClasses:function(i,a){return Kt.info("Extracting classes"),a.db.getClasses()},draw:function(i,a,f,g){Kt.info("Drawing flowchart");const{securityLevel:w,flowchart:v}=Re();let b;w==="sandbox"&&(b=Tr("#i"+a));const E=Tr(w==="sandbox"?b.nodes()[0].contentDocument.body:"body"),S=w==="sandbox"?b.nodes()[0].contentDocument:document;let _=g.db.getDirection();_===void 0&&(_="TD");const M=v.nodeSpacing||50,F=v.rankSpacing||50,R=new l1({multigraph:!0,compound:!0}).setGraph({rankdir:_,nodesep:M,ranksep:F,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let B;const z=g.db.getSubGraphs();for(let rt=z.length-1;rt>=0;rt--)B=z[rt],g.db.addVertex(B.id,B.title,"group",void 0,B.classes);const Y=g.db.getVertices();Kt.warn("Get vertices",Y);const nt=g.db.getEdges();let ot=0;for(ot=z.length-1;ot>=0;ot--){B=z[ot],$Ot("cluster").append("text");for(let rt=0;rt<B.nodes.length;rt++)Kt.warn("Setting subgraph",B.nodes[rt],g.db.lookUpDomId(B.nodes[rt]),g.db.lookUpDomId(B.id)),R.setParent(g.db.lookUpDomId(B.nodes[rt]),g.db.lookUpDomId(B.id))}v$t(Y,R,a,E,S,g),y$t(nt,R,g);const ft=new cUe;pUe.addToRender(ft),ft.arrows().none=function(it,gt,Q,dt){const yt=it.append("marker").attr("id",gt).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");a4(yt,Q[dt+"Style"])},ft.arrows().normal=function(it,gt){it.append("marker").attr("id",gt).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const wt=E.select(`[id="${a}"]`),mt=E.select("#"+a+" g");for(ft(mt,R),mt.selectAll("g.node").attr("title",function(){return g.db.getTooltip(this.id)}),g.db.indexNodes("subGraph"+ot),ot=0;ot<z.length;ot++)if(B=z[ot],B.title!=="undefined"){const rt=S.querySelectorAll("#"+a+' [id="'+g.db.lookUpDomId(B.id)+'"] rect'),it=S.querySelectorAll("#"+a+' [id="'+g.db.lookUpDomId(B.id)+'"]'),gt=rt[0].x.baseVal.value,Q=rt[0].y.baseVal.value,dt=rt[0].width.baseVal.value,yt=Tr(it[0]).select(".label");yt.attr("transform",`translate(${gt+dt/2}, ${Q+14})`),yt.attr("id",a+"Text");for(let V=0;V<B.classes.length;V++)it[0].classList.add(B.classes[V])}if(!v.htmlLabels){const rt=S.querySelectorAll('[id="'+a+'"] .edgeLabel .label');for(const it of rt){const gt=it.getBBox(),Q=S.createElementNS("http://www.w3.org/2000/svg","rect");Q.setAttribute("rx",0),Q.setAttribute("ry",0),Q.setAttribute("width",gt.width),Q.setAttribute("height",gt.height),it.insertBefore(Q,it.firstChild)}}w8(R,wt,v.diagramPadding,v.useMaxWidth),Object.keys(Y).forEach(function(rt){const it=Y[rt];if(it.link){const gt=E.select("#"+a+' [id="'+g.db.lookUpDomId(rt)+'"]');if(gt){const Q=S.createElementNS("http://www.w3.org/2000/svg","a");Q.setAttributeNS("http://www.w3.org/2000/svg","class",it.classes.join(" ")),Q.setAttributeNS("http://www.w3.org/2000/svg","href",it.link),Q.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),w==="sandbox"?Q.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):it.linkTarget&&Q.setAttributeNS("http://www.w3.org/2000/svg","target",it.linkTarget);const dt=gt.insert(function(){return Q},":first-child"),K=gt.select(".label-container");K&&dt.append(function(){return K.node()});const yt=gt.select(".label");yt&&dt.append(function(){return yt.node()})}}})}};function jx(i){var a={options:{directed:i.isDirected(),multigraph:i.isMultigraph(),compound:i.isCompound()},nodes:mUe(i),edges:vUe(i)};return Tf(i.graph())||(a.value=fjt(i.graph())),a}function mUe(i){return u1(i.nodes(),function(a){var f=i.node(a),g=i.parent(a),w={v:a};return Tf(f)||(w.value=f),Tf(g)||(w.parent=g),w})}function vUe(i){return u1(i.edges(),function(a){var f=i.edge(a),g={v:a.v,w:a.w};return Tf(a.name)||(g.name=a.name),Tf(f)||(g.value=f),g})}const yUe=(i,a,f,g)=>{a.forEach(w=>{xUe[w](i,f,g)})},xUe={extension:(i,a,f)=>{Kt.trace("Making markers for ",f),i.append("defs").append("marker").attr("id",f+"_"+a+"-extensionStart").attr("class","marker extension "+a).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"),i.append("defs").append("marker").attr("id",f+"_"+a+"-extensionEnd").attr("class","marker extension "+a).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")},composition:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-compositionStart").attr("class","marker composition "+a).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"),i.append("defs").append("marker").attr("id",f+"_"+a+"-compositionEnd").attr("class","marker composition "+a).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:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-aggregationStart").attr("class","marker aggregation "+a).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"),i.append("defs").append("marker").attr("id",f+"_"+a+"-aggregationEnd").attr("class","marker aggregation "+a).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")},dependency:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-dependencyStart").attr("class","marker dependency "+a).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"),i.append("defs").append("marker").attr("id",f+"_"+a+"-dependencyEnd").attr("class","marker dependency "+a).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")},lollipop:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-lollipopStart").attr("class","marker lollipop "+a).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),i.append("defs").append("marker").attr("id",f+"_"+a+"-lollipopEnd").attr("class","marker lollipop "+a).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)},point:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-pointEnd").attr("class","marker "+a).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"),i.append("marker").attr("id",f+"_"+a+"-pointStart").attr("class","marker "+a).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")},circle:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-circleEnd").attr("class","marker "+a).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"),i.append("marker").attr("id",f+"_"+a+"-circleStart").attr("class","marker "+a).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")},cross:(i,a,f)=>{i.append("marker").attr("id",f+"_"+a+"-crossEnd").attr("class","marker cross "+a).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"),i.append("marker").attr("id",f+"_"+a+"-crossStart").attr("class","marker cross "+a).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")},barb:(i,a,f)=>{i.append("defs").append("marker").attr("id",f+"_"+a+"-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")}},jpt=yUe;function kUe(i,a){a&&i.attr("style",a)}function EUe(i){const a=Tr(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),f=a.append("xhtml:div"),g=i.label,w=i.isNode?"nodeLabel":"edgeLabel";return f.html('<span class="'+w+'" '+(i.labelStyle?'style="'+i.labelStyle+'"':"")+">"+g+"</span>"),kUe(f,i.labelStyle),f.style("display","inline-block"),f.style("white-space","nowrap"),f.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}const ab=(i,a,f,g)=>{let w=i||"";if(typeof w=="object"&&(w=w[0]),j1(Re().flowchart.htmlLabels)){w=w.replace(/\\n|\n/g,"<br />"),Kt.debug("vertexText"+w);const v={isNode:g,label:IF(w).replace(/fa[blrs]?:fa-[\w-]+/g,E=>`<i class='${E.replace(":"," ")}'></i>`),labelStyle:a.replace("fill:","color:")};return EUe(v)}else{const v=document.createElementNS("http://www.w3.org/2000/svg","text");v.setAttribute("style",a.replace("color:","fill:"));let b=[];typeof w=="string"?b=w.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(w)?b=w:b=[];for(const E of b){const S=document.createElementNS("http://www.w3.org/2000/svg","tspan");S.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),S.setAttribute("dy","1em"),S.setAttribute("x","0"),f?S.setAttribute("class","title-row"):S.setAttribute("class","row"),S.textContent=E.trim(),v.appendChild(S)}return v}},TUe={};function CUe(i,a){const f=a||TUe,g=typeof f.includeImageAlt=="boolean"?f.includeImageAlt:!0,w=typeof f.includeHtml=="boolean"?f.includeHtml:!0;return x$t(i,g,w)}function x$t(i,a,f){if(SUe(i)){if("value"in i)return i.type==="html"&&!f?"":i.value;if(a&&"alt"in i&&i.alt)return i.alt;if("children"in i)return k$t(i.children,a,f)}return Array.isArray(i)?k$t(i,a,f):""}function k$t(i,a,f){const g=[];let w=-1;for(;++w<i.length;)g[w]=x$t(i[w],a,f);return g.join("")}function SUe(i){return!!(i&&typeof i=="object")}function c4(i,a,f,g){const w=i.length;let v=0,b;if(a<0?a=-a>w?0:w+a:a=a>w?w:a,f=f>0?f:0,g.length<1e4)b=Array.from(g),b.unshift(a,f),i.splice(...b);else for(f&&i.splice(a,f);v<g.length;)b=g.slice(v,v+1e4),b.unshift(a,0),i.splice(...b),v+=1e4,a+=1e4}function tm(i,a){return i.length>0?(c4(i,i.length,0,a),i):a}const E$t={}.hasOwnProperty;function _Ue(i){const a={};let f=-1;for(;++f<i.length;)AUe(a,i[f]);return a}function AUe(i,a){let f;for(f in a){const w=(E$t.call(i,f)?i[f]:void 0)||(i[f]={}),v=a[f];let b;if(v)for(b in v){E$t.call(w,b)||(w[b]=[]);const E=v[b];LUe(w[b],Array.isArray(E)?E:E?[E]:[])}}}function LUe(i,a){let f=-1;const g=[];for(;++f<a.length;)(a[f].add==="after"?i:g).push(a[f]);c4(i,0,0,g)}const DUe=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,u4=E8(/[A-Za-z]/),Zv=E8(/[\dA-Za-z]/),MUe=E8(/[#-'*+\--9=?A-Z^-~]/);function $pt(i){return i!==null&&(i<32||i===127)}const zpt=E8(/\d/),IUe=E8(/[\dA-Fa-f]/),OUe=E8(/[!-/:-@[-`{-~]/);function $a(i){return i!==null&&i<-2}function ob(i){return i!==null&&(i<0||i===32)}function du(i){return i===-2||i===-1||i===32}const NUe=E8(DUe),PUe=E8(/\s/);function E8(i){return a;function a(f){return f!==null&&i.test(String.fromCharCode(f))}}function Cl(i,a,f,g){const w=g?g-1:Number.POSITIVE_INFINITY;let v=0;return b;function b(S){return du(S)?(i.enter(f),E(S)):a(S)}function E(S){return du(S)&&v++<w?(i.consume(S),E):(i.exit(f),a(S))}}const FUe={tokenize:BUe};function BUe(i){const a=i.attempt(this.parser.constructs.contentInitial,g,w);let f;return a;function g(E){if(E===null){i.consume(E);return}return i.enter("lineEnding"),i.consume(E),i.exit("lineEnding"),Cl(i,a,"linePrefix")}function w(E){return i.enter("paragraph"),v(E)}function v(E){const S=i.enter("chunkText",{contentType:"text",previous:f});return f&&(f.next=S),f=S,b(E)}function b(E){if(E===null){i.exit("chunkText"),i.exit("paragraph"),i.consume(E);return}return $a(E)?(i.consume(E),i.exit("chunkText"),v):(i.consume(E),b)}}const RUe={tokenize:jUe},T$t={tokenize:$Ue};function jUe(i){const a=this,f=[];let g=0,w,v,b;return E;function E(wt){if(g<f.length){const mt=f[g];return a.containerState=mt[1],i.attempt(mt[0].continuation,S,_)(wt)}return _(wt)}function S(wt){if(g++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,w&&ft();const mt=a.events.length;let ct=mt,rt;for(;ct--;)if(a.events[ct][0]==="exit"&&a.events[ct][1].type==="chunkFlow"){rt=a.events[ct][1].end;break}ot(g);let it=mt;for(;it<a.events.length;)a.events[it][1].end=Object.assign({},rt),it++;return c4(a.events,ct+1,0,a.events.slice(mt)),a.events.length=it,_(wt)}return E(wt)}function _(wt){if(g===f.length){if(!w)return R(wt);if(w.currentConstruct&&w.currentConstruct.concrete)return z(wt);a.interrupt=!!(w.currentConstruct&&!w._gfmTableDynamicInterruptHack)}return a.containerState={},i.check(T$t,M,F)(wt)}function M(wt){return w&&ft(),ot(g),R(wt)}function F(wt){return a.parser.lazy[a.now().line]=g!==f.length,b=a.now().offset,z(wt)}function R(wt){return a.containerState={},i.attempt(T$t,B,z)(wt)}function B(wt){return g++,f.push([a.currentConstruct,a.containerState]),R(wt)}function z(wt){if(wt===null){w&&ft(),ot(0),i.consume(wt);return}return w=w||a.parser.flow(a.now()),i.enter("chunkFlow",{contentType:"flow",previous:v,_tokenizer:w}),Y(wt)}function Y(wt){if(wt===null){nt(i.exit("chunkFlow"),!0),ot(0),i.consume(wt);return}return $a(wt)?(i.consume(wt),nt(i.exit("chunkFlow")),g=0,a.interrupt=void 0,E):(i.consume(wt),Y)}function nt(wt,mt){const ct=a.sliceStream(wt);if(mt&&ct.push(null),wt.previous=v,v&&(v.next=wt),v=wt,w.defineSkip(wt.start),w.write(ct),a.parser.lazy[wt.start.line]){let rt=w.events.length;for(;rt--;)if(w.events[rt][1].start.offset<b&&(!w.events[rt][1].end||w.events[rt][1].end.offset>b))return;const it=a.events.length;let gt=it,Q,dt;for(;gt--;)if(a.events[gt][0]==="exit"&&a.events[gt][1].type==="chunkFlow"){if(Q){dt=a.events[gt][1].end;break}Q=!0}for(ot(g),rt=it;rt<a.events.length;)a.events[rt][1].end=Object.assign({},dt),rt++;c4(a.events,gt+1,0,a.events.slice(it)),a.events.length=rt}}function ot(wt){let mt=f.length;for(;mt-- >wt;){const ct=f[mt];a.containerState=ct[1],ct[0].exit.call(a,i)}f.length=wt}function ft(){w.write([null]),v=void 0,w=void 0,a.containerState._closeFlow=void 0}}function $Ue(i,a,f){return Cl(i,i.attempt(this.parser.constructs.document,a,f),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function C$t(i){if(i===null||ob(i)||PUe(i))return 1;if(NUe(i))return 2}function qpt(i,a,f){const g=[];let w=-1;for(;++w<i.length;){const v=i[w].resolveAll;v&&!g.includes(v)&&(a=v(a,f),g.push(v))}return a}const Hpt={name:"attention",tokenize:qUe,resolveAll:zUe};function zUe(i,a){let f=-1,g,w,v,b,E,S,_,M;for(;++f<i.length;)if(i[f][0]==="enter"&&i[f][1].type==="attentionSequence"&&i[f][1]._close){for(g=f;g--;)if(i[g][0]==="exit"&&i[g][1].type==="attentionSequence"&&i[g][1]._open&&a.sliceSerialize(i[g][1]).charCodeAt(0)===a.sliceSerialize(i[f][1]).charCodeAt(0)){if((i[g][1]._close||i[f][1]._open)&&(i[f][1].end.offset-i[f][1].start.offset)%3&&!((i[g][1].end.offset-i[g][1].start.offset+i[f][1].end.offset-i[f][1].start.offset)%3))continue;S=i[g][1].end.offset-i[g][1].start.offset>1&&i[f][1].end.offset-i[f][1].start.offset>1?2:1;const F=Object.assign({},i[g][1].end),R=Object.assign({},i[f][1].start);S$t(F,-S),S$t(R,S),b={type:S>1?"strongSequence":"emphasisSequence",start:F,end:Object.assign({},i[g][1].end)},E={type:S>1?"strongSequence":"emphasisSequence",start:Object.assign({},i[f][1].start),end:R},v={type:S>1?"strongText":"emphasisText",start:Object.assign({},i[g][1].end),end:Object.assign({},i[f][1].start)},w={type:S>1?"strong":"emphasis",start:Object.assign({},b.start),end:Object.assign({},E.end)},i[g][1].end=Object.assign({},b.start),i[f][1].start=Object.assign({},E.end),_=[],i[g][1].end.offset-i[g][1].start.offset&&(_=tm(_,[["enter",i[g][1],a],["exit",i[g][1],a]])),_=tm(_,[["enter",w,a],["enter",b,a],["exit",b,a],["enter",v,a]]),_=tm(_,qpt(a.parser.constructs.insideSpan.null,i.slice(g+1,f),a)),_=tm(_,[["exit",v,a],["enter",E,a],["exit",E,a],["exit",w,a]]),i[f][1].end.offset-i[f][1].start.offset?(M=2,_=tm(_,[["enter",i[f][1],a],["exit",i[f][1],a]])):M=0,c4(i,g-1,f-g+3,_),f=g+_.length-M-2;break}}for(f=-1;++f<i.length;)i[f][1].type==="attentionSequence"&&(i[f][1].type="data");return i}function qUe(i,a){const f=this.parser.constructs.attentionMarkers.null,g=this.previous,w=C$t(g);let v;return b;function b(S){return v=S,i.enter("attentionSequence"),E(S)}function E(S){if(S===v)return i.consume(S),E;const _=i.exit("attentionSequence"),M=C$t(S),F=!M||M===2&&w||f.includes(S),R=!w||w===2&&M||f.includes(g);return _._open=!!(v===42?F:F&&(w||!R)),_._close=!!(v===42?R:R&&(M||!F)),a(S)}}function S$t(i,a){i.column+=a,i.offset+=a,i._bufferIndex+=a}const HUe={name:"autolink",tokenize:VUe};function VUe(i,a,f){let g=0;return w;function w(B){return i.enter("autolink"),i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.enter("autolinkProtocol"),v}function v(B){return u4(B)?(i.consume(B),b):_(B)}function b(B){return B===43||B===45||B===46||Zv(B)?(g=1,E(B)):_(B)}function E(B){return B===58?(i.consume(B),g=0,S):(B===43||B===45||B===46||Zv(B))&&g++<32?(i.consume(B),E):(g=0,_(B))}function S(B){return B===62?(i.exit("autolinkProtocol"),i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.exit("autolink"),a):B===null||B===32||B===60||$pt(B)?f(B):(i.consume(B),S)}function _(B){return B===64?(i.consume(B),M):MUe(B)?(i.consume(B),_):f(B)}function M(B){return Zv(B)?F(B):f(B)}function F(B){return B===46?(i.consume(B),g=0,M):B===62?(i.exit("autolinkProtocol").type="autolinkEmail",i.enter("autolinkMarker"),i.consume(B),i.exit("autolinkMarker"),i.exit("autolink"),a):R(B)}function R(B){if((B===45||Zv(B))&&g++<63){const z=B===45?R:F;return i.consume(B),z}return f(B)}}const XY={tokenize:UUe,partial:!0};function UUe(i,a,f){return g;function g(v){return du(v)?Cl(i,w,"linePrefix")(v):w(v)}function w(v){return v===null||$a(v)?a(v):f(v)}}const _$t={name:"blockQuote",tokenize:GUe,continuation:{tokenize:KUe},exit:WUe};function GUe(i,a,f){const g=this;return w;function w(b){if(b===62){const E=g.containerState;return E.open||(i.enter("blockQuote",{_container:!0}),E.open=!0),i.enter("blockQuotePrefix"),i.enter("blockQuoteMarker"),i.consume(b),i.exit("blockQuoteMarker"),v}return f(b)}function v(b){return du(b)?(i.enter("blockQuotePrefixWhitespace"),i.consume(b),i.exit("blockQuotePrefixWhitespace"),i.exit("blockQuotePrefix"),a):(i.exit("blockQuotePrefix"),a(b))}}function KUe(i,a,f){const g=this;return w;function w(b){return du(b)?Cl(i,v,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(b):v(b)}function v(b){return i.attempt(_$t,a,f)(b)}}function WUe(i){i.exit("blockQuote")}const A$t={name:"characterEscape",tokenize:YUe};function YUe(i,a,f){return g;function g(v){return i.enter("characterEscape"),i.enter("escapeMarker"),i.consume(v),i.exit("escapeMarker"),w}function w(v){return OUe(v)?(i.enter("characterEscapeValue"),i.consume(v),i.exit("characterEscapeValue"),i.exit("characterEscape"),a):f(v)}}const L$t=document.createElement("i");function Vpt(i){const a="&"+i+";";L$t.innerHTML=a;const f=L$t.textContent;return f.charCodeAt(f.length-1)===59&&i!=="semi"||f===a?!1:f}const D$t={name:"characterReference",tokenize:XUe};function XUe(i,a,f){const g=this;let w=0,v,b;return E;function E(F){return i.enter("characterReference"),i.enter("characterReferenceMarker"),i.consume(F),i.exit("characterReferenceMarker"),S}function S(F){return F===35?(i.enter("characterReferenceMarkerNumeric"),i.consume(F),i.exit("characterReferenceMarkerNumeric"),_):(i.enter("characterReferenceValue"),v=31,b=Zv,M(F))}function _(F){return F===88||F===120?(i.enter("characterReferenceMarkerHexadecimal"),i.consume(F),i.exit("characterReferenceMarkerHexadecimal"),i.enter("characterReferenceValue"),v=6,b=IUe,M):(i.enter("characterReferenceValue"),v=7,b=zpt,M(F))}function M(F){if(F===59&&w){const R=i.exit("characterReferenceValue");return b===Zv&&!Vpt(g.sliceSerialize(R))?f(F):(i.enter("characterReferenceMarker"),i.consume(F),i.exit("characterReferenceMarker"),i.exit("characterReference"),a)}return b(F)&&w++<v?(i.consume(F),M):f(F)}}const M$t={tokenize:JUe,partial:!0},I$t={name:"codeFenced",tokenize:QUe,concrete:!0};function QUe(i,a,f){const g=this,w={tokenize:ct,partial:!0};let v=0,b=0,E;return S;function S(rt){return _(rt)}function _(rt){const it=g.events[g.events.length-1];return v=it&&it[1].type==="linePrefix"?it[2].sliceSerialize(it[1],!0).length:0,E=rt,i.enter("codeFenced"),i.enter("codeFencedFence"),i.enter("codeFencedFenceSequence"),M(rt)}function M(rt){return rt===E?(b++,i.consume(rt),M):b<3?f(rt):(i.exit("codeFencedFenceSequence"),du(rt)?Cl(i,F,"whitespace")(rt):F(rt))}function F(rt){return rt===null||$a(rt)?(i.exit("codeFencedFence"),g.interrupt?a(rt):i.check(M$t,Y,mt)(rt)):(i.enter("codeFencedFenceInfo"),i.enter("chunkString",{contentType:"string"}),R(rt))}function R(rt){return rt===null||$a(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),F(rt)):du(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceInfo"),Cl(i,B,"whitespace")(rt)):rt===96&&rt===E?f(rt):(i.consume(rt),R)}function B(rt){return rt===null||$a(rt)?F(rt):(i.enter("codeFencedFenceMeta"),i.enter("chunkString",{contentType:"string"}),z(rt))}function z(rt){return rt===null||$a(rt)?(i.exit("chunkString"),i.exit("codeFencedFenceMeta"),F(rt)):rt===96&&rt===E?f(rt):(i.consume(rt),z)}function Y(rt){return i.attempt(w,mt,nt)(rt)}function nt(rt){return i.enter("lineEnding"),i.consume(rt),i.exit("lineEnding"),ot}function ot(rt){return v>0&&du(rt)?Cl(i,ft,"linePrefix",v+1)(rt):ft(rt)}function ft(rt){return rt===null||$a(rt)?i.check(M$t,Y,mt)(rt):(i.enter("codeFlowValue"),wt(rt))}function wt(rt){return rt===null||$a(rt)?(i.exit("codeFlowValue"),ft(rt)):(i.consume(rt),wt)}function mt(rt){return i.exit("codeFenced"),a(rt)}function ct(rt,it,gt){let Q=0;return dt;function dt(It){return rt.enter("lineEnding"),rt.consume(It),rt.exit("lineEnding"),K}function K(It){return rt.enter("codeFencedFence"),du(It)?Cl(rt,yt,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(It):yt(It)}function yt(It){return It===E?(rt.enter("codeFencedFenceSequence"),V(It)):gt(It)}function V(It){return It===E?(Q++,rt.consume(It),V):Q>=b?(rt.exit("codeFencedFenceSequence"),du(It)?Cl(rt,Ot,"whitespace")(It):Ot(It)):gt(It)}function Ot(It){return It===null||$a(It)?(rt.exit("codeFencedFence"),it(It)):gt(It)}}}function JUe(i,a,f){const g=this;return w;function w(b){return b===null?f(b):(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),v)}function v(b){return g.parser.lazy[g.now().line]?f(b):a(b)}}const Upt={name:"codeIndented",tokenize:tGe},ZUe={tokenize:eGe,partial:!0};function tGe(i,a,f){const g=this;return w;function w(_){return i.enter("codeIndented"),Cl(i,v,"linePrefix",4+1)(_)}function v(_){const M=g.events[g.events.length-1];return M&&M[1].type==="linePrefix"&&M[2].sliceSerialize(M[1],!0).length>=4?b(_):f(_)}function b(_){return _===null?S(_):$a(_)?i.attempt(ZUe,b,S)(_):(i.enter("codeFlowValue"),E(_))}function E(_){return _===null||$a(_)?(i.exit("codeFlowValue"),b(_)):(i.consume(_),E)}function S(_){return i.exit("codeIndented"),a(_)}}function eGe(i,a,f){const g=this;return w;function w(b){return g.parser.lazy[g.now().line]?f(b):$a(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),w):Cl(i,v,"linePrefix",4+1)(b)}function v(b){const E=g.events[g.events.length-1];return E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?a(b):$a(b)?w(b):f(b)}}const nGe={name:"codeText",tokenize:sGe,resolve:rGe,previous:iGe};function rGe(i){let a=i.length-4,f=3,g,w;if((i[f][1].type==="lineEnding"||i[f][1].type==="space")&&(i[a][1].type==="lineEnding"||i[a][1].type==="space")){for(g=f;++g<a;)if(i[g][1].type==="codeTextData"){i[f][1].type="codeTextPadding",i[a][1].type="codeTextPadding",f+=2,a-=2;break}}for(g=f-1,a++;++g<=a;)w===void 0?g!==a&&i[g][1].type!=="lineEnding"&&(w=g):(g===a||i[g][1].type==="lineEnding")&&(i[w][1].type="codeTextData",g!==w+2&&(i[w][1].end=i[g-1][1].end,i.splice(w+2,g-w-2),a-=g-w-2,g=w+2),w=void 0);return i}function iGe(i){return i!==96||this.events[this.events.length-1][1].type==="characterEscape"}function sGe(i,a,f){let g=0,w,v;return b;function b(F){return i.enter("codeText"),i.enter("codeTextSequence"),E(F)}function E(F){return F===96?(i.consume(F),g++,E):(i.exit("codeTextSequence"),S(F))}function S(F){return F===null?f(F):F===32?(i.enter("space"),i.consume(F),i.exit("space"),S):F===96?(v=i.enter("codeTextSequence"),w=0,M(F)):$a(F)?(i.enter("lineEnding"),i.consume(F),i.exit("lineEnding"),S):(i.enter("codeTextData"),_(F))}function _(F){return F===null||F===32||F===96||$a(F)?(i.exit("codeTextData"),S(F)):(i.consume(F),_)}function M(F){return F===96?(i.consume(F),w++,M):w===g?(i.exit("codeTextSequence"),i.exit("codeText"),a(F)):(v.type="codeTextData",_(F))}}function O$t(i){const a={};let f=-1,g,w,v,b,E,S,_;for(;++f<i.length;){for(;f in a;)f=a[f];if(g=i[f],f&&g[1].type==="chunkFlow"&&i[f-1][1].type==="listItemPrefix"&&(S=g[1]._tokenizer.events,v=0,v<S.length&&S[v][1].type==="lineEndingBlank"&&(v+=2),v<S.length&&S[v][1].type==="content"))for(;++v<S.length&&S[v][1].type!=="content";)S[v][1].type==="chunkText"&&(S[v][1]._isInFirstContentOfListItem=!0,v++);if(g[0]==="enter")g[1].contentType&&(Object.assign(a,aGe(i,f)),f=a[f],_=!0);else if(g[1]._container){for(v=f,w=void 0;v--&&(b=i[v],b[1].type==="lineEnding"||b[1].type==="lineEndingBlank");)b[0]==="enter"&&(w&&(i[w][1].type="lineEndingBlank"),b[1].type="lineEnding",w=v);w&&(g[1].end=Object.assign({},i[w][1].start),E=i.slice(w,f),E.unshift(g),c4(i,w,f-w+1,E))}}return!_}function aGe(i,a){const f=i[a][1],g=i[a][2];let w=a-1;const v=[],b=f._tokenizer||g.parser[f.contentType](f.start),E=b.events,S=[],_={};let M,F,R=-1,B=f,z=0,Y=0;const nt=[Y];for(;B;){for(;i[++w][1]!==B;);v.push(w),B._tokenizer||(M=g.sliceStream(B),B.next||M.push(null),F&&b.defineSkip(B.start),B._isInFirstContentOfListItem&&(b._gfmTasklistFirstContentOfListItem=!0),b.write(M),B._isInFirstContentOfListItem&&(b._gfmTasklistFirstContentOfListItem=void 0)),F=B,B=B.next}for(B=f;++R<E.length;)E[R][0]==="exit"&&E[R-1][0]==="enter"&&E[R][1].type===E[R-1][1].type&&E[R][1].start.line!==E[R][1].end.line&&(Y=R+1,nt.push(Y),B._tokenizer=void 0,B.previous=void 0,B=B.next);for(b.events=[],B?(B._tokenizer=void 0,B.previous=void 0):nt.pop(),R=nt.length;R--;){const ot=E.slice(nt[R],nt[R+1]),ft=v.pop();S.unshift([ft,ft+ot.length-1]),c4(i,ft,2,ot)}for(R=-1;++R<S.length;)_[z+S[R][0]]=z+S[R][1],z+=S[R][1]-S[R][0]-1;return _}const oGe={tokenize:lGe,resolve:uGe},cGe={tokenize:hGe,partial:!0};function uGe(i){return O$t(i),i}function lGe(i,a){let f;return g;function g(E){return i.enter("content"),f=i.enter("chunkContent",{contentType:"content"}),w(E)}function w(E){return E===null?v(E):$a(E)?i.check(cGe,b,v)(E):(i.consume(E),w)}function v(E){return i.exit("chunkContent"),i.exit("content"),a(E)}function b(E){return i.consume(E),i.exit("chunkContent"),f.next=i.enter("chunkContent",{contentType:"content",previous:f}),f=f.next,w}}function hGe(i,a,f){const g=this;return w;function w(b){return i.exit("chunkContent"),i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),Cl(i,v,"linePrefix")}function v(b){if(b===null||$a(b))return f(b);const E=g.events[g.events.length-1];return!g.parser.constructs.disable.null.includes("codeIndented")&&E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?a(b):i.interrupt(g.parser.constructs.flow,f,a)(b)}}function N$t(i,a,f,g,w,v,b,E,S){const _=S||Number.POSITIVE_INFINITY;let M=0;return F;function F(ot){return ot===60?(i.enter(g),i.enter(w),i.enter(v),i.consume(ot),i.exit(v),R):ot===null||ot===32||ot===41||$pt(ot)?f(ot):(i.enter(g),i.enter(b),i.enter(E),i.enter("chunkString",{contentType:"string"}),Y(ot))}function R(ot){return ot===62?(i.enter(v),i.consume(ot),i.exit(v),i.exit(w),i.exit(g),a):(i.enter(E),i.enter("chunkString",{contentType:"string"}),B(ot))}function B(ot){return ot===62?(i.exit("chunkString"),i.exit(E),R(ot)):ot===null||ot===60||$a(ot)?f(ot):(i.consume(ot),ot===92?z:B)}function z(ot){return ot===60||ot===62||ot===92?(i.consume(ot),B):B(ot)}function Y(ot){return!M&&(ot===null||ot===41||ob(ot))?(i.exit("chunkString"),i.exit(E),i.exit(b),i.exit(g),a(ot)):M<_&&ot===40?(i.consume(ot),M++,Y):ot===41?(i.consume(ot),M--,Y):ot===null||ot===32||ot===40||$pt(ot)?f(ot):(i.consume(ot),ot===92?nt:Y)}function nt(ot){return ot===40||ot===41||ot===92?(i.consume(ot),Y):Y(ot)}}function P$t(i,a,f,g,w,v){const b=this;let E=0,S;return _;function _(B){return i.enter(g),i.enter(w),i.consume(B),i.exit(w),i.enter(v),M}function M(B){return E>999||B===null||B===91||B===93&&!S||B===94&&!E&&"_hiddenFootnoteSupport"in b.parser.constructs?f(B):B===93?(i.exit(v),i.enter(w),i.consume(B),i.exit(w),i.exit(g),a):$a(B)?(i.enter("lineEnding"),i.consume(B),i.exit("lineEnding"),M):(i.enter("chunkString",{contentType:"string"}),F(B))}function F(B){return B===null||B===91||B===93||$a(B)||E++>999?(i.exit("chunkString"),M(B)):(i.consume(B),S||(S=!du(B)),B===92?R:F)}function R(B){return B===91||B===92||B===93?(i.consume(B),E++,F):F(B)}}function F$t(i,a,f,g,w,v){let b;return E;function E(R){return R===34||R===39||R===40?(i.enter(g),i.enter(w),i.consume(R),i.exit(w),b=R===40?41:R,S):f(R)}function S(R){return R===b?(i.enter(w),i.consume(R),i.exit(w),i.exit(g),a):(i.enter(v),_(R))}function _(R){return R===b?(i.exit(v),S(b)):R===null?f(R):$a(R)?(i.enter("lineEnding"),i.consume(R),i.exit("lineEnding"),Cl(i,_,"linePrefix")):(i.enter("chunkString",{contentType:"string"}),M(R))}function M(R){return R===b||R===null||$a(R)?(i.exit("chunkString"),_(R)):(i.consume(R),R===92?F:M)}function F(R){return R===b||R===92?(i.consume(R),M):M(R)}}function ZF(i,a){let f;return g;function g(w){return $a(w)?(i.enter("lineEnding"),i.consume(w),i.exit("lineEnding"),f=!0,g):du(w)?Cl(i,g,f?"linePrefix":"lineSuffix")(w):a(w)}}function ED(i){return i.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fGe={name:"definition",tokenize:gGe},dGe={tokenize:pGe,partial:!0};function gGe(i,a,f){const g=this;let w;return v;function v(B){return i.enter("definition"),b(B)}function b(B){return P$t.call(g,i,E,f,"definitionLabel","definitionLabelMarker","definitionLabelString")(B)}function E(B){return w=ED(g.sliceSerialize(g.events[g.events.length-1][1]).slice(1,-1)),B===58?(i.enter("definitionMarker"),i.consume(B),i.exit("definitionMarker"),S):f(B)}function S(B){return ob(B)?ZF(i,_)(B):_(B)}function _(B){return N$t(i,M,f,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(B)}function M(B){return i.attempt(dGe,F,F)(B)}function F(B){return du(B)?Cl(i,R,"whitespace")(B):R(B)}function R(B){return B===null||$a(B)?(i.exit("definition"),g.parser.defined.push(w),a(B)):f(B)}}function pGe(i,a,f){return g;function g(E){return ob(E)?ZF(i,w)(E):f(E)}function w(E){return F$t(i,v,f,"definitionTitle","definitionTitleMarker","definitionTitleString")(E)}function v(E){return du(E)?Cl(i,b,"whitespace")(E):b(E)}function b(E){return E===null||$a(E)?a(E):f(E)}}const bGe={name:"hardBreakEscape",tokenize:wGe};function wGe(i,a,f){return g;function g(v){return i.enter("hardBreakEscape"),i.consume(v),w}function w(v){return $a(v)?(i.exit("hardBreakEscape"),a(v)):f(v)}}const mGe={name:"headingAtx",tokenize:yGe,resolve:vGe};function vGe(i,a){let f=i.length-2,g=3,w,v;return i[g][1].type==="whitespace"&&(g+=2),f-2>g&&i[f][1].type==="whitespace"&&(f-=2),i[f][1].type==="atxHeadingSequence"&&(g===f-1||f-4>g&&i[f-2][1].type==="whitespace")&&(f-=g+1===f?2:4),f>g&&(w={type:"atxHeadingText",start:i[g][1].start,end:i[f][1].end},v={type:"chunkText",start:i[g][1].start,end:i[f][1].end,contentType:"text"},c4(i,g,f-g+1,[["enter",w,a],["enter",v,a],["exit",v,a],["exit",w,a]])),i}function yGe(i,a,f){let g=0;return w;function w(M){return i.enter("atxHeading"),v(M)}function v(M){return i.enter("atxHeadingSequence"),b(M)}function b(M){return M===35&&g++<6?(i.consume(M),b):M===null||ob(M)?(i.exit("atxHeadingSequence"),E(M)):f(M)}function E(M){return M===35?(i.enter("atxHeadingSequence"),S(M)):M===null||$a(M)?(i.exit("atxHeading"),a(M)):du(M)?Cl(i,E,"whitespace")(M):(i.enter("atxHeadingText"),_(M))}function S(M){return M===35?(i.consume(M),S):(i.exit("atxHeadingSequence"),E(M))}function _(M){return M===null||M===35||ob(M)?(i.exit("atxHeadingText"),E(M)):(i.consume(M),_)}}const xGe=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],B$t=["pre","script","style","textarea"],kGe={name:"htmlFlow",tokenize:SGe,resolveTo:CGe,concrete:!0},EGe={tokenize:AGe,partial:!0},TGe={tokenize:_Ge,partial:!0};function CGe(i){let a=i.length;for(;a--&&!(i[a][0]==="enter"&&i[a][1].type==="htmlFlow"););return a>1&&i[a-2][1].type==="linePrefix"&&(i[a][1].start=i[a-2][1].start,i[a+1][1].start=i[a-2][1].start,i.splice(a-2,2)),i}function SGe(i,a,f){const g=this;let w,v,b,E,S;return _;function _(Mt){return M(Mt)}function M(Mt){return i.enter("htmlFlow"),i.enter("htmlFlowData"),i.consume(Mt),F}function F(Mt){return Mt===33?(i.consume(Mt),R):Mt===47?(i.consume(Mt),v=!0,Y):Mt===63?(i.consume(Mt),w=3,g.interrupt?a:kt):u4(Mt)?(i.consume(Mt),b=String.fromCharCode(Mt),nt):f(Mt)}function R(Mt){return Mt===45?(i.consume(Mt),w=2,B):Mt===91?(i.consume(Mt),w=5,E=0,z):u4(Mt)?(i.consume(Mt),w=4,g.interrupt?a:kt):f(Mt)}function B(Mt){return Mt===45?(i.consume(Mt),g.interrupt?a:kt):f(Mt)}function z(Mt){const pn="CDATA[";return Mt===pn.charCodeAt(E++)?(i.consume(Mt),E===pn.length?g.interrupt?a:yt:z):f(Mt)}function Y(Mt){return u4(Mt)?(i.consume(Mt),b=String.fromCharCode(Mt),nt):f(Mt)}function nt(Mt){if(Mt===null||Mt===47||Mt===62||ob(Mt)){const pn=Mt===47,Ae=b.toLowerCase();return!pn&&!v&&B$t.includes(Ae)?(w=1,g.interrupt?a(Mt):yt(Mt)):xGe.includes(b.toLowerCase())?(w=6,pn?(i.consume(Mt),ot):g.interrupt?a(Mt):yt(Mt)):(w=7,g.interrupt&&!g.parser.lazy[g.now().line]?f(Mt):v?ft(Mt):wt(Mt))}return Mt===45||Zv(Mt)?(i.consume(Mt),b+=String.fromCharCode(Mt),nt):f(Mt)}function ot(Mt){return Mt===62?(i.consume(Mt),g.interrupt?a:yt):f(Mt)}function ft(Mt){return du(Mt)?(i.consume(Mt),ft):dt(Mt)}function wt(Mt){return Mt===47?(i.consume(Mt),dt):Mt===58||Mt===95||u4(Mt)?(i.consume(Mt),mt):du(Mt)?(i.consume(Mt),wt):dt(Mt)}function mt(Mt){return Mt===45||Mt===46||Mt===58||Mt===95||Zv(Mt)?(i.consume(Mt),mt):ct(Mt)}function ct(Mt){return Mt===61?(i.consume(Mt),rt):du(Mt)?(i.consume(Mt),ct):wt(Mt)}function rt(Mt){return Mt===null||Mt===60||Mt===61||Mt===62||Mt===96?f(Mt):Mt===34||Mt===39?(i.consume(Mt),S=Mt,it):du(Mt)?(i.consume(Mt),rt):gt(Mt)}function it(Mt){return Mt===S?(i.consume(Mt),S=null,Q):Mt===null||$a(Mt)?f(Mt):(i.consume(Mt),it)}function gt(Mt){return Mt===null||Mt===34||Mt===39||Mt===47||Mt===60||Mt===61||Mt===62||Mt===96||ob(Mt)?ct(Mt):(i.consume(Mt),gt)}function Q(Mt){return Mt===47||Mt===62||du(Mt)?wt(Mt):f(Mt)}function dt(Mt){return Mt===62?(i.consume(Mt),K):f(Mt)}function K(Mt){return Mt===null||$a(Mt)?yt(Mt):du(Mt)?(i.consume(Mt),K):f(Mt)}function yt(Mt){return Mt===45&&w===2?(i.consume(Mt),jt):Mt===60&&w===1?(i.consume(Mt),xt):Mt===62&&w===4?(i.consume(Mt),Gt):Mt===63&&w===3?(i.consume(Mt),kt):Mt===93&&w===5?(i.consume(Mt),Ct):$a(Mt)&&(w===6||w===7)?(i.exit("htmlFlowData"),i.check(EGe,Fe,V)(Mt)):Mt===null||$a(Mt)?(i.exit("htmlFlowData"),V(Mt)):(i.consume(Mt),yt)}function V(Mt){return i.check(TGe,Ot,Fe)(Mt)}function Ot(Mt){return i.enter("lineEnding"),i.consume(Mt),i.exit("lineEnding"),It}function It(Mt){return Mt===null||$a(Mt)?V(Mt):(i.enter("htmlFlowData"),yt(Mt))}function jt(Mt){return Mt===45?(i.consume(Mt),kt):yt(Mt)}function xt(Mt){return Mt===47?(i.consume(Mt),b="",Ft):yt(Mt)}function Ft(Mt){if(Mt===62){const pn=b.toLowerCase();return B$t.includes(pn)?(i.consume(Mt),Gt):yt(Mt)}return u4(Mt)&&b.length<8?(i.consume(Mt),b+=String.fromCharCode(Mt),Ft):yt(Mt)}function Ct(Mt){return Mt===93?(i.consume(Mt),kt):yt(Mt)}function kt(Mt){return Mt===62?(i.consume(Mt),Gt):Mt===45&&w===2?(i.consume(Mt),kt):yt(Mt)}function Gt(Mt){return Mt===null||$a(Mt)?(i.exit("htmlFlowData"),Fe(Mt)):(i.consume(Mt),Gt)}function Fe(Mt){return i.exit("htmlFlow"),a(Mt)}}function _Ge(i,a,f){const g=this;return w;function w(b){return $a(b)?(i.enter("lineEnding"),i.consume(b),i.exit("lineEnding"),v):f(b)}function v(b){return g.parser.lazy[g.now().line]?f(b):a(b)}}function AGe(i,a,f){return g;function g(w){return i.enter("lineEnding"),i.consume(w),i.exit("lineEnding"),i.attempt(XY,a,f)}}const LGe={name:"htmlText",tokenize:DGe};function DGe(i,a,f){const g=this;let w,v,b;return E;function E(kt){return i.enter("htmlText"),i.enter("htmlTextData"),i.consume(kt),S}function S(kt){return kt===33?(i.consume(kt),_):kt===47?(i.consume(kt),ct):kt===63?(i.consume(kt),wt):u4(kt)?(i.consume(kt),gt):f(kt)}function _(kt){return kt===45?(i.consume(kt),M):kt===91?(i.consume(kt),v=0,z):u4(kt)?(i.consume(kt),ft):f(kt)}function M(kt){return kt===45?(i.consume(kt),B):f(kt)}function F(kt){return kt===null?f(kt):kt===45?(i.consume(kt),R):$a(kt)?(b=F,xt(kt)):(i.consume(kt),F)}function R(kt){return kt===45?(i.consume(kt),B):F(kt)}function B(kt){return kt===62?jt(kt):kt===45?R(kt):F(kt)}function z(kt){const Gt="CDATA[";return kt===Gt.charCodeAt(v++)?(i.consume(kt),v===Gt.length?Y:z):f(kt)}function Y(kt){return kt===null?f(kt):kt===93?(i.consume(kt),nt):$a(kt)?(b=Y,xt(kt)):(i.consume(kt),Y)}function nt(kt){return kt===93?(i.consume(kt),ot):Y(kt)}function ot(kt){return kt===62?jt(kt):kt===93?(i.consume(kt),ot):Y(kt)}function ft(kt){return kt===null||kt===62?jt(kt):$a(kt)?(b=ft,xt(kt)):(i.consume(kt),ft)}function wt(kt){return kt===null?f(kt):kt===63?(i.consume(kt),mt):$a(kt)?(b=wt,xt(kt)):(i.consume(kt),wt)}function mt(kt){return kt===62?jt(kt):wt(kt)}function ct(kt){return u4(kt)?(i.consume(kt),rt):f(kt)}function rt(kt){return kt===45||Zv(kt)?(i.consume(kt),rt):it(kt)}function it(kt){return $a(kt)?(b=it,xt(kt)):du(kt)?(i.consume(kt),it):jt(kt)}function gt(kt){return kt===45||Zv(kt)?(i.consume(kt),gt):kt===47||kt===62||ob(kt)?Q(kt):f(kt)}function Q(kt){return kt===47?(i.consume(kt),jt):kt===58||kt===95||u4(kt)?(i.consume(kt),dt):$a(kt)?(b=Q,xt(kt)):du(kt)?(i.consume(kt),Q):jt(kt)}function dt(kt){return kt===45||kt===46||kt===58||kt===95||Zv(kt)?(i.consume(kt),dt):K(kt)}function K(kt){return kt===61?(i.consume(kt),yt):$a(kt)?(b=K,xt(kt)):du(kt)?(i.consume(kt),K):Q(kt)}function yt(kt){return kt===null||kt===60||kt===61||kt===62||kt===96?f(kt):kt===34||kt===39?(i.consume(kt),w=kt,V):$a(kt)?(b=yt,xt(kt)):du(kt)?(i.consume(kt),yt):(i.consume(kt),Ot)}function V(kt){return kt===w?(i.consume(kt),w=void 0,It):kt===null?f(kt):$a(kt)?(b=V,xt(kt)):(i.consume(kt),V)}function Ot(kt){return kt===null||kt===34||kt===39||kt===60||kt===61||kt===96?f(kt):kt===47||kt===62||ob(kt)?Q(kt):(i.consume(kt),Ot)}function It(kt){return kt===47||kt===62||ob(kt)?Q(kt):f(kt)}function jt(kt){return kt===62?(i.consume(kt),i.exit("htmlTextData"),i.exit("htmlText"),a):f(kt)}function xt(kt){return i.exit("htmlTextData"),i.enter("lineEnding"),i.consume(kt),i.exit("lineEnding"),Ft}function Ft(kt){return du(kt)?Cl(i,Ct,"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(kt):Ct(kt)}function Ct(kt){return i.enter("htmlTextData"),b(kt)}}const Gpt={name:"labelEnd",tokenize:FGe,resolveTo:PGe,resolveAll:NGe},MGe={tokenize:BGe},IGe={tokenize:RGe},OGe={tokenize:jGe};function NGe(i){let a=-1;for(;++a<i.length;){const f=i[a][1];(f.type==="labelImage"||f.type==="labelLink"||f.type==="labelEnd")&&(i.splice(a+1,f.type==="labelImage"?4:2),f.type="data",a++)}return i}function PGe(i,a){let f=i.length,g=0,w,v,b,E;for(;f--;)if(w=i[f][1],v){if(w.type==="link"||w.type==="labelLink"&&w._inactive)break;i[f][0]==="enter"&&w.type==="labelLink"&&(w._inactive=!0)}else if(b){if(i[f][0]==="enter"&&(w.type==="labelImage"||w.type==="labelLink")&&!w._balanced&&(v=f,w.type!=="labelLink")){g=2;break}}else w.type==="labelEnd"&&(b=f);const S={type:i[v][1].type==="labelLink"?"link":"image",start:Object.assign({},i[v][1].start),end:Object.assign({},i[i.length-1][1].end)},_={type:"label",start:Object.assign({},i[v][1].start),end:Object.assign({},i[b][1].end)},M={type:"labelText",start:Object.assign({},i[v+g+2][1].end),end:Object.assign({},i[b-2][1].start)};return E=[["enter",S,a],["enter",_,a]],E=tm(E,i.slice(v+1,v+g+3)),E=tm(E,[["enter",M,a]]),E=tm(E,qpt(a.parser.constructs.insideSpan.null,i.slice(v+g+4,b-3),a)),E=tm(E,[["exit",M,a],i[b-2],i[b-1],["exit",_,a]]),E=tm(E,i.slice(b+1)),E=tm(E,[["exit",S,a]]),c4(i,v,i.length,E),i}function FGe(i,a,f){const g=this;let w=g.events.length,v,b;for(;w--;)if((g.events[w][1].type==="labelImage"||g.events[w][1].type==="labelLink")&&!g.events[w][1]._balanced){v=g.events[w][1];break}return E;function E(R){return v?v._inactive?F(R):(b=g.parser.defined.includes(ED(g.sliceSerialize({start:v.end,end:g.now()}))),i.enter("labelEnd"),i.enter("labelMarker"),i.consume(R),i.exit("labelMarker"),i.exit("labelEnd"),S):f(R)}function S(R){return R===40?i.attempt(MGe,M,b?M:F)(R):R===91?i.attempt(IGe,M,b?_:F)(R):b?M(R):F(R)}function _(R){return i.attempt(OGe,M,F)(R)}function M(R){return a(R)}function F(R){return v._balanced=!0,f(R)}}function BGe(i,a,f){return g;function g(F){return i.enter("resource"),i.enter("resourceMarker"),i.consume(F),i.exit("resourceMarker"),w}function w(F){return ob(F)?ZF(i,v)(F):v(F)}function v(F){return F===41?M(F):N$t(i,b,E,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(F)}function b(F){return ob(F)?ZF(i,S)(F):M(F)}function E(F){return f(F)}function S(F){return F===34||F===39||F===40?F$t(i,_,f,"resourceTitle","resourceTitleMarker","resourceTitleString")(F):M(F)}function _(F){return ob(F)?ZF(i,M)(F):M(F)}function M(F){return F===41?(i.enter("resourceMarker"),i.consume(F),i.exit("resourceMarker"),i.exit("resource"),a):f(F)}}function RGe(i,a,f){const g=this;return w;function w(E){return P$t.call(g,i,v,b,"reference","referenceMarker","referenceString")(E)}function v(E){return g.parser.defined.includes(ED(g.sliceSerialize(g.events[g.events.length-1][1]).slice(1,-1)))?a(E):f(E)}function b(E){return f(E)}}function jGe(i,a,f){return g;function g(v){return i.enter("reference"),i.enter("referenceMarker"),i.consume(v),i.exit("referenceMarker"),w}function w(v){return v===93?(i.enter("referenceMarker"),i.consume(v),i.exit("referenceMarker"),i.exit("reference"),a):f(v)}}const $Ge={name:"labelStartImage",tokenize:zGe,resolveAll:Gpt.resolveAll};function zGe(i,a,f){const g=this;return w;function w(E){return i.enter("labelImage"),i.enter("labelImageMarker"),i.consume(E),i.exit("labelImageMarker"),v}function v(E){return E===91?(i.enter("labelMarker"),i.consume(E),i.exit("labelMarker"),i.exit("labelImage"),b):f(E)}function b(E){return E===94&&"_hiddenFootnoteSupport"in g.parser.constructs?f(E):a(E)}}const qGe={name:"labelStartLink",tokenize:HGe,resolveAll:Gpt.resolveAll};function HGe(i,a,f){const g=this;return w;function w(b){return i.enter("labelLink"),i.enter("labelMarker"),i.consume(b),i.exit("labelMarker"),i.exit("labelLink"),v}function v(b){return b===94&&"_hiddenFootnoteSupport"in g.parser.constructs?f(b):a(b)}}const Kpt={name:"lineEnding",tokenize:VGe};function VGe(i,a){return f;function f(g){return i.enter("lineEnding"),i.consume(g),i.exit("lineEnding"),Cl(i,a,"linePrefix")}}const QY={name:"thematicBreak",tokenize:UGe};function UGe(i,a,f){let g=0,w;return v;function v(_){return i.enter("thematicBreak"),b(_)}function b(_){return w=_,E(_)}function E(_){return _===w?(i.enter("thematicBreakSequence"),S(_)):g>=3&&(_===null||$a(_))?(i.exit("thematicBreak"),a(_)):f(_)}function S(_){return _===w?(i.consume(_),g++,S):(i.exit("thematicBreakSequence"),du(_)?Cl(i,E,"whitespace")(_):E(_))}}const cb={name:"list",tokenize:WGe,continuation:{tokenize:YGe},exit:QGe},GGe={tokenize:JGe,partial:!0},KGe={tokenize:XGe,partial:!0};function WGe(i,a,f){const g=this,w=g.events[g.events.length-1];let v=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,b=0;return E;function E(B){const z=g.containerState.type||(B===42||B===43||B===45?"listUnordered":"listOrdered");if(z==="listUnordered"?!g.containerState.marker||B===g.containerState.marker:zpt(B)){if(g.containerState.type||(g.containerState.type=z,i.enter(z,{_container:!0})),z==="listUnordered")return i.enter("listItemPrefix"),B===42||B===45?i.check(QY,f,_)(B):_(B);if(!g.interrupt||B===49)return i.enter("listItemPrefix"),i.enter("listItemValue"),S(B)}return f(B)}function S(B){return zpt(B)&&++b<10?(i.consume(B),S):(!g.interrupt||b<2)&&(g.containerState.marker?B===g.containerState.marker:B===41||B===46)?(i.exit("listItemValue"),_(B)):f(B)}function _(B){return i.enter("listItemMarker"),i.consume(B),i.exit("listItemMarker"),g.containerState.marker=g.containerState.marker||B,i.check(XY,g.interrupt?f:M,i.attempt(GGe,R,F))}function M(B){return g.containerState.initialBlankLine=!0,v++,R(B)}function F(B){return du(B)?(i.enter("listItemPrefixWhitespace"),i.consume(B),i.exit("listItemPrefixWhitespace"),R):f(B)}function R(B){return g.containerState.size=v+g.sliceSerialize(i.exit("listItemPrefix"),!0).length,a(B)}}function YGe(i,a,f){const g=this;return g.containerState._closeFlow=void 0,i.check(XY,w,v);function w(E){return g.containerState.furtherBlankLines=g.containerState.furtherBlankLines||g.containerState.initialBlankLine,Cl(i,a,"listItemIndent",g.containerState.size+1)(E)}function v(E){return g.containerState.furtherBlankLines||!du(E)?(g.containerState.furtherBlankLines=void 0,g.containerState.initialBlankLine=void 0,b(E)):(g.containerState.furtherBlankLines=void 0,g.containerState.initialBlankLine=void 0,i.attempt(KGe,a,b)(E))}function b(E){return g.containerState._closeFlow=!0,g.interrupt=void 0,Cl(i,i.attempt(cb,a,f),"linePrefix",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E)}}function XGe(i,a,f){const g=this;return Cl(i,w,"listItemIndent",g.containerState.size+1);function w(v){const b=g.events[g.events.length-1];return b&&b[1].type==="listItemIndent"&&b[2].sliceSerialize(b[1],!0).length===g.containerState.size?a(v):f(v)}}function QGe(i){i.exit(this.containerState.type)}function JGe(i,a,f){const g=this;return Cl(i,w,"listItemPrefixWhitespace",g.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function w(v){const b=g.events[g.events.length-1];return!du(v)&&b&&b[1].type==="listItemPrefixWhitespace"?a(v):f(v)}}const R$t={name:"setextUnderline",tokenize:tKe,resolveTo:ZGe};function ZGe(i,a){let f=i.length,g,w,v;for(;f--;)if(i[f][0]==="enter"){if(i[f][1].type==="content"){g=f;break}i[f][1].type==="paragraph"&&(w=f)}else i[f][1].type==="content"&&i.splice(f,1),!v&&i[f][1].type==="definition"&&(v=f);const b={type:"setextHeading",start:Object.assign({},i[w][1].start),end:Object.assign({},i[i.length-1][1].end)};return i[w][1].type="setextHeadingText",v?(i.splice(w,0,["enter",b,a]),i.splice(v+1,0,["exit",i[g][1],a]),i[g][1].end=Object.assign({},i[v][1].end)):i[g][1]=b,i.push(["exit",b,a]),i}function tKe(i,a,f){const g=this;let w;return v;function v(_){let M=g.events.length,F;for(;M--;)if(g.events[M][1].type!=="lineEnding"&&g.events[M][1].type!=="linePrefix"&&g.events[M][1].type!=="content"){F=g.events[M][1].type==="paragraph";break}return!g.parser.lazy[g.now().line]&&(g.interrupt||F)?(i.enter("setextHeadingLine"),w=_,b(_)):f(_)}function b(_){return i.enter("setextHeadingLineSequence"),E(_)}function E(_){return _===w?(i.consume(_),E):(i.exit("setextHeadingLineSequence"),du(_)?Cl(i,S,"lineSuffix")(_):S(_))}function S(_){return _===null||$a(_)?(i.exit("setextHeadingLine"),a(_)):f(_)}}const eKe={tokenize:nKe};function nKe(i){const a=this,f=i.attempt(XY,g,i.attempt(this.parser.constructs.flowInitial,w,Cl(i,i.attempt(this.parser.constructs.flow,w,i.attempt(oGe,w)),"linePrefix")));return f;function g(v){if(v===null){i.consume(v);return}return i.enter("lineEndingBlank"),i.consume(v),i.exit("lineEndingBlank"),a.currentConstruct=void 0,f}function w(v){if(v===null){i.consume(v);return}return i.enter("lineEnding"),i.consume(v),i.exit("lineEnding"),a.currentConstruct=void 0,f}}const rKe={resolveAll:$$t()},iKe=j$t("string"),sKe=j$t("text");function j$t(i){return{tokenize:a,resolveAll:$$t(i==="text"?aKe:void 0)};function a(f){const g=this,w=this.parser.constructs[i],v=f.attempt(w,b,E);return b;function b(M){return _(M)?v(M):E(M)}function E(M){if(M===null){f.consume(M);return}return f.enter("data"),f.consume(M),S}function S(M){return _(M)?(f.exit("data"),v(M)):(f.consume(M),S)}function _(M){if(M===null)return!0;const F=w[M];let R=-1;if(F)for(;++R<F.length;){const B=F[R];if(!B.previous||B.previous.call(g,g.previous))return!0}return!1}}}function $$t(i){return a;function a(f,g){let w=-1,v;for(;++w<=f.length;)v===void 0?f[w]&&f[w][1].type==="data"&&(v=w,w++):(!f[w]||f[w][1].type!=="data")&&(w!==v+2&&(f[v][1].end=f[w-1][1].end,f.splice(v+2,w-v-2),w=v+2),v=void 0);return i?i(f,g):f}}function aKe(i,a){let f=0;for(;++f<=i.length;)if((f===i.length||i[f][1].type==="lineEnding")&&i[f-1][1].type==="data"){const g=i[f-1][1],w=a.sliceStream(g);let v=w.length,b=-1,E=0,S;for(;v--;){const _=w[v];if(typeof _=="string"){for(b=_.length;_.charCodeAt(b-1)===32;)E++,b--;if(b)break;b=-1}else if(_===-2)S=!0,E++;else if(_!==-1){v++;break}}if(E){const _={type:f===i.length||S||E<2?"lineSuffix":"hardBreakTrailing",start:{line:g.end.line,column:g.end.column-E,offset:g.end.offset-E,_index:g.start._index+v,_bufferIndex:v?b:g.start._bufferIndex+b},end:Object.assign({},g.end)};g.end=Object.assign({},_.start),g.start.offset===g.end.offset?Object.assign(g,_):(i.splice(f,0,["enter",_,a],["exit",_,a]),f+=2)}f++}return i}function oKe(i,a,f){let g=Object.assign(f?Object.assign({},f):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const w={},v=[];let b=[],E=[];const S={consume:ft,enter:wt,exit:mt,attempt:it(ct),check:it(rt),interrupt:it(rt,{interrupt:!0})},_={previous:null,code:null,containerState:{},events:[],parser:i,sliceStream:B,sliceSerialize:R,now:z,defineSkip:Y,write:F};let M=a.tokenize.call(_,S);return a.resolveAll&&v.push(a),_;function F(K){return b=tm(b,K),nt(),b[b.length-1]!==null?[]:(gt(a,0),_.events=qpt(v,_.events,_),_.events)}function R(K,yt){return uKe(B(K),yt)}function B(K){return cKe(b,K)}function z(){const{line:K,column:yt,offset:V,_index:Ot,_bufferIndex:It}=g;return{line:K,column:yt,offset:V,_index:Ot,_bufferIndex:It}}function Y(K){w[K.line]=K.column,dt()}function nt(){let K;for(;g._index<b.length;){const yt=b[g._index];if(typeof yt=="string")for(K=g._index,g._bufferIndex<0&&(g._bufferIndex=0);g._index===K&&g._bufferIndex<yt.length;)ot(yt.charCodeAt(g._bufferIndex));else ot(yt)}}function ot(K){M=M(K)}function ft(K){$a(K)?(g.line++,g.column=1,g.offset+=K===-3?2:1,dt()):K!==-1&&(g.column++,g.offset++),g._bufferIndex<0?g._index++:(g._bufferIndex++,g._bufferIndex===b[g._index].length&&(g._bufferIndex=-1,g._index++)),_.previous=K}function wt(K,yt){const V=yt||{};return V.type=K,V.start=z(),_.events.push(["enter",V,_]),E.push(V),V}function mt(K){const yt=E.pop();return yt.end=z(),_.events.push(["exit",yt,_]),yt}function ct(K,yt){gt(K,yt.from)}function rt(K,yt){yt.restore()}function it(K,yt){return V;function V(Ot,It,jt){let xt,Ft,Ct,kt;return Array.isArray(Ot)?Fe(Ot):"tokenize"in Ot?Fe([Ot]):Gt(Ot);function Gt(ye){return tn;function tn(sn){const be=sn!==null&&ye[sn],Ne=sn!==null&&ye.null,Xt=[...Array.isArray(be)?be:be?[be]:[],...Array.isArray(Ne)?Ne:Ne?[Ne]:[]];return Fe(Xt)(sn)}}function Fe(ye){return xt=ye,Ft=0,ye.length===0?jt:Mt(ye[Ft])}function Mt(ye){return tn;function tn(sn){return kt=Q(),Ct=ye,ye.partial||(_.currentConstruct=ye),ye.name&&_.parser.constructs.disable.null.includes(ye.name)?Ae():ye.tokenize.call(yt?Object.assign(Object.create(_),yt):_,S,pn,Ae)(sn)}}function pn(ye){return K(Ct,kt),It}function Ae(ye){return kt.restore(),++Ft<xt.length?Mt(xt[Ft]):jt}}}function gt(K,yt){K.resolveAll&&!v.includes(K)&&v.push(K),K.resolve&&c4(_.events,yt,_.events.length-yt,K.resolve(_.events.slice(yt),_)),K.resolveTo&&(_.events=K.resolveTo(_.events,_))}function Q(){const K=z(),yt=_.previous,V=_.currentConstruct,Ot=_.events.length,It=Array.from(E);return{restore:jt,from:Ot};function jt(){g=K,_.previous=yt,_.currentConstruct=V,_.events.length=Ot,E=It,dt()}}function dt(){g.line in w&&g.column<2&&(g.column=w[g.line],g.offset+=w[g.line]-1)}}function cKe(i,a){const f=a.start._index,g=a.start._bufferIndex,w=a.end._index,v=a.end._bufferIndex;let b;if(f===w)b=[i[f].slice(g,v)];else{if(b=i.slice(f,w),g>-1){const E=b[0];typeof E=="string"?b[0]=E.slice(g):b.shift()}v>0&&b.push(i[w].slice(0,v))}return b}function uKe(i,a){let f=-1;const g=[];let w;for(;++f<i.length;){const v=i[f];let b;if(typeof v=="string")b=v;else switch(v){case-5:{b="\r";break}case-4:{b=`
117 node : x:${i.x} y:${i.y} w:${i.width} h:${i.height}`);const g=i.x,w=i.y,v=Math.abs(g-f.x),b=i.width/2;let E=f.x<a.x?b-v:b+v;const S=i.height/2,_=Math.abs(a.y-f.y),M=Math.abs(a.x-f.x);if(Math.abs(w-a.y)*b>Math.abs(g-a.x)*S){let F=f.y<a.y?a.y-S-w:w-S-a.y;E=M*F/_;const R={x:f.x<a.x?f.x+E:f.x-M+E,y:f.y<a.y?f.y+_-F:f.y-_+F};return E===0&&(R.x=a.x,R.y=a.y),M===0&&(R.x=a.x),_===0&&(R.y=a.y),Kt.debug(`abc89 topp/bott calc, Q ${_}, q ${F}, R ${M}, r ${E}`,R),R}else{f.x<a.x?E=a.x-b-g:E=g-b-a.x;let F=_*E/M,R=f.x<a.x?f.x+M-E:f.x-M+E,B=f.y<a.y?f.y+F:f.y-F;return Kt.debug(`sides calc abc89, Q ${_}, q ${F}, R ${M}, r ${E}`,{_x:R,_y:B}),E===0&&(R=a.x,B=a.y),M===0&&(R=a.x),_===0&&(B=a.y),{x:R,y:B}}},fzt=(i,a)=>{Kt.debug("abc88 cutPathAtIntersect",i,a);let f=[],g=i[0],w=!1;return i.forEach(v=>{if(!dWe(a,v)&&!w){const b=gWe(a,g,v);let E=!1;f.forEach(S=>{E=E||S.x===b.x&&S.y===b.y}),f.some(S=>S.x===b.x&&S.y===b.y)||f.push(b),w=!0}else g=v,w||f.push(v)}),f},dzt=function(i,a,f,g,w,v,b){let E=f.points;Kt.debug("abc88 InsertEdge: edge=",f,"e=",a);let S=!1;const _=v.node(a.v);var M=v.node(a.w);M!=null&&M.intersect&&(_!=null&&_.intersect)&&(E=E.slice(1,f.points.length-1),E.unshift(_.intersect(E[0])),E.push(M.intersect(E[E.length-1]))),f.toCluster&&(Kt.debug("to cluster abc88",g[f.toCluster]),E=fzt(f.points,g[f.toCluster].node),S=!0),f.fromCluster&&(Kt.debug("from cluster abc88",g[f.fromCluster]),E=fzt(E.reverse(),g[f.fromCluster].node).reverse(),S=!0);const F=E.filter(mt=>!Number.isNaN(mt.y));let R=wF;f.curve&&(w==="graph"||w==="flowchart")&&(R=f.curve);const{x:B,y:z}=czt(f),Y=Ax().x(B).y(z).curve(R);let nt;switch(f.thickness){case"normal":nt="edge-thickness-normal";break;case"thick":nt="edge-thickness-thick";break;case"invisible":nt="edge-thickness-thick";break;default:nt=""}switch(f.pattern){case"solid":nt+=" edge-pattern-solid";break;case"dotted":nt+=" edge-pattern-dotted";break;case"dashed":nt+=" edge-pattern-dashed";break}const ot=i.append("path").attr("d",Y(F)).attr("id",f.id).attr("class"," "+nt+(f.classes?" "+f.classes:"")).attr("style",f.style);let ft="";(Re().flowchart.arrowMarkerAbsolute||Re().state.arrowMarkerAbsolute)&&(ft=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,ft=ft.replace(/\(/g,"\\("),ft=ft.replace(/\)/g,"\\)")),uzt(ot,f,ft,b,w);let wt={};return S&&(wt.updatedPath=E),wt.originalPath=f.points,wt},gzt=async(i,a,f,g,w,v)=>{Kt.info("Graph in recursive render: XXX",jx(a),w);const b=a.graph().rankdir;Kt.trace("Dir in recursive render - dir:",b);const E=i.insert("g").attr("class","root");a.nodes()?Kt.info("Recursive render XXX",a.nodes()):Kt.info("No nodes found for",a),a.edges().length>0&&Kt.trace("Recursive edges",a.edge(a.edges()[0]));const S=E.insert("g").attr("class","clusters"),_=E.insert("g").attr("class","edgePaths"),M=E.insert("g").attr("class","edgeLabels"),F=E.insert("g").attr("class","nodes");await Promise.all(a.nodes().map(async function(z){const Y=a.node(z);if(w!==void 0){const nt=JSON.parse(JSON.stringify(w.clusterData));Kt.info("Setting data for cluster XXX (",z,") ",nt,w),a.setNode(w.id,nt),a.parent(z)||(Kt.trace("Setting parent",z,w.id),a.setParent(z,w.id,nt))}if(Kt.info("(Insert) Node XXX"+z+": "+JSON.stringify(a.node(z))),Y&&Y.clusterNode){Kt.info("Cluster identified",z,Y.width,a.node(z));const nt=await gzt(F,Y.graph,f,g,a.node(z),v),ot=nt.elem;xh(Y,ot),Y.diff=nt.diff||0,Kt.info("Node bounds (abc123)",z,Y,Y.width,Y.x,Y.y),aWe(ot,Y),Kt.warn("Recursive render complete ",ot,Y)}else a.children(z).length>0?(Kt.info("Cluster - the non recursive path XXX",z,Y.id,Y,a),Kt.info(tB(Y.id,a)),ho[Y.id]={id:tB(Y.id,a),node:Y}):(Kt.info("Node - the non recursive path",z,Y.id,Y),await nX(F,a.node(z),b))})),a.edges().forEach(function(z){const Y=a.edge(z.v,z.w,z.name);Kt.info("Edge "+z.v+" -> "+z.w+": "+JSON.stringify(z)),Kt.info("Edge "+z.v+" -> "+z.w+": ",z," ",JSON.stringify(a.edge(z))),Kt.info("Fix",ho,"ids:",z.v,z.w,"Translateing: ",ho[z.v],ho[z.w]),tbt(M,Y)}),a.edges().forEach(function(z){Kt.info("Edge "+z.v+" -> "+z.w+": "+JSON.stringify(z))}),Kt.info("#############################################"),Kt.info("### Layout ###"),Kt.info("#############################################"),Kt.info(a),kD(a),Kt.info("Graph after layout:",jx(a));let R=0;const{subGraphTitleTotalMargin:B}=rX(v);return OKe(a).forEach(function(z){const Y=a.node(z);Kt.info("Position "+z+": "+JSON.stringify(a.node(z))),Kt.info("Position "+z+": ("+Y.x,","+Y.y,") width: ",Y.width," height: ",Y.height),Y&&Y.clusterNode?(Y.y+=B,Zpt(Y)):a.children(z).length>0?(Y.height+=B,uWe(S,Y),ho[Y.id].node=Y):(Y.y+=B/2,Zpt(Y))}),a.edges().forEach(function(z){const Y=a.edge(z);Kt.info("Edge "+z.v+" -> "+z.w+": "+JSON.stringify(Y),Y),Y.points.forEach(ot=>ot.y+=B/2);const nt=dzt(_,z,Y,ho,f,a,g);hzt(Y,nt)}),a.nodes().forEach(function(z){const Y=a.node(z);Kt.info(z,Y.type,Y.diff),Y.type==="group"&&(R=Y.diff)}),{elem:E,diff:R}},ebt=async(i,a,f,g,w)=>{jpt(i,f,g,w),oWe(),fWe(),lWe(),DKe(),Kt.warn("Graph at first:",JSON.stringify(jx(a))),IKe(a),Kt.warn("Graph after:",JSON.stringify(jx(a)));const v=Re();await gzt(i,a,g,w,void 0,v)},pzt={},pWe=function(i){const a=Object.keys(i);for(const f of a)pzt[f]=i[f]},bzt=function(i,a,f,g,w,v){const b=g.select(`[id="${f}"]`);Object.keys(i).forEach(function(S){const _=i[S];let M="default";_.classes.length>0&&(M=_.classes.join(" ")),M=M+" flowchart-label";const F=C2(_.styles);let R=_.text!==void 0?_.text:_.id,B;if(Kt.info("vertex",_,_.labelType),_.labelType==="markdown")Kt.info("vertex",_,_.labelType);else if(j1(Re().flowchart.htmlLabels)){const nt={label:R.replace(/fa[blrs]?:fa-[\w-]+/g,ot=>`<i class='${ot.replace(":"," ")}'></i>`)};B=Mpt(b,nt).node(),B.parentNode.removeChild(B)}else{const nt=w.createElementNS("http://www.w3.org/2000/svg","text");nt.setAttribute("style",F.labelStyle.replace("color:","fill:"));const ot=R.split(ei.lineBreakRegex);for(const ft of ot){const wt=w.createElementNS("http://www.w3.org/2000/svg","tspan");wt.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),wt.setAttribute("dy","1em"),wt.setAttribute("x","1"),wt.textContent=ft,nt.appendChild(wt)}B=nt}let z=0,Y="";switch(_.type){case"round":z=5,Y="rect";break;case"square":Y="rect";break;case"diamond":Y="question";break;case"hexagon":Y="hexagon";break;case"odd":Y="rect_left_inv_arrow";break;case"lean_right":Y="lean_right";break;case"lean_left":Y="lean_left";break;case"trapezoid":Y="trapezoid";break;case"inv_trapezoid":Y="inv_trapezoid";break;case"odd_right":Y="rect_left_inv_arrow";break;case"circle":Y="circle";break;case"ellipse":Y="ellipse";break;case"stadium":Y="stadium";break;case"subroutine":Y="subroutine";break;case"cylinder":Y="cylinder";break;case"group":Y="rect";break;case"doublecircle":Y="doublecircle";break;default:Y="rect"}a.setNode(_.id,{labelStyle:F.labelStyle,shape:Y,labelText:R,labelType:_.labelType,rx:z,ry:z,class:M,style:F.style,id:_.id,link:_.link,linkTarget:_.linkTarget,tooltip:v.db.getTooltip(_.id)||"",domId:v.db.lookUpDomId(_.id),haveCallback:_.haveCallback,width:_.type==="group"?500:void 0,dir:_.dir,type:_.type,props:_.props,padding:Re().flowchart.padding}),Kt.info("setNode",{labelStyle:F.labelStyle,labelType:_.labelType,shape:Y,labelText:R,rx:z,ry:z,class:M,style:F.style,id:_.id,domId:v.db.lookUpDomId(_.id),width:_.type==="group"?500:void 0,type:_.type,dir:_.dir,props:_.props,padding:Re().flowchart.padding})})},wzt=function(i,a,f){Kt.info("abc78 edges = ",i);let g=0,w={},v,b;if(i.defaultStyle!==void 0){const E=C2(i.defaultStyle);v=E.style,b=E.labelStyle}i.forEach(function(E){g++;const S="L-"+E.start+"-"+E.end;w[S]===void 0?(w[S]=0,Kt.info("abc78 new entry",S,w[S])):(w[S]++,Kt.info("abc78 new entry",S,w[S]));let _=S+"-"+w[S];Kt.info("abc78 new link id to be used is",S,_,w[S]);const M="LS-"+E.start,F="LE-"+E.end,R={style:"",labelStyle:""};switch(R.minlen=E.length||1,E.type==="arrow_open"?R.arrowhead="none":R.arrowhead="normal",R.arrowTypeStart="arrow_open",R.arrowTypeEnd="arrow_open",E.type){case"double_arrow_cross":R.arrowTypeStart="arrow_cross";case"arrow_cross":R.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":R.arrowTypeStart="arrow_point";case"arrow_point":R.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":R.arrowTypeStart="arrow_circle";case"arrow_circle":R.arrowTypeEnd="arrow_circle";break}let B="",z="";switch(E.stroke){case"normal":B="fill:none;",v!==void 0&&(B=v),b!==void 0&&(z=b),R.thickness="normal",R.pattern="solid";break;case"dotted":R.thickness="normal",R.pattern="dotted",R.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":R.thickness="thick",R.pattern="solid",R.style="stroke-width: 3.5px;fill:none;";break;case"invisible":R.thickness="invisible",R.pattern="solid",R.style="stroke-width: 0;fill:none;";break}if(E.style!==void 0){const Y=C2(E.style);B=Y.style,z=Y.labelStyle}R.style=R.style+=B,R.labelStyle=R.labelStyle+=z,E.interpolate!==void 0?R.curve=Xw(E.interpolate,Kg):i.defaultInterpolate!==void 0?R.curve=Xw(i.defaultInterpolate,Kg):R.curve=Xw(pzt.curve,Kg),E.text===void 0?E.style!==void 0&&(R.arrowheadStyle="fill: #333"):(R.arrowheadStyle="fill: #333",R.labelpos="c"),R.labelType=E.labelType,R.label=E.text.replace(ei.lineBreakRegex,`
231 `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var dt=this.next();return dt||this.lex()},begin:function(dt){this.conditionStack.push(dt)},popState:function(){var dt=this.conditionStack.length-1;return dt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(dt){return dt=this.conditionStack.length-1-Math.abs(dt||0),dt>=0?this.conditionStack[dt]:"INITIAL"},pushState:function(dt){this.begin(dt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(dt,K,yt,V){switch(yt){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: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 15:break;case 16:return 37;case 17:return 34;case 18:return 34;case 19:return 38;case 20:break;case 21:return this.popState(),17;case 22:return K.yytext[0];case 23:return 18;case 24:return 19;case 25:return 41;case 26:return 43;case 27:return 43;case 28:return 43;case 29:return 41;case 30:return 41;case 31:return 42;case 32:return 42;case 33:return 42;case 34:return 42;case 35:return 42;case 36:return 43;case 37:return 42;case 38:return 43;case 39:return 44;case 40:return 44;case 41:return 44;case 42:return 44;case 43:return 41;case 44:return 42;case 45:return 43;case 46:return 45;case 47:return 46;case 48:return 47;case 49:return 47;case 50:return 46;case 51:return 46;case 52:return 46;case 53:return 27;case 54:return K.yytext[0];case 55:return 6}},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}}};return gt}();ct.lexer=rt;function it(){this.yy={}}return it.prototype=ct,ct.Parser=it,new it}();rbt.parser=rbt;const vWe=rbt;let S8={},ibt=[];const yWe={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"},xWe={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},vzt=function(i,a=void 0){return S8[i]===void 0?(S8[i]={attributes:[],alias:a},Kt.info("Added new entity :",i)):S8[i]&&!S8[i].alias&&a&&(S8[i].alias=a,Kt.info(`Add alias '${a}' to entity '${i}'`)),S8[i]},kWe={Cardinality:yWe,Identification:xWe,getConfig:()=>Re().er,addEntity:vzt,addAttributes:function(i,a){let f=vzt(i),g;for(g=a.length-1;g>=0;g--)f.attributes.push(a[g]),Kt.debug("Added attribute ",a[g].attributeName)},getEntities:()=>S8,addRelationship:function(i,a,f,g){let w={entityA:i,roleA:a,entityB:f,relSpec:g};ibt.push(w),Kt.debug("Added new relationship :",w)},getRelationships:()=>ibt,clear:function(){S8={},ibt=[],ag()},setAccTitle:og,getAccTitle:Xg,setAccDescription:Qg,getAccDescription:Jg,setDiagramTitle:S2,getDiagramTitle:Zg},ey={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"},ny={ERMarkers:ey,insertMarkers:function(i,a){let f;i.append("defs").append("marker").attr("id",ey.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"),i.append("defs").append("marker").attr("id",ey.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"),i.append("defs").append("marker").attr("id",ey.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),i.append("defs").append("marker").attr("id",ey.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),f=i.append("defs").append("marker").attr("id",ey.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),f.append("circle").attr("stroke",a.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),f.append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M9,0 L9,18"),f=i.append("defs").append("marker").attr("id",ey.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),f.append("circle").attr("stroke",a.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),f.append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M21,0 L21,18"),i.append("defs").append("marker").attr("id",ey.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),i.append("defs").append("marker").attr("id",ey.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),f=i.append("defs").append("marker").attr("id",ey.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),f.append("circle").attr("stroke",a.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),f.append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),f=i.append("defs").append("marker").attr("id",ey.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),f.append("circle").attr("stroke",a.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),f.append("path").attr("stroke",a.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}},EWe=/^(?:[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;function TWe(i){return typeof i=="string"&&EWe.test(i)}const b0=[];for(let i=0;i<256;++i)b0.push((i+256).toString(16).slice(1));function CWe(i,a=0){return(b0[i[a+0]]+b0[i[a+1]]+b0[i[a+2]]+b0[i[a+3]]+"-"+b0[i[a+4]]+b0[i[a+5]]+"-"+b0[i[a+6]]+b0[i[a+7]]+"-"+b0[i[a+8]]+b0[i[a+9]]+"-"+b0[i[a+10]]+b0[i[a+11]]+b0[i[a+12]]+b0[i[a+13]]+b0[i[a+14]]+b0[i[a+15]]).toLowerCase()}function SWe(i){if(!TWe(i))throw TypeError("Invalid UUID");let a;const f=new Uint8Array(16);return f[0]=(a=parseInt(i.slice(0,8),16))>>>24,f[1]=a>>>16&255,f[2]=a>>>8&255,f[3]=a&255,f[4]=(a=parseInt(i.slice(9,13),16))>>>8,f[5]=a&255,f[6]=(a=parseInt(i.slice(14,18),16))>>>8,f[7]=a&255,f[8]=(a=parseInt(i.slice(19,23),16))>>>8,f[9]=a&255,f[10]=(a=parseInt(i.slice(24,36),16))/1099511627776&255,f[11]=a/4294967296&255,f[12]=a>>>24&255,f[13]=a>>>16&255,f[14]=a>>>8&255,f[15]=a&255,f}function _We(i){i=unescape(encodeURIComponent(i));const a=[];for(let f=0;f<i.length;++f)a.push(i.charCodeAt(f));return a}const AWe="6ba7b810-9dad-11d1-80b4-00c04fd430c8",LWe="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function DWe(i,a,f){function g(w,v,b,E){var S;if(typeof w=="string"&&(w=_We(w)),typeof v=="string"&&(v=SWe(v)),((S=v)===null||S===void 0?void 0:S.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let _=new Uint8Array(16+w.length);if(_.set(v),_.set(w,v.length),_=f(_),_[6]=_[6]&15|a,_[8]=_[8]&63|128,b){E=E||0;for(let M=0;M<16;++M)b[E+M]=_[M];return b}return CWe(_)}try{g.name=i}catch{}return g.DNS=AWe,g.URL=LWe,g}function MWe(i,a,f,g){switch(i){case 0:return a&f^~a&g;case 1:return a^f^g;case 2:return a&f^a&g^f&g;case 3:return a^f^g}}function sbt(i,a){return i<<a|i>>>32-a}function IWe(i){const a=[1518500249,1859775393,2400959708,3395469782],f=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const b=unescape(encodeURIComponent(i));i=[];for(let E=0;E<b.length;++E)i.push(b.charCodeAt(E))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const g=i.length/4+2,w=Math.ceil(g/16),v=new Array(w);for(let b=0;b<w;++b){const E=new Uint32Array(16);for(let S=0;S<16;++S)E[S]=i[b*64+S*4]<<24|i[b*64+S*4+1]<<16|i[b*64+S*4+2]<<8|i[b*64+S*4+3];v[b]=E}v[w-1][14]=(i.length-1)*8/Math.pow(2,32),v[w-1][14]=Math.floor(v[w-1][14]),v[w-1][15]=(i.length-1)*8&4294967295;for(let b=0;b<w;++b){const E=new Uint32Array(80);for(let B=0;B<16;++B)E[B]=v[b][B];for(let B=16;B<80;++B)E[B]=sbt(E[B-3]^E[B-8]^E[B-14]^E[B-16],1);let S=f[0],_=f[1],M=f[2],F=f[3],R=f[4];for(let B=0;B<80;++B){const z=Math.floor(B/20),Y=sbt(S,5)+MWe(z,_,M,F)+R+a[z]+E[B]>>>0;R=F,F=M,M=sbt(_,30)>>>0,_=S,S=Y}f[0]=f[0]+S>>>0,f[1]=f[1]+_>>>0,f[2]=f[2]+M>>>0,f[3]=f[3]+F>>>0,f[4]=f[4]+R>>>0}return[f[0]>>24&255,f[0]>>16&255,f[0]>>8&255,f[0]&255,f[1]>>24&255,f[1]>>16&255,f[1]>>8&255,f[1]&255,f[2]>>24&255,f[2]>>16&255,f[2]>>8&255,f[2]&255,f[3]>>24&255,f[3]>>16&255,f[3]>>8&255,f[3]&255,f[4]>>24&255,f[4]>>16&255,f[4]>>8&255,f[4]&255]}const OWe=DWe("v5",80,IWe),NWe=/[^\dA-Za-z](\W)*/g;let z1={},nB=new Map;const PWe=function(i){const a=Object.keys(i);for(const f of a)z1[f]=i[f]},FWe=(i,a,f)=>{const g=z1.entityPadding/3,w=z1.entityPadding/3,v=z1.fontSize*.85,b=a.node().getBBox(),E=[];let S=!1,_=!1,M=0,F=0,R=0,B=0,z=b.height+g*2,Y=1;f.forEach(wt=>{wt.attributeKeyTypeList!==void 0&&wt.attributeKeyTypeList.length>0&&(S=!0),wt.attributeComment!==void 0&&(_=!0)}),f.forEach(wt=>{const mt=`${a.node().id}-attr-${Y}`;let ct=0;const rt=kF(wt.attributeType),it=i.append("text").classed("er entityLabel",!0).attr("id",`${mt}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Re().fontFamily).style("font-size",v+"px").text(rt),gt=i.append("text").classed("er entityLabel",!0).attr("id",`${mt}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Re().fontFamily).style("font-size",v+"px").text(wt.attributeName),Q={};Q.tn=it,Q.nn=gt;const dt=it.node().getBBox(),K=gt.node().getBBox();if(M=Math.max(M,dt.width),F=Math.max(F,K.width),ct=Math.max(dt.height,K.height),S){const yt=wt.attributeKeyTypeList!==void 0?wt.attributeKeyTypeList.join(","):"",V=i.append("text").classed("er entityLabel",!0).attr("id",`${mt}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Re().fontFamily).style("font-size",v+"px").text(yt);Q.kn=V;const Ot=V.node().getBBox();R=Math.max(R,Ot.width),ct=Math.max(ct,Ot.height)}if(_){const yt=i.append("text").classed("er entityLabel",!0).attr("id",`${mt}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",Re().fontFamily).style("font-size",v+"px").text(wt.attributeComment||"");Q.cn=yt;const V=yt.node().getBBox();B=Math.max(B,V.width),ct=Math.max(ct,V.height)}Q.height=ct,E.push(Q),z+=ct+g*2,Y+=1});let nt=4;S&&(nt+=2),_&&(nt+=2);const ot=M+F+R+B,ft={width:Math.max(z1.minEntityWidth,Math.max(b.width+z1.entityPadding*2,ot+w*nt)),height:f.length>0?z:Math.max(z1.minEntityHeight,b.height+z1.entityPadding*2)};if(f.length>0){const wt=Math.max(0,(ft.width-ot-w*nt)/(nt/2));a.attr("transform","translate("+ft.width/2+","+(g+b.height/2)+")");let mt=b.height+g*2,ct="attributeBoxOdd";E.forEach(rt=>{const it=mt+g+rt.height/2;rt.tn.attr("transform","translate("+w+","+it+")");const gt=i.insert("rect","#"+rt.tn.node().id).classed(`er ${ct}`,!0).attr("x",0).attr("y",mt).attr("width",M+w*2+wt).attr("height",rt.height+g*2),Q=parseFloat(gt.attr("x"))+parseFloat(gt.attr("width"));rt.nn.attr("transform","translate("+(Q+w)+","+it+")");const dt=i.insert("rect","#"+rt.nn.node().id).classed(`er ${ct}`,!0).attr("x",Q).attr("y",mt).attr("width",F+w*2+wt).attr("height",rt.height+g*2);let K=parseFloat(dt.attr("x"))+parseFloat(dt.attr("width"));if(S){rt.kn.attr("transform","translate("+(K+w)+","+it+")");const yt=i.insert("rect","#"+rt.kn.node().id).classed(`er ${ct}`,!0).attr("x",K).attr("y",mt).attr("width",R+w*2+wt).attr("height",rt.height+g*2);K=parseFloat(yt.attr("x"))+parseFloat(yt.attr("width"))}_&&(rt.cn.attr("transform","translate("+(K+w)+","+it+")"),i.insert("rect","#"+rt.cn.node().id).classed(`er ${ct}`,"true").attr("x",K).attr("y",mt).attr("width",B+w*2+wt).attr("height",rt.height+g*2)),mt+=rt.height+g*2,ct=ct==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else ft.height=Math.max(z1.minEntityHeight,z),a.attr("transform","translate("+ft.width/2+","+ft.height/2+")");return ft},BWe=function(i,a,f){const g=Object.keys(a);let w;return g.forEach(function(v){const b=HWe(v,"entity");nB.set(v,b);const E=i.append("g").attr("id",b);w=w===void 0?b:w;const S="text-"+b,_=E.append("text").classed("er entityLabel",!0).attr("id",S).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",Re().fontFamily).style("font-size",z1.fontSize+"px").text(a[v].alias??v),{width:M,height:F}=FWe(E,_,a[v].attributes),B=E.insert("rect","#"+S).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",M).attr("height",F).node().getBBox();f.setNode(b,{width:B.width,height:B.height,shape:"rect",id:b})}),w},RWe=function(i,a){a.nodes().forEach(function(f){f!==void 0&&a.node(f)!==void 0&&i.select("#"+f).attr("transform","translate("+(a.node(f).x-a.node(f).width/2)+","+(a.node(f).y-a.node(f).height/2)+" )")})},yzt=function(i){return(i.entityA+i.roleA+i.entityB).replace(/\s/g,"")},jWe=function(i,a){return i.forEach(function(f){a.setEdge(nB.get(f.entityA),nB.get(f.entityB),{relationship:f},yzt(f))}),i};let xzt=0;const $We=function(i,a,f,g,w){xzt++;const v=f.edge(nB.get(a.entityA),nB.get(a.entityB),yzt(a)),b=Ax().x(function(z){return z.x}).y(function(z){return z.y}).curve(wF),E=i.insert("path","#"+g).classed("er relationshipLine",!0).attr("d",b(v.points)).style("stroke",z1.stroke).style("fill","none");a.relSpec.relType===w.db.Identification.NON_IDENTIFYING&&E.attr("stroke-dasharray","8,8");let S="";switch(z1.arrowMarkerAbsolute&&(S=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,S=S.replace(/\(/g,"\\("),S=S.replace(/\)/g,"\\)")),a.relSpec.cardA){case w.db.Cardinality.ZERO_OR_ONE:E.attr("marker-end","url("+S+"#"+ny.ERMarkers.ZERO_OR_ONE_END+")");break;case w.db.Cardinality.ZERO_OR_MORE:E.attr("marker-end","url("+S+"#"+ny.ERMarkers.ZERO_OR_MORE_END+")");break;case w.db.Cardinality.ONE_OR_MORE:E.attr("marker-end","url("+S+"#"+ny.ERMarkers.ONE_OR_MORE_END+")");break;case w.db.Cardinality.ONLY_ONE:E.attr("marker-end","url("+S+"#"+ny.ERMarkers.ONLY_ONE_END+")");break;case w.db.Cardinality.MD_PARENT:E.attr("marker-end","url("+S+"#"+ny.ERMarkers.MD_PARENT_END+")");break}switch(a.relSpec.cardB){case w.db.Cardinality.ZERO_OR_ONE:E.attr("marker-start","url("+S+"#"+ny.ERMarkers.ZERO_OR_ONE_START+")");break;case w.db.Cardinality.ZERO_OR_MORE:E.attr("marker-start","url("+S+"#"+ny.ERMarkers.ZERO_OR_MORE_START+")");break;case w.db.Cardinality.ONE_OR_MORE:E.attr("marker-start","url("+S+"#"+ny.ERMarkers.ONE_OR_MORE_START+")");break;case w.db.Cardinality.ONLY_ONE:E.attr("marker-start","url("+S+"#"+ny.ERMarkers.ONLY_ONE_START+")");break;case w.db.Cardinality.MD_PARENT:E.attr("marker-start","url("+S+"#"+ny.ERMarkers.MD_PARENT_START+")");break}const _=E.node().getTotalLength(),M=E.node().getPointAtLength(_*.5),F="rel"+xzt,B=i.append("text").classed("er relationshipLabel",!0).attr("id",F).attr("x",M.x).attr("y",M.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",Re().fontFamily).style("font-size",z1.fontSize+"px").text(a.roleA).node().getBBox();i.insert("rect","#"+F).classed("er relationshipLabelBox",!0).attr("x",M.x-B.width/2).attr("y",M.y-B.height/2).attr("width",B.width).attr("height",B.height)},zWe=function(i,a,f,g){z1=Re().er,Kt.info("Drawing ER diagram");const w=Re().securityLevel;let v;w==="sandbox"&&(v=Tr("#i"+a));const E=Tr(w==="sandbox"?v.nodes()[0].contentDocument.body:"body").select(`[id='${a}']`);ny.insertMarkers(E,z1);let S;S=new l1({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:z1.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const _=BWe(E,g.db.getEntities(),S),M=jWe(g.db.getRelationships(),S);kD(S),RWe(E,S),M.forEach(function(Y){$We(E,Y,S,_,g)});const F=z1.diagramPadding;uo.insertTitle(E,"entityTitleText",z1.titleTopMargin,g.db.getDiagramTitle());const R=E.node().getBBox(),B=R.width+F*2,z=R.height+F*2;sg(E,z,B,z1.useMaxWidth),E.attr("viewBox",`${R.x-F} ${R.y-F} ${B} ${z}`)},qWe="28e9f9db-3c8d-5aa5-9faf-44286ae5937c";function HWe(i="",a=""){const f=i.replace(NWe,"");return`${kzt(a)}${kzt(f)}${OWe(i,qWe)}`}function kzt(i=""){return i.length>0?`${i}-`:""}const VWe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:vWe,db:kWe,renderer:{setConf:PWe,draw:zWe},styles:i=>`
825 `,B9=18*2,vqt="actor-top",yqt="actor-bottom",Fbt=function(i,a){return LY(i,a)},FQe=function(i,a,f,g,w){if(a.links===void 0||a.links===null||Object.keys(a.links).length===0)return{height:0,width:0};const v=a.links,b=a.actorCnt,E=a.rectData;var S="none";w&&(S="block !important");const _=i.append("g");_.attr("id","actor"+b+"_popup"),_.attr("class","actorPopupMenu"),_.attr("display",S);var M="";E.class!==void 0&&(M=" "+E.class);let F=E.width>f?E.width:f;const R=_.append("rect");if(R.attr("class","actorPopupMenuPanel"+M),R.attr("x",E.x),R.attr("y",E.height),R.attr("fill",E.fill),R.attr("stroke",E.stroke),R.attr("width",F),R.attr("height",E.height),R.attr("rx",E.rx),R.attr("ry",E.ry),v!=null){var B=20;for(let nt in v){var z=_.append("a"),Y=h8(v[nt]);z.attr("xlink:href",Y),z.attr("target","_blank"),ZQe(g)(nt,z,E.x+10,E.height+B,F,20,{class:"actor"},g),B+=30}}return R.attr("height",B),{height:E.height+B,width:F}},BQe=function(i){return"var pu = document.getElementById('"+i+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},DD=function(i,a){let f=0,g=0;const w=a.text.split(ei.lineBreakRegex),[v,b]=k9(a.fontSize);let E=[],S=0,_=()=>a.y;if(a.valign!==void 0&&a.textMargin!==void 0&&a.textMargin>0)switch(a.valign){case"top":case"start":_=()=>Math.round(a.y+a.textMargin);break;case"middle":case"center":_=()=>Math.round(a.y+(f+g+a.textMargin)/2);break;case"bottom":case"end":_=()=>Math.round(a.y+(f+g+2*a.textMargin)-a.textMargin);break}if(a.anchor!==void 0&&a.textMargin!==void 0&&a.width!==void 0)switch(a.anchor){case"left":case"start":a.x=Math.round(a.x+a.textMargin),a.anchor="start",a.dominantBaseline="middle",a.alignmentBaseline="middle";break;case"middle":case"center":a.x=Math.round(a.x+a.width/2),a.anchor="middle",a.dominantBaseline="middle",a.alignmentBaseline="middle";break;case"right":case"end":a.x=Math.round(a.x+a.width-a.textMargin),a.anchor="end",a.dominantBaseline="middle",a.alignmentBaseline="middle";break}for(let[M,F]of w.entries()){a.textMargin!==void 0&&a.textMargin===0&&v!==void 0&&(S=M*v);const R=i.append("text");R.attr("x",a.x),R.attr("y",_()),a.anchor!==void 0&&R.attr("text-anchor",a.anchor).attr("dominant-baseline",a.dominantBaseline).attr("alignment-baseline",a.alignmentBaseline),a.fontFamily!==void 0&&R.style("font-family",a.fontFamily),b!==void 0&&R.style("font-size",b),a.fontWeight!==void 0&&R.style("font-weight",a.fontWeight),a.fill!==void 0&&R.attr("fill",a.fill),a.class!==void 0&&R.attr("class",a.class),a.dy!==void 0?R.attr("dy",a.dy):S!==0&&R.attr("dy",S);const B=F||kFt;if(a.tspan){const z=R.append("tspan");z.attr("x",a.x),a.fill!==void 0&&z.attr("fill",a.fill),z.text(B)}else R.text(B);a.valign!==void 0&&a.textMargin!==void 0&&a.textMargin>0&&(g+=(R._groups||R)[0][0].getBBox().height,f=g),E.push(R)}return E},xqt=function(i,a){function f(w,v,b,E,S){return w+","+v+" "+(w+b)+","+v+" "+(w+b)+","+(v+E-S)+" "+(w+b-S*1.2)+","+(v+E)+" "+w+","+(v+E)}const g=i.append("polygon");return g.attr("points",f(a.x,a.y,a.width,a.height,7)),g.attr("class","labelBox"),a.y=a.y+a.height/2,DD(i,a),g};let f4=-1;const kqt=(i,a,f,g)=>{i.select&&f.forEach(w=>{const v=a[w],b=i.select("#actor"+v.actorCnt);!g.mirrorActors&&v.stopy?b.attr("y2",v.stopy+v.height/2):g.mirrorActors&&b.attr("y2",v.stopy)})},RQe=function(i,a,f,g){const w=g?a.stopy:a.starty,v=a.x+a.width/2,b=w+5,E=i.append("g").lower();var S=E;g||(f4++,Object.keys(a.links||{}).length&&!f.forceMenus&&S.attr("onclick",BQe(`actor${f4}_popup`)).attr("cursor","pointer"),S.append("line").attr("id","actor"+f4).attr("x1",v).attr("y1",b).attr("x2",v).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),S=E.append("g"),a.actorCnt=f4,a.links!=null&&S.attr("id","root-"+f4));const _=_9();var M="actor";a.properties!=null&&a.properties.class?M=a.properties.class:_.fill="#eaeaea",g?M+=` ${yqt}`:M+=` ${vqt}`,_.x=a.x,_.y=w,_.width=a.width,_.height=a.height,_.class=M,_.rx=3,_.ry=3;const F=Fbt(S,_);if(a.rectData=_,a.properties!=null&&a.properties.icon){const B=a.properties.icon.trim();B.charAt(0)==="@"?KRe(S,_.x+_.width-20,_.y+10,B.substr(1)):GRe(S,_.x+_.width-20,_.y+10,B)}Bbt(f)(a.description,S,_.x,_.y,_.width,_.height,{class:"actor"},f);let R=a.height;if(F.node){const B=F.node().getBBox();a.height=B.height,R=B.height}return R},jQe=function(i,a,f,g){const w=g?a.stopy:a.starty,v=a.x+a.width/2,b=w+80;i.lower(),g||(f4++,i.append("line").attr("id","actor"+f4).attr("x1",v).attr("y1",b).attr("x2",v).attr("y2",2e3).attr("class","actor-line").attr("class","200").attr("stroke-width","0.5px").attr("stroke","#999"),a.actorCnt=f4);const E=i.append("g");let S="actor-man";g?S+=` ${yqt}`:S+=` ${vqt}`,E.attr("class",S);const _=_9();_.x=a.x,_.y=w,_.fill="#eaeaea",_.width=a.width,_.height=a.height,_.class="actor",_.rx=3,_.ry=3,E.append("line").attr("id","actor-man-torso"+f4).attr("x1",v).attr("y1",w+25).attr("x2",v).attr("y2",w+45),E.append("line").attr("id","actor-man-arms"+f4).attr("x1",v-B9/2).attr("y1",w+33).attr("x2",v+B9/2).attr("y2",w+33),E.append("line").attr("x1",v-B9/2).attr("y1",w+60).attr("x2",v).attr("y2",w+45),E.append("line").attr("x1",v).attr("y1",w+45).attr("x2",v+B9/2-2).attr("y2",w+60);const M=E.append("circle");M.attr("cx",a.x+a.width/2),M.attr("cy",w+10),M.attr("r",15),M.attr("width",a.width),M.attr("height",a.height);const F=E.node().getBBox();return a.height=F.height,Bbt(f)(a.description,E,_.x,_.y+35,_.width,_.height,{class:"actor"},f),a.height},$Qe=function(i,a,f,g){switch(a.type){case"actor":return jQe(i,a,f,g);case"participant":return RQe(i,a,f,g)}},zQe=function(i,a,f){const w=i.append("g");Eqt(w,a),a.name&&Bbt(f)(a.name,w,a.x,a.y+(a.textMaxHeight||0)/2,a.width,0,{class:"text"},f),w.lower()},qQe=function(i){return i.append("g")},HQe=function(i,a,f,g,w){const v=_9(),b=a.anchored;v.x=a.startx,v.y=a.starty,v.class="activation"+w%3,v.width=a.stopx-a.startx,v.height=f-a.starty,Fbt(b,v)},VQe=function(i,a,f,g){const{boxMargin:w,boxTextMargin:v,labelBoxHeight:b,labelBoxWidth:E,messageFontFamily:S,messageFontSize:_,messageFontWeight:M}=g,F=i.append("g"),R=function(Y,nt,ot,ft){return F.append("line").attr("x1",Y).attr("y1",nt).attr("x2",ot).attr("y2",ft).attr("class","loopLine")};R(a.startx,a.starty,a.stopx,a.starty),R(a.stopx,a.starty,a.stopx,a.stopy),R(a.startx,a.stopy,a.stopx,a.stopy),R(a.startx,a.starty,a.startx,a.stopy),a.sections!==void 0&&a.sections.forEach(function(Y){R(a.startx,Y.y,a.stopx,Y.y).style("stroke-dasharray","3, 3")});let B=tpt();B.text=f,B.x=a.startx,B.y=a.starty,B.fontFamily=S,B.fontSize=_,B.fontWeight=M,B.anchor="middle",B.valign="middle",B.tspan=!1,B.width=E||50,B.height=b||20,B.textMargin=v,B.class="labelText",xqt(F,B),B=Tqt(),B.text=a.title,B.x=a.startx+E/2+(a.stopx-a.startx)/2,B.y=a.starty+w+v,B.anchor="middle",B.valign="middle",B.textMargin=v,B.class="loopText",B.fontFamily=S,B.fontSize=_,B.fontWeight=M,B.wrap=!0;let z=DD(F,B);return a.sectionTitles!==void 0&&a.sectionTitles.forEach(function(Y,nt){if(Y.message){B.text=Y.message,B.x=a.startx+(a.stopx-a.startx)/2,B.y=a.sections[nt].y+w+v,B.class="loopText",B.anchor="middle",B.valign="middle",B.tspan=!1,B.fontFamily=S,B.fontSize=_,B.fontWeight=M,B.wrap=a.wrap,z=DD(F,B);let ot=Math.round(z.map(ft=>(ft._groups||ft)[0][0].getBBox().height).reduce((ft,wt)=>ft+wt));a.sections[nt].height+=ot-(w+v)}}),a.height=Math.round(a.stopy-a.starty),F},Eqt=function(i,a){sRt(i,a)},UQe=function(i){i.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")},GQe=function(i){i.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")},KQe=function(i){i.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")},WQe=function(i){i.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},YQe=function(i){i.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")},XQe=function(i){i.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)},QQe=function(i){i.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")},Tqt=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}},JQe=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Bbt=function(){function i(w,v,b,E,S,_,M){const F=v.append("text").attr("x",b+S/2).attr("y",E+_/2+5).style("text-anchor","middle").text(w);g(F,M)}function a(w,v,b,E,S,_,M,F){const{actorFontSize:R,actorFontFamily:B,actorFontWeight:z}=F,[Y,nt]=k9(R),ot=w.split(ei.lineBreakRegex);for(let ft=0;ft<ot.length;ft++){const wt=ft*Y-Y*(ot.length-1)/2,mt=v.append("text").attr("x",b+S/2).attr("y",E).style("text-anchor","middle").style("font-size",nt).style("font-weight",z).style("font-family",B);mt.append("tspan").attr("x",b+S/2).attr("dy",wt).text(ot[ft]),mt.attr("y",E+_/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(mt,M)}}function f(w,v,b,E,S,_,M,F){const R=v.append("switch"),z=R.append("foreignObject").attr("x",b).attr("y",E).attr("width",S).attr("height",_).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");z.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(w),a(w,R,b,E,S,_,M,F),g(z,M)}function g(w,v){for(const b in v)v.hasOwnProperty(b)&&w.attr(b,v[b])}return function(w){return w.textPlacement==="fo"?f:w.textPlacement==="old"?i:a}}(),ZQe=function(){function i(w,v,b,E,S,_,M){const F=v.append("text").attr("x",b).attr("y",E).style("text-anchor","start").text(w);g(F,M)}function a(w,v,b,E,S,_,M,F){const{actorFontSize:R,actorFontFamily:B,actorFontWeight:z}=F,Y=w.split(ei.lineBreakRegex);for(let nt=0;nt<Y.length;nt++){const ot=nt*R-R*(Y.length-1)/2,ft=v.append("text").attr("x",b).attr("y",E).style("text-anchor","start").style("font-size",R).style("font-weight",z).style("font-family",B);ft.append("tspan").attr("x",b).attr("dy",ot).text(Y[nt]),ft.attr("y",E+_/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),g(ft,M)}}function f(w,v,b,E,S,_,M,F){const R=v.append("switch"),z=R.append("foreignObject").attr("x",b).attr("y",E).attr("width",S).attr("height",_).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");z.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(w),a(w,R,b,E,S,_,M,F),g(z,M)}function g(w,v){for(const b in v)v.hasOwnProperty(b)&&w.attr(b,v[b])}return function(w){return w.textPlacement==="fo"?f:w.textPlacement==="old"?i:a}}(),_f={drawRect:Fbt,drawText:DD,drawLabel:xqt,drawActor:$Qe,drawBox:zQe,drawPopup:FQe,anchorElement:qQe,drawActivation:HQe,drawLoop:VQe,drawBackgroundRect:Eqt,insertArrowHead:WQe,insertArrowFilledHead:YQe,insertSequenceNumber:XQe,insertArrowCrossHead:QQe,insertDatabaseIcon:UQe,insertComputerIcon:GQe,insertClockIcon:KQe,getTextObj:Tqt,getNoteRect:JQe,fixLifeLineHeights:kqt,sanitizeUrl:h8};let bn={};const Wr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(i=>i.height||0))+(this.loops.length===0?0:this.loops.map(i=>i.height||0).reduce((i,a)=>i+a))+(this.messages.length===0?0:this.messages.map(i=>i.height||0).reduce((i,a)=>i+a))+(this.notes.length===0?0:this.notes.map(i=>i.height||0).reduce((i,a)=>i+a))},clear:function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},addBox:function(i){this.boxes.push(i)},addActor:function(i){this.actors.push(i)},addLoop:function(i){this.loops.push(i)},addMessage:function(i){this.messages.push(i)},addNote:function(i){this.notes.push(i)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],boxes:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Sqt(Re())},updateVal:function(i,a,f,g){i[a]===void 0?i[a]=f:i[a]=g(f,i[a])},updateBounds:function(i,a,f,g){const w=this;let v=0;function b(E){return function(_){v++;const M=w.sequenceItems.length-v+1;w.updateVal(_,"starty",a-M*bn.boxMargin,Math.min),w.updateVal(_,"stopy",g+M*bn.boxMargin,Math.max),w.updateVal(Wr.data,"startx",i-M*bn.boxMargin,Math.min),w.updateVal(Wr.data,"stopx",f+M*bn.boxMargin,Math.max),E!=="activation"&&(w.updateVal(_,"startx",i-M*bn.boxMargin,Math.min),w.updateVal(_,"stopx",f+M*bn.boxMargin,Math.max),w.updateVal(Wr.data,"starty",a-M*bn.boxMargin,Math.min),w.updateVal(Wr.data,"stopy",g+M*bn.boxMargin,Math.max))}}this.sequenceItems.forEach(b()),this.activations.forEach(b("activation"))},insert:function(i,a,f,g){const w=ei.getMin(i,f),v=ei.getMax(i,f),b=ei.getMin(a,g),E=ei.getMax(a,g);this.updateVal(Wr.data,"startx",w,Math.min),this.updateVal(Wr.data,"starty",b,Math.min),this.updateVal(Wr.data,"stopx",v,Math.max),this.updateVal(Wr.data,"stopy",E,Math.max),this.updateBounds(w,b,v,E)},newActivation:function(i,a,f){const g=f[i.from.actor],w=bX(i.from.actor).length||0,v=g.x+g.width/2+(w-1)*bn.activationWidth/2;this.activations.push({startx:v,starty:this.verticalPos+2,stopx:v+bn.activationWidth,stopy:void 0,actor:i.from.actor,anchored:_f.anchorElement(a)})},endActivation:function(i){const a=this.activations.map(function(f){return f.actor}).lastIndexOf(i.from.actor);return this.activations.splice(a,1)[0]},createLoop:function(i={message:void 0,wrap:!1,width:void 0},a){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:i.message,wrap:i.wrap,width:i.width,height:0,fill:a}},newLoop:function(i={message:void 0,wrap:!1,width:void 0},a){this.sequenceItems.push(this.createLoop(i,a))},endLoop:function(){return this.sequenceItems.pop()},isLoopOverlap:function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},addSectionToLoop:function(i){const a=this.sequenceItems.pop();a.sections=a.sections||[],a.sectionTitles=a.sectionTitles||[],a.sections.push({y:Wr.getVerticalPos(),height:0}),a.sectionTitles.push(i),this.sequenceItems.push(a)},saveVerticalPos:function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},resetVerticalPos:function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},bumpVerticalPos:function(i){this.verticalPos=this.verticalPos+i,this.data.stopy=ei.getMax(this.data.stopy,this.verticalPos)},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},tJe=function(i,a){Wr.bumpVerticalPos(bn.boxMargin),a.height=bn.boxMargin,a.starty=Wr.getVerticalPos();const f=_9();f.x=a.startx,f.y=a.starty,f.width=a.width||bn.width,f.class="note";const g=i.append("g"),w=_f.drawRect(g,f),v=tpt();v.x=a.startx,v.y=a.starty,v.width=f.width,v.dy="1em",v.text=a.message,v.class="noteText",v.fontFamily=bn.noteFontFamily,v.fontSize=bn.noteFontSize,v.fontWeight=bn.noteFontWeight,v.anchor=bn.noteAlign,v.textMargin=bn.noteMargin,v.valign="center";const b=DD(g,v),E=Math.round(b.map(S=>(S._groups||S)[0][0].getBBox().height).reduce((S,_)=>S+_));w.attr("height",E+2*bn.noteMargin),a.height+=E+2*bn.noteMargin,Wr.bumpVerticalPos(E+2*bn.noteMargin),a.stopy=a.starty+E+2*bn.noteMargin,a.stopx=a.startx+f.width,Wr.insert(a.startx,a.starty,a.stopx,a.stopy),Wr.models.addNote(a)},R9=i=>({fontFamily:i.messageFontFamily,fontSize:i.messageFontSize,fontWeight:i.messageFontWeight}),MD=i=>({fontFamily:i.noteFontFamily,fontSize:i.noteFontSize,fontWeight:i.noteFontWeight}),Rbt=i=>({fontFamily:i.actorFontFamily,fontSize:i.actorFontSize,fontWeight:i.actorFontWeight});function eJe(i,a){Wr.bumpVerticalPos(10);const{startx:f,stopx:g,message:w}=a,v=ei.splitBreaks(w).length,b=uo.calculateTextDimensions(w,R9(bn)),E=b.height/v;a.height+=E,Wr.bumpVerticalPos(E);let S,_=b.height-10;const M=b.width;if(f===g){S=Wr.getVerticalPos()+_,bn.rightAngles||(_+=bn.boxMargin,S=Wr.getVerticalPos()+_),_+=30;const F=ei.getMax(M/2,bn.width/2);Wr.insert(f-F,Wr.getVerticalPos()-10+_,g+F,Wr.getVerticalPos()+30+_)}else _+=bn.boxMargin,S=Wr.getVerticalPos()+_,Wr.insert(f,S-10,g,S);return Wr.bumpVerticalPos(_),a.height+=_,a.stopy=a.starty+a.height,Wr.insert(a.fromBounds,a.starty,a.toBounds,a.stopy),S}const nJe=function(i,a,f,g){const{startx:w,stopx:v,starty:b,message:E,type:S,sequenceIndex:_,sequenceVisible:M}=a,F=uo.calculateTextDimensions(E,R9(bn)),R=tpt();R.x=w,R.y=b+10,R.width=v-w,R.class="messageText",R.dy="1em",R.text=E,R.fontFamily=bn.messageFontFamily,R.fontSize=bn.messageFontSize,R.fontWeight=bn.messageFontWeight,R.anchor=bn.messageAlign,R.valign="center",R.textMargin=bn.wrapPadding,R.tspan=!1,DD(i,R);const B=F.width;let z;w===v?bn.rightAngles?z=i.append("path").attr("d",`M ${w},${f} H ${w+ei.getMax(bn.width/2,B/2)} V ${f+25} H ${w}`):z=i.append("path").attr("d","M "+w+","+f+" C "+(w+60)+","+(f-10)+" "+(w+60)+","+(f+30)+" "+w+","+(f+20)):(z=i.append("line"),z.attr("x1",w),z.attr("y1",f),z.attr("x2",v),z.attr("y2",f)),S===g.db.LINETYPE.DOTTED||S===g.db.LINETYPE.DOTTED_CROSS||S===g.db.LINETYPE.DOTTED_POINT||S===g.db.LINETYPE.DOTTED_OPEN?(z.style("stroke-dasharray","3, 3"),z.attr("class","messageLine1")):z.attr("class","messageLine0");let Y="";bn.arrowMarkerAbsolute&&(Y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,Y=Y.replace(/\(/g,"\\("),Y=Y.replace(/\)/g,"\\)")),z.attr("stroke-width",2),z.attr("stroke","none"),z.style("fill","none"),(S===g.db.LINETYPE.SOLID||S===g.db.LINETYPE.DOTTED)&&z.attr("marker-end","url("+Y+"#arrowhead)"),(S===g.db.LINETYPE.SOLID_POINT||S===g.db.LINETYPE.DOTTED_POINT)&&z.attr("marker-end","url("+Y+"#filled-head)"),(S===g.db.LINETYPE.SOLID_CROSS||S===g.db.LINETYPE.DOTTED_CROSS)&&z.attr("marker-end","url("+Y+"#crosshead)"),(M||bn.showSequenceNumbers)&&(z.attr("marker-start","url("+Y+"#sequencenumber)"),i.append("text").attr("x",w).attr("y",f+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(_))},rJe=function(i,a,f,g,w,v,b){let E=0,S=0,_,M=0;for(const F of g){const R=a[F],B=R.box;_&&_!=B&&(b||Wr.models.addBox(_),S+=bn.boxMargin+_.margin),B&&B!=_&&(b||(B.x=E+S,B.y=w),S+=B.margin),R.width=R.width||bn.width,R.height=ei.getMax(R.height||bn.height,bn.height),R.margin=R.margin||bn.actorMargin,M=ei.getMax(M,R.height),f[R.name]&&(S+=R.width/2),R.x=E+S,R.starty=Wr.getVerticalPos(),Wr.insert(R.x,w,R.x+R.width,R.height),E+=R.width+S,R.box&&(R.box.width=E+B.margin-R.box.x),S=R.margin,_=R.box,Wr.models.addActor(R)}_&&!b&&Wr.models.addBox(_),Wr.bumpVerticalPos(M)},jbt=function(i,a,f,g){if(g){let w=0;Wr.bumpVerticalPos(bn.boxMargin*2);for(const v of f){const b=a[v];b.stopy||(b.stopy=Wr.getVerticalPos());const E=_f.drawActor(i,b,bn,!0);w=ei.getMax(w,E)}Wr.bumpVerticalPos(w+bn.boxMargin)}else for(const w of f){const v=a[w];_f.drawActor(i,v,bn,!1)}},Cqt=function(i,a,f,g){let w=0,v=0;for(const b of f){const E=a[b],S=oJe(E),_=_f.drawPopup(i,E,S,bn,bn.forceMenus,g);_.height>w&&(w=_.height),_.width+E.x>v&&(v=_.width+E.x)}return{maxHeight:w,maxWidth:v}},Sqt=function(i){Ld(bn,i),i.fontFamily&&(bn.actorFontFamily=bn.noteFontFamily=bn.messageFontFamily=i.fontFamily),i.fontSize&&(bn.actorFontSize=bn.noteFontSize=bn.messageFontSize=i.fontSize),i.fontWeight&&(bn.actorFontWeight=bn.noteFontWeight=bn.messageFontWeight=i.fontWeight)},bX=function(i){return Wr.activations.filter(function(a){return a.actor===i})},_qt=function(i,a){const f=a[i],g=bX(i),w=g.reduce(function(b,E){return ei.getMin(b,E.startx)},f.x+f.width/2-1),v=g.reduce(function(b,E){return ei.getMax(b,E.stopx)},f.x+f.width/2+1);return[w,v]};function d4(i,a,f,g,w){Wr.bumpVerticalPos(f);let v=g;if(a.id&&a.message&&i[a.id]){const b=i[a.id].width,E=R9(bn);a.message=uo.wrapLabel(`[${a.message}]`,b-2*bn.wrapPadding,E),a.width=b,a.wrap=!0;const S=uo.calculateTextDimensions(a.message,E),_=ei.getMax(S.height,bn.labelBoxHeight);v=g+_,Kt.debug(`${_} - ${a.message}`)}w(a),Wr.bumpVerticalPos(v)}function iJe(i,a,f,g,w,v,b){function E(_,M){_.x<w[i.from].x?(Wr.insert(a.stopx-M,a.starty,a.startx,a.stopy+_.height/2+bn.noteMargin),a.stopx=a.stopx+M):(Wr.insert(a.startx,a.starty,a.stopx+M,a.stopy+_.height/2+bn.noteMargin),a.stopx=a.stopx-M)}function S(_,M){_.x<w[i.to].x?(Wr.insert(a.startx-M,a.starty,a.stopx,a.stopy+_.height/2+bn.noteMargin),a.startx=a.startx+M):(Wr.insert(a.stopx,a.starty,a.startx+M,a.stopy+_.height/2+bn.noteMargin),a.startx=a.startx-M)}if(v[i.to]==g){const _=w[i.to],M=_.type=="actor"?B9/2+3:_.width/2+3;E(_,M),_.starty=f-_.height/2,Wr.bumpVerticalPos(_.height/2)}else if(b[i.from]==g){const _=w[i.from];if(bn.mirrorActors){const M=_.type=="actor"?B9/2:_.width/2;S(_,M)}_.stopy=f-_.height/2,Wr.bumpVerticalPos(_.height/2)}else if(b[i.to]==g){const _=w[i.to];if(bn.mirrorActors){const M=_.type=="actor"?B9/2+3:_.width/2+3;E(_,M)}_.stopy=f-_.height/2,Wr.bumpVerticalPos(_.height/2)}}const sJe=function(i,a,f,g){const{securityLevel:w,sequence:v}=Re();bn=v;let b;w==="sandbox"&&(b=Tr("#i"+a));const E=Tr(w==="sandbox"?b.nodes()[0].contentDocument.body:"body"),S=w==="sandbox"?b.nodes()[0].contentDocument:document;Wr.init(),Kt.debug(g.db);const _=w==="sandbox"?E.select(`[id="${a}"]`):Tr(`[id="${a}"]`),M=g.db.getActors(),F=g.db.getCreatedActors(),R=g.db.getDestroyedActors(),B=g.db.getBoxes();let z=g.db.getActorKeys();const Y=g.db.getMessages(),nt=g.db.getDiagramTitle(),ot=g.db.hasAtLeastOneBox(),ft=g.db.hasAtLeastOneBoxWithTitle(),wt=aJe(M,Y,g);if(bn.height=cJe(M,wt,B),_f.insertComputerIcon(_),_f.insertDatabaseIcon(_),_f.insertClockIcon(_),ot&&(Wr.bumpVerticalPos(bn.boxMargin),ft&&Wr.bumpVerticalPos(B[0].textMaxHeight)),bn.hideUnusedParticipants===!0){const xt=new Set;Y.forEach(Ft=>{xt.add(Ft.from),xt.add(Ft.to)}),z=z.filter(Ft=>xt.has(Ft))}rJe(_,M,F,z,0,Y,!1);const mt=hJe(Y,M,wt,g);_f.insertArrowHead(_),_f.insertArrowCrossHead(_),_f.insertArrowFilledHead(_),_f.insertSequenceNumber(_);function ct(xt,Ft){const Ct=Wr.endActivation(xt);Ct.starty+18>Ft&&(Ct.starty=Ft-6,Ft+=12),_f.drawActivation(_,Ct,Ft,bn,bX(xt.from.actor).length),Wr.insert(Ct.startx,Ft-10,Ct.stopx,Ft)}let rt=1,it=1;const gt=[],Q=[];Y.forEach(function(xt,Ft){let Ct,kt,Gt;switch(xt.type){case g.db.LINETYPE.NOTE:Wr.resetVerticalPos(),kt=xt.noteModel,tJe(_,kt);break;case g.db.LINETYPE.ACTIVE_START:Wr.newActivation(xt,_,M);break;case g.db.LINETYPE.ACTIVE_END:ct(xt,Wr.getVerticalPos());break;case g.db.LINETYPE.LOOP_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.LOOP_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"loop",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.RECT_START:d4(mt,xt,bn.boxMargin,bn.boxMargin,Fe=>Wr.newLoop(void 0,Fe.message));break;case g.db.LINETYPE.RECT_END:Ct=Wr.endLoop(),Q.push(Ct),Wr.models.addLoop(Ct),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos());break;case g.db.LINETYPE.OPT_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.OPT_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"opt",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.ALT_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.ALT_ELSE:d4(mt,xt,bn.boxMargin+bn.boxTextMargin,bn.boxMargin,Fe=>Wr.addSectionToLoop(Fe));break;case g.db.LINETYPE.ALT_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"alt",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.PAR_START:case g.db.LINETYPE.PAR_OVER_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe)),Wr.saveVerticalPos();break;case g.db.LINETYPE.PAR_AND:d4(mt,xt,bn.boxMargin+bn.boxTextMargin,bn.boxMargin,Fe=>Wr.addSectionToLoop(Fe));break;case g.db.LINETYPE.PAR_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"par",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.AUTONUMBER:rt=xt.message.start||rt,it=xt.message.step||it,xt.message.visible?g.db.enableSequenceNumbers():g.db.disableSequenceNumbers();break;case g.db.LINETYPE.CRITICAL_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.CRITICAL_OPTION:d4(mt,xt,bn.boxMargin+bn.boxTextMargin,bn.boxMargin,Fe=>Wr.addSectionToLoop(Fe));break;case g.db.LINETYPE.CRITICAL_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"critical",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;case g.db.LINETYPE.BREAK_START:d4(mt,xt,bn.boxMargin,bn.boxMargin+bn.boxTextMargin,Fe=>Wr.newLoop(Fe));break;case g.db.LINETYPE.BREAK_END:Ct=Wr.endLoop(),_f.drawLoop(_,Ct,"break",bn),Wr.bumpVerticalPos(Ct.stopy-Wr.getVerticalPos()),Wr.models.addLoop(Ct);break;default:try{Gt=xt.msgModel,Gt.starty=Wr.getVerticalPos(),Gt.sequenceIndex=rt,Gt.sequenceVisible=g.db.showSequenceNumbers();const Fe=eJe(_,Gt);iJe(xt,Gt,Fe,Ft,M,F,R),gt.push({messageModel:Gt,lineStartY:Fe}),Wr.models.addMessage(Gt)}catch(Fe){Kt.error("error while drawing message",Fe)}}[g.db.LINETYPE.SOLID_OPEN,g.db.LINETYPE.DOTTED_OPEN,g.db.LINETYPE.SOLID,g.db.LINETYPE.DOTTED,g.db.LINETYPE.SOLID_CROSS,g.db.LINETYPE.DOTTED_CROSS,g.db.LINETYPE.SOLID_POINT,g.db.LINETYPE.DOTTED_POINT].includes(xt.type)&&(rt=rt+it)}),Kt.debug("createdActors",F),Kt.debug("destroyedActors",R),jbt(_,M,z,!1),gt.forEach(xt=>nJe(_,xt.messageModel,xt.lineStartY,g)),bn.mirrorActors&&jbt(_,M,z,!0),Q.forEach(xt=>_f.drawBackgroundRect(_,xt)),kqt(_,M,z,bn),Wr.models.boxes.forEach(function(xt){xt.height=Wr.getVerticalPos()-xt.y,Wr.insert(xt.x,xt.y,xt.x+xt.width,xt.height),xt.startx=xt.x,xt.starty=xt.y,xt.stopx=xt.startx+xt.width,xt.stopy=xt.starty+xt.height,xt.stroke="rgb(0,0,0, 0.5)",_f.drawBox(_,xt,bn)}),ot&&Wr.bumpVerticalPos(bn.boxMargin);const dt=Cqt(_,M,z,S),{bounds:K}=Wr.getBounds();let yt=K.stopy-K.starty;yt<dt.maxHeight&&(yt=dt.maxHeight);let V=yt+2*bn.diagramMarginY;bn.mirrorActors&&(V=V-bn.boxMargin+bn.bottomMarginAdj);let Ot=K.stopx-K.startx;Ot<dt.maxWidth&&(Ot=dt.maxWidth);const It=Ot+2*bn.diagramMarginX;nt&&_.append("text").text(nt).attr("x",(K.stopx-K.startx)/2-2*bn.diagramMarginX).attr("y",-25),sg(_,V,It,bn.useMaxWidth);const jt=nt?40:0;_.attr("viewBox",K.startx-bn.diagramMarginX+" -"+(bn.diagramMarginY+jt)+" "+It+" "+(V+jt)),Kt.debug("models:",Wr.models)};function aJe(i,a,f){const g={};return a.forEach(function(w){if(i[w.to]&&i[w.from]){const v=i[w.to];if(w.placement===f.db.PLACEMENT.LEFTOF&&!v.prevActor||w.placement===f.db.PLACEMENT.RIGHTOF&&!v.nextActor)return;const b=w.placement!==void 0,E=!b,S=b?MD(bn):R9(bn),_=w.wrap?uo.wrapLabel(w.message,bn.width-2*bn.wrapPadding,S):w.message,F=uo.calculateTextDimensions(_,S).width+2*bn.wrapPadding;E&&w.from===v.nextActor?g[w.to]=ei.getMax(g[w.to]||0,F):E&&w.from===v.prevActor?g[w.from]=ei.getMax(g[w.from]||0,F):E&&w.from===w.to?(g[w.from]=ei.getMax(g[w.from]||0,F/2),g[w.to]=ei.getMax(g[w.to]||0,F/2)):w.placement===f.db.PLACEMENT.RIGHTOF?g[w.from]=ei.getMax(g[w.from]||0,F):w.placement===f.db.PLACEMENT.LEFTOF?g[v.prevActor]=ei.getMax(g[v.prevActor]||0,F):w.placement===f.db.PLACEMENT.OVER&&(v.prevActor&&(g[v.prevActor]=ei.getMax(g[v.prevActor]||0,F/2)),v.nextActor&&(g[w.from]=ei.getMax(g[w.from]||0,F/2)))}}),Kt.debug("maxMessageWidthPerActor:",g),g}const oJe=function(i){let a=0;const f=Rbt(bn);for(const g in i.links){const v=uo.calculateTextDimensions(g,f).width+2*bn.wrapPadding+2*bn.boxMargin;a<v&&(a=v)}return a};function cJe(i,a,f){let g=0;Object.keys(i).forEach(v=>{const b=i[v];b.wrap&&(b.description=uo.wrapLabel(b.description,bn.width-2*bn.wrapPadding,Rbt(bn)));const E=uo.calculateTextDimensions(b.description,Rbt(bn));b.width=b.wrap?bn.width:ei.getMax(bn.width,E.width+2*bn.wrapPadding),b.height=b.wrap?ei.getMax(E.height,bn.height):bn.height,g=ei.getMax(g,b.height)});for(const v in a){const b=i[v];if(!b)continue;const E=i[b.nextActor];if(!E){const F=a[v]+bn.actorMargin-b.width/2;b.margin=ei.getMax(F,bn.actorMargin);continue}const _=a[v]+bn.actorMargin-b.width/2-E.width/2;b.margin=ei.getMax(_,bn.actorMargin)}let w=0;return f.forEach(v=>{const b=R9(bn);let E=v.actorKeys.reduce((M,F)=>M+=i[F].width+(i[F].margin||0),0);E-=2*bn.boxTextMargin,v.wrap&&(v.name=uo.wrapLabel(v.name,E-2*bn.wrapPadding,b));const S=uo.calculateTextDimensions(v.name,b);w=ei.getMax(S.height,w);const _=ei.getMax(E,S.width+2*bn.wrapPadding);if(v.margin=bn.boxTextMargin,E<_){const M=(_-E)/2;v.margin+=M}}),f.forEach(v=>v.textMaxHeight=w),ei.getMax(g,bn.height)}const uJe=function(i,a,f){const g=a[i.from].x,w=a[i.to].x,v=i.wrap&&i.message;let b=uo.calculateTextDimensions(v?uo.wrapLabel(i.message,bn.width,MD(bn)):i.message,MD(bn));const E={width:v?bn.width:ei.getMax(bn.width,b.width+2*bn.noteMargin),height:0,startx:a[i.from].x,stopx:0,starty:0,stopy:0,message:i.message};return i.placement===f.db.PLACEMENT.RIGHTOF?(E.width=v?ei.getMax(bn.width,b.width):ei.getMax(a[i.from].width/2+a[i.to].width/2,b.width+2*bn.noteMargin),E.startx=g+(a[i.from].width+bn.actorMargin)/2):i.placement===f.db.PLACEMENT.LEFTOF?(E.width=v?ei.getMax(bn.width,b.width+2*bn.noteMargin):ei.getMax(a[i.from].width/2+a[i.to].width/2,b.width+2*bn.noteMargin),E.startx=g-E.width+(a[i.from].width-bn.actorMargin)/2):i.to===i.from?(b=uo.calculateTextDimensions(v?uo.wrapLabel(i.message,ei.getMax(bn.width,a[i.from].width),MD(bn)):i.message,MD(bn)),E.width=v?ei.getMax(bn.width,a[i.from].width):ei.getMax(a[i.from].width,bn.width,b.width+2*bn.noteMargin),E.startx=g+(a[i.from].width-E.width)/2):(E.width=Math.abs(g+a[i.from].width/2-(w+a[i.to].width/2))+bn.actorMargin,E.startx=g<w?g+a[i.from].width/2-bn.actorMargin/2:w+a[i.to].width/2-bn.actorMargin/2),v&&(E.message=uo.wrapLabel(i.message,E.width-2*bn.wrapPadding,MD(bn))),Kt.debug(`NM:[${E.startx},${E.stopx},${E.starty},${E.stopy}:${E.width},${E.height}=${i.message}]`),E},lJe=function(i,a,f){if(![f.db.LINETYPE.SOLID_OPEN,f.db.LINETYPE.DOTTED_OPEN,f.db.LINETYPE.SOLID,f.db.LINETYPE.DOTTED,f.db.LINETYPE.SOLID_CROSS,f.db.LINETYPE.DOTTED_CROSS,f.db.LINETYPE.SOLID_POINT,f.db.LINETYPE.DOTTED_POINT].includes(i.type))return{};const[g,w]=_qt(i.from,a),[v,b]=_qt(i.to,a),E=g<=v,S=E?w:g;let _=E?v:b;const M=Math.abs(v-b)>2,F=Y=>E?-Y:Y;i.from===i.to?_=S:(i.activate&&!M&&(_+=F(bn.activationWidth/2-1)),[f.db.LINETYPE.SOLID_OPEN,f.db.LINETYPE.DOTTED_OPEN].includes(i.type)||(_+=F(3)));const R=[g,w,v,b],B=Math.abs(S-_);i.wrap&&i.message&&(i.message=uo.wrapLabel(i.message,ei.getMax(B+2*bn.wrapPadding,bn.width),R9(bn)));const z=uo.calculateTextDimensions(i.message,R9(bn));return{width:ei.getMax(i.wrap?0:z.width+2*bn.wrapPadding,B+2*bn.wrapPadding,bn.width),height:0,startx:S,stopx:_,starty:0,stopy:0,message:i.message,type:i.type,wrap:i.wrap,fromBounds:Math.min.apply(null,R),toBounds:Math.max.apply(null,R)}},hJe=function(i,a,f,g){const w={},v=[];let b,E,S;return i.forEach(function(_){switch(_.id=uo.random({length:10}),_.type){case g.db.LINETYPE.LOOP_START:case g.db.LINETYPE.ALT_START:case g.db.LINETYPE.OPT_START:case g.db.LINETYPE.PAR_START:case g.db.LINETYPE.PAR_OVER_START:case g.db.LINETYPE.CRITICAL_START:case g.db.LINETYPE.BREAK_START:v.push({id:_.id,msg:_.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case g.db.LINETYPE.ALT_ELSE:case g.db.LINETYPE.PAR_AND:case g.db.LINETYPE.CRITICAL_OPTION:_.message&&(b=v.pop(),w[b.id]=b,w[_.id]=b,v.push(b));break;case g.db.LINETYPE.LOOP_END:case g.db.LINETYPE.ALT_END:case g.db.LINETYPE.OPT_END:case g.db.LINETYPE.PAR_END:case g.db.LINETYPE.CRITICAL_END:case g.db.LINETYPE.BREAK_END:b=v.pop(),w[b.id]=b;break;case g.db.LINETYPE.ACTIVE_START:{const F=a[_.from?_.from.actor:_.to.actor],R=bX(_.from?_.from.actor:_.to.actor).length,B=F.x+F.width/2+(R-1)*bn.activationWidth/2,z={startx:B,stopx:B+bn.activationWidth,actor:_.from.actor,enabled:!0};Wr.activations.push(z)}break;case g.db.LINETYPE.ACTIVE_END:{const F=Wr.activations.map(R=>R.actor).lastIndexOf(_.from.actor);delete Wr.activations.splice(F,1)[0]}break}_.placement!==void 0?(E=uJe(_,a,g),_.noteModel=E,v.forEach(F=>{b=F,b.from=ei.getMin(b.from,E.startx),b.to=ei.getMax(b.to,E.startx+E.width),b.width=ei.getMax(b.width,Math.abs(b.from-b.to))-bn.labelBoxWidth})):(S=lJe(_,a,g),_.msgModel=S,S.startx&&S.stopx&&v.length>0&&v.forEach(F=>{if(b=F,S.startx===S.stopx){const R=a[_.from],B=a[_.to];b.from=ei.getMin(R.x-S.width/2,R.x-R.width/2,b.from),b.to=ei.getMax(B.x+S.width/2,B.x+R.width/2,b.to),b.width=ei.getMax(b.width,Math.abs(b.to-b.from))-bn.labelBoxWidth}else b.from=ei.getMin(S.startx,b.from),b.to=ei.getMax(S.stopx,b.to),b.width=ei.getMax(b.width,S.width)-bn.labelBoxWidth}))}),Wr.activations=[],Kt.debug("Loop type widths:",w),w},fJe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:lQe,db:mqt,renderer:{bounds:Wr,drawActors:jbt,drawActorsPopup:Cqt,setConf:Sqt,draw:sJe},styles:PQe,init:({wrap:i})=>{mqt.setWrap(i)}}},Symbol.toStringTag,{value:"Module"}));var $bt=function(){var i=function(za,br,An,Nn){for(An=An||{},Nn=za.length;Nn--;An[za[Nn]]=br);return An},a=[1,17],f=[1,18],g=[1,19],w=[1,39],v=[1,40],b=[1,25],E=[1,23],S=[1,24],_=[1,31],M=[1,32],F=[1,33],R=[1,34],B=[1,35],z=[1,36],Y=[1,26],nt=[1,27],ot=[1,28],ft=[1,29],wt=[1,43],mt=[1,30],ct=[1,42],rt=[1,44],it=[1,41],gt=[1,45],Q=[1,9],dt=[1,8,9],K=[1,56],yt=[1,57],V=[1,58],Ot=[1,59],It=[1,60],jt=[1,61],xt=[1,62],Ft=[1,8,9,39],Ct=[1,74],kt=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],Gt=[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],Fe=[13,74,80,95,97,98],Mt=[13,64,65,74,80,95,97,98],pn=[13,59,60,61,62,63,74,80,95,97,98],Ae=[1,93],ye=[1,110],tn=[1,108],sn=[1,102],be=[1,103],Ne=[1,104],Xt=[1,105],_e=[1,106],xe=[1,107],Mn=[1,109],ce=[1,8,9,37,39,42],Br=[1,8,9,21],we=[1,8,9,78],Fi=[1,8,9,21,73,74,78,80,81,82,83,84,85],mi={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:function(br,An,Nn,Bn,ke,pe,Je){var an=pe.length-1;switch(ke){case 8:this.$=pe[an-1];break;case 9:case 11:case 12:this.$=pe[an];break;case 10:case 13:this.$=pe[an-1]+pe[an];break;case 14:case 15:this.$=pe[an-1]+"~"+pe[an]+"~";break;case 16:Bn.addRelation(pe[an]);break;case 17:pe[an-1].title=Bn.cleanupLabel(pe[an]),Bn.addRelation(pe[an-1]);break;case 27:this.$=pe[an].trim(),Bn.setAccTitle(this.$);break;case 28:case 29:this.$=pe[an].trim(),Bn.setAccDescription(this.$);break;case 30:Bn.addClassesToNamespace(pe[an-3],pe[an-1]);break;case 31:Bn.addClassesToNamespace(pe[an-4],pe[an-1]);break;case 32:this.$=pe[an],Bn.addNamespace(pe[an]);break;case 33:this.$=[pe[an]];break;case 34:this.$=[pe[an-1]];break;case 35:pe[an].unshift(pe[an-2]),this.$=pe[an];break;case 37:Bn.setCssClass(pe[an-2],pe[an]);break;case 38:Bn.addMembers(pe[an-3],pe[an-1]);break;case 39:Bn.setCssClass(pe[an-5],pe[an-3]),Bn.addMembers(pe[an-5],pe[an-1]);break;case 40:this.$=pe[an],Bn.addClass(pe[an]);break;case 41:this.$=pe[an-1],Bn.addClass(pe[an-1]),Bn.setClassLabel(pe[an-1],pe[an]);break;case 42:Bn.addAnnotation(pe[an],pe[an-2]);break;case 43:this.$=[pe[an]];break;case 44:pe[an].push(pe[an-1]),this.$=pe[an];break;case 45:break;case 46:Bn.addMember(pe[an-1],Bn.cleanupLabel(pe[an]));break;case 47:break;case 48:break;case 49:this.$={id1:pe[an-2],id2:pe[an],relation:pe[an-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:pe[an-3],id2:pe[an],relation:pe[an-1],relationTitle1:pe[an-2],relationTitle2:"none"};break;case 51:this.$={id1:pe[an-3],id2:pe[an],relation:pe[an-2],relationTitle1:"none",relationTitle2:pe[an-1]};break;case 52:this.$={id1:pe[an-4],id2:pe[an],relation:pe[an-2],relationTitle1:pe[an-3],relationTitle2:pe[an-1]};break;case 53:Bn.addNote(pe[an],pe[an-1]);break;case 54:Bn.addNote(pe[an]);break;case 55:Bn.setDirection("TB");break;case 56:Bn.setDirection("BT");break;case 57:Bn.setDirection("RL");break;case 58:Bn.setDirection("LR");break;case 59:this.$={type1:pe[an-2],type2:pe[an],lineType:pe[an-1]};break;case 60:this.$={type1:"none",type2:pe[an],lineType:pe[an-1]};break;case 61:this.$={type1:pe[an-1],type2:"none",lineType:pe[an]};break;case 62:this.$={type1:"none",type2:"none",lineType:pe[an]};break;case 63:this.$=Bn.relationType.AGGREGATION;break;case 64:this.$=Bn.relationType.EXTENSION;break;case 65:this.$=Bn.relationType.COMPOSITION;break;case 66:this.$=Bn.relationType.DEPENDENCY;break;case 67:this.$=Bn.relationType.LOLLIPOP;break;case 68:this.$=Bn.lineType.LINE;break;case 69:this.$=Bn.lineType.DOTTED_LINE;break;case 70:case 76:this.$=pe[an-2],Bn.setClickEvent(pe[an-1],pe[an]);break;case 71:case 77:this.$=pe[an-3],Bn.setClickEvent(pe[an-2],pe[an-1]),Bn.setTooltip(pe[an-2],pe[an]);break;case 72:this.$=pe[an-2],Bn.setLink(pe[an-1],pe[an]);break;case 73:this.$=pe[an-3],Bn.setLink(pe[an-2],pe[an-1],pe[an]);break;case 74:this.$=pe[an-3],Bn.setLink(pe[an-2],pe[an-1]),Bn.setTooltip(pe[an-2],pe[an]);break;case 75:this.$=pe[an-4],Bn.setLink(pe[an-3],pe[an-2],pe[an]),Bn.setTooltip(pe[an-3],pe[an-1]);break;case 78:this.$=pe[an-3],Bn.setClickEvent(pe[an-2],pe[an-1],pe[an]);break;case 79:this.$=pe[an-4],Bn.setClickEvent(pe[an-3],pe[an-2],pe[an-1]),Bn.setTooltip(pe[an-3],pe[an]);break;case 80:this.$=pe[an-3],Bn.setLink(pe[an-2],pe[an]);break;case 81:this.$=pe[an-4],Bn.setLink(pe[an-3],pe[an-1],pe[an]);break;case 82:this.$=pe[an-4],Bn.setLink(pe[an-3],pe[an-1]),Bn.setTooltip(pe[an-3],pe[an]);break;case 83:this.$=pe[an-5],Bn.setLink(pe[an-4],pe[an-2],pe[an]),Bn.setTooltip(pe[an-4],pe[an-1]);break;case 84:this.$=pe[an-2],Bn.setCssStyle(pe[an-1],pe[an]);break;case 85:Bn.setCssClass(pe[an-1],pe[an]);break;case 86:this.$=[pe[an]];break;case 87:pe[an-2].push(pe[an]),this.$=pe[an-2];break;case 89:this.$=pe[an-1]+pe[an];break}},table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:a,33:f,35:g,36:21,40:w,41:22,44:v,45:b,47:E,48:S,50:_,52:M,53:F,54:R,55:B,56:z,66:Y,67:nt,69:ot,73:ft,74:wt,76:mt,80:ct,95:rt,97:it,98:gt},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(Q,[2,5],{8:[1,46]}),{8:[1,47]},i(dt,[2,16],{21:[1,48]}),i(dt,[2,18]),i(dt,[2,19]),i(dt,[2,20]),i(dt,[2,21]),i(dt,[2,22]),i(dt,[2,23]),i(dt,[2,24]),i(dt,[2,25]),i(dt,[2,26]),{32:[1,49]},{34:[1,50]},i(dt,[2,29]),i(dt,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:K,60:yt,61:V,62:Ot,63:It,64:jt,65:xt}),{37:[1,63]},i(Ft,[2,36],{37:[1,65],42:[1,64]}),i(dt,[2,47]),i(dt,[2,48]),{16:66,74:wt,80:ct,95:rt,97:it},{16:37,17:67,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{16:37,17:68,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{16:37,17:69,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{13:Ct,51:73},i(dt,[2,55]),i(dt,[2,56]),i(dt,[2,57]),i(dt,[2,58]),i(kt,[2,11],{16:37,18:38,17:75,19:[1,76],74:wt,80:ct,95:rt,97:it,98:gt}),i(kt,[2,12],{19:[1,77]}),{15:78,16:79,74:wt,80:ct,95:rt,97:it},{16:37,17:80,18:38,74:wt,80:ct,95:rt,97:it,98:gt},i(Gt,[2,112]),i(Gt,[2,113]),i(Gt,[2,114]),i(Gt,[2,115]),i([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),i(Q,[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:a,33:f,35:g,40:w,44:v,45:b,47:E,48:S,50:_,52:M,53:F,54:R,55:B,56:z,66:Y,67:nt,69:ot,73:ft,74:wt,76:mt,80:ct,95:rt,97:it,98:gt}),{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:a,33:f,35:g,36:21,40:w,41:22,44:v,45:b,47:E,48:S,50:_,52:M,53:F,54:R,55:B,56:z,66:Y,67:nt,69:ot,73:ft,74:wt,76:mt,80:ct,95:rt,97:it,98:gt},i(dt,[2,17]),i(dt,[2,27]),i(dt,[2,28]),{13:[1,84],16:37,17:83,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{49:85,57:54,58:55,59:K,60:yt,61:V,62:Ot,63:It,64:jt,65:xt},i(dt,[2,46]),{58:86,64:jt,65:xt},i(Fe,[2,62],{57:87,59:K,60:yt,61:V,62:Ot,63:It}),i(Mt,[2,63]),i(Mt,[2,64]),i(Mt,[2,65]),i(Mt,[2,66]),i(Mt,[2,67]),i(pn,[2,68]),i(pn,[2,69]),{8:[1,89],23:90,38:88,41:22,44:v},{16:91,74:wt,80:ct,95:rt,97:it},{43:92,47:Ae},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:ye,73:tn,74:sn,75:99,77:100,79:101,80:be,81:Ne,82:Xt,83:_e,84:xe,85:Mn},{74:[1,111]},{13:Ct,51:112},i(dt,[2,54]),i(dt,[2,117]),i(kt,[2,13]),i(kt,[2,14]),i(kt,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:wt,80:ct,95:rt,97:it},i(ce,[2,40],{11:114,12:[1,115]}),i(Q,[2,7]),{9:[1,116]},i(Br,[2,49]),{16:37,17:117,18:38,74:wt,80:ct,95:rt,97:it,98:gt},{13:[1,119],16:37,17:118,18:38,74:wt,80:ct,95:rt,97:it,98:gt},i(Fe,[2,61],{57:120,59:K,60:yt,61:V,62:Ot,63:It}),i(Fe,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:v},{8:[1,123],39:[2,33]},i(Ft,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:Ae},{16:37,17:127,18:38,74:wt,80:ct,95:rt,97:it,98:gt},i(dt,[2,70],{13:[1,128]}),i(dt,[2,72],{13:[1,130],68:[1,129]}),i(dt,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},i(dt,[2,84],{78:[1,134]}),i(we,[2,86],{79:135,21:ye,73:tn,74:sn,80:be,81:Ne,82:Xt,83:_e,84:xe,85:Mn}),i(Fi,[2,88]),i(Fi,[2,90]),i(Fi,[2,91]),i(Fi,[2,92]),i(Fi,[2,93]),i(Fi,[2,94]),i(Fi,[2,95]),i(Fi,[2,96]),i(Fi,[2,97]),i(Fi,[2,98]),i(dt,[2,85]),i(dt,[2,53]),{37:[2,10]},i(ce,[2,41]),{13:[1,136]},{1:[2,4]},i(Br,[2,51]),i(Br,[2,50]),{16:37,17:137,18:38,74:wt,80:ct,95:rt,97:it,98:gt},i(Fe,[2,59]),i(dt,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:v},{43:140,47:Ae},i(Ft,[2,38]),{39:[2,44]},i(dt,[2,42]),i(dt,[2,71]),i(dt,[2,73]),i(dt,[2,74],{68:[1,141]}),i(dt,[2,77]),i(dt,[2,78],{13:[1,142]}),i(dt,[2,80],{13:[1,144],68:[1,143]}),{21:ye,73:tn,74:sn,77:145,79:101,80:be,81:Ne,82:Xt,83:_e,84:xe,85:Mn},i(Fi,[2,89]),{14:[1,146]},i(Br,[2,52]),i(dt,[2,31]),{39:[2,35]},{39:[1,147]},i(dt,[2,75]),i(dt,[2,79]),i(dt,[2,81]),i(dt,[2,82],{68:[1,148]}),i(we,[2,87],{79:135,21:ye,73:tn,74:sn,80:be,81:Ne,82:Xt,83:_e,84:xe,85:Mn}),i(ce,[2,8]),i(Ft,[2,39]),i(dt,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:function(br,An){if(An.recoverable)this.trace(br);else{var Nn=new Error(br);throw Nn.hash=An,Nn}},parse:function(br){var An=this,Nn=[0],Bn=[],ke=[null],pe=[],Je=this.table,an="",xn=0,qa=0,xo=2,ko=1,va=pe.slice.call(arguments,1),Ha=Object.create(this.lexer),ds={yy:{}};for(var Fu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Fu)&&(ds.yy[Fu]=this.yy[Fu]);Ha.setInput(br,ds.yy),ds.yy.lexer=Ha,ds.yy.parser=this,typeof Ha.yylloc>"u"&&(Ha.yylloc={});var Zs=Ha.yylloc;pe.push(Zs);var d1=Ha.options&&Ha.options.ranges;typeof ds.yy.parseError=="function"?this.parseError=ds.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I2(){var ea;return ea=Bn.pop()||Ha.lex()||ko,typeof ea!="number"&&(ea instanceof Array&&(Bn=ea,ea=Bn.pop()),ea=An.symbols_[ea]||ea),ea}for(var ll,Ic,wc,Ea,gu={},ta,fo,mc,ca;;){if(Ic=Nn[Nn.length-1],this.defaultActions[Ic]?wc=this.defaultActions[Ic]:((ll===null||typeof ll>"u")&&(ll=I2()),wc=Je[Ic]&&Je[Ic][ll]),typeof wc>"u"||!wc.length||!wc[0]){var ya="";ca=[];for(ta in Je[Ic])this.terminals_[ta]&&ta>xo&&ca.push("'"+this.terminals_[ta]+"'");Ha.showPosition?ya="Parse error on line "+(xn+1)+`:
984 `;let Bqt=0;const IJe=function(i,a,f,g,w){const v=function(ft){switch(ft){case w.db.relationType.AGGREGATION:return"aggregation";case w.db.relationType.EXTENSION:return"extension";case w.db.relationType.COMPOSITION:return"composition";case w.db.relationType.DEPENDENCY:return"dependency";case w.db.relationType.LOLLIPOP:return"lollipop"}};a.points=a.points.filter(ft=>!Number.isNaN(ft.y));const b=a.points,E=Ax().x(function(ft){return ft.x}).y(function(ft){return ft.y}).curve(wF),S=i.append("path").attr("d",E(b)).attr("id","edge"+Bqt).attr("class","relation");let _="";g.arrowMarkerAbsolute&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),f.relation.lineType==1&&S.attr("class","relation dashed-line"),f.relation.lineType==10&&S.attr("class","relation dotted-line"),f.relation.type1!=="none"&&S.attr("marker-start","url("+_+"#"+v(f.relation.type1)+"Start)"),f.relation.type2!=="none"&&S.attr("marker-end","url("+_+"#"+v(f.relation.type2)+"End)");let M,F;const R=a.points.length;let B=uo.calcLabelPosition(a.points);M=B.x,F=B.y;let z,Y,nt,ot;if(R%2!==0&&R>1){let ft=uo.calcCardinalityPosition(f.relation.type1!=="none",a.points,a.points[0]),wt=uo.calcCardinalityPosition(f.relation.type2!=="none",a.points,a.points[R-1]);Kt.debug("cardinality_1_point "+JSON.stringify(ft)),Kt.debug("cardinality_2_point "+JSON.stringify(wt)),z=ft.x,Y=ft.y,nt=wt.x,ot=wt.y}if(f.title!==void 0){const ft=i.append("g").attr("class","classLabel"),wt=ft.append("text").attr("class","label").attr("x",M).attr("y",F).attr("fill","red").attr("text-anchor","middle").text(f.title);window.label=wt;const mt=wt.node().getBBox();ft.insert("rect",":first-child").attr("class","box").attr("x",mt.x-g.padding/2).attr("y",mt.y-g.padding/2).attr("width",mt.width+g.padding).attr("height",mt.height+g.padding)}Kt.info("Rendering relation "+JSON.stringify(f)),f.relationTitle1!==void 0&&f.relationTitle1!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",z).attr("y",Y).attr("fill","black").attr("font-size","6").text(f.relationTitle1),f.relationTitle2!==void 0&&f.relationTitle2!=="none"&&i.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",nt).attr("y",ot).attr("fill","black").attr("font-size","6").text(f.relationTitle2),Bqt++},OJe=function(i,a,f,g){Kt.debug("Rendering class ",a,f);const w=a.id,v={id:w,label:a.id,width:0,height:0},b=i.append("g").attr("id",g.db.lookUpDomId(w)).attr("class","classGroup");let E;a.link?E=b.append("svg:a").attr("xlink:href",a.link).attr("target",a.linkTarget).append("text").attr("y",f.textHeight+f.padding).attr("x",0):E=b.append("text").attr("y",f.textHeight+f.padding).attr("x",0);let S=!0;a.annotations.forEach(function(wt){const mt=E.append("tspan").text("«"+wt+"»");S||mt.attr("dy",f.textHeight),S=!1});let _=Rqt(a);const M=E.append("tspan").text(_).attr("class","title");S||M.attr("dy",f.textHeight);const F=E.node().getBBox().height;let R,B,z;if(a.members.length>0){R=b.append("line").attr("x1",0).attr("y1",f.padding+F+f.dividerMargin/2).attr("y2",f.padding+F+f.dividerMargin/2);const wt=b.append("text").attr("x",f.padding).attr("y",F+f.dividerMargin+f.textHeight).attr("fill","white").attr("class","classText");S=!0,a.members.forEach(function(mt){jqt(wt,mt,S,f),S=!1}),B=wt.node().getBBox()}if(a.methods.length>0){z=b.append("line").attr("x1",0).attr("y1",f.padding+F+f.dividerMargin+B.height).attr("y2",f.padding+F+f.dividerMargin+B.height);const wt=b.append("text").attr("x",f.padding).attr("y",F+2*f.dividerMargin+B.height+f.textHeight).attr("fill","white").attr("class","classText");S=!0,a.methods.forEach(function(mt){jqt(wt,mt,S,f),S=!1})}const Y=b.node().getBBox();var nt=" ";a.cssClasses.length>0&&(nt=nt+a.cssClasses.join(" "));const ft=b.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",Y.width+2*f.padding).attr("height",Y.height+f.padding+.5*f.dividerMargin).attr("class",nt).node().getBBox().width;return E.node().childNodes.forEach(function(wt){wt.setAttribute("x",(ft-wt.getBBox().width)/2)}),a.tooltip&&E.insert("title").text(a.tooltip),R&&R.attr("x2",ft),z&&z.attr("x2",ft),v.width=ft,v.height=Y.height+f.padding+.5*f.dividerMargin,v},Rqt=function(i){let a=i.id;return i.type&&(a+="<"+kF(i.type)+">"),a},NJe=function(i,a,f,g){Kt.debug("Rendering note ",a,f);const w=a.id,v={id:w,text:a.text,width:0,height:0},b=i.append("g").attr("id",w).attr("class","classGroup");let E=b.append("text").attr("y",f.textHeight+f.padding).attr("x",0);const S=JSON.parse(`"${a.text}"`).split(`
1192 `,t2t={},fZe=(i,a)=>{t2t[i]=a},dZe=i=>t2t[i],rHt=()=>Object.keys(t2t),gZe={get:dZe,set:fZe,keys:rHt,size:()=>rHt().length},pZe=i=>i.append("circle").attr("class","start-state").attr("r",Re().state.sizeUnit).attr("cx",Re().state.padding+Re().state.sizeUnit).attr("cy",Re().state.padding+Re().state.sizeUnit),bZe=i=>i.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Re().state.textHeight).attr("class","divider").attr("x2",Re().state.textHeight*2).attr("y1",0).attr("y2",0),wZe=(i,a)=>{const f=i.append("text").attr("x",2*Re().state.padding).attr("y",Re().state.textHeight+2*Re().state.padding).attr("font-size",Re().state.fontSize).attr("class","state-title").text(a.id),g=f.node().getBBox();return i.insert("rect",":first-child").attr("x",Re().state.padding).attr("y",Re().state.padding).attr("width",g.width+2*Re().state.padding).attr("height",g.height+2*Re().state.padding).attr("rx",Re().state.radius),f},mZe=(i,a)=>{const f=function(R,B,z){const Y=R.append("tspan").attr("x",2*Re().state.padding).text(B);z||Y.attr("dy",Re().state.textHeight)},w=i.append("text").attr("x",2*Re().state.padding).attr("y",Re().state.textHeight+1.3*Re().state.padding).attr("font-size",Re().state.fontSize).attr("class","state-title").text(a.descriptions[0]).node().getBBox(),v=w.height,b=i.append("text").attr("x",Re().state.padding).attr("y",v+Re().state.padding*.4+Re().state.dividerMargin+Re().state.textHeight).attr("class","state-description");let E=!0,S=!0;a.descriptions.forEach(function(R){E||(f(b,R,S),S=!1),E=!1});const _=i.append("line").attr("x1",Re().state.padding).attr("y1",Re().state.padding+v+Re().state.dividerMargin/2).attr("y2",Re().state.padding+v+Re().state.dividerMargin/2).attr("class","descr-divider"),M=b.node().getBBox(),F=Math.max(M.width,w.width);return _.attr("x2",F+3*Re().state.padding),i.insert("rect",":first-child").attr("x",Re().state.padding).attr("y",Re().state.padding).attr("width",F+2*Re().state.padding).attr("height",M.height+v+2*Re().state.padding).attr("rx",Re().state.radius),i},vZe=(i,a,f)=>{const g=Re().state.padding,w=2*Re().state.padding,v=i.node().getBBox(),b=v.width,E=v.x,S=i.append("text").attr("x",0).attr("y",Re().state.titleShift).attr("font-size",Re().state.fontSize).attr("class","state-title").text(a.id),M=S.node().getBBox().width+w;let F=Math.max(M,b);F===b&&(F=F+w);let R;const B=i.node().getBBox();a.doc,R=E-g,M>b&&(R=(b-F)/2+g),Math.abs(E-B.x)<g&&M>b&&(R=E-(M-b)/2);const z=1-Re().state.textHeight;return i.insert("rect",":first-child").attr("x",R).attr("y",z).attr("class",f?"alt-composit":"composit").attr("width",F).attr("height",B.height+Re().state.textHeight+Re().state.titleShift+1).attr("rx","0"),S.attr("x",R+g),M<=b&&S.attr("x",E+(F-w)/2-M/2+g),i.insert("rect",":first-child").attr("x",R).attr("y",Re().state.titleShift-Re().state.textHeight-Re().state.padding).attr("width",F).attr("height",Re().state.textHeight*3).attr("rx",Re().state.radius),i.insert("rect",":first-child").attr("x",R).attr("y",Re().state.titleShift-Re().state.textHeight-Re().state.padding).attr("width",F).attr("height",B.height+3+2*Re().state.textHeight).attr("rx",Re().state.radius),i},yZe=i=>(i.append("circle").attr("class","end-state-outer").attr("r",Re().state.sizeUnit+Re().state.miniPadding).attr("cx",Re().state.padding+Re().state.sizeUnit+Re().state.miniPadding).attr("cy",Re().state.padding+Re().state.sizeUnit+Re().state.miniPadding),i.append("circle").attr("class","end-state-inner").attr("r",Re().state.sizeUnit).attr("cx",Re().state.padding+Re().state.sizeUnit+2).attr("cy",Re().state.padding+Re().state.sizeUnit+2)),xZe=(i,a)=>{let f=Re().state.forkWidth,g=Re().state.forkHeight;if(a.parentId){let w=f;f=g,g=w}return i.append("rect").style("stroke","black").style("fill","black").attr("width",f).attr("height",g).attr("x",Re().state.padding).attr("y",Re().state.padding)},kZe=(i,a,f,g)=>{let w=0;const v=g.append("text");v.style("text-anchor","start"),v.attr("class","noteText");let b=i.replace(/\r\n/g,"<br/>");b=b.replace(/\n/g,"<br/>");const E=b.split(ei.lineBreakRegex);let S=1.25*Re().state.noteMargin;for(const _ of E){const M=_.trim();if(M.length>0){const F=v.append("tspan");if(F.text(M),S===0){const R=F.node().getBBox();S+=R.height}w+=S,F.attr("x",a+Re().state.noteMargin),F.attr("y",f+w+1.25*Re().state.noteMargin)}}return{textWidth:v.node().getBBox().width,textHeight:w}},EZe=(i,a)=>{a.attr("class","state-note");const f=a.append("rect").attr("x",0).attr("y",Re().state.padding),g=a.append("g"),{textWidth:w,textHeight:v}=kZe(i,0,0,g);return f.attr("height",v+2*Re().state.noteMargin),f.attr("width",w+Re().state.noteMargin*2),f},iHt=function(i,a){const f=a.id,g={id:f,label:a.id,width:0,height:0},w=i.append("g").attr("id",f).attr("class","stateGroup");a.type==="start"&&pZe(w),a.type==="end"&&yZe(w),(a.type==="fork"||a.type==="join")&&xZe(w,a),a.type==="note"&&EZe(a.note.text,w),a.type==="divider"&&bZe(w),a.type==="default"&&a.descriptions.length===0&&wZe(w,a),a.type==="default"&&a.descriptions.length>0&&mZe(w,a);const v=w.node().getBBox();return g.width=v.width+2*Re().state.padding,g.height=v.height+2*Re().state.padding,gZe.set(f,g),g};let sHt=0;const TZe=function(i,a,f){const g=function(S){switch(S){case Hx.relationType.AGGREGATION:return"aggregation";case Hx.relationType.EXTENSION:return"extension";case Hx.relationType.COMPOSITION:return"composition";case Hx.relationType.DEPENDENCY:return"dependency"}};a.points=a.points.filter(S=>!Number.isNaN(S.y));const w=a.points,v=Ax().x(function(S){return S.x}).y(function(S){return S.y}).curve(wF),b=i.append("path").attr("d",v(w)).attr("id","edge"+sHt).attr("class","transition");let E="";if(Re().state.arrowMarkerAbsolute&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\("),E=E.replace(/\)/g,"\\)")),b.attr("marker-end","url("+E+"#"+g(Hx.relationType.DEPENDENCY)+"End)"),f.title!==void 0){const S=i.append("g").attr("class","stateLabel"),{x:_,y:M}=uo.calcLabelPosition(a.points),F=ei.getRows(f.title);let R=0;const B=[];let z=0,Y=0;for(let ft=0;ft<=F.length;ft++){const wt=S.append("text").attr("text-anchor","middle").text(F[ft]).attr("x",_).attr("y",M+R),mt=wt.node().getBBox();z=Math.max(z,mt.width),Y=Math.min(Y,mt.x),Kt.info(mt.x,_,M+R),R===0&&(R=wt.node().getBBox().height,Kt.info("Title height",R,M)),B.push(wt)}let nt=R*F.length;if(F.length>1){const ft=(F.length-1)*R*.5;B.forEach((wt,mt)=>wt.attr("y",M+mt*R-ft)),nt=R*F.length}const ot=S.node().getBBox();S.insert("rect",":first-child").attr("class","box").attr("x",_-z/2-Re().state.padding/2).attr("y",M-nt/2-Re().state.padding/2-3.5).attr("width",z+Re().state.padding).attr("height",nt+Re().state.padding),Kt.info(ot)}sHt++};let M2;const e2t={},CZe=function(){},SZe=function(i){i.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")},_Ze=function(i,a,f,g){M2=Re().state;const w=Re().securityLevel;let v;w==="sandbox"&&(v=Tr("#i"+a));const b=Tr(w==="sandbox"?v.nodes()[0].contentDocument.body:"body"),E=w==="sandbox"?v.nodes()[0].contentDocument:document;Kt.debug("Rendering diagram "+i);const S=b.select(`[id='${a}']`);SZe(S);const _=g.db.getRootDoc();aHt(_,S,void 0,!1,b,E,g);const M=M2.padding,F=S.node().getBBox(),R=F.width+M*2,B=F.height+M*2,z=R*1.75;sg(S,B,z,M2.useMaxWidth),S.attr("viewBox",`${F.x-M2.padding} ${F.y-M2.padding} `+R+" "+B)},AZe=i=>i?i.length*M2.fontSizeFactor:1,aHt=(i,a,f,g,w,v,b)=>{const E=new l1({compound:!0,multigraph:!0});let S,_=!0;for(S=0;S<i.length;S++)if(i[S].stmt==="relation"){_=!1;break}f?E.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:_?1:M2.edgeLengthFactor,nodeSep:_?1:50,isMultiGraph:!0}):E.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:_?1:M2.edgeLengthFactor,nodeSep:_?1:50,ranker:"tight-tree",isMultiGraph:!0}),E.setDefaultEdgeLabel(function(){return{}}),b.db.extract(i);const M=b.db.getStates(),F=b.db.getRelations(),R=Object.keys(M);for(const ot of R){const ft=M[ot];f&&(ft.parentId=f);let wt;if(ft.doc){let mt=a.append("g").attr("id",ft.id).attr("class","stateGroup");wt=aHt(ft.doc,mt,ft.id,!g,w,v,b);{mt=vZe(mt,ft,g);let ct=mt.node().getBBox();wt.width=ct.width,wt.height=ct.height+M2.padding/2,e2t[ft.id]={y:M2.compositTitleSize}}}else wt=iHt(a,ft);if(ft.note){const mt={descriptions:[],id:ft.id+"-note",note:ft.note,type:"note"},ct=iHt(a,mt);ft.note.position==="left of"?(E.setNode(wt.id+"-note",ct),E.setNode(wt.id,wt)):(E.setNode(wt.id,wt),E.setNode(wt.id+"-note",ct)),E.setParent(wt.id,wt.id+"-group"),E.setParent(wt.id+"-note",wt.id+"-group")}else E.setNode(wt.id,wt)}Kt.debug("Count=",E.nodeCount(),E);let B=0;F.forEach(function(ot){B++,Kt.debug("Setting edge",ot),E.setEdge(ot.id1,ot.id2,{relation:ot,width:AZe(ot.title),height:M2.labelHeight*ei.getRows(ot.title).length,labelpos:"c"},"id"+B)}),kD(E),Kt.debug("Graph after layout",E.nodes());const z=a.node();E.nodes().forEach(function(ot){ot!==void 0&&E.node(ot)!==void 0?(Kt.warn("Node "+ot+": "+JSON.stringify(E.node(ot))),w.select("#"+z.id+" #"+ot).attr("transform","translate("+(E.node(ot).x-E.node(ot).width/2)+","+(E.node(ot).y+(e2t[ot]?e2t[ot].y:0)-E.node(ot).height/2)+" )"),w.select("#"+z.id+" #"+ot).attr("data-x-shift",E.node(ot).x-E.node(ot).width/2),v.querySelectorAll("#"+z.id+" #"+ot+" .divider").forEach(wt=>{const mt=wt.parentElement;let ct=0,rt=0;mt&&(mt.parentElement&&(ct=mt.parentElement.getBBox().width),rt=parseInt(mt.getAttribute("data-x-shift"),10),Number.isNaN(rt)&&(rt=0)),wt.setAttribute("x1",0-rt+8),wt.setAttribute("x2",ct-rt-8)})):Kt.debug("No Node "+ot+": "+JSON.stringify(E.node(ot)))});let Y=z.getBBox();E.edges().forEach(function(ot){ot!==void 0&&E.edge(ot)!==void 0&&(Kt.debug("Edge "+ot.v+" -> "+ot.w+": "+JSON.stringify(E.edge(ot))),TZe(a,E.edge(ot),E.edge(ot).relation))}),Y=z.getBBox();const nt={id:f||"root",label:f||"root",width:0,height:0};return nt.width=Y.width+2*M2.padding,nt.height=Y.height+2*M2.padding,Kt.debug("Doc rendered",nt,E),nt},LZe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:qqt,db:Hx,renderer:{setConf:CZe,draw:_Ze},styles:nHt,init:i=>{i.state||(i.state={}),i.state.arrowMarkerAbsolute=i.arrowMarkerAbsolute,Hx.clear()}}},Symbol.toStringTag,{value:"Module"})),AX="rect",n2t="rectWithTitle",DZe="start",MZe="end",IZe="divider",OZe="roundedWithTitle",NZe="note",PZe="noteGroup",ID="statediagram",FZe=`${ID}-state`,oHt="transition",BZe="note",RZe=`${oHt} note-edge`,jZe=`${ID}-${BZe}`,$Ze=`${ID}-cluster`,zZe=`${ID}-cluster-alt`,cHt="parent",uHt="note",qZe="state",r2t="----",HZe=`${r2t}${uHt}`,lHt=`${r2t}${cHt}`,hHt="fill:none",fHt="fill: #333",dHt="c",gHt="text",pHt="normal";let LX={},L8=0;const VZe=function(i){const a=Object.keys(i);for(const f of a)i[f]},UZe=function(i,a){return a.db.extract(a.db.getRootDocV2()),a.db.getClasses()};function GZe(i){return i==null?"":i.classes?i.classes.join(" "):""}function i2t(i="",a=0,f="",g=r2t){const w=f!==null&&f.length>0?`${g}${f}`:"";return`${qZe}-${i}${w}-${a}`}const TB=(i,a,f,g,w,v)=>{const b=f.id,E=GZe(g[b]);if(b!=="root"){let S=AX;f.start===!0&&(S=DZe),f.start===!1&&(S=MZe),f.type!==yB&&(S=f.type),LX[b]||(LX[b]={id:b,shape:S,description:ei.sanitizeText(b,Re()),classes:`${E} ${FZe}`});const _=LX[b];f.description&&(Array.isArray(_.description)?(_.shape=n2t,_.description.push(f.description)):_.description.length>0?(_.shape=n2t,_.description===b?_.description=[f.description]:_.description=[_.description,f.description]):(_.shape=AX,_.description=f.description),_.description=ei.sanitizeTextOrArray(_.description,Re())),_.description.length===1&&_.shape===n2t&&(_.shape=AX),!_.type&&f.doc&&(Kt.info("Setting cluster for ",b,s2t(f)),_.type="group",_.dir=s2t(f),_.shape=f.type===Hqt?IZe:OZe,_.classes=_.classes+" "+$Ze+" "+(v?zZe:""));const M={labelStyle:"",shape:_.shape,labelText:_.description,classes:_.classes,style:"",id:b,dir:_.dir,domId:i2t(b,L8),type:_.type,padding:15};if(M.centerLabel=!0,f.note){const F={labelStyle:"",shape:NZe,labelText:f.note.text,classes:jZe,style:"",id:b+HZe+"-"+L8,domId:i2t(b,L8,uHt),type:_.type,padding:15},R={labelStyle:"",shape:PZe,labelText:f.note.text,classes:_.classes,style:"",id:b+lHt,domId:i2t(b,L8,cHt),type:"group",padding:0};L8++;const B=b+lHt;i.setNode(B,R),i.setNode(F.id,F),i.setNode(b,M),i.setParent(b,B),i.setParent(F.id,B);let z=b,Y=F.id;f.note.position==="left of"&&(z=F.id,Y=b),i.setEdge(z,Y,{arrowhead:"none",arrowType:"",style:hHt,labelStyle:"",classes:RZe,arrowheadStyle:fHt,labelpos:dHt,labelType:gHt,thickness:pHt})}else i.setNode(b,M)}a&&a.id!=="root"&&(Kt.trace("Setting node ",b," to be child of its parent ",a.id),i.setParent(b,a.id)),f.doc&&(Kt.trace("Adding nodes children "),KZe(i,f,f.doc,g,w,!v))},KZe=(i,a,f,g,w,v)=>{Kt.trace("items",f),f.forEach(b=>{switch(b.stmt){case EX:TB(i,a,b,g,w,v);break;case yB:TB(i,a,b,g,w,v);break;case Wbt:{TB(i,a,b.state1,g,w,v),TB(i,a,b.state2,g,w,v);const E={id:"edge"+L8,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:hHt,labelStyle:"",label:ei.sanitizeText(b.description,Re()),arrowheadStyle:fHt,labelpos:dHt,labelType:gHt,thickness:pHt,classes:oHt};i.setEdge(b.state1.id,b.state2.id,E,L8),L8++}break}})},s2t=(i,a=VJe)=>{let f=a;if(i.doc)for(let g=0;g<i.doc.length;g++){const w=i.doc[g];w.stmt==="dir"&&(f=w.value)}return f},WZe=Object.freeze(Object.defineProperty({__proto__:null,diagram:{parser:qqt,db:Hx,renderer:{setConf:VZe,getClasses:UZe,draw:async function(i,a,f,g){Kt.info("Drawing state diagram (v2)",a),LX={},g.db.getDirection();const{securityLevel:w,state:v}=Re(),b=v.nodeSpacing||50,E=v.rankSpacing||50;Kt.info(g.db.getRootDocV2()),g.db.extract(g.db.getRootDocV2()),Kt.info(g.db.getRootDocV2());const S=g.db.getStates(),_=new l1({multigraph:!0,compound:!0}).setGraph({rankdir:s2t(g.db.getRootDocV2()),nodesep:b,ranksep:E,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});TB(_,void 0,g.db.getRootDocV2(),S,g.db,!0);let M;w==="sandbox"&&(M=Tr("#i"+a));const F=Tr(w==="sandbox"?M.nodes()[0].contentDocument.body:"body"),R=F.select(`[id="${a}"]`),B=F.select("#"+a+" g");await ebt(B,_,["barb"],ID,a);const z=8;uo.insertTitle(R,"statediagramTitleText",v.titleTopMargin,g.db.getDiagramTitle());const Y=R.node().getBBox(),nt=Y.width+z*2,ot=Y.height+z*2;R.attr("class",ID);const ft=R.node().getBBox();sg(R,ot,nt,v.useMaxWidth);const wt=`${ft.x-z} ${ft.y-z} ${nt} ${ot}`;Kt.debug(`viewBox ${wt}`),R.attr("viewBox",wt);const mt=document.querySelectorAll('[id="'+a+'"] .edgeLabel .label');for(const ct of mt){const rt=ct.getBBox(),it=document.createElementNS("http://www.w3.org/2000/svg",AX);it.setAttribute("rx",0),it.setAttribute("ry",0),it.setAttribute("width",rt.width),it.setAttribute("height",rt.height),ct.insertBefore(it,ct.firstChild)}}},styles:nHt,init:i=>{i.state||(i.state={}),i.state.arrowMarkerAbsolute=i.arrowMarkerAbsolute,Hx.clear()}}},Symbol.toStringTag,{value:"Module"}));var a2t=function(){var i=function(F,R,B,z){for(B=B||{},z=F.length;z--;B[F[z]]=R);return B},a=[6,8,10,11,12,14,16,17,18],f=[1,9],g=[1,10],w=[1,11],v=[1,12],b=[1,13],E=[1,14],S={trace:function(){},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:function(R,B,z,Y,nt,ot,ft){var wt=ot.length-1;switch(nt){case 1:return ot[wt-1];case 2:this.$=[];break;case 3:ot[wt-1].push(ot[wt]),this.$=ot[wt-1];break;case 4:case 5:this.$=ot[wt];break;case 6:case 7:this.$=[];break;case 8:Y.setDiagramTitle(ot[wt].substr(6)),this.$=ot[wt].substr(6);break;case 9:this.$=ot[wt].trim(),Y.setAccTitle(this.$);break;case 10:case 11:this.$=ot[wt].trim(),Y.setAccDescription(this.$);break;case 12:Y.addSection(ot[wt].substr(8)),this.$=ot[wt].substr(8);break;case 13:Y.addTask(ot[wt-1],ot[wt]),this.$="task";break}},table:[{3:1,4:[1,2]},{1:[3]},i(a,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:f,12:g,14:w,16:v,17:b,18:E},i(a,[2,7],{1:[2,1]}),i(a,[2,3]),{9:15,11:f,12:g,14:w,16:v,17:b,18:E},i(a,[2,5]),i(a,[2,6]),i(a,[2,8]),{13:[1,16]},{15:[1,17]},i(a,[2,11]),i(a,[2,12]),{19:[1,18]},i(a,[2,4]),i(a,[2,9]),i(a,[2,10]),i(a,[2,13])],defaultActions:{},parseError:function(R,B){if(B.recoverable)this.trace(R);else{var z=new Error(R);throw z.hash=B,z}},parse:function(R){var B=this,z=[0],Y=[],nt=[null],ot=[],ft=this.table,wt="",mt=0,ct=0,rt=2,it=1,gt=ot.slice.call(arguments,1),Q=Object.create(this.lexer),dt={yy:{}};for(var K in this.yy)Object.prototype.hasOwnProperty.call(this.yy,K)&&(dt.yy[K]=this.yy[K]);Q.setInput(R,dt.yy),dt.yy.lexer=Q,dt.yy.parser=this,typeof Q.yylloc>"u"&&(Q.yylloc={});var yt=Q.yylloc;ot.push(yt);var V=Q.options&&Q.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Ae;return Ae=Y.pop()||Q.lex()||it,typeof Ae!="number"&&(Ae instanceof Array&&(Y=Ae,Ae=Y.pop()),Ae=B.symbols_[Ae]||Ae),Ae}for(var It,jt,xt,Ft,Ct={},kt,Gt,Fe,Mt;;){if(jt=z[z.length-1],this.defaultActions[jt]?xt=this.defaultActions[jt]:((It===null||typeof It>"u")&&(It=Ot()),xt=ft[jt]&&ft[jt][It]),typeof xt>"u"||!xt.length||!xt[0]){var pn="";Mt=[];for(kt in ft[jt])this.terminals_[kt]&&kt>rt&&Mt.push("'"+this.terminals_[kt]+"'");Q.showPosition?pn="Parse error on line "+(mt+1)+`:
[all...]
H A Drenderer.php25 function internallink($id, $name = null, $search = null, $returnonly = false, $linktype = 'content') argument
27 $xhtml = parent::internallink($id, $name, $search, true, $linktype);
/plugin/siteexport/action/
H A Dajax.php393 search($data, $conf['datadir'], $doSearch, $opts, $this->namespace);
403 search($RAWdata, $conf['datadir'], $doSearch, $opts, $this->namespace);
1174 search($data, $conf['mediadir'], 'search_media', array('pattern' => "/$fn$/i"), $ns);
/plugin/siteexport/
H A Dhelper.php106search($sites, $conf['datadir'], 'search_allpages', array(), $functions->getNamespaceFromID($ID, $…
/plugin/siteexport/renderer/
H A Dpdf.php280 …public function internallink($id, $name = NULL, $search = NULL, $returnonly = false, $linktype = '… argument
322 if ($search) {
324 if (is_array($search)) {
325 $search = array_map('rawurlencode', $search);
326 $link['url'] .= 's[]=' . join('&amp;s[]=', $search);
328 $link['url'] .= 's=' . rawurlencode($search);
/plugin/linkback/
H A Dtools.php81 $search = array (
102 $text = str_replace($search, $replace, $text);
H A Dadmin.php95 search($items, $conf['datadir'], 'search_allpages', array());
/plugin/linkback/action/
H A Ddisplay.php263 $search = "</ul>\n</div>";
265 $search = "</ul>\n</li></ul>\n</div>";
267 $new = str_replace($search, $item . $search, $match[0]);
/plugin/structpublish/meta/
H A DRevision.php233 * $andFilters can be used to limit the search, e.g. by status or revision
257 $search = new SearchConfig($config);
259 $search->setSelectLatest(false);
260 $data = $search->execute();
/plugin/struct/jsoneditor/
H A Djsoneditor-minimalist.min.js30 !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return e[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function i(e,t,n){if(!(this instanceof i))throw new Error('JSONEditor constructor called without "new".');var o=l.getInternetExplorerVersion();if(-1!=o&&9>o)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");if(t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,delete t.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,delete t.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,delete t.editable),t)){var r=["ace","theme","ajv","schema","onChange","onEditable","onError","onModeChange","escapeUnicode","history","search","mode","modes","name","indentation"];Object.keys(t).forEach(function(e){-1===r.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})}arguments.length&&this._create(e,t,n)}var o;try{o=n(!function(){var e=new Error('Cannot find module "ajv/dist/ajv.bundle.js"');throw e.code="MODULE_NOT_FOUND",e}())}catch(r){}var s=n(1),a=n(2),l=n(3);i.modes={},i.prototype.DEBOUNCE_INTERVAL=150,i.prototype._create=function(e,t,n){this.container=e,this.options=t||{},this.json=n||{};var i=this.options.mode||"tree";this.setMode(i)},i.prototype._delete=function(){},i.prototype.set=function(e){this.json=e},i.prototype.get=function(){return this.json},i.prototype.setText=function(e){this.json=l.parse(e)},i.prototype.getText=function(){return JSON.stringify(this.json)},i.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},i.prototype.getName=function(){return this.options&&this.options.name},i.prototype.setMode=function(e){var t,n,o=this.container,r=l.extend({},this.options),s=r.mode;r.mode=e;var a=i.modes[e];if(!a)throw new Error('Unknown mode "'+r.mode+'"');try{var c="text"==a.data;if(n=this.getName(),t=this[c?"getText":"get"](),this._delete(),l.clear(this),l.extend(this,a.mixin),this.create(o,r),this.setName(n),this[c?"setText":"set"](t),"function"==typeof a.load)try{a.load.call(this)}catch(d){console.error(d)}if("function"==typeof r.onModeChange&&e!==s)try{r.onModeChange(e,s)}catch(d){console.error(d)}}catch(d){this._onError(d)}},i.prototype.getMode=function(){return this.options.mode},i.prototype._onError=function(e){if(!this.options||"function"!=typeof this.options.onError)throw e;this.options.onError(e)},i.prototype.setSchema=function(e){if(e){var t;try{t=this.options.ajv||o({allErrors:!0,verbose:!0})}catch(n){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}t&&(this.validateSchema=t.compile(e),this.options.schema=e,this.validate())}else this.validateSchema=null,this.options.schema=null,this.validate()},i.prototype.validate=function(){},i.registerMode=function(e){var t,n;if(l.isArray(e))for(t=0;t<e.length;t++)i.registerMode(e[t]);else{if(!("mode"in e))throw new Error('Property "mode" missing');if(!("mixin"in e))throw new Error('Property "mixin" missing');if(!("data"in e))throw new Error('Property "data" missing');var o=e.mode;if(o in i.modes)throw new Error('Mode "'+o+'" already registered');if("function"!=typeof e.mixin.create)throw new Error('Required function "create" missing on mixin');var r=["setMode","registerMode","modes"];for(t=0;t<r.length;t++)if(n=r[t],n in e.mixin)throw new Error('Reserved property "'+n+'" not allowed in mixin');i.modes[o]=e}},i.registerMode(s),i.registerMode(a),e.exports=i},function(e,t,n){var i=n(4),o=n(5),r=n(6),s=n(7),a=n(8),l=n(9),c=n(3),d={};d.create=function(e,t){if(!e)throw new Error("No container element provided.");this.container=e,this.dom={},this.highlighter=new i,this.selection=void 0,this.multiselection={nodes:[]},this.validateSchema=null,this.errorNodes=[],this._setOptions(t),this.options.history&&"view"!==this.options.mode&&(this.history=new o(this)),this._createFrame(),this._createTable()},d._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},d._setOptions=function(e){if(this.options={search:!0,history:!0,mode:"tree",name:void 0,schema:null},e)for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.setSchema(this.options.schema),this._debouncedValidate=c.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL)};var h=void 0,u=null;d.set=function(e,t){if(t&&(console.warn('Second parameter "name" is deprecated. Use setName(name) instead.'),this.options.name=t),e instanceof Function||void 0===e)this.clear();else{this.content.removeChild(this.table);var n={field:this.options.name,value:e},i=new a(this,n);this._setRoot(i),this.validate();var o=!1;this.node.expand(o),this.content.appendChild(this.table)}this.history&&this.history.clear(),this.searchBox&&this.searchBox.clear()},d.get=function(){return h&&h.blur(),this.node?this.node.getValue():void 0},d.getText=function(){return JSON.stringify(this.get())},d.setText=function(e){this.set(c.parse(e))},d.setName=function(e){this.options.name=e,this.node&&this.node.updateField(this.options.name)},d.getName=function(){return this.options.name},d.focus=function(){var e=this.content.querySelector("[contenteditable=true]");e?e.focus():this.node.dom.expand?this.node.dom.expand.focus():this.node.dom.menu?this.node.dom.menu.focus():(e=this.frame.querySelector("button"),e&&e.focus())},d.clear=function(){this.node&&(this.node.collapse(),this.tbody.removeChild(this.node.getDom()),delete this.node)},d._setRoot=function(e){this.clear(),this.node=e,this.tbody.appendChild(e.getDom())},d.search=function(e){var t;return this.node?(this.content.removeChild(this.table),t=this.node.search(e),this.content.appendChild(this.table)):t=[],t},d.expandAll=function(){this.node&&(this.content.removeChild(this.table),this.node.expand(),this.content.appendChild(this.table))},d.collapseAll=function(){this.node&&(this.content.removeChild(this.table),this.node.collapse(),this.content.appendChild(this.table))},d._onAction=function(e,t){this.history&&this.history.add(e,t),this._onChange()},d._onChange=function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}},d.validate=function(){this.errorNodes&&this.errorNodes.forEach(function(e){e.setError(null)});var e=this.node;if(e){var t=e.validate(),n=[];if(this.validateSchema){var i=this.validateSchema(e.getValue());i||(n=this.validateSchema.errors.map(function(e){return c.improveSchemaError(e)}).map(function(t){return{node:e.findNode(t.dataPath),error:t}}).filter(function(e){return null!=e.node}))}this.errorNodes=t.concat(n).reduce(function(e,t){return t.node.findParents().map(function(e){return{node:e,child:t.node,error:{message:"object"===e.type?"Contains invalid properties":"Contains invalid items"}}}).concat(e,[t])},[]).map(function(e){return e.node.setError(e.error,e.child),e.node})}},d.startAutoScroll=function(e){var t=this,n=this.content,i=c.getAbsoluteTop(n),o=n.clientHeight,r=i+o,s=24,a=50;i+s>e&&n.scrollTop>0?this.autoScrollStep=(i+s-e)/3:e>r-s&&o+n.scrollTop<n.scrollHeight?this.autoScrollStep=(r-s-e)/3:this.autoScrollStep=void 0,this.autoScrollStep?this.autoScrollTimer||(this.autoScrollTimer=setInterval(function(){t.autoScrollStep?n.scrollTop-=t.autoScrollStep:t.stopAutoScroll()},a)):this.stopAutoScroll()},d.stopAutoScroll=function(){this.autoScrollTimer&&(clearTimeout(this.autoScrollTimer),delete this.autoScrollTimer),this.autoScrollStep&&delete this.autoScrollStep},d.setSelection=function(e){e&&("scrollTop"in e&&this.content&&(this.content.scrollTop=e.scrollTop),e.nodes&&this.select(e.nodes),e.range&&c.setSelectionOffset(e.range),e.dom&&e.dom.focus())},d.getSelection=function(){var e=c.getSelectionOffset();return e&&"DIV"!==e.container.nodeName&&(e=null),{dom:u,range:e,nodes:this.multiselection.nodes.slice(0),scrollTop:this.content?this.content.scrollTop:0}},d.scrollTo=function(e,t){var n=this.content;if(n){var i=this;i.animateTimeout&&(clearTimeout(i.animateTimeout),delete i.animateTimeout),i.animateCallback&&(i.animateCallback(!1),delete i.animateCallback);var o=n.clientHeight,r=n.scrollHeight-o,s=Math.min(Math.max(e-o/4,0),r),a=function(){var e=n.scrollTop,o=s-e;Math.abs(o)>3?(n.scrollTop+=o/3,i.animateCallback=t,i.animateTimeout=setTimeout(a,50)):(t&&t(!0),n.scrollTop=s,delete i.animateTimeout,delete i.animateCallback)};a()}else t&&t(!1)},d._createFrame=function(){function e(e){t._onEvent&&t._onEvent(e)}this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.container.appendChild(this.frame);var t=this;this.frame.onclick=function(t){var n=t.target;e(t),"BUTTON"==n.nodeName&&t.preventDefault()},this.frame.oninput=e,this.frame.onchange=e,this.frame.onkeydown=e,this.frame.onkeyup=e,this.frame.oncut=e,this.frame.onpaste=e,this.frame.onmousedown=e,this.frame.onmouseup=e,this.frame.onmouseover=e,this.frame.onmouseout=e,c.addEventListener(this.frame,"focus",e,!0),c.addEventListener(this.frame,"blur",e,!0),this.frame.onfocusin=e,this.frame.onfocusout=e,this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var n=document.createElement("button");n.className="jsoneditor-expand-all",n.title="Expand all fields",n.onclick=function(){t.expandAll()},this.menu.appendChild(n);var i=document.createElement("button");if(i.title="Collapse all fields",i.className="jsoneditor-collapse-all",i.onclick=function(){t.collapseAll()},this.menu.appendChild(i),this.history){var o=document.createElement("button");o.className="jsoneditor-undo jsoneditor-separator",o.title="Undo last action (Ctrl+Z)",o.onclick=function(){t._onUndo()},this.menu.appendChild(o),this.dom.undo=o;var s=document.createElement("button");s.className="jsoneditor-redo",s.title="Redo (Ctrl+Shift+Z)",s.onclick=function(){t._onRedo()},this.menu.appendChild(s),this.dom.redo=s,this.history.onChange=function(){o.disabled=!t.history.canUndo(),s.disabled=!t.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var a=l.create(this,this.options.modes,this.options.mode);this.menu.appendChild(a),this.dom.modeBox=a}this.options.search&&(this.searchBox=new r(this,this.menu))},d._onUndo=function(){this.history&&(this.history.undo(),this._onChange())},d._onRedo=function(){this.history&&(this.history.redo(),this._onChange())},d._onEvent=function(e){"keydown"==e.type&&this._onKeyDown(e),"focus"==e.type&&(u=e.target),"mousedown"==e.type&&this._startDragDistance(e),("mousemove"==e.type||"mouseup"==e.type||"click"==e.type)&&this._updateDragDistance(e);var t=a.getNodeFromTarget(e.target);if(t&&t.selected){if("click"==e.type){if(e.target==t.dom.menu)return void this.showContextMenu(e.target);e.hasMoved||this.deselect()}"mousedown"==e.type&&a.onDragStart(this.multiselection.nodes,e)}else"mousedown"==e.type&&(this.deselect(),t&&e.target==t.dom.drag?a.onDragStart(t,e):(!t||e.target!=t.dom.field&&e.target!=t.dom.value)&&this._onMultiSelectStart(e));t&&t.onEvent(e)},d._startDragDistance=function(e){this.dragDistanceEvent={initialTarget:e.target,initialPageX:e.pageX,initialPageY:e.pageY,dragDistance:0,hasMoved:!1}},d._updateDragDistance=function(e){this.dragDistanceEvent||this._startDragDistance(e);var t=e.pageX-this.dragDistanceEvent.initialPageX,n=e.pageY-this.dragDistanceEvent.initialPageY;return this.dragDistanceEvent.dragDistance=Math.sqrt(t*t+n*n),this.dragDistanceEvent.hasMoved=this.dragDistanceEvent.hasMoved||this.dragDistanceEvent.dragDistance>10,e.dragDistance=this.dragDistanceEvent.dragDistance,e.hasMoved=this.dragDistanceEvent.hasMoved,e.dragDistance},d._onMultiSelectStart=function(e){var t=a.getNodeFromTarget(e.target);if("tree"===this.options.mode&&void 0===this.options.onEditable){this.multiselection={start:t||null,end:null,nodes:[]},this._startDragDistance(e);var n=this;this.mousemove||(this.mousemove=c.addEventListener(window,"mousemove",function(e){n._onMultiSelect(e)})),this.mouseup||(this.mouseup=c.addEventListener(window,"mouseup",function(e){n._onMultiSelectEnd(e)}))}},d._onMultiSelect=function(e){if(e.preventDefault(),this._updateDragDistance(e),e.hasMoved){var t=a.getNodeFromTarget(e.target);t&&(null==this.multiselection.start&&(this.multiselection.start=t),this.multiselection.end=t),this.deselect();var n=this.multiselection.start,i=this.multiselection.end||this.multiselection.start;n&&i&&(this.multiselection.nodes=this._findTopLevelNodes(n,i),this.select(this.multiselection.nodes))}},d._onMultiSelectEnd=function(e){this.multiselection.nodes[0]&&this.multiselection.nodes[0].dom.menu.focus(),this.multiselection.start=null,this.multiselection.end=null,this.mousemove&&(c.removeEventListener(window,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(c.removeEventListener(window,"mouseup",this.mouseup),delete this.mouseup)},d.deselect=function(e){this.multiselection.nodes.forEach(function(e){e.setSelected(!1)}),this.multiselection.nodes=[],e&&(this.multiselection.start=null,this.multiselection.end=null)},d.select=function(e){if(!Array.isArray(e))return this.select([e]);if(e){this.deselect(),this.multiselection.nodes=e.slice(0);var t=e[0];e.forEach(function(e){e.setSelected(!0,e===t)})}},d._findTopLevelNodes=function(e,t){for(var n=e.getPath(),i=t.getPath(),o=0;o<n.length&&n[o]===i[o];)o++;var r=n[o-1],s=n[o],a=i[o];if(s&&a||(r.parent?(s=r,a=r,r=r.parent):(s=r.childs[0],a=r.childs[r.childs.length-1])),r&&s&&a){var l=r.childs.indexOf(s),c=r.childs.indexOf(a),d=Math.min(l,c),h=Math.max(l,c);return r.childs.slice(d,h+1)}return[]},d._onKeyDown=function(e){var t=e.which||e.keyCode,n=e.ctrlKey,i=e.shiftKey,o=!1;if(9==t&&setTimeout(function(){c.selectContentEditable(u)},0),this.searchBox)if(n&&70==t)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),o=!0;else if(114==t||n&&71==t){var r=!0;i?this.searchBox.previous(r):this.searchBox.next(r),o=!0}this.history&&(n&&!i&&90==t?(this._onUndo(),o=!0):n&&i&&90==t&&(this._onRedo(),o=!0)),o&&(e.preventDefault(),e.stopPropagation())},d._createTable=function(){var e=document.createElement("div");e.className="jsoneditor-outer",this.contentOuter=e,this.content=document.createElement("div"),this.content.className="jsoneditor-tree",e.appendChild(this.content),this.table=document.createElement("table"),this.table.className="jsoneditor-tree",this.content.appendChild(this.table);var t;this.colgroupContent=document.createElement("colgroup"),"tree"===this.options.mode&&(t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t)),t=document.createElement("col"),t.width="24px",this.colgroupContent.appendChild(t),t=document.createElement("col"),this.colgroupContent.appendChild(t),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(e)},d.showContextMenu=function(e,t){var n=[],i=this;n.push({text:"Duplicate",title:"Duplicate selected fields (Ctrl+D)",className:"jsoneditor-duplicate",click:function(){a.onDuplicate(i.multiselection.nodes)}}),n.push({text:"Remove",title:"Remove selected fields (Ctrl+Del)",className:"jsoneditor-remove",click:function(){a.onRemove(i.multiselection.nodes)}});var o=new s(n,{close:t});o.show(e,this.content)},e.exports=[{mode:"tree",mixin:d,data:"json"},{mode:"view",mixin:d,data:"json"},{mode:"form",mixin:d,data:"json"}]},function(e,t,n){var i;try{i=n(11)}catch(o){}var r=n(9),s=n(3),a={},l=3;a.create=function(e,t){t=t||{},this.options=t,t.indentation?this.indentation=Number(t.indentation):this.indentation=2;var n=t.ace?t.ace:i;this.mode="code"==t.mode?"code":"text","code"==this.mode&&"undefined"==typeof n&&(this.mode="text",console.warn("Failed to load Ace editor, falling back to plain text mode. Please use a JSONEditor bundle including Ace, or pass Ace as via the configuration option `ace`.")),this.theme=t.theme||"ace/theme/jsoneditor";var o=this;this.container=e,this.dom={},this.aceEditor=void 0,this.textarea=void 0,this.validateSchema=null,this._debouncedValidate=s.debounce(this.validate.bind(this),this.DEBOUNCE_INTERVAL),this.width=e.clientWidth,this.height=e.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor jsoneditor-mode-"+this.options.mode,this.frame.onclick=function(e){e.preventDefault()},this.frame.onkeydown=function(e){o._onKeyDown(e)},this.menu=document.createElement("div"),this.menu.className="jsoneditor-menu",this.frame.appendChild(this.menu);var a=document.createElement("button");a.className="jsoneditor-format",a.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(a),a.onclick=function(){try{o.format()}catch(e){o._onError(e)}};var l=document.createElement("button");if(l.className="jsoneditor-compact",l.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(l),l.onclick=function(){try{o.compact()}catch(e){o._onError(e)}},this.options&&this.options.modes&&this.options.modes.length){var c=r.create(this,this.options.modes,this.options.mode);this.menu.appendChild(c),this.dom.modeBox=c}if(this.content=document.createElement("div"),this.content.className="jsoneditor-outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var d=n.edit(this.editorDom);d.$blockScrolling=1/0,d.setTheme(this.theme),d.setShowPrintMargin(!1),d.setFontSize(13),d.getSession().setMode("ace/mode/json"),d.getSession().setTabSize(this.indentation),d.getSession().setUseSoftTabs(!0),d.getSession().setUseWrapMode(!0),d.commands.bindKey("Ctrl-L",null),d.commands.bindKey("Command-L",null),this.aceEditor=d,this.hasOwnProperty("editor")||Object.defineProperty(this,"editor",{get:function(){return console.warn('Property "editor" has been renamed to "aceEditor".'),o.aceEditor},set:function(e){console.warn('Property "editor" has been renamed to "aceEditor".'),o.aceEditor=e}});var h=document.createElement("a");h.appendChild(document.createTextNode("powered by ace")),h.href="http://ace.ajax.org",h.target="_blank",h.className="jsoneditor-poweredBy",h.onclick=function(){window.open(h.href,h.target)},this.menu.appendChild(h),d.on("change",this._onChange.bind(this))}else{var u=document.createElement("textarea");u.className="jsoneditor-text",u.spellcheck=!1,this.content.appendChild(u),this.textarea=u,null===this.textarea.oninput?this.textarea.oninput=this._onChange.bind(this):this.textarea.onchange=this._onChange.bind(this)}this.setSchema(this.options.schema)},a._onChange=function(){if(this._debouncedValidate(),this.options.onChange)try{this.options.onChange()}catch(e){console.error("Error in onChange callback: ",e)}},a._onKeyDown=function(e){var t=e.which||e.keyCode,n=!1;220==t&&e.ctrlKey&&(e.shiftKey?this.compact():this.format(),n=!0),n&&(e.preventDefault(),e.stopPropagation())},a._delete=function(){this.aceEditor&&this.aceEditor.destroy(),this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},a.compact=function(){var e=this.get(),t=JSON.stringify(e);this.setText(t)},a.format=function(){var e=this.get(),t=JSON.stringify(e,null,this.indentation);this.setText(t)},a.focus=function(){this.textarea&&this.textarea.focus(),this.aceEditor&&this.aceEditor.focus()},a.resize=function(){if(this.aceEditor){var e=!1;this.aceEditor.resize(e)}},a.set=function(e){this.setText(JSON.stringify(e,null,this.indentation))},a.get=function(){var e,t=this.getText();try{e=s.parse(t)}catch(n){t=s.sanitize(t),e=s.parse(t)}return e},a.getText=function(){return this.textarea?this.textarea.value:this.aceEditor?this.aceEditor.getValue():""},a.setText=function(e){if(this.options.escapeUnicode===!0?text=s.escapeUnicodeChars(e):text=e,this.textarea&&(this.textarea.value=text),this.aceEditor){var t=this.options.onChange;this.options.onChange=null,this.aceEditor.setValue(text,-1),this.options.onChange=t}this.validate()},a.validate=function(){this.dom.validationErrors&&(this.dom.validationErrors.parentNode.removeChild(this.dom.validationErrors),this.dom.validationErrors=null,this.content.style.marginBottom="",this.content.style.paddingBottom="");var e,t=!1,n=[];try{e=this.get(),t=!0}catch(i){}if(t&&this.validateSchema){var o=this.validateSchema(e);o||(n=this.validateSchema.errors.map(function(e){return s.improveSchemaError(e)}))}if(n.length>0){var r=n.length>l;if(r){n=n.slice(0,l);var a=this.validateSchema.errors.length-l;n.push("("+a+" more errors...)")}var c=document.createElement("div");c.innerHTML='<table class="jsoneditor-text-errors"><tbody>'+n.map(function(e){var t;return t="string"==typeof e?'<td colspan="2"><pre>'+e+"</pre></td>":"<td>"+e.dataPath+"</td><td>"+e.message+"</td>",'<tr><td><button class="jsoneditor-schema-error"></button></td>'+t+"</tr>"}).join("")+"</tbody></table>",this.dom.validationErrors=c,this.frame.appendChild(c);var d=c.clientHeight;this.content.style.marginBottom=-d+"px",this.content.style.paddingBottom=d+"px"}if(this.aceEditor){var h=!1;this.aceEditor.resize(h)}},e.exports=[{mode:"text",mixin:a,data:"text",load:a.format},{mode:"code",mixin:a,data:"text",load:a.format}]},function(e,t,n){var i=n(10);t.parse=function(e){try{return JSON.parse(e)}catch(n){throw t.validate(e),n}},t.sanitize=function(e){function t(){return e.charAt(c)}function n(){return e.charAt(c+1)}function i(){return e.charAt(c-1)}function o(){for(var t=c-1;t>=0;){var n=e.charAt(t);if("{"===n)return!0;if(" "!==n&&"\n"!==n&&"\r"!==n)return!1;t--}return!1}function r(){for(c+=2;c<e.length&&("*"!==t()||"/"!==n());)c++;c+=2}function s(n){l.push('"'),c++;for(var o=t();c<e.length&&o!==n;)'"'===o&&"\\"!==i()&&l.push("\\"),"\\"===o&&(c++,o=t(),"'"!==o&&l.push("\\")),l.push(o),c++,o=t();o===n&&(l.push('"'),c++)}function a(){for(var e=["null","true","false"],n="",i=t(),o=/[a-zA-Z_$\d]/;o.test(i);)n+=i,c++,i=t();l.push(-1===e.indexOf(n)?'"'+n+'"':n)}var l=[],c=0,d=e.match(/^\s*(\/\*(.|[\r\n])*?\*\/)?\s*[\da-zA-Z_$]+\s*\(([\s\S]*)\)\s*;?\s*$/);for(d&&(e=d[3]);c<e.length;){var h=t();"/"===h&&"*"===n()?r():"'"===h||'"'===h?s(h):/[a-zA-Z_$]/.test(h)&&o()?a():(l.push(h),c++)}return l.join("")},t.escapeUnicodeChars=function(e){return e.replace(/[\u007F-\uFFFF]/g,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})},t.validate=function(e){"undefined"!=typeof i?i.parse(e):JSON.parse(e)},t.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},t.clear=function(e){for(var t in e)e.hasOwnProperty(t)&&delete e[t];return e},t.type=function(e){return null===e?"null":void 0===e?"undefined":e instanceof Number||"number"==typeof e?"number":e instanceof String||"string"==typeof e?"string":e instanceof Boolean||"boolean"==typeof e?"boolean":e instanceof RegExp||"regexp"==typeof e?"regexp":t.isArray(e)?"array":"object"};var o=/^https?:\/\/\S+$/;t.isUrl=function(e){return("string"==typeof e||e instanceof String)&&o.test(e)},t.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},t.getAbsoluteLeft=function(e){var t=e.getBoundingClientRect();return t.left+window.pageXOffset||document.scrollLeft||0},t.getAbsoluteTop=function(e){var t=e.getBoundingClientRect();return t.top+window.pageYOffset||document.scrollTop||0},t.addClassName=function(e,t){var n=e.className.split(" ");-1==n.indexOf(t)&&(n.push(t),e.className=n.join(" "))},t.removeClassName=function(e,t){var n=e.className.split(" "),i=n.indexOf(t);-1!=i&&(n.splice(i,1),e.className=n.join(" "))},t.stripFormatting=function(e){for(var n=e.childNodes,i=0,o=n.length;o>i;i++){var r=n[i];r.style&&r.removeAttribute("style");var s=r.attributes;if(s)for(var a=s.length-1;a>=0;a--){var l=s[a];l.specified===!0&&r.removeAttribute(l.name)}t.stripFormatting(r)}},t.setEndOfContentEditable=function(e){var t,n;document.createRange&&(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),n=window.getSelection(),n.removeAllRanges(),n.addRange(t))},t.selectContentEditable=function(e){if(e&&"DIV"==e.nodeName){var t,n;window.getSelection&&document.createRange&&(n=document.createRange(),n.selectNodeContents(e),t=window.getSelection(),t.removeAllRanges(),t.addRange(n))}},t.getSelection=function(){if(window.getSelection){var e=window.getSelection();if(e.getRangeAt&&e.rangeCount)return e.getRangeAt(0)}return null},t.setSelection=function(e){if(e&&window.getSelection){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}},t.getSelectionOffset=function(){var e=t.getSelection();return e&&"startOffset"in e&&"endOffset"in e&&e.startContainer&&e.startContainer==e.endContainer?{startOffset:e.startOffset,endOffset:e.endOffset,container:e.startContainer.parentNode}:null},t.setSelectionOffset=function(e){if(document.createRange&&window.getSelection){var n=window.getSelection();if(n){var i=document.createRange();e.container.firstChild||e.container.appendChild(document.createTextNode("")),i.setStart(e.container.firstChild,e.startOffset),i.setEnd(e.container.firstChild,e.endOffset),t.setSelection(i)}}},t.getInnerText=function(e,n){var i=void 0==n;if(i&&(n={text:"",flush:function(){var e=this.text;return this.text="",e},set:function(e){this.text=e}}),e.nodeValue)return n.flush()+e.nodeValue;if(e.hasChildNodes()){for(var o=e.childNodes,r="",s=0,a=o.length;a>s;s++){var l=o[s];if("DIV"==l.nodeName||"P"==l.nodeName){var c=o[s-1],d=c?c.nodeName:void 0;d&&"DIV"!=d&&"P"!=d&&"BR"!=d&&(r+="\n",n.flush()),r+=t.getInnerText(l,n),n.set("\n")}else"BR"==l.nodeName?(r+=n.flush(),n.set("\n")):r+=t.getInnerText(l,n)}return r}return"P"==e.nodeName&&-1!=t.getInternetExplorerVersion()?n.flush():""},t.getInternetExplorerVersion=function(){if(-1==r){var e=-1;if("Microsoft Internet Explorer"==navigator.appName){var t=navigator.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=n.exec(t)&&(e=parseFloat(RegExp.$1))}r=e}return r},t.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var r=-1;t.addEventListener=function(e,n,i,o){if(e.addEventListener)return void 0===o&&(o=!1),"mousewheel"===n&&t.isFirefox()&&(n="DOMMouseScroll"),e.addEventListener(n,i,o),i;if(e.attachEvent){var r=function(){return i.call(e,window.event)};return e.attachEvent("on"+n,r),r}},t.removeEventListener=function(e,n,i,o){e.removeEventListener?(void 0===o&&(o=!1),"mousewheel"===n&&t.isFirefox()&&(n="DOMMouseScroll"),e.removeEventListener(n,i,o)):e.detachEvent&&e.detachEvent("on"+n,i)},t.parsePath=function s(e){var t,n;if(0===e.length)return[];var i=e.match(/^\.(\w+)/);if(i)t=i[1],n=e.substr(t.length+1);else{if("["!==e[0])throw new SyntaxError("Failed to parse path");var o=e.indexOf("]");if(-1===o)throw new SyntaxError("Character ] expected in path");if(1===o)throw new SyntaxError("Index expected after [");t=JSON.parse(e.substring(1,o)),n=e.substr(o+1)}return[t].concat(s(n))},t.improveSchemaError=function(e){if("enum"===e.keyword&&Array.isArray(e.schema)){var t=e.schema;if(t){if(t=t.map(function(e){return JSON.stringify(e)}),t.length>5){var n=["("+(t.length-5)+" more...)"];t=t.slice(0,5),t.push(n)}e.message="should be equal to one of: "+t.join(", ")}}return e},t.insideRect=function(e,t,n){var i=void 0!==n?n:0;return t.left-i>=e.left&&t.right+i<=e.right&&t.top-i>=e.top&&t.bottom+i<=e.bottom},t.debounce=function(e,t,n){var i;return function(){var o=this,r=arguments,s=function(){i=null,n||e.apply(o,r)},a=n&&!i;clearTimeout(i),i=setTimeout(s,t),a&&e.apply(o,r)}},t.textDiff=function(e,t){for(var n=t.length,i=0,o=e.length,r=t.length;t.charAt(i)===e.charAt(i)&&n>i;)i++;for(;t.charAt(r-1)===e.charAt(o-1)&&r>i&&o>0;)r--,o--;return{start:i,end:r}}},function(e,t,n){function i(){this.locked=!1}i.prototype.highlight=function(e){this.locked||(this.node!=e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())},i.prototype.unhighlight=function(){if(!this.locked){var e=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){e.node.setHighlight(!1),e.node=void 0,e.unhighlightTimer=void 0},0))}},i.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},i.prototype.lock=function(){this.locked=!0},i.prototype.unlock=function(){this.locked=!1},e.exports=i},function(e,t,n){function i(e){this.editor=e,this.clear(),this.actions={editField:{undo:function(e){e.node.updateField(e.oldValue)},redo:function(e){e.node.updateField(e.newValue)}},editValue:{undo:function(e){e.node.updateValue(e.oldValue)},redo:function(e){e.node.updateValue(e.newValue)}},changeType:{undo:function(e){e.node.changeType(e.oldType)},redo:function(e){e.node.changeType(e.newType)}},appendNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){e.nodes.forEach(function(t){e.parent.appendChild(t)})}},insertBeforeNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){e.nodes.forEach(function(t){e.parent.insertBefore(t,e.beforeNode)})}},insertAfterNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){var t=e.afterNode;e.nodes.forEach(function(n){e.parent.insertAfter(e.node,t),t=n})}},removeNodes:{undo:function(e){var t=e.parent,n=t.childs[e.index]||t.append;e.nodes.forEach(function(e){t.insertBefore(e,n)})},redo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})}},duplicateNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){var t=e.afterNode;e.nodes.forEach(function(n){e.parent.insertAfter(n,t),t=n})}},moveNodes:{undo:function(e){e.nodes.forEach(function(t){e.oldBeforeNode.parent.moveBefore(t,e.oldBeforeNode)})},redo:function(e){e.nodes.forEach(function(t){e.newBeforeNode.parent.moveBefore(t,e.newBeforeNode)})}},sort:{undo:function(e){var t=e.node;t.hideChilds(),t.sort=e.oldSort,t.childs=e.oldChilds,t.showChilds()},redo:function(e){var t=e.node;t.hideChilds(),t.sort=e.newSort,t.childs=e.newChilds,t.showChilds()}}}}n(3);i.prototype.onChange=function(){},i.prototype.add=function(e,t){this.index++,this.history[this.index]={action:e,params:t,timestamp:new Date},this.index<this.history.length-1&&this.history.splice(this.index+1,this.history.length-this.index-1),this.onChange()},i.prototype.clear=function(){this.history=[],this.index=-1,this.onChange()},i.prototype.canUndo=function(){return this.index>=0},i.prototype.canRedo=function(){return this.index<this.history.length-1},i.prototype.undo=function(){if(this.canUndo()){var e=this.history[this.index];if(e){var t=this.actions[e.action];t&&t.undo?(t.undo(e.params),e.params.oldSelection&&this.editor.setSelection(e.params.oldSelection)):console.error(new Error('unknown action "'+e.action+'"'))}this.index--,this.onChange()}},i.prototype.redo=function(){if(this.canRedo()){this.index++;var e=this.history[this.index];if(e){var t=this.actions[e.action];t&&t.redo?(t.redo(e.params),e.params.newSelection&&this.editor.setSelection(e.params.newSelection)):console.error(new Error('unknown action "'+e.action+'"'))}this.onChange()}},e.exports=i},function(e,t,n){function i(e,t){var n=this;this.editor=e,this.timeout=void 0,this.delay=200,this.lastText=void 0,this.dom={},this.dom.container=t;var i=document.createElement("table");this.dom.table=i,i.className="jsoneditor-search",t.appendChild(i);var o=document.createElement("tbody");this.dom.tbody=o,i.appendChild(o);
31 var r=document.createElement("tr");o.appendChild(r);var s=document.createElement("td");r.appendChild(s);var a=document.createElement("div");this.dom.results=a,a.className="jsoneditor-results",s.appendChild(a),s=document.createElement("td"),r.appendChild(s);var l=document.createElement("div");this.dom.input=l,l.className="jsoneditor-frame",l.title="Search fields and values",s.appendChild(l);var c=document.createElement("table");l.appendChild(c);var d=document.createElement("tbody");c.appendChild(d),r=document.createElement("tr"),d.appendChild(r);var h=document.createElement("button");h.className="jsoneditor-refresh",s=document.createElement("td"),s.appendChild(h),r.appendChild(s);var u=document.createElement("input");this.dom.search=u,u.oninput=function(e){n._onDelayedSearch(e)},u.onchange=function(e){n._onSearch()},u.onkeydown=function(e){n._onKeyDown(e)},u.onkeyup=function(e){n._onKeyUp(e)},h.onclick=function(e){u.select()},s=document.createElement("td"),s.appendChild(u),r.appendChild(s);var p=document.createElement("button");p.title="Next result (Enter)",p.className="jsoneditor-next",p.onclick=function(){n.next()},s=document.createElement("td"),s.appendChild(p),r.appendChild(s);var f=document.createElement("button");f.title="Previous result (Shift+Enter)",f.className="jsoneditor-previous",f.onclick=function(){n.previous()},s=document.createElement("td"),s.appendChild(f),r.appendChild(s)}i.prototype.next=function(e){if(void 0!=this.results){var t=void 0!=this.resultIndex?this.resultIndex+1:0;t>this.results.length-1&&(t=0),this._setActiveResult(t,e)}},i.prototype.previous=function(e){if(void 0!=this.results){var t=this.results.length-1,n=void 0!=this.resultIndex?this.resultIndex-1:t;0>n&&(n=t),this._setActiveResult(n,e)}},i.prototype._setActiveResult=function(e,t){if(this.activeResult){var n=this.activeResult.node,i=this.activeResult.elem;"field"==i?delete n.searchFieldActive:delete n.searchValueActive,n.updateDom()}if(!this.results||!this.results[e])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=e;var o=this.results[this.resultIndex].node,r=this.results[this.resultIndex].elem;"field"==r?o.searchFieldActive=!0:o.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],o.updateDom(),o.scrollTo(function(){t&&o.focus(r)})},i.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},i.prototype._onDelayedSearch=function(e){this._clearDelay();var t=this;this.timeout=setTimeout(function(e){t._onSearch()},this.delay)},i.prototype._onSearch=function(e){this._clearDelay();var t=this.dom.search
[all...]
H A Djsoneditor.min.css1 div.jsoneditor-field,div.jsoneditor-readonly,div.jsoneditor-value{border:1px solid transparent;min-height:16px;min-width:32px;padding:2px;margin:1px;word-wrap:break-word;float:left}div.jsoneditor-field p,div.jsoneditor-value p{margin:0}div.jsoneditor-value{word-break:break-word}div.jsoneditor-readonly{min-width:16px;color:gray}div.jsoneditor-empty{border-color:#d3d3d3;border-style:dashed;border-radius:2px}div.jsoneditor-field.jsoneditor-empty::after,div.jsoneditor-value.jsoneditor-empty::after{pointer-events:none;color:#d3d3d3;font-size:8pt}div.jsoneditor-field.jsoneditor-empty::after{content:"field"}div.jsoneditor-value.jsoneditor-empty::after{content:"value"}div.jsoneditor-value.jsoneditor-url{color:green;text-decoration:underline}a.jsoneditor-value.jsoneditor-url:focus,a.jsoneditor-value.jsoneditor-url:hover{color:#ee422e}div.jsoneditor td.jsoneditor-separator{padding:3px 0;vertical-align:top;color:gray}div.jsoneditor-field.jsoneditor-highlight,div.jsoneditor-field[contenteditable=true]:focus,div.jsoneditor-field[contenteditable=true]:hover,div.jsoneditor-value.jsoneditor-highlight,div.jsoneditor-value[contenteditable=true]:focus,div.jsoneditor-value[contenteditable=true]:hover{background-color:#FFFFAB;border:1px solid #ff0;border-radius:2px}div.jsoneditor-field.jsoneditor-highlight-active,div.jsoneditor-field.jsoneditor-highlight-active:focus,div.jsoneditor-field.jsoneditor-highlight-active:hover,div.jsoneditor-value.jsoneditor-highlight-active,div.jsoneditor-value.jsoneditor-highlight-active:focus,div.jsoneditor-value.jsoneditor-highlight-active:hover{background-color:#fe0;border:1px solid #ffc700;border-radius:2px}div.jsoneditor-value.jsoneditor-string{color:green}div.jsoneditor-value.jsoneditor-array,div.jsoneditor-value.jsoneditor-object{min-width:16px;color:grey}div.jsoneditor-value.jsoneditor-number{color:#ee422e}div.jsoneditor-value.jsoneditor-boolean{color:#ff8c00}div.jsoneditor-value.jsoneditor-null{color:#004ED0}div.jsoneditor-value.jsoneditor-invalid{color:#000}div.jsoneditor-tree button{width:24px;height:24px;padding:0;margin:0;border:none;cursor:pointer;background:url(img/jsoneditor-icons.svg)}div.jsoneditor-mode-form tr.jsoneditor-expandable td.jsoneditor-tree,div.jsoneditor-mode-view tr.jsoneditor-expandable td.jsoneditor-tree{cursor:pointer}div.jsoneditor-tree button.jsoneditor-collapsed{background-position:0 -48px}div.jsoneditor-tree button.jsoneditor-expanded{background-position:0 -72px}div.jsoneditor-tree button.jsoneditor-contextmenu{background-position:-48px -72px}div.jsoneditor-tree button.jsoneditor-contextmenu.jsoneditor-selected,div.jsoneditor-tree button.jsoneditor-contextmenu:focus,div.jsoneditor-tree button.jsoneditor-contextmenu:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu{background-position:-48px -48px}div.jsoneditor-tree :focus{outline:0}div.jsoneditor-tree button:focus{background-color:#f5f5f5;outline:#e5e5e5 solid 1px}div.jsoneditor-tree button.jsoneditor-invisible{visibility:hidden;background:0 0}div.jsoneditor{color:#1A1A1A;border:1px solid #3883fa;box-sizing:border-box;width:100%;height:100%;overflow:hidden;position:relative;padding:0;line-height:100%}div.jsoneditor,div.jsoneditor-outer{-moz-box-sizing:border-box;-webkit-box-sizing:border-box}div.jsoneditor-tree table.jsoneditor-tree{border-collapse:collapse;border-spacing:0;width:100%;margin:0}div.jsoneditor-outer{width:100%;height:100%;margin:-35px 0 0;padding:35px 0 0;box-sizing:border-box}div.jsoneditor-tree{width:100%;height:100%;position:relative;overflow:auto}textarea.jsoneditor-text{width:100%;height:100%;margin:0;box-sizing:border-box;outline-width:0;border:none;background-color:#fff;resize:none}div.jsoneditor-menu,textarea.jsoneditor-text{-moz-box-sizing:border-box;-webkit-box-sizing:border-box}tr.jsoneditor-highlight,tr.jsoneditor-selected{background-color:#e6e6e6}tr.jsoneditor-selected button.jsoneditor-contextmenu,tr.jsoneditor-selected button.jsoneditor-dragarea{visibility:hidden}tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-contextmenu,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{visibility:visible}div.jsoneditor-tree button.jsoneditor-dragarea{background:url(img/jsoneditor-icons.svg)-72px -72px;cursor:move}div.jsoneditor-tree button.jsoneditor-dragarea:focus,div.jsoneditor-tree button.jsoneditor-dragarea:hover,tr.jsoneditor-selected.jsoneditor-first button.jsoneditor-dragarea{background-position:-72px -48px}div.jsoneditor td,div.jsoneditor th,div.jsoneditor tr{padding:0;margin:0}div.jsoneditor td,div.jsoneditor td.jsoneditor-tree{vertical-align:top}.jsoneditor-schema-error,div.jsoneditor td,div.jsoneditor textarea,div.jsoneditor th,div.jsoneditor-field,div.jsoneditor-value{font-family:droid sans mono,consolas,monospace,courier new,courier,sans-serif;font-size:10pt;color:#1A1A1A}.jsoneditor-schema-error{cursor:default;display:inline-block;height:24px;line-height:24px;position:relative;text-align:center;width:24px}div.jsoneditor-tree .jsoneditor-schema-error{width:24px;height:24px;padding:0;margin:0 4px 0 0;background:url(img/jsoneditor-icons.svg)-168px -48px}.jsoneditor-schema-error .jsoneditor-popover{background-color:#4c4c4c;border-radius:3px;box-shadow:0 0 5px rgba(0,0,0,.4);color:#fff;display:none;padding:7px 10px;position:absolute;width:200px;z-index:4}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-above{bottom:32px;left:-98px}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-below{top:32px;left:-98px}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left{top:-7px;right:32px}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right{top:-7px;left:32px}.jsoneditor-schema-error .jsoneditor-popover:before{border-right:7px solid transparent;border-left:7px solid transparent;content:'';display:block;left:50%;margin-left:-7px;position:absolute}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-above:before{border-top:7px solid #4c4c4c;bottom:-7px}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-below:before{border-bottom:7px solid #4c4c4c;top:-7px}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left:before,.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right:before{border-top:7px solid transparent;border-bottom:7px solid transparent;content:'';top:19px;margin-left:inherit;margin-top:-7px;position:absolute}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-left:before{border-left:7px solid #4c4c4c;right:-14px;left:inherit}.jsoneditor-schema-error .jsoneditor-popover.jsoneditor-right:before{border-right:7px solid #4c4c4c;left:-14px}.jsoneditor-schema-error:focus .jsoneditor-popover,.jsoneditor-schema-error:hover .jsoneditor-popover{display:block;-webkit-animation:fade-in .3s linear 1,move-up .3s linear 1;-moz-animation:fade-in .3s linear 1,move-up .3s linear 1;-ms-animation:fade-in .3s linear 1,move-up .3s linear 1}@-webkit-keyframes fade-in{from{opacity:0}to{opacity:1}}@-moz-keyframes fade-in{from{opacity:0}to{opacity:1}}@-ms-keyframes fade-in{from{opacity:0}to{opacity:1}}.jsoneditor .jsoneditor-text-errors{width:100%;border-collapse:collapse;background-color:#ffef8b;border-top:1px solid gold}.jsoneditor .jsoneditor-text-errors td{padding:3px 6px;vertical-align:middle}.jsoneditor-text-errors .jsoneditor-schema-error{border:none;width:24px;height:24px;padding:0;margin:0 4px 0 0;background:url(img/jsoneditor-icons.svg)-168px -48px}div.jsoneditor-contextmenu-root{position:relative;width:0;height:0}div.jsoneditor-contextmenu{position:absolute;z-index:99999}div.jsoneditor-contextmenu ul{position:relative;left:0;top:0;width:124px;background:#fff;border:1px solid #d3d3d3;box-shadow:2px 2px 12px rgba(128,128,128,.3);list-style:none;margin:0;padding:0}div.jsoneditor-contextmenu ul li button{padding:0;margin:0;width:124px;height:24px;border:none;cursor:pointer;color:#4d4d4d;background:0 0;line-height:26px;text-align:left}div.jsoneditor-contextmenu ul li button::-moz-focus-inner{padding:0;border:0}div.jsoneditor-contextmenu ul li button:focus,div.jsoneditor-contextmenu ul li button:hover{color:#1a1a1a;background-color:#f5f5f5;outline:0}div.jsoneditor-contextmenu ul li button.jsoneditor-default{width:92px}div.jsoneditor-contextmenu ul li button.jsoneditor-expand{float:right;width:32px;height:24px;border-left:1px solid #e5e5e5}div.jsoneditor-contextmenu div.jsoneditor-icon{float:left;width:24px;height:24px;border:none;padding:0;margin:0;background-image:url(img/jsoneditor-icons.svg)}div.jsoneditor-contextmenu ul li button div.jsoneditor-expand{float:right;width:24px;height:24px;padding:0;margin:0 4px 0 0;background:url(img/jsoneditor-icons.svg)0 -72px;opacity:.4}div.jsoneditor-contextmenu ul li button.jsoneditor-expand:focus div.jsoneditor-expand,div.jsoneditor-contextmenu ul li button.jsoneditor-expand:hover div.jsoneditor-expand,div.jsoneditor-contextmenu ul li button:focus div.jsoneditor-expand,div.jsoneditor-contextmenu ul li button:hover div.jsoneditor-expand,div.jsoneditor-contextmenu ul li.jsoneditor-selected div.jsoneditor-expand{opacity:1}div.jsoneditor-contextmenu div.jsoneditor-separator{height:0;border-top:1px solid #e5e5e5;padding-top:5px;margin-top:5px}div.jsoneditor-contextmenu button.jsoneditor-remove>div.jsoneditor-icon{background-position:-24px -24px}div.jsoneditor-contextmenu button.jsoneditor-remove:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-remove:hover>div.jsoneditor-icon{background-position:-24px 0}div.jsoneditor-contextmenu button.jsoneditor-append>div.jsoneditor-icon{background-position:0 -24px}div.jsoneditor-contextmenu button.jsoneditor-append:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-append:hover>div.jsoneditor-icon{background-position:0 0}div.jsoneditor-contextmenu button.jsoneditor-insert>div.jsoneditor-icon{background-position:0 -24px}div.jsoneditor-contextmenu button.jsoneditor-insert:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-insert:hover>div.jsoneditor-icon{background-position:0 0}div.jsoneditor-contextmenu button.jsoneditor-duplicate>div.jsoneditor-icon{background-position:-48px -24px}div.jsoneditor-contextmenu button.jsoneditor-duplicate:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-duplicate:hover>div.jsoneditor-icon{background-position:-48px 0}div.jsoneditor-contextmenu button.jsoneditor-sort-asc>div.jsoneditor-icon{background-position:-168px -24px}div.jsoneditor-contextmenu button.jsoneditor-sort-asc:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-sort-asc:hover>div.jsoneditor-icon{background-position:-168px 0}div.jsoneditor-contextmenu button.jsoneditor-sort-desc>div.jsoneditor-icon{background-position:-192px -24px}div.jsoneditor-contextmenu button.jsoneditor-sort-desc:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-sort-desc:hover>div.jsoneditor-icon{background-position:-192px 0}div.jsoneditor-contextmenu ul li button.jsoneditor-selected,div.jsoneditor-contextmenu ul li button.jsoneditor-selected:focus,div.jsoneditor-contextmenu ul li button.jsoneditor-selected:hover{color:#fff;background-color:#ee422e}div.jsoneditor-contextmenu ul li{overflow:hidden}div.jsoneditor-contextmenu ul li ul{display:none;position:relative;left:-10px;top:0;border:none;box-shadow:inset 0 0 10px rgba(128,128,128,.5);padding:0 10px;-webkit-transition:all .3s ease-out;-moz-transition:all .3s ease-out;-o-transition:all .3s ease-out;transition:all .3s ease-out}div.jsoneditor-contextmenu ul li ul li button{padding-left:24px;animation:all ease-in-out 1s}div.jsoneditor-contextmenu ul li ul li button:focus,div.jsoneditor-contextmenu ul li ul li button:hover{background-color:#f5f5f5}div.jsoneditor-contextmenu button.jsoneditor-type-string>div.jsoneditor-icon{background-position:-144px -24px}div.jsoneditor-contextmenu button.jsoneditor-type-string.jsoneditor-selected>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-type-string:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-type-string:hover>div.jsoneditor-icon{background-position:-144px 0}div.jsoneditor-contextmenu button.jsoneditor-type-auto>div.jsoneditor-icon{background-position:-120px -24px}div.jsoneditor-contextmenu button.jsoneditor-type-auto.jsoneditor-selected>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-type-auto:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-type-auto:hover>div.jsoneditor-icon{background-position:-120px 0}div.jsoneditor-contextmenu button.jsoneditor-type-object>div.jsoneditor-icon{background-position:-72px -24px}div.jsoneditor-contextmenu button.jsoneditor-type-object.jsoneditor-selected>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-type-object:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-type-object:hover>div.jsoneditor-icon{background-position:-72px 0}div.jsoneditor-contextmenu button.jsoneditor-type-array>div.jsoneditor-icon{background-position:-96px -24px}div.jsoneditor-contextmenu button.jsoneditor-type-array.jsoneditor-selected>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-type-array:focus>div.jsoneditor-icon,div.jsoneditor-contextmenu button.jsoneditor-type-array:hover>div.jsoneditor-icon{background-position:-96px 0}div.jsoneditor-contextmenu button.jsoneditor-type-modes>div.jsoneditor-icon{background-image:none;width:6px}div.jsoneditor-menu{width:100%;height:35px;padding:2px;margin:0;box-sizing:border-box;color:#fff;background-color:#3883fa;border-bottom:1px solid #3883fa}div.jsoneditor-menu>button,div.jsoneditor-menu>div.jsoneditor-modes>button{width:26px;height:26px;margin:2px;padding:0;border-radius:2px;border:1px solid transparent;background:url(img/jsoneditor-icons.svg);color:#fff;opacity:.8;font-family:arial,sans-serif;font-size:10pt;float:left}div.jsoneditor-menu>button:hover,div.jsoneditor-menu>div.jsoneditor-modes>button:hover{background-color:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.4)}div.jsoneditor-menu>button:active,div.jsoneditor-menu>button:focus,div.jsoneditor-menu>div.jsoneditor-modes>button:active,div.jsoneditor-menu>div.jsoneditor-modes>button:focus{background-color:rgba(255,255,255,.3)}div.jsoneditor-menu>button:disabled,div.jsoneditor-menu>div.jsoneditor-modes>button:disabled{opacity:.5}div.jsoneditor-menu>button.jsoneditor-collapse-all{background-position:0 -96px}div.jsoneditor-menu>button.jsoneditor-expand-all{background-position:0 -120px}div.jsoneditor-menu>button.jsoneditor-undo{background-position:-24px -96px}div.jsoneditor-menu>button.jsoneditor-undo:disabled{background-position:-24px -120px}div.jsoneditor-menu>button.jsoneditor-redo{background-position:-48px -96px}div.jsoneditor-menu>button.jsoneditor-redo:disabled{background-position:-48px -120px}div.jsoneditor-menu>button.jsoneditor-compact{background-position:-72px -96px}div.jsoneditor-menu>button.jsoneditor-format{background-position:-72px -120px}div.jsoneditor-menu>div.jsoneditor-modes{display:inline-block;float:left}div.jsoneditor-menu>div.jsoneditor-modes>button{background-image:none;width:auto;padding-left:6px;padding-right:6px}div.jsoneditor-menu>button.jsoneditor-separator,div.jsoneditor-menu>div.jsoneditor-modes>button.jsoneditor-separator{margin-left:10px}div.jsoneditor-menu a{font-family:arial,sans-serif;font-size:10pt;color:#fff;opacity:.8;vertical-align:middle}div.jsoneditor-menu a:hover{opacity:1}div.jsoneditor-menu a.jsoneditor-poweredBy{font-size:8pt;position:absolute;right:0;top:0;padding:10px}table.jsoneditor-search div.jsoneditor-results,table.jsoneditor-search input{font-family:arial,sans-serif;font-size:10pt;color:#1A1A1A;background:0 0}table.jsoneditor-search{position:absolute;right:2px;top:2px}table.jsoneditor-search div.jsoneditor-frame{border:1px solid transparent;background-color:#fff;padding:0 2px;margin:0}table.jsoneditor-search div.jsoneditor-frame table{border-collapse:collapse}table.jsoneditor-search input{width:120px;border:none;outline:0;margin:1px;line-height:20px}table.jsoneditor-search .jsoneditor-results{color:#4d4d4d;padding-right:5px;line-height:24px}table.jsoneditor-search button{width:16px;height:24px;padding:0;margin:0;border:none;background:url(img/jsoneditor-icons.svg);vertical-align:top}table.jsoneditor-search button:hover{background-color:transparent}table.jsoneditor-search butto
[all...]
H A Dsetup.js22 search: false,
/plugin/struct/meta/
H A DCSVExporter.php33 $search = new Search();
34 $search->addSchema($table);
35 $search->addColumn('*');
37 $result = $search->getRows();
40 $pids = $search->getPids();
43 echo $this->header($search->getColumns());
/plugin/struct/
H A Dremote.php154 $search = new SearchConfig($config);
155 $results = $search->getRows();
H A Dstyle.less398 background-image: url(../../tpl/dokuwiki/images/search.png);
/plugin/struct/script/
H A DEntryEditor.js76 struct_ajax(name, cb, {search: term});
/plugin/struct/syntax/
H A Dcloud.php96 $search = new SearchCloud($data);
97 $cloud = new AggregationCloud($INFO['id'], $mode, $renderer, $search);
103 $renderer->meta['plugin']['struct']['hasaggregation'] = $search->getCacheFlag();
H A Dlist.php
H A Dtable.php112 $search = $this->getSearchConfig($config);
115 $search->setLimit(0);
116 $search->setOffset(0);
119 $table = new $this->tableclass($mainId, $format, $renderer, $search);
131 $renderer->meta['plugin']['struct']['hasaggregation'] = $search->getCacheFlag();
H A Dvalue.php102 /** @var SearchConfig $search */
103 $search = new SearchConfig($data);
106 $value = new AggregationValue($INFO['id'], $mode, $renderer, $search);
113 $renderer->meta['plugin']['struct']['hasaggregation'] = $search->getCacheFlag();
/plugin/struct/types/
H A DLookup.php122 $search = new Search();
123 $search->addSchema($schema);
124 $search->addColumn($field);
125 $search->addSort($field);
127 $result = $search->getRows();
128 $pids = $search->getPids();
129 $rids = $search->getRids();
/plugin/struct/action/
H A Dbureaucracy.php103 $search = new Search();
104 $search->addSchema($config['schema']);
105 $search->addColumn($config['field']);
106 $result = $search->getRows();
107 $pids = $search->getPids();
108 $rids = $search->getRids();
/plugin/openlayersmap/ol7/
H A Dol.js.map

12345678910>>...43