@puddle-code/cli 0.1.9 → 0.1.10
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/CHANGELOG.md +3 -4
- package/dist/index.js +3 -2
- package/dist/public/assets/{Dashboard-BM1e1IRo.js → Dashboard-DvfD1Uxd.js} +1 -1
- package/dist/public/assets/{EditorTabClose-CNtFdbsv.js → EditorTabClose-DPUwByWC.js} +1 -1
- package/dist/public/assets/{LazyTerminal-DUhe0i1g.js → LazyTerminal-D1waFhzd.js} +2 -2
- package/dist/public/assets/{ModelRefcount-Cyy3E7YD.js → ModelRefcount-DOvazO_q.js} +1 -1
- package/dist/public/assets/PaneEditorBody-LBdwF6MH.js +553 -0
- package/dist/public/assets/{SettingsDialog-CNrX86pI.js → SettingsDialog-Wz8QQE8s.js} +1 -1
- package/dist/public/assets/{Terminal-B2mNzf_l.js → Terminal-DGmjc3oH.js} +2 -2
- package/dist/public/assets/Workspace-BV1fbSwH.js +8 -0
- package/dist/public/assets/abnfDiagram-VCTEODGH-DrU7IXaw.js +1 -0
- package/dist/public/assets/arc-BjSQqbzd.js +1 -0
- package/dist/public/assets/architecture-7GRP2DOG-D_jntaTV.js +1 -0
- package/dist/public/assets/architectureDiagram-5GKGNRK7-t9ELRICA.js +36 -0
- package/dist/public/assets/array-BifhSqXX.js +1 -0
- package/dist/public/assets/blockDiagram-I7D4REHJ-YdSPz_k5.js +129 -0
- package/dist/public/assets/{buffer-store-REUK09wT.js → buffer-store-ChloppLb.js} +3 -3
- package/dist/public/assets/c4Diagram-7LVT6UL2-CUOQ2rbu.js +38 -0
- package/dist/public/assets/channel-VzmaFbZX.js +1 -0
- package/dist/public/assets/chunk-2E4U76K2-Co6b1Y97.js +2 -0
- package/dist/public/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dist/public/assets/chunk-4HAMMTFA-BZ51_p7P.js +62 -0
- package/dist/public/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dist/public/assets/chunk-75Z2AOVW-kxCDxh6q.js +2 -0
- package/dist/public/assets/chunk-CLGD4ZFX-pSu1f4n0.js +1 -0
- package/dist/public/assets/chunk-DU6HZSFF-CCNUFaQT.js +125 -0
- package/dist/public/assets/chunk-F27PBJKO-Cmu9YLxN.js +1 -0
- package/dist/public/assets/chunk-FOHPRMQF-CdD2_EOh.js +161 -0
- package/dist/public/assets/chunk-GMAD6QVW-CYrdWVZ3.js +72 -0
- package/dist/public/assets/chunk-GVQU2GXP-eDWbw8E-.js +1 -0
- package/dist/public/assets/chunk-IMKFNOWR-BGpQKF0M.js +231 -0
- package/dist/public/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dist/public/assets/chunk-L3NEJ4N5-BWoXa-mv.js +1 -0
- package/dist/public/assets/chunk-LNGE3PJU-DNNNwF8Y.js +34 -0
- package/dist/public/assets/chunk-OSK3NFVY-DgJh1Aoq.js +10 -0
- package/dist/public/assets/chunk-P2QGCYS3-CkK7MDIt.js +1 -0
- package/dist/public/assets/chunk-POPQ4Y6H-CgNwSzsJ.js +1 -0
- package/dist/public/assets/chunk-PWAF6VOD-D1QREJv6.js +1 -0
- package/dist/public/assets/chunk-SHT3W25Y-CW83WuuF.js +168 -0
- package/dist/public/assets/chunk-SVP7TREG-D70EFjSd.js +88 -0
- package/dist/public/assets/chunk-TICWLB2K-BdLyZiK8.js +206 -0
- package/dist/public/assets/chunk-TLUHSLCS-B7jq2TOO.js +2 -0
- package/dist/public/assets/chunk-XXDRQBXY-BuE3VzE_.js +1 -0
- package/dist/public/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dist/public/assets/classDiagram-ZZMXUADV-CYpW3ppG.js +1 -0
- package/dist/public/assets/classDiagram-v2-VYDZK3BY-CYpW3ppG.js +1 -0
- package/dist/public/assets/{context-menu-c8LcYf-D.js → context-menu-DdR40Rbj.js} +1 -1
- package/dist/public/assets/cose-bilkent-JH36ORCC-aAQk09y5.js +1 -0
- package/dist/public/assets/{cssMode-NZqvaXck.js → cssMode-B00rw8A0.js} +1 -1
- package/dist/public/assets/cynefin-OW5HDTMX-CVPxUP3o.js +1 -0
- package/dist/public/assets/cynefinDiagram-5FMLGOSQ-Eoj-svLE.js +62 -0
- package/dist/public/assets/cytoscape.esm-Dic2qDnk.js +321 -0
- package/dist/public/assets/dagre-CNOzUhxk.js +1 -0
- package/dist/public/assets/dagre-GXQ25YYZ-B05PrdkZ.js +4 -0
- package/dist/public/assets/defaultLocale-C8Fc0cco.js +1 -0
- package/dist/public/assets/diagram-S7CK7UJ4-DcxmHlO1.js +30 -0
- package/dist/public/assets/diagram-UQ7AKVKN-DmVSn0-1.js +41 -0
- package/dist/public/assets/diagram-VSXAHHWV-BGultN_5.js +3 -0
- package/dist/public/assets/diagram-VX7I27RA-i6gsnYil.js +24 -0
- package/dist/public/assets/diagram-Z3DM3KII-Dk2VW9nr.js +24 -0
- package/dist/public/assets/dist-D9sYb5Oa.js +1 -0
- package/dist/public/assets/{drafts-CHfAOffT.js → drafts-qwBQG11i.js} +1 -1
- package/dist/public/assets/ebnfDiagram-PWID7BFC-ZRpPOgCS.js +1 -0
- package/dist/public/assets/erDiagram-RLTQ6QDP-C_a1ewl3.js +99 -0
- package/dist/public/assets/eventmodeling-NTZA5JFV-B1CPh3nL.js +1 -0
- package/dist/public/assets/{file-links-DJ4ZSTa-.js → file-links-C7CI8Lax.js} +1 -1
- package/dist/public/assets/flowDiagram-HODETNUW-B4hsNbjc.js +1 -0
- package/dist/public/assets/ganttDiagram-EL5Y4UJY-BQSJiQPw.js +292 -0
- package/dist/public/assets/gitGraph-4MIJSDKK-DnzqjUZ8.js +1 -0
- package/dist/public/assets/gitGraphDiagram-WWUBYQGX-DqIRXgnV.js +106 -0
- package/dist/public/assets/graphlib-DS17s2tU.js +1 -0
- package/dist/public/assets/{htmlMode-Dj8iZBJ7.js → htmlMode-BH-IJbVV.js} +1 -1
- package/dist/public/assets/index-B1vArJLa.css +2 -0
- package/dist/public/assets/{index-Bh-CbzNs.js → index-C3xMIZxV.js} +3 -3
- package/dist/public/assets/info-A6RAGUB7-D-Rg6JUN.js +1 -0
- package/dist/public/assets/infoDiagram-27XIBGKW-D2WlI0b3.js +2 -0
- package/dist/public/assets/init-D6jRqBbL.js +1 -0
- package/dist/public/assets/ishikawaDiagram-5VMMS53U-DrJpdpRY.js +70 -0
- package/dist/public/assets/journeyDiagram-3NMN7TZE-DbbEx7ZS.js +139 -0
- package/dist/public/assets/{jsonMode-DGMOJ1wP.js → jsonMode-C_Y7Ct9w.js} +1 -1
- package/dist/public/assets/kanban-definition-UXKFOSKX-CjQ2Pird.js +89 -0
- package/dist/public/assets/katex-B7rAX3Vi.js +257 -0
- package/dist/public/assets/line-Y9535-xV.js +1 -0
- package/dist/public/assets/linear-B7l8qgEw.js +1 -0
- package/dist/public/assets/media-refresh-store-ODee1w5o.js +1 -0
- package/dist/public/assets/mermaid-parser.core-CHfO7_QP.js +7 -0
- package/dist/public/assets/mermaid.core-Czw_C2pz.js +11 -0
- package/dist/public/assets/mindmap-definition-YA3MSWOX-192tJvHd.js +96 -0
- package/dist/public/assets/ordinal-hYBb2elL.js +1 -0
- package/dist/public/assets/packet-AYTQ26CC-CTuDVT1l.js +1 -0
- package/dist/public/assets/path-BWPyau1x.js +1 -0
- package/dist/public/assets/pegDiagram-XKGWAZYB-DKWuJLBr.js +1 -0
- package/dist/public/assets/pie-WAS4IAKB-hKIvAklj.js +1 -0
- package/dist/public/assets/pieDiagram-E7YTZNPT-CNnu3Gqt.js +39 -0
- package/dist/public/assets/purify.es-sLXpNpJ5.js +3 -0
- package/dist/public/assets/quadrantDiagram-AXDQQJYC-BDfukVAC.js +7 -0
- package/dist/public/assets/radar-RG4KPBEZ-znNmLflQ.js +1 -0
- package/dist/public/assets/railroad-74A4TZTK-B4mnaNAW.js +1 -0
- package/dist/public/assets/railroad-abnf-HS5TGJTU-CfsGG-fR.js +1 -0
- package/dist/public/assets/railroad-ebnf-LZEXJU2U-BmUL54vf.js +1 -0
- package/dist/public/assets/railroad-peg-WCYAUIDC-BNoPIdtK.js +1 -0
- package/dist/public/assets/railroadDiagram-O6MQD6OU-BjW5Goxg.js +1 -0
- package/dist/public/assets/requirementDiagram-BXWQKSXE-WZ7qYbwG.js +84 -0
- package/dist/public/assets/rough.esm-CSKSodPl.js +1 -0
- package/dist/public/assets/sankeyDiagram-P5KCCOFB-xfsRJbYV.js +40 -0
- package/dist/public/assets/sequenceDiagram-WJ2MYXX4-CnXOIvsD.js +162 -0
- package/dist/public/assets/{session-seed-sdkQigYG.js → session-seed-5E77o40l.js} +1 -1
- package/dist/public/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
- package/dist/public/assets/src-_wZywoZs.js +1 -0
- package/dist/public/assets/stateDiagram-D77RDMKH-BC-kRyi8.js +1 -0
- package/dist/public/assets/stateDiagram-v2-MP3YSRHH-3Xfb1SN8.js +1 -0
- package/dist/public/assets/swimlanes-42K2YHIH-DImnagTG.js +1 -0
- package/dist/public/assets/swimlanesDiagram-VR7AAH4N-isFys79B.js +8 -0
- package/dist/public/assets/timeline-definition-24CTP7MA-DxXJ2EnM.js +120 -0
- package/dist/public/assets/treeView-Q6P3EWNA-BWIPDCZv.js +1 -0
- package/dist/public/assets/treemap-WGGIJYW6-BcfuZ8Jf.js +1 -0
- package/dist/public/assets/{tsMode-DRA0sEgo.js → tsMode-BvtDJzua.js} +1 -1
- package/dist/public/assets/{use-find-controls-BN4SzWfk.js → use-find-controls-r60pZ7_h.js} +1 -1
- package/dist/public/assets/vennDiagram-4TSXK5OY-CObuiC8v.js +34 -0
- package/dist/public/assets/wardley-WFR3VGLG-M4SNYgeF.js +1 -0
- package/dist/public/assets/wardleyDiagram-VM6X3IG4-CijOXrVJ.js +78 -0
- package/dist/public/assets/xychartDiagram-S5SC5T6Z-DYuJKDDP.js +7 -0
- package/dist/public/index.html +3 -3
- package/package.json +1 -1
- package/dist/public/assets/PaneEditorBody-TJhlQjZL.js +0 -548
- package/dist/public/assets/Workspace-CG6XSaGb.js +0 -8
- package/dist/public/assets/index-RKRvjeap.css +0 -2
- package/dist/public/assets/media-refresh-store-Df-ybzK5.js +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-_wZywoZs.js";import{D as n,a as r,b as i,c as a,x as o,z as s}from"./chunk-DU6HZSFF-CCNUFaQT.js";import{t as c}from"./chunk-CLGD4ZFX-pSu1f4n0.js";var l=``,u=``,d=``,f=[],p=new Map,m=e(e=>s(e,o()),`sanitizeText`),h=e(e=>{switch(e.type){case`terminal`:return{...e,value:m(e.value)};case`nonterminal`:return{...e,name:m(e.name)};case`sequence`:return{...e,elements:e.elements.map(h)};case`choice`:return{...e,alternatives:e.alternatives.map(h)};case`optional`:return{...e,element:h(e.element)};case`repetition`:return{...e,element:h(e.element),separator:e.separator?h(e.separator):void 0};case`special`:return{...e,text:m(e.text)}}},`sanitizeAstNode`),g=e(()=>{l=``,u=``,d=``,f.length=0,p.clear(),r(),t.debug(`[Railroad] Database cleared`)},`clear`),_=e(e=>{l=m(e),t.debug(`[Railroad] Title set:`,e)},`setTitle`),v=e(()=>l,`getTitle`),y={clear:g,setTitle:_,getTitle:v,addRule:e(e=>{let n={...e,name:m(e.name),definition:h(e.definition),comment:e.comment?m(e.comment):void 0};t.debug(`[Railroad] Adding rule:`,n.name),p.has(n.name)&&t.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),f.push(n),p.set(n.name,n)},`addRule`),getRules:e(()=>f,`getRules`),getRule:e(e=>p.get(e),`getRule`),setAccTitle:e(e=>{u=m(e).replace(/^\s+/g,``),t.debug(`[Railroad] Accessibility title set:`,e)},`setAccTitle`),getAccTitle:e(()=>u,`getAccTitle`),setAccDescription:e(e=>{d=m(e).replace(/\n\s+/g,`
|
|
2
|
+
`),t.debug(`[Railroad] Accessibility description set:`,e)},`setAccDescription`),getAccDescription:e(()=>d,`getAccDescription`),setDiagramTitle:_,getDiagramTitle:v},b={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:`monospace`,terminalFill:`#FFFFC0`,terminalStroke:`#000000`,terminalTextColor:`#000000`,nonTerminalFill:`#FFFFFF`,nonTerminalStroke:`#000000`,nonTerminalTextColor:`#000000`,lineColor:`#000000`,strokeWidth:2,markerFill:`#000000`,commentFill:`#E8E8E8`,commentStroke:`#888888`,commentTextColor:`#666666`,specialFill:`#F0E0FF`,specialStroke:`#8800CC`,ruleNameColor:`#000066`,showMarkers:!0,markerRadius:5},x=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,S=/^[\w "',.-]+$/,C=new Set([`compactMode`,`padding`,`verticalSeparation`,`horizontalSeparation`,`arcRadius`,`fontSize`,`fontFamily`,`terminalFill`,`terminalStroke`,`terminalTextColor`,`nonTerminalFill`,`nonTerminalStroke`,`nonTerminalTextColor`,`lineColor`,`strokeWidth`,`markerFill`,`commentFill`,`commentStroke`,`commentTextColor`,`specialFill`,`specialStroke`,`ruleNameColor`,`showMarkers`,`markerRadius`]),w=e(e=>e?Object.keys(e).every(e=>e===`railroad`||C.has(e)):!1,`isRailroadStyleOptions`),T=e(e=>e?`railroad`in e&&e.railroad?e.railroad:w(e)?e:{}:{},`extractRailroadOverrides`),E=e(e=>{if(!e||w(e))return{};let{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},`extractThemeOverrides`),D=e((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return x.test(n)?n:t},`sanitizeColorValue`),O=e((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return S.test(n)?n:t},`sanitizeFontFamilyValue`),k=e((e,t)=>{let n=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(n)&&n>=0?n:t},`sanitizeNumberValue`),A=e(e=>{let t=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(t)&&t>0?t:void 0},`parseThemeFontSize`),j=e(e=>{let t=O(e.fontFamily,b.fontFamily),n=A(e.fontSize)??b.fontSize;return{...b,fontFamily:t,fontSize:n,terminalFill:D(e.secondBkg??e.secondaryColor,b.terminalFill),terminalStroke:D(e.secondaryBorderColor??e.lineColor,b.terminalStroke),terminalTextColor:D(e.secondaryTextColor??e.textColor,b.terminalTextColor),nonTerminalFill:D(e.mainBkg??e.background,b.nonTerminalFill),nonTerminalStroke:D(e.primaryBorderColor??e.lineColor,b.nonTerminalStroke),nonTerminalTextColor:D(e.primaryTextColor??e.textColor,b.nonTerminalTextColor),lineColor:D(e.lineColor,b.lineColor),markerFill:D(e.lineColor,b.markerFill),commentFill:D(e.labelBackground??e.tertiaryColor,b.commentFill),commentStroke:D(e.tertiaryBorderColor??e.lineColor,b.commentStroke),commentTextColor:D(e.tertiaryTextColor??e.textColor,b.commentTextColor),specialFill:D(e.tertiaryColor??e.secondaryColor,b.specialFill),specialStroke:D(e.tertiaryBorderColor??e.secondaryBorderColor,b.specialStroke),ruleNameColor:D(e.titleColor??e.textColor,b.ruleNameColor)}},`buildThemeDefaults`),M=e(e=>{let t=i(),r=j({...n(),...t.themeVariables??{},...E(e)}),a={...t.railroad??{},...T(e)};return{compactMode:a.compactMode??r.compactMode,padding:k(a.padding,r.padding),verticalSeparation:k(a.verticalSeparation,r.verticalSeparation),horizontalSeparation:k(a.horizontalSeparation,r.horizontalSeparation),arcRadius:k(a.arcRadius,r.arcRadius),fontSize:k(a.fontSize,r.fontSize),fontFamily:O(a.fontFamily,r.fontFamily),terminalFill:D(a.terminalFill,r.terminalFill),terminalStroke:D(a.terminalStroke,r.terminalStroke),terminalTextColor:D(a.terminalTextColor,r.terminalTextColor),nonTerminalFill:D(a.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:D(a.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:D(a.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:D(a.lineColor,r.lineColor),strokeWidth:k(a.strokeWidth,r.strokeWidth),markerFill:D(a.markerFill,r.markerFill),commentFill:D(a.commentFill,r.commentFill),commentStroke:D(a.commentStroke,r.commentStroke),commentTextColor:D(a.commentTextColor,r.commentTextColor),specialFill:D(a.specialFill,r.specialFill),specialStroke:D(a.specialStroke,r.specialStroke),ruleNameColor:D(a.ruleNameColor,r.ruleNameColor),showMarkers:a.showMarkers??r.showMarkers,markerRadius:k(a.markerRadius,r.markerRadius)}},`buildRailroadStyleOptions`),N=e(e=>{let{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:s,nonTerminalTextColor:c,lineColor:l,strokeWidth:u,markerFill:d,commentFill:f,commentStroke:p,commentTextColor:m,specialFill:h,specialStroke:g,ruleNameColor:_}=M(e);return`
|
|
3
|
+
.railroad-diagram {
|
|
4
|
+
font-family: ${t};
|
|
5
|
+
font-size: ${n}px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.railroad-terminal rect {
|
|
9
|
+
fill: ${r};
|
|
10
|
+
stroke: ${i};
|
|
11
|
+
stroke-width: ${u}px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.railroad-terminal text {
|
|
15
|
+
fill: ${a};
|
|
16
|
+
font-family: ${t};
|
|
17
|
+
font-size: ${n}px;
|
|
18
|
+
text-anchor: middle;
|
|
19
|
+
dominant-baseline: middle;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.railroad-nonterminal rect {
|
|
23
|
+
fill: ${o};
|
|
24
|
+
stroke: ${s};
|
|
25
|
+
stroke-width: ${u}px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.railroad-nonterminal text {
|
|
29
|
+
fill: ${c};
|
|
30
|
+
font-family: ${t};
|
|
31
|
+
font-size: ${n}px;
|
|
32
|
+
text-anchor: middle;
|
|
33
|
+
dominant-baseline: middle;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.railroad-line {
|
|
37
|
+
stroke: ${l};
|
|
38
|
+
stroke-width: ${u}px;
|
|
39
|
+
fill: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.railroad-start circle,
|
|
43
|
+
.railroad-end circle {
|
|
44
|
+
fill: ${d};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.railroad-comment ellipse {
|
|
48
|
+
fill: ${f};
|
|
49
|
+
stroke: ${p};
|
|
50
|
+
stroke-width: ${u}px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.railroad-comment text {
|
|
54
|
+
fill: ${m};
|
|
55
|
+
font-style: italic;
|
|
56
|
+
font-family: ${t};
|
|
57
|
+
font-size: ${n}px;
|
|
58
|
+
text-anchor: middle;
|
|
59
|
+
dominant-baseline: middle;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.railroad-special rect {
|
|
63
|
+
fill: ${h};
|
|
64
|
+
stroke: ${g};
|
|
65
|
+
stroke-width: ${u}px;
|
|
66
|
+
stroke-dasharray: 5,3;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.railroad-special text {
|
|
70
|
+
fill: ${c};
|
|
71
|
+
font-family: ${t};
|
|
72
|
+
font-size: ${n}px;
|
|
73
|
+
text-anchor: middle;
|
|
74
|
+
dominant-baseline: middle;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.railroad-rule-name {
|
|
78
|
+
font-weight: bold;
|
|
79
|
+
fill: ${_};
|
|
80
|
+
font-family: ${t};
|
|
81
|
+
font-size: ${n}px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.railroad-group {
|
|
85
|
+
/* Grouping container, no specific styles */
|
|
86
|
+
}
|
|
87
|
+
`},`getStyles`),P=class{constructor(){this.d=``}static{e(this,`PathBuilder`)}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${+!!r} ${+!!i} ${a} ${o} `,this}build(){return this.d.trim()}},F=class{constructor(e,t=M()){this.textCache=new Map,this.svg=e,this.config=t}static{e(this,`RailroadRenderer`)}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let t=this.svg.append(`text`).attr(`font-family`,this.config.fontFamily).attr(`font-size`,this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-terminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i).attr(`rx`,10).attr(`ry`,10),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-nonterminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){let n=t.map(t=>this.renderExpression(e,t)),r=0,i=0,a=0;for(let e of n)r+=e.dimensions.width,i=Math.max(i,e.dimensions.up),a=Math.max(a,e.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;let o=e.append(`g`).attr(`class`,`railroad-sequence`),s=0;for(let e=0;e<n.length;e++){let t=n[e],r=i-t.dimensions.up;if(o.node().appendChild(t.element).setAttribute(`transform`,`translate(${s}, ${r})`),e<n.length-1){let e=s+t.dimensions.width,n=e+this.config.horizontalSeparation,r=i;o.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(e,r).lineTo(n,r).build())}s+=t.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:r,height:i+a,up:i,down:a}}}renderChoice(e,t){let n=t.map(t=>this.renderExpression(e,t)),r=0,i=0;for(let e of n)r=Math.max(r,e.dimensions.width),i+=e.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;let a=this.config.arcRadius,o=a*4,s=r+o,c=e.append(`g`).attr(`class`,`railroad-choice`),l=0,u=i/2;for(let e of n){let t=l,n=t+e.dimensions.up,i=a*2+(r-e.dimensions.width)/2;c.node().appendChild(e.element).setAttribute(`transform`,`translate(${i}, ${t})`);let o=new P,d=n>u;n===u?o.moveTo(0,u).lineTo(i,n):o.moveTo(0,u).arcTo(a,a,0,!1,d,a,u+(d?a:-a)).lineTo(a,n-(d?a:-a)).arcTo(a,a,0,!1,!d,a*2,n).lineTo(i,n),c.append(`path`).attr(`class`,`railroad-line`).attr(`d`,o.build());let f=new P,p=i+e.dimensions.width,m=s-a*2;n===u?f.moveTo(p,n).lineTo(s,u):f.moveTo(p,n).lineTo(m,n).arcTo(a,a,0,!1,!d,s-a,n+(d?-a:a)).lineTo(s-a,u+(d?a:-a)).arcTo(a,a,0,!1,d,s,u),c.append(`path`).attr(`class`,`railroad-line`).attr(`d`,f.build()),l+=e.dimensions.height+this.config.verticalSeparation}return{element:c.node(),dimensions:{width:s,height:i,up:u,down:i-u}}}renderOptional(e,t){let n=this.renderExpression(e,t),r=this.config.arcRadius,i=r*2,a=n.dimensions.width+r*4,o=n.dimensions.height+i,s=e.append(`g`).attr(`class`,`railroad-optional`),c=r*2,l=i;s.node().appendChild(n.element).setAttribute(`transform`,`translate(${c}, ${l})`);let u=l+n.dimensions.up,d=new P().moveTo(0,u).lineTo(r*2,u);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,d.build());let f=new P().moveTo(c+n.dimensions.width,u).lineTo(a,u);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,f.build());let p=new P().moveTo(0,u).arcTo(r,r,0,!1,!1,r,u-r).lineTo(r,r).arcTo(r,r,0,!1,!0,r*2,0).lineTo(a-r*2,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,u-r).arcTo(r,r,0,!1,!1,a,u);return s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,p.build()),{element:s.node(),dimensions:{width:a,height:o,up:u,down:o-u}}}renderRepetition(e,t,n){let r=this.renderExpression(e,t),i=this.config.arcRadius,a=i*2,o=r.dimensions.width+i*4,s=n===0,c=r.dimensions.height+a+(s?a:0),l=e.append(`g`).attr(`class`,`railroad-repetition`),u=i*2,d=s?a:0;l.node().appendChild(r.element).setAttribute(`transform`,`translate(${u}, ${d})`);let f=d+r.dimensions.up;l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(0,f).lineTo(i*2,f).build()),l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(u+r.dimensions.width,f).lineTo(o,f).build());let p=d+r.dimensions.height+i,m=new P().moveTo(u+r.dimensions.width,f).arcTo(i,i,0,!1,!0,u+r.dimensions.width+i,f+i).lineTo(u+r.dimensions.width+i,p).arcTo(i,i,0,!1,!0,u+r.dimensions.width,p+i).lineTo(i*2,p+i).arcTo(i,i,0,!1,!0,i,p).lineTo(i,f+i).arcTo(i,i,0,!1,!0,i*2,f);if(l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,m.build()),s){let e=new P().moveTo(0,f).arcTo(i,i,0,!1,!1,i,f-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,f-i).arcTo(i,i,0,!1,!1,o,f);l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,e.build())}return{element:l.node(),dimensions:{width:o,height:c,up:f,down:c-f}}}renderSpecial(e,t){let n=this.measureText(`? `+t+` ?`),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-special`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(`? `+t+` ?`),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case`terminal`:return this.renderTerminal(e,t.value);case`nonterminal`:return this.renderNonTerminal(e,t.name);case`sequence`:return this.renderSequence(e,t.elements);case`choice`:return this.renderChoice(e,t.alternatives);case`optional`:return this.renderOptional(e,t.element);case`repetition`:return this.renderRepetition(e,t.element,t.min);case`special`:return this.renderSpecial(e,t.text);default:throw Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){let n=this.svg.append(`g`).attr(`class`,`railroad-rule`).attr(`transform`,`translate(0, ${t})`),r=e.name+` =`,i=this.measureText(r).width+20,a=i+20,o=n.append(`g`),s=this.renderExpression(o,e.definition),c=Math.max(20,s.dimensions.up),l=c-s.dimensions.up;return o.attr(`transform`,`translate(${a}, ${l})`),n.append(`g`).attr(`class`,`railroad-rule-name-group`).append(`text`).attr(`class`,`railroad-rule-name`).attr(`x`,0).attr(`y`,c).text(r),n.append(`g`).attr(`class`,`railroad-start`).append(`circle`).attr(`cx`,i).attr(`cy`,c).attr(`r`,this.config.markerRadius),n.append(`g`).attr(`class`,`railroad-end`).append(`circle`).attr(`cx`,a+s.dimensions.width+10).attr(`cy`,c).attr(`r`,this.config.markerRadius),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(i+this.config.markerRadius,c).lineTo(a,c).build()),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(a+s.dimensions.width,c).lineTo(a+s.dimensions.width+10-this.config.markerRadius,c).build()),{height:Math.max(40,l+s.dimensions.height+this.config.padding*2),width:a+s.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(let r of e){let e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+this.config.padding*2,height:t+this.config.padding}}},I=e((e,t,n)=>{a(e,t.height,t.width,n),e.attr(`viewBox`,`0 0 ${t.width} ${t.height}`)},`configureRailroadSvgSize`),L={draw:e((e,n,r)=>{t.debug(`[Railroad] Rendering diagram
|
|
88
|
+
`+e);try{let e=c(n);e.attr(`class`,`railroad-diagram`);let r=i().railroad?.useMaxWidth??!0,a=y.getRules();if(t.debug(`[Railroad] Rendering ${a.length} rules`),a.length===0){t.warn(`[Railroad] No rules to render`),I(e,{height:100,width:200},r);return}I(e,new F(e,M()).renderDiagram(a),r),t.debug(`[Railroad] Render complete`)}catch(e){throw t.error(`[Railroad] Render error:`,e),e}},`draw`)};export{N as n,L as r,y as t};
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-_wZywoZs.js";import{H as r,K as i,M as a,U as o,a as s,s as c,v as l,w as u,x as d,y as f,z as p}from"./chunk-DU6HZSFF-CCNUFaQT.js";import{t as m}from"./purify.es-sLXpNpJ5.js";import{c as h,g}from"./chunk-75Z2AOVW-kxCDxh6q.js";import{t as _}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as v}from"./chunk-F27PBJKO-Cmu9YLxN.js";import{t as y}from"./chunk-XXDRQBXY-BuE3VzE_.js";import{t as b}from"./chunk-POPQ4Y6H-CgNwSzsJ.js";import{r as x,t as S}from"./chunk-TLUHSLCS-B7jq2TOO.js";var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],ee=[1,63],P=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(D,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,19],{22:[1,50]}),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),{34:[1,51]},{36:[1,52]},t(O,[2,33]),t(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:ee,74:P}),{39:[1,65]},t(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(O,[2,65]),t(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),t(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},t(L,[2,133]),t(L,[2,134]),t(L,[2,135]),t(L,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},t(O,[2,20]),t(O,[2,31]),t(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:ee,74:P},t(O,[2,64]),{67:93,73:ee,74:P},t(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),t(z,[2,84]),t(z,[2,85]),t(z,[2,86]),t(z,[2,87]),t(z,[2,88]),t(ne,[2,89]),t(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},t(F,[2,72]),t(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},t(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},t(I,[2,16]),t(I,[2,17]),t(I,[2,18]),{11:127,12:ie,39:[2,36]},t(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),t(X,[2,10]),t(ae,[2,55],{11:131,12:ie}),t(D,[2,7]),{9:[1,132]},t(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},t(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),t(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(F,[2,48],{39:[1,142]}),{41:[1,143]},t(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},t(O,[2,91],{13:[1,147]}),t(O,[2,93],{13:[1,149],77:[1,148]}),t(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(O,[2,105],{61:oe}),t(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(Q,[2,109]),t(Q,[2,111]),t(Q,[2,112]),t(Q,[2,113]),t(Q,[2,114]),t(Q,[2,115]),t(Q,[2,116]),t(Q,[2,117]),t(Q,[2,118]),t(Q,[2,119]),t(O,[2,106]),t(F,[2,71]),t(O,[2,73],{61:oe}),{60:[1,155]},t(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},t(X,[2,12]),t(ae,[2,56]),{1:[2,4]},t(Z,[2,69]),t(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},t(R,[2,80]),t(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},t(F,[2,49]),{41:[2,62]},t(F,[2,52],{39:[1,164]}),t(O,[2,60]),t(O,[2,92]),t(O,[2,94]),t(O,[2,95],{77:[1,165]}),t(O,[2,98]),t(O,[2,99],{13:[1,166]}),t(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},t(Q,[2,110]),t(re,[2,75]),{14:[1,170]},t(X,[2,11]),t(Z,[2,70]),t(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},t(O,[2,96]),t(O,[2,100]),t(O,[2,102]),t(O,[2,103],{77:[1,174]}),t(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(ae,[2,8]),t(F,[2,51]),{41:[1,175]},t(F,[2,54]),t(O,[2,104]),t(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
|
|
2
|
+
`+h.showPosition()+`
|
|
3
|
+
Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ce.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
|
|
5
|
+
`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin(`acc_title`),33;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),35;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return`EDGE_STATE`;case 18:this.begin(`callback_name`);break;case 19:this.popState();break;case 20:this.popState(),this.begin(`callback_args`);break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return`STR`;case 26:this.begin(`string`);break;case 27:return 82;case 28:return 57;case 29:return this.begin(`namespace`),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin(`namespace-body`),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return`EOF_IN_STRUCT`;case 36:return 8;case 37:break;case 38:return`EDGE_STATE`;case 39:return this.begin(`class`),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin(`class-body`),39;case 44:return this.popState(),41;case 45:return`EOF_IN_STRUCT`;case 46:return`EDGE_STATE`;case 47:return`OPEN_IN_STRUCT`;case 48:break;case 49:return`MEMBER`;case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return`GENERICTYPE`;case 61:this.begin(`generic`);break;case 62:this.popState();break;case 63:return`BQUOTE_STR`;case 64:this.begin(`bqstring`);break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return`PLUS`;case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return`EQUALS`;case 89:return`EQUALS`;case 90:return 60;case 91:return 12;case 92:return 14;case 93:return`PUNCTUATION`;case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}}})();function $(){this.yy={}}return e($,`Parser`),$.prototype=ce,ce.Parser=$,new $})();C.parser=C;var w=C,T=[`#`,`+`,`~`,`-`,``],E=class{static{e(this,`ClassMember`)}constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=p(e,d());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+a(this.id);this.memberType===`method`&&(e+=`(${a(this.parameters.trim())})`,this.returnType&&(e+=` : `+a(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t=``;if(this.memberType===`method`){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(n){let e=n[1]?n[1].trim():``;if(T.includes(e)&&(this.visibility=e),this.id=n[2],this.parameters=n[3]?n[3].trim():``,t=n[4]?n[4].trim():``,this.returnType=n[5]?n[5].trim():``,t===``){let e=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(e)&&(t=e,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,r=e.substring(0,1),i=e.substring(n-1);T.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(t=i),this.id=e.substring(this.visibility===``?0:1,t===``?n:n-1)}this.classifier=t,this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim();let n=`${this.visibility?`\\`+this.visibility:``}${a(this.id)}${this.memberType===`method`?`(${a(this.parameters)})${this.returnType?` : `+a(this.returnType):``}`:``}`;this.text=n.replaceAll(`<`,`<`).replaceAll(`>`,`>`),this.text.startsWith(`\\<`)&&(this.text=this.text.replace(`\\<`,`~`))}parseClassifier(){switch(this.classifier){case`*`:return`font-style:italic;`;case`$`:return`text-decoration:underline;`;default:return``}}},D=`classId-`,O=0,k=e(e=>c.sanitizeText(e,d()),`sanitizeText`),A=class a{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=e(e=>{let t=v();n(e).select(`svg`).selectAll(`g`).filter(function(){return n(this).attr(`title`)!==null}).on(`mouseover`,e=>{let r=n(e.currentTarget),i=r.attr(`title`);if(!i)return;let a=e.currentTarget.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.html(m.sanitize(i)).style(`left`,`${window.scrollX+a.left+a.width/2}px`).style(`top`,`${window.scrollY+a.bottom+4}px`),r.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),n(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=o,this.getAccTitle=f,this.setAccDescription=r,this.getAccDescription=l,this.setDiagramTitle=i,this.getDiagramTitle=u,this.getConfig=e(()=>d().class,`getConfig`),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{e(this,`ClassDB`)}splitClassNameAndType(e){let t=c.sanitizeText(e,d()),n=``,r=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);r=k(e[0]),n=k(e[1])}return{className:r,type:n}}setClassLabel(e,t){let n=c.sanitizeText(e,d());t&&=k(t);let{className:r}=this.splitClassNameAndType(n);this.classes.get(r).label=t,this.classes.get(r).text=`${t}${this.classes.get(r).type?`<${this.classes.get(r).type}>`:``}`}addClass(e){let t=c.sanitizeText(e,d()),{className:n,type:r}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let i=c.sanitizeText(n,d());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`<${r}>`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:D+i+`-`+O}),O++}addInterface(e,t){let n={id:`interface${this.interfaces.length}`,label:e,classId:t};this.interfaces.push(n)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){let t=c.sanitizeText(e,d());if(this.classes.has(t)){let e=this.classes.get(t).domId;return this.diagramId?`${this.diagramId}-${e}`:e}throw Error(`Class not found: `+t)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.direction=`TB`,s()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){let t=typeof e==`number`?`note${e}`:e;return this.notes.get(t)}getNotes(){return this.notes}addRelation(e){t.debug(`Adding relation: `+JSON.stringify(e));let n=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!n.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!n.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=c.sanitizeText(e.relationTitle1.trim(),d()),e.relationTitle2=c.sanitizeText(e.relationTitle2.trim(),d()),this.relations.push(e)}addAnnotation(e,t){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(t)}addMember(e,t){this.addClass(e);let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);if(typeof t==`string`){let e=t.trim();e.startsWith(`<<`)&&e.endsWith(`>>`)?r.annotations.push(k(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new E(e,`method`)):e&&r.members.push(new E(e,`attribute`))}}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(e,t){let n=this.notes.size,r={id:`note${n}`,class:t,text:e,index:n};return this.notes.set(r.id,r),r.id}cleanupLabel(e){return e.startsWith(`:`)&&(e=e.substring(1)),k(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=D+n),n=this.splitClassNameAndType(n).className;let r=this.classes.get(n);r&&(r.cssClasses+=` `+t)})}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),t&&t.forEach(t=>{if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.classes.forEach(e=>{e.cssClasses.includes(n)&&e.styles.push(...t.flatMap(e=>e.split(`,`)))})}}setTooltip(e,t){e.split(`,`).forEach(e=>{if(t!==void 0){let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);r&&(r.tooltip=k(t))}})}getTooltip(e,t){return t&&this.namespaces.has(t)?this.namespaces.get(t).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,t,n){let r=d();e.split(`,`).forEach(e=>{let i=e;/\d/.exec(e[0])&&(i=D+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.link=g.formatUrl(t,r),r.securityLevel===`sandbox`?a.linkTarget=`_top`:typeof n==`string`?a.linkTarget=k(n):a.linkTarget=`_blank`)}),this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFunc(e,t,n);let r=this.splitClassNameAndType(e).className,i=this.classes.get(r);i&&(i.haveCallback=!0)}),this.setCssClass(e,`clickable`)}setClickFunc(e,t,n){let r=c.sanitizeText(e,d());if(d().securityLevel!==`loose`||t===void 0)return;let i=this.splitClassNameAndType(r).className;if(this.classes.has(i)){let e=[];if(typeof n==`string`){e=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<e.length;t++){let n=e[t].trim();n.startsWith(`"`)&&n.endsWith(`"`)&&(n=n.substr(1,n.length-2)),e[t]=n}}e.length===0&&e.push(i),this.functions.push(()=>{let n=this.lookUpDomId(i),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{g.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){let n=t.at(-1);return n?`${n}.${e}`:e}static getAncestorIds(e){let t=e.split(`.`),n=Array(t.length);n[0]=t[0];for(let e=1;e<t.length;e++)n[e]=`${n[e-1]}.${t[e]}`;return n}createNamespaceNode(e,t,n,r=!1){return{id:e,label:t,classes:new Map,notes:new Map,children:new Map,domId:D+e+`-`+this.namespaceCounter++,parent:n,explicit:r}}linkParentChild(e,t){let n=this.namespaces.get(e),r=this.namespaces.get(t);!n||!r||(n.children.has(t)||n.children.set(t,r),r.parent??=e)}addNamespace(e,t){let n=a.resolveQualifiedId(e,this.namespaceStack);if(this.namespaceStack.push(n),this.namespaces.has(n)){let e=this.namespaces.get(n);return e.explicit=!0,t&&(e.label=t),n}let r=n.split(`.`),i=a.getAncestorIds(n);for(let e=0;e<i.length;e++){let n=i[e],a=e>0?i[e-1]:void 0,o=e===i.length-1,s=o&&t?t:r[e];this.namespaces.has(n)?o&&(this.namespaces.get(n).explicit=!0):this.namespaces.set(n,this.createNamespaceNode(n,s,a,o)),a&&this.linkParentChild(a,n)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,n){if(this.namespaces.has(e)){for(let n of t){let{className:t}=this.splitClassNameAndType(n),r=this.getClass(t);r.parent=e,this.namespaces.get(e).classes.set(t,r)}for(let t of n){let n=this.getNote(t);n.parent=e,this.namespaces.get(e).notes.set(t,n)}}}setCssStyle(e,t){let n=this.classes.get(e);if(!(!t||!n))for(let e of t)e.includes(`,`)?n.styles.push(...e.split(`,`)):n.styles.push(e)}getArrowMarker(e){let t;switch(e){case 0:t=`aggregation`;break;case 1:t=`extension`;break;case 2:t=`composition`;break;case 3:t=`dependency`;break;case 4:t=`lollipop`;break;default:t=`none`}return t}resolveExplicitAncestor(e){let t=e;for(;t;){let e=this.namespaces.get(t);if(!e)return;if(e.explicit)return t;t=e.parent}}getData(){let e=[],t=[],n=d(),r=n.class?.hierarchicalNamespaces??!0;for(let t of this.namespaces.values()){if(!r&&!t.explicit)continue;let i={id:t.id,label:r?t.label:t.id,isGroup:!0,padding:n.class.padding??16,shape:`rect`,cssStyles:[],look:n.look,parentId:r?t.parent:void 0};e.push(i)}for(let t of this.classes.values()){let i=r?t.parent:this.resolveExplicitAncestor(t.parent),a={...t,type:void 0,isGroup:!1,parentId:i,look:n.look};e.push(a)}for(let i of this.notes.values()){let a=r?i.parent:this.resolveExplicitAncestor(i.parent),o={id:i.id,label:i.text,isGroup:!1,shape:`note`,padding:n.class.padding??6,cssStyles:[`text-align: left`,`white-space: nowrap`,`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:a,labelType:`markdown`};e.push(o);let s=this.classes.get(i.class)?.id;if(s){let e={id:`edgeNote${i.index}`,start:i.id,end:s,type:`normal`,thickness:`normal`,classes:`relation`,arrowTypeStart:`none`,arrowTypeEnd:`none`,arrowheadStyle:``,labelStyle:[``],style:[`fill: none`],pattern:`dotted`,look:n.look};t.push(e)}}for(let t of this.interfaces){let r={id:t.id,label:t.label,isGroup:!1,shape:`rect`,cssStyles:[`opacity: 0;`],look:n.look};e.push(r)}let i=0;for(let e of this.relations){i++;let r={id:h(e.id1,e.id2,{prefix:`id`,counter:i}),start:e.id1,end:e.id2,type:`normal`,label:e.title,labelpos:`c`,thickness:`normal`,classes:`relation`,arrowTypeStart:this.getArrowMarker(e.relation.type1),arrowTypeEnd:this.getArrowMarker(e.relation.type2),startLabelRight:e.relationTitle1===`none`?``:e.relationTitle1,endLabelLeft:e.relationTitle2===`none`?``:e.relationTitle2,arrowheadStyle:``,labelStyle:[`display: inline-block`],style:e.style||``,pattern:e.relation.lineType==1?`dashed`:`solid`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.getDirection()}}},j=e(e=>`g.classGroup text {
|
|
7
|
+
fill: ${e.nodeBorder||e.classText};
|
|
8
|
+
stroke: none;
|
|
9
|
+
font-family: ${e.fontFamily};
|
|
10
|
+
font-size: 10px;
|
|
11
|
+
|
|
12
|
+
.title {
|
|
13
|
+
font-weight: bolder;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.cluster-label text {
|
|
19
|
+
fill: ${e.titleColor};
|
|
20
|
+
}
|
|
21
|
+
.cluster-label span {
|
|
22
|
+
color: ${e.titleColor};
|
|
23
|
+
}
|
|
24
|
+
.cluster-label span p {
|
|
25
|
+
background-color: transparent;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.cluster rect {
|
|
29
|
+
fill: ${e.clusterBkg};
|
|
30
|
+
stroke: ${e.clusterBorder};
|
|
31
|
+
stroke-width: 1px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.cluster text {
|
|
35
|
+
fill: ${e.titleColor};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.cluster span {
|
|
39
|
+
color: ${e.titleColor};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.nodeLabel, .edgeLabel {
|
|
43
|
+
color: ${e.classText};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.noteLabel .nodeLabel, .noteLabel .edgeLabel {
|
|
47
|
+
color: ${e.noteTextColor};
|
|
48
|
+
}
|
|
49
|
+
.edgeLabel .label rect {
|
|
50
|
+
fill: ${e.mainBkg};
|
|
51
|
+
}
|
|
52
|
+
.label text {
|
|
53
|
+
fill: ${e.classText};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.labelBkg {
|
|
57
|
+
background: ${e.mainBkg};
|
|
58
|
+
}
|
|
59
|
+
.edgeLabel .label span {
|
|
60
|
+
background: ${e.mainBkg};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.classTitle {
|
|
64
|
+
font-weight: bolder;
|
|
65
|
+
}
|
|
66
|
+
.node rect,
|
|
67
|
+
.node circle,
|
|
68
|
+
.node ellipse,
|
|
69
|
+
.node polygon,
|
|
70
|
+
.node path {
|
|
71
|
+
fill: ${e.mainBkg};
|
|
72
|
+
stroke: ${e.nodeBorder};
|
|
73
|
+
stroke-width: ${e.strokeWidth};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
.divider {
|
|
78
|
+
stroke: ${e.nodeBorder};
|
|
79
|
+
stroke-width: 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
g.clickable {
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
g.classGroup rect {
|
|
87
|
+
fill: ${e.mainBkg};
|
|
88
|
+
stroke: ${e.nodeBorder};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
g.classGroup line {
|
|
92
|
+
stroke: ${e.nodeBorder};
|
|
93
|
+
stroke-width: 1;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.classLabel .box {
|
|
97
|
+
stroke: none;
|
|
98
|
+
stroke-width: 0;
|
|
99
|
+
fill: ${e.mainBkg};
|
|
100
|
+
opacity: 0.5;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.classLabel .label {
|
|
104
|
+
fill: ${e.nodeBorder};
|
|
105
|
+
font-size: 10px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.relation {
|
|
109
|
+
stroke: ${e.lineColor};
|
|
110
|
+
stroke-width: ${e.strokeWidth};
|
|
111
|
+
fill: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.dashed-line{
|
|
115
|
+
stroke-dasharray: 3;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.dotted-line{
|
|
119
|
+
stroke-dasharray: 1 2;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[id$="-compositionStart"], .composition {
|
|
123
|
+
fill: ${e.lineColor} !important;
|
|
124
|
+
stroke: ${e.lineColor} !important;
|
|
125
|
+
stroke-width: 1;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[id$="-compositionEnd"], .composition {
|
|
129
|
+
fill: ${e.lineColor} !important;
|
|
130
|
+
stroke: ${e.lineColor} !important;
|
|
131
|
+
stroke-width: 1;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[id$="-dependencyStart"], .dependency {
|
|
135
|
+
fill: ${e.lineColor} !important;
|
|
136
|
+
stroke: ${e.lineColor} !important;
|
|
137
|
+
stroke-width: 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
[id$="-dependencyEnd"], .dependency {
|
|
141
|
+
fill: ${e.lineColor} !important;
|
|
142
|
+
stroke: ${e.lineColor} !important;
|
|
143
|
+
stroke-width: 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
[id$="-extensionStart"], .extension {
|
|
147
|
+
fill: transparent !important;
|
|
148
|
+
stroke: ${e.lineColor} !important;
|
|
149
|
+
stroke-width: 1;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
[id$="-extensionEnd"], .extension {
|
|
153
|
+
fill: transparent !important;
|
|
154
|
+
stroke: ${e.lineColor} !important;
|
|
155
|
+
stroke-width: 1;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[id$="-aggregationStart"], .aggregation {
|
|
159
|
+
fill: transparent !important;
|
|
160
|
+
stroke: ${e.lineColor} !important;
|
|
161
|
+
stroke-width: 1;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
[id$="-aggregationEnd"], .aggregation {
|
|
165
|
+
fill: transparent !important;
|
|
166
|
+
stroke: ${e.lineColor} !important;
|
|
167
|
+
stroke-width: 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
[id$="-lollipopStart"], .lollipop {
|
|
171
|
+
fill: ${e.mainBkg} !important;
|
|
172
|
+
stroke: ${e.lineColor} !important;
|
|
173
|
+
stroke-width: 1;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
[id$="-lollipopEnd"], .lollipop {
|
|
177
|
+
fill: ${e.mainBkg} !important;
|
|
178
|
+
stroke: ${e.lineColor} !important;
|
|
179
|
+
stroke-width: 1;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.edgeTerminals {
|
|
183
|
+
font-size: 11px;
|
|
184
|
+
line-height: initial;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.classTitleText {
|
|
188
|
+
text-anchor: middle;
|
|
189
|
+
font-size: 18px;
|
|
190
|
+
fill: ${e.textColor};
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.edgeLabel[data-look="neo"] {
|
|
194
|
+
background-color: ${e.edgeLabelBackground};
|
|
195
|
+
p {
|
|
196
|
+
background-color: ${e.edgeLabelBackground};
|
|
197
|
+
}
|
|
198
|
+
rect {
|
|
199
|
+
opacity: 0.5;
|
|
200
|
+
background-color: ${e.edgeLabelBackground};
|
|
201
|
+
fill: ${e.edgeLabelBackground};
|
|
202
|
+
}
|
|
203
|
+
text-align: center;
|
|
204
|
+
}
|
|
205
|
+
${_()}
|
|
206
|
+
`,`getStyles`),M={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,n,r,i){t.info(`REF0:`),t.info(`Drawing class diagram (v3)`,n);let{securityLevel:a,state:o,layout:s}=d();i.db.setDiagramId(n);let c=i.db.getData(),l=y(n,a);c.type=i.type,c.layoutAlgorithm=S(s),c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`],c.diagramId=n,await x(c,l),g.insertTitle(l,`classDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),b(l,8,`classDiagram`,o?.useMaxWidth??!0)},`draw`),getDir:e((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`)};export{j as i,w as n,M as r,A as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-GXQ25YYZ-B05PrdkZ.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-_wZywoZs.js","assets/rolldown-runtime-QTnfLwEv.js","assets/chunk-DU6HZSFF-CCNUFaQT.js","assets/preload-helper-Czpn1I53.js","assets/purify.es-sLXpNpJ5.js","assets/chunk-75Z2AOVW-kxCDxh6q.js","assets/dist-D9sYb5Oa.js","assets/chunk-PWAF6VOD-D1QREJv6.js","assets/chunk-GMAD6QVW-CYrdWVZ3.js","assets/chunk-P2QGCYS3-CkK7MDIt.js","assets/chunk-4HAMMTFA-BZ51_p7P.js","assets/rough.esm-CSKSodPl.js","assets/chunk-GVQU2GXP-eDWbw8E-.js","assets/chunk-OSK3NFVY-DgJh1Aoq.js","assets/line-Y9535-xV.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/graphlib-DS17s2tU.js","assets/dagre-CNOzUhxk.js","assets/chunk-L3NEJ4N5-BWoXa-mv.js","assets/chunk-2E4U76K2-Co6b1Y97.js","assets/swimlanes-42K2YHIH-DImnagTG.js","assets/cose-bilkent-JH36ORCC-aAQk09y5.js","assets/cytoscape.esm-Dic2qDnk.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./preload-helper-Czpn1I53.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-_wZywoZs.js";import{b as r,s as i}from"./chunk-DU6HZSFF-CCNUFaQT.js";import{d as a}from"./chunk-75Z2AOVW-kxCDxh6q.js";import{a as o}from"./chunk-4HAMMTFA-BZ51_p7P.js";import{r as s}from"./chunk-GVQU2GXP-eDWbw8E-.js";import{a as c,c as l,i as u,s as d}from"./chunk-OSK3NFVY-DgJh1Aoq.js";import{n as f}from"./chunk-L3NEJ4N5-BWoXa-mv.js";var p={common:i,getConfig:r,insertCluster:f,insertEdge:u,insertEdgeLabel:c,insertMarkers:d,insertNode:s,interpolateToCurve:a,labelHelper:o,log:n,positionEdgeLabel:l},m={},h=t(e=>{for(let t of e)m[t.name]=t},`registerLayoutLoaders`);t(()=>{h([{name:`dagre`,loader:t(async()=>await e(()=>import(`./dagre-GXQ25YYZ-B05PrdkZ.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./swimlanes-42K2YHIH-DImnagTG.js`),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,21,22,19])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./cose-bilkent-JH36ORCC-aAQk09y5.js`),__vite__mapDeps([24,3,1,2,25])),`loader`)}])},`registerDefaultLayoutLoaders`)();var g=t(async(e,t)=>{if(!(e.layoutAlgorithm in m))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=m[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,p,{algorithm:n.algorithm})},`render`),_=t((e=``,{fallback:t=`dagre`}={})=>{if(e in m)return e;if(t in m)return n.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);export{h as n,g as r,_ as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-_wZywoZs.js";var n=e((e,n)=>{let r;return n===`sandbox`&&(r=t(`#i`+e)),t(n===`sandbox`?r.nodes()[0].contentDocument.body:`body`).select(`[id="${e}"]`)},`getDiagramElement`);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=(t,n)=>e(t,`name`,{value:n,configurable:!0}),n=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})};export{t as n,n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-CCNUFaQT.js";import"./chunk-75Z2AOVW-kxCDxh6q.js";import"./chunk-PWAF6VOD-D1QREJv6.js";import"./chunk-GMAD6QVW-CYrdWVZ3.js";import"./chunk-P2QGCYS3-CkK7MDIt.js";import"./chunk-4HAMMTFA-BZ51_p7P.js";import"./chunk-GVQU2GXP-eDWbw8E-.js";import"./chunk-OSK3NFVY-DgJh1Aoq.js";import"./chunk-F27PBJKO-Cmu9YLxN.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-CgNwSzsJ.js";import"./chunk-L3NEJ4N5-BWoXa-mv.js";import"./chunk-TLUHSLCS-B7jq2TOO.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-BdLyZiK8.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-_wZywoZs.js";import"./chunk-DU6HZSFF-CCNUFaQT.js";import"./chunk-75Z2AOVW-kxCDxh6q.js";import"./chunk-PWAF6VOD-D1QREJv6.js";import"./chunk-GMAD6QVW-CYrdWVZ3.js";import"./chunk-P2QGCYS3-CkK7MDIt.js";import"./chunk-4HAMMTFA-BZ51_p7P.js";import"./chunk-GVQU2GXP-eDWbw8E-.js";import"./chunk-OSK3NFVY-DgJh1Aoq.js";import"./chunk-F27PBJKO-Cmu9YLxN.js";import"./chunk-XXDRQBXY-BuE3VzE_.js";import"./chunk-POPQ4Y6H-CgNwSzsJ.js";import"./chunk-L3NEJ4N5-BWoXa-mv.js";import"./chunk-TLUHSLCS-B7jq2TOO.js";import{i as t,n,r,t as i}from"./chunk-TICWLB2K-BdLyZiK8.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n,t as r}from"./createLucideIcon-C6JENrH3.js";import{A as i,C as a,D as o,S as s,T as c,_ as l,b as u,d,f,g as p,k as m,m as h,p as g,v as _,w as v,x as y,y as b}from"./dialog-DI1-uj7G.js";import{_ as ee,g as x,h as S,m as C,p as w,v as T,y as E}from"./LazyTerminal-DUhe0i1g.js";import{n as D}from"./x-C-HTKvar.js";import{n as O,r as k,t as te}from"./dist-CKuo36qW.js";var A=r(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),j=r(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]);function ne(e){let t=Date.parse(e.created_at);return Number.isNaN(t)?0:t}function M(e,t){let n=new Map(t.map((e,t)=>[e,t])),r=[],i=[];for(let t of e)(n.has(t.id)?r:i).push(t);return r.sort((e,t)=>n.get(e.id)-n.get(t.id)),i.sort((e,t)=>ne(t)-ne(e)),[...i,...r]}function N(e,t,n){if(t===n)return[...e];let r=e.filter(e=>e!==t),i=r.indexOf(n);return i===-1?[...e]:(r.splice(i,0,t),r)}function P(e,t,n){if(t===n)return null;let r=e.find(e=>e.sessions.some(e=>e.id===t));if(!r||!r.sessions.some(e=>e.id===n))return null;let i=e.flatMap(e=>e.sessions.map(e=>e.id)),a=N(i,t,n);return a.some((e,t)=>e!==i[t])?a:null}function re(e,t){let n=new Set(e);return[...e,...t.filter(e=>!n.has(e))]}var F=e(t(),1),I=!1;function ie(){let[e,t]=F.useState(I);return F.useEffect(()=>{I||(I=!0,t(!0))},[]),e}var L=F.useSyncExternalStore;function ae(){return()=>{}}function oe(){return L(ae,()=>!0,()=>!1)}var se=typeof L==`function`?oe:ie,R=n(),ce=`rovingFocusGroup.onEntryFocus`,le={bubbles:!1,cancelable:!0},z=`RovingFocusGroup`,[ue,de,fe]=O(z),[pe,me]=o(z,[fe]),[he,ge]=pe(z),_e=F.forwardRef((e,t)=>(0,R.jsx)(ue.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(ue.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(ve,{...e,ref:t})})}));_e.displayName=z;var ve=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...g}=e,_=F.useRef(null),v=m(t,_),y=te(c),[b,ee]=p({prop:l,defaultProp:u??null,onChange:d,caller:z}),[x,S]=F.useState(!1),C=s(f),w=de(n),T=F.useRef(!1),[E,D]=F.useState(0);return F.useEffect(()=>{let e=_.current;if(e)return e.addEventListener(ce,C),()=>e.removeEventListener(ce,C)},[C]),(0,R.jsx)(he,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:b,onItemFocus:F.useCallback(e=>ee(e),[ee]),onItemShiftTab:F.useCallback(()=>S(!0),[]),onFocusableItemAdd:F.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:F.useCallback(()=>D(e=>e-1),[]),children:(0,R.jsx)(a.div,{tabIndex:x||E===0?-1:0,"data-orientation":r,...g,ref:v,style:{outline:`none`,...e.style},onMouseDown:i(e.onMouseDown,()=>{T.current=!0}),onFocus:i(e.onFocus,e=>{let t=!T.current;if(e.target===e.currentTarget&&t&&!x){let t=new CustomEvent(ce,le);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=w().filter(e=>e.focusable);we([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),h)}}T.current=!1}),onBlur:i(e.onBlur,()=>S(!1))})})}),ye=`RovingFocusGroupItem`,be=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:c,...l}=e,d=b(),f=s||d,p=ge(ye,n),m=p.currentTabStopId===f,h=de(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=p,y=se();return u(()=>{if(!(!y||!r))return g(),()=>_()},[y,r,g,_]),F.useEffect(()=>{if(!(y||!r))return g(),()=>_()},[y,r,g,_]),(0,R.jsx)(ue.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:(0,R.jsx)(a.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:i(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:i(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ce(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?Te(n,r+1):n.slice(r+1)}setTimeout(()=>we(n))}}),children:typeof c==`function`?c({isCurrentTabStop:m,hasTabStop:v!=null}):c})})});be.displayName=ye;var xe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Se(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ce(e,t,n){let r=Se(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return xe[r]}function we(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Te(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ee=_e,De=be,Oe=[`Enter`,` `],ke=[`ArrowDown`,`PageUp`,`Home`],Ae=[`ArrowUp`,`PageDown`,`End`],je=[...ke,...Ae],Me={ltr:[...Oe,`ArrowRight`],rtl:[...Oe,`ArrowLeft`]},Ne={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},B=`Menu`,[V,Pe,Fe]=O(B),[H,Ie]=o(B,[Fe,E,me]),U=E(),Le=me(),[Re,W]=H(B),[ze,G]=H(B),Be=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,c=U(t),[l,u]=F.useState(null),d=F.useRef(!1),f=s(a),p=te(i);return F.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),F.useEffect(()=>{if(!n)return;let e=()=>f(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,R.jsx)(T,{...c,children:(0,R.jsx)(Re,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,R.jsx)(ze,{scope:t,onClose:F.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})};Be.displayName=B;var Ve=`MenuAnchor`,He=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,R.jsx)(S,{...i,...r,ref:t})});He.displayName=Ve;var Ue=`MenuPortal`,[We,Ge]=H(Ue,{forceMount:void 0}),Ke=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=W(Ue,t);return(0,R.jsx)(We,{scope:t,forceMount:n,children:(0,R.jsx)(l,{present:n||a.open,children:(0,R.jsx)(_,{asChild:!0,container:i,children:r})})})};Ke.displayName=Ue;var K=`MenuContent`,[qe,Je]=H(K),Ye=F.forwardRef((e,t)=>{let n=Ge(K,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=W(K,e.__scopeMenu),o=G(K,e.__scopeMenu);return(0,R.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(l,{present:r||a.open,children:(0,R.jsx)(V.Slot,{scope:e.__scopeMenu,children:o.modal?(0,R.jsx)(Xe,{...i,ref:t}):(0,R.jsx)(Ze,{...i,ref:t})})})})}),Xe=F.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu),r=F.useRef(null),a=m(t,r);return F.useEffect(()=>{let e=r.current;if(e)return d(e)},[]),(0,R.jsx)($e,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:i(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ze=F.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu);return(0,R.jsx)($e,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qe=c(`MenuContent.ScrollLock`),$e=F.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:_,onDismiss:v,disableOutsideScroll:b,...x}=e,S=W(K,n),C=G(K,n),w=U(n),T=Le(n),E=Pe(n),[D,O]=F.useState(null),k=F.useRef(null),te=m(t,k,S.onContentChange),A=F.useRef(0),j=F.useRef(``),ne=F.useRef(0),M=F.useRef(null),N=F.useRef(`right`),P=F.useRef(0),re=b?f:F.Fragment,I=b?{as:Qe,allowPinchZoom:!0}:void 0,ie=e=>{let t=j.current+e,n=E().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Nt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){j.current=t,window.clearTimeout(A.current),t!==``&&(A.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};F.useEffect(()=>()=>window.clearTimeout(A.current),[]),g();let L=F.useCallback(e=>N.current===M.current?.side&&Ft(e,M.current?.area),[]);return(0,R.jsx)(qe,{scope:n,searchRef:j,onItemEnter:F.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:F.useCallback(e=>{L(e)||(k.current?.focus(),O(null))},[L]),onTriggerLeave:F.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:F.useCallback(e=>{M.current=e},[]),children:(0,R.jsx)(re,{...I,children:(0,R.jsx)(h,{asChild:!0,trapped:a,onMountAutoFocus:i(o,e=>{e.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,R.jsx)(y,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:_,onDismiss:v,children:(0,R.jsx)(Ee,{asChild:!0,...T,dir:C.dir,orientation:`vertical`,loop:r,currentTabStopId:D,onCurrentTabStopIdChange:O,onEntryFocus:i(l,e=>{C.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,R.jsx)(ee,{role:`menu`,"aria-orientation":`vertical`,"data-state":kt(S.open),"data-radix-menu-content":``,dir:C.dir,...w,...x,ref:te,style:{outline:`none`,...x.style},onKeyDown:i(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ie(e.key));let i=k.current;if(e.target!==i||!je.includes(e.key))return;e.preventDefault();let a=E().filter(e=>!e.disabled).map(e=>e.ref.current);Ae.includes(e.key)&&a.reverse(),jt(a)}),onBlur:i(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),j.current=``)}),onPointerMove:i(e.onPointerMove,Z(e=>{let t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>P.current?`right`:`left`;N.current=t,P.current=e.clientX}}))})})})})})})});Ye.displayName=K;var et=`MenuGroup`,tt=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(a.div,{role:`group`,...r,ref:t})});tt.displayName=et;var nt=`MenuLabel`,rt=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(a.div,{...r,ref:t})});rt.displayName=nt;var q=`MenuItem`,it=`menu.itemSelect`,J=F.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...a}=e,o=F.useRef(null),s=G(q,e.__scopeMenu),c=Je(q,e.__scopeMenu),l=m(t,o),u=F.useRef(!1),d=()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(it,{bubbles:!0,cancelable:!0});e.addEventListener(it,e=>r?.(e),{once:!0}),v(e,t),t.defaultPrevented?u.current=!1:s.onClose()}};return(0,R.jsx)(at,{...a,ref:l,disabled:n,onClick:i(e.onClick,d),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:i(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:i(e.onKeyDown,e=>{n||e.target!==e.currentTarget||c.searchRef.current!==``&&e.key===` `||Oe.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});J.displayName=q;var at=F.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,c=Je(q,n),l=Le(n),u=F.useRef(null),d=m(t,u),[f,p]=F.useState(!1),[h,g]=F.useState(``);return F.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[s.children]),(0,R.jsx)(V.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:(0,R.jsx)(De,{asChild:!0,...l,focusable:!r,children:(0,R.jsx)(a.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...s,ref:d,onPointerMove:i(e.onPointerMove,Z(e=>{r?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:i(e.onPointerLeave,Z(e=>c.onItemLeave(e))),onFocus:i(e.onFocus,()=>p(!0)),onBlur:i(e.onBlur,()=>p(!1))})})})}),ot=`MenuCheckboxItem`,st=F.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,R.jsx)(ht,{scope:e.__scopeMenu,checked:n,children:(0,R.jsx)(J,{role:`menuitemcheckbox`,"aria-checked":X(n)?`mixed`:n,...a,ref:t,"data-state":At(n),onSelect:i(a.onSelect,()=>r?.(X(n)?!0:!n),{checkForDefaultPrevented:!1})})})});st.displayName=ot;var ct=`MenuRadioGroup`,[lt,ut]=H(ct,{value:void 0,onValueChange:()=>{}}),dt=F.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=s(r);return(0,R.jsx)(lt,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,R.jsx)(tt,{...i,ref:t})})});dt.displayName=ct;var ft=`MenuRadioItem`,pt=F.forwardRef((e,t)=>{let{value:n,...r}=e,a=ut(ft,e.__scopeMenu),o=n===a.value;return(0,R.jsx)(ht,{scope:e.__scopeMenu,checked:o,children:(0,R.jsx)(J,{role:`menuitemradio`,"aria-checked":o,...r,ref:t,"data-state":At(o),onSelect:i(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});pt.displayName=ft;var mt=`MenuItemIndicator`,[ht,gt]=H(mt,{checked:!1}),_t=F.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,o=gt(mt,n);return(0,R.jsx)(l,{present:r||X(o.checked)||o.checked===!0,children:(0,R.jsx)(a.span,{...i,ref:t,"data-state":At(o.checked)})})});_t.displayName=mt;var vt=`MenuSeparator`,yt=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(a.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});yt.displayName=vt;var bt=`MenuArrow`,xt=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,R.jsx)(x,{...i,...r,ref:t})});xt.displayName=bt;var St=`MenuSub`,[Ct,wt]=H(St),Tt=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=W(St,t),o=U(t),[c,l]=F.useState(null),[u,d]=F.useState(null),f=s(i);return F.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,R.jsx)(T,{...o,children:(0,R.jsx)(Re,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:(0,R.jsx)(Ct,{scope:t,contentId:b(),triggerId:b(),trigger:c,onTriggerChange:l,children:n})})})};Tt.displayName=St;var Y=`MenuSubTrigger`,Et=F.forwardRef((e,t)=>{let n=W(Y,e.__scopeMenu),r=G(Y,e.__scopeMenu),a=wt(Y,e.__scopeMenu),o=Je(Y,e.__scopeMenu),s=F.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=F.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);F.useEffect(()=>d,[d]),F.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]);let f=m(t,a.onTriggerChange);return(0,R.jsx)(He,{asChild:!0,...u,children:(0,R.jsx)(at,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?a.contentId:void 0,"data-state":kt(n.open),...e,ref:f,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:i(e.onPointerMove,Z(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:i(e.onPointerLeave,Z(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:i(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||o.searchRef.current!==``&&t.key===` `||Me[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Et.displayName=Y;var Dt=`MenuSubContent`,Ot=F.forwardRef((e,t)=>{let n=Ge(K,e.__scopeMenu),{forceMount:r=n.forceMount,align:a=`start`,...o}=e,s=W(K,e.__scopeMenu),c=G(K,e.__scopeMenu),u=wt(Dt,e.__scopeMenu),d=F.useRef(null),f=m(t,d);return(0,R.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(l,{present:r||s.open,children:(0,R.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,R.jsx)($e,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:f,align:a,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:i(e.onFocusOutside,e=>{e.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:i(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:i(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Ne[c.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});Ot.displayName=Dt;function kt(e){return e?`open`:`closed`}function X(e){return e===`indeterminate`}function At(e){return X(e)?`indeterminate`:e?`checked`:`unchecked`}function jt(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Mt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Nt(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Mt(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Pt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Ft(e,t){return t?Pt({x:e.clientX,y:e.clientY},t):!1}function Z(e){return t=>t.pointerType===`mouse`?e(t):void 0}var It=Be,Lt=He,Rt=Ke,zt=Ye,Bt=tt,Vt=rt,Ht=J,Ut=st,Wt=dt,Gt=pt,Kt=_t,qt=yt,Jt=xt,Yt=Tt,Xt=Et,Zt=Ot,Q=`ContextMenu`,[Qt,$t]=o(Q,[Ie]),$=Ie(),[en,tn]=Qt(Q),nn=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:a,modal:o=!0}=e,s=F.useRef(!1);{let e=F.useRef(!1);F.useEffect(()=>{i===!0&&!s.current&&!e.current&&(e.current=!0,console.warn("ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport."))},[i])}let[c,l]=p({prop:i,defaultProp:!1,onChange:r,caller:Q}),u=$(t);return(0,R.jsx)(en,{scope:t,open:c,onOpenChange:l,modal:o,hasInteractedRef:s,children:(0,R.jsx)(It,{...u,dir:a,open:c,onOpenChange:l,modal:o,children:n})})};nn.displayName=Q;var rn=`ContextMenuTrigger`,an=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...o}=e,s=tn(rn,n),c=$(n),[l,u]=F.useState({x:0,y:0}),d=F.useMemo(()=>({current:{getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...l})}}),[l]),f=F.useRef(0),p=F.useCallback(()=>window.clearTimeout(f.current),[]),m=e=>{s.hasInteractedRef.current=!0,u({x:e.clientX,y:e.clientY}),s.onOpenChange(!0)};return F.useEffect(()=>p,[p]),F.useEffect(()=>void(r&&p()),[r,p]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Lt,{...c,virtualRef:d}),(0,R.jsx)(a.span,{"data-state":s.open?`open`:`closed`,"data-disabled":r?``:void 0,...o,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:i(e.onContextMenu,e=>{p(),m(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:i(e.onPointerDown,Pn(e=>{p(),s.open&&s.onOpenChange(!1),f.current=window.setTimeout(()=>m(e),700)})),onPointerMove:r?e.onPointerMove:i(e.onPointerMove,Pn(p)),onPointerCancel:r?e.onPointerCancel:i(e.onPointerCancel,Pn(p)),onPointerUp:r?e.onPointerUp:i(e.onPointerUp,Pn(p))})]})});an.displayName=rn;var on=`ContextMenuPortal`,sn=e=>{let{__scopeContextMenu:t,...n}=e,r=$(t);return(0,R.jsx)(Rt,{...r,...n})};sn.displayName=on;var cn=`ContextMenuContent`,ln=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=tn(cn,n),a=$(n),o=F.useRef(!1);return(0,R.jsx)(zt,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ln.displayName=cn;var un=`ContextMenuGroup`,dn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Bt,{...i,...r,ref:t})});dn.displayName=un;var fn=`ContextMenuLabel`,pn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Vt,{...i,...r,ref:t})});pn.displayName=fn;var mn=`ContextMenuItem`,hn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Ht,{...i,...r,ref:t})});hn.displayName=mn;var gn=`ContextMenuCheckboxItem`,_n=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Ut,{...i,...r,ref:t})});_n.displayName=gn;var vn=`ContextMenuRadioGroup`,yn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Wt,{...i,...r,ref:t})});yn.displayName=vn;var bn=`ContextMenuRadioItem`,xn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Gt,{...i,...r,ref:t})});xn.displayName=bn;var Sn=`ContextMenuItemIndicator`,Cn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Kt,{...i,...r,ref:t})});Cn.displayName=Sn;var wn=`ContextMenuSeparator`,Tn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(qt,{...i,...r,ref:t})});Tn.displayName=wn;var En=`ContextMenuArrow`,Dn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Jt,{...i,...r,ref:t})});Dn.displayName=En;var On=`ContextMenuSub`,kn=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=$(t),[s,c]=p({prop:i,defaultProp:a??!1,onChange:r,caller:On});return(0,R.jsx)(Yt,{...o,open:s,onOpenChange:c,children:n})};kn.displayName=On;var An=`ContextMenuSubTrigger`,jn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Xt,{...i,...r,ref:t})});jn.displayName=An;var Mn=`ContextMenuSubContent`,Nn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Zt,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Nn.displayName=Mn;function Pn(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Fn=nn,In=an,Ln=sn,Rn=ln,zn=hn,Bn=Tn,Vn=kn,Hn=jn,Un=Nn,Wn=Fn,Gn=In,Kn=Vn;function qn({className:e,...t}){return(0,R.jsx)(Ln,{children:(0,R.jsx)(Rn,{className:D(`z-50 min-w-36 overflow-hidden rounded-md bg-elevated p-1 shadow-xl`,e),...t})})}function Jn({className:e,...t}){return(0,R.jsx)(zn,{className:D(C,w,`[&_svg]:size-3.5`,e),...t})}function Yn({className:e,children:t,...n}){return(0,R.jsxs)(Hn,{className:D(C,w,`data-[state=open]:bg-action data-[state=open]:text-action-ink [&_svg]:size-3.5`,e),...n,children:[t,(0,R.jsx)(k,{className:`ml-auto`})]})}function Xn({className:e,...t}){return(0,R.jsx)(Ln,{children:(0,R.jsx)(Un,{className:D(`z-50 min-w-36 overflow-hidden rounded-md bg-elevated p-1 shadow-xl`,e),...t})})}function Zn({className:e,...t}){return(0,R.jsx)(Bn,{className:D(`-mx-1 my-1 h-px bg-border`,e),...t})}function Qn(){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:e=>{e.preventDefault(),e.currentTarget.dispatchEvent(new MouseEvent(`contextmenu`,{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY,button:2}))}}}export{N as A,Yt as C,re as D,Ie as E,A as M,P as O,qt as S,Xt as T,Vt as _,Kn as a,Gt as b,Gn as c,Jt as d,Ut as f,Kt as g,Ht as h,Zn as i,j,M as k,Qn as l,Bt as m,qn as n,Xn as o,zt as p,Jn as r,Yn as s,Wn as t,Lt as u,Rt as v,Zt as w,It as x,Wt as y};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{n,t as r}from"./createLucideIcon-C6JENrH3.js";import{A as i,C as a,D as o,S as s,T as c,_ as l,b as u,d,f,g as p,k as m,m as h,p as g,v as _,w as v,x as y,y as b}from"./dialog-DI1-uj7G.js";import{_ as ee,g as x,h as S,m as C,p as w,v as T,y as E}from"./LazyTerminal-D1waFhzd.js";import{n as D}from"./x-C-HTKvar.js";import{n as O,r as k,t as te}from"./dist-CKuo36qW.js";var A=r(`archive-restore`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h2`,key:`tvwodi`}],[`path`,{d:`M20 8v11a2 2 0 0 1-2 2h-2`,key:`1gkqxj`}],[`path`,{d:`m9 15 3-3 3 3`,key:`1pd0qc`}],[`path`,{d:`M12 12v9`,key:`192myk`}]]),j=r(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]);function ne(e){let t=Date.parse(e.created_at);return Number.isNaN(t)?0:t}function M(e,t){let n=new Map(t.map((e,t)=>[e,t])),r=[],i=[];for(let t of e)(n.has(t.id)?r:i).push(t);return r.sort((e,t)=>n.get(e.id)-n.get(t.id)),i.sort((e,t)=>ne(t)-ne(e)),[...i,...r]}function N(e,t,n){if(t===n)return[...e];let r=e.filter(e=>e!==t),i=r.indexOf(n);return i===-1?[...e]:(r.splice(i,0,t),r)}function P(e,t,n){if(t===n)return null;let r=e.find(e=>e.sessions.some(e=>e.id===t));if(!r||!r.sessions.some(e=>e.id===n))return null;let i=e.flatMap(e=>e.sessions.map(e=>e.id)),a=N(i,t,n);return a.some((e,t)=>e!==i[t])?a:null}function re(e,t){let n=new Set(e);return[...e,...t.filter(e=>!n.has(e))]}var F=e(t(),1),I=!1;function ie(){let[e,t]=F.useState(I);return F.useEffect(()=>{I||(I=!0,t(!0))},[]),e}var L=F.useSyncExternalStore;function ae(){return()=>{}}function oe(){return L(ae,()=>!0,()=>!1)}var se=typeof L==`function`?oe:ie,R=n(),ce=`rovingFocusGroup.onEntryFocus`,le={bubbles:!1,cancelable:!0},z=`RovingFocusGroup`,[ue,de,fe]=O(z),[pe,me]=o(z,[fe]),[he,ge]=pe(z),_e=F.forwardRef((e,t)=>(0,R.jsx)(ue.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(ue.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(ve,{...e,ref:t})})}));_e.displayName=z;var ve=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:c,currentTabStopId:l,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:h=!1,...g}=e,_=F.useRef(null),v=m(t,_),y=te(c),[b,ee]=p({prop:l,defaultProp:u??null,onChange:d,caller:z}),[x,S]=F.useState(!1),C=s(f),w=de(n),T=F.useRef(!1),[E,D]=F.useState(0);return F.useEffect(()=>{let e=_.current;if(e)return e.addEventListener(ce,C),()=>e.removeEventListener(ce,C)},[C]),(0,R.jsx)(he,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:b,onItemFocus:F.useCallback(e=>ee(e),[ee]),onItemShiftTab:F.useCallback(()=>S(!0),[]),onFocusableItemAdd:F.useCallback(()=>D(e=>e+1),[]),onFocusableItemRemove:F.useCallback(()=>D(e=>e-1),[]),children:(0,R.jsx)(a.div,{tabIndex:x||E===0?-1:0,"data-orientation":r,...g,ref:v,style:{outline:`none`,...e.style},onMouseDown:i(e.onMouseDown,()=>{T.current=!0}),onFocus:i(e.onFocus,e=>{let t=!T.current;if(e.target===e.currentTarget&&t&&!x){let t=new CustomEvent(ce,le);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=w().filter(e=>e.focusable);we([e.find(e=>e.active),e.find(e=>e.id===b),...e].filter(Boolean).map(e=>e.ref.current),h)}}T.current=!1}),onBlur:i(e.onBlur,()=>S(!1))})})}),ye=`RovingFocusGroupItem`,be=F.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:c,...l}=e,d=b(),f=s||d,p=ge(ye,n),m=p.currentTabStopId===f,h=de(n),{onFocusableItemAdd:g,onFocusableItemRemove:_,currentTabStopId:v}=p,y=se();return u(()=>{if(!(!y||!r))return g(),()=>_()},[y,r,g,_]),F.useEffect(()=>{if(!(y||!r))return g(),()=>_()},[y,r,g,_]),(0,R.jsx)(ue.ItemSlot,{scope:n,id:f,focusable:r,active:o,children:(0,R.jsx)(a.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:t,onMouseDown:i(e.onMouseDown,e=>{r?p.onItemFocus(f):e.preventDefault()}),onFocus:i(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:i(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){p.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Ce(e,p.orientation,p.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=h().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=p.loop?Te(n,r+1):n.slice(r+1)}setTimeout(()=>we(n))}}),children:typeof c==`function`?c({isCurrentTabStop:m,hasTabStop:v!=null}):c})})});be.displayName=ye;var xe={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Se(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Ce(e,t,n){let r=Se(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return xe[r]}function we(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Te(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ee=_e,De=be,Oe=[`Enter`,` `],ke=[`ArrowDown`,`PageUp`,`Home`],Ae=[`ArrowUp`,`PageDown`,`End`],je=[...ke,...Ae],Me={ltr:[...Oe,`ArrowRight`],rtl:[...Oe,`ArrowLeft`]},Ne={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},B=`Menu`,[V,Pe,Fe]=O(B),[H,Ie]=o(B,[Fe,E,me]),U=E(),Le=me(),[Re,W]=H(B),[ze,G]=H(B),Be=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,c=U(t),[l,u]=F.useState(null),d=F.useRef(!1),f=s(a),p=te(i);return F.useEffect(()=>{let e=()=>{d.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),F.useEffect(()=>{if(!n)return;let e=()=>f(!1);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,f]),(0,R.jsx)(T,{...c,children:(0,R.jsx)(Re,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:(0,R.jsx)(ze,{scope:t,onClose:F.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:o,children:r})})})};Be.displayName=B;var Ve=`MenuAnchor`,He=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,R.jsx)(S,{...i,...r,ref:t})});He.displayName=Ve;var Ue=`MenuPortal`,[We,Ge]=H(Ue,{forceMount:void 0}),Ke=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=W(Ue,t);return(0,R.jsx)(We,{scope:t,forceMount:n,children:(0,R.jsx)(l,{present:n||a.open,children:(0,R.jsx)(_,{asChild:!0,container:i,children:r})})})};Ke.displayName=Ue;var K=`MenuContent`,[qe,Je]=H(K),Ye=F.forwardRef((e,t)=>{let n=Ge(K,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=W(K,e.__scopeMenu),o=G(K,e.__scopeMenu);return(0,R.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(l,{present:r||a.open,children:(0,R.jsx)(V.Slot,{scope:e.__scopeMenu,children:o.modal?(0,R.jsx)(Xe,{...i,ref:t}):(0,R.jsx)(Ze,{...i,ref:t})})})})}),Xe=F.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu),r=F.useRef(null),a=m(t,r);return F.useEffect(()=>{let e=r.current;if(e)return d(e)},[]),(0,R.jsx)($e,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:i(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Ze=F.forwardRef((e,t)=>{let n=W(K,e.__scopeMenu);return(0,R.jsx)($e,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Qe=c(`MenuContent.ScrollLock`),$e=F.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:_,onDismiss:v,disableOutsideScroll:b,...x}=e,S=W(K,n),C=G(K,n),w=U(n),T=Le(n),E=Pe(n),[D,O]=F.useState(null),k=F.useRef(null),te=m(t,k,S.onContentChange),A=F.useRef(0),j=F.useRef(``),ne=F.useRef(0),M=F.useRef(null),N=F.useRef(`right`),P=F.useRef(0),re=b?f:F.Fragment,I=b?{as:Qe,allowPinchZoom:!0}:void 0,ie=e=>{let t=j.current+e,n=E().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Nt(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){j.current=t,window.clearTimeout(A.current),t!==``&&(A.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};F.useEffect(()=>()=>window.clearTimeout(A.current),[]),g();let L=F.useCallback(e=>N.current===M.current?.side&&Ft(e,M.current?.area),[]);return(0,R.jsx)(qe,{scope:n,searchRef:j,onItemEnter:F.useCallback(e=>{L(e)&&e.preventDefault()},[L]),onItemLeave:F.useCallback(e=>{L(e)||(k.current?.focus(),O(null))},[L]),onTriggerLeave:F.useCallback(e=>{L(e)&&e.preventDefault()},[L]),pointerGraceTimerRef:ne,onPointerGraceIntentChange:F.useCallback(e=>{M.current=e},[]),children:(0,R.jsx)(re,{...I,children:(0,R.jsx)(h,{asChild:!0,trapped:a,onMountAutoFocus:i(o,e=>{e.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,R.jsx)(y,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:_,onDismiss:v,children:(0,R.jsx)(Ee,{asChild:!0,...T,dir:C.dir,orientation:`vertical`,loop:r,currentTabStopId:D,onCurrentTabStopIdChange:O,onEntryFocus:i(l,e=>{C.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,R.jsx)(ee,{role:`menu`,"aria-orientation":`vertical`,"data-state":kt(S.open),"data-radix-menu-content":``,dir:C.dir,...w,...x,ref:te,style:{outline:`none`,...x.style},onKeyDown:i(x.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ie(e.key));let i=k.current;if(e.target!==i||!je.includes(e.key))return;e.preventDefault();let a=E().filter(e=>!e.disabled).map(e=>e.ref.current);Ae.includes(e.key)&&a.reverse(),jt(a)}),onBlur:i(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),j.current=``)}),onPointerMove:i(e.onPointerMove,Z(e=>{let t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>P.current?`right`:`left`;N.current=t,P.current=e.clientX}}))})})})})})})});Ye.displayName=K;var et=`MenuGroup`,tt=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(a.div,{role:`group`,...r,ref:t})});tt.displayName=et;var nt=`MenuLabel`,rt=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(a.div,{...r,ref:t})});rt.displayName=nt;var q=`MenuItem`,it=`menu.itemSelect`,J=F.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...a}=e,o=F.useRef(null),s=G(q,e.__scopeMenu),c=Je(q,e.__scopeMenu),l=m(t,o),u=F.useRef(!1),d=()=>{let e=o.current;if(!n&&e){let t=new CustomEvent(it,{bubbles:!0,cancelable:!0});e.addEventListener(it,e=>r?.(e),{once:!0}),v(e,t),t.defaultPrevented?u.current=!1:s.onClose()}};return(0,R.jsx)(at,{...a,ref:l,disabled:n,onClick:i(e.onClick,d),onPointerDown:t=>{e.onPointerDown?.(t),u.current=!0},onPointerUp:i(e.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:i(e.onKeyDown,e=>{n||e.target!==e.currentTarget||c.searchRef.current!==``&&e.key===` `||Oe.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});J.displayName=q;var at=F.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,c=Je(q,n),l=Le(n),u=F.useRef(null),d=m(t,u),[f,p]=F.useState(!1),[h,g]=F.useState(``);return F.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[s.children]),(0,R.jsx)(V.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:(0,R.jsx)(De,{asChild:!0,...l,focusable:!r,children:(0,R.jsx)(a.div,{role:`menuitem`,"data-highlighted":f?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...s,ref:d,onPointerMove:i(e.onPointerMove,Z(e=>{r?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:i(e.onPointerLeave,Z(e=>c.onItemLeave(e))),onFocus:i(e.onFocus,()=>p(!0)),onBlur:i(e.onBlur,()=>p(!1))})})})}),ot=`MenuCheckboxItem`,st=F.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...a}=e;return(0,R.jsx)(ht,{scope:e.__scopeMenu,checked:n,children:(0,R.jsx)(J,{role:`menuitemcheckbox`,"aria-checked":X(n)?`mixed`:n,...a,ref:t,"data-state":At(n),onSelect:i(a.onSelect,()=>r?.(X(n)?!0:!n),{checkForDefaultPrevented:!1})})})});st.displayName=ot;var ct=`MenuRadioGroup`,[lt,ut]=H(ct,{value:void 0,onValueChange:()=>{}}),dt=F.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=s(r);return(0,R.jsx)(lt,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,R.jsx)(tt,{...i,ref:t})})});dt.displayName=ct;var ft=`MenuRadioItem`,pt=F.forwardRef((e,t)=>{let{value:n,...r}=e,a=ut(ft,e.__scopeMenu),o=n===a.value;return(0,R.jsx)(ht,{scope:e.__scopeMenu,checked:o,children:(0,R.jsx)(J,{role:`menuitemradio`,"aria-checked":o,...r,ref:t,"data-state":At(o),onSelect:i(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});pt.displayName=ft;var mt=`MenuItemIndicator`,[ht,gt]=H(mt,{checked:!1}),_t=F.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,o=gt(mt,n);return(0,R.jsx)(l,{present:r||X(o.checked)||o.checked===!0,children:(0,R.jsx)(a.span,{...i,ref:t,"data-state":At(o.checked)})})});_t.displayName=mt;var vt=`MenuSeparator`,yt=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,R.jsx)(a.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});yt.displayName=vt;var bt=`MenuArrow`,xt=F.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=U(n);return(0,R.jsx)(x,{...i,...r,ref:t})});xt.displayName=bt;var St=`MenuSub`,[Ct,wt]=H(St),Tt=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=W(St,t),o=U(t),[c,l]=F.useState(null),[u,d]=F.useState(null),f=s(i);return F.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,R.jsx)(T,{...o,children:(0,R.jsx)(Re,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:(0,R.jsx)(Ct,{scope:t,contentId:b(),triggerId:b(),trigger:c,onTriggerChange:l,children:n})})})};Tt.displayName=St;var Y=`MenuSubTrigger`,Et=F.forwardRef((e,t)=>{let n=W(Y,e.__scopeMenu),r=G(Y,e.__scopeMenu),a=wt(Y,e.__scopeMenu),o=Je(Y,e.__scopeMenu),s=F.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=o,u={__scopeMenu:e.__scopeMenu},d=F.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);F.useEffect(()=>d,[d]),F.useEffect(()=>{let e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]);let f=m(t,a.onTriggerChange);return(0,R.jsx)(He,{asChild:!0,...u,children:(0,R.jsx)(at,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?a.contentId:void 0,"data-state":kt(n.open),...e,ref:f,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:i(e.onPointerMove,Z(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:i(e.onPointerLeave,Z(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,a=i?-5:5,s=t[i?`left`:`right`],l=t[i?`right`:`left`];o.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:r}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:i(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||o.searchRef.current!==``&&t.key===` `||Me[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});Et.displayName=Y;var Dt=`MenuSubContent`,Ot=F.forwardRef((e,t)=>{let n=Ge(K,e.__scopeMenu),{forceMount:r=n.forceMount,align:a=`start`,...o}=e,s=W(K,e.__scopeMenu),c=G(K,e.__scopeMenu),u=wt(Dt,e.__scopeMenu),d=F.useRef(null),f=m(t,d);return(0,R.jsx)(V.Provider,{scope:e.__scopeMenu,children:(0,R.jsx)(l,{present:r||s.open,children:(0,R.jsx)(V.Slot,{scope:e.__scopeMenu,children:(0,R.jsx)($e,{id:u.contentId,"aria-labelledby":u.triggerId,...o,ref:f,align:a,side:c.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{c.isUsingKeyboardRef.current&&d.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:i(e.onFocusOutside,e=>{e.target!==u.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:i(e.onEscapeKeyDown,e=>{c.onClose(),e.preventDefault()}),onKeyDown:i(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Ne[c.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),u.trigger?.focus(),e.preventDefault())})})})})})});Ot.displayName=Dt;function kt(e){return e?`open`:`closed`}function X(e){return e===`indeterminate`}function At(e){return X(e)?`indeterminate`:e?`checked`:`unchecked`}function jt(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Mt(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Nt(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Mt(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Pt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Ft(e,t){return t?Pt({x:e.clientX,y:e.clientY},t):!1}function Z(e){return t=>t.pointerType===`mouse`?e(t):void 0}var It=Be,Lt=He,Rt=Ke,zt=Ye,Bt=tt,Vt=rt,Ht=J,Ut=st,Wt=dt,Gt=pt,Kt=_t,qt=yt,Jt=xt,Yt=Tt,Xt=Et,Zt=Ot,Q=`ContextMenu`,[Qt,$t]=o(Q,[Ie]),$=Ie(),[en,tn]=Qt(Q),nn=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,dir:a,modal:o=!0}=e,s=F.useRef(!1);{let e=F.useRef(!1);F.useEffect(()=>{i===!0&&!s.current&&!e.current&&(e.current=!0,console.warn("ContextMenu: The `open` prop has been set to `true` before the user has interacted with the trigger, so its position is indeterminate. This is likely unintended and will result in the menu being anchored to the top-left corner of the viewport."))},[i])}let[c,l]=p({prop:i,defaultProp:!1,onChange:r,caller:Q}),u=$(t);return(0,R.jsx)(en,{scope:t,open:c,onOpenChange:l,modal:o,hasInteractedRef:s,children:(0,R.jsx)(It,{...u,dir:a,open:c,onOpenChange:l,modal:o,children:n})})};nn.displayName=Q;var rn=`ContextMenuTrigger`,an=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,disabled:r=!1,...o}=e,s=tn(rn,n),c=$(n),[l,u]=F.useState({x:0,y:0}),d=F.useMemo(()=>({current:{getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...l})}}),[l]),f=F.useRef(0),p=F.useCallback(()=>window.clearTimeout(f.current),[]),m=e=>{s.hasInteractedRef.current=!0,u({x:e.clientX,y:e.clientY}),s.onOpenChange(!0)};return F.useEffect(()=>p,[p]),F.useEffect(()=>void(r&&p()),[r,p]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Lt,{...c,virtualRef:d}),(0,R.jsx)(a.span,{"data-state":s.open?`open`:`closed`,"data-disabled":r?``:void 0,...o,ref:t,style:{WebkitTouchCallout:`none`,...e.style},onContextMenu:r?e.onContextMenu:i(e.onContextMenu,e=>{p(),m(e),e.preventDefault()}),onPointerDown:r?e.onPointerDown:i(e.onPointerDown,Pn(e=>{p(),s.open&&s.onOpenChange(!1),f.current=window.setTimeout(()=>m(e),700)})),onPointerMove:r?e.onPointerMove:i(e.onPointerMove,Pn(p)),onPointerCancel:r?e.onPointerCancel:i(e.onPointerCancel,Pn(p)),onPointerUp:r?e.onPointerUp:i(e.onPointerUp,Pn(p))})]})});an.displayName=rn;var on=`ContextMenuPortal`,sn=e=>{let{__scopeContextMenu:t,...n}=e,r=$(t);return(0,R.jsx)(Rt,{...r,...n})};sn.displayName=on;var cn=`ContextMenuContent`,ln=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=tn(cn,n),a=$(n),o=F.useRef(!1);return(0,R.jsx)(zt,{...a,...r,ref:t,side:`right`,sideOffset:2,align:`start`,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),!t.defaultPrevented&&o.current&&t.preventDefault(),o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),!t.defaultPrevented&&!i.modal&&(o.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});ln.displayName=cn;var un=`ContextMenuGroup`,dn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Bt,{...i,...r,ref:t})});dn.displayName=un;var fn=`ContextMenuLabel`,pn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Vt,{...i,...r,ref:t})});pn.displayName=fn;var mn=`ContextMenuItem`,hn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Ht,{...i,...r,ref:t})});hn.displayName=mn;var gn=`ContextMenuCheckboxItem`,_n=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Ut,{...i,...r,ref:t})});_n.displayName=gn;var vn=`ContextMenuRadioGroup`,yn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Wt,{...i,...r,ref:t})});yn.displayName=vn;var bn=`ContextMenuRadioItem`,xn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Gt,{...i,...r,ref:t})});xn.displayName=bn;var Sn=`ContextMenuItemIndicator`,Cn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Kt,{...i,...r,ref:t})});Cn.displayName=Sn;var wn=`ContextMenuSeparator`,Tn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(qt,{...i,...r,ref:t})});Tn.displayName=wn;var En=`ContextMenuArrow`,Dn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Jt,{...i,...r,ref:t})});Dn.displayName=En;var On=`ContextMenuSub`,kn=e=>{let{__scopeContextMenu:t,children:n,onOpenChange:r,open:i,defaultOpen:a}=e,o=$(t),[s,c]=p({prop:i,defaultProp:a??!1,onChange:r,caller:On});return(0,R.jsx)(Yt,{...o,open:s,onOpenChange:c,children:n})};kn.displayName=On;var An=`ContextMenuSubTrigger`,jn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Xt,{...i,...r,ref:t})});jn.displayName=An;var Mn=`ContextMenuSubContent`,Nn=F.forwardRef((e,t)=>{let{__scopeContextMenu:n,...r}=e,i=$(n);return(0,R.jsx)(Zt,{...i,...r,ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-context-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-context-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-context-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-context-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});Nn.displayName=Mn;function Pn(e){return t=>t.pointerType===`mouse`?void 0:e(t)}var Fn=nn,In=an,Ln=sn,Rn=ln,zn=hn,Bn=Tn,Vn=kn,Hn=jn,Un=Nn,Wn=Fn,Gn=In,Kn=Vn;function qn({className:e,...t}){return(0,R.jsx)(Ln,{children:(0,R.jsx)(Rn,{className:D(`z-50 min-w-36 overflow-hidden rounded-md bg-elevated p-1 shadow-xl`,e),...t})})}function Jn({className:e,...t}){return(0,R.jsx)(zn,{className:D(C,w,`[&_svg]:size-3.5`,e),...t})}function Yn({className:e,children:t,...n}){return(0,R.jsxs)(Hn,{className:D(C,w,`data-[state=open]:bg-action data-[state=open]:text-action-ink [&_svg]:size-3.5`,e),...n,children:[t,(0,R.jsx)(k,{className:`ml-auto`})]})}function Xn({className:e,...t}){return(0,R.jsx)(Ln,{children:(0,R.jsx)(Un,{className:D(`z-50 min-w-36 overflow-hidden rounded-md bg-elevated p-1 shadow-xl`,e),...t})})}function Zn({className:e,...t}){return(0,R.jsx)(Bn,{className:D(`-mx-1 my-1 h-px bg-border`,e),...t})}function Qn(){return{onClick:e=>{e.detail===2&&e.preventDefault()},onDoubleClick:e=>{e.preventDefault(),e.currentTarget.dispatchEvent(new MouseEvent(`contextmenu`,{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY,button:2}))}}}export{N as A,Yt as C,re as D,Ie as E,A as M,P as O,qt as S,Xt as T,Vt as _,Kn as a,Gt as b,Gn as c,Jt as d,Ut as f,Kt as g,Ht as h,Zn as i,j,M as k,Qn as l,Bt as m,qn as n,Xn as o,zt as p,Jn as r,Yn as s,Wn as t,Lt as u,Rt as v,Zt as w,It as x,Wt as y};
|