@liduchuan/atlas-loop 0.0.0-stage → 0.1.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.
@@ -0,0 +1,1385 @@
1
+ <!DOCTYPE html>
2
+ <html lang="__ATLAS_HTML_LANG__">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>__ATLAS_HTML_TITLE__</title>
7
+ <style>/* this gets exported as style.css and can be used for the default theming */
8
+ /* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
9
+ .react-flow {
10
+ direction: ltr;
11
+
12
+ --xy-edge-stroke-default: #b1b1b7;
13
+ --xy-edge-stroke-width-default: 1;
14
+ --xy-edge-stroke-selected-default: #555;
15
+
16
+ --xy-connectionline-stroke-default: #b1b1b7;
17
+ --xy-connectionline-stroke-width-default: 1;
18
+
19
+ --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);
20
+
21
+ --xy-minimap-background-color-default: #fff;
22
+ --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);
23
+ --xy-minimap-mask-stroke-color-default: transparent;
24
+ --xy-minimap-mask-stroke-width-default: 1;
25
+ --xy-minimap-node-background-color-default: #e2e2e2;
26
+ --xy-minimap-node-stroke-color-default: transparent;
27
+ --xy-minimap-node-stroke-width-default: 2;
28
+
29
+ --xy-background-color-default: transparent;
30
+ --xy-background-pattern-dots-color-default: #91919a;
31
+ --xy-background-pattern-lines-color-default: #eee;
32
+ --xy-background-pattern-cross-color-default: #e2e2e2;
33
+ background-color: var(--xy-background-color, var(--xy-background-color-default));
34
+ --xy-node-color-default: inherit;
35
+ --xy-node-border-default: 1px solid #1a192b;
36
+ --xy-node-background-color-default: #fff;
37
+ --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
38
+ --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
39
+ --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;
40
+ --xy-node-border-radius-default: 3px;
41
+
42
+ --xy-handle-background-color-default: #1a192b;
43
+ --xy-handle-border-color-default: #fff;
44
+
45
+ --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);
46
+ --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);
47
+
48
+ --xy-controls-button-background-color-default: #fefefe;
49
+ --xy-controls-button-background-color-hover-default: #f4f4f4;
50
+ --xy-controls-button-color-default: inherit;
51
+ --xy-controls-button-color-hover-default: inherit;
52
+ --xy-controls-button-border-color-default: #eee;
53
+ --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);
54
+
55
+ --xy-edge-label-background-color-default: #ffffff;
56
+ --xy-edge-label-color-default: inherit;
57
+ --xy-resize-background-color-default: #3367d9;
58
+ }
59
+ .react-flow.dark {
60
+ --xy-edge-stroke-default: #3e3e3e;
61
+ --xy-edge-stroke-width-default: 1;
62
+ --xy-edge-stroke-selected-default: #727272;
63
+
64
+ --xy-connectionline-stroke-default: #b1b1b7;
65
+ --xy-connectionline-stroke-width-default: 1;
66
+
67
+ --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);
68
+
69
+ --xy-minimap-background-color-default: #141414;
70
+ --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);
71
+ --xy-minimap-mask-stroke-color-default: transparent;
72
+ --xy-minimap-mask-stroke-width-default: 1;
73
+ --xy-minimap-node-background-color-default: #2b2b2b;
74
+ --xy-minimap-node-stroke-color-default: transparent;
75
+ --xy-minimap-node-stroke-width-default: 2;
76
+
77
+ --xy-background-color-default: #141414;
78
+ --xy-background-pattern-dots-color-default: #555;
79
+ --xy-background-pattern-lines-color-default: #333;
80
+ --xy-background-pattern-cross-color-default: #333;
81
+ --xy-node-color-default: #f8f8f8;
82
+ --xy-node-border-default: 1px solid #3c3c3c;
83
+ --xy-node-background-color-default: #1e1e1e;
84
+ --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
85
+ --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);
86
+ --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;
87
+
88
+ --xy-handle-background-color-default: #bebebe;
89
+ --xy-handle-border-color-default: #1e1e1e;
90
+
91
+ --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);
92
+ --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);
93
+
94
+ --xy-controls-button-background-color-default: #2b2b2b;
95
+ --xy-controls-button-background-color-hover-default: #3e3e3e;
96
+ --xy-controls-button-color-default: #f8f8f8;
97
+ --xy-controls-button-color-hover-default: #fff;
98
+ --xy-controls-button-border-color-default: #5b5b5b;
99
+ --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);
100
+
101
+ --xy-edge-label-background-color-default: #141414;
102
+ --xy-edge-label-color-default: #f8f8f8;
103
+ }
104
+ .react-flow__background {
105
+ background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));
106
+ pointer-events: none;
107
+ z-index: -1;
108
+ }
109
+ .react-flow__container {
110
+ position: absolute;
111
+ width: 100%;
112
+ height: 100%;
113
+ top: 0;
114
+ left: 0;
115
+ }
116
+ .react-flow__pane {
117
+ z-index: 1;
118
+ touch-action: none;
119
+ }
120
+ .react-flow__pane.draggable {
121
+ cursor: grab;
122
+ }
123
+ .react-flow__pane.dragging {
124
+ cursor: grabbing;
125
+ }
126
+ .react-flow__pane.selection {
127
+ cursor: pointer;
128
+ }
129
+ .react-flow__viewport {
130
+ transform-origin: 0 0;
131
+ z-index: 2;
132
+ pointer-events: none;
133
+ }
134
+ .react-flow__renderer {
135
+ z-index: 4;
136
+ }
137
+ .react-flow__selection {
138
+ z-index: 6;
139
+ }
140
+ .react-flow__nodesselection-rect:focus,
141
+ .react-flow__nodesselection-rect:focus-visible {
142
+ outline: none;
143
+ }
144
+ .react-flow__edge-path {
145
+ stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
146
+ stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));
147
+ fill: none;
148
+ }
149
+ .react-flow__connection-path {
150
+ stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));
151
+ stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));
152
+ fill: none;
153
+ }
154
+ .react-flow .react-flow__edges {
155
+ position: absolute;
156
+ }
157
+ .react-flow .react-flow__edges svg {
158
+ overflow: visible;
159
+ position: absolute;
160
+ pointer-events: none;
161
+ }
162
+ .react-flow__edge {
163
+ pointer-events: visibleStroke;
164
+ }
165
+ .react-flow__edge.selectable {
166
+ cursor: pointer;
167
+ }
168
+ .react-flow__edge.animated path {
169
+ stroke-dasharray: 5;
170
+ animation: dashdraw 0.5s linear infinite;
171
+ }
172
+ .react-flow__edge.animated path.react-flow__edge-interaction {
173
+ stroke-dasharray: none;
174
+ animation: none;
175
+ }
176
+ .react-flow__edge.inactive {
177
+ pointer-events: none;
178
+ }
179
+ .react-flow__edge.selected,
180
+ .react-flow__edge:focus,
181
+ .react-flow__edge:focus-visible {
182
+ outline: none;
183
+ }
184
+ .react-flow__edge.selected .react-flow__edge-path,
185
+ .react-flow__edge.selectable:focus .react-flow__edge-path,
186
+ .react-flow__edge.selectable:focus-visible .react-flow__edge-path {
187
+ stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));
188
+ }
189
+ .react-flow__edge-textwrapper {
190
+ pointer-events: all;
191
+ }
192
+ .react-flow__edge .react-flow__edge-text {
193
+ pointer-events: none;
194
+ -webkit-user-select: none;
195
+ -moz-user-select: none;
196
+ user-select: none;
197
+ }
198
+ /* Arrowhead marker styles - use CSS custom properties as default */
199
+ .react-flow__arrowhead polyline {
200
+ stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
201
+ }
202
+ .react-flow__arrowhead polyline.arrowclosed {
203
+ fill: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
204
+ }
205
+ .react-flow__connection {
206
+ pointer-events: none;
207
+ }
208
+ .react-flow__connection .animated {
209
+ stroke-dasharray: 5;
210
+ animation: dashdraw 0.5s linear infinite;
211
+ }
212
+ svg.react-flow__connectionline {
213
+ z-index: 1001;
214
+ overflow: visible;
215
+ position: absolute;
216
+ }
217
+ .react-flow__nodes {
218
+ pointer-events: none;
219
+ transform-origin: 0 0;
220
+ }
221
+ .react-flow__node {
222
+ position: absolute;
223
+ -webkit-user-select: none;
224
+ -moz-user-select: none;
225
+ user-select: none;
226
+ pointer-events: all;
227
+ transform-origin: 0 0;
228
+ box-sizing: border-box;
229
+ cursor: default;
230
+ }
231
+ .react-flow__node.selectable {
232
+ cursor: pointer;
233
+ }
234
+ .react-flow__node.draggable {
235
+ cursor: grab;
236
+ pointer-events: all;
237
+ }
238
+ .react-flow__node.draggable.dragging {
239
+ cursor: grabbing;
240
+ }
241
+ .react-flow__nodesselection {
242
+ z-index: 3;
243
+ transform-origin: left top;
244
+ pointer-events: none;
245
+ }
246
+ .react-flow__nodesselection-rect {
247
+ position: absolute;
248
+ pointer-events: all;
249
+ cursor: grab;
250
+ }
251
+ .react-flow__handle {
252
+ position: absolute;
253
+ pointer-events: none;
254
+ min-width: 5px;
255
+ min-height: 5px;
256
+ width: 6px;
257
+ height: 6px;
258
+ background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));
259
+ border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));
260
+ border-radius: 100%;
261
+ }
262
+ .react-flow__handle.connectingfrom {
263
+ pointer-events: all;
264
+ }
265
+ .react-flow__handle.connectionindicator {
266
+ pointer-events: all;
267
+ cursor: crosshair;
268
+ }
269
+ .react-flow__handle-bottom {
270
+ top: auto;
271
+ left: 50%;
272
+ bottom: 0;
273
+ transform: translate(-50%, 50%);
274
+ }
275
+ .react-flow__handle-top {
276
+ top: 0;
277
+ left: 50%;
278
+ transform: translate(-50%, -50%);
279
+ }
280
+ .react-flow__handle-left {
281
+ top: 50%;
282
+ left: 0;
283
+ transform: translate(-50%, -50%);
284
+ }
285
+ .react-flow__handle-right {
286
+ top: 50%;
287
+ right: 0;
288
+ transform: translate(50%, -50%);
289
+ }
290
+ .react-flow__edgeupdater {
291
+ cursor: move;
292
+ pointer-events: all;
293
+ }
294
+ .react-flow__pane.selection .react-flow__panel {
295
+ pointer-events: none;
296
+ }
297
+ .react-flow__panel {
298
+ position: absolute;
299
+ z-index: 5;
300
+ margin: 15px;
301
+ }
302
+ .react-flow__panel.top {
303
+ top: 0;
304
+ }
305
+ .react-flow__panel.bottom {
306
+ bottom: 0;
307
+ }
308
+ .react-flow__panel.top.center, .react-flow__panel.bottom.center {
309
+ left: 50%;
310
+ transform: translateX(-15px) translateX(-50%);
311
+ }
312
+ .react-flow__panel.left {
313
+ left: 0;
314
+ }
315
+ .react-flow__panel.right {
316
+ right: 0;
317
+ }
318
+ .react-flow__panel.left.center, .react-flow__panel.right.center {
319
+ top: 50%;
320
+ transform: translateY(-15px) translateY(-50%);
321
+ }
322
+ .react-flow__attribution {
323
+ font-size: 10px;
324
+ background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));
325
+ padding: 2px 3px;
326
+ margin: 0;
327
+ }
328
+ .react-flow__attribution a {
329
+ text-decoration: none;
330
+ color: #999;
331
+ }
332
+ @keyframes dashdraw {
333
+ from {
334
+ stroke-dashoffset: 10;
335
+ }
336
+ }
337
+ .react-flow__edgelabel-renderer {
338
+ position: absolute;
339
+ width: 100%;
340
+ height: 100%;
341
+ pointer-events: none;
342
+ -webkit-user-select: none;
343
+ -moz-user-select: none;
344
+ user-select: none;
345
+ left: 0;
346
+ top: 0;
347
+ }
348
+ .react-flow__viewport-portal {
349
+ position: absolute;
350
+ width: 100%;
351
+ height: 100%;
352
+ left: 0;
353
+ top: 0;
354
+ -webkit-user-select: none;
355
+ -moz-user-select: none;
356
+ user-select: none;
357
+ }
358
+ .react-flow__minimap {
359
+ background: var(
360
+ --xy-minimap-background-color-props,
361
+ var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))
362
+ );
363
+ }
364
+ .react-flow__minimap-svg {
365
+ display: block;
366
+ }
367
+ .react-flow__minimap-mask {
368
+ fill: var(
369
+ --xy-minimap-mask-background-color-props,
370
+ var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))
371
+ );
372
+ stroke: var(
373
+ --xy-minimap-mask-stroke-color-props,
374
+ var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))
375
+ );
376
+ stroke-width: var(
377
+ --xy-minimap-mask-stroke-width-props,
378
+ var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))
379
+ );
380
+ }
381
+ .react-flow__minimap-node {
382
+ fill: var(
383
+ --xy-minimap-node-background-color-props,
384
+ var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))
385
+ );
386
+ stroke: var(
387
+ --xy-minimap-node-stroke-color-props,
388
+ var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))
389
+ );
390
+ stroke-width: var(
391
+ --xy-minimap-node-stroke-width-props,
392
+ var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))
393
+ );
394
+ }
395
+ .react-flow__background-pattern.dots {
396
+ fill: var(
397
+ --xy-background-pattern-color-props,
398
+ var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))
399
+ );
400
+ }
401
+ .react-flow__background-pattern.lines {
402
+ stroke: var(
403
+ --xy-background-pattern-color-props,
404
+ var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))
405
+ );
406
+ }
407
+ .react-flow__background-pattern.cross {
408
+ stroke: var(
409
+ --xy-background-pattern-color-props,
410
+ var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))
411
+ );
412
+ }
413
+ .react-flow__controls {
414
+ display: flex;
415
+ flex-direction: column;
416
+ box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));
417
+ }
418
+ .react-flow__controls.horizontal {
419
+ flex-direction: row;
420
+ }
421
+ .react-flow__controls-button {
422
+ display: flex;
423
+ justify-content: center;
424
+ align-items: center;
425
+ height: 26px;
426
+ width: 26px;
427
+ padding: 4px;
428
+ border: none;
429
+ background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));
430
+ border-bottom: 1px solid
431
+ var(
432
+ --xy-controls-button-border-color-props,
433
+ var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
434
+ );
435
+ color: var(
436
+ --xy-controls-button-color-props,
437
+ var(--xy-controls-button-color, var(--xy-controls-button-color-default))
438
+ );
439
+ cursor: pointer;
440
+ -webkit-user-select: none;
441
+ -moz-user-select: none;
442
+ user-select: none;
443
+ }
444
+ .react-flow__controls-button svg {
445
+ width: 100%;
446
+ max-width: 12px;
447
+ max-height: 12px;
448
+ fill: currentColor;
449
+ }
450
+ .react-flow__edge.updating .react-flow__edge-path {
451
+ stroke: #777;
452
+ }
453
+ .react-flow__edge-text {
454
+ font-size: 10px;
455
+ }
456
+ .react-flow__node.selectable:focus,
457
+ .react-flow__node.selectable:focus-visible {
458
+ outline: none;
459
+ }
460
+ .react-flow__node-input,
461
+ .react-flow__node-default,
462
+ .react-flow__node-output,
463
+ .react-flow__node-group {
464
+ padding: 10px;
465
+ border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));
466
+ width: 150px;
467
+ font-size: 12px;
468
+ color: var(--xy-node-color, var(--xy-node-color-default));
469
+ text-align: center;
470
+ border: var(--xy-node-border, var(--xy-node-border-default));
471
+ background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));
472
+ }
473
+ .react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
474
+ box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));
475
+ }
476
+ .react-flow__node-input.selectable.selected,
477
+ .react-flow__node-input.selectable:focus,
478
+ .react-flow__node-input.selectable:focus-visible,
479
+ .react-flow__node-default.selectable.selected,
480
+ .react-flow__node-default.selectable:focus,
481
+ .react-flow__node-default.selectable:focus-visible,
482
+ .react-flow__node-output.selectable.selected,
483
+ .react-flow__node-output.selectable:focus,
484
+ .react-flow__node-output.selectable:focus-visible,
485
+ .react-flow__node-group.selectable.selected,
486
+ .react-flow__node-group.selectable:focus,
487
+ .react-flow__node-group.selectable:focus-visible {
488
+ box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));
489
+ }
490
+ .react-flow__node-group {
491
+ background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));
492
+ }
493
+ .react-flow__nodesselection-rect,
494
+ .react-flow__selection {
495
+ background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));
496
+ border: var(--xy-selection-border, var(--xy-selection-border-default));
497
+ }
498
+ .react-flow__nodesselection-rect:focus,
499
+ .react-flow__nodesselection-rect:focus-visible,
500
+ .react-flow__selection:focus,
501
+ .react-flow__selection:focus-visible {
502
+ outline: none;
503
+ }
504
+ .react-flow__controls-button:hover {
505
+ background: var(
506
+ --xy-controls-button-background-color-hover-props,
507
+ var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))
508
+ );
509
+ color: var(
510
+ --xy-controls-button-color-hover-props,
511
+ var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))
512
+ );
513
+ }
514
+ .react-flow__controls-button:disabled {
515
+ pointer-events: none;
516
+ }
517
+ .react-flow__controls-button:disabled svg {
518
+ fill-opacity: 0.4;
519
+ }
520
+ .react-flow__controls-button:last-child {
521
+ border-bottom: none;
522
+ }
523
+ .react-flow__controls.horizontal .react-flow__controls-button {
524
+ border-bottom: none;
525
+ border-right: 1px solid
526
+ var(
527
+ --xy-controls-button-border-color-props,
528
+ var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
529
+ );
530
+ }
531
+ .react-flow__controls.horizontal .react-flow__controls-button:last-child {
532
+ border-right: none;
533
+ }
534
+ .react-flow__resize-control {
535
+ position: absolute;
536
+ }
537
+ .react-flow__resize-control.left,
538
+ .react-flow__resize-control.right {
539
+ cursor: ew-resize;
540
+ }
541
+ .react-flow__resize-control.top,
542
+ .react-flow__resize-control.bottom {
543
+ cursor: ns-resize;
544
+ }
545
+ .react-flow__resize-control.top.left,
546
+ .react-flow__resize-control.bottom.right {
547
+ cursor: nwse-resize;
548
+ }
549
+ .react-flow__resize-control.bottom.left,
550
+ .react-flow__resize-control.top.right {
551
+ cursor: nesw-resize;
552
+ }
553
+ /* handle styles */
554
+ .react-flow__resize-control.handle {
555
+ width: 5px;
556
+ height: 5px;
557
+ border: 1px solid #fff;
558
+ border-radius: 1px;
559
+ background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
560
+ translate: -50% -50%;
561
+ }
562
+ .react-flow__resize-control.handle.left {
563
+ left: 0;
564
+ top: 50%;
565
+ }
566
+ .react-flow__resize-control.handle.right {
567
+ left: 100%;
568
+ top: 50%;
569
+ }
570
+ .react-flow__resize-control.handle.top {
571
+ left: 50%;
572
+ top: 0;
573
+ }
574
+ .react-flow__resize-control.handle.bottom {
575
+ left: 50%;
576
+ top: 100%;
577
+ }
578
+ .react-flow__resize-control.handle.top.left {
579
+ left: 0;
580
+ }
581
+ .react-flow__resize-control.handle.bottom.left {
582
+ left: 0;
583
+ }
584
+ .react-flow__resize-control.handle.top.right {
585
+ left: 100%;
586
+ }
587
+ .react-flow__resize-control.handle.bottom.right {
588
+ left: 100%;
589
+ }
590
+ /* line styles */
591
+ .react-flow__resize-control.line {
592
+ border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
593
+ border-width: 0;
594
+ border-style: solid;
595
+ }
596
+ .react-flow__resize-control.line.left,
597
+ .react-flow__resize-control.line.right {
598
+ width: 1px;
599
+ transform: translate(-50%, 0);
600
+ top: 0;
601
+ height: 100%;
602
+ }
603
+ .react-flow__resize-control.line.left {
604
+ left: 0;
605
+ border-left-width: 1px;
606
+ }
607
+ .react-flow__resize-control.line.right {
608
+ left: 100%;
609
+ border-right-width: 1px;
610
+ }
611
+ .react-flow__resize-control.line.top,
612
+ .react-flow__resize-control.line.bottom {
613
+ height: 1px;
614
+ transform: translate(0, -50%);
615
+ left: 0;
616
+ width: 100%;
617
+ }
618
+ .react-flow__resize-control.line.top {
619
+ top: 0;
620
+ border-top-width: 1px;
621
+ }
622
+ .react-flow__resize-control.line.bottom {
623
+ border-bottom-width: 1px;
624
+ top: 100%;
625
+ }
626
+ .react-flow__edge-textbg {
627
+ fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));
628
+ }
629
+ .react-flow__edge-text {
630
+ fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));
631
+ }
632
+
633
+
634
+ * { box-sizing: border-box; }
635
+ html, body, #root {
636
+ margin: 0;
637
+ padding: 0;
638
+ width: 100vw;
639
+ height: 100vh;
640
+ overflow: hidden;
641
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
642
+ color: #0f172a;
643
+ background: #f8fafc;
644
+ }
645
+ .atlas-shell-root {
646
+ display: flex;
647
+ flex-direction: column;
648
+ width: 100vw;
649
+ height: 100vh;
650
+ }
651
+ .atlas-topbar {
652
+ display: flex;
653
+ justify-content: space-between;
654
+ align-items: flex-start;
655
+ gap: 16px;
656
+ padding: 12px 20px;
657
+ background: #ffffff;
658
+ border-bottom: 1px solid #e2e8f0;
659
+ flex-shrink: 0;
660
+ }
661
+ .atlas-top-badges {
662
+ display: flex;
663
+ align-items: center;
664
+ gap: 8px;
665
+ margin-bottom: 4px;
666
+ flex-wrap: wrap;
667
+ }
668
+ .atlas-parent-link {
669
+ font-size: 12px;
670
+ font-weight: 600;
671
+ color: #2563eb;
672
+ background: #eff6ff;
673
+ border: 1px solid #bfdbfe;
674
+ padding: 2px 8px;
675
+ border-radius: 999px;
676
+ text-decoration: none;
677
+ }
678
+ .atlas-parent-link:hover { background: #dbeafe; }
679
+ .atlas-subject-badge {
680
+ font-size: 11.5px;
681
+ font-weight: 600;
682
+ color: #475569;
683
+ background: #f1f5f9;
684
+ padding: 2px 8px;
685
+ border-radius: 999px;
686
+ }
687
+ .atlas-level-badge {
688
+ font-size: 11.5px;
689
+ font-weight: 600;
690
+ color: #0f766e;
691
+ background: #ccfbf1;
692
+ padding: 2px 8px;
693
+ border-radius: 999px;
694
+ }
695
+ .atlas-main-title {
696
+ margin: 0;
697
+ font-size: 18px;
698
+ font-weight: 700;
699
+ line-height: 1.3;
700
+ }
701
+ .atlas-subtitle {
702
+ margin: 2px 0 0 0;
703
+ font-size: 12.5px;
704
+ color: #64748b;
705
+ }
706
+ .atlas-topbar-right {
707
+ display: flex;
708
+ align-items: center;
709
+ gap: 8px;
710
+ flex-shrink: 0;
711
+ }
712
+ .atlas-model-pill {
713
+ font-size: 12px;
714
+ font-weight: 600;
715
+ color: #1e293b;
716
+ background: #f1f5f9;
717
+ border: 1px solid #cbd5e1;
718
+ padding: 5px 10px;
719
+ border-radius: 8px;
720
+ }
721
+ .atlas-scope-btn {
722
+ font-size: 12px;
723
+ font-weight: 600;
724
+ color: #b45309;
725
+ background: #fef3c7;
726
+ border: 1px solid #fde68a;
727
+ padding: 5px 10px;
728
+ border-radius: 8px;
729
+ cursor: pointer;
730
+ }
731
+ .atlas-toolbar-row {
732
+ display: flex;
733
+ justify-content: space-between;
734
+ align-items: center;
735
+ gap: 12px;
736
+ padding: 8px 20px;
737
+ background: #f8fafc;
738
+ border-bottom: 1px solid #e2e8f0;
739
+ flex-shrink: 0;
740
+ flex-wrap: wrap;
741
+ }
742
+ .atlas-streams-bar {
743
+ display: flex;
744
+ align-items: center;
745
+ gap: 6px;
746
+ flex-wrap: wrap;
747
+ }
748
+ .atlas-stream-pill-group {
749
+ display: inline-flex;
750
+ align-items: center;
751
+ }
752
+ .atlas-stream-pill {
753
+ font-size: 12.5px;
754
+ font-weight: 500;
755
+ padding: 5px 11px;
756
+ border-radius: 999px;
757
+ border: 1px solid #cbd5e1;
758
+ background: #ffffff;
759
+ color: #334155;
760
+ cursor: pointer;
761
+ }
762
+ .atlas-stream-pill.active {
763
+ background: #0f172a;
764
+ color: #ffffff;
765
+ border-color: #0f172a;
766
+ }
767
+ .atlas-stream-help-btn {
768
+ margin-left: -4px;
769
+ width: 22px;
770
+ height: 22px;
771
+ border-radius: 50%;
772
+ border: 1px solid #93c5fd;
773
+ background: #eff6ff;
774
+ color: #1d4ed8;
775
+ font-weight: 700;
776
+ font-size: 12px;
777
+ cursor: pointer;
778
+ }
779
+ .atlas-controls-group {
780
+ display: flex;
781
+ align-items: center;
782
+ gap: 10px;
783
+ flex-wrap: wrap;
784
+ }
785
+ .atlas-search-box {
786
+ position: relative;
787
+ }
788
+ .atlas-search-input {
789
+ width: 250px;
790
+ padding: 6px 10px;
791
+ font-size: 12.5px;
792
+ border: 1px solid #cbd5e1;
793
+ border-radius: 8px;
794
+ background: #ffffff;
795
+ outline: none;
796
+ }
797
+ .atlas-search-input:focus { border-color: #2563eb; }
798
+ .atlas-search-dropdown {
799
+ position: absolute;
800
+ top: calc(100% + 4px);
801
+ left: 0;
802
+ width: 320px;
803
+ max-height: 300px;
804
+ overflow-y: auto;
805
+ background: #ffffff;
806
+ border: 1px solid #cbd5e1;
807
+ border-radius: 10px;
808
+ box-shadow: 0 10px 25px rgba(15, 23, 42, 0.14);
809
+ z-index: 50;
810
+ padding: 4px;
811
+ }
812
+ .atlas-search-item {
813
+ display: block;
814
+ width: 100%;
815
+ text-align: left;
816
+ padding: 7px 9px;
817
+ border: none;
818
+ background: transparent;
819
+ border-radius: 6px;
820
+ cursor: pointer;
821
+ }
822
+ .atlas-search-item:hover { background: #f1f5f9; }
823
+ .atlas-search-item-title {
824
+ font-size: 12.5px;
825
+ font-weight: 600;
826
+ color: #0f172a;
827
+ display: flex;
828
+ align-items: center;
829
+ gap: 6px;
830
+ }
831
+ .atlas-search-item-sub {
832
+ font-size: 11.5px;
833
+ color: #64748b;
834
+ margin-top: 2px;
835
+ }
836
+ .atlas-search-empty {
837
+ padding: 10px;
838
+ font-size: 12px;
839
+ color: #64748b;
840
+ }
841
+ .atlas-canvas-btns {
842
+ display: flex;
843
+ align-items: center;
844
+ gap: 6px;
845
+ flex-wrap: wrap;
846
+ }
847
+ .atlas-ctrl-btn {
848
+ padding: 5px 10px;
849
+ font-size: 12px;
850
+ font-weight: 600;
851
+ background: #ffffff;
852
+ color: #1e293b;
853
+ border: 1px solid #cbd5e1;
854
+ border-radius: 7px;
855
+ cursor: pointer;
856
+ }
857
+ .atlas-ctrl-btn:hover { background: #f1f5f9; }
858
+ .atlas-ctrl-btn.locked {
859
+ background: #fef2f2;
860
+ color: #b91c1c;
861
+ border-color: #fca5a5;
862
+ }
863
+ .atlas-ctrl-btn.active {
864
+ background: #e0f2fe;
865
+ border-color: #7dd3fc;
866
+ color: #0369a1;
867
+ }
868
+ .atlas-ctrl-btn.reset-btn {
869
+ background: #f8fafc;
870
+ border-color: #94a3b8;
871
+ }
872
+ .atlas-reading-bar {
873
+ display: flex;
874
+ align-items: center;
875
+ gap: 8px;
876
+ padding: 6px 20px;
877
+ background: #ffffff;
878
+ border-bottom: 1px solid #e2e8f0;
879
+ overflow-x: auto;
880
+ flex-shrink: 0;
881
+ }
882
+ .atlas-reading-label {
883
+ font-size: 12px;
884
+ font-weight: 600;
885
+ color: #475569;
886
+ white-space: nowrap;
887
+ }
888
+ .atlas-reading-steps {
889
+ display: flex;
890
+ align-items: center;
891
+ gap: 6px;
892
+ }
893
+ .atlas-step-chip {
894
+ display: inline-flex;
895
+ align-items: center;
896
+ gap: 5px;
897
+ font-size: 12px;
898
+ padding: 3px 9px;
899
+ border-radius: 999px;
900
+ border: 1px solid #e2e8f0;
901
+ background: #f8fafc;
902
+ color: #334155;
903
+ cursor: pointer;
904
+ white-space: nowrap;
905
+ }
906
+ .atlas-step-chip.active {
907
+ border-color: #2563eb;
908
+ background: #eff6ff;
909
+ color: #1d4ed8;
910
+ font-weight: 600;
911
+ }
912
+ .atlas-step-num {
913
+ display: inline-flex;
914
+ align-items: center;
915
+ justify-content: center;
916
+ width: 16px;
917
+ height: 16px;
918
+ border-radius: 50%;
919
+ background: #cbd5e1;
920
+ color: #0f172a;
921
+ font-size: 10.5px;
922
+ font-weight: 700;
923
+ }
924
+ .atlas-main-workspace {
925
+ flex: 1;
926
+ min-height: 0;
927
+ display: flex;
928
+ position: relative;
929
+ width: 100%;
930
+ }
931
+ .atlas-canvas-container {
932
+ flex: 1;
933
+ height: 100%;
934
+ min-height: 400px;
935
+ position: relative;
936
+ }
937
+ .atlas-node {
938
+ border: 1px solid #cbd5e1;
939
+ border-radius: 11px;
940
+ padding: 10px 12px;
941
+ box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
942
+ display: flex;
943
+ flex-direction: column;
944
+ gap: 6px;
945
+ cursor: pointer;
946
+ position: relative;
947
+ }
948
+ .atlas-node-sub {
949
+ border-style: dashed;
950
+ }
951
+ .atlas-node-selected {
952
+ outline: 2.5px solid #2563eb;
953
+ box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18);
954
+ }
955
+ .atlas-handle {
956
+ width: 8px !important;
957
+ height: 8px !important;
958
+ background: #64748b !important;
959
+ }
960
+ .atlas-node-header {
961
+ display: flex;
962
+ justify-content: space-between;
963
+ align-items: center;
964
+ gap: 6px;
965
+ }
966
+ .atlas-node-badges {
967
+ display: flex;
968
+ align-items: center;
969
+ gap: 4px;
970
+ flex-wrap: wrap;
971
+ }
972
+ .atlas-role-badge {
973
+ font-size: 10.5px;
974
+ font-weight: 700;
975
+ padding: 2px 6px;
976
+ border-radius: 5px;
977
+ }
978
+ .atlas-sub-pill {
979
+ font-size: 10px;
980
+ font-weight: 600;
981
+ padding: 1px 5px;
982
+ border-radius: 4px;
983
+ background: #e0f2fe;
984
+ color: #0369a1;
985
+ }
986
+ .atlas-unverified-pill {
987
+ font-size: 10px;
988
+ font-weight: 700;
989
+ padding: 1px 5px;
990
+ border-radius: 4px;
991
+ background: #fef3c7;
992
+ color: #b45309;
993
+ border: 1px dashed #f59e0b;
994
+ }
995
+ .atlas-help-wrap {
996
+ position: relative;
997
+ flex-shrink: 0;
998
+ }
999
+ .atlas-help-btn {
1000
+ width: 22px;
1001
+ height: 22px;
1002
+ border-radius: 50%;
1003
+ border: 1.5px solid #2563eb;
1004
+ background: #eff6ff;
1005
+ color: #1d4ed8;
1006
+ font-size: 12.5px;
1007
+ font-weight: 800;
1008
+ line-height: 1;
1009
+ display: inline-flex;
1010
+ align-items: center;
1011
+ justify-content: center;
1012
+ cursor: pointer;
1013
+ }
1014
+ .atlas-help-btn:hover {
1015
+ background: #2563eb;
1016
+ color: #ffffff;
1017
+ }
1018
+ .atlas-help-tooltip {
1019
+ position: absolute;
1020
+ bottom: calc(100% + 8px);
1021
+ right: 0;
1022
+ width: 230px;
1023
+ padding: 7px 9px;
1024
+ background: #0f172a;
1025
+ color: #f8fafc;
1026
+ font-size: 11.5px;
1027
+ line-height: 1.4;
1028
+ border-radius: 8px;
1029
+ box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
1030
+ z-index: 100;
1031
+ pointer-events: none;
1032
+ }
1033
+ .atlas-node-title {
1034
+ font-size: 13.5px;
1035
+ font-weight: 700;
1036
+ color: #0f172a;
1037
+ line-height: 1.35;
1038
+ }
1039
+ .atlas-node-summary {
1040
+ font-size: 11.5px;
1041
+ color: #475569;
1042
+ line-height: 1.45;
1043
+ display: -webkit-box;
1044
+ -webkit-line-clamp: 2;
1045
+ -webkit-box-orient: vertical;
1046
+ overflow: hidden;
1047
+ }
1048
+ .atlas-node-footer {
1049
+ display: flex;
1050
+ justify-content: space-between;
1051
+ align-items: center;
1052
+ margin-top: 2px;
1053
+ padding-top: 5px;
1054
+ border-top: 1px solid rgba(148, 163, 184, 0.25);
1055
+ }
1056
+ .atlas-expand-btn {
1057
+ font-size: 11px;
1058
+ font-weight: 600;
1059
+ padding: 2px 8px;
1060
+ border-radius: 5px;
1061
+ border: 1px solid #94a3b8;
1062
+ background: #ffffff;
1063
+ color: #1e293b;
1064
+ cursor: pointer;
1065
+ }
1066
+ .atlas-expand-btn.active {
1067
+ background: #0ea5e9;
1068
+ border-color: #0ea5e9;
1069
+ color: #ffffff;
1070
+ }
1071
+ .atlas-anchor-count {
1072
+ font-size: 10.5px;
1073
+ font-weight: 600;
1074
+ color: #64748b;
1075
+ }
1076
+ .atlas-legend-card {
1077
+ position: absolute;
1078
+ top: 14px;
1079
+ left: 14px;
1080
+ background: rgba(255, 255, 255, 0.96);
1081
+ border: 1px solid #cbd5e1;
1082
+ border-radius: 10px;
1083
+ padding: 10px 12px;
1084
+ box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
1085
+ z-index: 20;
1086
+ display: flex;
1087
+ flex-direction: column;
1088
+ gap: 6px;
1089
+ }
1090
+ .atlas-legend-row {
1091
+ display: flex;
1092
+ align-items: center;
1093
+ gap: 8px;
1094
+ font-size: 12px;
1095
+ color: #1e293b;
1096
+ }
1097
+ .atlas-legend-swatch {
1098
+ width: 12px;
1099
+ height: 12px;
1100
+ border-radius: 3px;
1101
+ }
1102
+ .atlas-inspector {
1103
+ width: 390px;
1104
+ max-width: 44vw;
1105
+ height: 100%;
1106
+ overflow-y: auto;
1107
+ background: #ffffff;
1108
+ border-left: 1px solid #e2e8f0;
1109
+ padding: 16px 18px;
1110
+ flex-shrink: 0;
1111
+ }
1112
+ .atlas-inspector-head {
1113
+ display: flex;
1114
+ justify-content: space-between;
1115
+ align-items: flex-start;
1116
+ gap: 10px;
1117
+ margin-bottom: 10px;
1118
+ }
1119
+ .atlas-inspector-parent {
1120
+ font-size: 11.5px;
1121
+ color: #64748b;
1122
+ margin-bottom: 2px;
1123
+ }
1124
+ .atlas-inspector-title {
1125
+ margin: 0;
1126
+ font-size: 16px;
1127
+ font-weight: 700;
1128
+ }
1129
+ .atlas-icon-close {
1130
+ padding: 4px 8px;
1131
+ font-size: 12px;
1132
+ border: 1px solid #cbd5e1;
1133
+ border-radius: 6px;
1134
+ background: #f8fafc;
1135
+ cursor: pointer;
1136
+ }
1137
+ .atlas-conf-badge {
1138
+ display: inline-block;
1139
+ font-size: 11px;
1140
+ font-weight: 700;
1141
+ padding: 2px 8px;
1142
+ border-radius: 999px;
1143
+ }
1144
+ .atlas-conf-badge.ok { background: #dcfce7; color: #15803d; }
1145
+ .atlas-conf-badge.warn { background: #fef3c7; color: #b45309; }
1146
+ .atlas-unverified-note {
1147
+ margin: 6px 0 0 0;
1148
+ font-size: 12px;
1149
+ color: #b45309;
1150
+ background: #fffbeb;
1151
+ padding: 6px 8px;
1152
+ border-radius: 6px;
1153
+ }
1154
+ .atlas-sec {
1155
+ margin-top: 14px;
1156
+ padding-top: 12px;
1157
+ border-top: 1px solid #f1f5f9;
1158
+ }
1159
+ .atlas-sec h4 {
1160
+ margin: 0 0 6px 0;
1161
+ font-size: 12.5px;
1162
+ color: #475569;
1163
+ }
1164
+ .atlas-sec p, .atlas-kv {
1165
+ margin: 0;
1166
+ font-size: 13px;
1167
+ line-height: 1.55;
1168
+ color: #1e293b;
1169
+ }
1170
+ .atlas-kv + .atlas-kv { margin-top: 6px; }
1171
+ .atlas-watchout-box {
1172
+ background: #fffbeb;
1173
+ border: 1px solid #fde68a;
1174
+ border-radius: 8px;
1175
+ padding: 10px 12px;
1176
+ }
1177
+ .atlas-anchor-list {
1178
+ display: flex;
1179
+ flex-direction: column;
1180
+ gap: 8px;
1181
+ }
1182
+ .atlas-anchor-card {
1183
+ border: 1px solid #e2e8f0;
1184
+ border-radius: 8px;
1185
+ padding: 9px 10px;
1186
+ background: #f8fafc;
1187
+ }
1188
+ .atlas-anchor-label {
1189
+ font-size: 12px;
1190
+ font-weight: 700;
1191
+ margin-bottom: 4px;
1192
+ }
1193
+ .atlas-anchor-editor code {
1194
+ display: block;
1195
+ font-size: 11.5px;
1196
+ color: #0f172a;
1197
+ word-break: break-all;
1198
+ margin-bottom: 6px;
1199
+ }
1200
+ .atlas-editor-btn {
1201
+ display: inline-block;
1202
+ padding: 5px 10px;
1203
+ font-size: 12px;
1204
+ font-weight: 600;
1205
+ background: #2563eb;
1206
+ color: #ffffff;
1207
+ border-radius: 6px;
1208
+ text-decoration: none;
1209
+ }
1210
+ .atlas-editor-hint {
1211
+ margin-top: 5px;
1212
+ font-size: 11px;
1213
+ color: #64748b;
1214
+ }
1215
+ .atlas-anchor-snippet pre {
1216
+ margin: 4px 0 6px 0;
1217
+ padding: 8px;
1218
+ background: #0f172a;
1219
+ color: #f8fafc;
1220
+ border-radius: 6px;
1221
+ font-size: 11.5px;
1222
+ overflow-x: auto;
1223
+ white-space: pre-wrap;
1224
+ }
1225
+ .atlas-ext-link {
1226
+ font-size: 12px;
1227
+ color: #2563eb;
1228
+ word-break: break-all;
1229
+ }
1230
+ .atlas-source-cite {
1231
+ font-size: 12px;
1232
+ color: #334155;
1233
+ }
1234
+ .atlas-open-dive-btn {
1235
+ width: 100%;
1236
+ padding: 9px 12px;
1237
+ font-size: 13px;
1238
+ font-weight: 700;
1239
+ color: #1d4ed8;
1240
+ background: #eff6ff;
1241
+ border: 1.5px solid #93c5fd;
1242
+ border-radius: 8px;
1243
+ cursor: pointer;
1244
+ }
1245
+ .atlas-modal-backdrop {
1246
+ position: fixed;
1247
+ inset: 0;
1248
+ background: rgba(15, 23, 42, 0.45);
1249
+ display: flex;
1250
+ align-items: center;
1251
+ justify-content: center;
1252
+ z-index: 200;
1253
+ padding: 24px;
1254
+ }
1255
+ .atlas-modal {
1256
+ width: 680px;
1257
+ max-width: 92vw;
1258
+ max-height: 84vh;
1259
+ background: #ffffff;
1260
+ border-radius: 14px;
1261
+ box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
1262
+ display: flex;
1263
+ flex-direction: column;
1264
+ overflow: hidden;
1265
+ }
1266
+ .atlas-modal-header {
1267
+ display: flex;
1268
+ justify-content: space-between;
1269
+ align-items: flex-start;
1270
+ padding: 16px 20px;
1271
+ border-bottom: 1px solid #e2e8f0;
1272
+ }
1273
+ .atlas-modal-kicker {
1274
+ font-size: 11.5px;
1275
+ font-weight: 700;
1276
+ color: #2563eb;
1277
+ margin-bottom: 2px;
1278
+ }
1279
+ .atlas-modal-title {
1280
+ margin: 0;
1281
+ font-size: 17px;
1282
+ font-weight: 700;
1283
+ }
1284
+ .atlas-modal-tabs {
1285
+ display: flex;
1286
+ gap: 8px;
1287
+ padding: 10px 20px;
1288
+ background: #f8fafc;
1289
+ border-bottom: 1px solid #e2e8f0;
1290
+ }
1291
+ .atlas-tab-btn {
1292
+ padding: 6px 12px;
1293
+ font-size: 12.5px;
1294
+ font-weight: 600;
1295
+ border-radius: 7px;
1296
+ border: 1px solid #cbd5e1;
1297
+ background: #ffffff;
1298
+ color: #475569;
1299
+ cursor: pointer;
1300
+ }
1301
+ .atlas-tab-btn.active {
1302
+ background: #1d4ed8;
1303
+ border-color: #1d4ed8;
1304
+ color: #ffffff;
1305
+ }
1306
+ .atlas-modal-body {
1307
+ padding: 16px 20px;
1308
+ overflow-y: auto;
1309
+ }
1310
+ .atlas-prompt-list {
1311
+ display: flex;
1312
+ flex-direction: column;
1313
+ gap: 12px;
1314
+ }
1315
+ .atlas-prompt-card {
1316
+ border: 1px solid #cbd5e1;
1317
+ border-radius: 10px;
1318
+ padding: 12px 14px;
1319
+ background: #f8fafc;
1320
+ }
1321
+ .atlas-prompt-card-head {
1322
+ display: flex;
1323
+ justify-content: space-between;
1324
+ align-items: center;
1325
+ gap: 10px;
1326
+ margin-bottom: 8px;
1327
+ }
1328
+ .atlas-prompt-pre {
1329
+ margin: 0;
1330
+ padding: 10px 12px;
1331
+ background: #ffffff;
1332
+ border: 1px solid #e2e8f0;
1333
+ border-radius: 8px;
1334
+ font-size: 12.5px;
1335
+ line-height: 1.55;
1336
+ white-space: pre-wrap;
1337
+ word-break: break-word;
1338
+ color: #0f172a;
1339
+ }
1340
+ .atlas-copy-btn {
1341
+ padding: 5px 11px;
1342
+ font-size: 12px;
1343
+ font-weight: 600;
1344
+ border-radius: 6px;
1345
+ border: 1px solid #2563eb;
1346
+ background: #2563eb;
1347
+ color: #ffffff;
1348
+ cursor: pointer;
1349
+ white-space: nowrap;
1350
+ }
1351
+ .atlas-copy-btn.small {
1352
+ padding: 3px 8px;
1353
+ font-size: 11px;
1354
+ }
1355
+ .atlas-copy-btn.copied {
1356
+ background: #16a34a;
1357
+ border-color: #16a34a;
1358
+ }
1359
+ .atlas-hint-p {
1360
+ margin: 0 0 10px 0;
1361
+ font-size: 12.5px;
1362
+ color: #475569;
1363
+ }
1364
+ </style>
1365
+ </head>
1366
+ <body>
1367
+ <div id="root"></div>
1368
+ <script id="atlas-data-json" type="application/json">__ATLAS_DATA_JSON__</script>
1369
+ <script>(()=>{var fK=Object.create;var{getPrototypeOf:$K,defineProperty:RF,getOwnPropertyNames:FK}=Object;var lK=Object.prototype.hasOwnProperty;function UK(u){return this[u]}var _K,QK,If=(u,f,$)=>{var F=u!=null&&typeof u==="object";if(F){var l=f?_K??=new WeakMap:QK??=new WeakMap,U=l.get(u);if(U)return U}$=u!=null?fK($K(u)):{};let _=f||!u||!u.__esModule?RF($,"default",{value:u,enumerable:!0}):$;for(let Q of FK(u))if(!lK.call(_,Q))RF(_,Q,{get:UK.bind(u,Q),enumerable:!0});if(F)l.set(u,_);return _};var o=(u,f)=>()=>(f||u((f={exports:{}}).exports,f),f.exports);var kF=o((_u)=>{var z4=Symbol.for("react.element"),JK=Symbol.for("react.portal"),qK=Symbol.for("react.fragment"),TK=Symbol.for("react.strict_mode"),AK=Symbol.for("react.profiler"),WK=Symbol.for("react.provider"),KK=Symbol.for("react.context"),wK=Symbol.for("react.forward_ref"),BK=Symbol.for("react.suspense"),LK=Symbol.for("react.memo"),GK=Symbol.for("react.lazy"),MF=Symbol.iterator;function HK(u){if(u===null||typeof u!=="object")return null;return u=MF&&u[MF]||u["@@iterator"],typeof u==="function"?u:null}var XF={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},DF=Object.assign,OF={};function M1(u,f,$){this.props=u,this.context=f,this.refs=OF,this.updater=$||XF}M1.prototype.isReactComponent={};M1.prototype.setState=function(u,f){if(typeof u!=="object"&&typeof u!=="function"&&u!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,u,f,"setState")};M1.prototype.forceUpdate=function(u){this.updater.enqueueForceUpdate(this,u,"forceUpdate")};function SF(){}SF.prototype=M1.prototype;function A5(u,f,$){this.props=u,this.context=f,this.refs=OF,this.updater=$||XF}var W5=A5.prototype=new SF;W5.constructor=A5;DF(W5,M1.prototype);W5.isPureReactComponent=!0;var EF=Array.isArray,jF=Object.prototype.hasOwnProperty,K5={current:null},NF={key:!0,ref:!0,__self:!0,__source:!0};function IF(u,f,$){var F,l={},U=null,_=null;if(f!=null)for(F in f.ref!==void 0&&(_=f.ref),f.key!==void 0&&(U=""+f.key),f)jF.call(f,F)&&!NF.hasOwnProperty(F)&&(l[F]=f[F]);var Q=arguments.length-2;if(Q===1)l.children=$;else if(1<Q){for(var J=Array(Q),q=0;q<Q;q++)J[q]=arguments[q+2];l.children=J}if(u&&u.defaultProps)for(F in Q=u.defaultProps,Q)l[F]===void 0&&(l[F]=Q[F]);return{$$typeof:z4,type:u,key:U,ref:_,props:l,_owner:K5.current}}function zK(u,f){return{$$typeof:z4,type:u.type,key:f,ref:u.ref,props:u.props,_owner:u._owner}}function w5(u){return typeof u==="object"&&u!==null&&u.$$typeof===z4}function ZK(u){var f={"=":"=0",":":"=2"};return"$"+u.replace(/[=:]/g,function($){return f[$]})}var VF=/\/+/g;function T5(u,f){return typeof u==="object"&&u!==null&&u.key!=null?ZK(""+u.key):f.toString(36)}function h3(u,f,$,F,l){var U=typeof u;if(U==="undefined"||U==="boolean")u=null;var _=!1;if(u===null)_=!0;else switch(U){case"string":case"number":_=!0;break;case"object":switch(u.$$typeof){case z4:case JK:_=!0}}if(_)return _=u,l=l(_),u=F===""?"."+T5(_,0):F,EF(l)?($="",u!=null&&($=u.replace(VF,"$&/")+"/"),h3(l,f,$,"",function(q){return q})):l!=null&&(w5(l)&&(l=zK(l,$+(!l.key||_&&_.key===l.key?"":(""+l.key).replace(VF,"$&/")+"/")+u)),f.push(l)),1;if(_=0,F=F===""?".":F+":",EF(u))for(var Q=0;Q<u.length;Q++){U=u[Q];var J=F+T5(U,Q);_+=h3(U,f,$,J,l)}else if(J=HK(u),typeof J==="function")for(u=J.call(u),Q=0;!(U=u.next()).done;)U=U.value,J=F+T5(U,Q++),_+=h3(U,f,$,J,l);else if(U==="object")throw f=String(u),Error("Objects are not valid as a React child (found: "+(f==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":f)+"). If you meant to render a collection of children, use an array instead.");return _}function C3(u,f,$){if(u==null)return u;var F=[],l=0;return h3(u,F,"","",function(U){return f.call($,U,l++)}),F}function YK(u){if(u._status===-1){var f=u._result;f=f(),f.then(function($){if(u._status===0||u._status===-1)u._status=1,u._result=$},function($){if(u._status===0||u._status===-1)u._status=2,u._result=$}),u._status===-1&&(u._status=0,u._result=f)}if(u._status===1)return u._result.default;throw u._result}var cu={current:null},v3={transition:null},RK={ReactCurrentDispatcher:cu,ReactCurrentBatchConfig:v3,ReactCurrentOwner:K5};function yF(){throw Error("act(...) is not supported in production builds of React.")}_u.Children={map:C3,forEach:function(u,f,$){C3(u,function(){f.apply(this,arguments)},$)},count:function(u){var f=0;return C3(u,function(){f++}),f},toArray:function(u){return C3(u,function(f){return f})||[]},only:function(u){if(!w5(u))throw Error("React.Children.only expected to receive a single React element child.");return u}};_u.Component=M1;_u.Fragment=qK;_u.Profiler=AK;_u.PureComponent=A5;_u.StrictMode=TK;_u.Suspense=BK;_u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RK;_u.act=yF;_u.cloneElement=function(u,f,$){if(u===null||u===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+u+".");var F=DF({},u.props),l=u.key,U=u.ref,_=u._owner;if(f!=null){if(f.ref!==void 0&&(U=f.ref,_=K5.current),f.key!==void 0&&(l=""+f.key),u.type&&u.type.defaultProps)var Q=u.type.defaultProps;for(J in f)jF.call(f,J)&&!NF.hasOwnProperty(J)&&(F[J]=f[J]===void 0&&Q!==void 0?Q[J]:f[J])}var J=arguments.length-2;if(J===1)F.children=$;else if(1<J){Q=Array(J);for(var q=0;q<J;q++)Q[q]=arguments[q+2];F.children=Q}return{$$typeof:z4,type:u.type,key:l,ref:U,props:F,_owner:_}};_u.createContext=function(u){return u={$$typeof:KK,_currentValue:u,_currentValue2:u,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},u.Provider={$$typeof:WK,_context:u},u.Consumer=u};_u.createElement=IF;_u.createFactory=function(u){var f=IF.bind(null,u);return f.type=u,f};_u.createRef=function(){return{current:null}};_u.forwardRef=function(u){return{$$typeof:wK,render:u}};_u.isValidElement=w5;_u.lazy=function(u){return{$$typeof:GK,_payload:{_status:-1,_result:u},_init:YK}};_u.memo=function(u,f){return{$$typeof:LK,type:u,compare:f===void 0?null:f}};_u.startTransition=function(u){var f=v3.transition;v3.transition={};try{u()}finally{v3.transition=f}};_u.unstable_act=yF;_u.useCallback=function(u,f){return cu.current.useCallback(u,f)};_u.useContext=function(u){return cu.current.useContext(u)};_u.useDebugValue=function(){};_u.useDeferredValue=function(u){return cu.current.useDeferredValue(u)};_u.useEffect=function(u,f){return cu.current.useEffect(u,f)};_u.useId=function(){return cu.current.useId()};_u.useImperativeHandle=function(u,f,$){return cu.current.useImperativeHandle(u,f,$)};_u.useInsertionEffect=function(u,f){return cu.current.useInsertionEffect(u,f)};_u.useLayoutEffect=function(u,f){return cu.current.useLayoutEffect(u,f)};_u.useMemo=function(u,f){return cu.current.useMemo(u,f)};_u.useReducer=function(u,f,$){return cu.current.useReducer(u,f,$)};_u.useRef=function(u){return cu.current.useRef(u)};_u.useState=function(u){return cu.current.useState(u)};_u.useSyncExternalStore=function(u,f,$){return cu.current.useSyncExternalStore(u,f,$)};_u.useTransition=function(){return cu.current.useTransition()};_u.version="18.3.1"});var W0=o((tV,PF)=>{PF.exports=kF()});var mF=o((Au)=>{function L5(u,f){var $=u.length;u.push(f);u:for(;0<$;){var F=$-1>>>1,l=u[F];if(0<x3(l,f))u[F]=f,u[$]=l,$=F;else break u}}function zf(u){return u.length===0?null:u[0]}function b3(u){if(u.length===0)return null;var f=u[0],$=u.pop();if($!==f){u[0]=$;u:for(var F=0,l=u.length,U=l>>>1;F<U;){var _=2*(F+1)-1,Q=u[_],J=_+1,q=u[J];if(0>x3(Q,$))J<l&&0>x3(q,Q)?(u[F]=q,u[J]=$,F=J):(u[F]=Q,u[_]=$,F=_);else if(J<l&&0>x3(q,$))u[F]=q,u[J]=$,F=J;else break u}}return f}function x3(u,f){var $=u.sortIndex-f.sortIndex;return $!==0?$:u.id-f.id}if(typeof performance==="object"&&typeof performance.now==="function")G5=performance,Au.unstable_now=function(){return G5.now()};else c3=Date,H5=c3.now(),Au.unstable_now=function(){return c3.now()-H5};var G5,c3,H5,yf=[],K0=[],MK=1,_f=null,Pu=3,i3=!1,i0=!1,Y4=!1,CF=typeof setTimeout==="function"?setTimeout:null,hF=typeof clearTimeout==="function"?clearTimeout:null,rF=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z5(u){for(var f=zf(K0);f!==null;){if(f.callback===null)b3(K0);else if(f.startTime<=u)b3(K0),f.sortIndex=f.expirationTime,L5(yf,f);else break;f=zf(K0)}}function Y5(u){if(Y4=!1,z5(u),!i0)if(zf(yf)!==null)i0=!0,M5(R5);else{var f=zf(K0);f!==null&&E5(Y5,f.startTime-u)}}function R5(u,f){i0=!1,Y4&&(Y4=!1,hF(R4),R4=-1),i3=!0;var $=Pu;try{z5(f);for(_f=zf(yf);_f!==null&&(!(_f.expirationTime>f)||u&&!cF());){var F=_f.callback;if(typeof F==="function"){_f.callback=null,Pu=_f.priorityLevel;var l=F(_f.expirationTime<=f);f=Au.unstable_now(),typeof l==="function"?_f.callback=l:_f===zf(yf)&&b3(yf),z5(f)}else b3(yf);_f=zf(yf)}if(_f!==null)var U=!0;else{var _=zf(K0);_!==null&&E5(Y5,_.startTime-f),U=!1}return U}finally{_f=null,Pu=$,i3=!1}}var g3=!1,m3=null,R4=-1,vF=5,xF=-1;function cF(){return Au.unstable_now()-xF<vF?!1:!0}function B5(){if(m3!==null){var u=Au.unstable_now();xF=u;var f=!0;try{f=m3(!0,u)}finally{f?Z4():(g3=!1,m3=null)}}else g3=!1}var Z4;if(typeof rF==="function")Z4=function(){rF(B5)};else if(typeof MessageChannel<"u")p3=new MessageChannel,Z5=p3.port2,p3.port1.onmessage=B5,Z4=function(){Z5.postMessage(null)};else Z4=function(){CF(B5,0)};var p3,Z5;function M5(u){m3=u,g3||(g3=!0,Z4())}function E5(u,f){R4=CF(function(){u(Au.unstable_now())},f)}Au.unstable_IdlePriority=5;Au.unstable_ImmediatePriority=1;Au.unstable_LowPriority=4;Au.unstable_NormalPriority=3;Au.unstable_Profiling=null;Au.unstable_UserBlockingPriority=2;Au.unstable_cancelCallback=function(u){u.callback=null};Au.unstable_continueExecution=function(){i0||i3||(i0=!0,M5(R5))};Au.unstable_forceFrameRate=function(u){0>u||125<u?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):vF=0<u?Math.floor(1000/u):5};Au.unstable_getCurrentPriorityLevel=function(){return Pu};Au.unstable_getFirstCallbackNode=function(){return zf(yf)};Au.unstable_next=function(u){switch(Pu){case 1:case 2:case 3:var f=3;break;default:f=Pu}var $=Pu;Pu=f;try{return u()}finally{Pu=$}};Au.unstable_pauseExecution=function(){};Au.unstable_requestPaint=function(){};Au.unstable_runWithPriority=function(u,f){switch(u){case 1:case 2:case 3:case 4:case 5:break;default:u=3}var $=Pu;Pu=u;try{return f()}finally{Pu=$}};Au.unstable_scheduleCallback=function(u,f,$){var F=Au.unstable_now();switch(typeof $==="object"&&$!==null?($=$.delay,$=typeof $==="number"&&0<$?F+$:F):$=F,u){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5000}return l=$+l,u={id:MK++,callback:f,priorityLevel:u,startTime:$,expirationTime:l,sortIndex:-1},$>F?(u.sortIndex=$,L5(K0,u),zf(yf)===null&&u===zf(K0)&&(Y4?(hF(R4),R4=-1):Y4=!0,E5(Y5,$-F))):(u.sortIndex=l,L5(yf,u),i0||i3||(i0=!0,M5(R5))),u};Au.unstable_shouldYield=cF;Au.unstable_wrapCallback=function(u){var f=Pu;return function(){var $=Pu;Pu=f;try{return u.apply(this,arguments)}finally{Pu=$}}}});var bF=o((dV,pF)=>{pF.exports=mF()});var g_=o((Ff)=>{var EK=W0(),ff=bF();function p(u){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+u,$=1;$<arguments.length;$++)f+="&args[]="+encodeURIComponent(arguments[$]);return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var nl=new Set,s4={};function U1(u,f){b1(u,f),b1(u+"Capture",f)}function b1(u,f){s4[u]=f;for(u=0;u<f.length;u++)nl.add(f[u])}var u0=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g5=Object.prototype.hasOwnProperty,VK=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,iF={},gF={};function XK(u){if(g5.call(gF,u))return!0;if(g5.call(iF,u))return!1;if(VK.test(u))return gF[u]=!0;return iF[u]=!0,!1}function DK(u,f,$,F){if($!==null&&$.type===0)return!1;switch(typeof f){case"function":case"symbol":return!0;case"boolean":if(F)return!1;if($!==null)return!$.acceptsBooleans;return u=u.toLowerCase().slice(0,5),u!=="data-"&&u!=="aria-";default:return!1}}function OK(u,f,$,F){if(f===null||typeof f>"u"||DK(u,f,$,F))return!0;if(F)return!1;if($!==null)switch($.type){case 3:return!f;case 4:return f===!1;case 5:return isNaN(f);case 6:return isNaN(f)||1>f}return!1}function bu(u,f,$,F,l,U,_){this.acceptsBooleans=f===2||f===3||f===4,this.attributeName=F,this.attributeNamespace=l,this.mustUseProperty=$,this.propertyName=u,this.type=f,this.sanitizeURL=U,this.removeEmptyString=_}var ku={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(u){ku[u]=new bu(u,0,!1,u,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(u){var f=u[0];ku[f]=new bu(f,1,!1,u[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(u){ku[u]=new bu(u,2,!1,u.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(u){ku[u]=new bu(u,2,!1,u,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(u){ku[u]=new bu(u,3,!1,u.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(u){ku[u]=new bu(u,3,!0,u,null,!1,!1)});["capture","download"].forEach(function(u){ku[u]=new bu(u,4,!1,u,null,!1,!1)});["cols","rows","size","span"].forEach(function(u){ku[u]=new bu(u,6,!1,u,null,!1,!1)});["rowSpan","start"].forEach(function(u){ku[u]=new bu(u,5,!1,u.toLowerCase(),null,!1,!1)});var x9=/[\-:]([a-z])/g;function c9(u){return u[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(u){var f=u.replace(x9,c9);ku[f]=new bu(f,1,!1,u,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(u){var f=u.replace(x9,c9);ku[f]=new bu(f,1,!1,u,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(u){var f=u.replace(x9,c9);ku[f]=new bu(f,1,!1,u,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(u){ku[u]=new bu(u,1,!1,u.toLowerCase(),null,!1,!1)});ku.xlinkHref=new bu("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(u){ku[u]=new bu(u,1,!1,u.toLowerCase(),null,!0,!0)});function m9(u,f,$,F){var l=ku.hasOwnProperty(f)?ku[f]:null;if(l!==null?l.type!==0:F||!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")OK(f,$,l,F)&&($=null),F||l===null?XK(f)&&($===null?u.removeAttribute(f):u.setAttribute(f,""+$)):l.mustUseProperty?u[l.propertyName]=$===null?l.type===3?!1:"":$:(f=l.attributeName,F=l.attributeNamespace,$===null?u.removeAttribute(f):(l=l.type,$=l===3||l===4&&$===!0?"":""+$,F?u.setAttributeNS(F,f,$):u.setAttribute(f,$)))}var l0=EK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,s3=Symbol.for("react.element"),X1=Symbol.for("react.portal"),D1=Symbol.for("react.fragment"),p9=Symbol.for("react.strict_mode"),s5=Symbol.for("react.profiler"),dl=Symbol.for("react.provider"),al=Symbol.for("react.context"),b9=Symbol.for("react.forward_ref"),t5=Symbol.for("react.suspense"),n5=Symbol.for("react.suspense_list"),i9=Symbol.for("react.memo"),B0=Symbol.for("react.lazy"),ol=Symbol.for("react.offscreen"),sF=Symbol.iterator;function M4(u){if(u===null||typeof u!=="object")return null;return u=sF&&u[sF]||u["@@iterator"],typeof u==="function"?u:null}var Zu=Object.assign,V5;function j4(u){if(V5===void 0)try{throw Error()}catch($){var f=$.stack.trim().match(/\n( *(at )?)/);V5=f&&f[1]||""}return`
1370
+ `+V5+u}var X5=!1;function D5(u,f){if(!u||X5)return"";X5=!0;var $=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(f)if(f=function(){throw Error()},Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(q){var F=q}Reflect.construct(u,[],f)}else{try{f.call()}catch(q){F=q}u.call(f.prototype)}else{try{throw Error()}catch(q){F=q}u()}}catch(q){if(q&&F&&typeof q.stack==="string"){for(var l=q.stack.split(`
1371
+ `),U=F.stack.split(`
1372
+ `),_=l.length-1,Q=U.length-1;1<=_&&0<=Q&&l[_]!==U[Q];)Q--;for(;1<=_&&0<=Q;_--,Q--)if(l[_]!==U[Q]){if(_!==1||Q!==1)do if(_--,Q--,0>Q||l[_]!==U[Q]){var J=`
1373
+ `+l[_].replace(" at new "," at ");return u.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",u.displayName)),J}while(1<=_&&0<=Q);break}}}finally{X5=!1,Error.prepareStackTrace=$}return(u=u?u.displayName||u.name:"")?j4(u):""}function SK(u){switch(u.tag){case 5:return j4(u.type);case 16:return j4("Lazy");case 13:return j4("Suspense");case 19:return j4("SuspenseList");case 0:case 2:case 15:return u=D5(u.type,!1),u;case 11:return u=D5(u.type.render,!1),u;case 1:return u=D5(u.type,!0),u;default:return""}}function d5(u){if(u==null)return null;if(typeof u==="function")return u.displayName||u.name||null;if(typeof u==="string")return u;switch(u){case D1:return"Fragment";case X1:return"Portal";case s5:return"Profiler";case p9:return"StrictMode";case t5:return"Suspense";case n5:return"SuspenseList"}if(typeof u==="object")switch(u.$$typeof){case al:return(u.displayName||"Context")+".Consumer";case dl:return(u._context.displayName||"Context")+".Provider";case b9:var f=u.render;return u=u.displayName,u||(u=f.displayName||f.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case i9:return f=u.displayName||null,f!==null?f:d5(u.type)||"Memo";case B0:f=u._payload,u=u._init;try{return d5(u(f))}catch($){}}return null}function jK(u){var f=u.type;switch(u.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return u=f.render,u=u.displayName||u.name||"",f.displayName||(u!==""?"ForwardRef("+u+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return d5(f);case 8:return f===p9?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof f==="function")return f.displayName||f.name||null;if(typeof f==="string")return f}return null}function S0(u){switch(typeof u){case"boolean":case"number":case"string":case"undefined":return u;case"object":return u;default:return""}}function el(u){var f=u.type;return(u=u.nodeName)&&u.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function NK(u){var f=el(u)?"checked":"value",$=Object.getOwnPropertyDescriptor(u.constructor.prototype,f),F=""+u[f];if(!u.hasOwnProperty(f)&&typeof $<"u"&&typeof $.get==="function"&&typeof $.set==="function"){var{get:l,set:U}=$;return Object.defineProperty(u,f,{configurable:!0,get:function(){return l.call(this)},set:function(_){F=""+_,U.call(this,_)}}),Object.defineProperty(u,f,{enumerable:$.enumerable}),{getValue:function(){return F},setValue:function(_){F=""+_},stopTracking:function(){u._valueTracker=null,delete u[f]}}}}function t3(u){u._valueTracker||(u._valueTracker=NK(u))}function uU(u){if(!u)return!1;var f=u._valueTracker;if(!f)return!0;var $=f.getValue(),F="";return u&&(F=el(u)?u.checked?"true":"false":u.value),u=F,u!==$?(f.setValue(u),!0):!1}function z8(u){if(u=u||(typeof document<"u"?document:void 0),typeof u>"u")return null;try{return u.activeElement||u.body}catch(f){return u.body}}function a5(u,f){var $=f.checked;return Zu({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:$!=null?$:u._wrapperState.initialChecked})}function tF(u,f){var $=f.defaultValue==null?"":f.defaultValue,F=f.checked!=null?f.checked:f.defaultChecked;$=S0(f.value!=null?f.value:$),u._wrapperState={initialChecked:F,initialValue:$,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function fU(u,f){f=f.checked,f!=null&&m9(u,"checked",f,!1)}function o5(u,f){fU(u,f);var $=S0(f.value),F=f.type;if($!=null)if(F==="number"){if($===0&&u.value===""||u.value!=$)u.value=""+$}else u.value!==""+$&&(u.value=""+$);else if(F==="submit"||F==="reset"){u.removeAttribute("value");return}f.hasOwnProperty("value")?e5(u,f.type,$):f.hasOwnProperty("defaultValue")&&e5(u,f.type,S0(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(u.defaultChecked=!!f.defaultChecked)}function nF(u,f,$){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var F=f.type;if(!(F!=="submit"&&F!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+u._wrapperState.initialValue,$||f===u.value||(u.value=f),u.defaultValue=f}$=u.name,$!==""&&(u.name=""),u.defaultChecked=!!u._wrapperState.initialChecked,$!==""&&(u.name=$)}function e5(u,f,$){if(f!=="number"||z8(u.ownerDocument)!==u)$==null?u.defaultValue=""+u._wrapperState.initialValue:u.defaultValue!==""+$&&(u.defaultValue=""+$)}var N4=Array.isArray;function h1(u,f,$,F){if(u=u.options,f){f={};for(var l=0;l<$.length;l++)f["$"+$[l]]=!0;for($=0;$<u.length;$++)l=f.hasOwnProperty("$"+u[$].value),u[$].selected!==l&&(u[$].selected=l),l&&F&&(u[$].defaultSelected=!0)}else{$=""+S0($),f=null;for(l=0;l<u.length;l++){if(u[l].value===$){u[l].selected=!0,F&&(u[l].defaultSelected=!0);return}f!==null||u[l].disabled||(f=u[l])}f!==null&&(f.selected=!0)}}function u9(u,f){if(f.dangerouslySetInnerHTML!=null)throw Error(p(91));return Zu({},f,{value:void 0,defaultValue:void 0,children:""+u._wrapperState.initialValue})}function dF(u,f){var $=f.value;if($==null){if($=f.children,f=f.defaultValue,$!=null){if(f!=null)throw Error(p(92));if(N4($)){if(1<$.length)throw Error(p(93));$=$[0]}f=$}f==null&&(f=""),$=f}u._wrapperState={initialValue:S0($)}}function $U(u,f){var $=S0(f.value),F=S0(f.defaultValue);$!=null&&($=""+$,$!==u.value&&(u.value=$),f.defaultValue==null&&u.defaultValue!==$&&(u.defaultValue=$)),F!=null&&(u.defaultValue=""+F)}function aF(u){var f=u.textContent;f===u._wrapperState.initialValue&&f!==""&&f!==null&&(u.value=f)}function FU(u){switch(u){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function f9(u,f){return u==null||u==="http://www.w3.org/1999/xhtml"?FU(f):u==="http://www.w3.org/2000/svg"&&f==="foreignObject"?"http://www.w3.org/1999/xhtml":u}var n3,lU=function(u){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(f,$,F,l){MSApp.execUnsafeLocalFunction(function(){return u(f,$,F,l)})}:u}(function(u,f){if(u.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in u)u.innerHTML=f;else{n3=n3||document.createElement("div"),n3.innerHTML="<svg>"+f.valueOf().toString()+"</svg>";for(f=n3.firstChild;u.firstChild;)u.removeChild(u.firstChild);for(;f.firstChild;)u.appendChild(f.firstChild)}});function t4(u,f){if(f){var $=u.firstChild;if($&&$===u.lastChild&&$.nodeType===3){$.nodeValue=f;return}}u.textContent=f}var h4={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},IK=["Webkit","ms","Moz","O"];Object.keys(h4).forEach(function(u){IK.forEach(function(f){f=f+u.charAt(0).toUpperCase()+u.substring(1),h4[f]=h4[u]})});function UU(u,f,$){return f==null||typeof f==="boolean"||f===""?"":$||typeof f!=="number"||f===0||h4.hasOwnProperty(u)&&h4[u]?(""+f).trim():f+"px"}function _U(u,f){u=u.style;for(var $ in f)if(f.hasOwnProperty($)){var F=$.indexOf("--")===0,l=UU($,f[$],F);$==="float"&&($="cssFloat"),F?u.setProperty($,l):u[$]=l}}var yK=Zu({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $9(u,f){if(f){if(yK[u]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(p(137,u));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(p(60));if(typeof f.dangerouslySetInnerHTML!=="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(p(61))}if(f.style!=null&&typeof f.style!=="object")throw Error(p(62))}}function F9(u,f){if(u.indexOf("-")===-1)return typeof f.is==="string";switch(u){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var l9=null;function g9(u){return u=u.target||u.srcElement||window,u.correspondingUseElement&&(u=u.correspondingUseElement),u.nodeType===3?u.parentNode:u}var U9=null,v1=null,x1=null;function oF(u){if(u=W3(u)){if(typeof U9!=="function")throw Error(p(280));var f=u.stateNode;f&&(f=s8(f),U9(u.stateNode,u.type,f))}}function QU(u){v1?x1?x1.push(u):x1=[u]:v1=u}function JU(){if(v1){var u=v1,f=x1;if(x1=v1=null,oF(u),f)for(u=0;u<f.length;u++)oF(f[u])}}function qU(u,f){return u(f)}function TU(){}var O5=!1;function AU(u,f,$){if(O5)return u(f,$);O5=!0;try{return qU(u,f,$)}finally{if(O5=!1,v1!==null||x1!==null)TU(),JU()}}function n4(u,f){var $=u.stateNode;if($===null)return null;var F=s8($);if(F===null)return null;$=F[f];u:switch(f){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(F=!F.disabled)||(u=u.type,F=!(u==="button"||u==="input"||u==="select"||u==="textarea")),u=!F;break u;default:u=!1}if(u)return null;if($&&typeof $!=="function")throw Error(p(231,f,typeof $));return $}var _9=!1;if(u0)try{g0={},Object.defineProperty(g0,"passive",{get:function(){_9=!0}}),window.addEventListener("test",g0,g0),window.removeEventListener("test",g0,g0)}catch(u){_9=!1}var g0;function kK(u,f,$,F,l,U,_,Q,J){var q=Array.prototype.slice.call(arguments,3);try{f.apply($,q)}catch(T){this.onError(T)}}var v4=!1,Z8=null,Y8=!1,Q9=null,PK={onError:function(u){v4=!0,Z8=u}};function rK(u,f,$,F,l,U,_,Q,J){v4=!1,Z8=null,kK.apply(PK,arguments)}function CK(u,f,$,F,l,U,_,Q,J){if(rK.apply(this,arguments),v4){if(v4){var q=Z8;v4=!1,Z8=null}else throw Error(p(198));Y8||(Y8=!0,Q9=q)}}function _1(u){var f=u,$=u;if(u.alternate)for(;f.return;)f=f.return;else{u=f;do f=u,(f.flags&4098)!==0&&($=f.return),u=f.return;while(u)}return f.tag===3?$:null}function WU(u){if(u.tag===13){var f=u.memoizedState;if(f===null&&(u=u.alternate,u!==null&&(f=u.memoizedState)),f!==null)return f.dehydrated}return null}function eF(u){if(_1(u)!==u)throw Error(p(188))}function hK(u){var f=u.alternate;if(!f){if(f=_1(u),f===null)throw Error(p(188));return f!==u?null:u}for(var $=u,F=f;;){var l=$.return;if(l===null)break;var U=l.alternate;if(U===null){if(F=l.return,F!==null){$=F;continue}break}if(l.child===U.child){for(U=l.child;U;){if(U===$)return eF(l),u;if(U===F)return eF(l),f;U=U.sibling}throw Error(p(188))}if($.return!==F.return)$=l,F=U;else{for(var _=!1,Q=l.child;Q;){if(Q===$){_=!0,$=l,F=U;break}if(Q===F){_=!0,F=l,$=U;break}Q=Q.sibling}if(!_){for(Q=U.child;Q;){if(Q===$){_=!0,$=U,F=l;break}if(Q===F){_=!0,F=U,$=l;break}Q=Q.sibling}if(!_)throw Error(p(189))}}if($.alternate!==F)throw Error(p(190))}if($.tag!==3)throw Error(p(188));return $.stateNode.current===$?u:f}function KU(u){return u=hK(u),u!==null?wU(u):null}function wU(u){if(u.tag===5||u.tag===6)return u;for(u=u.child;u!==null;){var f=wU(u);if(f!==null)return f;u=u.sibling}return null}var{unstable_scheduleCallback:BU,unstable_cancelCallback:ul,unstable_shouldYield:vK,unstable_requestPaint:xK,unstable_now:Mu,unstable_getCurrentPriorityLevel:cK,unstable_ImmediatePriority:s9,unstable_UserBlockingPriority:LU,unstable_NormalPriority:R8,unstable_LowPriority:mK,unstable_IdlePriority:GU}=ff,p8=null,Cf=null;function pK(u){if(Cf&&typeof Cf.onCommitFiberRoot==="function")try{Cf.onCommitFiberRoot(p8,u,void 0,(u.current.flags&128)===128)}catch(f){}}var Ef=Math.clz32?Math.clz32:gK,bK=Math.log,iK=Math.LN2;function gK(u){return u>>>=0,u===0?32:31-(bK(u)/iK|0)|0}var d3=64,a3=4194304;function I4(u){switch(u&-u){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function M8(u,f){var $=u.pendingLanes;if($===0)return 0;var F=0,l=u.suspendedLanes,U=u.pingedLanes,_=$&268435455;if(_!==0){var Q=_&~l;Q!==0?F=I4(Q):(U&=_,U!==0&&(F=I4(U)))}else _=$&~l,_!==0?F=I4(_):U!==0&&(F=I4(U));if(F===0)return 0;if(f!==0&&f!==F&&(f&l)===0&&(l=F&-F,U=f&-f,l>=U||l===16&&(U&4194240)!==0))return f;if((F&4)!==0&&(F|=$&16),f=u.entangledLanes,f!==0)for(u=u.entanglements,f&=F;0<f;)$=31-Ef(f),l=1<<$,F|=u[$],f&=~l;return F}function sK(u,f){switch(u){case 1:case 2:case 4:return f+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return f+5000;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tK(u,f){for(var{suspendedLanes:$,pingedLanes:F,expirationTimes:l,pendingLanes:U}=u;0<U;){var _=31-Ef(U),Q=1<<_,J=l[_];if(J===-1){if((Q&$)===0||(Q&F)!==0)l[_]=sK(Q,f)}else J<=f&&(u.expiredLanes|=Q);U&=~Q}}function J9(u){return u=u.pendingLanes&-1073741825,u!==0?u:u&1073741824?1073741824:0}function HU(){var u=d3;return d3<<=1,(d3&4194240)===0&&(d3=64),u}function S5(u){for(var f=[],$=0;31>$;$++)f.push(u);return f}function T3(u,f,$){u.pendingLanes|=f,f!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,f=31-Ef(f),u[f]=$}function nK(u,f){var $=u.pendingLanes&~f;u.pendingLanes=f,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=f,u.mutableReadLanes&=f,u.entangledLanes&=f,f=u.entanglements;var F=u.eventTimes;for(u=u.expirationTimes;0<$;){var l=31-Ef($),U=1<<l;f[l]=0,F[l]=-1,u[l]=-1,$&=~U}}function t9(u,f){var $=u.entangledLanes|=f;for(u=u.entanglements;$;){var F=31-Ef($),l=1<<F;l&f|u[F]&f&&(u[F]|=f),$&=~l}}var Tu=0;function zU(u){return u&=-u,1<u?4<u?(u&268435455)!==0?16:536870912:4:1}var ZU,n9,YU,RU,MU,q9=!1,o3=[],Y0=null,R0=null,M0=null,d4=new Map,a4=new Map,G0=[],dK="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function fl(u,f){switch(u){case"focusin":case"focusout":Y0=null;break;case"dragenter":case"dragleave":R0=null;break;case"mouseover":case"mouseout":M0=null;break;case"pointerover":case"pointerout":d4.delete(f.pointerId);break;case"gotpointercapture":case"lostpointercapture":a4.delete(f.pointerId)}}function E4(u,f,$,F,l,U){if(u===null||u.nativeEvent!==U)return u={blockedOn:f,domEventName:$,eventSystemFlags:F,nativeEvent:U,targetContainers:[l]},f!==null&&(f=W3(f),f!==null&&n9(f)),u;return u.eventSystemFlags|=F,f=u.targetContainers,l!==null&&f.indexOf(l)===-1&&f.push(l),u}function aK(u,f,$,F,l){switch(f){case"focusin":return Y0=E4(Y0,u,f,$,F,l),!0;case"dragenter":return R0=E4(R0,u,f,$,F,l),!0;case"mouseover":return M0=E4(M0,u,f,$,F,l),!0;case"pointerover":var U=l.pointerId;return d4.set(U,E4(d4.get(U)||null,u,f,$,F,l)),!0;case"gotpointercapture":return U=l.pointerId,a4.set(U,E4(a4.get(U)||null,u,f,$,F,l)),!0}return!1}function EU(u){var f=n0(u.target);if(f!==null){var $=_1(f);if($!==null){if(f=$.tag,f===13){if(f=WU($),f!==null){u.blockedOn=f,MU(u.priority,function(){YU($)});return}}else if(f===3&&$.stateNode.current.memoizedState.isDehydrated){u.blockedOn=$.tag===3?$.stateNode.containerInfo:null;return}}}u.blockedOn=null}function J8(u){if(u.blockedOn!==null)return!1;for(var f=u.targetContainers;0<f.length;){var $=T9(u.domEventName,u.eventSystemFlags,f[0],u.nativeEvent);if($===null){$=u.nativeEvent;var F=new $.constructor($.type,$);l9=F,$.target.dispatchEvent(F),l9=null}else return f=W3($),f!==null&&n9(f),u.blockedOn=$,!1;f.shift()}return!0}function $l(u,f,$){J8(u)&&$.delete(f)}function oK(){q9=!1,Y0!==null&&J8(Y0)&&(Y0=null),R0!==null&&J8(R0)&&(R0=null),M0!==null&&J8(M0)&&(M0=null),d4.forEach($l),a4.forEach($l)}function V4(u,f){u.blockedOn===f&&(u.blockedOn=null,q9||(q9=!0,ff.unstable_scheduleCallback(ff.unstable_NormalPriority,oK)))}function o4(u){function f(l){return V4(l,u)}if(0<o3.length){V4(o3[0],u);for(var $=1;$<o3.length;$++){var F=o3[$];F.blockedOn===u&&(F.blockedOn=null)}}Y0!==null&&V4(Y0,u),R0!==null&&V4(R0,u),M0!==null&&V4(M0,u),d4.forEach(f),a4.forEach(f);for($=0;$<G0.length;$++)F=G0[$],F.blockedOn===u&&(F.blockedOn=null);for(;0<G0.length&&($=G0[0],$.blockedOn===null);)EU($),$.blockedOn===null&&G0.shift()}var c1=l0.ReactCurrentBatchConfig,E8=!0;function eK(u,f,$,F){var l=Tu,U=c1.transition;c1.transition=null;try{Tu=1,d9(u,f,$,F)}finally{Tu=l,c1.transition=U}}function uw(u,f,$,F){var l=Tu,U=c1.transition;c1.transition=null;try{Tu=4,d9(u,f,$,F)}finally{Tu=l,c1.transition=U}}function d9(u,f,$,F){if(E8){var l=T9(u,f,$,F);if(l===null)P5(u,f,F,V8,$),fl(u,F);else if(aK(l,u,f,$,F))F.stopPropagation();else if(fl(u,F),f&4&&-1<dK.indexOf(u)){for(;l!==null;){var U=W3(l);if(U!==null&&ZU(U),U=T9(u,f,$,F),U===null&&P5(u,f,F,V8,$),U===l)break;l=U}l!==null&&F.stopPropagation()}else P5(u,f,F,null,$)}}var V8=null;function T9(u,f,$,F){if(V8=null,u=g9(F),u=n0(u),u!==null)if(f=_1(u),f===null)u=null;else if($=f.tag,$===13){if(u=WU(f),u!==null)return u;u=null}else if($===3){if(f.stateNode.current.memoizedState.isDehydrated)return f.tag===3?f.stateNode.containerInfo:null;u=null}else f!==u&&(u=null);return V8=u,null}function VU(u){switch(u){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(cK()){case s9:return 1;case LU:return 4;case R8:case mK:return 16;case GU:return 536870912;default:return 16}default:return 16}}var z0=null,a9=null,q8=null;function XU(){if(q8)return q8;var u,f=a9,$=f.length,F,l="value"in z0?z0.value:z0.textContent,U=l.length;for(u=0;u<$&&f[u]===l[u];u++);var _=$-u;for(F=1;F<=_&&f[$-F]===l[U-F];F++);return q8=l.slice(u,1<F?1-F:void 0)}function T8(u){var f=u.keyCode;return"charCode"in u?(u=u.charCode,u===0&&f===13&&(u=13)):u=f,u===10&&(u=13),32<=u||u===13?u:0}function e3(){return!0}function Fl(){return!1}function $f(u){function f($,F,l,U,_){this._reactName=$,this._targetInst=l,this.type=F,this.nativeEvent=U,this.target=_,this.currentTarget=null;for(var Q in u)u.hasOwnProperty(Q)&&($=u[Q],this[Q]=$?$(U):U[Q]);return this.isDefaultPrevented=(U.defaultPrevented!=null?U.defaultPrevented:U.returnValue===!1)?e3:Fl,this.isPropagationStopped=Fl,this}return Zu(f.prototype,{preventDefault:function(){this.defaultPrevented=!0;var $=this.nativeEvent;$&&($.preventDefault?$.preventDefault():typeof $.returnValue!=="unknown"&&($.returnValue=!1),this.isDefaultPrevented=e3)},stopPropagation:function(){var $=this.nativeEvent;$&&($.stopPropagation?$.stopPropagation():typeof $.cancelBubble!=="unknown"&&($.cancelBubble=!0),this.isPropagationStopped=e3)},persist:function(){},isPersistent:e3}),f}var a1={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(u){return u.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},o9=$f(a1),A3=Zu({},a1,{view:0,detail:0}),fw=$f(A3),j5,N5,X4,b8=Zu({},A3,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:e9,button:0,buttons:0,relatedTarget:function(u){return u.relatedTarget===void 0?u.fromElement===u.srcElement?u.toElement:u.fromElement:u.relatedTarget},movementX:function(u){if("movementX"in u)return u.movementX;return u!==X4&&(X4&&u.type==="mousemove"?(j5=u.screenX-X4.screenX,N5=u.screenY-X4.screenY):N5=j5=0,X4=u),j5},movementY:function(u){return"movementY"in u?u.movementY:N5}}),ll=$f(b8),$w=Zu({},b8,{dataTransfer:0}),Fw=$f($w),lw=Zu({},A3,{relatedTarget:0}),I5=$f(lw),Uw=Zu({},a1,{animationName:0,elapsedTime:0,pseudoElement:0}),_w=$f(Uw),Qw=Zu({},a1,{clipboardData:function(u){return"clipboardData"in u?u.clipboardData:window.clipboardData}}),Jw=$f(Qw),qw=Zu({},a1,{data:0}),Ul=$f(qw),Tw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Aw={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ww={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kw(u){var f=this.nativeEvent;return f.getModifierState?f.getModifierState(u):(u=Ww[u])?!!f[u]:!1}function e9(){return Kw}var ww=Zu({},A3,{key:function(u){if(u.key){var f=Tw[u.key]||u.key;if(f!=="Unidentified")return f}return u.type==="keypress"?(u=T8(u),u===13?"Enter":String.fromCharCode(u)):u.type==="keydown"||u.type==="keyup"?Aw[u.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:e9,charCode:function(u){return u.type==="keypress"?T8(u):0},keyCode:function(u){return u.type==="keydown"||u.type==="keyup"?u.keyCode:0},which:function(u){return u.type==="keypress"?T8(u):u.type==="keydown"||u.type==="keyup"?u.keyCode:0}}),Bw=$f(ww),Lw=Zu({},b8,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_l=$f(Lw),Gw=Zu({},A3,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:e9}),Hw=$f(Gw),zw=Zu({},a1,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zw=$f(zw),Yw=Zu({},b8,{deltaX:function(u){return"deltaX"in u?u.deltaX:("wheelDeltaX"in u)?-u.wheelDeltaX:0},deltaY:function(u){return"deltaY"in u?u.deltaY:("wheelDeltaY"in u)?-u.wheelDeltaY:("wheelDelta"in u)?-u.wheelDelta:0},deltaZ:0,deltaMode:0}),Rw=$f(Yw),Mw=[9,13,27,32],u7=u0&&"CompositionEvent"in window,x4=null;u0&&"documentMode"in document&&(x4=document.documentMode);var Ew=u0&&"TextEvent"in window&&!x4,DU=u0&&(!u7||x4&&8<x4&&11>=x4),Ql=String.fromCharCode(32),Jl=!1;function OU(u,f){switch(u){case"keyup":return Mw.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SU(u){return u=u.detail,typeof u==="object"&&"data"in u?u.data:null}var O1=!1;function Vw(u,f){switch(u){case"compositionend":return SU(f);case"keypress":if(f.which!==32)return null;return Jl=!0,Ql;case"textInput":return u=f.data,u===Ql&&Jl?null:u;default:return null}}function Xw(u,f){if(O1)return u==="compositionend"||!u7&&OU(u,f)?(u=XU(),q8=a9=z0=null,O1=!1,u):null;switch(u){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1<f.char.length)return f.char;if(f.which)return String.fromCharCode(f.which)}return null;case"compositionend":return DU&&f.locale!=="ko"?null:f.data;default:return null}}var Dw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ql(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f==="input"?!!Dw[u.type]:f==="textarea"?!0:!1}function jU(u,f,$,F){QU(F),f=X8(f,"onChange"),0<f.length&&($=new o9("onChange","change",null,$,F),u.push({event:$,listeners:f}))}var c4=null,e4=null;function Ow(u){cU(u,0)}function i8(u){var f=N1(u);if(uU(f))return u}function Sw(u,f){if(u==="change")return f}var NU=!1;if(u0){if(u0){if(k4="oninput"in document,!k4)A8=document.createElement("div"),A8.setAttribute("oninput","return;"),k4=typeof A8.oninput==="function";y4=k4}else y4=!1;NU=y4&&(!document.documentMode||9<document.documentMode)}var y4,k4,A8;function Tl(){c4&&(c4.detachEvent("onpropertychange",IU),e4=c4=null)}function IU(u){if(u.propertyName==="value"&&i8(e4)){var f=[];jU(f,e4,u,g9(u)),AU(Ow,f)}}function jw(u,f,$){u==="focusin"?(Tl(),c4=f,e4=$,c4.attachEvent("onpropertychange",IU)):u==="focusout"&&Tl()}function Nw(u){if(u==="selectionchange"||u==="keyup"||u==="keydown")return i8(e4)}function Iw(u,f){if(u==="click")return i8(f)}function yw(u,f){if(u==="input"||u==="change")return i8(f)}function kw(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var Xf=typeof Object.is==="function"?Object.is:kw;function u3(u,f){if(Xf(u,f))return!0;if(typeof u!=="object"||u===null||typeof f!=="object"||f===null)return!1;var $=Object.keys(u),F=Object.keys(f);if($.length!==F.length)return!1;for(F=0;F<$.length;F++){var l=$[F];if(!g5.call(f,l)||!Xf(u[l],f[l]))return!1}return!0}function Al(u){for(;u&&u.firstChild;)u=u.firstChild;return u}function Wl(u,f){var $=Al(u);u=0;for(var F;$;){if($.nodeType===3){if(F=u+$.textContent.length,u<=f&&F>=f)return{node:$,offset:f-u};u=F}u:{for(;$;){if($.nextSibling){$=$.nextSibling;break u}$=$.parentNode}$=void 0}$=Al($)}}function yU(u,f){return u&&f?u===f?!0:u&&u.nodeType===3?!1:f&&f.nodeType===3?yU(u,f.parentNode):("contains"in u)?u.contains(f):u.compareDocumentPosition?!!(u.compareDocumentPosition(f)&16):!1:!1}function kU(){for(var u=window,f=z8();f instanceof u.HTMLIFrameElement;){try{var $=typeof f.contentWindow.location.href==="string"}catch(F){$=!1}if($)u=f.contentWindow;else break;f=z8(u.document)}return f}function f7(u){var f=u&&u.nodeName&&u.nodeName.toLowerCase();return f&&(f==="input"&&(u.type==="text"||u.type==="search"||u.type==="tel"||u.type==="url"||u.type==="password")||f==="textarea"||u.contentEditable==="true")}function Pw(u){var f=kU(),$=u.focusedElem,F=u.selectionRange;if(f!==$&&$&&$.ownerDocument&&yU($.ownerDocument.documentElement,$)){if(F!==null&&f7($)){if(f=F.start,u=F.end,u===void 0&&(u=f),"selectionStart"in $)$.selectionStart=f,$.selectionEnd=Math.min(u,$.value.length);else if(u=(f=$.ownerDocument||document)&&f.defaultView||window,u.getSelection){u=u.getSelection();var l=$.textContent.length,U=Math.min(F.start,l);F=F.end===void 0?U:Math.min(F.end,l),!u.extend&&U>F&&(l=F,F=U,U=l),l=Wl($,U);var _=Wl($,F);l&&_&&(u.rangeCount!==1||u.anchorNode!==l.node||u.anchorOffset!==l.offset||u.focusNode!==_.node||u.focusOffset!==_.offset)&&(f=f.createRange(),f.setStart(l.node,l.offset),u.removeAllRanges(),U>F?(u.addRange(f),u.extend(_.node,_.offset)):(f.setEnd(_.node,_.offset),u.addRange(f)))}}f=[];for(u=$;u=u.parentNode;)u.nodeType===1&&f.push({element:u,left:u.scrollLeft,top:u.scrollTop});typeof $.focus==="function"&&$.focus();for($=0;$<f.length;$++)u=f[$],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}}var rw=u0&&"documentMode"in document&&11>=document.documentMode,S1=null,A9=null,m4=null,W9=!1;function Kl(u,f,$){var F=$.window===$?$.document:$.nodeType===9?$:$.ownerDocument;W9||S1==null||S1!==z8(F)||(F=S1,("selectionStart"in F)&&f7(F)?F={start:F.selectionStart,end:F.selectionEnd}:(F=(F.ownerDocument&&F.ownerDocument.defaultView||window).getSelection(),F={anchorNode:F.anchorNode,anchorOffset:F.anchorOffset,focusNode:F.focusNode,focusOffset:F.focusOffset}),m4&&u3(m4,F)||(m4=F,F=X8(A9,"onSelect"),0<F.length&&(f=new o9("onSelect","select",null,f,$),u.push({event:f,listeners:F}),f.target=S1)))}function u8(u,f){var $={};return $[u.toLowerCase()]=f.toLowerCase(),$["Webkit"+u]="webkit"+f,$["Moz"+u]="moz"+f,$}var j1={animationend:u8("Animation","AnimationEnd"),animationiteration:u8("Animation","AnimationIteration"),animationstart:u8("Animation","AnimationStart"),transitionend:u8("Transition","TransitionEnd")},y5={},PU={};u0&&(PU=document.createElement("div").style,("AnimationEvent"in window)||(delete j1.animationend.animation,delete j1.animationiteration.animation,delete j1.animationstart.animation),("TransitionEvent"in window)||delete j1.transitionend.transition);function g8(u){if(y5[u])return y5[u];if(!j1[u])return u;var f=j1[u],$;for($ in f)if(f.hasOwnProperty($)&&$ in PU)return y5[u]=f[$];return u}var rU=g8("animationend"),CU=g8("animationiteration"),hU=g8("animationstart"),vU=g8("transitionend"),xU=new Map,wl="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function N0(u,f){xU.set(u,f),U1(f,[u])}for(P4=0;P4<wl.length;P4++)r4=wl[P4],K9=r4.toLowerCase(),w9=r4[0].toUpperCase()+r4.slice(1),N0(K9,"on"+w9);var r4,K9,w9,P4;N0(rU,"onAnimationEnd");N0(CU,"onAnimationIteration");N0(hU,"onAnimationStart");N0("dblclick","onDoubleClick");N0("focusin","onFocus");N0("focusout","onBlur");N0(vU,"onTransitionEnd");b1("onMouseEnter",["mouseout","mouseover"]);b1("onMouseLeave",["mouseout","mouseover"]);b1("onPointerEnter",["pointerout","pointerover"]);b1("onPointerLeave",["pointerout","pointerover"]);U1("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));U1("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));U1("onBeforeInput",["compositionend","keypress","textInput","paste"]);U1("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));U1("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));U1("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var C4="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Cw=new Set("cancel close invalid load scroll toggle".split(" ").concat(C4));function Bl(u,f,$){var F=u.type||"unknown-event";u.currentTarget=$,CK(F,f,void 0,u),u.currentTarget=null}function cU(u,f){f=(f&4)!==0;for(var $=0;$<u.length;$++){var F=u[$],l=F.event;F=F.listeners;u:{var U=void 0;if(f)for(var _=F.length-1;0<=_;_--){var Q=F[_],J=Q.instance,q=Q.currentTarget;if(Q=Q.listener,J!==U&&l.isPropagationStopped())break u;Bl(l,Q,q),U=J}else for(_=0;_<F.length;_++){if(Q=F[_],J=Q.instance,q=Q.currentTarget,Q=Q.listener,J!==U&&l.isPropagationStopped())break u;Bl(l,Q,q),U=J}}}if(Y8)throw u=Q9,Y8=!1,Q9=null,u}function Ku(u,f){var $=f[z9];$===void 0&&($=f[z9]=new Set);var F=u+"__bubble";$.has(F)||(mU(f,u,2,!1),$.add(F))}function k5(u,f,$){var F=0;f&&(F|=4),mU($,u,F,f)}var f8="_reactListening"+Math.random().toString(36).slice(2);function f3(u){if(!u[f8]){u[f8]=!0,nl.forEach(function($){$!=="selectionchange"&&(Cw.has($)||k5($,!1,u),k5($,!0,u))});var f=u.nodeType===9?u:u.ownerDocument;f===null||f[f8]||(f[f8]=!0,k5("selectionchange",!1,f))}}function mU(u,f,$,F){switch(VU(f)){case 1:var l=eK;break;case 4:l=uw;break;default:l=d9}$=l.bind(null,f,$,u),l=void 0,!_9||f!=="touchstart"&&f!=="touchmove"&&f!=="wheel"||(l=!0),F?l!==void 0?u.addEventListener(f,$,{capture:!0,passive:l}):u.addEventListener(f,$,!0):l!==void 0?u.addEventListener(f,$,{passive:l}):u.addEventListener(f,$,!1)}function P5(u,f,$,F,l){var U=F;if((f&1)===0&&(f&2)===0&&F!==null)u:for(;;){if(F===null)return;var _=F.tag;if(_===3||_===4){var Q=F.stateNode.containerInfo;if(Q===l||Q.nodeType===8&&Q.parentNode===l)break;if(_===4)for(_=F.return;_!==null;){var J=_.tag;if(J===3||J===4){if(J=_.stateNode.containerInfo,J===l||J.nodeType===8&&J.parentNode===l)return}_=_.return}for(;Q!==null;){if(_=n0(Q),_===null)return;if(J=_.tag,J===5||J===6){F=U=_;continue u}Q=Q.parentNode}}F=F.return}AU(function(){var q=U,T=g9($),W=[];u:{var A=xU.get(u);if(A!==void 0){var K=o9,L=u;switch(u){case"keypress":if(T8($)===0)break u;case"keydown":case"keyup":K=Bw;break;case"focusin":L="focus",K=I5;break;case"focusout":L="blur",K=I5;break;case"beforeblur":case"afterblur":K=I5;break;case"click":if($.button===2)break u;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":K=ll;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":K=Fw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":K=Hw;break;case rU:case CU:case hU:K=_w;break;case vU:K=Zw;break;case"scroll":K=fw;break;case"wheel":K=Rw;break;case"copy":case"cut":case"paste":K=Jw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":K=_l}var z=(f&4)!==0,Z=!z&&u==="scroll",B=z?A!==null?A+"Capture":null:A;z=[];for(var G=q,w;G!==null;){w=G;var H=w.stateNode;if(w.tag===5&&H!==null&&(w=H,B!==null&&(H=n4(G,B),H!=null&&z.push($3(G,H,w)))),Z)break;G=G.return}0<z.length&&(A=new K(A,L,null,$,T),W.push({event:A,listeners:z}))}}if((f&7)===0){u:{if(A=u==="mouseover"||u==="pointerover",K=u==="mouseout"||u==="pointerout",A&&$!==l9&&(L=$.relatedTarget||$.fromElement)&&(n0(L)||L[f0]))break u;if(K||A){if(A=T.window===T?T:(A=T.ownerDocument)?A.defaultView||A.parentWindow:window,K){if(L=$.relatedTarget||$.toElement,K=q,L=L?n0(L):null,L!==null&&(Z=_1(L),L!==Z||L.tag!==5&&L.tag!==6))L=null}else K=null,L=q;if(K!==L){if(z=ll,H="onMouseLeave",B="onMouseEnter",G="mouse",u==="pointerout"||u==="pointerover")z=_l,H="onPointerLeave",B="onPointerEnter",G="pointer";if(Z=K==null?A:N1(K),w=L==null?A:N1(L),A=new z(H,G+"leave",K,$,T),A.target=Z,A.relatedTarget=w,H=null,n0(T)===q&&(z=new z(B,G+"enter",L,$,T),z.target=w,z.relatedTarget=Z,H=z),Z=H,K&&L)f:{z=K,B=L,G=0;for(w=z;w;w=E1(w))G++;w=0;for(H=B;H;H=E1(H))w++;for(;0<G-w;)z=E1(z),G--;for(;0<w-G;)B=E1(B),w--;for(;G--;){if(z===B||B!==null&&z===B.alternate)break f;z=E1(z),B=E1(B)}z=null}else z=null;K!==null&&Ll(W,A,K,z,!1),L!==null&&Z!==null&&Ll(W,Z,L,z,!0)}}}u:{if(A=q?N1(q):window,K=A.nodeName&&A.nodeName.toLowerCase(),K==="select"||K==="input"&&A.type==="file")var M=Sw;else if(ql(A))if(NU)M=yw;else{M=Nw;var R=jw}else(K=A.nodeName)&&K.toLowerCase()==="input"&&(A.type==="checkbox"||A.type==="radio")&&(M=Iw);if(M&&(M=M(u,q))){jU(W,M,$,T);break u}R&&R(u,A,q),u==="focusout"&&(R=A._wrapperState)&&R.controlled&&A.type==="number"&&e5(A,"number",A.value)}switch(R=q?N1(q):window,u){case"focusin":if(ql(R)||R.contentEditable==="true")S1=R,A9=q,m4=null;break;case"focusout":m4=A9=S1=null;break;case"mousedown":W9=!0;break;case"contextmenu":case"mouseup":case"dragend":W9=!1,Kl(W,$,T);break;case"selectionchange":if(rw)break;case"keydown":case"keyup":Kl(W,$,T)}var E;if(u7)u:{switch(u){case"compositionstart":var V="onCompositionStart";break u;case"compositionend":V="onCompositionEnd";break u;case"compositionupdate":V="onCompositionUpdate";break u}V=void 0}else O1?OU(u,$)&&(V="onCompositionEnd"):u==="keydown"&&$.keyCode===229&&(V="onCompositionStart");if(V&&(DU&&$.locale!=="ko"&&(O1||V!=="onCompositionStart"?V==="onCompositionEnd"&&O1&&(E=XU()):(z0=T,a9=("value"in z0)?z0.value:z0.textContent,O1=!0)),R=X8(q,V),0<R.length&&(V=new Ul(V,u,null,$,T),W.push({event:V,listeners:R}),E?V.data=E:(E=SU($),E!==null&&(V.data=E)))),E=Ew?Vw(u,$):Xw(u,$))q=X8(q,"onBeforeInput"),0<q.length&&(T=new Ul("onBeforeInput","beforeinput",null,$,T),W.push({event:T,listeners:q}),T.data=E)}cU(W,f)})}function $3(u,f,$){return{instance:u,listener:f,currentTarget:$}}function X8(u,f){for(var $=f+"Capture",F=[];u!==null;){var l=u,U=l.stateNode;l.tag===5&&U!==null&&(l=U,U=n4(u,$),U!=null&&F.unshift($3(u,U,l)),U=n4(u,f),U!=null&&F.push($3(u,U,l))),u=u.return}return F}function E1(u){if(u===null)return null;do u=u.return;while(u&&u.tag!==5);return u?u:null}function Ll(u,f,$,F,l){for(var U=f._reactName,_=[];$!==null&&$!==F;){var Q=$,J=Q.alternate,q=Q.stateNode;if(J!==null&&J===F)break;Q.tag===5&&q!==null&&(Q=q,l?(J=n4($,U),J!=null&&_.unshift($3($,J,Q))):l||(J=n4($,U),J!=null&&_.push($3($,J,Q)))),$=$.return}_.length!==0&&u.push({event:f,listeners:_})}var hw=/\r\n?/g,vw=/\u0000|\uFFFD/g;function Gl(u){return(typeof u==="string"?u:""+u).replace(hw,`
1374
+ `).replace(vw,"")}function $8(u,f,$){if(f=Gl(f),Gl(u)!==f&&$)throw Error(p(425))}function D8(){}var B9=null,L9=null;function G9(u,f){return u==="textarea"||u==="noscript"||typeof f.children==="string"||typeof f.children==="number"||typeof f.dangerouslySetInnerHTML==="object"&&f.dangerouslySetInnerHTML!==null&&f.dangerouslySetInnerHTML.__html!=null}var H9=typeof setTimeout==="function"?setTimeout:void 0,xw=typeof clearTimeout==="function"?clearTimeout:void 0,Hl=typeof Promise==="function"?Promise:void 0,cw=typeof queueMicrotask==="function"?queueMicrotask:typeof Hl<"u"?function(u){return Hl.resolve(null).then(u).catch(mw)}:H9;function mw(u){setTimeout(function(){throw u})}function r5(u,f){var $=f,F=0;do{var l=$.nextSibling;if(u.removeChild($),l&&l.nodeType===8)if($=l.data,$==="/$"){if(F===0){u.removeChild(l),o4(f);return}F--}else $!=="$"&&$!=="$?"&&$!=="$!"||F++;$=l}while($);o4(f)}function E0(u){for(;u!=null;u=u.nextSibling){var f=u.nodeType;if(f===1||f===3)break;if(f===8){if(f=u.data,f==="$"||f==="$!"||f==="$?")break;if(f==="/$")return null}}return u}function zl(u){u=u.previousSibling;for(var f=0;u;){if(u.nodeType===8){var $=u.data;if($==="$"||$==="$!"||$==="$?"){if(f===0)return u;f--}else $==="/$"&&f++}u=u.previousSibling}return null}var o1=Math.random().toString(36).slice(2),rf="__reactFiber$"+o1,F3="__reactProps$"+o1,f0="__reactContainer$"+o1,z9="__reactEvents$"+o1,pw="__reactListeners$"+o1,bw="__reactHandles$"+o1;function n0(u){var f=u[rf];if(f)return f;for(var $=u.parentNode;$;){if(f=$[f0]||$[rf]){if($=f.alternate,f.child!==null||$!==null&&$.child!==null)for(u=zl(u);u!==null;){if($=u[rf])return $;u=zl(u)}return f}u=$,$=u.parentNode}return null}function W3(u){return u=u[rf]||u[f0],!u||u.tag!==5&&u.tag!==6&&u.tag!==13&&u.tag!==3?null:u}function N1(u){if(u.tag===5||u.tag===6)return u.stateNode;throw Error(p(33))}function s8(u){return u[F3]||null}var Z9=[],I1=-1;function I0(u){return{current:u}}function wu(u){0>I1||(u.current=Z9[I1],Z9[I1]=null,I1--)}function Wu(u,f){I1++,Z9[I1]=u.current,u.current=f}var j0={},vu=I0(j0),su=I0(!1),u1=j0;function i1(u,f){var $=u.type.contextTypes;if(!$)return j0;var F=u.stateNode;if(F&&F.__reactInternalMemoizedUnmaskedChildContext===f)return F.__reactInternalMemoizedMaskedChildContext;var l={},U;for(U in $)l[U]=f[U];return F&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=f,u.__reactInternalMemoizedMaskedChildContext=l),l}function tu(u){return u=u.childContextTypes,u!==null&&u!==void 0}function O8(){wu(su),wu(vu)}function Zl(u,f,$){if(vu.current!==j0)throw Error(p(168));Wu(vu,f),Wu(su,$)}function pU(u,f,$){var F=u.stateNode;if(f=f.childContextTypes,typeof F.getChildContext!=="function")return $;F=F.getChildContext();for(var l in F)if(!(l in f))throw Error(p(108,jK(u)||"Unknown",l));return Zu({},$,F)}function S8(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||j0,u1=vu.current,Wu(vu,u),Wu(su,su.current),!0}function Yl(u,f,$){var F=u.stateNode;if(!F)throw Error(p(169));$?(u=pU(u,f,u1),F.__reactInternalMemoizedMergedChildContext=u,wu(su),wu(vu),Wu(vu,u)):wu(su),Wu(su,$)}var df=null,t8=!1,C5=!1;function bU(u){df===null?df=[u]:df.push(u)}function iw(u){t8=!0,bU(u)}function y0(){if(!C5&&df!==null){C5=!0;var u=0,f=Tu;try{var $=df;for(Tu=1;u<$.length;u++){var F=$[u];do F=F(!0);while(F!==null)}df=null,t8=!1}catch(l){throw df!==null&&(df=df.slice(u+1)),BU(s9,y0),l}finally{Tu=f,C5=!1}}return null}var y1=[],k1=0,j8=null,N8=0,Qf=[],Jf=0,f1=null,af=1,of="";function s0(u,f){y1[k1++]=N8,y1[k1++]=j8,j8=u,N8=f}function iU(u,f,$){Qf[Jf++]=af,Qf[Jf++]=of,Qf[Jf++]=f1,f1=u;var F=af;u=of;var l=32-Ef(F)-1;F&=~(1<<l),$+=1;var U=32-Ef(f)+l;if(30<U){var _=l-l%5;U=(F&(1<<_)-1).toString(32),F>>=_,l-=_,af=1<<32-Ef(f)+l|$<<l|F,of=U+u}else af=1<<U|$<<l|F,of=u}function $7(u){u.return!==null&&(s0(u,1),iU(u,1,0))}function F7(u){for(;u===j8;)j8=y1[--k1],y1[k1]=null,N8=y1[--k1],y1[k1]=null;for(;u===f1;)f1=Qf[--Jf],Qf[Jf]=null,of=Qf[--Jf],Qf[Jf]=null,af=Qf[--Jf],Qf[Jf]=null}var uf=null,eu=null,Lu=!1,Mf=null;function gU(u,f){var $=qf(5,null,null,0);$.elementType="DELETED",$.stateNode=f,$.return=u,f=u.deletions,f===null?(u.deletions=[$],u.flags|=16):f.push($)}function Rl(u,f){switch(u.tag){case 5:var $=u.type;return f=f.nodeType!==1||$.toLowerCase()!==f.nodeName.toLowerCase()?null:f,f!==null?(u.stateNode=f,uf=u,eu=E0(f.firstChild),!0):!1;case 6:return f=u.pendingProps===""||f.nodeType!==3?null:f,f!==null?(u.stateNode=f,uf=u,eu=null,!0):!1;case 13:return f=f.nodeType!==8?null:f,f!==null?($=f1!==null?{id:af,overflow:of}:null,u.memoizedState={dehydrated:f,treeContext:$,retryLane:1073741824},$=qf(18,null,null,0),$.stateNode=f,$.return=u,u.child=$,uf=u,eu=null,!0):!1;default:return!1}}function Y9(u){return(u.mode&1)!==0&&(u.flags&128)===0}function R9(u){if(Lu){var f=eu;if(f){var $=f;if(!Rl(u,f)){if(Y9(u))throw Error(p(418));f=E0($.nextSibling);var F=uf;f&&Rl(u,f)?gU(F,$):(u.flags=u.flags&-4097|2,Lu=!1,uf=u)}}else{if(Y9(u))throw Error(p(418));u.flags=u.flags&-4097|2,Lu=!1,uf=u}}}function Ml(u){for(u=u.return;u!==null&&u.tag!==5&&u.tag!==3&&u.tag!==13;)u=u.return;uf=u}function F8(u){if(u!==uf)return!1;if(!Lu)return Ml(u),Lu=!0,!1;var f;if((f=u.tag!==3)&&!(f=u.tag!==5)&&(f=u.type,f=f!=="head"&&f!=="body"&&!G9(u.type,u.memoizedProps)),f&&(f=eu)){if(Y9(u))throw sU(),Error(p(418));for(;f;)gU(u,f),f=E0(f.nextSibling)}if(Ml(u),u.tag===13){if(u=u.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(p(317));u:{u=u.nextSibling;for(f=0;u;){if(u.nodeType===8){var $=u.data;if($==="/$"){if(f===0){eu=E0(u.nextSibling);break u}f--}else $!=="$"&&$!=="$!"&&$!=="$?"||f++}u=u.nextSibling}eu=null}}else eu=uf?E0(u.stateNode.nextSibling):null;return!0}function sU(){for(var u=eu;u;)u=E0(u.nextSibling)}function g1(){eu=uf=null,Lu=!1}function l7(u){Mf===null?Mf=[u]:Mf.push(u)}var gw=l0.ReactCurrentBatchConfig;function D4(u,f,$){if(u=$.ref,u!==null&&typeof u!=="function"&&typeof u!=="object"){if($._owner){if($=$._owner,$){if($.tag!==1)throw Error(p(309));var F=$.stateNode}if(!F)throw Error(p(147,u));var l=F,U=""+u;if(f!==null&&f.ref!==null&&typeof f.ref==="function"&&f.ref._stringRef===U)return f.ref;return f=function(_){var Q=l.refs;_===null?delete Q[U]:Q[U]=_},f._stringRef=U,f}if(typeof u!=="string")throw Error(p(284));if(!$._owner)throw Error(p(290,u))}return u}function l8(u,f){throw u=Object.prototype.toString.call(f),Error(p(31,u==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":u))}function El(u){var f=u._init;return f(u._payload)}function tU(u){function f(B,G){if(u){var w=B.deletions;w===null?(B.deletions=[G],B.flags|=16):w.push(G)}}function $(B,G){if(!u)return null;for(;G!==null;)f(B,G),G=G.sibling;return null}function F(B,G){for(B=new Map;G!==null;)G.key!==null?B.set(G.key,G):B.set(G.index,G),G=G.sibling;return B}function l(B,G){return B=O0(B,G),B.index=0,B.sibling=null,B}function U(B,G,w){if(B.index=w,!u)return B.flags|=1048576,G;if(w=B.alternate,w!==null)return w=w.index,w<G?(B.flags|=2,G):w;return B.flags|=2,G}function _(B){return u&&B.alternate===null&&(B.flags|=2),B}function Q(B,G,w,H){if(G===null||G.tag!==6)return G=b5(w,B.mode,H),G.return=B,G;return G=l(G,w),G.return=B,G}function J(B,G,w,H){var M=w.type;if(M===D1)return T(B,G,w.props.children,H,w.key);if(G!==null&&(G.elementType===M||typeof M==="object"&&M!==null&&M.$$typeof===B0&&El(M)===G.type))return H=l(G,w.props),H.ref=D4(B,G,w),H.return=B,H;return H=H8(w.type,w.key,w.props,null,B.mode,H),H.ref=D4(B,G,w),H.return=B,H}function q(B,G,w,H){if(G===null||G.tag!==4||G.stateNode.containerInfo!==w.containerInfo||G.stateNode.implementation!==w.implementation)return G=i5(w,B.mode,H),G.return=B,G;return G=l(G,w.children||[]),G.return=B,G}function T(B,G,w,H,M){if(G===null||G.tag!==7)return G=e0(w,B.mode,H,M),G.return=B,G;return G=l(G,w),G.return=B,G}function W(B,G,w){if(typeof G==="string"&&G!==""||typeof G==="number")return G=b5(""+G,B.mode,w),G.return=B,G;if(typeof G==="object"&&G!==null){switch(G.$$typeof){case s3:return w=H8(G.type,G.key,G.props,null,B.mode,w),w.ref=D4(B,null,G),w.return=B,w;case X1:return G=i5(G,B.mode,w),G.return=B,G;case B0:var H=G._init;return W(B,H(G._payload),w)}if(N4(G)||M4(G))return G=e0(G,B.mode,w,null),G.return=B,G;l8(B,G)}return null}function A(B,G,w,H){var M=G!==null?G.key:null;if(typeof w==="string"&&w!==""||typeof w==="number")return M!==null?null:Q(B,G,""+w,H);if(typeof w==="object"&&w!==null){switch(w.$$typeof){case s3:return w.key===M?J(B,G,w,H):null;case X1:return w.key===M?q(B,G,w,H):null;case B0:return M=w._init,A(B,G,M(w._payload),H)}if(N4(w)||M4(w))return M!==null?null:T(B,G,w,H,null);l8(B,w)}return null}function K(B,G,w,H,M){if(typeof H==="string"&&H!==""||typeof H==="number")return B=B.get(w)||null,Q(G,B,""+H,M);if(typeof H==="object"&&H!==null){switch(H.$$typeof){case s3:return B=B.get(H.key===null?w:H.key)||null,J(G,B,H,M);case X1:return B=B.get(H.key===null?w:H.key)||null,q(G,B,H,M);case B0:var R=H._init;return K(B,G,w,R(H._payload),M)}if(N4(H)||M4(H))return B=B.get(w)||null,T(G,B,H,M,null);l8(G,H)}return null}function L(B,G,w,H){for(var M=null,R=null,E=G,V=G=0,D=null;E!==null&&V<w.length;V++){E.index>V?(D=E,E=null):D=E.sibling;var r=A(B,E,w[V],H);if(r===null){E===null&&(E=D);break}u&&E&&r.alternate===null&&f(B,E),G=U(r,G,V),R===null?M=r:R.sibling=r,R=r,E=D}if(V===w.length)return $(B,E),Lu&&s0(B,V),M;if(E===null){for(;V<w.length;V++)E=W(B,w[V],H),E!==null&&(G=U(E,G,V),R===null?M=E:R.sibling=E,R=E);return Lu&&s0(B,V),M}for(E=F(B,E);V<w.length;V++)D=K(E,B,V,w[V],H),D!==null&&(u&&D.alternate!==null&&E.delete(D.key===null?V:D.key),G=U(D,G,V),R===null?M=D:R.sibling=D,R=D);return u&&E.forEach(function(C){return f(B,C)}),Lu&&s0(B,V),M}function z(B,G,w,H){var M=M4(w);if(typeof M!=="function")throw Error(p(150));if(w=M.call(w),w==null)throw Error(p(151));for(var R=M=null,E=G,V=G=0,D=null,r=w.next();E!==null&&!r.done;V++,r=w.next()){E.index>V?(D=E,E=null):D=E.sibling;var C=A(B,E,r.value,H);if(C===null){E===null&&(E=D);break}u&&E&&C.alternate===null&&f(B,E),G=U(C,G,V),R===null?M=C:R.sibling=C,R=C,E=D}if(r.done)return $(B,E),Lu&&s0(B,V),M;if(E===null){for(;!r.done;V++,r=w.next())r=W(B,r.value,H),r!==null&&(G=U(r,G,V),R===null?M=r:R.sibling=r,R=r);return Lu&&s0(B,V),M}for(E=F(B,E);!r.done;V++,r=w.next())r=K(E,B,V,r.value,H),r!==null&&(u&&r.alternate!==null&&E.delete(r.key===null?V:r.key),G=U(r,G,V),R===null?M=r:R.sibling=r,R=r);return u&&E.forEach(function(m){return f(B,m)}),Lu&&s0(B,V),M}function Z(B,G,w,H){if(typeof w==="object"&&w!==null&&w.type===D1&&w.key===null&&(w=w.props.children),typeof w==="object"&&w!==null){switch(w.$$typeof){case s3:u:{for(var M=w.key,R=G;R!==null;){if(R.key===M){if(M=w.type,M===D1){if(R.tag===7){$(B,R.sibling),G=l(R,w.props.children),G.return=B,B=G;break u}}else if(R.elementType===M||typeof M==="object"&&M!==null&&M.$$typeof===B0&&El(M)===R.type){$(B,R.sibling),G=l(R,w.props),G.ref=D4(B,R,w),G.return=B,B=G;break u}$(B,R);break}else f(B,R);R=R.sibling}w.type===D1?(G=e0(w.props.children,B.mode,H,w.key),G.return=B,B=G):(H=H8(w.type,w.key,w.props,null,B.mode,H),H.ref=D4(B,G,w),H.return=B,B=H)}return _(B);case X1:u:{for(R=w.key;G!==null;){if(G.key===R)if(G.tag===4&&G.stateNode.containerInfo===w.containerInfo&&G.stateNode.implementation===w.implementation){$(B,G.sibling),G=l(G,w.children||[]),G.return=B,B=G;break u}else{$(B,G);break}else f(B,G);G=G.sibling}G=i5(w,B.mode,H),G.return=B,B=G}return _(B);case B0:return R=w._init,Z(B,G,R(w._payload),H)}if(N4(w))return L(B,G,w,H);if(M4(w))return z(B,G,w,H);l8(B,w)}return typeof w==="string"&&w!==""||typeof w==="number"?(w=""+w,G!==null&&G.tag===6?($(B,G.sibling),G=l(G,w),G.return=B,B=G):($(B,G),G=b5(w,B.mode,H),G.return=B,B=G),_(B)):$(B,G)}return Z}var s1=tU(!0),nU=tU(!1),I8=I0(null),y8=null,P1=null,U7=null;function _7(){U7=P1=y8=null}function Q7(u){var f=I8.current;wu(I8),u._currentValue=f}function M9(u,f,$){for(;u!==null;){var F=u.alternate;if((u.childLanes&f)!==f?(u.childLanes|=f,F!==null&&(F.childLanes|=f)):F!==null&&(F.childLanes&f)!==f&&(F.childLanes|=f),u===$)break;u=u.return}}function m1(u,f){y8=u,U7=P1=null,u=u.dependencies,u!==null&&u.firstContext!==null&&((u.lanes&f)!==0&&(gu=!0),u.firstContext=null)}function Af(u){var f=u._currentValue;if(U7!==u)if(u={context:u,memoizedValue:f,next:null},P1===null){if(y8===null)throw Error(p(308));P1=u,y8.dependencies={lanes:0,firstContext:u}}else P1=P1.next=u;return f}var d0=null;function J7(u){d0===null?d0=[u]:d0.push(u)}function dU(u,f,$,F){var l=f.interleaved;return l===null?($.next=$,J7(f)):($.next=l.next,l.next=$),f.interleaved=$,$0(u,F)}function $0(u,f){u.lanes|=f;var $=u.alternate;$!==null&&($.lanes|=f),$=u;for(u=u.return;u!==null;)u.childLanes|=f,$=u.alternate,$!==null&&($.childLanes|=f),$=u,u=u.return;return $.tag===3?$.stateNode:null}var L0=!1;function q7(u){u.updateQueue={baseState:u.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function aU(u,f){u=u.updateQueue,f.updateQueue===u&&(f.updateQueue={baseState:u.baseState,firstBaseUpdate:u.firstBaseUpdate,lastBaseUpdate:u.lastBaseUpdate,shared:u.shared,effects:u.effects})}function ef(u,f){return{eventTime:u,lane:f,tag:0,payload:null,callback:null,next:null}}function V0(u,f,$){var F=u.updateQueue;if(F===null)return null;if(F=F.shared,(Ju&2)!==0){var l=F.pending;return l===null?f.next=f:(f.next=l.next,l.next=f),F.pending=f,$0(u,$)}return l=F.interleaved,l===null?(f.next=f,J7(F)):(f.next=l.next,l.next=f),F.interleaved=f,$0(u,$)}function W8(u,f,$){if(f=f.updateQueue,f!==null&&(f=f.shared,($&4194240)!==0)){var F=f.lanes;F&=u.pendingLanes,$|=F,f.lanes=$,t9(u,$)}}function Vl(u,f){var{updateQueue:$,alternate:F}=u;if(F!==null&&(F=F.updateQueue,$===F)){var l=null,U=null;if($=$.firstBaseUpdate,$!==null){do{var _={eventTime:$.eventTime,lane:$.lane,tag:$.tag,payload:$.payload,callback:$.callback,next:null};U===null?l=U=_:U=U.next=_,$=$.next}while($!==null);U===null?l=U=f:U=U.next=f}else l=U=f;$={baseState:F.baseState,firstBaseUpdate:l,lastBaseUpdate:U,shared:F.shared,effects:F.effects},u.updateQueue=$;return}u=$.lastBaseUpdate,u===null?$.firstBaseUpdate=f:u.next=f,$.lastBaseUpdate=f}function k8(u,f,$,F){var l=u.updateQueue;L0=!1;var{firstBaseUpdate:U,lastBaseUpdate:_}=l,Q=l.shared.pending;if(Q!==null){l.shared.pending=null;var J=Q,q=J.next;J.next=null,_===null?U=q:_.next=q,_=J;var T=u.alternate;T!==null&&(T=T.updateQueue,Q=T.lastBaseUpdate,Q!==_&&(Q===null?T.firstBaseUpdate=q:Q.next=q,T.lastBaseUpdate=J))}if(U!==null){var W=l.baseState;_=0,T=q=J=null,Q=U;do{var{lane:A,eventTime:K}=Q;if((F&A)===A){T!==null&&(T=T.next={eventTime:K,lane:0,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null});u:{var L=u,z=Q;switch(A=f,K=$,z.tag){case 1:if(L=z.payload,typeof L==="function"){W=L.call(K,W,A);break u}W=L;break u;case 3:L.flags=L.flags&-65537|128;case 0:if(L=z.payload,A=typeof L==="function"?L.call(K,W,A):L,A===null||A===void 0)break u;W=Zu({},W,A);break u;case 2:L0=!0}}Q.callback!==null&&Q.lane!==0&&(u.flags|=64,A=l.effects,A===null?l.effects=[Q]:A.push(Q))}else K={eventTime:K,lane:A,tag:Q.tag,payload:Q.payload,callback:Q.callback,next:null},T===null?(q=T=K,J=W):T=T.next=K,_|=A;if(Q=Q.next,Q===null)if(Q=l.shared.pending,Q===null)break;else A=Q,Q=A.next,A.next=null,l.lastBaseUpdate=A,l.shared.pending=null}while(1);if(T===null&&(J=W),l.baseState=J,l.firstBaseUpdate=q,l.lastBaseUpdate=T,f=l.shared.interleaved,f!==null){l=f;do _|=l.lane,l=l.next;while(l!==f)}else U===null&&(l.shared.lanes=0);F1|=_,u.lanes=_,u.memoizedState=W}}function Xl(u,f,$){if(u=f.effects,f.effects=null,u!==null)for(f=0;f<u.length;f++){var F=u[f],l=F.callback;if(l!==null){if(F.callback=null,F=$,typeof l!=="function")throw Error(p(191,l));l.call(F)}}}var K3={},hf=I0(K3),l3=I0(K3),U3=I0(K3);function a0(u){if(u===K3)throw Error(p(174));return u}function T7(u,f){switch(Wu(U3,f),Wu(l3,u),Wu(hf,K3),u=f.nodeType,u){case 9:case 11:f=(f=f.documentElement)?f.namespaceURI:f9(null,"");break;default:u=u===8?f.parentNode:f,f=u.namespaceURI||null,u=u.tagName,f=f9(f,u)}wu(hf),Wu(hf,f)}function t1(){wu(hf),wu(l3),wu(U3)}function oU(u){a0(U3.current);var f=a0(hf.current),$=f9(f,u.type);f!==$&&(Wu(l3,u),Wu(hf,$))}function A7(u){l3.current===u&&(wu(hf),wu(l3))}var Hu=I0(0);function P8(u){for(var f=u;f!==null;){if(f.tag===13){var $=f.memoizedState;if($!==null&&($=$.dehydrated,$===null||$.data==="$?"||$.data==="$!"))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if((f.flags&128)!==0)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var h5=[];function W7(){for(var u=0;u<h5.length;u++)h5[u]._workInProgressVersionPrimary=null;h5.length=0}var{ReactCurrentDispatcher:K8,ReactCurrentBatchConfig:v5}=l0,$1=0,zu=null,Xu=null,Ou=null,r8=!1,p4=!1,_3=0,sw=0;function ru(){throw Error(p(321))}function K7(u,f){if(f===null)return!1;for(var $=0;$<f.length&&$<u.length;$++)if(!Xf(u[$],f[$]))return!1;return!0}function w7(u,f,$,F,l,U){if($1=U,zu=f,f.memoizedState=null,f.updateQueue=null,f.lanes=0,K8.current=u===null||u.memoizedState===null?aw:ow,u=$(F,l),p4){U=0;do{if(p4=!1,_3=0,25<=U)throw Error(p(301));U+=1,Ou=Xu=null,f.updateQueue=null,K8.current=ew,u=$(F,l)}while(p4)}if(K8.current=C8,f=Xu!==null&&Xu.next!==null,$1=0,Ou=Xu=zu=null,r8=!1,f)throw Error(p(300));return u}function B7(){var u=_3!==0;return _3=0,u}function Pf(){var u={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ou===null?zu.memoizedState=Ou=u:Ou=Ou.next=u,Ou}function Wf(){if(Xu===null){var u=zu.alternate;u=u!==null?u.memoizedState:null}else u=Xu.next;var f=Ou===null?zu.memoizedState:Ou.next;if(f!==null)Ou=f,Xu=u;else{if(u===null)throw Error(p(310));Xu=u,u={memoizedState:Xu.memoizedState,baseState:Xu.baseState,baseQueue:Xu.baseQueue,queue:Xu.queue,next:null},Ou===null?zu.memoizedState=Ou=u:Ou=Ou.next=u}return Ou}function Q3(u,f){return typeof f==="function"?f(u):f}function x5(u){var f=Wf(),$=f.queue;if($===null)throw Error(p(311));$.lastRenderedReducer=u;var F=Xu,l=F.baseQueue,U=$.pending;if(U!==null){if(l!==null){var _=l.next;l.next=U.next,U.next=_}F.baseQueue=l=U,$.pending=null}if(l!==null){U=l.next,F=F.baseState;var Q=_=null,J=null,q=U;do{var T=q.lane;if(($1&T)===T)J!==null&&(J=J.next={lane:0,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),F=q.hasEagerState?q.eagerState:u(F,q.action);else{var W={lane:T,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null};J===null?(Q=J=W,_=F):J=J.next=W,zu.lanes|=T,F1|=T}q=q.next}while(q!==null&&q!==U);J===null?_=F:J.next=Q,Xf(F,f.memoizedState)||(gu=!0),f.memoizedState=F,f.baseState=_,f.baseQueue=J,$.lastRenderedState=F}if(u=$.interleaved,u!==null){l=u;do U=l.lane,zu.lanes|=U,F1|=U,l=l.next;while(l!==u)}else l===null&&($.lanes=0);return[f.memoizedState,$.dispatch]}function c5(u){var f=Wf(),$=f.queue;if($===null)throw Error(p(311));$.lastRenderedReducer=u;var{dispatch:F,pending:l}=$,U=f.memoizedState;if(l!==null){$.pending=null;var _=l=l.next;do U=u(U,_.action),_=_.next;while(_!==l);Xf(U,f.memoizedState)||(gu=!0),f.memoizedState=U,f.baseQueue===null&&(f.baseState=U),$.lastRenderedState=U}return[U,F]}function eU(){}function u_(u,f){var $=zu,F=Wf(),l=f(),U=!Xf(F.memoizedState,l);if(U&&(F.memoizedState=l,gu=!0),F=F.queue,L7(F_.bind(null,$,F,u),[u]),F.getSnapshot!==f||U||Ou!==null&&Ou.memoizedState.tag&1){if($.flags|=2048,J3(9,$_.bind(null,$,F,l,f),void 0,null),Su===null)throw Error(p(349));($1&30)!==0||f_($,f,l)}return l}function f_(u,f,$){u.flags|=16384,u={getSnapshot:f,value:$},f=zu.updateQueue,f===null?(f={lastEffect:null,stores:null},zu.updateQueue=f,f.stores=[u]):($=f.stores,$===null?f.stores=[u]:$.push(u))}function $_(u,f,$,F){f.value=$,f.getSnapshot=F,l_(f)&&U_(u)}function F_(u,f,$){return $(function(){l_(f)&&U_(u)})}function l_(u){var f=u.getSnapshot;u=u.value;try{var $=f();return!Xf(u,$)}catch(F){return!0}}function U_(u){var f=$0(u,1);f!==null&&Vf(f,u,1,-1)}function Dl(u){var f=Pf();return typeof u==="function"&&(u=u()),f.memoizedState=f.baseState=u,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Q3,lastRenderedState:u},f.queue=u,u=u.dispatch=dw.bind(null,zu,u),[f.memoizedState,u]}function J3(u,f,$,F){return u={tag:u,create:f,destroy:$,deps:F,next:null},f=zu.updateQueue,f===null?(f={lastEffect:null,stores:null},zu.updateQueue=f,f.lastEffect=u.next=u):($=f.lastEffect,$===null?f.lastEffect=u.next=u:(F=$.next,$.next=u,u.next=F,f.lastEffect=u)),u}function __(){return Wf().memoizedState}function w8(u,f,$,F){var l=Pf();zu.flags|=u,l.memoizedState=J3(1|f,$,void 0,F===void 0?null:F)}function n8(u,f,$,F){var l=Wf();F=F===void 0?null:F;var U=void 0;if(Xu!==null){var _=Xu.memoizedState;if(U=_.destroy,F!==null&&K7(F,_.deps)){l.memoizedState=J3(f,$,U,F);return}}zu.flags|=u,l.memoizedState=J3(1|f,$,U,F)}function Ol(u,f){return w8(8390656,8,u,f)}function L7(u,f){return n8(2048,8,u,f)}function Q_(u,f){return n8(4,2,u,f)}function J_(u,f){return n8(4,4,u,f)}function q_(u,f){if(typeof f==="function")return u=u(),f(u),function(){f(null)};if(f!==null&&f!==void 0)return u=u(),f.current=u,function(){f.current=null}}function T_(u,f,$){return $=$!==null&&$!==void 0?$.concat([u]):null,n8(4,4,q_.bind(null,f,u),$)}function G7(){}function A_(u,f){var $=Wf();f=f===void 0?null:f;var F=$.memoizedState;if(F!==null&&f!==null&&K7(f,F[1]))return F[0];return $.memoizedState=[u,f],u}function W_(u,f){var $=Wf();f=f===void 0?null:f;var F=$.memoizedState;if(F!==null&&f!==null&&K7(f,F[1]))return F[0];return u=u(),$.memoizedState=[u,f],u}function K_(u,f,$){if(($1&21)===0)return u.baseState&&(u.baseState=!1,gu=!0),u.memoizedState=$;return Xf($,f)||($=HU(),zu.lanes|=$,F1|=$,u.baseState=!0),f}function tw(u,f){var $=Tu;Tu=$!==0&&4>$?$:4,u(!0);var F=v5.transition;v5.transition={};try{u(!1),f()}finally{Tu=$,v5.transition=F}}function w_(){return Wf().memoizedState}function nw(u,f,$){var F=D0(u);if($={lane:F,action:$,hasEagerState:!1,eagerState:null,next:null},B_(u))L_(f,$);else if($=dU(u,f,$,F),$!==null){var l=pu();Vf($,u,F,l),G_($,f,F)}}function dw(u,f,$){var F=D0(u),l={lane:F,action:$,hasEagerState:!1,eagerState:null,next:null};if(B_(u))L_(f,l);else{var U=u.alternate;if(u.lanes===0&&(U===null||U.lanes===0)&&(U=f.lastRenderedReducer,U!==null))try{var _=f.lastRenderedState,Q=U(_,$);if(l.hasEagerState=!0,l.eagerState=Q,Xf(Q,_)){var J=f.interleaved;J===null?(l.next=l,J7(f)):(l.next=J.next,J.next=l),f.interleaved=l;return}}catch(q){}finally{}$=dU(u,f,l,F),$!==null&&(l=pu(),Vf($,u,F,l),G_($,f,F))}}function B_(u){var f=u.alternate;return u===zu||f!==null&&f===zu}function L_(u,f){p4=r8=!0;var $=u.pending;$===null?f.next=f:(f.next=$.next,$.next=f),u.pending=f}function G_(u,f,$){if(($&4194240)!==0){var F=f.lanes;F&=u.pendingLanes,$|=F,f.lanes=$,t9(u,$)}}var C8={readContext:Af,useCallback:ru,useContext:ru,useEffect:ru,useImperativeHandle:ru,useInsertionEffect:ru,useLayoutEffect:ru,useMemo:ru,useReducer:ru,useRef:ru,useState:ru,useDebugValue:ru,useDeferredValue:ru,useTransition:ru,useMutableSource:ru,useSyncExternalStore:ru,useId:ru,unstable_isNewReconciler:!1},aw={readContext:Af,useCallback:function(u,f){return Pf().memoizedState=[u,f===void 0?null:f],u},useContext:Af,useEffect:Ol,useImperativeHandle:function(u,f,$){return $=$!==null&&$!==void 0?$.concat([u]):null,w8(4194308,4,q_.bind(null,f,u),$)},useLayoutEffect:function(u,f){return w8(4194308,4,u,f)},useInsertionEffect:function(u,f){return w8(4,2,u,f)},useMemo:function(u,f){var $=Pf();return f=f===void 0?null:f,u=u(),$.memoizedState=[u,f],u},useReducer:function(u,f,$){var F=Pf();return f=$!==void 0?$(f):f,F.memoizedState=F.baseState=f,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:f},F.queue=u,u=u.dispatch=nw.bind(null,zu,u),[F.memoizedState,u]},useRef:function(u){var f=Pf();return u={current:u},f.memoizedState=u},useState:Dl,useDebugValue:G7,useDeferredValue:function(u){return Pf().memoizedState=u},useTransition:function(){var u=Dl(!1),f=u[0];return u=tw.bind(null,u[1]),Pf().memoizedState=u,[f,u]},useMutableSource:function(){},useSyncExternalStore:function(u,f,$){var F=zu,l=Pf();if(Lu){if($===void 0)throw Error(p(407));$=$()}else{if($=f(),Su===null)throw Error(p(349));($1&30)!==0||f_(F,f,$)}l.memoizedState=$;var U={value:$,getSnapshot:f};return l.queue=U,Ol(F_.bind(null,F,U,u),[u]),F.flags|=2048,J3(9,$_.bind(null,F,U,$,f),void 0,null),$},useId:function(){var u=Pf(),f=Su.identifierPrefix;if(Lu){var $=of,F=af;$=(F&~(1<<32-Ef(F)-1)).toString(32)+$,f=":"+f+"R"+$,$=_3++,0<$&&(f+="H"+$.toString(32)),f+=":"}else $=sw++,f=":"+f+"r"+$.toString(32)+":";return u.memoizedState=f},unstable_isNewReconciler:!1},ow={readContext:Af,useCallback:A_,useContext:Af,useEffect:L7,useImperativeHandle:T_,useInsertionEffect:Q_,useLayoutEffect:J_,useMemo:W_,useReducer:x5,useRef:__,useState:function(){return x5(Q3)},useDebugValue:G7,useDeferredValue:function(u){var f=Wf();return K_(f,Xu.memoizedState,u)},useTransition:function(){var u=x5(Q3)[0],f=Wf().memoizedState;return[u,f]},useMutableSource:eU,useSyncExternalStore:u_,useId:w_,unstable_isNewReconciler:!1},ew={readContext:Af,useCallback:A_,useContext:Af,useEffect:L7,useImperativeHandle:T_,useInsertionEffect:Q_,useLayoutEffect:J_,useMemo:W_,useReducer:c5,useRef:__,useState:function(){return c5(Q3)},useDebugValue:G7,useDeferredValue:function(u){var f=Wf();return Xu===null?f.memoizedState=u:K_(f,Xu.memoizedState,u)},useTransition:function(){var u=c5(Q3)[0],f=Wf().memoizedState;return[u,f]},useMutableSource:eU,useSyncExternalStore:u_,useId:w_,unstable_isNewReconciler:!1};function Yf(u,f){if(u&&u.defaultProps){f=Zu({},f),u=u.defaultProps;for(var $ in u)f[$]===void 0&&(f[$]=u[$]);return f}return f}function E9(u,f,$,F){f=u.memoizedState,$=$(F,f),$=$===null||$===void 0?f:Zu({},f,$),u.memoizedState=$,u.lanes===0&&(u.updateQueue.baseState=$)}var d8={isMounted:function(u){return(u=u._reactInternals)?_1(u)===u:!1},enqueueSetState:function(u,f,$){u=u._reactInternals;var F=pu(),l=D0(u),U=ef(F,l);U.payload=f,$!==void 0&&$!==null&&(U.callback=$),f=V0(u,U,l),f!==null&&(Vf(f,u,l,F),W8(f,u,l))},enqueueReplaceState:function(u,f,$){u=u._reactInternals;var F=pu(),l=D0(u),U=ef(F,l);U.tag=1,U.payload=f,$!==void 0&&$!==null&&(U.callback=$),f=V0(u,U,l),f!==null&&(Vf(f,u,l,F),W8(f,u,l))},enqueueForceUpdate:function(u,f){u=u._reactInternals;var $=pu(),F=D0(u),l=ef($,F);l.tag=2,f!==void 0&&f!==null&&(l.callback=f),f=V0(u,l,F),f!==null&&(Vf(f,u,F,$),W8(f,u,F))}};function Sl(u,f,$,F,l,U,_){return u=u.stateNode,typeof u.shouldComponentUpdate==="function"?u.shouldComponentUpdate(F,U,_):f.prototype&&f.prototype.isPureReactComponent?!u3($,F)||!u3(l,U):!0}function H_(u,f,$){var F=!1,l=j0,U=f.contextType;return typeof U==="object"&&U!==null?U=Af(U):(l=tu(f)?u1:vu.current,F=f.contextTypes,U=(F=F!==null&&F!==void 0)?i1(u,l):j0),f=new f($,U),u.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=d8,u.stateNode=f,f._reactInternals=u,F&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=l,u.__reactInternalMemoizedMaskedChildContext=U),f}function jl(u,f,$,F){u=f.state,typeof f.componentWillReceiveProps==="function"&&f.componentWillReceiveProps($,F),typeof f.UNSAFE_componentWillReceiveProps==="function"&&f.UNSAFE_componentWillReceiveProps($,F),f.state!==u&&d8.enqueueReplaceState(f,f.state,null)}function V9(u,f,$,F){var l=u.stateNode;l.props=$,l.state=u.memoizedState,l.refs={},q7(u);var U=f.contextType;typeof U==="object"&&U!==null?l.context=Af(U):(U=tu(f)?u1:vu.current,l.context=i1(u,U)),l.state=u.memoizedState,U=f.getDerivedStateFromProps,typeof U==="function"&&(E9(u,f,U,$),l.state=u.memoizedState),typeof f.getDerivedStateFromProps==="function"||typeof l.getSnapshotBeforeUpdate==="function"||typeof l.UNSAFE_componentWillMount!=="function"&&typeof l.componentWillMount!=="function"||(f=l.state,typeof l.componentWillMount==="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount==="function"&&l.UNSAFE_componentWillMount(),f!==l.state&&d8.enqueueReplaceState(l,l.state,null),k8(u,$,l,F),l.state=u.memoizedState),typeof l.componentDidMount==="function"&&(u.flags|=4194308)}function n1(u,f){try{var $="",F=f;do $+=SK(F),F=F.return;while(F);var l=$}catch(U){l=`
1375
+ Error generating stack: `+U.message+`
1376
+ `+U.stack}return{value:u,source:f,stack:l,digest:null}}function m5(u,f,$){return{value:u,source:null,stack:$!=null?$:null,digest:f!=null?f:null}}function X9(u,f){try{console.error(f.value)}catch($){setTimeout(function(){throw $})}}var uB=typeof WeakMap==="function"?WeakMap:Map;function z_(u,f,$){$=ef(-1,$),$.tag=3,$.payload={element:null};var F=f.value;return $.callback=function(){v8||(v8=!0,r9=F),X9(u,f)},$}function Z_(u,f,$){$=ef(-1,$),$.tag=3;var F=u.type.getDerivedStateFromError;if(typeof F==="function"){var l=f.value;$.payload=function(){return F(l)},$.callback=function(){X9(u,f)}}var U=u.stateNode;return U!==null&&typeof U.componentDidCatch==="function"&&($.callback=function(){X9(u,f),typeof F!=="function"&&(X0===null?X0=new Set([this]):X0.add(this));var _=f.stack;this.componentDidCatch(f.value,{componentStack:_!==null?_:""})}),$}function Nl(u,f,$){var F=u.pingCache;if(F===null){F=u.pingCache=new uB;var l=new Set;F.set(f,l)}else l=F.get(f),l===void 0&&(l=new Set,F.set(f,l));l.has($)||(l.add($),u=wB.bind(null,u,f,$),f.then(u,u))}function Il(u){do{var f;if(f=u.tag===13)f=u.memoizedState,f=f!==null?f.dehydrated!==null?!0:!1:!0;if(f)return u;u=u.return}while(u!==null);return null}function yl(u,f,$,F,l){if((u.mode&1)===0)return u===f?u.flags|=65536:(u.flags|=128,$.flags|=131072,$.flags&=-52805,$.tag===1&&($.alternate===null?$.tag=17:(f=ef(-1,1),f.tag=2,V0($,f,1))),$.lanes|=1),u;return u.flags|=65536,u.lanes=l,u}var fB=l0.ReactCurrentOwner,gu=!1;function mu(u,f,$,F){f.child=u===null?nU(f,null,$,F):s1(f,u.child,$,F)}function kl(u,f,$,F,l){$=$.render;var U=f.ref;if(m1(f,l),F=w7(u,f,$,F,U,l),$=B7(),u!==null&&!gu)return f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~l,F0(u,f,l);return Lu&&$&&$7(f),f.flags|=1,mu(u,f,F,l),f.child}function Pl(u,f,$,F,l){if(u===null){var U=$.type;if(typeof U==="function"&&!V7(U)&&U.defaultProps===void 0&&$.compare===null&&$.defaultProps===void 0)return f.tag=15,f.type=U,Y_(u,f,U,F,l);return u=H8($.type,null,F,f,f.mode,l),u.ref=f.ref,u.return=f,f.child=u}if(U=u.child,(u.lanes&l)===0){var _=U.memoizedProps;if($=$.compare,$=$!==null?$:u3,$(_,F)&&u.ref===f.ref)return F0(u,f,l)}return f.flags|=1,u=O0(U,F),u.ref=f.ref,u.return=f,f.child=u}function Y_(u,f,$,F,l){if(u!==null){var U=u.memoizedProps;if(u3(U,F)&&u.ref===f.ref)if(gu=!1,f.pendingProps=F=U,(u.lanes&l)!==0)(u.flags&131072)!==0&&(gu=!0);else return f.lanes=u.lanes,F0(u,f,l)}return D9(u,f,$,F,l)}function R_(u,f,$){var F=f.pendingProps,l=F.children,U=u!==null?u.memoizedState:null;if(F.mode==="hidden")if((f.mode&1)===0)f.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wu(C1,ou),ou|=$;else{if(($&1073741824)===0)return u=U!==null?U.baseLanes|$:$,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:u,cachePool:null,transitions:null},f.updateQueue=null,Wu(C1,ou),ou|=u,null;f.memoizedState={baseLanes:0,cachePool:null,transitions:null},F=U!==null?U.baseLanes:$,Wu(C1,ou),ou|=F}else U!==null?(F=U.baseLanes|$,f.memoizedState=null):F=$,Wu(C1,ou),ou|=F;return mu(u,f,l,$),f.child}function M_(u,f){var $=f.ref;if(u===null&&$!==null||u!==null&&u.ref!==$)f.flags|=512,f.flags|=2097152}function D9(u,f,$,F,l){var U=tu($)?u1:vu.current;if(U=i1(f,U),m1(f,l),$=w7(u,f,$,F,U,l),F=B7(),u!==null&&!gu)return f.updateQueue=u.updateQueue,f.flags&=-2053,u.lanes&=~l,F0(u,f,l);return Lu&&F&&$7(f),f.flags|=1,mu(u,f,$,l),f.child}function rl(u,f,$,F,l){if(tu($)){var U=!0;S8(f)}else U=!1;if(m1(f,l),f.stateNode===null)B8(u,f),H_(f,$,F),V9(f,$,F,l),F=!0;else if(u===null){var{stateNode:_,memoizedProps:Q}=f;_.props=Q;var J=_.context,q=$.contextType;typeof q==="object"&&q!==null?q=Af(q):(q=tu($)?u1:vu.current,q=i1(f,q));var T=$.getDerivedStateFromProps,W=typeof T==="function"||typeof _.getSnapshotBeforeUpdate==="function";W||typeof _.UNSAFE_componentWillReceiveProps!=="function"&&typeof _.componentWillReceiveProps!=="function"||(Q!==F||J!==q)&&jl(f,_,F,q),L0=!1;var A=f.memoizedState;_.state=A,k8(f,F,_,l),J=f.memoizedState,Q!==F||A!==J||su.current||L0?(typeof T==="function"&&(E9(f,$,T,F),J=f.memoizedState),(Q=L0||Sl(f,$,Q,F,A,J,q))?(W||typeof _.UNSAFE_componentWillMount!=="function"&&typeof _.componentWillMount!=="function"||(typeof _.componentWillMount==="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount==="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount==="function"&&(f.flags|=4194308)):(typeof _.componentDidMount==="function"&&(f.flags|=4194308),f.memoizedProps=F,f.memoizedState=J),_.props=F,_.state=J,_.context=q,F=Q):(typeof _.componentDidMount==="function"&&(f.flags|=4194308),F=!1)}else{_=f.stateNode,aU(u,f),Q=f.memoizedProps,q=f.type===f.elementType?Q:Yf(f.type,Q),_.props=q,W=f.pendingProps,A=_.context,J=$.contextType,typeof J==="object"&&J!==null?J=Af(J):(J=tu($)?u1:vu.current,J=i1(f,J));var K=$.getDerivedStateFromProps;(T=typeof K==="function"||typeof _.getSnapshotBeforeUpdate==="function")||typeof _.UNSAFE_componentWillReceiveProps!=="function"&&typeof _.componentWillReceiveProps!=="function"||(Q!==W||A!==J)&&jl(f,_,F,J),L0=!1,A=f.memoizedState,_.state=A,k8(f,F,_,l);var L=f.memoizedState;Q!==W||A!==L||su.current||L0?(typeof K==="function"&&(E9(f,$,K,F),L=f.memoizedState),(q=L0||Sl(f,$,q,F,A,L,J)||!1)?(T||typeof _.UNSAFE_componentWillUpdate!=="function"&&typeof _.componentWillUpdate!=="function"||(typeof _.componentWillUpdate==="function"&&_.componentWillUpdate(F,L,J),typeof _.UNSAFE_componentWillUpdate==="function"&&_.UNSAFE_componentWillUpdate(F,L,J)),typeof _.componentDidUpdate==="function"&&(f.flags|=4),typeof _.getSnapshotBeforeUpdate==="function"&&(f.flags|=1024)):(typeof _.componentDidUpdate!=="function"||Q===u.memoizedProps&&A===u.memoizedState||(f.flags|=4),typeof _.getSnapshotBeforeUpdate!=="function"||Q===u.memoizedProps&&A===u.memoizedState||(f.flags|=1024),f.memoizedProps=F,f.memoizedState=L),_.props=F,_.state=L,_.context=J,F=q):(typeof _.componentDidUpdate!=="function"||Q===u.memoizedProps&&A===u.memoizedState||(f.flags|=4),typeof _.getSnapshotBeforeUpdate!=="function"||Q===u.memoizedProps&&A===u.memoizedState||(f.flags|=1024),F=!1)}return O9(u,f,$,F,U,l)}function O9(u,f,$,F,l,U){M_(u,f);var _=(f.flags&128)!==0;if(!F&&!_)return l&&Yl(f,$,!1),F0(u,f,U);F=f.stateNode,fB.current=f;var Q=_&&typeof $.getDerivedStateFromError!=="function"?null:F.render();return f.flags|=1,u!==null&&_?(f.child=s1(f,u.child,null,U),f.child=s1(f,null,Q,U)):mu(u,f,Q,U),f.memoizedState=F.state,l&&Yl(f,$,!0),f.child}function E_(u){var f=u.stateNode;f.pendingContext?Zl(u,f.pendingContext,f.pendingContext!==f.context):f.context&&Zl(u,f.context,!1),T7(u,f.containerInfo)}function Cl(u,f,$,F,l){return g1(),l7(l),f.flags|=256,mu(u,f,$,F),f.child}var S9={dehydrated:null,treeContext:null,retryLane:0};function j9(u){return{baseLanes:u,cachePool:null,transitions:null}}function V_(u,f,$){var F=f.pendingProps,l=Hu.current,U=!1,_=(f.flags&128)!==0,Q;if((Q=_)||(Q=u!==null&&u.memoizedState===null?!1:(l&2)!==0),Q)U=!0,f.flags&=-129;else if(u===null||u.memoizedState!==null)l|=1;if(Wu(Hu,l&1),u===null){if(R9(f),u=f.memoizedState,u!==null&&(u=u.dehydrated,u!==null))return(f.mode&1)===0?f.lanes=1:u.data==="$!"?f.lanes=8:f.lanes=1073741824,null;return _=F.children,u=F.fallback,U?(F=f.mode,U=f.child,_={mode:"hidden",children:_},(F&1)===0&&U!==null?(U.childLanes=0,U.pendingProps=_):U=e8(_,F,0,null),u=e0(u,F,$,null),U.return=f,u.return=f,U.sibling=u,f.child=U,f.child.memoizedState=j9($),f.memoizedState=S9,u):H7(f,_)}if(l=u.memoizedState,l!==null&&(Q=l.dehydrated,Q!==null))return $B(u,f,_,F,Q,l,$);if(U){U=F.fallback,_=f.mode,l=u.child,Q=l.sibling;var J={mode:"hidden",children:F.children};return(_&1)===0&&f.child!==l?(F=f.child,F.childLanes=0,F.pendingProps=J,f.deletions=null):(F=O0(l,J),F.subtreeFlags=l.subtreeFlags&14680064),Q!==null?U=O0(Q,U):(U=e0(U,_,$,null),U.flags|=2),U.return=f,F.return=f,F.sibling=U,f.child=F,F=U,U=f.child,_=u.child.memoizedState,_=_===null?j9($):{baseLanes:_.baseLanes|$,cachePool:null,transitions:_.transitions},U.memoizedState=_,U.childLanes=u.childLanes&~$,f.memoizedState=S9,F}return U=u.child,u=U.sibling,F=O0(U,{mode:"visible",children:F.children}),(f.mode&1)===0&&(F.lanes=$),F.return=f,F.sibling=null,u!==null&&($=f.deletions,$===null?(f.deletions=[u],f.flags|=16):$.push(u)),f.child=F,f.memoizedState=null,F}function H7(u,f){return f=e8({mode:"visible",children:f},u.mode,0,null),f.return=u,u.child=f}function U8(u,f,$,F){return F!==null&&l7(F),s1(f,u.child,null,$),u=H7(f,f.pendingProps.children),u.flags|=2,f.memoizedState=null,u}function $B(u,f,$,F,l,U,_){if($){if(f.flags&256)return f.flags&=-257,F=m5(Error(p(422))),U8(u,f,_,F);if(f.memoizedState!==null)return f.child=u.child,f.flags|=128,null;return U=F.fallback,l=f.mode,F=e8({mode:"visible",children:F.children},l,0,null),U=e0(U,l,_,null),U.flags|=2,F.return=f,U.return=f,F.sibling=U,f.child=F,(f.mode&1)!==0&&s1(f,u.child,null,_),f.child.memoizedState=j9(_),f.memoizedState=S9,U}if((f.mode&1)===0)return U8(u,f,_,null);if(l.data==="$!"){if(F=l.nextSibling&&l.nextSibling.dataset,F)var Q=F.dgst;return F=Q,U=Error(p(419)),F=m5(U,F,void 0),U8(u,f,_,F)}if(Q=(_&u.childLanes)!==0,gu||Q){if(F=Su,F!==null){switch(_&-_){case 4:l=2;break;case 16:l=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=(l&(F.suspendedLanes|_))!==0?0:l,l!==0&&l!==U.retryLane&&(U.retryLane=l,$0(u,l),Vf(F,u,l,-1))}return E7(),F=m5(Error(p(421))),U8(u,f,_,F)}if(l.data==="$?")return f.flags|=128,f.child=u.child,f=BB.bind(null,u),l._reactRetry=f,null;return u=U.treeContext,eu=E0(l.nextSibling),uf=f,Lu=!0,Mf=null,u!==null&&(Qf[Jf++]=af,Qf[Jf++]=of,Qf[Jf++]=f1,af=u.id,of=u.overflow,f1=f),f=H7(f,F.children),f.flags|=4096,f}function hl(u,f,$){u.lanes|=f;var F=u.alternate;F!==null&&(F.lanes|=f),M9(u.return,f,$)}function p5(u,f,$,F,l){var U=u.memoizedState;U===null?u.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:F,tail:$,tailMode:l}:(U.isBackwards=f,U.rendering=null,U.renderingStartTime=0,U.last=F,U.tail=$,U.tailMode=l)}function X_(u,f,$){var F=f.pendingProps,l=F.revealOrder,U=F.tail;if(mu(u,f,F.children,$),F=Hu.current,(F&2)!==0)F=F&1|2,f.flags|=128;else{if(u!==null&&(u.flags&128)!==0)u:for(u=f.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&hl(u,$,f);else if(u.tag===19)hl(u,$,f);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===f)break u;for(;u.sibling===null;){if(u.return===null||u.return===f)break u;u=u.return}u.sibling.return=u.return,u=u.sibling}F&=1}if(Wu(Hu,F),(f.mode&1)===0)f.memoizedState=null;else switch(l){case"forwards":$=f.child;for(l=null;$!==null;)u=$.alternate,u!==null&&P8(u)===null&&(l=$),$=$.sibling;$=l,$===null?(l=f.child,f.child=null):(l=$.sibling,$.sibling=null),p5(f,!1,l,$,U);break;case"backwards":$=null,l=f.child;for(f.child=null;l!==null;){if(u=l.alternate,u!==null&&P8(u)===null){f.child=l;break}u=l.sibling,l.sibling=$,$=l,l=u}p5(f,!0,$,null,U);break;case"together":p5(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function B8(u,f){(f.mode&1)===0&&u!==null&&(u.alternate=null,f.alternate=null,f.flags|=2)}function F0(u,f,$){if(u!==null&&(f.dependencies=u.dependencies),F1|=f.lanes,($&f.childLanes)===0)return null;if(u!==null&&f.child!==u.child)throw Error(p(153));if(f.child!==null){u=f.child,$=O0(u,u.pendingProps),f.child=$;for($.return=f;u.sibling!==null;)u=u.sibling,$=$.sibling=O0(u,u.pendingProps),$.return=f;$.sibling=null}return f.child}function FB(u,f,$){switch(f.tag){case 3:E_(f),g1();break;case 5:oU(f);break;case 1:tu(f.type)&&S8(f);break;case 4:T7(f,f.stateNode.containerInfo);break;case 10:var F=f.type._context,l=f.memoizedProps.value;Wu(I8,F._currentValue),F._currentValue=l;break;case 13:if(F=f.memoizedState,F!==null){if(F.dehydrated!==null)return Wu(Hu,Hu.current&1),f.flags|=128,null;if(($&f.child.childLanes)!==0)return V_(u,f,$);return Wu(Hu,Hu.current&1),u=F0(u,f,$),u!==null?u.sibling:null}Wu(Hu,Hu.current&1);break;case 19:if(F=($&f.childLanes)!==0,(u.flags&128)!==0){if(F)return X_(u,f,$);f.flags|=128}if(l=f.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),Wu(Hu,Hu.current),F)break;else return null;case 22:case 23:return f.lanes=0,R_(u,f,$)}return F0(u,f,$)}var D_,N9,O_,S_;D_=function(u,f){for(var $=f.child;$!==null;){if($.tag===5||$.tag===6)u.appendChild($.stateNode);else if($.tag!==4&&$.child!==null){$.child.return=$,$=$.child;continue}if($===f)break;for(;$.sibling===null;){if($.return===null||$.return===f)return;$=$.return}$.sibling.return=$.return,$=$.sibling}};N9=function(){};O_=function(u,f,$,F){var l=u.memoizedProps;if(l!==F){u=f.stateNode,a0(hf.current);var U=null;switch($){case"input":l=a5(u,l),F=a5(u,F),U=[];break;case"select":l=Zu({},l,{value:void 0}),F=Zu({},F,{value:void 0}),U=[];break;case"textarea":l=u9(u,l),F=u9(u,F),U=[];break;default:typeof l.onClick!=="function"&&typeof F.onClick==="function"&&(u.onclick=D8)}$9($,F);var _;$=null;for(q in l)if(!F.hasOwnProperty(q)&&l.hasOwnProperty(q)&&l[q]!=null)if(q==="style"){var Q=l[q];for(_ in Q)Q.hasOwnProperty(_)&&($||($={}),$[_]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(s4.hasOwnProperty(q)?U||(U=[]):(U=U||[]).push(q,null));for(q in F){var J=F[q];if(Q=l!=null?l[q]:void 0,F.hasOwnProperty(q)&&J!==Q&&(J!=null||Q!=null))if(q==="style")if(Q){for(_ in Q)!Q.hasOwnProperty(_)||J&&J.hasOwnProperty(_)||($||($={}),$[_]="");for(_ in J)J.hasOwnProperty(_)&&Q[_]!==J[_]&&($||($={}),$[_]=J[_])}else $||(U||(U=[]),U.push(q,$)),$=J;else q==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,Q=Q?Q.__html:void 0,J!=null&&Q!==J&&(U=U||[]).push(q,J)):q==="children"?typeof J!=="string"&&typeof J!=="number"||(U=U||[]).push(q,""+J):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(s4.hasOwnProperty(q)?(J!=null&&q==="onScroll"&&Ku("scroll",u),U||Q===J||(U=[])):(U=U||[]).push(q,J))}$&&(U=U||[]).push("style",$);var q=U;if(f.updateQueue=q)f.flags|=4}};S_=function(u,f,$,F){$!==F&&(f.flags|=4)};function O4(u,f){if(!Lu)switch(u.tailMode){case"hidden":f=u.tail;for(var $=null;f!==null;)f.alternate!==null&&($=f),f=f.sibling;$===null?u.tail=null:$.sibling=null;break;case"collapsed":$=u.tail;for(var F=null;$!==null;)$.alternate!==null&&(F=$),$=$.sibling;F===null?f||u.tail===null?u.tail=null:u.tail.sibling=null:F.sibling=null}}function Cu(u){var f=u.alternate!==null&&u.alternate.child===u.child,$=0,F=0;if(f)for(var l=u.child;l!==null;)$|=l.lanes|l.childLanes,F|=l.subtreeFlags&14680064,F|=l.flags&14680064,l.return=u,l=l.sibling;else for(l=u.child;l!==null;)$|=l.lanes|l.childLanes,F|=l.subtreeFlags,F|=l.flags,l.return=u,l=l.sibling;return u.subtreeFlags|=F,u.childLanes=$,f}function lB(u,f,$){var F=f.pendingProps;switch(F7(f),f.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Cu(f),null;case 1:return tu(f.type)&&O8(),Cu(f),null;case 3:if(F=f.stateNode,t1(),wu(su),wu(vu),W7(),F.pendingContext&&(F.context=F.pendingContext,F.pendingContext=null),u===null||u.child===null)F8(f)?f.flags|=4:u===null||u.memoizedState.isDehydrated&&(f.flags&256)===0||(f.flags|=1024,Mf!==null&&(v9(Mf),Mf=null));return N9(u,f),Cu(f),null;case 5:A7(f);var l=a0(U3.current);if($=f.type,u!==null&&f.stateNode!=null)O_(u,f,$,F,l),u.ref!==f.ref&&(f.flags|=512,f.flags|=2097152);else{if(!F){if(f.stateNode===null)throw Error(p(166));return Cu(f),null}if(u=a0(hf.current),F8(f)){F=f.stateNode,$=f.type;var U=f.memoizedProps;switch(F[rf]=f,F[F3]=U,u=(f.mode&1)!==0,$){case"dialog":Ku("cancel",F),Ku("close",F);break;case"iframe":case"object":case"embed":Ku("load",F);break;case"video":case"audio":for(l=0;l<C4.length;l++)Ku(C4[l],F);break;case"source":Ku("error",F);break;case"img":case"image":case"link":Ku("error",F),Ku("load",F);break;case"details":Ku("toggle",F);break;case"input":tF(F,U),Ku("invalid",F);break;case"select":F._wrapperState={wasMultiple:!!U.multiple},Ku("invalid",F);break;case"textarea":dF(F,U),Ku("invalid",F)}$9($,U),l=null;for(var _ in U)if(U.hasOwnProperty(_)){var Q=U[_];_==="children"?typeof Q==="string"?F.textContent!==Q&&(U.suppressHydrationWarning!==!0&&$8(F.textContent,Q,u),l=["children",Q]):typeof Q==="number"&&F.textContent!==""+Q&&(U.suppressHydrationWarning!==!0&&$8(F.textContent,Q,u),l=["children",""+Q]):s4.hasOwnProperty(_)&&Q!=null&&_==="onScroll"&&Ku("scroll",F)}switch($){case"input":t3(F),nF(F,U,!0);break;case"textarea":t3(F),aF(F);break;case"select":case"option":break;default:typeof U.onClick==="function"&&(F.onclick=D8)}F=l,f.updateQueue=F,F!==null&&(f.flags|=4)}else{_=l.nodeType===9?l:l.ownerDocument,u==="http://www.w3.org/1999/xhtml"&&(u=FU($)),u==="http://www.w3.org/1999/xhtml"?$==="script"?(u=_.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild)):typeof F.is==="string"?u=_.createElement($,{is:F.is}):(u=_.createElement($),$==="select"&&(_=u,F.multiple?_.multiple=!0:F.size&&(_.size=F.size))):u=_.createElementNS(u,$),u[rf]=f,u[F3]=F,D_(u,f,!1,!1),f.stateNode=u;u:{switch(_=F9($,F),$){case"dialog":Ku("cancel",u),Ku("close",u),l=F;break;case"iframe":case"object":case"embed":Ku("load",u),l=F;break;case"video":case"audio":for(l=0;l<C4.length;l++)Ku(C4[l],u);l=F;break;case"source":Ku("error",u),l=F;break;case"img":case"image":case"link":Ku("error",u),Ku("load",u),l=F;break;case"details":Ku("toggle",u),l=F;break;case"input":tF(u,F),l=a5(u,F),Ku("invalid",u);break;case"option":l=F;break;case"select":u._wrapperState={wasMultiple:!!F.multiple},l=Zu({},F,{value:void 0}),Ku("invalid",u);break;case"textarea":dF(u,F),l=u9(u,F),Ku("invalid",u);break;default:l=F}$9($,l),Q=l;for(U in Q)if(Q.hasOwnProperty(U)){var J=Q[U];U==="style"?_U(u,J):U==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&lU(u,J)):U==="children"?typeof J==="string"?($!=="textarea"||J!=="")&&t4(u,J):typeof J==="number"&&t4(u,""+J):U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&U!=="autoFocus"&&(s4.hasOwnProperty(U)?J!=null&&U==="onScroll"&&Ku("scroll",u):J!=null&&m9(u,U,J,_))}switch($){case"input":t3(u),nF(u,F,!1);break;case"textarea":t3(u),aF(u);break;case"option":F.value!=null&&u.setAttribute("value",""+S0(F.value));break;case"select":u.multiple=!!F.multiple,U=F.value,U!=null?h1(u,!!F.multiple,U,!1):F.defaultValue!=null&&h1(u,!!F.multiple,F.defaultValue,!0);break;default:typeof l.onClick==="function"&&(u.onclick=D8)}switch($){case"button":case"input":case"select":case"textarea":F=!!F.autoFocus;break u;case"img":F=!0;break u;default:F=!1}}F&&(f.flags|=4)}f.ref!==null&&(f.flags|=512,f.flags|=2097152)}return Cu(f),null;case 6:if(u&&f.stateNode!=null)S_(u,f,u.memoizedProps,F);else{if(typeof F!=="string"&&f.stateNode===null)throw Error(p(166));if($=a0(U3.current),a0(hf.current),F8(f)){if(F=f.stateNode,$=f.memoizedProps,F[rf]=f,U=F.nodeValue!==$){if(u=uf,u!==null)switch(u.tag){case 3:$8(F.nodeValue,$,(u.mode&1)!==0);break;case 5:u.memoizedProps.suppressHydrationWarning!==!0&&$8(F.nodeValue,$,(u.mode&1)!==0)}}U&&(f.flags|=4)}else F=($.nodeType===9?$:$.ownerDocument).createTextNode(F),F[rf]=f,f.stateNode=F}return Cu(f),null;case 13:if(wu(Hu),F=f.memoizedState,u===null||u.memoizedState!==null&&u.memoizedState.dehydrated!==null){if(Lu&&eu!==null&&(f.mode&1)!==0&&(f.flags&128)===0)sU(),g1(),f.flags|=98560,U=!1;else if(U=F8(f),F!==null&&F.dehydrated!==null){if(u===null){if(!U)throw Error(p(318));if(U=f.memoizedState,U=U!==null?U.dehydrated:null,!U)throw Error(p(317));U[rf]=f}else g1(),(f.flags&128)===0&&(f.memoizedState=null),f.flags|=4;Cu(f),U=!1}else Mf!==null&&(v9(Mf),Mf=null),U=!0;if(!U)return f.flags&65536?f:null}if((f.flags&128)!==0)return f.lanes=$,f;return F=F!==null,F!==(u!==null&&u.memoizedState!==null)&&F&&(f.child.flags|=8192,(f.mode&1)!==0&&(u===null||(Hu.current&1)!==0?Du===0&&(Du=3):E7())),f.updateQueue!==null&&(f.flags|=4),Cu(f),null;case 4:return t1(),N9(u,f),u===null&&f3(f.stateNode.containerInfo),Cu(f),null;case 10:return Q7(f.type._context),Cu(f),null;case 17:return tu(f.type)&&O8(),Cu(f),null;case 19:if(wu(Hu),U=f.memoizedState,U===null)return Cu(f),null;if(F=(f.flags&128)!==0,_=U.rendering,_===null)if(F)O4(U,!1);else{if(Du!==0||u!==null&&(u.flags&128)!==0)for(u=f.child;u!==null;){if(_=P8(u),_!==null){f.flags|=128,O4(U,!1),F=_.updateQueue,F!==null&&(f.updateQueue=F,f.flags|=4),f.subtreeFlags=0,F=$;for($=f.child;$!==null;)U=$,u=F,U.flags&=14680066,_=U.alternate,_===null?(U.childLanes=0,U.lanes=u,U.child=null,U.subtreeFlags=0,U.memoizedProps=null,U.memoizedState=null,U.updateQueue=null,U.dependencies=null,U.stateNode=null):(U.childLanes=_.childLanes,U.lanes=_.lanes,U.child=_.child,U.subtreeFlags=0,U.deletions=null,U.memoizedProps=_.memoizedProps,U.memoizedState=_.memoizedState,U.updateQueue=_.updateQueue,U.type=_.type,u=_.dependencies,U.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),$=$.sibling;return Wu(Hu,Hu.current&1|2),f.child}u=u.sibling}U.tail!==null&&Mu()>d1&&(f.flags|=128,F=!0,O4(U,!1),f.lanes=4194304)}else{if(!F)if(u=P8(_),u!==null){if(f.flags|=128,F=!0,$=u.updateQueue,$!==null&&(f.updateQueue=$,f.flags|=4),O4(U,!0),U.tail===null&&U.tailMode==="hidden"&&!_.alternate&&!Lu)return Cu(f),null}else 2*Mu()-U.renderingStartTime>d1&&$!==1073741824&&(f.flags|=128,F=!0,O4(U,!1),f.lanes=4194304);U.isBackwards?(_.sibling=f.child,f.child=_):($=U.last,$!==null?$.sibling=_:f.child=_,U.last=_)}if(U.tail!==null)return f=U.tail,U.rendering=f,U.tail=f.sibling,U.renderingStartTime=Mu(),f.sibling=null,$=Hu.current,Wu(Hu,F?$&1|2:$&1),f;return Cu(f),null;case 22:case 23:return M7(),F=f.memoizedState!==null,u!==null&&u.memoizedState!==null!==F&&(f.flags|=8192),F&&(f.mode&1)!==0?(ou&1073741824)!==0&&(Cu(f),f.subtreeFlags&6&&(f.flags|=8192)):Cu(f),null;case 24:return null;case 25:return null}throw Error(p(156,f.tag))}function UB(u,f){switch(F7(f),f.tag){case 1:return tu(f.type)&&O8(),u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 3:return t1(),wu(su),wu(vu),W7(),u=f.flags,(u&65536)!==0&&(u&128)===0?(f.flags=u&-65537|128,f):null;case 5:return A7(f),null;case 13:if(wu(Hu),u=f.memoizedState,u!==null&&u.dehydrated!==null){if(f.alternate===null)throw Error(p(340));g1()}return u=f.flags,u&65536?(f.flags=u&-65537|128,f):null;case 19:return wu(Hu),null;case 4:return t1(),null;case 10:return Q7(f.type._context),null;case 22:case 23:return M7(),null;case 24:return null;default:return null}}var _8=!1,hu=!1,_B=typeof WeakSet==="function"?WeakSet:Set,t=null;function r1(u,f){var $=u.ref;if($!==null)if(typeof $==="function")try{$(null)}catch(F){Yu(u,f,F)}else $.current=null}function I9(u,f,$){try{$()}catch(F){Yu(u,f,F)}}var vl=!1;function QB(u,f){if(B9=E8,u=kU(),f7(u)){if("selectionStart"in u)var $={start:u.selectionStart,end:u.selectionEnd};else u:{$=($=u.ownerDocument)&&$.defaultView||window;var F=$.getSelection&&$.getSelection();if(F&&F.rangeCount!==0){$=F.anchorNode;var{anchorOffset:l,focusNode:U}=F;F=F.focusOffset;try{$.nodeType,U.nodeType}catch(H){$=null;break u}var _=0,Q=-1,J=-1,q=0,T=0,W=u,A=null;f:for(;;){for(var K;;){if(W!==$||l!==0&&W.nodeType!==3||(Q=_+l),W!==U||F!==0&&W.nodeType!==3||(J=_+F),W.nodeType===3&&(_+=W.nodeValue.length),(K=W.firstChild)===null)break;A=W,W=K}for(;;){if(W===u)break f;if(A===$&&++q===l&&(Q=_),A===U&&++T===F&&(J=_),(K=W.nextSibling)!==null)break;W=A,A=W.parentNode}W=K}$=Q===-1||J===-1?null:{start:Q,end:J}}else $=null}$=$||{start:0,end:0}}else $=null;L9={focusedElem:u,selectionRange:$},E8=!1;for(t=f;t!==null;)if(f=t,u=f.child,(f.subtreeFlags&1028)!==0&&u!==null)u.return=f,t=u;else for(;t!==null;){f=t;try{var L=f.alternate;if((f.flags&1024)!==0)switch(f.tag){case 0:case 11:case 15:break;case 1:if(L!==null){var{memoizedProps:z,memoizedState:Z}=L,B=f.stateNode,G=B.getSnapshotBeforeUpdate(f.elementType===f.type?z:Yf(f.type,z),Z);B.__reactInternalSnapshotBeforeUpdate=G}break;case 3:var w=f.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163))}}catch(H){Yu(f,f.return,H)}if(u=f.sibling,u!==null){u.return=f.return,t=u;break}t=f.return}return L=vl,vl=!1,L}function b4(u,f,$){var F=f.updateQueue;if(F=F!==null?F.lastEffect:null,F!==null){var l=F=F.next;do{if((l.tag&u)===u){var U=l.destroy;l.destroy=void 0,U!==void 0&&I9(f,$,U)}l=l.next}while(l!==F)}}function a8(u,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var $=f=f.next;do{if(($.tag&u)===u){var F=$.create;$.destroy=F()}$=$.next}while($!==f)}}function y9(u){var f=u.ref;if(f!==null){var $=u.stateNode;switch(u.tag){case 5:u=$;break;default:u=$}typeof f==="function"?f(u):f.current=u}}function j_(u){var f=u.alternate;f!==null&&(u.alternate=null,j_(f)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(f=u.stateNode,f!==null&&(delete f[rf],delete f[F3],delete f[z9],delete f[pw],delete f[bw])),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function N_(u){return u.tag===5||u.tag===3||u.tag===4}function xl(u){u:for(;;){for(;u.sibling===null;){if(u.return===null||N_(u.return))return null;u=u.return}u.sibling.return=u.return;for(u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2)continue u;if(u.child===null||u.tag===4)continue u;else u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function k9(u,f,$){var F=u.tag;if(F===5||F===6)u=u.stateNode,f?$.nodeType===8?$.parentNode.insertBefore(u,f):$.insertBefore(u,f):($.nodeType===8?(f=$.parentNode,f.insertBefore(u,$)):(f=$,f.appendChild(u)),$=$._reactRootContainer,$!==null&&$!==void 0||f.onclick!==null||(f.onclick=D8));else if(F!==4&&(u=u.child,u!==null))for(k9(u,f,$),u=u.sibling;u!==null;)k9(u,f,$),u=u.sibling}function P9(u,f,$){var F=u.tag;if(F===5||F===6)u=u.stateNode,f?$.insertBefore(u,f):$.appendChild(u);else if(F!==4&&(u=u.child,u!==null))for(P9(u,f,$),u=u.sibling;u!==null;)P9(u,f,$),u=u.sibling}var Iu=null,Rf=!1;function w0(u,f,$){for($=$.child;$!==null;)I_(u,f,$),$=$.sibling}function I_(u,f,$){if(Cf&&typeof Cf.onCommitFiberUnmount==="function")try{Cf.onCommitFiberUnmount(p8,$)}catch(Q){}switch($.tag){case 5:hu||r1($,f);case 6:var F=Iu,l=Rf;Iu=null,w0(u,f,$),Iu=F,Rf=l,Iu!==null&&(Rf?(u=Iu,$=$.stateNode,u.nodeType===8?u.parentNode.removeChild($):u.removeChild($)):Iu.removeChild($.stateNode));break;case 18:Iu!==null&&(Rf?(u=Iu,$=$.stateNode,u.nodeType===8?r5(u.parentNode,$):u.nodeType===1&&r5(u,$),o4(u)):r5(Iu,$.stateNode));break;case 4:F=Iu,l=Rf,Iu=$.stateNode.containerInfo,Rf=!0,w0(u,f,$),Iu=F,Rf=l;break;case 0:case 11:case 14:case 15:if(!hu&&(F=$.updateQueue,F!==null&&(F=F.lastEffect,F!==null))){l=F=F.next;do{var U=l,_=U.destroy;U=U.tag,_!==void 0&&((U&2)!==0?I9($,f,_):(U&4)!==0&&I9($,f,_)),l=l.next}while(l!==F)}w0(u,f,$);break;case 1:if(!hu&&(r1($,f),F=$.stateNode,typeof F.componentWillUnmount==="function"))try{F.props=$.memoizedProps,F.state=$.memoizedState,F.componentWillUnmount()}catch(Q){Yu($,f,Q)}w0(u,f,$);break;case 21:w0(u,f,$);break;case 22:$.mode&1?(hu=(F=hu)||$.memoizedState!==null,w0(u,f,$),hu=F):w0(u,f,$);break;default:w0(u,f,$)}}function cl(u){var f=u.updateQueue;if(f!==null){u.updateQueue=null;var $=u.stateNode;$===null&&($=u.stateNode=new _B),f.forEach(function(F){var l=LB.bind(null,u,F);$.has(F)||($.add(F),F.then(l,l))})}}function Zf(u,f){var $=f.deletions;if($!==null)for(var F=0;F<$.length;F++){var l=$[F];try{var U=u,_=f,Q=_;u:for(;Q!==null;){switch(Q.tag){case 5:Iu=Q.stateNode,Rf=!1;break u;case 3:Iu=Q.stateNode.containerInfo,Rf=!0;break u;case 4:Iu=Q.stateNode.containerInfo,Rf=!0;break u}Q=Q.return}if(Iu===null)throw Error(p(160));I_(U,_,l),Iu=null,Rf=!1;var J=l.alternate;J!==null&&(J.return=null),l.return=null}catch(q){Yu(l,f,q)}}if(f.subtreeFlags&12854)for(f=f.child;f!==null;)y_(f,u),f=f.sibling}function y_(u,f){var{alternate:$,flags:F}=u;switch(u.tag){case 0:case 11:case 14:case 15:if(Zf(f,u),kf(u),F&4){try{b4(3,u,u.return),a8(3,u)}catch(z){Yu(u,u.return,z)}try{b4(5,u,u.return)}catch(z){Yu(u,u.return,z)}}break;case 1:Zf(f,u),kf(u),F&512&&$!==null&&r1($,$.return);break;case 5:if(Zf(f,u),kf(u),F&512&&$!==null&&r1($,$.return),u.flags&32){var l=u.stateNode;try{t4(l,"")}catch(z){Yu(u,u.return,z)}}if(F&4&&(l=u.stateNode,l!=null)){var U=u.memoizedProps,_=$!==null?$.memoizedProps:U,Q=u.type,J=u.updateQueue;if(u.updateQueue=null,J!==null)try{Q==="input"&&U.type==="radio"&&U.name!=null&&fU(l,U),F9(Q,_);var q=F9(Q,U);for(_=0;_<J.length;_+=2){var T=J[_],W=J[_+1];T==="style"?_U(l,W):T==="dangerouslySetInnerHTML"?lU(l,W):T==="children"?t4(l,W):m9(l,T,W,q)}switch(Q){case"input":o5(l,U);break;case"textarea":$U(l,U);break;case"select":var A=l._wrapperState.wasMultiple;l._wrapperState.wasMultiple=!!U.multiple;var K=U.value;K!=null?h1(l,!!U.multiple,K,!1):A!==!!U.multiple&&(U.defaultValue!=null?h1(l,!!U.multiple,U.defaultValue,!0):h1(l,!!U.multiple,U.multiple?[]:"",!1))}l[F3]=U}catch(z){Yu(u,u.return,z)}}break;case 6:if(Zf(f,u),kf(u),F&4){if(u.stateNode===null)throw Error(p(162));l=u.stateNode,U=u.memoizedProps;try{l.nodeValue=U}catch(z){Yu(u,u.return,z)}}break;case 3:if(Zf(f,u),kf(u),F&4&&$!==null&&$.memoizedState.isDehydrated)try{o4(f.containerInfo)}catch(z){Yu(u,u.return,z)}break;case 4:Zf(f,u),kf(u);break;case 13:Zf(f,u),kf(u),l=u.child,l.flags&8192&&(U=l.memoizedState!==null,l.stateNode.isHidden=U,!U||l.alternate!==null&&l.alternate.memoizedState!==null||(Y7=Mu())),F&4&&cl(u);break;case 22:if(T=$!==null&&$.memoizedState!==null,u.mode&1?(hu=(q=hu)||T,Zf(f,u),hu=q):Zf(f,u),kf(u),F&8192){if(q=u.memoizedState!==null,(u.stateNode.isHidden=q)&&!T&&(u.mode&1)!==0)for(t=u,T=u.child;T!==null;){for(W=t=T;t!==null;){switch(A=t,K=A.child,A.tag){case 0:case 11:case 14:case 15:b4(4,A,A.return);break;case 1:r1(A,A.return);var L=A.stateNode;if(typeof L.componentWillUnmount==="function"){F=A,$=A.return;try{f=F,L.props=f.memoizedProps,L.state=f.memoizedState,L.componentWillUnmount()}catch(z){Yu(F,$,z)}}break;case 5:r1(A,A.return);break;case 22:if(A.memoizedState!==null){pl(W);continue}}K!==null?(K.return=A,t=K):pl(W)}T=T.sibling}u:for(T=null,W=u;;){if(W.tag===5){if(T===null){T=W;try{l=W.stateNode,q?(U=l.style,typeof U.setProperty==="function"?U.setProperty("display","none","important"):U.display="none"):(Q=W.stateNode,J=W.memoizedProps.style,_=J!==void 0&&J!==null&&J.hasOwnProperty("display")?J.display:null,Q.style.display=UU("display",_))}catch(z){Yu(u,u.return,z)}}}else if(W.tag===6){if(T===null)try{W.stateNode.nodeValue=q?"":W.memoizedProps}catch(z){Yu(u,u.return,z)}}else if((W.tag!==22&&W.tag!==23||W.memoizedState===null||W===u)&&W.child!==null){W.child.return=W,W=W.child;continue}if(W===u)break u;for(;W.sibling===null;){if(W.return===null||W.return===u)break u;T===W&&(T=null),W=W.return}T===W&&(T=null),W.sibling.return=W.return,W=W.sibling}}break;case 19:Zf(f,u),kf(u),F&4&&cl(u);break;case 21:break;default:Zf(f,u),kf(u)}}function kf(u){var f=u.flags;if(f&2){try{u:{for(var $=u.return;$!==null;){if(N_($)){var F=$;break u}$=$.return}throw Error(p(160))}switch(F.tag){case 5:var l=F.stateNode;F.flags&32&&(t4(l,""),F.flags&=-33);var U=xl(u);P9(u,U,l);break;case 3:case 4:var _=F.stateNode.containerInfo,Q=xl(u);k9(u,Q,_);break;default:throw Error(p(161))}}catch(J){Yu(u,u.return,J)}u.flags&=-3}f&4096&&(u.flags&=-4097)}function JB(u,f,$){t=u,k_(u,f,$)}function k_(u,f,$){for(var F=(u.mode&1)!==0;t!==null;){var l=t,U=l.child;if(l.tag===22&&F){var _=l.memoizedState!==null||_8;if(!_){var Q=l.alternate,J=Q!==null&&Q.memoizedState!==null||hu;Q=_8;var q=hu;if(_8=_,(hu=J)&&!q)for(t=l;t!==null;)_=t,J=_.child,_.tag===22&&_.memoizedState!==null?bl(l):J!==null?(J.return=_,t=J):bl(l);for(;U!==null;)t=U,k_(U,f,$),U=U.sibling;t=l,_8=Q,hu=q}ml(u,f,$)}else(l.subtreeFlags&8772)!==0&&U!==null?(U.return=l,t=U):ml(u,f,$)}}function ml(u){for(;t!==null;){var f=t;if((f.flags&8772)!==0){var $=f.alternate;try{if((f.flags&8772)!==0)switch(f.tag){case 0:case 11:case 15:hu||a8(5,f);break;case 1:var F=f.stateNode;if(f.flags&4&&!hu)if($===null)F.componentDidMount();else{var l=f.elementType===f.type?$.memoizedProps:Yf(f.type,$.memoizedProps);F.componentDidUpdate(l,$.memoizedState,F.__reactInternalSnapshotBeforeUpdate)}var U=f.updateQueue;U!==null&&Xl(f,U,F);break;case 3:var _=f.updateQueue;if(_!==null){if($=null,f.child!==null)switch(f.child.tag){case 5:$=f.child.stateNode;break;case 1:$=f.child.stateNode}Xl(f,_,$)}break;case 5:var Q=f.stateNode;if($===null&&f.flags&4){$=Q;var J=f.memoizedProps;switch(f.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&$.focus();break;case"img":J.src&&($.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(f.memoizedState===null){var q=f.alternate;if(q!==null){var T=q.memoizedState;if(T!==null){var W=T.dehydrated;W!==null&&o4(W)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(p(163))}hu||f.flags&512&&y9(f)}catch(A){Yu(f,f.return,A)}}if(f===u){t=null;break}if($=f.sibling,$!==null){$.return=f.return,t=$;break}t=f.return}}function pl(u){for(;t!==null;){var f=t;if(f===u){t=null;break}var $=f.sibling;if($!==null){$.return=f.return,t=$;break}t=f.return}}function bl(u){for(;t!==null;){var f=t;try{switch(f.tag){case 0:case 11:case 15:var $=f.return;try{a8(4,f)}catch(J){Yu(f,$,J)}break;case 1:var F=f.stateNode;if(typeof F.componentDidMount==="function"){var l=f.return;try{F.componentDidMount()}catch(J){Yu(f,l,J)}}var U=f.return;try{y9(f)}catch(J){Yu(f,U,J)}break;case 5:var _=f.return;try{y9(f)}catch(J){Yu(f,_,J)}}}catch(J){Yu(f,f.return,J)}if(f===u){t=null;break}var Q=f.sibling;if(Q!==null){Q.return=f.return,t=Q;break}t=f.return}}var qB=Math.ceil,h8=l0.ReactCurrentDispatcher,z7=l0.ReactCurrentOwner,Tf=l0.ReactCurrentBatchConfig,Ju=0,Su=null,Vu=null,yu=0,ou=0,C1=I0(0),Du=0,q3=null,F1=0,o8=0,Z7=0,i4=null,iu=null,Y7=0,d1=1/0,nf=null,v8=!1,r9=null,X0=null,Q8=!1,Z0=null,x8=0,g4=0,C9=null,L8=-1,G8=0;function pu(){return(Ju&6)!==0?Mu():L8!==-1?L8:L8=Mu()}function D0(u){if((u.mode&1)===0)return 1;if((Ju&2)!==0&&yu!==0)return yu&-yu;if(gw.transition!==null)return G8===0&&(G8=HU()),G8;if(u=Tu,u!==0)return u;return u=window.event,u=u===void 0?16:VU(u.type),u}function Vf(u,f,$,F){if(50<g4)throw g4=0,C9=null,Error(p(185));if(T3(u,$,F),(Ju&2)===0||u!==Su)u===Su&&((Ju&2)===0&&(o8|=$),Du===4&&H0(u,yu)),nu(u,F),$===1&&Ju===0&&(f.mode&1)===0&&(d1=Mu()+500,t8&&y0())}function nu(u,f){var $=u.callbackNode;tK(u,f);var F=M8(u,u===Su?yu:0);if(F===0)$!==null&&ul($),u.callbackNode=null,u.callbackPriority=0;else if(f=F&-F,u.callbackPriority!==f){if($!=null&&ul($),f===1)u.tag===0?iw(il.bind(null,u)):bU(il.bind(null,u)),cw(function(){(Ju&6)===0&&y0()}),$=null;else{switch(zU(F)){case 1:$=s9;break;case 4:$=LU;break;case 16:$=R8;break;case 536870912:$=GU;break;default:$=R8}$=m_($,P_.bind(null,u))}u.callbackPriority=f,u.callbackNode=$}}function P_(u,f){if(L8=-1,G8=0,(Ju&6)!==0)throw Error(p(327));var $=u.callbackNode;if(p1()&&u.callbackNode!==$)return null;var F=M8(u,u===Su?yu:0);if(F===0)return null;if((F&30)!==0||(F&u.expiredLanes)!==0||f)f=c8(u,F);else{f=F;var l=Ju;Ju|=2;var U=C_();if(Su!==u||yu!==f)nf=null,d1=Mu()+500,o0(u,f);do try{WB();break}catch(Q){r_(u,Q)}while(1);_7(),h8.current=U,Ju=l,Vu!==null?f=0:(Su=null,yu=0,f=Du)}if(f!==0){if(f===2&&(l=J9(u),l!==0&&(F=l,f=h9(u,l))),f===1)throw $=q3,o0(u,0),H0(u,F),nu(u,Mu()),$;if(f===6)H0(u,F);else{if(l=u.current.alternate,(F&30)===0&&!TB(l)&&(f=c8(u,F),f===2&&(U=J9(u),U!==0&&(F=U,f=h9(u,U))),f===1))throw $=q3,o0(u,0),H0(u,F),nu(u,Mu()),$;switch(u.finishedWork=l,u.finishedLanes=F,f){case 0:case 1:throw Error(p(345));case 2:t0(u,iu,nf);break;case 3:if(H0(u,F),(F&130023424)===F&&(f=Y7+500-Mu(),10<f)){if(M8(u,0)!==0)break;if(l=u.suspendedLanes,(l&F)!==F){pu(),u.pingedLanes|=u.suspendedLanes&l;break}u.timeoutHandle=H9(t0.bind(null,u,iu,nf),f);break}t0(u,iu,nf);break;case 4:if(H0(u,F),(F&4194240)===F)break;f=u.eventTimes;for(l=-1;0<F;){var _=31-Ef(F);U=1<<_,_=f[_],_>l&&(l=_),F&=~U}if(F=l,F=Mu()-F,F=(120>F?120:480>F?480:1080>F?1080:1920>F?1920:3000>F?3000:4320>F?4320:1960*qB(F/1960))-F,10<F){u.timeoutHandle=H9(t0.bind(null,u,iu,nf),F);break}t0(u,iu,nf);break;case 5:t0(u,iu,nf);break;default:throw Error(p(329))}}}return nu(u,Mu()),u.callbackNode===$?P_.bind(null,u):null}function h9(u,f){var $=i4;return u.current.memoizedState.isDehydrated&&(o0(u,f).flags|=256),u=c8(u,f),u!==2&&(f=iu,iu=$,f!==null&&v9(f)),u}function v9(u){iu===null?iu=u:iu.push.apply(iu,u)}function TB(u){for(var f=u;;){if(f.flags&16384){var $=f.updateQueue;if($!==null&&($=$.stores,$!==null))for(var F=0;F<$.length;F++){var l=$[F],U=l.getSnapshot;l=l.value;try{if(!Xf(U(),l))return!1}catch(_){return!1}}}if($=f.child,f.subtreeFlags&16384&&$!==null)$.return=f,f=$;else{if(f===u)break;for(;f.sibling===null;){if(f.return===null||f.return===u)return!0;f=f.return}f.sibling.return=f.return,f=f.sibling}}return!0}function H0(u,f){f&=~Z7,f&=~o8,u.suspendedLanes|=f,u.pingedLanes&=~f;for(u=u.expirationTimes;0<f;){var $=31-Ef(f),F=1<<$;u[$]=-1,f&=~F}}function il(u){if((Ju&6)!==0)throw Error(p(327));p1();var f=M8(u,0);if((f&1)===0)return nu(u,Mu()),null;var $=c8(u,f);if(u.tag!==0&&$===2){var F=J9(u);F!==0&&(f=F,$=h9(u,F))}if($===1)throw $=q3,o0(u,0),H0(u,f),nu(u,Mu()),$;if($===6)throw Error(p(345));return u.finishedWork=u.current.alternate,u.finishedLanes=f,t0(u,iu,nf),nu(u,Mu()),null}function R7(u,f){var $=Ju;Ju|=1;try{return u(f)}finally{Ju=$,Ju===0&&(d1=Mu()+500,t8&&y0())}}function l1(u){Z0!==null&&Z0.tag===0&&(Ju&6)===0&&p1();var f=Ju;Ju|=1;var $=Tf.transition,F=Tu;try{if(Tf.transition=null,Tu=1,u)return u()}finally{Tu=F,Tf.transition=$,Ju=f,(Ju&6)===0&&y0()}}function M7(){ou=C1.current,wu(C1)}function o0(u,f){u.finishedWork=null,u.finishedLanes=0;var $=u.timeoutHandle;if($!==-1&&(u.timeoutHandle=-1,xw($)),Vu!==null)for($=Vu.return;$!==null;){var F=$;switch(F7(F),F.tag){case 1:F=F.type.childContextTypes,F!==null&&F!==void 0&&O8();break;case 3:t1(),wu(su),wu(vu),W7();break;case 5:A7(F);break;case 4:t1();break;case 13:wu(Hu);break;case 19:wu(Hu);break;case 10:Q7(F.type._context);break;case 22:case 23:M7()}$=$.return}if(Su=u,Vu=u=O0(u.current,null),yu=ou=f,Du=0,q3=null,Z7=o8=F1=0,iu=i4=null,d0!==null){for(f=0;f<d0.length;f++)if($=d0[f],F=$.interleaved,F!==null){$.interleaved=null;var l=F.next,U=$.pending;if(U!==null){var _=U.next;U.next=l,F.next=_}$.pending=F}d0=null}return u}function r_(u,f){do{var $=Vu;try{if(_7(),K8.current=C8,r8){for(var F=zu.memoizedState;F!==null;){var l=F.queue;l!==null&&(l.pending=null),F=F.next}r8=!1}if($1=0,Ou=Xu=zu=null,p4=!1,_3=0,z7.current=null,$===null||$.return===null){Du=1,q3=f,Vu=null;break}u:{var U=u,_=$.return,Q=$,J=f;if(f=yu,Q.flags|=32768,J!==null&&typeof J==="object"&&typeof J.then==="function"){var q=J,T=Q,W=T.tag;if((T.mode&1)===0&&(W===0||W===11||W===15)){var A=T.alternate;A?(T.updateQueue=A.updateQueue,T.memoizedState=A.memoizedState,T.lanes=A.lanes):(T.updateQueue=null,T.memoizedState=null)}var K=Il(_);if(K!==null){K.flags&=-257,yl(K,_,Q,U,f),K.mode&1&&Nl(U,q,f),f=K,J=q;var L=f.updateQueue;if(L===null){var z=new Set;z.add(J),f.updateQueue=z}else L.add(J);break u}else{if((f&1)===0){Nl(U,q,f),E7();break u}J=Error(p(426))}}else if(Lu&&Q.mode&1){var Z=Il(_);if(Z!==null){(Z.flags&65536)===0&&(Z.flags|=256),yl(Z,_,Q,U,f),l7(n1(J,Q));break u}}U=J=n1(J,Q),Du!==4&&(Du=2),i4===null?i4=[U]:i4.push(U),U=_;do{switch(U.tag){case 3:U.flags|=65536,f&=-f,U.lanes|=f;var B=z_(U,J,f);Vl(U,B);break u;case 1:Q=J;var{type:G,stateNode:w}=U;if((U.flags&128)===0&&(typeof G.getDerivedStateFromError==="function"||w!==null&&typeof w.componentDidCatch==="function"&&(X0===null||!X0.has(w)))){U.flags|=65536,f&=-f,U.lanes|=f;var H=Z_(U,Q,f);Vl(U,H);break u}}U=U.return}while(U!==null)}v_($)}catch(M){f=M,Vu===$&&$!==null&&(Vu=$=$.return);continue}break}while(1)}function C_(){var u=h8.current;return h8.current=C8,u===null?C8:u}function E7(){if(Du===0||Du===3||Du===2)Du=4;Su===null||(F1&268435455)===0&&(o8&268435455)===0||H0(Su,yu)}function c8(u,f){var $=Ju;Ju|=2;var F=C_();if(Su!==u||yu!==f)nf=null,o0(u,f);do try{AB();break}catch(l){r_(u,l)}while(1);if(_7(),Ju=$,h8.current=F,Vu!==null)throw Error(p(261));return Su=null,yu=0,Du}function AB(){for(;Vu!==null;)h_(Vu)}function WB(){for(;Vu!==null&&!vK();)h_(Vu)}function h_(u){var f=c_(u.alternate,u,ou);u.memoizedProps=u.pendingProps,f===null?v_(u):Vu=f,z7.current=null}function v_(u){var f=u;do{var $=f.alternate;if(u=f.return,(f.flags&32768)===0){if($=lB($,f,ou),$!==null){Vu=$;return}}else{if($=UB($,f),$!==null){$.flags&=32767,Vu=$;return}if(u!==null)u.flags|=32768,u.subtreeFlags=0,u.deletions=null;else{Du=6,Vu=null;return}}if(f=f.sibling,f!==null){Vu=f;return}Vu=f=u}while(f!==null);Du===0&&(Du=5)}function t0(u,f,$){var F=Tu,l=Tf.transition;try{Tf.transition=null,Tu=1,KB(u,f,$,F)}finally{Tf.transition=l,Tu=F}return null}function KB(u,f,$,F){do p1();while(Z0!==null);if((Ju&6)!==0)throw Error(p(327));$=u.finishedWork;var l=u.finishedLanes;if($===null)return null;if(u.finishedWork=null,u.finishedLanes=0,$===u.current)throw Error(p(177));u.callbackNode=null,u.callbackPriority=0;var U=$.lanes|$.childLanes;if(nK(u,U),u===Su&&(Vu=Su=null,yu=0),($.subtreeFlags&2064)===0&&($.flags&2064)===0||Q8||(Q8=!0,m_(R8,function(){return p1(),null})),U=($.flags&15990)!==0,($.subtreeFlags&15990)!==0||U){U=Tf.transition,Tf.transition=null;var _=Tu;Tu=1;var Q=Ju;Ju|=4,z7.current=null,QB(u,$),y_($,u),Pw(L9),E8=!!B9,L9=B9=null,u.current=$,JB($,u,l),xK(),Ju=Q,Tu=_,Tf.transition=U}else u.current=$;if(Q8&&(Q8=!1,Z0=u,x8=l),U=u.pendingLanes,U===0&&(X0=null),pK($.stateNode,F),nu(u,Mu()),f!==null)for(F=u.onRecoverableError,$=0;$<f.length;$++)l=f[$],F(l.value,{componentStack:l.stack,digest:l.digest});if(v8)throw v8=!1,u=r9,r9=null,u;return(x8&1)!==0&&u.tag!==0&&p1(),U=u.pendingLanes,(U&1)!==0?u===C9?g4++:(g4=0,C9=u):g4=0,y0(),null}function p1(){if(Z0!==null){var u=zU(x8),f=Tf.transition,$=Tu;try{if(Tf.transition=null,Tu=16>u?16:u,Z0===null)var F=!1;else{if(u=Z0,Z0=null,x8=0,(Ju&6)!==0)throw Error(p(331));var l=Ju;Ju|=4;for(t=u.current;t!==null;){var U=t,_=U.child;if((t.flags&16)!==0){var Q=U.deletions;if(Q!==null){for(var J=0;J<Q.length;J++){var q=Q[J];for(t=q;t!==null;){var T=t;switch(T.tag){case 0:case 11:case 15:b4(8,T,U)}var W=T.child;if(W!==null)W.return=T,t=W;else for(;t!==null;){T=t;var{sibling:A,return:K}=T;if(j_(T),T===q){t=null;break}if(A!==null){A.return=K,t=A;break}t=K}}}var L=U.alternate;if(L!==null){var z=L.child;if(z!==null){L.child=null;do{var Z=z.sibling;z.sibling=null,z=Z}while(z!==null)}}t=U}}if((U.subtreeFlags&2064)!==0&&_!==null)_.return=U,t=_;else u:for(;t!==null;){if(U=t,(U.flags&2048)!==0)switch(U.tag){case 0:case 11:case 15:b4(9,U,U.return)}var B=U.sibling;if(B!==null){B.return=U.return,t=B;break u}t=U.return}}var G=u.current;for(t=G;t!==null;){_=t;var w=_.child;if((_.subtreeFlags&2064)!==0&&w!==null)w.return=_,t=w;else u:for(_=G;t!==null;){if(Q=t,(Q.flags&2048)!==0)try{switch(Q.tag){case 0:case 11:case 15:a8(9,Q)}}catch(M){Yu(Q,Q.return,M)}if(Q===_){t=null;break u}var H=Q.sibling;if(H!==null){H.return=Q.return,t=H;break u}t=Q.return}}if(Ju=l,y0(),Cf&&typeof Cf.onPostCommitFiberRoot==="function")try{Cf.onPostCommitFiberRoot(p8,u)}catch(M){}F=!0}return F}finally{Tu=$,Tf.transition=f}}return!1}function gl(u,f,$){f=n1($,f),f=z_(u,f,1),u=V0(u,f,1),f=pu(),u!==null&&(T3(u,1,f),nu(u,f))}function Yu(u,f,$){if(u.tag===3)gl(u,u,$);else for(;f!==null;){if(f.tag===3){gl(f,u,$);break}else if(f.tag===1){var F=f.stateNode;if(typeof f.type.getDerivedStateFromError==="function"||typeof F.componentDidCatch==="function"&&(X0===null||!X0.has(F))){u=n1($,u),u=Z_(f,u,1),f=V0(f,u,1),u=pu(),f!==null&&(T3(f,1,u),nu(f,u));break}}f=f.return}}function wB(u,f,$){var F=u.pingCache;F!==null&&F.delete(f),f=pu(),u.pingedLanes|=u.suspendedLanes&$,Su===u&&(yu&$)===$&&(Du===4||Du===3&&(yu&130023424)===yu&&500>Mu()-Y7?o0(u,0):Z7|=$),nu(u,f)}function x_(u,f){f===0&&((u.mode&1)===0?f=1:(f=a3,a3<<=1,(a3&130023424)===0&&(a3=4194304)));var $=pu();u=$0(u,f),u!==null&&(T3(u,f,$),nu(u,$))}function BB(u){var f=u.memoizedState,$=0;f!==null&&($=f.retryLane),x_(u,$)}function LB(u,f){var $=0;switch(u.tag){case 13:var{stateNode:F,memoizedState:l}=u;l!==null&&($=l.retryLane);break;case 19:F=u.stateNode;break;default:throw Error(p(314))}F!==null&&F.delete(f),x_(u,$)}var c_;c_=function(u,f,$){if(u!==null)if(u.memoizedProps!==f.pendingProps||su.current)gu=!0;else{if((u.lanes&$)===0&&(f.flags&128)===0)return gu=!1,FB(u,f,$);gu=(u.flags&131072)!==0?!0:!1}else gu=!1,Lu&&(f.flags&1048576)!==0&&iU(f,N8,f.index);switch(f.lanes=0,f.tag){case 2:var F=f.type;B8(u,f),u=f.pendingProps;var l=i1(f,vu.current);m1(f,$),l=w7(null,f,F,u,l,$);var U=B7();return f.flags|=1,typeof l==="object"&&l!==null&&typeof l.render==="function"&&l.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,tu(F)?(U=!0,S8(f)):U=!1,f.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,q7(f),l.updater=d8,f.stateNode=l,l._reactInternals=f,V9(f,F,u,$),f=O9(null,f,F,!0,U,$)):(f.tag=0,Lu&&U&&$7(f),mu(null,f,l,$),f=f.child),f;case 16:F=f.elementType;u:{switch(B8(u,f),u=f.pendingProps,l=F._init,F=l(F._payload),f.type=F,l=f.tag=HB(F),u=Yf(F,u),l){case 0:f=D9(null,f,F,u,$);break u;case 1:f=rl(null,f,F,u,$);break u;case 11:f=kl(null,f,F,u,$);break u;case 14:f=Pl(null,f,F,Yf(F.type,u),$);break u}throw Error(p(306,F,""))}return f;case 0:return F=f.type,l=f.pendingProps,l=f.elementType===F?l:Yf(F,l),D9(u,f,F,l,$);case 1:return F=f.type,l=f.pendingProps,l=f.elementType===F?l:Yf(F,l),rl(u,f,F,l,$);case 3:u:{if(E_(f),u===null)throw Error(p(387));F=f.pendingProps,U=f.memoizedState,l=U.element,aU(u,f),k8(f,F,null,$);var _=f.memoizedState;if(F=_.element,U.isDehydrated)if(U={element:F,isDehydrated:!1,cache:_.cache,pendingSuspenseBoundaries:_.pendingSuspenseBoundaries,transitions:_.transitions},f.updateQueue.baseState=U,f.memoizedState=U,f.flags&256){l=n1(Error(p(423)),f),f=Cl(u,f,F,$,l);break u}else if(F!==l){l=n1(Error(p(424)),f),f=Cl(u,f,F,$,l);break u}else for(eu=E0(f.stateNode.containerInfo.firstChild),uf=f,Lu=!0,Mf=null,$=nU(f,null,F,$),f.child=$;$;)$.flags=$.flags&-3|4096,$=$.sibling;else{if(g1(),F===l){f=F0(u,f,$);break u}mu(u,f,F,$)}f=f.child}return f;case 5:return oU(f),u===null&&R9(f),F=f.type,l=f.pendingProps,U=u!==null?u.memoizedProps:null,_=l.children,G9(F,l)?_=null:U!==null&&G9(F,U)&&(f.flags|=32),M_(u,f),mu(u,f,_,$),f.child;case 6:return u===null&&R9(f),null;case 13:return V_(u,f,$);case 4:return T7(f,f.stateNode.containerInfo),F=f.pendingProps,u===null?f.child=s1(f,null,F,$):mu(u,f,F,$),f.child;case 11:return F=f.type,l=f.pendingProps,l=f.elementType===F?l:Yf(F,l),kl(u,f,F,l,$);case 7:return mu(u,f,f.pendingProps,$),f.child;case 8:return mu(u,f,f.pendingProps.children,$),f.child;case 12:return mu(u,f,f.pendingProps.children,$),f.child;case 10:u:{if(F=f.type._context,l=f.pendingProps,U=f.memoizedProps,_=l.value,Wu(I8,F._currentValue),F._currentValue=_,U!==null)if(Xf(U.value,_)){if(U.children===l.children&&!su.current){f=F0(u,f,$);break u}}else for(U=f.child,U!==null&&(U.return=f);U!==null;){var Q=U.dependencies;if(Q!==null){_=U.child;for(var J=Q.firstContext;J!==null;){if(J.context===F){if(U.tag===1){J=ef(-1,$&-$),J.tag=2;var q=U.updateQueue;if(q!==null){q=q.shared;var T=q.pending;T===null?J.next=J:(J.next=T.next,T.next=J),q.pending=J}}U.lanes|=$,J=U.alternate,J!==null&&(J.lanes|=$),M9(U.return,$,f),Q.lanes|=$;break}J=J.next}}else if(U.tag===10)_=U.type===f.type?null:U.child;else if(U.tag===18){if(_=U.return,_===null)throw Error(p(341));_.lanes|=$,Q=_.alternate,Q!==null&&(Q.lanes|=$),M9(_,$,f),_=U.sibling}else _=U.child;if(_!==null)_.return=U;else for(_=U;_!==null;){if(_===f){_=null;break}if(U=_.sibling,U!==null){U.return=_.return,_=U;break}_=_.return}U=_}mu(u,f,l.children,$),f=f.child}return f;case 9:return l=f.type,F=f.pendingProps.children,m1(f,$),l=Af(l),F=F(l),f.flags|=1,mu(u,f,F,$),f.child;case 14:return F=f.type,l=Yf(F,f.pendingProps),l=Yf(F.type,l),Pl(u,f,F,l,$);case 15:return Y_(u,f,f.type,f.pendingProps,$);case 17:return F=f.type,l=f.pendingProps,l=f.elementType===F?l:Yf(F,l),B8(u,f),f.tag=1,tu(F)?(u=!0,S8(f)):u=!1,m1(f,$),H_(f,F,l),V9(f,F,l,$),O9(null,f,F,!0,u,$);case 19:return X_(u,f,$);case 22:return R_(u,f,$)}throw Error(p(156,f.tag))};function m_(u,f){return BU(u,f)}function GB(u,f,$,F){this.tag=u,this.key=$,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=F,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qf(u,f,$,F){return new GB(u,f,$,F)}function V7(u){return u=u.prototype,!(!u||!u.isReactComponent)}function HB(u){if(typeof u==="function")return V7(u)?1:0;if(u!==void 0&&u!==null){if(u=u.$$typeof,u===b9)return 11;if(u===i9)return 14}return 2}function O0(u,f){var $=u.alternate;return $===null?($=qf(u.tag,f,u.key,u.mode),$.elementType=u.elementType,$.type=u.type,$.stateNode=u.stateNode,$.alternate=u,u.alternate=$):($.pendingProps=f,$.type=u.type,$.flags=0,$.subtreeFlags=0,$.deletions=null),$.flags=u.flags&14680064,$.childLanes=u.childLanes,$.lanes=u.lanes,$.child=u.child,$.memoizedProps=u.memoizedProps,$.memoizedState=u.memoizedState,$.updateQueue=u.updateQueue,f=u.dependencies,$.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},$.sibling=u.sibling,$.index=u.index,$.ref=u.ref,$}function H8(u,f,$,F,l,U){var _=2;if(F=u,typeof u==="function")V7(u)&&(_=1);else if(typeof u==="string")_=5;else u:switch(u){case D1:return e0($.children,l,U,f);case p9:_=8,l|=8;break;case s5:return u=qf(12,$,f,l|2),u.elementType=s5,u.lanes=U,u;case t5:return u=qf(13,$,f,l),u.elementType=t5,u.lanes=U,u;case n5:return u=qf(19,$,f,l),u.elementType=n5,u.lanes=U,u;case ol:return e8($,l,U,f);default:if(typeof u==="object"&&u!==null)switch(u.$$typeof){case dl:_=10;break u;case al:_=9;break u;case b9:_=11;break u;case i9:_=14;break u;case B0:_=16,F=null;break u}throw Error(p(130,u==null?u:typeof u,""))}return f=qf(_,$,f,l),f.elementType=u,f.type=F,f.lanes=U,f}function e0(u,f,$,F){return u=qf(7,u,F,f),u.lanes=$,u}function e8(u,f,$,F){return u=qf(22,u,F,f),u.elementType=ol,u.lanes=$,u.stateNode={isHidden:!1},u}function b5(u,f,$){return u=qf(6,u,null,f),u.lanes=$,u}function i5(u,f,$){return f=qf(4,u.children!==null?u.children:[],u.key,f),f.lanes=$,f.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},f}function zB(u,f,$,F,l){this.tag=f,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=S5(0),this.expirationTimes=S5(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=S5(0),this.identifierPrefix=F,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function X7(u,f,$,F,l,U,_,Q,J){return u=new zB(u,f,$,Q,J),f===1?(f=1,U===!0&&(f|=8)):f=0,U=qf(3,null,null,f),u.current=U,U.stateNode=u,U.memoizedState={element:F,isDehydrated:$,cache:null,transitions:null,pendingSuspenseBoundaries:null},q7(U),u}function ZB(u,f,$){var F=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:X1,key:F==null?null:""+F,children:u,containerInfo:f,implementation:$}}function p_(u){if(!u)return j0;u=u._reactInternals;u:{if(_1(u)!==u||u.tag!==1)throw Error(p(170));var f=u;do{switch(f.tag){case 3:f=f.stateNode.context;break u;case 1:if(tu(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break u}}f=f.return}while(f!==null);throw Error(p(171))}if(u.tag===1){var $=u.type;if(tu($))return pU(u,$,f)}return f}function b_(u,f,$,F,l,U,_,Q,J){return u=X7($,F,!0,u,l,U,_,Q,J),u.context=p_(null),$=u.current,F=pu(),l=D0($),U=ef(F,l),U.callback=f!==void 0&&f!==null?f:null,V0($,U,l),u.current.lanes=l,T3(u,l,F),nu(u,F),u}function u6(u,f,$,F){var l=f.current,U=pu(),_=D0(l);return $=p_($),f.context===null?f.context=$:f.pendingContext=$,f=ef(U,_),f.payload={element:u},F=F===void 0?null:F,F!==null&&(f.callback=F),u=V0(l,f,_),u!==null&&(Vf(u,l,_,U),W8(u,l,_)),_}function m8(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return u.child.stateNode;default:return u.child.stateNode}}function sl(u,f){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var $=u.retryLane;u.retryLane=$!==0&&$<f?$:f}}function D7(u,f){sl(u,f),(u=u.alternate)&&sl(u,f)}function YB(){return null}var i_=typeof reportError==="function"?reportError:function(u){console.error(u)};function O7(u){this._internalRoot=u}f6.prototype.render=O7.prototype.render=function(u){var f=this._internalRoot;if(f===null)throw Error(p(409));u6(u,f,null,null)};f6.prototype.unmount=O7.prototype.unmount=function(){var u=this._internalRoot;if(u!==null){this._internalRoot=null;var f=u.containerInfo;l1(function(){u6(null,u,null,null)}),f[f0]=null}};function f6(u){this._internalRoot=u}f6.prototype.unstable_scheduleHydration=function(u){if(u){var f=RU();u={blockedOn:null,target:u,priority:f};for(var $=0;$<G0.length&&f!==0&&f<G0[$].priority;$++);G0.splice($,0,u),$===0&&EU(u)}};function S7(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11)}function $6(u){return!(!u||u.nodeType!==1&&u.nodeType!==9&&u.nodeType!==11&&(u.nodeType!==8||u.nodeValue!==" react-mount-point-unstable "))}function tl(){}function RB(u,f,$,F,l){if(l){if(typeof F==="function"){var U=F;F=function(){var q=m8(_);U.call(q)}}var _=b_(f,F,u,0,null,!1,!1,"",tl);return u._reactRootContainer=_,u[f0]=_.current,f3(u.nodeType===8?u.parentNode:u),l1(),_}for(;l=u.lastChild;)u.removeChild(l);if(typeof F==="function"){var Q=F;F=function(){var q=m8(J);Q.call(q)}}var J=X7(u,0,!1,null,null,!1,!1,"",tl);return u._reactRootContainer=J,u[f0]=J.current,f3(u.nodeType===8?u.parentNode:u),l1(function(){u6(f,J,$,F)}),J}function F6(u,f,$,F,l){var U=$._reactRootContainer;if(U){var _=U;if(typeof l==="function"){var Q=l;l=function(){var J=m8(_);Q.call(J)}}u6(f,_,u,l)}else _=RB($,f,u,l,F);return m8(_)}ZU=function(u){switch(u.tag){case 3:var f=u.stateNode;if(f.current.memoizedState.isDehydrated){var $=I4(f.pendingLanes);$!==0&&(t9(f,$|1),nu(f,Mu()),(Ju&6)===0&&(d1=Mu()+500,y0()))}break;case 13:l1(function(){var F=$0(u,1);if(F!==null){var l=pu();Vf(F,u,1,l)}}),D7(u,1)}};n9=function(u){if(u.tag===13){var f=$0(u,134217728);if(f!==null){var $=pu();Vf(f,u,134217728,$)}D7(u,134217728)}};YU=function(u){if(u.tag===13){var f=D0(u),$=$0(u,f);if($!==null){var F=pu();Vf($,u,f,F)}D7(u,f)}};RU=function(){return Tu};MU=function(u,f){var $=Tu;try{return Tu=u,f()}finally{Tu=$}};U9=function(u,f,$){switch(f){case"input":if(o5(u,$),f=$.name,$.type==="radio"&&f!=null){for($=u;$.parentNode;)$=$.parentNode;$=$.querySelectorAll("input[name="+JSON.stringify(""+f)+'][type="radio"]');for(f=0;f<$.length;f++){var F=$[f];if(F!==u&&F.form===u.form){var l=s8(F);if(!l)throw Error(p(90));uU(F),o5(F,l)}}}break;case"textarea":$U(u,$);break;case"select":f=$.value,f!=null&&h1(u,!!$.multiple,f,!1)}};qU=R7;TU=l1;var MB={usingClientEntryPoint:!1,Events:[W3,N1,s8,QU,JU,R7]},S4={findFiberByHostInstance:n0,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},EB={bundleType:S4.bundleType,version:S4.version,rendererPackageName:S4.rendererPackageName,rendererConfig:S4.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:l0.ReactCurrentDispatcher,findHostInstanceByFiber:function(u){return u=KU(u),u===null?null:u.stateNode},findFiberByHostInstance:S4.findFiberByHostInstance||YB,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){if(V1=__REACT_DEVTOOLS_GLOBAL_HOOK__,!V1.isDisabled&&V1.supportsFiber)try{p8=V1.inject(EB),Cf=V1}catch(u){}}var V1;Ff.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MB;Ff.createPortal=function(u,f){var $=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S7(f))throw Error(p(200));return ZB(u,f,null,$)};Ff.createRoot=function(u,f){if(!S7(u))throw Error(p(299));var $=!1,F="",l=i_;return f!==null&&f!==void 0&&(f.unstable_strictMode===!0&&($=!0),f.identifierPrefix!==void 0&&(F=f.identifierPrefix),f.onRecoverableError!==void 0&&(l=f.onRecoverableError)),f=X7(u,1,!1,null,null,$,!1,F,l),u[f0]=f.current,f3(u.nodeType===8?u.parentNode:u),new O7(f)};Ff.findDOMNode=function(u){if(u==null)return null;if(u.nodeType===1)return u;var f=u._reactInternals;if(f===void 0){if(typeof u.render==="function")throw Error(p(188));throw u=Object.keys(u).join(","),Error(p(268,u))}return u=KU(f),u=u===null?null:u.stateNode,u};Ff.flushSync=function(u){return l1(u)};Ff.hydrate=function(u,f,$){if(!$6(f))throw Error(p(200));return F6(null,u,f,!0,$)};Ff.hydrateRoot=function(u,f,$){if(!S7(u))throw Error(p(405));var F=$!=null&&$.hydratedSources||null,l=!1,U="",_=i_;if($!==null&&$!==void 0&&($.unstable_strictMode===!0&&(l=!0),$.identifierPrefix!==void 0&&(U=$.identifierPrefix),$.onRecoverableError!==void 0&&(_=$.onRecoverableError)),f=b_(f,null,u,1,$!=null?$:null,l,!1,U,_),u[f0]=f.current,f3(u),F)for(u=0;u<F.length;u++)$=F[u],l=$._getVersion,l=l($._source),f.mutableSourceEagerHydrationData==null?f.mutableSourceEagerHydrationData=[$,l]:f.mutableSourceEagerHydrationData.push($,l);return new f6(f)};Ff.render=function(u,f,$){if(!$6(f))throw Error(p(200));return F6(null,u,f,!1,$)};Ff.unmountComponentAtNode=function(u){if(!$6(u))throw Error(p(40));return u._reactRootContainer?(l1(function(){F6(null,null,u,!1,function(){u._reactRootContainer=null,u[f0]=null})}),!0):!1};Ff.unstable_batchedUpdates=R7;Ff.unstable_renderSubtreeIntoContainer=function(u,f,$,F){if(!$6($))throw Error(p(200));if(u==null||u._reactInternals===void 0)throw Error(p(38));return F6(u,f,$,!1,F)};Ff.version="18.3.1-next-f1338f8080-20240426"});var j7=o((oV,t_)=>{function s_(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s_)}catch(u){console.error(u)}}s_(),t_.exports=g_()});var d_=o((N7)=>{var n_=j7();N7.createRoot=n_.createRoot,N7.hydrateRoot=n_.hydrateRoot;var VB});var o_=o((l6)=>{var XB=W0(),DB=Symbol.for("react.element"),OB=Symbol.for("react.fragment"),SB=Object.prototype.hasOwnProperty,jB=XB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,NB={key:!0,ref:!0,__self:!0,__source:!0};function a_(u,f,$){var F,l={},U=null,_=null;$!==void 0&&(U=""+$),f.key!==void 0&&(U=""+f.key),f.ref!==void 0&&(_=f.ref);for(F in f)SB.call(f,F)&&!NB.hasOwnProperty(F)&&(l[F]=f[F]);if(u&&u.defaultProps)for(F in f=u.defaultProps,f)l[F]===void 0&&(l[F]=f[F]);return{$$typeof:DB,type:u,key:U,ref:_,props:l,_owner:jB.current}}l6.Fragment=OB;l6.jsx=a_;l6.jsxs=a_});var U6=o((fX,e_)=>{e_.exports=o_()});var aQ=o((dQ)=>{var L4=W0();function tz(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var nz=typeof Object.is==="function"?Object.is:tz,dz=L4.useState,az=L4.useEffect,oz=L4.useLayoutEffect,ez=L4.useDebugValue;function uZ(u,f){var $=f(),F=dz({inst:{value:$,getSnapshot:f}}),l=F[0].inst,U=F[1];return oz(function(){l.value=$,l.getSnapshot=f,m$(l)&&U({inst:l})},[u,$,f]),az(function(){return m$(l)&&U({inst:l}),u(function(){m$(l)&&U({inst:l})})},[u]),ez($),$}function m$(u){var f=u.getSnapshot;u=u.value;try{var $=f();return!nz(u,$)}catch(F){return!0}}function fZ(u,f){return f()}var $Z=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?fZ:uZ;dQ.useSyncExternalStore=L4.useSyncExternalStore!==void 0?L4.useSyncExternalStore:$Z});var eQ=o((aX,oQ)=>{oQ.exports=aQ()});var fJ=o((uJ)=>{var g6=W0(),FZ=eQ();function lZ(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var UZ=typeof Object.is==="function"?Object.is:lZ,_Z=FZ.useSyncExternalStore,QZ=g6.useRef,JZ=g6.useEffect,qZ=g6.useMemo,TZ=g6.useDebugValue;uJ.useSyncExternalStoreWithSelector=function(u,f,$,F,l){var U=QZ(null);if(U.current===null){var _={hasValue:!1,value:null};U.current=_}else _=U.current;U=qZ(function(){function J(K){if(!q){if(q=!0,T=K,K=F(K),l!==void 0&&_.hasValue){var L=_.value;if(l(L,K))return W=L}return W=K}if(L=W,UZ(T,K))return L;var z=F(K);if(l!==void 0&&l(L,z))return T=K,L;return T=K,W=z}var q=!1,T,W,A=$===void 0?null:$;return[function(){return J(f())},A===null?void 0:function(){return J(A())}]},[f,$,F,l]);var Q=_Z(u,U[0],U[1]);return JZ(function(){_.hasValue=!0,_.value=Q},[Q]),TZ(Q),Q}});var FJ=o((eX,$J)=>{$J.exports=fJ()});var u5=o((MD,Dq)=>{var SR="\x00",Y1="\x00",Mq="\x01";class Xq{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>{return};_defaultEdgeLabelFn=()=>{return};_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(u){if(u)this._isDirected=Object.hasOwn(u,"directed")?u.directed:!0,this._isMultigraph=Object.hasOwn(u,"multigraph")?u.multigraph:!1,this._isCompound=Object.hasOwn(u,"compound")?u.compound:!1;if(this._isCompound)this._parent={},this._children={},this._children[Y1]={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(u){return this._label=u,this}graph(){return this._label}setDefaultNodeLabel(u){if(this._defaultNodeLabelFn=u,typeof u!=="function")this._defaultNodeLabelFn=()=>u;return this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var u=this;return this.nodes().filter((f)=>Object.keys(u._in[f]).length===0)}sinks(){var u=this;return this.nodes().filter((f)=>Object.keys(u._out[f]).length===0)}setNodes(u,f){var $=arguments,F=this;return u.forEach(function(l){if($.length>1)F.setNode(l,f);else F.setNode(l)}),this}setNode(u,f){if(Object.hasOwn(this._nodes,u)){if(arguments.length>1)this._nodes[u]=f;return this}if(this._nodes[u]=arguments.length>1?f:this._defaultNodeLabelFn(u),this._isCompound)this._parent[u]=Y1,this._children[u]={},this._children[Y1][u]=!0;return this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this}node(u){return this._nodes[u]}hasNode(u){return Object.hasOwn(this._nodes,u)}removeNode(u){var f=this;if(Object.hasOwn(this._nodes,u)){var $=(F)=>f.removeEdge(f._edgeObjs[F]);if(delete this._nodes[u],this._isCompound)this._removeFromParentsChildList(u),delete this._parent[u],this.children(u).forEach(function(F){f.setParent(F)}),delete this._children[u];Object.keys(this._in[u]).forEach($),delete this._in[u],delete this._preds[u],Object.keys(this._out[u]).forEach($),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this}setParent(u,f){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(f===void 0)f=Y1;else{f+="";for(var $=f;$!==void 0;$=this.parent($))if($===u)throw Error("Setting "+f+" as parent of "+u+" would create a cycle");this.setNode(f)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=f,this._children[f][u]=!0,this}_removeFromParentsChildList(u){delete this._children[this._parent[u]][u]}parent(u){if(this._isCompound){var f=this._parent[u];if(f!==Y1)return f}}children(u=Y1){if(this._isCompound){var f=this._children[u];if(f)return Object.keys(f)}else if(u===Y1)return this.nodes();else if(this.hasNode(u))return[]}predecessors(u){var f=this._preds[u];if(f)return Object.keys(f)}successors(u){var f=this._sucs[u];if(f)return Object.keys(f)}neighbors(u){var f=this.predecessors(u);if(f){let F=new Set(f);for(var $ of this.successors(u))F.add($);return Array.from(F.values())}}isLeaf(u){var f;if(this.isDirected())f=this.successors(u);else f=this.neighbors(u);return f.length===0}filterNodes(u){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var $=this;Object.entries(this._nodes).forEach(function([U,_]){if(u(U))f.setNode(U,_)}),Object.values(this._edgeObjs).forEach(function(U){if(f.hasNode(U.v)&&f.hasNode(U.w))f.setEdge(U,$.edge(U))});var F={};function l(U){var _=$.parent(U);if(_===void 0||f.hasNode(_))return F[U]=_,_;else if(_ in F)return F[_];else return l(_)}if(this._isCompound)f.nodes().forEach((U)=>f.setParent(U,l(U)));return f}setDefaultEdgeLabel(u){if(this._defaultEdgeLabelFn=u,typeof u!=="function")this._defaultEdgeLabelFn=()=>u;return this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(u,f){var $=this,F=arguments;return u.reduce(function(l,U){if(F.length>1)$.setEdge(l,U,f);else $.setEdge(l,U);return U}),this}setEdge(){var u,f,$,F,l=!1,U=arguments[0];if(typeof U==="object"&&U!==null&&"v"in U){if(u=U.v,f=U.w,$=U.name,arguments.length===2)F=arguments[1],l=!0}else if(u=U,f=arguments[1],$=arguments[3],arguments.length>2)F=arguments[2],l=!0;if(u=""+u,f=""+f,$!==void 0)$=""+$;var _=P3(this._isDirected,u,f,$);if(Object.hasOwn(this._edgeLabels,_)){if(l)this._edgeLabels[_]=F;return this}if($!==void 0&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(f),this._edgeLabels[_]=l?F:this._defaultEdgeLabelFn(u,f,$);var Q=jR(this._isDirected,u,f,$);return u=Q.v,f=Q.w,Object.freeze(Q),this._edgeObjs[_]=Q,Eq(this._preds[f],u),Eq(this._sucs[u],f),this._in[f][_]=Q,this._out[u][_]=Q,this._edgeCount++,this}edge(u,f,$){var F=arguments.length===1?n$(this._isDirected,arguments[0]):P3(this._isDirected,u,f,$);return this._edgeLabels[F]}edgeAsObj(){let u=this.edge(...arguments);if(typeof u!=="object")return{label:u};return u}hasEdge(u,f,$){var F=arguments.length===1?n$(this._isDirected,arguments[0]):P3(this._isDirected,u,f,$);return Object.hasOwn(this._edgeLabels,F)}removeEdge(u,f,$){var F=arguments.length===1?n$(this._isDirected,arguments[0]):P3(this._isDirected,u,f,$),l=this._edgeObjs[F];if(l)u=l.v,f=l.w,delete this._edgeLabels[F],delete this._edgeObjs[F],Vq(this._preds[f],u),Vq(this._sucs[u],f),delete this._in[f][F],delete this._out[u][F],this._edgeCount--;return this}inEdges(u,f){var $=this._in[u];if($){var F=Object.values($);if(!f)return F;return F.filter((l)=>l.v===f)}}outEdges(u,f){var $=this._out[u];if($){var F=Object.values($);if(!f)return F;return F.filter((l)=>l.w===f)}}nodeEdges(u,f){var $=this.inEdges(u,f);if($)return $.concat(this.outEdges(u,f))}}function Eq(u,f){if(u[f])u[f]++;else u[f]=1}function Vq(u,f){if(!--u[f])delete u[f]}function P3(u,f,$,F){var l=""+f,U=""+$;if(!u&&l>U){var _=l;l=U,U=_}return l+Mq+U+Mq+(F===void 0?SR:F)}function jR(u,f,$,F){var l=""+f,U=""+$;if(!u&&l>U){var _=l;l=U,U=_}var Q={v:l,w:U};if(F)Q.name=F;return Q}function n$(u,f){return P3(u,f.v,f.w,f.name)}Dq.exports=Xq});var Sq=o((ED,Oq)=>{Oq.exports="2.2.4"});var Nq=o((VD,jq)=>{jq.exports={Graph:u5(),version:Sq()}});var yq=o((XD,Iq)=>{var NR=u5();Iq.exports={write:IR,read:PR};function IR(u){var f={options:{directed:u.isDirected(),multigraph:u.isMultigraph(),compound:u.isCompound()},nodes:yR(u),edges:kR(u)};if(u.graph()!==void 0)f.value=structuredClone(u.graph());return f}function yR(u){return u.nodes().map(function(f){var $=u.node(f),F=u.parent(f),l={v:f};if($!==void 0)l.value=$;if(F!==void 0)l.parent=F;return l})}function kR(u){return u.edges().map(function(f){var $=u.edge(f),F={v:f.v,w:f.w};if(f.name!==void 0)F.name=f.name;if($!==void 0)F.value=$;return F})}function PR(u){var f=new NR(u.options).setGraph(u.value);return u.nodes.forEach(function($){if(f.setNode($.v,$.value),$.parent)f.setParent($.v,$.parent)}),u.edges.forEach(function($){f.setEdge({v:$.v,w:$.w,name:$.name},$.value)}),f}});var Pq=o((DD,kq)=>{kq.exports=rR;function rR(u){var f={},$=[],F;function l(U){if(Object.hasOwn(f,U))return;f[U]=!0,F.push(U),u.successors(U).forEach(l),u.predecessors(U).forEach(l)}return u.nodes().forEach(function(U){if(F=[],l(U),F.length)$.push(F)}),$}});var d$=o((OD,Cq)=>{class rq{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(u){return u.key})}has(u){return Object.hasOwn(this._keyIndices,u)}priority(u){var f=this._keyIndices[u];if(f!==void 0)return this._arr[f].priority}min(){if(this.size()===0)throw Error("Queue underflow");return this._arr[0].key}add(u,f){var $=this._keyIndices;if(u=String(u),!Object.hasOwn($,u)){var F=this._arr,l=F.length;return $[u]=l,F.push({key:u,priority:f}),this._decrease(l),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key}decrease(u,f){var $=this._keyIndices[u];if(f>this._arr[$].priority)throw Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[$].priority+" New: "+f);this._arr[$].priority=f,this._decrease($)}_heapify(u){var f=this._arr,$=2*u,F=$+1,l=u;if($<f.length){if(l=f[$].priority<f[l].priority?$:l,F<f.length)l=f[F].priority<f[l].priority?F:l;if(l!==u)this._swap(u,l),this._heapify(l)}}_decrease(u){var f=this._arr,$=f[u].priority,F;while(u!==0){if(F=u>>1,f[F].priority<$)break;this._swap(u,F),u=F}}_swap(u,f){var $=this._arr,F=this._keyIndices,l=$[u],U=$[f];$[u]=U,$[f]=l,F[U.key]=u,F[l.key]=f}}Cq.exports=rq});var a$=o((SD,hq)=>{var CR=d$();hq.exports=vR;var hR=()=>1;function vR(u,f,$,F){return xR(u,String(f),$||hR,F||function(l){return u.outEdges(l)})}function xR(u,f,$,F){var l={},U=new CR,_,Q,J=function(q){var T=q.v!==_?q.v:q.w,W=l[T],A=$(q),K=Q.distance+A;if(A<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+q+" Weight: "+A);if(K<W.distance)W.distance=K,W.predecessor=_,U.decrease(T,K)};u.nodes().forEach(function(q){var T=q===f?0:Number.POSITIVE_INFINITY;l[q]={distance:T},U.add(q,T)});while(U.size()>0){if(_=U.removeMin(),Q=l[_],Q.distance===Number.POSITIVE_INFINITY)break;F(_).forEach(J)}return l}});var xq=o((jD,vq)=>{var cR=a$();vq.exports=mR;function mR(u,f,$){return u.nodes().reduce(function(F,l){return F[l]=cR(u,l,f,$),F},{})}});var o$=o((ND,cq)=>{cq.exports=pR;function pR(u){var f=0,$=[],F={},l=[];function U(_){var Q=F[_]={onStack:!0,lowlink:f,index:f++};if($.push(_),u.successors(_).forEach(function(T){if(!Object.hasOwn(F,T))U(T),Q.lowlink=Math.min(Q.lowlink,F[T].lowlink);else if(F[T].onStack)Q.lowlink=Math.min(Q.lowlink,F[T].index)}),Q.lowlink===Q.index){var J=[],q;do q=$.pop(),F[q].onStack=!1,J.push(q);while(_!==q);l.push(J)}}return u.nodes().forEach(function(_){if(!Object.hasOwn(F,_))U(_)}),l}});var pq=o((ID,mq)=>{var bR=o$();mq.exports=iR;function iR(u){return bR(u).filter(function(f){return f.length>1||f.length===1&&u.hasEdge(f[0],f[0])})}});var iq=o((yD,bq)=>{bq.exports=sR;var gR=()=>1;function sR(u,f,$){return tR(u,f||gR,$||function(F){return u.outEdges(F)})}function tR(u,f,$){var F={},l=u.nodes();return l.forEach(function(U){F[U]={},F[U][U]={distance:0},l.forEach(function(_){if(U!==_)F[U][_]={distance:Number.POSITIVE_INFINITY}}),$(U).forEach(function(_){var Q=_.v===U?_.w:_.v,J=f(_);F[U][Q]={distance:J,predecessor:U}})}),l.forEach(function(U){var _=F[U];l.forEach(function(Q){var J=F[Q];l.forEach(function(q){var T=J[U],W=_[q],A=J[q],K=T.distance+W.distance;if(K<A.distance)A.distance=K,A.predecessor=W.predecessor})})}),F}});var e$=o((kD,sq)=>{function gq(u){var f={},$={},F=[];function l(U){if(Object.hasOwn($,U))throw new f5;if(!Object.hasOwn(f,U))$[U]=!0,f[U]=!0,u.predecessors(U).forEach(l),delete $[U],F.push(U)}if(u.sinks().forEach(l),Object.keys(f).length!==u.nodeCount())throw new f5;return F}class f5 extends Error{constructor(){super(...arguments)}}sq.exports=gq;gq.CycleException=f5});var dq=o((PD,nq)=>{var tq=e$();nq.exports=nR;function nR(u){try{tq(u)}catch(f){if(f instanceof tq.CycleException)return!1;throw f}return!0}});var uF=o((rD,oq)=>{oq.exports=dR;function dR(u,f,$){if(!Array.isArray(f))f=[f];var F=u.isDirected()?(Q)=>u.successors(Q):(Q)=>u.neighbors(Q),l=$==="post"?aR:oR,U=[],_={};return f.forEach((Q)=>{if(!u.hasNode(Q))throw Error("Graph does not have node: "+Q);l(Q,F,_,U)}),U}function aR(u,f,$,F){var l=[[u,!1]];while(l.length>0){var U=l.pop();if(U[1])F.push(U[0]);else if(!Object.hasOwn($,U[0]))$[U[0]]=!0,l.push([U[0],!0]),aq(f(U[0]),(_)=>l.push([_,!1]))}}function oR(u,f,$,F){var l=[u];while(l.length>0){var U=l.pop();if(!Object.hasOwn($,U))$[U]=!0,F.push(U),aq(f(U),(_)=>l.push(_))}}function aq(u,f){var $=u.length;while($--)f(u[$],$,u);return u}});var uT=o((CD,eq)=>{var eR=uF();eq.exports=uM;function uM(u,f){return eR(u,f,"post")}});var $T=o((hD,fT)=>{var fM=uF();fT.exports=$M;function $M(u,f){return fM(u,f,"pre")}});var lT=o((vD,FT)=>{var FM=u5(),lM=d$();FT.exports=UM;function UM(u,f){var $=new FM,F={},l=new lM,U;function _(J){var q=J.v===U?J.w:J.v,T=l.priority(q);if(T!==void 0){var W=f(J);if(W<T)F[q]=U,l.decrease(q,W)}}if(u.nodeCount()===0)return $;u.nodes().forEach(function(J){l.add(J,Number.POSITIVE_INFINITY),$.setNode(J)}),l.decrease(u.nodes()[0],0);var Q=!1;while(l.size()>0){if(U=l.removeMin(),Object.hasOwn(F,U))$.setEdge(U,F[U]);else if(Q)throw Error("Input graph is not connected: "+u);else Q=!0;u.nodeEdges(U).forEach(_)}return $}});var _T=o((xD,UT)=>{UT.exports={components:Pq(),dijkstra:a$(),dijkstraAll:xq(),findCycles:pq(),floydWarshall:iq(),isAcyclic:dq(),postorder:uT(),preorder:$T(),prim:lT(),tarjan:o$(),topsort:e$()}});var Lf=o((cD,JT)=>{var QT=Nq();JT.exports={Graph:QT.Graph,json:yq(),alg:_T(),version:QT.version}});var WT=o((mD,AT)=>{class TT{constructor(){let u={};u._next=u._prev=u,this._sentinel=u}dequeue(){let u=this._sentinel,f=u._prev;if(f!==u)return qT(f),f}enqueue(u){let f=this._sentinel;if(u._prev&&u._next)qT(u);u._next=f._next,f._next._prev=u,f._next=u,u._prev=f}toString(){let u=[],f=this._sentinel,$=f._prev;while($!==f)u.push(JSON.stringify($,_M)),$=$._prev;return"["+u.join(", ")+"]"}}function qT(u){u._prev._next=u._next,u._next._prev=u._prev,delete u._next,delete u._prev}function _M(u,f){if(u!=="_next"&&u!=="_prev")return f}AT.exports=TT});var wT=o((pD,KT)=>{var QM=Lf().Graph,JM=WT();KT.exports=TM;var qM=()=>1;function TM(u,f){if(u.nodeCount()<=1)return[];let $=WM(u,f||qM);return AM($.graph,$.buckets,$.zeroIdx).flatMap((l)=>u.outEdges(l.v,l.w))}function AM(u,f,$){let F=[],l=f[f.length-1],U=f[0],_;while(u.nodeCount()){while(_=U.dequeue())fF(u,f,$,_);while(_=l.dequeue())fF(u,f,$,_);if(u.nodeCount()){for(let Q=f.length-2;Q>0;--Q)if(_=f[Q].dequeue(),_){F=F.concat(fF(u,f,$,_,!0));break}}}return F}function fF(u,f,$,F,l){let U=l?[]:void 0;return u.inEdges(F.v).forEach((_)=>{let Q=u.edge(_),J=u.node(_.v);if(l)U.push({v:_.v,w:_.w});J.out-=Q,$F(f,$,J)}),u.outEdges(F.v).forEach((_)=>{let Q=u.edge(_),J=_.w,q=u.node(J);q.in-=Q,$F(f,$,q)}),u.removeNode(F.v),U}function WM(u,f){let $=new QM,F=0,l=0;u.nodes().forEach((Q)=>{$.setNode(Q,{v:Q,in:0,out:0})}),u.edges().forEach((Q)=>{let J=$.edge(Q.v,Q.w)||0,q=f(Q),T=J+q;$.setEdge(Q.v,Q.w,T),l=Math.max(l,$.node(Q.v).out+=q),F=Math.max(F,$.node(Q.w).in+=q)});let U=KM(l+F+3).map(()=>new JM),_=F+1;return $.nodes().forEach((Q)=>{$F(U,_,$.node(Q))}),{graph:$,buckets:U,zeroIdx:_}}function $F(u,f,$){if(!$.out)u[0].enqueue($);else if(!$.in)u[u.length-1].enqueue($);else u[$.out-$.in+f].enqueue($)}function KM(u){let f=[];for(let $=0;$<u;$++)f.push($);return f}});var Eu=o((bD,YT)=>{var BT=Lf().Graph;YT.exports={addBorderNode:RM,addDummyNode:LT,applyWithChunking:$5,asNonCompoundGraph:BM,buildLayerMatrix:zM,intersectRect:HM,mapValues:SM,maxRank:HT,normalizeRanks:ZM,notime:XM,partition:EM,pick:OM,predecessorWeights:GM,range:ZT,removeEmptyRanks:YM,simplify:wM,successorWeights:LM,time:VM,uniqueId:zT,zipObject:FF};function LT(u,f,$,F){var l=F;while(u.hasNode(l))l=zT(F);return $.dummy=f,u.setNode(l,$),l}function wM(u){let f=new BT().setGraph(u.graph());return u.nodes().forEach(($)=>f.setNode($,u.node($))),u.edges().forEach(($)=>{let F=f.edge($.v,$.w)||{weight:0,minlen:1},l=u.edge($);f.setEdge($.v,$.w,{weight:F.weight+l.weight,minlen:Math.max(F.minlen,l.minlen)})}),f}function BM(u){let f=new BT({multigraph:u.isMultigraph()}).setGraph(u.graph());return u.nodes().forEach(($)=>{if(!u.children($).length)f.setNode($,u.node($))}),u.edges().forEach(($)=>{f.setEdge($,u.edge($))}),f}function LM(u){let f=u.nodes().map(($)=>{let F={};return u.outEdges($).forEach((l)=>{F[l.w]=(F[l.w]||0)+u.edge(l).weight}),F});return FF(u.nodes(),f)}function GM(u){let f=u.nodes().map(($)=>{let F={};return u.inEdges($).forEach((l)=>{F[l.v]=(F[l.v]||0)+u.edge(l).weight}),F});return FF(u.nodes(),f)}function HM(u,f){let{x:$,y:F}=u,l=f.x-$,U=f.y-F,_=u.width/2,Q=u.height/2;if(!l&&!U)throw Error("Not possible to find intersection inside of the rectangle");let J,q;if(Math.abs(U)*_>Math.abs(l)*Q){if(U<0)Q=-Q;J=Q*l/U,q=Q}else{if(l<0)_=-_;J=_,q=_*U/l}return{x:$+J,y:F+q}}function zM(u){let f=ZT(HT(u)+1).map(()=>[]);return u.nodes().forEach(($)=>{let F=u.node($),l=F.rank;if(l!==void 0)f[l][F.order]=$}),f}function ZM(u){let f=u.nodes().map((F)=>{let l=u.node(F).rank;if(l===void 0)return Number.MAX_VALUE;return l}),$=$5(Math.min,f);u.nodes().forEach((F)=>{let l=u.node(F);if(Object.hasOwn(l,"rank"))l.rank-=$})}function YM(u){let f=u.nodes().map((_)=>u.node(_).rank),$=$5(Math.min,f),F=[];u.nodes().forEach((_)=>{let Q=u.node(_).rank-$;if(!F[Q])F[Q]=[];F[Q].push(_)});let l=0,U=u.graph().nodeRankFactor;Array.from(F).forEach((_,Q)=>{if(_===void 0&&Q%U!==0)--l;else if(_!==void 0&&l)_.forEach((J)=>u.node(J).rank+=l)})}function RM(u,f,$,F){let l={width:0,height:0};if(arguments.length>=4)l.rank=$,l.order=F;return LT(u,"border",l,f)}function MM(u,f=GT){let $=[];for(let F=0;F<u.length;F+=f){let l=u.slice(F,F+f);$.push(l)}return $}var GT=65535;function $5(u,f){if(f.length>GT){let $=MM(f);return u.apply(null,$.map((F)=>u.apply(null,F)))}else return u.apply(null,f)}function HT(u){let $=u.nodes().map((F)=>{let l=u.node(F).rank;if(l===void 0)return Number.MIN_VALUE;return l});return $5(Math.max,$)}function EM(u,f){let $={lhs:[],rhs:[]};return u.forEach((F)=>{if(f(F))$.lhs.push(F);else $.rhs.push(F)}),$}function VM(u,f){let $=Date.now();try{return f()}finally{console.log(u+" time: "+(Date.now()-$)+"ms")}}function XM(u,f){return f()}var DM=0;function zT(u){var f=++DM;return u+(""+f)}function ZT(u,f,$=1){if(f==null)f=u,u=0;let F=(U)=>U<f;if($<0)F=(U)=>f<U;let l=[];for(let U=u;F(U);U+=$)l.push(U);return l}function OM(u,f){let $={};for(let F of f)if(u[F]!==void 0)$[F]=u[F];return $}function SM(u,f){let $=f;if(typeof f==="string")$=(F)=>F[f];return Object.entries(u).reduce((F,[l,U])=>{return F[l]=$(U,l),F},{})}function FF(u,f){return u.reduce(($,F,l)=>{return $[F]=f[l],$},{})}});var MT=o((iD,RT)=>{var jM=wT(),NM=Eu().uniqueId;RT.exports={run:IM,undo:kM};function IM(u){(u.graph().acyclicer==="greedy"?jM(u,$(u)):yM(u)).forEach((F)=>{let l=u.edge(F);u.removeEdge(F),l.forwardName=F.name,l.reversed=!0,u.setEdge(F.w,F.v,l,NM("rev"))});function $(F){return(l)=>{return F.edge(l).weight}}}function yM(u){let f=[],$={},F={};function l(U){if(Object.hasOwn(F,U))return;F[U]=!0,$[U]=!0,u.outEdges(U).forEach((_)=>{if(Object.hasOwn($,_.w))f.push(_);else l(_.w)}),delete $[U]}return u.nodes().forEach(l),f}function kM(u){u.edges().forEach((f)=>{let $=u.edge(f);if($.reversed){u.removeEdge(f);let F=$.forwardName;delete $.reversed,delete $.forwardName,u.setEdge(f.w,f.v,$,F)}})}});var VT=o((gD,ET)=>{var PM=Eu();ET.exports={run:rM,undo:hM};function rM(u){u.graph().dummyChains=[],u.edges().forEach((f)=>CM(u,f))}function CM(u,f){let $=f.v,F=u.node($).rank,l=f.w,U=u.node(l).rank,_=f.name,Q=u.edge(f),J=Q.labelRank;if(U===F+1)return;u.removeEdge(f);let q,T,W;for(W=0,++F;F<U;++W,++F){if(Q.points=[],T={width:0,height:0,edgeLabel:Q,edgeObj:f,rank:F},q=PM.addDummyNode(u,"edge",T,"_d"),F===J)T.width=Q.width,T.height=Q.height,T.dummy="edge-label",T.labelpos=Q.labelpos;if(u.setEdge($,q,{weight:Q.weight},_),W===0)u.graph().dummyChains.push(q);$=q}u.setEdge($,l,{weight:Q.weight},_)}function hM(u){u.graph().dummyChains.forEach((f)=>{let $=u.node(f),F=$.edgeLabel,l;u.setEdge($.edgeObj,F);while($.dummy){if(l=u.successors(f)[0],u.removeNode(f),F.points.push({x:$.x,y:$.y}),$.dummy==="edge-label")F.x=$.x,F.y=$.y,F.width=$.width,F.height=$.height;f=l,$=u.node(f)}})}});var r3=o((sD,XT)=>{var{applyWithChunking:vM}=Eu();XT.exports={longestPath:xM,slack:cM};function xM(u){var f={};function $(F){var l=u.node(F);if(Object.hasOwn(f,F))return l.rank;f[F]=!0;let U=u.outEdges(F).map((Q)=>{if(Q==null)return Number.POSITIVE_INFINITY;return $(Q.w)-u.edge(Q).minlen});var _=vM(Math.min,U);if(_===Number.POSITIVE_INFINITY)_=0;return l.rank=_}u.sources().forEach($)}function cM(u,f){return u.node(f.w).rank-u.node(f.v).rank-u.edge(f).minlen}});var lF=o((tD,DT)=>{var mM=Lf().Graph,F5=r3().slack;DT.exports=pM;function pM(u){var f=new mM({directed:!1}),$=u.nodes()[0],F=u.nodeCount();f.setNode($,{});var l,U;while(bM(f,u)<F)l=iM(f,u),U=f.hasNode(l.v)?F5(u,l):-F5(u,l),gM(f,u,U);return f}function bM(u,f){function $(F){f.nodeEdges(F).forEach((l)=>{var U=l.v,_=F===U?l.w:U;if(!u.hasNode(_)&&!F5(f,l))u.setNode(_,{}),u.setEdge(F,_,{}),$(_)})}return u.nodes().forEach($),u.nodeCount()}function iM(u,f){return f.edges().reduce((F,l)=>{let U=Number.POSITIVE_INFINITY;if(u.hasNode(l.v)!==u.hasNode(l.w))U=F5(f,l);if(U<F[0])return[U,l];return F},[Number.POSITIVE_INFINITY,null])[1]}function gM(u,f,$){u.nodes().forEach((F)=>f.node(F).rank+=$)}});var rT=o((nD,PT)=>{var sM=lF(),OT=r3().slack,tM=r3().longestPath,nM=Lf().alg.preorder,dM=Lf().alg.postorder,aM=Eu().simplify;PT.exports=R1;R1.initLowLimValues=_F;R1.initCutValues=UF;R1.calcCutValue=jT;R1.leaveEdge=IT;R1.enterEdge=yT;R1.exchangeEdges=kT;function R1(u){u=aM(u),tM(u);var f=sM(u);_F(f),UF(f,u);var $,F;while($=IT(f))F=yT(f,u,$),kT(f,u,$,F)}function UF(u,f){var $=dM(u,u.nodes());$=$.slice(0,$.length-1),$.forEach((F)=>oM(u,f,F))}function oM(u,f,$){var F=u.node($),l=F.parent;u.edge($,l).cutvalue=jT(u,f,$)}function jT(u,f,$){var F=u.node($),l=F.parent,U=!0,_=f.edge($,l),Q=0;if(!_)U=!1,_=f.edge(l,$);return Q=_.weight,f.nodeEdges($).forEach((J)=>{var q=J.v===$,T=q?J.w:J.v;if(T!==l){var W=q===U,A=f.edge(J).weight;if(Q+=W?A:-A,uE(u,$,T)){var K=u.edge($,T).cutvalue;Q+=W?-K:K}}}),Q}function _F(u,f){if(arguments.length<2)f=u.nodes()[0];NT(u,{},1,f)}function NT(u,f,$,F,l){var U=$,_=u.node(F);if(f[F]=!0,u.neighbors(F).forEach((Q)=>{if(!Object.hasOwn(f,Q))$=NT(u,f,$,Q,F)}),_.low=U,_.lim=$++,l)_.parent=l;else delete _.parent;return $}function IT(u){return u.edges().find((f)=>u.edge(f).cutvalue<0)}function yT(u,f,$){var{v:F,w:l}=$;if(!f.hasEdge(F,l))F=$.w,l=$.v;var U=u.node(F),_=u.node(l),Q=U,J=!1;if(U.lim>_.lim)Q=_,J=!0;var q=f.edges().filter((T)=>{return J===ST(u,u.node(T.v),Q)&&J!==ST(u,u.node(T.w),Q)});return q.reduce((T,W)=>{if(OT(f,W)<OT(f,T))return W;return T})}function kT(u,f,$,F){var{v:l,w:U}=$;u.removeEdge(l,U),u.setEdge(F.v,F.w,{}),_F(u),UF(u,f),eM(u,f)}function eM(u,f){var $=u.nodes().find((l)=>!f.node(l).parent),F=nM(u,$);F=F.slice(1),F.forEach((l)=>{var U=u.node(l).parent,_=f.edge(l,U),Q=!1;if(!_)_=f.edge(U,l),Q=!0;f.node(l).rank=f.node(U).rank+(Q?_.minlen:-_.minlen)})}function uE(u,f,$){return u.hasEdge(f,$)}function ST(u,f,$){return $.low<=f.lim&&f.lim<=$.lim}});var xT=o((dD,vT)=>{var fE=r3(),hT=fE.longestPath,$E=lF(),FE=rT();vT.exports=lE;function lE(u){var f=u.graph().ranker;if(f instanceof Function)return f(u);switch(u.graph().ranker){case"network-simplex":CT(u);break;case"tight-tree":_E(u);break;case"longest-path":UE(u);break;case"none":break;default:CT(u)}}var UE=hT;function _E(u){hT(u),$E(u)}function CT(u){FE(u)}});var mT=o((aD,cT)=>{cT.exports=QE;function QE(u){let f=qE(u);u.graph().dummyChains.forEach(($)=>{let F=u.node($),l=F.edgeObj,U=JE(u,f,l.v,l.w),_=U.path,Q=U.lca,J=0,q=_[J],T=!0;while($!==l.w){if(F=u.node($),T){while((q=_[J])!==Q&&u.node(q).maxRank<F.rank)J++;if(q===Q)T=!1}if(!T){while(J<_.length-1&&u.node(q=_[J+1]).minRank<=F.rank)J++;q=_[J]}u.setParent($,q),$=u.successors($)[0]}})}function JE(u,f,$,F){let l=[],U=[],_=Math.min(f[$].low,f[F].low),Q=Math.max(f[$].lim,f[F].lim),J,q;J=$;do J=u.parent(J),l.push(J);while(J&&(f[J].low>_||Q>f[J].lim));q=J,J=F;while((J=u.parent(J))!==q)U.push(J);return{path:l.concat(U.reverse()),lca:q}}function qE(u){let f={},$=0;function F(l){let U=$;u.children(l).forEach(F),f[l]={low:U,lim:$++}}return u.children().forEach(F),f}});var iT=o((oD,bT)=>{var l5=Eu();bT.exports={run:TE,cleanup:KE};function TE(u){let f=l5.addDummyNode(u,"root",{},"_root"),$=AE(u),F=Object.values($),l=l5.applyWithChunking(Math.max,F)-1,U=2*l+1;u.graph().nestingRoot=f,u.edges().forEach((Q)=>u.edge(Q).minlen*=U);let _=WE(u)+1;u.children().forEach((Q)=>pT(u,f,U,_,l,$,Q)),u.graph().nodeRankFactor=U}function pT(u,f,$,F,l,U,_){let Q=u.children(_);if(!Q.length){if(_!==f)u.setEdge(f,_,{weight:0,minlen:$});return}let J=l5.addBorderNode(u,"_bt"),q=l5.addBorderNode(u,"_bb"),T=u.node(_);if(u.setParent(J,_),T.borderTop=J,u.setParent(q,_),T.borderBottom=q,Q.forEach((W)=>{pT(u,f,$,F,l,U,W);let A=u.node(W),K=A.borderTop?A.borderTop:W,L=A.borderBottom?A.borderBottom:W,z=A.borderTop?F:2*F,Z=K!==L?1:l-U[_]+1;u.setEdge(J,K,{weight:z,minlen:Z,nestingEdge:!0}),u.setEdge(L,q,{weight:z,minlen:Z,nestingEdge:!0})}),!u.parent(_))u.setEdge(f,J,{weight:0,minlen:l+U[_]})}function AE(u){var f={};function $(F,l){var U=u.children(F);if(U&&U.length)U.forEach((_)=>$(_,l+1));f[F]=l}return u.children().forEach((F)=>$(F,1)),f}function WE(u){return u.edges().reduce((f,$)=>f+u.edge($).weight,0)}function KE(u){var f=u.graph();u.removeNode(f.nestingRoot),delete f.nestingRoot,u.edges().forEach(($)=>{var F=u.edge($);if(F.nestingEdge)u.removeEdge($)})}});var tT=o((eD,sT)=>{var wE=Eu();sT.exports=BE;function BE(u){function f($){let F=u.children($),l=u.node($);if(F.length)F.forEach(f);if(Object.hasOwn(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(let U=l.minRank,_=l.maxRank+1;U<_;++U)gT(u,"borderLeft","_bl",$,l,U),gT(u,"borderRight","_br",$,l,U)}}u.children().forEach(f)}function gT(u,f,$,F,l,U){let _={width:0,height:0,rank:U,borderType:f},Q=l[f][U-1],J=wE.addDummyNode(u,"border",_,$);if(l[f][U]=J,u.setParent(J,F),Q)u.setEdge(Q,J,{weight:1})}});var oT=o((uO,aT)=>{aT.exports={adjust:LE,undo:GE};function LE(u){let f=u.graph().rankdir.toLowerCase();if(f==="lr"||f==="rl")dT(u)}function GE(u){let f=u.graph().rankdir.toLowerCase();if(f==="bt"||f==="rl")HE(u);if(f==="lr"||f==="rl")zE(u),dT(u)}function dT(u){u.nodes().forEach((f)=>nT(u.node(f))),u.edges().forEach((f)=>nT(u.edge(f)))}function nT(u){let f=u.width;u.width=u.height,u.height=f}function HE(u){u.nodes().forEach((f)=>QF(u.node(f))),u.edges().forEach((f)=>{let $=u.edge(f);if($.points.forEach(QF),Object.hasOwn($,"y"))QF($)})}function QF(u){u.y=-u.y}function zE(u){u.nodes().forEach((f)=>JF(u.node(f))),u.edges().forEach((f)=>{let $=u.edge(f);if($.points.forEach(JF),Object.hasOwn($,"x"))JF($)})}function JF(u){let f=u.x;u.x=u.y,u.y=f}});var fA=o((fO,uA)=>{var eT=Eu();uA.exports=ZE;function ZE(u){let f={},$=u.nodes().filter((J)=>!u.children(J).length),F=$.map((J)=>u.node(J).rank),l=eT.applyWithChunking(Math.max,F),U=eT.range(l+1).map(()=>[]);function _(J){if(f[J])return;f[J]=!0;let q=u.node(J);U[q.rank].push(J),u.successors(J).forEach(_)}return $.sort((J,q)=>u.node(J).rank-u.node(q).rank).forEach(_),U}});var FA=o(($O,$A)=>{var YE=Eu().zipObject;$A.exports=RE;function RE(u,f){let $=0;for(let F=1;F<f.length;++F)$+=ME(u,f[F-1],f[F]);return $}function ME(u,f,$){let F=YE($,$.map((q,T)=>T)),l=f.flatMap((q)=>{return u.outEdges(q).map((T)=>{return{pos:F[T.w],weight:u.edge(T).weight}}).sort((T,W)=>T.pos-W.pos)}),U=1;while(U<$.length)U<<=1;let _=2*U-1;U-=1;let Q=Array(_).fill(0),J=0;return l.forEach((q)=>{let T=q.pos+U;Q[T]+=q.weight;let W=0;while(T>0){if(T%2)W+=Q[T+1];T=T-1>>1,Q[T]+=q.weight}J+=q.weight*W}),J}});var UA=o((FO,lA)=>{lA.exports=EE;function EE(u,f=[]){return f.map(($)=>{let F=u.inEdges($);if(!F.length)return{v:$};else{let l=F.reduce((U,_)=>{let Q=u.edge(_),J=u.node(_.v);return{sum:U.sum+Q.weight*J.order,weight:U.weight+Q.weight}},{sum:0,weight:0});return{v:$,barycenter:l.sum/l.weight,weight:l.weight}}})}});var QA=o((lO,_A)=>{var VE=Eu();_A.exports=XE;function XE(u,f){let $={};u.forEach((l,U)=>{let _=$[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:U};if(l.barycenter!==void 0)_.barycenter=l.barycenter,_.weight=l.weight}),f.edges().forEach((l)=>{let U=$[l.v],_=$[l.w];if(U!==void 0&&_!==void 0)_.indegree++,U.out.push($[l.w])});let F=Object.values($).filter((l)=>!l.indegree);return DE(F)}function DE(u){let f=[];function $(l){return(U)=>{if(U.merged)return;if(U.barycenter===void 0||l.barycenter===void 0||U.barycenter>=l.barycenter)OE(l,U)}}function F(l){return(U)=>{if(U.in.push(l),--U.indegree===0)u.push(U)}}while(u.length){let l=u.pop();f.push(l),l.in.reverse().forEach($(l)),l.out.forEach(F(l))}return f.filter((l)=>!l.merged).map((l)=>{return VE.pick(l,["vs","i","barycenter","weight"])})}function OE(u,f){let $=0,F=0;if(u.weight)$+=u.barycenter*u.weight,F+=u.weight;if(f.weight)$+=f.barycenter*f.weight,F+=f.weight;u.vs=f.vs.concat(u.vs),u.barycenter=$/F,u.weight=F,u.i=Math.min(f.i,u.i),f.merged=!0}});var TA=o((UO,qA)=>{var SE=Eu();qA.exports=jE;function jE(u,f){let $=SE.partition(u,(T)=>{return Object.hasOwn(T,"barycenter")}),F=$.lhs,l=$.rhs.sort((T,W)=>W.i-T.i),U=[],_=0,Q=0,J=0;F.sort(NE(!!f)),J=JA(U,l,J),F.forEach((T)=>{J+=T.vs.length,U.push(T.vs),_+=T.barycenter*T.weight,Q+=T.weight,J=JA(U,l,J)});let q={vs:U.flat(!0)};if(Q)q.barycenter=_/Q,q.weight=Q;return q}function JA(u,f,$){let F;while(f.length&&(F=f[f.length-1]).i<=$)f.pop(),u.push(F.vs),$++;return $}function NE(u){return(f,$)=>{if(f.barycenter<$.barycenter)return-1;else if(f.barycenter>$.barycenter)return 1;return!u?f.i-$.i:$.i-f.i}}});var KA=o((_O,WA)=>{var IE=UA(),yE=QA(),kE=TA();WA.exports=AA;function AA(u,f,$,F){let l=u.children(f),U=u.node(f),_=U?U.borderLeft:void 0,Q=U?U.borderRight:void 0,J={};if(_)l=l.filter((A)=>A!==_&&A!==Q);let q=IE(u,l);q.forEach((A)=>{if(u.children(A.v).length){let K=AA(u,A.v,$,F);if(J[A.v]=K,Object.hasOwn(K,"barycenter"))rE(A,K)}});let T=yE(q,$);PE(T,J);let W=kE(T,F);if(_){if(W.vs=[_,W.vs,Q].flat(!0),u.predecessors(_).length){let A=u.node(u.predecessors(_)[0]),K=u.node(u.predecessors(Q)[0]);if(!Object.hasOwn(W,"barycenter"))W.barycenter=0,W.weight=0;W.barycenter=(W.barycenter*W.weight+A.order+K.order)/(W.weight+2),W.weight+=2}}return W}function PE(u,f){u.forEach(($)=>{$.vs=$.vs.flatMap((F)=>{if(f[F])return f[F].vs;return F})})}function rE(u,f){if(u.barycenter!==void 0)u.barycenter=(u.barycenter*u.weight+f.barycenter*f.weight)/(u.weight+f.weight),u.weight+=f.weight;else u.barycenter=f.barycenter,u.weight=f.weight}});var BA=o((QO,wA)=>{var CE=Lf().Graph,hE=Eu();wA.exports=vE;function vE(u,f,$,F){if(!F)F=u.nodes();let l=xE(u),U=new CE({compound:!0}).setGraph({root:l}).setDefaultNodeLabel((_)=>u.node(_));return F.forEach((_)=>{let Q=u.node(_),J=u.parent(_);if(Q.rank===f||Q.minRank<=f&&f<=Q.maxRank){if(U.setNode(_),U.setParent(_,J||l),u[$](_).forEach((q)=>{let T=q.v===_?q.w:q.v,W=U.edge(T,_),A=W!==void 0?W.weight:0;U.setEdge(T,_,{weight:u.edge(q).weight+A})}),Object.hasOwn(Q,"minRank"))U.setNode(_,{borderLeft:Q.borderLeft[f],borderRight:Q.borderRight[f]})}}),U}function xE(u){var f;while(u.hasNode(f=hE.uniqueId("_root")));return f}});var GA=o((JO,LA)=>{LA.exports=cE;function cE(u,f,$){let F={},l;$.forEach((U)=>{let _=u.parent(U),Q,J;while(_){if(Q=u.parent(_),Q)J=F[Q],F[Q]=_;else J=l,l=_;if(J&&J!==_){f.setEdge(J,_);return}_=Q}})}});var RA=o((qO,YA)=>{var mE=fA(),pE=FA(),bE=KA(),iE=BA(),gE=GA(),sE=Lf().Graph,U5=Eu();YA.exports=ZA;function ZA(u,f){if(f&&typeof f.customOrder==="function"){f.customOrder(u,ZA);return}let $=U5.maxRank(u),F=HA(u,U5.range(1,$+1),"inEdges"),l=HA(u,U5.range($-1,-1,-1),"outEdges"),U=mE(u);if(zA(u,U),f&&f.disableOptimalOrderHeuristic)return;let _=Number.POSITIVE_INFINITY,Q;for(let J=0,q=0;q<4;++J,++q){tE(J%2?F:l,J%4>=2),U=U5.buildLayerMatrix(u);let T=pE(u,U);if(T<_)q=0,Q=Object.assign({},U),_=T}zA(u,Q)}function HA(u,f,$){let F=new Map,l=(U,_)=>{if(!F.has(U))F.set(U,[]);F.get(U).push(_)};for(let U of u.nodes()){let _=u.node(U);if(typeof _.rank==="number")l(_.rank,U);if(typeof _.minRank==="number"&&typeof _.maxRank==="number"){for(let Q=_.minRank;Q<=_.maxRank;Q++)if(Q!==_.rank)l(Q,U)}}return f.map(function(U){return iE(u,U,$,F.get(U)||[])})}function tE(u,f){let $=new sE;u.forEach(function(F){let l=F.graph().root,U=bE(F,l,$,f);U.vs.forEach((_,Q)=>F.node(_).order=Q),gE(F,$,U.vs)})}function zA(u,f){Object.values(f).forEach(($)=>$.forEach((F,l)=>u.node(F).order=l))}});var IA=o((TO,NA)=>{var nE=Lf().Graph,A0=Eu();NA.exports={positionX:oE,findType1Conflicts:MA,findType2Conflicts:EA,addConflict:qF,hasConflict:VA,verticalAlignment:XA,horizontalCompaction:DA,alignCoordinates:SA,findSmallestWidthAlignment:OA,balance:jA};function MA(u,f){let $={};function F(l,U){let _=0,Q=0,J=l.length,q=U[U.length-1];return U.forEach((T,W)=>{let A=dE(u,T),K=A?u.node(A).order:J;if(A||T===q)U.slice(Q,W+1).forEach((L)=>{u.predecessors(L).forEach((z)=>{let Z=u.node(z),B=Z.order;if((B<_||K<B)&&!(Z.dummy&&u.node(L).dummy))qF($,z,L)})}),Q=W+1,_=K}),U}return f.length&&f.reduce(F),$}function EA(u,f){let $={};function F(U,_,Q,J,q){let T;A0.range(_,Q).forEach((W)=>{if(T=U[W],u.node(T).dummy)u.predecessors(T).forEach((A)=>{let K=u.node(A);if(K.dummy&&(K.order<J||K.order>q))qF($,A,T)})})}function l(U,_){let Q=-1,J,q=0;return _.forEach((T,W)=>{if(u.node(T).dummy==="border"){let A=u.predecessors(T);if(A.length)J=u.node(A[0]).order,F(_,q,W,Q,J),q=W,Q=J}F(_,q,_.length,J,U.length)}),_}return f.length&&f.reduce(l),$}function dE(u,f){if(u.node(f).dummy)return u.predecessors(f).find(($)=>u.node($).dummy)}function qF(u,f,$){if(f>$){let l=f;f=$,$=l}let F=u[f];if(!F)u[f]=F={};F[$]=!0}function VA(u,f,$){if(f>$){let F=f;f=$,$=F}return!!u[f]&&Object.hasOwn(u[f],$)}function XA(u,f,$,F){let l={},U={},_={};return f.forEach((Q)=>{Q.forEach((J,q)=>{l[J]=J,U[J]=J,_[J]=q})}),f.forEach((Q)=>{let J=-1;Q.forEach((q)=>{let T=F(q);if(T.length){T=T.sort((A,K)=>_[A]-_[K]);let W=(T.length-1)/2;for(let A=Math.floor(W),K=Math.ceil(W);A<=K;++A){let L=T[A];if(U[q]===q&&J<_[L]&&!VA($,q,L))U[L]=q,U[q]=l[q]=l[L],J=_[L]}}})}),{root:l,align:U}}function DA(u,f,$,F,l){let U={},_=aE(u,f,$,l),Q=l?"borderLeft":"borderRight";function J(W,A){let K=_.nodes(),L=K.pop(),z={};while(L){if(z[L])W(L);else z[L]=!0,K.push(L),K=K.concat(A(L));L=K.pop()}}function q(W){U[W]=_.inEdges(W).reduce((A,K)=>{return Math.max(A,U[K.v]+_.edge(K))},0)}function T(W){let A=_.outEdges(W).reduce((L,z)=>{return Math.min(L,U[z.w]-_.edge(z))},Number.POSITIVE_INFINITY),K=u.node(W);if(A!==Number.POSITIVE_INFINITY&&K.borderType!==Q)U[W]=Math.max(U[W],A)}return J(q,_.predecessors.bind(_)),J(T,_.successors.bind(_)),Object.keys(F).forEach((W)=>U[W]=U[$[W]]),U}function aE(u,f,$,F){let l=new nE,U=u.graph(),_=eE(U.nodesep,U.edgesep,F);return f.forEach((Q)=>{let J;Q.forEach((q)=>{let T=$[q];if(l.setNode(T),J){var W=$[J],A=l.edge(W,T);l.setEdge(W,T,Math.max(_(u,q,J),A||0))}J=q})}),l}function OA(u,f){return Object.values(f).reduce(($,F)=>{let{NEGATIVE_INFINITY:l,POSITIVE_INFINITY:U}=Number;Object.entries(F).forEach(([Q,J])=>{let q=uV(u,Q)/2;l=Math.max(J+q,l),U=Math.min(J-q,U)});let _=l-U;if(_<$[0])$=[_,F];return $},[Number.POSITIVE_INFINITY,null])[1]}function SA(u,f){let $=Object.values(f),F=A0.applyWithChunking(Math.min,$),l=A0.applyWithChunking(Math.max,$);["u","d"].forEach((U)=>{["l","r"].forEach((_)=>{let Q=U+_,J=u[Q];if(J===f)return;let q=Object.values(J),T=F-A0.applyWithChunking(Math.min,q);if(_!=="l")T=l-A0.applyWithChunking(Math.max,q);if(T)u[Q]=A0.mapValues(J,(W)=>W+T)})})}function jA(u,f){return A0.mapValues(u.ul,($,F)=>{if(f)return u[f.toLowerCase()][F];else{let l=Object.values(u).map((U)=>U[F]).sort((U,_)=>U-_);return(l[1]+l[2])/2}})}function oE(u){let f=A0.buildLayerMatrix(u),$=Object.assign(MA(u,f),EA(u,f)),F={},l;["u","d"].forEach((_)=>{l=_==="u"?f:Object.values(f).reverse(),["l","r"].forEach((Q)=>{if(Q==="r")l=l.map((W)=>{return Object.values(W).reverse()});let J=(_==="u"?u.predecessors:u.successors).bind(u),q=XA(u,l,$,J),T=DA(u,l,q.root,q.align,Q==="r");if(Q==="r")T=A0.mapValues(T,(W)=>-W);F[_+Q]=T})});let U=OA(u,F);return SA(F,U),jA(F,u.graph().align)}function eE(u,f,$){return(F,l,U)=>{let _=F.node(l),Q=F.node(U),J=0,q;if(J+=_.width/2,Object.hasOwn(_,"labelpos"))switch(_.labelpos.toLowerCase()){case"l":q=-_.width/2;break;case"r":q=_.width/2;break}if(q)J+=$?q:-q;if(q=0,J+=(_.dummy?f:u)/2,J+=(Q.dummy?f:u)/2,J+=Q.width/2,Object.hasOwn(Q,"labelpos"))switch(Q.labelpos.toLowerCase()){case"l":q=Q.width/2;break;case"r":q=-Q.width/2;break}if(q)J+=$?q:-q;return q=0,J}}function uV(u,f){return u.node(f).width}});var PA=o((AO,kA)=>{var yA=Eu(),fV=IA().positionX;kA.exports=$V;function $V(u){u=yA.asNonCompoundGraph(u),FV(u),Object.entries(fV(u)).forEach(([f,$])=>u.node(f).x=$)}function FV(u){let f=yA.buildLayerMatrix(u),$=u.graph().ranksep,F=0;f.forEach((l)=>{let U=l.reduce((_,Q)=>{let J=u.node(Q).height;if(_>J)return _;else return J},0);l.forEach((_)=>u.node(_).y=F+U/2),F+=U+$})}});var mA=o((WO,cA)=>{var rA=MT(),CA=VT(),lV=xT(),UV=Eu().normalizeRanks,_V=mT(),QV=Eu().removeEmptyRanks,hA=iT(),JV=tT(),vA=oT(),qV=RA(),TV=PA(),Gf=Eu(),AV=Lf().Graph;cA.exports=WV;function WV(u,f){let $=f&&f.debugTiming?Gf.time:Gf.notime;$("layout",()=>{let F=$(" buildLayoutGraph",()=>RV(u));$(" runLayout",()=>KV(F,$,f)),$(" updateInputGraph",()=>wV(u,F))})}function KV(u,f,$){f(" makeSpaceForEdgeLabels",()=>MV(u)),f(" removeSelfEdges",()=>IV(u)),f(" acyclic",()=>rA.run(u)),f(" nestingGraph.run",()=>hA.run(u)),f(" rank",()=>lV(Gf.asNonCompoundGraph(u))),f(" injectEdgeLabelProxies",()=>EV(u)),f(" removeEmptyRanks",()=>QV(u)),f(" nestingGraph.cleanup",()=>hA.cleanup(u)),f(" normalizeRanks",()=>UV(u)),f(" assignRankMinMax",()=>VV(u)),f(" removeEdgeLabelProxies",()=>XV(u)),f(" normalize.run",()=>CA.run(u)),f(" parentDummyChains",()=>_V(u)),f(" addBorderSegments",()=>JV(u)),f(" order",()=>qV(u,$)),f(" insertSelfEdges",()=>yV(u)),f(" adjustCoordinateSystem",()=>vA.adjust(u)),f(" position",()=>TV(u)),f(" positionSelfEdges",()=>kV(u)),f(" removeBorderNodes",()=>NV(u)),f(" normalize.undo",()=>CA.undo(u)),f(" fixupEdgeLabelCoords",()=>SV(u)),f(" undoCoordinateSystem",()=>vA.undo(u)),f(" translateGraph",()=>DV(u)),f(" assignNodeIntersects",()=>OV(u)),f(" reversePoints",()=>jV(u)),f(" acyclic.undo",()=>rA.undo(u))}function wV(u,f){u.nodes().forEach(($)=>{let F=u.node($),l=f.node($);if(F){if(F.x=l.x,F.y=l.y,F.rank=l.rank,f.children($).length)F.width=l.width,F.height=l.height}}),u.edges().forEach(($)=>{let F=u.edge($),l=f.edge($);if(F.points=l.points,Object.hasOwn(l,"x"))F.x=l.x,F.y=l.y}),u.graph().width=f.graph().width,u.graph().height=f.graph().height}var BV=["nodesep","edgesep","ranksep","marginx","marginy"],LV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},GV=["acyclicer","ranker","rankdir","align"],HV=["width","height","rank"],xA={width:0,height:0},zV=["minlen","weight","width","height","labeloffset"],ZV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},YV=["labelpos"];function RV(u){let f=new AV({multigraph:!0,compound:!0}),$=AF(u.graph());return f.setGraph(Object.assign({},LV,TF($,BV),Gf.pick($,GV))),u.nodes().forEach((F)=>{let l=AF(u.node(F)),U=TF(l,HV);Object.keys(xA).forEach((_)=>{if(U[_]===void 0)U[_]=xA[_]}),f.setNode(F,U),f.setParent(F,u.parent(F))}),u.edges().forEach((F)=>{let l=AF(u.edge(F));f.setEdge(F,Object.assign({},ZV,TF(l,zV),Gf.pick(l,YV)))}),f}function MV(u){let f=u.graph();f.ranksep/=2,u.edges().forEach(($)=>{let F=u.edge($);if(F.minlen*=2,F.labelpos.toLowerCase()!=="c")if(f.rankdir==="TB"||f.rankdir==="BT")F.width+=F.labeloffset;else F.height+=F.labeloffset})}function EV(u){u.edges().forEach((f)=>{let $=u.edge(f);if($.width&&$.height){let F=u.node(f.v),U={rank:(u.node(f.w).rank-F.rank)/2+F.rank,e:f};Gf.addDummyNode(u,"edge-proxy",U,"_ep")}})}function VV(u){let f=0;u.nodes().forEach(($)=>{let F=u.node($);if(F.borderTop)F.minRank=u.node(F.borderTop).rank,F.maxRank=u.node(F.borderBottom).rank,f=Math.max(f,F.maxRank)}),u.graph().maxRank=f}function XV(u){u.nodes().forEach((f)=>{let $=u.node(f);if($.dummy==="edge-proxy")u.edge($.e).labelRank=$.rank,u.removeNode(f)})}function DV(u){let f=Number.POSITIVE_INFINITY,$=0,F=Number.POSITIVE_INFINITY,l=0,U=u.graph(),_=U.marginx||0,Q=U.marginy||0;function J(q){let{x:T,y:W,width:A,height:K}=q;f=Math.min(f,T-A/2),$=Math.max($,T+A/2),F=Math.min(F,W-K/2),l=Math.max(l,W+K/2)}u.nodes().forEach((q)=>J(u.node(q))),u.edges().forEach((q)=>{let T=u.edge(q);if(Object.hasOwn(T,"x"))J(T)}),f-=_,F-=Q,u.nodes().forEach((q)=>{let T=u.node(q);T.x-=f,T.y-=F}),u.edges().forEach((q)=>{let T=u.edge(q);if(T.points.forEach((W)=>{W.x-=f,W.y-=F}),Object.hasOwn(T,"x"))T.x-=f;if(Object.hasOwn(T,"y"))T.y-=F}),U.width=$-f+_,U.height=l-F+Q}function OV(u){u.edges().forEach((f)=>{let $=u.edge(f),F=u.node(f.v),l=u.node(f.w),U,_;if(!$.points)$.points=[],U=l,_=F;else U=$.points[0],_=$.points[$.points.length-1];$.points.unshift(Gf.intersectRect(F,U)),$.points.push(Gf.intersectRect(l,_))})}function SV(u){u.edges().forEach((f)=>{let $=u.edge(f);if(Object.hasOwn($,"x")){if($.labelpos==="l"||$.labelpos==="r")$.width-=$.labeloffset;switch($.labelpos){case"l":$.x-=$.width/2+$.labeloffset;break;case"r":$.x+=$.width/2+$.labeloffset;break}}})}function jV(u){u.edges().forEach((f)=>{let $=u.edge(f);if($.reversed)$.points.reverse()})}function NV(u){u.nodes().forEach((f)=>{if(u.children(f).length){let $=u.node(f),F=u.node($.borderTop),l=u.node($.borderBottom),U=u.node($.borderLeft[$.borderLeft.length-1]),_=u.node($.borderRight[$.borderRight.length-1]);$.width=Math.abs(_.x-U.x),$.height=Math.abs(l.y-F.y),$.x=U.x+$.width/2,$.y=F.y+$.height/2}}),u.nodes().forEach((f)=>{if(u.node(f).dummy==="border")u.removeNode(f)})}function IV(u){u.edges().forEach((f)=>{if(f.v===f.w){var $=u.node(f.v);if(!$.selfEdges)$.selfEdges=[];$.selfEdges.push({e:f,label:u.edge(f)}),u.removeEdge(f)}})}function yV(u){var f=Gf.buildLayerMatrix(u);f.forEach(($)=>{var F=0;$.forEach((l,U)=>{var _=u.node(l);_.order=U+F,(_.selfEdges||[]).forEach((Q)=>{Gf.addDummyNode(u,"selfedge",{width:Q.label.width,height:Q.label.height,rank:_.rank,order:U+ ++F,e:Q.e,label:Q.label},"_se")}),delete _.selfEdges})})}function kV(u){u.nodes().forEach((f)=>{var $=u.node(f);if($.dummy==="selfedge"){var F=u.node($.e.v),l=F.x+F.width/2,U=F.y,_=$.x-l,Q=F.height/2;u.setEdge($.e,$.label),u.removeNode(f),$.label.points=[{x:l+2*_/3,y:U-Q},{x:l+5*_/6,y:U-Q},{x:l+_,y:U},{x:l+5*_/6,y:U+Q},{x:l+2*_/3,y:U+Q}],$.label.x=$.x,$.label.y=$.y}})}function TF(u,f){return Gf.mapValues(Gf.pick(u,f),Number)}function AF(u){var f={};if(u)Object.entries(u).forEach(([$,F])=>{if(typeof $==="string")$=$.toLowerCase();f[$]=F});return f}});var bA=o((KO,pA)=>{var PV=Eu(),rV=Lf().Graph;pA.exports={debugOrdering:CV};function CV(u){let f=PV.buildLayerMatrix(u),$=new rV({compound:!0,multigraph:!0}).setGraph({});return u.nodes().forEach((F)=>{$.setNode(F,{label:F}),$.setParent(F,"layer"+u.node(F).rank)}),u.edges().forEach((F)=>$.setEdge(F.v,F.w,{},F.name)),f.forEach((F,l)=>{let U="layer"+l;$.setNode(U,{rank:"same"}),F.reduce((_,Q)=>{return $.setEdge(_,Q,{style:"invis"}),Q})}),$}});var gA=o((wO,iA)=>{iA.exports="1.1.8"});var tA=o((BO,sA)=>{sA.exports={graphlib:Lf(),layout:mA(),debug:bA(),util:{time:Eu().time,notime:Eu().notime},version:gA()}});var Qu=If(W0(),1),aA=If(d_(),1);var y=If(U6(),1),I=If(W0(),1);function Ru(u){if(typeof u==="string"||typeof u==="number")return""+u;let f="";if(Array.isArray(u)){for(let $=0,F;$<u.length;$++)if((F=Ru(u[$]))!=="")f+=(f&&" ")+F}else for(let $ in u)if(u[$])f+=(f&&" ")+$;return f}var IB={value:()=>{}};function Q1(){for(var u=0,f=arguments.length,$={},F;u<f;++u){if(!(F=arguments[u]+"")||F in $||/[\s.]/.test(F))throw Error("illegal type: "+F);$[F]=[]}return new _6($)}function _6(u){this._=u}function yB(u,f){return u.trim().split(/^|\s+/).map(function($){var F="",l=$.indexOf(".");if(l>=0)F=$.slice(l+1),$=$.slice(0,l);if($&&!f.hasOwnProperty($))throw Error("unknown type: "+$);return{type:$,name:F}})}_6.prototype=Q1.prototype={constructor:_6,on:function(u,f){var $=this._,F=yB(u+"",$),l,U=-1,_=F.length;if(arguments.length<2){while(++U<_)if((l=(u=F[U]).type)&&(l=kB($[l],u.name)))return l;return}if(f!=null&&typeof f!=="function")throw Error("invalid callback: "+f);while(++U<_)if(l=(u=F[U]).type)$[l]=u2($[l],u.name,f);else if(f==null)for(l in $)$[l]=u2($[l],u.name,null);return this},copy:function(){var u={},f=this._;for(var $ in f)u[$]=f[$].slice();return new _6(u)},call:function(u,f){if((l=arguments.length-2)>0)for(var $=Array(l),F=0,l,U;F<l;++F)$[F]=arguments[F+2];if(!this._.hasOwnProperty(u))throw Error("unknown type: "+u);for(U=this._[u],F=0,l=U.length;F<l;++F)U[F].value.apply(f,$)},apply:function(u,f,$){if(!this._.hasOwnProperty(u))throw Error("unknown type: "+u);for(var F=this._[u],l=0,U=F.length;l<U;++l)F[l].value.apply(f,$)}};function kB(u,f){for(var $=0,F=u.length,l;$<F;++$)if((l=u[$]).name===f)return l.value}function u2(u,f,$){for(var F=0,l=u.length;F<l;++F)if(u[F].name===f){u[F]=IB,u=u.slice(0,F).concat(u.slice(F+1));break}if($!=null)u.push({name:f,value:$});return u}var I7="http://www.w3.org/1999/xhtml",f2={svg:"http://www.w3.org/2000/svg",xhtml:I7,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function w3(u){var f=u+="",$=f.indexOf(":");if($>=0&&(f=u.slice(0,$))!=="xmlns")u=u.slice($+1);return f2.hasOwnProperty(f)?{space:f2[f],local:u}:u}function PB(u){return function(){var f=this.ownerDocument,$=this.namespaceURI;return $===I7&&f.documentElement.namespaceURI===I7?f.createElement(u):f.createElementNS($,u)}}function rB(u){return function(){return this.ownerDocument.createElementNS(u.space,u.local)}}function $2(u){var f=w3(u);return(f.local?rB:PB)(f)}function CB(){}function J6(u){return u==null?CB:function(){return this.querySelector(u)}}function hB(u){if(typeof u!=="function")u=J6(u);for(var f=this._groups,$=f.length,F=Array($),l=0;l<$;++l)for(var U=f[l],_=U.length,Q=F[l]=Array(_),J,q,T=0;T<_;++T)if((J=U[T])&&(q=u.call(J,J.__data__,T,U))){if("__data__"in J)q.__data__=J.__data__;Q[T]=q}return new lf(F,this._parents)}function vB(u){return u==null?[]:Array.isArray(u)?u:Array.from(u)}function xB(){return[]}function k7(u){return u==null?xB:function(){return this.querySelectorAll(u)}}function cB(u){return function(){return vB(u.apply(this,arguments))}}function mB(u){if(typeof u==="function")u=cB(u);else u=k7(u);for(var f=this._groups,$=f.length,F=[],l=[],U=0;U<$;++U)for(var _=f[U],Q=_.length,J,q=0;q<Q;++q)if(J=_[q])F.push(u.call(J,J.__data__,q,_)),l.push(J);return new lf(F,l)}function P7(u){return function(){return this.matches(u)}}function F2(u){return function(f){return f.matches(u)}}var pB=Array.prototype.find;function bB(u){return function(){return pB.call(this.children,u)}}function iB(){return this.firstElementChild}function gB(u){return this.select(u==null?iB:bB(typeof u==="function"?u:F2(u)))}var sB=Array.prototype.filter;function tB(){return Array.from(this.children)}function nB(u){return function(){return sB.call(this.children,u)}}function dB(u){return this.selectAll(u==null?tB:nB(typeof u==="function"?u:F2(u)))}function aB(u){if(typeof u!=="function")u=P7(u);for(var f=this._groups,$=f.length,F=Array($),l=0;l<$;++l)for(var U=f[l],_=U.length,Q=F[l]=[],J,q=0;q<_;++q)if((J=U[q])&&u.call(J,J.__data__,q,U))Q.push(J);return new lf(F,this._parents)}function l2(u){return Array(u.length)}function oB(){return new lf(this._enter||this._groups.map(l2),this._parents)}function Q6(u,f){this.ownerDocument=u.ownerDocument,this.namespaceURI=u.namespaceURI,this._next=null,this._parent=u,this.__data__=f}Q6.prototype={constructor:Q6,appendChild:function(u){return this._parent.insertBefore(u,this._next)},insertBefore:function(u,f){return this._parent.insertBefore(u,f)},querySelector:function(u){return this._parent.querySelector(u)},querySelectorAll:function(u){return this._parent.querySelectorAll(u)}};function eB(u){return function(){return u}}function uL(u,f,$,F,l,U){var _=0,Q,J=f.length,q=U.length;for(;_<q;++_)if(Q=f[_])Q.__data__=U[_],F[_]=Q;else $[_]=new Q6(u,U[_]);for(;_<J;++_)if(Q=f[_])l[_]=Q}function fL(u,f,$,F,l,U,_){var Q,J,q=new Map,T=f.length,W=U.length,A=Array(T),K;for(Q=0;Q<T;++Q)if(J=f[Q])if(A[Q]=K=_.call(J,J.__data__,Q,f)+"",q.has(K))l[Q]=J;else q.set(K,J);for(Q=0;Q<W;++Q)if(K=_.call(u,U[Q],Q,U)+"",J=q.get(K))F[Q]=J,J.__data__=U[Q],q.delete(K);else $[Q]=new Q6(u,U[Q]);for(Q=0;Q<T;++Q)if((J=f[Q])&&q.get(A[Q])===J)l[Q]=J}function $L(u){return u.__data__}function FL(u,f){if(!arguments.length)return Array.from(this,$L);var $=f?fL:uL,F=this._parents,l=this._groups;if(typeof u!=="function")u=eB(u);for(var U=l.length,_=Array(U),Q=Array(U),J=Array(U),q=0;q<U;++q){var T=F[q],W=l[q],A=W.length,K=lL(u.call(T,T&&T.__data__,q,F)),L=K.length,z=Q[q]=Array(L),Z=_[q]=Array(L),B=J[q]=Array(A);$(T,W,z,Z,B,K,f);for(var G=0,w=0,H,M;G<L;++G)if(H=z[G]){if(G>=w)w=G+1;while(!(M=Z[w])&&++w<L);H._next=M||null}}return _=new lf(_,F),_._enter=Q,_._exit=J,_}function lL(u){return typeof u==="object"&&"length"in u?u:Array.from(u)}function UL(){return new lf(this._exit||this._groups.map(l2),this._parents)}function _L(u,f,$){var F=this.enter(),l=this,U=this.exit();if(typeof u==="function"){if(F=u(F),F)F=F.selection()}else F=F.append(u+"");if(f!=null){if(l=f(l),l)l=l.selection()}if($==null)U.remove();else $(U);return F&&l?F.merge(l).order():l}function QL(u){var f=u.selection?u.selection():u;for(var $=this._groups,F=f._groups,l=$.length,U=F.length,_=Math.min(l,U),Q=Array(l),J=0;J<_;++J)for(var q=$[J],T=F[J],W=q.length,A=Q[J]=Array(W),K,L=0;L<W;++L)if(K=q[L]||T[L])A[L]=K;for(;J<l;++J)Q[J]=$[J];return new lf(Q,this._parents)}function JL(){for(var u=this._groups,f=-1,$=u.length;++f<$;)for(var F=u[f],l=F.length-1,U=F[l],_;--l>=0;)if(_=F[l]){if(U&&_.compareDocumentPosition(U)^4)U.parentNode.insertBefore(_,U);U=_}return this}function qL(u){if(!u)u=TL;function f(W,A){return W&&A?u(W.__data__,A.__data__):!W-!A}for(var $=this._groups,F=$.length,l=Array(F),U=0;U<F;++U){for(var _=$[U],Q=_.length,J=l[U]=Array(Q),q,T=0;T<Q;++T)if(q=_[T])J[T]=q;J.sort(f)}return new lf(l,this._parents).order()}function TL(u,f){return u<f?-1:u>f?1:u>=f?0:NaN}function AL(){var u=arguments[0];return arguments[0]=this,u.apply(null,arguments),this}function WL(){return Array.from(this)}function KL(){for(var u=this._groups,f=0,$=u.length;f<$;++f)for(var F=u[f],l=0,U=F.length;l<U;++l){var _=F[l];if(_)return _}return null}function wL(){let u=0;for(let f of this)++u;return u}function BL(){return!this.node()}function LL(u){for(var f=this._groups,$=0,F=f.length;$<F;++$)for(var l=f[$],U=0,_=l.length,Q;U<_;++U)if(Q=l[U])u.call(Q,Q.__data__,U,l);return this}function GL(u){return function(){this.removeAttribute(u)}}function HL(u){return function(){this.removeAttributeNS(u.space,u.local)}}function zL(u,f){return function(){this.setAttribute(u,f)}}function ZL(u,f){return function(){this.setAttributeNS(u.space,u.local,f)}}function YL(u,f){return function(){var $=f.apply(this,arguments);if($==null)this.removeAttribute(u);else this.setAttribute(u,$)}}function RL(u,f){return function(){var $=f.apply(this,arguments);if($==null)this.removeAttributeNS(u.space,u.local);else this.setAttributeNS(u.space,u.local,$)}}function ML(u,f){var $=w3(u);if(arguments.length<2){var F=this.node();return $.local?F.getAttributeNS($.space,$.local):F.getAttribute($)}return this.each((f==null?$.local?HL:GL:typeof f==="function"?$.local?RL:YL:$.local?ZL:zL)($,f))}function U2(u){return u.ownerDocument&&u.ownerDocument.defaultView||u.document&&u||u.defaultView}function EL(u){return function(){this.style.removeProperty(u)}}function VL(u,f,$){return function(){this.style.setProperty(u,f,$)}}function XL(u,f,$){return function(){var F=f.apply(this,arguments);if(F==null)this.style.removeProperty(u);else this.style.setProperty(u,F,$)}}function DL(u,f,$){return arguments.length>1?this.each((f==null?EL:typeof f==="function"?XL:VL)(u,f,$==null?"":$)):J1(this.node(),u)}function J1(u,f){return u.style.getPropertyValue(f)||U2(u).getComputedStyle(u,null).getPropertyValue(f)}function OL(u){return function(){delete this[u]}}function SL(u,f){return function(){this[u]=f}}function jL(u,f){return function(){var $=f.apply(this,arguments);if($==null)delete this[u];else this[u]=$}}function NL(u,f){return arguments.length>1?this.each((f==null?OL:typeof f==="function"?jL:SL)(u,f)):this.node()[u]}function _2(u){return u.trim().split(/^|\s+/)}function r7(u){return u.classList||new Q2(u)}function Q2(u){this._node=u,this._names=_2(u.getAttribute("class")||"")}Q2.prototype={add:function(u){var f=this._names.indexOf(u);if(f<0)this._names.push(u),this._node.setAttribute("class",this._names.join(" "))},remove:function(u){var f=this._names.indexOf(u);if(f>=0)this._names.splice(f,1),this._node.setAttribute("class",this._names.join(" "))},contains:function(u){return this._names.indexOf(u)>=0}};function J2(u,f){var $=r7(u),F=-1,l=f.length;while(++F<l)$.add(f[F])}function q2(u,f){var $=r7(u),F=-1,l=f.length;while(++F<l)$.remove(f[F])}function IL(u){return function(){J2(this,u)}}function yL(u){return function(){q2(this,u)}}function kL(u,f){return function(){(f.apply(this,arguments)?J2:q2)(this,u)}}function PL(u,f){var $=_2(u+"");if(arguments.length<2){var F=r7(this.node()),l=-1,U=$.length;while(++l<U)if(!F.contains($[l]))return!1;return!0}return this.each((typeof f==="function"?kL:f?IL:yL)($,f))}function rL(){this.textContent=""}function CL(u){return function(){this.textContent=u}}function hL(u){return function(){var f=u.apply(this,arguments);this.textContent=f==null?"":f}}function vL(u){return arguments.length?this.each(u==null?rL:(typeof u==="function"?hL:CL)(u)):this.node().textContent}function xL(){this.innerHTML=""}function cL(u){return function(){this.innerHTML=u}}function mL(u){return function(){var f=u.apply(this,arguments);this.innerHTML=f==null?"":f}}function pL(u){return arguments.length?this.each(u==null?xL:(typeof u==="function"?mL:cL)(u)):this.node().innerHTML}function bL(){if(this.nextSibling)this.parentNode.appendChild(this)}function iL(){return this.each(bL)}function gL(){if(this.previousSibling)this.parentNode.insertBefore(this,this.parentNode.firstChild)}function sL(){return this.each(gL)}function tL(u){var f=typeof u==="function"?u:$2(u);return this.select(function(){return this.appendChild(f.apply(this,arguments))})}function nL(){return null}function dL(u,f){var $=typeof u==="function"?u:$2(u),F=f==null?nL:typeof f==="function"?f:J6(f);return this.select(function(){return this.insertBefore($.apply(this,arguments),F.apply(this,arguments)||null)})}function aL(){var u=this.parentNode;if(u)u.removeChild(this)}function oL(){return this.each(aL)}function eL(){var u=this.cloneNode(!1),f=this.parentNode;return f?f.insertBefore(u,this.nextSibling):u}function uG(){var u=this.cloneNode(!0),f=this.parentNode;return f?f.insertBefore(u,this.nextSibling):u}function fG(u){return this.select(u?uG:eL)}function $G(u){return arguments.length?this.property("__data__",u):this.node().__data__}function FG(u){return function(f){u.call(this,f,this.__data__)}}function lG(u){return u.trim().split(/^|\s+/).map(function(f){var $="",F=f.indexOf(".");if(F>=0)$=f.slice(F+1),f=f.slice(0,F);return{type:f,name:$}})}function UG(u){return function(){var f=this.__on;if(!f)return;for(var $=0,F=-1,l=f.length,U;$<l;++$)if(U=f[$],(!u.type||U.type===u.type)&&U.name===u.name)this.removeEventListener(U.type,U.listener,U.options);else f[++F]=U;if(++F)f.length=F;else delete this.__on}}function _G(u,f,$){return function(){var F=this.__on,l,U=FG(f);if(F){for(var _=0,Q=F.length;_<Q;++_)if((l=F[_]).type===u.type&&l.name===u.name){this.removeEventListener(l.type,l.listener,l.options),this.addEventListener(l.type,l.listener=U,l.options=$),l.value=f;return}}if(this.addEventListener(u.type,U,$),l={type:u.type,name:u.name,value:f,listener:U,options:$},!F)this.__on=[l];else F.push(l)}}function QG(u,f,$){var F=lG(u+""),l,U=F.length,_;if(arguments.length<2){var Q=this.node().__on;if(Q){for(var J=0,q=Q.length,T;J<q;++J)for(l=0,T=Q[J];l<U;++l)if((_=F[l]).type===T.type&&_.name===T.name)return T.value}return}Q=f?_G:UG;for(l=0;l<U;++l)this.each(Q(F[l],f,$));return this}function T2(u,f,$){var F=U2(u),l=F.CustomEvent;if(typeof l==="function")l=new l(f,$);else if(l=F.document.createEvent("Event"),$)l.initEvent(f,$.bubbles,$.cancelable),l.detail=$.detail;else l.initEvent(f,!1,!1);u.dispatchEvent(l)}function JG(u,f){return function(){return T2(this,u,f)}}function qG(u,f){return function(){return T2(this,u,f.apply(this,arguments))}}function TG(u,f){return this.each((typeof f==="function"?qG:JG)(u,f))}function*AG(){for(var u=this._groups,f=0,$=u.length;f<$;++f)for(var F=u[f],l=0,U=F.length,_;l<U;++l)if(_=F[l])yield _}var A2=[null];function lf(u,f){this._groups=u,this._parents=f}function q1(){return new lf([[document.documentElement]],A2)}function WG(){return this}lf.prototype=q1.prototype={constructor:lf,select:hB,selectAll:mB,selectChild:gB,selectChildren:dB,filter:aB,data:FL,enter:oB,exit:UL,join:_L,merge:QL,selection:WG,order:JL,sort:qL,call:AL,nodes:WL,node:KL,size:wL,empty:BL,each:LL,attr:ML,style:DL,property:NL,classed:PL,text:vL,html:pL,raise:iL,lower:sL,append:tL,insert:dL,remove:oL,clone:fG,datum:$G,on:QG,dispatch:TG,[Symbol.iterator]:AG};function xu(u){return typeof u==="string"?new lf([[document.querySelector(u)]],[document.documentElement]):new lf([[u]],A2)}var KG=0;function wG(){return new y7}function y7(){this._="@"+(++KG).toString(36)}y7.prototype=wG.prototype={constructor:y7,get:function(u){var f=this._;while(!(f in u))if(!(u=u.parentNode))return;return u[f]},set:function(u,f){return u[this._]=f},remove:function(u){return this._ in u&&delete u[this._]},toString:function(){return this._}};function BG(u){let f;while(f=u.sourceEvent)u=f;return u}function du(u,f){if(u=BG(u),f===void 0)f=u.currentTarget;if(f){var $=f.ownerSVGElement||f;if($.createSVGPoint){var F=$.createSVGPoint();return F.x=u.clientX,F.y=u.clientY,F=F.matrixTransform(f.getScreenCTM().inverse()),[F.x,F.y]}if(f.getBoundingClientRect){var l=f.getBoundingClientRect();return[u.clientX-l.left-f.clientLeft,u.clientY-l.top-f.clientTop]}}return[u.pageX,u.pageY]}var LG={passive:!1},B3={capture:!0,passive:!1};function C7(u){u.stopImmediatePropagation()}function e1(u){u.preventDefault(),u.stopImmediatePropagation()}function v7(u){var f=u.document.documentElement,$=xu(u).on("dragstart.drag",e1,B3);if("onselectstart"in f)$.on("selectstart.drag",e1,B3);else f.__noselect=f.style.MozUserSelect,f.style.MozUserSelect="none"}function x7(u,f){var $=u.document.documentElement,F=xu(u).on("dragstart.drag",null);if(f)F.on("click.drag",e1,B3),setTimeout(function(){F.on("click.drag",null)},0);if("onselectstart"in $)F.on("selectstart.drag",null);else $.style.MozUserSelect=$.__noselect,delete $.__noselect}var q6=(u)=>()=>u;function h7(u,{sourceEvent:f,subject:$,target:F,identifier:l,active:U,x:_,y:Q,dx:J,dy:q,dispatch:T}){Object.defineProperties(this,{type:{value:u,enumerable:!0,configurable:!0},sourceEvent:{value:f,enumerable:!0,configurable:!0},subject:{value:$,enumerable:!0,configurable:!0},target:{value:F,enumerable:!0,configurable:!0},identifier:{value:l,enumerable:!0,configurable:!0},active:{value:U,enumerable:!0,configurable:!0},x:{value:_,enumerable:!0,configurable:!0},y:{value:Q,enumerable:!0,configurable:!0},dx:{value:J,enumerable:!0,configurable:!0},dy:{value:q,enumerable:!0,configurable:!0},_:{value:T}})}h7.prototype.on=function(){var u=this._.on.apply(this._,arguments);return u===this._?this:u};function GG(u){return!u.ctrlKey&&!u.button}function HG(){return this.parentNode}function zG(u,f){return f==null?{x:u.x,y:u.y}:f}function ZG(){return navigator.maxTouchPoints||"ontouchstart"in this}function c7(){var u=GG,f=HG,$=zG,F=ZG,l={},U=Q1("start","drag","end"),_=0,Q,J,q,T,W=0;function A(H){H.on("mousedown.drag",K).filter(F).on("touchstart.drag",Z).on("touchmove.drag",B,LG).on("touchend.drag touchcancel.drag",G).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function K(H,M){if(T||!u.call(this,H,M))return;var R=w(this,f.call(this,H,M),H,M,"mouse");if(!R)return;xu(H.view).on("mousemove.drag",L,B3).on("mouseup.drag",z,B3),v7(H.view),C7(H),q=!1,Q=H.clientX,J=H.clientY,R("start",H)}function L(H){if(e1(H),!q){var M=H.clientX-Q,R=H.clientY-J;q=M*M+R*R>W}l.mouse("drag",H)}function z(H){xu(H.view).on("mousemove.drag mouseup.drag",null),x7(H.view,q),e1(H),l.mouse("end",H)}function Z(H,M){if(!u.call(this,H,M))return;var R=H.changedTouches,E=f.call(this,H,M),V=R.length,D,r;for(D=0;D<V;++D)if(r=w(this,E,H,M,R[D].identifier,R[D]))C7(H),r("start",H,R[D])}function B(H){var M=H.changedTouches,R=M.length,E,V;for(E=0;E<R;++E)if(V=l[M[E].identifier])e1(H),V("drag",H,M[E])}function G(H){var M=H.changedTouches,R=M.length,E,V;if(T)clearTimeout(T);T=setTimeout(function(){T=null},500);for(E=0;E<R;++E)if(V=l[M[E].identifier])C7(H),V("end",H,M[E])}function w(H,M,R,E,V,D){var r=U.copy(),C=du(D||R,M),m,v,Y;if((Y=$.call(H,new h7("beforestart",{sourceEvent:R,target:A,identifier:V,active:_,x:C[0],y:C[1],dx:0,dy:0,dispatch:r}),E))==null)return;return m=Y.x-C[0]||0,v=Y.y-C[1]||0,function X(O,j,k){var P=C,c;switch(O){case"start":l[V]=X,c=_++;break;case"end":delete l[V],--_;case"drag":C=du(k||j,M),c=_;break}r.call(O,H,new h7(O,{sourceEvent:j,subject:Y,target:A,identifier:V,active:c,x:C[0]+m,y:C[1]+v,dx:C[0]-P[0],dy:C[1]-P[1],dispatch:r}),E)}}return A.filter=function(H){return arguments.length?(u=typeof H==="function"?H:q6(!!H),A):u},A.container=function(H){return arguments.length?(f=typeof H==="function"?H:q6(H),A):f},A.subject=function(H){return arguments.length?($=typeof H==="function"?H:q6(H),A):$},A.touchable=function(H){return arguments.length?(F=typeof H==="function"?H:q6(!!H),A):F},A.on=function(){var H=U.on.apply(U,arguments);return H===U?A:H},A.clickDistance=function(H){return arguments.length?(W=(H=+H)*H,A):Math.sqrt(W)},A}function F4(u,f,$){u.prototype=f.prototype=$,$.constructor=u}function H3(u,f){var $=Object.create(u.prototype);for(var F in f)$[F]=f[F];return $}function k0(){}var K1=0.7,$4=1/K1,u4="\\s*([+-]?\\d+)\\s*",L3="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",YG=/^#([0-9a-f]{3,8})$/,RG=new RegExp(`^rgb\\(${u4},${u4},${u4}\\)$`),MG=new RegExp(`^rgb\\(${vf},${vf},${vf}\\)$`),EG=new RegExp(`^rgba\\(${u4},${u4},${u4},${L3}\\)$`),VG=new RegExp(`^rgba\\(${vf},${vf},${vf},${L3}\\)$`),XG=new RegExp(`^hsl\\(${L3},${vf},${vf}\\)$`),DG=new RegExp(`^hsla\\(${L3},${vf},${vf},${L3}\\)$`),W2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};F4(k0,_0,{copy(u){return Object.assign(new this.constructor,this,u)},displayable(){return this.rgb().displayable()},hex:K2,formatHex:K2,formatHex8:OG,formatHsl:SG,formatRgb:w2,toString:w2});function K2(){return this.rgb().formatHex()}function OG(){return this.rgb().formatHex8()}function SG(){return M2(this).formatHsl()}function w2(){return this.rgb().formatRgb()}function _0(u){var f,$;return u=(u+"").trim().toLowerCase(),(f=YG.exec(u))?($=f[1].length,f=parseInt(f[1],16),$===6?B2(f):$===3?new ju(f>>8&15|f>>4&240,f>>4&15|f&240,(f&15)<<4|f&15,1):$===8?T6(f>>24&255,f>>16&255,f>>8&255,(f&255)/255):$===4?T6(f>>12&15|f>>8&240,f>>8&15|f>>4&240,f>>4&15|f&240,((f&15)<<4|f&15)/255):null):(f=RG.exec(u))?new ju(f[1],f[2],f[3],1):(f=MG.exec(u))?new ju(f[1]*255/100,f[2]*255/100,f[3]*255/100,1):(f=EG.exec(u))?T6(f[1],f[2],f[3],f[4]):(f=VG.exec(u))?T6(f[1]*255/100,f[2]*255/100,f[3]*255/100,f[4]):(f=XG.exec(u))?H2(f[1],f[2]/100,f[3]/100,1):(f=DG.exec(u))?H2(f[1],f[2]/100,f[3]/100,f[4]):W2.hasOwnProperty(u)?B2(W2[u]):u==="transparent"?new ju(NaN,NaN,NaN,0):null}function B2(u){return new ju(u>>16&255,u>>8&255,u&255,1)}function T6(u,f,$,F){if(F<=0)u=f=$=NaN;return new ju(u,f,$,F)}function s7(u){if(!(u instanceof k0))u=_0(u);if(!u)return new ju;return u=u.rgb(),new ju(u.r,u.g,u.b,u.opacity)}function z3(u,f,$,F){return arguments.length===1?s7(u):new ju(u,f,$,F==null?1:F)}function ju(u,f,$,F){this.r=+u,this.g=+f,this.b=+$,this.opacity=+F}F4(ju,z3,H3(k0,{brighter(u){return u=u==null?$4:Math.pow($4,u),new ju(this.r*u,this.g*u,this.b*u,this.opacity)},darker(u){return u=u==null?K1:Math.pow(K1,u),new ju(this.r*u,this.g*u,this.b*u,this.opacity)},rgb(){return this},clamp(){return new ju(A1(this.r),A1(this.g),A1(this.b),W6(this.opacity))},displayable(){return-0.5<=this.r&&this.r<255.5&&(-0.5<=this.g&&this.g<255.5)&&(-0.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:L2,formatHex:L2,formatHex8:jG,formatRgb:G2,toString:G2}));function L2(){return`#${T1(this.r)}${T1(this.g)}${T1(this.b)}`}function jG(){return`#${T1(this.r)}${T1(this.g)}${T1(this.b)}${T1((isNaN(this.opacity)?1:this.opacity)*255)}`}function G2(){let u=W6(this.opacity);return`${u===1?"rgb(":"rgba("}${A1(this.r)}, ${A1(this.g)}, ${A1(this.b)}${u===1?")":`, ${u})`}`}function W6(u){return isNaN(u)?1:Math.max(0,Math.min(1,u))}function A1(u){return Math.max(0,Math.min(255,Math.round(u)||0))}function T1(u){return u=A1(u),(u<16?"0":"")+u.toString(16)}function H2(u,f,$,F){if(F<=0)u=f=$=NaN;else if($<=0||$>=1)u=f=NaN;else if(f<=0)u=NaN;return new Df(u,f,$,F)}function M2(u){if(u instanceof Df)return new Df(u.h,u.s,u.l,u.opacity);if(!(u instanceof k0))u=_0(u);if(!u)return new Df;if(u instanceof Df)return u;u=u.rgb();var f=u.r/255,$=u.g/255,F=u.b/255,l=Math.min(f,$,F),U=Math.max(f,$,F),_=NaN,Q=U-l,J=(U+l)/2;if(Q){if(f===U)_=($-F)/Q+($<F)*6;else if($===U)_=(F-f)/Q+2;else _=(f-$)/Q+4;Q/=J<0.5?U+l:2-U-l,_*=60}else Q=J>0&&J<1?0:_;return new Df(_,Q,J,u.opacity)}function w6(u,f,$,F){return arguments.length===1?M2(u):new Df(u,f,$,F==null?1:F)}function Df(u,f,$,F){this.h=+u,this.s=+f,this.l=+$,this.opacity=+F}F4(Df,w6,H3(k0,{brighter(u){return u=u==null?$4:Math.pow($4,u),new Df(this.h,this.s,this.l*u,this.opacity)},darker(u){return u=u==null?K1:Math.pow(K1,u),new Df(this.h,this.s,this.l*u,this.opacity)},rgb(){var u=this.h%360+(this.h<0)*360,f=isNaN(u)||isNaN(this.s)?0:this.s,$=this.l,F=$+($<0.5?$:1-$)*f,l=2*$-F;return new ju(m7(u>=240?u-240:u+120,l,F),m7(u,l,F),m7(u<120?u+240:u-120,l,F),this.opacity)},clamp(){return new Df(z2(this.h),A6(this.s),A6(this.l),W6(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){let u=W6(this.opacity);return`${u===1?"hsl(":"hsla("}${z2(this.h)}, ${A6(this.s)*100}%, ${A6(this.l)*100}%${u===1?")":`, ${u})`}`}}));function z2(u){return u=(u||0)%360,u<0?u+360:u}function A6(u){return Math.max(0,Math.min(1,u||0))}function m7(u,f,$){return(u<60?f+($-f)*u/60:u<180?$:u<240?f+($-f)*(240-u)/60:f)*255}var E2=Math.PI/180,V2=180/Math.PI,K6=18,X2=0.96422,D2=1,O2=0.82521,S2=0.13793103448275862,f4=0.20689655172413793,j2=3*f4*f4,NG=f4*f4*f4;function N2(u){if(u instanceof xf)return new xf(u.l,u.a,u.b,u.opacity);if(u instanceof U0)return y2(u);if(!(u instanceof ju))u=s7(u);var f=g7(u.r),$=g7(u.g),F=g7(u.b),l=p7((0.2225045*f+0.7168786*$+0.0606169*F)/D2),U,_;if(f===$&&$===F)U=_=l;else U=p7((0.4360747*f+0.3850649*$+0.1430804*F)/X2),_=p7((0.0139322*f+0.0971045*$+0.7141733*F)/O2);return new xf(116*l-16,500*(U-l),200*(l-_),u.opacity)}function I2(u,f,$,F){return arguments.length===1?N2(u):new xf(u,f,$,F==null?1:F)}function xf(u,f,$,F){this.l=+u,this.a=+f,this.b=+$,this.opacity=+F}F4(xf,I2,H3(k0,{brighter(u){return new xf(this.l+K6*(u==null?1:u),this.a,this.b,this.opacity)},darker(u){return new xf(this.l-K6*(u==null?1:u),this.a,this.b,this.opacity)},rgb(){var u=(this.l+16)/116,f=isNaN(this.a)?u:u+this.a/500,$=isNaN(this.b)?u:u-this.b/200;return f=X2*b7(f),u=D2*b7(u),$=O2*b7($),new ju(i7(3.1338561*f-1.6168667*u-0.4906146*$),i7(-0.9787684*f+1.9161415*u+0.033454*$),i7(0.0719453*f-0.2289914*u+1.4052427*$),this.opacity)}}));function p7(u){return u>NG?Math.pow(u,0.3333333333333333):u/j2+S2}function b7(u){return u>f4?u*u*u:j2*(u-S2)}function i7(u){return 255*(u<=0.0031308?12.92*u:1.055*Math.pow(u,0.4166666666666667)-0.055)}function g7(u){return(u/=255)<=0.04045?u/12.92:Math.pow((u+0.055)/1.055,2.4)}function IG(u){if(u instanceof U0)return new U0(u.h,u.c,u.l,u.opacity);if(!(u instanceof xf))u=N2(u);if(u.a===0&&u.b===0)return new U0(NaN,0<u.l&&u.l<100?0:NaN,u.l,u.opacity);var f=Math.atan2(u.b,u.a)*V2;return new U0(f<0?f+360:f,Math.sqrt(u.a*u.a+u.b*u.b),u.l,u.opacity)}function B6(u,f,$,F){return arguments.length===1?IG(u):new U0(u,f,$,F==null?1:F)}function U0(u,f,$,F){this.h=+u,this.c=+f,this.l=+$,this.opacity=+F}function y2(u){if(isNaN(u.h))return new xf(u.l,0,0,u.opacity);var f=u.h*E2;return new xf(u.l,Math.cos(f)*u.c,Math.sin(f)*u.c,u.opacity)}F4(U0,B6,H3(k0,{brighter(u){return new U0(this.h,this.c,this.l+K6*(u==null?1:u),this.opacity)},darker(u){return new U0(this.h,this.c,this.l-K6*(u==null?1:u),this.opacity)},rgb(){return y2(this).rgb()}}));var k2=-0.14861,t7=1.78277,n7=-0.29227,L6=-0.90649,G3=1.97294,Z2=G3*L6,Y2=G3*t7,R2=t7*n7-L6*k2;function yG(u){if(u instanceof W1)return new W1(u.h,u.s,u.l,u.opacity);if(!(u instanceof ju))u=s7(u);var f=u.r/255,$=u.g/255,F=u.b/255,l=(R2*F+Z2*f-Y2*$)/(R2+Z2-Y2),U=F-l,_=(G3*($-l)-n7*U)/L6,Q=Math.sqrt(_*_+U*U)/(G3*l*(1-l)),J=Q?Math.atan2(_,U)*V2-120:NaN;return new W1(J<0?J+360:J,Q,l,u.opacity)}function G6(u,f,$,F){return arguments.length===1?yG(u):new W1(u,f,$,F==null?1:F)}function W1(u,f,$,F){this.h=+u,this.s=+f,this.l=+$,this.opacity=+F}F4(W1,G6,H3(k0,{brighter(u){return u=u==null?$4:Math.pow($4,u),new W1(this.h,this.s,this.l*u,this.opacity)},darker(u){return u=u==null?K1:Math.pow(K1,u),new W1(this.h,this.s,this.l*u,this.opacity)},rgb(){var u=isNaN(this.h)?0:(this.h+120)*E2,f=+this.l,$=isNaN(this.s)?0:this.s*f*(1-f),F=Math.cos(u),l=Math.sin(u);return new ju(255*(f+$*(k2*F+t7*l)),255*(f+$*(n7*F+L6*l)),255*(f+$*(G3*F)),this.opacity)}}));function C2(u,f,$,F,l){var U=u*u,_=U*u;return((1-3*u+3*U-_)*f+(4-6*U+3*_)*$+(1+3*u+3*U-3*_)*F+_*l)/6}function kG(u){var f=u.length-1;return function($){var F=$<=0?$=0:$>=1?($=1,f-1):Math.floor($*f),l=u[F],U=u[F+1],_=F>0?u[F-1]:2*l-U,Q=F<f-1?u[F+2]:2*U-l;return C2(($-F/f)*f,_,l,U,Q)}}function PG(u){var f=u.length;return function($){var F=Math.floor((($%=1)<0?++$:$)*f),l=u[(F+f-1)%f],U=u[F%f],_=u[(F+1)%f],Q=u[(F+2)%f];return C2(($-F/f)*f,l,U,_,Q)}}var z6=(u)=>()=>u;function h2(u,f){return function($){return u+$*f}}function rG(u,f,$){return u=Math.pow(u,$),f=Math.pow(f,$)-u,$=1/$,function(F){return Math.pow(u+F*f,$)}}function e7(u,f){var $=f-u;return $?h2(u,$>180||$<-180?$-360*Math.round($/360):$):z6(isNaN(u)?f:u)}function CG(u){return(u=+u)===1?au:function(f,$){return $-f?rG(f,$,u):z6(isNaN(f)?$:f)}}function au(u,f){var $=f-u;return $?h2(u,$):z6(isNaN(u)?f:u)}var Z3=function u(f){var $=CG(f);function F(l,U){var _=$((l=z3(l)).r,(U=z3(U)).r),Q=$(l.g,U.g),J=$(l.b,U.b),q=au(l.opacity,U.opacity);return function(T){return l.r=_(T),l.g=Q(T),l.b=J(T),l.opacity=q(T),l+""}}return F.gamma=u,F}(1);function v2(u){return function(f){var $=f.length,F=Array($),l=Array($),U=Array($),_,Q;for(_=0;_<$;++_)Q=z3(f[_]),F[_]=Q.r||0,l[_]=Q.g||0,U[_]=Q.b||0;return F=u(F),l=u(l),U=u(U),Q.opacity=1,function(J){return Q.r=F(J),Q.g=l(J),Q.b=U(J),Q+""}}}var TX=v2(kG),AX=v2(PG);function hG(u,f){if(!f)f=[];var $=u?Math.min(f.length,u.length):0,F=f.slice(),l;return function(U){for(l=0;l<$;++l)F[l]=u[l]*(1-U)+f[l]*U;return F}}function vG(u){return ArrayBuffer.isView(u)&&!(u instanceof DataView)}function xG(u,f){var $=f?f.length:0,F=u?Math.min($,u.length):0,l=Array(F),U=Array($),_;for(_=0;_<F;++_)l[_]=l4(u[_],f[_]);for(;_<$;++_)U[_]=f[_];return function(Q){for(_=0;_<F;++_)U[_]=l[_](Q);return U}}function cG(u,f){var $=new Date;return u=+u,f=+f,function(F){return $.setTime(u*(1-F)+f*F),$}}function Of(u,f){return u=+u,f=+f,function($){return u*(1-$)+f*$}}function mG(u,f){var $={},F={},l;if(u===null||typeof u!=="object")u={};if(f===null||typeof f!=="object")f={};for(l in f)if(l in u)$[l]=l4(u[l],f[l]);else F[l]=f[l];return function(U){for(l in $)F[l]=$[l](U);return F}}var a7=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,d7=new RegExp(a7.source,"g");function pG(u){return function(){return u}}function bG(u){return function(f){return u(f)+""}}function u$(u,f){var $=a7.lastIndex=d7.lastIndex=0,F,l,U,_=-1,Q=[],J=[];u=u+"",f=f+"";while((F=a7.exec(u))&&(l=d7.exec(f))){if((U=l.index)>$)if(U=f.slice($,U),Q[_])Q[_]+=U;else Q[++_]=U;if((F=F[0])===(l=l[0]))if(Q[_])Q[_]+=l;else Q[++_]=l;else Q[++_]=null,J.push({i:_,x:Of(F,l)});$=d7.lastIndex}if($<f.length)if(U=f.slice($),Q[_])Q[_]+=U;else Q[++_]=U;return Q.length<2?J[0]?bG(J[0].x):pG(f):(f=J.length,function(q){for(var T=0,W;T<f;++T)Q[(W=J[T]).i]=W.x(q);return Q.join("")})}function l4(u,f){var $=typeof f,F;return f==null||$==="boolean"?z6(f):($==="number"?Of:$==="string"?(F=_0(f))?(f=F,Z3):u$:f instanceof _0?Z3:f instanceof Date?cG:vG(f)?hG:Array.isArray(f)?xG:typeof f.valueOf!=="function"&&typeof f.toString!=="function"||isNaN(f)?mG:Of)(u,f)}var P2=180/Math.PI,o7={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function x2(u,f,$,F,l,U){var _,Q,J;if(_=Math.sqrt(u*u+f*f))u/=_,f/=_;if(J=u*$+f*F)$-=u*J,F-=f*J;if(Q=Math.sqrt($*$+F*F))$/=Q,F/=Q,J/=Q;if(u*F<f*$)u=-u,f=-f,J=-J,_=-_;return{translateX:l,translateY:U,rotate:Math.atan2(f,u)*P2,skewX:Math.atan(J)*P2,scaleX:_,scaleY:Q}}var H6;function iG(u){let f=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(u+"");return f.isIdentity?o7:x2(f.a,f.b,f.c,f.d,f.e,f.f)}function gG(u){if(u==null)return o7;if(!H6)H6=document.createElementNS("http://www.w3.org/2000/svg","g");if(H6.setAttribute("transform",u),!(u=H6.transform.baseVal.consolidate()))return o7;return u=u.matrix,x2(u.a,u.b,u.c,u.d,u.e,u.f)}function c2(u,f,$,F){function l(q){return q.length?q.pop()+" ":""}function U(q,T,W,A,K,L){if(q!==W||T!==A){var z=K.push("translate(",null,f,null,$);L.push({i:z-4,x:Of(q,W)},{i:z-2,x:Of(T,A)})}else if(W||A)K.push("translate("+W+f+A+$)}function _(q,T,W,A){if(q!==T){if(q-T>180)T+=360;else if(T-q>180)q+=360;A.push({i:W.push(l(W)+"rotate(",null,F)-2,x:Of(q,T)})}else if(T)W.push(l(W)+"rotate("+T+F)}function Q(q,T,W,A){if(q!==T)A.push({i:W.push(l(W)+"skewX(",null,F)-2,x:Of(q,T)});else if(T)W.push(l(W)+"skewX("+T+F)}function J(q,T,W,A,K,L){if(q!==W||T!==A){var z=K.push(l(K)+"scale(",null,",",null,")");L.push({i:z-4,x:Of(q,W)},{i:z-2,x:Of(T,A)})}else if(W!==1||A!==1)K.push(l(K)+"scale("+W+","+A+")")}return function(q,T){var W=[],A=[];return q=u(q),T=u(T),U(q.translateX,q.translateY,T.translateX,T.translateY,W,A),_(q.rotate,T.rotate,W,A),Q(q.skewX,T.skewX,W,A),J(q.scaleX,q.scaleY,T.scaleX,T.scaleY,W,A),q=T=null,function(K){var L=-1,z=A.length,Z;while(++L<z)W[(Z=A[L]).i]=Z.x(K);return W.join("")}}}var m2=c2(iG,"px, ","px)","deg)"),p2=c2(gG,", ",")",")"),sG=0.000000000001;function r2(u){return((u=Math.exp(u))+1/u)/2}function tG(u){return((u=Math.exp(u))-1/u)/2}function nG(u){return((u=Math.exp(2*u))-1)/(u+1)}var U4=function u(f,$,F){function l(U,_){var Q=U[0],J=U[1],q=U[2],T=_[0],W=_[1],A=_[2],K=T-Q,L=W-J,z=K*K+L*L,Z,B;if(z<sG)B=Math.log(A/q)/f,Z=function(E){return[Q+E*K,J+E*L,q*Math.exp(f*E*B)]};else{var G=Math.sqrt(z),w=(A*A-q*q+F*z)/(2*q*$*G),H=(A*A-q*q-F*z)/(2*A*$*G),M=Math.log(Math.sqrt(w*w+1)-w),R=Math.log(Math.sqrt(H*H+1)-H);B=(R-M)/f,Z=function(E){var V=E*B,D=r2(M),r=q/($*G)*(D*nG(f*V+M)-tG(M));return[Q+r*K,J+r*L,q*D/r2(f*V+M)]}}return Z.duration=Math.abs(B)*1000*f/Math.SQRT2,Z}return l.rho=function(U){var _=Math.max(0.001,+U),Q=_*_,J=Q*Q;return u(_,Q,J)},l}(Math.SQRT2,2,4);function b2(u){return function(f,$){var F=u((f=w6(f)).h,($=w6($)).h),l=au(f.s,$.s),U=au(f.l,$.l),_=au(f.opacity,$.opacity);return function(Q){return f.h=F(Q),f.s=l(Q),f.l=U(Q),f.opacity=_(Q),f+""}}}var WX=b2(e7),KX=b2(au);function i2(u){return function(f,$){var F=u((f=B6(f)).h,($=B6($)).h),l=au(f.c,$.c),U=au(f.l,$.l),_=au(f.opacity,$.opacity);return function(Q){return f.h=F(Q),f.c=l(Q),f.l=U(Q),f.opacity=_(Q),f+""}}}var wX=i2(e7),BX=i2(au);function g2(u){return function f($){$=+$;function F(l,U){var _=u((l=G6(l)).h,(U=G6(U)).h),Q=au(l.s,U.s),J=au(l.l,U.l),q=au(l.opacity,U.opacity);return function(T){return l.h=_(T),l.s=Q(T),l.l=J(Math.pow(T,$)),l.opacity=q(T),l+""}}return F.gamma=f,F}(1)}var LX=g2(e7),GX=g2(au);var _4=0,R3=0,Y3=0,t2=1000,Z6,M3,Y6=0,w1=0,M6=0,E3=typeof performance==="object"&&performance.now?performance:Date,n2=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(u){setTimeout(u,17)};function E6(){return w1||(n2(dG),w1=E3.now()+M6)}function dG(){w1=0}function R6(){this._call=this._time=this._next=null}R6.prototype=$$.prototype={constructor:R6,restart:function(u,f,$){if(typeof u!=="function")throw TypeError("callback is not a function");if($=($==null?E6():+$)+(f==null?0:+f),!this._next&&M3!==this){if(M3)M3._next=this;else Z6=this;M3=this}this._call=u,this._time=$,f$()},stop:function(){if(this._call)this._call=null,this._time=1/0,f$()}};function $$(u,f,$){var F=new R6;return F.restart(u,f,$),F}function aG(){E6(),++_4;var u=Z6,f;while(u){if((f=w1-u._time)>=0)u._call.call(void 0,f);u=u._next}--_4}function s2(){w1=(Y6=E3.now())+M6,_4=R3=0;try{aG()}finally{_4=0,eG(),w1=0}}function oG(){var u=E3.now(),f=u-Y6;if(f>t2)M6-=f,Y6=u}function eG(){var u,f=Z6,$,F=1/0;while(f)if(f._call){if(F>f._time)F=f._time;u=f,f=f._next}else $=f._next,f._next=null,f=u?u._next=$:Z6=$;M3=u,f$(F)}function f$(u){if(_4)return;if(R3)R3=clearTimeout(R3);var f=u-w1;if(f>24){if(u<1/0)R3=setTimeout(s2,Math.ceil(u-E3.now()-M6)+1);if(Y3)Y3=clearInterval(Y3)}else{if(!Y3)Y6=E3.now(),Y3=setInterval(oG,t2);_4=1,n2(s2)}}function F$(u,f,$){var F=new R6;return f=f==null?0:+f,F.restart((l)=>{F.stop(),u(l+f)},f,$),F}function a2(u){return((u*=2)<=1?u*u*u:(u-=2)*u*u+2)/2}var l$=3,ZX=function u(f){f=+f;function $(F){return Math.pow(F,f)}return $.exponent=u,$}(l$),YX=function u(f){f=+f;function $(F){return 1-Math.pow(1-F,f)}return $.exponent=u,$}(l$),RX=function u(f){f=+f;function $(F){return((F*=2)<=1?Math.pow(F,f):2-Math.pow(2-F,f))/2}return $.exponent=u,$}(l$),uH=Math.PI,MX=uH/2;function V6(u){return(Math.pow(2,-10*u)-0.0009765625)*1.0009775171065494}var d2=0.36363636363636365;var EX=1/d2/d2;var U$=1.70158,VX=function u(f){f=+f;function $(F){return(F=+F)*F*(f*(F-1)+F)}return $.overshoot=u,$}(U$),XX=function u(f){f=+f;function $(F){return--F*F*((F+1)*f+F)+1}return $.overshoot=u,$}(U$),DX=function u(f){f=+f;function $(F){return((F*=2)<1?F*F*((f+1)*F-f):(F-=2)*F*((f+1)*F+f)+2)/2}return $.overshoot=u,$}(U$),Q4=2*Math.PI,_$=1,Q$=0.3,OX=function u(f,$){var F=Math.asin(1/(f=Math.max(1,f)))*($/=Q4);function l(U){return f*V6(- --U)*Math.sin((F-U)/$)}return l.amplitude=function(U){return u(U,$*Q4)},l.period=function(U){return u(f,U)},l}(_$,Q$),SX=function u(f,$){var F=Math.asin(1/(f=Math.max(1,f)))*($/=Q4);function l(U){return 1-f*V6(U=+U)*Math.sin((U+F)/$)}return l.amplitude=function(U){return u(U,$*Q4)},l.period=function(U){return u(f,U)},l}(_$,Q$),jX=function u(f,$){var F=Math.asin(1/(f=Math.max(1,f)))*($/=Q4);function l(U){return((U=U*2-1)<0?f*V6(-U)*Math.sin((F-U)/$):2-f*V6(U)*Math.sin((F+U)/$))/2}return l.amplitude=function(U){return u(U,$*Q4)},l.period=function(U){return u(f,U)},l}(_$,Q$);var fH=Q1("start","end","cancel","interrupt"),$H=[],uQ=0,o2=1,J$=2,X6=3,e2=4,q$=5,D6=6;function O6(u,f,$,F,l,U){var _=u.__transition;if(!_)u.__transition={};else if($ in _)return;FH(u,$,{name:f,index:F,group:l,on:fH,tween:$H,time:U.time,delay:U.delay,duration:U.duration,ease:U.ease,timer:null,state:uQ})}function T$(u,f){var $=Sf(u,f);if($.state>uQ)throw Error("too late; already scheduled");return $}function cf(u,f){var $=Sf(u,f);if($.state>X6)throw Error("too late; already running");return $}function Sf(u,f){var $=u.__transition;if(!$||!($=$[f]))throw Error("transition not found");return $}function FH(u,f,$){var F=u.__transition,l;F[f]=$,$.timer=$$(U,0,$.time);function U(q){if($.state=o2,$.timer.restart(_,$.delay,$.time),$.delay<=q)_(q-$.delay)}function _(q){var T,W,A,K;if($.state!==o2)return J();for(T in F){if(K=F[T],K.name!==$.name)continue;if(K.state===X6)return F$(_);if(K.state===e2)K.state=D6,K.timer.stop(),K.on.call("interrupt",u,u.__data__,K.index,K.group),delete F[T];else if(+T<f)K.state=D6,K.timer.stop(),K.on.call("cancel",u,u.__data__,K.index,K.group),delete F[T]}if(F$(function(){if($.state===X6)$.state=e2,$.timer.restart(Q,$.delay,$.time),Q(q)}),$.state=J$,$.on.call("start",u,u.__data__,$.index,$.group),$.state!==J$)return;$.state=X6,l=Array(A=$.tween.length);for(T=0,W=-1;T<A;++T)if(K=$.tween[T].value.call(u,u.__data__,$.index,$.group))l[++W]=K;l.length=W+1}function Q(q){var T=q<$.duration?$.ease.call(null,q/$.duration):($.timer.restart(J),$.state=q$,1),W=-1,A=l.length;while(++W<A)l[W].call(u,T);if($.state===q$)$.on.call("end",u,u.__data__,$.index,$.group),J()}function J(){$.state=D6,$.timer.stop(),delete F[f];for(var q in F)return;delete u.__transition}}function V3(u,f){var $=u.__transition,F,l,U=!0,_;if(!$)return;f=f==null?null:f+"";for(_ in $){if((F=$[_]).name!==f){U=!1;continue}l=F.state>J$&&F.state<q$,F.state=D6,F.timer.stop(),F.on.call(l?"interrupt":"cancel",u,u.__data__,F.index,F.group),delete $[_]}if(U)delete u.__transition}function lH(u){return this.each(function(){V3(this,u)})}function UH(u,f){var $,F;return function(){var l=cf(this,u),U=l.tween;if(U!==$){F=$=U;for(var _=0,Q=F.length;_<Q;++_)if(F[_].name===f){F=F.slice(),F.splice(_,1);break}}l.tween=F}}function _H(u,f,$){var F,l;if(typeof $!=="function")throw Error();return function(){var U=cf(this,u),_=U.tween;if(_!==F){l=(F=_).slice();for(var Q={name:f,value:$},J=0,q=l.length;J<q;++J)if(l[J].name===f){l[J]=Q;break}if(J===q)l.push(Q)}U.tween=l}}function QH(u,f){var $=this._id;if(u+="",arguments.length<2){var F=Sf(this.node(),$).tween;for(var l=0,U=F.length,_;l<U;++l)if((_=F[l]).name===u)return _.value;return null}return this.each((f==null?UH:_H)($,u,f))}function A$(u,f,$){var F=u._id;return u.each(function(){var l=cf(this,F);(l.value||(l.value={}))[f]=$.apply(this,arguments)}),function(l){return Sf(l,F).value[f]}}function fQ(u,f){var $;return(typeof f==="number"?Of:f instanceof _0?Z3:($=_0(f))?(f=$,Z3):u$)(u,f)}function JH(u){return function(){this.removeAttribute(u)}}function qH(u){return function(){this.removeAttributeNS(u.space,u.local)}}function TH(u,f,$){var F,l=$+"",U;return function(){var _=this.getAttribute(u);return _===l?null:_===F?U:U=f(F=_,$)}}function AH(u,f,$){var F,l=$+"",U;return function(){var _=this.getAttributeNS(u.space,u.local);return _===l?null:_===F?U:U=f(F=_,$)}}function WH(u,f,$){var F,l,U;return function(){var _,Q=$(this),J;if(Q==null)return void this.removeAttribute(u);return _=this.getAttribute(u),J=Q+"",_===J?null:_===F&&J===l?U:(l=J,U=f(F=_,Q))}}function KH(u,f,$){var F,l,U;return function(){var _,Q=$(this),J;if(Q==null)return void this.removeAttributeNS(u.space,u.local);return _=this.getAttributeNS(u.space,u.local),J=Q+"",_===J?null:_===F&&J===l?U:(l=J,U=f(F=_,Q))}}function wH(u,f){var $=w3(u),F=$==="transform"?p2:fQ;return this.attrTween(u,typeof f==="function"?($.local?KH:WH)($,F,A$(this,"attr."+u,f)):f==null?($.local?qH:JH)($):($.local?AH:TH)($,F,f))}function BH(u,f){return function($){this.setAttribute(u,f.call(this,$))}}function LH(u,f){return function($){this.setAttributeNS(u.space,u.local,f.call(this,$))}}function GH(u,f){var $,F;function l(){var U=f.apply(this,arguments);if(U!==F)$=(F=U)&&LH(u,U);return $}return l._value=f,l}function HH(u,f){var $,F;function l(){var U=f.apply(this,arguments);if(U!==F)$=(F=U)&&BH(u,U);return $}return l._value=f,l}function zH(u,f){var $="attr."+u;if(arguments.length<2)return($=this.tween($))&&$._value;if(f==null)return this.tween($,null);if(typeof f!=="function")throw Error();var F=w3(u);return this.tween($,(F.local?GH:HH)(F,f))}function ZH(u,f){return function(){T$(this,u).delay=+f.apply(this,arguments)}}function YH(u,f){return f=+f,function(){T$(this,u).delay=f}}function RH(u){var f=this._id;return arguments.length?this.each((typeof u==="function"?ZH:YH)(f,u)):Sf(this.node(),f).delay}function MH(u,f){return function(){cf(this,u).duration=+f.apply(this,arguments)}}function EH(u,f){return f=+f,function(){cf(this,u).duration=f}}function VH(u){var f=this._id;return arguments.length?this.each((typeof u==="function"?MH:EH)(f,u)):Sf(this.node(),f).duration}function XH(u,f){if(typeof f!=="function")throw Error();return function(){cf(this,u).ease=f}}function DH(u){var f=this._id;return arguments.length?this.each(XH(f,u)):Sf(this.node(),f).ease}function OH(u,f){return function(){var $=f.apply(this,arguments);if(typeof $!=="function")throw Error();cf(this,u).ease=$}}function SH(u){if(typeof u!=="function")throw Error();return this.each(OH(this._id,u))}function jH(u){if(typeof u!=="function")u=P7(u);for(var f=this._groups,$=f.length,F=Array($),l=0;l<$;++l)for(var U=f[l],_=U.length,Q=F[l]=[],J,q=0;q<_;++q)if((J=U[q])&&u.call(J,J.__data__,q,U))Q.push(J);return new J0(F,this._parents,this._name,this._id)}function NH(u){if(u._id!==this._id)throw Error();for(var f=this._groups,$=u._groups,F=f.length,l=$.length,U=Math.min(F,l),_=Array(F),Q=0;Q<U;++Q)for(var J=f[Q],q=$[Q],T=J.length,W=_[Q]=Array(T),A,K=0;K<T;++K)if(A=J[K]||q[K])W[K]=A;for(;Q<F;++Q)_[Q]=f[Q];return new J0(_,this._parents,this._name,this._id)}function IH(u){return(u+"").trim().split(/^|\s+/).every(function(f){var $=f.indexOf(".");if($>=0)f=f.slice(0,$);return!f||f==="start"})}function yH(u,f,$){var F,l,U=IH(f)?T$:cf;return function(){var _=U(this,u),Q=_.on;if(Q!==F)(l=(F=Q).copy()).on(f,$);_.on=l}}function kH(u,f){var $=this._id;return arguments.length<2?Sf(this.node(),$).on.on(u):this.each(yH($,u,f))}function PH(u){return function(){var f=this.parentNode;for(var $ in this.__transition)if(+$!==u)return;if(f)f.removeChild(this)}}function rH(){return this.on("end.remove",PH(this._id))}function CH(u){var f=this._name,$=this._id;if(typeof u!=="function")u=J6(u);for(var F=this._groups,l=F.length,U=Array(l),_=0;_<l;++_)for(var Q=F[_],J=Q.length,q=U[_]=Array(J),T,W,A=0;A<J;++A)if((T=Q[A])&&(W=u.call(T,T.__data__,A,Q))){if("__data__"in T)W.__data__=T.__data__;q[A]=W,O6(q[A],f,$,A,q,Sf(T,$))}return new J0(U,this._parents,f,$)}function hH(u){var f=this._name,$=this._id;if(typeof u!=="function")u=k7(u);for(var F=this._groups,l=F.length,U=[],_=[],Q=0;Q<l;++Q)for(var J=F[Q],q=J.length,T,W=0;W<q;++W)if(T=J[W]){for(var A=u.call(T,T.__data__,W,J),K,L=Sf(T,$),z=0,Z=A.length;z<Z;++z)if(K=A[z])O6(K,f,$,z,A,L);U.push(A),_.push(T)}return new J0(U,_,f,$)}var vH=q1.prototype.constructor;function xH(){return new vH(this._groups,this._parents)}function cH(u,f){var $,F,l;return function(){var U=J1(this,u),_=(this.style.removeProperty(u),J1(this,u));return U===_?null:U===$&&_===F?l:l=f($=U,F=_)}}function $Q(u){return function(){this.style.removeProperty(u)}}function mH(u,f,$){var F,l=$+"",U;return function(){var _=J1(this,u);return _===l?null:_===F?U:U=f(F=_,$)}}function pH(u,f,$){var F,l,U;return function(){var _=J1(this,u),Q=$(this),J=Q+"";if(Q==null)J=Q=(this.style.removeProperty(u),J1(this,u));return _===J?null:_===F&&J===l?U:(l=J,U=f(F=_,Q))}}function bH(u,f){var $,F,l,U="style."+f,_="end."+U,Q;return function(){var J=cf(this,u),q=J.on,T=J.value[U]==null?Q||(Q=$Q(f)):void 0;if(q!==$||l!==T)(F=($=q).copy()).on(_,l=T);J.on=F}}function iH(u,f,$){var F=(u+="")==="transform"?m2:fQ;return f==null?this.styleTween(u,cH(u,F)).on("end.style."+u,$Q(u)):typeof f==="function"?this.styleTween(u,pH(u,F,A$(this,"style."+u,f))).each(bH(this._id,u)):this.styleTween(u,mH(u,F,f),$).on("end.style."+u,null)}function gH(u,f,$){return function(F){this.style.setProperty(u,f.call(this,F),$)}}function sH(u,f,$){var F,l;function U(){var _=f.apply(this,arguments);if(_!==l)F=(l=_)&&gH(u,_,$);return F}return U._value=f,U}function tH(u,f,$){var F="style."+(u+="");if(arguments.length<2)return(F=this.tween(F))&&F._value;if(f==null)return this.tween(F,null);if(typeof f!=="function")throw Error();return this.tween(F,sH(u,f,$==null?"":$))}function nH(u){return function(){this.textContent=u}}function dH(u){return function(){var f=u(this);this.textContent=f==null?"":f}}function aH(u){return this.tween("text",typeof u==="function"?dH(A$(this,"text",u)):nH(u==null?"":u+""))}function oH(u){return function(f){this.textContent=u.call(this,f)}}function eH(u){var f,$;function F(){var l=u.apply(this,arguments);if(l!==$)f=($=l)&&oH(l);return f}return F._value=u,F}function uz(u){var f="text";if(arguments.length<1)return(f=this.tween(f))&&f._value;if(u==null)return this.tween(f,null);if(typeof u!=="function")throw Error();return this.tween(f,eH(u))}function fz(){var u=this._name,f=this._id,$=FQ();for(var F=this._groups,l=F.length,U=0;U<l;++U)for(var _=F[U],Q=_.length,J,q=0;q<Q;++q)if(J=_[q]){var T=Sf(J,f);O6(J,u,$,q,_,{time:T.time+T.delay+T.duration,delay:0,duration:T.duration,ease:T.ease})}return new J0(F,this._parents,u,$)}function $z(){var u,f,$=this,F=$._id,l=$.size();return new Promise(function(U,_){var Q={value:_},J={value:function(){if(--l===0)U()}};if($.each(function(){var q=cf(this,F),T=q.on;if(T!==u)f=(u=T).copy(),f._.cancel.push(Q),f._.interrupt.push(Q),f._.end.push(J);q.on=f}),l===0)U()})}var Fz=0;function J0(u,f,$,F){this._groups=u,this._parents=f,this._name=$,this._id=F}function lz(u){return q1().transition(u)}function FQ(){return++Fz}var Q0=q1.prototype;J0.prototype=lz.prototype={constructor:J0,select:CH,selectAll:hH,selectChild:Q0.selectChild,selectChildren:Q0.selectChildren,filter:jH,merge:NH,selection:xH,transition:fz,call:Q0.call,nodes:Q0.nodes,node:Q0.node,size:Q0.size,empty:Q0.empty,each:Q0.each,on:kH,attr:wH,attrTween:zH,style:iH,styleTween:tH,text:aH,textTween:uz,remove:rH,tween:QH,delay:RH,duration:VH,ease:DH,easeVarying:SH,end:$z,[Symbol.iterator]:Q0[Symbol.iterator]};var Uz={time:null,delay:0,duration:250,ease:a2};function _z(u,f){var $;while(!($=u.__transition)||!($=$[f]))if(!(u=u.parentNode))throw Error(`transition ${f} not found`);return $}function Qz(u){var f,$;if(u instanceof J0)f=u._id,u=u._name;else f=FQ(),($=Uz).time=E6(),u=u==null?null:u+"";for(var F=this._groups,l=F.length,U=0;U<l;++U)for(var _=F[U],Q=_.length,J,q=0;q<Q;++q)if(J=_[q])O6(J,u,f,q,_,$||_z(J,f));return new J0(F,this._parents,u,f)}q1.prototype.interrupt=lH;q1.prototype.transition=Qz;var S6=(u)=>()=>u;function Jz(u,{sourceEvent:f,target:$,transform:F,dispatch:l}){Object.defineProperties(this,{type:{value:u,enumerable:!0,configurable:!0},sourceEvent:{value:f,enumerable:!0,configurable:!0},target:{value:$,enumerable:!0,configurable:!0},transform:{value:F,enumerable:!0,configurable:!0},_:{value:l}})}function q0(u,f,$){this.k=u,this.x=f,this.y=$}q0.prototype={constructor:q0,scale:function(u){return u===1?this:new q0(this.k*u,this.x,this.y)},translate:function(u,f){return u===0&f===0?this:new q0(this.k,this.x+this.k*u,this.y+this.k*f)},apply:function(u){return[u[0]*this.k+this.x,u[1]*this.k+this.y]},applyX:function(u){return u*this.k+this.x},applyY:function(u){return u*this.k+this.y},invert:function(u){return[(u[0]-this.x)/this.k,(u[1]-this.y)/this.k]},invertX:function(u){return(u-this.x)/this.k},invertY:function(u){return(u-this.y)/this.k},rescaleX:function(u){return u.copy().domain(u.range().map(this.invertX,this).map(u.invert,u))},rescaleY:function(u){return u.copy().domain(u.range().map(this.invertY,this).map(u.invert,u))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var D3=new q0(1,0,0);K$.prototype=q0.prototype;function K$(u){while(!u.__zoom)if(!(u=u.parentNode))return D3;return u.__zoom}function W$(u){u.stopImmediatePropagation()}function X3(u){u.preventDefault(),u.stopImmediatePropagation()}function qz(u){return(!u.ctrlKey||u.type==="wheel")&&!u.button}function Tz(){var u=this;if(u instanceof SVGElement){if(u=u.ownerSVGElement||u,u.hasAttribute("viewBox"))return u=u.viewBox.baseVal,[[u.x,u.y],[u.x+u.width,u.y+u.height]];return[[0,0],[u.width.baseVal.value,u.height.baseVal.value]]}return[[0,0],[u.clientWidth,u.clientHeight]]}function lQ(){return this.__zoom||D3}function Az(u){return-u.deltaY*(u.deltaMode===1?0.05:u.deltaMode?1:0.002)*(u.ctrlKey?10:1)}function Wz(){return navigator.maxTouchPoints||"ontouchstart"in this}function Kz(u,f,$){var F=u.invertX(f[0][0])-$[0][0],l=u.invertX(f[1][0])-$[1][0],U=u.invertY(f[0][1])-$[0][1],_=u.invertY(f[1][1])-$[1][1];return u.translate(l>F?(F+l)/2:Math.min(0,F)||Math.max(0,l),_>U?(U+_)/2:Math.min(0,U)||Math.max(0,_))}function w$(){var u=qz,f=Tz,$=Kz,F=Az,l=Wz,U=[0,1/0],_=[[-1/0,-1/0],[1/0,1/0]],Q=250,J=U4,q=Q1("start","zoom","end"),T,W,A,K=500,L=150,z=0,Z=10;function B(Y){Y.property("__zoom",lQ).on("wheel.zoom",V,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",r).filter(l).on("touchstart.zoom",C).on("touchmove.zoom",m).on("touchend.zoom touchcancel.zoom",v).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}B.transform=function(Y,X,O,j){var k=Y.selection?Y.selection():Y;if(k.property("__zoom",lQ),Y!==k)M(Y,X,O,j);else k.interrupt().each(function(){R(this,arguments).event(j).start().zoom(null,typeof X==="function"?X.apply(this,arguments):X).end()})},B.scaleBy=function(Y,X,O,j){B.scaleTo(Y,function(){var k=this.__zoom.k,P=typeof X==="function"?X.apply(this,arguments):X;return k*P},O,j)},B.scaleTo=function(Y,X,O,j){B.transform(Y,function(){var k=f.apply(this,arguments),P=this.__zoom,c=O==null?H(k):typeof O==="function"?O.apply(this,arguments):O,x=P.invert(c),g=typeof X==="function"?X.apply(this,arguments):X;return $(w(G(P,g),c,x),k,_)},O,j)},B.translateBy=function(Y,X,O,j){B.transform(Y,function(){return $(this.__zoom.translate(typeof X==="function"?X.apply(this,arguments):X,typeof O==="function"?O.apply(this,arguments):O),f.apply(this,arguments),_)},null,j)},B.translateTo=function(Y,X,O,j,k){B.transform(Y,function(){var P=f.apply(this,arguments),c=this.__zoom,x=j==null?H(P):typeof j==="function"?j.apply(this,arguments):j;return $(D3.translate(x[0],x[1]).scale(c.k).translate(typeof X==="function"?-X.apply(this,arguments):-X,typeof O==="function"?-O.apply(this,arguments):-O),P,_)},j,k)};function G(Y,X){return X=Math.max(U[0],Math.min(U[1],X)),X===Y.k?Y:new q0(X,Y.x,Y.y)}function w(Y,X,O){var j=X[0]-O[0]*Y.k,k=X[1]-O[1]*Y.k;return j===Y.x&&k===Y.y?Y:new q0(Y.k,j,k)}function H(Y){return[(+Y[0][0]+ +Y[1][0])/2,(+Y[0][1]+ +Y[1][1])/2]}function M(Y,X,O,j){Y.on("start.zoom",function(){R(this,arguments).event(j).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(j).end()}).tween("zoom",function(){var k=this,P=arguments,c=R(k,P).event(j),x=f.apply(k,P),g=O==null?H(x):typeof O==="function"?O.apply(k,P):O,$u=Math.max(x[1][0]-x[0][0],x[1][1]-x[0][1]),i=k.__zoom,fu=typeof X==="function"?X.apply(k,P):X,Fu=J(i.invert(g).concat($u/i.k),fu.invert(g).concat($u/fu.k));return function(uu){if(uu===1)uu=fu;else{var h=Fu(uu),n=$u/h[2];uu=new q0(n,g[0]-h[0]*n,g[1]-h[1]*n)}c.zoom(null,uu)}})}function R(Y,X,O){return!O&&Y.__zooming||new E(Y,X)}function E(Y,X){this.that=Y,this.args=X,this.active=0,this.sourceEvent=null,this.extent=f.apply(Y,X),this.taps=0}E.prototype={event:function(Y){if(Y)this.sourceEvent=Y;return this},start:function(){if(++this.active===1)this.that.__zooming=this,this.emit("start");return this},zoom:function(Y,X){if(this.mouse&&Y!=="mouse")this.mouse[1]=X.invert(this.mouse[0]);if(this.touch0&&Y!=="touch")this.touch0[1]=X.invert(this.touch0[0]);if(this.touch1&&Y!=="touch")this.touch1[1]=X.invert(this.touch1[0]);return this.that.__zoom=X,this.emit("zoom"),this},end:function(){if(--this.active===0)delete this.that.__zooming,this.emit("end");return this},emit:function(Y){var X=xu(this.that).datum();q.call(Y,this.that,new Jz(Y,{sourceEvent:this.sourceEvent,target:B,transform:this.that.__zoom,dispatch:q}),X)}};function V(Y,...X){if(!u.apply(this,arguments))return;var O=R(this,X).event(Y),j=this.__zoom,k=Math.max(U[0],Math.min(U[1],j.k*Math.pow(2,F.apply(this,arguments)))),P=du(Y);if(O.wheel){if(O.mouse[0][0]!==P[0]||O.mouse[0][1]!==P[1])O.mouse[1]=j.invert(O.mouse[0]=P);clearTimeout(O.wheel)}else if(j.k===k)return;else O.mouse=[P,j.invert(P)],V3(this),O.start();X3(Y),O.wheel=setTimeout(c,L),O.zoom("mouse",$(w(G(j,k),O.mouse[0],O.mouse[1]),O.extent,_));function c(){O.wheel=null,O.end()}}function D(Y,...X){if(A||!u.apply(this,arguments))return;var O=Y.currentTarget,j=R(this,X,!0).event(Y),k=xu(Y.view).on("mousemove.zoom",g,!0).on("mouseup.zoom",$u,!0),P=du(Y,O),c=Y.clientX,x=Y.clientY;v7(Y.view),W$(Y),j.mouse=[P,this.__zoom.invert(P)],V3(this),j.start();function g(i){if(X3(i),!j.moved){var fu=i.clientX-c,Fu=i.clientY-x;j.moved=fu*fu+Fu*Fu>z}j.event(i).zoom("mouse",$(w(j.that.__zoom,j.mouse[0]=du(i,O),j.mouse[1]),j.extent,_))}function $u(i){k.on("mousemove.zoom mouseup.zoom",null),x7(i.view,j.moved),X3(i),j.event(i).end()}}function r(Y,...X){if(!u.apply(this,arguments))return;var O=this.__zoom,j=du(Y.changedTouches?Y.changedTouches[0]:Y,this),k=O.invert(j),P=O.k*(Y.shiftKey?0.5:2),c=$(w(G(O,P),j,k),f.apply(this,X),_);if(X3(Y),Q>0)xu(this).transition().duration(Q).call(M,c,j,Y);else xu(this).call(B.transform,c,j,Y)}function C(Y,...X){if(!u.apply(this,arguments))return;var O=Y.touches,j=O.length,k=R(this,X,Y.changedTouches.length===j).event(Y),P,c,x,g;W$(Y);for(c=0;c<j;++c)if(x=O[c],g=du(x,this),g=[g,this.__zoom.invert(g),x.identifier],!k.touch0)k.touch0=g,P=!0,k.taps=1+!!T;else if(!k.touch1&&k.touch0[2]!==g[2])k.touch1=g,k.taps=0;if(T)T=clearTimeout(T);if(P){if(k.taps<2)W=g[0],T=setTimeout(function(){T=null},K);V3(this),k.start()}}function m(Y,...X){if(!this.__zooming)return;var O=R(this,X).event(Y),j=Y.changedTouches,k=j.length,P,c,x,g;X3(Y);for(P=0;P<k;++P)if(c=j[P],x=du(c,this),O.touch0&&O.touch0[2]===c.identifier)O.touch0[0]=x;else if(O.touch1&&O.touch1[2]===c.identifier)O.touch1[0]=x;if(c=O.that.__zoom,O.touch1){var $u=O.touch0[0],i=O.touch0[1],fu=O.touch1[0],Fu=O.touch1[1],uu=(uu=fu[0]-$u[0])*uu+(uu=fu[1]-$u[1])*uu,h=(h=Fu[0]-i[0])*h+(h=Fu[1]-i[1])*h;c=G(c,Math.sqrt(uu/h)),x=[($u[0]+fu[0])/2,($u[1]+fu[1])/2],g=[(i[0]+Fu[0])/2,(i[1]+Fu[1])/2]}else if(O.touch0)x=O.touch0[0],g=O.touch0[1];else return;O.zoom("touch",$(w(c,x,g),O.extent,_))}function v(Y,...X){if(!this.__zooming)return;var O=R(this,X).event(Y),j=Y.changedTouches,k=j.length,P,c;if(W$(Y),A)clearTimeout(A);A=setTimeout(function(){A=null},K);for(P=0;P<k;++P)if(c=j[P],O.touch0&&O.touch0[2]===c.identifier)delete O.touch0;else if(O.touch1&&O.touch1[2]===c.identifier)delete O.touch1;if(O.touch1&&!O.touch0)O.touch0=O.touch1,delete O.touch1;if(O.touch0)O.touch0[1]=this.__zoom.invert(O.touch0[0]);else if(O.end(),O.taps===2){if(c=du(c,this),Math.hypot(W[0]-c[0],W[1]-c[1])<Z){var x=xu(this).on("dblclick.zoom");if(x)x.apply(this,arguments)}}}return B.wheelDelta=function(Y){return arguments.length?(F=typeof Y==="function"?Y:S6(+Y),B):F},B.filter=function(Y){return arguments.length?(u=typeof Y==="function"?Y:S6(!!Y),B):u},B.touchable=function(Y){return arguments.length?(l=typeof Y==="function"?Y:S6(!!Y),B):l},B.extent=function(Y){return arguments.length?(f=typeof Y==="function"?Y:S6([[+Y[0][0],+Y[0][1]],[+Y[1][0],+Y[1][1]]]),B):f},B.scaleExtent=function(Y){return arguments.length?(U[0]=+Y[0],U[1]=+Y[1],B):[U[0],U[1]]},B.translateExtent=function(Y){return arguments.length?(_[0][0]=+Y[0][0],_[1][0]=+Y[1][0],_[0][1]=+Y[0][1],_[1][1]=+Y[1][1],B):[[_[0][0],_[0][1]],[_[1][0],_[1][1]]]},B.constrain=function(Y){return arguments.length?($=Y,B):$},B.duration=function(Y){return arguments.length?(Q=+Y,B):Q},B.interpolate=function(Y){return arguments.length?(J=Y,B):J},B.on=function(){var Y=q.on.apply(q,arguments);return Y===q?B:Y},B.clickDistance=function(Y){return arguments.length?(z=(Y=+Y)*Y,B):Math.sqrt(z)},B.tapDistance=function(Y){return arguments.length?(Z=+Y,B):Z},B}var Uf={error001:(u="react")=>`Seems like you have not used ${u==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${u}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:(u)=>`Node type "${u}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:(u)=>`The old edge with id=${u} does not exist.`,error009:(u)=>`Marker type "${u}" doesn't exist.`,error008:(u,{id:f,sourceHandle:$,targetHandle:F})=>`Couldn't create edge for ${u} handle id: "${u==="source"?$:F}", edge id: ${f}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:(u)=>`Edge type "${u}" not found. Using fallback type "default".`,error012:(u)=>`Node with id "${u}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(u="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${u}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:(u)=>`Edge with id "${u}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},T4=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],z$=["Enter"," ","Escape"],Z$={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:u,x:f,y:$})=>`Moved selected node ${u}. New position, x: ${f}, y: ${$}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},h0;(function(u){u.Strict="strict",u.Loose="loose"})(h0||(h0={}));var T0;(function(u){u.Free="free",u.Vertical="vertical",u.Horizontal="horizontal"})(T0||(T0={}));var B1;(function(u){u.Partial="partial",u.Full="full"})(B1||(B1={}));var Y$={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},mf;(function(u){u.Bezier="default",u.Straight="straight",u.Step="step",u.SmoothStep="smoothstep",u.SimpleBezier="simplebezier"})(mf||(mf={}));var pf;(function(u){u.Arrow="arrow",u.ArrowClosed="arrowclosed"})(pf||(pf={}));var a;(function(u){u.Left="left",u.Top="top",u.Right="right",u.Bottom="bottom"})(a||(a={}));var UQ={[a.Left]:a.Right,[a.Right]:a.Left,[a.Top]:a.Bottom,[a.Bottom]:a.Top},R$=(u)=>!!u&&typeof u==="object"&&("id"in u)&&("source"in u)&&("target"in u),zQ=(u)=>!!u&&typeof u==="object"&&("id"in u)&&("position"in u)&&!("source"in u)&&!("target"in u),M$=(u)=>!!u&&typeof u==="object"&&("id"in u)&&("internals"in u)&&!("source"in u)&&!("target"in u);var S3=(u,f=[0,0])=>{let{width:$,height:F}=Bf(u),l=u.origin??f,U=$*l[0],_=F*l[1];return{x:u.position.x-U,y:u.position.y-_}},E$=(u,f={nodeOrigin:[0,0]})=>{if(u.length===0)return{x:0,y:0,width:0,height:0};let $=!1,F=u.reduce((l,U)=>{let _=typeof U==="string",Q=!f.nodeLookup&&!_?U:void 0;if(f.nodeLookup)Q=_?f.nodeLookup.get(U):!M$(U)?f.nodeLookup.get(U.id):U;if(!Q)return l;return $=!0,P6(l,I6(Q,f.nodeOrigin))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return $?r6(F):{x:0,y:0,width:0,height:0}},A4=(u,f={})=>{let $={x:1/0,y:1/0,x2:-1/0,y2:-1/0},F=!1;return u.forEach((l)=>{if(f.filter===void 0||f.filter(l))$=P6($,I6(l)),F=!0}),F?r6($):{x:0,y:0,width:0,height:0}},y6=(u,f,[$,F,l]=[0,0,1],U=!1,_=!1)=>{let Q=(f.x-$)/l,J=(f.y-F)/l,q=f.width/l,T=f.height/l,W=[];for(let A of u.values()){let{measured:K,selectable:L=!0,hidden:z=!1}=A;if(_&&!L||z)continue;let Z=K.width??A.width??A.initialWidth??0,B=K.height??A.height??A.initialHeight??0,{x:G,y:w}=A.internals.positionAbsolute,H=EQ(Q,J,q,T,G,w,Z,B),M=Z*B,R=U&&H>0;if(!A.internals.handleBounds||R||H>=M||A.dragging)W.push(A)}return W},ZQ=(u,f)=>{let $=new Set;return u.forEach((F)=>{$.add(F.id)}),f.filter((F)=>$.has(F.source)||$.has(F.target))};function wz(u,f){let $=new Map,F=f?.nodes?new Set(f.nodes.map((l)=>l.id)):null;return u.forEach((l)=>{let U;if(f?.includeHiddenNodes){let{width:_,height:Q}=Bf(l);U=_>0&&Q>0}else U=Boolean(l.measured.width&&l.measured.height&&!l.hidden);if(U&&(!F||F.has(l.id)))$.set(l.id,l)}),$}async function YQ({nodes:u,width:f,height:$,panZoom:F,minZoom:l,maxZoom:U},_){if(u.size===0)return!0;let Q=wz(u,_),J=A4(Q),q=N3(J,f,$,_?.minZoom??l,_?.maxZoom??U,_?.padding??0.1);return await F.setViewport(q,{duration:_?.duration,ease:_?.ease,interpolate:_?.interpolate}),!0}function V$({nodeId:u,nextPosition:f,nodeLookup:$,nodeOrigin:F=[0,0],nodeExtent:l,onError:U}){let _=$.get(u),Q=_.parentId?$.get(_.parentId):void 0,{x:J,y:q}=Q?Q.internals.positionAbsolute:{x:0,y:0},T=_.origin??F,W=_.extent||l;if(_.extent==="parent"&&!_.expandParent)if(!Q)U?.("005",Uf.error005());else{let{width:K,height:L}=Bf(Q);if(K&&L)W=[[J,q],[J+K,q+L]]}else if(Q&&H1(_.extent))W=[[_.extent[0][0]+J,_.extent[0][1]+q],[_.extent[1][0]+J,_.extent[1][1]+q]];let A=H1(W)?L1(f,W,_.measured):f;if(_.measured.width===void 0||_.measured.height===void 0)U?.("015",Uf.error015());return{position:{x:A.x-J+(_.measured.width??0)*T[0],y:A.y-q+(_.measured.height??0)*T[1]},positionAbsolute:A}}async function RQ({nodesToRemove:u=[],edgesToRemove:f=[],nodes:$,edges:F,onBeforeDelete:l}){let U=new Set(u.map((A)=>A.id)),_=[];for(let A of $){if(A.deletable===!1)continue;let K=U.has(A.id),L=!K&&A.parentId&&_.find((z)=>z.id===A.parentId);if(K||L)_.push(A)}let Q=new Set(f.map((A)=>A.id)),J=F.filter((A)=>A.deletable!==!1),T=ZQ(_,J);for(let A of J)if(Q.has(A.id)&&!T.find((L)=>L.id===A.id))T.push(A);if(!l)return{edges:T,nodes:_};let W=await l({nodes:_,edges:T});if(typeof W==="boolean")return W?{edges:T,nodes:_}:{edges:[],nodes:[]};return W}var q4=(u,f=0,$=1)=>Math.min(Math.max(u,f),$),L1=(u={x:0,y:0},f,$)=>({x:q4(u.x,f[0][0],f[1][0]-($?.width??0)),y:q4(u.y,f[0][1],f[1][1]-($?.height??0))});function MQ(u,f,$){let{width:F,height:l}=Bf($),{x:U,y:_}=$.internals.positionAbsolute;return L1(u,[[U,_],[U+F,_+l]],f)}var _Q=(u,f,$)=>{if(u<f)return q4(Math.abs(u-f),1,f)/f;else if(u>$)return-q4(Math.abs(u-$),1,f)/f;return 0},k6=(u,f,$=15,F=40)=>{let l=_Q(u.x,F,f.width-F)*$,U=_Q(u.y,F,f.height-F)*$;return[l,U]},P6=(u,f)=>({x:Math.min(u.x,f.x),y:Math.min(u.y,f.y),x2:Math.max(u.x2,f.x2),y2:Math.max(u.y2,f.y2)}),H$=({x:u,y:f,width:$,height:F})=>({x:u,y:f,x2:u+$,y2:f+F}),r6=({x:u,y:f,x2:$,y2:F})=>({x:u,y:f,width:$-u,height:F-f}),W4=(u,f=[0,0])=>{let{x:$,y:F}=M$(u)?u.internals.positionAbsolute:S3(u,f);return{x:$,y:F,width:u.measured?.width??u.width??u.initialWidth??0,height:u.measured?.height??u.height??u.initialHeight??0}},I6=(u,f=[0,0])=>{let{x:$,y:F}=M$(u)?u.internals.positionAbsolute:S3(u,f);return{x:$,y:F,x2:$+(u.measured?.width??u.width??u.initialWidth??0),y2:F+(u.measured?.height??u.height??u.initialHeight??0)}},X$=(u,f)=>r6(P6(H$(u),H$(f))),EQ=(u,f,$,F,l,U,_,Q)=>{let J=Math.max(0,Math.min(u+$,l+_)-Math.max(u,l)),q=Math.max(0,Math.min(f+F,U+Q)-Math.max(f,U));return Math.ceil(J*q)},j3=(u,f)=>EQ(u.x,u.y,u.width,u.height,f.x,f.y,f.width,f.height),D$=(u)=>Kf(u.width)&&Kf(u.height)&&Kf(u.x)&&Kf(u.y),Kf=(u)=>!isNaN(u)&&isFinite(u),O$=(u,f)=>($,F)=>{},K4=(u,f=[1,1])=>{return{x:f[0]*Math.round(u.x/f[0]),y:f[1]*Math.round(u.y/f[1])}},w4=({x:u,y:f},[$,F,l],U=!1,_=[1,1])=>{let Q={x:(u-$)/l,y:(f-F)/l};return U?K4(Q,_):Q},G1=({x:u,y:f},[$,F,l])=>{return{x:u*l+$,y:f*l+F}};function J4(u,f){if(typeof u==="number")return Math.floor((f-f/(1+u))*0.5);if(typeof u==="string"&&u.endsWith("px")){let $=parseFloat(u);if(!Number.isNaN($))return Math.floor($)}if(typeof u==="string"&&u.endsWith("%")){let $=parseFloat(u);if(!Number.isNaN($))return Math.floor(f*$*0.01)}return console.error(`The padding value "${u}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Bz(u,f,$){if(typeof u==="string"||typeof u==="number"){let F=J4(u,$),l=J4(u,f);return{top:F,right:l,bottom:F,left:l,x:l*2,y:F*2}}if(typeof u==="object"){let F=J4(u.top??u.y??0,$),l=J4(u.bottom??u.y??0,$),U=J4(u.left??u.x??0,f),_=J4(u.right??u.x??0,f);return{top:F,right:_,bottom:l,left:U,x:U+_,y:F+l}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Lz(u,f,$,F,l,U){let{x:_,y:Q}=G1(u,[f,$,F]),{x:J,y:q}=G1({x:u.x+u.width,y:u.y+u.height},[f,$,F]),T=l-J,W=U-q;return{left:Math.floor(_),top:Math.floor(Q),right:Math.floor(T),bottom:Math.floor(W)}}var N3=(u,f,$,F,l,U)=>{let _=Bz(U,f,$),Q=(f-_.x)/u.width,J=($-_.y)/u.height,q=Math.min(Q,J),T=q4(q,F,l),W=u.x+u.width/2,A=u.y+u.height/2,K=f/2-W*T,L=$/2-A*T,z=Lz(u,K,L,T,f,$),Z={left:Math.min(z.left-_.left,0),top:Math.min(z.top-_.top,0),right:Math.min(z.right-_.right,0),bottom:Math.min(z.bottom-_.bottom,0)};return{x:K-Z.left+Z.right,y:L-Z.top+Z.bottom,zoom:T}},B4=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function H1(u){return u!==void 0&&u!==null&&u!=="parent"}function Bf(u){return{width:u.measured?.width??u.width??u.initialWidth??0,height:u.measured?.height??u.height??u.initialHeight??0}}function S$(u){return(u.measured?.width??u.width??u.initialWidth)!==void 0&&(u.measured?.height??u.height??u.initialHeight)!==void 0}function j$(u,f={width:0,height:0},$,F,l){let U={...u},_=F.get($);if(_){let Q=_.origin||l;U.x+=_.internals.positionAbsolute.x-(f.width??0)*Q[0],U.y+=_.internals.positionAbsolute.y-(f.height??0)*Q[1]}return U}function N$(u,f){if(u.size!==f.size)return!1;for(let $ of u)if(!f.has($))return!1;return!0}function VQ(){let u,f;return{promise:new Promise((F,l)=>{u=F,f=l}),resolve:u,reject:f}}function XQ(u){return{...Z$,...u||{}}}function Gz(u){if(typeof document>"u")return!0;let f=document.querySelector(`.${u}-flow__pane`);if(!f||!f.isConnected)return!0;let $=getComputedStyle(f);if($.display==="none")return!0;if($.visibility==="hidden"||$.visibility==="collapse")return!0;if($.opacity==="0")return!0;if($.width==="0"&&$.height==="0")return!0;let F=f.getBoundingClientRect();if(F.width===0&&F.height===0)return!0;let l=document.querySelector(`.${u}-flow__attribution`);if(!l||!l.isConnected)return!1;let U=getComputedStyle(l);if(U.display==="none")return!1;if(U.visibility==="hidden"||U.visibility==="collapse")return!1;if(U.opacity==="0")return!1;let _=l.getBoundingClientRect();if(_.width===0&&_.height===0)return!1;return!0}var QQ=!1;function DQ(u){return}function I$(u){return u===null?null:u?"valid":"invalid"}function O3(u,{snapGrid:f=[0,0],snapToGrid:$=!1,transform:F,containerBounds:l}){let{x:U,y:_}=wf(u),Q=w4({x:U-(l?.left??0),y:_-(l?.top??0)},F),{x:J,y:q}=$?K4(Q,f):Q;return{xSnapped:J,ySnapped:q,...Q}}var C6=(u)=>({width:u.offsetWidth,height:u.offsetHeight}),y$=(u)=>u?.getRootNode?.()||window?.document,Hz=["INPUT","SELECT","TEXTAREA"];function k$(u){let f=u.composedPath?.()?.[0]||u.target;if(f?.nodeType!==1)return!1;return Hz.includes(f.nodeName)||f.hasAttribute("contenteditable")||!!f.closest(".nokey")}var P$=(u)=>("clientX"in u),wf=(u,f)=>{let $=P$(u),F=$?u.clientX:u.touches?.[0].clientX,l=$?u.clientY:u.touches?.[0].clientY;return{x:F-(f?.left??0),y:l-(f?.top??0)}},JQ=(u,f,$,F,l)=>{let U=f.querySelectorAll(`.${u}`);if(!U||!U.length)return null;return Array.from(U).map((_)=>{let Q=_.getBoundingClientRect();return{id:_.getAttribute("data-handleid"),type:u,nodeId:l,position:_.getAttribute("data-handlepos"),x:(Q.left-$.left)/F,y:(Q.top-$.top)/F,...C6(_)}})};function h6({sourceX:u,sourceY:f,targetX:$,targetY:F,sourceControlX:l,sourceControlY:U,targetControlX:_,targetControlY:Q}){let J=u*0.125+l*0.375+_*0.375+$*0.125,q=f*0.125+U*0.375+Q*0.375+F*0.125,T=Math.abs(J-u),W=Math.abs(q-f);return[J,q,T,W]}function j6(u,f){if(u>=0)return 0.5*u;return f*25*Math.sqrt(-u)}function qQ({pos:u,x1:f,y1:$,x2:F,y2:l,c:U}){switch(u){case a.Left:return[f-j6(f-F,U),$];case a.Right:return[f+j6(F-f,U),$];case a.Top:return[f,$-j6($-l,U)];case a.Bottom:return[f,$+j6(l-$,U)]}}function v6({sourceX:u,sourceY:f,sourcePosition:$=a.Bottom,targetX:F,targetY:l,targetPosition:U=a.Top,curvature:_=0.25}){let[Q,J]=qQ({pos:$,x1:u,y1:f,x2:F,y2:l,c:_}),[q,T]=qQ({pos:U,x1:F,y1:l,x2:u,y2:f,c:_}),[W,A,K,L]=h6({sourceX:u,sourceY:f,targetX:F,targetY:l,sourceControlX:Q,sourceControlY:J,targetControlX:q,targetControlY:T});return[`M${u},${f} C${Q},${J} ${q},${T} ${F},${l}`,W,A,K,L]}function r$({sourceX:u,sourceY:f,targetX:$,targetY:F}){let l=Math.abs($-u)/2,U=$<u?$+l:$-l,_=Math.abs(F-f)/2,Q=F<f?F+_:F-_;return[U,Q,l,_]}function OQ({sourceNode:u,targetNode:f,selected:$=!1,zIndex:F=0,elevateOnSelect:l=!1,zIndexMode:U="basic"}){if(U==="manual")return F;let _=l&&$?F+1000:F,Q=Math.max(u.parentId||l&&u.selected?u.internals.z:0,f.parentId||l&&f.selected?f.internals.z:0);return _+Q}function SQ({sourceNode:u,targetNode:f,width:$,height:F,transform:l}){let U=P6(I6(u),I6(f));if(U.x===U.x2)U.x2+=1;if(U.y===U.y2)U.y2+=1;let _={x:-l[0]/l[2],y:-l[1]/l[2],width:$/l[2],height:F/l[2]};return j3(_,r6(U))>0}var zz=({source:u,sourceHandle:f,target:$,targetHandle:F})=>`xy-edge__${u}${f||""}-${$}${F||""}`,Zz=(u,f)=>{return f.some(($)=>$.source===u.source&&$.target===u.target&&($.sourceHandle===u.sourceHandle||!$.sourceHandle&&!u.sourceHandle)&&($.targetHandle===u.targetHandle||!$.targetHandle&&!u.targetHandle))},jQ=(u,f,$={})=>{if(!u.source||!u.target)return $.onError?.("006",Uf.error006()),f;let F=$.getEdgeId||zz,l;if(R$(u))l={...u};else l={...u,id:F(u)};if(Zz(l,f))return f;if(l.sourceHandle===null)delete l.sourceHandle;if(l.targetHandle===null)delete l.targetHandle;return f.concat(l)};function x6({sourceX:u,sourceY:f,targetX:$,targetY:F}){let[l,U,_,Q]=r$({sourceX:u,sourceY:f,targetX:$,targetY:F});return[`M ${u},${f}L ${$},${F}`,l,U,_,Q]}var TQ={[a.Left]:{x:-1,y:0},[a.Right]:{x:1,y:0},[a.Top]:{x:0,y:-1},[a.Bottom]:{x:0,y:1}},Yz=({source:u,sourcePosition:f=a.Bottom,target:$})=>{if(f===a.Left||f===a.Right)return u.x<$.x?{x:1,y:0}:{x:-1,y:0};return u.y<$.y?{x:0,y:1}:{x:0,y:-1}},AQ=(u,f)=>Math.sqrt(Math.pow(f.x-u.x,2)+Math.pow(f.y-u.y,2)),Rz=(u,f,$)=>u.x===f.x&&f.x===$.x&&(f.y-u.y)*($.y-f.y)>=0||u.y===f.y&&f.y===$.y&&(f.x-u.x)*($.x-f.x)>=0;function Mz({source:u,sourcePosition:f=a.Bottom,target:$,targetPosition:F=a.Top,center:l,offset:U,stepPosition:_}){let Q=TQ[f],J=TQ[F],q={x:u.x+Q.x*U,y:u.y+Q.y*U},T={x:$.x+J.x*U,y:$.y+J.y*U},W=Yz({source:q,sourcePosition:f,target:T}),A=W.x!==0?"x":"y",K=W[A],L=[],z,Z,B={x:0,y:0},G={x:0,y:0},[,,w,H]=r$({sourceX:u.x,sourceY:u.y,targetX:$.x,targetY:$.y});if(Q[A]*J[A]===-1){if(A==="x")z=l.x??q.x+(T.x-q.x)*_,Z=l.y??(q.y+T.y)/2;else z=l.x??(q.x+T.x)/2,Z=l.y??q.y+(T.y-q.y)*_;let V=[{x:z,y:q.y},{x:z,y:T.y}],D=[{x:q.x,y:Z},{x:T.x,y:Z}];if(Q[A]===K)L=A==="x"?V:D;else L=A==="x"?D:V}else{let V=[{x:q.x,y:T.y}],D=[{x:T.x,y:q.y}];if(A==="x")L=Q.x===K?D:V;else L=Q.y===K?V:D;if(f===F){let Y=Math.abs(u[A]-$[A]);if(Y<=U){let X=Math.min(U-1,U-Y);if(Q[A]===K)B[A]=(q[A]>u[A]?-1:1)*X;else G[A]=(T[A]>$[A]?-1:1)*X}}if(f!==F){let Y=A==="x"?"y":"x",X=Q[A]===J[Y],O=q[Y]>T[Y],j=q[Y]<T[Y];if(Q[A]===1&&(!X&&O||X&&j)||Q[A]!==1&&(!X&&j||X&&O))L=A==="x"?V:D}let r={x:q.x+B.x,y:q.y+B.y},C={x:T.x+G.x,y:T.y+G.y},m=Math.max(Math.abs(r.x-L[0].x),Math.abs(C.x-L[0].x)),v=Math.max(Math.abs(r.y-L[0].y),Math.abs(C.y-L[0].y));if(m>=v)z=(r.x+C.x)/2,Z=L[0].y;else z=L[0].x,Z=(r.y+C.y)/2}let M={x:q.x+B.x,y:q.y+B.y},R={x:T.x+G.x,y:T.y+G.y},E=[];for(let V of[u,M,...L,R,$]){let[D,r]=E.slice(-2);if(r&&Rz(D,r,V))E.pop();E.push(V)}return[E,z,Z,w,H]}function Ez(u,f,$,F){let l=Math.min(AQ(u,f)/2,AQ(f,$)/2,F),{x:U,y:_}=f;if(u.x===U&&U===$.x||u.y===_&&_===$.y)return`L${U} ${_}`;if(u.y===_){let q=u.x<$.x?-1:1,T=u.y<$.y?1:-1;return`L ${U+l*q},${_}Q ${U},${_} ${U},${_+l*T}`}let Q=u.x<$.x?1:-1,J=u.y<$.y?-1:1;return`L ${U},${_+l*J}Q ${U},${_} ${U+l*Q},${_}`}function I3({sourceX:u,sourceY:f,sourcePosition:$=a.Bottom,targetX:F,targetY:l,targetPosition:U=a.Top,borderRadius:_=5,centerX:Q,centerY:J,offset:q=20,stepPosition:T=0.5}){let[W,A,K,L,z]=Mz({source:{x:u,y:f},sourcePosition:$,target:{x:F,y:l},targetPosition:U,center:{x:Q,y:J},offset:q,stepPosition:T}),Z=`M${W[0].x} ${W[0].y}`;for(let B=1;B<W.length-1;B++)Z+=Ez(W[B-1],W[B],W[B+1],_);return Z+=`L${W[W.length-1].x} ${W[W.length-1].y}`,[Z,A,K,L,z]}function WQ(u){return u&&!!(u.internals.handleBounds||u.handles?.length)&&!!(u.measured.width||u.width||u.initialWidth)}function NQ(u){let{sourceNode:f,targetNode:$}=u;if(!WQ(f)||!WQ($))return null;let F=f.internals.handleBounds||KQ(f.handles),l=$.internals.handleBounds||KQ($.handles),U=wQ(F?.source??[],u.sourceHandle),_=wQ(u.connectionMode===h0.Strict?l?.target??[]:(l?.target??[]).concat(l?.source??[]),u.targetHandle);if(!U||!_)return u.onError?.("008",Uf.error008(!U?"source":"target",{id:u.id,sourceHandle:u.sourceHandle,targetHandle:u.targetHandle})),null;let Q=U?.position||a.Bottom,J=_?.position||a.Top,q=v0(f,U,Q),T=v0($,_,J);return{sourceX:q.x,sourceY:q.y,targetX:T.x,targetY:T.y,sourcePosition:Q,targetPosition:J}}function KQ(u){if(!u)return null;let f=[],$=[];for(let F of u)if(F.width=F.width??1,F.height=F.height??1,F.type==="source")f.push(F);else if(F.type==="target")$.push(F);return{source:f,target:$}}function v0(u,f,$=a.Left,F=!1){let l=(f?.x??0)+u.internals.positionAbsolute.x,U=(f?.y??0)+u.internals.positionAbsolute.y,{width:_,height:Q}=f??Bf(u);if(F)return{x:l+_/2,y:U+Q/2};switch(f?.position??$){case a.Top:return{x:l+_/2,y:U};case a.Right:return{x:l+_,y:U+Q/2};case a.Bottom:return{x:l+_/2,y:U+Q};case a.Left:return{x:l,y:U+Q/2}}}function wQ(u,f){if(!u)return null;return(!f?u[0]:u.find(($)=>$.id===f))||null}function c6(u,f){if(!u)return"";if(typeof u==="string")return u;return`${f?`${f}__`:""}${Object.keys(u).sort().map((F)=>`${F}=${u[F]}`).join("&")}`}function IQ(u,{id:f,defaultColor:$,defaultMarkerStart:F,defaultMarkerEnd:l}){let U=new Set;return u.reduce((_,Q)=>{return[Q.markerStart||F,Q.markerEnd||l].forEach((J)=>{if(J&&typeof J==="object"){let q=c6(J,f);if(!U.has(q))_.push({id:q,color:J.color||$,...J}),U.add(q)}}),_},[]).sort((_,Q)=>_.id.localeCompare(Q.id))}var yQ=1000,Vz=10,C$={nodeOrigin:[0,0],nodeExtent:T4,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Xz={...C$,checkEquality:!0};function h$(u,f){let $={...u};for(let F in f)if(f[F]!==void 0)$[F]=f[F];return $}function kQ(u,f,$){let F=h$(C$,$);for(let l of u.values())if(l.parentId)x$(l,u,f,F);else{let U=S3(l,F.nodeOrigin),_=H1(l.extent)?l.extent:F.nodeExtent,Q=L1(U,_,Bf(l));l.internals.positionAbsolute=Q}}function Dz(u,f){if(!u.handles)return!u.measured?void 0:f?.internals.handleBounds;let $=[],F=[];for(let l of u.handles){let U={id:l.id,width:l.width??1,height:l.height??1,nodeId:u.id,x:l.x,y:l.y,position:l.position,type:l.type};if(l.type==="source")$.push(U);else if(l.type==="target")F.push(U)}return{source:$,target:F}}function v$(u){return u==="manual"}function m6(u,f,$,F={}){let l=h$(Xz,F),U={i:0},_=new Map(f),Q=l?.elevateNodesOnSelect&&!v$(l.zIndexMode)?yQ:0,J=u.length>0,q=!1;f.clear(),$.clear();for(let T of u){let W=_.get(T.id);if(l.checkEquality&&T===W?.internals.userNode)f.set(T.id,W);else{let A=S3(T,l.nodeOrigin),K=H1(T.extent)?T.extent:l.nodeExtent,L=L1(A,K,Bf(T));W={...l.defaults,...T,measured:{width:T.measured?.width,height:T.measured?.height},internals:{positionAbsolute:L,handleBounds:Dz(T,W),z:PQ(T,Q,l.zIndexMode),userNode:T}},f.set(T.id,W)}if((W.measured===void 0||W.measured.width===void 0||W.measured.height===void 0)&&!W.hidden)J=!1;if(T.parentId)x$(W,f,$,F,U);q||=T.selected??!1}return{nodesInitialized:J,hasSelectedNodes:q}}function Oz(u,f){if(!u.parentId)return;let $=f.get(u.parentId);if($)$.set(u.id,u);else f.set(u.parentId,new Map([[u.id,u]]))}function x$(u,f,$,F,l){let{elevateNodesOnSelect:U,nodeOrigin:_,nodeExtent:Q,zIndexMode:J}=h$(C$,F),q=u.parentId,T=f.get(q);if(!T){console.warn(`Parent node ${q} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}if(Oz(u,$),l&&!T.parentId&&T.internals.rootParentIndex===void 0&&J==="auto")T.internals.rootParentIndex=++l.i,T.internals.z=T.internals.z+l.i*Vz;if(l&&T.internals.rootParentIndex!==void 0)l.i=T.internals.rootParentIndex;let W=U&&!v$(J)?yQ:0,{x:A,y:K,z:L}=Sz(u,T,_,Q,W,J),{positionAbsolute:z}=u.internals,Z=A!==z.x||K!==z.y;if(Z||L!==u.internals.z)f.set(u.id,{...u,internals:{...u.internals,positionAbsolute:Z?{x:A,y:K}:z,z:L}})}function PQ(u,f,$){let F=Kf(u.zIndex)?u.zIndex:0;if(v$($))return F;return F+(u.selected?f:0)}function Sz(u,f,$,F,l,U){let{x:_,y:Q}=f.internals.positionAbsolute,J=Bf(u),q=S3(u,$),T=H1(u.extent)?L1(q,u.extent,J):q,W=L1({x:_+T.x,y:Q+T.y},F,J);if(u.extent==="parent")W=MQ(W,J,f);let A=PQ(u,l,U),K=f.internals.z??0;return{x:W.x,y:W.y,z:K>=A?K+1:A}}function p6(u,f,$,F=[0,0]){let l=[],U=new Map;for(let _ of u){let Q=f.get(_.parentId);if(!Q)continue;let J=U.get(_.parentId)?.expandedRect??W4(Q),q=X$(J,_.rect);U.set(_.parentId,{expandedRect:q,parent:Q})}if(U.size>0)U.forEach(({expandedRect:_,parent:Q},J)=>{let q=Q.internals.positionAbsolute,T=Bf(Q),W=Q.origin??F,A=_.x<q.x?Math.round(Math.abs(q.x-_.x)):0,K=_.y<q.y?Math.round(Math.abs(q.y-_.y)):0,L=Math.max(T.width,Math.round(_.width)),z=Math.max(T.height,Math.round(_.height)),Z=(L-T.width)*W[0],B=(z-T.height)*W[1];if(A>0||K>0||Z||B)l.push({id:J,type:"position",position:{x:Q.position.x-A+Z,y:Q.position.y-K+B}}),$.get(J)?.forEach((G)=>{if(!u.some((w)=>w.id===G.id))l.push({id:G.id,type:"position",position:{x:G.position.x+A,y:G.position.y+K}})});if(T.width<_.width||T.height<_.height||A||K)l.push({id:J,type:"dimensions",setAttributes:!0,dimensions:{width:L+(A?W[0]*A-Z:0),height:z+(K?W[1]*K-B:0)}})});return l}function rQ(u,f,$,F,l,U,_){let Q=F?.querySelector(".xyflow__viewport"),J=!1;if(!Q)return{changes:[],updatedInternals:J};let q=[],T=window.getComputedStyle(Q),{m22:W}=new window.DOMMatrixReadOnly(T.transform),A=[];for(let K of u.values()){let L=f.get(K.id);if(!L)continue;if(L.hidden){f.set(L.id,{...L,internals:{...L.internals,handleBounds:void 0}}),J=!0;continue}let z=C6(K.nodeElement),Z=L.measured.width!==z.width||L.measured.height!==z.height;if(!!(z.width&&z.height&&(Z||!L.internals.handleBounds||K.force))){let G=K.nodeElement.getBoundingClientRect(),w=H1(L.extent)?L.extent:U,{positionAbsolute:H}=L.internals;if(L.parentId&&L.extent==="parent"){let R=f.get(L.parentId);if(R)H=MQ(H,z,R)}else if(w)H=L1(H,w,z);let M={...L,measured:z,internals:{...L.internals,positionAbsolute:H,handleBounds:{source:JQ("source",K.nodeElement,G,W,L.id),target:JQ("target",K.nodeElement,G,W,L.id)}}};if(f.set(L.id,M),L.parentId)x$(M,f,$,{nodeOrigin:l,zIndexMode:_});if(J=!0,Z){if(q.push({id:L.id,type:"dimensions",dimensions:z}),L.expandParent&&L.parentId)A.push({id:L.id,parentId:L.parentId,rect:W4(M,l)})}}}if(A.length>0){let K=p6(A,f,$,l);q.push(...K)}return{changes:q,updatedInternals:J}}async function CQ({delta:u,panZoom:f,transform:$,translateExtent:F,width:l,height:U}){if(!f||!u.x&&!u.y)return!1;let _=await f.setViewportConstrained({x:$[0]+u.x,y:$[1]+u.y,zoom:$[2]},[[0,0],[l,U]],F);return!!_&&(_.x!==$[0]||_.y!==$[1]||_.k!==$[2])}function BQ(u,f,$,F,l,U){let _=l,Q=F.get(_)||new Map;F.set(_,Q.set($,f)),_=`${l}-${u}`;let J=F.get(_)||new Map;if(F.set(_,J.set($,f)),U){_=`${l}-${u}-${U}`;let q=F.get(_)||new Map;F.set(_,q.set($,f))}}function c$(u,f,$){u.clear(),f.clear();for(let F of $){let{source:l,target:U,sourceHandle:_=null,targetHandle:Q=null}=F,J={edgeId:F.id,source:l,target:U,sourceHandle:_,targetHandle:Q},q=`${l}-${_}--${U}-${Q}`,T=`${U}-${Q}--${l}-${_}`;BQ("source",J,T,u,l,_),BQ("target",J,q,u,U,Q),f.set(F.id,F)}}function hQ(u,f){if(!u.parentId)return!1;let $=f.get(u.parentId);if(!$)return!1;if($.selected)return!0;return hQ($,f)}function LQ(u,f,$){let F=u;do{if(F?.matches?.(f))return!0;if(F===$)return!1;F=F?.parentElement}while(F);return!1}function jz(u,f,$,F,l){let U=new Map;for(let[_,Q]of u)if((l?Q.id===F:Q.selected||Q.id===F)&&(l||!Q.parentId||!hQ(Q,u))&&(Q.draggable||f&&typeof Q.draggable>"u")){let q=u.get(_);if(q)U.set(_,{id:_,position:q.position||{x:0,y:0},distance:{x:$.x-q.internals.positionAbsolute.x,y:$.y-q.internals.positionAbsolute.y},extent:q.extent,parentId:q.parentId,origin:q.origin,expandParent:q.expandParent,internals:{positionAbsolute:q.internals.positionAbsolute||{x:0,y:0}},measured:{width:q.measured.width??0,height:q.measured.height??0}})}return U}function B$({nodeId:u,dragItems:f,nodeLookup:$,dragging:F=!0}){let l=[];for(let[_,Q]of f){let J=$.get(_)?.internals.userNode;if(J)l.push({...J,position:Q.position,dragging:F})}if(!u)return[l[0],l];let U=$.get(u)?.internals.userNode;return[!U?l[0]:{...U,position:f.get(u)?.position||U.position,dragging:F},l]}function Nz({dragItems:u,snapGrid:f,x:$,y:F}){let l=u.values().next().value;if(!l)return null;let U={x:$-l.distance.x,y:F-l.distance.y},_=K4(U,f);return{x:_.x-U.x,y:_.y-U.y}}function vQ({onNodeMouseDown:u,getStoreItems:f,onDragStart:$,onDrag:F,onDragStop:l}){let U={x:null,y:null},_=0,Q=new Map,J=!1,q={x:0,y:0},T=null,W=!1,A=null,K=!1,L=!1,z=null;function Z({noDragClassName:G,handleSelector:w,domNode:H,isSelectable:M,nodeId:R,nodeClickDistance:E=0}){A=xu(H);function V({x:m,y:v}){let{nodeLookup:Y,nodeExtent:X,snapGrid:O,snapToGrid:j,nodeOrigin:k,onNodeDrag:P,onSelectionDrag:c,onError:x,updateNodePositions:g}=f();U={x:m,y:v};let $u=!1,i=Q.size>1,fu=i&&X?H$(A4(Q)):null,Fu=i&&j?Nz({dragItems:Q,snapGrid:O,x:m,y:v}):null;for(let[uu,h]of Q){if(!Y.has(uu))continue;let n={x:m-h.distance.x,y:v-h.distance.y};if(j)n=Fu?{x:Math.round(n.x+Fu.x),y:Math.round(n.y+Fu.y)}:K4(n,O);let N=null;if(i&&X&&!h.extent&&fu){let{positionAbsolute:d}=h.internals,e=d.x-fu.x+X[0][0],lu=d.x+h.measured.width-fu.x2+X[1][0],Uu=d.y-fu.y+X[0][1],Nu=d.y+h.measured.height-fu.y2+X[1][1];N=[[e,Uu],[lu,Nu]]}let{position:b,positionAbsolute:s}=V$({nodeId:uu,nextPosition:n,nodeLookup:Y,nodeExtent:N?N:X,nodeOrigin:k,onError:x});$u=$u||h.position.x!==b.x||h.position.y!==b.y,h.position=b,h.internals.positionAbsolute=s}if(L=L||$u,!$u)return;if(g(Q,!0),z&&(F||P||!R&&c)){let[uu,h]=B$({nodeId:R,dragItems:Q,nodeLookup:Y});if(F?.(z,Q,uu,h),P?.(z,uu,h),!R)c?.(z,h)}}async function D(){if(!T)return;let{transform:m,panBy:v,autoPanSpeed:Y,autoPanOnNodeDrag:X}=f();if(!X){J=!1,cancelAnimationFrame(_);return}let[O,j]=k6(q,T,Y);if(O!==0||j!==0){if(U.x=(U.x??0)-O/m[2],U.y=(U.y??0)-j/m[2],await v({x:O,y:j}))V(U)}_=requestAnimationFrame(D)}function r(m){let{nodeLookup:v,multiSelectionActive:Y,nodesDraggable:X,transform:O,snapGrid:j,snapToGrid:k,selectNodesOnDrag:P,onNodeDragStart:c,onSelectionDragStart:x,unselectNodesAndEdges:g}=f();W=!0;let $u=!!R&&!Y&&!v.get(R)?.selected;if((!P||!M)&&!Y&&R){if(!v.get(R)?.selected)g()}if(M&&P&&R)u?.(R);let i=O3(m.sourceEvent,{transform:O,snapGrid:j,snapToGrid:k,containerBounds:T});if(U=i,Q=jz(v,X,i,R,$u),Q.size>0&&($||c||!R&&x)){let[fu,Fu]=B$({nodeId:R,dragItems:Q,nodeLookup:v});if($?.(m.sourceEvent,Q,fu,Fu),c?.(m.sourceEvent,fu,Fu),!R)x?.(m.sourceEvent,Fu)}}let C=c7().clickDistance(E).on("start",(m)=>{let{domNode:v,nodeDragThreshold:Y,transform:X,snapGrid:O,snapToGrid:j}=f();if(T=v?.getBoundingClientRect()||null,K=!1,L=!1,z=m.sourceEvent,Y===0)r(m);U=O3(m.sourceEvent,{transform:X,snapGrid:O,snapToGrid:j,containerBounds:T}),q=wf(m.sourceEvent,T)}).on("drag",(m)=>{let{autoPanOnNodeDrag:v,transform:Y,snapGrid:X,snapToGrid:O,nodeDragThreshold:j,nodeLookup:k}=f(),P=O3(m.sourceEvent,{transform:Y,snapGrid:X,snapToGrid:O,containerBounds:T});if(z=m.sourceEvent,m.sourceEvent.type==="touchmove"&&m.sourceEvent.touches.length>1||R&&!k.has(R))K=!0;if(K)return;if(!J&&v&&W)J=!0,D();if(!W){let c=wf(m.sourceEvent,T),x=c.x-q.x,g=c.y-q.y;if(Math.sqrt(x*x+g*g)>j)r(m)}if((U.x!==P.xSnapped||U.y!==P.ySnapped)&&Q&&W)q=wf(m.sourceEvent,T),V(P)}).on("end",(m)=>{if(!W||K){if(K&&Q.size>0)f().updateNodePositions(Q,!1);return}if(J=!1,W=!1,cancelAnimationFrame(_),Q.size>0){let{nodeLookup:v,updateNodePositions:Y,onNodeDragStop:X,onSelectionDragStop:O}=f();if(L)Y(Q,!1),L=!1;if(l||X||!R&&O){let[j,k]=B$({nodeId:R,dragItems:Q,nodeLookup:v,dragging:!1});if(l?.(m.sourceEvent,Q,j,k),X?.(m.sourceEvent,j,k),!R)O?.(m.sourceEvent,k)}}}).filter((m)=>{let v=m.target;return!m.button&&(!G||!LQ(v,`.${G}`,H))&&(!w||LQ(v,w,H))});A.call(C)}function B(){A?.on(".drag",null)}return{update:Z,destroy:B}}function Iz(u,f,$){let F=[],l={x:u.x-$,y:u.y-$,width:$*2,height:$*2};for(let U of f.values())if(j3(l,W4(U))>0)F.push(U);return F}var yz=250;function kz(u,f,$,F){let l=[],U=1/0,_=Iz(u,$,f+yz);for(let Q of _){let J=[...Q.internals.handleBounds?.source??[],...Q.internals.handleBounds?.target??[]];for(let q of J){if(F.nodeId===q.nodeId&&F.type===q.type&&F.id===q.id)continue;let{x:T,y:W}=v0(Q,q,q.position,!0),A=Math.sqrt(Math.pow(T-u.x,2)+Math.pow(W-u.y,2));if(A>f)continue;if(A<U)l=[{...q,x:T,y:W}],U=A;else if(A===U)l.push({...q,x:T,y:W})}}if(!l.length)return null;if(l.length>1){let Q=F.type==="source"?"target":"source";return l.find((J)=>J.type===Q)??l[0]}return l[0]}function xQ(u,f,$,F,l,U=!1){let _=F.get(u);if(!_)return null;let Q=l==="strict"?_.internals.handleBounds?.[f]:[..._.internals.handleBounds?.source??[],..._.internals.handleBounds?.target??[]],J=($?Q?.find((q)=>q.id===$):Q?.[0])??null;return J&&U?{...J,...v0(_,J,J.position,!0)}:J}function cQ(u,f){if(u)return u;else if(f?.classList.contains("target"))return"target";else if(f?.classList.contains("source"))return"source";return null}function Pz(u,f){let $=null;if(f)$=!0;else if(u&&!f)$=!1;return $}var mQ=()=>!0;function rz(u,{connectionMode:f,connectionRadius:$,handleId:F,nodeId:l,edgeUpdaterType:U,isTarget:_,domNode:Q,nodeLookup:J,lib:q,autoPanOnConnect:T,flowId:W,panBy:A,cancelConnection:K,onConnectStart:L,onConnect:z,onConnectEnd:Z,isValidConnection:B=mQ,onReconnectEnd:G,updateConnection:w,getTransform:H,getFromHandle:M,autoPanSpeed:R,dragThreshold:E=1,handleDomNode:V}){let D=y$(u.target),r=0,C,{x:m,y:v}=wf(u),Y=cQ(U,V),X=Q?.getBoundingClientRect(),O=!1;if(!X||!Y)return;let j=xQ(l,Y,F,J,f);if(!j)return;let k=wf(u,X),P=!1,c=null,x=!1,g=null;function $u(){if(!T||!X)return;let[b,s]=k6(k,X,R);A({x:b,y:s}),r=requestAnimationFrame($u)}let i={...j,nodeId:l,type:Y,position:j.position},fu=J.get(l),uu={inProgress:!0,isValid:null,from:v0(fu,i,a.Left,!0),fromHandle:i,fromPosition:i.position,fromNode:fu,to:k,toHandle:null,toPosition:UQ[i.position],toNode:null,pointer:k};function h(){O=!0,w(uu),L?.(u,{nodeId:l,handleId:F,handleType:Y})}if(E===0)h();function n(b){if(!O){let{x:Nu,y:bf}=wf(b),jf=Nu-m,Nf=bf-v;if(!(jf*jf+Nf*Nf>E*E))return;h()}if(!M()||!i){N(b);return}let s=H();if(k=wf(b,X),C=kz(w4(k,s,!1,[1,1]),$,J,i),!P)$u(),P=!0;let d=pQ(b,{handle:C,connectionMode:f,fromNodeId:l,fromHandleId:F,fromType:_?"target":"source",isValidConnection:B,doc:D,lib:q,flowId:W,nodeLookup:J});g=d.handleDomNode,c=d.connection,x=Pz(!!C,d.isValid);let e=J.get(l),lu=e?v0(e,i,a.Left,!0):uu.from,Uu={...uu,from:lu,isValid:x,to:d.toHandle&&x?G1({x:d.toHandle.x,y:d.toHandle.y},s):k,toHandle:d.toHandle,toPosition:x&&d.toHandle?d.toHandle.position:UQ[i.position],toNode:d.toHandle?J.get(d.toHandle.nodeId):null,pointer:k};w(Uu),uu=Uu}function N(b){if("touches"in b&&b.touches.length>0)return;if(O){if((C||g)&&c&&x)z?.(c);let{inProgress:s,...d}=uu,e={...d,toPosition:uu.toHandle?uu.toPosition:null};if(Z?.(b,e),U)G?.(b,e)}K(),cancelAnimationFrame(r),P=!1,x=!1,c=null,g=null,D.removeEventListener("mousemove",n),D.removeEventListener("mouseup",N),D.removeEventListener("touchmove",n),D.removeEventListener("touchend",N)}D.addEventListener("mousemove",n),D.addEventListener("mouseup",N),D.addEventListener("touchmove",n),D.addEventListener("touchend",N)}function pQ(u,{handle:f,connectionMode:$,fromNodeId:F,fromHandleId:l,fromType:U,doc:_,lib:Q,flowId:J,isValidConnection:q=mQ,nodeLookup:T}){let W=U==="target",A=f?_.querySelector(`.${Q}-flow__handle[data-id="${J}-${f?.nodeId}-${f?.id}-${f?.type}"]`):null,{x:K,y:L}=wf(u),z=_.elementFromPoint(K,L),Z=z?.classList.contains(`${Q}-flow__handle`)?z:A,B={handleDomNode:Z,isValid:!1,connection:null,toHandle:null};if(Z){let G=cQ(void 0,Z),w=Z.getAttribute("data-nodeid"),H=Z.getAttribute("data-handleid"),M=Z.classList.contains("connectable"),R=Z.classList.contains("connectableend");if(!w||!G)return B;let E={source:W?w:F,sourceHandle:W?H:l,target:W?F:w,targetHandle:W?l:H};B.connection=E;let D=M&&R&&($===h0.Strict?W&&G==="source"||!W&&G==="target":w!==F||H!==l);B.isValid=D&&q(E),B.toHandle=xQ(w,G,H,T,$,!0)}return B}var b6={onPointerDown:rz,isValid:pQ};function bQ({domNode:u,panZoom:f,getTransform:$,getViewScale:F}){let l=xu(u);function U({translateExtent:Q,width:J,height:q,zoomStep:T=1,pannable:W=!0,zoomable:A=!0,inversePan:K=!1}){let L=(w)=>{if(w.sourceEvent.type!=="wheel"||!f)return;let H=$(),M=w.sourceEvent.ctrlKey&&B4()?10:1,R=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?0.05:w.sourceEvent.deltaMode?1:0.002)*T,E=H[2]*Math.pow(2,R*M);f.scaleTo(E)},z=[0,0],Z=(w)=>{if(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")z=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY]},B=(w)=>{let H=$();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!f)return;let M=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],R=[M[0]-z[0],M[1]-z[1]];z=M;let E=F()*Math.max(H[2],Math.log(H[2]))*(K?-1:1),V={x:H[0]-R[0]*E,y:H[1]-R[1]*E},D=[[0,0],[J,q]];f.setViewportConstrained({x:V.x,y:V.y,zoom:H[2]},D,Q)},G=w$().on("start",Z).on("zoom",W?B:null).on("zoom.wheel",A?L:null);l.call(G,{})}function _(){l.on("zoom",null)}return{update:U,destroy:_,pointer:du}}var i6=(u)=>({x:u.x,y:u.y,zoom:u.k}),L$=({x:u,y:f,zoom:$})=>D3.translate(u,f).scale($),C0=(u,f)=>u.target.closest(`.${f}`),iQ=(u,f)=>f===2&&Array.isArray(u)&&u.includes(2),Cz=(u)=>((u*=2)<=1?u*u*u:(u-=2)*u*u+2)/2,G$=(u,f=0,$=Cz,F=()=>{})=>{let l=typeof f==="number"&&f>0;if(!l)F();return l?u.transition().duration(f).ease($).on("end",F):u},gQ=(u)=>{let f=u.ctrlKey&&B4()?10:1;return-u.deltaY*(u.deltaMode===1?0.05:u.deltaMode?1:0.002)*f};function hz({zoomPanValues:u,noWheelClassName:f,d3Selection:$,d3Zoom:F,panOnScrollMode:l,panOnScrollSpeed:U,zoomOnPinch:_,onPanZoomStart:Q,onPanZoom:J,onPanZoomEnd:q}){return(T)=>{if(C0(T,f)){if(T.ctrlKey)T.preventDefault();return!1}T.preventDefault(),T.stopImmediatePropagation();let W=$.property("__zoom").k||1;if(T.ctrlKey&&_){let Z=du(T),B=gQ(T),G=W*Math.pow(2,B);F.scaleTo($,G,Z,T);return}let A=T.deltaMode===1?20:1,K=l===T0.Vertical?0:T.deltaX*A,L=l===T0.Horizontal?0:T.deltaY*A;if(!B4()&&T.shiftKey&&l!==T0.Vertical)K=T.deltaY*A,L=0;F.translateBy($,-(K/W)*U,-(L/W)*U,{internal:!0});let z=i6($.property("__zoom"));if(clearTimeout(u.panScrollTimeout),!u.isPanScrolling)u.isPanScrolling=!0,Q?.(T,z);else J?.(T,z);u.panScrollTimeout=setTimeout(()=>{q?.(T,z),u.isPanScrolling=!1},150)}}function vz({noWheelClassName:u,preventScrolling:f,d3ZoomHandler:$}){return function(F,l){let U=F.type==="wheel",_=!f&&U&&!F.ctrlKey,Q=C0(F,u);if(F.ctrlKey&&U&&Q)F.preventDefault();if(_||Q)return null;F.preventDefault(),$.call(this,F,l)}}function xz({zoomPanValues:u,onDraggingChange:f,onPanZoomStart:$}){return(F)=>{if(F.sourceEvent?.internal)return;let l=i6(F.transform);if(u.mouseButton=F.sourceEvent?.button||0,u.isZoomingOrPanning=!0,u.prevViewport=l,F.sourceEvent?.type==="mousedown")f(!0);if($)$?.(F.sourceEvent,l)}}function cz({zoomPanValues:u,panOnDrag:f,onPaneContextMenu:$,onTransformChange:F,onPanZoom:l}){return(U)=>{if(u.usedRightMouseButton=!!($&&iQ(f,u.mouseButton??0)),!U.sourceEvent?.sync)F([U.transform.x,U.transform.y,U.transform.k]);if(l&&!U.sourceEvent?.internal)l?.(U.sourceEvent,i6(U.transform))}}function mz({zoomPanValues:u,panOnDrag:f,panOnScroll:$,onDraggingChange:F,onPanZoomEnd:l,onPaneContextMenu:U}){return(_)=>{if(_.sourceEvent?.internal)return;if(u.isZoomingOrPanning=!1,U&&iQ(f,u.mouseButton??0)&&!u.usedRightMouseButton&&_.sourceEvent)U(_.sourceEvent);if(u.usedRightMouseButton=!1,F(!1),l){let Q=i6(_.transform);u.prevViewport=Q,clearTimeout(u.timerId),u.timerId=setTimeout(()=>{l?.(_.sourceEvent,Q)},$?150:0)}}}function pz({panActivationKeyPressed:u,zoomActivationKeyPressed:f,zoomOnScroll:$,zoomOnPinch:F,panOnDrag:l,panOnScroll:U,zoomOnDoubleClick:_,userSelectionActive:Q,noWheelClassName:J,noPanClassName:q,lib:T,connectionInProgress:W}){return(A)=>{let K=f||$,L=F&&A.ctrlKey,z=A.type==="wheel";if(A.button===1&&A.type==="mousedown"&&(C0(A,`${T}-flow__node`)||C0(A,`${T}-flow__edge`)||C0(A,`${T}-flow__selection`)||C0(A,`${T}-flow__nodesselection`)))return!0;if(!l&&!K&&!U&&!_&&!F)return!1;if(Q)return!1;if(W&&!z)return!1;if(C0(A,J)&&z)return!1;if(C0(A,q)&&(!z||U&&z&&!f))return!1;if(!F&&A.ctrlKey&&z)return!1;if(!F&&A.type==="touchstart"&&A.touches?.length>1)return A.preventDefault(),!1;if(!K&&!U&&!L&&z)return!1;if(!l&&(A.type==="mousedown"||A.type==="touchstart"))return!1;if(Array.isArray(l)&&!l.includes(A.button)&&A.type==="mousedown")return!1;let Z=Array.isArray(l)&&l.includes(A.button)||!A.button||A.button<=1;return(!A.ctrlKey||z||u)&&Z}}function sQ({domNode:u,minZoom:f,maxZoom:$,translateExtent:F,viewport:l,onPanZoom:U,onPanZoomStart:_,onPanZoomEnd:Q,onDraggingChange:J}){let q={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},T=u.getBoundingClientRect(),W=[[0,0],[T.width,T.height]],A=typeof ResizeObserver<"u"?new ResizeObserver((v)=>{let Y=v[0];if(Y?.contentRect)W=[[0,0],[Y.contentRect.width,Y.contentRect.height]]}):null;A?.observe(u);let K=w$().extent(()=>W).scaleExtent([f,$]).translateExtent(F),L=xu(u).call(K);H({x:l.x,y:l.y,zoom:q4(l.zoom,f,$)},[[0,0],[T.width,T.height]],F);let z=L.on("wheel.zoom"),Z=L.on("dblclick.zoom");K.wheelDelta(gQ);async function B(v,Y){if(L)return new Promise((X)=>{K?.interpolate(Y?.interpolate==="linear"?l4:U4).transform(G$(L,Y?.duration,Y?.ease,()=>X(!0)),v)});return!1}function G({noWheelClassName:v,noPanClassName:Y,onPaneContextMenu:X,userSelectionActive:O,panOnScroll:j,panOnDrag:k,panOnScrollMode:P,panOnScrollSpeed:c,preventScrolling:x,zoomOnPinch:g,zoomOnScroll:$u,zoomOnDoubleClick:i,panActivationKeyPressed:fu=!1,zoomActivationKeyPressed:Fu,lib:uu,onTransformChange:h,connectionInProgress:n,paneClickDistance:N,selectionOnDrag:b}){if(O&&!q.isZoomingOrPanning)K.on("zoom",null);let s=j&&!Fu&&!O;K.clickDistance(b?1/0:!Kf(N)||N<0?0:N);let d=s?hz({zoomPanValues:q,noWheelClassName:v,d3Selection:L,d3Zoom:K,panOnScrollMode:P,panOnScrollSpeed:c,zoomOnPinch:g,onPanZoomStart:_,onPanZoom:U,onPanZoomEnd:Q}):vz({noWheelClassName:v,preventScrolling:x,d3ZoomHandler:z});L.on("wheel.zoom",d,{passive:!1});let e=xz({zoomPanValues:q,onDraggingChange:J,onPanZoomStart:_});K.on("start",e);let lu=cz({zoomPanValues:q,panOnDrag:k,onPaneContextMenu:!!X,onPanZoom:U,onTransformChange:h});K.on("zoom",lu);let Uu=mz({zoomPanValues:q,panOnDrag:k,panOnScroll:j,onPaneContextMenu:X,onPanZoomEnd:Q,onDraggingChange:J});K.on("end",Uu);let Nu=pz({panActivationKeyPressed:fu,zoomActivationKeyPressed:Fu,panOnDrag:k,zoomOnScroll:$u,panOnScroll:j,zoomOnDoubleClick:i,zoomOnPinch:g,userSelectionActive:O,noPanClassName:Y,noWheelClassName:v,lib:uu,connectionInProgress:n});if(K.filter(Nu),i)L.on("dblclick.zoom",Z);else L.on("dblclick.zoom",null)}function w(){K.on("zoom",null),A?.disconnect()}async function H(v,Y,X){let O=L$(v),j=K?.constrain()(O,Y,X);if(j)await B(j);return j}async function M(v,Y){let X=L$(v);return await B(X,Y),X}function R(v){if(L){let Y=L$(v),X=L.property("__zoom");if(X.k!==v.zoom||X.x!==v.x||X.y!==v.y)K?.transform(L,Y,null,{sync:!0})}}function E(){let v=L?K$(L.node()):{x:0,y:0,k:1};return{x:v.x,y:v.y,zoom:v.k}}async function V(v,Y){if(L)return new Promise((X)=>{K?.interpolate(Y?.interpolate==="linear"?l4:U4).scaleTo(G$(L,Y?.duration,Y?.ease,()=>X(!0)),v)});return!1}async function D(v,Y){if(L)return new Promise((X)=>{K?.interpolate(Y?.interpolate==="linear"?l4:U4).scaleBy(G$(L,Y?.duration,Y?.ease,()=>X(!0)),v)});return!1}function r(v){K?.scaleExtent(v)}function C(v){K?.translateExtent(v)}function m(v){let Y=!Kf(v)||v<0?0:v;K?.clickDistance(Y)}return{update:G,destroy:w,setViewport:M,setViewportConstrained:H,getViewport:E,scaleTo:V,scaleBy:D,setScaleExtent:r,setTranslateExtent:C,syncViewport:R,setClickDistance:m}}var x0;(function(u){u.Line="line",u.Handle="handle"})(x0||(x0={}));function bz({width:u,prevWidth:f,height:$,prevHeight:F,affectsX:l,affectsY:U}){let _=u-f,Q=$-F,J=[_>0?1:_<0?-1:0,Q>0?1:Q<0?-1:0];if(_&&l)J[0]=J[0]*-1;if(Q&&U)J[1]=J[1]*-1;return J}function GQ(u){let f=u.includes("right")||u.includes("left"),$=u.includes("bottom")||u.includes("top"),F=u.includes("left"),l=u.includes("top");return{isHorizontal:f,isVertical:$,affectsX:F,affectsY:l}}function P0(u,f){return Math.max(0,f-u)}function r0(u,f){return Math.max(0,u-f)}function N6(u,f,$){return Math.max(0,f-u,u-$)}function HQ(u,f){return u?!f:f}function iz(u,f,$,F,l,U,_,Q){let{affectsX:J,affectsY:q}=f,{isHorizontal:T,isVertical:W}=f,A=T&&W,{xSnapped:K,ySnapped:L}=$,{minWidth:z,maxWidth:Z,minHeight:B,maxHeight:G}=F,{x:w,y:H,width:M,height:R,aspectRatio:E}=u,V=Math.floor(T?K-u.pointerX:0),D=Math.floor(W?L-u.pointerY:0),r=M+(J?-V:V),C=R+(q?-D:D),m=-U[0]*M,v=-U[1]*R,Y=N6(r,z,Z),X=N6(C,B,G);if(_){let k=0,P=0;if(J&&V<0)k=P0(w+V+m,_[0][0]);else if(!J&&V>0)k=r0(w+r+m,_[1][0]);if(q&&D<0)P=P0(H+D+v,_[0][1]);else if(!q&&D>0)P=r0(H+C+v,_[1][1]);Y=Math.max(Y,k),X=Math.max(X,P)}if(Q){let k=0,P=0;if(J&&V>0)k=r0(w+V,Q[0][0]);else if(!J&&V<0)k=P0(w+r,Q[1][0]);if(q&&D>0)P=r0(H+D,Q[0][1]);else if(!q&&D<0)P=P0(H+C,Q[1][1]);Y=Math.max(Y,k),X=Math.max(X,P)}if(l){if(T){let k=N6(r/E,B,G)*E;if(Y=Math.max(Y,k),_){let P=0;if(!J&&!q||J&&!q&&A)P=r0(H+v+r/E,_[1][1])*E;else P=P0(H+v+(J?V:-V)/E,_[0][1])*E;Y=Math.max(Y,P)}if(Q){let P=0;if(!J&&!q||J&&!q&&A)P=P0(H+r/E,Q[1][1])*E;else P=r0(H+(J?V:-V)/E,Q[0][1])*E;Y=Math.max(Y,P)}}if(W){let k=N6(C*E,z,Z)/E;if(X=Math.max(X,k),_){let P=0;if(!J&&!q||q&&!J&&A)P=r0(w+C*E+m,_[1][0])/E;else P=P0(w+(q?D:-D)*E+m,_[0][0])/E;X=Math.max(X,P)}if(Q){let P=0;if(!J&&!q||q&&!J&&A)P=P0(w+C*E,Q[1][0])/E;else P=r0(w+(q?D:-D)*E,Q[0][0])/E;X=Math.max(X,P)}}}if(D=D+(D<0?X:-X),V=V+(V<0?Y:-Y),l)if(A)if(r>C*E)D=(HQ(J,q)?-V:V)/E;else V=(HQ(J,q)?-D:D)*E;else if(T)D=V/E,q=J;else V=D*E,J=q;let O=J?w+V:w,j=q?H+D:H;return{width:M+(J?-V:V),height:R+(q?-D:D),x:U[0]*V*(!J?1:-1)+O,y:U[1]*D*(!q?1:-1)+j}}var tQ={width:0,height:0,x:0,y:0},gz={...tQ,pointerX:0,pointerY:0,aspectRatio:1};function sz(u,f,$){let F=f.position.x+u.position.x,l=f.position.y+u.position.y,U=u.measured.width??0,_=u.measured.height??0,Q=$[0]*U,J=$[1]*_;return[[F-Q,l-J],[F+U-Q,l+_-J]]}function nQ({domNode:u,nodeId:f,getStoreItems:$,onChange:F,onEnd:l}){let U=xu(u),_={controlDirection:GQ("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function Q({controlPosition:q,boundaries:T,keepAspectRatio:W,resizeDirection:A,onResizeStart:K,onResize:L,onResizeEnd:z,shouldResize:Z}){let B={...tQ},G={...gz};_={boundaries:T,resizeDirection:A,keepAspectRatio:W,controlDirection:GQ(q)};let w=void 0,H=null,M=[],R=void 0,E=void 0,V=void 0,D=c7().on("start",(r)=>{let{nodeLookup:C,transform:m,snapGrid:v,snapToGrid:Y,nodeOrigin:X,paneDomNode:O}=$();if(w=C.get(f),!w)return;H=O?.getBoundingClientRect()??null;let{xSnapped:j,ySnapped:k}=O3(r.sourceEvent,{transform:m,snapGrid:v,snapToGrid:Y,containerBounds:H});if(B={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},G={...B,pointerX:j,pointerY:k,aspectRatio:B.width/B.height},R=void 0,E=H1(w.extent)?w.extent:void 0,w.parentId&&(w.extent==="parent"||w.expandParent))R=C.get(w.parentId);if(R&&w.extent==="parent")E=[[0,0],[R.measured.width,R.measured.height]];M=[],V=void 0;for(let[P,c]of C)if(c.parentId===f){if(M.push({id:P,position:{...c.position},extent:c.extent}),c.extent==="parent"||c.expandParent){let x=sz(c,w,c.origin??X);if(V)V=[[Math.min(x[0][0],V[0][0]),Math.min(x[0][1],V[0][1])],[Math.max(x[1][0],V[1][0]),Math.max(x[1][1],V[1][1])]];else V=x}}K?.(r,{...B})}).on("drag",(r)=>{let{transform:C,snapGrid:m,snapToGrid:v,nodeOrigin:Y}=$(),X=O3(r.sourceEvent,{transform:C,snapGrid:m,snapToGrid:v,containerBounds:H}),O=[];if(!w)return;let{x:j,y:k,width:P,height:c}=B,x={},g=w.origin??Y,{width:$u,height:i,x:fu,y:Fu}=iz(G,_.controlDirection,X,_.boundaries,_.keepAspectRatio,g,E,V),uu=$u!==P,h=i!==c,n=fu!==j&&uu,N=Fu!==k&&h;if(!n&&!N&&!uu&&!h)return;let b={prevValues:{...B},startX:G.x,startY:G.y,childNodes:M.map((lu)=>({...lu,position:{...lu.position}}))};if(n||N||g[0]===1||g[1]===1){if(x.x=n?fu:B.x,x.y=N?Fu:B.y,B.x=x.x,B.y=x.y,M.length>0){let lu=fu-j,Uu=Fu-k;for(let Nu of M)Nu.position={x:Nu.position.x-lu+g[0]*($u-P),y:Nu.position.y-Uu+g[1]*(i-c)},O.push(Nu)}}if(uu||h)x.width=uu&&(!_.resizeDirection||_.resizeDirection==="horizontal")?$u:B.width,x.height=h&&(!_.resizeDirection||_.resizeDirection==="vertical")?i:B.height,B.width=x.width,B.height=x.height;if(R&&w.expandParent){let lu=g[0]*(x.width??0);if(x.x&&x.x<lu)B.x=lu,G.x=G.x-(x.x-lu);let Uu=g[1]*(x.height??0);if(x.y&&x.y<Uu)B.y=Uu,G.y=G.y-(x.y-Uu)}let s=bz({width:B.width,prevWidth:P,height:B.height,prevHeight:c,affectsX:_.controlDirection.affectsX,affectsY:_.controlDirection.affectsY}),d={...B,direction:s};if(Z?.(r,d)===!1){B=b.prevValues,G.x=b.startX,G.y=b.startY,M.forEach((lu,Uu)=>{lu.position=b.childNodes[Uu].position});return}L?.(r,d),F(x,O)}).on("end",(r)=>{z?.(r,{...B}),l?.({...B})});U.call(D)}function J(){U.on(".drag",null)}return{update:Q,destroy:J}}var QJ=If(W0(),1),JJ=If(FJ(),1);var lJ=(u)=>{let f,$=new Set,F=(T,W)=>{let A=typeof T==="function"?T(f):T;if(!Object.is(A,f)){let K=f;f=(W!=null?W:typeof A!=="object"||A===null)?A:Object.assign({},f,A),$.forEach((L)=>L(f,K))}},l=()=>f,J={setState:F,getState:l,getInitialState:()=>q,subscribe:(T)=>{return $.add(T),()=>$.delete(T)},destroy:()=>{if((({MODE:"production"})?({MODE:"production"}).MODE:void 0)!=="production")console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.");$.clear()}},q=f=u(F,l,J);return J},UJ=(u)=>u?lJ(u):lJ;var{useDebugValue:AZ}=QJ.default,{useSyncExternalStoreWithSelector:WZ}=JJ.default,KZ=(u)=>u;function p$(u,f=KZ,$){let F=WZ(u.subscribe,u.getState,u.getServerState||u.getInitialState,f,$);return AZ(F),F}var _J=(u,f)=>{let $=UJ(u),F=(l,U=f)=>p$($,l,U);return Object.assign(F,$),F},qJ=(u,f)=>u?_J(u,f):_J;function Gu(u,f){if(Object.is(u,f))return!0;if(typeof u!=="object"||u===null||typeof f!=="object"||f===null)return!1;if(u instanceof Map&&f instanceof Map){if(u.size!==f.size)return!1;for(let[F,l]of u)if(!Object.is(l,f.get(F)))return!1;return!0}if(u instanceof Set&&f instanceof Set){if(u.size!==f.size)return!1;for(let F of u)if(!f.has(F))return!1;return!0}let $=Object.keys(u);if($.length!==Object.keys(f).length)return!1;for(let F of $)if(!Object.prototype.hasOwnProperty.call(f,F)||!Object.is(u[F],f[F]))return!1;return!0}var wZ=If(j7(),1),d6=I.createContext(null),BZ=d6.Provider,rJ=Uf.error001("react");function qu(u,f){let $=I.useContext(d6);if($===null)throw Error(rJ);return p$($,u,f)}function Bu(){let u=I.useContext(d6);if(u===null)throw Error(rJ);return I.useMemo(()=>({getState:u.getState,setState:u.setState,subscribe:u.subscribe}),[u])}var TJ={display:"none"},LZ={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},CJ="react-flow__node-desc",hJ="react-flow__edge-desc",GZ="react-flow__aria-live",HZ=(u)=>u.ariaLiveMessage,zZ=(u)=>u.ariaLabelConfig;function ZZ({rfId:u}){let f=qu(HZ);return y.jsx("div",{id:`${GZ}-${u}`,"aria-live":"assertive","aria-atomic":"true",style:LZ,children:f})}function YZ({rfId:u,disableKeyboardA11y:f}){let $=qu(zZ);return y.jsxs(y.Fragment,{children:[y.jsx("div",{id:`${CJ}-${u}`,style:TJ,children:f?$["node.a11yDescription.default"]:$["node.a11yDescription.keyboardDisabled"]}),y.jsx("div",{id:`${hJ}-${u}`,style:TJ,children:$["edge.a11yDescription.default"]}),!f&&y.jsx(ZZ,{rfId:u})]})}var a6=I.forwardRef(({position:u="top-left",children:f,className:$,style:F,...l},U)=>{let _=`${u}`.split("-");return y.jsx("div",{className:Ru(["react-flow__panel",$,..._]),style:F,ref:U,...l,children:f})});a6.displayName="Panel";var AJ="https://reactflow.dev?utm_source=attribution";function RZ({proOptions:u,position:f="bottom-right"}){if(I.useEffect(()=>{return},[]),u?.hideAttribution)return null;return y.jsx(a6,{position:f,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${AJ}`,children:y.jsx("a",{href:AJ,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var MZ=(u)=>{let f=[],$=[];for(let[,F]of u.nodeLookup)if(F.selected)f.push(F.internals.userNode);for(let[,F]of u.edgeLookup)if(F.selected)$.push(F);return{selectedNodes:f,selectedEdges:$}},s6=(u)=>u.id;function EZ(u,f){return Gu(u.selectedNodes.map(s6),f.selectedNodes.map(s6))&&Gu(u.selectedEdges.map(s6),f.selectedEdges.map(s6))}function VZ({onSelectionChange:u}){let f=Bu(),{selectedNodes:$,selectedEdges:F}=qu(MZ,EZ);return I.useEffect(()=>{let l={nodes:$,edges:F};u?.(l),f.getState().onSelectionChangeHandlers.forEach((U)=>U(l))},[$,F,u]),null}var XZ=(u)=>!!u.onSelectionChangeHandlers;function DZ({onSelectionChange:u}){let f=qu(XZ);if(u||f)return y.jsx(VZ,{onSelectionChange:u});return null}var vJ=[0,0],OZ={x:0,y:0,zoom:1},SZ=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],WJ=[...SZ,"rfId"],jZ=(u)=>({setNodes:u.setNodes,setEdges:u.setEdges,setMinZoom:u.setMinZoom,setMaxZoom:u.setMaxZoom,setTranslateExtent:u.setTranslateExtent,setNodeExtent:u.setNodeExtent,reset:u.reset,setDefaultNodesAndEdges:u.setDefaultNodesAndEdges}),KJ={translateExtent:T4,nodeOrigin:vJ,minZoom:0.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function NZ(u){let{setNodes:f,setEdges:$,setMinZoom:F,setMaxZoom:l,setTranslateExtent:U,setNodeExtent:_,reset:Q,setDefaultNodesAndEdges:J}=qu(jZ,Gu),q=Bu();I.useEffect(()=>{return J(u.defaultNodes,u.defaultEdges),()=>{T.current=KJ,Q()}},[]);let T=I.useRef(KJ);return I.useEffect(()=>{for(let W of WJ){let A=u[W],K=T.current[W];if(A===K)continue;if(typeof u[W]>"u")continue;if(W==="nodes")f(A);else if(W==="edges")$(A);else if(W==="minZoom")F(A);else if(W==="maxZoom")l(A);else if(W==="translateExtent")U(A);else if(W==="nodeExtent")_(A);else if(W==="ariaLabelConfig")q.setState({ariaLabelConfig:XQ(A)});else if(W==="fitView")q.setState({fitViewQueued:A});else if(W==="fitViewOptions")q.setState({fitViewOptions:A});else q.setState({[W]:A})}T.current=u},WJ.map((W)=>u[W])),null}function wJ(){if(typeof window>"u"||!window.matchMedia)return null;return window.matchMedia("(prefers-color-scheme: dark)")}function IZ(u){let[f,$]=I.useState(u==="system"?null:u);return I.useEffect(()=>{if(u!=="system"){$(u);return}let F=wJ(),l=()=>$(F?.matches?"dark":"light");return l(),F?.addEventListener("change",l),()=>{F?.removeEventListener("change",l)}},[u]),f!==null?f:wJ()?.matches?"dark":"light"}var BJ=typeof document<"u"?document:null;function y3(u=null,f={target:BJ,actInsideInputWithModifier:!0}){let[$,F]=I.useState(!1),l=I.useRef(!1),U=I.useRef(new Set([])),[_,Q]=I.useMemo(()=>{if(u!==null){let q=(Array.isArray(u)?u:[u]).filter((W)=>typeof W==="string").map((W)=>W.replace(/\+/g,`
1377
+ `).replace(`
1378
+
1379
+ `,`
1380
+ +`).split(`
1381
+ `)),T=q.reduce((W,A)=>W.concat(...A),[]);return[q,T]}return[[],[]]},[u]);return I.useEffect(()=>{let J=f?.target??BJ,q=f?.actInsideInputWithModifier??!0;if(u!==null){let T=(K)=>{if(l.current=K.ctrlKey||K.metaKey||K.shiftKey||K.altKey,(!l.current||l.current&&!q)&&k$(K))return!1;let z=GJ(K.code,Q);if(U.current.add(K[z]),LJ(_,U.current,!1)){let Z=K.composedPath?.()?.[0]||K.target,B=Z?.nodeName==="BUTTON"||Z?.nodeName==="A";if(f.preventDefault!==!1&&(l.current||!B))K.preventDefault();F(!0)}},W=(K)=>{let L=GJ(K.code,Q);if(LJ(_,U.current,!0))F(!1),U.current.clear();else U.current.delete(K[L]);if(K.key==="Meta")U.current.clear();l.current=!1},A=()=>{U.current.clear(),F(!1)};return J?.addEventListener("keydown",T),J?.addEventListener("keyup",W),window.addEventListener("blur",A),window.addEventListener("contextmenu",A),()=>{J?.removeEventListener("keydown",T),J?.removeEventListener("keyup",W),window.removeEventListener("blur",A),window.removeEventListener("contextmenu",A)}}},[u,F]),$}function LJ(u,f,$){return u.filter((F)=>$||F.length===f.size).some((F)=>F.every((l)=>f.has(l)))}function GJ(u,f){return f.includes(u)?"code":"key"}var yZ=()=>{let u=Bu();return I.useMemo(()=>{return{zoomIn:async(f)=>{let{panZoom:$}=u.getState();return $?$.scaleBy(1.2,f):!1},zoomOut:async(f)=>{let{panZoom:$}=u.getState();return $?$.scaleBy(0.8333333333333334,f):!1},zoomTo:async(f,$)=>{let{panZoom:F}=u.getState();return F?F.scaleTo(f,$):!1},getZoom:()=>u.getState().transform[2],setViewport:async(f,$)=>{let{transform:[F,l,U],panZoom:_}=u.getState();if(!_)return!1;return await _.setViewport({x:f.x??F,y:f.y??l,zoom:f.zoom??U},$),!0},getViewport:()=>{let[f,$,F]=u.getState().transform;return{x:f,y:$,zoom:F}},setCenter:async(f,$,F)=>{return u.getState().setCenter(f,$,F)},fitBounds:async(f,$)=>{let{width:F,height:l,minZoom:U,maxZoom:_,panZoom:Q}=u.getState(),J=N3(f,F,l,U,_,$?.padding??0.1);if(!Q)return!1;return await Q.setViewport(J,{duration:$?.duration,ease:$?.ease,interpolate:$?.interpolate}),!0},screenToFlowPosition:(f,$={})=>{let{transform:F,snapGrid:l,snapToGrid:U,domNode:_}=u.getState();if(!_)return f;let{x:Q,y:J}=_.getBoundingClientRect(),q={x:f.x-Q,y:f.y-J},T=$.snapGrid??l,W=$.snapToGrid??U;return w4(q,F,W,T)},flowToScreenPosition:(f)=>{let{transform:$,domNode:F}=u.getState();if(!F)return f;let{x:l,y:U}=F.getBoundingClientRect(),_=G1(f,$);return{x:_.x+l,y:_.y+U}}}},[])};function xJ(u,f){let $=[],F=new Map,l=[];for(let U of u)if(U.type==="add"){l.push(U);continue}else if(U.type==="remove"||U.type==="replace")F.set(U.id,[U]);else{let _=F.get(U.id);if(_)_.push(U);else F.set(U.id,[U])}for(let U of f){let _=F.get(U.id);if(!_){$.push(U);continue}if(_[0].type==="remove")continue;if(_[0].type==="replace"){$.push({..._[0].item});continue}let Q={...U};for(let J of _)kZ(J,Q);$.push(Q)}if(l.length)l.forEach((U)=>{if(U.index!==void 0)$.splice(U.index,0,{...U.item});else $.push({...U.item})});return $}function kZ(u,f){switch(u.type){case"select":{f.selected=u.selected;break}case"position":{if(typeof u.position<"u")f.position=u.position;if(typeof u.dragging<"u")f.dragging=u.dragging;break}case"dimensions":{if(typeof u.dimensions<"u"){if(f.measured={...u.dimensions},u.setAttributes){if(u.setAttributes===!0||u.setAttributes==="width")f.width=u.dimensions.width;if(u.setAttributes===!0||u.setAttributes==="height")f.height=u.dimensions.height}}if(typeof u.resizing==="boolean")f.resizing=u.resizing;break}}}function cJ(u,f){return xJ(u,f)}function mJ(u,f){return xJ(u,f)}function z1(u,f){return{id:u,type:"select",selected:f}}function G4(u,f=new Set){let $=[];for(let[F,l]of u){let U=f.has(F);if(!(l.selected===void 0&&!U)&&l.selected!==U)$.push(z1(l.id,U))}return $}function HJ({items:u=[],lookup:f}){let $=[],F=new Map(u.map((l)=>[l.id,l]));for(let[l,U]of u.entries()){let _=f.get(U.id),Q=_?.internals?.userNode??_;if(Q!==void 0&&Q!==U)$.push({id:U.id,item:U,type:"replace"});if(Q===void 0)$.push({item:U,type:"add",index:l})}for(let[l]of f)if(F.get(l)===void 0)$.push({id:l,type:"remove"});return $}function zJ(u){return{id:u.id,type:"remove"}}var PZ=O$("React Flow","https://reactflow.dev/");function rZ(u,f,$={}){return jQ(u,f,{...$,onError:$.onError??PZ})}var ZJ=(u)=>zQ(u),CZ=(u)=>R$(u);function pJ(u){return I.forwardRef(u)}var bJ=typeof window<"u"?I.useLayoutEffect:I.useEffect;function YJ(u){let[f,$]=I.useState(BigInt(0)),[F]=I.useState(()=>hZ(()=>$((l)=>l+BigInt(1))));return bJ(()=>{let l=F.get();if(l.length)u(l),F.reset()},[f]),F}function hZ(u){let f=[];return{get:()=>f,reset:()=>{f=[]},push:($)=>{f.push($),u()}}}var iJ=I.createContext(null);function vZ({children:u}){let f=Bu(),$=I.useCallback((Q)=>{let{nodes:J=[],setNodes:q,hasDefaultNodes:T,onNodesChange:W,nodeLookup:A,fitViewQueued:K,onNodesChangeMiddlewareMap:L}=f.getState(),z=J;for(let B of Q)z=typeof B==="function"?B(z):B;let Z=HJ({items:z,lookup:A});for(let B of L.values())Z=B(Z);if(T)q(z);if(Z.length>0)W?.(Z);else if(K)window.requestAnimationFrame(()=>{let{fitViewQueued:B,nodes:G,setNodes:w}=f.getState();if(B)w(G)})},[]),F=YJ($),l=I.useCallback((Q)=>{let{edges:J=[],setEdges:q,hasDefaultEdges:T,onEdgesChange:W,edgeLookup:A}=f.getState(),K=J;for(let L of Q)K=typeof L==="function"?L(K):L;if(T)q(K);else if(W)W(HJ({items:K,lookup:A}))},[]),U=YJ(l),_=I.useMemo(()=>({nodeQueue:F,edgeQueue:U}),[]);return y.jsx(iJ.Provider,{value:_,children:u})}function xZ(){let u=I.useContext(iJ);if(!u)throw Error("useBatchContext must be used within a BatchProvider");return u}var cZ=(u)=>!!u.panZoom;function k3(){let u=yZ(),f=Bu(),$=xZ(),F=qu(cZ),l=I.useMemo(()=>{let U=(W)=>f.getState().nodeLookup.get(W),_=(W)=>{$.nodeQueue.push(W)},Q=(W)=>{$.edgeQueue.push(W)},J=(W)=>{let{nodeLookup:A,nodeOrigin:K}=f.getState(),L=ZJ(W)?W:A.get(W.id),z=L.parentId?j$(L.position,L.measured,L.parentId,A,K):L.position,Z={...L,position:z,width:L.measured?.width??L.width,height:L.measured?.height??L.height};return W4(Z,L.parentId?void 0:K)},q=(W,A,K={replace:!1})=>{_((L)=>L.map((z)=>{if(z.id===W){let Z=typeof A==="function"?A(z):A;return K.replace&&ZJ(Z)?Z:{...z,...Z}}return z}))},T=(W,A,K={replace:!1})=>{Q((L)=>L.map((z)=>{if(z.id===W){let Z=typeof A==="function"?A(z):A;return K.replace&&CZ(Z)?Z:{...z,...Z}}return z}))};return{getNodes:()=>f.getState().nodes.map((W)=>({...W})),getNode:(W)=>U(W)?.internals.userNode,getInternalNode:U,getEdges:()=>{let{edges:W=[]}=f.getState();return W.map((A)=>({...A}))},getEdge:(W)=>f.getState().edgeLookup.get(W),setNodes:_,setEdges:Q,addNodes:(W)=>{let A=Array.isArray(W)?W:[W];$.nodeQueue.push((K)=>[...K,...A])},addEdges:(W)=>{let A=Array.isArray(W)?W:[W];$.edgeQueue.push((K)=>[...K,...A])},toObject:()=>{let{nodes:W=[],edges:A=[],transform:K}=f.getState(),[L,z,Z]=K;return{nodes:W.map((B)=>({...B})),edges:A.map((B)=>({...B})),viewport:{x:L,y:z,zoom:Z}}},deleteElements:async({nodes:W=[],edges:A=[]})=>{let{nodes:K,edges:L,onNodesDelete:z,onEdgesDelete:Z,triggerNodeChanges:B,triggerEdgeChanges:G,onDelete:w,onBeforeDelete:H}=f.getState(),{nodes:M,edges:R}=await RQ({nodesToRemove:W,edgesToRemove:A,nodes:K,edges:L,onBeforeDelete:H}),E=R.length>0,V=M.length>0;if(E){let D=R.map(zJ);Z?.(R),G(D)}if(V){let D=M.map(zJ);z?.(M),B(D)}if(V||E)w?.({nodes:M,edges:R});return{deletedNodes:M,deletedEdges:R}},getIntersectingNodes:(W,A=!0,K)=>{let L=D$(W),z=L?W:J(W),Z=K!==void 0;if(!z)return[];let{nodeOrigin:B}=f.getState();return(K||f.getState().nodes).filter((G)=>{let w=f.getState().nodeLookup.get(G.id);if(w&&!L&&(G.id===W.id||!w.internals.positionAbsolute))return!1;let H=W4(Z?G:w,B),M=j3(H,z);return A&&M>0||M>=H.width*H.height||M>=z.width*z.height})},isNodeIntersecting:(W,A,K=!0)=>{let z=D$(W)?W:J(W);if(!z)return!1;let Z=j3(z,A);return K&&Z>0||Z>=A.width*A.height||Z>=z.width*z.height},updateNode:q,updateNodeData:(W,A,K={replace:!1})=>{q(W,(L)=>{let z=typeof A==="function"?A(L):A;return K.replace?{...L,data:z}:{...L,data:{...L.data,...z}}},K)},updateEdge:T,updateEdgeData:(W,A,K={replace:!1})=>{T(W,(L)=>{let z=typeof A==="function"?A(L):A;return K.replace?{...L,data:z}:{...L,data:{...L.data,...z}}},K)},getNodesBounds:(W)=>{let{nodeLookup:A,nodeOrigin:K}=f.getState();return E$(W,{nodeLookup:A,nodeOrigin:K})},getHandleConnections:({type:W,id:A,nodeId:K})=>Array.from(f.getState().connectionLookup.get(`${K}-${W}${A?`-${A}`:""}`)?.values()??[]),getNodeConnections:({type:W,handleId:A,nodeId:K})=>Array.from(f.getState().connectionLookup.get(`${K}${W?A?`-${W}-${A}`:`-${W}`:""}`)?.values()??[]),fitView:async(W)=>{let A=f.getState().fitViewResolver??VQ();return f.setState({fitViewQueued:!0,fitViewOptions:W,fitViewResolver:A}),$.nodeQueue.push((K)=>[...K]),A.promise}}},[]);return I.useMemo(()=>{return{...l,...u,viewportInitialized:F}},[F])}var RJ=(u)=>u.selected,mZ=typeof window<"u"?window:void 0;function pZ({deleteKeyCode:u,multiSelectionKeyCode:f}){let $=Bu(),{deleteElements:F}=k3(),l=y3(u,{actInsideInputWithModifier:!1}),U=y3(f,{target:mZ});I.useEffect(()=>{if(l){let{edges:_,nodes:Q}=$.getState();F({nodes:Q.filter(RJ),edges:_.filter(RJ)}),$.setState({nodesSelectionActive:!1})}},[l]),I.useEffect(()=>{$.setState({multiSelectionActive:U})},[U])}function bZ(u){let f=Bu();I.useEffect(()=>{let $=()=>{if(!u.current||!(u.current.checkVisibility?.()??!0))return!1;let F=C6(u.current);if(F.height===0||F.width===0)f.getState().onError?.("004",Uf.error004());f.setState({width:F.width||500,height:F.height||500})};if(u.current){$(),window.addEventListener("resize",$);let F=new ResizeObserver(()=>$());return F.observe(u.current),()=>{window.removeEventListener("resize",$),F.disconnect()}}},[])}var o6={position:"absolute",width:"100%",height:"100%",top:0,left:0},iZ=(u)=>({userSelectionActive:u.userSelectionActive,lib:u.lib,connectionInProgress:u.connection.inProgress});function gZ({onPaneContextMenu:u,zoomOnScroll:f=!0,zoomOnPinch:$=!0,panOnScroll:F=!1,panActivationKeyPressed:l,panOnScrollSpeed:U=0.5,panOnScrollMode:_=T0.Free,zoomOnDoubleClick:Q=!0,panOnDrag:J=!0,defaultViewport:q,translateExtent:T,minZoom:W,maxZoom:A,zoomActivationKeyCode:K,preventScrolling:L=!0,children:z,noWheelClassName:Z,noPanClassName:B,onViewportChange:G,isControlledViewport:w,paneClickDistance:H,selectionOnDrag:M}){let R=Bu(),E=I.useRef(null),{userSelectionActive:V,lib:D,connectionInProgress:r}=qu(iZ,Gu),C=y3(K),m=I.useRef();bZ(E);let v=I.useCallback((Y)=>{if(G?.({x:Y[0],y:Y[1],zoom:Y[2]}),!w)R.setState({transform:Y})},[G,w]);return I.useEffect(()=>{if(E.current){m.current=sQ({domNode:E.current,minZoom:W,maxZoom:A,translateExtent:T,viewport:q,onDraggingChange:(j)=>R.setState((k)=>k.paneDragging===j?k:{paneDragging:j}),onPanZoomStart:(j,k)=>{let{onViewportChangeStart:P,onMoveStart:c}=R.getState();c?.(j,k),P?.(k)},onPanZoom:(j,k)=>{let{onViewportChange:P,onMove:c}=R.getState();c?.(j,k),P?.(k)},onPanZoomEnd:(j,k)=>{let{onViewportChangeEnd:P,onMoveEnd:c}=R.getState();c?.(j,k),P?.(k)}});let{x:Y,y:X,zoom:O}=m.current.getViewport();return R.setState({panZoom:m.current,transform:[Y,X,O],domNode:E.current.closest(".react-flow")}),()=>{m.current?.destroy()}}},[]),I.useEffect(()=>{m.current?.update({onPaneContextMenu:u,zoomOnScroll:f,zoomOnPinch:$,panOnScroll:F,panActivationKeyPressed:l,panOnScrollSpeed:U,panOnScrollMode:_,zoomOnDoubleClick:Q,panOnDrag:J,zoomActivationKeyPressed:C,preventScrolling:L,noPanClassName:B,userSelectionActive:V,noWheelClassName:Z,lib:D,onTransformChange:v,connectionInProgress:r,selectionOnDrag:M,paneClickDistance:H})},[u,f,$,F,l,U,_,Q,J,C,L,B,V,Z,D,v,r,M,H]),y.jsx("div",{className:"react-flow__renderer",ref:E,style:o6,children:z})}var sZ=(u)=>({userSelectionActive:u.userSelectionActive,userSelectionRect:u.userSelectionRect});function tZ(){let{userSelectionActive:u,userSelectionRect:f}=qu(sZ,Gu);if(!(u&&f))return null;return y.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:f.width,height:f.height,transform:`translate(${f.x}px, ${f.y}px)`}})}var b$=(u,f)=>{return($)=>{if($.target!==f.current)return;u?.($)}},nZ=(u)=>({userSelectionActive:u.userSelectionActive,elementsSelectable:u.elementsSelectable,dragging:u.paneDragging,panBy:u.panBy,autoPanSpeed:u.autoPanSpeed});function dZ({isSelecting:u,selectionKeyPressed:f,selectionMode:$=B1.Full,panOnDrag:F,autoPanOnSelection:l,paneClickDistance:U,selectionOnDrag:_,onSelectionStart:Q,onSelectionEnd:J,onPaneClick:q,onPaneContextMenu:T,onPaneScroll:W,onPaneMouseEnter:A,onPaneMouseMove:K,onPaneMouseLeave:L,children:z}){let Z=I.useRef(0),B=Bu(),{userSelectionActive:G,elementsSelectable:w,dragging:H,panBy:M,autoPanSpeed:R}=qu(nZ,Gu),E=w&&(u||G),V=I.useRef(null),D=I.useRef(),r=I.useRef(new Set),C=I.useRef(new Set),m=I.useRef(!1),v=I.useRef(!1),Y=I.useRef({x:0,y:0}),X=I.useRef(!1),O=(h)=>{if(v.current||m.current||B.getState().connection.inProgress){v.current=!1,m.current=!1;return}let{connectionClickStartHandle:n,connection:N,onClickConnectEnd:b,resetSelectedElements:s}=B.getState();if(n){let d=structuredClone(N);delete d.inProgress,d.toPosition=d.toHandle?d.toHandle.position:null,b?.(h.nativeEvent,d),B.setState({connectionClickStartHandle:null})}q?.(h),s(),B.setState({nodesSelectionActive:!1})},j=(h)=>{if(Array.isArray(F)&&F?.includes(2)){h.preventDefault();return}T?.(h)},k=W?(h)=>W(h):void 0,P=(h)=>{if(v.current)h.stopPropagation(),v.current=!1},c=(h)=>{if(h.pointerType==="touch"&&F!==!1&&!f)return;let{domNode:n,transform:N}=B.getState();if(D.current=n?.getBoundingClientRect(),!D.current)return;let b=h.target===V.current;if(!b&&!!h.target.closest(".nokey")||!u||!(_&&b||f)||h.button!==0||!h.isPrimary)return;h.target?.setPointerCapture?.(h.pointerId),v.current=!1;let{x:e,y:lu}=wf(h.nativeEvent,D.current),Uu=w4({x:e,y:lu},N);if(B.setState({userSelectionRect:{width:0,height:0,startX:Uu.x,startY:Uu.y,x:e,y:lu}}),!b)h.stopPropagation(),h.preventDefault()};function x(h,n){let{userSelectionRect:N}=B.getState();if(!N)return;let{transform:b,nodeLookup:s,edgeLookup:d,connectionLookup:e,triggerNodeChanges:lu,triggerEdgeChanges:Uu,defaultEdgeOptions:Nu}=B.getState(),bf={x:N.startX,y:N.startY},{x:jf,y:Nf}=G1(bf,b),gf={startX:bf.x,startY:bf.y,x:h<jf?h:jf,y:n<Nf?n:Nf,width:Math.abs(h-jf),height:Math.abs(n-Nf)},H4=r.current,m0=C.current;r.current=new Set(y6(s,gf,b,$===B1.Partial,!0).map((Hf)=>Hf.id)),C.current=new Set;let p0=Nu?.selectable??!0;for(let Hf of r.current){let sf=e.get(Hf);if(!sf)continue;for(let{edgeId:tf}of sf.values()){let b0=d.get(tf);if(b0&&(b0.selectable??p0))C.current.add(tf)}}if(!N$(H4,r.current)){let Hf=G4(s,r.current);lu(Hf)}if(!N$(m0,C.current)){let Hf=G4(d,C.current);Uu(Hf)}B.setState({userSelectionRect:gf,userSelectionActive:!0,nodesSelectionActive:!1})}function g(){if(!l||!D.current)return;let[h,n]=k6(Y.current,D.current,R);M({x:h,y:n}).then((N)=>{if(!v.current||!N){Z.current=requestAnimationFrame(g);return}let{x:b,y:s}=Y.current;x(b,s),Z.current=requestAnimationFrame(g)})}let $u=()=>{cancelAnimationFrame(Z.current),Z.current=0,X.current=!1};I.useEffect(()=>{return()=>$u()},[]);let i=(h)=>{let{userSelectionRect:n,transform:N,resetSelectedElements:b}=B.getState();if(!D.current||!n)return;let{x:s,y:d}=wf(h.nativeEvent,D.current);Y.current={x:s,y:d};let e=G1({x:n.startX,y:n.startY},N);if(!v.current){let lu=f?0:U;if(Math.hypot(s-e.x,d-e.y)<=lu)return;b(),Q?.(h)}if(v.current=!0,!X.current)g(),X.current=!0;x(s,d)},fu=(h)=>{if(!E){if(h.target===V.current&&B.getState().connection.inProgress)m.current=!0;return}if(h.button!==0)return;if(h.target?.releasePointerCapture?.(h.pointerId),!G&&h.target===V.current&&B.getState().userSelectionRect)O?.(h);if(B.setState({userSelectionActive:!1,userSelectionRect:null}),v.current)J?.(h),B.setState({nodesSelectionActive:r.current.size>0});$u()},Fu=(h)=>{h.target?.releasePointerCapture?.(h.pointerId),$u()},uu=F===!0||Array.isArray(F)&&F.includes(0);return y.jsxs("div",{className:Ru(["react-flow__pane",{draggable:uu,dragging:H,selection:u}]),onClick:E?void 0:b$(O,V),onContextMenu:b$(j,V),onWheel:b$(k,V),onPointerEnter:E?void 0:A,onPointerMove:E?i:K,onPointerUp:fu,onPointerCancel:E?Fu:void 0,onPointerDownCapture:E?c:void 0,onClickCapture:E?P:void 0,onPointerLeave:L,ref:V,style:o6,children:[z,y.jsx(tZ,{})]})}function g$({id:u,store:f,unselect:$=!1,nodeRef:F}){let{addSelectedNodes:l,unselectNodesAndEdges:U,multiSelectionActive:_,nodeLookup:Q,onError:J}=f.getState(),q=Q.get(u);if(!q){J?.("012",Uf.error012(u));return}if(f.setState({nodesSelectionActive:!1}),!q.selected)l([u]);else if($||q.selected&&_)U({nodes:[q],edges:[]}),requestAnimationFrame(()=>F?.current?.blur())}function gJ({nodeRef:u,disabled:f=!1,noDragClassName:$,handleSelector:F,nodeId:l,isSelectable:U,nodeClickDistance:_}){let Q=Bu(),[J,q]=I.useState(!1),T=I.useRef();return I.useEffect(()=>{if(f)return;return T.current=vQ({getStoreItems:()=>Q.getState(),onNodeMouseDown:(W)=>{g$({id:W,store:Q,nodeRef:u})},onDragStart:()=>{q(!0)},onDragStop:()=>{q(!1)}}),()=>{T.current?.destroy(),T.current=void 0}},[f,Q,u]),I.useEffect(()=>{if(f||!u.current||!T.current)return;T.current.update({noDragClassName:$,handleSelector:F,domNode:u.current,isSelectable:U,nodeId:l,nodeClickDistance:_})},[$,F,f,U,u,l,_]),J}var aZ=(u)=>(f)=>f.selected&&(f.draggable||u&&typeof f.draggable>"u");function sJ(){let u=Bu();return I.useCallback(($)=>{let{nodeExtent:F,snapToGrid:l,snapGrid:U,nodesDraggable:_,onError:Q,updateNodePositions:J,nodeLookup:q,nodeOrigin:T}=u.getState(),W=new Map,A=aZ(_),K=l?U[0]:5,L=l?U[1]:5,z=$.direction.x*K*$.factor,Z=$.direction.y*L*$.factor;for(let[,B]of q){if(!A(B))continue;let G={x:B.internals.positionAbsolute.x+z,y:B.internals.positionAbsolute.y+Z};if(l)G=K4(G,U);let{position:w,positionAbsolute:H}=V$({nodeId:B.id,nextPosition:G,nodeLookup:q,nodeExtent:F,nodeOrigin:T,onError:Q});B.position=w,B.internals.positionAbsolute=H,W.set(B.id,B)}J(W)},[])}var s$=I.createContext(null),oZ=s$.Provider;s$.Consumer;var tJ=()=>{return I.useContext(s$)},eZ=(u)=>({connectOnClick:u.connectOnClick,noPanClassName:u.noPanClassName,rfId:u.rfId}),nJ=I.createContext(null);function uY({children:u}){let f=qu(eZ,Gu);return y.jsx(nJ.Provider,{value:f,children:u})}function fY(){let u=I.useContext(nJ);if(!u)throw Error("useHandleConfig must be used within a HandleConfigProvider");return u}var $Y={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},FY=(u,f,$)=>(F)=>{let{connectionClickStartHandle:l,connectionMode:U,connection:_}=F,{fromHandle:Q,toHandle:J,isValid:q}=_;if(!Q&&!l)return $Y;let T=J?.nodeId===u&&J?.id===f&&J?.type===$;return{connectingFrom:Q?.nodeId===u&&Q?.id===f&&Q?.type===$,connectingTo:T,clickConnecting:l?.nodeId===u&&l?.id===f&&l?.type===$,isPossibleEndHandle:U===h0.Strict?Q?.type!==$:u!==Q?.nodeId||f!==Q?.id,connectionInProcess:!!Q,clickConnectionInProcess:!!l,valid:T&&q}};function lY({type:u="source",position:f=a.Top,isValidConnection:$,isConnectable:F=!0,isConnectableStart:l=!0,isConnectableEnd:U=!0,id:_,onConnect:Q,children:J,className:q,onMouseDown:T,onTouchStart:W,...A},K){let L=_||null,z=u==="target",Z=Bu(),B=tJ(),{connectOnClick:G,noPanClassName:w,rfId:H}=fY(),{connectingFrom:M,connectingTo:R,clickConnecting:E,isPossibleEndHandle:V,connectionInProcess:D,clickConnectionInProcess:r,valid:C}=qu(FY(B,L,u),Gu);if(!B)Z.getState().onError?.("010",Uf.error010());let m=(X)=>{let{defaultEdgeOptions:O,onConnect:j,hasDefaultEdges:k}=Z.getState(),P={...O,...X};if(k){let{edges:c,setEdges:x,onError:g}=Z.getState();x(rZ(P,c,{onError:g}))}j?.(P),Q?.(P)},v=(X)=>{if(!B)return;let O=P$(X.nativeEvent);if(l&&(O&&X.button===0||!O)){let j=Z.getState();b6.onPointerDown(X.nativeEvent,{handleDomNode:X.currentTarget,autoPanOnConnect:j.autoPanOnConnect,connectionMode:j.connectionMode,connectionRadius:j.connectionRadius,domNode:j.domNode,nodeLookup:j.nodeLookup,lib:j.lib,isTarget:z,handleId:L,nodeId:B,flowId:j.rfId,panBy:j.panBy,cancelConnection:j.cancelConnection,onConnectStart:j.onConnectStart,onConnectEnd:(...k)=>Z.getState().onConnectEnd?.(...k),updateConnection:j.updateConnection,onConnect:m,isValidConnection:$||((...k)=>Z.getState().isValidConnection?.(...k)??!0),getTransform:()=>Z.getState().transform,getFromHandle:()=>Z.getState().connection.fromHandle,autoPanSpeed:j.autoPanSpeed,dragThreshold:j.connectionDragThreshold})}if(O)T?.(X);else W?.(X)},Y=(X)=>{let{onClickConnectStart:O,onClickConnectEnd:j,connectionClickStartHandle:k,connectionMode:P,isValidConnection:c,lib:x,rfId:g,nodeLookup:$u,connection:i}=Z.getState();if(!B||!k&&!l)return;if(!k){O?.(X.nativeEvent,{nodeId:B,handleId:L,handleType:u}),Z.setState({connectionClickStartHandle:{nodeId:B,type:u,id:L}});return}let fu=y$(X.target),Fu=$||c,{connection:uu,isValid:h}=b6.isValid(X.nativeEvent,{handle:{nodeId:B,id:L,type:u},connectionMode:P,fromNodeId:k.nodeId,fromHandleId:k.id||null,fromType:k.type,isValidConnection:Fu,flowId:g,doc:fu,lib:x,nodeLookup:$u});if(h&&uu)m(uu);let n=structuredClone(i);delete n.inProgress,n.toPosition=n.toHandle?n.toHandle.position:null,j?.(X,n),Z.setState({connectionClickStartHandle:null})};return y.jsx("div",{"data-handleid":L,"data-nodeid":B,"data-handlepos":f,"data-id":`${H}-${B}-${L}-${u}`,className:Ru(["react-flow__handle",`react-flow__handle-${f}`,"nodrag",w,q,{source:!z,target:z,connectable:F,connectablestart:l,connectableend:U,clickconnecting:E,connectingfrom:M,connectingto:R,valid:C,connectionindicator:F&&(!D||V)&&(D||r?U:l)}]),onMouseDown:v,onTouchStart:v,onClick:G?Y:void 0,ref:K,...A,children:J})}var Z1=I.memo(pJ(lY));function UY({data:u,isConnectable:f,sourcePosition:$=a.Bottom}){return y.jsxs(y.Fragment,{children:[u?.label,y.jsx(Z1,{type:"source",position:$,isConnectable:f})]})}function _Y({data:u,isConnectable:f,targetPosition:$=a.Top,sourcePosition:F=a.Bottom}){return y.jsxs(y.Fragment,{children:[y.jsx(Z1,{type:"target",position:$,isConnectable:f}),u?.label,y.jsx(Z1,{type:"source",position:F,isConnectable:f})]})}function QY(){return null}function JY({data:u,isConnectable:f,targetPosition:$=a.Top}){return y.jsxs(y.Fragment,{children:[y.jsx(Z1,{type:"target",position:$,isConnectable:f}),u?.label]})}var n6={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},MJ={input:UY,default:_Y,output:JY,group:QY};function qY(u){if(u.internals.handleBounds===void 0)return{width:u.width??u.initialWidth??u.style?.width,height:u.height??u.initialHeight??u.style?.height};return{width:u.width??u.style?.width,height:u.height??u.style?.height}}var TY=(u)=>{let{width:f,height:$,x:F,y:l}=A4(u.nodeLookup,{filter:(U)=>!!U.selected});return{width:Kf(f)?f:null,height:Kf($)?$:null,userSelectionActive:u.userSelectionActive,transformString:`translate(${u.transform[0]}px,${u.transform[1]}px) scale(${u.transform[2]}) translate(${F}px,${l}px)`}};function AY({onSelectionContextMenu:u,noPanClassName:f,disableKeyboardA11y:$}){let F=Bu(),{width:l,height:U,transformString:_,userSelectionActive:Q}=qu(TY,Gu),J=sJ(),q=I.useRef(null);I.useEffect(()=>{if(!$)q.current?.focus({preventScroll:!0})},[$]);let T=!Q&&l!==null&&U!==null;if(gJ({nodeRef:q,disabled:!T}),!T)return null;let W=u?(K)=>{let L=F.getState().nodes.filter((z)=>z.selected);u(K,L)}:void 0,A=(K)=>{if(Object.prototype.hasOwnProperty.call(n6,K.key))K.preventDefault(),J({direction:n6[K.key],factor:K.shiftKey?4:1})};return y.jsx("div",{className:Ru(["react-flow__nodesselection","react-flow__container",f]),style:{transform:_},children:y.jsx("div",{ref:q,className:"react-flow__nodesselection-rect",onContextMenu:W,tabIndex:$?void 0:-1,onKeyDown:$?void 0:A,style:{width:l,height:U}})})}var EJ=typeof window<"u"?window:void 0,WY=(u)=>{return{nodesSelectionActive:u.nodesSelectionActive,userSelectionActive:u.userSelectionActive}};function dJ({children:u,onPaneClick:f,onPaneMouseEnter:$,onPaneMouseMove:F,onPaneMouseLeave:l,onPaneContextMenu:U,onPaneScroll:_,paneClickDistance:Q,deleteKeyCode:J,selectionKeyCode:q,selectionOnDrag:T,selectionMode:W,onSelectionStart:A,onSelectionEnd:K,multiSelectionKeyCode:L,panActivationKeyCode:z,zoomActivationKeyCode:Z,elementsSelectable:B,zoomOnScroll:G,zoomOnPinch:w,panOnScroll:H,panOnScrollSpeed:M,panOnScrollMode:R,zoomOnDoubleClick:E,panOnDrag:V,autoPanOnSelection:D,defaultViewport:r,translateExtent:C,minZoom:m,maxZoom:v,preventScrolling:Y,onSelectionContextMenu:X,noWheelClassName:O,noPanClassName:j,disableKeyboardA11y:k,onViewportChange:P,isControlledViewport:c}){let{nodesSelectionActive:x,userSelectionActive:g}=qu(WY,Gu),$u=y3(q,{target:EJ}),i=y3(z,{target:EJ}),fu=i||V,Fu=i||H,uu=T&&fu!==!0,h=$u||g||uu;return pZ({deleteKeyCode:J,multiSelectionKeyCode:L}),y.jsx(gZ,{onPaneContextMenu:U,elementsSelectable:B,zoomOnScroll:G,zoomOnPinch:w,panOnScroll:Fu,panActivationKeyPressed:i,panOnScrollSpeed:M,panOnScrollMode:R,zoomOnDoubleClick:E,panOnDrag:!$u&&fu,defaultViewport:r,translateExtent:C,minZoom:m,maxZoom:v,zoomActivationKeyCode:Z,preventScrolling:Y,noWheelClassName:O,noPanClassName:j,onViewportChange:P,isControlledViewport:c,paneClickDistance:Q,selectionOnDrag:uu,children:y.jsxs(dZ,{onSelectionStart:A,onSelectionEnd:K,onPaneClick:f,onPaneMouseEnter:$,onPaneMouseMove:F,onPaneMouseLeave:l,onPaneContextMenu:U,onPaneScroll:_,panOnDrag:fu,autoPanOnSelection:D,isSelecting:!!h,selectionMode:W,selectionKeyPressed:$u,paneClickDistance:Q,selectionOnDrag:uu,children:[u,x&&y.jsx(AY,{onSelectionContextMenu:X,noPanClassName:j,disableKeyboardA11y:k})]})})}dJ.displayName="FlowRenderer";var KY=I.memo(dJ),wY=(u)=>(f)=>{return u?y6(f.nodeLookup,{x:0,y:0,width:f.width,height:f.height},f.transform,!0).map(($)=>$.id):Array.from(f.nodeLookup.keys())};function BY(u){return qu(I.useCallback(wY(u),[u]),Gu)}var LY=(u)=>u.updateNodeInternals;function GY(){let u=qu(LY),[f]=I.useState(()=>{if(typeof ResizeObserver>"u")return null;return new ResizeObserver(($)=>{let F=new Map;$.forEach((l)=>{let U=l.target.getAttribute("data-id");F.set(U,{id:U,nodeElement:l.target,force:!0})}),u(F)})});return I.useEffect(()=>{return()=>{f?.disconnect()}},[f]),f}function HY({node:u,nodeType:f,hasDimensions:$,resizeObserver:F}){let l=Bu(),U=I.useRef(null),_=I.useRef(null),Q=I.useRef(u.sourcePosition),J=I.useRef(u.targetPosition),q=I.useRef(f),T=$&&!!u.internals.handleBounds;return I.useEffect(()=>{if(U.current&&!u.hidden&&(!T||_.current!==U.current)){if(_.current)F?.unobserve(_.current);F?.observe(U.current),_.current=U.current}},[T,u.hidden]),I.useEffect(()=>{return()=>{if(_.current)F?.unobserve(_.current),_.current=null}},[]),I.useEffect(()=>{if(U.current){let W=q.current!==f,A=Q.current!==u.sourcePosition,K=J.current!==u.targetPosition;if(W||A||K)q.current=f,Q.current=u.sourcePosition,J.current=u.targetPosition,l.getState().updateNodeInternals(new Map([[u.id,{id:u.id,nodeElement:U.current,force:!0}]]))}},[u.id,f,u.sourcePosition,u.targetPosition]),U}function zY({id:u,onClick:f,onMouseEnter:$,onMouseMove:F,onMouseLeave:l,onContextMenu:U,onDoubleClick:_,nodesDraggable:Q,elementsSelectable:J,nodesConnectable:q,nodesFocusable:T,resizeObserver:W,noDragClassName:A,noPanClassName:K,disableKeyboardA11y:L,rfId:z,nodeTypes:Z,nodeClickDistance:B,onError:G}){let{node:w,internals:H,isParent:M}=qu((h)=>{let n=h.nodeLookup.get(u),N=h.parentLookup.has(u);return{node:n,internals:n.internals,isParent:N}},Gu),R=w.type||"default",E=Z?.[R]||MJ[R];if(E===void 0)G?.("003",Uf.error003(R)),R="default",E=Z?.default||MJ.default;let V=!!(w.draggable||Q&&typeof w.draggable>"u"),D=!!(w.selectable||J&&typeof w.selectable>"u"),r=!!(w.connectable||q&&typeof w.connectable>"u"),C=!!(w.focusable||T&&typeof w.focusable>"u"),m=Bu(),v=S$(w),Y=HY({node:w,nodeType:R,hasDimensions:v,resizeObserver:W}),X=gJ({nodeRef:Y,disabled:w.hidden||!V,noDragClassName:A,handleSelector:w.dragHandle,nodeId:u,isSelectable:D,nodeClickDistance:B}),O=sJ();if(w.hidden)return null;let j=Bf(w),k=qY(w),P=D||V||f||$||F||l,c=$?(h)=>$(h,{...H.userNode}):void 0,x=F?(h)=>F(h,{...H.userNode}):void 0,g=l?(h)=>l(h,{...H.userNode}):void 0,$u=U?(h)=>U(h,{...H.userNode}):void 0,i=_?(h)=>_(h,{...H.userNode}):void 0,fu=(h)=>{let{selectNodesOnDrag:n,nodeDragThreshold:N}=m.getState();if(D&&(!n||!V||N>0))g$({id:u,store:m,nodeRef:Y});if(f)f(h,{...H.userNode})},Fu=(h)=>{if(k$(h.nativeEvent)||L)return;if(z$.includes(h.key)&&D){let n=h.key==="Escape";g$({id:u,store:m,unselect:n,nodeRef:Y})}else if(V&&w.selected&&Object.prototype.hasOwnProperty.call(n6,h.key)){h.preventDefault();let{ariaLabelConfig:n}=m.getState();m.setState({ariaLiveMessage:n["node.a11yDescription.ariaLiveMessage"]({direction:h.key.replace("Arrow","").toLowerCase(),x:~~H.positionAbsolute.x,y:~~H.positionAbsolute.y})}),O({direction:n6[h.key],factor:h.shiftKey?4:1})}},uu=()=>{if(L||!Y.current?.matches(":focus-visible"))return;let{transform:h,width:n,height:N,autoPanOnNodeFocus:b,setCenter:s}=m.getState();if(!b)return;if(!(y6(new Map([[u,w]]),{x:0,y:0,width:n,height:N},h,!0).length>0))s(w.position.x+j.width/2,w.position.y+j.height/2,{zoom:h[2]})};return y.jsx("div",{className:Ru(["react-flow__node",`react-flow__node-${R}`,{[K]:V},w.className,{selected:w.selected,selectable:D,parent:M,draggable:V,dragging:X}]),ref:Y,style:{zIndex:H.z,transform:`translate(${H.positionAbsolute.x}px,${H.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:v?"visible":"hidden",...w.style,...k},"data-id":u,"data-testid":`rf__node-${u}`,onMouseEnter:c,onMouseMove:x,onMouseLeave:g,onContextMenu:$u,onClick:fu,onDoubleClick:i,onKeyDown:C?Fu:void 0,tabIndex:C?0:void 0,onFocus:C?uu:void 0,role:w.ariaRole??(C?"group":void 0),"aria-roledescription":"node","aria-describedby":L?void 0:`${CJ}-${z}`,"aria-label":w.ariaLabel,...w.domAttributes,children:y.jsx(oZ,{value:u,children:y.jsx(E,{id:u,data:w.data,type:R,positionAbsoluteX:H.positionAbsolute.x,positionAbsoluteY:H.positionAbsolute.y,selected:w.selected??!1,selectable:D,draggable:V,deletable:w.deletable??!0,isConnectable:r,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:X,dragHandle:w.dragHandle,zIndex:H.z,parentId:w.parentId,...j})})})}var ZY=I.memo(zY),YY=(u)=>({nodesConnectable:u.nodesConnectable,nodesFocusable:u.nodesFocusable,elementsSelectable:u.elementsSelectable,onError:u.onError});function aJ(u){let{nodesConnectable:f,nodesFocusable:$,elementsSelectable:F,onError:l}=qu(YY,Gu),U=BY(u.onlyRenderVisibleElements),_=GY();return y.jsx("div",{className:"react-flow__nodes",style:o6,children:U.map((Q)=>{return y.jsx(ZY,{id:Q,nodeTypes:u.nodeTypes,nodeExtent:u.nodeExtent,onClick:u.onNodeClick,onMouseEnter:u.onNodeMouseEnter,onMouseMove:u.onNodeMouseMove,onMouseLeave:u.onNodeMouseLeave,onContextMenu:u.onNodeContextMenu,onDoubleClick:u.onNodeDoubleClick,noDragClassName:u.noDragClassName,noPanClassName:u.noPanClassName,rfId:u.rfId,disableKeyboardA11y:u.disableKeyboardA11y,resizeObserver:_,nodesDraggable:u.nodesDraggable??!0,nodesConnectable:f,nodesFocusable:$,elementsSelectable:F,nodeClickDistance:u.nodeClickDistance,onError:l},Q)})})}aJ.displayName="NodeRenderer";var RY=I.memo(aJ);function MY(u){return qu(I.useCallback(($)=>{if(!u)return $.edges.map((l)=>l.id);let F=[];if($.width&&$.height)for(let l of $.edges){let U=$.nodeLookup.get(l.source),_=$.nodeLookup.get(l.target);if(U&&_&&SQ({sourceNode:U,targetNode:_,width:$.width,height:$.height,transform:$.transform}))F.push(l.id)}return F},[u]),Gu)}var EY=({color:u="none",strokeWidth:f=1})=>{let $={strokeWidth:f,...u&&{stroke:u}};return y.jsx("polyline",{className:"arrow",style:$,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},VY=({color:u="none",strokeWidth:f=1})=>{let $={strokeWidth:f,...u&&{stroke:u,fill:u}};return y.jsx("polyline",{className:"arrowclosed",style:$,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},VJ={[pf.Arrow]:EY,[pf.ArrowClosed]:VY};function XY(u){let f=Bu();return I.useMemo(()=>{if(!Object.prototype.hasOwnProperty.call(VJ,u))return f.getState().onError?.("009",Uf.error009(u)),null;return VJ[u]},[u])}var DY=({id:u,type:f,color:$,width:F=12.5,height:l=12.5,markerUnits:U="strokeWidth",strokeWidth:_,orient:Q="auto-start-reverse"})=>{let J=XY(f);if(!J)return null;return y.jsx("marker",{className:"react-flow__arrowhead",id:u,markerWidth:`${F}`,markerHeight:`${l}`,viewBox:"-10 -10 20 20",markerUnits:U,orient:Q,refX:"0",refY:"0",children:y.jsx(J,{color:$,strokeWidth:_})})},oJ=({defaultColor:u,rfId:f})=>{let $=qu((U)=>U.edges),F=qu((U)=>U.defaultEdgeOptions),l=I.useMemo(()=>{return IQ($,{id:f,defaultColor:u,defaultMarkerStart:F?.markerStart,defaultMarkerEnd:F?.markerEnd})},[$,F,f,u]);if(!l.length)return null;return y.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:y.jsx("defs",{children:l.map((U)=>y.jsx(DY,{id:U.id,type:U.type,color:U.color,width:U.width,height:U.height,markerUnits:U.markerUnits,strokeWidth:U.strokeWidth,orient:U.orient},U.id))})})};oJ.displayName="MarkerDefinitions";var OY=I.memo(oJ);function eJ({x:u,y:f,label:$,labelStyle:F,labelShowBg:l=!0,labelBgStyle:U,labelBgPadding:_=[2,4],labelBgBorderRadius:Q=2,children:J,className:q,...T}){let[W,A]=I.useState({x:1,y:0,width:0,height:0}),K=Ru(["react-flow__edge-textwrapper",q]),L=I.useRef(null);if(I.useEffect(()=>{if(L.current){let z=L.current.getBBox();A({x:z.x,y:z.y,width:z.width,height:z.height})}},[$]),!$)return null;return y.jsxs("g",{transform:`translate(${u-W.width/2} ${f-W.height/2})`,className:K,visibility:W.width?"visible":"hidden",...T,children:[l&&y.jsx("rect",{width:W.width+2*_[0],x:-_[0],y:-_[1],height:W.height+2*_[1],className:"react-flow__edge-textbg",style:U,rx:Q,ry:Q}),y.jsx("text",{className:"react-flow__edge-text",y:W.height/2,dy:"0.3em",ref:L,style:F,children:$}),J]})}eJ.displayName="EdgeText";var SY=I.memo(eJ);function e6({path:u,labelX:f,labelY:$,label:F,labelStyle:l,labelShowBg:U,labelBgStyle:_,labelBgPadding:Q,labelBgBorderRadius:J,interactionWidth:q=20,...T}){return y.jsxs(y.Fragment,{children:[y.jsx("path",{...T,d:u,fill:"none",className:Ru(["react-flow__edge-path",T.className])}),q?y.jsx("path",{d:u,fill:"none",strokeOpacity:0,strokeWidth:q,className:"react-flow__edge-interaction"}):null,F&&Kf(f)&&Kf($)?y.jsx(SY,{x:f,y:$,label:F,labelStyle:l,labelShowBg:U,labelBgStyle:_,labelBgPadding:Q,labelBgBorderRadius:J}):null]})}function XJ({pos:u,x1:f,y1:$,x2:F,y2:l}){if(u===a.Left||u===a.Right)return[0.5*(f+F),$];return[f,0.5*($+l)]}function uq({sourceX:u,sourceY:f,sourcePosition:$=a.Bottom,targetX:F,targetY:l,targetPosition:U=a.Top}){let[_,Q]=XJ({pos:$,x1:u,y1:f,x2:F,y2:l}),[J,q]=XJ({pos:U,x1:F,y1:l,x2:u,y2:f}),[T,W,A,K]=h6({sourceX:u,sourceY:f,targetX:F,targetY:l,sourceControlX:_,sourceControlY:Q,targetControlX:J,targetControlY:q});return[`M${u},${f} C${_},${Q} ${J},${q} ${F},${l}`,T,W,A,K]}function fq(u){return I.memo(({id:f,sourceX:$,sourceY:F,targetX:l,targetY:U,sourcePosition:_,targetPosition:Q,label:J,labelStyle:q,labelShowBg:T,labelBgStyle:W,labelBgPadding:A,labelBgBorderRadius:K,style:L,markerEnd:z,markerStart:Z,interactionWidth:B})=>{let[G,w,H]=uq({sourceX:$,sourceY:F,sourcePosition:_,targetX:l,targetY:U,targetPosition:Q}),M=u.isInternal?void 0:f;return y.jsx(e6,{id:M,path:G,labelX:w,labelY:H,label:J,labelStyle:q,labelShowBg:T,labelBgStyle:W,labelBgPadding:A,labelBgBorderRadius:K,style:L,markerEnd:z,markerStart:Z,interactionWidth:B})})}var jY=fq({isInternal:!1}),$q=fq({isInternal:!0});jY.displayName="SimpleBezierEdge";$q.displayName="SimpleBezierEdgeInternal";function Fq(u){return I.memo(({id:f,sourceX:$,sourceY:F,targetX:l,targetY:U,label:_,labelStyle:Q,labelShowBg:J,labelBgStyle:q,labelBgPadding:T,labelBgBorderRadius:W,style:A,sourcePosition:K=a.Bottom,targetPosition:L=a.Top,markerEnd:z,markerStart:Z,pathOptions:B,interactionWidth:G})=>{let[w,H,M]=I3({sourceX:$,sourceY:F,sourcePosition:K,targetX:l,targetY:U,targetPosition:L,borderRadius:B?.borderRadius,offset:B?.offset,stepPosition:B?.stepPosition}),R=u.isInternal?void 0:f;return y.jsx(e6,{id:R,path:w,labelX:H,labelY:M,label:_,labelStyle:Q,labelShowBg:J,labelBgStyle:q,labelBgPadding:T,labelBgBorderRadius:W,style:A,markerEnd:z,markerStart:Z,interactionWidth:G})})}var lq=Fq({isInternal:!1}),Uq=Fq({isInternal:!0});lq.displayName="SmoothStepEdge";Uq.displayName="SmoothStepEdgeInternal";function _q(u){return I.memo(({id:f,...$})=>{let F=u.isInternal?void 0:f;return y.jsx(lq,{...$,id:F,pathOptions:I.useMemo(()=>({borderRadius:0,offset:$.pathOptions?.offset}),[$.pathOptions?.offset])})})}var NY=_q({isInternal:!1}),Qq=_q({isInternal:!0});NY.displayName="StepEdge";Qq.displayName="StepEdgeInternal";function Jq(u){return I.memo(({id:f,sourceX:$,sourceY:F,targetX:l,targetY:U,label:_,labelStyle:Q,labelShowBg:J,labelBgStyle:q,labelBgPadding:T,labelBgBorderRadius:W,style:A,markerEnd:K,markerStart:L,interactionWidth:z})=>{let[Z,B,G]=x6({sourceX:$,sourceY:F,targetX:l,targetY:U}),w=u.isInternal?void 0:f;return y.jsx(e6,{id:w,path:Z,labelX:B,labelY:G,label:_,labelStyle:Q,labelShowBg:J,labelBgStyle:q,labelBgPadding:T,labelBgBorderRadius:W,style:A,markerEnd:K,markerStart:L,interactionWidth:z})})}var IY=Jq({isInternal:!1}),qq=Jq({isInternal:!0});IY.displayName="StraightEdge";qq.displayName="StraightEdgeInternal";function Tq(u){return I.memo(({id:f,sourceX:$,sourceY:F,targetX:l,targetY:U,sourcePosition:_=a.Bottom,targetPosition:Q=a.Top,label:J,labelStyle:q,labelShowBg:T,labelBgStyle:W,labelBgPadding:A,labelBgBorderRadius:K,style:L,markerEnd:z,markerStart:Z,pathOptions:B,interactionWidth:G})=>{let[w,H,M]=v6({sourceX:$,sourceY:F,sourcePosition:_,targetX:l,targetY:U,targetPosition:Q,curvature:B?.curvature}),R=u.isInternal?void 0:f;return y.jsx(e6,{id:R,path:w,labelX:H,labelY:M,label:J,labelStyle:q,labelShowBg:T,labelBgStyle:W,labelBgPadding:A,labelBgBorderRadius:K,style:L,markerEnd:z,markerStart:Z,interactionWidth:G})})}var yY=Tq({isInternal:!1}),Aq=Tq({isInternal:!0});yY.displayName="BezierEdge";Aq.displayName="BezierEdgeInternal";var DJ={default:Aq,straight:qq,step:Qq,smoothstep:Uq,simplebezier:$q},OJ={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},kY=(u,f,$)=>{if($===a.Left)return u-f;if($===a.Right)return u+f;return u},PY=(u,f,$)=>{if($===a.Top)return u-f;if($===a.Bottom)return u+f;return u},SJ="react-flow__edgeupdater";function jJ({position:u,centerX:f,centerY:$,radius:F=10,onMouseDown:l,onMouseEnter:U,onMouseOut:_,type:Q}){return y.jsx("circle",{onMouseDown:l,onMouseEnter:U,onMouseOut:_,className:Ru([SJ,`${SJ}-${Q}`]),cx:kY(f,F,u),cy:PY($,F,u),r:F,stroke:"transparent",fill:"transparent"})}function rY({isReconnectable:u,reconnectRadius:f,edge:$,sourceX:F,sourceY:l,targetX:U,targetY:_,sourcePosition:Q,targetPosition:J,onReconnect:q,onReconnectStart:T,onReconnectEnd:W,setReconnecting:A,setUpdateHover:K}){let L=Bu(),z=(H,M)=>{if(H.button!==0)return;let{autoPanOnConnect:R,domNode:E,connectionMode:V,connectionRadius:D,lib:r,onConnectStart:C,cancelConnection:m,nodeLookup:v,rfId:Y,panBy:X,updateConnection:O}=L.getState(),j=M.type==="target",k=(x,g)=>{A(!1),W?.(x,$,M.type,g)},P=(x)=>q?.($,x),c=(x,g)=>{A(!0),T?.(H,$,M.type),C?.(x,g)};b6.onPointerDown(H.nativeEvent,{autoPanOnConnect:R,connectionMode:V,connectionRadius:D,domNode:E,handleId:M.id,nodeId:M.nodeId,nodeLookup:v,isTarget:j,edgeUpdaterType:M.type,lib:r,flowId:Y,cancelConnection:m,panBy:X,isValidConnection:(...x)=>L.getState().isValidConnection?.(...x)??!0,onConnect:P,onConnectStart:c,onConnectEnd:(...x)=>L.getState().onConnectEnd?.(...x),onReconnectEnd:k,updateConnection:O,getTransform:()=>L.getState().transform,getFromHandle:()=>L.getState().connection.fromHandle,dragThreshold:L.getState().connectionDragThreshold,handleDomNode:H.currentTarget})},Z=(H)=>z(H,{nodeId:$.target,id:$.targetHandle??null,type:"target"}),B=(H)=>z(H,{nodeId:$.source,id:$.sourceHandle??null,type:"source"}),G=()=>K(!0),w=()=>K(!1);return y.jsxs(y.Fragment,{children:[(u===!0||u==="source")&&y.jsx(jJ,{position:Q,centerX:F,centerY:l,radius:f,onMouseDown:Z,onMouseEnter:G,onMouseOut:w,type:"source"}),(u===!0||u==="target")&&y.jsx(jJ,{position:J,centerX:U,centerY:_,radius:f,onMouseDown:B,onMouseEnter:G,onMouseOut:w,type:"target"})]})}function CY({id:u,edgesFocusable:f,edgesReconnectable:$,elementsSelectable:F,onClick:l,onDoubleClick:U,onContextMenu:_,onMouseEnter:Q,onMouseMove:J,onMouseLeave:q,reconnectRadius:T,onReconnect:W,onReconnectStart:A,onReconnectEnd:K,rfId:L,edgeTypes:z,noPanClassName:Z,onError:B,disableKeyboardA11y:G}){let w=qu((s)=>s.edgeLookup.get(u)),H=qu((s)=>s.defaultEdgeOptions);w=H?{...H,...w}:w;let M=w.type||"default",R=z?.[M]||DJ[M];if(R===void 0)B?.("011",Uf.error011(M)),M="default",R=z?.default||DJ.default;let E=!!(w.focusable||f&&typeof w.focusable>"u"),V=typeof W<"u"&&(w.reconnectable||$&&typeof w.reconnectable>"u"),D=!!(w.selectable||F&&typeof w.selectable>"u"),r=I.useRef(null),[C,m]=I.useState(!1),[v,Y]=I.useState(!1),X=Bu(),{zIndex:O=w.zIndex,sourceX:j,sourceY:k,targetX:P,targetY:c,sourcePosition:x,targetPosition:g}=qu(I.useCallback((s)=>{let d=s.nodeLookup.get(w.source),e=s.nodeLookup.get(w.target);if(!d||!e)return OJ;let lu=NQ({id:u,sourceNode:d,targetNode:e,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:s.connectionMode,onError:B}),Uu=OQ({selected:w.selected,zIndex:w.zIndex,sourceNode:d,targetNode:e,elevateOnSelect:s.elevateEdgesOnSelect,zIndexMode:s.zIndexMode});return{...lu||OJ,zIndex:Uu}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex,B]),Gu),$u=I.useMemo(()=>w.markerStart?`url('#${c6(w.markerStart,L)}')`:void 0,[w.markerStart,L]),i=I.useMemo(()=>w.markerEnd?`url('#${c6(w.markerEnd,L)}')`:void 0,[w.markerEnd,L]);if(w.hidden||j===null||k===null||P===null||c===null)return null;let fu=(s)=>{let{addSelectedEdges:d,unselectNodesAndEdges:e,multiSelectionActive:lu}=X.getState();if(D)if(X.setState({nodesSelectionActive:!1}),w.selected&&lu)e({nodes:[],edges:[w]}),r.current?.blur();else d([u]);if(l)l(s,w)},Fu=U?(s)=>{U(s,{...w})}:void 0,uu=_?(s)=>{_(s,{...w})}:void 0,h=Q?(s)=>{Q(s,{...w})}:void 0,n=J?(s)=>{J(s,{...w})}:void 0,N=q?(s)=>{q(s,{...w})}:void 0,b=(s)=>{if(!G&&z$.includes(s.key)&&D){let{unselectNodesAndEdges:d,addSelectedEdges:e}=X.getState();if(s.key==="Escape")r.current?.blur(),d({edges:[w]});else e([u])}};return y.jsx("svg",{style:{zIndex:O},children:y.jsxs("g",{className:Ru(["react-flow__edge",`react-flow__edge-${M}`,w.className,Z,{selected:w.selected,animated:w.animated,inactive:!D&&!l,updating:C,selectable:D}]),onClick:fu,onDoubleClick:Fu,onContextMenu:uu,onMouseEnter:h,onMouseMove:n,onMouseLeave:N,onKeyDown:E?b:void 0,tabIndex:E?0:void 0,role:w.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":u,"data-testid":`rf__edge-${u}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":E?`${hJ}-${L}`:void 0,ref:r,...w.domAttributes,children:[!v&&y.jsx(R,{id:u,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:D,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:j,sourceY:k,targetX:P,targetY:c,sourcePosition:x,targetPosition:g,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:$u,markerEnd:i,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),V&&y.jsx(rY,{edge:w,isReconnectable:V,reconnectRadius:T,onReconnect:W,onReconnectStart:A,onReconnectEnd:K,sourceX:j,sourceY:k,targetX:P,targetY:c,sourcePosition:x,targetPosition:g,setUpdateHover:m,setReconnecting:Y})]})})}var hY=I.memo(CY),vY=(u)=>({edgesFocusable:u.edgesFocusable,edgesReconnectable:u.edgesReconnectable,elementsSelectable:u.elementsSelectable,connectionMode:u.connectionMode,onError:u.onError});function Wq({defaultMarkerColor:u,onlyRenderVisibleElements:f,rfId:$,edgeTypes:F,noPanClassName:l,onReconnect:U,onEdgeContextMenu:_,onEdgeMouseEnter:Q,onEdgeMouseMove:J,onEdgeMouseLeave:q,onEdgeClick:T,reconnectRadius:W,onEdgeDoubleClick:A,onReconnectStart:K,onReconnectEnd:L,disableKeyboardA11y:z}){let{edgesFocusable:Z,edgesReconnectable:B,elementsSelectable:G,onError:w}=qu(vY,Gu),H=MY(f);return y.jsxs("div",{className:"react-flow__edges",children:[y.jsx(OY,{defaultColor:u,rfId:$}),H.map((M)=>{return y.jsx(hY,{id:M,edgesFocusable:Z,edgesReconnectable:B,elementsSelectable:G,noPanClassName:l,onReconnect:U,onContextMenu:_,onMouseEnter:Q,onMouseMove:J,onMouseLeave:q,onClick:T,reconnectRadius:W,onDoubleClick:A,onReconnectStart:K,onReconnectEnd:L,rfId:$,onError:w,edgeTypes:F,disableKeyboardA11y:z},M)})]})}Wq.displayName="EdgeRenderer";var xY=I.memo(Wq),NJ=(u)=>`translate(${u[0]}px,${u[1]}px) scale(${u[2]})`;function cY({children:u}){let f=Bu(),$=I.useRef(null),[F]=I.useState(()=>f.getState().transform);return bJ(()=>{let l=null,U=()=>{let _=f.getState().transform;if(l&&_[0]===l[0]&&_[1]===l[1]&&_[2]===l[2])return;if(l=_,$.current)$.current.style.transform=NJ(_)};return U(),f.subscribe(U)},[f]),y.jsx("div",{ref:$,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:NJ(F)},children:u})}function mY(u){let f=k3(),$=I.useRef(!1);I.useEffect(()=>{if(!$.current&&f.viewportInitialized&&u)setTimeout(()=>u(f),1),$.current=!0},[u,f.viewportInitialized])}var pY=(u)=>u.panZoom?.syncViewport;function bY(u){let f=qu(pY),$=Bu();return I.useEffect(()=>{if(u)f?.(u),$.setState({transform:[u.x,u.y,u.zoom]})},[u,f]),null}function IJ(u){return u.connection.inProgress?{...u.connection,to:w4(u.connection.to,u.transform)}:{...u.connection}}function iY(u){if(u)return($)=>{let F=IJ($);return u(F)};return IJ}function gY(u){let f=iY(u);return qu(f,Gu)}var sY=(u)=>({nodesConnectable:u.nodesConnectable,isValid:u.connection.isValid,inProgress:u.connection.inProgress,width:u.width,height:u.height});function tY({containerStyle:u,style:f,type:$,component:F}){let{nodesConnectable:l,width:U,height:_,isValid:Q,inProgress:J}=qu(sY,Gu);if(!(U&&l&&J))return null;return y.jsx("svg",{style:u,width:U,height:_,className:"react-flow__connectionline react-flow__container",children:y.jsx("g",{className:Ru(["react-flow__connection",I$(Q)]),children:y.jsx(Kq,{style:f,type:$,CustomComponent:F,isValid:Q})})})}var Kq=({style:u,type:f=mf.Bezier,CustomComponent:$,isValid:F})=>{let{inProgress:l,from:U,fromNode:_,fromHandle:Q,fromPosition:J,to:q,toNode:T,toHandle:W,toPosition:A,pointer:K}=gY();if(!l)return;if($)return y.jsx($,{connectionLineType:f,connectionLineStyle:u,fromNode:_,fromHandle:Q,fromX:U.x,fromY:U.y,toX:q.x,toY:q.y,fromPosition:J,toPosition:A,connectionStatus:I$(F),toNode:T,toHandle:W,pointer:K});let L="",z={sourceX:U.x,sourceY:U.y,sourcePosition:J,targetX:q.x,targetY:q.y,targetPosition:A};switch(f){case mf.Bezier:[L]=v6(z);break;case mf.SimpleBezier:[L]=uq(z);break;case mf.Step:[L]=I3({...z,borderRadius:0});break;case mf.SmoothStep:[L]=I3(z);break;default:[L]=x6(z)}return y.jsx("path",{d:L,fill:"none",className:"react-flow__connection-path",style:u})};Kq.displayName="ConnectionLine";var nY={};function yJ(u=nY){let f=I.useRef(u),$=Bu();I.useEffect(()=>{},[u])}function dY(){let u=Bu(),f=I.useRef(!1);I.useEffect(()=>{},[])}function wq({nodeTypes:u,edgeTypes:f,onInit:$,onNodeClick:F,onEdgeClick:l,onNodeDoubleClick:U,onEdgeDoubleClick:_,onNodeMouseEnter:Q,onNodeMouseMove:J,onNodeMouseLeave:q,onNodeContextMenu:T,onSelectionContextMenu:W,onSelectionStart:A,onSelectionEnd:K,connectionLineType:L,connectionLineStyle:z,connectionLineComponent:Z,connectionLineContainerStyle:B,selectionKeyCode:G,selectionOnDrag:w,selectionMode:H,multiSelectionKeyCode:M,panActivationKeyCode:R,zoomActivationKeyCode:E,deleteKeyCode:V,onlyRenderVisibleElements:D,elementsSelectable:r,defaultViewport:C,translateExtent:m,minZoom:v,maxZoom:Y,preventScrolling:X,defaultMarkerColor:O,zoomOnScroll:j,zoomOnPinch:k,panOnScroll:P,panOnScrollSpeed:c,panOnScrollMode:x,zoomOnDoubleClick:g,panOnDrag:$u,autoPanOnSelection:i,onPaneClick:fu,onPaneMouseEnter:Fu,onPaneMouseMove:uu,onPaneMouseLeave:h,onPaneScroll:n,onPaneContextMenu:N,paneClickDistance:b,nodeClickDistance:s,onEdgeContextMenu:d,onEdgeMouseEnter:e,onEdgeMouseMove:lu,onEdgeMouseLeave:Uu,reconnectRadius:Nu,onReconnect:bf,onReconnectStart:jf,onReconnectEnd:Nf,noDragClassName:gf,noWheelClassName:H4,noPanClassName:m0,disableKeyboardA11y:p0,nodeExtent:Hf,rfId:sf,viewport:tf,onViewportChange:b0,nodesDraggable:Q5}){return yJ(u),yJ(f),dY(),mY($),bY(tf),y.jsx(KY,{onPaneClick:fu,onPaneMouseEnter:Fu,onPaneMouseMove:uu,onPaneMouseLeave:h,onPaneContextMenu:N,onPaneScroll:n,paneClickDistance:b,deleteKeyCode:V,selectionKeyCode:G,selectionOnDrag:w,selectionMode:H,onSelectionStart:A,onSelectionEnd:K,multiSelectionKeyCode:M,panActivationKeyCode:R,zoomActivationKeyCode:E,elementsSelectable:r,zoomOnScroll:j,zoomOnPinch:k,zoomOnDoubleClick:g,panOnScroll:P,panOnScrollSpeed:c,panOnScrollMode:x,panOnDrag:$u,autoPanOnSelection:i,defaultViewport:C,translateExtent:m,minZoom:v,maxZoom:Y,onSelectionContextMenu:W,preventScrolling:X,noDragClassName:gf,noWheelClassName:H4,noPanClassName:m0,disableKeyboardA11y:p0,onViewportChange:b0,isControlledViewport:!!tf,children:y.jsxs(cY,{children:[y.jsx(xY,{edgeTypes:f,onEdgeClick:l,onEdgeDoubleClick:_,onReconnect:bf,onReconnectStart:jf,onReconnectEnd:Nf,onlyRenderVisibleElements:D,onEdgeContextMenu:d,onEdgeMouseEnter:e,onEdgeMouseMove:lu,onEdgeMouseLeave:Uu,reconnectRadius:Nu,defaultMarkerColor:O,noPanClassName:m0,disableKeyboardA11y:p0,rfId:sf}),y.jsx(tY,{style:z,type:L,component:Z,containerStyle:B}),y.jsx("div",{className:"react-flow__edgelabel-renderer"}),y.jsx(RY,{nodeTypes:u,onNodeClick:F,onNodeDoubleClick:U,onNodeMouseEnter:Q,onNodeMouseMove:J,onNodeMouseLeave:q,onNodeContextMenu:T,nodeClickDistance:s,onlyRenderVisibleElements:D,noPanClassName:m0,noDragClassName:gf,disableKeyboardA11y:p0,nodeExtent:Hf,rfId:sf,nodesDraggable:Q5}),y.jsx("div",{className:"react-flow__viewport-portal"})]})})}wq.displayName="GraphView";var aY=I.memo(wq),oY=O$("React Flow","https://reactflow.dev/"),kJ=({nodes:u,edges:f,defaultNodes:$,defaultEdges:F,width:l,height:U,fitView:_,fitViewOptions:Q,minZoom:J=0.5,maxZoom:q=2,nodeOrigin:T,nodeExtent:W,zIndexMode:A="basic"}={})=>{let K=new Map,L=new Map,z=new Map,Z=new Map,B=F??f??[],G=$??u??[],w=T??[0,0],H=W??T4;c$(z,Z,B);let{nodesInitialized:M}=m6(G,K,L,{nodeOrigin:w,nodeExtent:H,zIndexMode:A}),R=[0,0,1];if(_&&l&&U){let E=A4(K,{filter:(C)=>!!((C.width||C.initialWidth)&&(C.height||C.initialHeight))}),{x:V,y:D,zoom:r}=N3(E,l,U,J,q,Q?.padding??0.1);R=[V,D,r]}return{rfId:"1",width:l??0,height:U??0,transform:R,nodes:G,nodesInitialized:M,nodeLookup:K,parentLookup:L,edges:B,edgeLookup:Z,connectionLookup:z,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:$!==void 0,hasDefaultEdges:F!==void 0,panZoom:null,minZoom:J,maxZoom:q,translateExtent:T4,nodeExtent:H,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:h0.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:_??!1,fitViewOptions:Q,fitViewResolver:null,connection:{...Y$},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:oY,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Z$,zIndexMode:A,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},eY=({nodes:u,edges:f,defaultNodes:$,defaultEdges:F,width:l,height:U,fitView:_,fitViewOptions:Q,minZoom:J,maxZoom:q,nodeOrigin:T,nodeExtent:W,zIndexMode:A})=>qJ((K,L)=>{async function z(){let{nodeLookup:Z,panZoom:B,fitViewOptions:G,fitViewResolver:w,width:H,height:M,minZoom:R,maxZoom:E}=L();if(!B)return;await YQ({nodes:Z,width:H,height:M,panZoom:B,minZoom:R,maxZoom:E},G),w?.resolve(!0),K({fitViewResolver:null})}return{...kJ({nodes:u,edges:f,width:l,height:U,fitView:_,fitViewOptions:Q,minZoom:J,maxZoom:q,nodeOrigin:T,nodeExtent:W,defaultNodes:$,defaultEdges:F,zIndexMode:A}),setNodes:(Z)=>{let{nodeLookup:B,parentLookup:G,nodeOrigin:w,nodeExtent:H,elevateNodesOnSelect:M,fitViewQueued:R,zIndexMode:E,nodesSelectionActive:V}=L(),{nodesInitialized:D,hasSelectedNodes:r}=m6(Z,B,G,{nodeOrigin:w,nodeExtent:H,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:E}),C=V&&r;if(R&&D)z(),K({nodes:Z,nodesInitialized:D,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:C});else K({nodes:Z,nodesInitialized:D,nodesSelectionActive:C})},setEdges:(Z)=>{let{connectionLookup:B,edgeLookup:G}=L();c$(B,G,Z),K({edges:Z})},setDefaultNodesAndEdges:(Z,B)=>{if(Z){let{setNodes:G}=L();G(Z),K({hasDefaultNodes:!0})}if(B){let{setEdges:G}=L();G(B),K({hasDefaultEdges:!0})}},updateNodeInternals:(Z)=>{let{triggerNodeChanges:B,nodeLookup:G,parentLookup:w,domNode:H,nodeOrigin:M,nodeExtent:R,debug:E,fitViewQueued:V,zIndexMode:D}=L(),{changes:r,updatedInternals:C}=rQ(Z,G,w,H,M,R,D);if(!C)return;if(kQ(G,w,{nodeOrigin:M,nodeExtent:R,zIndexMode:D}),V)z(),K({fitViewQueued:!1,fitViewOptions:void 0});else K({});if(r?.length>0){if(E)console.log("React Flow: trigger node changes",r);B?.(r)}},updateNodePositions:(Z,B=!1)=>{let G=[],w=[],{nodeLookup:H,triggerNodeChanges:M,connection:R,updateConnection:E,onNodesChangeMiddlewareMap:V}=L();for(let[D,r]of Z){let C=H.get(D),m=!!(C?.expandParent&&C?.parentId&&r?.position),v={id:D,type:"position",position:m?{x:Math.max(0,r.position.x),y:Math.max(0,r.position.y)}:r.position,dragging:B};if(C&&R.inProgress&&R.fromNode.id===C.id){let Y=v0(C,R.fromHandle,a.Left,!0);E({...R,from:Y})}if(m&&C.parentId)G.push({id:D,parentId:C.parentId,rect:{...r.internals.positionAbsolute,width:r.measured.width??0,height:r.measured.height??0}});w.push(v)}if(G.length>0){let{parentLookup:D,nodeOrigin:r}=L(),C=p6(G,H,D,r);w.push(...C)}for(let D of V.values())w=D(w);M(w)},triggerNodeChanges:(Z)=>{let{onNodesChange:B,setNodes:G,nodes:w,hasDefaultNodes:H,debug:M}=L();if(Z?.length){if(H){let R=cJ(Z,w);G(R)}if(M)console.log("React Flow: trigger node changes",Z);B?.(Z)}},triggerEdgeChanges:(Z)=>{let{onEdgesChange:B,setEdges:G,edges:w,hasDefaultEdges:H,debug:M}=L();if(Z?.length){if(H){let R=mJ(Z,w);G(R)}if(M)console.log("React Flow: trigger edge changes",Z);B?.(Z)}},addSelectedNodes:(Z)=>{let{multiSelectionActive:B,edgeLookup:G,nodeLookup:w,triggerNodeChanges:H,triggerEdgeChanges:M}=L();if(B){let R=Z.map((E)=>z1(E,!0));H(R);return}H(G4(w,new Set([...Z]))),M(G4(G))},addSelectedEdges:(Z)=>{let{multiSelectionActive:B,edgeLookup:G,nodeLookup:w,triggerNodeChanges:H,triggerEdgeChanges:M}=L();if(B){let R=Z.map((E)=>z1(E,!0));M(R);return}M(G4(G,new Set([...Z]))),H(G4(w,new Set))},unselectNodesAndEdges:({nodes:Z,edges:B}={})=>{let{edges:G,nodes:w,nodeLookup:H,triggerNodeChanges:M,triggerEdgeChanges:R}=L(),E=Z?Z:w,V=B?B:G,D=[];for(let C of E){if(!C.selected)continue;D.push(z1(C.id,!1))}let r=[];for(let C of V){if(!C.selected)continue;r.push(z1(C.id,!1))}M(D),R(r)},setMinZoom:(Z)=>{let{panZoom:B,maxZoom:G}=L();B?.setScaleExtent([Z,G]),K({minZoom:Z})},setMaxZoom:(Z)=>{let{panZoom:B,minZoom:G}=L();B?.setScaleExtent([G,Z]),K({maxZoom:Z})},setTranslateExtent:(Z)=>{L().panZoom?.setTranslateExtent(Z),K({translateExtent:Z})},resetSelectedElements:()=>{let{edges:Z,nodes:B,triggerNodeChanges:G,triggerEdgeChanges:w,elementsSelectable:H}=L();if(!H)return;let M=B.reduce((E,V)=>V.selected?[...E,z1(V.id,!1)]:E,[]),R=Z.reduce((E,V)=>V.selected?[...E,z1(V.id,!1)]:E,[]);G(M),w(R)},setNodeExtent:(Z)=>{let{nodes:B,nodeLookup:G,parentLookup:w,nodeOrigin:H,elevateNodesOnSelect:M,nodeExtent:R,zIndexMode:E}=L();if(Z[0][0]===R[0][0]&&Z[0][1]===R[0][1]&&Z[1][0]===R[1][0]&&Z[1][1]===R[1][1])return;m6(B,G,w,{nodeOrigin:H,nodeExtent:Z,elevateNodesOnSelect:M,checkEquality:!1,zIndexMode:E}),K({nodeExtent:Z})},panBy:(Z)=>{let{transform:B,width:G,height:w,panZoom:H,translateExtent:M}=L();return CQ({delta:Z,panZoom:H,transform:B,translateExtent:M,width:G,height:w})},setCenter:async(Z,B,G)=>{let{width:w,height:H,maxZoom:M,panZoom:R}=L();if(!R)return!1;let E=typeof G?.zoom<"u"?G.zoom:M;return await R.setViewport({x:w/2-Z*E,y:H/2-B*E,zoom:E},{duration:G?.duration,ease:G?.ease,interpolate:G?.interpolate}),!0},cancelConnection:()=>{K({connection:{...Y$}})},updateConnection:(Z)=>{K({connection:Z})},reset:()=>K({...kJ()})}},Object.is);function t$({initialNodes:u,initialEdges:f,defaultNodes:$,defaultEdges:F,initialWidth:l,initialHeight:U,initialMinZoom:_,initialMaxZoom:Q,initialFitViewOptions:J,fitView:q,nodeOrigin:T,nodeExtent:W,zIndexMode:A,children:K}){let[L]=I.useState(()=>eY({nodes:u,edges:f,defaultNodes:$,defaultEdges:F,width:l,height:U,fitView:q,minZoom:_,maxZoom:Q,fitViewOptions:J,nodeOrigin:T,nodeExtent:W,zIndexMode:A}));return y.jsx(BZ,{value:L,children:y.jsx(vZ,{children:y.jsx(uY,{children:K})})})}function uR({children:u,nodes:f,edges:$,defaultNodes:F,defaultEdges:l,width:U,height:_,fitView:Q,fitViewOptions:J,minZoom:q,maxZoom:T,nodeOrigin:W,nodeExtent:A,zIndexMode:K}){if(I.useContext(d6))return y.jsx(y.Fragment,{children:u});return y.jsx(t$,{initialNodes:f,initialEdges:$,defaultNodes:F,defaultEdges:l,initialWidth:U,initialHeight:_,fitView:Q,initialFitViewOptions:J,initialMinZoom:q,initialMaxZoom:T,nodeOrigin:W,nodeExtent:A,zIndexMode:K,children:u})}var fR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function $R({nodes:u,edges:f,defaultNodes:$,defaultEdges:F,className:l,nodeTypes:U,edgeTypes:_,onNodeClick:Q,onEdgeClick:J,onInit:q,onMove:T,onMoveStart:W,onMoveEnd:A,onConnect:K,onConnectStart:L,onConnectEnd:z,onClickConnectStart:Z,onClickConnectEnd:B,onNodeMouseEnter:G,onNodeMouseMove:w,onNodeMouseLeave:H,onNodeContextMenu:M,onNodeDoubleClick:R,onNodeDragStart:E,onNodeDrag:V,onNodeDragStop:D,onNodesDelete:r,onEdgesDelete:C,onDelete:m,onSelectionChange:v,onSelectionDragStart:Y,onSelectionDrag:X,onSelectionDragStop:O,onSelectionContextMenu:j,onSelectionStart:k,onSelectionEnd:P,onBeforeDelete:c,connectionMode:x,connectionLineType:g=mf.Bezier,connectionLineStyle:$u,connectionLineComponent:i,connectionLineContainerStyle:fu,deleteKeyCode:Fu="Backspace",selectionKeyCode:uu="Shift",selectionOnDrag:h=!1,selectionMode:n=B1.Full,panActivationKeyCode:N="Space",multiSelectionKeyCode:b=B4()?"Meta":"Control",zoomActivationKeyCode:s=B4()?"Meta":"Control",snapToGrid:d,snapGrid:e,onlyRenderVisibleElements:lu=!1,selectNodesOnDrag:Uu,nodesDraggable:Nu,autoPanOnNodeFocus:bf,nodesConnectable:jf,nodesFocusable:Nf,nodeOrigin:gf=vJ,edgesFocusable:H4,edgesReconnectable:m0,elementsSelectable:p0=!0,defaultViewport:Hf=OZ,minZoom:sf=0.5,maxZoom:tf=2,translateExtent:b0=T4,preventScrolling:Q5=!0,nodeExtent:J5,defaultMarkerColor:oA="#b1b1b7",zoomOnScroll:eA=!0,zoomOnPinch:uW=!0,panOnScroll:fW=!1,panOnScrollSpeed:$W=0.5,panOnScrollMode:FW=T0.Free,zoomOnDoubleClick:lW=!0,panOnDrag:UW=!0,onPaneClick:_W,onPaneMouseEnter:QW,onPaneMouseMove:JW,onPaneMouseLeave:qW,onPaneScroll:TW,onPaneContextMenu:AW,paneClickDistance:WW=1,nodeClickDistance:KW=0,children:wW,onReconnect:BW,onReconnectStart:LW,onReconnectEnd:GW,onEdgeContextMenu:HW,onEdgeDoubleClick:zW,onEdgeMouseEnter:ZW,onEdgeMouseMove:YW,onEdgeMouseLeave:RW,reconnectRadius:MW=10,onNodesChange:EW,onEdgesChange:VW,noDragClassName:XW="nodrag",noWheelClassName:DW="nowheel",noPanClassName:wF="nopan",fitView:BF,fitViewOptions:LF,connectOnClick:OW,attributionPosition:SW,proOptions:jW,defaultEdgeOptions:NW,elevateNodesOnSelect:IW=!0,elevateEdgesOnSelect:yW=!1,disableKeyboardA11y:GF=!1,autoPanOnConnect:kW,autoPanOnNodeDrag:PW,autoPanOnSelection:rW=!0,autoPanSpeed:CW,connectionRadius:hW,isValidConnection:vW,onError:xW,style:cW,id:HF,nodeDragThreshold:mW,connectionDragThreshold:pW,viewport:bW,onViewportChange:iW,width:gW,height:sW,colorMode:tW="light",debug:nW,onScroll:zF,ariaLabelConfig:dW,zIndexMode:ZF="basic",...aW},oW){let q5=HF||"1",eW=IZ(tW),uK=I.useCallback((YF)=>{YF.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),zF?.(YF)},[zF]);return y.jsx("div",{"data-testid":"rf__wrapper",...aW,onScroll:uK,style:{...cW,...fR},ref:oW,className:Ru(["react-flow",l,eW]),id:HF,role:"application",children:y.jsxs(uR,{nodes:u,edges:f,width:gW,height:sW,fitView:BF,fitViewOptions:LF,minZoom:sf,maxZoom:tf,nodeOrigin:gf,nodeExtent:J5,zIndexMode:ZF,children:[y.jsx(NZ,{nodes:u,edges:f,defaultNodes:$,defaultEdges:F,onConnect:K,onConnectStart:L,onConnectEnd:z,onClickConnectStart:Z,onClickConnectEnd:B,nodesDraggable:Nu,autoPanOnNodeFocus:bf,nodesConnectable:jf,nodesFocusable:Nf,edgesFocusable:H4,edgesReconnectable:m0,elementsSelectable:p0,elevateNodesOnSelect:IW,elevateEdgesOnSelect:yW,minZoom:sf,maxZoom:tf,nodeExtent:J5,onNodesChange:EW,onEdgesChange:VW,snapToGrid:d,snapGrid:e,connectionMode:x,translateExtent:b0,connectOnClick:OW,defaultEdgeOptions:NW,fitView:BF,fitViewOptions:LF,onNodesDelete:r,onEdgesDelete:C,onDelete:m,onNodeDragStart:E,onNodeDrag:V,onNodeDragStop:D,onSelectionDrag:X,onSelectionDragStart:Y,onSelectionDragStop:O,onMove:T,onMoveStart:W,onMoveEnd:A,noPanClassName:wF,nodeOrigin:gf,rfId:q5,autoPanOnConnect:kW,autoPanOnNodeDrag:PW,autoPanSpeed:CW,onError:xW,connectionRadius:hW,isValidConnection:vW,selectNodesOnDrag:Uu,nodeDragThreshold:mW,connectionDragThreshold:pW,onBeforeDelete:c,debug:nW,ariaLabelConfig:dW,zIndexMode:ZF}),y.jsx(aY,{onInit:q,onNodeClick:Q,onEdgeClick:J,onNodeMouseEnter:G,onNodeMouseMove:w,onNodeMouseLeave:H,onNodeContextMenu:M,onNodeDoubleClick:R,nodeTypes:U,edgeTypes:_,connectionLineType:g,connectionLineStyle:$u,connectionLineComponent:i,connectionLineContainerStyle:fu,selectionKeyCode:uu,selectionOnDrag:h,selectionMode:n,deleteKeyCode:Fu,multiSelectionKeyCode:b,panActivationKeyCode:N,zoomActivationKeyCode:s,onlyRenderVisibleElements:lu,defaultViewport:Hf,translateExtent:b0,minZoom:sf,maxZoom:tf,preventScrolling:Q5,zoomOnScroll:eA,zoomOnPinch:uW,zoomOnDoubleClick:lW,panOnScroll:fW,panOnScrollSpeed:$W,panOnScrollMode:FW,panOnDrag:UW,autoPanOnSelection:rW,onPaneClick:_W,onPaneMouseEnter:QW,onPaneMouseMove:JW,onPaneMouseLeave:qW,onPaneScroll:TW,onPaneContextMenu:AW,paneClickDistance:WW,nodeClickDistance:KW,onSelectionContextMenu:j,onSelectionStart:k,onSelectionEnd:P,onReconnect:BW,onReconnectStart:LW,onReconnectEnd:GW,onEdgeContextMenu:HW,onEdgeDoubleClick:zW,onEdgeMouseEnter:ZW,onEdgeMouseMove:YW,onEdgeMouseLeave:RW,reconnectRadius:MW,defaultMarkerColor:oA,noDragClassName:XW,noWheelClassName:DW,noPanClassName:wF,rfId:q5,disableKeyboardA11y:GF,nodeExtent:J5,viewport:bW,onViewportChange:iW,nodesDraggable:Nu}),y.jsx(DZ,{onSelectionChange:v}),wW,y.jsx(RZ,{proOptions:jW,position:SW}),y.jsx(YZ,{rfId:q5,disableKeyboardA11y:GF})]})})}var Bq=pJ($R);function Lq(u){let[f,$]=I.useState(u),F=I.useCallback((l)=>$((U)=>cJ(l,U)),[]);return[f,$,F]}function Gq(u){let[f,$]=I.useState(u),F=I.useCallback((l)=>$((U)=>mJ(l,U)),[]);return[f,$,F]}var HD=Uf.error014();function FR({dimensions:u,lineWidth:f,variant:$,className:F}){return y.jsx("path",{strokeWidth:f,d:`M${u[0]/2} 0 V${u[1]} M0 ${u[1]/2} H${u[0]}`,className:Ru(["react-flow__background-pattern",$,F])})}function lR({radius:u,className:f}){return y.jsx("circle",{cx:u,cy:u,r:u,className:Ru(["react-flow__background-pattern","dots",f])})}var c0;(function(u){u.Lines="lines",u.Dots="dots",u.Cross="cross"})(c0||(c0={}));var UR={[c0.Dots]:1,[c0.Lines]:1,[c0.Cross]:6},_R=(u)=>({transform:u.transform,patternId:`pattern-${u.rfId}`});function Hq({id:u,variant:f=c0.Dots,gap:$=20,size:F,lineWidth:l=1,offset:U=0,color:_,bgColor:Q,style:J,className:q,patternClassName:T}){let W=I.useRef(null),{transform:A,patternId:K}=qu(_R,Gu),L=F||UR[f],z=f===c0.Dots,Z=f===c0.Cross,B=Array.isArray($)?$:[$,$],G=[B[0]*A[2]||1,B[1]*A[2]||1],w=L*A[2],H=Array.isArray(U)?U:[U,U],M=Z?[w,w]:G,R=[H[0]*A[2]+M[0]/2,H[1]*A[2]+M[1]/2],E=`${K}${u?u:""}`;return y.jsxs("svg",{className:Ru(["react-flow__background",q]),style:{...J,...o6,"--xy-background-color-props":Q,"--xy-background-pattern-color-props":_},ref:W,"data-testid":"rf__background",children:[y.jsx("pattern",{id:E,x:A[0]%G[0],y:A[1]%G[1],width:G[0],height:G[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:z?y.jsx(lR,{radius:w/2,className:T}):y.jsx(FR,{dimensions:M,lineWidth:l,variant:f,className:T})}),y.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}Hq.displayName="Background";var zq=I.memo(Hq);function QR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:y.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function JR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:y.jsx("path",{d:"M0 0h32v4.2H0z"})})}function qR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:y.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function TR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function AR(){return y.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:y.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function t6({children:u,className:f,...$}){return y.jsx("button",{type:"button",className:Ru(["react-flow__controls-button",f]),...$,children:u})}var WR=(u)=>({isInteractive:u.nodesDraggable||u.nodesConnectable||u.elementsSelectable,minZoomReached:u.transform[2]<=u.minZoom,maxZoomReached:u.transform[2]>=u.maxZoom,ariaLabelConfig:u.ariaLabelConfig});function Zq({style:u,showZoom:f=!0,showFitView:$=!0,showInteractive:F=!0,fitViewOptions:l,onZoomIn:U,onZoomOut:_,onFitView:Q,onInteractiveChange:J,className:q,children:T,position:W="bottom-left",orientation:A="vertical","aria-label":K}){let L=Bu(),{isInteractive:z,minZoomReached:Z,maxZoomReached:B,ariaLabelConfig:G}=qu(WR,Gu),{zoomIn:w,zoomOut:H,fitView:M}=k3(),R=()=>{w(),U?.()},E=()=>{H(),_?.()},V=()=>{M(l),Q?.()},D=()=>{L.setState({nodesDraggable:!z,nodesConnectable:!z,elementsSelectable:!z}),J?.(!z)};return y.jsxs(a6,{className:Ru(["react-flow__controls",A==="horizontal"?"horizontal":"vertical",q]),position:W,style:u,"data-testid":"rf__controls","aria-label":K??G["controls.ariaLabel"],children:[f&&y.jsxs(y.Fragment,{children:[y.jsx(t6,{onClick:R,className:"react-flow__controls-zoomin",title:G["controls.zoomIn.ariaLabel"],"aria-label":G["controls.zoomIn.ariaLabel"],disabled:B,children:y.jsx(QR,{})}),y.jsx(t6,{onClick:E,className:"react-flow__controls-zoomout",title:G["controls.zoomOut.ariaLabel"],"aria-label":G["controls.zoomOut.ariaLabel"],disabled:Z,children:y.jsx(JR,{})})]}),$&&y.jsx(t6,{className:"react-flow__controls-fitview",onClick:V,title:G["controls.fitView.ariaLabel"],"aria-label":G["controls.fitView.ariaLabel"],children:y.jsx(qR,{})}),F&&y.jsx(t6,{className:"react-flow__controls-interactive",onClick:D,title:G["controls.interactive.ariaLabel"],"aria-label":G["controls.interactive.ariaLabel"],children:z?y.jsx(AR,{}):y.jsx(TR,{})}),T]})}Zq.displayName="Controls";var zD=I.memo(Zq);function KR({id:u,x:f,y:$,width:F,height:l,style:U,color:_,strokeColor:Q,strokeWidth:J,className:q,borderRadius:T,shapeRendering:W,selected:A,onClick:K}){let{background:L,backgroundColor:z}=U||{},Z=_||L||z;return y.jsx("rect",{className:Ru(["react-flow__minimap-node",{selected:A},q]),x:f,y:$,rx:T,ry:T,width:F,height:l,style:{fill:Z,stroke:Q,strokeWidth:J},shapeRendering:W,onClick:K?(B)=>K(B,u):void 0})}var wR=I.memo(KR),BR=(u)=>u.nodes.map((f)=>f.id),i$=(u)=>u instanceof Function?u:()=>u;function LR({nodeStrokeColor:u,nodeColor:f,nodeClassName:$="",nodeBorderRadius:F=5,nodeStrokeWidth:l,nodeComponent:U=wR,onClick:_}){let Q=qu(BR,Gu),J=i$(f),q=i$(u),T=i$($),W=typeof window>"u"||!!window.chrome?"crispEdges":"geometricPrecision";return y.jsx(y.Fragment,{children:Q.map((A)=>y.jsx(HR,{id:A,nodeColorFunc:J,nodeStrokeColorFunc:q,nodeClassNameFunc:T,nodeBorderRadius:F,nodeStrokeWidth:l,NodeComponent:U,onClick:_,shapeRendering:W},A))})}function GR({id:u,nodeColorFunc:f,nodeStrokeColorFunc:$,nodeClassNameFunc:F,nodeBorderRadius:l,nodeStrokeWidth:U,shapeRendering:_,NodeComponent:Q,onClick:J}){let{node:q,x:T,y:W,width:A,height:K}=qu((L)=>{let z=L.nodeLookup.get(u);if(!z)return{node:void 0,x:0,y:0,width:0,height:0};let Z=z.internals.userNode,{x:B,y:G}=z.internals.positionAbsolute,{width:w,height:H}=Bf(Z);return{node:Z,x:B,y:G,width:w,height:H}},Gu);if(!q||q.hidden||!S$(q))return null;return y.jsx(Q,{x:T,y:W,width:A,height:K,style:q.style,selected:!!q.selected,className:F(q),color:f(q),borderRadius:l,strokeColor:$(q),strokeWidth:U,shapeRendering:_,onClick:J,id:q.id})}var HR=I.memo(GR),zR=I.memo(LR),ZR=200,YR=150,RR=(u)=>!u.hidden,MR=(u)=>{let f={x:-u.transform[0]/u.transform[2],y:-u.transform[1]/u.transform[2],width:u.width/u.transform[2],height:u.height/u.transform[2]},$=!1;for(let F of u.nodeLookup.values())if(!F.hidden){$=!0;break}return{viewBB:f,boundingRect:$?X$(A4(u.nodeLookup,{filter:RR}),f):f,rfId:u.rfId,panZoom:u.panZoom,translateExtent:u.translateExtent,flowWidth:u.width,flowHeight:u.height,ariaLabelConfig:u.ariaLabelConfig}},PJ=(u,f)=>u.x===f.x&&u.y===f.y&&u.width===f.width&&u.height===f.height,ER=(u,f)=>PJ(u.viewBB,f.viewBB)&&PJ(u.boundingRect,f.boundingRect)&&u.rfId===f.rfId&&u.panZoom===f.panZoom&&u.translateExtent===f.translateExtent&&u.flowWidth===f.flowWidth&&u.flowHeight===f.flowHeight&&u.ariaLabelConfig===f.ariaLabelConfig,VR="react-flow__minimap-desc";function Yq({style:u,className:f,nodeStrokeColor:$,nodeColor:F,nodeClassName:l="",nodeBorderRadius:U=5,nodeStrokeWidth:_,nodeComponent:Q,bgColor:J,maskColor:q,maskStrokeColor:T,maskStrokeWidth:W,position:A="bottom-right",onClick:K,onNodeClick:L,pannable:z=!1,zoomable:Z=!1,ariaLabel:B,inversePan:G,zoomStep:w=1,offsetScale:H=5}){let M=Bu(),R=I.useRef(null),{boundingRect:E,panZoom:V,viewBB:D,rfId:r,translateExtent:C,flowWidth:m,flowHeight:v,ariaLabelConfig:Y}=qu(MR,ER),X=u?.width??ZR,O=u?.height??YR,j=E.width/X,k=E.height/O,P=Math.max(j,k),c=P*X,x=P*O,g=H*P,$u=E.x-(c-E.width)/2-g,i=E.y-(x-E.height)/2-g,fu=c+g*2,Fu=x+g*2,uu=`${VR}-${r}`,h=I.useRef(0),n=I.useRef();h.current=P,I.useEffect(()=>{let e=M.getState().panZoom;if(R.current&&e)return n.current=bQ({domNode:R.current,panZoom:e,getTransform:()=>M.getState().transform,getViewScale:()=>h.current}),()=>{n.current?.destroy()}},[V]),I.useEffect(()=>{n.current?.update({translateExtent:C,width:m,height:v,inversePan:G,pannable:z,zoomStep:w,zoomable:Z})},[z,Z,G,w,C,m,v]);let N=K?(e)=>{let[lu,Uu]=n.current?.pointer(e)||[0,0];K(e,{x:lu,y:Uu})}:void 0,b=I.useCallback((e,lu)=>{let Uu=M.getState().nodeLookup.get(lu).internals.userNode;L?.(e,Uu)},[L]),s=L?b:void 0,d=B??Y["minimap.ariaLabel"];return y.jsx(a6,{position:A,style:{...u,"--xy-minimap-background-color-props":typeof J==="string"?J:void 0,"--xy-minimap-mask-background-color-props":typeof q==="string"?q:void 0,"--xy-minimap-mask-stroke-color-props":typeof T==="string"?T:void 0,"--xy-minimap-mask-stroke-width-props":typeof W==="number"?W*P:void 0,"--xy-minimap-node-background-color-props":typeof F==="string"?F:void 0,"--xy-minimap-node-stroke-color-props":typeof $==="string"?$:void 0,"--xy-minimap-node-stroke-width-props":typeof _==="number"?_:void 0},className:Ru(["react-flow__minimap",f]),"data-testid":"rf__minimap",children:y.jsxs("svg",{width:X,height:O,viewBox:`${$u} ${i} ${fu} ${Fu}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":uu,ref:R,onClick:N,children:[d&&y.jsx("title",{id:uu,children:d}),y.jsx(zR,{onClick:s,nodeColor:F,nodeStrokeColor:$,nodeBorderRadius:U,nodeClassName:l,nodeStrokeWidth:_,nodeComponent:Q}),y.jsx("path",{className:"react-flow__minimap-mask",d:`M${$u-g},${i-g}h${fu+g*2}v${Fu+g*2}h${-fu-g*2}z
1382
+ M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Yq.displayName="MiniMap";var Rq=I.memo(Yq),XR=(u)=>(f)=>u?`${Math.max(1/f.transform[2],1)}`:void 0,DR={[x0.Line]:"right",[x0.Handle]:"bottom-right"};function OR({nodeId:u,position:f,variant:$=x0.Handle,className:F,style:l=void 0,children:U,color:_,minWidth:Q=10,minHeight:J=10,maxWidth:q=Number.MAX_VALUE,maxHeight:T=Number.MAX_VALUE,keepAspectRatio:W=!1,resizeDirection:A,autoScale:K=!0,shouldResize:L,onResizeStart:z,onResize:Z,onResizeEnd:B}){let G=tJ(),w=typeof u==="string"?u:G,H=Bu(),M=I.useRef(null),R=$===x0.Handle,E=qu(I.useCallback(XR(R&&K),[R,K]),Gu),V=I.useRef(null),D=f??DR[$];I.useEffect(()=>{if(!M.current||!w)return;if(!V.current)V.current=nQ({domNode:M.current,nodeId:w,getStoreItems:()=>{let{nodeLookup:C,transform:m,snapGrid:v,snapToGrid:Y,nodeOrigin:X,domNode:O}=H.getState();return{nodeLookup:C,transform:m,snapGrid:v,snapToGrid:Y,nodeOrigin:X,paneDomNode:O}},onChange:(C,m)=>{let{triggerNodeChanges:v,nodeLookup:Y,parentLookup:X,nodeOrigin:O}=H.getState(),j=[],k={x:C.x,y:C.y},P=Y.get(w);if(P&&P.expandParent&&P.parentId){let c=P.origin??O,x=C.width??P.measured.width??0,g=C.height??P.measured.height??0,$u={id:P.id,parentId:P.parentId,rect:{width:x,height:g,...j$({x:C.x??P.position.x,y:C.y??P.position.y},{width:x,height:g},P.parentId,Y,c)}},i=p6([$u],Y,X,O);j.push(...i),k.x=C.x?Math.max(c[0]*x,C.x):void 0,k.y=C.y?Math.max(c[1]*g,C.y):void 0}if(k.x!==void 0&&k.y!==void 0){let c={id:w,type:"position",position:{...k}};j.push(c)}if(C.width!==void 0&&C.height!==void 0){let x={id:w,type:"dimensions",resizing:!0,setAttributes:!A?!0:A==="horizontal"?"width":"height",dimensions:{width:C.width,height:C.height}};j.push(x)}for(let c of m){let x={...c,type:"position"};j.push(x)}v(j)},onEnd:({width:C,height:m})=>{let v={id:w,type:"dimensions",resizing:!1,dimensions:{width:C,height:m}};H.getState().triggerNodeChanges([v])}});return V.current.update({controlPosition:D,boundaries:{minWidth:Q,minHeight:J,maxWidth:q,maxHeight:T},keepAspectRatio:W,resizeDirection:A,onResizeStart:z,onResize:Z,onResizeEnd:B,shouldResize:L}),()=>{V.current?.destroy()}},[D,Q,J,q,T,W,z,Z,B,L]);let r=D.split("-");return y.jsx("div",{className:Ru(["react-flow__resize-control","nodrag",...r,$,F]),ref:M,style:{...l,scale:E,..._&&{[R?"backgroundColor":"borderColor"]:_}},children:U})}var ZD=I.memo(OR);var WF=If(tA(),1),S=If(U6(),1),nA={zh:{modelPrefix:"生成模型:",backParent:"← 返回上级地图",levelOverview:"L0 全景图谱",levelSubPrefix:"L1+ 深度专题:",allStreams:"全部脉络",searchPlaceholder:"搜索概念、机制、符号、路径或追问关键词…",zoomIn:"放大",zoomOut:"缩小",lock:"锁定节点",unlock:"已锁定(点击解锁)",fitView:"适配全图",reset:"重置",legend:"图例",scopeNotes:"边界与待确认",learningPath:"推荐学习顺序:",expandDetail:"展开细节",collapseDetail:"收起细节",detailEdgeLabel:"下钻细节",deepDiveBadgeTitle:"继续深挖此核心",deepDiveModalTitle:"继续深潜(Loop Prompts)",tabAsk:"定向深究追问(对话精读)",tabRecursive:"递归生成子地图(AtlasLoop)",copyBtn:"一键复制提示词",copiedBtn:"已复制",copySnippet:"复制片段",openInEditor:"在编辑器中打开",editorConfirmHint:"提示:首次点击时浏览器可能会请求确认打开外部编辑器应用;若目标文件路径移动请重新生成。",recursiveUsageHint:"将下方指令直接发送给 AI,即可围绕当前焦点递归生成下一层独立交互式 HTML 子地图:",whatItDoes:"核心说明",whyItMatters:"为什么重要",inputsLabel:"前置条件 / 输入",outputsLabel:"核心产出 / 结果",mechanismsLabel:"内部机制与影响",watchoutsLabel:"阅读与理解注意点",anchorsLabel:"关联依据与直达锚点",openDeepDiveBtn:"查看「?」进阶追问与递归指令",unverifiedTag:"待确认",verifiedTag:"已核实",uncoveredTitle:"尚未覆盖的范围",unverifiedTitle:"待确认项说明",noSearchMatches:"无匹配节点",nestedBadge:"内部细节节点",close:"关闭",roles:{entry:"起点 / 命题",core:"核心机制",branch:"判断 / 分岔",foundation:"底层基石 / 存储",context:"外部环境 / 关联",extension:"延伸 / 异步演化",outcome:"最终结论 / 结果"}},en:{modelPrefix:"Model: ",backParent:"← Back to Parent Atlas",levelOverview:"L0 Overview",levelSubPrefix:"L1+ Deep Dive: ",allStreams:"All Streams",searchPlaceholder:"Search concepts, mechanisms, symbols, files, or prompts…",zoomIn:"Zoom In",zoomOut:"Zoom Out",lock:"Lock Nodes",unlock:"Locked (Unlock)",fitView:"Fit View",reset:"Reset",legend:"Legend",scopeNotes:"Scope & Notes",learningPath:"Recommended Order:",expandDetail:"Expand Details",collapseDetail:"Collapse Details",detailEdgeLabel:"Drill-down",deepDiveBadgeTitle:"Deep dive into this node",deepDiveModalTitle:"Deep Dive Loop Prompts",tabAsk:"Targeted Follow-up Prompts",tabRecursive:"Recursive Sub-Atlas Prompt",copyBtn:"Copy Prompt",copiedBtn:"Copied!",copySnippet:"Copy",openInEditor:"Open in Editor",editorConfirmHint:"Note: Your browser may ask permission to launch the external editor. Regenerate if local files move.",recursiveUsageHint:"Send this prompt to your AI agent to generate a dedicated L1/L2 interactive HTML sub-atlas for this focus:",whatItDoes:"What It Does",whyItMatters:"Why It Matters",inputsLabel:"Inputs / Preconditions",outputsLabel:"Outputs / Effects",mechanismsLabel:"Mechanism & Side Effects",watchoutsLabel:"Key Watchouts",anchorsLabel:"Evidence & Direct Anchors",openDeepDiveBtn:'Open "?" Deep-Dive Prompts',unverifiedTag:"Unverified",verifiedTag:"Verified",uncoveredTitle:"Uncovered Scope",unverifiedTitle:"Unverified / Pending Items",noSearchMatches:"No matching nodes",nestedBadge:"Detail Sub-node",close:"Close",roles:{entry:"Entry / Trigger",core:"Core Mechanism",branch:"Decision / Branch",foundation:"Foundation / Store",context:"External / Context",extension:"Extension / Async",outcome:"Outcome / Takeaway"}}};function hV(u={}){let $=String(u.language||"en").toLowerCase().startsWith("zh")?nA.zh:nA.en,F=u.uiLabels&&typeof u.uiLabels==="object"?u.uiLabels:{};return{...$,...F,roles:{...$.roles,...F.roles||{}}}}var _5={entry:{accent:"#2563eb",bg:"#eff6ff",badgeBg:"#dbeafe",badgeText:"#1d4ed8"},core:{accent:"#0f766e",bg:"#f0fdfa",badgeBg:"#ccfbf1",badgeText:"#0f766e"},branch:{accent:"#d97706",bg:"#fffbeb",badgeBg:"#fef3c7",badgeText:"#b45309"},foundation:{accent:"#7c3aed",bg:"#f5f3ff",badgeBg:"#ede9fe",badgeText:"#6d28d9"},context:{accent:"#475569",bg:"#f8fafc",badgeBg:"#e2e8f0",badgeText:"#334155"},extension:{accent:"#db2777",bg:"#fdf2f8",badgeBg:"#fce7f3",badgeText:"#be185d"},outcome:{accent:"#16a34a",bg:"#f0fdf4",badgeBg:"#dcfce7",badgeText:"#15803d"}};function vV(u){if(navigator.clipboard&&typeof navigator.clipboard.writeText==="function")return navigator.clipboard.writeText(u).catch(()=>dA(u));return Promise.resolve(dA(u))}function dA(u){let f=document.createElement("textarea");f.value=u,f.setAttribute("readonly","true"),f.style.position="fixed",f.style.top="-9999px",f.style.left="-9999px",document.body.appendChild(f),f.select();try{document.execCommand("copy")}catch($){}return document.body.removeChild(f),!0}function xV(u,f,$,F,l){let U=new WF.default.graphlib.Graph;U.setDefaultEdgeLabel(()=>({})),U.setGraph({rankdir:"LR",nodesep:68,ranksep:118,marginx:44,marginy:44});let _=Array.isArray(u.nodes)?u.nodes:[],Q=Array.isArray(u.edges)?u.edges:[],J=_.filter((K)=>{if(f==="all")return!0;return Array.isArray(K.streamIds)&&K.streamIds.includes(f)}),q=new Set(J.map((K)=>K.id)),T=[],W=[];for(let K of J){let L=Array.isArray(K.detailGraph?.nodes)?K.detailGraph.nodes.length:0,z=$.has(K.id)&&L>0,Z=304,B=148;if(U.setNode(K.id,{width:304,height:148}),T.push({id:K.id,type:"atlasNode",position:{x:0,y:0},data:{item:K,isSubNode:!1,detailCount:L,isExpanded:z,t:F,...l},style:{width:304,minHeight:148}}),z){let G=K.detailGraph.nodes||[],w=K.detailGraph.edges||[],H=new Map;for(let M of G)H.set(M.id,0);for(let M of w)if(H.has(M.target))H.set(M.target,H.get(M.target)+1);for(let M of G){let R=`${K.id}::${M.id}`,E=268,V=124;if(U.setNode(R,{width:268,height:124}),T.push({id:R,type:"atlasNode",position:{x:0,y:0},data:{item:{...M,parentTitle:K.title,parentId:K.id},isSubNode:!0,detailCount:0,isExpanded:!1,t:F,...l},style:{width:268,minHeight:124}}),(H.get(M.id)||0)===0){let D=`bridge::${K.id}->${R}`;U.setEdge(K.id,R),W.push({id:D,source:K.id,target:R,label:F.detailEdgeLabel,animated:!0,style:{stroke:"#0ea5e9",strokeWidth:1.8,strokeDasharray:"5 4"},labelStyle:{fill:"#0369a1",fontSize:11,fontWeight:600},labelBgStyle:{fill:"#f0f9ff",fillOpacity:0.92},markerEnd:{type:pf.ArrowClosed,color:"#0ea5e9"}})}}for(let M=0;M<w.length;M++){let R=w[M],E=`${K.id}::${R.source}`,V=`${K.id}::${R.target}`;U.setEdge(E,V),W.push({id:`subedge::${K.id}::${R.id||M}`,source:E,target:V,label:R.label||"",style:{stroke:"#64748b",strokeWidth:1.6},labelStyle:{fill:"#334155",fontSize:11,fontWeight:500},labelBgStyle:{fill:"#f8fafc",fillOpacity:0.92},markerEnd:{type:pf.ArrowClosed,color:"#64748b"}})}}}for(let K=0;K<Q.length;K++){let L=Q[K];if(!q.has(L.source)||!q.has(L.target))continue;U.setEdge(L.source,L.target),W.push({id:L.id||`edge-${K}`,source:L.source,target:L.target,label:L.label||"",style:{stroke:"#334155",strokeWidth:2},labelStyle:{fill:"#0f172a",fontSize:11.5,fontWeight:600},labelBgStyle:{fill:"#ffffff",fillOpacity:0.94},labelBgPadding:[6,3],labelBgBorderRadius:4,markerEnd:{type:pf.ArrowClosed,color:"#334155"}})}return WF.default.layout(U),{nodes:T.map((K)=>{let L=U.node(K.id),z=K.style.width||300,Z=K.style.minHeight||140;return{...K,targetPosition:a.Left,sourcePosition:a.Right,position:{x:Math.round((L?L.x:0)-z/2),y:Math.round((L?L.y:0)-Z/2)}}}),edges:W}}function cV({id:u,data:f,selected:$}){let{item:F,isSubNode:l,detailCount:U,isExpanded:_,t:Q,onToggleExpand:J,onOpenDeepDive:q,onSelectNode:T}=f,[W,A]=Qu.useState(!1),K=_5[F.role]?F.role:"core",L=_5[K],z=Boolean(F.deepDive&&(Array.isArray(F.deepDive.askPrompts)&&F.deepDive.askPrompts.length>0||F.deepDive.subAtlasPrompt)),Z=Array.isArray(F.anchors)?F.anchors.length:0;return S.jsxs("div",{"data-testid":l?"atlas-subnode-card":"atlas-node-card","data-node-id":u,onClick:()=>T(u),className:`atlas-node ${l?"atlas-node-sub":""} ${$?"atlas-node-selected":""}`,style:{borderLeft:`5px solid ${L.accent}`,background:l?"#ffffff":L.bg},children:[S.jsx(Z1,{type:"target",position:a.Left,className:"atlas-handle"}),S.jsxs("div",{className:"atlas-node-header",children:[S.jsxs("div",{className:"atlas-node-badges",children:[S.jsx("span",{className:"atlas-role-badge",style:{background:L.badgeBg,color:L.badgeText},children:Q.roles[K]||F.role}),l&&S.jsx("span",{className:"atlas-sub-pill",children:Q.nestedBadge}),F.confidence==="unverified"&&S.jsx("span",{className:"atlas-unverified-pill",children:Q.unverifiedTag})]}),z&&S.jsxs("div",{className:"atlas-help-wrap nodrag nopan",children:[S.jsx("button",{type:"button","data-testid":"node-deep-dive-btn","data-for-node":u,"aria-label":Q.deepDiveBadgeTitle,className:"atlas-help-btn nodrag nopan",onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onPointerDown:(B)=>B.stopPropagation(),onMouseDown:(B)=>B.stopPropagation(),onClick:(B)=>{B.stopPropagation(),A(!1),q({title:F.title,deepDive:F.deepDive})},children:"?"}),W&&S.jsx("div",{"data-testid":"deep-dive-tooltip",className:"atlas-help-tooltip",children:F.deepDive.hoverHint||Q.deepDiveBadgeTitle})]})]}),S.jsx("div",{className:"atlas-node-title",children:F.title}),F.summary&&S.jsx("div",{className:"atlas-node-summary",children:F.summary}),(U>0||Z>0)&&S.jsxs("div",{className:"atlas-node-footer nodrag nopan",children:[U>0?S.jsx("button",{type:"button","data-testid":"node-expand-btn","data-for-node":u,className:`atlas-expand-btn nodrag nopan ${_?"active":""}`,onPointerDown:(B)=>B.stopPropagation(),onMouseDown:(B)=>B.stopPropagation(),onClick:(B)=>{B.stopPropagation(),J(u)},children:_?`${Q.collapseDetail} (${U})`:`${Q.expandDetail} (${U})`}):S.jsx("span",{}),Z>0&&S.jsxs("span",{className:"atlas-anchor-count",children:["#",Z]})]}),S.jsx(Z1,{type:"source",position:a.Right,className:"atlas-handle"})]})}var mV={atlasNode:cV};function KF({text:u,label:f,copiedLabel:$,testId:F="btn-copy-prompt",small:l=!1}){let[U,_]=Qu.useState(!1),Q=Qu.useRef(null);return S.jsx("button",{type:"button","data-testid":F,"data-copied":U?"true":"false",onClick:(q)=>{q.stopPropagation(),vV(u).then(()=>{if(_(!0),Q.current)clearTimeout(Q.current);Q.current=setTimeout(()=>_(!1),1800)})},className:`atlas-copy-btn ${l?"small":""} ${U?"copied":""}`,children:U?$:f})}function pV({target:u,t:f,onClose:$}){let[F,l]=Qu.useState("ask");if(!u||!u.deepDive)return null;let U=Array.isArray(u.deepDive.askPrompts)?u.deepDive.askPrompts:[],_=u.deepDive.subAtlasPrompt||"";return S.jsx("div",{className:"atlas-modal-backdrop","data-testid":"deep-dive-backdrop",onClick:$,children:S.jsxs("div",{className:"atlas-modal","data-testid":"deep-dive-panel",onClick:(Q)=>Q.stopPropagation(),children:[S.jsxs("div",{className:"atlas-modal-header",children:[S.jsxs("div",{children:[S.jsx("div",{className:"atlas-modal-kicker",children:f.deepDiveModalTitle}),S.jsx("h3",{className:"atlas-modal-title",children:u.title})]}),S.jsx("button",{type:"button","data-testid":"btn-close-deep-dive",className:"atlas-icon-close",onClick:$,children:f.close})]}),S.jsxs("div",{className:"atlas-modal-tabs",children:[S.jsxs("button",{type:"button","data-testid":"tab-ask-prompts",className:`atlas-tab-btn ${F==="ask"?"active":""}`,onClick:()=>l("ask"),children:[f.tabAsk," (",U.length,")"]}),_&&S.jsx("button",{type:"button","data-testid":"tab-recursive-prompt",className:`atlas-tab-btn ${F==="recursive"?"active":""}`,onClick:()=>l("recursive"),children:f.tabRecursive})]}),S.jsxs("div",{className:"atlas-modal-body",children:[F==="ask"&&S.jsx("div",{className:"atlas-prompt-list",children:U.map((Q,J)=>S.jsxs("div",{className:"atlas-prompt-card","data-testid":"ask-prompt-card",children:[S.jsxs("div",{className:"atlas-prompt-card-head",children:[S.jsx("strong",{children:Q.title}),S.jsx(KF,{text:Q.prompt,label:f.copyBtn,copiedLabel:f.copiedBtn,testId:`btn-copy-ask-${J}`})]}),S.jsx("pre",{className:"atlas-prompt-pre","data-testid":"ask-prompt-text",children:Q.prompt})]},J))}),F==="recursive"&&_&&S.jsxs("div",{className:"atlas-prompt-card","data-testid":"recursive-prompt-card",children:[S.jsx("p",{className:"atlas-hint-p",children:f.recursiveUsageHint}),S.jsxs("div",{className:"atlas-prompt-card-head",children:[S.jsx("strong",{children:"AtlasLoop L1+"}),S.jsx(KF,{text:_,label:f.copyBtn,copiedLabel:f.copiedBtn,testId:"btn-copy-recursive"})]}),S.jsx("pre",{className:"atlas-prompt-pre","data-testid":"recursive-prompt-text",children:_})]})]})]})})}function bV({data:u}){let f=u.meta||{},$=Qu.useMemo(()=>hV(f),[f]),F=Array.isArray(u.streams)?u.streams:[],[l,U]=Qu.useState("all"),[_,Q]=Qu.useState(()=>new Set),[J,q]=Qu.useState(!1),[T,W]=Qu.useState(!1),[A,K]=Qu.useState(!1),[L,z]=Qu.useState(""),[Z,B]=Qu.useState(null),[G,w]=Qu.useState(null),[H,M]=Qu.useState(0),R=k3(),E=Qu.useRef(null),V=Qu.useCallback((N)=>{Q((b)=>{let s=new Set(b);if(s.has(N))s.delete(N);else s.add(N);return s})},[]),D=Qu.useCallback((N)=>{w(N)},[]),r=Qu.useCallback((N)=>{B(N)},[]),C=Qu.useMemo(()=>({onToggleExpand:V,onOpenDeepDive:D,onSelectNode:r}),[V,D,r]),m=Qu.useMemo(()=>xV(u,l,_,$,C),[u,l,_,$,C,H]),[v,Y,X]=Lq(m.nodes),[O,j,k]=Gq(m.edges);Qu.useEffect(()=>{Y(m.nodes),j(m.edges)},[m,Y,j]),Qu.useEffect(()=>{Y((N)=>N.map((b)=>{let s=b.id===Z;return b.selected===s?b:{...b,selected:s}}))},[Z,Y]),Qu.useEffect(()=>{if(E.current){let N=E.current;if(v.some((s)=>s.id===N))E.current=null,requestAnimationFrame(()=>{R.fitView({nodes:[{id:N}],padding:0.45,duration:0})})}},[v,R]);let P=Qu.useCallback(()=>{R.fitView({padding:0.18,duration:0})},[R]),c=Qu.useCallback(()=>{U("all"),Q(new Set),z(""),B(null),w(null),K(!1),q(!1),M((N)=>N+1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{R.fitView({padding:0.18,duration:0})})})},[R]),x=Qu.useMemo(()=>{let N=[];for(let b of u.nodes||[]){let s=(b.anchors||[]).map((e)=>[e.label,e.filePath,e.symbol,e.content,e.citation,e.url].filter(Boolean).join(" ")).join(" "),d=(b.deepDive?.askPrompts||[]).map((e)=>`${e.title} ${e.prompt}`).join(" ");N.push({flowId:b.id,parentId:null,title:b.title,summary:b.summary||"",isSub:!1,haystack:`${b.title} ${b.summary||""} ${b.whyItMatters||""} ${s} ${d}`.toLowerCase()});for(let e of b.detailGraph?.nodes||[]){let lu=(e.anchors||[]).map((Uu)=>[Uu.label,Uu.filePath,Uu.symbol,Uu.content,Uu.citation,Uu.url].filter(Boolean).join(" ")).join(" ");N.push({flowId:`${b.id}::${e.id}`,parentId:b.id,title:e.title,summary:`${b.title} → ${e.summary||""}`,isSub:!0,haystack:`${e.title} ${e.summary||""} ${b.title} ${lu}`.toLowerCase()})}}return N},[u.nodes]),g=Qu.useMemo(()=>{let N=L.trim().toLowerCase();if(!N)return[];return x.filter((b)=>b.haystack.includes(N)).slice(0,12)},[L,x]),$u=(N)=>{if(l!=="all")U("all");if(N.parentId&&!_.has(N.parentId))Q((s)=>{let d=new Set(s);return d.add(N.parentId),d});if(B(N.flowId),E.current=N.flowId,z(""),v.some((s)=>s.id===N.flowId))E.current=null,requestAnimationFrame(()=>{R.fitView({nodes:[{id:N.flowId}],padding:0.45,duration:0})})},i=Qu.useMemo(()=>{if(!Z)return null;if(Z.includes("::")){let[N,b]=Z.split("::"),s=(u.nodes||[]).find((e)=>e.id===N),d=(s?.detailGraph?.nodes||[]).find((e)=>e.id===b);return d?{...d,_parentTitle:s?.title}:null}return(u.nodes||[]).find((N)=>N.id===Z)||null},[Z,u.nodes]),fu=Qu.useMemo(()=>{if(l==="all")return F[0]||null;return F.find((N)=>N.id===l)||null},[l,F]),Fu=Qu.useMemo(()=>{let N=new Map;for(let b of u.nodes||[])N.set(b.id,b.title);return N},[u.nodes]),uu=Array.isArray(f.uncoveredScopes)?f.uncoveredScopes:[],h=Array.isArray(f.unverifiedNotes)?f.unverifiedNotes:[],n=uu.length+h.length;return S.jsxs("div",{className:"atlas-shell-root",children:[S.jsxs("header",{className:"atlas-topbar","data-testid":"atlas-topbar",children:[S.jsxs("div",{className:"atlas-topbar-left",children:[S.jsxs("div",{className:"atlas-top-badges",children:[f.parentMapHtml&&S.jsx("a",{href:f.parentMapHtml,"data-testid":"parent-map-link",className:"atlas-parent-link",children:$.backParent}),f.subjectTag&&S.jsx("span",{className:"atlas-subject-badge",children:f.subjectTag}),S.jsx("span",{className:"atlas-level-badge","data-testid":"level-badge",children:f.level&&Number(f.level)>0&&f.drillDownTarget?`${$.levelSubPrefix}${f.drillDownTarget}`:$.levelOverview})]}),S.jsx("h1",{className:"atlas-main-title",children:f.title}),f.subtitle&&S.jsx("p",{className:"atlas-subtitle",children:f.subtitle})]}),S.jsxs("div",{className:"atlas-topbar-right",children:[S.jsxs("div",{className:"atlas-model-pill","data-testid":"model-badge",children:[$.modelPrefix,f.generatedByModel]}),n>0&&S.jsxs("button",{type:"button","data-testid":"btn-scope-notes",className:"atlas-scope-btn",onClick:()=>K(!0),children:[$.scopeNotes," (",n,")"]})]})]}),S.jsxs("div",{className:"atlas-toolbar-row",children:[S.jsxs("div",{className:"atlas-streams-bar","data-testid":"stream-filter-bar",children:[S.jsx("button",{type:"button","data-testid":"stream-btn-all","data-active":l==="all"?"true":"false",className:`atlas-stream-pill ${l==="all"?"active":""}`,onClick:()=>U("all"),children:$.allStreams}),F.map((N)=>{let b=Boolean(N.deepDive&&(N.deepDive.askPrompts&&N.deepDive.askPrompts.length>0||N.deepDive.subAtlasPrompt));return S.jsxs("div",{className:"atlas-stream-pill-group",children:[S.jsx("button",{type:"button","data-testid":`stream-btn-${N.id}`,"data-active":l===N.id?"true":"false",className:`atlas-stream-pill ${l===N.id?"active":""}`,onClick:()=>U(N.id),children:N.title}),b&&S.jsx("button",{type:"button",title:N.deepDive.hoverHint||$.deepDiveBadgeTitle,"data-testid":`stream-deep-dive-${N.id}`,className:"atlas-stream-help-btn",onClick:()=>w({title:N.title,deepDive:N.deepDive}),children:"?"})]},N.id)})]}),S.jsxs("div",{className:"atlas-controls-group",children:[S.jsxs("div",{className:"atlas-search-box",children:[S.jsx("input",{type:"search","data-testid":"search-input",value:L,onChange:(N)=>z(N.target.value),placeholder:$.searchPlaceholder,className:"atlas-search-input"}),L.trim()!==""&&S.jsx("div",{className:"atlas-search-dropdown","data-testid":"search-results",children:g.length===0?S.jsx("div",{className:"atlas-search-empty",children:$.noSearchMatches}):g.map((N)=>S.jsxs("button",{type:"button","data-testid":"search-result-item","data-target-id":N.flowId,className:"atlas-search-item",onClick:()=>$u(N),children:[S.jsxs("div",{className:"atlas-search-item-title",children:[N.title,N.isSub&&S.jsx("span",{className:"atlas-sub-pill",children:$.nestedBadge})]}),N.summary&&S.jsx("div",{className:"atlas-search-item-sub",children:N.summary})]},N.flowId))})]}),S.jsxs("div",{className:"atlas-canvas-btns",children:[S.jsxs("button",{type:"button","data-testid":"btn-zoom-in",className:"atlas-ctrl-btn",onClick:()=>R.zoomIn({duration:0}),children:["+ ",$.zoomIn]}),S.jsxs("button",{type:"button","data-testid":"btn-zoom-out",className:"atlas-ctrl-btn",onClick:()=>R.zoomOut({duration:0}),children:["− ",$.zoomOut]}),S.jsx("button",{type:"button","data-testid":"btn-lock","data-locked":J?"true":"false",className:`atlas-ctrl-btn ${J?"locked":""}`,onClick:()=>q((N)=>!N),children:J?`\uD83D\uDD12 ${$.unlock}`:`\uD83D\uDD13 ${$.lock}`}),S.jsx("button",{type:"button","data-testid":"btn-fit-view",className:"atlas-ctrl-btn",onClick:P,children:$.fitView}),S.jsx("button",{type:"button","data-testid":"btn-reset",className:"atlas-ctrl-btn reset-btn",onClick:c,children:$.reset}),S.jsx("button",{type:"button","data-testid":"btn-legend",className:`atlas-ctrl-btn ${T?"active":""}`,onClick:()=>W((N)=>!N),children:$.legend})]})]})]}),fu&&Array.isArray(fu.learningOrder)&&fu.learningOrder.length>0&&S.jsxs("div",{className:"atlas-reading-bar","data-testid":"learning-order-bar",children:[S.jsx("span",{className:"atlas-reading-label",children:$.learningPath}),S.jsx("div",{className:"atlas-reading-steps",children:fu.learningOrder.map((N,b)=>{let s=Fu.get(N)||N;return S.jsxs("button",{type:"button","data-testid":`learning-step-${b}`,className:`atlas-step-chip ${Z===N?"active":""}`,onClick:()=>{B(N),R.fitView({nodes:[{id:N}],padding:0.45,duration:0})},children:[S.jsx("span",{className:"atlas-step-num",children:b+1}),s]},N)})})]}),S.jsxs("div",{className:"atlas-main-workspace",children:[S.jsxs("div",{className:"atlas-canvas-container","data-testid":"atlas-canvas-wrap",children:[S.jsxs(Bq,{nodes:v,edges:O,nodeTypes:mV,onNodesChange:X,onEdgesChange:k,nodesDraggable:!J,nodesConnectable:!1,elementsSelectable:!0,fitView:!0,fitViewOptions:{padding:0.18},minZoom:0.15,maxZoom:2.5,proOptions:{hideAttribution:!0},children:[S.jsx(zq,{gap:20,size:1,color:"#cbd5e1"}),S.jsx(Rq,{pannable:!0,zoomable:!0,nodeColor:(N)=>{let b=N.data?.item?.role;return _5[b]?.accent||"#64748b"},style:{border:"1px solid #cbd5e1",borderRadius:8}})]}),T&&S.jsx("div",{className:"atlas-legend-card","data-testid":"legend-panel",children:Object.entries(_5).map(([N,b])=>S.jsxs("div",{className:"atlas-legend-row",children:[S.jsx("span",{className:"atlas-legend-swatch",style:{background:b.accent}}),S.jsx("span",{children:$.roles[N]||N})]},N))})]}),i&&S.jsxs("aside",{className:"atlas-inspector","data-testid":"inspector-panel",children:[S.jsxs("div",{className:"atlas-inspector-head",children:[S.jsxs("div",{children:[i._parentTitle&&S.jsx("div",{className:"atlas-inspector-parent",children:i._parentTitle}),S.jsx("h2",{className:"atlas-inspector-title",children:i.title})]}),S.jsx("button",{type:"button","data-testid":"btn-close-inspector",className:"atlas-icon-close",onClick:()=>B(null),children:$.close})]}),S.jsxs("div",{className:"atlas-inspector-meta",children:[S.jsx("span",{className:`atlas-conf-badge ${i.confidence==="unverified"?"warn":"ok"}`,children:i.confidence==="unverified"?$.unverifiedTag:$.verifiedTag}),i.unverifiedReason&&S.jsx("p",{className:"atlas-unverified-note",children:i.unverifiedReason})]}),i.summary&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.whatItDoes}),S.jsx("p",{children:i.summary})]}),i.whyItMatters&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.whyItMatters}),S.jsx("p",{children:i.whyItMatters})]}),(i.keyFactors?.inputs||i.keyFactors?.outputs)&&S.jsxs("section",{className:"atlas-sec",children:[i.keyFactors.inputs&&S.jsxs("div",{className:"atlas-kv",children:[S.jsxs("strong",{children:[$.inputsLabel,":"]}),S.jsx("span",{children:i.keyFactors.inputs})]}),i.keyFactors.outputs&&S.jsxs("div",{className:"atlas-kv",children:[S.jsxs("strong",{children:[$.outputsLabel,":"]}),S.jsx("span",{children:i.keyFactors.outputs})]})]}),i.mechanismsAndEffects&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.mechanismsLabel}),S.jsx("p",{children:i.mechanismsAndEffects})]}),i.watchouts&&S.jsxs("section",{className:"atlas-sec atlas-watchout-box",children:[S.jsx("h4",{children:$.watchoutsLabel}),S.jsx("p",{children:i.watchouts})]}),Array.isArray(i.anchors)&&i.anchors.length>0&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.anchorsLabel}),S.jsx("div",{className:"atlas-anchor-list",children:i.anchors.map((N,b)=>S.jsxs("div",{className:"atlas-anchor-card","data-testid":"anchor-item",children:[S.jsx("div",{className:"atlas-anchor-label",children:N.label}),N.kind==="editor"&&S.jsxs("div",{className:"atlas-anchor-editor",children:[S.jsxs("code",{children:[N.filePath,":",N.line||1,N.symbol?` (${N.symbol})`:""]}),N.unsupportedNote?S.jsx("div",{className:"atlas-unverified-note",children:N.unsupportedNote}):S.jsxs(S.Fragment,{children:[S.jsxs("a",{href:N.editorUri,"data-testid":"editor-jump-link",className:"atlas-editor-btn",children:[$.openInEditor," (",(N.editor||"vscode").toUpperCase(),")"]}),S.jsx("div",{className:"atlas-editor-hint",children:$.editorConfirmHint})]})]}),N.kind==="snippet"&&S.jsxs("div",{className:"atlas-anchor-snippet",children:[S.jsx("pre",{children:N.content}),S.jsx(KF,{text:N.content||"",label:$.copySnippet,copiedLabel:$.copiedBtn,testId:`btn-copy-snippet-${b}`,small:!0})]}),N.kind==="link"&&S.jsx("a",{href:N.url,target:"_blank",rel:"noopener noreferrer",className:"atlas-ext-link",children:N.url}),N.kind==="source"&&S.jsx("div",{className:"atlas-source-cite",children:N.citation})]},b))})]}),i.deepDive&&S.jsx("section",{className:"atlas-sec",children:S.jsxs("button",{type:"button","data-testid":"inspector-open-deep-dive",className:"atlas-open-dive-btn",onClick:()=>w({title:i.title,deepDive:i.deepDive}),children:["? ",$.openDeepDiveBtn]})})]})]}),S.jsx(pV,{target:G,t:$,onClose:()=>w(null)}),A&&S.jsx("div",{className:"atlas-modal-backdrop",onClick:()=>K(!1),children:S.jsxs("div",{className:"atlas-modal",onClick:(N)=>N.stopPropagation(),children:[S.jsxs("div",{className:"atlas-modal-header",children:[S.jsx("h3",{className:"atlas-modal-title",children:$.scopeNotes}),S.jsx("button",{type:"button",className:"atlas-icon-close",onClick:()=>K(!1),children:$.close})]}),S.jsxs("div",{className:"atlas-modal-body",children:[uu.length>0&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.uncoveredTitle}),S.jsx("ul",{children:uu.map((N,b)=>S.jsx("li",{children:N},b))})]}),h.length>0&&S.jsxs("section",{className:"atlas-sec",children:[S.jsx("h4",{children:$.unverifiedTitle}),S.jsx("ul",{children:h.map((N,b)=>S.jsx("li",{children:N},b))})]})]})]})})]})}function iV(){let u=document.getElementById("atlas-data-json"),f=u?JSON.parse(u.textContent):window.__ATLAS_DATA__||{},$=document.getElementById("root");aA.createRoot($).render(S.jsx(t$,{children:S.jsx(bV,{data:f})}))}iV();})();
1383
+ </script>
1384
+ </body>
1385
+ </html>