@next-bricks/diagram 0.52.4 → 0.53.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 (101) hide show
  1. package/dist/bricks.json +3 -3
  2. package/dist/chunks/1045.8709c6b1.js +2 -0
  3. package/dist/chunks/1045.8709c6b1.js.map +1 -0
  4. package/dist/chunks/114.f896f1cd.js +2 -0
  5. package/dist/chunks/{114.3d3eef7e.js.map → 114.f896f1cd.js.map} +1 -1
  6. package/dist/chunks/{1940.95ef0888.js → 1940.8bf79e2e.js} +2 -2
  7. package/dist/chunks/{1940.95ef0888.js.map → 1940.8bf79e2e.js.map} +1 -1
  8. package/dist/chunks/{2277.61a03a59.js → 2277.f1be2d12.js} +2 -2
  9. package/dist/chunks/{2277.61a03a59.js.map → 2277.f1be2d12.js.map} +1 -1
  10. package/dist/chunks/{3171.d3ff4c5d.js → 3171.587855c6.js} +2 -2
  11. package/dist/chunks/{3171.d3ff4c5d.js.map → 3171.587855c6.js.map} +1 -1
  12. package/dist/chunks/{3233.27ce919d.js → 3233.2fa18575.js} +3 -3
  13. package/dist/chunks/{3233.27ce919d.js.map → 3233.2fa18575.js.map} +1 -1
  14. package/dist/chunks/3426.e3be3a32.js +2 -0
  15. package/dist/chunks/3426.e3be3a32.js.map +1 -0
  16. package/dist/chunks/3933.8706ce70.js +2 -0
  17. package/dist/chunks/{6314.24ffda20.js.map → 3933.8706ce70.js.map} +1 -1
  18. package/dist/chunks/{4658.8e526c62.js → 4658.edd08dfb.js} +2 -2
  19. package/dist/chunks/{4658.8e526c62.js.map → 4658.edd08dfb.js.map} +1 -1
  20. package/dist/chunks/{4837.631af414.js → 4837.faa6e35a.js} +2 -2
  21. package/dist/chunks/{7218.93522183.js.map → 4837.faa6e35a.js.map} +1 -1
  22. package/dist/chunks/{5443.e0be670a.js → 5443.c6bfe64e.js} +3 -3
  23. package/dist/chunks/{5443.e0be670a.js.map → 5443.c6bfe64e.js.map} +1 -1
  24. package/dist/chunks/{5552.c5a6e5a2.js → 5552.e14bec19.js} +2 -2
  25. package/dist/chunks/{5552.c5a6e5a2.js.map → 5552.e14bec19.js.map} +1 -1
  26. package/dist/chunks/5582.9e7b28a7.js +3 -0
  27. package/dist/chunks/5582.9e7b28a7.js.map +1 -0
  28. package/dist/chunks/6314.44bc553f.js +2 -0
  29. package/dist/chunks/{3933.9c28c17c.js.map → 6314.44bc553f.js.map} +1 -1
  30. package/dist/chunks/{7218.93522183.js → 7218.66f13c1c.js} +2 -2
  31. package/dist/chunks/{4837.631af414.js.map → 7218.66f13c1c.js.map} +1 -1
  32. package/dist/chunks/7733.a6b0e93e.js +2 -0
  33. package/dist/chunks/{7733.a3a4a9a1.js.map → 7733.a6b0e93e.js.map} +1 -1
  34. package/dist/chunks/{3119.ae803df5.js → 7745.17f40d57.js} +2 -2
  35. package/dist/chunks/{3119.ae803df5.js.map → 7745.17f40d57.js.map} +1 -1
  36. package/dist/chunks/8552.ce2a19f9.js +2 -0
  37. package/dist/chunks/8552.ce2a19f9.js.map +1 -0
  38. package/dist/chunks/{9559.85fd1ca7.js → 9559.4fa7ccb4.js} +2 -2
  39. package/dist/chunks/{9559.85fd1ca7.js.map → 9559.4fa7ccb4.js.map} +1 -1
  40. package/dist/chunks/9711.50ee8552.js +2 -0
  41. package/dist/chunks/9711.50ee8552.js.map +1 -0
  42. package/dist/chunks/editable-label.1b844769.js +3 -0
  43. package/dist/chunks/{editable-label.6b33860e.js.map → editable-label.1b844769.js.map} +1 -1
  44. package/dist/chunks/eo-diagram.66a5cc84.js +2 -0
  45. package/dist/chunks/{eo-diagram.5f3935a9.js.map → eo-diagram.66a5cc84.js.map} +1 -1
  46. package/dist/chunks/eo-display-canvas.581f9665.js +2 -0
  47. package/dist/chunks/eo-display-canvas.581f9665.js.map +1 -0
  48. package/dist/chunks/eo-draw-canvas.f0e6fadc.js +2 -0
  49. package/dist/chunks/eo-draw-canvas.f0e6fadc.js.map +1 -0
  50. package/dist/chunks/experimental-node.adb9fe17.js +2 -0
  51. package/dist/chunks/{experimental-node.713c8aaa.js.map → experimental-node.adb9fe17.js.map} +1 -1
  52. package/dist/chunks/main.020c8ae2.js +2 -0
  53. package/dist/chunks/{main.e2b08130.js.map → main.020c8ae2.js.map} +1 -1
  54. package/dist/examples.json +4 -4
  55. package/dist/index.b978e46b.js +2 -0
  56. package/dist/index.b978e46b.js.map +1 -0
  57. package/dist/manifest.json +132 -132
  58. package/dist/types.json +4234 -4207
  59. package/dist-types/diagram/interfaces.d.ts +6 -0
  60. package/dist-types/draw-canvas/CellComponent.d.ts +3 -2
  61. package/dist-types/draw-canvas/EdgeComponent.d.ts +3 -4
  62. package/dist-types/draw-canvas/EditingLineComponent.d.ts +4 -2
  63. package/dist-types/draw-canvas/HoverStateContext.d.ts +3 -7
  64. package/dist-types/draw-canvas/LineConnectorComponent.d.ts +3 -2
  65. package/dist-types/draw-canvas/LineEditorComponent.d.ts +3 -1
  66. package/dist-types/draw-canvas/LineLabelComponent.d.ts +4 -3
  67. package/dist-types/draw-canvas/interfaces.d.ts +16 -9
  68. package/dist-types/draw-canvas/processors/getLabelMaskAndOffset.d.ts +3 -0
  69. package/dist-types/draw-canvas/processors/getLabelMaskAndOffset.spec.d.ts +1 -0
  70. package/dist-types/shared/canvas/processors/getEditingLinePoints.d.ts +3 -3
  71. package/dist-types/shared/canvas/useEditableLineMap.d.ts +5 -0
  72. package/docs/eo-draw-canvas.md +8 -1
  73. package/package.json +3 -3
  74. package/dist/chunks/1045.63c485a7.js +0 -2
  75. package/dist/chunks/1045.63c485a7.js.map +0 -1
  76. package/dist/chunks/114.3d3eef7e.js +0 -2
  77. package/dist/chunks/2867.5eea22a8.js +0 -2
  78. package/dist/chunks/2867.5eea22a8.js.map +0 -1
  79. package/dist/chunks/3426.ae8ab421.js +0 -2
  80. package/dist/chunks/3426.ae8ab421.js.map +0 -1
  81. package/dist/chunks/3933.9c28c17c.js +0 -2
  82. package/dist/chunks/4411.bb9af195.js +0 -3
  83. package/dist/chunks/4411.bb9af195.js.map +0 -1
  84. package/dist/chunks/6314.24ffda20.js +0 -2
  85. package/dist/chunks/7733.a3a4a9a1.js +0 -2
  86. package/dist/chunks/9711.67969033.js +0 -2
  87. package/dist/chunks/9711.67969033.js.map +0 -1
  88. package/dist/chunks/editable-label.6b33860e.js +0 -3
  89. package/dist/chunks/eo-diagram.5f3935a9.js +0 -2
  90. package/dist/chunks/eo-display-canvas.91e68bf1.js +0 -2
  91. package/dist/chunks/eo-display-canvas.91e68bf1.js.map +0 -1
  92. package/dist/chunks/eo-draw-canvas.20c32002.js +0 -2
  93. package/dist/chunks/eo-draw-canvas.20c32002.js.map +0 -1
  94. package/dist/chunks/experimental-node.713c8aaa.js +0 -2
  95. package/dist/chunks/main.e2b08130.js +0 -2
  96. package/dist/index.26c829f6.js +0 -2
  97. package/dist/index.26c829f6.js.map +0 -1
  98. /package/dist/chunks/{3233.27ce919d.js.LICENSE.txt → 3233.2fa18575.js.LICENSE.txt} +0 -0
  99. /package/dist/chunks/{5443.e0be670a.js.LICENSE.txt → 5443.c6bfe64e.js.LICENSE.txt} +0 -0
  100. /package/dist/chunks/{4411.bb9af195.js.LICENSE.txt → 5582.9e7b28a7.js.LICENSE.txt} +0 -0
  101. /package/dist/chunks/{editable-label.6b33860e.js.LICENSE.txt → editable-label.1b844769.js.LICENSE.txt} +0 -0
@@ -136,11 +136,17 @@ export interface LineLabelConf {
136
136
  if?: string | boolean | null;
137
137
  useBrick: UseSingleBrickConf;
138
138
  placement?: LineLabelPlacement;
139
+ /**
140
+ * 当 placement 设置为 start 或 end 时,默认情况下,文本中心点与连线起点或终点重合。
141
+ * 设置 offset 表示文本中心点距离起点或终点在连线上的偏移量。
142
+ */
143
+ offset?: number;
139
144
  }
140
145
  export interface TextOptions {
141
146
  content: string;
142
147
  style?: CSSProperties;
143
148
  placement?: LineLabelPlacement;
149
+ offset?: number;
144
150
  }
145
151
  export type LineLabelPlacement = "center" | "start" | "end";
146
152
  export interface TransformLiteral {
@@ -1,4 +1,4 @@
1
- import type { ActiveTarget, Cell, CellContextMenuDetail, ComputedEdgeLineConf, DecoratorTextChangeDetail, EdgeCell, LayoutOptions, LayoutType, NodeBrickConf } from "./interfaces";
1
+ import type { ActiveTarget, Cell, CellContextMenuDetail, ComputedEdgeLineConf, DecoratorTextChangeDetail, EdgeCell, LayoutOptions, LayoutType, NodeBrickConf, EditableLine } from "./interfaces";
2
2
  import type { MoveCellPayload, ResizeCellPayload } from "./reducers/interfaces";
3
3
  import type { SizeTuple, TransformLiteral } from "../diagram/interfaces";
4
4
  export interface CellComponentProps {
@@ -11,6 +11,7 @@ export interface CellComponentProps {
11
11
  defaultNodeBricks?: NodeBrickConf[];
12
12
  transform: TransformLiteral;
13
13
  lineConfMap: WeakMap<EdgeCell, ComputedEdgeLineConf>;
14
+ editableLineMap: WeakMap<EdgeCell, EditableLine>;
14
15
  activeTarget: ActiveTarget | null | undefined;
15
16
  readOnly?: boolean;
16
17
  unrelatedCells: Cell[];
@@ -32,4 +33,4 @@ export interface CellComponentProps {
32
33
  onCellMouseEnter?(cell: Cell): void;
33
34
  onCellMouseLeave?(cell: Cell): void;
34
35
  }
35
- export declare function CellComponent({ layout, layoutOptions, cell, cells, degraded, degradedNodeLabel, defaultNodeBricks, lineConfMap, activeTarget, dragNodeToContainerActive, readOnly, transform, unrelatedCells, allowEdgeToArea, onCellsMoving, onCellsMoved, onCellResizing, onCellResized, onSwitchActiveTarget, onCellContextMenu, onCellClick, onDecoratorTextEditing, onDecoratorTextChange, onNodeBrickResize, onCellMouseEnter, onCellMouseLeave, }: CellComponentProps): JSX.Element | null;
36
+ export declare function CellComponent({ layout, layoutOptions, cell, cells, degraded, degradedNodeLabel, defaultNodeBricks, lineConfMap, editableLineMap, activeTarget, dragNodeToContainerActive, readOnly, transform, unrelatedCells, allowEdgeToArea, onCellsMoving, onCellsMoved, onCellResizing, onCellResized, onSwitchActiveTarget, onCellContextMenu, onCellClick, onDecoratorTextEditing, onDecoratorTextChange, onNodeBrickResize, onCellMouseEnter, onCellMouseLeave, }: CellComponentProps): JSX.Element | null;
@@ -1,10 +1,9 @@
1
- import type { ActiveTarget, Cell, ComputedEdgeLineConf, EdgeCell } from "./interfaces";
1
+ import type { ActiveTarget, ComputedEdgeLineConf, EdgeCell, EditableLine } from "./interfaces";
2
2
  export interface EdgeComponentProps {
3
3
  edge: EdgeCell;
4
- cells: Cell[];
5
4
  lineConfMap: WeakMap<EdgeCell, ComputedEdgeLineConf>;
6
- active?: boolean;
5
+ editableLineMap: WeakMap<EdgeCell, EditableLine>;
7
6
  readOnly?: boolean;
8
7
  onSwitchActiveTarget?(activeTarget: ActiveTarget | null): void;
9
8
  }
10
- export declare function EdgeComponent({ edge, cells, lineConfMap, active, readOnly, onSwitchActiveTarget, }: EdgeComponentProps): JSX.Element | null;
9
+ export declare function EdgeComponent({ edge, lineConfMap, editableLineMap, readOnly, onSwitchActiveTarget, }: EdgeComponentProps): JSX.Element | null;
@@ -1,7 +1,9 @@
1
- import type { ComputedLineConnecterConf } from "./interfaces";
1
+ import type { Cell, ComputedLineConnecterConf, EdgeCell, EditableLine } from "./interfaces";
2
2
  import type { TransformLiteral } from "../diagram/interfaces";
3
3
  export interface EditingLineComponentProps {
4
+ cells: Cell[];
5
+ editableLineMap: WeakMap<EdgeCell, EditableLine>;
4
6
  transform: TransformLiteral;
5
7
  options: ComputedLineConnecterConf;
6
8
  }
7
- export declare function EditingLineComponent({ transform, options, }: EditingLineComponentProps): JSX.Element;
9
+ export declare function EditingLineComponent({ cells, editableLineMap, transform, options, }: EditingLineComponentProps): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { DecoratorCell, EdgeView, EditableLineInfo, LineEditorState, NodeCell, SmartConnectLineState } from "./interfaces";
2
+ import type { DecoratorCell, EdgeCell, EdgeView, LineEditorState, NodeCell, SmartConnectLineState } from "./interfaces";
3
3
  import type { NodePosition } from "../diagram/interfaces";
4
4
  export interface HoverState {
5
5
  cell: NodeCell | DecoratorCell;
@@ -12,11 +12,9 @@ export declare const HoverStateContext: React.Context<{
12
12
  smartConnectLineState: SmartConnectLineState | null;
13
13
  unsetHoverStateTimeoutRef: React.MutableRefObject<number | null>;
14
14
  hoverState: HoverState | null;
15
- activeEditableLine: EditableLineInfo | null;
16
- activeEditableLineIsAvailable: boolean;
15
+ activeEditableEdge: EdgeCell | null;
17
16
  lineEditorState: LineEditorState | null;
18
17
  setLineEditorState: React.Dispatch<React.SetStateAction<LineEditorState | null>>;
19
- setActiveEditableLine: React.Dispatch<React.SetStateAction<EditableLineInfo | null>>;
20
18
  setHoverState: React.Dispatch<React.SetStateAction<HoverState | null>>;
21
19
  setSmartConnectLineState: React.Dispatch<React.SetStateAction<SmartConnectLineState | null>>;
22
20
  onConnect?: (source: NodeCell | DecoratorCell, target: NodeCell | DecoratorCell, exitPosition: NodePosition, entryPosition: NodePosition | undefined) => void;
@@ -27,11 +25,9 @@ export declare function useHoverStateContext(): {
27
25
  smartConnectLineState: SmartConnectLineState | null;
28
26
  unsetHoverStateTimeoutRef: React.MutableRefObject<number | null>;
29
27
  hoverState: HoverState | null;
30
- activeEditableLine: EditableLineInfo | null;
31
- activeEditableLineIsAvailable: boolean;
28
+ activeEditableEdge: EdgeCell | null;
32
29
  lineEditorState: LineEditorState | null;
33
30
  setLineEditorState: React.Dispatch<React.SetStateAction<LineEditorState | null>>;
34
- setActiveEditableLine: React.Dispatch<React.SetStateAction<EditableLineInfo | null>>;
35
31
  setHoverState: React.Dispatch<React.SetStateAction<HoverState | null>>;
36
32
  setSmartConnectLineState: React.Dispatch<React.SetStateAction<SmartConnectLineState | null>>;
37
33
  onConnect?: (source: NodeCell | DecoratorCell, target: NodeCell | DecoratorCell, exitPosition: NodePosition, entryPosition: NodePosition | undefined) => void;
@@ -1,7 +1,8 @@
1
- import type { ActiveTarget } from "./interfaces";
1
+ import type { ActiveTarget, EdgeCell, EditableLine } from "./interfaces";
2
2
  export interface LineConnectorComponentProps {
3
3
  activeTarget: ActiveTarget | null;
4
+ editableLineMap: WeakMap<EdgeCell, EditableLine>;
4
5
  scale: number;
5
6
  disabled?: boolean;
6
7
  }
7
- export declare function LineConnectorComponent({ activeTarget, scale, disabled, }: LineConnectorComponentProps): JSX.Element | null;
8
+ export declare function LineConnectorComponent({ activeTarget, editableLineMap, scale, disabled, }: LineConnectorComponentProps): JSX.Element | null;
@@ -1,4 +1,6 @@
1
+ import type { EdgeCell, EditableLine } from "./interfaces";
1
2
  export interface LineEditorComponentProps {
2
3
  scale: number;
4
+ editableLineMap: WeakMap<EdgeCell, EditableLine>;
3
5
  }
4
- export declare function LineEditorComponent({ scale, }: LineEditorComponentProps): JSX.Element | null;
6
+ export declare function LineEditorComponent({ scale, editableLineMap, }: LineEditorComponentProps): JSX.Element | null;
@@ -1,11 +1,12 @@
1
1
  import type { LineLabelConf, PositionTuple, TextOptions } from "../diagram/interfaces";
2
- import type { EdgeCell } from "./interfaces";
2
+ import type { EdgeCell, PositionAndAngle } from "./interfaces";
3
3
  export interface LineLabelComponentProps {
4
4
  edge: EdgeCell;
5
- position?: PositionTuple | null;
5
+ position?: PositionAndAngle | null;
6
+ offset?: PositionTuple | null;
6
7
  label?: LineLabelConf;
7
8
  text?: TextOptions;
8
9
  onRendered?: (element: HTMLElement | null) => void;
9
10
  onClick?: () => void;
10
11
  }
11
- export declare function LineLabelComponent({ edge, position, label, text, onRendered, onClick, }: LineLabelComponentProps): JSX.Element | null;
12
+ export declare function LineLabelComponent({ edge, position, offset, label, text, onRendered, onClick, }: LineLabelComponentProps): JSX.Element | null;
@@ -262,20 +262,13 @@ export type ForceLink = SimulationLinkDatum<ForceNode>;
262
262
  export interface NodeConnectPoint extends NodePosition {
263
263
  d: Direction[];
264
264
  }
265
- export interface EditableLineInfo {
266
- edge: EdgeCell;
267
- parallelGap: number;
268
- source: NodeCell | DecoratorCell;
269
- target: NodeCell | DecoratorCell;
270
- linePoints: NodePosition[];
271
- }
272
265
  export type LineEditorState = LineEditorStateOfEndPoint | LineEditorStateOfControl;
273
- export interface LineEditorStateOfEndPoint extends EditableLineInfo {
266
+ export interface LineEditorStateOfEndPoint {
274
267
  type: "exit" | "entry";
275
268
  offset: PositionTuple;
276
269
  from: PositionTuple;
277
270
  }
278
- export interface LineEditorStateOfControl extends EditableLineInfo {
271
+ export interface LineEditorStateOfControl {
279
272
  type: "control";
280
273
  offset: PositionTuple;
281
274
  from: PositionTuple;
@@ -301,3 +294,17 @@ export interface ControlPoint extends NodePosition {
301
294
  direction: BiDirection;
302
295
  index: number;
303
296
  }
297
+ export interface EditableLine {
298
+ edge: EdgeCell;
299
+ points: NodePosition[];
300
+ source: NodeBrickCell | DecoratorCell;
301
+ target: NodeBrickCell | DecoratorCell;
302
+ parallelGap: number;
303
+ }
304
+ export type PositionAndAngle = [
305
+ x: number,
306
+ y: number,
307
+ direction: Direction | "center",
308
+ angle: number,
309
+ offset: number
310
+ ];
@@ -0,0 +1,3 @@
1
+ import type { PositionTuple, SimpleRect, SizeTuple } from "../../diagram/interfaces";
2
+ import type { PositionAndAngle } from "../interfaces";
3
+ export declare function getLabelMaskAndOffset(labelPosition: PositionAndAngle | null, labelSize: SizeTuple | null): [labelMask: SimpleRect | null, labelOffset: PositionTuple | null];
@@ -1,5 +1,5 @@
1
1
  import type { NodePosition, PositionTuple } from "../../../diagram/interfaces";
2
2
  import type { HoverState } from "../../../draw-canvas/HoverStateContext";
3
- import type { LineEditorState, LineEditorStateOfControl } from "../../../draw-canvas/interfaces";
4
- export declare function getEditingLinePoints(lineEditorState: LineEditorState | null, connectLineTo: PositionTuple | null, hoverState: HoverState | null): NodePosition[] | null;
5
- export declare function getNewLineVertices(lineEditorState: LineEditorStateOfControl, connectLineTo: PositionTuple): NodePosition[];
3
+ import type { EdgeCell, LineEditorState, LineEditorStateOfControl, EditableLine } from "../../../draw-canvas/interfaces";
4
+ export declare function getEditingLinePoints(activeEditableEdge: EdgeCell | null, lineEditorState: LineEditorState | null, editableLineMap: WeakMap<EdgeCell, EditableLine>, connectLineTo: PositionTuple | null, hoverState: HoverState | null): NodePosition[] | null;
5
+ export declare function getNewLineVertices(activeEditableEdge: EdgeCell, lineEditorState: LineEditorStateOfControl, editableLineMap: WeakMap<EdgeCell, EditableLine>, connectLineTo: PositionTuple): NodePosition[];
@@ -0,0 +1,5 @@
1
+ import type { Cell, ComputedEdgeLineConf, EdgeCell, EditableLine } from "../../draw-canvas/interfaces";
2
+ export declare function useEditableLineMap({ cells, lineConfMap, }: {
3
+ cells: Cell[];
4
+ lineConfMap: WeakMap<EdgeCell, ComputedEdgeLineConf>;
5
+ }): WeakMap<import("../../draw-canvas/interfaces").BaseEdgeCell, EditableLine>;
@@ -486,7 +486,11 @@
486
486
  type: "edge",
487
487
  source: "X",
488
488
  target: "Y",
489
- description: "X->Y"
489
+ description: "X->Y",
490
+ placement: "end",
491
+ view: {
492
+ type: "polyline"
493
+ }
490
494
  },
491
495
  {
492
496
  type: "edge",
@@ -573,6 +577,8 @@
573
577
  defaultEdgeLines:
574
578
  - callLabelOnDoubleClick: enableEditing
575
579
  label:
580
+ placement: <% DATA.edge.placement %>
581
+ offset: 10
576
582
  useBrick:
577
583
  brick: diagram.editable-label
578
584
  properties:
@@ -694,6 +700,7 @@
694
700
  value: polyline
695
701
  options:
696
702
  - polyline
703
+ - curve
697
704
  - straight
698
705
  events:
699
706
  change:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/diagram",
3
- "version": "0.52.4",
3
+ "version": "0.53.0",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/diagram",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "postpublish": "mv package.json.bak package.json"
36
36
  },
37
37
  "devDependencies": {
38
- "@next-core/build-next-bricks": "^1.23.6",
38
+ "@next-core/build-next-bricks": "^1.23.7",
39
39
  "@next-core/test-next": "^1.1.7"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@next-bricks/basic": "*"
43
43
  },
44
- "gitHead": "f4947f553074efa2ce32e64dee08ee36f505ddf7"
44
+ "gitHead": "ebb8ee2660f7d9417c2a96d40a216a576d772842"
45
45
  }
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[1045,3426],{2559:(t,e,n)=>{function r(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}n.d(e,{A:()=>r})},2016:(t,e,n)=>{function r(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(e,{A:()=>r})},829:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(2559);function i(t,e){return t.get((0,r.A)(t,e))}},918:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(2016);function i(t,e,n){(0,r.A)(t,e),e.set(t,n)}},6121:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(2559);function i(t,e,n){return t.set((0,r.A)(t,e),n),n}},4586:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(1369);function i(t,e,n){return(e=(0,r.A)(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},1369:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(7545);function i(t){var e=function(t,e){if("object"!=(0,r.A)(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=(0,r.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==(0,r.A)(e)?e:e+""}},7545:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{A:()=>r})},1045:(t,e,n)=>{n.r(e),n.d(e,{NextElement:()=>y,createDecorators:()=>a,supportsAdoptingStyleSheets:()=>_});const r=Symbol.for("attributeHasBeenSet"),i=Symbol.for("markAttributeHasBeenSet"),o=Symbol.for("stopAttributeChangedCallback"),s={attribute:!0,type:String,converter:{toAttribute:(t,e)=>e===Boolean?t?"":null:t,fromAttribute(t,e){switch(e){case Boolean:return null!==t&&"false"!==t;case Number:return null===t?null:Number(t)}return t}},render:!0,hasChanged:(t,e)=>e!==t&&(e==e||t==t)};function a(){const t=new Map,e=new Set,n=new Set,a=new Set;return{defineElement:function(r){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(o,s)=>{let{kind:d,name:c,addInitializer:h}=s;h((function(){const s=Object.getPrototypeOf(this);if(u(this,"observedAttributes",l(s.observedAttributes??[],t.keys())),u(this,"__attributeReflections",new Map([...s.__attributeReflections??[],...t])),u(this,"styleTexts",i.styleTexts),u(this,"shadowOptions",!1!==i.shadowOptions?{mode:"open",...i.shadowOptions}:null),u(this,"__tagName",r),u(this,"_dev_only_definedProperties",l(s._dev_only_definedProperties??[],e)),u(this,"_dev_only_definedMethods",l(s._dev_only_definedMethods??[],n)),u(this,"_dev_only_definedEvents",l(s._dev_only_definedEvents??[],a)),customElements.define(r,this),Array.isArray(i.alias))for(const t of i.alias){const e=class extends o{};u(e,"__tagName",t),customElements.define(t,e)}}))}},property:function(n){return function(a,u){let{get:l,set:d}=a,{kind:c,name:h,static:f,private:b}=u;e.add(h);const p=Object.assign({},s,n),m=function(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}(h,p);return void 0!==m&&t.set(m,{...p,property:h}),{get(){return void 0!==m&&this[r](m)?p.converter.fromAttribute(this.getAttribute(m),p.type):l.call(this)},set(t){const e=l.call(this);if(d.call(this,t),p.hasChanged(t,e)){if(void 0!==m){const e=p.converter.toAttribute(t,p.type);this[o](!0),null==e?this.removeAttribute(m):this.setAttribute(m,e),this[i](m),this[o](!1)}p.render&&this._requestRender()}},init(t){if(void 0!==m&&p.hasChanged(t,void 0)){const e=p.converter.toAttribute(t,p.type);null!=e&&requestAnimationFrame((()=>{this[r](m)||(this[o](!0),this.setAttribute(m,e),this[o](!1))}))}return t}}}},method:function(t){return function(e,r){let{kind:i,name:o,static:s,private:a,addInitializer:u}=r;null!=t&&t.bound&&u((function(){this[o]=this[o].bind(this)})),n.add(o)}},event:function(t){return function(e,n){let{get:r}=e,{kind:i,name:o,static:s,private:u}=n;const{type:l,...d}=t;return a.add(l),{get(){return r.call(this)},set(){throw new Error("Decorated events are readonly")},init(t){return Object.freeze({emit:t=>this.dispatchEvent(new CustomEvent(l,{...d,detail:t}))})}}}}}}function u(t,e,n){Object.defineProperty(t,e,{get:()=>n,configurable:!0})}function l(t,e){const n=new Set(t);for(const t of e)n.add(t);return[...n]}new Set(["prefix"]);var d=n(918),c=n(4586),h=n(829),f=n(6121),b=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap;class y extends HTMLElement{constructor(){super(...arguments),(0,d.A)(this,b,!1),(0,d.A)(this,p,!1),(0,d.A)(this,m,!1),(0,d.A)(this,v,new Set)}_markConnectedCallbackCalled(){(0,f.A)(p,this,!0)}connectedCallback(){this._markConnectedCallbackCalled(),this._render()}[r](t){return(0,h.A)(v,this).has(t)}[i](t){(0,h.A)(v,this).add(t)}[o](t){(0,f.A)(m,this,t)}attributeChangedCallback(t,e,n){if((0,h.A)(v,this).add(t),!(0,h.A)(m,this)&&e!==n){const e=this.constructor.__attributeReflections.get(t),r=e.converter.fromAttribute(n,e.type);this[e.property]=r}}_requestRender(){this.isConnected&&(0,h.A)(p,this)&&!(0,h.A)(b,this)&&((0,f.A)(b,this,!0),Promise.resolve().then((()=>{(0,f.A)(b,this,!1),this._render()})))}}let A;function _(){return void 0===A&&(A=!!(window.ShadowRoot&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype)),A}(0,c.A)(y,"styleTexts",void 0),(0,c.A)(y,"shadowOptions",void 0),(0,c.A)(y,"__attributeReflections",void 0),(0,c.A)(y,"__tagName",void 0)}}]);
2
- //# sourceMappingURL=1045.63c485a7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/1045.63c485a7.js","mappings":"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","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/checkPrivateRedeclaration.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldInitSpec.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet2.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack:///../../node_modules/@babel/runtime/helpers/esm/typeof.js","webpack:///../../node_modules/@next-core/element/dist/esm/internal/symbols.js","webpack:///../../node_modules/@next-core/element/dist/esm/createDecorators.js","webpack:///../../node_modules/@next-core/element/dist/esm/NextElement.js","webpack:///../../node_modules/@next-core/element/dist/esm/supportsAdoptingStyleSheets.js"],"sourcesContent":["export default function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}","export default function _checkPrivateRedeclaration(obj, privateCollection) {\n if (privateCollection.has(obj)) {\n throw new TypeError(\"Cannot initialize the same private elements twice on an object\");\n }\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}","import checkPrivateRedeclaration from \"./checkPrivateRedeclaration.js\";\nexport default function _classPrivateFieldInitSpec(obj, privateMap, value) {\n checkPrivateRedeclaration(obj, privateMap);\n privateMap.set(obj, value);\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldSet2(s, a, r) {\n return s.set(assertClassBrand(s, a), r), r;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","export const symbolOfAttributeHasBeenSet = Symbol.for(\"attributeHasBeenSet\");\nexport const symbolOfMarkAttributeHasBeenSet = Symbol.for(\"markAttributeHasBeenSet\");\nexport const symbolOfStopAttributeChangedCallback = Symbol.for(\"stopAttributeChangedCallback\");\n//# sourceMappingURL=symbols.js.map","import { symbolOfAttributeHasBeenSet, symbolOfMarkAttributeHasBeenSet, symbolOfStopAttributeChangedCallback } from \"./internal/symbols.js\";\nconst defaultConverter = {\n toAttribute(value, type) {\n switch (type) {\n case Boolean:\n return value ? \"\" : null;\n }\n return value;\n },\n fromAttribute(value, type) {\n switch (type) {\n case Boolean:\n return value !== null && value !== \"false\";\n case Number:\n return value === null ? null : Number(value);\n }\n return value;\n }\n};\n\n/**\n * Change function that returns true if `value` is different from `oldValue`.\n * This method is used as the default for a property's `hasChanged` function.\n */\nconst notEqual = (value, old) => {\n // This ensures (old==NaN, value==NaN) always returns false\n return old !== value && (old === old || value === value);\n};\nconst defaultPropertyDeclaration = {\n attribute: true,\n type: String,\n converter: defaultConverter,\n // reflect: true,\n render: true,\n hasChanged: notEqual\n};\n\n// Note: `prefix` is a native prop on Element, but it's only used in XML documents.\nconst allowedNativeProps = new Set([\"prefix\"]);\nexport function createDecorators() {\n const attributeReflections = new Map();\n const definedProperties = new Set();\n const definedMethods = new Set();\n const definedEvents = new Set();\n function defineElement(name) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return (value, _ref) => {\n let {\n kind,\n name: className,\n addInitializer\n } = _ref;\n // istanbul ignore next\n if (process.env.NODE_ENV === \"development\" && kind !== \"class\") {\n throw new Error(`Invalid usage of \\`@defineElement()\\` on a ${kind}: \"${className}\"`);\n }\n addInitializer(function () {\n const superClass = Object.getPrototypeOf(this);\n const mergedAttributes = mergeIterables(superClass.observedAttributes ?? [], attributeReflections.keys());\n defineReadonlyProperty(this, \"observedAttributes\", mergedAttributes);\n const mergedAttributeReflections = new Map([...(superClass.__attributeReflections ?? []), ...attributeReflections]);\n defineReadonlyProperty(this, \"__attributeReflections\", mergedAttributeReflections);\n defineReadonlyProperty(this, \"styleTexts\", options.styleTexts);\n defineReadonlyProperty(this, \"shadowOptions\", options.shadowOptions !== false ? {\n mode: \"open\",\n ...options.shadowOptions\n } : null);\n defineReadonlyProperty(this, \"__tagName\", name);\n const mergedProperties = mergeIterables(superClass._dev_only_definedProperties ?? [], definedProperties);\n defineReadonlyProperty(this, \"_dev_only_definedProperties\", mergedProperties);\n const mergedMethods = mergeIterables(superClass._dev_only_definedMethods ?? [], definedMethods);\n defineReadonlyProperty(this, \"_dev_only_definedMethods\", mergedMethods);\n const mergedEvents = mergeIterables(superClass._dev_only_definedEvents ?? [], definedEvents);\n defineReadonlyProperty(this, \"_dev_only_definedEvents\", mergedEvents);\n customElements.define(name, this);\n if (Array.isArray(options.alias)) {\n for (const alias of options.alias) {\n // Use a parenthesized expression to make the class has no name.\n const Alias = (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n 0, class extends value {});\n defineReadonlyProperty(Alias, \"__tagName\", alias);\n customElements.define(alias, Alias);\n }\n }\n });\n };\n }\n function property(options) {\n return function (_ref2, _ref3) {\n let {\n get,\n set\n } = _ref2;\n let {\n kind,\n name,\n static: isStatic,\n private: isPrivate\n } = _ref3;\n // istanbul ignore next\n if (process.env.NODE_ENV !== \"production\") {\n if (kind !== \"accessor\") {\n throw new Error(`Invalid usage of \\`@property()\\` on a ${kind}: \"${String(name)}\"`);\n }\n if (typeof name !== \"string\") {\n throw new Error(`Invalid usage of \\`@property()\\` on a ${kind} of ${typeof name}`);\n }\n if (isStatic) {\n throw new Error(`Invalid usage of \\`@property()\\` on a static ${kind}: \"${name}\"`);\n }\n if (isPrivate) {\n throw new Error(`Invalid usage of \\`@property()\\` on a private ${kind}: \"${name}\"`);\n }\n if (name in HTMLElement.prototype && !allowedNativeProps.has(name)) {\n const message = `\"${name}\" is a native HTMLElement property, and is deprecated to be used as a brick property.`;\n throw new Error(message);\n }\n }\n definedProperties.add(name);\n const _options = Object.assign({}, defaultPropertyDeclaration, options);\n const attrName = attributeNameForProperty(name, _options);\n if (attrName !== undefined) {\n attributeReflections.set(attrName, {\n ..._options,\n property: name\n });\n }\n return {\n get() {\n // If the attribute has been set (not by initialization), returns the\n // value converted by the attribute. Otherwise returns the prop value.\n // This works as a type conversion when reading a prop value.\n if (attrName !== undefined && this[symbolOfAttributeHasBeenSet](attrName)) {\n return _options.converter.fromAttribute(this.getAttribute(attrName), _options.type);\n }\n return get.call(this);\n },\n set(value) {\n const oldValue = get.call(this);\n set.call(this, value);\n if (_options.hasChanged(value, oldValue)) {\n if (attrName !== undefined) {\n const attrValue = _options.converter.toAttribute(value, _options.type);\n this[symbolOfStopAttributeChangedCallback](true);\n if (attrValue == null) {\n this.removeAttribute(attrName);\n } else {\n this.setAttribute(attrName, attrValue);\n }\n this[symbolOfMarkAttributeHasBeenSet](attrName);\n this[symbolOfStopAttributeChangedCallback](false);\n }\n if (_options.render) {\n this._requestRender();\n }\n }\n },\n init(initialValue) {\n if (attrName !== undefined && _options.hasChanged(initialValue, undefined)) {\n const attrValue = _options.converter.toAttribute(initialValue, _options.type);\n if (attrValue != null) {\n // No attributes should be created during constructing custom elements.\n // This is true even if the work is done inside a constructor-initiated microtask.\n // https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-conformance\n requestAnimationFrame(() => {\n if (!this[symbolOfAttributeHasBeenSet](attrName)) {\n this[symbolOfStopAttributeChangedCallback](true);\n this.setAttribute(attrName, attrValue);\n this[symbolOfStopAttributeChangedCallback](false);\n }\n });\n }\n }\n return initialValue;\n }\n };\n };\n }\n function method(options) {\n return function (_value, _ref4) {\n let {\n kind,\n name,\n static: isStatic,\n private: isPrivate,\n addInitializer\n } = _ref4;\n // istanbul ignore next\n if (process.env.NODE_ENV !== \"production\") {\n if (kind !== \"method\") {\n throw new Error(`Invalid usage of \\`@method()\\` on a ${kind}: \"${String(name)}\"`);\n }\n if (typeof name !== \"string\") {\n throw new Error(`Invalid usage of \\`@method()\\` on a ${kind} of ${typeof name}`);\n }\n if (isStatic) {\n throw new Error(`Invalid usage of \\`@method()\\` on a static ${kind}: \"${name}\"`);\n }\n if (isPrivate) {\n throw new Error(`Invalid usage of \\`@method()\\` on a private ${kind}: \"${name}\"`);\n }\n if (name in HTMLElement.prototype && !allowedNativeProps.has(name)) {\n const message = `\"${name}\" is a native HTMLElement property, and is deprecated to be used as a brick method.`;\n throw new Error(message);\n }\n }\n if (options !== null && options !== void 0 && options.bound) {\n addInitializer(function () {\n this[name] = this[name].bind(this);\n });\n }\n definedMethods.add(name);\n };\n }\n function event(options) {\n return function (_ref5, _ref6) {\n let {\n get\n } = _ref5;\n let {\n kind,\n name,\n static: isStatic,\n private: isPrivate\n } = _ref6;\n // istanbul ignore next\n if (process.env.NODE_ENV !== \"production\") {\n if (kind !== \"accessor\") {\n throw new Error(`Invalid usage of \\`@event()\\` on a ${kind}: \"${String(name)}\"`);\n }\n if (!isPrivate) {\n throw new Error(`Invalid usage of \\`@event()\\` on a non-private ${kind}: \"${String(name)}\"`);\n }\n if (isStatic) {\n throw new Error(`Invalid usage of \\`@event()\\` on a static ${kind}: \"${String(name)}\"`);\n }\n }\n const {\n type,\n ...eventInit\n } = options;\n definedEvents.add(type);\n return {\n get() {\n return get.call(this);\n },\n set() {\n throw new Error(\"Decorated events are readonly\");\n },\n init(initialValue) {\n // istanbul ignore next\n if (process.env.NODE_ENV === \"development\" && initialValue !== undefined) {\n throw new Error(`Do not set an initial value for a decorated event: \"${String(name)}\"`);\n }\n return Object.freeze({\n emit: detail => this.dispatchEvent(new CustomEvent(type, {\n ...eventInit,\n detail\n }))\n });\n }\n };\n };\n }\n return {\n defineElement,\n property,\n method,\n event\n };\n}\nfunction defineReadonlyProperty(target, propName, propValue) {\n Object.defineProperty(target, propName, {\n get() {\n return propValue;\n },\n configurable: true\n });\n}\nfunction mergeIterables(list1, list2) {\n const newList = new Set(list1);\n for (const item of list2) {\n newList.add(item);\n }\n return [...newList];\n}\nfunction attributeNameForProperty(name, options) {\n const attribute = options.attribute;\n return attribute === false ? undefined : typeof attribute === \"string\" ? attribute : name.replace(/[A-Z]/g, char => `-${char.toLowerCase()}`);\n}\n//# sourceMappingURL=createDecorators.js.map","import _classPrivateFieldInitSpec from \"@babel/runtime/helpers/classPrivateFieldInitSpec\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _classPrivateFieldGet from \"@babel/runtime/helpers/classPrivateFieldGet2\";\nimport _classPrivateFieldSet from \"@babel/runtime/helpers/classPrivateFieldSet2\";\nimport { symbolOfAttributeHasBeenSet, symbolOfMarkAttributeHasBeenSet, symbolOfStopAttributeChangedCallback } from \"./internal/symbols.js\";\nvar _hasRequestedRender = /*#__PURE__*/new WeakMap();\nvar _connectedCallbackCalled = /*#__PURE__*/new WeakMap();\nvar _attributeChangedCallbackStopped = /*#__PURE__*/new WeakMap();\nvar _attributesBeenSet = /*#__PURE__*/new WeakMap();\nexport class NextElement extends HTMLElement {\n constructor() {\n super(...arguments);\n _classPrivateFieldInitSpec(this, _hasRequestedRender, false);\n _classPrivateFieldInitSpec(this, _connectedCallbackCalled, false);\n _classPrivateFieldInitSpec(this, _attributeChangedCallbackStopped, false);\n _classPrivateFieldInitSpec(this, _attributesBeenSet, new Set());\n }\n /**\n * When render a custom element as parsed DOM, it is already connected in the\n * first place. The attributes are set while isConnected is true, which will\n * trigger a render request, and then before the next micro-task, the\n * `connectedCallback` will be called, which will trigger an immediate render.\n * Thus we would see two calls of render. So we manually set a mark of whether\n * the `connectedCallback` is actually get called, to prevent a trigger of\n * render request during attributes initialization before `connectedCallback`.\n */\n _markConnectedCallbackCalled() {\n _classPrivateFieldSet(_connectedCallbackCalled, this, true);\n }\n connectedCallback() {\n this._markConnectedCallbackCalled();\n this._render();\n }\n [symbolOfAttributeHasBeenSet](name) {\n return _classPrivateFieldGet(_attributesBeenSet, this).has(name);\n }\n [symbolOfMarkAttributeHasBeenSet](name) {\n _classPrivateFieldGet(_attributesBeenSet, this).add(name);\n }\n\n /** Whether to process attributeChangedCallback. */\n [symbolOfStopAttributeChangedCallback](value) {\n _classPrivateFieldSet(_attributeChangedCallbackStopped, this, value);\n }\n\n /** @internal */\n attributeChangedCallback(name, old, value) {\n _classPrivateFieldGet(_attributesBeenSet, this).add(name);\n if (!_classPrivateFieldGet(_attributeChangedCallbackStopped, this) && old !== value) {\n const attrRef = this.constructor.__attributeReflections.get(name);\n assertAttributeIsReflected(attrRef, name);\n const propValue = attrRef.converter.fromAttribute(value, attrRef.type);\n this[attrRef.property] = propValue;\n }\n }\n\n /**\n * Request a render in the next micro-task. This ensures multiple properties\n * or attributes will trigger a render once in a batch.\n */\n _requestRender() {\n // If the element is not connected,\n // let `connectedCallback()` do the job of calling _render.\n if (this.isConnected && _classPrivateFieldGet(_connectedCallbackCalled, this) && !_classPrivateFieldGet(_hasRequestedRender, this)) {\n _classPrivateFieldSet(_hasRequestedRender, this, true);\n Promise.resolve().then(() => {\n _classPrivateFieldSet(_hasRequestedRender, this, false);\n this._render();\n });\n }\n }\n}\n_defineProperty(NextElement, \"styleTexts\", void 0);\n_defineProperty(NextElement, \"shadowOptions\", void 0);\n_defineProperty(NextElement, \"__attributeReflections\", void 0);\n_defineProperty(NextElement, \"__tagName\", void 0);\nfunction assertAttributeIsReflected(attrRef, name) {\n // istanbul ignore next\n if (process.env.NODE_ENV === \"development\" && !attrRef) {\n throw new Error(`Attribute [${name}] is not reflected`);\n }\n}\n//# sourceMappingURL=NextElement.js.map","let supports;\nexport function supportsAdoptingStyleSheets() {\n if (supports === undefined) {\n supports = !!(window.ShadowRoot &&\n // (window.ShadyCSS === undefined || window.ShadyCSS.nativeShadow) &&\n \"adoptedStyleSheets\" in Document.prototype && \"replace\" in CSSStyleSheet.prototype);\n }\n return supports;\n}\n//# sourceMappingURL=supportsAdoptingStyleSheets.js.map"],"names":["_assertClassBrand","e","t","n","has","arguments","length","TypeError","_checkPrivateRedeclaration","obj","privateCollection","_classPrivateFieldGet2","s","a","get","_classPrivateFieldInitSpec","privateMap","value","set","_classPrivateFieldSet2","r","_defineProperty","key","Object","defineProperty","enumerable","configurable","writable","toPropertyKey","i","Symbol","toPrimitive","call","String","_typeof","o","iterator","constructor","prototype","symbolOfAttributeHasBeenSet","for","symbolOfMarkAttributeHasBeenSet","symbolOfStopAttributeChangedCallback","defaultPropertyDeclaration","attribute","type","converter","toAttribute","Boolean","fromAttribute","Number","render","hasChanged","old","createDecorators","attributeReflections","Map","definedProperties","Set","definedMethods","definedEvents","defineElement","name","options","undefined","_ref","kind","className","addInitializer","superClass","getPrototypeOf","this","defineReadonlyProperty","mergeIterables","observedAttributes","keys","__attributeReflections","styleTexts","shadowOptions","mode","_dev_only_definedProperties","_dev_only_definedMethods","_dev_only_definedEvents","customElements","define","Array","isArray","alias","Alias","property","_ref2","_ref3","static","isStatic","private","isPrivate","add","_options","assign","attrName","replace","char","toLowerCase","attributeNameForProperty","getAttribute","oldValue","attrValue","removeAttribute","setAttribute","_requestRender","init","initialValue","requestAnimationFrame","method","_value","_ref4","bound","bind","event","_ref5","_ref6","eventInit","Error","freeze","emit","detail","dispatchEvent","CustomEvent","target","propName","propValue","list1","list2","newList","item","_hasRequestedRender","WeakMap","_connectedCallbackCalled","_attributeChangedCallbackStopped","_attributesBeenSet","NextElement","HTMLElement","super","_markConnectedCallbackCalled","connectedCallback","_render","attributeChangedCallback","attrRef","isConnected","Promise","resolve","then","supports","supportsAdoptingStyleSheets","window","ShadowRoot","Document","CSSStyleSheet"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[114,7733],{5873:(t,e,n)=>{var r=n(9435);e.H=r.createRoot,r.hydrateRoot},2559:(t,e,n)=>{function r(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}n.d(e,{A:()=>r})},2016:(t,e,n)=>{function r(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}n.d(e,{A:()=>r})},829:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(2559);function s(t,e){return t.get((0,r.A)(t,e))}},918:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(2016);function s(t,e,n){(0,r.A)(t,e),e.set(t,n)}},6121:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(2559);function s(t,e,n){return t.set((0,r.A)(t,e),n),n}},4635:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(2016);function s(t,e){(0,r.A)(t,e),e.add(t)}},9575:(t,e,n)=>{function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(this,arguments)}n.d(e,{A:()=>r})},114:(t,e,n)=>{n.r(e),n.d(e,{ReactNextElement:()=>p,wrapBrick:()=>v,wrapLocalBrick:()=>y});var r=n(4635),s=n(918),o=n(2559),i=n(6121),a=n(829),c=n(8769),l=n(5873),h=n(9435),d=n(300),u=new WeakMap,f=new WeakSet;class p extends d.NextElement{constructor(){super(...arguments),(0,r.A)(this,f),(0,s.A)(this,u,void 0)}connectedCallback(){super._markConnectedCallbackCalled(),(0,o.A)(f,this,A).call(this),this._render()}disconnectedCallback(){var t;null===(t=(0,a.A)(u,this))||void 0===t||t.render(null)}_render(){const t=()=>{if(!this.isConnected||!(0,a.A)(u,this))return;const t=this.constructor;var e;t.shadowOptions?(0,a.A)(u,this).render((0,d.supportsAdoptingStyleSheets)()||null===(e=t.styleTexts)||void 0===e||!e.length?this.render():c.createElement(c.Fragment,null,c.createElement("style",null,t.styleTexts.join("\n")),this.render())):(0,a.A)(u,this).render(this.render())};window.BRICK_NEXT_VERSIONS&&!window.DISABLE_REACT_FLUSH_SYNC?(0,h.flushSync)(t):t()}}function A(){if((0,a.A)(u,this))return;const t=this.constructor;if(t.shadowOptions){const n=this.attachShadow(t.shadowOptions);var e;if((0,d.supportsAdoptingStyleSheets)()&&null!==(e=t.styleTexts)&&void 0!==e&&e.length){const e=new CSSStyleSheet;e.replaceSync(t.styleTexts.join("")),n.adoptedStyleSheets=[e]}(0,i.A)(u,this,(0,l.H)(n))}else(0,i.A)(u,this,(0,l.H)(this))}var w=n(9575);function y(t,e){return(0,c.forwardRef)((function(n,r){let{children:s,...o}=n;const i="string"==typeof t?t:t.__tagName,a=S(o,e);return c.createElement(i,(0,w.A)({},a,{ref:r}),s)}))}function v(t,e){return(0,c.forwardRef)((function(n,r){let{children:s,...o}=n;const i=S(o,e);return c.createElement(t,(0,w.A)({},i,{ref:r}),s)}))}function S(t,e){let n;if(e){n={};for(const[r,s]of Object.entries(t))Object.prototype.hasOwnProperty.call(e,r)?n[`on${e[r]}`]=s:n[r]=s}else n=t;return n}}}]);
2
- //# sourceMappingURL=114.3d3eef7e.js.map
@@ -1,2 +0,0 @@
1
- "use strict";(globalThis.webpackChunk_next_bricks_diagram=globalThis.webpackChunk_next_bricks_diagram||[]).push([[2867],{9274:(e,t,n)=>{n.d(t,{m:()=>W});var o=n(8769),r=n.n(o),i=n(3373),l=n.n(i),a=n(531),c=n(1030),s=n(9126),d=n(3033),u=n(8653),v=n(967);function f(e,t){return e.find((e=>(0,a.o6)(e)&&e.id===t))}var h=n(9978),m=n(7531),g=n(4899),p=n(6235);function y(e){let{edge:t,position:n,label:o,text:i,onRendered:a,onClick:c}=e;return o||i?r().createElement("foreignObject",{className:l()("line-label-container",{ready:!!n}),x:null==n?void 0:n[0],y:null==n?void 0:n[1],onClick:c},o?r().createElement("div",{className:"line-label label"},r().createElement(x,{edge:t,label:o,onRendered:a})):r().createElement(w,{text:i,onRendered:a})):null}function w(e){let{text:t,onRendered:n}=e;const i=(0,o.useCallback)((e=>{null==n||n(e)}),[n]);return r().createElement("div",{className:"line-label text",ref:i,style:t.style},t.content)}function x(e){let{edge:t,label:n,onRendered:i}=e;const l=(0,o.useMemo)((()=>(0,g.checkIfOfComputed)(n)?n.useBrick:null),[n]),a=(0,o.useMemo)((()=>({edge:t})),[t]);(0,o.useEffect)((()=>{l||setTimeout((()=>{null==i||i(null)}))}),[i,l]),(0,o.useEffect)((()=>()=>{null==i||i(null)}),[]);const c=(0,o.useCallback)((e=>{e&&setTimeout((()=>{null==i||i(e.parentElement)}))}),[i]),s=(0,o.useCallback)((()=>{setTimeout((()=>{null==i||i(null)}))}),[i]);return l?r().createElement(p.ReactUseBrick,{refCallback:c,ignoredCallback:s,useBrick:l,data:a}):null}var E=n(9386);function k(e){var t;let{edge:n,cells:i,lineConfMap:g,active:p,readOnly:w,onSwitchActiveTarget:x}=e;const{setActiveEditableLine:k}=(0,h.s)(),b=(0,o.useRef)(null),C=(0,o.useMemo)((()=>f(i,n.source)),[i,n.source]),I=(0,o.useMemo)((()=>f(i,n.target)),[i,n.target]),S=(0,o.useMemo)((()=>g.get(n)),[n,g]),L=(0,o.useMemo)((()=>{var e;return(0,a.jw)(null===(e=n.view)||void 0===e?void 0:e.type)&&i.some((e=>{var t;return(0,a.WW)(e)&&e.source===n.target&&e.target===n.source&&(0,a.jw)(null===(t=e.view)||void 0===t?void 0:t.type)}))?S.parallelGap:0}),[i,n.source,n.target,n.view,S.parallelGap]),M=(0,o.useMemo)((()=>C&&I&&null!=C.view.x&&null!=I.view.x?(0,v.V)(C.view,I.view,n.view,L):null),[n.view,L,C,I]),P=(0,o.useMemo)((()=>{const e=S.type;return(0,u.S)(M,"curve"===e?S.curveType:"curveLinear",0,1)}),[S,M]);(0,o.useEffect)((()=>{k((e=>p?M&&C&&I?{edge:n,source:C,target:I,linePoints:M,lineType:S.type,lineCurveType:S.curveType,parallelGap:L}:null:null!=e&&e.edge&&e.edge.source===n.source&&e.edge.target===n.target?null:e))}),[p,n,S.curveType,S.type,M,k,C,I,L]);const z=(0,o.useMemo)((()=>(0,c.uniqueId)("line-mask-")),[]),[N,R]=(0,o.useState)(null),[A,T]=(0,o.useState)(null),[H,D]=(0,o.useState)(null),Z=(0,o.useCallback)((()=>{const e=b.current;if(e&&(S.label||S.text)){const t=e.getTotalLength(),n=e.getPointAtLength(t/2);R([n.x,n.y]);const o=e.getBBox();D({x:o.x-1e3,y:o.y-1e3,width:o.width+2e3,height:o.height+2e3})}}),[S]),W=(0,o.useCallback)((e=>{b.current=e,null!=e&&e.getTotalLength&&e.style.setProperty("--solid-length",`${e.getTotalLength()}`),Z()}),[Z]),[j,B]=(0,o.useState)(null);(0,o.useEffect)((()=>{if(!j)return void T(null);const e=new s.A((()=>{const{offsetWidth:e,offsetHeight:t}=j;T(0!==e&&0!==t?[e,t]:null)}));return e.observe(j),()=>{e.disconnect()}}),[j]);const O=(0,o.useCallback)((e=>{B(e)}),[]);(0,o.useEffect)((()=>{Z()}),[Z,M]);const V=(0,o.useCallback)((()=>{null==x||x((0,E.P)(n))}),[n,x]),U=(0,o.useCallback)((e=>{var t,n;!w&&S.callLabelOnDoubleClick&&(e.preventDefault(),e.stopPropagation(),null==j||null===(t=j.firstElementChild)||void 0===t||null===(n=t[S.callLabelOnDoubleClick])||void 0===n||n.call(t))}),[j,S,w]),G=(0,o.useMemo)((()=>N&&A?{left:N[0]-A[0]/2-3,top:N[1]-A[1]/2-3,width:A[0]+6,height:A[1]+6}:null),[N,A]);if(!P||!M)return null;let $,X;const Y=(0,m.I)(S);for(const e of Y)"start"===e.placement?$=S.$markerStartUrl:X=S.$markerEndUrl;const F=G?`url(#${z})`:void 0;return r().createElement(r().Fragment,null,G&&H&&r().createElement("defs",null,r().createElement("mask",{id:z,maskUnits:"userSpaceOnUse",x:H.x,y:H.y,width:H.width,height:H.height},r().createElement("rect",{x:H.x,y:H.y,width:H.width,height:H.height,fill:"white"}),r().createElement("rect",{x:G.left,y:G.top,width:G.width,height:G.height,fill:"black"}))),r().createElement("g",{className:"line-group",onDoubleClick:U},r().createElement("path",{d:P,fill:"none",stroke:"transparent",strokeWidth:S.interactStrokeWidth,mask:F}),r().createElement("path",{ref:W,className:l()("line",{dashed:S.dashed,dotted:S.dotted,[(S.dashed?"dashed":S.dotted?"dotted":"solid")+"-animation"]:S.animate.useAnimate}),mask:F,style:{"--time":`${null!==(t=S.animate.duration)&&void 0!==t?t:d.Be}s`},d:P,fill:"none",stroke:S.strokeColor,strokeWidth:S.strokeWidth,markerStart:$,markerEnd:X}),r().createElement("path",{className:"line-active-bg",d:P,fill:"none",mask:F})),r().createElement(y,{edge:n,position:N,label:S.label,text:S.text,onClick:V,onRendered:O}))}function b(e){let{node:t,degraded:n,degradedNodeLabel:i,defaultNodeBricks:l,onResize:a}=e;const d=function(e){const[t,n]=(0,o.useState)(e);return(0,o.useEffect)((()=>{n((t=>(0,c.isEqual)(t,e)?t:e))}),[e]),t}({node:{id:t.id,data:t.data}}),u=t.useBrick,v=(0,o.useRef)(null),f=(0,o.useMemo)((()=>{var e;return n?null:null!=u?u:null==l||null===(e=l.find((e=>(0,g.checkIfByTransform)(e,d))))||void 0===e?void 0:e.useBrick}),[n,u,l,d]),h=(0,o.useMemo)((()=>n?String(g.__secret_internals.legacyDoTransform(d,null!=i?i:"<% DATA.node.id %>")):""),[n,i,d]),m=(0,o.useCallback)((e=>{const n=v.current;n&&(n.disconnect(),v.current=null),e?setTimeout((()=>{const n=new s.A((()=>{a(t.id,[e.offsetWidth,e.offsetHeight])}));n.observe(e),v.current=n})):a(t.id,null)}),[t.id,a]),y=(0,o.useCallback)((e=>{if(e){const n=e.getBBox();a(t.id,[n.width,n.height])}else a(t.id,null)}),[t.id,a]);return f?r().createElement("foreignObject",{width:9999,height:9999,className:"node"},f&&r().createElement(p.ReactUseBrick,{useBrick:f,data:d,refCallback:m})):n?r().createElement("g",{className:"degraded",ref:y},r().createElement("circle",{cx:8,cy:8,r:8}),r().createElement("text",{x:8,y:32},h)):null}const C=["center","top","bottom","left","right"];function I(e,t){const n={};for(const i of null!==(o=null==t||null===(r=t.split(/\s+/g))||void 0===r?void 0:r.flatMap((e=>"all"===e?C:e)))&&void 0!==o?o:[]){var o,r;let t;const l=e.x+e.width/2,a=e.y+e.height/2;switch(i){case"center":t=[l,a];break;case"top":t=[l,e.y];break;case"right":t=[e.x+e.width,a];break;case"bottom":t=[l,e.y+e.height];break;case"left":t=[e.x,a];break;default:throw new Error(`Unknown snap position: "${i}"`)}n[i]=t}return n}var S=n(4197);const L=["left","center","right"],M=["top","center","bottom"];function P(e,t){var n;let{action:o,cell:r,scale:i,layout:l,layoutOptions:c,activeTarget:s,cells:u,onCellsMoving:v,onCellsMoved:f,onCellResizing:h,onCellResized:m,onSwitchActiveTarget:g}=t;if(e.stopPropagation(),"resize"!==o&&(0,S.Q)(r,s)||null==g||g((0,E.P)(r)),(0,a.WW)(r))return;const p=[],y="multi"===(null==s?void 0:s.type)&&"move"===o?u.filter((e=>(0,S.Q)(e,s))):[r];y.forEach((e=>{p.push(e),"move"===o&&(0,a.t2)(e)&&p.push(...u.filter((t=>(0,a.N)(t)&&t.containerId===e.id&&!y.includes(t))))}));const w="force"===l||"dagre"===l,x=p.filter((e=>(0,a.N)(e)&&!w||(0,a.mH)(e)));if(0===x.length)return;const k=function(e){var t,n,o;const r=e?!0===e?{grid:!0,object:!0}:e:null,i=null!=r&&r.grid?!0===r.grid?{}:r.grid:null,l=null!=r&&r.object?!0===r.object?{}:r.object:null;return{grid:i?{size:null!==(t=i.size)&&void 0!==t?t:d.gx}:null,object:l?{distance:null!==(n=l.distance)&&void 0!==n?n:d.ld,positions:null!==(o=l.positions)&&void 0!==o?o:d.o5}:null}}(null==c?void 0:c.snap),b=null===(n=k.object)||void 0===n?void 0:n.positions,C=[e.clientX,e.clientY],P=x.map((e=>({cell:e,position:"move"===o?[e.view.x,e.view.y]:[e.view.width,e.view.height],snapPositions:"move"!==o||(0,a.WW)(e)?null:I(e.view,b)}))),z=P[0].position;let N=P.map((e=>{let{position:t}=e;return t})),R=[];if("move"===o&&k.object){const e=u.filter((e=>!(0,a.WW)(e)&&!p.includes(e)));R=e.map((e=>({cell:e,snapPositions:I(e.view,b)})))}let A=!1;const T=(e,t)=>{const n=function(e){return[(e.clientX-C[0])/i,(e.clientY-C[1])/i]}(e);let l,c,s,d,u;if(!k.grid&&!k.object||e.altKey)l=P.map((e=>{let{position:t}=e;return[t[0]+n[0],t[1]+n[1]]})),A||(A=n[0]**2+n[1]**2>=9);else{let e=1/0,t=1/0;const o=[...n];if(k.object){const r=k.object.distance;let i,l,a,v,f=0,h=0;for(const{cell:c,snapPositions:s}of R)for(const{cell:m,snapPositions:g}of P)for(const[p,y]of Object.entries(g)){const g=L.includes(p),w=M.includes(p),[x,E]=s[p],[k,b]=y;if(g){const t=Math.abs(k+n[0]-x);t<r&&t<e&&(e=t,o[0]=x-k,d=m,a=c,i=[x,E],f=b)}if(w){const e=Math.abs(b+n[1]-E);e<r&&e<t&&(t=e,o[1]=E-b,u=m,v=c,l=[x,E],h=k)}}if(a&&a===v){const e=a.view.height/2,t=a.view.width/2;c=[[i[0],i[1]-e],[i[0],i[1]+e]],s=[[l[0]-t,l[1]],[l[0]+t,l[1]]]}else i&&(c=[i,[i[0],f+o[1]]]),l&&(s=[l,[h+o[0],l[1]]])}if(k.grid){const r=k.grid.size,i=[Math.round((z[0]+n[0])/r)*r,Math.round((z[1]+n[1])/r)*r],l=[i[0]-z[0],i[1]-z[1]],a=Math.abs(l[0]-n[0]),v=Math.abs(l[1]-n[1]);a<e&&(e=a,o[0]=l[0],c=void 0,d=void 0),v<t&&(t=v,o[1]=l[1],s=void 0,u=void 0)}l=P.map((e=>{let{position:t}=e;return[Math.round(t[0]+o[0]),Math.round(t[1]+o[1])]})),(l[0][0]!==N[0][0]||l[0][1]!==N[0][1])&&(N=l,A=!0)}if(A)if("move"===o){var g;const e=P.map(((e,n)=>{let{cell:o}=e;return{type:o.type,id:o.id,x:l[n][0],y:l[n][1],width:o.view.width,height:o.view.height,decorator:(0,a.mH)(o)?o.decorator:void 0,guideLines:t?void 0:[...d===o?[c]:[],...u===o?[s]:[]]}}));null===(g=t?f:v)||void 0===g||g(e)}else{var p;null===(p=t?m:h)||void 0===p||p({type:r.type,id:r.id,width:l[0][0],height:l[0][1]})}},H=e=>{T(e)},D=e=>{T(e,!0),A=!1,document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",D)};document.addEventListener("mousemove",H),document.addEventListener("mouseup",D)}function z(e){let{cell:t,transform:n,readOnly:i,layoutOptions:l,activeTarget:a,cells:c,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:u}=e;const v=r().useRef(null);return(0,o.useEffect)((()=>{const e=v.current;if(!e||i)return;const o=e=>{P(e,{action:"resize",cell:t,scale:n.k,layoutOptions:l,activeTarget:a,cells:c,onCellResizing:s,onCellResized:d,onSwitchActiveTarget:u})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[a,t,c,l,d,s,u,i,n.k]),r().createElement("g",{className:"decorator-area"},r().createElement("rect",{width:t.view.width,height:t.view.height,className:"area"}),!i&&r().createElement("g",{ref:v,className:"resize-handle",transform:`translate(${t.view.width-20} ${t.view.height-20})`},r().createElement("rect",{width:20,height:20}),r().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}function N(e){var t;let{cell:n,readOnly:i,onDecoratorTextEditing:a,onDecoratorTextChange:c}=e;const s=null!==(t=n.view.text)&&void 0!==t?t:"",[d,u]=(0,o.useState)(s),[v,f]=(0,o.useState)(!1),h=(0,o.useRef)(!1),[m,g]=(0,o.useState)(!1),p=(0,o.useRef)(null),y=(0,o.useCallback)((e=>{i||(e.preventDefault(),e.stopPropagation(),f(!0))}),[i]);(0,o.useEffect)((()=>{const e=p.current;e&&e.textContent!==d&&(e.textContent=d)}),[d]),(0,o.useEffect)((()=>{var e;const t=null===(e=p.current)||void 0===e?void 0:e.parentElement;t&&(n.view.width=t.clientWidth,n.view.height=t.clientHeight)}),[d,n.id]),(0,o.useEffect)((()=>{v&&p.current&&(p.current.focus(),R(p.current)),null==a||a({id:n.id,editing:v})}),[n.id,v,a]),(0,o.useEffect)((()=>{h.current?null==a||a({id:n.id,editing:v}):h.current=!0}),[n.id,v,a]);const w=(0,o.useCallback)((e=>{i||u(e.target.textContent)}),[i]),x=(0,o.useCallback)((()=>{i||(f(!1),g(!0))}),[i]);return(0,o.useEffect)((()=>{m&&(null==c||c({id:n.id,view:{...n.view,text:d}}),g(!1))}),[n,d,c,m]),r().createElement("foreignObject",{className:"decorator-text"},r().createElement("div",{className:l()("text-container",{editing:v}),onDoubleClick:y},r().createElement("div",{className:"text",contentEditable:v,ref:p,onInput:w,onBlur:x})))}function R(e){const t=document.createRange();t.selectNodeContents(e);const n=window.getSelection();n.removeAllRanges(),n.addRange(t)}var A=n(9068);function T(e){let{cell:t,transform:n,readOnly:i,layout:s,view:d,activeTarget:u,cells:v,onCellResizing:f,onCellResized:h,onSwitchActiveTarget:m,onDecoratorTextEditing:g,onDecoratorTextChange:p}=e;const y=(0,c.get)(t.view,"text",""),w=(0,c.get)(t.view,"direction","top"),x=(0,o.useRef)(null),E=r().useRef(null),[k,b]=(0,o.useState)(!1),[C,I]=(0,o.useState)(y),[S,L]=(0,o.useState)(!1),[M,z]=(0,o.useState)(),[N,T]=(0,o.useState)({x:0,y:0,width:t.view.width,height:t.view.height}),H=(0,o.useCallback)((e=>{i||(e.preventDefault(),e.stopPropagation(),b(!0))}),[i]),D=(0,o.useCallback)((e=>{i||I(e.target.textContent)}),[i]),Z=(0,o.useCallback)((()=>{i||(b(!1),L(!0),z((0,A.uuidV4)()))}),[i]);return(0,o.useEffect)((()=>{I(y)}),[y]),(0,o.useEffect)((()=>{const e=x.current;e&&e.textContent!==C&&(e.textContent=C)}),[C]),(0,o.useEffect)((()=>{var e;const t=null===(e=x.current)||void 0===e?void 0:e.parentElement;if(t){const{clientWidth:e,clientHeight:n}=t;if(["left","right"].includes(w)){const t={width:e,height:d.height,x:"left"===w?-e:d.width,y:0};T(t)}else{const e={width:d.width,height:n,x:0,y:"top"===w?-n:d.height};T(e)}}}),[d,C,w,M]),(0,o.useEffect)((()=>{k&&x.current&&(x.current.focus(),R(x.current)),null==g||g({id:t.id,editing:k})}),[t.id,k,g]),(0,o.useEffect)((()=>{S&&(null==p||p({id:t.id,view:{...d,text:C}}),L(!1))}),[t,d,C,p,S]),(0,o.useEffect)((()=>{const e=E.current;if(!e||i)return;const o=e=>{P(e,{action:"resize",cell:t,scale:n.k,activeTarget:u,cells:v,onCellResizing:f,onCellResized:h,onSwitchActiveTarget:m})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[u,t,v,h,f,m,i,n.k]),r().createElement("g",{className:"decorator-container"},r().createElement("foreignObject",N,r().createElement("div",{className:l()("text-container",{editing:k,[["left","right"].includes(w)?"vertical":"horizontal"]:!0}),onDoubleClick:H},r().createElement("div",{className:"text",contentEditable:k,ref:x,onInput:D,onBlur:Z}))),r().createElement("rect",{width:d.width,height:d.height,className:"container"}),!i&&!(0,a.OD)(s)&&r().createElement("g",{ref:E,className:"resize-handle",transform:`translate(${d.width-20} ${d.height-20})`},r().createElement("rect",{width:20,height:20}),r().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}function H(e){let t,{cell:n,view:o,transform:i,readOnly:l,layout:a,layoutOptions:c,activeTarget:s,cells:d,onCellResizing:u,onCellResized:v,onSwitchActiveTarget:f,onDecoratorTextEditing:h,onDecoratorTextChange:m}=e;switch(n.decorator){case"container":t=T;break;case"area":t=z;break;case"text":t=N;break;default:return console.error(`Unknown decorator: ${n.decorator}`),null}return r().createElement(t,{cell:n,view:o,transform:i,readOnly:l,layout:a,layoutOptions:c,activeTarget:s,cells:d,onCellResizing:u,onCellResized:v,onSwitchActiveTarget:f,onDecoratorTextEditing:h,onDecoratorTextChange:m})}var D=n(8185);function Z(e){let t=1/0,n=1/0,o=-1/0,r=-1/0;return e.forEach((e=>{const{x:i,y:l,width:a,height:c}=e.view;i<t&&(t=i),l<n&&(n=l),i+a>o&&(o=i+a),l+c>r&&(r=l+c)})),[t,o,n,r].some((e=>isFinite(e)))?{x:t-20,y:n-20,width:o-t+40,height:r-n+40}:{}}function W(e){let{layout:t,layoutOptions:n,cell:i,cells:s,degraded:d,degradedNodeLabel:u,defaultNodeBricks:v,lineConfMap:f,activeTarget:m,dragNodeToContainerActive:g,readOnly:p,transform:y,unrelatedCells:w,allowEdgeToArea:x,onCellsMoving:C,onCellsMoved:I,onCellResizing:L,onCellResized:M,onSwitchActiveTarget:z,onCellContextMenu:N,onCellClick:R,onDecoratorTextEditing:A,onDecoratorTextChange:T,onNodeBrickResize:W,onCellMouseEnter:j,onCellMouseLeave:B}=e;const{lineEditorState:O,smartConnectLineState:V,setSmartConnectLineState:U,onConnect:G,setLineEditorState:$,onChangeEdgeView:X}=(0,h.s)(),Y=(0,o.useRef)(null),F=(0,o.useMemo)((()=>w.some((e=>(0,D.c)(e,i)))),[i,w]),Q=(0,o.useMemo)((()=>{if((0,a.t2)(i)&&(0,a.OD)(t)){const e=s.filter((e=>(0,a.N)(e)&&e.containerId===i.id)),t={...i.view,...Z(e)};return i.view=t,t}return(0,a.WW)(i)?void 0:(0,c.get)(i,"view",{x:0,y:0,width:0,height:0})}),[t,i,s]);(0,o.useEffect)((()=>{const e=Y.current;if(!e)return;const o=e=>{p||(0,a.t2)(i)&&(0,a.OD)(t)?e.stopPropagation():P(e,{layout:t,layoutOptions:n,action:"move",cell:i,scale:y.k,activeTarget:m,cells:s,onCellsMoving:C,onCellsMoved:I,onSwitchActiveTarget:z})};return e.addEventListener("mousedown",o),()=>{e.removeEventListener("mousedown",o)}}),[t,n,i,m,s,I,C,z,p,y.k]),(0,o.useEffect)((()=>{const e=Y.current;if(!e||!(0,a.bo)(i,x)||!(V||O&&"control"!==O.type))return;const t=e=>{if(e.preventDefault(),e.stopPropagation(),V)V.source!==i&&(null==G||G(V.source,i,V.exitPosition,void 0)),U(null);else if(O){const{type:e,source:t,target:n,edge:{view:o}}=O,r="entry"===e;(r?n:t)===i&&(r?null==X||X(t,n,{...o,entryPosition:null}):null==X||X(t,n,{...o,exitPosition:null})),$(null)}};return e.addEventListener("mouseup",t),()=>{e.removeEventListener("mouseup",t)}}),[x,i,O,X,G,$,U,V]);const J=(0,o.useCallback)((e=>{p&&"decorator"===i.type||(e.preventDefault(),z((0,E.P)(i)),N({cell:i,clientX:e.clientX,clientY:e.clientY}))}),[i,N,z,p]),K=(0,o.useCallback)((e=>{R&&"decorator"!==i.type&&R({cell:i,clientX:e.clientX,clientY:e.clientY})}),[i,R]),_=(0,o.useCallback)((()=>{null==j||j(i)}),[i,j]),q=(0,o.useCallback)((()=>{null==B||B(i)}),[i,B]),ee=(0,S.Q)(i,m);return r().createElement("g",{className:l()("cell",{active:ee,faded:F,"read-only":p,"container-active":g}),ref:Y,transform:"edge"===i.type||null==i.view.x?void 0:`translate(${Q.x} ${Q.y})`,onContextMenu:J,onClick:K,onMouseEnter:_,onMouseLeave:q},(0,a.N)(i)?r().createElement(b,{node:i,degraded:d,degradedNodeLabel:u,defaultNodeBricks:v,onResize:W}):(0,a.WW)(i)?r().createElement(k,{edge:i,cells:s,lineConfMap:f,active:ee,readOnly:p,onSwitchActiveTarget:z}):(0,a.mH)(i)?r().createElement(H,{cell:i,view:Q,transform:y,readOnly:p,layout:t,layoutOptions:n,activeTarget:m,cells:s,onCellResizing:L,onCellResized:M,onSwitchActiveTarget:z,onDecoratorTextEditing:A,onDecoratorTextChange:T}):null)}},3639:(e,t,n)=>{n.d(t,{w:()=>a});var o=n(8769),r=n.n(o),i=n(3373),l=n.n(i);function a(e){let{connectLineState:t,transform:n,markerEnd:i,onConnect:a}=e;const[c,s]=(0,o.useState)(null);return(0,o.useEffect)((()=>{t&&s(t.from)}),[t]),(0,o.useEffect)((()=>{if(t){const e=e=>[(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k],o=t=>{s(e(t))},r=e=>{e.stopPropagation()},i=n=>{n.stopPropagation(),l(),a(t,e(n))},l=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("click",i,{capture:!0}),s(null)};return document.addEventListener("mousemove",o),document.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("click",i,{capture:!0}),l}}),[t,a,n]),r().createElement("path",{className:l()("connect-line",{connecting:!!t&&c&&(c[0]-t.from[0])**2+(c[1]-t.from[1])**2>25}),d:t&&c?`M${t.from.join(" ")}L${c.join(" ")}`:"",fill:"none",stroke:"gray",strokeWidth:1,markerEnd:`url(#${i})`})}},1825:(e,t,n)=>{n.d(t,{W:()=>f});var o=n(8769),r=n.n(o),i=n(3373),l=n.n(i),a=n(8653),c=n(9978),s=n(1030),d=n(967);function u(e,t){const{control:n,linePoints:o}=e,r=[],[i,l]=t,a=o[0],c=o[o.length-1];0===n.index&&r.push("ns"===n.direction?{x:a.x,y:l}:{x:i,y:a.y});for(let e=1;e<o.length-1;e++){const t=o[e];r.push(e===n.index||e===n.index+1?"ns"===n.direction?{x:t.x,y:l}:{x:i,y:t.y}:t)}return n.index===o.length-2&&r.push("ns"===n.direction?{x:c.x,y:l}:{x:i,y:c.y}),(0,d.P)(a,r,c)}var v=n(7531);function f(e){let{transform:t,options:n}=e;const[i,f]=(0,o.useState)(null),{activeEditableLine:h,hoverState:m,lineEditorState:g,setLineEditorState:p,onChangeEdgeView:y}=(0,c.s)(),w=(0,o.useRef)(!1);(0,o.useEffect)((()=>{g||setTimeout((()=>{w.current=!1}),0)}),[g]),(0,o.useEffect)((()=>{if(!g)return;w.current=!1;const{type:e,offset:n,from:o}=g,r=r=>{const i={x:(r.clientX-t.x-n[0])/t.k,y:(r.clientY-t.y-n[1])/t.k};let l=1/0;if("control"===e&&!r.altKey){const{linePoints:e,control:t}=g,n="ns"===t.direction?"y":"x",o=t[n],r=e.filter(((n,o)=>0===o||o===e.length-1||o!==t.index&&o!==t.index+1)),a=5;for(const e of r){const t=Math.abs(e[n]-i[n]);t<=a&&t<l&&(i[n]=e[n],l=t,w.current||o===i[n]||(w.current=!0))}}if(l===1/0&&!w.current){const e=(r.clientX-o[0])/t.k,n=(r.clientY-o[1])/t.k;w.current=e**2+n**2>=9}return[i.x,i.y]},i=e=>{const t=r(e);w.current&&f(t)};function l(e){if(e.preventDefault(),a(),"control"===(null==g?void 0:g.type)){const t=r(e);if(w.current){const{source:e,target:n,edge:{view:o}}=g;null==y||y(e,n,{...o,vertices:u(g,t)})}}}function a(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",l),f(null),p(null)}return document.addEventListener("mousemove",i),document.addEventListener("mouseup",l),a}),[g,t,p,y]),(0,o.useEffect)((()=>{if(!h)return;const e=e=>{w.current&&(e.stopPropagation(),e.preventDefault())};return document.body.addEventListener("click",e),()=>{document.body.removeEventListener("click",e)}}),[h]);const x=(0,o.useMemo)((()=>{var e;const t=function(e,t,n){if(!e||!(t||"control"!==e.type&&void 0!==(null==n?void 0:n.activePointIndex)))return null;const{type:o,source:r,target:i,edge:{view:l}}=e,{exitPosition:a,entryPosition:c,vertices:v}=null!=l?l:{},f=(0,s.pick)(l,["type","curveType"]);if("control"===o){const n=u(e,t);return(0,d.V)(r.view,i.view,{...f,exitPosition:a,entryPosition:c,vertices:n})}if(void 0!==(null==n?void 0:n.activePointIndex)){const e=n.relativePoints[n.activePointIndex];return(0,d.V)(r.view,i.view,{...f,..."entry"===o?{exitPosition:a,entryPosition:e}:{exitPosition:e,entryPosition:c},vertices:v})}const[h,m]=t;return"entry"===o?(0,d.V)(r.view,{x:h,y:m,width:0,height:0},{...f,exitPosition:a,vertices:v}):(0,d.V)({x:h,y:m,width:0,height:0},i.view,{...f,entryPosition:c,vertices:v})}(g,i,m);return(0,a.S)(t,"curve"===(null==g||null===(e=g.edge.view)||void 0===e?void 0:e.type)?g.edge.view.curveType:"curveLinear",0,1)}),[i,m,g]);let E,k;const b=(0,v.I)(n);for(const e of b)"start"===e.placement?E=n.$editingStartMarkerUrl:k=n.$editingEndMarkerUrl;return r().createElement("path",{className:l()("editing-line",{editing:!(!g||!i)}),d:x,fill:"none",stroke:n.editingStrokeColor,markerStart:E,markerEnd:k})}},9978:(e,t,n)=>{n.d(t,{H:()=>i,s:()=>l});var o=n(8769),r=n.n(o);const i=r().createContext({rootRef:{current:null},smartConnectLineState:null,unsetHoverStateTimeoutRef:{current:null},hoverState:null,activeEditableLine:null,activeEditableLineIsAvailable:!1,lineEditorState:null,setLineEditorState:()=>{},setActiveEditableLine:()=>{},setHoverState:()=>{},setSmartConnectLineState:()=>{}});function l(){return r().useContext(i)}},2722:(e,t,n)=>{n.d(t,{T:()=>v});var o=n(8769),r=n.n(o),i=n(9978),l=n(4197),a=n(3033);const c="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSI1cHgiIGhlaWdodD0iNXB4IiB2ZXJzaW9uPSIxLjEiPjxwYXRoIGQ9Im0gMCAwIEwgNSA1IE0gMCA1IEwgNSAwIiBzdHJva2Utd2lkdGg9IjIiIHN0eWxlPSJzdHJva2Utb3BhY2l0eTowLjQiIHN0cm9rZT0iI2ZmZmZmZiIvPjxwYXRoIGQ9Im0gMCAwIEwgNSA1IE0gMCA1IEwgNSAwIiBzdHJva2U9IiMyOWI2ZjIiLz48L3N2Zz4=",s=5,d=8,u=s/2;function v(e){let{activeTarget:t,scale:n,disabled:c}=e;const{unsetHoverStateTimeoutRef:s,hoverState:u,setHoverState:v,smartConnectLineState:h,lineEditorState:m}=(0,i.s)(),g=(0,o.useCallback)((()=>{null!==s.current&&(clearTimeout(s.current),s.current=null)}),[s]),p=(0,o.useCallback)((()=>{g(),v((e=>void 0===(null==e?void 0:e.activePointIndex)?e:{...u,activePointIndex:void 0}))}),[u,v,g]),y=(0,o.useCallback)((()=>{s.current=setTimeout((()=>{v(null)}))}),[v,s]),w=!c&&u&&(!!h||(m?"entry"===m.type?u.cell===m.target:"exit"===m.type&&u.cell===m.source:!(0,l.Q)(u.cell,t)&&!function(e){return e&&("edge"===e.type||"multi"===e.type&&e.targets.some((e=>"edge"===e.type)))}(t))),x=a.XK,E=x/2;return r().createElement("g",{onMouseEnter:p,onMouseLeave:y},w&&r().createElement(r().Fragment,null,r().createElement("rect",{x:u.cell.view.x-E,y:u.cell.view.y-E,width:u.cell.view.width+x,height:u.cell.view.height+x,fill:"none",stroke:"transparent",strokeWidth:2*d/n,pointerEvents:"stroke"}),void 0!==u.activePointIndex&&r().createElement("circle",{cx:u.points[u.activePointIndex].x,cy:u.points[u.activePointIndex].y,r:d/n,fill:"lightgreen",fillOpacity:.5,pointerEvents:"none"}),u.points.map(((e,t)=>r().createElement(f,{key:t,index:t,point:e,scale:n,unsetActivePointIndex:p,unsetTimeout:g})))))}function f(e){let{index:t,point:n,scale:l,unsetTimeout:a,unsetActivePointIndex:v}=e;const{rootRef:f,smartConnectLineState:h,hoverState:m,setHoverState:g,setSmartConnectLineState:p,onConnect:y,lineEditorState:w,setLineEditorState:x,onChangeEdgeView:E}=(0,i.s)(),k=(0,o.useRef)(null);return(0,o.useEffect)((()=>{const e=k.current,n=o=>{"mousemove"===o.type&&(null==e||e.removeEventListener(o.type,n)),a(),g((e=>e&&e.activePointIndex!==t?{...m,activePointIndex:t}:e))};return null==e||e.addEventListener("mouseenter",n),null==e||e.addEventListener("mousemove",n),()=>{null==e||e.removeEventListener("mouseenter",n),null==e||e.removeEventListener("mousemove",n)}}),[m,t,g,a]),(0,o.useEffect)((()=>{if(w)return;const e=e=>{e.preventDefault(),e.stopPropagation();const n=f.current.getBoundingClientRect(),o=m.points[t];p({source:m.cell,from:[o.x,o.y],offset:[n.left,n.top],exitPosition:m.relativePoints[t]})},n=k.current;return null==n||n.addEventListener("mousedown",e),()=>{null==n||n.removeEventListener("mousedown",e)}}),[m,t,w,f,p]),(0,o.useEffect)((()=>{const e=e=>{if(e.preventDefault(),e.stopPropagation(),h)h.source!==(null==m?void 0:m.cell)&&(null==y||y(h.source,m.cell,h.exitPosition,m.relativePoints[m.activePointIndex])),p(null);else if(w){const e=m.relativePoints[m.activePointIndex],{type:t,source:n,target:o,edge:{view:r}}=w;"entry"===t?null==E||E(n,o,{...r,entryPosition:e}):null==E||E(n,o,{...r,exitPosition:e}),x(null)}},t=k.current;return null==t||t.addEventListener("mouseup",e),()=>{null==t||t.removeEventListener("mouseup",e)}}),[h,m,y,p,w,E,x]),r().createElement("g",{ref:k,onMouseLeave:v},r().createElement("circle",{cx:n.x,cy:n.y,r:d,fill:"transparent"}),r().createElement("image",{x:n.x-u/l,y:n.y-u/l,width:s/l,height:s/l,xlinkHref:c,preserveAspectRatio:"none"}))}},2202:(e,t,n)=>{n.d(t,{F:()=>v});var o=n(9575),r=n(8769),i=n.n(r),l=n(9978),a=n(531);const c="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSIjMjliNmYyIi8+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iMyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSJ0cmFuc3BhcmVudCIvPjwvc3ZnPg==",s="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iNyIgc3Ryb2tlPSIjZmZmIiBmaWxsPSIjMDFiZDIyIi8+PHBhdGggZD0ibSA4IDggTCAxNCAxNE0gOCAxNCBMIDE0IDgiIHN0cm9rZT0iI2ZmZiIvPjwvc3ZnPg==",d="data:image/svg+xml;base64,PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiIHZlcnNpb249IjEuMSI+PGNpcmNsZSBjeD0iOSIgY3k9IjkiIHI9IjUiIHN0cm9rZT0iI2ZmZiIgZmlsbD0iIzI5YjZmMiIvPjwvc3ZnPg==",u=22;function v(e){let{scale:t}=e;const{rootRef:n,activeEditableLine:v,activeEditableLineIsAvailable:f,setLineEditorState:h}=(0,l.s)(),m=(0,r.useRef)(null),g=(0,r.useRef)(null),p=(0,r.useRef)([]);(0,r.useEffect)((()=>{const e=m.current,t=g.current;if(!e||!t||!v)return;const o=e=>t=>{t.stopPropagation(),t.preventDefault();const o=n.current.getBoundingClientRect();h({...v,offset:[o.left,o.top],from:[t.clientX,t.clientY],type:e})},r=o("exit"),i=o("entry");return e.addEventListener("mousedown",r),t.addEventListener("mousedown",i),()=>{e.removeEventListener("mousedown",r),t.removeEventListener("mousedown",i)}}),[v,n,h]);const y=(0,r.useMemo)((()=>{var e;return v&&!(0,a.jw)(null===(e=v.edge.view)||void 0===e?void 0:e.type)?function(e){const t=[];let n=e[0],o=1;for(;o<e.length;){const r=e[o],i=n.y===r.y,l=n.x===r.x;if(!i||!l){const e=i?"ns":"ew";t.push({direction:e,index:o-1,x:(n.x+r.x)/2,y:(n.y+r.y)/2})}n=r,o++}return t}(v.linePoints):[]}),[v]);(0,r.useEffect)((()=>{if(!v)return;const e=p.current,t=y.map((e=>(e=>t=>{t.stopPropagation(),t.preventDefault();const o=n.current.getBoundingClientRect();h({...v,offset:[o.left,o.top],from:[t.clientX,t.clientY],type:"control",control:e})})(e)));return e.forEach(((e,n)=>{null==e||e.addEventListener("mousedown",t[n])})),()=>{e.forEach(((e,n)=>{null==e||e.removeEventListener("mousedown",t[n])}))}}),[v,y,n,h]);const w=(0,r.useRef)(null);if((0,r.useEffect)((()=>{const e=w.current,t=e=>{e.stopPropagation(),e.preventDefault()};return null==e||e.addEventListener("click",t),()=>{null==e||e.removeEventListener("click",t)}}),[]),!v||!f)return null;const{linePoints:x,edge:{view:E}}=v,{exitPosition:k,entryPosition:b}=null!=E?E:{},C={width:u/t,height:u/t,preserveAspectRatio:"none",cursor:"pointer",pointerEvents:"fill"},I=x[0],S=x[x.length-1],L=u/t/2;return i().createElement("g",{ref:w},i().createElement("image",(0,o.A)({ref:m},C,{x:I.x-L,y:I.y-L,xlinkHref:k?s:c})),y.map(((e,t)=>i().createElement("image",(0,o.A)({key:t,ref:e=>{p.current[t]=e}},C,{x:e.x-L,y:e.y-L,xlinkHref:d,cursor:"ns"===e.direction?"row-resize":"col-resize"})))),i().createElement("image",(0,o.A)({ref:g},C,{x:S.x-L,y:S.y-L,xlinkHref:b?s:c})))}},1103:(e,t,n)=>{n.d(t,{X:()=>u});var o=n(8769),r=n.n(o),i=n(3373),l=n.n(i),a=n(8653),c=n(9978),s=n(967),d=n(7531);function u(e){let{transform:t,lineSettings:n,options:i}=e;const[u,v]=(0,o.useState)(null),{hoverState:f,smartConnectLineState:h,setSmartConnectLineState:m}=(0,c.s)();(0,o.useEffect)((()=>{if(h)return document.addEventListener("mousemove",e),document.addEventListener("mouseup",n),o;function e(e){v([(e.clientX-t.x-h.offset[0])/t.k,(e.clientY-t.y-h.offset[1])/t.k])}function n(e){e.preventDefault(),o()}function o(){document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n),v(null),m(null)}}),[m,h,t]);const g=(0,o.useMemo)((()=>{const e=function(e,t,n,o){if(!e||!t&&void 0===(null==n?void 0:n.activePointIndex))return null;const r=e.source.view;if(void 0!==(null==n?void 0:n.activePointIndex))return(0,s.V)(r,n.cell.view,{...o,exitPosition:e.exitPosition,entryPosition:n.relativePoints[n.activePointIndex]});const[i,l]=t;return(0,s.V)(r,{x:i,y:l,width:0,height:0},{...o,exitPosition:e.exitPosition})}(h,u,f,n);return(0,a.S)(e,"curve"===i.type?i.curveType:"curveLinear",0,1)}),[u,f,h,i,n]);let p,y;const w=(0,d.I)(i);for(const e of w)"start"===e.placement?p=i.$markerStartUrl:y=i.$markerEndUrl;return r().createElement("path",{className:l()("connect-line",{connecting:!(!h||!u)}),d:g,fill:"none",stroke:i.strokeColor,strokeWidth:i.strokeWidth,markerStart:p,markerEnd:y})}},3033:(e,t,n)=>{n.d(t,{Be:()=>p,CV:()=>o,D9:()=>a,Dm:()=>l,HP:()=>i,Ie:()=>h,N8:()=>c,Ub:()=>g,VO:()=>f,XK:()=>b,XV:()=>m,Yt:()=>u,gx:()=>w,ld:()=>x,mF:()=>v,o5:()=>E,p6:()=>k,pC:()=>y,sS:()=>d,w1:()=>s,xc:()=>r});const o=Symbol.for("size-initialized"),r=Symbol.for("layout-initialized"),i=20,l=36,a=50,c=180,s=120,d=.5,u=2,v="gray",f=1,h=15,m=!1,g=!0,p=1,y=500,w=10,x=5,E="all",k=5,b=0},531:(e,t,n)=>{function o(e){return"node"===e.type}function r(e){return"decorator"===e.type}function i(e){return"node"===e.type}function l(e){return"edge"===e.type}function a(e){return"node"===e.type||"edge"===e.type}function c(e){return"node"===e.type||"decorator"===e.type&&"area"===e.decorator}function s(e,t){return"node"===e.type||!!t&&"decorator"===e.type&&"area"===e.decorator}function d(e){return"decorator"===e.type&&"text"===e.decorator}function u(e){return"decorator"===e.type&&"container"===e.decorator}function v(e){return!["manual",void 0].includes(e)}function f(e){return!("polyline"===e||"curve"===e)}n.d(t,{Hs:()=>d,N:()=>o,OD:()=>v,WW:()=>l,bo:()=>s,jw:()=>f,mH:()=>r,nv:()=>a,o6:()=>c,t2:()=>u,vC:()=>i})},9386:(e,t,n)=>{n.d(t,{P:()=>r});var o=n(1030);function r(e){return"edge"===e.type?(0,o.pick)(e,["type","source","target","data"]):(0,o.pick)(e,["type","id","data"])}},227:(e,t,n)=>{n.d(t,{Y:()=>r});var o=n(4197);function r(e,t,n,r){const i=[];if(t){const n=new Set;for(const o of e)"edge"===o.type&&o.source===t.source.id&&n.add(o.target);for(const t of e)switch(t.type){case"node":n.has(t.id)&&i.push(t);break;case"decorator":r&&"text"!=t.decorator&&!n.has(t.id)||i.push(t);break;default:i.push(t)}}else switch(null==n?void 0:n.type){case"multi":{const t=new Map,r=new Set,l=new Set;for(const e of n.targets)"node"===e.type&&(r.add(e.id),l.add(e.id));for(const a of e)"node"===a.type?t.set(a.id,a):"edge"===a.type?r.has(a.source)?l.add(a.target):r.has(a.target)?l.add(a.source):(0,o.Q)(a,n)||i.push(a):(0,o.Q)(a,n)||i.push(a);for(const[e,n]of t)l.has(e)||i.push(n);break}case"node":{const t=new Map,o=new Set([n.id]);for(const r of e)"node"===r.type?t.set(r.id,r):"edge"===r.type?r.source===n.id?o.add(r.target):r.target===n.id?o.add(r.source):i.push(r):i.push(r);for(const[e,n]of t)o.has(e)||i.push(n);break}case"edge":for(const t of e)("edge"===t.type?(0,o.Q)(t,n):"node"===t.type&&(t.id===n.source||t.id===n.target))||i.push(t)}return i}},5114:(e,t,n)=>{n.d(t,{a:()=>r});var o=n(4197);function r(e,t){let{cells:n,activeTarget:r}=t;const i=n.filter((e=>(0,o.Q)(e,r)));if(0!==i.length)switch(e.key||e.keyCode||e.which){case"Backspace":case 8:case"Delete":case 46:return e.preventDefault(),e.stopPropagation(),{action:"delete-cells",cells:i}}}},2219:(e,t,n)=>{function o(e,t){let{transform:n,offset:o,onLassoing:r,onLassoed:i}=t;if(e.ctrlKey||e.button)return;e.stopPropagation();const l=[e.clientX,e.clientY],a=(e.clientX-o[0]-n.x)/n.k,c=(e.clientY-o[1]-n.y)/n.k;let s=!1;const d=(e,t)=>{const o=function(e){return[(e.clientX-l[0])/n.k,(e.clientY-l[1])/n.k]}(e);if(s||(s=o[0]**2+o[1]**2>=9),s){let[e,n]=o,l=a,s=c;e<0&&(l=a+e,e=-e),n<0&&(s=c+n,n=-n),(t?i:r)({x:l,y:s,width:e,height:n})}},u=e=>{d(e)},v=e=>{d(e,!0),s=!1,document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",u),document.addEventListener("mouseup",v)}n.d(t,{F:()=>o})},1991:(e,t,n)=>{n.d(t,{_:()=>r});var o=n(531);function r(e,t,n){const r=t.filter((e=>(0,o.N)(e))),i=e.filter((e=>(0,o.t2)(e))).map((e=>e.id)),l=e.filter((e=>{const t=r.find((t=>t.id===e.id)),n=(null==t?void 0:t.containerId)&&i.includes(t.containerId);return(0,o.N)(e)&&!n}));l.forEach((e=>{const n=e.x,r=e.x+e.width,i=e.y,l=e.y+e.height,a=t.filter((e=>(0,o.t2)(e)));for(const t of a){const o=t.view.x,a=t.view.x+t.view.width,c=t.view.y,s=t.view.y+t.view.height;if(n>=o&&r<=a&&i>=c&&l<=s){e.containerCell=t;break}}}));let a=[];return a=l.filter((e=>{var t;const n=r.find((t=>t.id===e.id));return(null==n?void 0:n.containerId)!==(null===(t=e.containerCell)||void 0===t?void 0:t.id)})),a.length>0&&(null==n||n(a)),a}},3783:(e,t,n)=>{n.d(t,{C:()=>r});var o=n(531);function r(e,t){let{defaultNodeSize:n}=t;return(null!=e?e:[]).map((e=>{var t,r;return!(0,o.vC)(e)||void 0!==(null===(t=e.view)||void 0===t?void 0:t.width)&&void 0!==(null===(r=e.view)||void 0===r?void 0:r.height)?e:{...e,view:{width:n[0],height:n[1],...e.view}}}))}},8185:(e,t,n)=>{function o(e,t){return e?!!t&&e.type===t.type&&("multi"===e.type?e.targets.length===t.targets.length&&e.targets.every((e=>t.targets.some((t=>o(e,t))))):"node"===e.type||"decorator"===e.type?e.id===t.id:e.source===t.source&&e.target===t.target):!t}n.d(t,{c:()=>o})},4197:(e,t,n)=>{n.d(t,{Q:()=>r});var o=n(8185);function r(e,t){return!!t&&("multi"===t.type?t.targets:[t]).some((t=>(0,o.c)(t,e)))}},908:(e,t,n)=>{n.d(t,{r:()=>r});var o=n(531);function r(e,t){let{canvasWidth:n,canvasHeight:r,scaleRange:i}=t,l=1/0,a=1/0,c=-1/0,s=-1/0,d=!0;for(const t of e)if(!(0,o.WW)(t)){d=!1;const{view:e}=t,n=e.x+e.width,o=e.y+e.height;e.x<l&&(l=e.x),n>c&&(c=n),e.y<a&&(a=e.y),o>s&&(s=o)}const u=c-l,v=s-a,f=i&&!d&&(u>n||v>r)?Math.max(Math.min(n/u,r/v,i[1]),i[0]):1;return{x:d?0:(n-u*f)/2-l*f,y:d?0:(r-v*f)/2-a*f,k:f}}},2098:(e,t,n)=>{n.d(t,{L:()=>u});var o=n(1030),r=n(3033),i=n(531),l=n(3783),a=n(908),c=n(6170),s=n(9127),d=n(8185);function u(e){let{cells:t,layout:n,previousCells:u,defaultNodeSize:v,canvasWidth:f,canvasHeight:h,scaleRange:m,transform:g,reason:p,parent:y,allowEdgeToArea:w}=e;const x="force"!==n&&"dagre"!==n,E=(0,l.C)(t,{defaultNodeSize:v}),k=[];let b=!1;const C=new Map;let I=!1;for(const e of u)(0,i.mH)(e)?I=!0:(0,i.N)(e)&&(I=!0,e[r.CV]&&C.set(e.id,e));const S=new Map;for(const e of E)if((0,i.N)(e)){S.set(e.id,e);const t=C.get(e.id);t&&(e.view.width=t.view.width,e.view.height=t.view.height,e[r.CV]=!0)}let L=!1;if("add-related-nodes"===p&&y){const e=new Set;for(const t of E)(0,i.WW)(t)&&t.source===y&&t.target!==y&&e.add(t.target);const t=S.get(y);if(void 0!==(null==t?void 0:t.view.x)&&void 0!==t.view.y){if(L=!0,x)for(const t of E)((0,i.N)(t)&&void 0===t.view.x||(0,i.N)(t)&&void 0===t.view.y)&&e.add(t.id);const n=[...e].map((e=>S.get(e))).filter(Boolean);let o;for(const e of n)void 0!==e.view.x&&void 0!==e.view.y?(!o||e.view.x>o.view.x)&&e.view.y>t.view.y&&(o=e):k.push(e);if(k.length>0&&x){let e,n;if(o)e=o.view.x+o.view.width+r.Dm,n=o.view.y;else{const o=k.reduce(((e,t)=>e+t.view.width+r.Dm),-r.Dm);e=t.view.x-o/2+t.view.width/2,n=t.view.y+t.view.height+r.D9}for(const t of k)t.view.x=e,t.view.y=n,e+=t.view.width+r.Dm}}}if(!L){const e=[];let t=!1;for(const n of E)(0,i.N)(n)?void 0===n.view.x||void 0===n.view.y?k.push(n):e.push(n):(0,i.mH)(n)&&(t=!0);if(x){let n;I||(g=(0,a.r)((0,o.without)(E,...k),{canvasWidth:f,canvasHeight:h,scaleRange:m})),0===e.length||1===e.length&&!t&&k.length>0?(k.push(...e),({getNodeView:n}=(0,s.C)({cells:E,allowEdgeToArea:w})),b=0===u.length||u.length===E.length&&u.every(((e,t)=>(0,d.c)(e,E[t])))):({getNodeView:n}=(0,c.k)({cells:E,fixedPosition:!0,allowEdgeToArea:w,center:[(f/2-g.x)/g.k,(h/2-g.y)/g.k]}));for(const e of E)if((0,i.N)(e)){const t=n(e.id);e.view.x=t.x,e.view.y=t.y}}}return{cells:E,updated:k,shouldReCenter:b}}},5748:(e,t,n)=>{n.d(t,{d:()=>l});var o=n(531),r=n(3033);function i(e,t,n){const o=e.findLastIndex(n)+1;return[...e.slice(0,o),t,...e.slice(o)]}const l=(a={cells:(e,t)=>{switch(t.type){case"drop-node":return i(e,t.payload,(e=>!("decorator"===e.type&&"text"===e.decorator)));case"drop-decorator":return"text"===t.payload.decorator?[...e,t.payload]:i(e,t.payload,(e=>"decorator"===e.type&&"area"===e.decorator));case"add-nodes":{const n=e.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1;return[...e.slice(0,n),...t.payload,...e.slice(n)]}case"add-edge":{const n=e.findIndex((e=>"edge"===e.type&&e.source===t.payload.source&&e.target===t.payload.target));return-1===n?i(e,t.payload,(e=>"edge"===e.type||"decorator"===e.type&&"area"===e.decorator)):[...e.slice(0,n),t.payload,...e.slice(n+1)]}case"change-edge-view":{const n=e.findIndex((e=>"edge"===e.type&&e.source===t.payload.source&&e.target===t.payload.target));return-1===n?e:[...e.slice(0,n),{...e[n],view:{...e[n].view,...t.payload.view}},...e.slice(n+1)]}case"move-cells":{let n=!1;const o=e.map((e=>{const o=t.payload.find((t=>e.type===t.type&&e.id===t.id));return o?(n=!0,{...e,view:{...e.view,x:o.x,y:o.y}}):e}));return n?o:e}case"resize-cell":{const{type:n,id:o,width:r,height:i}=t.payload,l=e.findIndex((e=>e.type===n&&e.id===o));if(-1!==l){const t=e[l];return[...e.slice(0,l),{...t,view:{...t.view,width:r,height:i}},...e.slice(l+1)]}return e}case"update-cells":return t.payload;case"update-node-size":return e.map((e=>(0,o.N)(e)&&e.id===t.payload.id?{...e,[r.CV]:!0,view:t.payload.size?{...e.view,width:t.payload.size[0],height:t.payload.size[1]}:e.view}:e))}return e},layoutKey:(e,t)=>"update-node-size"===t.type?t.layoutKey:e},(e,t)=>Object.fromEntries(Object.entries(a).map((n=>{let[o,r]=n;return[o,r(e[o],t)]}))));var a},7099:(e,t,n)=>{n.d(t,{Y:()=>h});var o=n(8769),r=n.n(o),i=n(2588),l=n(6768),a=n(6313),c=n(5694),s=n(6235),d=n(9575);const u=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"},e),o.createElement("path",{d:"M12 0a.5.5 0 0 1 .5.5v2.013a9.5 9.5 0 0 1 8.987 8.988L23.5 11.5a.5.5 0 0 1 0 1h-2.013a9.5 9.5 0 0 1-8.987 8.987V23.5a.5.5 0 0 1-1 0v-2.013A9.5 9.5 0 0 1 2.514 12.5H.5a.5.5 0 0 1 0-1h2.013A9.5 9.5 0 0 1 11.5 2.514V.5A.5.5 0 0 1 12 0M3.514 11.5H7.5a.5.5 0 0 1 0 1H3.514a8.5 8.5 0 0 0 7.987 7.986L11.5 16.5a.5.5 0 0 1 1 0v3.986a8.5 8.5 0 0 0 7.986-7.986H16.5a.5.5 0 0 1 0-1h3.986A8.5 8.5 0 0 0 12.5 3.515V7.5a.5.5 0 0 1-1 0V3.514a8.5 8.5 0 0 0-7.986 7.987zm8.486-1a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3"})),v=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),o.createElement("path",{d:"M512 76.8A435.2 435.2 0 1 0 947.2 512 435.71 435.71 0 0 0 512 76.8m0 819.2a384 384 0 1 1 384-384 384 384 0 0 1-384 384"}),o.createElement("path",{d:"M744.448 486.4h-204.8V281.6a25.6 25.6 0 1 0-51.2 0v204.8h-204.8a25.6 25.6 0 0 0 0 51.2h204.8v204.8a25.6 25.6 0 0 0 51.2 0V537.6h204.8a25.6 25.6 0 0 0 0-51.2"})),f=e=>o.createElement("svg",(0,d.A)({xmlns:"http://www.w3.org/2000/svg",width:128,height:128,className:"icon",viewBox:"0 0 1024 1024"},e),o.createElement("path",{d:"M512 76.8A435.2 435.2 0 1 0 947.2 512 435.71 435.71 0 0 0 512 76.8m0 819.2a384 384 0 1 1 384-384 384 384 0 0 1-384 384"}),o.createElement("path",{d:"M744.448 486.4H280.064a25.6 25.6 0 1 0 0 51.2h464.384a25.6 25.6 0 0 0 0-51.2"}));function h(e){let{shadowRoot:t,scale:n,scaleRange:d,onZoomChange:h,onReCenter:m}=e;const g=(0,s.useCurrentTheme)(),p=(0,o.useMemo)((()=>(0,c.VC)()),[]),y=(0,o.useRef)(null),w=100*d[0],x=100*d[1],E=100*n,k=(0,o.useMemo)((()=>({formatter:e=>`${e}%`,placement:"left",getPopupContainer:()=>y.current})),[]),b=(0,o.useCallback)((()=>{h(Math.min(E+5,x))}),[x,h,E]),C=(0,o.useCallback)((()=>{h(Math.max(E-5,w))}),[w,h,E]);return r().createElement(i.Ay,{theme:{algorithm:"dark-v2"===g?l.A.darkAlgorithm:l.A.defaultAlgorithm}},r().createElement(c.N7,{container:t,autoClear:!0,cache:p,hashPriority:"high"},r().createElement("div",{className:"zoom-bar",ref:y},r().createElement("div",{className:"center-button",onClick:m,role:"button"},r().createElement(u,null)),r().createElement("div",{className:"zoom-slider"},r().createElement("div",{className:"zoom-button",role:"button",onClick:b},r().createElement(v,null)),r().createElement(a.A,{min:w,max:x,value:E,step:5,vertical:!0,included:!1,tooltip:k,onChange:h}),r().createElement("div",{className:"zoom-button",role:"button",onClick:C},r().createElement(f,null))))))}},9127:(e,t,n)=>{n.d(t,{C:()=>c});var o=n(1030),r=n(7586),i=n.n(r),l=n(8802),a=n(531);function c(e){let{cells:t,layoutOptions:n,allowEdgeToArea:r}=e;const{nodePadding:c,...s}={nodePadding:0,rankdir:"TB",ranksep:50,edgesep:10,nodesep:50,...(0,o.pick)(n,["nodePadding","rankdir","ranksep","edgesep","nodesep","align"])},d=(0,l.D)(c);if(!t.some(a.N))return{getNodeView:()=>null,nodePaddings:d};const u=new(i().graphlib.Graph);u.setGraph(s),u.setDefaultEdgeLabel((function(){return{}}));for(const e of t)r&&(0,a.o6)(e)||(0,a.N)(e)?u.setNode(e.id,{id:e.id,width:e.view.width+d[1]+d[3],height:e.view.height+d[0]+d[2]}):(0,a.WW)(e)&&u.setEdge(e.source,e.target);return i().layout(u),{getNodeView:e=>u.node(e),nodePaddings:d}}},6170:(e,t,n)=>{n.d(t,{k:()=>v});var o=n(1030),r=n(6149),i=n(4842),l=n(1945),a=n(9418),c=n(3854),s=n(7931),d=n(531),u=n(8802);function v(e){let{cells:t,layoutOptions:n,center:v,fixedPosition:f,allowEdgeToArea:h}=e;const{nodePadding:m,collide:g}={nodePadding:0,...(0,o.pick)(n,["nodePadding"]),collide:!1!==(null==n?void 0:n.collide)&&{radiusDiff:18,strength:1,iterations:1,...!0===(null==n?void 0:n.collide)?null:null==n?void 0:n.collide}},p=(0,u.D)(m),y=[],w=[],x=new Map;for(const e of t)if(h&&(0,d.o6)(e)||(0,d.N)(e)){const t={id:e.id,width:e.view.width+p[1]+p[3],height:e.view.height+p[0]+p[2],...f?{fx:e.view.x,fy:e.view.y}:null};y.push(t),x.set(t.id,t)}else(0,d.WW)(e)&&w.push({source:e.source,target:e.target});const E=(0,r.A)(w).id((e=>e.id)),k=(0,i.A)(y).force("link",E).force("x",(0,l.A)(null==v?void 0:v[0])).force("y",(0,a.A)(null==v?void 0:v[1])).force("charge",(0,c.A)());return g&&k.force("collide",(0,s.A)().radius((e=>Math.sqrt(e.width**2+e.height**2)/2+g.radiusDiff)).strength(g.strength).iterations(g.iterations)),k.stop(),function(e){e.tick(Math.ceil(Math.log(e.alphaMin())/Math.log(1-e.alphaDecay())))}(k),{getNodeView:e=>x.get(e),nodePaddings:p}}},967:(e,t,n)=>{n.d(t,{V:()=>u,P:()=>v});var o=n(1030),r=n(8875),i=n(4059);function l(e,t){return{x:e.x+e.width/2,y:e.y+e.height/2,width:e.width+t,height:e.height+t}}var a=n(3033),c=n(3188),s=n(531);const d=["right","top","left","bottom"];function u(e,t,n,u){var p,y,w,x,E,k;const{type:b,vertices:C,exitPosition:I,entryPosition:S}=null!=n?n:{};if((0,s.jw)(b))return(0,c.h)(l(e,I?a.XK:a.p6),l(t,S?a.XK:a.p6),u,n);if(null!=C&&C.length){const n=C[0],o=C[C.length-1];let r,i,l,a;if(I)r=h(e,I);else{let i;if(C.length>1?i=C[1]:S&&(i=h(t,S)),i)r=m(n,e,n.y===i.y);else{const n=o.y<t.y||o.y>t.y+t.height?"ns":"ew";({point:r,direction:l}=g(e,t,C,n))}}if(S)i=h(t,S);else{let r;if(C.length>1?r=C[C.length-2]:I&&(r=h(e,I)),r)i=m(o,t,o.y===r.y);else{const o=n.x<e.x||n.x>e.x+e.width?"ew":"ns";({point:i,direction:a}=g(t,e,C.slice().reverse(),o))}}const{x:c,y:s}=r,{x:d,y:u}=i,f=[r,...C,i],p=[...C];return n&&n.x!==c&&n.y!==s&&p.unshift("ns"===l?{x:c,y:n.y}:"ew"===l?{x:n.x,y:s}:n.x===f[2].x?{x:c,y:n.y}:{x:n.x,y:s}),o&&o.x!==d&&o.y!==u&&p.push("ns"===a?{x:d,y:o.y}:"ew"===a?{x:o.x,y:u}:o.x===f[f.length-3].x?{x:d,y:o.y}:{x:o.x,y:u}),[r,...v(r,p,i),i]}const L=null!=I?I:f(t,e),M=null!=S?S:f(e,t),{x:P,y:z}=h(e,L),{x:N,y:R}=h(t,M),A=(0,r.X)(),T=null!==(p=null===(y=A.find((e=>e.x===L.x&&e.y===L.y)))||void 0===y?void 0:y.d)&&void 0!==p?p:d,H=null!==(w=null===(x=A.find((e=>e.x===M.x&&e.y===M.y)))||void 0===x?void 0:x.d)&&void 0!==w?w:d,D=[...T],Z=[...H];P<N?((0,o.pull)(D,"left"),(0,o.pull)(Z,"right")):((0,o.pull)(D,"right"),(0,o.pull)(Z,"left")),z<R?((0,o.pull)(D,"top"),(0,o.pull)(Z,"bottom")):((0,o.pull)(D,"bottom"),(0,o.pull)(Z,"top"));const W=null!==(E=D[0])&&void 0!==E?E:T[0],j=null!==(k=Z[0])&&void 0!==k?k:H[0],B="left"===W||"right"===W?L.y:L.x,O="left"===j||"right"===j?M.y:M.x;return(0,i.o)(l(e,a.XK),l(t,a.XK),W,j,B,O)}function v(e,t,n){const o=[];let r,i=e,l=0;for(;l<t.length;){const e=t[l],a=e.x!==i.x,c=e.y!==i.y;if(a||c){const c=a?"ew":"ns";if(c!==r){const a=l===t.length-1?n:t[l+1],s=a.x!==e.x,d=a.y!==e.y;(s||d)&&c!==(s?"ew":"ns")&&(r=c,o.push(e),i=e)}}l++}return o}function f(e,t){return t.y+t.height<e.y?{x:.5,y:1}:t.y>e.y+e.height?{x:.5,y:0}:t.x<e.x?{x:1,y:.5}:{x:0,y:.5}}function h(e,t){const n=a.XK/2;return{x:e.x-n+t.x*(e.width+a.XK),y:e.y-n+t.y*(e.height+a.XK)}}function m(e,t,n){let o,r,i,l,c;if(n?(o="y",r="x",i="height",l="width"):(o="x",r="y",i="width",l="height"),t[r]+t[l]<e[r]&&(c={[o]:.5,[r]:1}),t[r]>e[r]&&(c={[o]:.5,[r]:0}),c)return h(t,c);const s=t[o]<e[o]?1:0;return{[o]:t[o]-a.XK/2+s*(t[i]+a.XK),[r]:e[r]}}function g(e,t,n,o){let r,i,l,a,c,s,d,u;"ns"===o?(l="x",a="y",c="width",s="height",d="ns",u="ew"):(l="y",a="x",c="height",s="width",d="ew",u="ns");const v=n[0];if(v[l]>=e[l]&&v[l]<=e[l]+e[c])if(v[a]>e[a]+e[s])r={[l]:v[l],[a]:e[a]+e[s]},i=d;else if(v[a]<e[a])r={[l]:v[l],[a]:e[a]},i=d;else{var f;const o=null!==(f=n[1])&&void 0!==f?f:t;r={[l]:v[l],[a]:o[a]<v[a]?v[a]:e[a]+e[s]},i=d}else v[a]<e[a]?(r={[l]:e[l]+e[c]/2,[a]:e[a]},i=d):v[a]>e[a]+e[s]?(r={[l]:e[l]+e[c]/2,[a]:e[a]+e[s]},i=d):v[l]<e[l]?(r={[l]:e[l],[a]:v[a]},i=u):(r={[l]:e[l]+e[c],[a]:v[a]},i=u);return{point:r,direction:i}}},8875:(e,t,n)=>{n.d(t,{G:()=>l,X:()=>i});const o=[{x:0,y:0,d:["top","left"]},{x:.5,y:0,d:["top"]},{x:1,y:0,d:["top","right"]},{x:0,y:.5,d:["left"]},{x:1,y:.5,d:["right"]},{x:0,y:1,d:["bottom","left"]},{x:.5,y:1,d:["bottom"]},{x:1,y:1,d:["bottom","right"]}],r=o.map((e=>({x:e.x,y:e.y})));function i(){return o}function l(){return r}},1819:(e,t,n)=>{n.d(t,{J:()=>i});var o=n(8769),r=n(8185);function i(e){let{rootRef:t,activeTarget:n,doNotResetActiveTargetForSelector:i,doNotResetActiveTargetOutsideCanvas:l,onActiveTargetChange:a}=e;const c=null!=n?n:null,[s,d]=(0,o.useState)(c);(0,o.useEffect)((()=>{d((e=>(0,r.c)(e,c)?e:c))}),[c]);const u=(0,o.useRef)(!1);return(0,o.useEffect)((()=>{u.current?a(s):u.current=!0}),[s,a]),(0,o.useEffect)((()=>{if(!s)return;const e=e=>{const n=e.composedPath(),o=n.indexOf(t.current);(l?0!==o:!(o<=0)||i&&n.some((e=>e instanceof Element&&e.matches(i))))||d(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}),[s,l,i,t]),s}},1484:(e,t,n)=>{n.d(t,{g:()=>f});var o=n(8769),r=n(7566),i=n(9047),l=n(3033),a=n(531),c=n(908),s=n(6170),d=n(9127);const u=new Map([["center",.5],["left",0],["right",1],["top",0],["bottom",1]]);function v(e,t){if("string"==typeof e){const n=u.get(e);if(void 0!==n)return n;const o=e.match(/^(-?\d+(?:\.\d+)?)%$/);if(o)return Number(o[1])/100;console.error("Unexpected align origin %s:",t,e)}else{if("number"==typeof e)return e;console.error("Unexpected align origin %s, expected %s, received %s:",t,"string | number",typeof e,e)}return.5}function f(e){let{layout:t,layoutOptions:n,rootRef:u,cells:f,zoomable:h,zoomer:m,scaleRange:g,layoutKey:p,allowEdgeToArea:y,autoCenterWhenCellsChange:w,dispatch:x}=e;const[E,k]=(0,o.useState)("force"!==t&&"dagre"!==t),b=(0,o.useRef)(p),C=(0,o.useCallback)((()=>++b.current),[]),[I,S]=function(e){let{rootRef:t,cells:n,layoutInitialized:s,zoomable:d,zoomer:u,scaleRange:v,autoCenterWhenCellsChange:f}=e;const[h,m]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{n.some((e=>(0,a.N)(e)||(0,a.mH)(e)))&&!f||m(!1)}),[n,f]),(0,o.useEffect)((()=>{const e=t.current;if(!e||!s||h||!n.some((e=>(0,a.N)(e)||(0,a.mH)(e)))||n.some((e=>(0,a.N)(e)&&!e[l.CV])))return;const{k:o,x:f,y:g}=(0,c.r)(n,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:d?v:void 0});u.transform((0,r.A)(e),new i.uV(o,f,g)),m(!0)}),[n,h,s,t,v,d,u]),[h,m]}({rootRef:u,layoutInitialized:E,cells:f,zoomable:h,zoomer:m,scaleRange:g,autoCenterWhenCellsChange:w}),L=(0,o.useRef)(null);return(0,o.useEffect)((()=>{if(f.some((e=>(0,a.N)(e)&&!e[l.CV]))||0===f.length)return;if("force"!==t&&"dagre"!==t)return void k(!0);if(b.current!==p||(e=L.current,o=f.filter(a.nv),(null==e?void 0:e.length)===o.length&&e.every(((e,t)=>e===o[t]))))return;var e,o;let r,i;({getNodeView:r,nodePaddings:i}="force"===t?(0,s.k)({cells:f,layoutOptions:n,allowEdgeToArea:y}):(0,d.C)({cells:f,layoutOptions:n,allowEdgeToArea:y}));const c=function(e){const t=null!=e?e:[.5,.5];return[v(t[0],"x"),v(t[1],"y")]}(null==n?void 0:n.alignOrigin),u=f.map((e=>{if(y&&(0,a.o6)(e)||(0,a.N)(e)){const t=r(e.id);return{...e,view:{...e.view,x:t.x-t.width*c[0]+i[3],y:t.y-t.height*c[1]+i[0]},[l.xc]:!0}}return e}));L.current=u.filter(a.nv),x({type:"update-cells",payload:u}),k(!0)}),[f,x,t,p,n]),{centered:I,setCentered:S,getNextLayoutKey:C}}},7531:(e,t,n)=>{n.d(t,{I:()=>s,d:()=>c});var o=n(8769),r=n(4899),i=n(1030),l=n(531),a=n(3033);function c(e){let{cells:t,defaultEdgeLines:n,markerPrefix:c,lineConnector:v}=e;return(0,o.useMemo)((()=>{const e=[{strokeColor:a.mF,markerType:"arrow"}];let o=null;if(v){o={...u(),editingStrokeColor:"var(--palette-blue-5)",...(0,i.omitBy)(!0===v?{}:v,i.isUndefined)};const t=s(o);for(const n of t){const{placement:t,type:r}=n,i=null!=r?r:"arrow",l=d({strokeColor:o.strokeColor,markerType:i},e),a=d({strokeColor:o.editingStrokeColor,markerType:i},e);"start"===t?(o.$markerStartUrl=`url(#${c}${l})`,o.$editingStartMarkerUrl=`url(#${c}${a})`):(o.$markerEndUrl=`url(#${c}${l})`,o.$editingEndMarkerUrl=`url(#${c}${a})`)}}const f=new WeakMap;for(const o of t)if((0,l.WW)(o)){var h,m;const t=null!==(h=Array.isArray(n)?r.__secret_internals.legacyDoTransform({edge:o},n.find((e=>(0,r.checkIfByTransform)(e,{edge:o})))):null===(m=r.__secret_internals.legacyDoTransform({edge:o},n))||void 0===m?void 0:m.find((e=>(0,r.checkIfOfComputed)(e))))&&void 0!==h?h:{},l={...u(),...(0,i.omitBy)(t,i.isUndefined),...(0,i.omitBy)(o.view,i.isUndefined)};void 0===l.parallelGap&&(l.parallelGap=l.interactStrokeWidth);const a=s(l);for(const t of a){const{placement:n,type:o}=t,r=null!=o?o:"arrow",i=d({strokeColor:l.strokeColor,markerType:r},e);"start"===n?l.$markerStartUrl=`url(#${c}${i})`:l.$markerEndUrl=`url(#${c}${i})`}f.set(o,l)}return{lineConfMap:f,lineConnectorConf:o,markers:e}}),[t,n,v,c])}function s(e){let t=[];return e.markers?t=e.markers:(e.showStartArrow&&t.push({type:"arrow",placement:"start"}),e.showEndArrow&&t.push({type:"arrow",placement:"end"})),t}function d(e,t){let n=(0,i.findIndex)(t,e);return-1===n&&(n=t.push(e)-1),n}function u(){return{type:"straight",dashed:!1,strokeColor:a.mF,strokeWidth:a.VO,interactStrokeWidth:a.Ie,showStartArrow:a.XV,showEndArrow:a.Ub,animate:{useAnimate:!1,duration:a.Be}}}},8197:(e,t,n)=>{n.d(t,{H:()=>l});var o=n(8769),r=n(531),i=n(3033);function l(e){let{cells:t,layout:n,centered:l}=e;return(0,o.useMemo)((()=>l&&t.every((e=>!(0,r.N)(e)||e[i.CV]&&("force"!==n&&"dagre"!==n||e[i.xc])))),[t,l,n])}},8091:(e,t,n)=>{n.d(t,{f:()=>v});var o,r,i,l=n(8769),a=n(7566),c=n(9047),s=n(3033);const d=/mac/i.test(null!==(o=null!==(r=null===(i=navigator.userAgentData)||void 0===i?void 0:i.platform)&&void 0!==r?r:navigator.platform)&&void 0!==o?o:navigator.userAgent);function u(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey&&d?10:1)}function v(e){let{rootRef:t,zoomable:n,scrollable:o,pannable:r,draggable:i,ctrlDraggable:d,scaleRange:v,onSwitchActiveTarget:f}=e;const[h,m]=(0,l.useState)(!1),[g,p]=(0,l.useState)({k:1,x:0,y:0}),y=(0,l.useMemo)((()=>null!=v?v:[s.sS,s.Yt]),[v]),w=(0,l.useMemo)((()=>(0,c.s_)().wheelDelta(u)),[]);return(0,l.useEffect)((()=>{let e=!1;w.scaleExtent(n?y:[1,1]).on("start",(()=>{e=!1,m(!0)})).on("zoom",(t=>{e=!0,p(t.transform)})).on("end",(()=>{m(!1),e||null==f||f(null)})).filter((e=>("wheel"===e.type||(d?i||e.ctrlKey:!e.ctrlKey))&&!e.button))}),[f,y,n,w,d,i]),(0,l.useEffect)((()=>{if(d){const e=e=>{e.ctrlKey&&e.preventDefault()};return document.addEventListener("contextmenu",e,!0),()=>{document.removeEventListener("contextmenu",e,!0)}}}),[d]),(0,l.useEffect)((()=>{const e=t.current;if(!e)return;const l=(0,a.A)(e),c=()=>{l.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(n||o||r)return(n||o)&&l.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),o&&(e.preventDefault(),w.translateBy(l,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),l.call(w).on("wheel",(e=>{e.preventDefault()})).on("dblclick.zoom",null),(i||d)&&r||l.on("mousedown.zoom",null),r||l.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),c;c()}),[d,i,r,t,o,n,w]),{grabbing:h,transform:g,zoomer:w,scaleRange:y}}},6237:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(6758),r=n.n(o),i=n(935),l=n.n(i)()(r());l.push([e.id,'.zoom-bar{position:absolute;bottom:20px;right:20px;width:40px;scale:0.8}.zoom-slider,\n.center-button{width:100%;display:flex;align-items:center;border:1px solid var(--antd-background-color-base);border-radius:var(--larger-border-radius);box-shadow:var(--connected-overlay-shadow);background-color:var(--color-fill-bg-container-4)}.zoom-slider{height:140px;padding:8px 0;flex-direction:column}[role="button"]{cursor:pointer}.center-button{justify-content:center;margin-bottom:8px;height:40px}.center-button:hover{border-color:var(--antd-btn-default-hover-border-color)}.center-button path{fill:var(--antd-link-hover-color)}.center-button:hover path{fill:var(--palette-blue-7)}.zoom-button{font-size:16px;line-height:0}.zoom-button svg{width:1em;height:1em;fill:var(--antd-link-hover-color)}.zoom-slider .ant-slider-vertical{padding-left:5px;padding-right:5px}.zoom-slider .ant-slider-vertical .ant-slider-rail{width:2px}.zoom-slider .ant-slider-vertical .ant-slider-handle{width:6px;height:6px;left:3px}.zoom-slider .ant-slider .ant-slider-handle:hover::before,\n.zoom-slider .ant-slider .ant-slider-handle:focus::before,\n.zoom-slider .ant-slider .ant-slider-handle::before{width:10px;height:10px;left:-2px}.zoom-slider .ant-slider .ant-slider-handle:hover::after,\n.zoom-slider .ant-slider .ant-slider-handle:focus::after,\n.zoom-slider .ant-slider .ant-slider-handle::after{width:6px;height:6px;top:0;left:0}',""]);const a=l.toString()},3012:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(6758),r=n.n(o),i=n(935),l=n.n(i)()(r());l.push([e.id,"*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden;--animation-dasharray:48;--stroke-dashedoffset:96;--stroke-dottedoffset:24;--dasharray:4;--dotted:1}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root{opacity:0}.root.ready{opacity:1}.root:focus{outline:none}@keyframes solidAnimation{to{stroke-dashoffset:0}}@keyframes dashedAnimation{0%{stroke-dashoffset:var(--stroke-dashedoffset)}to{stroke-dashoffset:0}}@keyframes dottedAnimation{0%{stroke-dashoffset:var(--stroke-dottedoffset)}to{stroke-dashoffset:0}}.solid-animation{stroke-dasharray:var(--solid-length);stroke-dashoffset:var(--solid-length);animation:solidAnimation var(--time) linear infinite}.dashed-animation{animation:dashedAnimation var(--time) linear infinite}.dotted-animation{animation:dottedAnimation var(--time) linear infinite}.decorator-area .area,\n.decorator-container .container{fill:rgba(119,141,195,0.1);stroke:none;stroke-width:0}.node,\n.decorator-text{overflow:visible}.cell.active .decorator-area .area,\n.cell.active .decorator-container .container,\n.cell:not(.read-only) .decorator-container .container:hover,\n.allowEdgeToArea .decorator-area .area:hover,\n.cell.active .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:var(--dasharray);stroke-width:1}.container-active .decorator-container .container{stroke:var(--palette-blue-5);stroke-width:1}.cell:not(.read-only){-webkit-user-select:none;user-select:none}.resize-handle{cursor:nwse-resize;opacity:0}.resize-handle rect{fill:transparent;stroke:none}.resize-handle path{fill:none;stroke:var(--palette-gray-5);stroke-width:1.5}.cell.active .decorator-area .resize-handle,\n.decorator-area:hover .resize-handle,\n.decorator-container:hover .resize-handle{opacity:1}.connect-line{pointer-events:none}.connect-line:not(.connecting){display:none}.editing-line{pointer-events:none;stroke-dasharray:var(--dasharray);stroke-width:1}.editing-line:not(.editing){display:none}.line.dashed{stroke-dasharray:var(--dasharray)}.line.dotted{stroke-dasharray:var(--dotted)}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}.cell.faded{opacity:0.3}.cell.container-active{opacity:1}.cell .node{pointer-events:none}.cell .node > *{position:fixed;pointer-events:auto}.degraded{pointer-events:bounding-box}.degraded circle{fill:rgb(119,141,195)}.degraded text{text-anchor:middle;fill:var(--antd-text-color)}.cell.active .degraded circle,\n.cell.active .degraded text,\n.degraded:hover circle,\n.degraded:hover text{fill:var(--color-brand)}.decorator-container{--defaultSize:24px}.decorator-container .text-container{display:flex;align-items:center;justify-content:center;padding:0.5em;text-align:center;font-size:16px;background-color:rgba(119,141,195,0.6);overflow:hidden}.decorator-container .horizontal{height:max-content;width:100%}.decorator-container .horizontal .text{min-height:var(--defaultSize)}.decorator-container .vertical{width:max-content;height:100%;writing-mode:vertical-lr;-webkit-text-orientation:upright;text-orientation:upright;letter-spacing:4px}.decorator-container .vertical .text{min-width:var(--defaultSize)}.line-label-container{overflow:visible;opacity:0}.line-label-container.ready{opacity:1}.line-label{position:absolute;display:block;transform:translate(-50%,-50%);white-space:pre-line;width:max-content;text-align:center}.line-label.text{font-size:11px;color:var(--color-secondary-text);font-weight:400;line-height:1.63636364}",""]);const a=l.toString()}}]);
2
- //# sourceMappingURL=2867.5eea22a8.js.map