stickyflow 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +51 -5
  3. package/dist/binding/index.cjs +34 -0
  4. package/dist/binding/index.cjs.map +1 -0
  5. package/dist/binding/index.d.cts +11 -0
  6. package/dist/binding/index.d.ts +11 -0
  7. package/dist/binding/index.js +5 -0
  8. package/dist/binding/index.js.map +1 -0
  9. package/dist/{chunk-XEN5QIIJ.js → chunk-7VW2XKVB.js} +3 -3
  10. package/dist/{chunk-XEN5QIIJ.js.map → chunk-7VW2XKVB.js.map} +1 -1
  11. package/dist/chunk-BODZN3ZI.js +1182 -0
  12. package/dist/chunk-BODZN3ZI.js.map +1 -0
  13. package/dist/{chunk-CSXQD3ON.js → chunk-G7NRK5AG.js} +1128 -1081
  14. package/dist/chunk-G7NRK5AG.js.map +1 -0
  15. package/dist/{chunk-BYMIYXP5.js → chunk-IEHE6WVN.js} +197 -19
  16. package/dist/chunk-IEHE6WVN.js.map +1 -0
  17. package/dist/{chunk-HFOGKSNU.cjs → chunk-L3VJXZFD.cjs} +15 -15
  18. package/dist/{chunk-HFOGKSNU.cjs.map → chunk-L3VJXZFD.cjs.map} +1 -1
  19. package/dist/{chunk-65IVT4GK.js → chunk-LTGF5OHP.js} +1008 -631
  20. package/dist/chunk-LTGF5OHP.js.map +1 -0
  21. package/dist/chunk-TWDLOXRM.cjs +1189 -0
  22. package/dist/chunk-TWDLOXRM.cjs.map +1 -0
  23. package/dist/{chunk-UXDWH2JC.cjs → chunk-VK3T6O5Z.cjs} +1165 -1118
  24. package/dist/chunk-VK3T6O5Z.cjs.map +1 -0
  25. package/dist/{chunk-CXL254BT.cjs → chunk-XY2GZUHC.cjs} +204 -18
  26. package/dist/chunk-XY2GZUHC.cjs.map +1 -0
  27. package/dist/{chunk-DDCTNLLD.cjs → chunk-ZMLQIMJK.cjs} +1504 -1128
  28. package/dist/chunk-ZMLQIMJK.cjs.map +1 -0
  29. package/dist/index.cjs +53 -1013
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +22 -14
  32. package/dist/index.d.ts +22 -14
  33. package/dist/index.js +6 -993
  34. package/dist/index.js.map +1 -1
  35. package/dist/interaction/index.cjs +474 -305
  36. package/dist/interaction/index.cjs.map +1 -1
  37. package/dist/interaction/index.d.cts +11 -3
  38. package/dist/interaction/index.d.ts +11 -3
  39. package/dist/interaction/index.js +255 -87
  40. package/dist/interaction/index.js.map +1 -1
  41. package/dist/{render-C5X74hds.d.cts → render-CgX_y15a.d.cts} +193 -116
  42. package/dist/{render-C5X74hds.d.ts → render-CgX_y15a.d.ts} +193 -116
  43. package/dist/runtime-DnUxca3Y.d.ts +10 -0
  44. package/dist/runtime-reWgr7MP.d.cts +10 -0
  45. package/dist/{runtimeTypes-D8hPZ62T.d.ts → runtimeTypes-CEBGueYM.d.ts} +10 -5
  46. package/dist/{runtimeTypes-yTSAvtCn.d.cts → runtimeTypes-D60w6nyF.d.cts} +10 -5
  47. package/dist/stickyflow-diagram.global.js +35 -35
  48. package/dist/stickyflow-diagram.global.js.map +1 -1
  49. package/dist/{types-BDKDf4zr.d.cts → types-DYLC_lsk.d.ts} +3 -2
  50. package/dist/{types-CdgGdtoD.d.ts → types-DvhMpqrL.d.cts} +3 -2
  51. package/dist/viewer/index.cjs +9 -9
  52. package/dist/viewer/index.d.cts +4 -4
  53. package/dist/viewer/index.d.ts +4 -4
  54. package/dist/viewer/index.js +4 -4
  55. package/dist/web-component/index.cjs +6 -6
  56. package/dist/web-component/index.d.cts +2 -2
  57. package/dist/web-component/index.d.ts +2 -2
  58. package/dist/web-component/index.js +4 -4
  59. package/package.json +6 -1
  60. package/dist/chunk-65IVT4GK.js.map +0 -1
  61. package/dist/chunk-BYMIYXP5.js.map +0 -1
  62. package/dist/chunk-CSXQD3ON.js.map +0 -1
  63. package/dist/chunk-CXL254BT.cjs.map +0 -1
  64. package/dist/chunk-DDCTNLLD.cjs.map +0 -1
  65. package/dist/chunk-UXDWH2JC.cjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkHFOGKSNU_cjs = require('../chunk-HFOGKSNU.cjs');
4
- var chunkCXL254BT_cjs = require('../chunk-CXL254BT.cjs');
3
+ var chunkL3VJXZFD_cjs = require('../chunk-L3VJXZFD.cjs');
4
+ var chunkXY2GZUHC_cjs = require('../chunk-XY2GZUHC.cjs');
5
5
 
6
6
  // src/runtime/interaction/chartValue/coordinates.ts
7
7
  function pointerUserY(svg, event) {
@@ -70,13 +70,13 @@ function updateConnectedLine(svg, drag) {
70
70
  }));
71
71
  const line = findConnectedLine(svg, drag.owner.id, drag.series);
72
72
  if (line) {
73
- line.setAttribute("d", chunkCXL254BT_cjs.linePathData(points, drag.lineTension));
73
+ line.setAttribute("d", chunkXY2GZUHC_cjs.linePathData(points, drag.lineTension));
74
74
  }
75
75
  const area = findConnectedLineArea(svg, drag.owner.id, drag.series);
76
76
  if (area && points.length > 1) {
77
77
  const first = points[0];
78
78
  const last = points[points.length - 1];
79
- const d = `${chunkCXL254BT_cjs.linePathData(points, drag.lineTension)} L ${last.x} ${drag.baseY} L ${first.x} ${drag.baseY} Z`;
79
+ const d = `${chunkXY2GZUHC_cjs.linePathData(points, drag.lineTension)} L ${last.x} ${drag.baseY} L ${first.x} ${drag.baseY} Z`;
80
80
  area.setAttribute("d", d);
81
81
  }
82
82
  }
@@ -90,14 +90,14 @@ function setBarPath(svg, drag, d) {
90
90
  function updateChartValuePreview(svg, drag, value) {
91
91
  if (drag.isBar && drag.scale.horizontal) {
92
92
  const width = Math.max(0, pixelForValue(value, drag.scale) - drag.barX);
93
- setBarPath(svg, drag, chunkCXL254BT_cjs.roundedBarPath(drag.barX, drag.barTop, width, drag.barHeight, drag.barRadius));
93
+ setBarPath(svg, drag, chunkXY2GZUHC_cjs.roundedBarPath(drag.barX, drag.barTop, width, drag.barHeight, drag.barRadius));
94
94
  return;
95
95
  }
96
96
  const y = pixelForValue(value, drag.scale);
97
97
  if (drag.isBar) {
98
98
  const top = Math.min(y, drag.baseY);
99
99
  const height = Math.max(0, Math.abs(drag.baseY - y));
100
- setBarPath(svg, drag, chunkCXL254BT_cjs.barShapePath(drag.barX, top, drag.barWidth, height, drag.barRadius));
100
+ setBarPath(svg, drag, chunkXY2GZUHC_cjs.barShapePath(drag.barX, top, drag.barWidth, height, drag.barRadius));
101
101
  return;
102
102
  }
103
103
  drag.element.setAttribute("cy", String(y));
@@ -120,24 +120,24 @@ function labelShift(placement, origin, top, height) {
120
120
  }
121
121
  function resizePill(pill, text, label, dy) {
122
122
  const fontSize = parseFloat(text.getAttribute("font-size") ?? "12");
123
- const size = chunkCXL254BT_cjs.barLabelSize(label, fontSize, true);
123
+ const size = chunkXY2GZUHC_cjs.barLabelSize(label, fontSize, true);
124
124
  const stored = pill.dataset.sfPillY ?? (pill.getAttribute("d") ?? "").split(/\s+/)[2];
125
125
  pill.dataset.sfPillY = stored;
126
126
  const centerX = Number(text.getAttribute("x"));
127
- pill.setAttribute("d", chunkCXL254BT_cjs.pillPath(centerX - size.width / 2, Number(stored), size.width, size.height));
127
+ pill.setAttribute("d", chunkXY2GZUHC_cjs.pillPath(centerX - size.width / 2, Number(stored), size.width, size.height));
128
128
  pill.setAttribute("transform", `translate(0 ${dy})`);
129
129
  }
130
130
  function updateHorizontalBarLabel(label, drag, origin, value) {
131
- const content = chunkCXL254BT_cjs.formatBarLabel(value, label.template);
131
+ const content = chunkXY2GZUHC_cjs.formatBarLabel(value, label.template);
132
132
  (label.text.querySelector("tspan") ?? label.text).textContent = content;
133
133
  if (label.placement === "axis") {
134
134
  return true;
135
135
  }
136
136
  const fontSize = parseFloat(label.text.getAttribute("font-size") ?? "12");
137
- const size = chunkCXL254BT_cjs.barLabelSize(content, fontSize, label.pill !== null);
137
+ const size = chunkXY2GZUHC_cjs.barLabelSize(content, fontSize, label.pill !== null);
138
138
  const width = Math.max(0, pixelForValue(value, drag.scale) - origin.left);
139
139
  const end = origin.left + width;
140
- const center = label.placement === "outside" ? end + chunkCXL254BT_cjs.BAR_LABEL.gap + size.width / 2 : label.placement === "inside" ? end - chunkCXL254BT_cjs.BAR_LABEL.gap - size.width / 2 : origin.left + width / 2;
140
+ const center = label.placement === "outside" ? end + chunkXY2GZUHC_cjs.BAR_LABEL.gap + size.width / 2 : label.placement === "inside" ? end - chunkXY2GZUHC_cjs.BAR_LABEL.gap - size.width / 2 : origin.left + width / 2;
141
141
  const stored = label.text.dataset.sfLabelX ?? label.text.getAttribute("x") ?? "0";
142
142
  label.text.dataset.sfLabelX = stored;
143
143
  label.text.setAttribute("transform", `translate(${center - Number(stored)} 0)`);
@@ -145,7 +145,7 @@ function updateHorizontalBarLabel(label, drag, origin, value) {
145
145
  const pillY = label.pill.dataset.sfPillY ?? (label.pill.getAttribute("d") ?? "").split(/\s+/)[2];
146
146
  label.pill.dataset.sfPillY = pillY;
147
147
  label.pill.removeAttribute("transform");
148
- label.pill.setAttribute("d", chunkCXL254BT_cjs.pillPath(center - size.width / 2, Number(pillY), size.width, size.height));
148
+ label.pill.setAttribute("d", chunkXY2GZUHC_cjs.pillPath(center - size.width / 2, Number(pillY), size.width, size.height));
149
149
  }
150
150
  return true;
151
151
  }
@@ -161,7 +161,7 @@ function updateBarLabel(svg, drag, origin, value) {
161
161
  const top = Math.min(y, drag.baseY);
162
162
  const height = Math.abs(drag.baseY - y);
163
163
  const dy = labelShift(label.placement, origin, top, height);
164
- const content = chunkCXL254BT_cjs.formatBarLabel(value, label.template);
164
+ const content = chunkXY2GZUHC_cjs.formatBarLabel(value, label.template);
165
165
  (label.text.querySelector("tspan") ?? label.text).textContent = content;
166
166
  label.text.setAttribute("transform", `translate(0 ${dy})`);
167
167
  if (label.pill) {
@@ -177,7 +177,7 @@ var HEIGHT = 18;
177
177
  var GAP = 8;
178
178
  var BACKGROUND = "rgba(15, 23, 42, 0.9)";
179
179
  function element(svg, tag) {
180
- return svg.ownerDocument.createElementNS(chunkHFOGKSNU_cjs.SVG_NAMESPACE, tag);
180
+ return svg.ownerDocument.createElementNS(chunkL3VJXZFD_cjs.SVG_NAMESPACE, tag);
181
181
  }
182
182
  function createValueReadout(svg) {
183
183
  const group = element(svg, "g");
@@ -273,7 +273,7 @@ function resolveChartValueDrag(svg, event) {
273
273
  if (!target) {
274
274
  return null;
275
275
  }
276
- const scale = parseValueScale(chunkHFOGKSNU_cjs.findOwnerNode(svg, target.owner.id, chunkHFOGKSNU_cjs.isPrimary));
276
+ const scale = parseValueScale(chunkL3VJXZFD_cjs.findOwnerNode(svg, target.owner.id, chunkL3VJXZFD_cjs.isPrimary));
277
277
  const geometry = scale ? resolveChartValueGeometry(svg, target, scale) : null;
278
278
  if (!scale || !geometry) {
279
279
  return null;
@@ -293,13 +293,13 @@ function createChartValueDragState(target, scale, geometry, pointerId) {
293
293
  };
294
294
  }
295
295
  function isChartValuePointer(event) {
296
- return event.button === 0 && !chunkHFOGKSNU_cjs.isCameraGesture(event);
296
+ return event.button === 0 && !chunkL3VJXZFD_cjs.isCameraGesture(event);
297
297
  }
298
298
  function findChartValueMark(event) {
299
299
  return event.target?.closest?.("[data-sf-value-index]");
300
300
  }
301
301
  function readChartValueTarget(mark) {
302
- const owner = chunkHFOGKSNU_cjs.resolveOwner(mark);
302
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(mark);
303
303
  if (owner?.role !== "chart") {
304
304
  return null;
305
305
  }
@@ -1751,7 +1751,7 @@ var ColorEditSession = class {
1751
1751
  const hasOverride = target.node.getAttribute("data-sf-color-override") === "true";
1752
1752
  this.#open = openColorPopover({
1753
1753
  seed: seedFrom(fill, readGradientValue(this.#svg, fill)),
1754
- anchor: chunkHFOGKSNU_cjs.screenRectOf(target.node),
1754
+ anchor: chunkL3VJXZFD_cjs.screenRectOf(target.node),
1755
1755
  theme: resolveTheme(this.#theme),
1756
1756
  allowGradient: !target.solidOnly,
1757
1757
  onCommit: (color) => {
@@ -1833,7 +1833,7 @@ function resolveTarget(event, selector, pathOf, rules) {
1833
1833
  return null;
1834
1834
  }
1835
1835
  const path = pathOf(node);
1836
- const owner = chunkHFOGKSNU_cjs.resolveOwner(node);
1836
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(node);
1837
1837
  if (!path || !owner || !isEditablePath(path, rules) || requiresPriorSelection(node, owner)) {
1838
1838
  return null;
1839
1839
  }
@@ -1855,7 +1855,7 @@ function resolveZoneGradientTarget(event) {
1855
1855
  if (!node) {
1856
1856
  return null;
1857
1857
  }
1858
- const owner = chunkHFOGKSNU_cjs.resolveOwner(node);
1858
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(node);
1859
1859
  if (!owner) {
1860
1860
  return null;
1861
1861
  }
@@ -1891,7 +1891,7 @@ var ZoneGradientSession = class {
1891
1891
  const beforeStops = sortStops(gradient.stops);
1892
1892
  this.#open = openColorPopover({
1893
1893
  seed: seedFrom(fill, gradient),
1894
- anchor: chunkHFOGKSNU_cjs.screenRectOf(target.node),
1894
+ anchor: chunkL3VJXZFD_cjs.screenRectOf(target.node),
1895
1895
  theme: resolveTheme(this.#theme),
1896
1896
  allowGradient: true,
1897
1897
  lockStops: true,
@@ -1964,15 +1964,15 @@ function bindDeleteSelection(viewer, emitter) {
1964
1964
  }
1965
1965
 
1966
1966
  // src/runtime/interaction/events.ts
1967
- var Emitter2 = class extends chunkHFOGKSNU_cjs.Emitter {
1967
+ var Emitter2 = class extends chunkL3VJXZFD_cjs.Emitter {
1968
1968
  };
1969
1969
 
1970
1970
  // src/runtime/interaction/linkPreview/geometry.ts
1971
1971
  function anchorPoint(bounds, side, other) {
1972
1972
  if (side) {
1973
- return chunkCXL254BT_cjs.pointAtPort(bounds, { side, offset: 0.5 });
1973
+ return chunkXY2GZUHC_cjs.pointAtPort(bounds, { side, offset: 0.5 });
1974
1974
  }
1975
- return chunkCXL254BT_cjs.edgePointToward(bounds, other);
1975
+ return chunkXY2GZUHC_cjs.edgePointToward(bounds, other);
1976
1976
  }
1977
1977
  function polylinePathData(points) {
1978
1978
  if (points.length < 4) {
@@ -1989,7 +1989,7 @@ function previewPathData(points, segments, pathType, strokeWidth) {
1989
1989
  return `M ${points[0]} ${points[1]} C ${points[2]} ${points[3]} ${points[4]} ${points[5]} ${points[6]} ${points[7]}`;
1990
1990
  }
1991
1991
  if (pathType === "orthogonal" && segments.length > 0) {
1992
- return chunkCXL254BT_cjs.roundedOrthogonalPathData(segments, Math.max(16, strokeWidth * 4));
1992
+ return chunkXY2GZUHC_cjs.roundedOrthogonalPathData(segments, Math.max(16, strokeWidth * 4));
1993
1993
  }
1994
1994
  return polylinePathData(points);
1995
1995
  }
@@ -2009,8 +2009,8 @@ function previewLink(fromSide, toSide) {
2009
2009
  function routePreviewLink(fromBounds, toBounds, fromSide, toSide, pathType) {
2010
2010
  const from = anchorPoint(fromBounds, fromSide, toBounds);
2011
2011
  const to = anchorPoint(toBounds, toSide, fromBounds);
2012
- const { points, segments } = chunkCXL254BT_cjs.calculateLinkRoute(previewLink(fromSide, toSide), from, to, pathType);
2013
- return { points, segments, midpoint: chunkCXL254BT_cjs.getLineMidpoint(points, pathType, from, to) };
2012
+ const { points, segments } = chunkXY2GZUHC_cjs.calculateLinkRoute(previewLink(fromSide, toSide), from, to, pathType);
2013
+ return { points, segments, midpoint: chunkXY2GZUHC_cjs.getLineMidpoint(points, pathType, from, to) };
2014
2014
  }
2015
2015
 
2016
2016
  // src/runtime/interaction/linkPreview/discovery.ts
@@ -2042,7 +2042,7 @@ function resolveOppositeEndpoint(svg, path, canvasObjectId) {
2042
2042
  if (!otherId) {
2043
2043
  return null;
2044
2044
  }
2045
- const otherPrimary = chunkHFOGKSNU_cjs.findOwnerNode(svg, otherId, chunkHFOGKSNU_cjs.isPrimary);
2045
+ const otherPrimary = chunkL3VJXZFD_cjs.findOwnerNode(svg, otherId, chunkL3VJXZFD_cjs.isPrimary);
2046
2046
  return otherPrimary ? { draggedIsFrom, bounds: otherPrimary.getBBox() } : null;
2047
2047
  }
2048
2048
  function captureLiveLinkLabel(svg, draft, draggedBounds) {
@@ -2089,8 +2089,8 @@ function resolveOtherFacePoint(svg, path, canvasObjectId) {
2089
2089
  if (!otherId || !face || !otherFace) {
2090
2090
  return null;
2091
2091
  }
2092
- const otherPrimary = chunkHFOGKSNU_cjs.findOwnerNode(svg, otherId, chunkHFOGKSNU_cjs.isPrimary);
2093
- const otherGeometry = otherPrimary && chunkHFOGKSNU_cjs.isometricGeometryOf(otherPrimary);
2092
+ const otherPrimary = chunkL3VJXZFD_cjs.findOwnerNode(svg, otherId, chunkL3VJXZFD_cjs.isPrimary);
2093
+ const otherGeometry = otherPrimary && chunkL3VJXZFD_cjs.isometricGeometryOf(otherPrimary);
2094
2094
  if (!otherGeometry?.bounds) {
2095
2095
  return null;
2096
2096
  }
@@ -2101,7 +2101,7 @@ function resolveOtherFacePoint(svg, path, canvasObjectId) {
2101
2101
  height: otherGeometry.height,
2102
2102
  depth: otherGeometry.depth
2103
2103
  };
2104
- return { otherPoint: chunkCXL254BT_cjs.isometricFaceCenter(otherObject, otherFace), draggedIsFrom, face };
2104
+ return { otherPoint: chunkXY2GZUHC_cjs.isometricFaceCenter(otherObject, otherFace), draggedIsFrom, face };
2105
2105
  }
2106
2106
  function findLiveFaceLinks(svg, canvasObjectId) {
2107
2107
  const escapedId = CSS.escape(canvasObjectId);
@@ -2120,7 +2120,7 @@ function findLiveFaceLinks(svg, canvasObjectId) {
2120
2120
 
2121
2121
  // src/runtime/interaction/linkPreview/faceUpdate.ts
2122
2122
  function updateLiveFaceLink(link, liveObject) {
2123
- const draggedPoint = chunkCXL254BT_cjs.isometricFaceCenter(liveObject, link.face);
2123
+ const draggedPoint = chunkXY2GZUHC_cjs.isometricFaceCenter(liveObject, link.face);
2124
2124
  const from = link.draggedIsFrom ? draggedPoint : link.otherPoint;
2125
2125
  const to = link.draggedIsFrom ? link.otherPoint : draggedPoint;
2126
2126
  link.path.setAttribute("d", `M ${from.x} ${from.y} L ${to.x} ${to.y}`);
@@ -2144,7 +2144,7 @@ function updateLabelGap(link, points) {
2144
2144
  if (!link.labelGapSize) {
2145
2145
  return;
2146
2146
  }
2147
- const gap = chunkCXL254BT_cjs.labelGapDash(points, link.pathType, link.labelGapSize.width, link.labelGapSize.height);
2147
+ const gap = chunkXY2GZUHC_cjs.labelGapDash(points, link.pathType, link.labelGapSize.width, link.labelGapSize.height);
2148
2148
  if (gap) {
2149
2149
  link.path.setAttribute("stroke-dasharray", `${gap.dashBefore} ${gap.gapLength} 1000000`);
2150
2150
  } else {
@@ -2184,11 +2184,11 @@ function readIsometricSnapStep(svg) {
2184
2184
  return step > 0 ? step : null;
2185
2185
  }
2186
2186
  function nearestIsometricLatticePoint(point, step) {
2187
- const u = point.x / (chunkCXL254BT_cjs.AXIS_COS * step);
2188
- const v = point.y / (chunkCXL254BT_cjs.AXIS_SIN * step);
2187
+ const u = point.x / (chunkXY2GZUHC_cjs.AXIS_COS * step);
2188
+ const v = point.y / (chunkXY2GZUHC_cjs.AXIS_SIN * step);
2189
2189
  const i = Math.round((u + v) / 2);
2190
2190
  const j = Math.round((u - v) / 2);
2191
- return { x: (i + j) * chunkCXL254BT_cjs.AXIS_COS * step, y: (i - j) * chunkCXL254BT_cjs.AXIS_SIN * step };
2191
+ return { x: (i + j) * chunkXY2GZUHC_cjs.AXIS_COS * step, y: (i - j) * chunkXY2GZUHC_cjs.AXIS_SIN * step };
2192
2192
  }
2193
2193
  function snapToStep(value, step, min) {
2194
2194
  return Math.max(min, Math.round(value / step) * step);
@@ -2201,21 +2201,21 @@ var LABEL_FONT_SIZE = 12;
2201
2201
  var LABEL_LINE_HEIGHT = 1.2;
2202
2202
  var LABEL_BASELINE_OFFSET = -LABEL_GAP - LABEL_HEIGHT + (LABEL_HEIGHT - LABEL_FONT_SIZE * LABEL_LINE_HEIGHT) / 2 + LABEL_FONT_SIZE;
2203
2203
  function applyIsometricAxisPreview(nodes, object, cornerRadius, overlay, svg) {
2204
- const faces = chunkCXL254BT_cjs.isometricFaces(object);
2205
- nodes.top?.setAttribute("d", chunkCXL254BT_cjs.roundedPolygonPath(faces.top, 0));
2206
- nodes.front?.setAttribute("d", chunkCXL254BT_cjs.roundedPolygonPath(faces.front, 0));
2207
- nodes.side?.setAttribute("d", chunkCXL254BT_cjs.roundedPolygonPath(faces.right, 0));
2204
+ const faces = chunkXY2GZUHC_cjs.isometricFaces(object);
2205
+ nodes.top?.setAttribute("d", chunkXY2GZUHC_cjs.roundedPolygonPath(faces.top, 0));
2206
+ nodes.front?.setAttribute("d", chunkXY2GZUHC_cjs.roundedPolygonPath(faces.front, 0));
2207
+ nodes.side?.setAttribute("d", chunkXY2GZUHC_cjs.roundedPolygonPath(faces.right, 0));
2208
2208
  const silhouette = [faces.top[0], faces.top[1], faces.right[2], faces.front[2], faces.front[3], faces.top[3]];
2209
- const hullPath = chunkCXL254BT_cjs.roundedPolygonPath(silhouette, cornerRadius);
2209
+ const hullPath = chunkXY2GZUHC_cjs.roundedPolygonPath(silhouette, cornerRadius);
2210
2210
  nodes.hull?.setAttribute("d", hullPath);
2211
2211
  if (overlay.halo) {
2212
- chunkHFOGKSNU_cjs.updateHalo(overlay.halo, hullPath);
2212
+ chunkL3VJXZFD_cjs.updateHalo(overlay.halo, hullPath);
2213
2213
  }
2214
- const placements = chunkHFOGKSNU_cjs.axisArrowPlacements(object);
2214
+ const placements = chunkL3VJXZFD_cjs.axisArrowPlacements(object);
2215
2215
  Object.keys(placements).forEach((axis) => {
2216
2216
  const group = overlay.arrows[axis];
2217
2217
  if (group) {
2218
- chunkHFOGKSNU_cjs.updateAxisArrowGroup(group, placements[axis].origin, placements[axis].direction, svg);
2218
+ chunkL3VJXZFD_cjs.updateAxisArrowGroup(group, placements[axis].origin, placements[axis].direction, svg);
2219
2219
  }
2220
2220
  });
2221
2221
  nodes.seams?.setAttribute(
@@ -2233,9 +2233,9 @@ function applyIsometricAxisPreview(nodes, object, cornerRadius, overlay, svg) {
2233
2233
  x: footprintCenter.x + (point.x - footprintCenter.x) * shadowSpread,
2234
2234
  y: footprintCenter.y + (point.y - footprintCenter.y) * shadowSpread
2235
2235
  }));
2236
- nodes.groundShadow.setAttribute("d", chunkCXL254BT_cjs.roundedPolygonPath(footprint, 0));
2236
+ nodes.groundShadow.setAttribute("d", chunkXY2GZUHC_cjs.roundedPolygonPath(footprint, 0));
2237
2237
  }
2238
- const anchor = chunkCXL254BT_cjs.isometricTopFaceCenter(object);
2238
+ const anchor = chunkXY2GZUHC_cjs.isometricTopFaceCenter(object);
2239
2239
  if (nodes.labelGuide) {
2240
2240
  nodes.labelGuide.setAttribute("d", `M ${anchor.x} ${anchor.y - LABEL_GAP} L ${anchor.x} ${anchor.y}`);
2241
2241
  }
@@ -2251,7 +2251,7 @@ function applyIsometricAxisPreview(nodes, object, cornerRadius, overlay, svg) {
2251
2251
  // src/runtime/interaction/isometricAxisResize/state.ts
2252
2252
  var AXES = ["width", "height", "depth"];
2253
2253
  function collectNodes(svg, ownerId) {
2254
- const all = chunkHFOGKSNU_cjs.findAllOwnerNodes(svg, ownerId);
2254
+ const all = chunkL3VJXZFD_cjs.findAllOwnerNodes(svg, ownerId);
2255
2255
  const bySuffix = (suffix) => all.find((el2) => el2.id.endsWith(suffix)) ?? null;
2256
2256
  return {
2257
2257
  top: bySuffix("-top"),
@@ -2277,30 +2277,30 @@ function createIsometricAxisDragState(svg, event) {
2277
2277
  if (!ownerId) {
2278
2278
  return null;
2279
2279
  }
2280
- const primary = chunkHFOGKSNU_cjs.findOwnerNode(svg, ownerId, chunkHFOGKSNU_cjs.isPrimary);
2281
- const owner = primary && chunkHFOGKSNU_cjs.resolveOwner(primary);
2280
+ const primary = chunkL3VJXZFD_cjs.findOwnerNode(svg, ownerId, chunkL3VJXZFD_cjs.isPrimary);
2281
+ const owner = primary && chunkL3VJXZFD_cjs.resolveOwner(primary);
2282
2282
  if (!primary || owner?.role !== "isometric") {
2283
2283
  return null;
2284
2284
  }
2285
- const startUser = chunkHFOGKSNU_cjs.pointerUserPoint(svg, event);
2285
+ const startUser = chunkL3VJXZFD_cjs.pointerUserPoint(svg, event);
2286
2286
  if (!startUser) {
2287
2287
  return null;
2288
2288
  }
2289
- const geometry = chunkHFOGKSNU_cjs.isometricGeometryOf(primary);
2289
+ const geometry = chunkL3VJXZFD_cjs.isometricGeometryOf(primary);
2290
2290
  const bounds = geometry?.bounds ?? primary.getBBox();
2291
2291
  const nodes = collectNodes(svg, ownerId);
2292
2292
  [nodes.top, nodes.front, nodes.side].forEach((node) => {
2293
2293
  node?.removeAttribute("clip-path");
2294
2294
  });
2295
2295
  captureTarget.setPointerCapture?.(event.pointerId);
2296
- const overlayHalo = overlay?.querySelector(`[${chunkHFOGKSNU_cjs.ISO_HALO_ATTR}]`) ?? null;
2296
+ const overlayHalo = overlay?.querySelector(`[${chunkL3VJXZFD_cjs.ISO_HALO_ATTR}]`) ?? null;
2297
2297
  const overlayArrows = Object.fromEntries(
2298
2298
  AXES.map((axis2) => [
2299
2299
  axis2,
2300
2300
  overlay?.querySelector(`[data-sf-resize-handle="iso-${axis2}"]`) ?? null
2301
2301
  ])
2302
2302
  );
2303
- const overlayDuplicateBubbles = overlay?.querySelector(`[${chunkHFOGKSNU_cjs.ISO_DUPLICATE_BUBBLES_ATTR}]`) ?? null;
2303
+ const overlayDuplicateBubbles = overlay?.querySelector(`[${chunkL3VJXZFD_cjs.ISO_DUPLICATE_BUBBLES_ATTR}]`) ?? null;
2304
2304
  if (overlayDuplicateBubbles) {
2305
2305
  overlayDuplicateBubbles.style.display = "none";
2306
2306
  }
@@ -2317,7 +2317,7 @@ function createIsometricAxisDragState(svg, event) {
2317
2317
  pointerId: event.pointerId,
2318
2318
  startUser,
2319
2319
  start,
2320
- cornerRadius: geometry?.cornerRadius ?? Number(primary.getAttribute(chunkCXL254BT_cjs.CORNER_RADIUS_ATTR)) ?? 0,
2320
+ cornerRadius: geometry?.cornerRadius ?? Number(primary.getAttribute(chunkXY2GZUHC_cjs.CORNER_RADIUS_ATTR)) ?? 0,
2321
2321
  nodes,
2322
2322
  overlayHalo,
2323
2323
  overlayArrows,
@@ -2336,15 +2336,15 @@ function nextGeometry(drag, point, step) {
2336
2336
  const dx = point.x - drag.startUser.x;
2337
2337
  const dy = point.y - drag.startUser.y;
2338
2338
  if (axis === "width") {
2339
- const delta2 = dx * chunkCXL254BT_cjs.AXIS_COS + dy * chunkCXL254BT_cjs.AXIS_SIN;
2339
+ const delta2 = dx * chunkXY2GZUHC_cjs.AXIS_COS + dy * chunkXY2GZUHC_cjs.AXIS_SIN;
2340
2340
  return { ...start, width: length(start.width + delta2, MIN_SIZE) };
2341
2341
  }
2342
2342
  if (axis === "height") {
2343
2343
  return { ...start, height: length(start.height + dy, MIN_SIZE) };
2344
2344
  }
2345
- const delta = -dx * chunkCXL254BT_cjs.AXIS_COS + dy * chunkCXL254BT_cjs.AXIS_SIN;
2345
+ const delta = -dx * chunkXY2GZUHC_cjs.AXIS_COS + dy * chunkXY2GZUHC_cjs.AXIS_SIN;
2346
2346
  const depth = length(start.depth + delta, 0);
2347
- const x = start.x + (start.depth - depth) * chunkCXL254BT_cjs.AXIS_COS;
2347
+ const x = start.x + (start.depth - depth) * chunkXY2GZUHC_cjs.AXIS_COS;
2348
2348
  return { ...start, x, depth };
2349
2349
  }
2350
2350
  var IsometricAxisResizeSession = class {
@@ -2356,7 +2356,7 @@ var IsometricAxisResizeSession = class {
2356
2356
  this.#emitter = emitter;
2357
2357
  }
2358
2358
  pointerDown = (event) => {
2359
- if (event.button !== 0 || this.#drag || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
2359
+ if (event.button !== 0 || this.#drag || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
2360
2360
  return;
2361
2361
  }
2362
2362
  this.#drag = createIsometricAxisDragState(this.#svg, event);
@@ -2366,7 +2366,7 @@ var IsometricAxisResizeSession = class {
2366
2366
  if (!drag || event.pointerId !== drag.pointerId) {
2367
2367
  return;
2368
2368
  }
2369
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
2369
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
2370
2370
  if (!point) {
2371
2371
  return;
2372
2372
  }
@@ -2464,7 +2464,7 @@ function findLabelMark(event) {
2464
2464
  );
2465
2465
  }
2466
2466
  function isLabelPointer(event) {
2467
- return event.button === 0 && !chunkHFOGKSNU_cjs.isCameraGesture(event);
2467
+ return event.button === 0 && !chunkL3VJXZFD_cjs.isCameraGesture(event);
2468
2468
  }
2469
2469
  function findHull(svg, ownerId) {
2470
2470
  return svg.querySelector(`[data-sf-id="${CSS.escape(ownerId)}"][data-sf-primary="true"]`);
@@ -2480,21 +2480,21 @@ function resolveIsometricLabelDrag(svg, event) {
2480
2480
  if (!clicked) {
2481
2481
  return null;
2482
2482
  }
2483
- const owner = chunkHFOGKSNU_cjs.resolveOwner(clicked);
2483
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(clicked);
2484
2484
  if (owner?.role !== "isometric") {
2485
2485
  return null;
2486
2486
  }
2487
2487
  const hull = findHull(svg, owner.id);
2488
- const geometry = hull ? chunkHFOGKSNU_cjs.isometricGeometryOf(hull) : null;
2488
+ const geometry = hull ? chunkL3VJXZFD_cjs.isometricGeometryOf(hull) : null;
2489
2489
  if (!geometry?.bounds) {
2490
2490
  return null;
2491
2491
  }
2492
- const start = chunkHFOGKSNU_cjs.pointerUserPoint(svg, event);
2492
+ const start = chunkL3VJXZFD_cjs.pointerUserPoint(svg, event);
2493
2493
  if (!start) {
2494
2494
  return null;
2495
2495
  }
2496
2496
  const anchorX = geometry.bounds.x + geometry.bounds.width / 2;
2497
- const anchorY = geometry.bounds.y + geometry.bounds.width * (chunkCXL254BT_cjs.AXIS_SIN / chunkCXL254BT_cjs.AXIS_COS) / 2;
2497
+ const anchorY = geometry.bounds.y + geometry.bounds.width * (chunkXY2GZUHC_cjs.AXIS_SIN / chunkXY2GZUHC_cjs.AXIS_COS) / 2;
2498
2498
  const text = findBySuffix(svg, `-${owner.id}-label`);
2499
2499
  if (!text) {
2500
2500
  return null;
@@ -2546,7 +2546,7 @@ var IsometricLabelDragSession = class {
2546
2546
  if (!this.#drag || event.pointerId !== this.#drag.pointerId) {
2547
2547
  return;
2548
2548
  }
2549
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
2549
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
2550
2550
  if (!point) {
2551
2551
  return;
2552
2552
  }
@@ -2621,7 +2621,7 @@ function isIsometricDirection(value) {
2621
2621
  function bindIsometricQuickDuplicate(viewer, emitter) {
2622
2622
  const svg = viewer.svg;
2623
2623
  const onPointerDown = (event) => {
2624
- if (event.button !== 0 || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
2624
+ if (event.button !== 0 || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
2625
2625
  return;
2626
2626
  }
2627
2627
  const bubble = event.target?.closest("[data-sf-quick-duplicate]");
@@ -2632,7 +2632,7 @@ function bindIsometricQuickDuplicate(viewer, emitter) {
2632
2632
  const overlay = bubble.closest("[data-sf-selection-overlay]");
2633
2633
  const sourceId = overlay?.getAttribute("data-sf-selection-overlay");
2634
2634
  const primary = sourceId ? svg.querySelector(`[data-sf-id="${CSS.escape(sourceId)}"][data-sf-primary="true"]`) : null;
2635
- const owner = primary && chunkHFOGKSNU_cjs.resolveOwner(primary);
2635
+ const owner = primary && chunkL3VJXZFD_cjs.resolveOwner(primary);
2636
2636
  if (!owner) {
2637
2637
  return;
2638
2638
  }
@@ -2700,7 +2700,7 @@ function updateEndpointPreview(drag, draggedPoint, draggedSide) {
2700
2700
  const toPoint = drag.end === "to" ? draggedPoint : drag.fixedPoint;
2701
2701
  const fromSide = drag.end === "from" ? draggedSide : drag.fixedSide;
2702
2702
  const toSide = drag.end === "to" ? draggedSide : drag.fixedSide;
2703
- const { points, segments } = chunkCXL254BT_cjs.calculateLinkRoute(previewLink2(fromSide, toSide), fromPoint, toPoint, drag.pathType);
2703
+ const { points, segments } = chunkXY2GZUHC_cjs.calculateLinkRoute(previewLink2(fromSide, toSide), fromPoint, toPoint, drag.pathType);
2704
2704
  drag.path.setAttribute("d", previewPathData(points, segments, drag.pathType, drag.strokeWidth));
2705
2705
  }
2706
2706
 
@@ -2722,7 +2722,7 @@ var LinkGhost = class {
2722
2722
  constructor(svg, path) {
2723
2723
  this.#svg = svg;
2724
2724
  this.#path = path;
2725
- this.#anchors = svg.ownerDocument.createElementNS(chunkHFOGKSNU_cjs.SVG_NAMESPACE, "g");
2725
+ this.#anchors = svg.ownerDocument.createElementNS(chunkL3VJXZFD_cjs.SVG_NAMESPACE, "g");
2726
2726
  this.#anchors.setAttribute("data-sf-link-target", "");
2727
2727
  this.#anchors.setAttribute("pointer-events", "none");
2728
2728
  }
@@ -2732,7 +2732,7 @@ var LinkGhost = class {
2732
2732
  for (const name of RESTORED_ATTRIBUTES) {
2733
2733
  this.#saved.set(name, this.#path.getAttribute(name));
2734
2734
  }
2735
- const dash = GHOST_DASH_PX / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg);
2735
+ const dash = GHOST_DASH_PX / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg);
2736
2736
  this.#path.setAttribute("stroke-dasharray", `${dash} ${dash}`);
2737
2737
  this.#path.setAttribute("stroke-linecap", "round");
2738
2738
  this.#path.setAttribute("opacity", GHOST_OPACITY);
@@ -2761,7 +2761,7 @@ var LinkGhost = class {
2761
2761
  if (!bounds) {
2762
2762
  return;
2763
2763
  }
2764
- const unit = 1 / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg);
2764
+ const unit = 1 / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg);
2765
2765
  const centers = [
2766
2766
  [bounds.x + bounds.width / 2, bounds.y],
2767
2767
  [bounds.x + bounds.width, bounds.y + bounds.height / 2],
@@ -2769,7 +2769,7 @@ var LinkGhost = class {
2769
2769
  [bounds.x, bounds.y + bounds.height / 2]
2770
2770
  ];
2771
2771
  for (const [cx, cy] of centers) {
2772
- const dot = this.#svg.ownerDocument.createElementNS(chunkHFOGKSNU_cjs.SVG_NAMESPACE, "circle");
2772
+ const dot = this.#svg.ownerDocument.createElementNS(chunkL3VJXZFD_cjs.SVG_NAMESPACE, "circle");
2773
2773
  dot.setAttribute("cx", String(cx));
2774
2774
  dot.setAttribute("cy", String(cy));
2775
2775
  dot.setAttribute("r", String(ANCHOR_RADIUS_PX * unit));
@@ -2789,7 +2789,7 @@ function collectEndpointCandidates(svg) {
2789
2789
  if (element2.getAttribute("data-sf-role") === "link") {
2790
2790
  continue;
2791
2791
  }
2792
- const owner = chunkHFOGKSNU_cjs.resolveOwner(element2);
2792
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(element2);
2793
2793
  if (owner) {
2794
2794
  candidates.push({ owner, bounds: element2.getBBox() });
2795
2795
  }
@@ -2866,7 +2866,7 @@ function inferFixedSide(svg, reference, fixedPrimary) {
2866
2866
  if (reference.declaredSide) {
2867
2867
  return reference.declaredSide;
2868
2868
  }
2869
- const draggedPrimary = reference.draggedId ? chunkHFOGKSNU_cjs.findOwnerNode(svg, reference.draggedId, chunkHFOGKSNU_cjs.isPrimary) : null;
2869
+ const draggedPrimary = reference.draggedId ? chunkL3VJXZFD_cjs.findOwnerNode(svg, reference.draggedId, chunkL3VJXZFD_cjs.isPrimary) : null;
2870
2870
  if (!draggedPrimary) {
2871
2871
  return "right";
2872
2872
  }
@@ -2874,7 +2874,7 @@ function inferFixedSide(svg, reference, fixedPrimary) {
2874
2874
  }
2875
2875
  function resolveFixedEndpoint(svg, path, draggedEnd) {
2876
2876
  const reference = fixedEndpointReference(path, draggedEnd);
2877
- const fixedPrimary = reference.fixedId ? chunkHFOGKSNU_cjs.findOwnerNode(svg, reference.fixedId, chunkHFOGKSNU_cjs.isPrimary) : null;
2877
+ const fixedPrimary = reference.fixedId ? chunkL3VJXZFD_cjs.findOwnerNode(svg, reference.fixedId, chunkL3VJXZFD_cjs.isPrimary) : null;
2878
2878
  if (!fixedPrimary) {
2879
2879
  return null;
2880
2880
  }
@@ -2893,8 +2893,8 @@ function selectLinkEndpoint(svg, event) {
2893
2893
  if (!target || !end || !linkId) {
2894
2894
  return null;
2895
2895
  }
2896
- const path = chunkHFOGKSNU_cjs.findOwnerNode(svg, linkId, chunkHFOGKSNU_cjs.isPrimary);
2897
- const linkOwner = path && chunkHFOGKSNU_cjs.resolveOwner(path);
2896
+ const path = chunkL3VJXZFD_cjs.findOwnerNode(svg, linkId, chunkL3VJXZFD_cjs.isPrimary);
2897
+ const linkOwner = path && chunkL3VJXZFD_cjs.resolveOwner(path);
2898
2898
  if (!path || !linkOwner) {
2899
2899
  return null;
2900
2900
  }
@@ -2936,8 +2936,8 @@ function nearestPort(bounds, point) {
2936
2936
  let nearest = { side: "right", offset: 0.5 };
2937
2937
  let nearestDistance = Infinity;
2938
2938
  for (const side of SIDES2) {
2939
- const offset = Math.max(0, Math.min(1, chunkCXL254BT_cjs.relativeOffsetOnRectangleSide(bounds, side, point)));
2940
- const candidate = chunkCXL254BT_cjs.pointAtPort(bounds, { side, offset });
2939
+ const offset = Math.max(0, Math.min(1, chunkXY2GZUHC_cjs.relativeOffsetOnRectangleSide(bounds, side, point)));
2940
+ const candidate = chunkXY2GZUHC_cjs.pointAtPort(bounds, { side, offset });
2941
2941
  const distance = Math.hypot(candidate.x - point.x, candidate.y - point.y);
2942
2942
  if (distance < nearestDistance) {
2943
2943
  nearestDistance = distance;
@@ -2996,7 +2996,7 @@ function resolveLinkTarget(candidates, fixedPoint, point, unitsPerPx) {
2996
2996
  }
2997
2997
  const port = snapPort(candidate.bounds, point, unitsPerPx);
2998
2998
  return {
2999
- point: chunkCXL254BT_cjs.pointAtPort(candidate.bounds, port),
2999
+ point: chunkXY2GZUHC_cjs.pointAtPort(candidate.bounds, port),
3000
3000
  side: port.side,
3001
3001
  hit: { owner: candidate.owner, side: port.side, offset: port.offset },
3002
3002
  bounds: candidate.bounds
@@ -3020,7 +3020,7 @@ var LinkEndpointSession = class {
3020
3020
  this.#emitter = emitter;
3021
3021
  }
3022
3022
  pointerDown = (event) => {
3023
- if (event.button !== 0 || this.#drag || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
3023
+ if (event.button !== 0 || this.#drag || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
3024
3024
  return;
3025
3025
  }
3026
3026
  this.#drag = createLinkEndpointDragState(this.#svg, event);
@@ -3034,7 +3034,7 @@ var LinkEndpointSession = class {
3034
3034
  return;
3035
3035
  }
3036
3036
  drag.moved = true;
3037
- const target = resolveEndpointTarget(drag, endpointPointerPosition(this.#svg, event), 1 / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg));
3037
+ const target = resolveEndpointTarget(drag, endpointPointerPosition(this.#svg, event), 1 / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg));
3038
3038
  updateEndpointPreview(drag, target.point, target.side);
3039
3039
  drag.ghost.show(target.hit !== null, target.bounds);
3040
3040
  };
@@ -3148,7 +3148,7 @@ var LinkSegmentSession = class {
3148
3148
  this.#emitter = emitter;
3149
3149
  }
3150
3150
  pointerDown = (event) => {
3151
- if (event.button !== 0 || this.#drag || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
3151
+ if (event.button !== 0 || this.#drag || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
3152
3152
  return;
3153
3153
  }
3154
3154
  const target = event.target;
@@ -3158,12 +3158,12 @@ var LinkSegmentSession = class {
3158
3158
  if (!handle || !overlay || !linkId) {
3159
3159
  return;
3160
3160
  }
3161
- const path = chunkHFOGKSNU_cjs.findOwnerNode(this.#svg, linkId, chunkHFOGKSNU_cjs.isPrimary);
3162
- const owner = path && chunkHFOGKSNU_cjs.resolveOwner(path);
3161
+ const path = chunkL3VJXZFD_cjs.findOwnerNode(this.#svg, linkId, chunkL3VJXZFD_cjs.isPrimary);
3162
+ const owner = path && chunkL3VJXZFD_cjs.resolveOwner(path);
3163
3163
  const index = Number(handle.getAttribute("data-sf-link-segment"));
3164
3164
  const segments = path ? parseSegments(path) : [];
3165
3165
  const segment = segments[index];
3166
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
3166
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
3167
3167
  if (!path || !owner || !segment || !point) {
3168
3168
  return;
3169
3169
  }
@@ -3171,7 +3171,7 @@ var LinkSegmentSession = class {
3171
3171
  const guide = document.createElementNS(SVG_NAMESPACE2, "line");
3172
3172
  guide.setAttribute("stroke", GUIDE_COLOR);
3173
3173
  guide.setAttribute("stroke-dasharray", "4 4");
3174
- guide.setAttribute("stroke-width", String(1 / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg)));
3174
+ guide.setAttribute("stroke-width", String(1 / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg)));
3175
3175
  guide.setAttribute("visibility", "hidden");
3176
3176
  overlay.appendChild(guide);
3177
3177
  handle.setPointerCapture?.(event.pointerId);
@@ -3206,7 +3206,7 @@ var LinkSegmentSession = class {
3206
3206
  return;
3207
3207
  }
3208
3208
  drag.moved = true;
3209
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
3209
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
3210
3210
  if (!point) {
3211
3211
  return;
3212
3212
  }
@@ -3232,8 +3232,8 @@ var LinkSegmentSession = class {
3232
3232
  doubleClick = (event) => {
3233
3233
  const handle = event.target?.closest("[data-sf-link-segment]");
3234
3234
  const linkId = handle?.closest("[data-sf-selection-overlay]")?.getAttribute("data-sf-selection-overlay");
3235
- const path = linkId ? chunkHFOGKSNU_cjs.findOwnerNode(this.#svg, linkId, chunkHFOGKSNU_cjs.isPrimary) : null;
3236
- const owner = path && chunkHFOGKSNU_cjs.resolveOwner(path);
3235
+ const path = linkId ? chunkL3VJXZFD_cjs.findOwnerNode(this.#svg, linkId, chunkL3VJXZFD_cjs.isPrimary) : null;
3236
+ const owner = path && chunkL3VJXZFD_cjs.resolveOwner(path);
3237
3237
  if (!handle || !owner) {
3238
3238
  return;
3239
3239
  }
@@ -3256,7 +3256,7 @@ var LinkSegmentSession = class {
3256
3256
  if (isSnapDisabled(this.#svg)) {
3257
3257
  return { value: raw, snapped: null };
3258
3258
  }
3259
- const threshold = SNAP_PX / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg);
3259
+ const threshold = SNAP_PX / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg);
3260
3260
  let best = null;
3261
3261
  for (const candidate of [drag.base, ...drag.candidates]) {
3262
3262
  const closer = best === null || Math.abs(candidate - raw) < Math.abs(best - raw);
@@ -3269,7 +3269,7 @@ var LinkSegmentSession = class {
3269
3269
  #preview(drag, snapped) {
3270
3270
  const next = movedSegments(drag, drag.value);
3271
3271
  const strokeWidth = Number(drag.path.getAttribute("stroke-width")) || 2;
3272
- const data = chunkCXL254BT_cjs.roundedOrthogonalPathData(pathSegments(next), Math.max(16, strokeWidth * 4));
3272
+ const data = chunkXY2GZUHC_cjs.roundedOrthogonalPathData(pathSegments(next), Math.max(16, strokeWidth * 4));
3273
3273
  drag.path.setAttribute("d", data);
3274
3274
  drag.overlay.querySelector("path")?.setAttribute("d", data);
3275
3275
  const segment = next[drag.index];
@@ -3443,8 +3443,8 @@ function nearestCandidates(bounds, candidates, limit = 50) {
3443
3443
 
3444
3444
  // src/runtime/interaction/snapping/isometricDiagonal.ts
3445
3445
  var AXES2 = [
3446
- { x: chunkCXL254BT_cjs.AXIS_COS, y: chunkCXL254BT_cjs.AXIS_SIN },
3447
- { x: -chunkCXL254BT_cjs.AXIS_COS, y: chunkCXL254BT_cjs.AXIS_SIN }
3446
+ { x: chunkXY2GZUHC_cjs.AXIS_COS, y: chunkXY2GZUHC_cjs.AXIS_SIN },
3447
+ { x: -chunkXY2GZUHC_cjs.AXIS_COS, y: chunkXY2GZUHC_cjs.AXIS_SIN }
3448
3448
  ];
3449
3449
  var GUIDE_OVERHANG = 40;
3450
3450
  function snapIsometricDiagonal(apex, rawDx, rawDy, candidates, threshold) {
@@ -3513,13 +3513,13 @@ function isometricApexOf(svg, drag, declared = false) {
3513
3513
  if (lead.owner.role !== "isometric") {
3514
3514
  return null;
3515
3515
  }
3516
- const primary = chunkHFOGKSNU_cjs.findOwnerNode(svg, lead.owner.id, chunkHFOGKSNU_cjs.isPrimary);
3517
- const geometry = primary && chunkHFOGKSNU_cjs.isometricGeometryOf(primary);
3516
+ const primary = chunkL3VJXZFD_cjs.findOwnerNode(svg, lead.owner.id, chunkL3VJXZFD_cjs.isPrimary);
3517
+ const geometry = primary && chunkL3VJXZFD_cjs.isometricGeometryOf(primary);
3518
3518
  if (!geometry) {
3519
3519
  return null;
3520
3520
  }
3521
3521
  const frame = declared && geometry.bounds ? geometry.bounds : lead.draggedBounds;
3522
- return { x: frame.x + geometry.depth * chunkCXL254BT_cjs.AXIS_COS, y: frame.y };
3522
+ return { x: frame.x + geometry.depth * chunkXY2GZUHC_cjs.AXIS_COS, y: frame.y };
3523
3523
  }
3524
3524
  function snapIsometricGrid(svg, drag, rawDx, rawDy) {
3525
3525
  const step = readIsometricSnapStep(svg);
@@ -3536,8 +3536,8 @@ function snapIsometricMove(svg, drag, rawDx, rawDy) {
3536
3536
  return null;
3537
3537
  }
3538
3538
  const excludedIds = new Set(drag.canvasObjects.map((canvasObject) => canvasObject.owner.id));
3539
- const candidates = chunkHFOGKSNU_cjs.findIsometricApexCandidates(svg, excludedIds);
3540
- const snap = snapIsometricDiagonal(apex, rawDx, rawDy, candidates, SNAP_THRESHOLD_PX / chunkHFOGKSNU_cjs.pxPerUnit(svg));
3539
+ const candidates = chunkL3VJXZFD_cjs.findIsometricApexCandidates(svg, excludedIds);
3540
+ const snap = snapIsometricDiagonal(apex, rawDx, rawDy, candidates, SNAP_THRESHOLD_PX / chunkL3VJXZFD_cjs.pxPerUnit(svg));
3541
3541
  return snap ? { dx: snap.dx, dy: snap.dy, guides: [snap.guide] } : null;
3542
3542
  }
3543
3543
  function snapMove(svg, drag, rawDx, rawDy) {
@@ -3554,9 +3554,9 @@ function snapMove(svg, drag, rawDx, rawDy) {
3554
3554
  }
3555
3555
  const leadBounds = offsetBounds(drag.canvasObjects[0].draggedBounds, rawDx, rawDy);
3556
3556
  const excludedIds = new Set(drag.canvasObjects.map((canvasObject) => canvasObject.owner.id));
3557
- const candidates = nearestCandidates(leadBounds, chunkHFOGKSNU_cjs.findSnapCandidateBounds(svg, excludedIds));
3557
+ const candidates = nearestCandidates(leadBounds, chunkL3VJXZFD_cjs.findSnapCandidateBounds(svg, excludedIds));
3558
3558
  const snap = computeSnap(leadBounds, candidates, {
3559
- threshold: SNAP_THRESHOLD_PX / chunkHFOGKSNU_cjs.pxPerUnit(svg),
3559
+ threshold: SNAP_THRESHOLD_PX / chunkL3VJXZFD_cjs.pxPerUnit(svg),
3560
3560
  activeX: MOVE_ACTIVE_POINTS,
3561
3561
  activeY: MOVE_ACTIVE_POINTS,
3562
3562
  guideOverhang: GUIDE_OVERHANG2
@@ -3617,7 +3617,7 @@ function isCompositeOwner(owner) {
3617
3617
  return owner !== null && owner !== void 0 && COMPOSITE_ROLES.has(owner.role);
3618
3618
  }
3619
3619
  function hasDerivedHeight(owner) {
3620
- return owner !== null && owner !== void 0 && chunkHFOGKSNU_cjs.DERIVED_HEIGHT_ROLES.has(owner.role);
3620
+ return owner !== null && owner !== void 0 && chunkL3VJXZFD_cjs.DERIVED_HEIGHT_ROLES.has(owner.role);
3621
3621
  }
3622
3622
 
3623
3623
  // src/runtime/interaction/move/canvasObjectCapture.ts
@@ -3638,7 +3638,7 @@ function parentContainerBounds(svg, primary, groupIds) {
3638
3638
  if (!parentId || groupIds.has(parentId)) {
3639
3639
  return void 0;
3640
3640
  }
3641
- const container = chunkHFOGKSNU_cjs.findOwnerNode(svg, parentId, chunkHFOGKSNU_cjs.isPrimary);
3641
+ const container = chunkL3VJXZFD_cjs.findOwnerNode(svg, parentId, chunkL3VJXZFD_cjs.isPrimary);
3642
3642
  if (!container) {
3643
3643
  return void 0;
3644
3644
  }
@@ -3646,14 +3646,14 @@ function parentContainerBounds(svg, primary, groupIds) {
3646
3646
  return { x: bbox.x, y: bbox.y, width: bbox.width, height: bbox.height };
3647
3647
  }
3648
3648
  function captureCanvasObject(svg, owner, groupIds) {
3649
- const nodes = chunkHFOGKSNU_cjs.findAllOwnerNodes(svg, owner.id);
3650
- const primary = chunkHFOGKSNU_cjs.findOwnerNode(svg, owner.id, chunkHFOGKSNU_cjs.isPrimary);
3649
+ const nodes = chunkL3VJXZFD_cjs.findAllOwnerNodes(svg, owner.id);
3650
+ const primary = chunkL3VJXZFD_cjs.findOwnerNode(svg, owner.id, chunkL3VJXZFD_cjs.isPrimary);
3651
3651
  if (!nodes.length || !primary) {
3652
3652
  return null;
3653
3653
  }
3654
3654
  const overlays = [...svg.querySelectorAll(`[data-sf-selection-overlay="${CSS.escape(owner.id)}"]`)];
3655
3655
  const draggedBounds = primary.getBBox();
3656
- const isometricGeometry = owner.role === "isometric" ? chunkHFOGKSNU_cjs.isometricGeometryOf(primary) : null;
3656
+ const isometricGeometry = owner.role === "isometric" ? chunkL3VJXZFD_cjs.isometricGeometryOf(primary) : null;
3657
3657
  const isometricSize = isometricGeometry ? { width: isometricGeometry.width, height: isometricGeometry.height, depth: isometricGeometry.depth } : void 0;
3658
3658
  return {
3659
3659
  owner,
@@ -3695,7 +3695,7 @@ function captureInternalLinks(svg, groupIds) {
3695
3695
  if (!linkId || !belongsToMoveGroup(path, groupIds)) {
3696
3696
  continue;
3697
3697
  }
3698
- const nodes = chunkHFOGKSNU_cjs.findAllOwnerNodes(svg, linkId);
3698
+ const nodes = chunkL3VJXZFD_cjs.findAllOwnerNodes(svg, linkId);
3699
3699
  if (nodes.length) {
3700
3700
  links.push({ nodes, baseTransforms: nodes.map((node) => node.getAttribute("transform")) });
3701
3701
  }
@@ -3729,7 +3729,7 @@ function containedChildren(viewer, owner) {
3729
3729
  return [];
3730
3730
  }
3731
3731
  const nodes = viewer.svg.querySelectorAll(`[data-sf-parent-frame="${CSS.escape(owner.id)}"]`);
3732
- return [...nodes].map((node) => chunkHFOGKSNU_cjs.resolveOwner(node)).filter((ref) => ref !== null);
3732
+ return [...nodes].map((node) => chunkL3VJXZFD_cjs.resolveOwner(node)).filter((ref) => ref !== null);
3733
3733
  }
3734
3734
  function selectedMoveGroup(viewer, owner) {
3735
3735
  const selection = viewer.getSelection();
@@ -3746,7 +3746,7 @@ function isChartInteractiveMark(target) {
3746
3746
  }
3747
3747
  function createMoveDragState(viewer, event, startUser) {
3748
3748
  const target = event.target;
3749
- const owner = chunkHFOGKSNU_cjs.resolveOwner(target);
3749
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(target);
3750
3750
  if (!hasMovableGeometry(owner) || isChartInteractiveMark(target)) {
3751
3751
  return null;
3752
3752
  }
@@ -3780,7 +3780,7 @@ var MoveSession = class {
3780
3780
  this.#emitter = emitter;
3781
3781
  }
3782
3782
  pointerDown = (event) => {
3783
- if (event.button !== 0 || this.#drag || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
3783
+ if (event.button !== 0 || this.#drag || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
3784
3784
  return;
3785
3785
  }
3786
3786
  this.#drag = createMoveDragState(this.#viewer, event, movePointerPosition(this.#svg, event));
@@ -3798,7 +3798,7 @@ var MoveSession = class {
3798
3798
  const delta = snapMove(this.#svg, drag, rawDelta.dx, rawDelta.dy);
3799
3799
  const clamped = clampMoveDelta(drag.canvasObjects, delta.dx, delta.dy);
3800
3800
  applyMovePreview(drag, clamped.dx, clamped.dy);
3801
- chunkHFOGKSNU_cjs.updateAlignmentGuides(this.#svg, delta.guides, MOVE_GUIDE_COLOR);
3801
+ chunkL3VJXZFD_cjs.updateAlignmentGuides(this.#svg, delta.guides, MOVE_GUIDE_COLOR);
3802
3802
  };
3803
3803
  pointerUp = (event) => {
3804
3804
  const drag = this.#drag;
@@ -3807,7 +3807,7 @@ var MoveSession = class {
3807
3807
  }
3808
3808
  this.#drag = null;
3809
3809
  event.target.releasePointerCapture?.(drag.pointerId);
3810
- chunkHFOGKSNU_cjs.clearAlignmentGuides(this.#svg);
3810
+ chunkL3VJXZFD_cjs.clearAlignmentGuides(this.#svg);
3811
3811
  emitMoveCompletion(this.#svg, this.#emitter, drag, event);
3812
3812
  };
3813
3813
  cancel() {
@@ -3953,9 +3953,9 @@ var START_POINT_RADIUS_PX = 6;
3953
3953
  var POINT_STROKE_WIDTH_PX = 1.5;
3954
3954
  function createPathDrawPreview(svg) {
3955
3955
  const document2 = svg.ownerDocument;
3956
- const group = document2.createElementNS(chunkHFOGKSNU_cjs.SVG_NAMESPACE, "g");
3956
+ const group = document2.createElementNS(chunkL3VJXZFD_cjs.SVG_NAMESPACE, "g");
3957
3957
  group.setAttribute("pointer-events", "none");
3958
- const line = document2.createElementNS(chunkHFOGKSNU_cjs.SVG_NAMESPACE, "path");
3958
+ const line = document2.createElementNS(chunkL3VJXZFD_cjs.SVG_NAMESPACE, "path");
3959
3959
  line.setAttribute("fill", "none");
3960
3960
  line.setAttribute("stroke", PREVIEW_COLOR);
3961
3961
  line.setAttribute("stroke-linecap", "round");
@@ -3965,8 +3965,8 @@ function createPathDrawPreview(svg) {
3965
3965
  }
3966
3966
  function pointMarker(svg, point, highlighted) {
3967
3967
  const document2 = svg.ownerDocument;
3968
- const unit = 1 / chunkHFOGKSNU_cjs.pxPerUnit(svg);
3969
- const circle = document2.createElementNS(chunkHFOGKSNU_cjs.SVG_NAMESPACE, "circle");
3968
+ const unit = 1 / chunkL3VJXZFD_cjs.pxPerUnit(svg);
3969
+ const circle = document2.createElementNS(chunkL3VJXZFD_cjs.SVG_NAMESPACE, "circle");
3970
3970
  circle.setAttribute("cx", String(point.x));
3971
3971
  circle.setAttribute("cy", String(point.y));
3972
3972
  circle.setAttribute("r", String((highlighted ? START_POINT_RADIUS_PX : POINT_RADIUS_PX) * unit));
@@ -3980,11 +3980,11 @@ function updatePathDrawPreview(svg, state) {
3980
3980
  if (!previewLine || !previewGroup) {
3981
3981
  return;
3982
3982
  }
3983
- const unit = 1 / chunkHFOGKSNU_cjs.pxPerUnit(svg);
3983
+ const unit = 1 / chunkL3VJXZFD_cjs.pxPerUnit(svg);
3984
3984
  previewLine.setAttribute("stroke-width", String(LINE_WIDTH_PX * unit));
3985
3985
  previewLine.setAttribute("stroke-dasharray", `${DASH_PX * unit} ${GAP_PX * unit}`);
3986
3986
  const live = state.cursor ? [...state.points, state.cursor] : state.points;
3987
- previewLine.setAttribute("d", chunkCXL254BT_cjs.freeformPathData({ points: live, tension: state.tension, closed: false }));
3987
+ previewLine.setAttribute("d", chunkXY2GZUHC_cjs.freeformPathData({ points: live, tension: state.tension, closed: false }));
3988
3988
  while (previewGroup.childNodes.length > 1) {
3989
3989
  previewGroup.lastChild?.remove();
3990
3990
  }
@@ -4044,12 +4044,12 @@ var PathDrawSession = class {
4044
4044
  }
4045
4045
  }
4046
4046
  pointerDown = (event) => {
4047
- if (!this.#state.active || event.button !== 0 || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
4047
+ if (!this.#state.active || event.button !== 0 || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
4048
4048
  return;
4049
4049
  }
4050
4050
  event.stopPropagation();
4051
4051
  event.preventDefault();
4052
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
4052
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
4053
4053
  if (!point) {
4054
4054
  return;
4055
4055
  }
@@ -4068,14 +4068,14 @@ var PathDrawSession = class {
4068
4068
  this.#state.cursor = resolved.point;
4069
4069
  this.#state.willClose = false;
4070
4070
  updatePathDrawPreview(this.#svg, this.#state);
4071
- chunkHFOGKSNU_cjs.clearAlignmentGuides(this.#svg);
4071
+ chunkL3VJXZFD_cjs.clearAlignmentGuides(this.#svg);
4072
4072
  };
4073
4073
  pointerMove = (event) => {
4074
4074
  if (!this.#state.active) {
4075
4075
  return;
4076
4076
  }
4077
4077
  event.stopPropagation();
4078
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
4078
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
4079
4079
  if (!point) {
4080
4080
  return;
4081
4081
  }
@@ -4084,9 +4084,9 @@ var PathDrawSession = class {
4084
4084
  this.#state.willClose = resolved.willClose;
4085
4085
  updatePathDrawPreview(this.#svg, this.#state);
4086
4086
  if (resolved.guide) {
4087
- chunkHFOGKSNU_cjs.updateAlignmentGuides(this.#svg, [resolved.guide], GUIDE_COLOR2);
4087
+ chunkL3VJXZFD_cjs.updateAlignmentGuides(this.#svg, [resolved.guide], GUIDE_COLOR2);
4088
4088
  } else {
4089
- chunkHFOGKSNU_cjs.clearAlignmentGuides(this.#svg);
4089
+ chunkL3VJXZFD_cjs.clearAlignmentGuides(this.#svg);
4090
4090
  }
4091
4091
  };
4092
4092
  pointerUp = (event) => {
@@ -4121,10 +4121,10 @@ var PathDrawSession = class {
4121
4121
  } else if (event.key === "Backspace" && this.#state.points.length > 0) {
4122
4122
  event.preventDefault();
4123
4123
  this.#state.points = this.#state.points.slice(0, -1);
4124
- const closeSnapUnits = CLOSE_SNAP_PX / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg);
4124
+ const closeSnapUnits = CLOSE_SNAP_PX / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg);
4125
4125
  this.#state.willClose = this.#state.cursor ? isCloseToStart(this.#state.points, this.#state.cursor, closeSnapUnits) : false;
4126
4126
  updatePathDrawPreview(this.#svg, this.#state);
4127
- chunkHFOGKSNU_cjs.clearAlignmentGuides(this.#svg);
4127
+ chunkL3VJXZFD_cjs.clearAlignmentGuides(this.#svg);
4128
4128
  }
4129
4129
  };
4130
4130
  keyUp = (event) => {
@@ -4133,7 +4133,7 @@ var PathDrawSession = class {
4133
4133
  }
4134
4134
  };
4135
4135
  #resolvePoint(raw) {
4136
- const closeSnapUnits = CLOSE_SNAP_PX / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg);
4136
+ const closeSnapUnits = CLOSE_SNAP_PX / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg);
4137
4137
  if (isCloseToStart(this.#state.points, raw, closeSnapUnits)) {
4138
4138
  return { point: this.#state.points[0], willClose: true, guide: null };
4139
4139
  }
@@ -4143,7 +4143,7 @@ var PathDrawSession = class {
4143
4143
  return { point: raw, willClose: false, guide: null };
4144
4144
  }
4145
4145
  const angleSnapped = snapTo45Degrees(last, raw);
4146
- const guideSnapUnits = GUIDE_SNAP_PX / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg);
4146
+ const guideSnapUnits = GUIDE_SNAP_PX / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg);
4147
4147
  const { point, guide } = snapToSessionGuides(last, angleSnapped, points.slice(0, -1), raw, guideSnapUnits);
4148
4148
  return { point, willClose: false, guide };
4149
4149
  }
@@ -4157,7 +4157,7 @@ var PathDrawSession = class {
4157
4157
  }
4158
4158
  #reset(callExit) {
4159
4159
  this.#state.previewGroup?.remove();
4160
- chunkHFOGKSNU_cjs.clearAlignmentGuides(this.#svg);
4160
+ chunkL3VJXZFD_cjs.clearAlignmentGuides(this.#svg);
4161
4161
  const exit = this.#state.onExit;
4162
4162
  this.#state = createIdlePathDrawState();
4163
4163
  this.#shiftHeld = false;
@@ -4200,7 +4200,7 @@ function applyPathReshapePreview(drag, point) {
4200
4200
  const points = drag.points.map(
4201
4201
  (existing, index) => index === drag.pointIndex ? [point.x, point.y] : existing
4202
4202
  );
4203
- const d = chunkCXL254BT_cjs.freeformPathData({
4203
+ const d = chunkXY2GZUHC_cjs.freeformPathData({
4204
4204
  points: points.map(([x, y]) => ({ x, y })),
4205
4205
  tension: drag.tension,
4206
4206
  closed: drag.closed
@@ -4208,22 +4208,22 @@ function applyPathReshapePreview(drag, point) {
4208
4208
  drag.pathNode.setAttribute("d", d);
4209
4209
  drag.handle.setAttribute("cx", String(point.x));
4210
4210
  drag.handle.setAttribute("cy", String(point.y));
4211
- drag.overlay?.querySelector(`[${chunkHFOGKSNU_cjs.PATH_HALO_ATTR}]`)?.setAttribute("d", d);
4211
+ drag.overlay?.querySelector(`[${chunkL3VJXZFD_cjs.PATH_HALO_ATTR}]`)?.setAttribute("d", d);
4212
4212
  return points;
4213
4213
  }
4214
4214
 
4215
4215
  // src/runtime/interaction/pathReshape/target.ts
4216
4216
  function resolvePathReshapeTarget(svg, event) {
4217
- const handle = event.target?.closest?.(`[${chunkCXL254BT_cjs.PATH_POINT_INDEX_ATTR}]`) ?? null;
4218
- const indexAttr = handle?.getAttribute(chunkCXL254BT_cjs.PATH_POINT_INDEX_ATTR) ?? null;
4217
+ const handle = event.target?.closest?.(`[${chunkXY2GZUHC_cjs.PATH_POINT_INDEX_ATTR}]`) ?? null;
4218
+ const indexAttr = handle?.getAttribute(chunkXY2GZUHC_cjs.PATH_POINT_INDEX_ATTR) ?? null;
4219
4219
  const pointIndex = indexAttr !== null ? Number(indexAttr) : Number.NaN;
4220
4220
  const ownerId = handle?.closest("[data-sf-selection-overlay]")?.getAttribute("data-sf-selection-overlay");
4221
4221
  if (!handle || !Number.isInteger(pointIndex) || !ownerId) {
4222
4222
  return null;
4223
4223
  }
4224
- const pathNode = chunkHFOGKSNU_cjs.findOwnerNode(svg, ownerId, chunkHFOGKSNU_cjs.isPrimary);
4225
- const owner = pathNode && chunkHFOGKSNU_cjs.resolveOwner(pathNode);
4226
- const geometry = pathNode && chunkHFOGKSNU_cjs.pathGeometryOf(pathNode);
4224
+ const pathNode = chunkL3VJXZFD_cjs.findOwnerNode(svg, ownerId, chunkL3VJXZFD_cjs.isPrimary);
4225
+ const owner = pathNode && chunkL3VJXZFD_cjs.resolveOwner(pathNode);
4226
+ const geometry = pathNode && chunkL3VJXZFD_cjs.pathGeometryOf(pathNode);
4227
4227
  if (!pathNode || !owner || !geometry || pointIndex < 0 || pointIndex >= geometry.points.length) {
4228
4228
  return null;
4229
4229
  }
@@ -4266,7 +4266,7 @@ var PathReshapeSession = class {
4266
4266
  this.#emitter = emitter;
4267
4267
  }
4268
4268
  pointerDown = (event) => {
4269
- if (event.button !== 0 || this.#drag || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
4269
+ if (event.button !== 0 || this.#drag || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
4270
4270
  return;
4271
4271
  }
4272
4272
  this.#drag = createPathReshapeDragState(this.#svg, event);
@@ -4277,7 +4277,7 @@ var PathReshapeSession = class {
4277
4277
  return;
4278
4278
  }
4279
4279
  drag.moved = true;
4280
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
4280
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
4281
4281
  if (point) {
4282
4282
  applyPathReshapePreview(drag, point);
4283
4283
  }
@@ -4292,7 +4292,7 @@ var PathReshapeSession = class {
4292
4292
  if (!drag.moved) {
4293
4293
  return;
4294
4294
  }
4295
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event) ?? {
4295
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event) ?? {
4296
4296
  x: drag.points[drag.pointIndex][0],
4297
4297
  y: drag.points[drag.pointIndex][1]
4298
4298
  };
@@ -4333,7 +4333,7 @@ function updatePieLabelDragPreview(drag, dx, dy) {
4333
4333
  }
4334
4334
  const from = { x: drag.tickStartX, y: drag.tickStartY };
4335
4335
  const to = { x: drag.restX + dx, y: drag.restY + dy };
4336
- const clipped = chunkCXL254BT_cjs.clipSegmentToRect(from, to, drag.halfWidth, drag.halfHeight);
4336
+ const clipped = chunkXY2GZUHC_cjs.clipSegmentToRect(from, to, drag.halfWidth, drag.halfHeight);
4337
4337
  drag.tickElement.setAttribute("d", `M ${from.x} ${from.y} L ${clipped.x} ${clipped.y}`);
4338
4338
  drag.tickElement.setAttribute("stroke", PREVIEW_TICK_COLOR);
4339
4339
  drag.tickElement.setAttribute("stroke-width", PREVIEW_TICK_STROKE_WIDTH);
@@ -4359,7 +4359,7 @@ function restoreAttribute(element2, name, value) {
4359
4359
 
4360
4360
  // src/runtime/interaction/pieGeometry.ts
4361
4361
  function readPieGeometry(svg, ownerId) {
4362
- const raw = chunkHFOGKSNU_cjs.findOwnerNode(svg, ownerId, chunkHFOGKSNU_cjs.isPrimary)?.getAttribute("data-sf-pie-geometry");
4362
+ const raw = chunkL3VJXZFD_cjs.findOwnerNode(svg, ownerId, chunkL3VJXZFD_cjs.isPrimary)?.getAttribute("data-sf-pie-geometry");
4363
4363
  if (!raw) {
4364
4364
  return null;
4365
4365
  }
@@ -4378,7 +4378,7 @@ function findLabelMark2(event) {
4378
4378
  return event.target?.closest?.(selector);
4379
4379
  }
4380
4380
  function isLabelPointer2(event) {
4381
- return event.button === 0 && !chunkHFOGKSNU_cjs.isCameraGesture(event);
4381
+ return event.button === 0 && !chunkL3VJXZFD_cjs.isCameraGesture(event);
4382
4382
  }
4383
4383
  function findLabelSiblings(svg, ownerId, seriesId, mark) {
4384
4384
  const selector = `[data-sf-id="${CSS.escape(ownerId)}"][data-sf-series="${CSS.escape(seriesId)}"][data-sf-mark="${mark}"]`;
@@ -4410,7 +4410,7 @@ function resolvePieLabelDrag(svg, event) {
4410
4410
  if (!clicked) {
4411
4411
  return null;
4412
4412
  }
4413
- const owner = chunkHFOGKSNU_cjs.resolveOwner(clicked);
4413
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(clicked);
4414
4414
  if (owner?.role !== "chart") {
4415
4415
  return null;
4416
4416
  }
@@ -4429,7 +4429,7 @@ function resolvePieLabelDrag(svg, event) {
4429
4429
  const wedgeRadius = clicked.getAttribute("data-sf-pie-wedge-radius");
4430
4430
  const explicitRadius = wedgeRadius === null ? Number.NaN : Number(wedgeRadius);
4431
4431
  const outerRadius = Number.isFinite(explicitRadius) ? explicitRadius : geometry.outerRadius;
4432
- const start = chunkHFOGKSNU_cjs.pointerUserPoint(svg, event);
4432
+ const start = chunkL3VJXZFD_cjs.pointerUserPoint(svg, event);
4433
4433
  if (!start) {
4434
4434
  return null;
4435
4435
  }
@@ -4451,13 +4451,13 @@ function resolvePieLabelDrag(svg, event) {
4451
4451
  outerRadius,
4452
4452
  anchorX: geometry.centerX + outerRadius * Math.cos(midAngle),
4453
4453
  anchorY: geometry.centerY + outerRadius * Math.sin(midAngle),
4454
- tickStartX: geometry.centerX + (outerRadius + chunkCXL254BT_cjs.LEADER_INSET) * Math.cos(midAngle),
4455
- tickStartY: geometry.centerY + (outerRadius + chunkCXL254BT_cjs.LEADER_INSET) * Math.sin(midAngle),
4454
+ tickStartX: geometry.centerX + (outerRadius + chunkXY2GZUHC_cjs.LEADER_INSET) * Math.cos(midAngle),
4455
+ tickStartY: geometry.centerY + (outerRadius + chunkXY2GZUHC_cjs.LEADER_INSET) * Math.sin(midAngle),
4456
4456
  restX,
4457
4457
  restY,
4458
4458
  startX: start.x,
4459
4459
  startY: start.y,
4460
- halfWidth: chunkCXL254BT_cjs.LABEL_WIDTH / 2,
4460
+ halfWidth: chunkXY2GZUHC_cjs.LABEL_WIDTH / 2,
4461
4461
  halfHeight: fontSize * 1.2,
4462
4462
  moved: false,
4463
4463
  lastDx: 0,
@@ -4493,7 +4493,7 @@ var PieLabelDragSession = class {
4493
4493
  if (!this.#drag || event.pointerId !== this.#drag.pointerId) {
4494
4494
  return;
4495
4495
  }
4496
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
4496
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
4497
4497
  if (!point) {
4498
4498
  return;
4499
4499
  }
@@ -4525,8 +4525,8 @@ var PieLabelDragSession = class {
4525
4525
  if (!drag.moved) {
4526
4526
  return;
4527
4527
  }
4528
- const pathX = chunkCXL254BT_cjs.seriesLabelOffsetXProp(drag.seriesId);
4529
- const pathY = chunkCXL254BT_cjs.seriesLabelOffsetYProp(drag.seriesId);
4528
+ const pathX = chunkXY2GZUHC_cjs.seriesLabelOffsetXProp(drag.seriesId);
4529
+ const pathY = chunkXY2GZUHC_cjs.seriesLabelOffsetYProp(drag.seriesId);
4530
4530
  if (!pathX || !pathY) {
4531
4531
  return;
4532
4532
  }
@@ -4588,7 +4588,7 @@ function siblingNodes(svg, owner, path) {
4588
4588
  });
4589
4589
  }
4590
4590
  function resolvePropertyDrag(svg, event, rules) {
4591
- if (event.button !== 0 || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
4591
+ if (event.button !== 0 || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
4592
4592
  return null;
4593
4593
  }
4594
4594
  const node = event.target?.closest?.('[data-sf-prop-kind="value"]');
@@ -4596,11 +4596,11 @@ function resolvePropertyDrag(svg, event, rules) {
4596
4596
  return null;
4597
4597
  }
4598
4598
  const path = node.getAttribute("data-sf-prop");
4599
- const owner = chunkHFOGKSNU_cjs.resolveOwner(node);
4599
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(node);
4600
4600
  if (!path || owner?.role !== "chart" || !isEditablePath(path, rules)) {
4601
4601
  return null;
4602
4602
  }
4603
- const scale = parseValueScale(chunkHFOGKSNU_cjs.findOwnerNode(svg, owner.id, chunkHFOGKSNU_cjs.isPrimary));
4603
+ const scale = parseValueScale(chunkL3VJXZFD_cjs.findOwnerNode(svg, owner.id, chunkL3VJXZFD_cjs.isPrimary));
4604
4604
  if (!scale) {
4605
4605
  return null;
4606
4606
  }
@@ -4869,7 +4869,7 @@ function resolvePropertyTarget(event, rules) {
4869
4869
  return null;
4870
4870
  }
4871
4871
  const path = hit.getAttribute("data-sf-prop");
4872
- const owner = chunkHFOGKSNU_cjs.resolveOwner(hit);
4872
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(hit);
4873
4873
  if (!path || !owner || !isEditablePath(path, rules)) {
4874
4874
  return null;
4875
4875
  }
@@ -4908,7 +4908,7 @@ var PropertyEditingSession = class {
4908
4908
  begin(target) {
4909
4909
  this.cancel();
4910
4910
  const { node } = target;
4911
- const rect = chunkHFOGKSNU_cjs.screenRectOf(node);
4911
+ const rect = chunkL3VJXZFD_cjs.screenRectOf(node);
4912
4912
  const fontSize = Number.parseFloat(node.getAttribute("font-size") || "12");
4913
4913
  const originalText = node.textContent ?? "";
4914
4914
  const anchor = node.getAttribute("text-anchor");
@@ -4998,9 +4998,9 @@ function crossedDuplicateDragThreshold(drag, event) {
4998
4998
  var PREVIEW_STROKE_PX = 2;
4999
4999
  var NEW_LINK_PATH_TYPE = "orthogonal";
5000
5000
  function createDuplicatePreviewPath(svg) {
5001
- const path = svg.ownerDocument.createElementNS(chunkHFOGKSNU_cjs.SVG_NAMESPACE, "path");
5001
+ const path = svg.ownerDocument.createElementNS(chunkL3VJXZFD_cjs.SVG_NAMESPACE, "path");
5002
5002
  path.setAttribute("fill", "none");
5003
- path.setAttribute("stroke-width", String(PREVIEW_STROKE_PX / chunkHFOGKSNU_cjs.pxPerUnit(svg)));
5003
+ path.setAttribute("stroke-width", String(PREVIEW_STROKE_PX / chunkL3VJXZFD_cjs.pxPerUnit(svg)));
5004
5004
  path.style.pointerEvents = "none";
5005
5005
  return path;
5006
5006
  }
@@ -5019,7 +5019,7 @@ function previewLink3(fromSide, toSide) {
5019
5019
  }
5020
5020
  function updateDuplicatePreview(drag, toPoint, toSide) {
5021
5021
  const link = previewLink3(drag.direction, toSide);
5022
- const { points, segments } = chunkCXL254BT_cjs.calculateLinkRoute(link, drag.fixedPoint, toPoint, NEW_LINK_PATH_TYPE);
5022
+ const { points, segments } = chunkXY2GZUHC_cjs.calculateLinkRoute(link, drag.fixedPoint, toPoint, NEW_LINK_PATH_TYPE);
5023
5023
  drag.previewPath.setAttribute("d", previewPathData(points, segments, NEW_LINK_PATH_TYPE, 2));
5024
5024
  }
5025
5025
 
@@ -5030,7 +5030,7 @@ function duplicateCandidates(svg, sourceId) {
5030
5030
  if (element2.getAttribute("data-sf-role") === "link") {
5031
5031
  continue;
5032
5032
  }
5033
- const owner = chunkHFOGKSNU_cjs.resolveOwner(element2);
5033
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(element2);
5034
5034
  if (owner && owner.id !== sourceId) {
5035
5035
  candidates.push({ owner, bounds: element2.getBBox() });
5036
5036
  }
@@ -5044,8 +5044,8 @@ function createQuickDuplicateDragState(svg, event, previewPath) {
5044
5044
  if (!bubble || !direction || direction.startsWith("iso-") || !sourceId) {
5045
5045
  return null;
5046
5046
  }
5047
- const primary = chunkHFOGKSNU_cjs.findOwnerNode(svg, sourceId, chunkHFOGKSNU_cjs.isPrimary);
5048
- const sourceOwner = primary && chunkHFOGKSNU_cjs.resolveOwner(primary);
5047
+ const primary = chunkL3VJXZFD_cjs.findOwnerNode(svg, sourceId, chunkL3VJXZFD_cjs.isPrimary);
5048
+ const sourceOwner = primary && chunkL3VJXZFD_cjs.resolveOwner(primary);
5049
5049
  if (!primary || !sourceOwner) {
5050
5050
  return null;
5051
5051
  }
@@ -5053,7 +5053,7 @@ function createQuickDuplicateDragState(svg, event, previewPath) {
5053
5053
  return {
5054
5054
  sourceOwner,
5055
5055
  direction,
5056
- fixedPoint: chunkCXL254BT_cjs.pointAtPort(primary.getBBox(), { side: direction, offset: 0.5 }),
5056
+ fixedPoint: chunkXY2GZUHC_cjs.pointAtPort(primary.getBBox(), { side: direction, offset: 0.5 }),
5057
5057
  previewPath,
5058
5058
  ghost: new LinkGhost(svg, previewPath),
5059
5059
  candidates: duplicateCandidates(svg, sourceId),
@@ -5081,7 +5081,7 @@ var QuickDuplicateSession = class {
5081
5081
  this.#emitter = emitter;
5082
5082
  }
5083
5083
  pointerDown = (event) => {
5084
- if (event.button !== 0 || this.#drag || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
5084
+ if (event.button !== 0 || this.#drag || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
5085
5085
  return;
5086
5086
  }
5087
5087
  this.#drag = createQuickDuplicateDragState(this.#svg, event, createDuplicatePreviewPath(this.#svg));
@@ -5095,7 +5095,7 @@ var QuickDuplicateSession = class {
5095
5095
  return;
5096
5096
  }
5097
5097
  this.beginPreview(drag);
5098
- const target = resolveDuplicateTarget(drag, duplicatePointerPosition(this.#svg, event), 1 / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg));
5098
+ const target = resolveDuplicateTarget(drag, duplicatePointerPosition(this.#svg, event), 1 / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg));
5099
5099
  updateDuplicatePreview(drag, target.point, target.side);
5100
5100
  drag.ghost.show(target.hit !== null, target.bounds);
5101
5101
  };
@@ -5153,14 +5153,14 @@ function seriesShapes(svg, ownerId, series) {
5153
5153
  return [...svg.querySelectorAll(selector)];
5154
5154
  }
5155
5155
  function updateRadarVertexDragPreview(svg, drag, value) {
5156
- const point = chunkCXL254BT_cjs.radarVertexPoint(drag.frame, drag.index, value);
5156
+ const point = chunkXY2GZUHC_cjs.radarVertexPoint(drag.frame, drag.index, value);
5157
5157
  drag.element.setAttribute("cx", String(point.x));
5158
5158
  drag.element.setAttribute("cy", String(point.y));
5159
5159
  const points = seriesVertices(svg, drag.owner.id, drag.series).map((vertex) => ({
5160
5160
  x: Number(vertex.getAttribute("cx")),
5161
5161
  y: Number(vertex.getAttribute("cy"))
5162
5162
  }));
5163
- const path = chunkCXL254BT_cjs.radarSeriesPath(points, drag.frame.curved, drag.frame.tension);
5163
+ const path = chunkXY2GZUHC_cjs.radarSeriesPath(points, drag.frame.curved, drag.frame.tension);
5164
5164
  for (const shape of seriesShapes(svg, drag.owner.id, drag.series)) {
5165
5165
  shape.setAttribute("d", path);
5166
5166
  }
@@ -5215,7 +5215,7 @@ function findVertex(event) {
5215
5215
  return event.target?.closest?.('[data-sf-mark="radar-vertex"]');
5216
5216
  }
5217
5217
  function isVertexPointer(event) {
5218
- return event.button === 0 && !chunkHFOGKSNU_cjs.isCameraGesture(event);
5218
+ return event.button === 0 && !chunkL3VJXZFD_cjs.isCameraGesture(event);
5219
5219
  }
5220
5220
  function resolveRadarVertexDrag(svg, event) {
5221
5221
  if (!isVertexPointer(event)) {
@@ -5225,7 +5225,7 @@ function resolveRadarVertexDrag(svg, event) {
5225
5225
  if (!element2) {
5226
5226
  return null;
5227
5227
  }
5228
- const owner = chunkHFOGKSNU_cjs.resolveOwner(element2);
5228
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(element2);
5229
5229
  if (owner?.role !== "chart") {
5230
5230
  return null;
5231
5231
  }
@@ -5234,7 +5234,7 @@ function resolveRadarVertexDrag(svg, event) {
5234
5234
  if (!series || !Number.isInteger(index) || index < 0) {
5235
5235
  return null;
5236
5236
  }
5237
- const frame = parseRadarFrame(chunkHFOGKSNU_cjs.findOwnerNode(svg, owner.id, chunkHFOGKSNU_cjs.isPrimary));
5237
+ const frame = parseRadarFrame(chunkL3VJXZFD_cjs.findOwnerNode(svg, owner.id, chunkL3VJXZFD_cjs.isPrimary));
5238
5238
  if (!frame || index >= frame.count) {
5239
5239
  return null;
5240
5240
  }
@@ -5244,11 +5244,11 @@ function resolveRadarVertexDrag(svg, event) {
5244
5244
 
5245
5245
  // src/runtime/interaction/radarVertexDrag/session.ts
5246
5246
  function valueFrom(svg, event, drag) {
5247
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(svg, event);
5247
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(svg, event);
5248
5248
  if (!point) {
5249
5249
  return null;
5250
5250
  }
5251
- return chunkCXL254BT_cjs.radarValueAtPoint(drag.frame, drag.index, point.x, point.y);
5251
+ return chunkXY2GZUHC_cjs.radarValueAtPoint(drag.frame, drag.index, point.x, point.y);
5252
5252
  }
5253
5253
  var RadarVertexDragSession = class {
5254
5254
  #svg;
@@ -5280,7 +5280,7 @@ var RadarVertexDragSession = class {
5280
5280
  if (!this.#readout) {
5281
5281
  this.#readout = createValueReadout(this.#svg);
5282
5282
  }
5283
- const vertex = chunkCXL254BT_cjs.radarVertexPoint(this.#drag.frame, this.#drag.index, value);
5283
+ const vertex = chunkXY2GZUHC_cjs.radarVertexPoint(this.#drag.frame, this.#drag.index, value);
5284
5284
  positionRadarReadout(this.#readout, vertex, this.#drag.frame.centerY, value);
5285
5285
  }
5286
5286
  cancel() {
@@ -5371,7 +5371,7 @@ function captureTextFit(text) {
5371
5371
  fontSize,
5372
5372
  lineHeight,
5373
5373
  padding: Math.max(8, text.strokeWidth * 2),
5374
- longestWord: Math.max(0, ...words.map((word) => chunkCXL254BT_cjs.estimateTextWidth(word, fontSize, bold)))
5374
+ longestWord: Math.max(0, ...words.map((word) => chunkXY2GZUHC_cjs.estimateTextWidth(word, fontSize, bold)))
5375
5375
  };
5376
5376
  }
5377
5377
  var COMMIT_PRECISION = 10;
@@ -5382,7 +5382,7 @@ function minWidthForText(fit) {
5382
5382
  return roundUpForCommit(fit.longestWord + fit.padding * 2);
5383
5383
  }
5384
5384
  function minHeightForText(fit, width) {
5385
- const lines = chunkCXL254BT_cjs.wrapText(fit.rawText, Math.max(0, width - fit.padding * 2), fit.fontSize);
5385
+ const lines = chunkXY2GZUHC_cjs.wrapText(fit.rawText, Math.max(0, width - fit.padding * 2), fit.fontSize);
5386
5386
  return roundUpForCommit(lines.length * fit.fontSize * fit.lineHeight + fit.padding * 2);
5387
5387
  }
5388
5388
 
@@ -5492,7 +5492,7 @@ function applyRectBounds(rect, kind, bounds) {
5492
5492
  rect.setAttribute("width", String(bounds.width));
5493
5493
  rect.setAttribute("height", String(bounds.height));
5494
5494
  if (kind === "pill") {
5495
- rect.setAttribute("rx", String(chunkCXL254BT_cjs.pillCornerRadius(bounds.width, bounds.height)));
5495
+ rect.setAttribute("rx", String(chunkXY2GZUHC_cjs.pillCornerRadius(bounds.width, bounds.height)));
5496
5496
  }
5497
5497
  }
5498
5498
  function applyEllipseBounds(ellipse, bounds) {
@@ -5502,7 +5502,7 @@ function applyEllipseBounds(ellipse, bounds) {
5502
5502
  ellipse.setAttribute("ry", String(bounds.height / 2));
5503
5503
  }
5504
5504
  function applySymbolBounds(path, bounds) {
5505
- const raw = path.getAttribute(chunkCXL254BT_cjs.SYMBOL_POINTS_ATTR);
5505
+ const raw = path.getAttribute(chunkXY2GZUHC_cjs.SYMBOL_POINTS_ATTR);
5506
5506
  if (!raw) {
5507
5507
  return false;
5508
5508
  }
@@ -5510,22 +5510,22 @@ function applySymbolBounds(path, bounds) {
5510
5510
  x: bounds.x + x * bounds.width,
5511
5511
  y: bounds.y + y * bounds.height
5512
5512
  }));
5513
- const tension = Number(path.getAttribute(chunkCXL254BT_cjs.SYMBOL_TENSION_ATTR)) || 0;
5514
- path.setAttribute("d", chunkCXL254BT_cjs.freeformPathData({ points, tension, closed: true }));
5513
+ const tension = Number(path.getAttribute(chunkXY2GZUHC_cjs.SYMBOL_TENSION_ATTR)) || 0;
5514
+ path.setAttribute("d", chunkXY2GZUHC_cjs.freeformPathData({ points, tension, closed: true }));
5515
5515
  return true;
5516
5516
  }
5517
5517
  function applyPathBounds(path, kind, bounds) {
5518
5518
  if (kind === "symbol" && applySymbolBounds(path, bounds)) {
5519
5519
  return;
5520
5520
  }
5521
- const pathData = chunkCXL254BT_cjs.localShapePath(kind, bounds.x, bounds.y, bounds.width, bounds.height);
5521
+ const pathData = chunkXY2GZUHC_cjs.localShapePath(kind, bounds.x, bounds.y, bounds.width, bounds.height);
5522
5522
  if (pathData) {
5523
5523
  path.setAttribute("d", pathData);
5524
5524
  }
5525
5525
  }
5526
5526
  function applyFrameBoundaryBounds(path, bounds) {
5527
- const cornerRadius = Number(path.getAttribute(chunkCXL254BT_cjs.CORNER_RADIUS_ATTR) ?? 0);
5528
- const squareCorner = path.getAttribute(chunkCXL254BT_cjs.SQUARE_CORNER_ATTR);
5527
+ const cornerRadius = Number(path.getAttribute(chunkXY2GZUHC_cjs.CORNER_RADIUS_ATTR) ?? 0);
5528
+ const squareCorner = path.getAttribute(chunkXY2GZUHC_cjs.SQUARE_CORNER_ATTR);
5529
5529
  const radii = {
5530
5530
  topLeft: cornerRadius,
5531
5531
  topRight: cornerRadius,
@@ -5535,7 +5535,7 @@ function applyFrameBoundaryBounds(path, bounds) {
5535
5535
  if (squareCorner) {
5536
5536
  radii[squareCorner] = 0;
5537
5537
  }
5538
- path.setAttribute("d", chunkCXL254BT_cjs.cornersRoundedRectPath(bounds.x, bounds.y, bounds.width, bounds.height, radii));
5538
+ path.setAttribute("d", chunkXY2GZUHC_cjs.cornersRoundedRectPath(bounds.x, bounds.y, bounds.width, bounds.height, radii));
5539
5539
  }
5540
5540
  function applySingleNodeBounds(primary, kind, bounds) {
5541
5541
  const tag = primary.tagName.toLowerCase();
@@ -5545,7 +5545,7 @@ function applySingleNodeBounds(primary, kind, bounds) {
5545
5545
  applyEllipseBounds(primary, bounds);
5546
5546
  } else if (tag === "foreignobject") {
5547
5547
  applyRectBounds(primary, null, bounds);
5548
- } else if (tag === "path" && primary.hasAttribute(chunkCXL254BT_cjs.CORNER_RADIUS_ATTR)) {
5548
+ } else if (tag === "path" && primary.hasAttribute(chunkXY2GZUHC_cjs.CORNER_RADIUS_ATTR)) {
5549
5549
  applyFrameBoundaryBounds(primary, bounds);
5550
5550
  } else if (tag === "path" && kind) {
5551
5551
  applyPathBounds(primary, kind, bounds);
@@ -5584,7 +5584,7 @@ function updateSelectionRing(overlay, bounds) {
5584
5584
  }
5585
5585
  function updateSelectionOverlay(overlay, bounds) {
5586
5586
  updateSelectionRing(overlay, bounds);
5587
- for (const [centerX, centerY, name] of chunkHFOGKSNU_cjs.resizeHandlePositions(bounds)) {
5587
+ for (const [centerX, centerY, name] of chunkL3VJXZFD_cjs.resizeHandlePositions(bounds)) {
5588
5588
  const handle = overlay.querySelector(`[data-sf-resize-handle="${name}"]`);
5589
5589
  if (!handle) {
5590
5590
  continue;
@@ -5601,7 +5601,7 @@ function replaceTextLines(textElement, lines, x, lineHeight) {
5601
5601
  textElement.removeChild(textElement.firstChild);
5602
5602
  }
5603
5603
  lines.forEach((line, index) => {
5604
- const tspan = document.createElementNS(chunkHFOGKSNU_cjs.SVG_NAMESPACE, "tspan");
5604
+ const tspan = document.createElementNS(chunkL3VJXZFD_cjs.SVG_NAMESPACE, "tspan");
5605
5605
  tspan.setAttribute("x", String(x));
5606
5606
  if (index > 0) {
5607
5607
  tspan.setAttribute("dy", `${lineHeight}px`);
@@ -5621,7 +5621,7 @@ function applyLiveText(textElement, rawText, bounds, strokeWidth) {
5621
5621
  const height = Math.max(0, bounds.height - padding * 2);
5622
5622
  const boxX = bounds.x + padding;
5623
5623
  const boxY = bounds.y + padding;
5624
- const lines = chunkCXL254BT_cjs.wrapText(rawText, width, fontSize);
5624
+ const lines = chunkXY2GZUHC_cjs.wrapText(rawText, width, fontSize);
5625
5625
  const linePixels = fontSize * lineHeight;
5626
5626
  const contentHeight = lines.length * linePixels;
5627
5627
  const firstY = verticalAlign === "top" ? boxY + fontSize : verticalAlign === "bottom" ? boxY + height - contentHeight + fontSize : boxY + (height - contentHeight) / 2 + fontSize;
@@ -5634,7 +5634,7 @@ function applyLiveText(textElement, rawText, bounds, strokeWidth) {
5634
5634
 
5635
5635
  // src/runtime/interaction/resize/preview.ts
5636
5636
  function textBoundsFor(kind, bounds) {
5637
- return kind === "person" ? chunkCXL254BT_cjs.personLabelArea(bounds.x, bounds.y, bounds.width, bounds.height) : bounds;
5637
+ return kind === "person" ? chunkXY2GZUHC_cjs.personLabelArea(bounds.x, bounds.y, bounds.width, bounds.height) : bounds;
5638
5638
  }
5639
5639
  function applyGeometryPreview(drag, bounds) {
5640
5640
  if (drag.isComposite) {
@@ -5654,7 +5654,7 @@ function applyResizePreview(drag, bounds) {
5654
5654
  applyLiveText(drag.text.el, drag.text.rawText, textBoundsFor(drag.kind, bounds), drag.text.strokeWidth);
5655
5655
  }
5656
5656
  if (drag.bubbles) {
5657
- chunkHFOGKSNU_cjs.updateQuickDuplicateBubbles(drag.bubbles, bounds);
5657
+ chunkL3VJXZFD_cjs.updateQuickDuplicateBubbles(drag.bubbles, bounds);
5658
5658
  }
5659
5659
  updateLiveLinks(drag.liveLinks, bounds);
5660
5660
  }
@@ -5676,9 +5676,9 @@ function snapResize(svg, drag, pointer) {
5676
5676
  };
5677
5677
  }
5678
5678
  const axes = HANDLE_AXES[drag.handle];
5679
- const candidates = nearestCandidates(proposed, chunkHFOGKSNU_cjs.findSnapCandidateBounds(svg, /* @__PURE__ */ new Set([drag.owner.id])));
5679
+ const candidates = nearestCandidates(proposed, chunkL3VJXZFD_cjs.findSnapCandidateBounds(svg, /* @__PURE__ */ new Set([drag.owner.id])));
5680
5680
  const snap = computeSnap(proposed, candidates, {
5681
- threshold: SNAP_THRESHOLD_PX2 / chunkHFOGKSNU_cjs.pxPerUnit(svg),
5681
+ threshold: SNAP_THRESHOLD_PX2 / chunkL3VJXZFD_cjs.pxPerUnit(svg),
5682
5682
  activeX: resizeActivePoints(axes.x),
5683
5683
  activeY: resizeActivePoints(axes.y),
5684
5684
  guideOverhang: GUIDE_OVERHANG3
@@ -5719,13 +5719,13 @@ function selectResizeTarget(svg, event) {
5719
5719
  if (!ownerId) {
5720
5720
  return null;
5721
5721
  }
5722
- const primary = chunkHFOGKSNU_cjs.findOwnerNode(svg, ownerId, chunkHFOGKSNU_cjs.isPrimary);
5723
- const owner = primary && chunkHFOGKSNU_cjs.resolveOwner(primary);
5722
+ const primary = chunkL3VJXZFD_cjs.findOwnerNode(svg, ownerId, chunkL3VJXZFD_cjs.isPrimary);
5723
+ const owner = primary && chunkL3VJXZFD_cjs.resolveOwner(primary);
5724
5724
  if (!primary || !hasEditableGeometry(owner)) {
5725
5725
  return null;
5726
5726
  }
5727
- const nodes = chunkHFOGKSNU_cjs.findAllOwnerNodes(svg, ownerId);
5728
- const geometryNodes = isCompositeOwner(owner) ? nodes : nodes.filter((node) => !chunkHFOGKSNU_cjs.isTextLabel(node));
5727
+ const nodes = chunkL3VJXZFD_cjs.findAllOwnerNodes(svg, ownerId);
5728
+ const geometryNodes = isCompositeOwner(owner) ? nodes : nodes.filter((node) => !chunkL3VJXZFD_cjs.isTextLabel(node));
5729
5729
  if (!geometryNodes.length) {
5730
5730
  return null;
5731
5731
  }
@@ -5743,7 +5743,7 @@ function selectResizeTarget(svg, event) {
5743
5743
 
5744
5744
  // src/runtime/interaction/resize/textCapture.ts
5745
5745
  function captureResizeText(nodes, primary) {
5746
- const textElement = nodes.find(chunkHFOGKSNU_cjs.isTextLabel);
5746
+ const textElement = nodes.find(chunkL3VJXZFD_cjs.isTextLabel);
5747
5747
  const rawText = primary.getAttribute("aria-label");
5748
5748
  if (!textElement || !rawText) {
5749
5749
  return null;
@@ -5761,7 +5761,7 @@ function createResizeDragState(svg, event) {
5761
5761
  if (!selection) {
5762
5762
  return null;
5763
5763
  }
5764
- const startBounds = chunkHFOGKSNU_cjs.symbolDeclaredBounds(selection.primary) ?? selection.primary.getBBox();
5764
+ const startBounds = chunkL3VJXZFD_cjs.symbolDeclaredBounds(selection.primary) ?? selection.primary.getBBox();
5765
5765
  const composite = isCompositeOwner(selection.owner);
5766
5766
  const isContainer = CONTAINER_ROLES.has(selection.owner.role);
5767
5767
  selection.captureTarget.setPointerCapture?.(event.pointerId);
@@ -5774,7 +5774,7 @@ function createResizeDragState(svg, event) {
5774
5774
  isComposite: composite,
5775
5775
  geometryNodes: selection.geometryNodes,
5776
5776
  insets: selection.geometryNodes.map(
5777
- (node) => node === selection.primary ? NO_INSET : insetWithin(startBounds, chunkHFOGKSNU_cjs.symbolDeclaredBounds(node) ?? node.getBBox())
5777
+ (node) => node === selection.primary ? NO_INSET : insetWithin(startBounds, chunkL3VJXZFD_cjs.symbolDeclaredBounds(node) ?? node.getBBox())
5778
5778
  ),
5779
5779
  baseTransforms: selection.geometryNodes.map((node) => node.getAttribute("transform")),
5780
5780
  overlay: selection.overlay,
@@ -5800,7 +5800,7 @@ var ResizeSession = class {
5800
5800
  this.#emitter = emitter;
5801
5801
  }
5802
5802
  pointerDown = (event) => {
5803
- if (event.button !== 0 || this.#drag || chunkHFOGKSNU_cjs.isCameraGesture(event)) {
5803
+ if (event.button !== 0 || this.#drag || chunkL3VJXZFD_cjs.isCameraGesture(event)) {
5804
5804
  return;
5805
5805
  }
5806
5806
  this.#drag = createResizeDragState(this.#svg, event);
@@ -5813,7 +5813,7 @@ var ResizeSession = class {
5813
5813
  drag.moved = true;
5814
5814
  const { bounds, guides } = snapResize(this.#svg, drag, resizePointerPosition(this.#svg, event));
5815
5815
  applyResizePreview(drag, clampResizeToChildren(bounds, drag.childrenBounds));
5816
- chunkHFOGKSNU_cjs.updateAlignmentGuides(this.#svg, guides, RESIZE_GUIDE_COLOR);
5816
+ chunkL3VJXZFD_cjs.updateAlignmentGuides(this.#svg, guides, RESIZE_GUIDE_COLOR);
5817
5817
  };
5818
5818
  pointerUp = (event) => {
5819
5819
  const drag = this.#drag;
@@ -5822,7 +5822,7 @@ var ResizeSession = class {
5822
5822
  }
5823
5823
  this.#drag = null;
5824
5824
  event.target?.releasePointerCapture?.(drag.pointerId);
5825
- chunkHFOGKSNU_cjs.clearAlignmentGuides(this.#svg);
5825
+ chunkL3VJXZFD_cjs.clearAlignmentGuides(this.#svg);
5826
5826
  if (!drag.moved) {
5827
5827
  return;
5828
5828
  }
@@ -5860,7 +5860,7 @@ function resolveSankeyNodeLabelTarget(event) {
5860
5860
  if (!labelElement) {
5861
5861
  return null;
5862
5862
  }
5863
- const owner = chunkHFOGKSNU_cjs.resolveOwner(labelElement);
5863
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(labelElement);
5864
5864
  if (owner?.role !== "chart") {
5865
5865
  return null;
5866
5866
  }
@@ -5871,7 +5871,7 @@ function resolveSankeyNodeLabelTarget(event) {
5871
5871
  return { owner, nodeId, labelElement };
5872
5872
  }
5873
5873
  function createSankeyNodeLabelEditor(target, emitter, onClose) {
5874
- const rect = chunkHFOGKSNU_cjs.screenRectOf(target.labelElement);
5874
+ const rect = chunkL3VJXZFD_cjs.screenRectOf(target.labelElement);
5875
5875
  if (rect.width <= 0 && rect.height <= 0) {
5876
5876
  return null;
5877
5877
  }
@@ -5928,7 +5928,7 @@ function clearSankeyNodeDragPreview(drag) {
5928
5928
  // src/runtime/interaction/sankeyNode/target.ts
5929
5929
  var RIBBON_PATH = /^M\s+(-?[\d.]+)\s+(-?[\d.]+)\s+C\s+-?[\d.]+\s+-?[\d.]+\s+-?[\d.]+\s+(-?[\d.]+)\s+(-?[\d.]+)\s+-?[\d.]+\s+L\s+-?[\d.]+\s+(-?[\d.]+)\s+C\s+-?[\d.]+\s+-?[\d.]+\s+-?[\d.]+\s+(-?[\d.]+)\s+-?[\d.]+\s+-?[\d.]+\s+Z$/;
5930
5930
  function isNodePointer(event) {
5931
- return event.button === 0 && !chunkHFOGKSNU_cjs.isCameraGesture(event);
5931
+ return event.button === 0 && !chunkL3VJXZFD_cjs.isCameraGesture(event);
5932
5932
  }
5933
5933
  function findNodeRect(event) {
5934
5934
  return event.target?.closest?.('[data-sf-mark="sankey-node"]');
@@ -5986,7 +5986,7 @@ function resolveSankeyNodeDrag(svg, event) {
5986
5986
  if (!rect) {
5987
5987
  return null;
5988
5988
  }
5989
- const owner = chunkHFOGKSNU_cjs.resolveOwner(rect);
5989
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(rect);
5990
5990
  if (owner?.role !== "chart") {
5991
5991
  return null;
5992
5992
  }
@@ -5994,7 +5994,7 @@ function resolveSankeyNodeDrag(svg, event) {
5994
5994
  if (!nodeId) {
5995
5995
  return null;
5996
5996
  }
5997
- const start = chunkHFOGKSNU_cjs.pointerUserPoint(svg, event);
5997
+ const start = chunkL3VJXZFD_cjs.pointerUserPoint(svg, event);
5998
5998
  if (!start) {
5999
5999
  return null;
6000
6000
  }
@@ -6040,7 +6040,7 @@ var SankeyNodeDragSession = class {
6040
6040
  if (!this.#drag || event.pointerId !== this.#drag.pointerId) {
6041
6041
  return;
6042
6042
  }
6043
- const point = chunkHFOGKSNU_cjs.pointerUserPoint(this.#svg, event);
6043
+ const point = chunkL3VJXZFD_cjs.pointerUserPoint(this.#svg, event);
6044
6044
  if (!point) {
6045
6045
  return;
6046
6046
  }
@@ -6054,7 +6054,7 @@ var SankeyNodeDragSession = class {
6054
6054
  const leadBounds = offsetBounds(drag.originalBounds, rawDx, rawDy);
6055
6055
  const candidates = nearestCandidates(leadBounds, drag.siblingBounds);
6056
6056
  const snap = computeSnap(leadBounds, candidates, {
6057
- threshold: SNAP_THRESHOLD_PX3 / chunkHFOGKSNU_cjs.pxPerUnit(this.#svg),
6057
+ threshold: SNAP_THRESHOLD_PX3 / chunkL3VJXZFD_cjs.pxPerUnit(this.#svg),
6058
6058
  activeX: MOVE_ACTIVE_POINTS,
6059
6059
  activeY: MOVE_ACTIVE_POINTS,
6060
6060
  guideOverhang: GUIDE_OVERHANG4
@@ -6064,7 +6064,7 @@ var SankeyNodeDragSession = class {
6064
6064
  drag.lastDx = dx;
6065
6065
  drag.lastDy = dy;
6066
6066
  updateSankeyNodeDragPreview(drag, dx, dy);
6067
- chunkHFOGKSNU_cjs.updateAlignmentGuides(
6067
+ chunkL3VJXZFD_cjs.updateAlignmentGuides(
6068
6068
  this.#svg,
6069
6069
  [snap.x.guide, snap.y.guide].filter((guide) => guide !== null),
6070
6070
  GUIDE_COLOR3
@@ -6075,7 +6075,7 @@ var SankeyNodeDragSession = class {
6075
6075
  clearSankeyNodeDragPreview(this.#drag);
6076
6076
  }
6077
6077
  this.#drag = null;
6078
- chunkHFOGKSNU_cjs.clearAlignmentGuides(this.#svg);
6078
+ chunkL3VJXZFD_cjs.clearAlignmentGuides(this.#svg);
6079
6079
  }
6080
6080
  finish(event) {
6081
6081
  if (!this.#drag || event.pointerId !== this.#drag.pointerId) {
@@ -6085,7 +6085,7 @@ var SankeyNodeDragSession = class {
6085
6085
  this.#drag = null;
6086
6086
  event.target?.releasePointerCapture?.(drag.pointerId);
6087
6087
  clearSankeyNodeDragPreview(drag);
6088
- chunkHFOGKSNU_cjs.clearAlignmentGuides(this.#svg);
6088
+ chunkL3VJXZFD_cjs.clearAlignmentGuides(this.#svg);
6089
6089
  if (!drag.moved) {
6090
6090
  return;
6091
6091
  }
@@ -6141,7 +6141,7 @@ function bindSankeyNode(viewer, emitter) {
6141
6141
  var FALLBACK_WIDTH = 120;
6142
6142
  var FALLBACK_HEIGHT = 28;
6143
6143
  function centeredLabelRect(primaryNode) {
6144
- const primaryRect = chunkHFOGKSNU_cjs.screenRectOf(primaryNode);
6144
+ const primaryRect = chunkL3VJXZFD_cjs.screenRectOf(primaryNode);
6145
6145
  return {
6146
6146
  left: primaryRect.left + (primaryRect.width - FALLBACK_WIDTH) / 2,
6147
6147
  top: primaryRect.top + (primaryRect.height - FALLBACK_HEIGHT) / 2,
@@ -6151,10 +6151,10 @@ function centeredLabelRect(primaryNode) {
6151
6151
  }
6152
6152
  function resolveTextEditRect(owner, textNode, primaryNode) {
6153
6153
  if (owner.role === "shape") {
6154
- return primaryNode ? chunkHFOGKSNU_cjs.screenRectOf(primaryNode) : null;
6154
+ return primaryNode ? chunkL3VJXZFD_cjs.screenRectOf(primaryNode) : null;
6155
6155
  }
6156
6156
  if (textNode) {
6157
- return chunkHFOGKSNU_cjs.screenRectOf(textNode);
6157
+ return chunkL3VJXZFD_cjs.screenRectOf(textNode);
6158
6158
  }
6159
6159
  return primaryNode ? centeredLabelRect(primaryNode) : null;
6160
6160
  }
@@ -6174,8 +6174,8 @@ function textAlign(owner, textNode) {
6174
6174
  return anchor === "end" ? "right" : "left";
6175
6175
  }
6176
6176
  function createActiveTextEditor(svg, owner, emitter, onClose) {
6177
- const textNode = chunkHFOGKSNU_cjs.findOwnerNode(svg, owner.id, chunkHFOGKSNU_cjs.isTextLabel);
6178
- const primaryNode = chunkHFOGKSNU_cjs.findOwnerNode(svg, owner.id, chunkHFOGKSNU_cjs.isPrimary);
6177
+ const textNode = chunkL3VJXZFD_cjs.findOwnerNode(svg, owner.id, chunkL3VJXZFD_cjs.isTextLabel);
6178
+ const primaryNode = chunkL3VJXZFD_cjs.findOwnerNode(svg, owner.id, chunkL3VJXZFD_cjs.isPrimary);
6179
6179
  const rect = resolveTextEditRect(owner, textNode, primaryNode);
6180
6180
  if (!rect) {
6181
6181
  return null;
@@ -6221,7 +6221,7 @@ function isFrameTitle(target) {
6221
6221
  }
6222
6222
  function resolveEditableTextOwner(event) {
6223
6223
  const target = event.target;
6224
- const owner = chunkHFOGKSNU_cjs.resolveOwner(target);
6224
+ const owner = chunkL3VJXZFD_cjs.resolveOwner(target);
6225
6225
  if (!owner) {
6226
6226
  return null;
6227
6227
  }
@@ -6362,7 +6362,7 @@ function applyToken(target, lines, token) {
6362
6362
  function maskSource(lines) {
6363
6363
  let tokens;
6364
6364
  try {
6365
- tokens = chunkCXL254BT_cjs.tokenizeSource(lines.join("\n"));
6365
+ tokens = chunkXY2GZUHC_cjs.tokenizeSource(lines.join("\n"));
6366
6366
  } catch {
6367
6367
  return null;
6368
6368
  }
@@ -6394,7 +6394,7 @@ function braceDelta(masked) {
6394
6394
  }
6395
6395
 
6396
6396
  // src/runtime/interaction/sflPatch/scan/blocks.ts
6397
- var OWNER_HEADER = /^\s*(Entity|Shape|Text|Container|Chart|Path|Link|Isometric|Widget|Connection|Shader)\s+([A-Za-z_][A-Za-z0-9_]*)\b/;
6397
+ var OWNER_HEADER = /^\s*(Entity|Shape|Text|Container|Chart|Path|Link|Isometric|Widget|Component|Connection|Shader)\s+([A-Za-z_][A-Za-z0-9_]*)\b/;
6398
6398
  var VALID_IDENT = /^[A-Za-z_][A-Za-z0-9_]*$/;
6399
6399
  function blockEndIn(masked, startLine) {
6400
6400
  let depth = 0;
@@ -6695,7 +6695,7 @@ function resolveCanvasObjectInsertionTarget(sfl, lines, parentId) {
6695
6695
  const modelRange = findFirstBlockOfKind(lines, "Model");
6696
6696
  return modelRange ? { range: modelRange, origin: { x: 0, y: 0 } } : null;
6697
6697
  }
6698
- const parent = chunkCXL254BT_cjs.sflToCanvasState(sfl).canvasObjects.find((canvasObject) => canvasObject.id === parentId);
6698
+ const parent = chunkXY2GZUHC_cjs.sflToCanvasState(sfl).canvasObjects.find((canvasObject) => canvasObject.id === parentId);
6699
6699
  if (!parent) {
6700
6700
  return null;
6701
6701
  }
@@ -7137,7 +7137,7 @@ function movePathPoints(lines, range, dx, dy) {
7137
7137
  replacePropertyValue(lines, span, shifted);
7138
7138
  }
7139
7139
  function applyMoveChange(sfl, event) {
7140
- const state = chunkCXL254BT_cjs.sflToCanvasState(sfl);
7140
+ const state = chunkXY2GZUHC_cjs.sflToCanvasState(sfl);
7141
7141
  const canvasObject = state.canvasObjects.find((candidate) => candidate.id === event.owner.id);
7142
7142
  if (!canvasObject) {
7143
7143
  return sfl;
@@ -7162,7 +7162,7 @@ function applyMoveChange(sfl, event) {
7162
7162
 
7163
7163
  // src/runtime/interaction/sflPatch/changes/pathPointChange.ts
7164
7164
  function applyPathPointChange(sfl, event) {
7165
- const canvasObjects = chunkCXL254BT_cjs.sflToCanvasState(sfl).canvasObjects;
7165
+ const canvasObjects = chunkXY2GZUHC_cjs.sflToCanvasState(sfl).canvasObjects;
7166
7166
  const canvasObject = canvasObjects.find((candidate) => candidate.id === event.owner.id);
7167
7167
  if (!canvasObject) {
7168
7168
  return sfl;
@@ -7288,9 +7288,260 @@ function shouldQuote(current, quote, indexed) {
7288
7288
  return indexed && trimmed === "none";
7289
7289
  }
7290
7290
 
7291
+ // src/runtime/interaction/sflPatch/connectionPatch/blockText.ts
7292
+ function buildConnectionBlock(options, baseIndent) {
7293
+ const bodyIndent = `${baseIndent} `;
7294
+ const block = [
7295
+ `${baseIndent}Connection ${options.id} {`,
7296
+ `${bodyIndent}from: ${options.fromId}`,
7297
+ `${bodyIndent}to: ${options.toId}`,
7298
+ `${bodyIndent}fromFace: "${options.fromFace}"`,
7299
+ `${bodyIndent}toFace: "${options.toFace}"`
7300
+ ];
7301
+ if (options.body) {
7302
+ block.push(...indentBlock(options.body, bodyIndent));
7303
+ }
7304
+ block.push(`${baseIndent}}`);
7305
+ return block;
7306
+ }
7307
+
7308
+ // src/runtime/interaction/sflPatch/connectionPatch/insertionTarget.ts
7309
+ function resolveConnectionInsertionTarget(sfl, lines, options) {
7310
+ if (!VALID_IDENT.test(options.id) || nameExists(lines, options.id)) {
7311
+ return null;
7312
+ }
7313
+ const canvasObjects = chunkXY2GZUHC_cjs.sflToCanvasState(sfl).canvasObjects;
7314
+ const hasSource = canvasObjects.some((canvasObject) => canvasObject.id === options.fromId);
7315
+ const hasTarget = canvasObjects.some((canvasObject) => canvasObject.id === options.toId);
7316
+ if (!hasSource || !hasTarget) {
7317
+ return null;
7318
+ }
7319
+ return findFirstBlockOfKind(lines, "Model");
7320
+ }
7321
+
7322
+ // src/runtime/interaction/sflPatch/connectionPatch/insert.ts
7323
+ function insertConnection(sfl, options) {
7324
+ const lines = sfl.split("\n");
7325
+ const modelRange = resolveConnectionInsertionTarget(sfl, lines, options);
7326
+ if (!modelRange) {
7327
+ return sfl;
7328
+ }
7329
+ insertBlockLines(lines, modelRange, (baseIndent) => buildConnectionBlock(options, baseIndent));
7330
+ return lines.join("\n");
7331
+ }
7332
+
7333
+ // src/runtime/interaction/sflPatch/changes/quickDuplicate/styleBlock.ts
7334
+ var QUOTED_KEYS = /* @__PURE__ */ new Set(["fill", "stroke", "textColor", "fontFamily", "shadow", "labelBackground"]);
7335
+ function styleLine(key, value) {
7336
+ return QUOTED_KEYS.has(key) ? ` ${key}: "${value.replace(/"/g, '\\"')}"` : ` ${key}: ${value}`;
7337
+ }
7338
+ function styleBlock(props, keys, leading = []) {
7339
+ const copied = keys.flatMap((key) => {
7340
+ const value = props?.[key];
7341
+ return value === void 0 ? [] : [styleLine(key, value)];
7342
+ });
7343
+ const lines = [...leading, ...copied];
7344
+ return lines.length > 0 ? `style {
7345
+ ${lines.join("\n")}
7346
+ }` : void 0;
7347
+ }
7348
+
7349
+ // src/runtime/interaction/sflPatch/changes/quickDuplicate/isometricDuplicate.ts
7350
+ var ISOMETRIC_GAP = 40;
7351
+ var ISOMETRIC_STYLE_KEYS = [
7352
+ "fill",
7353
+ "stroke",
7354
+ "strokeWidth",
7355
+ "cornerRadius",
7356
+ "shadow",
7357
+ "labelOffsetX",
7358
+ "labelOffsetY",
7359
+ "labelBackground"
7360
+ ];
7361
+ var TOUCHING_FACES = {
7362
+ "iso-width-pos": { fromFace: "right", toFace: "left" },
7363
+ "iso-width-neg": { fromFace: "left", toFace: "right" },
7364
+ "iso-depth-pos": { fromFace: "front", toFace: "back" },
7365
+ "iso-depth-neg": { fromFace: "back", toFace: "front" },
7366
+ "iso-height-pos": { fromFace: "bottom", toFace: "top" },
7367
+ "iso-height-neg": { fromFace: "top", toFace: "bottom" }
7368
+ };
7369
+ function isIsometricDirection2(direction) {
7370
+ return direction.startsWith("iso-");
7371
+ }
7372
+ function isometricOffset(direction, object, gap) {
7373
+ const { width, height } = object;
7374
+ const { depth } = object.isometric;
7375
+ switch (direction) {
7376
+ case "iso-width-pos":
7377
+ return { dx: (width + gap) * chunkXY2GZUHC_cjs.AXIS_COS, dy: (width + gap) * chunkXY2GZUHC_cjs.AXIS_SIN };
7378
+ case "iso-width-neg":
7379
+ return { dx: -(width + gap) * chunkXY2GZUHC_cjs.AXIS_COS, dy: -(width + gap) * chunkXY2GZUHC_cjs.AXIS_SIN };
7380
+ case "iso-depth-pos":
7381
+ return { dx: -(depth + gap) * chunkXY2GZUHC_cjs.AXIS_COS, dy: (depth + gap) * chunkXY2GZUHC_cjs.AXIS_SIN };
7382
+ case "iso-depth-neg":
7383
+ return { dx: (depth + gap) * chunkXY2GZUHC_cjs.AXIS_COS, dy: -(depth + gap) * chunkXY2GZUHC_cjs.AXIS_SIN };
7384
+ case "iso-height-pos":
7385
+ return { dx: 0, dy: height + gap };
7386
+ case "iso-height-neg":
7387
+ return { dx: 0, dy: -(height + gap) };
7388
+ }
7389
+ }
7390
+ function copyStyle(object, direction) {
7391
+ if (!direction.startsWith("iso-height-")) {
7392
+ return styleBlock(object.props, ISOMETRIC_STYLE_KEYS);
7393
+ }
7394
+ return styleBlock(
7395
+ object.props,
7396
+ ISOMETRIC_STYLE_KEYS.filter((key) => key !== "shadow"),
7397
+ [' shadow: "off"']
7398
+ );
7399
+ }
7400
+ function copyOf(object, direction, options) {
7401
+ const { dx, dy } = isometricOffset(direction, object, options.gap ?? ISOMETRIC_GAP);
7402
+ return {
7403
+ id: options.shapeId,
7404
+ kind: "isometric",
7405
+ text: object.text ?? "",
7406
+ x: object.x + dx,
7407
+ y: object.y + dy,
7408
+ width: object.width,
7409
+ height: object.height,
7410
+ depth: object.isometric.depth,
7411
+ parentId: object.parentFrameId,
7412
+ body: copyStyle(object, direction)
7413
+ };
7414
+ }
7415
+ function duplicateIsometricObject(sfl, object, direction, options) {
7416
+ const withCopy = insertCanvasObject(sfl, copyOf(object, direction, options));
7417
+ return insertConnection(withCopy, {
7418
+ id: options.linkId,
7419
+ fromId: object.id,
7420
+ toId: options.shapeId,
7421
+ ...TOUCHING_FACES[direction]
7422
+ });
7423
+ }
7424
+
7425
+ // src/runtime/interaction/sflPatch/linkPatch/blockText.ts
7426
+ function buildLinkBlock(options, baseIndent) {
7427
+ const bodyIndent = `${baseIndent} `;
7428
+ const from = formatLinkEndpoint({ id: options.fromId, side: options.fromSide, fraction: options.fromFraction });
7429
+ const to = formatLinkEndpoint({ id: options.toId, side: options.toSide, fraction: options.toFraction });
7430
+ const block = [`${baseIndent}Link ${options.id} {`, `${bodyIndent}from: ${from}`, `${bodyIndent}to: ${to}`];
7431
+ if (options.text !== void 0) {
7432
+ block.push(`${bodyIndent}text: "${escapeSflString(options.text)}"`);
7433
+ }
7434
+ if (options.body) {
7435
+ block.push(...indentBlock(options.body, bodyIndent));
7436
+ }
7437
+ block.push(`${baseIndent}}`);
7438
+ return block;
7439
+ }
7440
+
7441
+ // src/runtime/interaction/sflPatch/linkPatch/insertionTarget.ts
7442
+ function resolveLinkInsertionTarget(sfl, lines, options) {
7443
+ if (!VALID_IDENT.test(options.id) || nameExists(lines, options.id)) {
7444
+ return null;
7445
+ }
7446
+ const canvasObjects = chunkXY2GZUHC_cjs.sflToCanvasState(sfl).canvasObjects;
7447
+ const hasSource = canvasObjects.some((canvasObject) => canvasObject.id === options.fromId);
7448
+ const hasTarget = canvasObjects.some((canvasObject) => canvasObject.id === options.toId);
7449
+ if (!hasSource || !hasTarget) {
7450
+ return null;
7451
+ }
7452
+ return findFirstBlockOfKind(lines, "Model");
7453
+ }
7454
+
7455
+ // src/runtime/interaction/sflPatch/linkPatch/insert.ts
7456
+ function insertLink(sfl, options) {
7457
+ const lines = sfl.split("\n");
7458
+ const modelRange = resolveLinkInsertionTarget(sfl, lines, options);
7459
+ if (!modelRange) {
7460
+ return sfl;
7461
+ }
7462
+ insertBlockLines(lines, modelRange, (baseIndent) => buildLinkBlock(options, baseIndent));
7463
+ return lines.join("\n");
7464
+ }
7465
+
7466
+ // src/runtime/interaction/sflPatch/changes/quickDuplicate/shapeDuplicate.ts
7467
+ var SHAPE_GAP = 200;
7468
+ var OPPOSITE_SIDE = { top: "bottom", right: "left", bottom: "top", left: "right" };
7469
+ var SHAPE_STYLE_KEYS = [
7470
+ "fill",
7471
+ "stroke",
7472
+ "strokeWidth",
7473
+ "strokeStyle",
7474
+ "textColor",
7475
+ "fontSize",
7476
+ "fontFamily",
7477
+ "cornerRadius",
7478
+ "opacity",
7479
+ "shadow"
7480
+ ];
7481
+ var LINK_STYLE_KEYS = ["stroke", "strokeWidth", "strokeStyle", "markerStart", "markerEnd", "route"];
7482
+ function shapeOffset(side, object, gap) {
7483
+ switch (side) {
7484
+ case "top":
7485
+ return { dx: 0, dy: -(object.height + gap) };
7486
+ case "bottom":
7487
+ return { dx: 0, dy: object.height + gap };
7488
+ case "left":
7489
+ return { dx: -(object.width + gap), dy: 0 };
7490
+ case "right":
7491
+ return { dx: object.width + gap, dy: 0 };
7492
+ }
7493
+ }
7494
+ function copyOf2(object, side, options) {
7495
+ const { dx, dy } = shapeOffset(side, object, options.gap ?? SHAPE_GAP);
7496
+ const shape = object.shapeType ? [` shape: ${object.shapeType}`] : [];
7497
+ return {
7498
+ id: options.shapeId,
7499
+ kind: "shape",
7500
+ text: object.text ?? "",
7501
+ x: object.x + dx,
7502
+ y: object.y + dy,
7503
+ width: object.width,
7504
+ height: object.height,
7505
+ parentId: object.parentFrameId,
7506
+ body: styleBlock(object.props, SHAPE_STYLE_KEYS, shape)
7507
+ };
7508
+ }
7509
+ function linkStyleReference(links, objectId) {
7510
+ return links.find((link) => link.fromId === objectId) ?? links[0];
7511
+ }
7512
+ function linkToCopy(object, links, side, options) {
7513
+ return {
7514
+ id: options.linkId,
7515
+ fromId: object.id,
7516
+ toId: options.shapeId,
7517
+ fromSide: side,
7518
+ toSide: OPPOSITE_SIDE[side],
7519
+ body: styleBlock(linkStyleReference(links, object.id)?.props, LINK_STYLE_KEYS)
7520
+ };
7521
+ }
7522
+ function duplicateShape(sfl, input) {
7523
+ const { object, links, side, options } = input;
7524
+ const withCopy = insertCanvasObject(sfl, copyOf2(object, side, options));
7525
+ return insertLink(withCopy, linkToCopy(object, links, side, options));
7526
+ }
7527
+
7528
+ // src/runtime/interaction/sflPatch/changes/quickDuplicateChange.ts
7529
+ function applyQuickDuplicateChange(sfl, event, options) {
7530
+ const state = chunkXY2GZUHC_cjs.sflToCanvasState(sfl);
7531
+ const object = state.canvasObjects.find((candidate) => candidate.id === event.owner.id);
7532
+ if (!object) {
7533
+ return sfl;
7534
+ }
7535
+ const { direction } = event;
7536
+ if (isIsometricDirection2(direction)) {
7537
+ return chunkXY2GZUHC_cjs.isIsometricObject(object) ? duplicateIsometricObject(sfl, object, direction, options) : sfl;
7538
+ }
7539
+ return chunkXY2GZUHC_cjs.isIsometricObject(object) ? sfl : duplicateShape(sfl, { object, links: state.links, side: direction, options });
7540
+ }
7541
+
7291
7542
  // src/runtime/interaction/sflPatch/changes/resizeChange.ts
7292
7543
  function applyResizeChange(sfl, event) {
7293
- const state = chunkCXL254BT_cjs.sflToCanvasState(sfl);
7544
+ const state = chunkXY2GZUHC_cjs.sflToCanvasState(sfl);
7294
7545
  const canvasObject = state.canvasObjects.find((candidate) => candidate.id === event.owner.id);
7295
7546
  const parent = canvasObject?.parentFrameId ? state.canvasObjects.find((candidate) => candidate.id === canvasObject.parentFrameId) : void 0;
7296
7547
  const originX = parent?.x ?? 0;
@@ -7412,89 +7663,6 @@ function applyTextChange(sfl, event) {
7412
7663
  return lines.join("\n");
7413
7664
  }
7414
7665
 
7415
- // src/runtime/interaction/sflPatch/connectionPatch/blockText.ts
7416
- function buildConnectionBlock(options, baseIndent) {
7417
- const bodyIndent = `${baseIndent} `;
7418
- const block = [
7419
- `${baseIndent}Connection ${options.id} {`,
7420
- `${bodyIndent}from: ${options.fromId}`,
7421
- `${bodyIndent}to: ${options.toId}`,
7422
- `${bodyIndent}fromFace: "${options.fromFace}"`,
7423
- `${bodyIndent}toFace: "${options.toFace}"`
7424
- ];
7425
- if (options.body) {
7426
- block.push(...indentBlock(options.body, bodyIndent));
7427
- }
7428
- block.push(`${baseIndent}}`);
7429
- return block;
7430
- }
7431
-
7432
- // src/runtime/interaction/sflPatch/connectionPatch/insertionTarget.ts
7433
- function resolveConnectionInsertionTarget(sfl, lines, options) {
7434
- if (!VALID_IDENT.test(options.id) || nameExists(lines, options.id)) {
7435
- return null;
7436
- }
7437
- const canvasObjects = chunkCXL254BT_cjs.sflToCanvasState(sfl).canvasObjects;
7438
- const hasSource = canvasObjects.some((canvasObject) => canvasObject.id === options.fromId);
7439
- const hasTarget = canvasObjects.some((canvasObject) => canvasObject.id === options.toId);
7440
- if (!hasSource || !hasTarget) {
7441
- return null;
7442
- }
7443
- return findFirstBlockOfKind(lines, "Model");
7444
- }
7445
-
7446
- // src/runtime/interaction/sflPatch/connectionPatch/insert.ts
7447
- function insertConnection(sfl, options) {
7448
- const lines = sfl.split("\n");
7449
- const modelRange = resolveConnectionInsertionTarget(sfl, lines, options);
7450
- if (!modelRange) {
7451
- return sfl;
7452
- }
7453
- insertBlockLines(lines, modelRange, (baseIndent) => buildConnectionBlock(options, baseIndent));
7454
- return lines.join("\n");
7455
- }
7456
-
7457
- // src/runtime/interaction/sflPatch/linkPatch/blockText.ts
7458
- function buildLinkBlock(options, baseIndent) {
7459
- const bodyIndent = `${baseIndent} `;
7460
- const from = formatLinkEndpoint({ id: options.fromId, side: options.fromSide, fraction: options.fromFraction });
7461
- const to = formatLinkEndpoint({ id: options.toId, side: options.toSide, fraction: options.toFraction });
7462
- const block = [`${baseIndent}Link ${options.id} {`, `${bodyIndent}from: ${from}`, `${bodyIndent}to: ${to}`];
7463
- if (options.text !== void 0) {
7464
- block.push(`${bodyIndent}text: "${escapeSflString(options.text)}"`);
7465
- }
7466
- if (options.body) {
7467
- block.push(...indentBlock(options.body, bodyIndent));
7468
- }
7469
- block.push(`${baseIndent}}`);
7470
- return block;
7471
- }
7472
-
7473
- // src/runtime/interaction/sflPatch/linkPatch/insertionTarget.ts
7474
- function resolveLinkInsertionTarget(sfl, lines, options) {
7475
- if (!VALID_IDENT.test(options.id) || nameExists(lines, options.id)) {
7476
- return null;
7477
- }
7478
- const canvasObjects = chunkCXL254BT_cjs.sflToCanvasState(sfl).canvasObjects;
7479
- const hasSource = canvasObjects.some((canvasObject) => canvasObject.id === options.fromId);
7480
- const hasTarget = canvasObjects.some((canvasObject) => canvasObject.id === options.toId);
7481
- if (!hasSource || !hasTarget) {
7482
- return null;
7483
- }
7484
- return findFirstBlockOfKind(lines, "Model");
7485
- }
7486
-
7487
- // src/runtime/interaction/sflPatch/linkPatch/insert.ts
7488
- function insertLink(sfl, options) {
7489
- const lines = sfl.split("\n");
7490
- const modelRange = resolveLinkInsertionTarget(sfl, lines, options);
7491
- if (!modelRange) {
7492
- return sfl;
7493
- }
7494
- insertBlockLines(lines, modelRange, (baseIndent) => buildLinkBlock(options, baseIndent));
7495
- return lines.join("\n");
7496
- }
7497
-
7498
7666
  // src/runtime/interaction/sflPatch/linkPatch/remove.ts
7499
7667
  function removeLink(sfl, id) {
7500
7668
  const lines = sfl.split("\n");
@@ -7565,6 +7733,7 @@ exports.applyLinkSegmentChange = applyLinkSegmentChange;
7565
7733
  exports.applyMoveChange = applyMoveChange;
7566
7734
  exports.applyPathPointChange = applyPathPointChange;
7567
7735
  exports.applyPropertyChange = applyPropertyChange;
7736
+ exports.applyQuickDuplicateChange = applyQuickDuplicateChange;
7568
7737
  exports.applyResizeChange = applyResizeChange;
7569
7738
  exports.applySankeyNodeMoveChange = applySankeyNodeMoveChange;
7570
7739
  exports.applySankeyNodeRenameChange = applySankeyNodeRenameChange;