pilotswarm 0.5.35 → 0.5.36

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.
Files changed (70) hide show
  1. package/package.json +2 -2
  2. package/ui/core/src/themes/duroxide.js +6 -1
  3. package/ui/core/src/themes/win95.js +4 -1
  4. package/ui/react/src/web-app.js +61 -1
  5. package/web/dist/assets/{abnfDiagram-VRR7QNED-BwJEohLG.js → abnfDiagram-VRR7QNED-LOLCtsns.js} +1 -1
  6. package/web/dist/assets/{arc-CWUJ_S5s.js → arc-BE-jVDEi.js} +1 -1
  7. package/web/dist/assets/{architectureDiagram-ZJ3FMSHR-i6mrLxuE.js → architectureDiagram-ZJ3FMSHR-CdmUjwtj.js} +1 -1
  8. package/web/dist/assets/{blockDiagram-677ZJIJ3-C_KG-qPQ.js → blockDiagram-677ZJIJ3-NZ4TOa8L.js} +1 -1
  9. package/web/dist/assets/{c4Diagram-LMCZKHZV-BBJH7hbB.js → c4Diagram-LMCZKHZV-9ubX8uGA.js} +1 -1
  10. package/web/dist/assets/channel-BhHZnKdH.js +1 -0
  11. package/web/dist/assets/{chunk-2Q5K7J3B-CXwaFcaM.js → chunk-2Q5K7J3B-DNDnjbP6.js} +1 -1
  12. package/web/dist/assets/{chunk-32BRIVSS-C8ujjkK-.js → chunk-32BRIVSS-iilfiffr.js} +1 -1
  13. package/web/dist/assets/{chunk-5VM5RSS4-M9rz7YYk.js → chunk-5VM5RSS4-BakOMFmf.js} +1 -1
  14. package/web/dist/assets/{chunk-EX3LRPZG-bk6tRxOA.js → chunk-EX3LRPZG-BhluhGyZ.js} +1 -1
  15. package/web/dist/assets/{chunk-JWPE2WC7-DZ4WSHGH.js → chunk-JWPE2WC7-B6GKLlNb.js} +1 -1
  16. package/web/dist/assets/{chunk-MOJQB5TN-B5-y6tMF.js → chunk-MOJQB5TN-CXmt8msF.js} +1 -1
  17. package/web/dist/assets/{chunk-RYQCIY6F-yKcnHxm0.js → chunk-RYQCIY6F-Bu58-SDr.js} +1 -1
  18. package/web/dist/assets/{chunk-V7JOEXUC-CpoNcATD.js → chunk-V7JOEXUC-AQdyoYHL.js} +1 -1
  19. package/web/dist/assets/{chunk-VR4S4FIN-Bf1yD2fn.js → chunk-VR4S4FIN-DeM5iMsE.js} +1 -1
  20. package/web/dist/assets/{chunk-XXDRQBXY-EnPvDVhP.js → chunk-XXDRQBXY-DjGjajy1.js} +1 -1
  21. package/web/dist/assets/classDiagram-OUVF2IWQ-CM_bKBKz.js +1 -0
  22. package/web/dist/assets/classDiagram-v2-EOCWNBFH-CM_bKBKz.js +1 -0
  23. package/web/dist/assets/{cose-bilkent-JH36ORCC-qhKoA2qj.js → cose-bilkent-JH36ORCC-BGi4_egJ.js} +1 -1
  24. package/web/dist/assets/{cynefin-VYW2F7L2-jcyYelJS.js → cynefin-VYW2F7L2-CcgV1ve4.js} +1 -1
  25. package/web/dist/assets/{cynefinDiagram-TSTJHNR4-D4RLufLP.js → cynefinDiagram-TSTJHNR4-BRDEsbBG.js} +1 -1
  26. package/web/dist/assets/{dagre-VKFMJZFB-C9BA3GTO.js → dagre-VKFMJZFB-OjuC8dJB.js} +1 -1
  27. package/web/dist/assets/{diagram-FQU43EPY-DbSSrVUJ.js → diagram-FQU43EPY-CGdROWYh.js} +1 -1
  28. package/web/dist/assets/{diagram-G47NLZAW-3egISQXQ.js → diagram-G47NLZAW-B5J0EUfS.js} +1 -1
  29. package/web/dist/assets/{diagram-NH7WQ7WH-8IKEMGRg.js → diagram-NH7WQ7WH-zmb4-cP2.js} +1 -1
  30. package/web/dist/assets/{diagram-OA4YK3LP-VnaogqtK.js → diagram-OA4YK3LP-j514bgaH.js} +1 -1
  31. package/web/dist/assets/{diagram-WEI45ONY-DxigXH0T.js → diagram-WEI45ONY-h5G459mZ.js} +1 -1
  32. package/web/dist/assets/{ebnfDiagram-CCIWWBDH-BSkNwJ9x.js → ebnfDiagram-CCIWWBDH-GnMgbuFk.js} +1 -1
  33. package/web/dist/assets/{erDiagram-Q63AITRT-CKN8JXl6.js → erDiagram-Q63AITRT-BFgH3UQp.js} +1 -1
  34. package/web/dist/assets/{flowDiagram-23GEKE2U-DDaD5ExP.js → flowDiagram-23GEKE2U-BsbQ_VXV.js} +1 -1
  35. package/web/dist/assets/{ganttDiagram-NO4QXBWP-tOrBOuoI.js → ganttDiagram-NO4QXBWP-C_fjo2sf.js} +1 -1
  36. package/web/dist/assets/{gitGraphDiagram-IHSO6WYX-Cdp867ON.js → gitGraphDiagram-IHSO6WYX-BUoXrAI9.js} +1 -1
  37. package/web/dist/assets/index-CnH1Yv_d.css +1 -0
  38. package/web/dist/assets/{index-BmwU43_u.js → index-ONJimzcx.js} +2 -2
  39. package/web/dist/assets/{infoDiagram-FWYZ7A6U-DwcKHD2h.js → infoDiagram-FWYZ7A6U-CJiSANyk.js} +1 -1
  40. package/web/dist/assets/{ishikawaDiagram-FXEZZL3T-CWffK5kz.js → ishikawaDiagram-FXEZZL3T-BKoQ-a2c.js} +1 -1
  41. package/web/dist/assets/{journeyDiagram-5HDEW3XC-BEAgS-EZ.js → journeyDiagram-5HDEW3XC-Db6Crcd3.js} +1 -1
  42. package/web/dist/assets/{kanban-definition-HUTT4EX6-xDm-mRRj.js → kanban-definition-HUTT4EX6-B9GaB0UJ.js} +1 -1
  43. package/web/dist/assets/{linear-oP9MA0as.js → linear-BXwRb8MN.js} +1 -1
  44. package/web/dist/assets/{mermaid.core-DgXXt1OS.js → mermaid.core-DwzXN6up.js} +4 -4
  45. package/web/dist/assets/{mindmap-definition-LN4V7U3C-BBQgVrYC.js → mindmap-definition-LN4V7U3C-DKC_C_OY.js} +1 -1
  46. package/web/dist/assets/{papaparse.min-CR6JmBWm.js → papaparse.min-Cm1Pr54l.js} +1 -1
  47. package/web/dist/assets/{pegDiagram-2B236MQR-C2O0cf3j.js → pegDiagram-2B236MQR-IeawbZPt.js} +1 -1
  48. package/web/dist/assets/{pieDiagram-ENE6RG2P-D08pUtYU.js → pieDiagram-ENE6RG2P-BOdsYBt8.js} +1 -1
  49. package/web/dist/assets/{pilotswarm-D7NLCbuc.js → pilotswarm-kCQFVjJm.js} +60 -60
  50. package/web/dist/assets/{quadrantDiagram-ABIIQ3AL-D-Z7YoEK.js → quadrantDiagram-ABIIQ3AL-Cr5yoN7C.js} +1 -1
  51. package/web/dist/assets/{railroadDiagram-RFXS5EU6-ClkdveLI.js → railroadDiagram-RFXS5EU6-E7wuFBuk.js} +1 -1
  52. package/web/dist/assets/{requirementDiagram-TGXJPOKE-IY4xbn-Q.js → requirementDiagram-TGXJPOKE-sZCKiuDs.js} +1 -1
  53. package/web/dist/assets/{sankeyDiagram-HTMAVEWB-Cpt5i7KM.js → sankeyDiagram-HTMAVEWB-B_EWziUR.js} +1 -1
  54. package/web/dist/assets/{sequenceDiagram-DBY2YBRQ-c07lALcz.js → sequenceDiagram-DBY2YBRQ-D2mN7onX.js} +1 -1
  55. package/web/dist/assets/{sizeCapture-X5ZJPWSS-CmCDiNbI.js → sizeCapture-X5ZJPWSS-CEL9Ly2T.js} +1 -1
  56. package/web/dist/assets/{stateDiagram-2N3HPSRC-Dueu17zX.js → stateDiagram-2N3HPSRC-C7ejJoeN.js} +1 -1
  57. package/web/dist/assets/stateDiagram-v2-6OUMAXLB-UaVDt_gU.js +1 -0
  58. package/web/dist/assets/{swimlanes-5IMT3BWC-Csc2Fup8.js → swimlanes-5IMT3BWC-Ck3pbFxk.js} +2 -2
  59. package/web/dist/assets/swimlanesDiagram-G3AALYLV-CqO_fF5t.js +8 -0
  60. package/web/dist/assets/{timeline-definition-FHXFAJF6-4-lf702e.js → timeline-definition-FHXFAJF6-K3H8Yuyr.js} +1 -1
  61. package/web/dist/assets/{vennDiagram-L72KCM5P-CmlaKpLI.js → vennDiagram-L72KCM5P-C3NKjSv9.js} +1 -1
  62. package/web/dist/assets/{wardleyDiagram-EHGQE667-B9Qe44pi.js → wardleyDiagram-EHGQE667-CeeVuFiO.js} +1 -1
  63. package/web/dist/assets/{xychartDiagram-FW5EYKEG-BFcc0CLn.js → xychartDiagram-FW5EYKEG-CF-vCvEq.js} +1 -1
  64. package/web/dist/index.html +3 -3
  65. package/web/dist/assets/channel-5Ddqi9ib.js +0 -1
  66. package/web/dist/assets/classDiagram-OUVF2IWQ-B8u1fZiB.js +0 -1
  67. package/web/dist/assets/classDiagram-v2-EOCWNBFH-B8u1fZiB.js +0 -1
  68. package/web/dist/assets/index-D-nA7gUe.css +0 -1
  69. package/web/dist/assets/stateDiagram-v2-6OUMAXLB-AGpIV7wW.js +0 -1
  70. package/web/dist/assets/swimlanesDiagram-G3AALYLV-BTGZSV0N.js +0 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pilotswarm",
3
- "version": "0.5.35",
3
+ "version": "0.5.36",
4
4
  "description": "PilotSwarm application package: terminal UI, browser portal + Web API server, and MCP server — one install, three bins.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -81,7 +81,7 @@
81
81
  "ink": "^6.8.0",
82
82
  "jose": "^6.2.2",
83
83
  "mermaid": "^11.16.0",
84
- "pilotswarm-sdk": "0.5.35",
84
+ "pilotswarm-sdk": "0.5.36",
85
85
  "react": "^19.2.4",
86
86
  "react-dom": "^19.2.4",
87
87
  "ws": "^8.18.2"
@@ -119,7 +119,12 @@ const duroxideTheme = createTheme({
119
119
  brightWhite: "#fdf7f2",
120
120
  },
121
121
  tui: {
122
- border: "#46403d",
122
+ // 2.49:1 on the surface. The old #46403d was 1.48:1 — enough to
123
+ // suggest an edge on a flat panel, and nothing at all once the felt
124
+ // texture ran over it or it was drawn as a one-pixel seam. Every
125
+ // structural line in the theme reads from this: panel edges, the
126
+ // joined-workspace seams, and the table rules.
127
+ border: "#6a615b",
123
128
  // The human speaks in the warning register, as in the Rust theme: the
124
129
  // accent stays reserved for the machine and what it produces.
125
130
  userChat: "#e0b070",
@@ -24,7 +24,10 @@ const win95Theme = createTheme({
24
24
  overlayForeground: "#000000",
25
25
  // The classic disabled/secondary grey; darker than the face so it
26
26
  // stays legible on #c0c0c0 rather than vanishing into it.
27
- hintColor: "#5a5a5a",
27
+ // Darker than the authentic #808080 system grey, which sat at 2.2:1
28
+ // on the #c0c0c0 chrome. Even #5a5a5a only reached 3.79:1; this
29
+ // clears 4.5:1 so muted text is readable wherever the chrome shows.
30
+ hintColor: "#4a4a4a",
28
31
  modalBackdrop: "rgba(0, 0, 0, 0.45)",
29
32
  modalBackground: "#c0c0c0",
30
33
  modalBorder: "#808080",
@@ -7329,6 +7329,30 @@ function Toolbar({ controller, mobile, chatFocusMode = false, onToggleChatFocus
7329
7329
  return toolbar;
7330
7330
  }
7331
7331
 
7332
+ /**
7333
+ * Pin a drag to the element that started it.
7334
+ *
7335
+ * Without capture, a resizer listens for pointerup on `window` — and never
7336
+ * hears it if the button is released over a CROSS-ORIGIN iframe. The artifact
7337
+ * reader is exactly that, and it sits directly beside the column resizer, so
7338
+ * releasing over a rendered artifact left the drag armed: the seam kept
7339
+ * following the pointer with no button held and the cursor stayed stuck in
7340
+ * col-resize.
7341
+ *
7342
+ * Pointer capture routes every subsequent event for this pointerId to the
7343
+ * capturing element regardless of what is underneath, iframes included. The
7344
+ * events still bubble to the window listeners the handles already use, so
7345
+ * this is additive.
7346
+ */
7347
+ function capturePointerForDrag(event) {
7348
+ try {
7349
+ event.currentTarget?.setPointerCapture?.(event.pointerId);
7350
+ } catch {
7351
+ // Capture is best-effort; the body class below is the second line of
7352
+ // defence and the window listeners still work for same-origin drags.
7353
+ }
7354
+ }
7355
+
7332
7356
  function ColumnResizeHandle({ controller, paneAdjust = 0 }) {
7333
7357
  const dragStateRef = React.useRef(null);
7334
7358
  const [dragging, setDragging] = React.useState(false);
@@ -7386,6 +7410,7 @@ function ColumnResizeHandle({ controller, paneAdjust = 0 }) {
7386
7410
  onPointerDown: (event) => {
7387
7411
  if (event.button !== 0) return;
7388
7412
  event.preventDefault();
7413
+ capturePointerForDrag(event);
7389
7414
  dragStateRef.current = {
7390
7415
  startX: event.clientX,
7391
7416
  appliedCells: 0,
@@ -7458,6 +7483,7 @@ function RowResizeHandle({ controller, sessionPaneAdjust = 0 }) {
7458
7483
  onPointerDown: (event) => {
7459
7484
  if (event.button !== 0) return;
7460
7485
  event.preventDefault();
7486
+ capturePointerForDrag(event);
7461
7487
  dragStateRef.current = {
7462
7488
  startY: event.clientY,
7463
7489
  appliedCells: 0,
@@ -7534,6 +7560,7 @@ function SessionColumnResizeHandle({ controller, portalSessionColumnAdjust = 0 }
7534
7560
  onPointerDown: (event) => {
7535
7561
  if (event.button !== 0) return;
7536
7562
  event.preventDefault();
7563
+ capturePointerForDrag(event);
7537
7564
  const gridNode = event.currentTarget.closest(".ps-workspace-main-grid");
7538
7565
  const bounds = portalSessionColumnBounds(gridNode?.getBoundingClientRect?.().width);
7539
7566
  dragStateRef.current = {
@@ -7579,6 +7606,36 @@ function SessionColumnResizeHandle({ controller, portalSessionColumnAdjust = 0 }
7579
7606
  React.createElement("span", { className: "ps-column-resizer-dot" })));
7580
7607
  }
7581
7608
 
7609
+ /**
7610
+ * How many pixels the inspector/activity seam actually moves per row of adjust.
7611
+ *
7612
+ * The split is stored in character ROWS, but the column renders them as `fr`
7613
+ * — so one row of adjustment moves the seam by (column height / total rows)
7614
+ * pixels, whatever that happens to be. Dividing the pointer delta by a fixed
7615
+ * GRID_CELL_HEIGHT only tracks if the column is exactly rows × 19px tall, and
7616
+ * it is not: the column excludes the header and toolbar above it, and the row
7617
+ * height moves with the type scale. So the seam ran ahead of the pointer or
7618
+ * trailed behind it, and the error grew with the drag.
7619
+ *
7620
+ * Both operands are fixed for the duration of a drag — the split moves, the
7621
+ * total does not — so this is measured once at pointerdown rather than on
7622
+ * every pointermove.
7623
+ */
7624
+ function measureActivityRowPx(controller, handleEl) {
7625
+ try {
7626
+ const layout = controller.getCurrentLayout?.();
7627
+ const rows = (layout?.inspectorPaneHeight || 0) + (layout?.activityPaneHeight || 0);
7628
+ const column = handleEl?.closest?.(".ps-workspace-column");
7629
+ if (!column || rows <= 0) return GRID_CELL_HEIGHT;
7630
+ // The resizer's own track is not part of either pane's share.
7631
+ const usable = column.clientHeight - (handleEl.getBoundingClientRect().height || 0);
7632
+ const pxPerRow = usable / rows;
7633
+ return Number.isFinite(pxPerRow) && pxPerRow > 0 ? pxPerRow : GRID_CELL_HEIGHT;
7634
+ } catch {
7635
+ return GRID_CELL_HEIGHT;
7636
+ }
7637
+ }
7638
+
7582
7639
  function ActivityRowResizeHandle({ controller, activityPaneAdjust = 0 }) {
7583
7640
  const dragStateRef = React.useRef(null);
7584
7641
  const [dragging, setDragging] = React.useState(false);
@@ -7595,7 +7652,7 @@ function ActivityRowResizeHandle({ controller, activityPaneAdjust = 0 }) {
7595
7652
  const onPointerMove = (event) => {
7596
7653
  const dragState = dragStateRef.current;
7597
7654
  if (!dragState) return;
7598
- const deltaCells = Math.round((event.clientY - dragState.startY) / GRID_CELL_HEIGHT);
7655
+ const deltaCells = Math.round((event.clientY - dragState.startY) / dragState.pxPerRow);
7599
7656
  const deltaIncrement = deltaCells - dragState.appliedCells;
7600
7657
  if (!deltaIncrement) return;
7601
7658
  controller.adjustActivityPaneSplit(-deltaIncrement);
@@ -7622,9 +7679,12 @@ function ActivityRowResizeHandle({ controller, activityPaneAdjust = 0 }) {
7622
7679
  onPointerDown: (event) => {
7623
7680
  if (event.button !== 0) return;
7624
7681
  event.preventDefault();
7682
+ capturePointerForDrag(event);
7625
7683
  dragStateRef.current = {
7626
7684
  startY: event.clientY,
7627
7685
  appliedCells: 0,
7686
+ // MEASURED, not assumed — see measureActivityRowPx.
7687
+ pxPerRow: measureActivityRowPx(controller, event.currentTarget),
7628
7688
  };
7629
7689
  setDragging(true);
7630
7690
  document.body.classList.add("is-resizing-pane-y");
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-B5-y6tMF.js";import{p as f}from"./chunk-JWPE2WC7-DZ4WSHGH.js";import{_ as n,l as o}from"./mermaid.core-DgXXt1OS.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-jcyYelJS.js";import"./pilotswarm-D7NLCbuc.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-CXmt8msF.js";import{p as f}from"./chunk-JWPE2WC7-B6GKLlNb.js";import{_ as n,l as o}from"./mermaid.core-DwzXN6up.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-CcgV1ve4.js";import"./pilotswarm-kCQFVjJm.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
@@ -1 +1 @@
1
- import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-DgXXt1OS.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,z,a){var O=I-l,i=D-h,n=z-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function U(l,h,I,D,v,A,z){var a=l-I,O=h-D,i=(z?A:-A)/J(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,B=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*J(on(0,T*T*R-P*P)),Y=(P*g-m*S)/R,$=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=Y-B,e=$-t,r=w-B,C=p-t;return x*x+e*e>r*r+C*C&&(Y=w,$=p),{cx:Y,cy:$,x01:-n,y01:-d,x11:Y*(v/T-1),y11:$*(v/T-1)}}function hn(){var l=cn,h=yn,I=j(0),D=null,v=gn,A=dn,z=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,B=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(B>tn-y)a.moveTo(s*F(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*F(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=B,S=B,Y=z.apply(this,arguments)/2,$=Y>y&&(D?+D.apply(this,arguments):J(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if($>y){var C=sn($/u*q(Y)),K=sn($/s*q(Y));(P-=C*2)>y?(C*=t?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(S-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(S=0,m=g=(f+c)/2)}var G=s*F(m),H=s*q(m),L=u*F(T),M=u*q(T);if(w>y){var N=s*F(g),Q=s*q(g),V=u*F(R),W=u*q(R),E;if(B<an)if(E=pn(G,H,V,W,N,Q,L,M)){var X=G-E[0],Z=H-E[1],b=N-E[0],k=Q-E[1],nn=1/q(fn((X*b+Z*k)/(J(X*X+Z*Z)*J(b*b+k*k)))/2),en=J(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=U(V,W,G,H,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(G,H),a.arc(0,0,s,m,g,!t)):a.moveTo(G,H),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(G,H,V,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[F(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:j(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:j(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:j(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:j(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:j(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:j(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:j(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{Y as ln,$ as an,a0 as F,a1 as q,a2 as j,a3 as un,a4 as y,a5 as tn,a6 as J,a7 as _,a8 as rn,a9 as o,aa as on,ab as sn,ac as fn}from"./mermaid.core-DwzXN6up.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,z,a){var O=I-l,i=D-h,n=z-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function U(l,h,I,D,v,A,z){var a=l-I,O=h-D,i=(z?A:-A)/J(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,B=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*J(on(0,T*T*R-P*P)),Y=(P*g-m*S)/R,$=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=Y-B,e=$-t,r=w-B,C=p-t;return x*x+e*e>r*r+C*C&&(Y=w,$=p),{cx:Y,cy:$,x01:-n,y01:-d,x11:Y*(v/T-1),y11:$*(v/T-1)}}function hn(){var l=cn,h=yn,I=j(0),D=null,v=gn,A=dn,z=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,B=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(B>tn-y)a.moveTo(s*F(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*F(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=B,S=B,Y=z.apply(this,arguments)/2,$=Y>y&&(D?+D.apply(this,arguments):J(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if($>y){var C=sn($/u*q(Y)),K=sn($/s*q(Y));(P-=C*2)>y?(C*=t?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(S-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(S=0,m=g=(f+c)/2)}var G=s*F(m),H=s*q(m),L=u*F(T),M=u*q(T);if(w>y){var N=s*F(g),Q=s*q(g),V=u*F(R),W=u*q(R),E;if(B<an)if(E=pn(G,H,V,W,N,Q,L,M)){var X=G-E[0],Z=H-E[1],b=N-E[0],k=Q-E[1],nn=1/q(fn((X*b+Z*k)/(J(X*X+Z*Z)*J(b*b+k*k)))/2),en=J(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=U(V,W,G,H,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(G,H),a.arc(0,0,s,m,g,!t)):a.moveTo(G,H),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(G,H,V,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[F(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:j(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:j(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:j(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:j(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:j(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:j(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:j(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};