specv 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/client/assets/_basePickBy-BbEoMzqa.js +1 -0
- package/dist/client/assets/_baseUniq-Cu7xAxbk.js +1 -0
- package/dist/client/assets/arc-d2OJJj0V.js +1 -0
- package/dist/client/assets/architectureDiagram-2XIMDMQ5-JkJrmehD.js +36 -0
- package/dist/client/assets/blockDiagram-WCTKOSBZ-DXHcqkjb.js +132 -0
- package/dist/client/assets/c4Diagram-IC4MRINW-B6TKn4H0.js +10 -0
- package/dist/client/assets/channel-BrPjkAzP.js +1 -0
- package/dist/client/assets/chunk-4BX2VUAB-BqFl2qwd.js +1 -0
- package/dist/client/assets/chunk-55IACEB6-rUUVtKZu.js +1 -0
- package/dist/client/assets/chunk-FMBD7UC4-DBO_zu50.js +15 -0
- package/dist/client/assets/chunk-JSJVCQXG-45V7sVOi.js +1 -0
- package/dist/client/assets/chunk-KX2RTZJC-DO-cvXFZ.js +1 -0
- package/dist/client/assets/chunk-NQ4KR5QH-CjzjY8Lj.js +220 -0
- package/dist/client/assets/chunk-QZHKN3VN-1lRbTZvs.js +1 -0
- package/dist/client/assets/chunk-WL4C6EOR-DSjw8vZR.js +189 -0
- package/dist/client/assets/classDiagram-VBA2DB6C-BvUODQWG.js +1 -0
- package/dist/client/assets/classDiagram-v2-RAHNMMFH-BvUODQWG.js +1 -0
- package/dist/client/assets/clone-DBaHFUFo.js +1 -0
- package/dist/client/assets/cose-bilkent-S5V4N54A-BRGleZdB.js +1 -0
- package/dist/client/assets/cytoscape.esm-5J0xJHOV.js +321 -0
- package/dist/client/assets/dagre-KLK3FWXG-DHMg8mGv.js +4 -0
- package/dist/client/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/client/assets/diagram-E7M64L7V-DSf4Sp4q.js +24 -0
- package/dist/client/assets/diagram-IFDJBPK2-b-D69n7V.js +43 -0
- package/dist/client/assets/diagram-P4PSJMXO-C1BJaksq.js +24 -0
- package/dist/client/assets/erDiagram-INFDFZHY-BgJ2BiGo.js +70 -0
- package/dist/client/assets/flowDiagram-PKNHOUZH-D6zeTvLT.js +162 -0
- package/dist/client/assets/ganttDiagram-A5KZAMGK-C6pRNZNW.js +292 -0
- package/dist/client/assets/gitGraphDiagram-K3NZZRJ6-DezWLbgZ.js +65 -0
- package/dist/client/assets/graph-CDuB5VEy.js +1 -0
- package/dist/client/assets/index-BS_zyEp8.js +310 -0
- package/dist/client/assets/index-C1kvxchU.css +1 -0
- package/dist/client/assets/infoDiagram-LFFYTUFH-CxhiVoSu.js +2 -0
- package/dist/client/assets/init-Gi6I4Gst.js +1 -0
- package/dist/client/assets/ishikawaDiagram-PHBUUO56-J-M5GhWU.js +70 -0
- package/dist/client/assets/journeyDiagram-4ABVD52K-2iTO5lFS.js +139 -0
- package/dist/client/assets/kanban-definition-K7BYSVSG-DjxhpM1N.js +89 -0
- package/dist/client/assets/layout-Uso6HUUe.js +1 -0
- package/dist/client/assets/linear-DOvrUVDB.js +1 -0
- package/dist/client/assets/mermaid-block-CUusLOw5.js +249 -0
- package/dist/client/assets/mindmap-definition-YRQLILUH-Cx6VfdT1.js +68 -0
- package/dist/client/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/client/assets/pieDiagram-SKSYHLDU-Cl_7oQ5D.js +30 -0
- package/dist/client/assets/quadrantDiagram-337W2JSQ-9-hmP2sR.js +7 -0
- package/dist/client/assets/requirementDiagram-Z7DCOOCP-B9ym5S9j.js +73 -0
- package/dist/client/assets/sankeyDiagram-WA2Y5GQK-BquUAhGG.js +10 -0
- package/dist/client/assets/sequenceDiagram-2WXFIKYE-DFF7hP89.js +145 -0
- package/dist/client/assets/stateDiagram-RAJIS63D-5d7deHv4.js +1 -0
- package/dist/client/assets/stateDiagram-v2-FVOUBMTO-BCrBE7ns.js +1 -0
- package/dist/client/assets/timeline-definition-YZTLITO2-B--cJVhe.js +61 -0
- package/dist/client/assets/treemap-KZPCXAKY-CfuVg_xK.js +162 -0
- package/dist/client/assets/vennDiagram-LZ73GAT5-Bwe1MZrS.js +34 -0
- package/dist/client/assets/xychartDiagram-JWTSCODW-BBQuedrJ.js +7 -0
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +55 -10
- package/package.json +22 -2
- package/dist/client/assets/index-BwFlB__h.js +0 -41
- package/dist/client/assets/index-DNf9f_m4.css +0 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BS_zyEp8.js","assets/index-C1kvxchU.css","assets/dagre-KLK3FWXG-DHMg8mGv.js","assets/graph-CDuB5VEy.js","assets/_baseUniq-Cu7xAxbk.js","assets/layout-Uso6HUUe.js","assets/_basePickBy-BbEoMzqa.js","assets/clone-DBaHFUFo.js","assets/cose-bilkent-S5V4N54A-BRGleZdB.js","assets/cytoscape.esm-5J0xJHOV.js","assets/c4Diagram-IC4MRINW-B6TKn4H0.js","assets/chunk-JSJVCQXG-45V7sVOi.js","assets/flowDiagram-PKNHOUZH-D6zeTvLT.js","assets/chunk-FMBD7UC4-DBO_zu50.js","assets/chunk-55IACEB6-rUUVtKZu.js","assets/chunk-KX2RTZJC-DO-cvXFZ.js","assets/channel-BrPjkAzP.js","assets/erDiagram-INFDFZHY-BgJ2BiGo.js","assets/gitGraphDiagram-K3NZZRJ6-DezWLbgZ.js","assets/chunk-4BX2VUAB-BqFl2qwd.js","assets/chunk-QZHKN3VN-1lRbTZvs.js","assets/treemap-KZPCXAKY-CfuVg_xK.js","assets/ganttDiagram-A5KZAMGK-C6pRNZNW.js","assets/linear-DOvrUVDB.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-LFFYTUFH-CxhiVoSu.js","assets/pieDiagram-SKSYHLDU-Cl_7oQ5D.js","assets/arc-d2OJJj0V.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-337W2JSQ-9-hmP2sR.js","assets/xychartDiagram-JWTSCODW-BBQuedrJ.js","assets/requirementDiagram-Z7DCOOCP-B9ym5S9j.js","assets/sequenceDiagram-2WXFIKYE-DFF7hP89.js","assets/classDiagram-VBA2DB6C-BvUODQWG.js","assets/chunk-WL4C6EOR-DSjw8vZR.js","assets/classDiagram-v2-RAHNMMFH-BvUODQWG.js","assets/stateDiagram-RAJIS63D-5d7deHv4.js","assets/chunk-NQ4KR5QH-CjzjY8Lj.js","assets/stateDiagram-v2-FVOUBMTO-BCrBE7ns.js","assets/journeyDiagram-4ABVD52K-2iTO5lFS.js","assets/timeline-definition-YZTLITO2-B--cJVhe.js","assets/mindmap-definition-YRQLILUH-Cx6VfdT1.js","assets/kanban-definition-K7BYSVSG-DjxhpM1N.js","assets/sankeyDiagram-WA2Y5GQK-BquUAhGG.js","assets/diagram-P4PSJMXO-C1BJaksq.js","assets/diagram-IFDJBPK2-b-D69n7V.js","assets/blockDiagram-WCTKOSBZ-DXHcqkjb.js","assets/architectureDiagram-2XIMDMQ5-JkJrmehD.js","assets/ishikawaDiagram-PHBUUO56-J-M5GhWU.js","assets/vennDiagram-LZ73GAT5-Bwe1MZrS.js","assets/diagram-E7M64L7V-DSf4Sp4q.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{g as l0,_ as ut,u as c0,j as as,r as si}from"./index-BS_zyEp8.js";var Ln={exports:{}},h0=Ln.exports,Ul;function u0(){return Ul||(Ul=1,(function(e,t){(function(r,i){e.exports=i()})(h0,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",u="month",d="quarter",f="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var B=["th","st","nd","rd"],S=A%100;return"["+A+(B[(S-20)%10]||B[S]||B[0])+"]"}},C=function(A,B,S){var $=String(A);return!$||$.length>=B?A:""+Array(B+1-$.length).join(S)+A},v={s:C,z:function(A){var B=-A.utcOffset(),S=Math.abs(B),$=Math.floor(S/60),M=S%60;return(B<=0?"+":"-")+C($,2,"0")+":"+C(M,2,"0")},m:function A(B,S){if(B.date()<S.date())return-A(S,B);var $=12*(S.year()-B.year())+(S.month()-B.month()),M=B.clone().add($,u),q=S-M<0,Y=B.clone().add($+(q?-1:1),u);return+(-($+(S-M)/(q?M-Y:Y-M))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:f,w:h,d:c,D:g,h:l,m:o,s,ms:a,Q:d}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},k="en",T={};T[k]=b;var L="$isDayjsObject",D=function(A){return A instanceof N||!(!A||!A[L])},I=function A(B,S,$){var M;if(!B)return k;if(typeof B=="string"){var q=B.toLowerCase();T[q]&&(M=q),S&&(T[q]=S,M=q);var Y=B.split("-");if(!M&&Y.length>1)return A(Y[0])}else{var Z=B.name;T[Z]=B,M=Z}return!$&&M&&(k=M),M||!$&&k},O=function(A,B){if(D(A))return A.clone();var S=typeof B=="object"?B:{};return S.date=A,S.args=arguments,new N(S)},E=v;E.l=I,E.i=D,E.w=function(A,B){return O(A,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var N=(function(){function A(S){this.$L=I(S.locale,null,!0),this.parse(S),this.$x=this.$x||S.x||{},this[L]=!0}var B=A.prototype;return B.parse=function(S){this.$d=(function($){var M=$.date,q=$.utc;if(M===null)return new Date(NaN);if(E.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var Y=M.match(y);if(Y){var Z=Y[2]-1||0,et=(Y[7]||"0").substring(0,3);return q?new Date(Date.UTC(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)):new Date(Y[1],Z,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,et)}}return new Date(M)})(S),this.init()},B.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},B.$utils=function(){return E},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(S,$){var M=O(S);return this.startOf($)<=M&&M<=this.endOf($)},B.isAfter=function(S,$){return O(S)<this.startOf($)},B.isBefore=function(S,$){return this.endOf($)<O(S)},B.$g=function(S,$,M){return E.u(S)?this[$]:this.set(M,S)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(S,$){var M=this,q=!!E.u($)||$,Y=E.p(S),Z=function(ne,xt){var ae=E.w(M.$u?Date.UTC(M.$y,xt,ne):new Date(M.$y,xt,ne),M);return q?ae:ae.endOf(c)},et=function(ne,xt){return E.w(M.toDate()[ne].apply(M.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(xt)),M)},K=this.$W,ot=this.$M,at=this.$D,Ct="set"+(this.$u?"UTC":"");switch(Y){case f:return q?Z(1,0):Z(31,11);case u:return q?Z(1,ot):Z(0,ot+1);case h:var bt=this.$locale().weekStart||0,Bt=(K<bt?K+7:K)-bt;return Z(q?at-Bt:at+(6-Bt),ot);case c:case g:return et(Ct+"Hours",0);case l:return et(Ct+"Minutes",1);case o:return et(Ct+"Seconds",2);case s:return et(Ct+"Milliseconds",3);default:return this.clone()}},B.endOf=function(S){return this.startOf(S,!1)},B.$set=function(S,$){var M,q=E.p(S),Y="set"+(this.$u?"UTC":""),Z=(M={},M[c]=Y+"Date",M[g]=Y+"Date",M[u]=Y+"Month",M[f]=Y+"FullYear",M[l]=Y+"Hours",M[o]=Y+"Minutes",M[s]=Y+"Seconds",M[a]=Y+"Milliseconds",M)[q],et=q===c?this.$D+($-this.$W):$;if(q===u||q===f){var K=this.clone().set(g,1);K.$d[Z](et),K.init(),this.$d=K.set(g,Math.min(this.$D,K.daysInMonth())).$d}else Z&&this.$d[Z](et);return this.init(),this},B.set=function(S,$){return this.clone().$set(S,$)},B.get=function(S){return this[E.p(S)]()},B.add=function(S,$){var M,q=this;S=Number(S);var Y=E.p($),Z=function(ot){var at=O(q);return E.w(at.date(at.date()+Math.round(ot*S)),q)};if(Y===u)return this.set(u,this.$M+S);if(Y===f)return this.set(f,this.$y+S);if(Y===c)return Z(1);if(Y===h)return Z(7);var et=(M={},M[o]=i,M[l]=n,M[s]=r,M)[Y]||1,K=this.$d.getTime()+S*et;return E.w(K,this)},B.subtract=function(S,$){return this.add(-1*S,$)},B.format=function(S){var $=this,M=this.$locale();if(!this.isValid())return M.invalidDate||m;var q=S||"YYYY-MM-DDTHH:mm:ssZ",Y=E.z(this),Z=this.$H,et=this.$m,K=this.$M,ot=M.weekdays,at=M.months,Ct=M.meridiem,bt=function(xt,ae,We,se){return xt&&(xt[ae]||xt($,q))||We[ae].slice(0,se)},Bt=function(xt){return E.s(Z%12||12,xt,"0")},ne=Ct||function(xt,ae,We){var se=xt<12?"AM":"PM";return We?se.toLowerCase():se};return q.replace(x,(function(xt,ae){return ae||(function(We){switch(We){case"YY":return String($.$y).slice(-2);case"YYYY":return E.s($.$y,4,"0");case"M":return K+1;case"MM":return E.s(K+1,2,"0");case"MMM":return bt(M.monthsShort,K,at,3);case"MMMM":return bt(at,K);case"D":return $.$D;case"DD":return E.s($.$D,2,"0");case"d":return String($.$W);case"dd":return bt(M.weekdaysMin,$.$W,ot,2);case"ddd":return bt(M.weekdaysShort,$.$W,ot,3);case"dddd":return ot[$.$W];case"H":return String(Z);case"HH":return E.s(Z,2,"0");case"h":return Bt(1);case"hh":return Bt(2);case"a":return ne(Z,et,!0);case"A":return ne(Z,et,!1);case"m":return String(et);case"mm":return E.s(et,2,"0");case"s":return String($.$s);case"ss":return E.s($.$s,2,"0");case"SSS":return E.s($.$ms,3,"0");case"Z":return Y}return null})(xt)||Y.replace(":","")}))},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(S,$,M){var q,Y=this,Z=E.p($),et=O(S),K=(et.utcOffset()-this.utcOffset())*i,ot=this-et,at=function(){return E.m(Y,et)};switch(Z){case f:q=at()/12;break;case u:q=at();break;case d:q=at()/3;break;case h:q=(ot-K)/6048e5;break;case c:q=(ot-K)/864e5;break;case l:q=ot/n;break;case o:q=ot/i;break;case s:q=ot/r;break;default:q=ot}return M?q:E.a(q)},B.daysInMonth=function(){return this.endOf(u).$D},B.$locale=function(){return T[this.$L]},B.locale=function(S,$){if(!S)return this.$L;var M=this.clone(),q=I(S,$,!0);return q&&(M.$L=q),M},B.clone=function(){return E.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},A})(),R=N.prototype;return O.prototype=R,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",u],["$y",f],["$D",g]].forEach((function(A){R[A[1]]=function(B){return this.$g(B,A[0],A[1])}})),O.extend=function(A,B){return A.$i||(A(B,N,O),A.$i=!0),O},O.locale=I,O.isDayjs=D,O.unix=function(A){return O(1e3*A)},O.en=T[k],O.Ls=T,O.p={},O}))})(Ln)),Ln.exports}var f0=u0();const d0=l0(f0);var Ah=Object.defineProperty,p=(e,t)=>Ah(e,"name",{value:t,configurable:!0}),p0=(e,t)=>{for(var r in t)Ah(e,r,{get:t[r],enumerable:!0})},Ae={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},F={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},Lo=p(function(e="fatal"){let t=Ae.fatal;typeof e=="string"?e.toLowerCase()in Ae&&(t=Ae[e]):typeof e=="number"&&(t=e),F.trace=()=>{},F.debug=()=>{},F.info=()=>{},F.warn=()=>{},F.error=()=>{},F.fatal=()=>{},t<=Ae.fatal&&(F.fatal=console.error?console.error.bind(console,te("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",te("FATAL"))),t<=Ae.error&&(F.error=console.error?console.error.bind(console,te("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",te("ERROR"))),t<=Ae.warn&&(F.warn=console.warn?console.warn.bind(console,te("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",te("WARN"))),t<=Ae.info&&(F.info=console.info?console.info.bind(console,te("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",te("INFO"))),t<=Ae.debug&&(F.debug=console.debug?console.debug.bind(console,te("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",te("DEBUG"))),t<=Ae.trace&&(F.trace=console.debug?console.debug.bind(console,te("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",te("TRACE")))},"setLogLevel"),te=p(e=>`%c${d0().format("ss.SSS")} : ${e} : `,"format");const Bn={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return Bn.hue2rgb(a,n,e+1/3)*255;case"g":return Bn.hue2rgb(a,n,e)*255;case"b":return Bn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;const o=n-a,l=s>.5?o/(2-n-a):o/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},g0={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},m0={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},st={channel:Bn,lang:g0,unit:m0},qe={};for(let e=0;e<=255;e++)qe[e]=st.unit.dec2hex(e);const Ft={ALL:0,RGB:1,HSL:2};class y0{constructor(){this.type=Ft.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Ft.ALL}is(t){return this.type===t}}class x0{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new y0}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ft.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=st.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=st.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=st.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=st.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=st.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=st.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ft.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ft.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ft.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ft.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ft.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ft.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ka=new x0({r:0,g:0,b:0,a:0},"transparent"),Fr={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Fr.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return ka.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${qe[Math.round(t)]}${qe[Math.round(r)]}${qe[Math.round(i)]}${qe[Math.round(n*255)]}`:`#${qe[Math.round(t)]}${qe[Math.round(r)]}${qe[Math.round(i)]}`}},sr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(sr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return st.channel.clamp.h(parseFloat(r)*.9);case"rad":return st.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return st.channel.clamp.h(parseFloat(r)*360)}}return st.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(sr.re);if(!r)return;const[,i,n,a,s,o]=r;return ka.set({h:sr._hue2deg(i),s:st.channel.clamp.s(parseFloat(n)),l:st.channel.clamp.l(parseFloat(a)),a:s?st.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${st.lang.round(t)}, ${st.lang.round(r)}%, ${st.lang.round(i)}%, ${n})`:`hsl(${st.lang.round(t)}, ${st.lang.round(r)}%, ${st.lang.round(i)}%)`}},Bi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=Bi.colors[e];if(t)return Fr.parse(t)},stringify:e=>{const t=Fr.stringify(e);for(const r in Bi.colors)if(Bi.colors[r]===t)return r}},_i={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(_i.re);if(!r)return;const[,i,n,a,s,o,l,c,h]=r;return ka.set({r:st.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:st.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:st.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?st.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${st.lang.round(t)}, ${st.lang.round(r)}, ${st.lang.round(i)}, ${st.lang.round(n)})`:`rgb(${st.lang.round(t)}, ${st.lang.round(r)}, ${st.lang.round(i)})`}},we={format:{keyword:Bi,hex:Fr,rgb:_i,rgba:_i,hsl:sr,hsla:sr},parse:e=>{if(typeof e!="string")return e;const t=Fr.parse(e)||_i.parse(e)||sr.parse(e)||Bi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ft.HSL)||e.data.r===void 0?sr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?_i.stringify(e):Fr.stringify(e)},Mh=(e,t)=>{const r=we.parse(e);for(const i in t)r[i]=st.channel.clamp[i](t[i]);return we.stringify(r)},Ai=(e,t,r=0,i=1)=>{if(typeof e!="number")return Mh(e,{a:t});const n=ka.set({r:st.channel.clamp.r(e),g:st.channel.clamp.g(t),b:st.channel.clamp.b(r),a:st.channel.clamp.a(i)});return we.stringify(n)},b0=e=>{const{r:t,g:r,b:i}=we.parse(e),n=.2126*st.channel.toLinear(t)+.7152*st.channel.toLinear(r)+.0722*st.channel.toLinear(i);return st.lang.round(n)},_0=e=>b0(e)>=.5,Xi=e=>!_0(e),Eh=(e,t,r)=>{const i=we.parse(e),n=i[t],a=st.channel.clamp[t](n+r);return n!==a&&(i[t]=a),we.stringify(i)},H=(e,t)=>Eh(e,"l",t),tt=(e,t)=>Eh(e,"l",-t),w=(e,t)=>{const r=we.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return Mh(e,i)},C0=(e,t,r=50)=>{const{r:i,g:n,b:a,a:s}=we.parse(e),{r:o,g:l,b:c,a:h}=we.parse(t),u=r/100,d=u*2-1,f=s-h,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,y=1-m,x=i*m+o*y,b=n*m+l*y,C=a*m+c*y,v=s*u+h*(1-u);return Ai(x,b,C,v)},z=(e,t=100)=>{const r=we.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,C0(r,e,t)};const{entries:$h,setPrototypeOf:Gl,isFrozen:w0,getPrototypeOf:k0,getOwnPropertyDescriptor:v0}=Object;let{freeze:jt,seal:re,create:An}=Object,{apply:Ls,construct:Bs}=typeof Reflect<"u"&&Reflect;jt||(jt=function(t){return t});re||(re=function(t){return t});Ls||(Ls=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a<i;a++)n[a-2]=arguments[a];return t.apply(r,n)});Bs||(Bs=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return new t(...i)});const gn=Yt(Array.prototype.forEach),S0=Yt(Array.prototype.lastIndexOf),Vl=Yt(Array.prototype.pop),oi=Yt(Array.prototype.push),T0=Yt(Array.prototype.splice),Mn=Yt(String.prototype.toLowerCase),ss=Yt(String.prototype.toString),os=Yt(String.prototype.match),li=Yt(String.prototype.replace),L0=Yt(String.prototype.indexOf),B0=Yt(String.prototype.trim),Qt=Yt(Object.prototype.hasOwnProperty),zt=Yt(RegExp.prototype.test),ci=A0(TypeError);function Yt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return Ls(e,t,i)}}function A0(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Bs(e,r)}}function ct(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mn;Gl&&Gl(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(w0(t)||(t[i]=a),n=a)}e[n]=!0}return e}function M0(e){for(let t=0;t<e.length;t++)Qt(e,t)||(e[t]=null);return e}function ye(e){const t=An(null);for(const[r,i]of $h(e))Qt(e,r)&&(Array.isArray(i)?t[r]=M0(i):i&&typeof i=="object"&&i.constructor===Object?t[r]=ye(i):t[r]=i);return t}function hi(e,t){for(;e!==null;){const i=v0(e,t);if(i){if(i.get)return Yt(i.get);if(typeof i.value=="function")return Yt(i.value)}e=k0(e)}function r(){return null}return r}const Xl=jt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ls=jt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),cs=jt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),E0=jt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hs=jt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),$0=jt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Zl=jt(["#text"]),Kl=jt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),us=jt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ql=jt(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),mn=jt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F0=re(/\{\{[\w\W]*|[\w\W]*\}\}/gm),D0=re(/<%[\w\W]*|[\w\W]*%>/gm),O0=re(/\$\{[\w\W]*/gm),R0=re(/^data-[\-\w.\u00B7-\uFFFF]+$/),I0=re(/^aria-[\-\w]+$/),Fh=re(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),P0=re(/^(?:\w+script|data):/i),N0=re(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Dh=re(/^html$/i),z0=re(/^[a-z][.\w]*(-[.\w]+)+$/i);var Jl=Object.freeze({__proto__:null,ARIA_ATTR:I0,ATTR_WHITESPACE:N0,CUSTOM_ELEMENT:z0,DATA_ATTR:R0,DOCTYPE_NAME:Dh,ERB_EXPR:D0,IS_ALLOWED_URI:Fh,IS_SCRIPT_OR_DATA:P0,MUSTACHE_EXPR:F0,TMPLIT_EXPR:O0});const ui={element:1,text:3,progressingInstruction:7,comment:8,document:9},W0=function(){return typeof window>"u"?null:window},q0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},tc=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Oh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:W0();const t=J=>Oh(J);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==ui.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:d,trustedTypes:f}=e,g=l.prototype,m=hi(g,"cloneNode"),y=hi(g,"remove"),x=hi(g,"nextSibling"),b=hi(g,"childNodes"),C=hi(g,"parentNode");if(typeof s=="function"){const J=r.createElement("template");J.content&&J.content.ownerDocument&&(r=J.content.ownerDocument)}let v,k="";const{implementation:T,createNodeIterator:L,createDocumentFragment:D,getElementsByTagName:I}=r,{importNode:O}=i;let E=tc();t.isSupported=typeof $h=="function"&&typeof C=="function"&&T&&T.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:R,TMPLIT_EXPR:A,DATA_ATTR:B,ARIA_ATTR:S,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:q}=Jl;let{IS_ALLOWED_URI:Y}=Jl,Z=null;const et=ct({},[...Xl,...ls,...cs,...hs,...Zl]);let K=null;const ot=ct({},[...Kl,...us,...Ql,...mn]);let at=Object.seal(An(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ct=null,bt=null;const Bt=Object.seal(An(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ne=!0,xt=!0,ae=!1,We=!0,se=!1,ln=!0,tr=!1,Xa=!1,Za=!1,kr=!1,cn=!1,hn=!1,Al=!0,Ml=!1;const t0="user-content-";let Ka=!0,ni=!1,vr={},ge=null;const Qa=ct({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let El=null;const $l=ct({},["audio","video","img","source","image","track"]);let Ja=null;const Fl=ct({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),un="http://www.w3.org/1998/Math/MathML",fn="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml";let Sr=Te,ts=!1,es=null;const e0=ct({},[un,fn,Te],ss);let dn=ct({},["mi","mo","mn","ms","mtext"]),pn=ct({},["annotation-xml"]);const r0=ct({},["title","style","font","a","script"]);let ai=null;const i0=["application/xhtml+xml","text/html"],n0="text/html";let vt=null,Tr=null;const a0=r.createElement("form"),Dl=function(_){return _ instanceof RegExp||_ instanceof Function},rs=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Tr&&Tr===_)){if((!_||typeof _!="object")&&(_={}),_=ye(_),ai=i0.indexOf(_.PARSER_MEDIA_TYPE)===-1?n0:_.PARSER_MEDIA_TYPE,vt=ai==="application/xhtml+xml"?ss:Mn,Z=Qt(_,"ALLOWED_TAGS")?ct({},_.ALLOWED_TAGS,vt):et,K=Qt(_,"ALLOWED_ATTR")?ct({},_.ALLOWED_ATTR,vt):ot,es=Qt(_,"ALLOWED_NAMESPACES")?ct({},_.ALLOWED_NAMESPACES,ss):e0,Ja=Qt(_,"ADD_URI_SAFE_ATTR")?ct(ye(Fl),_.ADD_URI_SAFE_ATTR,vt):Fl,El=Qt(_,"ADD_DATA_URI_TAGS")?ct(ye($l),_.ADD_DATA_URI_TAGS,vt):$l,ge=Qt(_,"FORBID_CONTENTS")?ct({},_.FORBID_CONTENTS,vt):Qa,Ct=Qt(_,"FORBID_TAGS")?ct({},_.FORBID_TAGS,vt):ye({}),bt=Qt(_,"FORBID_ATTR")?ct({},_.FORBID_ATTR,vt):ye({}),vr=Qt(_,"USE_PROFILES")?_.USE_PROFILES:!1,ne=_.ALLOW_ARIA_ATTR!==!1,xt=_.ALLOW_DATA_ATTR!==!1,ae=_.ALLOW_UNKNOWN_PROTOCOLS||!1,We=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,se=_.SAFE_FOR_TEMPLATES||!1,ln=_.SAFE_FOR_XML!==!1,tr=_.WHOLE_DOCUMENT||!1,kr=_.RETURN_DOM||!1,cn=_.RETURN_DOM_FRAGMENT||!1,hn=_.RETURN_TRUSTED_TYPE||!1,Za=_.FORCE_BODY||!1,Al=_.SANITIZE_DOM!==!1,Ml=_.SANITIZE_NAMED_PROPS||!1,Ka=_.KEEP_CONTENT!==!1,ni=_.IN_PLACE||!1,Y=_.ALLOWED_URI_REGEXP||Fh,Sr=_.NAMESPACE||Te,dn=_.MATHML_TEXT_INTEGRATION_POINTS||dn,pn=_.HTML_INTEGRATION_POINTS||pn,at=_.CUSTOM_ELEMENT_HANDLING||{},_.CUSTOM_ELEMENT_HANDLING&&Dl(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(at.tagNameCheck=_.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_.CUSTOM_ELEMENT_HANDLING&&Dl(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(at.attributeNameCheck=_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(at.allowCustomizedBuiltInElements=_.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),se&&(xt=!1),cn&&(kr=!0),vr&&(Z=ct({},Zl),K=An(null),vr.html===!0&&(ct(Z,Xl),ct(K,Kl)),vr.svg===!0&&(ct(Z,ls),ct(K,us),ct(K,mn)),vr.svgFilters===!0&&(ct(Z,cs),ct(K,us),ct(K,mn)),vr.mathMl===!0&&(ct(Z,hs),ct(K,Ql),ct(K,mn))),Qt(_,"ADD_TAGS")||(Bt.tagCheck=null),Qt(_,"ADD_ATTR")||(Bt.attributeCheck=null),_.ADD_TAGS&&(typeof _.ADD_TAGS=="function"?Bt.tagCheck=_.ADD_TAGS:(Z===et&&(Z=ye(Z)),ct(Z,_.ADD_TAGS,vt))),_.ADD_ATTR&&(typeof _.ADD_ATTR=="function"?Bt.attributeCheck=_.ADD_ATTR:(K===ot&&(K=ye(K)),ct(K,_.ADD_ATTR,vt))),_.ADD_URI_SAFE_ATTR&&ct(Ja,_.ADD_URI_SAFE_ATTR,vt),_.FORBID_CONTENTS&&(ge===Qa&&(ge=ye(ge)),ct(ge,_.FORBID_CONTENTS,vt)),_.ADD_FORBID_CONTENTS&&(ge===Qa&&(ge=ye(ge)),ct(ge,_.ADD_FORBID_CONTENTS,vt)),Ka&&(Z["#text"]=!0),tr&&ct(Z,["html","head","body"]),Z.table&&(ct(Z,["tbody"]),delete Ct.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw ci('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ci('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');v=_.TRUSTED_TYPES_POLICY,k=v.createHTML("")}else v===void 0&&(v=q0(f,n)),v!==null&&typeof k=="string"&&(k=v.createHTML(""));jt&&jt(_),Tr=_}},Ol=ct({},[...ls,...cs,...E0]),Rl=ct({},[...hs,...$0]),s0=function(_){let P=C(_);(!P||!P.tagName)&&(P={namespaceURI:Sr,tagName:"template"});const V=Mn(_.tagName),mt=Mn(P.tagName);return es[_.namespaceURI]?_.namespaceURI===fn?P.namespaceURI===Te?V==="svg":P.namespaceURI===un?V==="svg"&&(mt==="annotation-xml"||dn[mt]):!!Ol[V]:_.namespaceURI===un?P.namespaceURI===Te?V==="math":P.namespaceURI===fn?V==="math"&&pn[mt]:!!Rl[V]:_.namespaceURI===Te?P.namespaceURI===fn&&!pn[mt]||P.namespaceURI===un&&!dn[mt]?!1:!Rl[V]&&(r0[V]||!Ol[V]):!!(ai==="application/xhtml+xml"&&es[_.namespaceURI]):!1},me=function(_){oi(t.removed,{element:_});try{C(_).removeChild(_)}catch{y(_)}},er=function(_,P){try{oi(t.removed,{attribute:P.getAttributeNode(_),from:P})}catch{oi(t.removed,{attribute:null,from:P})}if(P.removeAttribute(_),_==="is")if(kr||cn)try{me(P)}catch{}else try{P.setAttribute(_,"")}catch{}},Il=function(_){let P=null,V=null;if(Za)_="<remove></remove>"+_;else{const wt=os(_,/^[\r\n\t ]+/);V=wt&&wt[0]}ai==="application/xhtml+xml"&&Sr===Te&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const mt=v?v.createHTML(_):_;if(Sr===Te)try{P=new d().parseFromString(mt,ai)}catch{}if(!P||!P.documentElement){P=T.createDocument(Sr,"template",null);try{P.documentElement.innerHTML=ts?k:mt}catch{}}const $t=P.body||P.documentElement;return _&&V&&$t.insertBefore(r.createTextNode(V),$t.childNodes[0]||null),Sr===Te?I.call(P,tr?"html":"body")[0]:tr?P.documentElement:$t},Pl=function(_){return L.call(_.ownerDocument||_,_,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},is=function(_){return _ instanceof u&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof h)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},Nl=function(_){return typeof o=="function"&&_ instanceof o};function Le(J,_,P){gn(J,V=>{V.call(t,_,P,Tr)})}const zl=function(_){let P=null;if(Le(E.beforeSanitizeElements,_,null),is(_))return me(_),!0;const V=vt(_.nodeName);if(Le(E.uponSanitizeElement,_,{tagName:V,allowedTags:Z}),ln&&_.hasChildNodes()&&!Nl(_.firstElementChild)&&zt(/<[/\w!]/g,_.innerHTML)&&zt(/<[/\w!]/g,_.textContent)||_.nodeType===ui.progressingInstruction||ln&&_.nodeType===ui.comment&&zt(/<[/\w]/g,_.data))return me(_),!0;if(!(Bt.tagCheck instanceof Function&&Bt.tagCheck(V))&&(!Z[V]||Ct[V])){if(!Ct[V]&&ql(V)&&(at.tagNameCheck instanceof RegExp&&zt(at.tagNameCheck,V)||at.tagNameCheck instanceof Function&&at.tagNameCheck(V)))return!1;if(Ka&&!ge[V]){const mt=C(_)||_.parentNode,$t=b(_)||_.childNodes;if($t&&mt){const wt=$t.length;for(let Ut=wt-1;Ut>=0;--Ut){const Be=m($t[Ut],!0);Be.__removalCount=(_.__removalCount||0)+1,mt.insertBefore(Be,x(_))}}}return me(_),!0}return _ instanceof l&&!s0(_)||(V==="noscript"||V==="noembed"||V==="noframes")&&zt(/<\/no(script|embed|frames)/i,_.innerHTML)?(me(_),!0):(se&&_.nodeType===ui.text&&(P=_.textContent,gn([N,R,A],mt=>{P=li(P,mt," ")}),_.textContent!==P&&(oi(t.removed,{element:_.cloneNode()}),_.textContent=P)),Le(E.afterSanitizeElements,_,null),!1)},Wl=function(_,P,V){if(bt[P]||Al&&(P==="id"||P==="name")&&(V in r||V in a0))return!1;if(!(xt&&!bt[P]&&zt(B,P))){if(!(ne&&zt(S,P))){if(!(Bt.attributeCheck instanceof Function&&Bt.attributeCheck(P,_))){if(!K[P]||bt[P]){if(!(ql(_)&&(at.tagNameCheck instanceof RegExp&&zt(at.tagNameCheck,_)||at.tagNameCheck instanceof Function&&at.tagNameCheck(_))&&(at.attributeNameCheck instanceof RegExp&&zt(at.attributeNameCheck,P)||at.attributeNameCheck instanceof Function&&at.attributeNameCheck(P,_))||P==="is"&&at.allowCustomizedBuiltInElements&&(at.tagNameCheck instanceof RegExp&&zt(at.tagNameCheck,V)||at.tagNameCheck instanceof Function&&at.tagNameCheck(V))))return!1}else if(!Ja[P]){if(!zt(Y,li(V,M,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&_!=="script"&&L0(V,"data:")===0&&El[_])){if(!(ae&&!zt($,li(V,M,"")))){if(V)return!1}}}}}}}return!0},ql=function(_){return _!=="annotation-xml"&&os(_,q)},Hl=function(_){Le(E.beforeSanitizeAttributes,_,null);const{attributes:P}=_;if(!P||is(_))return;const V={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:K,forceKeepAttr:void 0};let mt=P.length;for(;mt--;){const $t=P[mt],{name:wt,namespaceURI:Ut,value:Be}=$t,Lr=vt(wt),ns=Be;let At=wt==="value"?ns:B0(ns);if(V.attrName=Lr,V.attrValue=At,V.keepAttr=!0,V.forceKeepAttr=void 0,Le(E.uponSanitizeAttribute,_,V),At=V.attrValue,Ml&&(Lr==="id"||Lr==="name")&&(er(wt,_),At=t0+At),ln&&zt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,At)){er(wt,_);continue}if(Lr==="attributename"&&os(At,"href")){er(wt,_);continue}if(V.forceKeepAttr)continue;if(!V.keepAttr){er(wt,_);continue}if(!We&&zt(/\/>/i,At)){er(wt,_);continue}se&&gn([N,R,A],Yl=>{At=li(At,Yl," ")});const jl=vt(_.nodeName);if(!Wl(jl,Lr,At)){er(wt,_);continue}if(v&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!Ut)switch(f.getAttributeType(jl,Lr)){case"TrustedHTML":{At=v.createHTML(At);break}case"TrustedScriptURL":{At=v.createScriptURL(At);break}}if(At!==ns)try{Ut?_.setAttributeNS(Ut,wt,At):_.setAttribute(wt,At),is(_)?me(_):Vl(t.removed)}catch{er(wt,_)}}Le(E.afterSanitizeAttributes,_,null)},o0=function J(_){let P=null;const V=Pl(_);for(Le(E.beforeSanitizeShadowDOM,_,null);P=V.nextNode();)Le(E.uponSanitizeShadowNode,P,null),zl(P),Hl(P),P.content instanceof a&&J(P.content);Le(E.afterSanitizeShadowDOM,_,null)};return t.sanitize=function(J){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,V=null,mt=null,$t=null;if(ts=!J,ts&&(J="<!-->"),typeof J!="string"&&!Nl(J))if(typeof J.toString=="function"){if(J=J.toString(),typeof J!="string")throw ci("dirty is not a string, aborting")}else throw ci("toString is not a function");if(!t.isSupported)return J;if(Xa||rs(_),t.removed=[],typeof J=="string"&&(ni=!1),ni){if(J.nodeName){const Be=vt(J.nodeName);if(!Z[Be]||Ct[Be])throw ci("root node is forbidden and cannot be sanitized in-place")}}else if(J instanceof o)P=Il("<!---->"),V=P.ownerDocument.importNode(J,!0),V.nodeType===ui.element&&V.nodeName==="BODY"||V.nodeName==="HTML"?P=V:P.appendChild(V);else{if(!kr&&!se&&!tr&&J.indexOf("<")===-1)return v&&hn?v.createHTML(J):J;if(P=Il(J),!P)return kr?null:hn?k:""}P&&Za&&me(P.firstChild);const wt=Pl(ni?J:P);for(;mt=wt.nextNode();)zl(mt),Hl(mt),mt.content instanceof a&&o0(mt.content);if(ni)return J;if(kr){if(cn)for($t=D.call(P.ownerDocument);P.firstChild;)$t.appendChild(P.firstChild);else $t=P;return(K.shadowroot||K.shadowrootmode)&&($t=O.call(i,$t,!0)),$t}let Ut=tr?P.outerHTML:P.innerHTML;return tr&&Z["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&zt(Dh,P.ownerDocument.doctype.name)&&(Ut="<!DOCTYPE "+P.ownerDocument.doctype.name+`>
|
|
3
|
+
`+Ut),se&&gn([N,R,A],Be=>{Ut=li(Ut,Be," ")}),v&&hn?v.createHTML(Ut):Ut},t.setConfig=function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};rs(J),Xa=!0},t.clearConfig=function(){Tr=null,Xa=!1},t.isValidAttribute=function(J,_,P){Tr||rs({});const V=vt(J),mt=vt(_);return Wl(V,mt,P)},t.addHook=function(J,_){typeof _=="function"&&oi(E[J],_)},t.removeHook=function(J,_){if(_!==void 0){const P=S0(E[J],_);return P===-1?void 0:T0(E[J],P,1)[0]}return Vl(E[J])},t.removeHooks=function(J){E[J]=[]},t.removeAllHooks=function(){E=tc()},t}var jr=Oh(),Rh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Mi=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,H0=/\s*%%.*\n/gm,Rr,Ih=(Rr=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(Rr,"UnknownDiagramError"),Rr),fr={},Bo=p(function(e,t){e=e.replace(Rh,"").replace(Mi,"").replace(H0,`
|
|
4
|
+
`);for(const[r,{detector:i}]of Object.entries(fr))if(i(e,t))return r;throw new Ih(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),As=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ph(t,r,i)},"registerLazyLoadedDiagrams"),Ph=p((e,t,r)=>{fr[e]&&F.warn(`Detector with key ${e} already exists. Overwriting.`),fr[e]={detector:t,loader:r},F.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),j0=p(e=>fr[e].loader,"getDiagramLoader"),Ms=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>Ms(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=Ms(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Tt=Ms,va="#ffffff",Sa="#f2f2f2",Wt=p((e,t)=>t?w(e,{s:-40,l:10}):w(e,{s:-40,l:-10}),"mkBorder"),Ir,Y0=(Ir=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(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||w(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||w(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||z(this.tertiaryColor),this.lineColor=this.lineColor||z(this.background),this.arrowheadColor=this.arrowheadColor||z(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?tt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||tt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||z(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||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||tt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||tt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=tt(this["cScale"+r],75);else for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScale"+r]=tt(this["cScale"+r],25);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleInv"+r]=this["cScaleInv"+r]||z(this["cScale"+r]);for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this.darkMode?this["cScalePeer"+r]=this["cScalePeer"+r]||H(this["cScale"+r],10):this["cScalePeer"+r]=this["cScalePeer"+r]||tt(this["cScale"+r],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let r=0;r<this.THEME_COLOR_LIMIT;r++)this["cScaleLabel"+r]=this["cScaleLabel"+r]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let r=0;r<5;r++)this["surface"+r]=this["surface"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(5+r*3)}),this["surfacePeer"+r]=this["surfacePeer"+r]||w(this.mainBkg,{h:180,s:-15,l:t*(8+r*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||w(this.primaryColor,{h:64}),this.fillType3=this.fillType3||w(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||w(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||w(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||w(this.primaryColor,{h:128}),this.fillType7=this.fillType7||w(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||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-10}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?H(this.quadrant1Fill):tt(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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?tt(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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=tt(this.git0,25),this.git1=tt(this.git1,25),this.git2=tt(this.git2,25),this.git3=tt(this.git3,25),this.git4=tt(this.git4,25),this.git5=tt(this.git5,25),this.git6=tt(this.git6,25),this.git7=tt(this.git7,25)),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(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||va,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Sa}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Ir,"Theme"),Ir),U0=p(e=>{const t=new Y0;return t.calculate(e),t},"getThemeVariables"),Pr,G0=(Pr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=z(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H(z("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ai(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=tt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=tt(this.sectionBkgColor,10),this.taskBorderColor=Ai(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ai(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||tt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=H(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=H(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=H(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=z(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||z(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,s:-30,l:-(-10+t*4)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,s:-30,l:-(-7+t*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??H(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?H(this.quadrant1Fill):tt(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},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?tt(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=H(this.secondaryColor,20),this.git1=H(this.pie2||this.secondaryColor,20),this.git2=H(this.pie3||this.tertiaryColor,20),this.git3=H(this.pie4||w(this.primaryColor,{h:-30}),20),this.git4=H(this.pie5||w(this.primaryColor,{h:-60}),20),this.git5=H(this.pie6||w(this.primaryColor,{h:-90}),10),this.git6=H(this.pie7||w(this.primaryColor,{h:60}),10),this.git7=H(this.pie8||w(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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||H(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||H(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Pr,"Theme"),Pr),V0=p(e=>{const t=new G0;return t.calculate(e),t},"getThemeVariables"),Nr,X0=(Nr=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=w(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ai(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||tt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||tt(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=tt(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||tt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||w(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,l:-(7+t*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||z(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||z(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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=H(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.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||H(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||H(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||w(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||w(this.primaryColor,{l:-10}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||w(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?H(this.quadrant1Fill):tt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=tt(this.git0,25),this.git1=tt(this.git1,25),this.git2=tt(this.git2,25),this.git3=tt(this.git3,25),this.git4=tt(this.git4,25),this.git5=tt(this.git5,25),this.git6=tt(this.git6,25),this.git7=tt(this.git7,25)),this.gitInv0=this.gitInv0||tt(z(this.git0),25),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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||va,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Sa}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Nr,"Theme"),Nr),Z0=p(e=>{const t=new X0;return t.calculate(e),t},"getThemeVariables"),zr,K0=(zr=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=H("#cde498",10),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.primaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=tt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||w(this.primaryColor,{h:30}),this.cScale4=this.cScale4||w(this.primaryColor,{h:60}),this.cScale5=this.cScale5||w(this.primaryColor,{h:90}),this.cScale6=this.cScale6||w(this.primaryColor,{h:120}),this.cScale7=this.cScale7||w(this.primaryColor,{h:150}),this.cScale8=this.cScale8||w(this.primaryColor,{h:210}),this.cScale9=this.cScale9||w(this.primaryColor,{h:270}),this.cScale10=this.cScale10||w(this.primaryColor,{h:300}),this.cScale11=this.cScale11||w(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||tt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||tt(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=tt(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||tt(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||w(this["cScale"+t],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{h:30,s:-30,l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{h:30,s:-30,l:-(8+t*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(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||w(this.primaryColor,{l:-30}),this.pie5=this.pie5||w(this.secondaryColor,{l:-30}),this.pie6=this.pie6||w(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||w(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||w(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||w(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||w(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||w(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||w(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??w(this.primaryColor,{l:-30}),this.venn2=this.venn2??w(this.secondaryColor,{l:-30}),this.venn3=this.venn3??w(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??w(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??w(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??w(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??w(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??w(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?H(this.quadrant1Fill):tt(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.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||w(this.primaryColor,{h:-30}),this.git4=this.git4||w(this.primaryColor,{h:-60}),this.git5=this.git5||w(this.primaryColor,{h:-90}),this.git6=this.git6||w(this.primaryColor,{h:60}),this.git7=this.git7||w(this.primaryColor,{h:120}),this.darkMode?(this.git0=H(this.git0,25),this.git1=H(this.git1,25),this.git2=H(this.git2,25),this.git3=H(this.git3,25),this.git4=H(this.git4,25),this.git5=H(this.git5,25),this.git6=H(this.git6,25),this.git7=H(this.git7,25)):(this.git0=tt(this.git0,25),this.git1=tt(this.git1,25),this.git2=tt(this.git2,25),this.git3=tt(this.git3,25),this.git4=tt(this.git4,25),this.git5=tt(this.git5,25),this.git6=tt(this.git6,25),this.git7=tt(this.git7,25)),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||z(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||z(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||va,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Sa}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(zr,"Theme"),zr),Q0=p(e=>{const t=new K0;return t.calculate(e),t},"getThemeVariables"),Wr,J0=(Wr=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=H(this.contrast,55),this.background="#ffffff",this.tertiaryColor=w(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=H(this.contrast,55),this.border2=this.contrast,this.actorBorder=H(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||z(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||H(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||tt(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||w(this.mainBkg,{l:-(5+t*5)}),this["surfacePeer"+t]=this["surfacePeer"+t]||w(this.mainBkg,{l:-(8+t*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=H(this.contrast,30),this.sectionBkgColor2=H(this.contrast,30),this.taskBorderColor=tt(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=H(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=tt(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=w(this.primaryColor,{h:64}),this.fillType3=w(this.secondaryColor,{h:64}),this.fillType4=w(this.primaryColor,{h:-64}),this.fillType5=w(this.secondaryColor,{h:-64}),this.fillType6=w(this.primaryColor,{h:128}),this.fillType7=w(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||w(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||w(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||w(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||w(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||w(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||w(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xi(this.quadrant1Fill)?H(this.quadrant1Fill):tt(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:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},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=tt(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||w(this.primaryColor,{h:-30}),this.git4=this.pie5||w(this.primaryColor,{h:-60}),this.git5=this.pie6||w(this.primaryColor,{h:-90}),this.git6=this.pie7||w(this.primaryColor,{h:60}),this.git7=this.pie8||w(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||z(this.git0),this.gitInv1=this.gitInv1||z(this.git1),this.gitInv2=this.gitInv2||z(this.git2),this.gitInv3=this.gitInv3||z(this.git3),this.gitInv4=this.gitInv4||z(this.git4),this.gitInv5=this.gitInv5||z(this.git5),this.gitInv6=this.gitInv6||z(this.git6),this.gitInv7=this.gitInv7||z(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||va,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Sa}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(Wr,"Theme"),Wr),ty=p(e=>{const t=new J0;return t.calculate(e),t},"getThemeVariables"),Fe={base:{getThemeVariables:U0},dark:{getThemeVariables:V0},default:{getThemeVariables:Z0},forest:{getThemeVariables:Q0},neutral:{getThemeVariables:ty}},ee={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Nh={...ee,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Fe.default.getThemeVariables(),sequence:{...ee.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ee.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ee.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ee.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ee.pie,useWidth:984},xyChart:{...ee.xyChart,useWidth:void 0},requirement:{...ee.requirement,useWidth:void 0},packet:{...ee.packet},radar:{...ee.radar},ishikawa:{...ee.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...ee.venn}},zh=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...zh(e[i],"")]:[...r,t+i],[]),"keyify"),ey=new Set(zh(Nh,"")),Wh=Nh,qn=p(e=>{if(F.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>qn(t));return}for(const t of Object.keys(e)){if(F.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!ey.has(t)||e[t]==null){F.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){F.debug("sanitizing object",t),qn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(F.debug("sanitizing css option",t),e[t]=ry(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}F.debug("After sanitization",e)}},"sanitizeDirective"),ry=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Yr=Object.freeze(Wh),Ke=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Vt=Tt({},Yr),Hn,dr=[],Ei=Tt({},Yr),Ta=p((e,t)=>{let r=Tt({},e),i={};for(const n of t)jh(n),i=Tt(i,n);if(r=Tt(r,i),i.theme&&i.theme in Fe){const n=Tt({},Hn),a=Tt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Fe&&(r.themeVariables=Fe[r.theme].getThemeVariables(a))}return Ei=r,Uh(Ei),Ei},"updateCurrentConfig"),iy=p(e=>(Vt=Tt({},Yr),Vt=Tt(Vt,e),e.theme&&Fe[e.theme]&&(Vt.themeVariables=Fe[e.theme].getThemeVariables(e.themeVariables)),Ta(Vt,dr),Vt),"setSiteConfig"),ny=p(e=>{Hn=Tt({},e)},"saveConfigFromInitialize"),ay=p(e=>(Vt=Tt(Vt,e),Ta(Vt,dr),Vt),"updateSiteConfig"),qh=p(()=>Tt({},Vt),"getSiteConfig"),Hh=p(e=>(Uh(e),Tt(Ei,e),Ot()),"setConfig"),Ot=p(()=>Tt({},Ei),"getConfig"),jh=p(e=>{e&&(["secure",...Vt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(F.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&jh(e[t])}))},"sanitize"),sy=p(e=>{qn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),dr.push(e),Ta(Vt,dr)},"addDirective"),jn=p((e=Vt)=>{dr=[],Ta(e,dr)},"reset"),oy={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},ec={},Yh=p(e=>{ec[e]||(F.warn(oy[e]),ec[e]=!0)},"issueWarning"),Uh=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Yh("LAZY_LOAD_DEPRECATED")},"checkConfig"),pA=p(()=>{let e={};Hn&&(e=Tt(e,Hn));for(const t of dr)e=Tt(e,t);return e},"getUserDefinedConfig"),Pt=p(e=>(e.flowchart?.htmlLabels!=null&&Yh("FLOWCHART_HTML_LABELS_DEPRECATED"),Ke(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),Zi=/<br\s*\/?>/gi,ly=p(e=>e?Xh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),cy=(()=>{let e=!1;return()=>{e||(Gh(),e=!0)}})();function Gh(){const e="data-temp-href-target";jr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),jr.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Gh,"setupDompurifyHooks");var Vh=p(e=>(cy(),jr.sanitize(e)),"removeScript"),rc=p((e,t)=>{if(Pt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Vh(e):r!=="loose"&&(e=Xh(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=dy(e))}return e},"sanitizeMore"),de=p((e,t)=>e&&(t.dompurifyConfig?e=jr.sanitize(rc(e,t),t.dompurifyConfig).toString():e=jr.sanitize(rc(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),hy=p((e,t)=>typeof e=="string"?de(e,t):e.flat().map(r=>de(r,t)),"sanitizeTextOrArray"),uy=p(e=>Zi.test(e),"hasBreaks"),fy=p(e=>e.split(Zi),"splitBreaks"),dy=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Xh=p(e=>e.replace(Zi,"#br#"),"breakToPlaceholder"),py=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),gy=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),my=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),ic=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let n=t[i];if(n===","&&i>0&&i+1<t.length){const a=t[i-1],s=t[i+1];yy(a,s)&&(n=a+","+s,i++,r.pop())}r.push(xy(n))}return r.join("")},"parseGenericTypes"),Es=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),yy=p((e,t)=>{const r=Es(e,"~"),i=Es(t,"~");return r===1&&i===1},"shouldCombineSets"),xy=p(e=>{const t=Es(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),nc=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),$s=/\$\$(.*)\$\$/g,Oi=p(e=>(e.match($s)?.length??0)>0,"hasKatex"),gA=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await Zh(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),by=p(async(e,t)=>{if(!Oi(e))return e;if(!(nc()||t.legacyMathML||t.forceLegacyMathML))return e.replace($s,"MathML is unsupported in this environment.");{const{default:r}=await ut(async()=>{const{default:n}=await import("./index-BS_zyEp8.js").then(a=>a.k);return{default:n}},__vite__mapDeps([0,1])),i=t.forceLegacyMathML||!nc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Zi).map(n=>Oi(n)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${n}</div>`:`<div>${n}</div>`).join("").replace($s,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Zh=p(async(e,t)=>de(await by(e,t),t),"renderKatexSanitized"),Ki={getRows:ly,sanitizeText:de,sanitizeTextOrArray:hy,hasBreaks:uy,splitBreaks:fy,lineBreakRegex:Zi,removeScript:Vh,getUrl:py,evaluate:Ke,getMax:gy,getMin:my},_y=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),Cy=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Kh=p(function(e,t,r,i){const n=Cy(t,r,i);_y(e,n)},"configureSvgSize"),wy=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,s=n.height;F.info(`SVG bounds: ${a}x${s}`,n);let o=0,l=0;F.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,F.info(`Calculated bounds: ${o}x${l}`),Kh(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),En={},ky=p((e,t,r)=>{let i="";return e in En&&En[e]?i=En[e](r):F.warn(`No theme found for ${e}`),` & {
|
|
5
|
+
font-family: ${r.fontFamily};
|
|
6
|
+
font-size: ${r.fontSize};
|
|
7
|
+
fill: ${r.textColor}
|
|
8
|
+
}
|
|
9
|
+
@keyframes edge-animation-frame {
|
|
10
|
+
from {
|
|
11
|
+
stroke-dashoffset: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@keyframes dash {
|
|
15
|
+
to {
|
|
16
|
+
stroke-dashoffset: 0;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
& .edge-animation-slow {
|
|
20
|
+
stroke-dasharray: 9,5 !important;
|
|
21
|
+
stroke-dashoffset: 900;
|
|
22
|
+
animation: dash 50s linear infinite;
|
|
23
|
+
stroke-linecap: round;
|
|
24
|
+
}
|
|
25
|
+
& .edge-animation-fast {
|
|
26
|
+
stroke-dasharray: 9,5 !important;
|
|
27
|
+
stroke-dashoffset: 900;
|
|
28
|
+
animation: dash 20s linear infinite;
|
|
29
|
+
stroke-linecap: round;
|
|
30
|
+
}
|
|
31
|
+
/* Classes common for multiple diagrams */
|
|
32
|
+
|
|
33
|
+
& .error-icon {
|
|
34
|
+
fill: ${r.errorBkgColor};
|
|
35
|
+
}
|
|
36
|
+
& .error-text {
|
|
37
|
+
fill: ${r.errorTextColor};
|
|
38
|
+
stroke: ${r.errorTextColor};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
& .edge-thickness-normal {
|
|
42
|
+
stroke-width: 1px;
|
|
43
|
+
}
|
|
44
|
+
& .edge-thickness-thick {
|
|
45
|
+
stroke-width: 3.5px
|
|
46
|
+
}
|
|
47
|
+
& .edge-pattern-solid {
|
|
48
|
+
stroke-dasharray: 0;
|
|
49
|
+
}
|
|
50
|
+
& .edge-thickness-invisible {
|
|
51
|
+
stroke-width: 0;
|
|
52
|
+
fill: none;
|
|
53
|
+
}
|
|
54
|
+
& .edge-pattern-dashed{
|
|
55
|
+
stroke-dasharray: 3;
|
|
56
|
+
}
|
|
57
|
+
.edge-pattern-dotted {
|
|
58
|
+
stroke-dasharray: 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
& .marker {
|
|
62
|
+
fill: ${r.lineColor};
|
|
63
|
+
stroke: ${r.lineColor};
|
|
64
|
+
}
|
|
65
|
+
& .marker.cross {
|
|
66
|
+
stroke: ${r.lineColor};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
& svg {
|
|
70
|
+
font-family: ${r.fontFamily};
|
|
71
|
+
font-size: ${r.fontSize};
|
|
72
|
+
}
|
|
73
|
+
& p {
|
|
74
|
+
margin: 0
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
${i}
|
|
78
|
+
|
|
79
|
+
${t}
|
|
80
|
+
`},"getStyles"),vy=p((e,t)=>{t!==void 0&&(En[e]=t)},"addStylesForDiagram"),Sy=ky,Qh={};p0(Qh,{clear:()=>Ty,getAccDescription:()=>My,getAccTitle:()=>By,getDiagramTitle:()=>$y,setAccDescription:()=>Ay,setAccTitle:()=>Ly,setDiagramTitle:()=>Ey});var Ao="",Mo="",Eo="",$o=p(e=>de(e,Ot()),"sanitizeText"),Ty=p(()=>{Ao="",Eo="",Mo=""},"clear"),Ly=p(e=>{Ao=$o(e).replace(/^\s+/g,"")},"setAccTitle"),By=p(()=>Ao,"getAccTitle"),Ay=p(e=>{Eo=$o(e).replace(/\n\s+/g,`
|
|
81
|
+
`)},"setAccDescription"),My=p(()=>Eo,"getAccDescription"),Ey=p(e=>{Mo=$o(e)},"setDiagramTitle"),$y=p(()=>Mo,"getDiagramTitle"),ac=F,Fy=Lo,dt=Ot,mA=Hh,yA=Yr,Fo=p(e=>de(e,dt()),"sanitizeText"),Dy=wy,Oy=p(()=>Qh,"getCommonDb"),Yn={},Un=p((e,t,r)=>{Yn[e]&&ac.warn(`Diagram with id ${e} already registered. Overwriting.`),Yn[e]=t,r&&Ph(e,r),vy(e,t.styles),t.injectUtils?.(ac,Fy,dt,Fo,Dy,Oy(),()=>{})},"registerDiagram"),Fs=p(e=>{if(e in Yn)return Yn[e];throw new Ry(e)},"getDiagram"),qr,Ry=(qr=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(qr,"DiagramNotFoundError"),qr),Iy={value:()=>{}};function Jh(){for(var e=0,t=arguments.length,r={},i;e<t;++e){if(!(i=arguments[e]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new $n(r)}function $n(e){this._=e}function Py(e,t){return e.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}$n.prototype=Jh.prototype={constructor:$n,on:function(e,t){var r=this._,i=Py(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a<s;)if((n=(e=i[a]).type)&&(n=Ny(r[n],e.name)))return n;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(n=(e=i[a]).type)r[n]=sc(r[n],e.name,t);else if(t==null)for(n in r)r[n]=sc(r[n],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new $n(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,a;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,n=a.length;i<n;++i)a[i].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)}};function Ny(e,t){for(var r=0,i=e.length,n;r<i;++r)if((n=e[r]).name===t)return n.value}function sc(e,t,r){for(var i=0,n=e.length;i<n;++i)if(e[i].name===t){e[i]=Iy,e=e.slice(0,i).concat(e.slice(i+1));break}return r!=null&&e.push({name:t,value:r}),e}var Ds="http://www.w3.org/1999/xhtml";const oc={svg:"http://www.w3.org/2000/svg",xhtml:Ds,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function La(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),oc.hasOwnProperty(t)?{space:oc[t],local:e}:e}function zy(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Ds&&t.documentElement.namespaceURI===Ds?t.createElement(e):t.createElementNS(r,e)}}function Wy(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tu(e){var t=La(e);return(t.local?Wy:zy)(t)}function qy(){}function Do(e){return e==null?qy:function(){return this.querySelector(e)}}function Hy(e){typeof e!="function"&&(e=Do(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=new Array(s),l,c,h=0;h<s;++h)(l=a[h])&&(c=e.call(l,l.__data__,h,a))&&("__data__"in l&&(c.__data__=l.__data__),o[h]=c);return new Jt(i,this._parents)}function jy(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Yy(){return[]}function eu(e){return e==null?Yy:function(){return this.querySelectorAll(e)}}function Uy(e){return function(){return jy(e.apply(this,arguments))}}function Gy(e){typeof e=="function"?e=Uy(e):e=eu(e);for(var t=this._groups,r=t.length,i=[],n=[],a=0;a<r;++a)for(var s=t[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(i.push(e.call(l,l.__data__,c,s)),n.push(l));return new Jt(i,n)}function ru(e){return function(){return this.matches(e)}}function iu(e){return function(t){return t.matches(e)}}var Vy=Array.prototype.find;function Xy(e){return function(){return Vy.call(this.children,e)}}function Zy(){return this.firstElementChild}function Ky(e){return this.select(e==null?Zy:Xy(typeof e=="function"?e:iu(e)))}var Qy=Array.prototype.filter;function Jy(){return Array.from(this.children)}function tx(e){return function(){return Qy.call(this.children,e)}}function ex(e){return this.selectAll(e==null?Jy:tx(typeof e=="function"?e:iu(e)))}function rx(e){typeof e!="function"&&(e=ru(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new Jt(i,this._parents)}function nu(e){return new Array(e.length)}function ix(){return new Jt(this._enter||this._groups.map(nu),this._parents)}function Gn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Gn.prototype={constructor:Gn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function nx(e){return function(){return e}}function ax(e,t,r,i,n,a){for(var s=0,o,l=t.length,c=a.length;s<c;++s)(o=t[s])?(o.__data__=a[s],i[s]=o):r[s]=new Gn(e,a[s]);for(;s<l;++s)(o=t[s])&&(n[s]=o)}function sx(e,t,r,i,n,a,s){var o,l,c=new Map,h=t.length,u=a.length,d=new Array(h),f;for(o=0;o<h;++o)(l=t[o])&&(d[o]=f=s.call(l,l.__data__,o,t)+"",c.has(f)?n[o]=l:c.set(f,l));for(o=0;o<u;++o)f=s.call(e,a[o],o,a)+"",(l=c.get(f))?(i[o]=l,l.__data__=a[o],c.delete(f)):r[o]=new Gn(e,a[o]);for(o=0;o<h;++o)(l=t[o])&&c.get(d[o])===l&&(n[o]=l)}function ox(e){return e.__data__}function lx(e,t){if(!arguments.length)return Array.from(this,ox);var r=t?sx:ax,i=this._parents,n=this._groups;typeof e!="function"&&(e=nx(e));for(var a=n.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var h=i[c],u=n[c],d=u.length,f=cx(e.call(h,h&&h.__data__,c,i)),g=f.length,m=o[c]=new Array(g),y=s[c]=new Array(g),x=l[c]=new Array(d);r(h,u,m,y,x,f,t);for(var b=0,C=0,v,k;b<g;++b)if(v=m[b]){for(b>=C&&(C=b+1);!(k=y[C])&&++C<g;);v._next=k||null}}return s=new Jt(s,i),s._enter=o,s._exit=l,s}function cx(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hx(){return new Jt(this._exit||this._groups.map(nu),this._parents)}function ux(e,t,r){var i=this.enter(),n=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(n=t(n),n&&(n=n.selection())),r==null?a.remove():r(a),i&&n?i.merge(n).order():n}function fx(e){for(var t=e.selection?e.selection():e,r=this._groups,i=t._groups,n=r.length,a=i.length,s=Math.min(n,a),o=new Array(n),l=0;l<s;++l)for(var c=r[l],h=i[l],u=c.length,d=o[l]=new Array(u),f,g=0;g<u;++g)(f=c[g]||h[g])&&(d[g]=f);for(;l<n;++l)o[l]=r[l];return new Jt(o,this._parents)}function dx(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var i=e[t],n=i.length-1,a=i[n],s;--n>=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function px(e){e||(e=gx);function t(u,d){return u&&d?e(u.__data__,d.__data__):!u-!d}for(var r=this._groups,i=r.length,n=new Array(i),a=0;a<i;++a){for(var s=r[a],o=s.length,l=n[a]=new Array(o),c,h=0;h<o;++h)(c=s[h])&&(l[h]=c);l.sort(t)}return new Jt(n,this._parents).order()}function gx(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function mx(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yx(){return Array.from(this)}function xx(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length;n<a;++n){var s=i[n];if(s)return s}return null}function bx(){let e=0;for(const t of this)++e;return e}function _x(){return!this.node()}function Cx(e){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var n=t[r],a=0,s=n.length,o;a<s;++a)(o=n[a])&&e.call(o,o.__data__,a,n);return this}function wx(e){return function(){this.removeAttribute(e)}}function kx(e){return function(){this.removeAttributeNS(e.space,e.local)}}function vx(e,t){return function(){this.setAttribute(e,t)}}function Sx(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Tx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Lx(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function Bx(e,t){var r=La(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?kx:wx:typeof t=="function"?r.local?Lx:Tx:r.local?Sx:vx)(r,t))}function au(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ax(e){return function(){this.style.removeProperty(e)}}function Mx(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Ex(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function $x(e,t,r){return arguments.length>1?this.each((t==null?Ax:typeof t=="function"?Ex:Mx)(e,t,r??"")):Ur(this.node(),e)}function Ur(e,t){return e.style.getPropertyValue(t)||au(e).getComputedStyle(e,null).getPropertyValue(t)}function Fx(e){return function(){delete this[e]}}function Dx(e,t){return function(){this[e]=t}}function Ox(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function Rx(e,t){return arguments.length>1?this.each((t==null?Fx:typeof t=="function"?Ox:Dx)(e,t)):this.node()[e]}function su(e){return e.trim().split(/^|\s+/)}function Oo(e){return e.classList||new ou(e)}function ou(e){this._node=e,this._names=su(e.getAttribute("class")||"")}ou.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function lu(e,t){for(var r=Oo(e),i=-1,n=t.length;++i<n;)r.add(t[i])}function cu(e,t){for(var r=Oo(e),i=-1,n=t.length;++i<n;)r.remove(t[i])}function Ix(e){return function(){lu(this,e)}}function Px(e){return function(){cu(this,e)}}function Nx(e,t){return function(){(t.apply(this,arguments)?lu:cu)(this,e)}}function zx(e,t){var r=su(e+"");if(arguments.length<2){for(var i=Oo(this.node()),n=-1,a=r.length;++n<a;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof t=="function"?Nx:t?Ix:Px)(r,t))}function Wx(){this.textContent=""}function qx(e){return function(){this.textContent=e}}function Hx(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function jx(e){return arguments.length?this.each(e==null?Wx:(typeof e=="function"?Hx:qx)(e)):this.node().textContent}function Yx(){this.innerHTML=""}function Ux(e){return function(){this.innerHTML=e}}function Gx(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Vx(e){return arguments.length?this.each(e==null?Yx:(typeof e=="function"?Gx:Ux)(e)):this.node().innerHTML}function Xx(){this.nextSibling&&this.parentNode.appendChild(this)}function Zx(){return this.each(Xx)}function Kx(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qx(){return this.each(Kx)}function Jx(e){var t=typeof e=="function"?e:tu(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function tb(){return null}function eb(e,t){var r=typeof e=="function"?e:tu(e),i=t==null?tb:typeof t=="function"?t:Do(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function rb(){var e=this.parentNode;e&&e.removeChild(this)}function ib(){return this.each(rb)}function nb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ab(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function sb(e){return this.select(e?ab:nb)}function ob(e){return arguments.length?this.property("__data__",e):this.node().__data__}function lb(e){return function(t){e.call(this,t,this.__data__)}}function cb(e){return e.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");return i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function hb(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r<n;++r)a=t[r],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function ub(e,t,r){return function(){var i=this.__on,n,a=lb(t);if(i){for(var s=0,o=i.length;s<o;++s)if((n=i[s]).type===e.type&&n.name===e.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=a,n.options=r),n.value=t;return}}this.addEventListener(e.type,a,r),n={type:e.type,name:e.name,value:t,listener:a,options:r},i?i.push(n):this.__on=[n]}}function fb(e,t,r){var i=cb(e+""),n,a=i.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,h;l<c;++l)for(n=0,h=o[l];n<a;++n)if((s=i[n]).type===h.type&&s.name===h.name)return h.value}return}for(o=t?ub:hb,n=0;n<a;++n)this.each(o(i[n],t,r));return this}function hu(e,t,r){var i=au(e),n=i.CustomEvent;typeof n=="function"?n=new n(t,r):(n=i.document.createEvent("Event"),r?(n.initEvent(t,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(t,!1,!1)),e.dispatchEvent(n)}function db(e,t){return function(){return hu(this,e,t)}}function pb(e,t){return function(){return hu(this,e,t.apply(this,arguments))}}function gb(e,t){return this.each((typeof t=="function"?pb:db)(e,t))}function*mb(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var i=e[t],n=0,a=i.length,s;n<a;++n)(s=i[n])&&(yield s)}var uu=[null];function Jt(e,t){this._groups=e,this._parents=t}function Qi(){return new Jt([[document.documentElement]],uu)}function yb(){return this}Jt.prototype=Qi.prototype={constructor:Jt,select:Hy,selectAll:Gy,selectChild:Ky,selectChildren:ex,filter:rx,data:lx,enter:ix,exit:hx,join:ux,merge:fx,selection:yb,order:dx,sort:px,call:mx,nodes:yx,node:xx,size:bx,empty:_x,each:Cx,attr:Bx,style:$x,property:Rx,classed:zx,text:jx,html:Vx,raise:Zx,lower:Qx,append:Jx,insert:eb,remove:ib,clone:sb,datum:ob,on:fb,dispatch:gb,[Symbol.iterator]:mb};function lt(e){return typeof e=="string"?new Jt([[document.querySelector(e)]],[document.documentElement]):new Jt([[e]],uu)}function Ro(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function fu(e,t){var r=Object.create(e.prototype);for(var i in t)r[i]=t[i];return r}function Ji(){}var Ri=.7,Vn=1/Ri,Dr="\\s*([+-]?\\d+)\\s*",Ii="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ce="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xb=/^#([0-9a-f]{3,8})$/,bb=new RegExp(`^rgb\\(${Dr},${Dr},${Dr}\\)$`),_b=new RegExp(`^rgb\\(${Ce},${Ce},${Ce}\\)$`),Cb=new RegExp(`^rgba\\(${Dr},${Dr},${Dr},${Ii}\\)$`),wb=new RegExp(`^rgba\\(${Ce},${Ce},${Ce},${Ii}\\)$`),kb=new RegExp(`^hsl\\(${Ii},${Ce},${Ce}\\)$`),vb=new RegExp(`^hsla\\(${Ii},${Ce},${Ce},${Ii}\\)$`),lc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ro(Ji,Pi,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:cc,formatHex:cc,formatHex8:Sb,formatHsl:Tb,formatRgb:hc,toString:hc});function cc(){return this.rgb().formatHex()}function Sb(){return this.rgb().formatHex8()}function Tb(){return du(this).formatHsl()}function hc(){return this.rgb().formatRgb()}function Pi(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=xb.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?uc(t):r===3?new Zt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?yn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?yn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=bb.exec(e))?new Zt(t[1],t[2],t[3],1):(t=_b.exec(e))?new Zt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Cb.exec(e))?yn(t[1],t[2],t[3],t[4]):(t=wb.exec(e))?yn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kb.exec(e))?pc(t[1],t[2]/100,t[3]/100,1):(t=vb.exec(e))?pc(t[1],t[2]/100,t[3]/100,t[4]):lc.hasOwnProperty(e)?uc(lc[e]):e==="transparent"?new Zt(NaN,NaN,NaN,0):null}function uc(e){return new Zt(e>>16&255,e>>8&255,e&255,1)}function yn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Zt(e,t,r,i)}function Lb(e){return e instanceof Ji||(e=Pi(e)),e?(e=e.rgb(),new Zt(e.r,e.g,e.b,e.opacity)):new Zt}function Os(e,t,r,i){return arguments.length===1?Lb(e):new Zt(e,t,r,i??1)}function Zt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}Ro(Zt,Os,fu(Ji,{brighter(e){return e=e==null?Vn:Math.pow(Vn,e),new Zt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new Zt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zt(hr(this.r),hr(this.g),hr(this.b),Xn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:fc,formatHex:fc,formatHex8:Bb,formatRgb:dc,toString:dc}));function fc(){return`#${or(this.r)}${or(this.g)}${or(this.b)}`}function Bb(){return`#${or(this.r)}${or(this.g)}${or(this.b)}${or((isNaN(this.opacity)?1:this.opacity)*255)}`}function dc(){const e=Xn(this.opacity);return`${e===1?"rgb(":"rgba("}${hr(this.r)}, ${hr(this.g)}, ${hr(this.b)}${e===1?")":`, ${e})`}`}function Xn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function hr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function or(e){return e=hr(e),(e<16?"0":"")+e.toString(16)}function pc(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ce(e,t,r,i)}function du(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof Ji||(e=Pi(e)),!e)return new ce;if(e instanceof ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,o=a-n,l=(a+n)/2;return o?(t===a?s=(r-i)/o+(r<i)*6:r===a?s=(i-t)/o+2:s=(t-r)/o+4,o/=l<.5?a+n:2-a-n,s*=60):o=l>0&&l<1?0:s,new ce(s,o,l,e.opacity)}function Ab(e,t,r,i){return arguments.length===1?du(e):new ce(e,t,r,i??1)}function ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}Ro(ce,Ab,fu(Ji,{brighter(e){return e=e==null?Vn:Math.pow(Vn,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ri:Math.pow(Ri,e),new ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Zt(fs(e>=240?e-240:e+120,n,i),fs(e,n,i),fs(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ce(gc(this.h),xn(this.s),xn(this.l),Xn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Xn(this.opacity);return`${e===1?"hsl(":"hsla("}${gc(this.h)}, ${xn(this.s)*100}%, ${xn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gc(e){return e=(e||0)%360,e<0?e+360:e}function xn(e){return Math.max(0,Math.min(1,e||0))}function fs(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const Io=e=>()=>e;function pu(e,t){return function(r){return e+r*t}}function Mb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function xA(e,t){var r=t-e;return r?pu(e,r>180||r<-180?r-360*Math.round(r/360):r):Io(isNaN(e)?t:e)}function Eb(e){return(e=+e)==1?gu:function(t,r){return r-t?Mb(t,r,e):Io(isNaN(t)?r:t)}}function gu(e,t){var r=t-e;return r?pu(e,r):Io(isNaN(e)?t:e)}const mc=(function e(t){var r=Eb(t);function i(n,a){var s=r((n=Os(n)).r,(a=Os(a)).r),o=r(n.g,a.g),l=r(n.b,a.b),c=gu(n.opacity,a.opacity);return function(h){return n.r=s(h),n.g=o(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function He(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Rs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ds=new RegExp(Rs.source,"g");function $b(e){return function(){return e}}function Fb(e){return function(t){return e(t)+""}}function Db(e,t){var r=Rs.lastIndex=ds.lastIndex=0,i,n,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Rs.exec(e))&&(n=ds.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:He(i,n)})),r=ds.lastIndex;return r<t.length&&(a=t.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?Fb(l[0].x):$b(t):(t=l.length,function(c){for(var h=0,u;h<t;++h)o[(u=l[h]).i]=u.x(c);return o.join("")})}var yc=180/Math.PI,Is={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function mu(e,t,r,i,n,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*i)&&(r-=e*l,i-=t*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),e*i<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:n,translateY:a,rotate:Math.atan2(t,e)*yc,skewX:Math.atan(l)*yc,scaleX:s,scaleY:o}}var bn;function Ob(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Is:mu(t.a,t.b,t.c,t.d,t.e,t.f)}function Rb(e){return e==null||(bn||(bn=document.createElementNS("http://www.w3.org/2000/svg","g")),bn.setAttribute("transform",e),!(e=bn.transform.baseVal.consolidate()))?Is:(e=e.matrix,mu(e.a,e.b,e.c,e.d,e.e,e.f))}function yu(e,t,r,i){function n(c){return c.length?c.pop()+" ":""}function a(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push("translate(",null,t,null,r);g.push({i:m-4,x:He(c,u)},{i:m-2,x:He(h,d)})}else(u||d)&&f.push("translate("+u+t+d+r)}function s(c,h,u,d){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),d.push({i:u.push(n(u)+"rotate(",null,i)-2,x:He(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function o(c,h,u,d){c!==h?d.push({i:u.push(n(u)+"skewX(",null,i)-2,x:He(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,d,f,g){if(c!==u||h!==d){var m=f.push(n(f)+"scale(",null,",",null,")");g.push({i:m-4,x:He(c,u)},{i:m-2,x:He(h,d)})}else(u!==1||d!==1)&&f.push(n(f)+"scale("+u+","+d+")")}return function(c,h){var u=[],d=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,d),s(c.rotate,h.rotate,u,d),o(c.skewX,h.skewX,u,d),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,d),c=h=null,function(f){for(var g=-1,m=d.length,y;++g<m;)u[(y=d[g]).i]=y.x(f);return u.join("")}}}var Ib=yu(Ob,"px, ","px)","deg)"),Pb=yu(Rb,", ",")",")"),Gr=0,Ci=0,fi=0,xu=1e3,Zn,wi,Kn=0,pr=0,Ba=0,Ni=typeof performance=="object"&&performance.now?performance:Date,bu=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Po(){return pr||(bu(Nb),pr=Ni.now()+Ba)}function Nb(){pr=0}function Qn(){this._call=this._time=this._next=null}Qn.prototype=_u.prototype={constructor:Qn,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Po():+r)+(t==null?0:+t),!this._next&&wi!==this&&(wi?wi._next=this:Zn=this,wi=this),this._call=e,this._time=r,Ps()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ps())}};function _u(e,t,r){var i=new Qn;return i.restart(e,t,r),i}function zb(){Po(),++Gr;for(var e=Zn,t;e;)(t=pr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Gr}function xc(){pr=(Kn=Ni.now())+Ba,Gr=Ci=0;try{zb()}finally{Gr=0,qb(),pr=0}}function Wb(){var e=Ni.now(),t=e-Kn;t>xu&&(Ba-=t,Kn=e)}function qb(){for(var e,t=Zn,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Zn=r);wi=e,Ps(i)}function Ps(e){if(!Gr){Ci&&(Ci=clearTimeout(Ci));var t=e-pr;t>24?(e<1/0&&(Ci=setTimeout(xc,e-Ni.now()-Ba)),fi&&(fi=clearInterval(fi))):(fi||(Kn=Ni.now(),fi=setInterval(Wb,xu)),Gr=1,bu(xc))}}function bc(e,t,r){var i=new Qn;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var Hb=Jh("start","end","cancel","interrupt"),jb=[],Cu=0,_c=1,Ns=2,Fn=3,Cc=4,zs=5,Dn=6;function Aa(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;Yb(e,r,{name:t,index:i,group:n,on:Hb,tween:jb,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Cu})}function No(e,t){var r=pe(e,t);if(r.state>Cu)throw new Error("too late; already scheduled");return r}function ve(e,t){var r=pe(e,t);if(r.state>Fn)throw new Error("too late; already running");return r}function pe(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Yb(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=_u(a,0,r.time);function a(c){r.state=_c,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,d,f;if(r.state!==_c)return l();for(h in i)if(f=i[h],f.name===r.name){if(f.state===Fn)return bc(s);f.state===Cc?(f.state=Dn,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete i[h]):+h<t&&(f.state=Dn,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete i[h])}if(bc(function(){r.state===Fn&&(r.state=Cc,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=Ns,r.on.call("start",e,e.__data__,r.index,r.group),r.state===Ns){for(r.state=Fn,n=new Array(d=r.tween.length),h=0,u=-1;h<d;++h)(f=r.tween[h].value.call(e,e.__data__,r.index,r.group))&&(n[++u]=f);n.length=u+1}}function o(c){for(var h=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=zs,1),u=-1,d=n.length;++u<d;)n[u].call(e,h);r.state===zs&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Dn,r.timer.stop(),delete i[t];for(var c in i)return;delete e.__transition}}function Ub(e,t){var r=e.__transition,i,n,a=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((i=r[s]).name!==t){a=!1;continue}n=i.state>Ns&&i.state<zs,i.state=Dn,i.timer.stop(),i.on.call(n?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete r[s]}a&&delete e.__transition}}function Gb(e){return this.each(function(){Ub(this,e)})}function Vb(e,t){var r,i;return function(){var n=ve(this,e),a=n.tween;if(a!==r){i=r=a;for(var s=0,o=i.length;s<o;++s)if(i[s].name===t){i=i.slice(),i.splice(s,1);break}}n.tween=i}}function Xb(e,t,r){var i,n;if(typeof r!="function")throw new Error;return function(){var a=ve(this,e),s=a.tween;if(s!==i){n=(i=s).slice();for(var o={name:t,value:r},l=0,c=n.length;l<c;++l)if(n[l].name===t){n[l]=o;break}l===c&&n.push(o)}a.tween=n}}function Zb(e,t){var r=this._id;if(e+="",arguments.length<2){for(var i=pe(this.node(),r).tween,n=0,a=i.length,s;n<a;++n)if((s=i[n]).name===e)return s.value;return null}return this.each((t==null?Vb:Xb)(r,e,t))}function zo(e,t,r){var i=e._id;return e.each(function(){var n=ve(this,i);(n.value||(n.value={}))[t]=r.apply(this,arguments)}),function(n){return pe(n,i).value[t]}}function wu(e,t){var r;return(typeof t=="number"?He:t instanceof Pi?mc:(r=Pi(t))?(t=r,mc):Db)(e,t)}function Kb(e){return function(){this.removeAttribute(e)}}function Qb(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Jb(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttribute(e);return s===n?null:s===i?a:a=t(i=s,r)}}function t1(e,t,r){var i,n=r+"",a;return function(){var s=this.getAttributeNS(e.space,e.local);return s===n?null:s===i?a:a=t(i=s,r)}}function e1(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function r1(e,t,r){var i,n,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o)))}}function i1(e,t){var r=La(e),i=r==="transform"?Pb:wu;return this.attrTween(e,typeof t=="function"?(r.local?r1:e1)(r,i,zo(this,"attr."+e,t)):t==null?(r.local?Qb:Kb)(r):(r.local?t1:Jb)(r,i,t))}function n1(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function a1(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function s1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&a1(e,a)),r}return n._value=t,n}function o1(e,t){var r,i;function n(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&n1(e,a)),r}return n._value=t,n}function l1(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var i=La(e);return this.tween(r,(i.local?s1:o1)(i,t))}function c1(e,t){return function(){No(this,e).delay=+t.apply(this,arguments)}}function h1(e,t){return t=+t,function(){No(this,e).delay=t}}function u1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?c1:h1)(t,e)):pe(this.node(),t).delay}function f1(e,t){return function(){ve(this,e).duration=+t.apply(this,arguments)}}function d1(e,t){return t=+t,function(){ve(this,e).duration=t}}function p1(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?f1:d1)(t,e)):pe(this.node(),t).duration}function g1(e,t){if(typeof t!="function")throw new Error;return function(){ve(this,e).ease=t}}function m1(e){var t=this._id;return arguments.length?this.each(g1(t,e)):pe(this.node(),t).ease}function y1(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;ve(this,e).ease=r}}function x1(e){if(typeof e!="function")throw new Error;return this.each(y1(this._id,e))}function b1(e){typeof e!="function"&&(e=ru(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n<r;++n)for(var a=t[n],s=a.length,o=i[n]=[],l,c=0;c<s;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&o.push(l);return new Oe(i,this._parents,this._name,this._id)}function _1(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,i=t.length,n=r.length,a=Math.min(i,n),s=new Array(i),o=0;o<a;++o)for(var l=t[o],c=r[o],h=l.length,u=s[o]=new Array(h),d,f=0;f<h;++f)(d=l[f]||c[f])&&(u[f]=d);for(;o<i;++o)s[o]=t[o];return new Oe(s,this._parents,this._name,this._id)}function C1(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function w1(e,t,r){var i,n,a=C1(t)?No:ve;return function(){var s=a(this,e),o=s.on;o!==i&&(n=(i=o).copy()).on(t,r),s.on=n}}function k1(e,t){var r=this._id;return arguments.length<2?pe(this.node(),r).on.on(e):this.each(w1(r,e,t))}function v1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function S1(){return this.on("end.remove",v1(this._id))}function T1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Do(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s<n;++s)for(var o=i[s],l=o.length,c=a[s]=new Array(l),h,u,d=0;d<l;++d)(h=o[d])&&(u=e.call(h,h.__data__,d,o))&&("__data__"in h&&(u.__data__=h.__data__),c[d]=u,Aa(c[d],t,r,d,c,pe(h,r)));return new Oe(a,this._parents,t,r)}function L1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=eu(e));for(var i=this._groups,n=i.length,a=[],s=[],o=0;o<n;++o)for(var l=i[o],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var d=e.call(h,h.__data__,u,l),f,g=pe(h,r),m=0,y=d.length;m<y;++m)(f=d[m])&&Aa(f,t,r,m,d,g);a.push(d),s.push(h)}return new Oe(a,s,t,r)}var B1=Qi.prototype.constructor;function A1(){return new B1(this._groups,this._parents)}function M1(e,t){var r,i,n;return function(){var a=Ur(this,e),s=(this.style.removeProperty(e),Ur(this,e));return a===s?null:a===r&&s===i?n:n=t(r=a,i=s)}}function ku(e){return function(){this.style.removeProperty(e)}}function E1(e,t,r){var i,n=r+"",a;return function(){var s=Ur(this,e);return s===n?null:s===i?a:a=t(i=s,r)}}function $1(e,t,r){var i,n,a;return function(){var s=Ur(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),Ur(this,e))),s===l?null:s===i&&l===n?a:(n=l,a=t(i=s,o))}}function F1(e,t){var r,i,n,a="style."+t,s="end."+a,o;return function(){var l=ve(this,e),c=l.on,h=l.value[a]==null?o||(o=ku(t)):void 0;(c!==r||n!==h)&&(i=(r=c).copy()).on(s,n=h),l.on=i}}function D1(e,t,r){var i=(e+="")=="transform"?Ib:wu;return t==null?this.styleTween(e,M1(e,i)).on("end.style."+e,ku(e)):typeof t=="function"?this.styleTween(e,$1(e,i,zo(this,"style."+e,t))).each(F1(this._id,e)):this.styleTween(e,E1(e,i,t),r).on("end.style."+e,null)}function O1(e,t,r){return function(i){this.style.setProperty(e,t.call(this,i),r)}}function R1(e,t,r){var i,n;function a(){var s=t.apply(this,arguments);return s!==n&&(i=(n=s)&&O1(e,s,r)),i}return a._value=t,a}function I1(e,t,r){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,R1(e,t,r??""))}function P1(e){return function(){this.textContent=e}}function N1(e){return function(){var t=e(this);this.textContent=t??""}}function z1(e){return this.tween("text",typeof e=="function"?N1(zo(this,"text",e)):P1(e==null?"":e+""))}function W1(e){return function(t){this.textContent=e.call(this,t)}}function q1(e){var t,r;function i(){var n=e.apply(this,arguments);return n!==r&&(t=(r=n)&&W1(n)),t}return i._value=e,i}function H1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,q1(e))}function j1(){for(var e=this._name,t=this._id,r=vu(),i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var h=pe(l,t);Aa(l,e,r,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Oe(i,this._parents,e,r)}function Y1(){var e,t,r=this,i=r._id,n=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--n===0&&a()}};r.each(function(){var c=ve(this,i),h=c.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),c.on=t}),n===0&&a()})}var U1=0;function Oe(e,t,r,i){this._groups=e,this._parents=t,this._name=r,this._id=i}function vu(){return++U1}var Me=Qi.prototype;Oe.prototype={constructor:Oe,select:T1,selectAll:L1,selectChild:Me.selectChild,selectChildren:Me.selectChildren,filter:b1,merge:_1,selection:A1,transition:j1,call:Me.call,nodes:Me.nodes,node:Me.node,size:Me.size,empty:Me.empty,each:Me.each,on:k1,attr:i1,attrTween:l1,style:D1,styleTween:I1,text:z1,textTween:H1,remove:S1,tween:Zb,delay:u1,duration:p1,ease:m1,easeVarying:x1,end:Y1,[Symbol.iterator]:Me[Symbol.iterator]};function G1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var V1={time:null,delay:0,duration:250,ease:G1};function X1(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Z1(e){var t,r;e instanceof Oe?(t=e._id,e=e._name):(t=vu(),(r=V1).time=Po(),e=e==null?null:e+"");for(var i=this._groups,n=i.length,a=0;a<n;++a)for(var s=i[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&Aa(l,e,t,c,s,r||X1(l,t));return new Oe(i,this._parents,e,t)}Qi.prototype.interrupt=Gb;Qi.prototype.transition=Z1;const Ws=Math.PI,qs=2*Ws,ir=1e-6,K1=qs-ir;function Su(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function Q1(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Su;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class J1{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Su:Q1(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,i,n){this._append`Q${+t},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,r,i,n,a,s){this._append`C${+t},${+r},${+i},${+n},${this._x1=+a},${this._y1=+s}`}arcTo(t,r,i,n,a){if(t=+t,r=+r,i=+i,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=i-t,c=n-r,h=s-t,u=o-r,d=h*h+u*u;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>ir)if(!(Math.abs(u*l-c*h)>ir)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let f=i-s,g=n-o,m=l*l+c*c,y=f*f+g*g,x=Math.sqrt(m),b=Math.sqrt(d),C=a*Math.tan((Ws-Math.acos((m+d-y)/(2*x*b)))/2),v=C/b,k=C/x;Math.abs(v-1)>ir&&this._append`L${t+v*h},${r+v*u}`,this._append`A${a},${a},0,0,${+(u*f>h*g)},${this._x1=t+k*l},${this._y1=r+k*c}`}}arc(t,r,i,n,a,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,h=r+l,u=1^s,d=s?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ir||Math.abs(this._y1-h)>ir)&&this._append`L${c},${h}`,i&&(d<0&&(d=d%qs+qs),d>K1?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:d>ir&&this._append`A${i},${i},0,${+(d>=Ws)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Br(e){return function(){return e}}const bA=Math.abs,_A=Math.atan2,CA=Math.cos,wA=Math.max,kA=Math.min,vA=Math.sin,SA=Math.sqrt,wc=1e-12,Wo=Math.PI,kc=Wo/2,TA=2*Wo;function LA(e){return e>1?0:e<-1?Wo:Math.acos(e)}function BA(e){return e>=1?kc:e<=-1?-kc:Math.asin(e)}function t2(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new J1(t)}function e2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Tu(e){this._context=e}Tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function $i(e){return new Tu(e)}function r2(e){return e[0]}function i2(e){return e[1]}function n2(e,t){var r=Br(!0),i=null,n=$i,a=null,s=t2(o);e=typeof e=="function"?e:e===void 0?r2:Br(e),t=typeof t=="function"?t:t===void 0?i2:Br(t);function o(l){var c,h=(l=e2(l)).length,u,d=!1,f;for(i==null&&(a=n(f=s())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,l),+t(u,c,l));if(f)return a=null,f+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:Br(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:Br(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Br(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(a=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=a=null:a=n(i=l),o):i},o}class Lu{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Bu(e){return new Lu(e,!0)}function Au(e){return new Lu(e,!1)}function Ge(){}function Jn(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Ma(e){this._context=e}Ma.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Jn(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hs(e){return new Ma(e)}function Mu(e){this._context=e}Mu.prototype={areaStart:Ge,areaEnd:Ge,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function a2(e){return new Mu(e)}function Eu(e){this._context=e}Eu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Jn(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function s2(e){return new Eu(e)}function $u(e,t){this._basis=new Ma(e),this._beta=t}$u.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,s=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const o2=(function e(t){function r(i){return t===1?new Ma(i):new $u(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ta(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function qo(e,t){this._context=e,this._k=(1-t)/6}qo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ta(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ta(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Fu=(function e(t){function r(i){return new qo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Ho(e,t){this._context=e,this._k=(1-t)/6}Ho.prototype={areaStart:Ge,areaEnd:Ge,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ta(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const l2=(function e(t){function r(i){return new Ho(i,t)}return r.tension=function(i){return e(+i)},r})(0);function jo(e,t){this._context=e,this._k=(1-t)/6}jo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ta(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const c2=(function e(t){function r(i){return new jo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Yo(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>wc){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>wc){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function Du(e,t){this._context=e,this._alpha=t}Du.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Yo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ou=(function e(t){function r(i){return t?new Du(i,t):new qo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Ru(e,t){this._context=e,this._alpha=t}Ru.prototype={areaStart:Ge,areaEnd:Ge,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Yo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const h2=(function e(t){function r(i){return t?new Ru(i,t):new Ho(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Iu(e,t){this._context=e,this._alpha=t}Iu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Yo(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const u2=(function e(t){function r(i){return t?new Iu(i,t):new jo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Pu(e){this._context=e}Pu.prototype={areaStart:Ge,areaEnd:Ge,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function f2(e){return new Pu(e)}function vc(e){return e<0?-1:1}function Sc(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),o=(a*n+s*i)/(i+n);return(vc(a)+vc(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function Tc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function ps(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,n+o*t,a-o,s-o*r,a,s)}function ea(e){this._context=e}ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ps(this,this._t0,Tc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ps(this,Tc(this,r=Sc(this,e,t)),r);break;default:ps(this,this._t0,r=Sc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Nu(e){this._context=new zu(e)}(Nu.prototype=Object.create(ea.prototype)).point=function(e,t){ea.prototype.point.call(this,t,e)};function zu(e){this._context=e}zu.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function Wu(e){return new ea(e)}function qu(e){return new Nu(e)}function Hu(e){this._context=e}Hu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Lc(e),n=Lc(t),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(i[0][a],n[0][a],i[1][a],n[1][a],e[s],t[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Lc(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=n[t]/a[t-1],a[t]-=i,s[t]-=i*s[t-1];for(n[r-1]=s[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function ju(e){return new Hu(e)}function Ea(e,t){this._context=e,this._t=t}Ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Yu(e){return new Ea(e,.5)}function Uu(e){return new Ea(e,0)}function Gu(e){return new Ea(e,1)}function ki(e,t,r){this.k=e,this.x=t,this.y=r}ki.prototype={constructor:ki,scale:function(e){return e===1?this:new ki(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new ki(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};ki.prototype;var d2=p(e=>{const{securityLevel:t}=dt();let r=lt("body");if(t==="sandbox"){const a=lt(`#i${e}`).node()?.contentDocument??document;r=lt(a.body)}return r.select(`#${e}`)},"selectSvgElement");function Uo(e){return typeof e>"u"||e===null}p(Uo,"isNothing");function Vu(e){return typeof e=="object"&&e!==null}p(Vu,"isObject");function Xu(e){return Array.isArray(e)?e:Uo(e)?[]:[e]}p(Xu,"toArray");function Zu(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;r<i;r+=1)n=a[r],e[n]=t[n];return e}p(Zu,"extend");function Ku(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}p(Ku,"repeat");function Qu(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}p(Qu,"isNegativeZero");var p2=Uo,g2=Vu,m2=Xu,y2=Ku,x2=Qu,b2=Zu,Lt={isNothing:p2,isObject:g2,toArray:m2,repeat:y2,isNegativeZero:x2,extend:b2};function Go(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
82
|
+
|
|
83
|
+
`+e.mark.snippet),i+" "+r):i}p(Go,"formatError");function Vr(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=Go(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}p(Vr,"YAMLException$1");Vr.prototype=Object.create(Error.prototype);Vr.prototype.constructor=Vr;Vr.prototype.toString=p(function(t){return this.name+": "+Go(this,t)},"toString");var Xt=Vr;function On(e,t,r,i,n){var a="",s="",o=Math.floor(n/2)-1;return i-t>o&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}p(On,"getLine");function Rn(e,t){return Lt.repeat(" ",t-e.length)+e}p(Rn,"padStart");function Ju(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=On(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),o=Lt.repeat(" ",t.indent)+Rn((e.line-l+1).toString(),h)+" | "+c.str+`
|
|
84
|
+
`+o;for(c=On(e.buffer,i[s],n[s],e.position,u),o+=Lt.repeat(" ",t.indent)+Rn((e.line+1).toString(),h)+" | "+c.str+`
|
|
85
|
+
`,o+=Lt.repeat("-",t.indent+h+3+c.pos)+`^
|
|
86
|
+
`,l=1;l<=t.linesAfter&&!(s+l>=n.length);l++)c=On(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),u),o+=Lt.repeat(" ",t.indent)+Rn((e.line+l+1).toString(),h)+" | "+c.str+`
|
|
87
|
+
`;return o.replace(/\n$/,"")}p(Ju,"makeSnippet");var _2=Ju,C2=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],w2=["scalar","sequence","mapping"];function tf(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(tf,"compileStyleAliases");function ef(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(C2.indexOf(r)===-1)throw new Xt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=tf(t.styleAliases||null),w2.indexOf(this.kind)===-1)throw new Xt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(ef,"Type$1");var Rt=ef;function js(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}p(js,"compileList");function rf(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}p(rf,"compileMap");function ra(e){return this.extend(e)}p(ra,"Schema$1");ra.prototype.extend=p(function(t){var r=[],i=[];if(t instanceof Rt)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Xt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Rt))throw new Xt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Xt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Xt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(a){if(!(a instanceof Rt))throw new Xt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(ra.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=js(n,"implicit"),n.compiledExplicit=js(n,"explicit"),n.compiledTypeMap=rf(n.compiledImplicit,n.compiledExplicit),n},"extend");var k2=ra,v2=new Rt("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(e){return e!==null?e:""},"construct")}),S2=new Rt("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(e){return e!==null?e:[]},"construct")}),T2=new Rt("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(e){return e!==null?e:{}},"construct")}),L2=new k2({explicit:[v2,S2,T2]});function nf(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}p(nf,"resolveYamlNull");function af(){return null}p(af,"constructYamlNull");function sf(e){return e===null}p(sf,"isNull");var B2=new Rt("tag:yaml.org,2002:null",{kind:"scalar",resolve:nf,construct:af,predicate:sf,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"});function of(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}p(of,"resolveYamlBoolean");function lf(e){return e==="true"||e==="True"||e==="TRUE"}p(lf,"constructYamlBoolean");function cf(e){return Object.prototype.toString.call(e)==="[object Boolean]"}p(cf,"isBoolean");var A2=new Rt("tag:yaml.org,2002:bool",{kind:"scalar",resolve:of,construct:lf,predicate:cf,represent:{lowercase:p(function(e){return e?"true":"false"},"lowercase"),uppercase:p(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function hf(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}p(hf,"isHexCode");function uf(e){return 48<=e&&e<=55}p(uf,"isOctCode");function ff(e){return 48<=e&&e<=57}p(ff,"isDecCode");function df(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!hf(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!uf(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!ff(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}p(df,"resolveYamlInteger");function pf(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}p(pf,"constructYamlInteger");function gf(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!Lt.isNegativeZero(e)}p(gf,"isInteger");var M2=new Rt("tag:yaml.org,2002:int",{kind:"scalar",resolve:df,construct:pf,predicate:gf,represent:{binary:p(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),E2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mf(e){return!(e===null||!E2.test(e)||e[e.length-1]==="_")}p(mf,"resolveYamlFloat");function yf(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(yf,"constructYamlFloat");var $2=/^[-+]?[0-9]+e/;function xf(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Lt.isNegativeZero(e))return"-0.0";return r=e.toString(10),$2.test(r)?r.replace("e",".e"):r}p(xf,"representYamlFloat");function bf(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Lt.isNegativeZero(e))}p(bf,"isFloat");var F2=new Rt("tag:yaml.org,2002:float",{kind:"scalar",resolve:mf,construct:yf,predicate:bf,represent:xf,defaultStyle:"lowercase"}),_f=L2.extend({implicit:[B2,A2,M2,F2]}),D2=_f,Cf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),wf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function kf(e){return e===null?!1:Cf.exec(e)!==null||wf.exec(e)!==null}p(kf,"resolveYamlTimestamp");function vf(e){var t,r,i,n,a,s,o,l=0,c=null,h,u,d;if(t=Cf.exec(e),t===null&&(t=wf.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,i,n,a,s,o,l)),c&&d.setTime(d.getTime()-c),d}p(vf,"constructYamlTimestamp");function Sf(e){return e.toISOString()}p(Sf,"representYamlTimestamp");var O2=new Rt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:kf,construct:vf,instanceOf:Date,represent:Sf});function Tf(e){return e==="<<"||e===null}p(Tf,"resolveYamlMerge");var R2=new Rt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Tf}),Vo=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
88
|
+
\r`;function Lf(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Vo;for(r=0;r<n;r++)if(t=a.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}p(Lf,"resolveYamlBinary");function Bf(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Vo,s=0,o=[];for(t=0;t<n;t++)t%4===0&&t&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}p(Bf,"constructYamlBinary");function Af(e){var t="",r=0,i,n,a=e.length,s=Vo;for(i=0;i<a;i++)i%3===0&&i&&(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}p(Af,"representYamlBinary");function Mf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(Mf,"isBinary");var I2=new Rt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Lf,construct:Bf,predicate:Mf,represent:Af}),P2=Object.prototype.hasOwnProperty,N2=Object.prototype.toString;function Ef(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],s=!1,N2.call(n)!=="[object Object]")return!1;for(a in n)if(P2.call(n,a))if(!s)s=!0;else return!1;if(!s)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}p(Ef,"resolveYamlOmap");function $f(e){return e!==null?e:[]}p($f,"constructYamlOmap");var z2=new Rt("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ef,construct:$f}),W2=Object.prototype.toString;function Ff(e){if(e===null)return!0;var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1){if(i=s[t],W2.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;a[t]=[n[0],i[n[0]]]}return!0}p(Ff,"resolveYamlPairs");function Df(e){if(e===null)return[];var t,r,i,n,a,s=e;for(a=new Array(s.length),t=0,r=s.length;t<r;t+=1)i=s[t],n=Object.keys(i),a[t]=[n[0],i[n[0]]];return a}p(Df,"constructYamlPairs");var q2=new Rt("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Ff,construct:Df}),H2=Object.prototype.hasOwnProperty;function Of(e){if(e===null)return!0;var t,r=e;for(t in r)if(H2.call(r,t)&&r[t]!==null)return!1;return!0}p(Of,"resolveYamlSet");function Rf(e){return e!==null?e:{}}p(Rf,"constructYamlSet");var j2=new Rt("tag:yaml.org,2002:set",{kind:"mapping",resolve:Of,construct:Rf}),If=D2.extend({implicit:[O2,R2],explicit:[I2,z2,q2,j2]}),Ve=Object.prototype.hasOwnProperty,ia=1,Pf=2,Nf=3,na=4,gs=1,Y2=2,Bc=3,U2=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,G2=/[\x85\u2028\u2029]/,V2=/[,\[\]\{\}]/,zf=/^(?:!|!!|![a-z\-]+!)$/i,Wf=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Ys(e){return Object.prototype.toString.call(e)}p(Ys,"_class");function ue(e){return e===10||e===13}p(ue,"is_EOL");function Ue(e){return e===9||e===32}p(Ue,"is_WHITE_SPACE");function qt(e){return e===9||e===32||e===10||e===13}p(qt,"is_WS_OR_EOL");function lr(e){return e===44||e===91||e===93||e===123||e===125}p(lr,"is_FLOW_INDICATOR");function qf(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}p(qf,"fromHexCode");function Hf(e){return e===120?2:e===117?4:e===85?8:0}p(Hf,"escapedHexLen");function jf(e){return 48<=e&&e<=57?e-48:-1}p(jf,"fromDecimalCode");function Us(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
89
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"
":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}p(Us,"simpleEscapeSequence");function Yf(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(Yf,"charFromCodepoint");function Xo(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}p(Xo,"setProperty");var Uf=new Array(256),Gf=new Array(256);for(rr=0;rr<256;rr++)Uf[rr]=Us(rr)?1:0,Gf[rr]=Us(rr);var rr;function Vf(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||If,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Vf,"State$1");function Zo(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=_2(r),new Xt(t,r)}p(Zo,"generateError");function Q(e,t){throw Zo(e,t)}p(Q,"throwError");function zi(e,t){e.onWarning&&e.onWarning.call(null,Zo(e,t))}p(zi,"throwWarning");var Ac={YAML:p(function(t,r,i){var n,a,s;t.version!==null&&Q(t,"duplication of %YAML directive"),i.length!==1&&Q(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Q(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&Q(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&zi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&Q(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],zf.test(n)||Q(t,"ill-formed tag handle (first argument) of the TAG directive"),Ve.call(t.tagMap,n)&&Q(t,'there is a previously declared suffix for "'+n+'" tag handle'),Wf.test(a)||Q(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Q(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function De(e,t,r,i){var n,a,s,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,a=o.length;n<a;n+=1)s=o.charCodeAt(n),s===9||32<=s&&s<=1114111||Q(e,"expected valid JSON character");else U2.test(o)&&Q(e,"the stream contains non-printable characters");e.result+=o}}p(De,"captureSegment");function Gs(e,t,r,i){var n,a,s,o;for(Lt.isObject(r)||Q(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),s=0,o=n.length;s<o;s+=1)a=n[s],Ve.call(t,a)||(Xo(t,a,r[a]),i[a]=!0)}p(Gs,"mergeMappings");function cr(e,t,r,i,n,a,s,o,l){var c,h;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),c=0,h=n.length;c<h;c+=1)Array.isArray(n[c])&&Q(e,"nested arrays are not supported inside keys"),typeof n=="object"&&Ys(n[c])==="[object Object]"&&(n[c]="[object Object]");if(typeof n=="object"&&Ys(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,h=a.length;c<h;c+=1)Gs(e,t,a[c],r);else Gs(e,t,a,r);else!e.json&&!Ve.call(r,n)&&Ve.call(t,n)&&(e.line=s||e.line,e.lineStart=o||e.lineStart,e.position=l||e.position,Q(e,"duplicated mapping key")),Xo(t,n,a),delete r[n];return t}p(cr,"storeMappingPair");function $a(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Q(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p($a,"readLineBreak");function _t(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Ue(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(ue(n))for($a(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&zi(e,"deficient indentation"),i}p(_t,"skipSeparationSpace");function tn(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||qt(r)))}p(tn,"testDocumentSeparator");function Fa(e,t){t===1?e.result+=" ":t>1&&(e.result+=Lt.repeat(`
|
|
90
|
+
`,t-1))}p(Fa,"writeFoldedLines");function Xf(e,t,r){var i,n,a,s,o,l,c,h,u=e.kind,d=e.result,f;if(f=e.input.charCodeAt(e.position),qt(f)||lr(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(n=e.input.charCodeAt(e.position+1),qt(n)||r&&lr(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;f!==0;){if(f===58){if(n=e.input.charCodeAt(e.position+1),qt(n)||r&&lr(n))break}else if(f===35){if(i=e.input.charCodeAt(e.position-1),qt(i))break}else{if(e.position===e.lineStart&&tn(e)||r&&lr(f))break;if(ue(f))if(l=e.line,c=e.lineStart,h=e.lineIndent,_t(e,!1,-1),e.lineIndent>=t){o=!0,f=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}o&&(De(e,a,s,!1),Fa(e,e.line-l),a=s=e.position,o=!1),Ue(f)||(s=e.position+1),f=e.input.charCodeAt(++e.position)}return De(e,a,s,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(Xf,"readPlainScalar");function Zf(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(De(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else ue(r)?(De(e,i,n,!0),Fa(e,_t(e,!1,t)),i=n=e.position):e.position===e.lineStart&&tn(e)?Q(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Q(e,"unexpected end of the stream within a single quoted scalar")}p(Zf,"readSingleQuotedScalar");function Kf(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return De(e,r,e.position,!0),e.position++,!0;if(o===92){if(De(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),ue(o))_t(e,!1,t);else if(o<256&&Uf[o])e.result+=Gf[o],e.position++;else if((s=Hf(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=qf(o))>=0?a=(a<<4)+s:Q(e,"expected hexadecimal character");e.result+=Yf(a),e.position++}else Q(e,"unknown escape sequence");r=i=e.position}else ue(o)?(De(e,r,i,!0),Fa(e,_t(e,!1,t)),r=i=e.position):e.position===e.lineStart&&tn(e)?Q(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Q(e,"unexpected end of the stream within a double quoted scalar")}p(Kf,"readDoubleQuotedScalar");function Qf(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,c,h,u,d,f,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,f=!1,o=[];else if(b===123)h=125,f=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(_t(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=s,e.anchor=l,e.kind=f?"mapping":"sequence",e.result=o,!0;r?b===44&&Q(e,"expected the node content, but found ','"):Q(e,"missed comma between flow collection entries"),y=m=x=null,u=d=!1,b===63&&(c=e.input.charCodeAt(e.position+1),qt(c)&&(u=d=!0,e.position++,_t(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,gr(e,t,ia,!1,!0),y=e.tag,m=e.result,_t(e,!0,t),b=e.input.charCodeAt(e.position),(d||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),_t(e,!0,t),gr(e,t,ia,!1,!0),x=e.result),f?cr(e,o,g,y,m,x,i,n,a):u?o.push(cr(e,null,g,y,m,x,i,n,a)):o.push(m),_t(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}Q(e,"unexpected end of the stream within a flow collection")}p(Qf,"readFlowCollection");function Jf(e,t){var r,i,n=gs,a=!1,s=!1,o=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)gs===n?n=u===43?Bc:Y2:Q(e,"repeat of a chomping mode identifier");else if((h=jf(u))>=0)h===0?Q(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Q(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(Ue(u)){do u=e.input.charCodeAt(++e.position);while(Ue(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ue(u)&&u!==0)}for(;u!==0;){for($a(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndent<o)&&u===32;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>o&&(o=e.lineIndent),ue(u)){l++;continue}if(e.lineIndent<o){n===Bc?e.result+=Lt.repeat(`
|
|
91
|
+
`,a?1+l:l):n===gs&&a&&(e.result+=`
|
|
92
|
+
`);break}for(i?Ue(u)?(c=!0,e.result+=Lt.repeat(`
|
|
93
|
+
`,a?1+l:l)):c?(c=!1,e.result+=Lt.repeat(`
|
|
94
|
+
`,l+1)):l===0?a&&(e.result+=" "):e.result+=Lt.repeat(`
|
|
95
|
+
`,l):e.result+=Lt.repeat(`
|
|
96
|
+
`,a?1+l:l),a=!0,s=!0,l=0,r=e.position;!ue(u)&&u!==0;)u=e.input.charCodeAt(++e.position);De(e,r,e.position,!1)}return!0}p(Jf,"readBlockScalar");function Vs(e,t){var r,i=e.tag,n=e.anchor,a=[],s,o=!1,l;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),l=e.input.charCodeAt(e.position);l!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,"tab characters must not be used in indentation")),!(l!==45||(s=e.input.charCodeAt(e.position+1),!qt(s))));){if(o=!0,e.position++,_t(e,!0,-1)&&e.lineIndent<=t){a.push(null),l=e.input.charCodeAt(e.position);continue}if(r=e.line,gr(e,t,Nf,!1,!0),a.push(e.result),_t(e,!0,-1),l=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&l!==0)Q(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=a,!0):!1}p(Vs,"readBlockSequence");function td(e,t,r){var i,n,a,s,o,l,c=e.tag,h=e.anchor,u={},d=Object.create(null),f=null,g=null,m=null,y=!1,x=!1,b;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),b=e.input.charCodeAt(e.position);b!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Q(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),a=e.line,(b===63||b===58)&&qt(i))b===63?(y&&(cr(e,u,d,f,g,null,s,o,l),f=g=m=null),x=!0,y=!0,n=!0):y?(y=!1,n=!0):Q(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,b=i;else{if(s=e.line,o=e.lineStart,l=e.position,!gr(e,r,Pf,!1,!0))break;if(e.line===a){for(b=e.input.charCodeAt(e.position);Ue(b);)b=e.input.charCodeAt(++e.position);if(b===58)b=e.input.charCodeAt(++e.position),qt(b)||Q(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(cr(e,u,d,f,g,null,s,o,l),f=g=m=null),x=!0,y=!1,n=!1,f=e.tag,g=e.result;else if(x)Q(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=c,e.anchor=h,!0}else if(x)Q(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=c,e.anchor=h,!0}if((e.line===a||e.lineIndent>t)&&(y&&(s=e.line,o=e.lineStart,l=e.position),gr(e,t,na,!0,n)&&(y?g=e.result:m=e.result),y||(cr(e,u,d,f,g,m,s,o,l),f=g=m=null),_t(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)Q(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&cr(e,u,d,f,g,null,s,o,l),x&&(e.tag=c,e.anchor=h,e.kind="mapping",e.result=u),x}p(td,"readBlockMapping");function ed(e){var t,r=!1,i=!1,n,a,s;if(s=e.input.charCodeAt(e.position),s!==33)return!1;if(e.tag!==null&&Q(e,"duplication of a tag property"),s=e.input.charCodeAt(++e.position),s===60?(r=!0,s=e.input.charCodeAt(++e.position)):s===33?(i=!0,n="!!",s=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do s=e.input.charCodeAt(++e.position);while(s!==0&&s!==62);e.position<e.length?(a=e.input.slice(t,e.position),s=e.input.charCodeAt(++e.position)):Q(e,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!qt(s);)s===33&&(i?Q(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),zf.test(n)||Q(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),s=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),V2.test(a)&&Q(e,"tag suffix cannot contain flow indicator characters")}a&&!Wf.test(a)&&Q(e,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{Q(e,"tag name is malformed: "+a)}return r?e.tag=a:Ve.call(e.tagMap,n)?e.tag=e.tagMap[n]+a:n==="!"?e.tag="!"+a:n==="!!"?e.tag="tag:yaml.org,2002:"+a:Q(e,'undeclared tag handle "'+n+'"'),!0}p(ed,"readTagProperty");function rd(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Q(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!qt(r)&&!lr(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}p(rd,"readAnchorProperty");function id(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!qt(i)&&!lr(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Q(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Ve.call(e.anchorMap,r)||Q(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],_t(e,!0,-1),!0}p(id,"readAlias");function gr(e,t,r,i,n){var a,s,o,l=1,c=!1,h=!1,u,d,f,g,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=o=na===r||Nf===r,i&&_t(e,!0,-1)&&(c=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;ed(e)||rd(e);)_t(e,!0,-1)?(c=!0,o=a,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):o=!1;if(o&&(o=c||n),(l===1||na===r)&&(ia===r||Pf===r?m=t:m=t+1,y=e.position-e.lineStart,l===1?o&&(Vs(e,y)||td(e,y,m))||Qf(e,m)?h=!0:(s&&Jf(e,m)||Zf(e,m)||Kf(e,m)?h=!0:id(e)?(h=!0,(e.tag!==null||e.anchor!==null)&&Q(e,"alias node should not have any properties")):Xf(e,m,ia===r)&&(h=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):l===0&&(h=o&&Vs(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Q(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,d=e.implicitTypes.length;u<d;u+=1)if(g=e.implicitTypes[u],g.resolve(e.result)){e.result=g.construct(e.result),e.tag=g.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Ve.call(e.typeMap[e.kind||"fallback"],e.tag))g=e.typeMap[e.kind||"fallback"][e.tag];else for(g=null,f=e.typeMap.multi[e.kind||"fallback"],u=0,d=f.length;u<d;u+=1)if(e.tag.slice(0,f[u].tag.length)===f[u].tag){g=f[u];break}g||Q(e,"unknown tag !<"+e.tag+">"),e.result!==null&&g.kind!==e.kind&&Q(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Q(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(gr,"composeNode");function nd(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(_t(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!qt(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Q(e,"directive name must not be less than one character in length");s!==0;){for(;Ue(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!ue(s));break}if(ue(s))break;for(r=e.position;s!==0&&!qt(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&$a(e),Ve.call(Ac,i)?Ac[i](e,i,n):zi(e,'unknown document directive "'+i+'"')}if(_t(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,_t(e,!0,-1)):a&&Q(e,"directives end mark is expected"),gr(e,e.lineIndent-1,na,!1,!0),_t(e,!0,-1),e.checkLineBreaks&&G2.test(e.input.slice(t,e.position))&&zi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&tn(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_t(e,!0,-1));return}if(e.position<e.length-1)Q(e,"end of the stream or a document separator is expected");else return}p(nd,"readDocument");function Ko(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
97
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new Vf(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Q(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)nd(r);return r.documents}p(Ko,"loadDocuments");function X2(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=Ko(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n<a;n+=1)t(i[n])}p(X2,"loadAll$1");function ad(e,t){var r=Ko(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Xt("expected a single document in the stream, but found more")}}p(ad,"load$1");var Z2=ad,K2={load:Z2},sd=Object.prototype.toString,od=Object.prototype.hasOwnProperty,Qo=65279,Q2=9,Wi=10,J2=13,t_=32,e_=33,r_=34,Xs=35,i_=37,n_=38,a_=39,s_=42,ld=44,o_=45,aa=58,l_=61,c_=62,h_=63,u_=64,cd=91,hd=93,f_=96,ud=123,d_=124,fd=125,Nt={};Nt[0]="\\0";Nt[7]="\\a";Nt[8]="\\b";Nt[9]="\\t";Nt[10]="\\n";Nt[11]="\\v";Nt[12]="\\f";Nt[13]="\\r";Nt[27]="\\e";Nt[34]='\\"';Nt[92]="\\\\";Nt[133]="\\N";Nt[160]="\\_";Nt[8232]="\\L";Nt[8233]="\\P";var p_=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],g_=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function dd(e,t){var r,i,n,a,s,o,l;if(t===null)return{};for(r={},i=Object.keys(t),n=0,a=i.length;n<a;n+=1)s=i[n],o=String(t[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=e.compiledTypeMap.fallback[s],l&&od.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}p(dd,"compileStyleMap");function pd(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Xt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Lt.repeat("0",i-t.length)+t}p(pd,"encodeHex");var m_=1,qi=2;function gd(e){this.schema=e.schema||If,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Lt.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=dd(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?qi:m_,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(gd,"State");function Zs(e,t){for(var r=Lt.repeat(" ",t),i=0,n=-1,a="",s,o=e.length;i<o;)n=e.indexOf(`
|
|
98
|
+
`,i),n===-1?(s=e.slice(i),i=o):(s=e.slice(i,n+1),i=n+1),s.length&&s!==`
|
|
99
|
+
`&&(a+=r),a+=s;return a}p(Zs,"indentString");function sa(e,t){return`
|
|
100
|
+
`+Lt.repeat(" ",e.indent*t)}p(sa,"generateNextLine");function md(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}p(md,"testImplicitResolving");function Hi(e){return e===t_||e===Q2}p(Hi,"isWhitespace");function Xr(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==Qo||65536<=e&&e<=1114111}p(Xr,"isPrintable");function Ks(e){return Xr(e)&&e!==Qo&&e!==J2&&e!==Wi}p(Ks,"isNsCharOrWhitespace");function Qs(e,t,r){var i=Ks(e),n=i&&!Hi(e);return(r?i:i&&e!==ld&&e!==cd&&e!==hd&&e!==ud&&e!==fd)&&e!==Xs&&!(t===aa&&!n)||Ks(t)&&!Hi(t)&&e===Xs||t===aa&&n}p(Qs,"isPlainSafe");function yd(e){return Xr(e)&&e!==Qo&&!Hi(e)&&e!==o_&&e!==h_&&e!==aa&&e!==ld&&e!==cd&&e!==hd&&e!==ud&&e!==fd&&e!==Xs&&e!==n_&&e!==s_&&e!==e_&&e!==d_&&e!==l_&&e!==c_&&e!==a_&&e!==r_&&e!==i_&&e!==u_&&e!==f_}p(yd,"isPlainSafeFirst");function xd(e){return!Hi(e)&&e!==aa}p(xd,"isPlainSafeLast");function $r(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p($r,"codePointAt");function Jo(e){var t=/^\n* /;return t.test(e)}p(Jo,"needIndentIndicator");var bd=1,Js=2,_d=3,Cd=4,Mr=5;function wd(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,d=!1,f=i!==-1,g=-1,m=yd($r(e,0))&&xd($r(e,e.length-1));if(t||s)for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=$r(e,l),!Xr(c))return Mr;m=m&&Qs(c,h,o),h=c}else{for(l=0;l<e.length;c>=65536?l+=2:l++){if(c=$r(e,l),c===Wi)u=!0,f&&(d=d||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Xr(c))return Mr;m=m&&Qs(c,h,o),h=c}d=d||f&&l-g-1>i&&e[g+1]!==" "}return!u&&!d?m&&!s&&!n(e)?bd:a===qi?Mr:Js:r>9&&Jo(e)?Mr:s?a===qi?Mr:Js:d?Cd:_d}p(wd,"chooseScalarStyle");function kd(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===qi?'""':"''";if(!e.noCompatMode&&(p_.indexOf(t)!==-1||g_.test(t)))return e.quotingType===qi?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return md(e,c)}switch(p(l,"testAmbiguity"),wd(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case bd:return t;case Js:return"'"+t.replace(/'/g,"''")+"'";case _d:return"|"+to(t,e.indent)+eo(Zs(t,a));case Cd:return">"+to(t,e.indent)+eo(Zs(vd(t,s),a));case Mr:return'"'+Sd(t)+'"';default:throw new Xt("impossible error: invalid scalar style")}})()}p(kd,"writeScalar");function to(e,t){var r=Jo(e)?String(t):"",i=e[e.length-1]===`
|
|
101
|
+
`,n=i&&(e[e.length-2]===`
|
|
102
|
+
`||e===`
|
|
103
|
+
`),a=n?"+":i?"":"-";return r+a+`
|
|
104
|
+
`}p(to,"blockHeader");function eo(e){return e[e.length-1]===`
|
|
105
|
+
`?e.slice(0,-1):e}p(eo,"dropEndingNewline");function vd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(`
|
|
106
|
+
`);return c=c!==-1?c:e.length,r.lastIndex=c,ro(e.slice(0,c),t)})(),n=e[0]===`
|
|
107
|
+
`||e[0]===" ",a,s;s=r.exec(e);){var o=s[1],l=s[2];a=l[0]===" ",i+=o+(!n&&!a&&l!==""?`
|
|
108
|
+
`:"")+ro(l,t),n=a}return i}p(vd,"foldString");function ro(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=`
|
|
109
|
+
`+e.slice(n,a),n=a+1),s=o;return l+=`
|
|
110
|
+
`,e.length-n>t&&s>n?l+=e.slice(n,s)+`
|
|
111
|
+
`+e.slice(s+1):l+=e.slice(n),l.slice(1)}p(ro,"foldLine");function Sd(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=$r(e,n),i=Nt[r],!i&&Xr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||pd(r);return t}p(Sd,"escapeString");function Td(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],e.replacer&&(o=e.replacer.call(r,String(a),o)),(ke(e,t,o,!1,!1)||typeof o>"u"&&ke(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(Td,"writeFlowSequence");function io(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],e.replacer&&(l=e.replacer.call(r,String(s),l)),(ke(e,t+1,l,!0,!0,!1,!0)||typeof l>"u"&&ke(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=sa(e,t)),e.dump&&Wi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(io,"writeBlockSequence");function Ld(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s<o;s+=1)h="",i!==""&&(h+=", "),e.condenseFlow&&(h+='"'),l=a[s],c=r[l],e.replacer&&(c=e.replacer.call(r,l,c)),ke(e,t,l,!1,!1)&&(e.dump.length>1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ke(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(Ld,"writeFlowMapping");function Bd(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,c,h,u,d;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Xt("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)d="",(!i||n!=="")&&(d+=sa(e,t)),c=s[o],h=r[c],e.replacer&&(h=e.replacer.call(r,c,h)),ke(e,t+1,c,!0,!0,!0)&&(u=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,u&&(e.dump&&Wi===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,u&&(d+=sa(e,t)),ke(e,t+1,h,!0,u)&&(e.dump&&Wi===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=a,e.dump=n||"{}"}p(Bd,"writeBlockMapping");function no(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a<s;a+=1)if(o=n[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(l=e.styleMap[o.tag]||o.defaultStyle,sd.call(o.represent)==="[object Function]")i=o.represent(t,l);else if(od.call(o.represent,l))i=o.represent[l](t,l);else throw new Xt("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(no,"detectType");function ke(e,t,r,i,n,a,s){e.tag=null,e.dump=r,no(e,r,!1)||no(e,r,!0);var o=sd.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[object Array]",u,d;if(h&&(u=e.duplicates.indexOf(r),d=u!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(n=!1),d&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&d&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(Bd(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(Ld(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?io(e,t-1,e.dump,n):io(e,t,e.dump,n),d&&(e.dump="&ref_"+u+e.dump)):(Td(e,t,e.dump),d&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&kd(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Xt("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(ke,"writeNode");function Ad(e,t){var r=[],i=[],n,a;for(oa(e,r,i),n=0,a=i.length;n<a;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(a)}p(Ad,"getDuplicateReferences");function oa(e,t,r){var i,n,a;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,a=e.length;n<a;n+=1)oa(e[n],t,r);else for(i=Object.keys(e),n=0,a=i.length;n<a;n+=1)oa(e[i[n]],t,r)}p(oa,"inspectNode");function y_(e,t){t=t||{};var r=new gd(t);r.noRefs||Ad(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),ke(r,0,i,!0,!0)?r.dump+`
|
|
112
|
+
`:""}p(y_,"dump$1");function x_(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}p(x_,"renamed");var b_=_f,__=K2.load;var di=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Dt={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},Mc={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function vi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=yt(e),t=yt(t);const[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,o=a-i;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}p(vi,"calculateDeltaAndAngle");var yt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),C_=p(e=>({x:p(function(t,r,i){let n=0;const a=yt(i[0]).x<yt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Dt,e.arrowTypeStart)){const{angle:f,deltaX:g}=vi(i[0],i[1]);n=Dt[e.arrowTypeStart]*Math.cos(f)*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Dt,e.arrowTypeEnd)){const{angle:f,deltaX:g}=vi(i[i.length-1],i[i.length-2]);n=Dt[e.arrowTypeEnd]*Math.cos(f)*(g>=0?1:-1)}const s=Math.abs(yt(t).x-yt(i[i.length-1]).x),o=Math.abs(yt(t).y-yt(i[i.length-1]).y),l=Math.abs(yt(t).x-yt(i[0]).x),c=Math.abs(yt(t).y-yt(i[0]).y),h=Dt[e.arrowTypeStart],u=Dt[e.arrowTypeEnd],d=1;if(s<u&&s>0&&o<u){let f=u+d-s;f*=a==="right"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="right"?-1:1,n+=f}return yt(t).x+n},"x"),y:p(function(t,r,i){let n=0;const a=yt(i[0]).y<yt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Dt,e.arrowTypeStart)){const{angle:f,deltaY:g}=vi(i[0],i[1]);n=Dt[e.arrowTypeStart]*Math.abs(Math.sin(f))*(g>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Dt,e.arrowTypeEnd)){const{angle:f,deltaY:g}=vi(i[i.length-1],i[i.length-2]);n=Dt[e.arrowTypeEnd]*Math.abs(Math.sin(f))*(g>=0?1:-1)}const s=Math.abs(yt(t).y-yt(i[i.length-1]).y),o=Math.abs(yt(t).x-yt(i[i.length-1]).x),l=Math.abs(yt(t).y-yt(i[0]).y),c=Math.abs(yt(t).x-yt(i[0]).x),h=Dt[e.arrowTypeStart],u=Dt[e.arrowTypeEnd],d=1;if(s<u&&s>0&&o<u){let f=u+d-s;f*=a==="up"?-1:1,n-=f}if(l<h&&l>0&&c<h){let f=h+d-l;f*=a==="up"?-1:1,n+=f}return yt(t).y+n},"y")}),"getLineFunctionsWithOffset"),_n={},St={},Ec;function w_(){return Ec||(Ec=1,Object.defineProperty(St,"__esModule",{value:!0}),St.BLANK_URL=St.relativeFirstCharacters=St.whitespaceEscapeCharsRegex=St.urlSchemeRegex=St.ctrlCharactersRegex=St.htmlCtrlEntityRegex=St.htmlEntitiesRegex=St.invalidProtocolRegex=void 0,St.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,St.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,St.htmlCtrlEntityRegex=/&(newline|tab);/gi,St.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,St.urlSchemeRegex=/^.+(:|:)/gim,St.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,St.relativeFirstCharacters=[".","/"],St.BLANK_URL="about:blank"),St}var $c;function k_(){if($c)return _n;$c=1,Object.defineProperty(_n,"__esModule",{value:!0}),_n.sanitizeUrl=a;var e=w_();function t(s){return e.relativeFirstCharacters.indexOf(s[0])>-1}function r(s){var o=s.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(s){return URL.canParse(s)}function n(s){try{return decodeURIComponent(s)}catch{return s}}function a(s){if(!s)return e.BLANK_URL;var o,l=n(s.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(d))return e.BLANK_URL;var f=h.replace(/\\/g,"/");if(d==="mailto:"||d.includes("://"))return f;if(d==="http:"||d==="https:"){if(!i(f))return e.BLANK_URL;var g=new URL(f);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return f}return _n}var v_=k_(),Md=typeof global=="object"&&global&&global.Object===Object&&global,S_=typeof self=="object"&&self&&self.Object===Object&&self,Se=Md||S_||Function("return this")(),la=Se.Symbol,Ed=Object.prototype,T_=Ed.hasOwnProperty,L_=Ed.toString,pi=la?la.toStringTag:void 0;function B_(e){var t=T_.call(e,pi),r=e[pi];try{e[pi]=void 0;var i=!0}catch{}var n=L_.call(e);return i&&(t?e[pi]=r:delete e[pi]),n}var A_=Object.prototype,M_=A_.toString;function E_(e){return M_.call(e)}var $_="[object Null]",F_="[object Undefined]",Fc=la?la.toStringTag:void 0;function Qr(e){return e==null?e===void 0?F_:$_:Fc&&Fc in Object(e)?B_(e):E_(e)}function br(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var D_="[object AsyncFunction]",O_="[object Function]",R_="[object GeneratorFunction]",I_="[object Proxy]";function tl(e){if(!br(e))return!1;var t=Qr(e);return t==O_||t==R_||t==D_||t==I_}var ms=Se["__core-js_shared__"],Dc=(function(){var e=/[^.]+$/.exec(ms&&ms.keys&&ms.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function P_(e){return!!Dc&&Dc in e}var N_=Function.prototype,z_=N_.toString;function _r(e){if(e!=null){try{return z_.call(e)}catch{}try{return e+""}catch{}}return""}var W_=/[\\^$.*+?()[\]{}|]/g,q_=/^\[object .+?Constructor\]$/,H_=Function.prototype,j_=Object.prototype,Y_=H_.toString,U_=j_.hasOwnProperty,G_=RegExp("^"+Y_.call(U_).replace(W_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function V_(e){if(!br(e)||P_(e))return!1;var t=tl(e)?G_:q_;return t.test(_r(e))}function X_(e,t){return e?.[t]}function Cr(e,t){var r=X_(e,t);return V_(r)?r:void 0}var ji=Cr(Object,"create");function Z_(){this.__data__=ji?ji(null):{},this.size=0}function K_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Q_="__lodash_hash_undefined__",J_=Object.prototype,tC=J_.hasOwnProperty;function eC(e){var t=this.__data__;if(ji){var r=t[e];return r===Q_?void 0:r}return tC.call(t,e)?t[e]:void 0}var rC=Object.prototype,iC=rC.hasOwnProperty;function nC(e){var t=this.__data__;return ji?t[e]!==void 0:iC.call(t,e)}var aC="__lodash_hash_undefined__";function sC(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ji&&t===void 0?aC:t,this}function mr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}mr.prototype.clear=Z_;mr.prototype.delete=K_;mr.prototype.get=eC;mr.prototype.has=nC;mr.prototype.set=sC;function oC(){this.__data__=[],this.size=0}function Da(e,t){return e===t||e!==e&&t!==t}function Oa(e,t){for(var r=e.length;r--;)if(Da(e[r][0],t))return r;return-1}var lC=Array.prototype,cC=lC.splice;function hC(e){var t=this.__data__,r=Oa(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():cC.call(t,r,1),--this.size,!0}function uC(e){var t=this.__data__,r=Oa(t,e);return r<0?void 0:t[r][1]}function fC(e){return Oa(this.__data__,e)>-1}function dC(e,t){var r=this.__data__,i=Oa(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Pe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Pe.prototype.clear=oC;Pe.prototype.delete=hC;Pe.prototype.get=uC;Pe.prototype.has=fC;Pe.prototype.set=dC;var Yi=Cr(Se,"Map");function pC(){this.size=0,this.__data__={hash:new mr,map:new(Yi||Pe),string:new mr}}function gC(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ra(e,t){var r=e.__data__;return gC(t)?r[typeof t=="string"?"string":"hash"]:r.map}function mC(e){var t=Ra(this,e).delete(e);return this.size-=t?1:0,t}function yC(e){return Ra(this,e).get(e)}function xC(e){return Ra(this,e).has(e)}function bC(e,t){var r=Ra(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Qe.prototype.clear=pC;Qe.prototype.delete=mC;Qe.prototype.get=yC;Qe.prototype.has=xC;Qe.prototype.set=bC;var _C="Expected a function";function en(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(_C);var r=function(){var i=arguments,n=t?t.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var s=e.apply(this,i);return r.cache=a.set(n,s)||a,s};return r.cache=new(en.Cache||Qe),r}en.Cache=Qe;function CC(){this.__data__=new Pe,this.size=0}function wC(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function kC(e){return this.__data__.get(e)}function vC(e){return this.__data__.has(e)}var SC=200;function TC(e,t){var r=this.__data__;if(r instanceof Pe){var i=r.__data__;if(!Yi||i.length<SC-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Qe(i)}return r.set(e,t),this.size=r.size,this}function Jr(e){var t=this.__data__=new Pe(e);this.size=t.size}Jr.prototype.clear=CC;Jr.prototype.delete=wC;Jr.prototype.get=kC;Jr.prototype.has=vC;Jr.prototype.set=TC;var ca=(function(){try{var e=Cr(Object,"defineProperty");return e({},"",{}),e}catch{}})();function el(e,t,r){t=="__proto__"&&ca?ca(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ao(e,t,r){(r!==void 0&&!Da(e[t],r)||r===void 0&&!(t in e))&&el(e,t,r)}function LC(e){return function(t,r,i){for(var n=-1,a=Object(t),s=i(t),o=s.length;o--;){var l=s[++n];if(r(a[l],l,a)===!1)break}return t}}var BC=LC(),$d=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oc=$d&&typeof module=="object"&&module&&!module.nodeType&&module,AC=Oc&&Oc.exports===$d,Rc=AC?Se.Buffer:void 0,Ic=Rc?Rc.allocUnsafe:void 0;function MC(e,t){if(t)return e.slice();var r=e.length,i=Ic?Ic(r):new e.constructor(r);return e.copy(i),i}var Pc=Se.Uint8Array;function EC(e){var t=new e.constructor(e.byteLength);return new Pc(t).set(new Pc(e)),t}function $C(e,t){var r=t?EC(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function FC(e,t){var r=-1,i=e.length;for(t||(t=Array(i));++r<i;)t[r]=e[r];return t}var Nc=Object.create,DC=(function(){function e(){}return function(t){if(!br(t))return{};if(Nc)return Nc(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})();function Fd(e,t){return function(r){return e(t(r))}}var Dd=Fd(Object.getPrototypeOf,Object),OC=Object.prototype;function Ia(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||OC;return e===r}function RC(e){return typeof e.constructor=="function"&&!Ia(e)?DC(Dd(e)):{}}function rn(e){return e!=null&&typeof e=="object"}var IC="[object Arguments]";function zc(e){return rn(e)&&Qr(e)==IC}var Od=Object.prototype,PC=Od.hasOwnProperty,NC=Od.propertyIsEnumerable,ha=zc((function(){return arguments})())?zc:function(e){return rn(e)&&PC.call(e,"callee")&&!NC.call(e,"callee")},ua=Array.isArray,zC=9007199254740991;function Rd(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zC}function Pa(e){return e!=null&&Rd(e.length)&&!tl(e)}function WC(e){return rn(e)&&Pa(e)}function qC(){return!1}var Id=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wc=Id&&typeof module=="object"&&module&&!module.nodeType&&module,HC=Wc&&Wc.exports===Id,qc=HC?Se.Buffer:void 0,jC=qc?qc.isBuffer:void 0,rl=jC||qC,YC="[object Object]",UC=Function.prototype,GC=Object.prototype,Pd=UC.toString,VC=GC.hasOwnProperty,XC=Pd.call(Object);function ZC(e){if(!rn(e)||Qr(e)!=YC)return!1;var t=Dd(e);if(t===null)return!0;var r=VC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Pd.call(r)==XC}var KC="[object Arguments]",QC="[object Array]",JC="[object Boolean]",tw="[object Date]",ew="[object Error]",rw="[object Function]",iw="[object Map]",nw="[object Number]",aw="[object Object]",sw="[object RegExp]",ow="[object Set]",lw="[object String]",cw="[object WeakMap]",hw="[object ArrayBuffer]",uw="[object DataView]",fw="[object Float32Array]",dw="[object Float64Array]",pw="[object Int8Array]",gw="[object Int16Array]",mw="[object Int32Array]",yw="[object Uint8Array]",xw="[object Uint8ClampedArray]",bw="[object Uint16Array]",_w="[object Uint32Array]",gt={};gt[fw]=gt[dw]=gt[pw]=gt[gw]=gt[mw]=gt[yw]=gt[xw]=gt[bw]=gt[_w]=!0;gt[KC]=gt[QC]=gt[hw]=gt[JC]=gt[uw]=gt[tw]=gt[ew]=gt[rw]=gt[iw]=gt[nw]=gt[aw]=gt[sw]=gt[ow]=gt[lw]=gt[cw]=!1;function Cw(e){return rn(e)&&Rd(e.length)&&!!gt[Qr(e)]}function ww(e){return function(t){return e(t)}}var Nd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fi=Nd&&typeof module=="object"&&module&&!module.nodeType&&module,kw=Fi&&Fi.exports===Nd,ys=kw&&Md.process,Hc=(function(){try{var e=Fi&&Fi.require&&Fi.require("util").types;return e||ys&&ys.binding&&ys.binding("util")}catch{}})(),jc=Hc&&Hc.isTypedArray,il=jc?ww(jc):Cw;function so(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var vw=Object.prototype,Sw=vw.hasOwnProperty;function Tw(e,t,r){var i=e[t];(!(Sw.call(e,t)&&Da(i,r))||r===void 0&&!(t in e))&&el(e,t,r)}function Lw(e,t,r,i){var n=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var o=t[a],l=void 0;l===void 0&&(l=e[o]),n?el(r,o,l):Tw(r,o,l)}return r}function Bw(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var Aw=9007199254740991,Mw=/^(?:0|[1-9]\d*)$/;function zd(e,t){var r=typeof e;return t=t??Aw,!!t&&(r=="number"||r!="symbol"&&Mw.test(e))&&e>-1&&e%1==0&&e<t}var Ew=Object.prototype,$w=Ew.hasOwnProperty;function Fw(e,t){var r=ua(e),i=!r&&ha(e),n=!r&&!i&&rl(e),a=!r&&!i&&!n&&il(e),s=r||i||n||a,o=s?Bw(e.length,String):[],l=o.length;for(var c in e)(t||$w.call(e,c))&&!(s&&(c=="length"||n&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||zd(c,l)))&&o.push(c);return o}function Dw(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Ow=Object.prototype,Rw=Ow.hasOwnProperty;function Iw(e){if(!br(e))return Dw(e);var t=Ia(e),r=[];for(var i in e)i=="constructor"&&(t||!Rw.call(e,i))||r.push(i);return r}function Wd(e){return Pa(e)?Fw(e,!0):Iw(e)}function Pw(e){return Lw(e,Wd(e))}function Nw(e,t,r,i,n,a,s){var o=so(e,r),l=so(t,r),c=s.get(l);if(c){ao(e,r,c);return}var h=a?a(o,l,r+"",e,t,s):void 0,u=h===void 0;if(u){var d=ua(l),f=!d&&rl(l),g=!d&&!f&&il(l);h=l,d||f||g?ua(o)?h=o:WC(o)?h=FC(o):f?(u=!1,h=MC(l,!0)):g?(u=!1,h=$C(l,!0)):h=[]:ZC(l)||ha(l)?(h=o,ha(o)?h=Pw(o):(!br(o)||tl(o))&&(h=RC(l))):u=!1}u&&(s.set(l,h),n(h,l,i,a,s),s.delete(l)),ao(e,r,h)}function qd(e,t,r,i,n){e!==t&&BC(t,function(a,s){if(n||(n=new Jr),br(a))Nw(e,t,s,r,qd,i,n);else{var o=i?i(so(e,s),a,s+"",e,t,n):void 0;o===void 0&&(o=a),ao(e,s,o)}},Wd)}function Hd(e){return e}function zw(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Yc=Math.max;function Ww(e,t,r){return t=Yc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,n=-1,a=Yc(i.length-t,0),s=Array(a);++n<a;)s[n]=i[t+n];n=-1;for(var o=Array(t+1);++n<t;)o[n]=i[n];return o[t]=r(s),zw(e,this,o)}}function qw(e){return function(){return e}}var Hw=ca?function(e,t){return ca(e,"toString",{configurable:!0,enumerable:!1,value:qw(t),writable:!0})}:Hd,jw=800,Yw=16,Uw=Date.now;function Gw(e){var t=0,r=0;return function(){var i=Uw(),n=Yw-(i-r);if(r=i,n>0){if(++t>=jw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Vw=Gw(Hw);function Xw(e,t){return Vw(Ww(e,t,Hd),e+"")}function Zw(e,t,r){if(!br(r))return!1;var i=typeof t;return(i=="number"?Pa(r)&&zd(t,r.length):i=="string"&&t in r)?Da(r[t],e):!1}function Kw(e){return Xw(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&Zw(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i<n;){var o=r[i];o&&e(t,o,i,a)}return t})}var Qw=Kw(function(e,t,r){qd(e,t,r)}),Jw="",tk={curveBasis:Hs,curveBasisClosed:a2,curveBasisOpen:s2,curveBumpX:Bu,curveBumpY:Au,curveBundle:o2,curveCardinalClosed:l2,curveCardinalOpen:c2,curveCardinal:Fu,curveCatmullRomClosed:h2,curveCatmullRomOpen:u2,curveCatmullRom:Ou,curveLinear:$i,curveLinearClosed:f2,curveMonotoneX:Wu,curveMonotoneY:qu,curveNatural:ju,curveStep:Yu,curveStepAfter:Gu,curveStepBefore:Uu},ek=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,rk=p(function(e,t){const r=jd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const s=r.map(o=>o.args);qn(s),i=Tt(i,[...s])}else i=r.args;if(!i)return;let n=Bo(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),jd=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${ek.source})(?=[}][%]{2}).*
|
|
113
|
+
`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),F.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=Mi.exec(e))!==null;)if(i.index===Mi.lastIndex&&Mi.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return F.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),ik=p(function(e){return e.replace(Mi,"")},"removeDirectives"),nk=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function nl(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return tk[r]??t}p(nl,"interpolateToCurve");function Yd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?v_.sanitizeUrl(r):r}p(Yd,"formatUrl");var ak=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s<i;s++)if(a=a[r[s]],!a){F.error(`Function name: ${e} not found in window`);return}a[n](...t)},"runFunc");function al(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(al,"distance");function Ud(e){let t,r=0;e.forEach(n=>{r+=al(n,t),t=n});const i=r/2;return sl(e,i)}p(Ud,"traverseEdge");function Gd(e){return e.length===1?e[0]:Ud(e)}p(Gd,"calcLabelPosition");var Uc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),sl=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=al(n,r);if(a===0)return r;if(a<i)i-=a;else{const s=i/a;if(s<=0)return r;if(s>=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:Uc((1-s)*r.x+s*n.x,5),y:Uc((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),sk=p((e,t,r)=>{F.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=sl(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function Vd(e,t,r){const i=structuredClone(r);F.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=sl(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}p(Vd,"calcTerminalLabelPosition");function Xd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Xd,"getStylesFromArray");var Gc=0,ok=p(()=>(Gc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Gc),"generateId");function Zd(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;n<e;n++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(Zd,"makeRandomHex");var lk=p(e=>Zd(e.length),"random"),ck=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),hk=p(function(e,t){const r=t.text.replace(Ki.lineBreakRegex," "),[,i]=Na(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),uk=en((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ki.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((s,o)=>{const l=Re(`${s} `,r),c=Re(a,r);if(l>t){const{hyphenatedStrings:d,remainingWord:f}=fk(s,t,"-",r);n.push(a,...d),a=f}else c+l>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),fk=en((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let s="";return n.forEach((o,l)=>{const c=`${s}${o}`;if(Re(c,i)>=t){const u=l+1,d=n.length===u,f=`${c}${r}`;a.push(d?c:f),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Kd(e,t){return ol(e,t).height}p(Kd,"calculateTextHeight");function Re(e,t){return ol(e,t).width}p(Re,"calculateTextWidth");var ol=en((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Na(r),s=["sans-serif",i],o=e.split(Ki.lineBreakRegex),l=[],c=lt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const d of s){let f=0;const g={width:0,height:0,lineHeight:0};for(const m of o){const y=ck();y.text=m||Jw;const x=hk(h,y).style("font-size",a).style("font-weight",n).style("font-family",d),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),f=Math.round(b.height),g.height+=f,g.lineHeight=Math.round(Math.max(g.lineHeight,f))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Hr,dk=(Hr=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Hr,"InitIDGenerator"),Hr),Cn,pk=p(function(e){return Cn=Cn||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Cn.innerHTML=e,unescape(Cn.textContent)},"entityDecode");function ll(e){return"str"in e}p(ll,"isDetailedError");var gk=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Na=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function cl(e,t){return Qw({},e,t)}p(cl,"cleanAndMerge");var he={assignWithDepth:Tt,wrapLabel:uk,calculateTextHeight:Kd,calculateTextWidth:Re,calculateTextDimensions:ol,cleanAndMerge:cl,detectInit:rk,detectDirective:jd,isSubstringInArray:nk,interpolateToCurve:nl,calcLabelPosition:Gd,calcCardinalityPosition:sk,calcTerminalLabelPosition:Vd,formatUrl:Yd,getStylesFromArray:Xd,generateId:ok,random:lk,runFunc:ak,entityDecode:pk,insertTitle:gk,isLabelCoordinateInPath:Qd,parseFontSize:Na,InitIDGenerator:dk},mk=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),ti=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),AA=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function It(e){return e??null}p(It,"handleUndefinedAttr");function Qd(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(Qd,"isLabelCoordinateInPath");var hl=p(({flowchart:e})=>{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");async function Jd(e,t){const r=e.getElementsByTagName("img");if(!r||r.length===0)return;const i=t.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...r].map(n=>new Promise(a=>{function s(){if(n.style.display="flex",n.style.flexDirection="column",i){const o=dt().fontSize?dt().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[c=Wh.fontSize]=Na(o),h=c*l+"px";n.style.minWidth=h,n.style.maxWidth=h}else n.style.width="100%";a(n)}p(s,"setupImage"),setTimeout(()=>{n.complete&&s()}),n.addEventListener("error",s),n.addEventListener("load",s)})))}p(Jd,"configureLabelImages");var yk=p(e=>{const{handDrawnSeed:t}=dt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ei=p(e=>{const t=xk([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),xk=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),tp=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),G=p(e=>{const{stylesArray:t}=ei(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{const o=s[0];tp(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),U=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=dt(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=ei(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:bk(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),bk=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const _k=Object.freeze({left:0,top:0,width:16,height:16}),fa=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ep=Object.freeze({..._k,...fa}),Ck=Object.freeze({...ep,body:"",hidden:!1}),wk=Object.freeze({width:null,height:null}),kk=Object.freeze({...wk,...fa}),vk=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return xs(c)?c:null}const a=n[0],s=a.split("-");if(s.length>1){const o={provider:i,prefix:s.shift(),name:s.join("-")};return xs(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return xs(o,r)?o:null}return null},xs=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Sk(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Vc(e,t){const r=Sk(e,t);for(const i in Ck)i in fa?i in e&&!(i in r)&&(r[i]=fa[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Tk(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;const o=i[s]&&i[s].parent,l=o&&a(o);l&&(n[s]=[o].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Xc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function s(o){a=Vc(i[o]||n[o],a)}return s(t),r.forEach(s),Vc(e,a)}function Lk(e,t){if(e.icons[t])return Xc(e,t,[]);const r=Tk(e,[t])[t];return r?Xc(e,t,r):null}const Bk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ak=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Zc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(Bk);if(i===null||!i.length)return e;const n=[];let a=i.shift(),s=Ak.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?n.push(a):n.push(Math.ceil(o*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}function Mk(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("</"+t);if(n===-1||a===-1)break;const s=e.indexOf(">",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function Ek(e,t){return e?"<defs>"+e+"</defs>"+t:t}function $k(e,t,r){const i=Mk(e);return Ek(i.defs,t+i.content+r)}const Fk=e=>e==="unset"||e==="undefined"||e==="none";function Dk(e,t){const r={...ep,...e},i={...kk,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let C=m.rotate;x?b?C+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let v;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:v=n.height/2+n.top,y.unshift("rotate(90 "+v.toString()+" "+v.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:v=n.width/2+n.left,y.unshift("rotate(-90 "+v.toString()+" "+v.toString()+")");break}C%2===1&&(n.left!==n.top&&(v=n.left,n.left=n.top,n.top=v),n.width!==n.height&&(v=n.width,n.width=n.height,n.height=v)),y.length&&(a=$k(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const s=i.width,o=i.height,l=n.width,c=n.height;let h,u;s===null?(u=o===null?"1em":o==="auto"?c:o,h=Zc(u,l/c)):(h=s==="auto"?l:s,u=o===null?Zc(h,c/l):o==="auto"?c:o);const d={},f=(m,y)=>{Fk(y)||(d[m]=y.toString())};f("width",h),f("height",u);const g=[n.left,n.top,l,c];return d.viewBox=g.join(" "),{attributes:d,viewBox:g,body:a}}const Ok=/\sid="(\S+)"/g,Kc=new Map;function Rk(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Kc.get(e)||0;return Kc.set(e,t+1),t?`${e}${t}`:e}function Ik(e){const t=[];let r;for(;r=Ok.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const a=Rk(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function Pk(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}function ul(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var wr=ul();function rp(e){wr=e}var Di={exec:()=>null};function ft(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Ht.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var Nk=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Ht={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},zk=/^(?:[ \t]*(?:\n|$))+/,Wk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,qk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,nn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Hk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fl=/(?:[*+-]|\d{1,9}[.)])/,ip=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,np=ft(ip).replace(/bull/g,fl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),jk=ft(ip).replace(/bull/g,fl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),dl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yk=/^[^\n]+/,pl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Uk=ft(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",pl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gk=ft(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fl).getRegex(),za="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",gl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Vk=ft("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",gl).replace("tag",za).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ap=ft(dl).replace("hr",nn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex(),Xk=ft(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ap).getRegex(),ml={blockquote:Xk,code:Wk,def:Uk,fences:qk,heading:Hk,hr:nn,html:Vk,lheading:np,list:Gk,newline:zk,paragraph:ap,table:Di,text:Yk},Qc=ft("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",nn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex(),Zk={...ml,lheading:jk,table:Qc,paragraph:ft(dl).replace("hr",nn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Qc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",za).getRegex()},Kk={...ml,html:ft(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",gl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Di,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ft(dl).replace("hr",nn).replace("heading",` *#{1,6} *[^
|
|
114
|
+
]`).replace("lheading",np).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Qk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Jk=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sp=/^( {2,}|\\)\n(?!\s*$)/,tv=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Wa=/[\p{P}\p{S}]/u,yl=/[\s\p{P}\p{S}]/u,op=/[^\s\p{P}\p{S}]/u,ev=ft(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,yl).getRegex(),lp=/(?!~)[\p{P}\p{S}]/u,rv=/(?!~)[\s\p{P}\p{S}]/u,iv=/(?:[^\s\p{P}\p{S}]|~)/u,nv=ft(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Nk?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),cp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,av=ft(cp,"u").replace(/punct/g,Wa).getRegex(),sv=ft(cp,"u").replace(/punct/g,lp).getRegex(),hp="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ov=ft(hp,"gu").replace(/notPunctSpace/g,op).replace(/punctSpace/g,yl).replace(/punct/g,Wa).getRegex(),lv=ft(hp,"gu").replace(/notPunctSpace/g,iv).replace(/punctSpace/g,rv).replace(/punct/g,lp).getRegex(),cv=ft("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,op).replace(/punctSpace/g,yl).replace(/punct/g,Wa).getRegex(),hv=ft(/\\(punct)/,"gu").replace(/punct/g,Wa).getRegex(),uv=ft(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fv=ft(gl).replace("(?:-->|$)","-->").getRegex(),dv=ft("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",fv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),da=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,pv=ft(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",da).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),up=ft(/^!?\[(label)\]\[(ref)\]/).replace("label",da).replace("ref",pl).getRegex(),fp=ft(/^!?\[(ref)\](?:\[\])?/).replace("ref",pl).getRegex(),gv=ft("reflink|nolink(?!\\()","g").replace("reflink",up).replace("nolink",fp).getRegex(),Jc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,xl={_backpedal:Di,anyPunctuation:hv,autolink:uv,blockSkip:nv,br:sp,code:Jk,del:Di,emStrongLDelim:av,emStrongRDelimAst:ov,emStrongRDelimUnd:cv,escape:Qk,link:pv,nolink:fp,punctuation:ev,reflink:up,reflinkSearch:gv,tag:dv,text:tv,url:Di},mv={...xl,link:ft(/^!?\[(label)\]\((.*?)\)/).replace("label",da).getRegex(),reflink:ft(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",da).getRegex()},oo={...xl,emStrongRDelimAst:lv,emStrongLDelim:sv,url:ft(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Jc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ft(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Jc).getRegex()},yv={...oo,br:ft(sp).replace("{2,}","*").getRegex(),text:ft(oo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},wn={normal:ml,gfm:Zk,pedantic:Kk},gi={normal:xl,gfm:oo,breaks:yv,pedantic:mv},xv={"&":"&","<":"<",">":">",'"':""","'":"'"},th=e=>xv[e];function xe(e,t){if(t){if(Ht.escapeTest.test(e))return e.replace(Ht.escapeReplace,th)}else if(Ht.escapeTestNoEncode.test(e))return e.replace(Ht.escapeReplaceNoEncode,th);return e}function eh(e){try{e=encodeURI(e).replace(Ht.percentDecode,"%")}catch{return null}return e}function rh(e,t){let r=e.replace(Ht.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Ht.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(Ht.slashPipe,"|");return i}function mi(e,t,r){let i=e.length;if(i===0)return"";let n=0;for(;n<i&&e.charAt(i-n-1)===t;)n++;return e.slice(0,i-n)}function bv(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function ih(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function _v(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(`
|
|
115
|
+
`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=n.length?a.slice(n.length):a}).join(`
|
|
116
|
+
`)}var pa=class{options;rules;lexer;constructor(t){this.options=t||wr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:mi(i,`
|
|
117
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=_v(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=mi(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:mi(r[0],`
|
|
118
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=mi(r[0],`
|
|
119
|
+
`).split(`
|
|
120
|
+
`),n="",a="",s=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),o=!0;else if(!o)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
121
|
+
`),u=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
122
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
123
|
+
${h}`:h,a=a?`${a}
|
|
124
|
+
${u}`:u;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=d,i.length===0)break;let f=s.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let g=f,m=g.raw+`
|
|
125
|
+
`+i.join(`
|
|
126
|
+
`),y=this.blockquote(m);s[s.length-1]=y,n=n.substring(0,n.length-g.raw.length)+y.raw,a=a.substring(0,a.length-g.text.length)+y.text;break}else if(f?.type==="list"){let g=f,m=g.raw+`
|
|
127
|
+
`+i.join(`
|
|
128
|
+
`),y=this.list(m);s[s.length-1]=y,n=n.substring(0,n.length-f.raw.length)+y.raw,a=a.substring(0,a.length-g.raw.length)+y.raw,i=m.substring(s.at(-1).raw.length).split(`
|
|
129
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),n=i.length>1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let s=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,h="",u="";if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let d=r[2].split(`
|
|
130
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),f=t.split(`
|
|
131
|
+
`,1)[0],g=!d.trim(),m=0;if(this.options.pedantic?(m=2,u=d.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=d.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(f)&&(h+=f+`
|
|
132
|
+
`,t=t.substring(f.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),C=this.rules.other.hrRegex(m),v=this.rules.other.fencesBeginRegex(m),k=this.rules.other.headingBeginRegex(m),T=this.rules.other.htmlBeginRegex(m);for(;t;){let L=t.split(`
|
|
133
|
+
`,1)[0],D;if(f=L,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),D=f):D=f.replace(this.rules.other.tabCharGlobal," "),v.test(f)||k.test(f)||T.test(f)||b.test(f)||C.test(f))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
|
|
134
|
+
`+D.slice(m);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||v.test(d)||k.test(d)||C.test(d))break;u+=`
|
|
135
|
+
`+f}!g&&!f.trim()&&(g=!0),h+=L+`
|
|
136
|
+
`,t=t.substring(L.length+1),d=D.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let h=a.items[c].tokens.filter(d=>d.type==="space"),u=h.length>0&&h.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=u}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:n,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=rh(r[1]),n=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
137
|
+
`):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===n.length){for(let o of n)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<i.length;o++)s.header.push({text:i[o],tokens:this.lexer.inline(i[o]),header:!0,align:s.align[o]});for(let o of a)s.rows.push(rh(o,s.header.length).map((l,c)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
138
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let s=mi(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=bv(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),ih(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return ih(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,d=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},oe=class lo{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||wr,this.options.tokenizer=this.options.tokenizer||new pa,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ht,block:wn.normal,inline:gi.normal};this.options.pedantic?(r.block=wn.pedantic,r.inline=gi.pedantic):this.options.gfm&&(r.block=wn.gfm,this.options.breaks?r.inline=gi.breaks:r.inline=gi.gfm),this.tokenizer.rules=r}static get rules(){return{block:wn,inline:gi}}static lex(t,r){return new lo(r).lex(t)}static lexInline(t,r){return new lo(r).inlineTokens(t)}lex(t){t=t.replace(Ht.carriageReturn,`
|
|
139
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){for(this.options.pedantic&&(t=t.replace(Ht.tabCharGlobal," ").replace(Ht.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(s=>(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=`
|
|
140
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
141
|
+
`)?"":`
|
|
142
|
+
`)+n.raw,s.text+=`
|
|
143
|
+
`+n.text,this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
144
|
+
`)?"":`
|
|
145
|
+
`)+n.raw,s.text+=`
|
|
146
|
+
`+n.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(`
|
|
147
|
+
`)?"":`
|
|
148
|
+
`)+n.raw,s.text+=`
|
|
149
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(`
|
|
150
|
+
`)?"":`
|
|
151
|
+
`)+n.raw,s.text+=`
|
|
152
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=n[2]?n[2].length:0,i=i.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},ga=class{options;parser;constructor(t){this.options=t||wr}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(Ht.notSpaceStart)?.[0],a=t.replace(Ht.endingNewline,"")+`
|
|
153
|
+
`;return n?'<pre><code class="language-'+xe(n)+'">'+(i?a:xe(a,!0))+`</code></pre>
|
|
154
|
+
`:"<pre><code>"+(i?a:xe(a,!0))+`</code></pre>
|
|
155
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
156
|
+
${this.parser.parse(t)}</blockquote>
|
|
157
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
158
|
+
`}hr(t){return`<hr>
|
|
159
|
+
`}list(t){let r=t.ordered,i=t.start,n="";for(let o=0;o<t.items.length;o++){let l=t.items[o];n+=this.listitem(l)}let a=r?"ol":"ul",s=r&&i!==1?' start="'+i+'"':"";return"<"+a+s+`>
|
|
160
|
+
`+n+"</"+a+`>
|
|
161
|
+
`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+xe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
162
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
163
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let n="";for(let a=0;a<t.rows.length;a++){let s=t.rows[a];i="";for(let o=0;o<s.length;o++)i+=this.tablecell(s[o]);n+=this.tablerow({text:i})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
164
|
+
<thead>
|
|
165
|
+
`+r+`</thead>
|
|
166
|
+
`+n+`</table>
|
|
167
|
+
`}tablerow({text:t}){return`<tr>
|
|
168
|
+
${t}</tr>
|
|
169
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
170
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${xe(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),a=eh(t);if(a===null)return n;t=a;let s='<a href="'+t+'"';return r&&(s+=' title="'+xe(r)+'"'),s+=">"+n+"</a>",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=eh(t);if(a===null)return xe(i);t=a;let s=`<img src="${t}" alt="${i}"`;return r&&(s+=` title="${xe(r)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:xe(t.text)}},bl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},le=class co{options;renderer;textRenderer;constructor(t){this.options=t||wr,this.options.renderer=this.options.renderer||new ga,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new bl}static parse(t,r){return new co(r).parse(t)}static parseInline(t,r){return new co(r).parseInline(t)}parse(t,r=!0){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=a,l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(o.type)){i+=l||"";continue}}let s=a;switch(s.type){case"space":{i+=this.renderer.space(s);continue}case"hr":{i+=this.renderer.hr(s);continue}case"heading":{i+=this.renderer.heading(s);continue}case"code":{i+=this.renderer.code(s);continue}case"table":{i+=this.renderer.table(s);continue}case"blockquote":{i+=this.renderer.blockquote(s);continue}case"list":{i+=this.renderer.list(s);continue}case"html":{i+=this.renderer.html(s);continue}case"def":{i+=this.renderer.def(s);continue}case"paragraph":{i+=this.renderer.paragraph(s);continue}case"text":{let o=s,l=this.renderer.text(o);for(;n+1<t.length&&t[n+1].type==="text";)o=t[++n],l+=`
|
|
171
|
+
`+this.renderer.text(o);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}parseInline(t,r=this.renderer){let i="";for(let n=0;n<t.length;n++){let a=t[n];if(this.options.extensions?.renderers?.[a.type]){let o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){i+=o||"";continue}}let s=a;switch(s.type){case"escape":{i+=r.text(s);break}case"html":{i+=r.html(s);break}case"link":{i+=r.link(s);break}case"image":{i+=r.image(s);break}case"strong":{i+=r.strong(s);break}case"em":{i+=r.em(s);break}case"codespan":{i+=r.codespan(s);break}case"br":{i+=r.br(s);break}case"del":{i+=r.del(s);break}case"text":{i+=r.text(s);break}default:{let o='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return i}},Si=class{options;block;constructor(t){this.options=t||wr}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?oe.lex:oe.lexInline}provideParser(){return this.block?le.parse:le.parseInline}},Cv=class{defaults=ul();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=le;Renderer=ga;TextRenderer=bl;Lexer=oe;Tokenizer=pa;Hooks=Si;constructor(...t){this.use(...t)}walkTokens(t,r){let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let a=n;for(let s of a.header)i=i.concat(this.walkTokens(s.tokens,r));for(let s of a.rows)for(let o of s)i=i.concat(this.walkTokens(o.tokens,r));break}case"list":{let a=n;i=i.concat(this.walkTokens(a.items,r));break}default:{let a=n;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(s=>{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new ga(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new pa(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Si;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];Si.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async&&Si.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(a,h);return c.call(a,d)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,h);return d===!1&&(d=await c.apply(a,h)),d})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return oe.lex(t,r??this.defaults)}parser(t,r){return le.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?oe.lex:oe.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?le.parse:le.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?oe.lex:oe.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?le.parse:le.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
172
|
+
Please report this to https://github.com/markedjs/marked.`,t){let n="<p>An error occurred:</p><pre>"+xe(i.message+"",!0)+"</pre>";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},yr=new Cv;function pt(e,t){return yr.parse(e,t)}pt.options=pt.setOptions=function(e){return yr.setOptions(e),pt.defaults=yr.defaults,rp(pt.defaults),pt};pt.getDefaults=ul;pt.defaults=wr;pt.use=function(...e){return yr.use(...e),pt.defaults=yr.defaults,rp(pt.defaults),pt};pt.walkTokens=function(e,t){return yr.walkTokens(e,t)};pt.parseInline=yr.parseInline;pt.Parser=le;pt.parser=le.parse;pt.Renderer=ga;pt.TextRenderer=bl;pt.Lexer=oe;pt.lexer=oe.lex;pt.Tokenizer=pa;pt.Hooks=Si;pt.parse=pt;pt.options;pt.setOptions;pt.use;pt.walkTokens;pt.parseInline;le.parse;oe.lex;function dp(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(h){var u,d;return(d=(u=h.match(/[\t ]/g))===null||u===void 0?void 0:u.length)!==null&&d!==void 0?d:0})):o},[]);if(n.length){var a=new RegExp(`
|
|
173
|
+
[ ]{`+Math.min.apply(Math,n)+"}","g");i=i.map(function(o){return o.replace(a,`
|
|
174
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var s=i[0];return t.forEach(function(o,l){var c=s.match(/(?:^|\n)( *)$/),h=c?c[1]:"",u=o;typeof o=="string"&&o.includes(`
|
|
175
|
+
`)&&(u=String(o).split(`
|
|
176
|
+
`).map(function(d,f){return f===0?d:""+h+d}).join(`
|
|
177
|
+
`)),s+=u+i[l+1]}),s}var wv={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},ho=new Map,pp=new Map,kv=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(F.debug("Registering icon pack:",t.name),"loader"in t)pp.set(t.name,t.loader);else if("icons"in t)ho.set(t.name,t.icons);else throw F.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),gp=p(async(e,t)=>{const r=vk(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=ho.get(i);if(!n){const s=pp.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},ho.set(i,n)}catch(o){throw F.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Lk(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),vv=p(async e=>{try{return await gp(e),!0}catch{return!1}},"isIconAvailable"),an=p(async(e,t,r)=>{let i;try{i=await gp(e,t?.fallbackPrefix)}catch(s){F.error(s),i=wv}const n=Dk(i,t),a=Pk(Ik(n.body),{...n.attributes,...r});return de(a,Ot())},"getIconSVG");function mp(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
178
|
+
`).replace(/\n{2,}/g,`
|
|
179
|
+
`);return dp(i)}p(mp,"preprocessMarkdown");function yp(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}p(yp,"nonMarkdownToLines");function xp(e,t={}){const r=mp(e,t),i=pt.lexer(r),n=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
|
|
180
|
+
`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(d=>{d=d.replace(/'/g,"'"),d&&n[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return p(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}p(xp,"markdownToLines");function bp(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(bp,"nonMarkdownToHTML");function _p(e,{markdownAutoWrap:t}={}){const r=pt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"<br/>").replace(/ /g," "):n.text.replace(/\n */g,"<br/>"):n.type==="strong"?`<strong>${n.tokens?.map(i).join("")}</strong>`:n.type==="em"?`<em>${n.tokens?.map(i).join("")}</em>`:n.type==="paragraph"?`<p>${n.tokens?.map(i).join("")}</p>`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(F.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(_p,"markdownToHTML");function Cp(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Cp,"splitTextToChars");function wp(e,t){const r=Cp(t.content);return _l(e,[],r,t.type)}p(wp,"splitWordToFitWidth");function _l(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?_l(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(_l,"splitWordToFitWidthRecursion");function kp(e,t){if(e.some(({content:r})=>r.includes(`
|
|
181
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return ma(e,t)}p(kp,"splitLineToFitWidth");function ma(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return ma(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=wp(t,a);r.push([o]),l.content&&e.unshift(l)}return ma(e,t,r)}p(ma,"splitLineToFitWidthRecursion");function uo(e,t){t&&e.attr("style",t)}p(uo,"applyStyle");var nh=16384;async function vp(e,t,r,i,n=!1,a=Ot()){const s=e.append("foreignObject");s.attr("width",`${Math.min(10*r,nh)}px`),s.attr("height",`${Math.min(10*r,nh)}px`);const o=s.append("xhtml:div"),l=Oi(t.label)?await Zh(t.label.replace(Ki.lineBreakRegex,`
|
|
182
|
+
`),a):de(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),uo(h,t.labelStyle),h.attr("class",`${c} ${i}`),uo(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(o.style("max-width",r+"px"),o.style("text-align","center")),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}p(vp,"addHtmlSpan");function qa(e,t,r,i=!1){const n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}p(qa,"createTspan");function Sp(e,t,r){const i=e.append("text"),n=qa(i,1,t);Ha(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(Sp,"computeWidthOfText");function Sv(e,t,r){const i=e.append("text"),n=qa(i,1,t);Ha(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(Sv,"computeDimensionOfText");function Tp(e,t,r,i=!1,n=!1){const s=t.append("g"),o=s.insert("rect").attr("class","background").attr("style","stroke: none"),l=s.append("text").attr("y","-10.1");n&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=p(f=>Sp(s,1.1,f)<=e,"checkWidth"),d=u(h)?[h]:kp(h,u);for(const f of d){const g=qa(l,c,1.1,n);Ha(g,f),c++}}if(i){const h=l.node().getBBox(),u=2;return o.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),s.node()}else return l.node()}p(Tp,"createFormattedText");function Ha(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}p(Ha,"updateTextContentAndStyles");async function Lp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await vv(o)?await an(o,void 0,{class:"label-icon"}):`<i class='${de(n,t).replace(":"," ")}'></i>`})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Lp,"replaceIconSubstring");var Ne=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:s=!0,isNode:o=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(F.debug("XYZ createText",t,r,i,n,a,o,"addSvgBackground: ",c),a){const u=s?_p(t,h):bp(t),d=await Lp(ti(u),h),f=t.replace(/\\\\/g,"\\"),g={isNode:o,label:Oi(t)?f:d,labelStyle:r.replace("fill:","color:")};return await vp(e,g,l,n,c,h)}else{const u=t.replace(/<br\s*\/?>/g,"<br/>"),d=s?xp(u.replace("<br>","<br/>"),h):yp(u),f=Tp(l,e,d,t?c:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(f).attr("style",g)}else{const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(f).select("rect").attr("style",g.replace(/background:/g,"fill:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(f).select("text").attr("style",m)}return i?lt(f).selectAll("tspan.text-outer-tspan").classed("title-row",!0):lt(f).selectAll("tspan.text-outer-tspan").classed("row",!0),f}},"createText");function bs(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*s+n}}}function Tv(e,t){return e[0]===t[0]&&e[1]===t[1]}function Lv(e,t,r,i=1){const n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of s)bs(c,o,n);const l=(function(c,h,u){const d=[];for(const b of c){const C=[...b];Tv(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&d.push(C)}const f=[];h=Math.max(h,.1);const g=[];for(const b of d)for(let C=0;C<b.length-1;C++){const v=b[C],k=b[C+1];if(v[1]!==k[1]){const T=Math.min(v[1],k[1]);g.push({ymin:T,ymax:Math.max(v[1],k[1]),x:T===v[1]?v[0]:k[0],islope:(k[0]-v[0])/(k[1]-v[1])})}}if(g.sort(((b,C)=>b.ymin<C.ymin?-1:b.ymin>C.ymin?1:b.x<C.x?-1:b.x>C.x?1:b.ymax===C.ymax?0:(b.ymax-C.ymax)/Math.abs(b.ymax-C.ymax))),!g.length)return f;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let C=0;C<g.length&&!(g[C].ymin>y);C++)b=C;g.splice(0,b+1).forEach((C=>{m.push({s:y,edge:C})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,C)=>b.edge.x===C.edge.x?0:(b.edge.x-C.edge.x)/Math.abs(b.edge.x-C.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b<m.length;b+=2){const C=b+1;if(C>=m.length)break;const v=m[b].edge,k=m[C].edge;f.push([[Math.round(v.x),y],[Math.round(k.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return f})(s,a,i);if(n){for(const c of s)bs(c,o,-n);(function(c,h,u){const d=[];c.forEach((f=>d.push(...f))),bs(d,h,u)})(l,o,-n)}return l}function sn(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),Lv(e,n,i,a||1)}class Cl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=sn(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function ja(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class Bv extends Cl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=sn(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)ja([c,h])&&s.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class Av extends Cl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class Mv{constructor(t){this.helper=t}fillPolygons(t,r){const i=sn(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=n/4;for(const o of t){const l=ja(o),c=l/n,h=Math.ceil(c)-1,u=l-h*n,d=(o[0][0]+o[1][0])/2-n/4,f=Math.min(o[0][1],o[1][1]);for(let g=0;g<h;g++){const m=f+u+g*n,y=d-s+2*Math.random()*s,x=m-s+2*Math.random()*s,b=this.helper.ellipse(y,x,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Ev{constructor(t){this.helper=t}fillPolygons(t,r){const i=sn(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,n=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((s=>{const o=ja(s),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const d=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let f=0;f<l;f++){const g=f*(i+n),m=g+i,y=[h[0]+g*Math.cos(d)+c*Math.cos(d),h[1]+g*Math.sin(d)+c*Math.sin(d)],x=[h[0]+m*Math.cos(d)+c*Math.cos(d),h[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],r))}})),a}}class $v{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,n=r.zigzagOffset<0?i:r.zigzagOffset,a=sn(t,r=Object.assign({},r,{hachureGap:i+n}));return{type:"fillSketch",ops:this.zigzagLines(a,n,r)}}zigzagLines(t,r,i){const n=[];return t.forEach((a=>{const s=ja(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<o;u++){const d=2*u*r,f=2*(u+1)*r,g=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],y=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],x=[m[0]+g*Math.cos(h+Math.PI/4),m[1]+g*Math.sin(h+Math.PI/4)];n.push(...this.helper.doubleLineOps(m[0],m[1],x[0],x[1],i),...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],i))}})),n}}const Gt={};class Fv{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const Dv=0,_s=1,ah=2,kn={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Cs(e,t){return e.type===t}function wl(e){const t=[],r=(function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:Dv,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:_s,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:ah,text:""},o})(e);let i="BOD",n=0,a=r[n];for(;!Cs(a,ah);){let s=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return wl("M0,0"+e);n++,s=kn[a.text],i=a.text}else Cs(a,_s)?s=kn[i]:(n++,s=kn[a.text],i=a.text);if(!(n+s<r.length))throw new Error("Path data ended short");for(let l=n;l<n+s;l++){const c=r[l];if(!Cs(c,_s))throw new Error("Param not a number: "+i+","+c.text);o[o.length]=+c.text}if(typeof kn[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:o};t.push(l),n+=s,a=r[n],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Bp(e){let t=0,r=0,i=0,n=0;const a=[];for(const{key:s,data:o}of e)switch(s){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,n]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,n=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function Ap(e){const t=[];let r="",i=0,n=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,d=0;r==="C"||r==="S"?(u=i+(i-o),d=n+(n-l)):(u=i,d=n),t.push({key:"C",data:[u,d,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,d]=h;let f=0,g=0;r==="Q"||r==="T"?(f=i+(i-o),g=n+(n-l)):(f=i,g=n);const m=i+2*(f-i)/3,y=n+2*(g-n)/3,x=u+2*(f-u)/3,b=d+2*(g-d)/3;t.push({key:"C",data:[m,y,x,b,u,d]}),o=f,l=g,i=u,n=d;break}case"Q":{const[u,d,f,g]=h,m=i+2*(u-i)/3,y=n+2*(d-n)/3,x=f+2*(u-f)/3,b=g+2*(d-g)/3;t.push({key:"C",data:[m,y,x,b,f,g]}),o=u,l=d,i=f,n=g;break}case"A":{const u=Math.abs(h[0]),d=Math.abs(h[1]),f=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||d===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(Mp(i,n,y,x,u,d,f,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=c}return t}function yi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Mp(e,t,r,i,n,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let d=[],f=0,g=0,m=0,y=0;if(c)[f,g,m,y]=c;else{[e,t]=yi(e,t,-h),[r,i]=yi(r,i,-h);const R=(e-r)/2,A=(t-i)/2;let B=R*R/(n*n)+A*A/(a*a);B>1&&(B=Math.sqrt(B),n*=B,a*=B);const S=n*n,$=a*a,M=S*$-S*A*A-$*R*R,q=S*A*A+$*R*R,Y=(o===l?-1:1)*Math.sqrt(Math.abs(M/q));m=Y*n*A/a+(e+r)/2,y=Y*-a*R/n+(t+i)/2,f=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),e<m&&(f=Math.PI-f),r<m&&(g=Math.PI-g),f<0&&(f=2*Math.PI+f),g<0&&(g=2*Math.PI+g),l&&f>g&&(f-=2*Math.PI),!l&&g>f&&(g-=2*Math.PI)}let x=g-f;if(Math.abs(x)>120*Math.PI/180){const R=g,A=r,B=i;g=l&&g>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=Mp(r=m+n*Math.cos(g),i=y+a*Math.sin(g),A,B,n,a,s,0,l,[g,R,m,y])}x=g-f;const b=Math.cos(f),C=Math.sin(f),v=Math.cos(g),k=Math.sin(g),T=Math.tan(x/4),L=4/3*n*T,D=4/3*a*T,I=[e,t],O=[e+L*C,t-D*b],E=[r+L*k,i-D*v],N=[r,i];if(O[0]=2*I[0]-O[0],O[1]=2*I[1]-O[1],c)return[O,E,N].concat(d);{d=[O,E,N].concat(d);const R=[];for(let A=0;A<d.length;A+=3){const B=yi(d[A][0],d[A][1],h),S=yi(d[A+1][0],d[A+1][1],h),$=yi(d[A+2][0],d[A+2][1],h);R.push([B[0],B[1],S[0],S[1],$[0],$[1]])}return R}}const Ov={randOffset:function(e,t){return nt(e,t)},randOffsetWithRange:function(e,t,r){return ya(e,t,r)},ellipse:function(e,t,r,i,n){const a=$p(r,i,n);return fo(e,t,n,a).opset},doubleLineOps:function(e,t,r,i,n){return Xe(e,t,r,i,n,!0)}};function Ep(e,t,r,i,n){return{type:"path",ops:Xe(e,t,r,i,n)}}function In(e,t,r){const i=(e||[]).length;if(i>2){const n=[];for(let a=0;a<i-1;a++)n.push(...Xe(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&n.push(...Xe(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:n}}return i===2?Ep(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function Rv(e,t,r,i,n){return(function(a,s){return In(a,!0,s)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],n)}function sh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=vn(r[0],1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:vn(r[0],1.5*(1+.22*t.roughness),ch(t));for(let a=1;a<r.length;a++){const s=r[a];if(s.length){const o=vn(s,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:vn(s,1.5*(1+.22*t.roughness),ch(t));for(const c of o)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&n.push(c)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function $p(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/n;let s=Math.abs(e/2),o=Math.abs(t/2);const l=1-r.curveFitting;return s+=nt(s*l,r),o+=nt(o*l,r),{increment:a,rx:s,ry:o}}function fo(e,t,r,i){const[n,a]=hh(i.increment,e,t,i.rx,i.ry,1,i.increment*ya(.1,ya(.4,1,r),r),r);let s=xa(n,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=hh(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=xa(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function oh(e,t,r,i,n,a,s,o,l){const c=e,h=t;let u=Math.abs(r/2),d=Math.abs(i/2);u+=nt(.01*u,l),d+=nt(.01*d,l);let f=n,g=a;for(;f<0;)f+=2*Math.PI,g+=2*Math.PI;g-f>2*Math.PI&&(f=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-f)/2),x=uh(y,c,h,u,d,f,g,1,l);if(!l.disableMultiStroke){const b=uh(y,c,h,u,d,f,g,1.5,l);x.push(...b)}return s&&(o?x.push(...Xe(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l),...Xe(c,h,c+u*Math.cos(g),h+d*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(f),h+d*Math.sin(f)]})),{type:"path",ops:x}}function lh(e,t){const r=Ap(Bp(wl(e))),i=[];let n=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...Xe(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,d,f]=o;i.push(...Iv(l,c,h,u,d,f,a,t)),a=[d,f];break}case"Z":i.push(...Xe(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function ws(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+nt(n,t),i[0][1]+nt(n,t)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[i[s][0]+nt(n,t),i[s][1]+nt(n,t)]})}}return{type:"fillPath",ops:r}}function Ar(e,t){return(function(r,i){let n=r.fillStyle||"hachure";if(!Gt[n])switch(n){case"zigzag":Gt[n]||(Gt[n]=new Bv(i));break;case"cross-hatch":Gt[n]||(Gt[n]=new Av(i));break;case"dots":Gt[n]||(Gt[n]=new Mv(i));break;case"dashed":Gt[n]||(Gt[n]=new Ev(i));break;case"zigzag-line":Gt[n]||(Gt[n]=new $v(i));break;default:n="hachure",Gt[n]||(Gt[n]=new Cl(i))}return Gt[n]})(t,Ov).fillPolygons(e,t)}function ch(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Fp(e){return e.randomizer||(e.randomizer=new Fv(e.seed||0)),e.randomizer.next()}function ya(e,t,r,i=1){return r.roughness*i*(Fp(r)*(t-e)+e)}function nt(e,t,r=1){return ya(-e,e,t,r)}function Xe(e,t,r,i,n,a=!1){const s=a?n.disableMultiStrokeFill:n.disableMultiStroke,o=po(e,t,r,i,n,!0,!1);if(s)return o;const l=po(e,t,r,i,n,!0,!0);return o.concat(l)}function po(e,t,r,i,n,a,s){const o=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,d=.2+.2*Fp(n);let f=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;f=nt(f,n,c),g=nt(g,n,c);const m=[],y=()=>nt(u,n,c),x=()=>nt(h,n,c),b=n.preserveVertices;return s?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,n,c)),t+(b?0:nt(h,n,c))]}),s?m.push({op:"bcurveTo",data:[f+e+(r-e)*d+y(),g+t+(i-t)*d+y(),f+e+2*(r-e)*d+y(),g+t+2*(i-t)*d+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[f+e+(r-e)*d+x(),g+t+(i-t)*d+x(),f+e+2*(r-e)*d+x(),g+t+2*(i-t)*d+x(),r+(b?0:x()),i+(b?0:x())]}),m}function vn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]),i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]);for(let n=1;n<e.length;n++)i.push([e[n][0]+nt(t,r),e[n][1]+nt(t,r)]),n===e.length-1&&i.push([e[n][0]+nt(t,r),e[n][1]+nt(t,r)]);return xa(i,null,r)}function xa(e,t,r){const i=e.length,n=[];if(i>3){const a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const l=e[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*e[o+1][0]-s*e[o-1][0])/6,l[1]+(s*e[o+1][1]-s*e[o-1][1])/6],a[2]=[e[o+1][0]+(s*e[o][0]-s*e[o+2][0])/6,e[o+1][1]+(s*e[o][1]-s*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],n.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(n.push({op:"move",data:[e[1][0],e[1][1]]}),n.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&n.push(...po(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return n}function hh(e,t,r,i,n,a,s,o){const l=[],c=[];if(o.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+n*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+n*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+n*Math.sin(0)]),c.push([t+i*Math.cos(e),r+n*Math.sin(e)])}else{const h=nt(.5,o)-Math.PI/2;c.push([nt(a,o)+t+.9*i*Math.cos(h-e),nt(a,o)+r+.9*n*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let d=h;d<u;d+=e){const f=[nt(a,o)+t+i*Math.cos(d),nt(a,o)+r+n*Math.sin(d)];l.push(f),c.push(f)}c.push([nt(a,o)+t+i*Math.cos(h+2*Math.PI+.5*s),nt(a,o)+r+n*Math.sin(h+2*Math.PI+.5*s)]),c.push([nt(a,o)+t+.98*i*Math.cos(h+s),nt(a,o)+r+.98*n*Math.sin(h+s)]),c.push([nt(a,o)+t+.9*i*Math.cos(h+.5*s),nt(a,o)+r+.9*n*Math.sin(h+.5*s)])}return[c,l]}function uh(e,t,r,i,n,a,s,o,l){const c=a+nt(.1,l),h=[];h.push([nt(o,l)+t+.9*i*Math.cos(c-e),nt(o,l)+r+.9*n*Math.sin(c-e)]);for(let u=c;u<=s;u+=e)h.push([nt(o,l)+t+i*Math.cos(u),nt(o,l)+r+n*Math.sin(u)]);return h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),h.push([t+i*Math.cos(s),r+n*Math.sin(s)]),xa(h,null,l)}function Iv(e,t,r,i,n,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let h=[0,0];const u=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let f=0;f<u;f++)f===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(d?0:nt(c[0],o)),s[1]+(d?0:nt(c[0],o))]}),h=d?[n,a]:[n+nt(c[f],o),a+nt(c[f],o)],l.push({op:"bcurveTo",data:[e+nt(c[f],o),t+nt(c[f],o),r+nt(c[f],o),i+nt(c[f],o),h[0],h[1]]});return l}function xi(e){return[...e]}function fh(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(xi(e[0]),xi(e[1]),xi(e[2]),xi(e[2]));else{const n=[];n.push(e[0],e[0]);for(let o=1;o<e.length;o++)n.push(e[o]),o===e.length-1&&n.push(e[o]);const a=[],s=1-t;i.push(xi(n[0]));for(let o=1;o+2<n.length;o++){const l=n[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*n[o+1][0]-s*n[o-1][0])/6,l[1]+(s*n[o+1][1]-s*n[o-1][1])/6],a[2]=[n[o+1][0]+(s*n[o][0]-s*n[o+2][0])/6,n[o+1][1]+(s*n[o][1]-s*n[o+2][1])/6],a[3]=[n[o+1][0],n[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function Pn(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function Pv(e,t,r){const i=Pn(t,r);if(i===0)return Pn(e,t);let n=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),Pn(e,nr(t,r,n))}function nr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function go(e,t,r,i){const n=i||[];if((function(o,l){const c=o[l+0],h=o[l+1],u=o[l+2],d=o[l+3];let f=3*h[0]-2*c[0]-d[0];f*=f;let g=3*h[1]-2*c[1]-d[1];g*=g;let m=3*u[0]-2*d[0]-c[0];m*=m;let y=3*u[1]-2*d[1]-c[1];return y*=y,f<m&&(f=m),g<y&&(g=y),f+g})(e,t)<r){const o=e[t+0];n.length?(a=n[n.length-1],s=o,Math.sqrt(Pn(a,s))>1&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],d=nr(l,c,.5),f=nr(c,h,.5),g=nr(h,u,.5),m=nr(d,f,.5),y=nr(f,g,.5),x=nr(m,y,.5);go([l,d,m,x],0,r,n),go([x,y,g,u],0,r,n)}var a,s;return n}function Nv(e,t){return ba(e,0,e.length,t)}function ba(e,t,r,i,n){const a=n||[],s=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=Pv(e[h],s,o);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(ba(e,t,c+1,i,a),ba(e,c,r,i,a)):(a.length||a.push(s),a.push(o)),a}function ks(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a<n;a++)go(e,3*a,t,i);return r&&r>0?ba(i,0,i.length,r):i}const Kt="none";class _a{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const s=this._o(a);return this._d("line",[Ep(t,r,i,n,s)],s)}rectangle(t,r,i,n,a){const s=this._o(a),o=[],l=Rv(t,r,i,n,s);if(s.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];s.fillStyle==="solid"?o.push(ws([c],s)):o.push(Ar([c],s))}return s.stroke!==Kt&&o.push(l),this._d("rectangle",o,s)}ellipse(t,r,i,n,a){const s=this._o(a),o=[],l=$p(i,n,s),c=fo(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=fo(t,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(Ar([c.estimatedPoints],s));return s.stroke!==Kt&&o.push(c.opset),this._d("ellipse",o,s)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[In(t,!1,i)],i)}arc(t,r,i,n,a,s,o=!1,l){const c=this._o(l),h=[],u=oh(t,r,i,n,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=oh(t,r,i,n,a,s,!0,!1,d);f.type="fillPath",h.push(f)}else h.push((function(d,f,g,m,y,x,b){const C=d,v=f;let k=Math.abs(g/2),T=Math.abs(m/2);k+=nt(.01*k,b),T+=nt(.01*T,b);let L=y,D=x;for(;L<0;)L+=2*Math.PI,D+=2*Math.PI;D-L>2*Math.PI&&(L=0,D=2*Math.PI);const I=(D-L)/b.curveStepCount,O=[];for(let E=L;E<=D;E+=I)O.push([C+k*Math.cos(E),v+T*Math.sin(E)]);return O.push([C+k*Math.cos(D),v+T*Math.sin(D)]),O.push([C,v]),Ar([O],b)})(t,r,i,n,a,s,c));return c.stroke!==Kt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=sh(t,i);if(i.fill&&i.fill!==Kt)if(i.fillStyle==="solid"){const s=sh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...ks(fh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):s.push(...ks(fh(c),10,(1+i.roughness)/2))}s.length&&n.push(Ar([s],i))}return i.stroke!==Kt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=In(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(ws([t],i)):n.push(Ar([t],i))),i.stroke!==Kt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Kt,s=i.stroke!==Kt,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,d){const f=Ap(Bp(wl(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...ks(x,u)),x=[]},C=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:k,data:T}of f)switch(k){case"M":C(),y=[T[0],T[1]],m.push(y);break;case"L":b(),m.push([T[0],T[1]]);break;case"C":if(!x.length){const L=m.length?m[m.length-1]:y;x.push([L[0],L[1]])}x.push([T[0],T[1]]),x.push([T[2],T[3]]),x.push([T[4],T[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(C(),!d)return g;const v=[];for(const k of g){const T=Nv(k,d);T.length&&v.push(T)}return v})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=lh(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=lh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(ws(l,i));else n.push(Ar(l,i));return s&&(o?l.forEach((h=>{n.push(In(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Kt};break;case"fillPath":s={d:this.opsToPath(a),stroke:Kt,strokeWidth:0,fill:i.fill||Kt};break;case"fillSketch":s=this.fillSketch(a,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Kt,strokeWidth:i,fill:Kt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class zv{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,a,o),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const s=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s),s}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s),s}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s),s}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Sn="http://www.w3.org/2000/svg";class Wv{constructor(t,r){this.svg=t,this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(Sn,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(Sn,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(Sn,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(Sn,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s)}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s)}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var j={canvas:(e,t)=>new zv(e,t),svg:(e,t)=>new Wv(e,t),generator:e=>new _a(e),newSeed:()=>_a.newSeed()},it=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||Ke(dt()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",It(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Ne(s,de(ti(o),dt()),{useHtmlLabels:n,width:t.width||dt().flowchart?.wrappingWidth,cssClasses:c?"markdown-node-label":void 0,style:t.labelStyle,addSvgBackground:l,markdown:c},dt());let u=h.getBBox();const d=(t?.padding??0)/2;if(n){const f=h.children[0],g=lt(h);await Jd(f,o),u=f.getBoundingClientRect(),g.attr("width",u.width),g.attr("height",u.height)}return n?s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):s.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:u,halfPadding:d,label:s}},"labelHelper"),vs=p(async(e,t,r)=>{const i=r.useHtmlLabels??Pt(dt()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ne(n,de(ti(t),dt()),{useHtmlLabels:i,width:r.width||dt()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(Pt(dt())){const l=a.children[0],c=lt(a);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),X=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function ht(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(ht,"createPathFromPoints");function Ze(e,t,r,i,n,a){const s=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,d=t+c/2;for(let f=0;f<=50;f++){const g=f/50,m=e+g*l,y=d+n*Math.sin(u*(m-e));s.push({x:m,y})}return s}p(Ze,"generateFullSineWavePoints");function Ui(e,t,r,i,n,a){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(Ui,"generateCirclePoints");var qv=p((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,c;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,c=o):(n<0&&(s=-s),l=s,c=n===0?0:s*a/n),{x:r+l,y:i+c}},"intersectRect"),ri=qv,Hv=p(async(e,t,r,i=!1,n=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const s=dt(),o=Pt(s);return await Ne(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},s)},"createLabel"),je=Hv,Je=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),Dp=p(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=G(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=Pt(r),f=u.insert("g").attr("class","cluster-label ");let g;t.labelType==="markdown"?g=await Ne(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):g=await je(f,t.label,t.labelStyle||"",!1,!0);let m=g.getBBox();if(Pt(r)){const L=g.children[0],D=lt(g);m=L.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const L=j.svg(u),D=U(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),I=L.path(Je(b,C,y,x,0),D);v=u.insert(()=>(F.debug("Rough node insert CXC",I),I),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:k}=hl(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+k})`),o){const L=f.select("span");L&&L.attr("style",o)}const T=v.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=m.height-t.padding/2,t.intersect=function(L){return ri(t,L)},{cluster:u,labelBBox:m}},"rect"),jv=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return ri(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Yv=p(async(e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=await je(u,t.label,t.labelStyle,void 0,!0);let g=f.getBBox();if(Pt(r)){const I=f.children[0],O=lt(f);g=I.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,C=t.height+m-g.height-6,v=t.x-x/2,k=t.y-b/2;t.width=x;const T=t.y-t.height/2-y+g.height+2;let L;if(t.look==="handDrawn"){const I=t.cssClasses.includes("statediagram-cluster-alt"),O=j.svg(c),E=t.rx||t.ry?O.path(Je(v,k,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):O.rectangle(v,k,x,b,{seed:n});L=c.insert(()=>E,":first-child");const N=O.rectangle(v,T,x,C,{fill:I?a:s,fillStyle:I?"hachure":"solid",stroke:l,seed:n});L=c.insert(()=>E,":first-child"),d=c.insert(()=>N)}else L=h.insert("rect",":first-child"),L.attr("class","outer").attr("x",v).attr("y",k).attr("width",x).attr("height",b).attr("data-look",t.look),d.attr("class","inner").attr("x",v).attr("y",T).attr("width",x).attr("height",C);u.attr("transform",`translate(${t.x-g.width/2}, ${k+1-(Pt(r)?0:3)})`);const D=L.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(I){return ri(t,I)},{cluster:c,labelBBox:g}},"roundedWithTitle"),Uv=p(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=dt(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=G(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),d=Pt(r),f=u.insert("g").attr("class","cluster-label "),g=await Ne(f,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let m=g.getBBox();if(Pt(r)){const L=g.children[0],D=lt(g);m=L.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,C=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let v;if(t.look==="handDrawn"){const L=j.svg(u),D=U(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),I=L.path(Je(b,C,y,x,t.rx),D);v=u.insert(()=>(F.debug("Rough node insert CXC",I),I),":first-child"),v.select("path:nth-child(2)").attr("style",c.join(";")),v.select("path").attr("style",h.join(";").replace("fill","stroke"))}else v=u.insert("rect",":first-child"),v.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",C).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:k}=hl(r);if(f.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+k})`),o){const L=f.select("span");L&&L.attr("style",o)}const T=v.node().getBBox();return t.offsetX=0,t.width=T.width,t.height=T.height,t.offsetY=m.height-t.padding/2,t.intersect=function(L){return ri(t,L)},{cluster:u,labelBBox:m}},"kanbanSection"),Gv=p((e,t)=>{const r=dt(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,d=t.y-h/2;t.width=c;let f;if(t.look==="handDrawn"){const y=j.svg(s).rectangle(u,d,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});f=s.insert(()=>y,":first-child")}else f=o.insert("rect",":first-child"),f.attr("class","divider").attr("x",u).attr("y",d).attr("width",c).attr("height",h).attr("data-look",t.look);const g=f.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return ri(t,m)},{cluster:s,labelBBox:{}}},"divider"),Vv=Dp,Xv={rect:Dp,squareRect:Vv,roundedWithTitle:Yv,noteGroup:jv,divider:Gv,kanbanSection:Uv},Op=new Map,Zv=p(async(e,t)=>{const r=t.shape||"rect",i=await Xv[r](e,t);return Op.set(t.id,i),i},"insertCluster"),OA=p(()=>{Op=new Map},"clear");function Rp(e,t){return e.intersect(t)}p(Rp,"intersectNode");var Kv=Rp;function Ip(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),c=Math.abs(t*r*s/l);i.x<n&&(c=-c);var h=Math.abs(t*r*o/l);return i.y<a&&(h=-h),{x:n+c,y:a+h}}p(Ip,"intersectEllipse");var Pp=Ip;function Np(e,t,r){return Pp(e,t,t,r)}p(Np,"intersectCircle");var Qv=Np;function zp(e,t,r,i){{const n=t.y-e.y,a=e.x-t.x,s=t.x*e.y-e.x*t.y,o=n*r.x+a*r.y+s,l=n*i.x+a*i.y+s,c=1e-6;if(o!==0&&l!==0&&mo(o,l))return;const h=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=h*e.x+u*e.y+d,g=h*t.x+u*t.y+d;if(Math.abs(f)<c&&Math.abs(g)<c&&mo(f,g))return;const m=n*u-h*a;if(m===0)return;const y=Math.abs(m/2);let x=a*d-u*s;const b=x<0?(x-y)/m:(x+y)/m;x=h*s-n*d;const C=x<0?(x-y)/m:(x+y)/m;return{x:b,y:C}}}p(zp,"intersectLine");function mo(e,t){return e*t>0}p(mo,"sameSign");var Jv=zp;function Wp(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=i-e.width/2-s,c=n-e.height/2-o;for(let h=0;h<t.length;h++){let u=t[h],d=t[h<t.length-1?h+1:0],f=Jv(e,r,{x:l+u.x,y:c+u.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(h,u){let d=h.x-r.x,f=h.y-r.y,g=Math.sqrt(d*d+f*f),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return g<x?-1:g===x?0:1}),a[0]):e}p(Wp,"intersectPolygon");var tS=Wp,W={node:Kv,circle:Qv,ellipse:Pp,polygon:tS,rect:ri};function qp(e,t){const{labelStyles:r}=G(t);t.labelStyle=r;const i=rt(t);let n=i;i||(n="anchor");const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=1,{cssStyles:o}=t,l=j.svg(a),c=U(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,s*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",It(o)),X(t,u),t.intersect=function(d){return F.info("Circle intersect",t,s,d),W.circle(t,s,d)},a}p(qp,"anchor");function yo(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,d=(i-t)/2,f=u/n,g=d/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),C=Math.atan2((t-b)/a,(e-x)/n);let k=Math.atan2((i-b)/a,(r-x)/n)-C;s&&k<0&&(k+=2*Math.PI),!s&&k>0&&(k-=2*Math.PI);const T=[];for(let L=0;L<20;L++){const D=L/19,I=C+D*k,O=x+n*Math.cos(I),E=b+a*Math.sin(I);T.push({x:O,y:E})}return T}p(yo,"generateArcPoints");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=t,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...yo(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...yo(s/2,o/2,s/2,-o/2,c,l,!0)],d=j.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ht(u),m=d.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),X(t,y),t.intersect=function(x){return W.polygon(t,u,x)},n}p(Hp,"bowTieRect");function ze(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(ze,"insertPolygonShape");async function jp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+t.padding,o=12,l=a.width+t.padding+o,c=0,h=l,u=-s,d=0,f=[{x:c+o,y:u},{x:h,y:u},{x:h,y:d},{x:c,y:d},{x:c,y:u+o},{x:c+o,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=j.svg(n),x=U(t,{}),b=ht(f),C=y.path(b,x);g=n.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=ze(n,l,s,f);return i&&g.attr("style",i),X(t,g),t.intersect=function(y){return W.polygon(t,f,y)},n}p(jp,"card");function Yp(e,t){const{nodeStyles:r}=G(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=j.svg(i),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=ht(s),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(d){return W.polygon(t,s,d)},i}p(Yp,"choice");async function kl(e,t,r){const{labelStyles:i,nodeStyles:n}=G(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:o}=await it(e,t,rt(t)),l=r?.padding??o,c=s.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=j.svg(a),f=U(t,{}),g=d.circle(0,0,c*2,f);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",It(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return X(t,h),t.calcIntersect=function(d,f){const g=d.width/2;return W.circle(d,g,f)},t.intersect=function(d){return F.info("Circle intersect",t,c,d),W.circle(t,c,d)},a}p(kl,"circle");function Up(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
|
|
183
|
+
M ${n.x},${n.y} L ${s.x},${s.y}`}p(Up,"createLine");function Gp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=j.svg(n),l=U(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=Up(a),u=o.path(h,l),d=n.insert(()=>c,":first-child");return d.insert(()=>u),s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",i),X(t,d),t.intersect=function(f){return F.info("crossedCircle intersect",t,{radius:a,point:f}),W.circle(t,a,f)},n}p(Gp,"crossedCircle");function Ee(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(Ee,"generateCirclePoints");async function Vp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Ee(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Ee(o/2+c*2,-c,c,20,-180,-270),...Ee(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Ee(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Ee(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Ee(o/2+o*.1,-c,c,20,-180,-270),...Ee(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Ee(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],f=j.svg(n),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ht(u).replace("Z",""),x=f.path(y,g),b=ht(d),C=f.path(b,{...g}),v=n.insert("g",":first-child");return v.insert(()=>C,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,v),t.intersect=function(k){return W.polygon(t,d,k)},n}p(Vp,"curlyBraceLeft");function $e(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:f,y:g})}return s}p($e,"generateCirclePoints");async function Xp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...$e(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...$e(o/2+c*2,-c,c,20,-180,-270),...$e(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...$e(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...$e(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...$e(o/2+c*2,-c,c,20,-180,-270),...$e(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...$e(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],f=j.svg(n),g=U(t,{fill:"none"});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const y=ht(u).replace("Z",""),x=f.path(y,g),b=ht(d),C=f.path(b,{...g}),v=n.insert("g",":first-child");return v.insert(()=>C,":first-child").attr("stroke-opacity",0),v.insert(()=>x,":first-child"),v.attr("class","text"),h&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,v),t.intersect=function(k){return W.polygon(t,d,k)},n}p(Xp,"curlyBraceRight");function Mt(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u<i;u++){const d=o+u*h,f=e+r*Math.cos(d),g=t+r*Math.sin(d);s.push({x:-f,y:-g})}return s}p(Mt,"generateCirclePoints");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),c=Math.max(5,l*.1),{cssStyles:h}=t,u=[...Mt(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Mt(o/2+c*2,-c,c,20,-180,-270),...Mt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Mt(o/2,l/2,c,20,0,90)],d=[...Mt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Mt(-o/2-c/2,-c,c,20,0,90),...Mt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Mt(-o/2+c+c/2,l/2,c,30,-180,-270)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Mt(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Mt(o/2+c*2,-c,c,20,-180,-270),...Mt(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Mt(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...Mt(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Mt(-o/2-c/2,-c,c,20,0,90),...Mt(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Mt(-o/2+c+c/2,l/2,c,30,-180,-270)],g=j.svg(n),m=U(t,{fill:"none"});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const x=ht(u).replace("Z",""),b=g.path(x,m),v=ht(d).replace("Z",""),k=g.path(v,m),T=ht(f),L=g.path(T,{...m}),D=n.insert("g",":first-child");return D.insert(()=>L,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>k,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,D),t.intersect=function(I){return W.polygon(t,f,I)},n}p(Zp,"curlyBraces");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=80,o=20,l=Math.max(s,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=j.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Ui(-y,-m/2,h,50,270,90)],C=ht(b),v=d.path(C,f),k=n.insert(()=>v,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-l/2}, ${-c/2})`),X(t,k),t.intersect=function(T){return W.polygon(t,b,T)},n}p(Kp,"curvedTrapezoid");var eS=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),rS=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),iS=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+t.padding,t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=j.svg(n),g=rS(0,0,o,h,l,c),m=iS(0,c,o,h,l,c),y=f.path(g,U(t,{})),x=f.path(m,U(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),d&&u.attr("style",d)}else{const f=eS(0,0,o,h,l,c);u=n.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",It(d)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),X(t,u),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(f){const g=W.rect(t,f),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,f.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(Qp,"cylinder");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:d}=t,f=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=f.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return W.rect(t,b)},n}p(Jp,"dividedRectangle");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s}=await it(e,t,rt(t)),l=a.width/2+s+5,c=a.width/2+s;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const d=j.svg(n),f=U(t,{roughness:.2,strokeWidth:2.5}),g=U(t,{roughness:.2,strokeWidth:1.5}),m=d.circle(0,0,l*2,f),y=d.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",It(t.cssClasses)).attr("style",It(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const d=h.insert("circle",":first-child"),f=h.insert("circle");h.attr("class","basic label-container").attr("style",i),d.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),f.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return X(t,h),t.intersect=function(d){return F.info("DoubleCircle intersect",t,l,d),W.circle(t,l,d)},n}p(tg,"doublecircle");function eg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=G(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=j.svg(a),{nodeBorder:c}=r,h=U(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),d=a.insert(()=>u,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",n),X(t,d),t.intersect=function(f){return F.info("filledCircle intersect",t,{radius:s,point:f}),W.circle(t,s,f)},a}p(eg,"filledCircle");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,d=j.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=ht(h),m=d.path(g,f),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=o,t.height=l,X(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return F.info("Triangle intersect",t,h,x),W.polygon(t,h,x)},n}p(rg,"flippedTriangle");function ig(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=G(t);t.label="";const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,d=j.svg(s),f=U(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=d.rectangle(h,u,l,c,f),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),X(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return W.rect(t,x)},s}p(ig,"forkJoin");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:s,bbox:o}=await it(e,t,rt(t)),l=Math.max(n,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,o.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,d=j.svg(s),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Ui(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=ht(g),y=d.path(m,f),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),X(t,x),t.intersect=function(b){return F.info("Pill intersect",t,{radius:h,point:b}),W.polygon(t,g,b)},s}p(ng,"halfRoundedRectangle");var nS=p((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function ag(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=4,o=a.height+t.padding,l=o/s,c=a.width+2*l+t.padding,h=[{x:l,y:0},{x:c-l,y:0},{x:c,y:-o/2},{x:c-l,y:-o},{x:l,y:-o},{x:0,y:-o/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=j.svg(n),g=U(t,{}),m=nS(0,0,c,o,l),y=f.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${o/2})`),d&&u.attr("style",d)}else u=ze(n,c,o,h);return i&&u.attr("style",i),t.width=c,t.height=o,X(t,u),t.intersect=function(f){return W.polygon(t,h,f)},n}p(ag,"hexagon");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await it(e,t,rt(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=j.svg(n),c=U(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=ht(h),d=l.path(u,c),f=n.insert(()=>d,":first-child");return f.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&f.selectChildren("path").attr("style",i),f.attr("transform",`translate(${-a/2}, ${-s/2})`),X(t,f),t.intersect=function(g){return F.info("Pill intersect",t,{points:h}),W.polygon(t,h,g)},n}p(sg,"hourglass");async function og(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=G(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=t.pos==="t",f=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=ei(t),x=-g/2,b=-f/2,C=t.label?8:0,v=j.svg(c),k=U(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const T=v.rectangle(x,b,g,f,k),L=Math.max(g,h.width),D=f+h.height+C,I=v.rectangle(-L/2,-D/2,L,D,{...k,fill:"transparent",stroke:"none"}),O=c.insert(()=>T,":first-child"),E=c.insert(()=>I);if(t.icon){const N=c.append("g");N.html(`<g>${await an(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const R=N.node().getBBox(),A=R.width,B=R.height,S=R.x,$=R.y;N.attr("transform",`translate(${-A/2-S},${d?h.height/2+C/2-B/2-$:-h.height/2-C/2-B/2-$})`),N.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-D/2:D/2-h.height})`),O.attr("transform",`translate(0,${d?h.height/2+C/2:-h.height/2-C/2})`),X(t,E),t.intersect=function(N){if(F.info("iconSquare intersect",t,N),!t.label)return W.rect(t,N);const R=t.x??0,A=t.y??0,B=t.height??0;let S=[];return d?S=[{x:R-h.width/2,y:A-B/2},{x:R+h.width/2,y:A-B/2},{x:R+h.width/2,y:A-B/2+h.height+C},{x:R+g/2,y:A-B/2+h.height+C},{x:R+g/2,y:A+B/2},{x:R-g/2,y:A+B/2},{x:R-g/2,y:A-B/2+h.height+C},{x:R-h.width/2,y:A-B/2+h.height+C}]:S=[{x:R-g/2,y:A-B/2},{x:R+g/2,y:A-B/2},{x:R+g/2,y:A-B/2+f},{x:R+h.width/2,y:A-B/2+f},{x:R+h.width/2/2,y:A+B/2},{x:R-h.width/2,y:A+B/2},{x:R-h.width/2,y:A-B/2+f},{x:R-g/2,y:A-B/2+f}],W.polygon(t,S,N)},c}p(og,"icon");async function lg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=G(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),d=20,f=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=ei(t),b=j.svg(c),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=x.get("fill");C.stroke=v??y;const k=c.append("g");t.icon&&k.html(`<g>${await an(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const T=k.node().getBBox(),L=T.width,D=T.height,I=T.x,O=T.y,E=Math.max(L,D)*Math.SQRT2+d*2,N=b.circle(0,0,E,C),R=Math.max(E,h.width),A=E+h.height+f,B=b.rectangle(-R/2,-A/2,R,A,{...C,fill:"transparent",stroke:"none"}),S=c.insert(()=>N,":first-child"),$=c.insert(()=>B);return k.attr("transform",`translate(${-L/2-I},${g?h.height/2+f/2-D/2-O:-h.height/2-f/2-D/2-O})`),k.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-A/2:A/2-h.height})`),S.attr("transform",`translate(0,${g?h.height/2+f/2:-h.height/2-f/2})`),X(t,$),t.intersect=function(M){return F.info("iconSquare intersect",t,M),W.rect(t,M)},c}p(lg,"iconCircle");async function cg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=G(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=ei(t),C=-m/2,v=-g/2,k=t.label?8:0,T=j.svg(c),L=U(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const D=b.get("fill");L.stroke=D??x;const I=T.path(Je(C,v,m,g,5),L),O=Math.max(m,h.width),E=g+h.height+k,N=T.rectangle(-O/2,-E/2,O,E,{...L,fill:"transparent",stroke:"none"}),R=c.insert(()=>I,":first-child").attr("class","icon-shape2"),A=c.insert(()=>N);if(t.icon){const B=c.append("g");B.html(`<g>${await an(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const S=B.node().getBBox(),$=S.width,M=S.height,q=S.x,Y=S.y;B.attr("transform",`translate(${-$/2-q},${f?h.height/2+k/2-M/2-Y:-h.height/2-k/2-M/2-Y})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-E/2:E/2-h.height})`),R.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),X(t,A),t.intersect=function(B){if(F.info("iconSquare intersect",t,B),!t.label)return W.rect(t,B);const S=t.x??0,$=t.y??0,M=t.height??0;let q=[];return f?q=[{x:S-h.width/2,y:$-M/2},{x:S+h.width/2,y:$-M/2},{x:S+h.width/2,y:$-M/2+h.height+k},{x:S+m/2,y:$-M/2+h.height+k},{x:S+m/2,y:$+M/2},{x:S-m/2,y:$+M/2},{x:S-m/2,y:$-M/2+h.height+k},{x:S-h.width/2,y:$-M/2+h.height+k}]:q=[{x:S-m/2,y:$-M/2},{x:S+m/2,y:$-M/2},{x:S+m/2,y:$-M/2+g},{x:S+h.width/2,y:$-M/2+g},{x:S+h.width/2/2,y:$+M/2},{x:S-h.width/2,y:$+M/2},{x:S-h.width/2,y:$-M/2+g},{x:S-m/2,y:$-M/2+g}],W.polygon(t,q,B)},c}p(cg,"iconRounded");async function hg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=G(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:d}=await it(e,t,"icon-shape default"),f=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=ei(t),C=-m/2,v=-g/2,k=t.label?8:0,T=j.svg(c),L=U(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const D=b.get("fill");L.stroke=D??x;const I=T.path(Je(C,v,m,g,.1),L),O=Math.max(m,h.width),E=g+h.height+k,N=T.rectangle(-O/2,-E/2,O,E,{...L,fill:"transparent",stroke:"none"}),R=c.insert(()=>I,":first-child"),A=c.insert(()=>N);if(t.icon){const B=c.append("g");B.html(`<g>${await an(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const S=B.node().getBBox(),$=S.width,M=S.height,q=S.x,Y=S.y;B.attr("transform",`translate(${-$/2-q},${f?h.height/2+k/2-M/2-Y:-h.height/2-k/2-M/2-Y})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-E/2:E/2-h.height})`),R.attr("transform",`translate(0,${f?h.height/2+k/2:-h.height/2-k/2})`),X(t,A),t.intersect=function(B){if(F.info("iconSquare intersect",t,B),!t.label)return W.rect(t,B);const S=t.x??0,$=t.y??0,M=t.height??0;let q=[];return f?q=[{x:S-h.width/2,y:$-M/2},{x:S+h.width/2,y:$-M/2},{x:S+h.width/2,y:$-M/2+h.height+k},{x:S+m/2,y:$-M/2+h.height+k},{x:S+m/2,y:$+M/2},{x:S-m/2,y:$+M/2},{x:S-m/2,y:$-M/2+h.height+k},{x:S-h.width/2,y:$-M/2+h.height+k}]:q=[{x:S-m/2,y:$-M/2},{x:S+m/2,y:$-M/2},{x:S+m/2,y:$-M/2+g},{x:S+h.width/2,y:$-M/2+g},{x:S+h.width/2/2,y:$+M/2},{x:S-h.width/2,y:$+M/2},{x:S-h.width/2,y:$-M/2+g},{x:S-m/2,y:$-M/2+g}],W.polygon(t,q,B)},c}p(hg,"iconSquare");async function ug(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:s}=G(t);t.labelStyle=s;const o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?o??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,o??0);const{shapeSvg:u,bbox:d,label:f}=await it(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=j.svg(u),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=b.rectangle(m,y,c,h,C),k=Math.max(c,d.width),T=h+d.height+x,L=b.rectangle(-k/2,-T/2,k,T,{...C,fill:"none",stroke:"none"}),D=u.insert(()=>v,":first-child"),I=u.insert(()=>L);if(t.img){const O=u.append("image");O.attr("href",t.img),O.attr("width",c),O.attr("height",h),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${g?T/2-h:-T/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-h/2-d.height/2-x/2:h/2-d.height/2+x/2})`),D.attr("transform",`translate(0,${g?d.height/2+x/2:-d.height/2-x/2})`),X(t,I),t.intersect=function(O){if(F.info("iconSquare intersect",t,O),!t.label)return W.rect(t,O);const E=t.x??0,N=t.y??0,R=t.height??0;let A=[];return g?A=[{x:E-d.width/2,y:N-R/2},{x:E+d.width/2,y:N-R/2},{x:E+d.width/2,y:N-R/2+d.height+x},{x:E+c/2,y:N-R/2+d.height+x},{x:E+c/2,y:N+R/2},{x:E-c/2,y:N+R/2},{x:E-c/2,y:N-R/2+d.height+x},{x:E-d.width/2,y:N-R/2+d.height+x}]:A=[{x:E-c/2,y:N-R/2},{x:E+c/2,y:N-R/2},{x:E+c/2,y:N-R/2+h},{x:E+d.width/2,y:N-R/2+h},{x:E+d.width/2/2,y:N+R/2},{x:E-d.width/2,y:N+R/2},{x:E-d.width/2,y:N-R/2+h},{x:E-c/2,y:N-R/2+h}],W.polygon(t,A,O)},u}p(ug,"imageSquare");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),d=U(t,{}),f=ht(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=ze(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,X(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(fg,"inv_trapezoid");async function on(e,t,r){const{labelStyles:i,nodeStyles:n}=G(t);t.labelStyle=i;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),c=-o/2,h=-l/2;let u,{rx:d,ry:f}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(d=r.rx,f=r.ry),t.look==="handDrawn"){const m=j.svg(a),y=U(t,{}),x=d||f?m.path(Je(c,h,o,l,d||0),y):m.rectangle(c,h,o,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",It(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",It(d)).attr("ry",It(f)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return X(t,u),t.calcIntersect=function(m,y){return W.rect(m,y)},t.intersect=function(m){return W.rect(t,m)},a}p(on,"drawRect");async function dg(e,t){const{shapeSvg:r,bbox:i,label:n}=await it(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),X(t,a),t.intersect=function(l){return W.rect(t,l)},r}p(dg,"labelRect");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),d=U(t,{}),f=ht(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=ze(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,X(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(pg,"lean_left");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),d=U(t,{}),f=ht(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=ze(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,X(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(gg,"lean_right");function mg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=j.svg(n),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=ht(c),f=h.path(d,u),g=n.insert(()=>f,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),X(t,g),t.intersect=function(m){return F.info("lightningBolt intersect",t,m),W.polygon(t,c,m)},n}p(mg,"lightningBolt");var aS=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),sS=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),oS=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let d;const{cssStyles:f}=t;if(t.look==="handDrawn"){const g=j.svg(n),m=sS(0,0,o,h,l,c,u),y=oS(0,c,o,h,l,c),x=U(t,{}),b=g.path(m,x),C=g.path(y,x);n.insert(()=>C,":first-child").attr("class","line"),d=n.insert(()=>b,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else{const g=aS(0,0,o,h,l,c,u);d=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",It(f)).attr("style",i)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),X(t,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=W.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(yg,"linedCylinder");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,d=j.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Ze(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=d.polygon(g.map(x=>[x.x,x.y]),f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),X(t,y),t.intersect=function(x){return W.polygon(t,g,x)},n}p(xg,"linedWaveEdgedRect");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:d}=t,f=j.svg(n),g=U(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ht(m),b=f.path(x,g),C=ht(y),v=f.path(C,{...g,fill:"none"}),k=n.insert(()=>v,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),X(t,k),t.intersect=function(T){return W.polygon(t,m,T)},n}p(bg,"multiRect");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,f=5,{cssStyles:g}=t,m=Ze(u-f,d+h+f,u+o-f,d+h+f,c,.8),y=m?.[m.length-1],x=[{x:u-f,y:d+f},{x:u-f,y:d+h+f},...m,{x:u+o-f,y:y.y-f},{x:u+o,y:y.y-f},{x:u+o,y:y.y-2*f},{x:u+o+f,y:y.y-2*f},{x:u+o+f,y:d-f},{x:u+f,y:d-f},{x:u+f,y:d},{x:u,y:d},{x:u,y:d+f}],b=[{x:u,y:d+f},{x:u+o-f,y:d+f},{x:u+o-f,y:y.y-f},{x:u+o,y:y.y-f},{x:u+o,y:d},{x:u,y:d}],C=j.svg(n),v=U(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const k=ht(x),T=C.path(k,v),L=ht(b),D=C.path(L,v),I=n.insert(()=>T,":first-child");return I.insert(()=>D),I.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)+f-c/2-(a.y-(a.top??0))})`),X(t,I),t.intersect=function(O){return W.polygon(t,x,O)},n}p(_g,"multiWaveEdgedRectangle");async function Cg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=G(t);t.labelStyle=i,t.useHtmlLabels||Pt(Ot())||(t.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await it(e,t,rt(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-h/2,{cssStyles:f}=t,g=j.svg(s),m=U(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,d,c,h,m),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),X(t,x),t.intersect=function(b){return W.rect(t,b)},s}p(Cg,"note");var lS=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding,o=a.height+t.padding,l=s+o,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:d}=t;if(t.look==="handDrawn"){const f=j.svg(n),g=U(t,{}),m=lS(0,0,l),y=f.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&u.attr("style",d)}else u=ze(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),X(t,u),t.calcIntersect=function(f,g){const m=f.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=W.polygon(f,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(f){return this.calcIntersect(t,f)},n}p(wg,"question");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:f}=t,g=j.svg(n),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=ht(d),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),X(t,b),t.intersect=function(C){return W.polygon(t,d,C)},n}p(kg,"rect_left_inv_arrow");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await je(o,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(Pt(dt())){const D=h.children[0],I=lt(h);u=D.getBoundingClientRect(),I.attr("width",u.width),I.attr("height",u.height)}F.info("Text 2",l);const d=l||[],f=h.getBBox(),g=await je(o,Array.isArray(d)?d.join("<br/>"):d,t.labelStyle,!0,!0),m=g.children[0],y=lt(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;lt(g).attr("transform","translate( "+(u.width>f.width?0:(f.width-u.width)/2)+", "+(f.height+x+5)+")"),lt(h).attr("transform","translate( "+(u.width<f.width?0:-(f.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-x+3)+")");const b=u.width+(t.padding||0),C=u.height+(t.padding||0),v=-u.width/2-x,k=-u.height/2-x;let T,L;if(t.look==="handDrawn"){const D=j.svg(a),I=U(t,{}),O=D.path(Je(v,k,b,C,t.rx||0),I),E=D.line(-u.width/2-x,-u.height/2-x+f.height+x,u.width/2+x,-u.height/2-x+f.height+x,I);L=a.insert(()=>(F.debug("Rough node insert CXC",O),E),":first-child"),T=a.insert(()=>(F.debug("Rough node insert CXC",O),O),":first-child")}else T=s.insert("rect",":first-child"),L=s.insert("line"),T.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),L.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+f.height+x).attr("y2",-u.height/2-x+f.height+x);return X(t,T),t.intersect=function(D){return W.rect(t,D)},a}p(vg,"rectWithTitle");async function Sg(e,t){const r={rx:5,ry:5,labelPaddingX:(t?.padding||0)*1,labelPaddingY:(t?.padding||0)*1};return on(e,t,r)}p(Sg,"roundedRect");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:d}=t,f=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=f.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",It(d)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return W.rect(t,b)},n}p(Tg,"shadedProcess");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=t,d=j.svg(n),f=U(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],m=ht(g),y=d.path(m,f),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),X(t,x),t.intersect=function(b){return W.polygon(t,g,b)},n}p(Lg,"slopedRect");async function Bg(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return on(e,t,r)}p(Bg,"squareRect");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+t.padding,o=a.width+s/4+t.padding,l=s/2,{cssStyles:c}=t,h=j.svg(n),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...Ui(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...Ui(o/2-l,0,l,50,270,450)],f=ht(d),g=h.path(f,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),X(t,m),t.intersect=function(y){return W.polygon(t,d,y)},n}p(Ag,"stadium");async function Mg(e,t){return on(e,t,{rx:5,ry:5})}p(Mg,"state");function Eg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=G(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j.svg(c),u=U(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const d=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),f=o??l,g=h.circle(0,0,5,{...u,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),X(t,m),t.intersect=function(y){return W.circle(t,7,y)},c}p(Eg,"stateEnd");function $g(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const o=j.svg(n).circle(0,0,14,yk(i));a=n.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return X(t,a),t.intersect=function(s){return W.circle(t,7,s)},n}p($g,"stateStart");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=(t?.padding||0)/2,o=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const d=j.svg(n),f=U(t,{}),g=d.rectangle(c-8,h,o+16,l,f),m=d.line(c,h,c,h+l,f),y=d.line(c+o,h,c+o,h+l,f);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",It(b)),X(t,x)}else{const d=ze(n,o,l,u);i&&d.attr("style",i),X(t,d)}return t.intersect=function(d){return W.polygon(t,u,d)},n}p(Fg,"subroutine");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:d}=t,f=j.svg(n),g=U(t,{}),m=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],y=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=ht(m),b=f.path(x,g),C=ht(y),v=f.path(C,{...g,fillStyle:"solid"}),k=n.insert(()=>v,":first-child");return k.insert(()=>b,":first-child"),k.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),X(t,k),t.intersect=function(T){return W.polygon(t,m,T)},n}p(Dg,"taggedRect");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*o,u=.2*l,d=l+c,{cssStyles:f}=t,g=j.svg(n),m=U(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:d/2},...Ze(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,c,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],x=-o/2+o/2*.1,b=-d/2-u*.4,C=[{x:x+o-h,y:(b+l)*1.4},{x:x+o,y:b+l-u},{x:x+o,y:(b+l)*.9},...Ze(x+o,(b+l)*1.3,x+o-h,(b+l)*1.5,-l*.03,.5)],v=ht(y),k=g.path(v,m),T=ht(C),L=g.path(T,{...m,fillStyle:"solid"}),D=n.insert(()=>L,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),X(t,D),t.intersect=function(I){return W.polygon(t,y,I)},n}p(Og,"taggedWaveEdgedRectangle");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+t.padding,t?.width||0),o=Math.max(a.height+t.padding,t?.height||0),l=-s/2,c=-o/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",o),X(t,h),t.intersect=function(u){return W.rect(t,u)},n}p(Rg,"text");var cS=p((e,t,r,i,n,a)=>`M${e},${t}
|
|
184
|
+
a${n},${a} 0,0,1 0,${-i}
|
|
185
|
+
l${r},0
|
|
186
|
+
a${n},${a} 0,0,1 0,${i}
|
|
187
|
+
M${r},${-i}
|
|
188
|
+
a${n},${a} 0,0,0 0,${i}
|
|
189
|
+
l${-r},0`,"createCylinderPathD"),hS=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),uS=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s,halfPadding:o}=await it(e,t,rt(t)),l=t.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),d=a.width+u+l,{cssStyles:f}=t;let g;if(t.look==="handDrawn"){const m=j.svg(n),y=hS(0,0,d,c,u,h),x=uS(0,0,d,c,u,h),b=m.path(y,U(t,{})),C=m.path(x,U(t,{fill:"none"}));g=n.insert(()=>C,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),f&&g.attr("style",f)}else{const m=cS(0,0,d,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",It(f)).attr("style",i),g.attr("class","basic label-container"),f&&g.selectAll("path").attr("style",f),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),X(t,g),t.intersect=function(m){const y=W.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(Ig,"tiltedCylinder");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),d=U(t,{}),f=ht(l),g=u.path(f,d);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=ze(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,X(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(Pg,"trapezoid");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=j.svg(n),d=U(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=ht(f),m=u.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),X(t,y),t.intersect=function(x){return W.polygon(t,f,x)},n}p(Ng,"trapezoidalPentagon");async function zg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=t.useHtmlLabels||Pt(dt()),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:d}=t,f=j.svg(n),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=ht(u),y=f.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,X(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return F.info("Triangle intersect",t,u,b),W.polygon(t,u,b)},n}p(zg,"triangle");async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,f=70-o,g=f>0?f/2:0,m=j.svg(n),y=U(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-g,y:h/2},...Ze(-o/2-g,h/2,o/2+g,h/2,c,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=ht(x),C=m.path(b,y),v=n.insert(()=>C,":first-child");return v.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),X(t,v),t.intersect=function(k){return W.polygon(t,x,k)},n}p(Wg,"waveEdgedRectangle");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=100,o=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,d=c;u>d*h?d=u/h:u=d*h,u=Math.max(u,s),d=Math.max(d,o);const f=Math.min(d*.2,d/4),g=d+f*2,{cssStyles:m}=t,y=j.svg(n),x=U(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ze(-u/2,g/2,u/2,g/2,f,1),{x:u/2,y:-g/2},...Ze(u/2,-g/2,-u/2,-g/2,f,-1)],C=ht(b),v=y.path(C,x),k=n.insert(()=>v,":first-child");return k.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),X(t,k),t.intersect=function(T){return W.polygon(t,b,T)},n}p(qg,"waveRectangle");async function Hg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:d}=t,f=j.svg(n),g=U(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],y=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c}
|
|
190
|
+
M${h-c},${u} L${h+o},${u}
|
|
191
|
+
M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=f.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),X(t,b),t.intersect=function(C){return W.polygon(t,m,C)},n}p(Hg,"windowPane");async function vl(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:et}=Ot(),{background:K}=et,ot={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${K}`]};await vl(e,ot)}const i=Ot();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=G(t);if(r.attributes.length===0&&t.label){const et={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};Re(t.label,i)+et.labelPaddingX*2<i.er.minEntityWidth&&(t.width=i.er.minEntityWidth);const K=await on(e,t,et);if(!Ke(i.htmlLabels)){const ot=K.select("text"),at=ot.node()?.getBBox();ot.attr("transform",`translate(${-at.width/2}, 0)`)}return K}i.htmlLabels||(n*=1.25,a*=1.25);let c=rt(t);c||(c="node default");const h=e.insert("g").attr("class",c).attr("id",t.domId||t.id),u=await Er(h,t.label??"",i,0,0,["name"],o);u.height+=a;let d=0;const f=[],g=[];let m=0,y=0,x=0,b=0,C=!0,v=!0;for(const et of r.attributes){const K=await Er(h,et.type,i,0,d,["attribute-type"],o);m=Math.max(m,K.width+n);const ot=await Er(h,et.name,i,0,d,["attribute-name"],o);y=Math.max(y,ot.width+n);const at=await Er(h,et.keys.join(),i,0,d,["attribute-keys"],o);x=Math.max(x,at.width+n);const Ct=await Er(h,et.comment,i,0,d,["attribute-comment"],o);b=Math.max(b,Ct.width+n);const bt=Math.max(K.height,ot.height,at.height,Ct.height)+a;g.push({yOffset:d,rowHeight:bt}),d+=bt}let k=4;x<=n&&(C=!1,x=0,k--),b<=n&&(v=!1,b=0,k--);const T=h.node().getBBox();if(u.width+n*2-(m+y+x+b)>0){const et=u.width+n*2-(m+y+x+b);m+=et/k,y+=et/k,x>0&&(x+=et/k),b>0&&(b+=et/k)}const L=m+y+x+b,D=j.svg(h),I=U(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((et,K)=>et+(K?.rowHeight??0),0));const E=Math.max(T.width+n*2,t?.width||0,L),N=Math.max((O??0)+u.height,t?.height||0),R=-E/2,A=-N/2;h.selectAll("g:not(:first-child)").each((et,K,ot)=>{const at=lt(ot[K]),Ct=at.attr("transform");let bt=0,Bt=0;if(Ct){const xt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ct);xt&&(bt=parseFloat(xt[1]),Bt=parseFloat(xt[2]),at.attr("class").includes("attribute-name")?bt+=m:at.attr("class").includes("attribute-keys")?bt+=m+y:at.attr("class").includes("attribute-comment")&&(bt+=m+y+x))}at.attr("transform",`translate(${R+n/2+bt}, ${Bt+A+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(A+a/2)+")");const B=D.rectangle(R,A,E,N,I),S=h.insert(()=>B,":first-child").attr("style",s.join("")),{themeVariables:$}=Ot(),{rowEven:M,rowOdd:q,nodeBorder:Y}=$;f.push(0);for(const[et,K]of g.entries()){const at=(et+1)%2===0&&K.yOffset!==0,Ct=D.rectangle(R,u.height+A+K?.yOffset,E,K?.rowHeight,{...I,fill:at?M:q,stroke:Y});h.insert(()=>Ct,"g.label").attr("style",s.join("")).attr("class",`row-rect-${at?"even":"odd"}`)}let Z=D.line(R,u.height+A,E+R,u.height+A,I);h.insert(()=>Z).attr("class","divider"),Z=D.line(m+R,u.height+A,m+R,N+A,I),h.insert(()=>Z).attr("class","divider"),C&&(Z=D.line(m+y+R,u.height+A,m+y+R,N+A,I),h.insert(()=>Z).attr("class","divider")),v&&(Z=D.line(m+y+x+R,u.height+A,m+y+x+R,N+A,I),h.insert(()=>Z).attr("class","divider"));for(const et of f)Z=D.line(R,u.height+A+et,E+R,u.height+A+et,I),h.insert(()=>Z).attr("class","divider");if(X(t,S),l&&t.look!=="handDrawn"){const K=l.split(";")?.filter(ot=>ot.includes("stroke"))?.map(ot=>`${ot}`).join("; ");h.selectAll("path").attr("style",K??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(et){return W.rect(t,et)},h}p(vl,"erBox");async function Er(e,t,r,i=0,n=0,a=[],s=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==ic(t)&&(t=ic(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await Ne(o,t,{width:Re(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(Ke(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=lt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Er,"addText");async function jg(e,t,r,i,n=r.class.padding??12){const a=i?0:3,s=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,d=0,f=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ti(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await Ti(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const C=await Ti(c,b,m,[b.parseClassifier()]);m+=C+a}f=c.node().getBBox().height,f<=0&&(f=n/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const C=await Ti(h,b,y,[b.parseClassifier()]);y+=C+a}let x=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=s.node().getBBox(),c.attr("transform",`translate(0, ${u+d+n*2})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(f?f+n*4:n*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}p(jg,"textHelper");async function Ti(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Ot();let s="useHtmlLabels"in t?t.useHtmlLabels:Ke(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Oi(o)&&(s=!0);const l=await Ne(n,Fo(ti(o)),{width:Re(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,h=1;if(s){const u=l.children[0],d=lt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1);const f=u.getElementsByTagName("img");if(f){const g=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,v=parseInt(b,10)*5+"px";m.style.minWidth=v,m.style.maxWidth=v}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{i.includes("font-weight: bolder")&<(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(Ti,"addText");async function Yg(e,t){const r=dt(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??Ke(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await jg(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=G(t);t.labelStyle=c,t.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const d=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,f=j.svg(o),g=U(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;s.members.length===0&&s.methods.length===0?y+=n:s.members.length>0&&s.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,C=f.rectangle(x-i,b-i-(d?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,y+2*i+(d?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),v=o.insert(()=>C,":first-child");v.attr("class","basic label-container");const k=v.node().getBBox();o.selectAll(".text").each((I,O,E)=>{const N=lt(E[O]),R=N.attr("transform");let A=0;if(R){const M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);M&&(A=parseFloat(M[2]))}let B=A+b+i-(d?i:s.members.length===0&&s.methods.length===0?-i/2:0);a||(B-=4);let S=x;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(S=-N.node()?.getBBox().width/2||0,o.selectAll("text").each(function($,M,q){window.getComputedStyle(q[M]).textAnchor==="middle"&&(S=0)})),N.attr("transform",`translate(${S}, ${B})`)});const T=o.select(".annotation-group").node().getBBox().height-(d?i/2:0)||0,L=o.select(".label-group").node().getBBox().height-(d?i/2:0)||0,D=o.select(".members-group").node().getBBox().height-(d?i/2:0)||0;if(s.members.length>0||s.methods.length>0||d){const I=f.line(k.x,T+L+b+i,k.x+k.width,T+L+b+i,g);o.insert(()=>I).attr("class","divider").attr("style",u)}if(d||s.members.length>0||s.methods.length>0){const I=f.line(k.x,T+L+D+b+n*2+i,k.x+k.width,T+L+D+b+i+n*2,g);o.insert(()=>I).attr("class","divider").attr("style",u)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",u),v.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",u),!a){const I=RegExp(/color\s*:\s*([^;]*)/),O=I.exec(u);if(O){const E=O[0].replace("color","fill");o.selectAll("tspan").attr("style",E)}else if(c){const E=I.exec(c);if(E){const N=E[0].replace("color","fill");o.selectAll("tspan").attr("style",N)}}}return X(t,v),t.intersect=function(I){return W.rect(t,I)},o}p(Yg,"classBox");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const n=t,a=t,s=20,o=20,l="verifyMethod"in t,c=rt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await be(h,`<<${n.type}>>`,0,t.labelStyle):u=await be(h,"<<Element>>",0,t.labelStyle);let d=u;const f=await be(h,n.name,d,t.labelStyle+"; font-weight: bold;");if(d+=f+o,l){const T=await be(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,d,t.labelStyle);d+=T;const L=await be(h,`${n.text?`Text: ${n.text}`:""}`,d,t.labelStyle);d+=L;const D=await be(h,`${n.risk?`Risk: ${n.risk}`:""}`,d,t.labelStyle);d+=D,await be(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,d,t.labelStyle)}else{const T=await be(h,`${a.type?`Type: ${a.type}`:""}`,d,t.labelStyle);d+=T,await be(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+s,m=(h.node()?.getBBox().height??200)+s,y=-g/2,x=-m/2,b=j.svg(h),C=U(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const v=b.rectangle(y,x,g,m,C),k=h.insert(()=>v,":first-child");if(k.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((T,L,D)=>{const I=lt(D[L]),O=I.attr("transform");let E=0,N=0;if(O){const S=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);S&&(E=parseFloat(S[1]),N=parseFloat(S[2]))}const R=N-m/2;let A=y+s/2;(L===0||L===1)&&(A=E),I.attr("transform",`translate(${A}, ${R+s})`)}),d>u+f+o){const T=b.line(y,x+u+f+o,y+g,x+u+f+o,C);h.insert(()=>T).attr("style",i)}return X(t,k),t.intersect=function(T){return W.rect(t,T)},h}p(Ug,"requirementBox");async function be(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=dt(),s=a.htmlLabels??!0,o=await Ne(n,Fo(ti(t)),{width:Re(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const c=o.children[0],h=lt(o);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=o.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=o.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(be,"addText");var fS=p(e=>{switch(e){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Gg(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=G(t);t.labelStyle=i||"";const a=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await it(e,t,rt(t)),h=t.padding||10;let u="",d;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;d?{label:g,bbox:m}=await vs(d,"ticket"in t&&t.ticket||"",f):{label:g,bbox:m}=await vs(o,"ticket"in t&&t.ticket||"",f);const{label:y,bbox:x}=await vs(o,"assigned"in t&&t.assigned||"",f);t.width=s;const b=10,C=t?.width||0,v=Math.max(m.height,x.height)/2,k=Math.max(l.height+b*2,t?.height||0)+v,T=-C/2,L=-k/2;c.attr("transform","translate("+(h-C/2)+", "+(-v-l.height/2)+")"),g.attr("transform","translate("+(h-C/2)+", "+(-v+l.height/2)+")"),y.attr("transform","translate("+(h+C/2-x.width-2*a)+", "+(-v+l.height/2)+")");let D;const{rx:I,ry:O}=t,{cssStyles:E}=t;if(t.look==="handDrawn"){const N=j.svg(o),R=U(t,{}),A=I||O?N.path(Je(T,L,C,k,I||0),R):N.rectangle(T,L,C,k,R);D=o.insert(()=>A,":first-child"),D.attr("class","basic label-container").attr("style",E||null)}else{D=o.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",I??5).attr("ry",O??5).attr("x",T).attr("y",L).attr("width",C).attr("height",k);const N="priority"in t&&t.priority;if(N){const R=o.append("line"),A=T+2,B=L+Math.floor((I??0)/2),S=L+k-Math.floor((I??0)/2);R.attr("x1",A).attr("y1",B).attr("x2",A).attr("y2",S).attr("stroke-width","4").attr("stroke",fS(N))}}return X(t,D),t.height=k,t.intersect=function(N){return W.rect(t,N)},o}p(Gg,"kanbanItem");async function Vg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+10*s,c=a.height+8*s,h=.15*l,{cssStyles:u}=t,d=a.width+20,f=a.height+20,g=Math.max(l,d),m=Math.max(c,f);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0
|
|
192
|
+
a${h},${h} 1 0,0 ${g*.25},${-1*m*.1}
|
|
193
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
194
|
+
a${h},${h} 1 0,0 ${g*.25},0
|
|
195
|
+
a${h},${h} 1 0,0 ${g*.25},${m*.1}
|
|
196
|
+
|
|
197
|
+
a${h},${h} 1 0,0 ${g*.15},${m*.33}
|
|
198
|
+
a${h*.8},${h*.8} 1 0,0 0,${m*.34}
|
|
199
|
+
a${h},${h} 1 0,0 ${-1*g*.15},${m*.33}
|
|
200
|
+
|
|
201
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${m*.15}
|
|
202
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
203
|
+
a${h},${h} 1 0,0 ${-1*g*.25},0
|
|
204
|
+
a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15}
|
|
205
|
+
|
|
206
|
+
a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33}
|
|
207
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34}
|
|
208
|
+
a${h},${h} 1 0,0 ${g*.1},${-1*m*.33}
|
|
209
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=j.svg(n),C=U(t,{}),v=b.path(x,C);y=n.insert(()=>v,":first-child"),y.attr("class","basic label-container").attr("style",It(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),X(t,y),t.calcIntersect=function(b,C){return W.rect(b,C)},t.intersect=function(b){return F.info("Bang intersect",t,b),W.rect(t,b)},n}p(Vg,"bang");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,d=.35*l,f=.2*l,{cssStyles:g}=t;let m;const y=`M0 0
|
|
210
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
211
|
+
a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
|
|
212
|
+
a${u},${u} 1 0,1 ${l*.35},${l*.2}
|
|
213
|
+
|
|
214
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
215
|
+
a${f},${f} 1 0,1 ${-1*l*.15},${c*.65}
|
|
216
|
+
|
|
217
|
+
a${u},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
218
|
+
a${d},${d} 1 0,1 ${-1*l*.5},0
|
|
219
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
220
|
+
|
|
221
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
222
|
+
a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
|
|
223
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const x=j.svg(n),b=U(t,{}),C=x.path(y,b);m=n.insert(()=>C,":first-child"),m.attr("class","basic label-container").attr("style",It(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),X(t,m),t.calcIntersect=function(x,b){return W.rect(x,b)},t.intersect=function(x){return F.info("Cloud intersect",t,x),W.rect(t,x)},n}p(Xg,"cloud");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=G(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+8*s,c=a.height+2*s,h=5,u=`
|
|
224
|
+
M${-l/2} ${c/2-h}
|
|
225
|
+
v${-c+2*h}
|
|
226
|
+
q0,-${h} ${h},-${h}
|
|
227
|
+
h${l-2*h}
|
|
228
|
+
q${h},0 ${h},${h}
|
|
229
|
+
v${c-2*h}
|
|
230
|
+
q0,${h} -${h},${h}
|
|
231
|
+
h${-l+2*h}
|
|
232
|
+
q-${h},0 -${h},-${h}
|
|
233
|
+
Z
|
|
234
|
+
`,d=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),X(t,d),t.calcIntersect=function(f,g){return W.rect(f,g)},t.intersect=function(f){return W.rect(t,f)},n}p(Zg,"defaultMindmapNode");async function Kg(e,t){const r={padding:t.padding??0};return kl(e,t,r)}p(Kg,"mindmapCircle");var dS=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Bg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Sg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Ag},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Fg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Qp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:kl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Vg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Xg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:wg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ag},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:gg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:pg},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Pg},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:fg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Rg},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:jp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Tg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:$g},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Eg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ig},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:sg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Vp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Xp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Zp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:mg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Wg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:ng},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Ig},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:yg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Kp},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Jp},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:zg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Hg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:eg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Ng},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:rg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Lg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:_g},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:bg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Hp},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Gp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Og},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Dg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:qg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:kg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:xg}],pS=p(()=>{const t=[...Object.entries({state:Mg,choice:Yp,note:Cg,rectWithTitle:vg,labelRect:dg,iconSquare:hg,iconCircle:lg,icon:og,iconRounded:cg,imageSquare:ug,anchor:qp,kanbanItem:Gg,mindmapCircle:Kg,defaultMindmapNode:Zg,classBox:Yg,erBox:vl,requirementBox:Ug}),...dS.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Qg=pS();function gS(e){return e in Qg}p(gS,"isValidShape");var Ya=new Map;async function Jg(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Qg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Ya.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Jg,"insertNode");var RA=p((e,t)=>{Ya.set(t.id,e)},"setNodeElem"),IA=p(()=>{Ya.clear()},"clear"),PA=p(e=>{const t=Ya.get(e.id);F.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),mS=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&dh(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&dh(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),yS={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},dh=p((e,t,r,i,n,a,s)=>{const o=yS[r];if(!o){F.warn(`Unknown arrow type: ${r}`);return}const l=o.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const u=s.replace(/[^\dA-Za-z]/g,"_"),d=`${h}_${u}`;if(!document.getElementById(d)){const f=document.getElementById(h);if(f){const g=f.cloneNode(!0);g.id=d,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",s),o.fill&&y.setAttribute("fill",s)}),f.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${d})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),xS=p(e=>typeof e=="string"?e:dt()?.flowchart?.curve,"resolveEdgeCurveType"),Ca=new Map,Et=new Map,NA=p(()=>{Ca.clear(),Et.clear()},"clear"),bi=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),bS=p(async(e,t)=>{const r=dt();let i=Pt(r);const{labelStyles:n}=G(t);t.labelStyle=n;const a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",c=await Ne(e,t.label,{style:bi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);s.node().appendChild(c),F.info("abc82",t,t.labelType);let h=c.getBBox(),u=h;if(i){const f=c.children[0],g=lt(c);h=f.getBoundingClientRect(),u=h,g.attr("width",h.width),g.attr("height",h.height)}else{const f=lt(c).select("text").node();f&&typeof f.getBBox=="function"&&(u=f.getBBox())}s.attr("transform",di(u,i)),Ca.set(t.id,a),t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),m=await je(g,t.startLabelLeft,bi(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(i){const x=m.children[0],b=lt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",di(y,i)),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startLeft=f,Li(d,t.startLabelLeft)}if(t.startLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),m=await je(g,t.startLabelRight,bi(t.labelStyle)||"",!1,!1);d=m,g.node().appendChild(m);let y=m.getBBox();if(i){const x=m.children[0],b=lt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",di(y,i)),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startRight=f,Li(d,t.startLabelRight)}if(t.endLabelLeft){const f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),m=await je(g,t.endLabelLeft,bi(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(i){const x=m.children[0],b=lt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",di(y,i)),f.node().appendChild(m),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endLeft=f,Li(d,t.endLabelLeft)}if(t.endLabelRight){const f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),m=await je(g,t.endLabelRight,bi(t.labelStyle)||"",!1,!1);d=m;let y=m.getBBox();if(i){const x=m.children[0],b=lt(m);y=x.getBoundingClientRect(),b.attr("width",y.width),b.attr("height",y.height)}g.attr("transform",di(y,i)),f.node().appendChild(m),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endRight=f,Li(d,t.endLabelRight)}return c},"insertEdgeLabel");function Li(e,t){Pt(dt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(Li,"setTerminalWidth");var _S=p((e,t)=>{F.debug("Moving label abc88 ",e.id,e.label,Ca.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=dt(),{subGraphTitleTotalMargin:n}=hl(i);if(e.label){const a=Ca.get(e.id);let s=e.x,o=e.y;if(r){const l=he.calcLabelPosition(r);F.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){const a=Et.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const a=Et.get(e.id).startRight;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const a=Et.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const a=Et.get(e.id).endRight;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),CS=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),wS=p((e,t,r)=>{F.debug(`intersection calc abc89:
|
|
235
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
236
|
+
insidePoint : ${JSON.stringify(r)}
|
|
237
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2;let o=r.x<t.x?s-a:s+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(n-t.y)*s>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-n:n-l-t.y;o=h*u/c;const d={x:r.x<t.x?r.x+o:r.x-h+o,y:r.y<t.y?r.y+c-u:r.y-c+u};return o===0&&(d.x=t.x,d.y=t.y),h===0&&(d.x=t.x),c===0&&(d.y=t.y),F.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${o}`,d),d}else{r.x<t.x?o=t.x-s-i:o=i-s-t.x;let u=c*o/h,d=r.x<t.x?r.x+h-o:r.x-h+o,f=r.y<t.y?r.y+u:r.y-u;return F.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${o}`,{_x:d,_y:f}),o===0&&(d=t.x,f=t.y),h===0&&(d=t.x),c===0&&(f=t.y),{x:d,y:f}}},"intersection"),ph=p((e,t)=>{F.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(F.info("abc88 checking point",a,t),!CS(t,a)&&!n){const s=wS(t,i,a);F.debug("abc88 inside",a,i,s),F.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?F.warn("abc88 no intersect",s,r):r.push(s),n=!0}else F.warn("abc88 outside",a,i),i=a,n||r.push(a)}),F.debug("returning points",r),r},"cutPathAtIntersect");function tm(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const n=e[i-1],a=e[i],s=e[i+1];(n.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(tm,"extractCornerPoints");var gh=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),kS=p(function(e){const{cornerPointPositions:t}=tm(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const n=e[i-1],a=e[i+1],s=e[i],o=gh(n,s,5),l=gh(a,s,5),c=l.x-o.x,h=l.y-o.y;r.push(o);const u=Math.sqrt(2)*2;let d={x:s.x,y:s.y};if(Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10){F.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const f=5;s.x===o.x?d={x:c<0?o.x-f+u:o.x+f-u,y:h<0?o.y-u:o.y+u}:d={x:c<0?o.x-u:o.x+u,y:h<0?o.y-f+u:o.y+f-u}}else F.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(d,l)}else r.push(e[i]);return r},"fixCorners"),vS=p((e,t,r)=>{const i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),SS=p(function(e,t,r,i,n,a,s,o=!1){const{handDrawnSeed:l}=dt();let c=t.points,h=!1;const u=n;var d=a;const f=[];for(const S in t.cssCompiledStyles)tp(S)||f.push(t.cssCompiledStyles[S]);F.debug("UIO intersect check",t.points,d.x,u.x),d.intersect&&u.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),F.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(F.info("to cluster abc88",r.get(t.toCluster)),c=ph(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(F.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=ph(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(S=>!Number.isNaN(S.y));const y=xS(t.curve);y!=="rounded"&&(m=kS(m));let x=$i;switch(y){case"linear":x=$i;break;case"basis":x=Hs;break;case"cardinal":x=Fu;break;case"bumpX":x=Bu;break;case"bumpY":x=Au;break;case"catmullRom":x=Ou;break;case"monotoneX":x=Wu;break;case"monotoneY":x=qu;break;case"natural":x=ju;break;case"step":x=Yu;break;case"stepAfter":x=Gu;break;case"stepBefore":x=Uu;break;case"rounded":x=$i;break;default:x=Hs}const{x:b,y:C}=C_(t),v=n2().x(b).y(C).curve(x);let k;switch(t.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-invisible";break;default:k="edge-thickness-normal"}switch(t.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break;default:k+=" edge-pattern-solid"}let T,L=y==="rounded"?em(rm(m,t),5):v(m);const D=Array.isArray(t.style)?t.style:[t.style];let I=D.find(S=>S?.startsWith("stroke:")),O="";t.animate&&(O="edge-animation-fast"),t.animation&&(O="edge-animation-"+t.animation);let E=!1;if(t.look==="handDrawn"){const S=j.svg(e);Object.assign([],m);const $=S.path(L,{roughness:.3,seed:l});k+=" transition",T=lt($).select("path").attr("id",t.id).attr("class"," "+k+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",D?D.reduce((q,Y)=>q+";"+Y,""):"");let M=T.attr("d");T.attr("d",M),e.node().appendChild(T.node())}else{const S=f.join(";"),$=D?D.reduce((K,ot)=>K+ot+";",""):"",M=(S?S+";"+$+";":$)+";"+(D?D.reduce((K,ot)=>K+";"+ot,""):"");T=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+k+(t.classes?" "+t.classes:"")+(O?" "+O:"")).attr("style",M),I=M.match(/stroke:([^;]+)/)?.[1],E=t.animate===!0||!!t.animation||S.includes("animation");const q=T.node(),Y=typeof q.getTotalLength=="function"?q.getTotalLength():0,Z=Mc[t.arrowTypeStart]||0,et=Mc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!E){const ot=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?vS(Y,Z,et):`0 ${Z} ${Y-Z-et} ${et}`}; stroke-dashoffset: 0;`;T.attr("style",ot+T.attr("style"))}}T.attr("data-edge",!0),T.attr("data-et","edge"),T.attr("data-id",t.id),T.attr("data-points",g),t.showPoints&&m.forEach(S=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",S.x).attr("cy",S.y)});let N="";(dt().flowchart.arrowMarkerAbsolute||dt().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),F.info("arrowTypeStart",t.arrowTypeStart),F.info("arrowTypeEnd",t.arrowTypeEnd),mS(T,t,N,s,i,I);const R=Math.floor(c.length/2),A=c[R];he.isLabelCoordinateInPath(A,T.attr("d"))||(h=!0);let B={};return h&&(B.updatedPath=c),B.originalPath=t.points,B},"insertEdge");function em(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a<i;a++){const s=e[a],o=e[a-1],l=e[a+1];if(a===0)r+=`M${s.x},${s.y}`;else if(a===i-1)r+=`L${s.x},${s.y}`;else{const c=s.x-o.x,h=s.y-o.y,u=l.x-s.x,d=l.y-s.y,f=Math.hypot(c,h),g=Math.hypot(u,d);if(f<n||g<n){r+=`L${s.x},${s.y}`;continue}const m=c/f,y=h/f,x=u/g,b=d/g,C=m*x+y*b,v=Math.max(-1,Math.min(1,C)),k=Math.acos(v);if(k<n||Math.abs(Math.PI-k)<n){r+=`L${s.x},${s.y}`;continue}const T=Math.min(t/Math.sin(k/2),f/2,g/2),L=s.x-m*T,D=s.y-y*T,I=s.x+x*T,O=s.y+b*T;r+=`L${L},${D}`,r+=`Q${s.x},${s.y} ${I},${O}`}}return r}p(em,"generateRoundedPath");function xo(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(xo,"calculateDeltaAndAngle");function rm(e,t){const r=e.map(n=>({...n}));if(e.length>=2&&Dt[t.arrowTypeStart]){const n=Dt[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=xo(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Dt[t.arrowTypeEnd]){const n=Dt[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:o}=xo(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(rm,"applyMarkerOffsetsToPoints");var TS=p((e,t,r,i)=>{t.forEach(n=>{qS[n](e,r,i)})},"insertMarkers"),LS=p((e,t,r)=>{F.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),BS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),AS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),MS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),ES=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),$S=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),FS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),DS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),OS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),RS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),IS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),PS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),NS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),zS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
238
|
+
L20,10
|
|
239
|
+
M20,10
|
|
240
|
+
L0,20`)},"requirement_arrow"),WS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),qS={extension:LS,composition:BS,aggregation:AS,dependency:MS,lollipop:ES,point:$S,circle:FS,cross:DS,barb:OS,only_one:RS,zero_or_one:IS,one_or_more:PS,zero_or_more:NS,requirement_arrow:zS,requirement_contains:WS},HS=TS,jS={common:Ki,getConfig:Ot,insertCluster:Zv,insertEdge:SS,insertEdgeLabel:bS,insertMarkers:HS,insertNode:Jg,interpolateToCurve:nl,labelHelper:it,log:F,positionEdgeLabel:_S},Gi={},im=p(e=>{for(const t of e)Gi[t.name]=t},"registerLayoutLoaders"),YS=p(()=>{im([{name:"dagre",loader:p(async()=>await ut(()=>import("./dagre-KLK3FWXG-DHMg8mGv.js"),__vite__mapDeps([2,3,4,5,6,7,0,1])),"loader")},{name:"cose-bilkent",loader:p(async()=>await ut(()=>import("./cose-bilkent-S5V4N54A-BRGleZdB.js"),__vite__mapDeps([8,9,0,1])),"loader")}])},"registerDefaultLayoutLoaders");YS();var zA=p(async(e,t)=>{if(!(e.layoutAlgorithm in Gi))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Gi[e.layoutAlgorithm];return(await r.loader()).render(e,t,jS,{algorithm:r.algorithm})},"render"),WA=p((e="",{fallback:t="dagre"}={})=>{if(e in Gi)return e;if(t in Gi)return F.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),nm="comm",am="rule",sm="decl",US="@import",GS="@namespace",VS="@keyframes",XS="@layer",om=Math.abs,Sl=String.fromCharCode;function lm(e){return e.trim()}function Nn(e,t,r){return e.replace(t,r)}function ZS(e,t,r){return e.indexOf(t,r)}function Or(e,t){return e.charCodeAt(t)|0}function Zr(e,t,r){return e.slice(t,r)}function _e(e){return e.length}function KS(e){return e.length}function Tn(e,t){return t.push(e),e}var Ua=1,Kr=1,cm=0,ie=0,kt=0,ii="";function Tl(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Ua,column:Kr,length:s,return:"",siblings:o}}function QS(){return kt}function JS(){return kt=ie>0?Or(ii,--ie):0,Kr--,kt===10&&(Kr=1,Ua--),kt}function fe(){return kt=ie<cm?Or(ii,ie++):0,Kr++,kt===10&&(Kr=1,Ua++),kt}function Ye(){return Or(ii,ie)}function zn(){return ie}function Ga(e,t){return Zr(ii,e,t)}function Vi(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function tT(e){return Ua=Kr=1,cm=_e(ii=e),ie=0,[]}function eT(e){return ii="",e}function Ss(e){return lm(Ga(ie-1,bo(e===91?e+2:e===40?e+1:e)))}function rT(e){for(;(kt=Ye())&&kt<33;)fe();return Vi(e)>2||Vi(kt)>3?"":" "}function iT(e,t){for(;--t&&fe()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Ga(e,zn()+(t<6&&Ye()==32&&fe()==32))}function bo(e){for(;fe();)switch(kt){case e:return ie;case 34:case 39:e!==34&&e!==39&&bo(kt);break;case 40:e===41&&bo(e);break;case 92:fe();break}return ie}function nT(e,t){for(;fe()&&e+kt!==57;)if(e+kt===84&&Ye()===47)break;return"/*"+Ga(t,ie-1)+"*"+Sl(e===47?e:fe())}function aT(e){for(;!Vi(Ye());)fe();return Ga(e,ie)}function sT(e){return eT(Wn("",null,null,null,[""],e=tT(e),0,[0],e))}function Wn(e,t,r,i,n,a,s,o,l){for(var c=0,h=0,u=s,d=0,f=0,g=0,m=1,y=1,x=1,b=0,C="",v=n,k=a,T=i,L=C;y;)switch(g=b,b=fe()){case 40:if(g!=108&&Or(L,u-1)==58){ZS(L+=Nn(Ss(b),"&","&\f"),"&\f",om(c?o[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:L+=Ss(b);break;case 9:case 10:case 13:case 32:L+=rT(g);break;case 92:L+=iT(zn()-1,7);continue;case 47:switch(Ye()){case 42:case 47:Tn(oT(nT(fe(),zn()),t,r,l),l),(Vi(g||1)==5||Vi(Ye()||1)==5)&&_e(L)&&Zr(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*m:o[c++]=_e(L)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(L=Nn(L,/\f/g,"")),f>0&&(_e(L)-u||m===0&&g===47)&&Tn(f>32?yh(L+";",i,r,u-1,l):yh(Nn(L," ","")+";",i,r,u-2,l),l);break;case 59:L+=";";default:if(Tn(T=mh(L,t,r,c,h,n,o,C,v=[],k=[],u,a),a),b===123)if(h===0)Wn(L,t,T,T,v,a,u,o,k);else{switch(d){case 99:if(Or(L,3)===110)break;case 108:if(Or(L,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Wn(e,T,T,i&&Tn(mh(e,T,T,0,0,n,o,C,n,v=[],u,k),k),n,k,u,o,i?v:k):Wn(L,T,T,T,[""],k,0,o,k)}}c=h=f=0,m=x=1,C=L="",u=s;break;case 58:u=1+_e(L),f=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&JS()==125)continue}switch(L+=Sl(b),b*m){case 38:x=h>0?1:(L+="\f",-1);break;case 44:o[c++]=(_e(L)-1)*x,x=1;break;case 64:Ye()===45&&(L+=Ss(fe())),d=Ye(),h=u=_e(C=L+=aT(zn())),b++;break;case 45:g===45&&_e(L)==2&&(m=0)}}return a}function mh(e,t,r,i,n,a,s,o,l,c,h,u){for(var d=n-1,f=n===0?a:[""],g=KS(f),m=0,y=0,x=0;m<i;++m)for(var b=0,C=Zr(e,d+1,d=om(y=s[m])),v=e;b<g;++b)(v=lm(y>0?f[b]+" "+C:Nn(C,/&\f/g,f[b])))&&(l[x++]=v);return Tl(e,t,r,n===0?am:o,l,c,h,u)}function oT(e,t,r,i){return Tl(e,t,r,nm,Sl(QS()),Zr(e,2,-2),0,i)}function yh(e,t,r,i,n){return Tl(e,t,r,sm,Zr(e,0,i),Zr(e,i+1,-1),i,n)}function _o(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function lT(e,t,r,i){switch(e.type){case XS:if(e.children.length)break;case US:case GS:case sm:return e.return=e.return||e.value;case nm:return"";case VS:return e.return=e.value+"{"+_o(e.children,i)+"}";case am:if(!_e(e.value=e.props.join(",")))return""}return _e(r=_o(e.children,i))?e.return=e.value+"{"+r+"}":""}var cT=Fd(Object.keys,Object),hT=Object.prototype,uT=hT.hasOwnProperty;function fT(e){if(!Ia(e))return cT(e);var t=[];for(var r in Object(e))uT.call(e,r)&&r!="constructor"&&t.push(r);return t}var Co=Cr(Se,"DataView"),wo=Cr(Se,"Promise"),ko=Cr(Se,"Set"),vo=Cr(Se,"WeakMap"),xh="[object Map]",dT="[object Object]",bh="[object Promise]",_h="[object Set]",Ch="[object WeakMap]",wh="[object DataView]",pT=_r(Co),gT=_r(Yi),mT=_r(wo),yT=_r(ko),xT=_r(vo),ar=Qr;(Co&&ar(new Co(new ArrayBuffer(1)))!=wh||Yi&&ar(new Yi)!=xh||wo&&ar(wo.resolve())!=bh||ko&&ar(new ko)!=_h||vo&&ar(new vo)!=Ch)&&(ar=function(e){var t=Qr(e),r=t==dT?e.constructor:void 0,i=r?_r(r):"";if(i)switch(i){case pT:return wh;case gT:return xh;case mT:return bh;case yT:return _h;case xT:return Ch}return t});var bT="[object Map]",_T="[object Set]",CT=Object.prototype,wT=CT.hasOwnProperty;function kh(e){if(e==null)return!0;if(Pa(e)&&(ua(e)||typeof e=="string"||typeof e.splice=="function"||rl(e)||il(e)||ha(e)))return!e.length;var t=ar(e);if(t==bT||t==_T)return!e.size;if(Ia(e))return!fT(e).length;for(var r in e)if(wT.call(e,r))return!1;return!0}var hm="c4",kT=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),vT=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./c4Diagram-IC4MRINW-B6TKn4H0.js");return{diagram:t}},__vite__mapDeps([10,11,0,1]));return{id:hm,diagram:e}},"loader"),ST={id:hm,detector:kT,loader:vT},TT=ST,um="flowchart",LT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),BT=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-D6zeTvLT.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,16,0,1]));return{id:um,diagram:e}},"loader"),AT={id:um,detector:LT,loader:BT},MT=AT,fm="flowchart-v2",ET=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),$T=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-D6zeTvLT.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,16,0,1]));return{id:fm,diagram:e}},"loader"),FT={id:fm,detector:ET,loader:$T},DT=FT,dm="er",OT=p(e=>/^\s*erDiagram/.test(e),"detector"),RT=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./erDiagram-INFDFZHY-BgJ2BiGo.js");return{diagram:t}},__vite__mapDeps([17,14,15,16,0,1]));return{id:dm,diagram:e}},"loader"),IT={id:dm,detector:OT,loader:RT},PT=IT,pm="gitGraph",NT=p(e=>/^\s*gitGraph/.test(e),"detector"),zT=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./gitGraphDiagram-K3NZZRJ6-DezWLbgZ.js");return{diagram:t}},__vite__mapDeps([18,19,20,21,0,1,4,6,7]));return{id:pm,diagram:e}},"loader"),WT={id:pm,detector:NT,loader:zT},qT=WT,gm="gantt",HT=p(e=>/^\s*gantt/.test(e),"detector"),jT=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./ganttDiagram-A5KZAMGK-C6pRNZNW.js");return{diagram:t}},__vite__mapDeps([22,0,1,23,24,25]));return{id:gm,diagram:e}},"loader"),YT={id:gm,detector:HT,loader:jT},UT=YT,mm="info",GT=p(e=>/^\s*info/.test(e),"detector"),VT=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./infoDiagram-LFFYTUFH-CxhiVoSu.js");return{diagram:t}},__vite__mapDeps([26,21,0,1,4,6,7]));return{id:mm,diagram:e}},"loader"),XT={id:mm,detector:GT,loader:VT},ym="pie",ZT=p(e=>/^\s*pie/.test(e),"detector"),KT=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./pieDiagram-SKSYHLDU-Cl_7oQ5D.js");return{diagram:t}},__vite__mapDeps([27,19,21,0,1,4,6,7,28,29,24]));return{id:ym,diagram:e}},"loader"),QT={id:ym,detector:ZT,loader:KT},xm="quadrantChart",JT=p(e=>/^\s*quadrantChart/.test(e),"detector"),tL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./quadrantDiagram-337W2JSQ-9-hmP2sR.js");return{diagram:t}},__vite__mapDeps([30,23,24,25,0,1]));return{id:xm,diagram:e}},"loader"),eL={id:xm,detector:JT,loader:tL},rL=eL,bm="xychart",iL=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),nL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./xychartDiagram-JWTSCODW-BBQuedrJ.js");return{diagram:t}},__vite__mapDeps([31,24,29,23,25,0,1]));return{id:bm,diagram:e}},"loader"),aL={id:bm,detector:iL,loader:nL},sL=aL,_m="requirement",oL=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),lL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./requirementDiagram-Z7DCOOCP-B9ym5S9j.js");return{diagram:t}},__vite__mapDeps([32,14,15,0,1]));return{id:_m,diagram:e}},"loader"),cL={id:_m,detector:oL,loader:lL},hL=cL,Cm="sequence",uL=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),fL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./sequenceDiagram-2WXFIKYE-DFF7hP89.js");return{diagram:t}},__vite__mapDeps([33,11,20,0,1]));return{id:Cm,diagram:e}},"loader"),dL={id:Cm,detector:uL,loader:fL},pL=dL,wm="class",gL=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),mL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./classDiagram-VBA2DB6C-BvUODQWG.js");return{diagram:t}},__vite__mapDeps([34,35,13,11,14,15,0,1]));return{id:wm,diagram:e}},"loader"),yL={id:wm,detector:gL,loader:mL},xL=yL,km="classDiagram",bL=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),_L=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./classDiagram-v2-RAHNMMFH-BvUODQWG.js");return{diagram:t}},__vite__mapDeps([36,35,13,11,14,15,0,1]));return{id:km,diagram:e}},"loader"),CL={id:km,detector:bL,loader:_L},wL=CL,vm="state",kL=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),vL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./stateDiagram-RAJIS63D-5d7deHv4.js");return{diagram:t}},__vite__mapDeps([37,38,14,15,3,4,5,6,0,1]));return{id:vm,diagram:e}},"loader"),SL={id:vm,detector:kL,loader:vL},TL=SL,Sm="stateDiagram",LL=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),BL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./stateDiagram-v2-FVOUBMTO-BCrBE7ns.js");return{diagram:t}},__vite__mapDeps([39,38,14,15,0,1]));return{id:Sm,diagram:e}},"loader"),AL={id:Sm,detector:LL,loader:BL},ML=AL,Tm="journey",EL=p(e=>/^\s*journey/.test(e),"detector"),$L=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./journeyDiagram-4ABVD52K-2iTO5lFS.js");return{diagram:t}},__vite__mapDeps([40,13,11,28,0,1]));return{id:Tm,diagram:e}},"loader"),FL={id:Tm,detector:EL,loader:$L},DL=FL,OL=p((e,t,r)=>{F.debug(`rendering svg for syntax error
|
|
241
|
+
`);const i=d2(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Kh(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Lm={draw:OL},RL=Lm,IL={db:{},renderer:Lm,parser:{parse:p(()=>{},"parse")}},PL=IL,Bm="flowchart-elk",NL=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),zL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./flowDiagram-PKNHOUZH-D6zeTvLT.js");return{diagram:t}},__vite__mapDeps([12,13,11,14,15,16,0,1]));return{id:Bm,diagram:e}},"loader"),WL={id:Bm,detector:NL,loader:zL},qL=WL,Am="timeline",HL=p(e=>/^\s*timeline/.test(e),"detector"),jL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./timeline-definition-YZTLITO2-B--cJVhe.js");return{diagram:t}},__vite__mapDeps([41,28,0,1]));return{id:Am,diagram:e}},"loader"),YL={id:Am,detector:HL,loader:jL},UL=YL,Mm="mindmap",GL=p(e=>/^\s*mindmap/.test(e),"detector"),VL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./mindmap-definition-YRQLILUH-Cx6VfdT1.js");return{diagram:t}},__vite__mapDeps([42,14,15,0,1]));return{id:Mm,diagram:e}},"loader"),XL={id:Mm,detector:GL,loader:VL},ZL=XL,Em="kanban",KL=p(e=>/^\s*kanban/.test(e),"detector"),QL=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./kanban-definition-K7BYSVSG-DjxhpM1N.js");return{diagram:t}},__vite__mapDeps([43,13,0,1]));return{id:Em,diagram:e}},"loader"),JL={id:Em,detector:KL,loader:QL},tB=JL,$m="sankey",eB=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),rB=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./sankeyDiagram-WA2Y5GQK-BquUAhGG.js");return{diagram:t}},__vite__mapDeps([44,29,24,0,1]));return{id:$m,diagram:e}},"loader"),iB={id:$m,detector:eB,loader:rB},nB=iB,Fm="packet",aB=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),sB=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./diagram-P4PSJMXO-C1BJaksq.js");return{diagram:t}},__vite__mapDeps([45,19,21,0,1,4,6,7]));return{id:Fm,diagram:e}},"loader"),oB={id:Fm,detector:aB,loader:sB},Dm="radar",lB=p(e=>/^\s*radar-beta/.test(e),"detector"),cB=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./diagram-IFDJBPK2-b-D69n7V.js");return{diagram:t}},__vite__mapDeps([46,19,21,0,1,4,6,7]));return{id:Dm,diagram:e}},"loader"),hB={id:Dm,detector:lB,loader:cB},Om="block",uB=p(e=>/^\s*block(-beta)?/.test(e),"detector"),fB=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./blockDiagram-WCTKOSBZ-DXHcqkjb.js");return{diagram:t}},__vite__mapDeps([47,13,7,4,3,16,0,1]));return{id:Om,diagram:e}},"loader"),dB={id:Om,detector:uB,loader:fB},pB=dB,Rm="architecture",gB=p(e=>/^\s*architecture/.test(e),"detector"),mB=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./architectureDiagram-2XIMDMQ5-JkJrmehD.js");return{diagram:t}},__vite__mapDeps([48,19,21,0,1,4,6,7,9]));return{id:Rm,diagram:e}},"loader"),yB={id:Rm,detector:gB,loader:mB},xB=yB,Im="ishikawa",bB=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),_B=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./ishikawaDiagram-PHBUUO56-J-M5GhWU.js");return{diagram:t}},__vite__mapDeps([49,0,1]));return{id:Im,diagram:e}},"loader"),CB={id:Im,detector:bB,loader:_B},Pm="venn",wB=p(e=>/^\s*venn-beta/.test(e),"detector"),kB=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./vennDiagram-LZ73GAT5-Bwe1MZrS.js");return{diagram:t}},__vite__mapDeps([50,0,1]));return{id:Pm,diagram:e}},"loader"),vB={id:Pm,detector:wB,loader:kB},SB=vB,Nm="treemap",TB=p(e=>/^\s*treemap/.test(e),"detector"),LB=p(async()=>{const{diagram:e}=await ut(async()=>{const{diagram:t}=await import("./diagram-E7M64L7V-DSf4Sp4q.js");return{diagram:t}},__vite__mapDeps([51,15,19,21,0,1,4,6,7,25,29,24]));return{id:Nm,diagram:e}},"loader"),BB={id:Nm,detector:TB,loader:LB},vh=!1,Va=p(()=>{vh||(vh=!0,Un("error",PL,e=>e.toLowerCase().trim()==="error"),Un("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),As(qL,ZL,xB),As(TT,tB,wL,xL,PT,UT,XT,QT,hL,pL,DT,MT,UL,qT,ML,TL,DL,rL,nB,oB,sL,pB,hB,CB,BB,SB))},"addDiagrams"),AB=p(async()=>{F.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(fr).map(async([r,{detector:i,loader:n}])=>{if(n)try{Fs(r)}catch{try{const{diagram:a,id:s}=await n();Un(s,a,i)}catch(a){throw F.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete fr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){F.error(`Failed to load ${t.length} external diagrams`);for(const r of t)F.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),MB="graphics-document document";function zm(e,t){e.attr("role",MB),t!==""&&e.attr("aria-roledescription",t)}p(zm,"setA11yDiagramInfo");function Wm(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(Wm,"addSVGa11yTitleDescription");var ur,So=(ur=class{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static async fromText(t,r={}){const i=Ot(),n=Bo(t,i);t=mk(t)+`
|
|
242
|
+
`;try{Fs(n)}catch{const c=j0(n);if(!c)throw new Ih(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Un(h,u)}const{db:a,parser:s,renderer:o,init:l}=Fs(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new ur(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(ur,"Diagram"),ur),Sh=[],EB=p(()=>{Sh.forEach(e=>{e()}),Sh=[]},"attachFunctions"),$B=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function qm(e){const t=e.match(Rh);if(!t)return{text:e,metadata:{}};let r=__(t[1],{schema:b_})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(qm,"extractFrontMatter");var FB=p(e=>e.replace(/\r\n?/g,`
|
|
243
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),DB=p(e=>{const{text:t,metadata:r}=qm(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),OB=p(e=>{const t=he.detectInit(e)??{},r=he.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:ik(e),directive:t}},"processDirectives");function Ll(e){const t=FB(e),r=DB(t),i=OB(r.text),n=cl(r.config,i.directive);return e=$B(i.text),{code:e,title:r.title,config:n}}p(Ll,"preprocessDiagram");function Hm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Hm,"toBase64");var RB=5e4,IB="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",PB="sandbox",NB="loose",zB="http://www.w3.org/2000/svg",WB="http://www.w3.org/1999/xlink",qB="http://www.w3.org/1999/xhtml",HB="100%",jB="100%",YB="border:0;margin:0;",UB="margin:0",GB="allow-top-navigation-by-user-activation allow-popups",VB='The "iframe" tag is not supported by your browser.',XB=["foreignobject"],ZB=["dominant-baseline"];function Bl(e){const t=Ll(e);return jn(),sy(t.config??{}),t}p(Bl,"processAndSetConfigs");async function jm(e,t){Va();try{const{code:r,config:i}=Bl(e);return{diagramType:(await Um(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(jm,"parse");var Th=p((e,t,r=[])=>`
|
|
244
|
+
.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),KB=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=`
|
|
245
|
+
${e.themeCSS}`),e.fontFamily!==void 0&&(r+=`
|
|
246
|
+
:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=`
|
|
247
|
+
:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=Pt(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{kh(o.styles)||s.forEach(l=>{r+=Th(o.id,l,o.styles)}),kh(o.textStyles)||(r+=Th(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),QB=p((e,t,r,i)=>{const n=KB(e,r),a=Sy(t,n,e.themeVariables);return _o(sT(`${i}{${a}}`),lT)},"createUserStyles"),JB=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=ti(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),tA=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":jB,i=Hm(`<body style="${UB}">${e}</body>`);return`<iframe style="width:${HB};height:${r};${YB}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${GB}">
|
|
248
|
+
${VB}
|
|
249
|
+
</iframe>`},"putIntoIFrame"),Lh=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",zB);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function To(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(To,"sandboxedIframe");var eA=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),rA=p(async function(e,t,r){Va();const i=Bl(t);t=i.code;const n=Ot();F.debug(n),t.length>(n?.maxTextSize??RB)&&(t=IB);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=p(()=>{const R=lt(d?o:c).node();R&&"remove"in R&&R.remove()},"removeTempElements");let u=lt("body");const d=n.securityLevel===PB,f=n.securityLevel===NB,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const N=To(lt(r),s);u=lt(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt(r);Lh(u,e,l,`font-family: ${g}`,WB)}else{if(eA(document,e,l,s),d){const N=To(lt("body"),s);u=lt(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=lt("body");Lh(u,e,l)}let m,y;try{m=await So.fromText(t,{title:i.title})}catch(N){if(n.suppressErrorRendering)throw h(),N;m=await So.fromText("error"),y=N}const x=u.select(c).node(),b=m.type,C=x.firstChild,v=C.firstChild,k=m.renderer.getClasses?.(t,m),T=QB(n,b,k,a),L=document.createElement("style");L.innerHTML=T,C.insertBefore(L,v);try{await m.renderer.draw(t,e,"11.13.0",m)}catch(N){throw n.suppressErrorRendering?h():RL.draw(t,e,"11.13.0"),N}const D=u.select(`${c} svg`),I=m.db.getAccTitle?.(),O=m.db.getAccDescription?.();Gm(b,D,I,O),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",qB);let E=u.select(c).node().innerHTML;if(F.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),E=JB(E,d,Ke(n.arrowMarkerAbsolute)),d){const N=u.select(c+" svg").node();E=tA(E,N)}else f||(E=jr.sanitize(E,{ADD_TAGS:XB,ADD_ATTR:ZB,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(EB(),y)throw y;return h(),{diagramType:b,svg:E,bindFunctions:m.db.bindFunctions}},"render");function Ym(e={}){const t=Tt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),ny(t),t?.theme&&t.theme in Fe?t.themeVariables=Fe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Fe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?iy(t):qh();Lo(r.logLevel),Va()}p(Ym,"initialize");var Um=p((e,t={})=>{const{code:r}=Ll(e);return So.fromText(r,t)},"getDiagramFromText");function Gm(e,t,r,i){zm(t,e),Wm(t,r,i,t.attr("id"))}p(Gm,"addA11yInfo");var xr=Object.freeze({render:rA,parse:jm,getDiagramFromText:Um,initialize:Ym,getConfig:Ot,setConfig:Hh,getSiteConfig:qh,updateSiteConfig:ay,reset:p(()=>{jn()},"reset"),globalReset:p(()=>{jn(Yr)},"globalReset"),defaultConfig:Yr});Lo(Ot().logLevel);jn(Ot());var iA=p((e,t,r)=>{F.warn(e),ll(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Vm=p(async function(e={querySelector:".mermaid"}){try{await nA(e)}catch(t){if(ll(t)&&F.error(t.str),Ie.parseError&&Ie.parseError(t),!e.suppressErrors)throw F.error("Use the suppressErrors option to suppress these errors"),t}},"run"),nA=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=xr.getConfig();F.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");F.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(F.debug("Start On Load: "+i?.startOnLoad),xr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new he.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const l of Array.from(n)){if(F.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=dp(he.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=he.detectInit(s);h&&F.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:d}=await Qm(c,s,l);l.innerHTML=u,e&&await e(c),d&&d(l)}catch(u){iA(u,o,Ie.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Xm=p(function(e){xr.initialize(e)},"initialize"),aA=p(async function(e,t,r){F.warn("mermaid.init is deprecated. Please use run instead."),e&&Xm(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Vm(i)},"init"),sA=p(async(e,{lazyLoad:t=!0}={})=>{Va(),As(...e),t===!1&&await AB()},"registerExternalDiagrams"),Zm=p(function(){if(Ie.startOnLoad){const{startOnLoad:e}=xr.getConfig();e&&Ie.run().catch(t=>F.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Zm,!1);var oA=p(function(e){Ie.parseError=e},"setParseErrorHandler"),wa=[],Ts=!1,Km=p(async()=>{if(!Ts){for(Ts=!0;wa.length>0;){const e=wa.shift();if(e)try{await e()}catch(t){F.error("Error executing queue",t)}}Ts=!1}},"executeQueue"),lA=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,s)=>{xr.parse(e,t).then(o=>{a(o),r(o)},o=>{F.error("Error parsing",o),Ie.parseError?.(o),s(o),i(o)})}),"performCall");wa.push(n),Km().catch(i)}),"parse"),Qm=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((s,o)=>{xr.render(e,t,r).then(l=>{s(l),i(l)},l=>{F.error("Error parsing",l),Ie.parseError?.(l),o(l),n(l)})}),"performCall");wa.push(a),Km().catch(n)}),"render"),cA=p(()=>Object.keys(fr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ie={startOnLoad:!0,mermaidAPI:xr,parse:lA,render:Qm,init:aA,run:Vm,registerExternalDiagrams:sA,registerLayoutLoaders:im,initialize:Xm,parseError:void 0,contentLoaded:Zm,setParseErrorHandler:oA,detectType:Bo,registerIconPacks:kv,getRegisteredDiagramsMetadata:cA},Jm=Ie;let Bh=null;const hA=e=>{const t=e==="dark"?"dark":"default";Bh!==t&&(Jm.initialize({startOnLoad:!1,theme:t}),Bh=t)},uA=(e,t)=>{const[r,i]=si.useState(null),[n,a]=si.useState(!1),s=si.useId(),o=si.useRef(0);return si.useEffect(()=>{let l=!1;hA(t),o.current+=1;const c=`mermaid-${s.replaceAll(":","")}-${String(o.current)}`;return(async()=>{try{const u=await Jm.render(c,e);l||(a(!1),i(u.svg))}catch{l||(a(!0),i(null))}})(),()=>{l=!0,document.querySelector(`#${c}`)?.remove()}},[e,s,t]),{error:n,svg:r}},fA=({code:e})=>{const{theme:t}=c0(),{error:r,svg:i}=uA(e,t);return r?as.jsx("pre",{children:as.jsx("code",{children:e})}):i?as.jsx("div",{dangerouslySetInnerHTML:{__html:i}}):null},qA=Object.freeze(Object.defineProperty({__proto__:null,default:fA},Symbol.toStringTag,{value:"Module"}));export{Qh as $,yA as A,Ai as B,p0 as C,Dy as D,cl as E,Wh as F,Ot as G,lk as H,d2 as I,b_ as J,Z0 as K,Oi as L,gA as M,Na as N,py as O,Zh as P,ic as Q,n2 as R,Hs as S,ok as T,Zi as U,wy as V,Xi as W,H as X,tt as Y,Jw as Z,p as _,By as a,Tw as a$,t2 as a0,Wo as a1,CA as a2,vA as a3,Br as a4,kc as a5,wc as a6,TA as a7,SA as a8,kA as a9,_S as aA,bS as aB,Xw as aC,WC as aD,qw as aE,tl as aF,kh as aG,Sv as aH,Eh as aI,e2 as aJ,pA as aK,an as aL,kv as aM,wv as aN,Io as aO,He as aP,Pi as aQ,mc as aR,Db as aS,br as aT,Zw as aU,Wd as aV,Da as aW,Pa as aX,ua as aY,Hd as aZ,zd as a_,bA as aa,_A as ab,wA as ac,BA as ad,LA as ae,Zv as af,Jg as ag,PA as ah,C_ as ai,Pt as aj,Ne as ak,di as al,hl as am,Xd as an,ti as ao,Jd as ap,st as aq,we as ar,j as as,HS as at,IA as au,NA as av,OA as aw,X as ax,RA as ay,SS as az,Ly as b,G as b0,tp as b1,Zt as b2,Lb as b3,Ro as b4,fu as b5,Ji as b6,gu as b7,xA as b8,d0 as b9,il as bA,Rd as bB,ko as bC,Kw as bD,Ia as bE,qA as bF,Vw as ba,Ww as bb,BC as bc,el as bd,ww as be,Qw as bf,rn as bg,Qr as bh,la as bi,Fw as bj,fT as bk,en as bl,ha as bm,Lw as bn,Dd as bo,EC as bp,$C as bq,ar as br,Hc as bs,FC as bt,rl as bu,MC as bv,RC as bw,Jr as bx,Qe as by,Pc as bz,dt as c,lt as d,Kh as e,Tt as f,My as g,Re as h,de as i,v_ as j,Ki as k,F as l,Kd as m,mA as n,WA as o,Ey as p,$y as q,zA as r,Ay as s,__ as t,he as u,gS as v,uk as w,AA as x,jr as y,Ty as z};
|