@pipelex/mthds-ui 0.6.2 → 0.6.3

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,2358 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title><!--PIPELEX_TITLE--></title>
7
+ <style nonce="PIPELEX_CSP_NONCE">
8
+ /* this gets exported as style.css and can be used for the default theming */
9
+ /* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
10
+ .react-flow {
11
+ direction: ltr;
12
+
13
+ --xy-edge-stroke-default: #b1b1b7;
14
+ --xy-edge-stroke-width-default: 1;
15
+ --xy-edge-stroke-selected-default: #555;
16
+
17
+ --xy-connectionline-stroke-default: #b1b1b7;
18
+ --xy-connectionline-stroke-width-default: 1;
19
+
20
+ --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);
21
+
22
+ --xy-minimap-background-color-default: #fff;
23
+ --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);
24
+ --xy-minimap-mask-stroke-color-default: transparent;
25
+ --xy-minimap-mask-stroke-width-default: 1;
26
+ --xy-minimap-node-background-color-default: #e2e2e2;
27
+ --xy-minimap-node-stroke-color-default: transparent;
28
+ --xy-minimap-node-stroke-width-default: 2;
29
+
30
+ --xy-background-color-default: transparent;
31
+ --xy-background-pattern-dots-color-default: #91919a;
32
+ --xy-background-pattern-lines-color-default: #eee;
33
+ --xy-background-pattern-cross-color-default: #e2e2e2;
34
+ background-color: var(--xy-background-color, var(--xy-background-color-default));
35
+ --xy-node-color-default: inherit;
36
+ --xy-node-border-default: 1px solid #1a192b;
37
+ --xy-node-background-color-default: #fff;
38
+ --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
39
+ --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
40
+ --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;
41
+ --xy-node-border-radius-default: 3px;
42
+
43
+ --xy-handle-background-color-default: #1a192b;
44
+ --xy-handle-border-color-default: #fff;
45
+
46
+ --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);
47
+ --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);
48
+
49
+ --xy-controls-button-background-color-default: #fefefe;
50
+ --xy-controls-button-background-color-hover-default: #f4f4f4;
51
+ --xy-controls-button-color-default: inherit;
52
+ --xy-controls-button-color-hover-default: inherit;
53
+ --xy-controls-button-border-color-default: #eee;
54
+ --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);
55
+
56
+ --xy-edge-label-background-color-default: #ffffff;
57
+ --xy-edge-label-color-default: inherit;
58
+ --xy-resize-background-color-default: #3367d9;
59
+ }
60
+ .react-flow.dark {
61
+ --xy-edge-stroke-default: #3e3e3e;
62
+ --xy-edge-stroke-width-default: 1;
63
+ --xy-edge-stroke-selected-default: #727272;
64
+
65
+ --xy-connectionline-stroke-default: #b1b1b7;
66
+ --xy-connectionline-stroke-width-default: 1;
67
+
68
+ --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);
69
+
70
+ --xy-minimap-background-color-default: #141414;
71
+ --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);
72
+ --xy-minimap-mask-stroke-color-default: transparent;
73
+ --xy-minimap-mask-stroke-width-default: 1;
74
+ --xy-minimap-node-background-color-default: #2b2b2b;
75
+ --xy-minimap-node-stroke-color-default: transparent;
76
+ --xy-minimap-node-stroke-width-default: 2;
77
+
78
+ --xy-background-color-default: #141414;
79
+ --xy-background-pattern-dots-color-default: #777;
80
+ --xy-background-pattern-lines-color-default: #777;
81
+ --xy-background-pattern-cross-color-default: #777;
82
+ --xy-node-color-default: #f8f8f8;
83
+ --xy-node-border-default: 1px solid #3c3c3c;
84
+ --xy-node-background-color-default: #1e1e1e;
85
+ --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
86
+ --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);
87
+ --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;
88
+
89
+ --xy-handle-background-color-default: #bebebe;
90
+ --xy-handle-border-color-default: #1e1e1e;
91
+
92
+ --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);
93
+ --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);
94
+
95
+ --xy-controls-button-background-color-default: #2b2b2b;
96
+ --xy-controls-button-background-color-hover-default: #3e3e3e;
97
+ --xy-controls-button-color-default: #f8f8f8;
98
+ --xy-controls-button-color-hover-default: #fff;
99
+ --xy-controls-button-border-color-default: #5b5b5b;
100
+ --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);
101
+
102
+ --xy-edge-label-background-color-default: #141414;
103
+ --xy-edge-label-color-default: #f8f8f8;
104
+ }
105
+ .react-flow__background {
106
+ background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));
107
+ pointer-events: none;
108
+ z-index: -1;
109
+ }
110
+ .react-flow__container {
111
+ position: absolute;
112
+ width: 100%;
113
+ height: 100%;
114
+ top: 0;
115
+ left: 0;
116
+ }
117
+ .react-flow__pane {
118
+ z-index: 1;
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
+ /* ReactFlow base styles — resolved by the consumer's bundler */
634
+ /* Default theme — consumers can override any var on an ancestor element */
635
+ .react-flow-container {
636
+ --color-bg: #0a0a0a;
637
+ --color-bg-dots: rgba(255, 255, 255, 0.35);
638
+ --color-text-muted: #94a3b8;
639
+ --color-controller-text: #94a3b8;
640
+ --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
641
+ --font-mono: "JetBrains Mono", "Monaco", "Menlo", monospace;
642
+ --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
643
+ }
644
+ .react-flow-container {
645
+ position: absolute;
646
+ inset: 0;
647
+ background: var(--color-bg);
648
+ }
649
+ .react-flow__node {
650
+ font-family: var(--font-sans);
651
+ cursor: pointer;
652
+ }
653
+ .react-flow__background {
654
+ background: var(--color-bg) !important;
655
+ }
656
+ .react-flow__edge-path {
657
+ stroke-width: 2;
658
+ }
659
+ .react-flow__edge-text {
660
+ font-size: 11px;
661
+ fill: var(--color-text-muted);
662
+ }
663
+ .react-flow__edge-textbg {
664
+ fill: var(--color-bg);
665
+ }
666
+ /* Selected node highlight */
667
+ .react-flow__node.selected {
668
+ box-shadow:
669
+ 0 0 0 3px var(--color-accent),
670
+ var(--shadow-lg) !important;
671
+ z-index: 1000 !important;
672
+ }
673
+ /* Pipe cards handle their own selection styling — suppress the wrapper outline */
674
+ .react-flow__node-pipeCard {
675
+ background: transparent !important;
676
+ border: none !important;
677
+ box-shadow: none !important;
678
+ outline: none !important;
679
+ padding: 0 !important;
680
+ }
681
+ .react-flow__node-pipeCard.selected {
682
+ box-shadow: none !important;
683
+ outline: none !important;
684
+ }
685
+ .react-flow__node-pipeCard.selected .pipe-card {
686
+ box-shadow:
687
+ 0 0 0 2px var(--color-accent, #3b82f6),
688
+ 0 4px 16px rgba(0, 0, 0, 0.6);
689
+ }
690
+ .react-flow__node-controllerGroup.selected {
691
+ box-shadow:
692
+ 0 0 0 2px var(--color-accent),
693
+ var(--shadow-lg) !important;
694
+ }
695
+ .react-flow__node-controllerGroup {
696
+ cursor: default !important;
697
+ }
698
+ /* ─── Controller Group Node ──────────────────────────────────────────── */
699
+ .controller-group-node {
700
+ --controller-border: 2px dashed rgba(148, 163, 184, 0.3);
701
+ --controller-bg: rgba(148, 163, 184, 0.04);
702
+ --controller-header-color: #64748b;
703
+
704
+ width: 100%;
705
+ height: 100%;
706
+ position: relative;
707
+ border: var(--controller-border);
708
+ border-radius: 12px;
709
+ background: var(--controller-bg);
710
+ }
711
+ .controller-group-header {
712
+ position: absolute;
713
+ top: 0;
714
+ left: 0;
715
+ right: 0;
716
+ display: flex;
717
+ align-items: center;
718
+ gap: 6px;
719
+ padding: 6px 12px;
720
+ pointer-events: none;
721
+ user-select: none;
722
+ }
723
+ .controller-group-icon {
724
+ font-size: 13px;
725
+ color: var(--controller-header-color);
726
+ line-height: 1;
727
+ }
728
+ .controller-group-badge {
729
+ font-size: 9px;
730
+ font-weight: 700;
731
+ text-transform: uppercase;
732
+ letter-spacing: 0.06em;
733
+ color: var(--controller-header-color);
734
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
735
+ }
736
+ .controller-group-label {
737
+ font-size: 11px;
738
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
739
+ font-weight: 500;
740
+ color: var(--color-controller-text, #94a3b8);
741
+ white-space: nowrap;
742
+ margin-left: auto;
743
+ }
744
+
745
+ /* Collapse / expand toggle for parallel & batch controllers */
746
+ .controller-group-collapse {
747
+ all: unset;
748
+ position: absolute;
749
+ bottom: 4px;
750
+ right: 8px;
751
+ font-size: 10px;
752
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
753
+ color: var(--controller-header-color, #94a3b8);
754
+ cursor: pointer;
755
+ padding: 2px 8px;
756
+ border-radius: 4px;
757
+ border: 1px dashed rgba(255, 255, 255, 0.15);
758
+ pointer-events: auto;
759
+ z-index: 10;
760
+ white-space: nowrap;
761
+ }
762
+ .controller-group-collapse:hover {
763
+ color: #e2e8f0;
764
+ border-color: rgba(255, 255, 255, 0.35);
765
+ background: rgba(255, 255, 255, 0.05);
766
+ }
767
+ .controller-group-collapse:focus-visible {
768
+ outline: 2px solid var(--controller-header-color, #94a3b8);
769
+ outline-offset: 2px;
770
+ }
771
+
772
+ /* Fold-into-card toggle — sits on the right of the header bar. */
773
+ .controller-group-fold {
774
+ all: unset;
775
+ cursor: pointer;
776
+ font-size: 20px;
777
+ line-height: 1;
778
+ color: var(--controller-header-color, #94a3b8);
779
+ padding: 4px 10px;
780
+ border-radius: 6px;
781
+ pointer-events: auto;
782
+ margin-left: auto;
783
+ }
784
+ .controller-group-fold:hover {
785
+ color: #e2e8f0;
786
+ background: rgba(255, 255, 255, 0.06);
787
+ }
788
+ .controller-group-fold:focus-visible {
789
+ outline: 2px solid var(--controller-header-color, #94a3b8);
790
+ outline-offset: 2px;
791
+ }
792
+
793
+ /* Sequence — solid thin border, calm flow */
794
+ .controller-group--sequence {
795
+ --controller-border: 1.5px solid rgba(148, 163, 184, 0.25);
796
+ --controller-bg: rgba(148, 163, 184, 0.03);
797
+ --controller-header-color: #94a3b8;
798
+ }
799
+
800
+ /* Parallel — double border, forking lanes */
801
+ .controller-group--parallel {
802
+ --controller-border: 3px double rgba(139, 233, 253, 0.35);
803
+ --controller-bg: rgba(139, 233, 253, 0.03);
804
+ --controller-header-color: #8be9fd;
805
+ }
806
+
807
+ /* Condition — dashed with diamond accent */
808
+ .controller-group--condition {
809
+ --controller-border: 2px dashed rgba(251, 191, 36, 0.35);
810
+ --controller-bg: rgba(251, 191, 36, 0.03);
811
+ --controller-header-color: #fbbf24;
812
+ }
813
+
814
+ /* Batch — dotted border, loop/repeat */
815
+ .controller-group--batch {
816
+ --controller-border: 2px dotted rgba(167, 139, 250, 0.35);
817
+ --controller-bg: rgba(167, 139, 250, 0.03);
818
+ --controller-header-color: #a78bfa;
819
+ }
820
+
821
+ /* ─── Pipe Card Node ─────────────────────────────────────────────────── */
822
+ /* All tokens overridable via CSS custom properties on an ancestor. */
823
+ .pipe-card {
824
+ --pipe-card-accent: #ff6b6b;
825
+ --pipe-card-bg: rgba(148, 163, 184, 0.08);
826
+ --pipe-card-text: #e2e8f0;
827
+ --pipe-card-text-bright: #f8fafc;
828
+ --pipe-card-text-muted: #94a3b8;
829
+ --pipe-card-text-dim: #64748b;
830
+ --pipe-card-pill-bg: rgba(255, 255, 255, 0.06);
831
+ --pipe-card-pill-border: rgba(255, 255, 255, 0.08);
832
+ --pipe-card-pill-text: #cbd5e1;
833
+ --pipe-card-radius: 8px;
834
+
835
+ border-left: 4px solid var(--pipe-card-accent);
836
+ border-radius: var(--pipe-card-radius);
837
+ padding: 12px 14px;
838
+ background: var(--pipe-card-bg);
839
+ font-family: var(--font-sans, "Inter", -apple-system, sans-serif);
840
+ color: var(--pipe-card-text);
841
+ display: flex;
842
+ flex-direction: column;
843
+ gap: 8px;
844
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
845
+ transition: box-shadow 0.2s;
846
+ /* Fill the ReactFlow wrapper whose size is locked to ELK's layout dimensions */
847
+ width: 100%;
848
+ height: 100%;
849
+ box-sizing: border-box;
850
+ overflow: hidden;
851
+ }
852
+ .pipe-card:hover {
853
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
854
+ }
855
+
856
+ /* Direction-aware sizing: LR = narrow + tall, TB = wide + short */
857
+ .pipe-card--lr {
858
+ min-width: 180px;
859
+ max-width: 240px;
860
+ }
861
+ .pipe-card--tb {
862
+ min-width: 280px;
863
+ max-width: 400px;
864
+ }
865
+
866
+ /* Header: badge + code + status */
867
+ .pipe-card-header {
868
+ display: flex;
869
+ align-items: center;
870
+ gap: 8px;
871
+ }
872
+ .pipe-card-badge {
873
+ font-size: 10px;
874
+ font-weight: 700;
875
+ text-transform: uppercase;
876
+ letter-spacing: 0.04em;
877
+ padding: 2px 7px;
878
+ border-radius: 4px;
879
+ white-space: nowrap;
880
+ line-height: 1.4;
881
+ background: var(--pipe-card-accent);
882
+ color: #0e0e0e;
883
+ }
884
+ .pipe-card-code {
885
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
886
+ font-size: 13px;
887
+ font-weight: 600;
888
+ color: var(--pipe-card-accent);
889
+ flex: 1;
890
+ overflow: hidden;
891
+ text-overflow: ellipsis;
892
+ white-space: nowrap;
893
+ }
894
+ .pipe-card-status {
895
+ display: flex;
896
+ align-items: center;
897
+ margin-left: auto;
898
+ flex-shrink: 0;
899
+ }
900
+ .pipe-card-status-dot {
901
+ width: 8px;
902
+ height: 8px;
903
+ border-radius: 50%;
904
+ display: inline-block;
905
+ }
906
+ .pipe-card-status-dot--pulse {
907
+ animation: pipe-card-pulse 1.5s ease-in-out infinite;
908
+ }
909
+
910
+ /* Expand button — appears on folded controller cards. */
911
+ .pipe-card-expand {
912
+ all: unset;
913
+ cursor: pointer;
914
+ font-size: 20px;
915
+ line-height: 1;
916
+ color: var(--pipe-card-text-muted);
917
+ padding: 4px 8px;
918
+ border-radius: 6px;
919
+ flex-shrink: 0;
920
+ }
921
+ .pipe-card-expand:hover {
922
+ color: var(--pipe-card-text-bright);
923
+ background: rgba(255, 255, 255, 0.08);
924
+ }
925
+ .pipe-card-expand:focus-visible {
926
+ outline: 2px solid var(--pipe-card-text-bright);
927
+ outline-offset: 2px;
928
+ }
929
+
930
+ /* Folded-controller card variant — slightly tinted badge to differentiate
931
+ from operator cards. */
932
+ .pipe-card-badge--controller {
933
+ background: rgba(148, 163, 184, 0.25);
934
+ color: var(--pipe-card-text-bright);
935
+ border: 1px solid rgba(148, 163, 184, 0.4);
936
+ }
937
+ .pipe-card--controller {
938
+ --pipe-card-accent: #94a3b8;
939
+ }
940
+ @keyframes pipe-card-pulse {
941
+ 0%,
942
+ 100% {
943
+ opacity: 1;
944
+ transform: scale(1);
945
+ }
946
+ 50% {
947
+ opacity: 0.5;
948
+ transform: scale(1.3);
949
+ }
950
+ }
951
+
952
+ /* LR: stack pipe code onto its own row below the badge/status row. */
953
+ .pipe-card--lr .pipe-card-header {
954
+ flex-wrap: wrap;
955
+ }
956
+ .pipe-card--lr .pipe-card-code {
957
+ flex: 0 0 100%;
958
+ order: 1;
959
+ min-width: 0;
960
+ }
961
+
962
+ /* Description — per-direction clamping. LR gets up to 3 lines (tall/narrow card),
963
+ TB gets 1 line (wide card, horizontal layout). Both truncate with ellipsis. */
964
+ .pipe-card-description {
965
+ font-size: 11.5px;
966
+ color: var(--pipe-card-text-muted);
967
+ line-height: 1.4;
968
+ overflow: hidden;
969
+ text-overflow: ellipsis;
970
+ min-width: 0;
971
+ }
972
+ .pipe-card--lr .pipe-card-description {
973
+ display: -webkit-box;
974
+ -webkit-line-clamp: 3;
975
+ -webkit-box-orient: vertical;
976
+ }
977
+ .pipe-card--tb .pipe-card-description {
978
+ white-space: nowrap;
979
+ }
980
+
981
+ /* I/O section — base (appearance only, layout set per-direction below) */
982
+ .pipe-card-io-label {
983
+ font-size: 9px;
984
+ font-weight: 700;
985
+ text-transform: uppercase;
986
+ letter-spacing: 0.06em;
987
+ color: var(--pipe-card-text-dim);
988
+ flex-shrink: 0;
989
+ }
990
+ .pipe-card-io-pills {
991
+ display: flex;
992
+ gap: 4px;
993
+ min-width: 0;
994
+ }
995
+ .pipe-card-io-pill {
996
+ display: inline-flex;
997
+ align-items: center;
998
+ gap: 3px;
999
+ font-size: 10px;
1000
+ background: var(--pipe-card-pill-bg);
1001
+ border: 1px solid var(--pipe-card-pill-border);
1002
+ border-radius: 4px;
1003
+ padding: 1px 5px;
1004
+ line-height: 1.4;
1005
+ min-width: 0;
1006
+ }
1007
+ .pipe-card-io-pill-name {
1008
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
1009
+ color: var(--pipe-card-pill-text);
1010
+ overflow: hidden;
1011
+ text-overflow: ellipsis;
1012
+ white-space: nowrap;
1013
+ }
1014
+ .pipe-card-io-pill-concept {
1015
+ color: var(--pipe-card-text-dim);
1016
+ font-size: 9px;
1017
+ overflow: hidden;
1018
+ text-overflow: ellipsis;
1019
+ white-space: nowrap;
1020
+ }
1021
+ .pipe-card-io-more {
1022
+ all: unset;
1023
+ font-size: 10px;
1024
+ font-family: var(--font-mono, "JetBrains Mono", monospace);
1025
+ color: var(--pipe-card-text-muted);
1026
+ cursor: pointer;
1027
+ padding: 2px 6px;
1028
+ border-radius: 4px;
1029
+ border: 1px dashed rgba(255, 255, 255, 0.12);
1030
+ white-space: nowrap;
1031
+ line-height: 1.4;
1032
+ }
1033
+ .pipe-card-io-more:hover {
1034
+ color: var(--pipe-card-text);
1035
+ border-color: rgba(255, 255, 255, 0.25);
1036
+ }
1037
+ .pipe-card-io-more:focus-visible {
1038
+ outline: 2px solid var(--pipe-card-text);
1039
+ outline-offset: 2px;
1040
+ }
1041
+
1042
+ /* ─── LR: label on top, pills stacked vertically, hard-truncated ─────── */
1043
+ /* Truncation priority: concept shrinks first → name truncates last. */
1044
+ .pipe-card--lr .pipe-card-io {
1045
+ display: flex;
1046
+ flex-direction: column;
1047
+ gap: 4px;
1048
+ }
1049
+ .pipe-card--lr .pipe-card-io-pills {
1050
+ flex-direction: column;
1051
+ align-items: flex-start; /* pills size to content, not stretch */
1052
+ gap: 4px;
1053
+ }
1054
+ .pipe-card--lr .pipe-card-io-pill {
1055
+ max-width: 100%;
1056
+ overflow: hidden;
1057
+ }
1058
+ .pipe-card--lr .pipe-card-io-pill-name {
1059
+ flex: 0 1 auto; /* natural width, shrinks only after concept is gone */
1060
+ min-width: 30px;
1061
+ }
1062
+ .pipe-card--lr .pipe-card-io-pill-concept {
1063
+ flex: 0 100 auto; /* natural width, shrinks 100x faster than name */
1064
+ min-width: 0; /* allow shrinking to zero */
1065
+ }
1066
+ .pipe-card--lr .pipe-card-io-more {
1067
+ align-self: flex-start;
1068
+ }
1069
+
1070
+ /* ─── TB: label on the left, pills wrap horizontally to the right ────── */
1071
+ .pipe-card--tb .pipe-card-io {
1072
+ display: flex;
1073
+ flex-direction: row;
1074
+ align-items: flex-start;
1075
+ gap: 6px;
1076
+ }
1077
+ .pipe-card--tb .pipe-card-io-label {
1078
+ padding-top: 4px;
1079
+ min-width: 52px;
1080
+ }
1081
+ .pipe-card--tb .pipe-card-io-pills {
1082
+ flex: 1 1 0;
1083
+ flex-wrap: wrap;
1084
+ min-width: 0;
1085
+ }
1086
+ .pipe-card--tb .pipe-card-io-pill {
1087
+ max-width: 100%;
1088
+ }
1089
+ .pipe-card--tb .pipe-card-io-pill-name {
1090
+ max-width: 140px;
1091
+ }
1092
+ .pipe-card--tb .pipe-card-io-pill-concept {
1093
+ max-width: 100px;
1094
+ }
1095
+
1096
+ /* ─── StuffViewer component styles ────────────────────────────────────────── */
1097
+ /* Uses CSS custom properties for consumer theming. Defaults match graph-core.css. */
1098
+
1099
+ .stuff-viewer {
1100
+ --sv-bg: var(--color-bg, #0a0a0a);
1101
+ --sv-surface: var(--color-surface, #16213e);
1102
+ --sv-surface-hover: var(--color-surface-hover, #1f2b47);
1103
+ --sv-border: var(--color-border, #2a3a5a);
1104
+ --sv-text: var(--color-text, #e2e8f0);
1105
+ --sv-text-muted: var(--color-text-muted, #94a3b8);
1106
+ --sv-accent: var(--color-accent, #3b82f6);
1107
+ --sv-success: #10b981;
1108
+ --sv-success-bg: rgba(16, 185, 129, 0.2);
1109
+ --sv-radius: 4px;
1110
+ --sv-font-sans: var(
1111
+ --font-sans,
1112
+ "Inter",
1113
+ -apple-system,
1114
+ BlinkMacSystemFont,
1115
+ "Segoe UI",
1116
+ sans-serif
1117
+ );
1118
+ --sv-font-mono: var(--font-mono, "JetBrains Mono", "Monaco", "Menlo", monospace);
1119
+
1120
+ font-family: var(--sv-font-sans);
1121
+ color: var(--sv-text);
1122
+ display: flex;
1123
+ flex-direction: column;
1124
+ height: 100%;
1125
+ }
1126
+
1127
+ /* ─── Header ─────────────────────────────────────────────────────────────── */
1128
+
1129
+ .stuff-viewer-header {
1130
+ display: flex;
1131
+ flex-direction: column;
1132
+ gap: 2px;
1133
+ padding: 12px 16px 8px;
1134
+ border-bottom: 1px solid var(--sv-border);
1135
+ flex-shrink: 0;
1136
+ }
1137
+
1138
+ .stuff-viewer-title {
1139
+ font-size: 14px;
1140
+ font-weight: 600;
1141
+ color: var(--sv-text);
1142
+ margin: 0;
1143
+ }
1144
+
1145
+ .stuff-viewer-subtitle {
1146
+ font-size: 12px;
1147
+ color: var(--sv-text-muted);
1148
+ margin: 0;
1149
+ }
1150
+
1151
+ /* ─── Toolbar: tabs + action buttons ─────────────────────────────────────── */
1152
+
1153
+ .stuff-viewer-toolbar {
1154
+ display: flex;
1155
+ justify-content: space-between;
1156
+ align-items: center;
1157
+ padding: 8px 16px;
1158
+ gap: 8px;
1159
+ flex-shrink: 0;
1160
+ }
1161
+
1162
+ .stuff-viewer-tabs {
1163
+ display: flex;
1164
+ gap: 4px;
1165
+ }
1166
+
1167
+ .stuff-viewer-tab {
1168
+ padding: 5px 10px;
1169
+ border-radius: var(--sv-radius);
1170
+ cursor: pointer;
1171
+ font-size: 12px;
1172
+ font-weight: 500;
1173
+ background: var(--sv-surface-hover);
1174
+ color: var(--sv-text-muted);
1175
+ border: none;
1176
+ transition:
1177
+ background 0.15s,
1178
+ color 0.15s;
1179
+ }
1180
+
1181
+ .stuff-viewer-tab:hover {
1182
+ background: var(--sv-border);
1183
+ color: var(--sv-text);
1184
+ }
1185
+
1186
+ .stuff-viewer-tab--active {
1187
+ background: var(--sv-accent);
1188
+ color: #fff;
1189
+ }
1190
+
1191
+ /* ─── Action buttons ─────────────────────────────────────────────────────── */
1192
+
1193
+ .stuff-viewer-actions {
1194
+ display: flex;
1195
+ gap: 4px;
1196
+ }
1197
+
1198
+ .stuff-viewer-action-btn {
1199
+ display: flex;
1200
+ align-items: center;
1201
+ justify-content: center;
1202
+ width: 28px;
1203
+ height: 28px;
1204
+ border-radius: var(--sv-radius);
1205
+ cursor: pointer;
1206
+ background: var(--sv-surface-hover);
1207
+ color: var(--sv-text-muted);
1208
+ border: none;
1209
+ transition:
1210
+ background 0.15s,
1211
+ color 0.15s;
1212
+ }
1213
+
1214
+ .stuff-viewer-action-btn:hover {
1215
+ background: var(--sv-border);
1216
+ color: var(--sv-text);
1217
+ }
1218
+
1219
+ .stuff-viewer-action-btn--copied {
1220
+ background: var(--sv-success-bg);
1221
+ color: var(--sv-success);
1222
+ }
1223
+
1224
+ .stuff-viewer-action-btn svg {
1225
+ width: 14px;
1226
+ height: 14px;
1227
+ fill: currentColor;
1228
+ }
1229
+
1230
+ /* ─── Content area ───────────────────────────────────────────────────────── */
1231
+
1232
+ .stuff-viewer-content {
1233
+ flex: 1;
1234
+ overflow: auto;
1235
+ padding: 12px 16px 16px;
1236
+ min-height: 0;
1237
+ }
1238
+
1239
+ /* Pre-formatted text (JSON and Pretty tabs) */
1240
+ .stuff-viewer-pre {
1241
+ font-family: var(--sv-font-mono);
1242
+ font-size: 11px;
1243
+ line-height: 1.5;
1244
+ white-space: pre-wrap;
1245
+ word-wrap: break-word;
1246
+ margin: 0;
1247
+ color: var(--sv-text-muted);
1248
+ }
1249
+
1250
+ .stuff-viewer-pre--nowrap {
1251
+ white-space: pre;
1252
+ word-wrap: normal;
1253
+ line-height: 1;
1254
+ overflow-x: auto;
1255
+ padding-right: 20px;
1256
+ }
1257
+
1258
+ /* HTML content */
1259
+ .stuff-viewer-html {
1260
+ font-family: var(--sv-font-sans);
1261
+ font-size: 11px;
1262
+ color: var(--sv-text-muted);
1263
+ line-height: 1.5;
1264
+ }
1265
+
1266
+ .stuff-viewer-html table {
1267
+ border-collapse: collapse;
1268
+ width: 100%;
1269
+ }
1270
+
1271
+ .stuff-viewer-html th,
1272
+ .stuff-viewer-html td {
1273
+ border: 1px solid var(--sv-border);
1274
+ padding: 8px 12px;
1275
+ text-align: left;
1276
+ }
1277
+
1278
+ .stuff-viewer-html th {
1279
+ background: var(--sv-surface-hover);
1280
+ color: var(--sv-text);
1281
+ font-weight: 600;
1282
+ }
1283
+
1284
+ .stuff-viewer-html tr:hover {
1285
+ background: var(--sv-surface-hover);
1286
+ }
1287
+
1288
+ .stuff-viewer-html a {
1289
+ color: var(--sv-accent);
1290
+ text-decoration: none;
1291
+ }
1292
+
1293
+ .stuff-viewer-html a:hover {
1294
+ text-decoration: underline;
1295
+ }
1296
+
1297
+ .stuff-viewer-html ul {
1298
+ list-style: none;
1299
+ padding-left: 0;
1300
+ margin: 0;
1301
+ }
1302
+
1303
+ /* PDF embed */
1304
+ .stuff-viewer-pdf {
1305
+ min-height: 400px;
1306
+ height: 100%;
1307
+ }
1308
+
1309
+ .stuff-viewer-pdf embed {
1310
+ width: 100%;
1311
+ height: 100%;
1312
+ min-height: 500px;
1313
+ border: none;
1314
+ }
1315
+
1316
+ /* Image content */
1317
+ .stuff-viewer-image {
1318
+ display: flex;
1319
+ justify-content: center;
1320
+ align-items: center;
1321
+ min-height: 200px;
1322
+ }
1323
+
1324
+ .stuff-viewer-image img {
1325
+ max-width: 100%;
1326
+ max-height: 70vh;
1327
+ object-fit: contain;
1328
+ }
1329
+
1330
+ /* Local file fallback (file:// URLs that can't render inline) */
1331
+ .stuff-viewer-local-file {
1332
+ display: flex;
1333
+ align-items: center;
1334
+ gap: 12px;
1335
+ padding: 16px;
1336
+ border-radius: 6px;
1337
+ background: var(--sv-surface);
1338
+ border: 1px solid var(--sv-border);
1339
+ }
1340
+
1341
+ /* Clickable variant — used when an open-externally action is bound (e.g. PDF
1342
+ fallback in hosts that can't render <embed type="application/pdf">). */
1343
+ button.stuff-viewer-local-file--button {
1344
+ width: 100%;
1345
+ text-align: left;
1346
+ font: inherit;
1347
+ color: inherit;
1348
+ cursor: pointer;
1349
+ transition:
1350
+ background 0.15s ease,
1351
+ border-color 0.15s ease;
1352
+ }
1353
+
1354
+ button.stuff-viewer-local-file--button:hover {
1355
+ background: var(--sv-surface-hover, var(--sv-surface));
1356
+ border-color: var(--sv-accent, var(--sv-border));
1357
+ }
1358
+
1359
+ button.stuff-viewer-local-file--button:focus-visible {
1360
+ outline: 2px solid var(--sv-accent, var(--sv-border));
1361
+ outline-offset: 2px;
1362
+ }
1363
+
1364
+ .stuff-viewer-local-file-icon {
1365
+ flex-shrink: 0;
1366
+ width: 32px;
1367
+ height: 32px;
1368
+ color: var(--sv-text-muted);
1369
+ }
1370
+
1371
+ .stuff-viewer-local-file-icon svg {
1372
+ width: 100%;
1373
+ height: 100%;
1374
+ fill: currentColor;
1375
+ }
1376
+
1377
+ .stuff-viewer-local-file-info {
1378
+ flex: 1;
1379
+ min-width: 0;
1380
+ }
1381
+
1382
+ .stuff-viewer-local-file-name {
1383
+ font-family: var(--sv-font-mono);
1384
+ font-size: 12px;
1385
+ color: var(--sv-text);
1386
+ overflow: hidden;
1387
+ text-overflow: ellipsis;
1388
+ white-space: nowrap;
1389
+ }
1390
+
1391
+ .stuff-viewer-local-file-hint {
1392
+ font-size: 11px;
1393
+ color: var(--sv-text-muted);
1394
+ margin-top: 2px;
1395
+ }
1396
+
1397
+ /* Placeholder for missing data */
1398
+ .stuff-viewer-placeholder {
1399
+ color: var(--sv-text-muted);
1400
+ font-style: italic;
1401
+ font-size: 13px;
1402
+ }
1403
+
1404
+ /* ─── Detail Panel — sliding side panel for node inspection ─────────────── */
1405
+
1406
+ .detail-panel {
1407
+ position: absolute;
1408
+ top: 0;
1409
+ right: 0;
1410
+ width: 380px;
1411
+ height: 100%;
1412
+ background: #111118;
1413
+ border-left: 1px solid rgba(255, 255, 255, 0.1);
1414
+ z-index: 10;
1415
+ display: flex;
1416
+ flex-direction: column;
1417
+ font-family: "Inter", -apple-system, sans-serif;
1418
+ color: #e2e8f0;
1419
+ overflow: hidden;
1420
+ transition: transform 0.2s ease;
1421
+ }
1422
+
1423
+ .detail-panel--closed {
1424
+ transform: translateX(100%);
1425
+ pointer-events: none;
1426
+ }
1427
+
1428
+ /* ─── Resize handle — left edge drag target ────────────────────────────── */
1429
+
1430
+ .detail-panel-resize-handle {
1431
+ position: absolute;
1432
+ top: 0;
1433
+ left: -6px;
1434
+ width: 12px;
1435
+ height: 100%;
1436
+ cursor: col-resize;
1437
+ z-index: 2;
1438
+ background: transparent;
1439
+ }
1440
+
1441
+ /* Visible bar — narrower than the hit area */
1442
+ .detail-panel-resize-handle::before {
1443
+ content: "";
1444
+ position: absolute;
1445
+ top: 0;
1446
+ left: 5px;
1447
+ width: 2px;
1448
+ height: 100%;
1449
+ background: transparent;
1450
+ transition: background 0.15s;
1451
+ }
1452
+
1453
+ .detail-panel-resize-handle:hover::before,
1454
+ .detail-panel--dragging .detail-panel-resize-handle::before {
1455
+ background: rgba(59, 130, 246, 0.5);
1456
+ }
1457
+
1458
+ /* Grip indicator — visible on hover */
1459
+ .detail-panel-resize-handle::after {
1460
+ content: "";
1461
+ position: absolute;
1462
+ top: 50%;
1463
+ left: 50%;
1464
+ transform: translate(-50%, -50%);
1465
+ width: 2px;
1466
+ height: 24px;
1467
+ border-radius: 1px;
1468
+ background: transparent;
1469
+ transition: background 0.15s;
1470
+ }
1471
+
1472
+ .detail-panel-resize-handle:hover::after,
1473
+ .detail-panel--dragging .detail-panel-resize-handle::after {
1474
+ background: rgba(59, 130, 246, 0.8);
1475
+ }
1476
+
1477
+ /* Disable transition during drag for smooth resizing */
1478
+ .detail-panel--dragging {
1479
+ transition: none;
1480
+ }
1481
+
1482
+ .detail-panel--dragging .detail-panel-content {
1483
+ pointer-events: none;
1484
+ }
1485
+
1486
+ .detail-panel-close {
1487
+ all: unset;
1488
+ cursor: pointer;
1489
+ position: absolute;
1490
+ top: 12px;
1491
+ right: 12px;
1492
+ width: 24px;
1493
+ height: 24px;
1494
+ display: flex;
1495
+ align-items: center;
1496
+ justify-content: center;
1497
+ border-radius: 4px;
1498
+ color: #64748b;
1499
+ font-size: 18px;
1500
+ line-height: 1;
1501
+ z-index: 3;
1502
+ }
1503
+
1504
+ .detail-panel-close:hover {
1505
+ color: #94a3b8;
1506
+ background: rgba(255, 255, 255, 0.06);
1507
+ }
1508
+
1509
+ .detail-panel-content {
1510
+ flex: 1;
1511
+ overflow-y: auto;
1512
+ padding: 20px 16px;
1513
+ display: flex;
1514
+ flex-direction: column;
1515
+ gap: 16px;
1516
+ }
1517
+
1518
+ /* ─── Sticky header (pipe info + IO stays pinned at top) ───────────────── */
1519
+
1520
+ .detail-sticky-header {
1521
+ position: sticky;
1522
+ top: -20px;
1523
+ z-index: 1;
1524
+ background: #111118;
1525
+ padding-top: 20px;
1526
+ margin-top: -20px;
1527
+ display: flex;
1528
+ flex-direction: column;
1529
+ gap: 16px;
1530
+ }
1531
+
1532
+ /* ─── Shared detail components ──────────────────────────────────────────── */
1533
+
1534
+ .detail-section-label {
1535
+ font-size: 9px;
1536
+ font-weight: 700;
1537
+ text-transform: uppercase;
1538
+ letter-spacing: 0.06em;
1539
+ color: #64748b;
1540
+ margin-bottom: 6px;
1541
+ }
1542
+
1543
+ .detail-header {
1544
+ display: flex;
1545
+ align-items: center;
1546
+ gap: 8px;
1547
+ }
1548
+
1549
+ .detail-badge {
1550
+ font-size: 10px;
1551
+ font-weight: 700;
1552
+ text-transform: uppercase;
1553
+ letter-spacing: 0.04em;
1554
+ padding: 2px 7px;
1555
+ border-radius: 4px;
1556
+ white-space: nowrap;
1557
+ }
1558
+
1559
+ .detail-badge--operator {
1560
+ background: #ff6b6b;
1561
+ color: #0e0e0e;
1562
+ }
1563
+
1564
+ .detail-badge--controller {
1565
+ background: #bd93f9;
1566
+ color: #0e0e0e;
1567
+ }
1568
+
1569
+ .detail-pipe-code {
1570
+ font-family: "JetBrains Mono", "Monaco", monospace;
1571
+ font-size: 14px;
1572
+ font-weight: 600;
1573
+ color: #ff6b6b;
1574
+ }
1575
+
1576
+ .detail-pipe-code--controller {
1577
+ color: #bd93f9;
1578
+ }
1579
+
1580
+ .detail-status {
1581
+ display: flex;
1582
+ align-items: center;
1583
+ gap: 8px;
1584
+ }
1585
+
1586
+ .detail-status-dot {
1587
+ width: 8px;
1588
+ height: 8px;
1589
+ border-radius: 50%;
1590
+ display: inline-block;
1591
+ }
1592
+
1593
+ .detail-status-label {
1594
+ font-size: 12px;
1595
+ font-weight: 600;
1596
+ text-transform: capitalize;
1597
+ }
1598
+
1599
+ .detail-duration {
1600
+ font-size: 11px;
1601
+ color: #64748b;
1602
+ font-family: "JetBrains Mono", "Monaco", monospace;
1603
+ }
1604
+
1605
+ .detail-description {
1606
+ font-size: 12px;
1607
+ color: #94a3b8;
1608
+ line-height: 1.5;
1609
+ }
1610
+
1611
+ /* ─── IO Pills ──────────────────────────────────────────────────────────── */
1612
+
1613
+ .detail-io-pill {
1614
+ display: flex;
1615
+ align-items: center;
1616
+ gap: 6px;
1617
+ font-size: 11px;
1618
+ padding: 3px 8px;
1619
+ border-radius: 4px;
1620
+ background: rgba(255, 255, 255, 0.04);
1621
+ border: 1px solid rgba(255, 255, 255, 0.06);
1622
+ }
1623
+
1624
+ .detail-io-name {
1625
+ font-family: "JetBrains Mono", "Monaco", monospace;
1626
+ color: #e2e8f0;
1627
+ }
1628
+
1629
+ .detail-io-concept {
1630
+ color: #64748b;
1631
+ font-size: 10px;
1632
+ }
1633
+
1634
+ .detail-io-list {
1635
+ display: flex;
1636
+ flex-direction: column;
1637
+ gap: 4px;
1638
+ }
1639
+
1640
+ /* ─── Blueprint-specific sections ───────────────────────────────────────── */
1641
+
1642
+ .detail-prompt-block {
1643
+ font-family: "JetBrains Mono", "Monaco", monospace;
1644
+ font-size: 11px;
1645
+ color: #94a3b8;
1646
+ background: rgba(255, 255, 255, 0.03);
1647
+ border: 1px solid rgba(255, 255, 255, 0.06);
1648
+ border-radius: 6px;
1649
+ padding: 10px 12px;
1650
+ white-space: pre-wrap;
1651
+ word-break: break-word;
1652
+ overflow-y: auto;
1653
+ line-height: 1.5;
1654
+ }
1655
+
1656
+ .detail-prompt-block--collapsed {
1657
+ max-height: 300px;
1658
+ }
1659
+
1660
+ .detail-prompt-block--expanded {
1661
+ max-height: none;
1662
+ overflow-y: visible;
1663
+ }
1664
+
1665
+ .detail-prompt-expand-btn {
1666
+ all: unset;
1667
+ cursor: pointer;
1668
+ display: flex;
1669
+ align-items: center;
1670
+ gap: 4px;
1671
+ font-size: 9px;
1672
+ color: #64748b;
1673
+ padding: 2px 6px;
1674
+ border-radius: 3px;
1675
+ background: rgba(255, 255, 255, 0.04);
1676
+ border: 1px solid rgba(255, 255, 255, 0.06);
1677
+ transition: color 0.15s;
1678
+ }
1679
+
1680
+ .detail-prompt-expand-btn:hover {
1681
+ color: #94a3b8;
1682
+ }
1683
+
1684
+ .detail-kv-row {
1685
+ display: flex;
1686
+ justify-content: space-between;
1687
+ align-items: flex-start; /* top-align so the label stays next to the first line of a wrapped value */
1688
+ gap: 12px;
1689
+ font-size: 11px;
1690
+ padding: 3px 0;
1691
+ }
1692
+
1693
+ .detail-kv-key {
1694
+ color: #64748b;
1695
+ flex-shrink: 0; /* label stays at its natural width */
1696
+ }
1697
+
1698
+ .detail-kv-value {
1699
+ font-family: "JetBrains Mono", "Monaco", monospace;
1700
+ color: #e2e8f0;
1701
+ flex: 1 1 0;
1702
+ min-width: 0;
1703
+ text-align: right;
1704
+ word-break: break-word;
1705
+ overflow-wrap: anywhere;
1706
+ }
1707
+
1708
+ /* ─── Field block: labeled multi-line text (for long resolved values) ─── */
1709
+
1710
+ .detail-field-block {
1711
+ display: flex;
1712
+ flex-direction: column;
1713
+ gap: 4px;
1714
+ }
1715
+
1716
+ .detail-field-block-label {
1717
+ font-family: "JetBrains Mono", "Monaco", monospace;
1718
+ font-size: 10px;
1719
+ color: #64748b;
1720
+ }
1721
+
1722
+ .detail-field-block-value {
1723
+ font-family: "JetBrains Mono", "Monaco", monospace;
1724
+ font-size: 11px;
1725
+ color: #e2e8f0;
1726
+ background: rgba(255, 255, 255, 0.03);
1727
+ border: 1px solid rgba(255, 255, 255, 0.06);
1728
+ border-radius: 6px;
1729
+ padding: 8px 10px;
1730
+ white-space: pre-wrap;
1731
+ word-break: break-word;
1732
+ overflow-wrap: anywhere;
1733
+ line-height: 1.5;
1734
+ max-height: 240px;
1735
+ overflow-y: auto;
1736
+ }
1737
+
1738
+ /* ─── Nested construct sub-section header ───────────────────────────────── */
1739
+ /* Rendered before each nested sub-construct's recursive contents. The left
1740
+ * border + indent provides a visual "branch" cue so the tree structure is
1741
+ * obvious without needing collapse state. */
1742
+
1743
+ .detail-nested-header {
1744
+ display: flex;
1745
+ align-items: baseline;
1746
+ justify-content: space-between;
1747
+ gap: 8px;
1748
+ margin-top: 6px;
1749
+ margin-bottom: 4px;
1750
+ padding: 4px 0 4px 8px;
1751
+ border-left: 2px solid rgba(80, 250, 123, 0.35);
1752
+ }
1753
+
1754
+ .detail-nested-header-name {
1755
+ font-family: "JetBrains Mono", "Monaco", monospace;
1756
+ font-size: 11px;
1757
+ font-weight: 600;
1758
+ color: #e2e8f0;
1759
+ }
1760
+
1761
+ .detail-nested-header-meta {
1762
+ font-family: "JetBrains Mono", "Monaco", monospace;
1763
+ font-size: 9px;
1764
+ color: #64748b;
1765
+ text-transform: uppercase;
1766
+ letter-spacing: 0.04em;
1767
+ }
1768
+
1769
+ /* ─── Concept schema table ──────────────────────────────────────────────── */
1770
+
1771
+ .detail-schema-table {
1772
+ width: 100%;
1773
+ font-size: 11px;
1774
+ border-collapse: collapse;
1775
+ }
1776
+
1777
+ .detail-schema-table th {
1778
+ text-align: left;
1779
+ font-weight: 700;
1780
+ color: #64748b;
1781
+ font-size: 9px;
1782
+ text-transform: uppercase;
1783
+ letter-spacing: 0.06em;
1784
+ padding: 4px 6px;
1785
+ border-bottom: 1px solid rgba(255, 255, 255, 0.08);
1786
+ }
1787
+
1788
+ .detail-schema-table td {
1789
+ padding: 4px 6px;
1790
+ border-bottom: 1px solid rgba(255, 255, 255, 0.04);
1791
+ color: #94a3b8;
1792
+ }
1793
+
1794
+ .detail-schema-field {
1795
+ font-family: "JetBrains Mono", "Monaco", monospace;
1796
+ color: #e2e8f0;
1797
+ }
1798
+
1799
+ .detail-schema-type {
1800
+ color: #8be9fd;
1801
+ }
1802
+
1803
+ .detail-schema-required {
1804
+ color: #ff6b6b;
1805
+ font-size: 9px;
1806
+ }
1807
+
1808
+ /* ─── Error section ─────────────────────────────────────────────────────── */
1809
+
1810
+ .detail-error {
1811
+ background: rgba(255, 85, 85, 0.08);
1812
+ border: 1px solid rgba(255, 85, 85, 0.2);
1813
+ border-radius: 6px;
1814
+ padding: 10px 12px;
1815
+ }
1816
+
1817
+ .detail-error-type {
1818
+ font-size: 12px;
1819
+ font-weight: 600;
1820
+ color: #ff5555;
1821
+ margin-bottom: 4px;
1822
+ }
1823
+
1824
+ .detail-error-message {
1825
+ font-size: 11px;
1826
+ color: #94a3b8;
1827
+ line-height: 1.5;
1828
+ }
1829
+
1830
+ .detail-error-stack {
1831
+ font-family: "JetBrains Mono", "Monaco", monospace;
1832
+ font-size: 10px;
1833
+ color: #64748b;
1834
+ margin-top: 8px;
1835
+ max-height: 150px;
1836
+ overflow-y: auto;
1837
+ white-space: pre-wrap;
1838
+ word-break: break-word;
1839
+ }
1840
+
1841
+ /* ─── Steps list (PipeSequence, PipeCondition outcomes) ─────────────────── */
1842
+
1843
+ .detail-steps-list {
1844
+ display: flex;
1845
+ flex-direction: column;
1846
+ gap: 4px;
1847
+ }
1848
+
1849
+ .detail-step-item {
1850
+ display: flex;
1851
+ align-items: center;
1852
+ gap: 8px;
1853
+ font-size: 11px;
1854
+ padding: 4px 8px;
1855
+ border-radius: 4px;
1856
+ background: rgba(255, 255, 255, 0.03);
1857
+ border: 1px solid rgba(255, 255, 255, 0.06);
1858
+ }
1859
+
1860
+ .detail-step-index {
1861
+ color: #64748b;
1862
+ font-size: 10px;
1863
+ font-weight: 700;
1864
+ min-width: 16px;
1865
+ }
1866
+
1867
+ .detail-step-code {
1868
+ font-family: "JetBrains Mono", "Monaco", monospace;
1869
+ color: #e2e8f0;
1870
+ }
1871
+
1872
+ /* ─── Tags/Metrics ──────────────────────────────────────────────────────── */
1873
+
1874
+ .detail-tags {
1875
+ display: flex;
1876
+ flex-wrap: wrap;
1877
+ gap: 4px;
1878
+ }
1879
+
1880
+ .detail-tag {
1881
+ font-size: 10px;
1882
+ padding: 2px 6px;
1883
+ border-radius: 3px;
1884
+ background: rgba(255, 255, 255, 0.04);
1885
+ border: 1px solid rgba(255, 255, 255, 0.06);
1886
+ }
1887
+
1888
+ .detail-tag-key {
1889
+ color: #64748b;
1890
+ }
1891
+
1892
+ .detail-tag-value {
1893
+ color: #e2e8f0;
1894
+ font-family: "JetBrains Mono", "Monaco", monospace;
1895
+ }
1896
+
1897
+ /* ─── Concept panel header ──────────────────────────────────────────────── */
1898
+
1899
+ .detail-concept-code {
1900
+ font-family: "JetBrains Mono", "Monaco", monospace;
1901
+ font-size: 14px;
1902
+ font-weight: 600;
1903
+ color: #50fa7b;
1904
+ }
1905
+
1906
+ .detail-concept-domain {
1907
+ font-size: 11px;
1908
+ color: #64748b;
1909
+ }
1910
+
1911
+ .detail-refines {
1912
+ font-size: 11px;
1913
+ color: #94a3b8;
1914
+ }
1915
+
1916
+ .detail-refines-code {
1917
+ font-family: "JetBrains Mono", "Monaco", monospace;
1918
+ color: #8be9fd;
1919
+ }
1920
+
1921
+ /* ─── Not available fallback ────────────────────────────────────────────── */
1922
+
1923
+ .detail-not-available {
1924
+ font-size: 12px;
1925
+ color: #64748b;
1926
+ font-style: italic;
1927
+ padding: 8px 0;
1928
+ }
1929
+
1930
+ /* ─── Graph Toolbar — floating controls over the graph background ─────── */
1931
+
1932
+ .graph-toolbar {
1933
+ position: absolute;
1934
+ top: 8px;
1935
+ display: flex;
1936
+ align-items: center;
1937
+ gap: 4px;
1938
+ z-index: 11;
1939
+ pointer-events: auto;
1940
+ }
1941
+
1942
+ .graph-toolbar-btn {
1943
+ all: unset;
1944
+ box-sizing: border-box;
1945
+ cursor: pointer;
1946
+ width: 28px;
1947
+ height: 28px;
1948
+ display: inline-flex;
1949
+ align-items: center;
1950
+ justify-content: center;
1951
+ border-radius: 6px;
1952
+ background: rgba(17, 17, 24, 0.8);
1953
+ border: 1px solid rgba(255, 255, 255, 0.1);
1954
+ color: #cbd5e1;
1955
+ backdrop-filter: blur(6px);
1956
+ transition:
1957
+ background 0.15s,
1958
+ color 0.15s,
1959
+ border-color 0.15s;
1960
+ }
1961
+
1962
+ .graph-toolbar-btn:hover {
1963
+ background: rgba(30, 30, 40, 0.9);
1964
+ color: #f1f5f9;
1965
+ border-color: rgba(255, 255, 255, 0.18);
1966
+ }
1967
+
1968
+ .graph-toolbar-btn:focus-visible {
1969
+ outline: 2px solid rgba(59, 130, 246, 0.6);
1970
+ outline-offset: 1px;
1971
+ }
1972
+
1973
+ .graph-toolbar-btn--active {
1974
+ background: #3b82f6;
1975
+ border-color: #3b82f6;
1976
+ color: #ffffff;
1977
+ }
1978
+
1979
+ .graph-toolbar-btn--active:hover {
1980
+ background: #2563eb;
1981
+ border-color: #2563eb;
1982
+ color: #ffffff;
1983
+ }
1984
+
1985
+ .graph-toolbar-btn:disabled {
1986
+ opacity: 0.4;
1987
+ cursor: not-allowed;
1988
+ background: rgba(17, 17, 24, 0.6);
1989
+ color: #64748b;
1990
+ border-color: rgba(255, 255, 255, 0.06);
1991
+ }
1992
+
1993
+ .graph-toolbar-btn:disabled:hover {
1994
+ background: rgba(17, 17, 24, 0.6);
1995
+ color: #64748b;
1996
+ border-color: rgba(255, 255, 255, 0.06);
1997
+ }
1998
+
1999
+ .graph-toolbar-separator {
2000
+ width: 1px;
2001
+ height: 18px;
2002
+ background: rgba(255, 255, 255, 0.12);
2003
+ margin: 0 2px;
2004
+ }
2005
+
2006
+ /* ─── Standalone GraphViewer chrome (toolbar, theme, layout) ─────────── */
2007
+
2008
+ * { box-sizing: border-box; margin: 0; padding: 0; }
2009
+
2010
+ html, body {
2011
+ height: 100%;
2012
+ overflow: hidden;
2013
+ font-family: "Inter", -apple-system, sans-serif;
2014
+ }
2015
+
2016
+ /* ─── Theme system ──────────────────────────────────────────────────── */
2017
+
2018
+ body[data-theme="dark"], body:not([data-theme]) {
2019
+ --chrome-bg: #0d1117;
2020
+ --chrome-surface: #161b22;
2021
+ --chrome-border: rgba(255,255,255,0.08);
2022
+ --chrome-text: #e2e8f0;
2023
+ --chrome-text-muted: #8b949e;
2024
+ background: #0a0a0f;
2025
+ color: #e2e8f0;
2026
+ }
2027
+
2028
+ body[data-theme="light"] {
2029
+ --chrome-bg: #ffffff;
2030
+ --chrome-surface: #f6f8fa;
2031
+ --chrome-border: rgba(0,0,0,0.1);
2032
+ --chrome-text: #1f2328;
2033
+ --chrome-text-muted: #656d76;
2034
+ background: #ffffff;
2035
+ color: #1f2328;
2036
+ }
2037
+
2038
+ @media (prefers-color-scheme: light) {
2039
+ body[data-theme="system"] {
2040
+ --chrome-bg: #ffffff;
2041
+ --chrome-surface: #f6f8fa;
2042
+ --chrome-border: rgba(0,0,0,0.1);
2043
+ --chrome-text: #1f2328;
2044
+ --chrome-text-muted: #656d76;
2045
+ background: #ffffff;
2046
+ color: #1f2328;
2047
+ }
2048
+ }
2049
+
2050
+ @media (prefers-color-scheme: dark) {
2051
+ body[data-theme="system"] {
2052
+ --chrome-bg: #0d1117;
2053
+ --chrome-surface: #161b22;
2054
+ --chrome-border: rgba(255,255,255,0.08);
2055
+ --chrome-text: #e2e8f0;
2056
+ --chrome-text-muted: #8b949e;
2057
+ background: #0a0a0f;
2058
+ color: #e2e8f0;
2059
+ }
2060
+ }
2061
+
2062
+ /* ─── Layout ────────────────────────────────────────────────────────── */
2063
+
2064
+ #app-container {
2065
+ display: flex;
2066
+ flex-direction: column;
2067
+ height: 100vh;
2068
+ }
2069
+
2070
+ #root {
2071
+ flex: 1;
2072
+ position: relative;
2073
+ min-height: 0;
2074
+ }
2075
+
2076
+ /* ─── Toolbar ───────────────────────────────────────────────────────── */
2077
+
2078
+ .toolbar {
2079
+ display: flex;
2080
+ align-items: center;
2081
+ gap: 8px;
2082
+ padding: 6px 12px;
2083
+ background: var(--chrome-surface);
2084
+ border-bottom: 1px solid var(--chrome-border);
2085
+ flex-shrink: 0;
2086
+ z-index: 20;
2087
+ }
2088
+
2089
+ .toolbar-spacer { flex: 1; }
2090
+
2091
+ .toolbar-btn {
2092
+ all: unset;
2093
+ cursor: pointer;
2094
+ display: flex;
2095
+ align-items: center;
2096
+ justify-content: center;
2097
+ width: 28px;
2098
+ height: 28px;
2099
+ border-radius: 4px;
2100
+ color: var(--chrome-text-muted);
2101
+ transition: background 0.15s, color 0.15s;
2102
+ }
2103
+
2104
+ .toolbar-btn:hover {
2105
+ background: var(--chrome-border);
2106
+ color: var(--chrome-text);
2107
+ }
2108
+
2109
+ .toolbar-zoom {
2110
+ display: flex;
2111
+ gap: 2px;
2112
+ }
2113
+
2114
+ /* Direction toggle */
2115
+ .direction-icon { display: none; }
2116
+ .direction-icon.active { display: inline-flex; }
2117
+
2118
+ /* Controllers toggle */
2119
+ .toggle-switch {
2120
+ display: flex;
2121
+ align-items: center;
2122
+ gap: 6px;
2123
+ cursor: pointer;
2124
+ font-size: 11px;
2125
+ color: var(--chrome-text-muted);
2126
+ user-select: none;
2127
+ }
2128
+
2129
+ .toggle-switch input { display: none; }
2130
+
2131
+ .toggle-track {
2132
+ width: 28px;
2133
+ height: 16px;
2134
+ border-radius: 8px;
2135
+ background: var(--chrome-border);
2136
+ position: relative;
2137
+ transition: background 0.15s;
2138
+ }
2139
+
2140
+ .toggle-switch input:checked + .toggle-track {
2141
+ background: #50FA7B44;
2142
+ }
2143
+
2144
+ .toggle-knob {
2145
+ position: absolute;
2146
+ top: 2px;
2147
+ left: 2px;
2148
+ width: 12px;
2149
+ height: 12px;
2150
+ border-radius: 50%;
2151
+ background: var(--chrome-text-muted);
2152
+ transition: left 0.15s, background 0.15s;
2153
+ }
2154
+
2155
+ .toggle-switch input:checked + .toggle-track .toggle-knob {
2156
+ left: 14px;
2157
+ background: #50FA7B;
2158
+ }
2159
+
2160
+ .toggle-label {
2161
+ font-size: 11px;
2162
+ }
2163
+
2164
+ /* Theme toggle */
2165
+ .theme-btn {
2166
+ all: unset;
2167
+ cursor: pointer;
2168
+ display: flex;
2169
+ align-items: center;
2170
+ gap: 4px;
2171
+ font-size: 10px;
2172
+ color: var(--chrome-text-muted);
2173
+ padding: 4px 8px;
2174
+ border-radius: 4px;
2175
+ transition: background 0.15s;
2176
+ }
2177
+
2178
+ .theme-btn:hover {
2179
+ background: var(--chrome-border);
2180
+ }
2181
+
2182
+ .theme-label {
2183
+ text-transform: capitalize;
2184
+ }
2185
+
2186
+ /* ─── Header branding ───────────────────────────────────────────────── */
2187
+
2188
+ .header-brand {
2189
+ display: flex;
2190
+ align-items: center;
2191
+ gap: 8px;
2192
+ }
2193
+
2194
+ .header-logo {
2195
+ height: 18px;
2196
+ opacity: 0.7;
2197
+ }
2198
+
2199
+ body[data-theme="dark"] .header-logo.light-logo,
2200
+ body:not([data-theme]) .header-logo.light-logo {
2201
+ display: none;
2202
+ }
2203
+
2204
+ body[data-theme="light"] .header-logo.dark-logo {
2205
+ display: none;
2206
+ }
2207
+
2208
+ body[data-theme="light"] .header-logo.light-logo {
2209
+ display: inline;
2210
+ }
2211
+
2212
+ @media (prefers-color-scheme: light) {
2213
+ body[data-theme="system"] .header-logo.dark-logo {
2214
+ display: none;
2215
+ }
2216
+ body[data-theme="system"] .header-logo.light-logo {
2217
+ display: inline;
2218
+ }
2219
+ }
2220
+
2221
+ @media (prefers-color-scheme: dark) {
2222
+ body[data-theme="system"] .header-logo.light-logo {
2223
+ display: none;
2224
+ }
2225
+ }
2226
+
2227
+ .header-title {
2228
+ font-size: 12px;
2229
+ font-weight: 600;
2230
+ color: var(--chrome-text-muted);
2231
+ }
2232
+
2233
+ </style>
2234
+ </head>
2235
+ <body data-theme="<!--PIPELEX_THEME-->">
2236
+ <div id="app-container">
2237
+ <div class="toolbar">
2238
+ <div class="header-brand">
2239
+ <img src="<!--PIPELEX_LOGO_DARK-->" alt="Pipelex" class="header-logo dark-logo">
2240
+ <img src="<!--PIPELEX_LOGO_LIGHT-->" alt="Pipelex" class="header-logo light-logo">
2241
+ <span class="header-title"><!--PIPELEX_TITLE--></span>
2242
+ </div>
2243
+ <div class="toolbar-spacer"></div>
2244
+ <button id="theme-toggle" class="theme-btn" title="Toggle theme">
2245
+ <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>
2246
+ <span class="theme-label"><!--PIPELEX_THEME--></span>
2247
+ </button>
2248
+ </div>
2249
+ <div id="root"></div>
2250
+ </div>
2251
+
2252
+ <script type="application/json" id="pipelex-graphspec"><!--PIPELEX_GRAPHSPEC--></script>
2253
+ <script type="application/json" id="pipelex-config"><!--PIPELEX_CONFIG--></script>
2254
+
2255
+ <script nonce="PIPELEX_CSP_NONCE">
2256
+ "use strict";(()=>{var vN=Object.create;var cg=Object.defineProperty;var bN=Object.getOwnPropertyDescriptor;var SN=Object.getOwnPropertyNames;var xN=Object.getPrototypeOf,_N=Object.prototype.hasOwnProperty;var Ft=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var EN=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of SN(t))!_N.call(e,i)&&i!==n&&cg(e,i,{get:()=>t[i],enumerable:!(o=bN(t,i))||o.enumerable});return e};var ae=(e,t,n)=>(n=e!=null?vN(xN(e)):{},EN(t||!e||!e.__esModule?cg(n,"default",{value:e,enumerable:!0}):n,e));var xg=Ft(pe=>{"use strict";var Gf=Symbol.for("react.transitional.element"),NN=Symbol.for("react.portal"),CN=Symbol.for("react.fragment"),TN=Symbol.for("react.strict_mode"),wN=Symbol.for("react.profiler"),AN=Symbol.for("react.consumer"),DN=Symbol.for("react.context"),MN=Symbol.for("react.forward_ref"),RN=Symbol.for("react.suspense"),ON=Symbol.for("react.memo"),hg=Symbol.for("react.lazy"),zN=Symbol.for("react.activity"),fg=Symbol.iterator;function LN(e){return e===null||typeof e!="object"?null:(e=fg&&e[fg]||e["@@iterator"],typeof e=="function"?e:null)}var gg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yg=Object.assign,vg={};function Sa(e,t,n){this.props=e,this.context=t,this.refs=vg,this.updater=n||gg}Sa.prototype.isReactComponent={};Sa.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Sa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function bg(){}bg.prototype=Sa.prototype;function Uf(e,t,n){this.props=e,this.context=t,this.refs=vg,this.updater=n||gg}var Pf=Uf.prototype=new bg;Pf.constructor=Uf;yg(Pf,Sa.prototype);Pf.isPureReactComponent=!0;var dg=Array.isArray;function kf(){}var Pe={H:null,A:null,T:null,S:null},Sg=Object.prototype.hasOwnProperty;function If(e,t,n){var o=n.ref;return{$$typeof:Gf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function BN(e,t){return If(e.type,t,e.props)}function Vf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gf}function HN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pg=/\/+/g;function Hf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?HN(""+e.key):t.toString(36)}function kN(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(kf,kf):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function ba(e,t,n,o,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(a){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Gf:case NN:l=!0;break;case hg:return l=e._init,ba(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+Hf(e,0):o,dg(i)?(n="",l!=null&&(n=l.replace(pg,"$&/")+"/"),ba(i,t,n,"",function(u){return u})):i!=null&&(Vf(i)&&(i=BN(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(pg,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(dg(e))for(var s=0;s<e.length;s++)o=e[s],a=r+Hf(o,s),l+=ba(o,t,n,a,i);else if(s=LN(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+Hf(o,s++),l+=ba(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return ba(kN(e),t,n,o,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function Vs(e,t,n){if(e==null)return e;var o=[],i=0;return ba(e,o,"","",function(a){return t.call(n,a,i++)}),o}function GN(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var mg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},UN={map:Vs,forEach:function(e,t,n){Vs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Vs(e,function(){t++}),t},toArray:function(e){return Vs(e,function(t){return t})||[]},only:function(e){if(!Vf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Activity=zN;pe.Children=UN;pe.Component=Sa;pe.Fragment=CN;pe.Profiler=wN;pe.PureComponent=Uf;pe.StrictMode=TN;pe.Suspense=RN;pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Pe;pe.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Pe.H.useMemoCache(e)}};pe.cache=function(e){return function(){return e.apply(null,arguments)}};pe.cacheSignal=function(){return null};pe.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=yg({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Sg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(o[a]=t[a]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),r=0;r<a;r++)l[r]=arguments[r+2];o.children=l}return If(e.type,i,o)};pe.createContext=function(e){return e={$$typeof:DN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:AN,_context:e},e};pe.createElement=function(e,t,n){var o,i={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)Sg.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(i[o]=t[o]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var r=Array(l),s=0;s<l;s++)r[s]=arguments[s+2];i.children=r}if(e&&e.defaultProps)for(o in l=e.defaultProps,l)i[o]===void 0&&(i[o]=l[o]);return If(e,a,i)};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:MN,render:e}};pe.isValidElement=Vf;pe.lazy=function(e){return{$$typeof:hg,_payload:{_status:-1,_result:e},_init:GN}};pe.memo=function(e,t){return{$$typeof:ON,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=Pe.T,n={};Pe.T=n;try{var o=e(),i=Pe.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(kf,mg)}catch(a){mg(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Pe.T=t}};pe.unstable_useCacheRefresh=function(){return Pe.H.useCacheRefresh()};pe.use=function(e){return Pe.H.use(e)};pe.useActionState=function(e,t,n){return Pe.H.useActionState(e,t,n)};pe.useCallback=function(e,t){return Pe.H.useCallback(e,t)};pe.useContext=function(e){return Pe.H.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e,t){return Pe.H.useDeferredValue(e,t)};pe.useEffect=function(e,t){return Pe.H.useEffect(e,t)};pe.useEffectEvent=function(e){return Pe.H.useEffectEvent(e)};pe.useId=function(){return Pe.H.useId()};pe.useImperativeHandle=function(e,t,n){return Pe.H.useImperativeHandle(e,t,n)};pe.useInsertionEffect=function(e,t){return Pe.H.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Pe.H.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Pe.H.useMemo(e,t)};pe.useOptimistic=function(e,t){return Pe.H.useOptimistic(e,t)};pe.useReducer=function(e,t,n){return Pe.H.useReducer(e,t,n)};pe.useRef=function(e){return Pe.H.useRef(e)};pe.useState=function(e){return Pe.H.useState(e)};pe.useSyncExternalStore=function(e,t,n){return Pe.H.useSyncExternalStore(e,t,n)};pe.useTransition=function(){return Pe.H.useTransition()};pe.version="19.2.4"});var kt=Ft((Hz,_g)=>{"use strict";_g.exports=xg()});var Og=Ft(qe=>{"use strict";function Zf(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<Ys(i,t))e[o]=t,e[n]=i,n=o;else break e}}function to(e){return e.length===0?null:e[0]}function qs(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var o=0,i=e.length,a=i>>>1;o<a;){var l=2*(o+1)-1,r=e[l],s=l+1,u=e[s];if(0>Ys(r,n))s<i&&0>Ys(u,r)?(e[o]=u,e[s]=n,o=s):(e[o]=r,e[l]=n,o=l);else if(s<i&&0>Ys(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function Ys(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}qe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Eg=performance,qe.unstable_now=function(){return Eg.now()}):(Yf=Date,Ng=Yf.now(),qe.unstable_now=function(){return Yf.now()-Ng});var Eg,Yf,Ng,bo=[],Ko=[],PN=1,Tn=null,Rt=3,jf=!1,Ql=!1,Fl=!1,Qf=!1,wg=typeof setTimeout=="function"?setTimeout:null,Ag=typeof clearTimeout=="function"?clearTimeout:null,Cg=typeof setImmediate<"u"?setImmediate:null;function Xs(e){for(var t=to(Ko);t!==null;){if(t.callback===null)qs(Ko);else if(t.startTime<=e)qs(Ko),t.sortIndex=t.expirationTime,Zf(bo,t);else break;t=to(Ko)}}function Ff(e){if(Fl=!1,Xs(e),!Ql)if(to(bo)!==null)Ql=!0,_a||(_a=!0,xa());else{var t=to(Ko);t!==null&&Kf(Ff,t.startTime-e)}}var _a=!1,Kl=-1,Dg=5,Mg=-1;function Rg(){return Qf?!0:!(qe.unstable_now()-Mg<Dg)}function Xf(){if(Qf=!1,_a){var e=qe.unstable_now();Mg=e;var t=!0;try{e:{Ql=!1,Fl&&(Fl=!1,Ag(Kl),Kl=-1),jf=!0;var n=Rt;try{t:{for(Xs(e),Tn=to(bo);Tn!==null&&!(Tn.expirationTime>e&&Rg());){var o=Tn.callback;if(typeof o=="function"){Tn.callback=null,Rt=Tn.priorityLevel;var i=o(Tn.expirationTime<=e);if(e=qe.unstable_now(),typeof i=="function"){Tn.callback=i,Xs(e),t=!0;break t}Tn===to(bo)&&qs(bo),Xs(e)}else qs(bo);Tn=to(bo)}if(Tn!==null)t=!0;else{var a=to(Ko);a!==null&&Kf(Ff,a.startTime-e),t=!1}}break e}finally{Tn=null,Rt=n,jf=!1}t=void 0}}finally{t?xa():_a=!1}}}var xa;typeof Cg=="function"?xa=function(){Cg(Xf)}:typeof MessageChannel<"u"?(qf=new MessageChannel,Tg=qf.port2,qf.port1.onmessage=Xf,xa=function(){Tg.postMessage(null)}):xa=function(){wg(Xf,0)};var qf,Tg;function Kf(e,t){Kl=wg(function(){e(qe.unstable_now())},t)}qe.unstable_IdlePriority=5;qe.unstable_ImmediatePriority=1;qe.unstable_LowPriority=4;qe.unstable_NormalPriority=3;qe.unstable_Profiling=null;qe.unstable_UserBlockingPriority=2;qe.unstable_cancelCallback=function(e){e.callback=null};qe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Dg=0<e?Math.floor(1e3/e):5};qe.unstable_getCurrentPriorityLevel=function(){return Rt};qe.unstable_next=function(e){switch(Rt){case 1:case 2:case 3:var t=3;break;default:t=Rt}var n=Rt;Rt=t;try{return e()}finally{Rt=n}};qe.unstable_requestPaint=function(){Qf=!0};qe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Rt;Rt=e;try{return t()}finally{Rt=n}};qe.unstable_scheduleCallback=function(e,t,n){var o=qe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?o+n:o):n=o,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:PN++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,Zf(Ko,e),to(bo)===null&&e===to(Ko)&&(Fl?(Ag(Kl),Kl=-1):Fl=!0,Kf(Ff,n-o))):(e.sortIndex=i,Zf(bo,e),Ql||jf||(Ql=!0,_a||(_a=!0,xa()))),e};qe.unstable_shouldYield=Rg;qe.unstable_wrapCallback=function(e){var t=Rt;return function(){var n=Rt;Rt=t;try{return e.apply(this,arguments)}finally{Rt=n}}}});var Lg=Ft((Gz,zg)=>{"use strict";zg.exports=Og()});var Hg=Ft(Ut=>{"use strict";var IN=kt();function Bg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function $o(){}var Gt={d:{f:$o,r:function(){throw Error(Bg(522))},D:$o,C:$o,L:$o,m:$o,X:$o,S:$o,M:$o},p:0,findDOMNode:null},VN=Symbol.for("react.portal");function YN(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:VN,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var $l=IN.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Zs(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gt;Ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Bg(299));return YN(e,t,null,n)};Ut.flushSync=function(e){var t=$l.T,n=Gt.p;try{if($l.T=null,Gt.p=2,e)return e()}finally{$l.T=t,Gt.p=n,Gt.d.f()}};Ut.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gt.d.C(e,t))};Ut.prefetchDNS=function(e){typeof e=="string"&&Gt.d.D(e)};Ut.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=Zs(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Gt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&Gt.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ut.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Zs(t.as,t.crossOrigin);Gt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gt.d.M(e)};Ut.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=Zs(n,t.crossOrigin);Gt.d.L(e,n,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Ut.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Zs(t.as,t.crossOrigin);Gt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gt.d.m(e)};Ut.requestFormReset=function(e){Gt.d.r(e)};Ut.unstable_batchedUpdates=function(e,t){return e(t)};Ut.useFormState=function(e,t,n){return $l.H.useFormState(e,t,n)};Ut.useFormStatus=function(){return $l.H.useHostTransitionStatus()};Ut.version="19.2.4"});var $f=Ft((Pz,Gg)=>{"use strict";function kg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kg)}catch(e){console.error(e)}}kg(),Gg.exports=Hg()});var Kb=Ft(yc=>{"use strict";var mt=Lg(),c0=kt(),XN=$f();function I(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function kr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function d0(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ug(e){if(kr(e)!==e)throw Error(I(188))}function qN(e){var t=e.alternate;if(!t){if(t=kr(e),t===null)throw Error(I(188));return t!==e?null:e}for(var n=e,o=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(o=i.return,o!==null){n=o;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Ug(i),e;if(a===o)return Ug(i),t;a=a.sibling}throw Error(I(188))}if(n.return!==o.return)n=i,o=a;else{for(var l=!1,r=i.child;r;){if(r===n){l=!0,n=i,o=a;break}if(r===o){l=!0,o=i,n=a;break}r=r.sibling}if(!l){for(r=a.child;r;){if(r===n){l=!0,n=a,o=i;break}if(r===o){l=!0,o=a,n=i;break}r=r.sibling}if(!l)throw Error(I(189))}}if(n.alternate!==o)throw Error(I(190))}if(n.tag!==3)throw Error(I(188));return n.stateNode.current===n?e:t}function m0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m0(e),t!==null)return t;e=e.sibling}return null}var Ye=Object.assign,ZN=Symbol.for("react.element"),js=Symbol.for("react.transitional.element"),ar=Symbol.for("react.portal"),Aa=Symbol.for("react.fragment"),h0=Symbol.for("react.strict_mode"),Rd=Symbol.for("react.profiler"),g0=Symbol.for("react.consumer"),wo=Symbol.for("react.context"),Tp=Symbol.for("react.forward_ref"),Od=Symbol.for("react.suspense"),zd=Symbol.for("react.suspense_list"),wp=Symbol.for("react.memo"),Wo=Symbol.for("react.lazy"),Ld=Symbol.for("react.activity"),jN=Symbol.for("react.memo_cache_sentinel"),Pg=Symbol.iterator;function Wl(e){return e===null||typeof e!="object"?null:(e=Pg&&e[Pg]||e["@@iterator"],typeof e=="function"?e:null)}var QN=Symbol.for("react.client.reference");function Bd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===QN?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Aa:return"Fragment";case Rd:return"Profiler";case h0:return"StrictMode";case Od:return"Suspense";case zd:return"SuspenseList";case Ld:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case ar:return"Portal";case wo:return e.displayName||"Context";case g0:return(e._context.displayName||"Context")+".Consumer";case Tp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wp:return t=e.displayName||null,t!==null?t:Bd(e.type)||"Memo";case Wo:t=e._payload,e=e._init;try{return Bd(e(t))}catch{}}return null}var lr=Array.isArray,se=c0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De=XN.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Gi={pending:!1,data:null,method:null,action:null},Hd=[],Da=-1;function lo(e){return{current:e}}function St(e){0>Da||(e.current=Hd[Da],Hd[Da]=null,Da--)}function Ge(e,t){Da++,Hd[Da]=e.current,e.current=t}var ao=lo(null),Er=lo(null),ui=lo(null),Tu=lo(null);function wu(e,t){switch(Ge(ui,t),Ge(Er,e),Ge(ao,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?jy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=jy(t),e=Hb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}St(ao),Ge(ao,e)}function ja(){St(ao),St(Er),St(ui)}function kd(e){e.memoizedState!==null&&Ge(Tu,e);var t=ao.current,n=Hb(t,e.type);t!==n&&(Ge(Er,e),Ge(ao,n))}function Au(e){Er.current===e&&(St(ao),St(Er)),Tu.current===e&&(St(Tu),Lr._currentValue=Gi)}var Wf,Ig;function Li(e){if(Wf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Wf=t&&t[1]||"",Ig=-1<n.stack.indexOf(`
2257
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
2258
+ `+Wf+e+Ig}var Jf=!1;function ed(e,t){if(!e||Jf)return"";Jf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(h){var f=h}Reflect.construct(e,[],d)}else{try{d.call()}catch(h){f=h}e.call(d.prototype)}}else{try{throw Error()}catch(h){f=h}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(h){if(h&&f&&typeof h.stack=="string")return[h.stack,f.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=o.DetermineComponentFrameRoot(),l=a[0],r=a[1];if(l&&r){var s=l.split(`
2259
+ `),u=r.split(`
2260
+ `);for(i=o=0;o<s.length&&!s[o].includes("DetermineComponentFrameRoot");)o++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(o===s.length||i===u.length)for(o=s.length-1,i=u.length-1;1<=o&&0<=i&&s[o]!==u[i];)i--;for(;1<=o&&0<=i;o--,i--)if(s[o]!==u[i]){if(o!==1||i!==1)do if(o--,i--,0>i||s[o]!==u[i]){var c=`
2261
+ `+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=i);break}}}finally{Jf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Li(n):""}function FN(e,t){switch(e.tag){case 26:case 27:case 5:return Li(e.type);case 16:return Li("Lazy");case 13:return e.child!==t&&t!==null?Li("Suspense Fallback"):Li("Suspense");case 19:return Li("SuspenseList");case 0:case 15:return ed(e.type,!1);case 11:return ed(e.type.render,!1);case 1:return ed(e.type,!0);case 31:return Li("Activity");default:return""}}function Vg(e){try{var t="",n=null;do t+=FN(e,n),n=e,e=e.return;while(e);return t}catch(o){return`
2262
+ Error generating stack: `+o.message+`
2263
+ `+o.stack}}var Gd=Object.prototype.hasOwnProperty,Ap=mt.unstable_scheduleCallback,td=mt.unstable_cancelCallback,KN=mt.unstable_shouldYield,$N=mt.unstable_requestPaint,mn=mt.unstable_now,WN=mt.unstable_getCurrentPriorityLevel,y0=mt.unstable_ImmediatePriority,v0=mt.unstable_UserBlockingPriority,Du=mt.unstable_NormalPriority,JN=mt.unstable_LowPriority,b0=mt.unstable_IdlePriority,eC=mt.log,tC=mt.unstable_setDisableYieldValue,Gr=null,hn=null;function ii(e){if(typeof eC=="function"&&tC(e),hn&&typeof hn.setStrictMode=="function")try{hn.setStrictMode(Gr,e)}catch{}}var gn=Math.clz32?Math.clz32:iC,nC=Math.log,oC=Math.LN2;function iC(e){return e>>>=0,e===0?32:31-(nC(e)/oC|0)|0}var Qs=256,Fs=262144,Ks=4194304;function Bi(e){var t=e&42;if(t!==0)return t;switch(e&-e){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function tc(e,t,n){var o=e.pendingLanes;if(o===0)return 0;var i=0,a=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var r=o&134217727;return r!==0?(o=r&~a,o!==0?i=Bi(o):(l&=r,l!==0?i=Bi(l):n||(n=r&~e,n!==0&&(i=Bi(n))))):(r=o&~a,r!==0?i=Bi(r):l!==0?i=Bi(l):n||(n=o&~e,n!==0&&(i=Bi(n)))),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:i}function Ur(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function aC(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function S0(){var e=Ks;return Ks<<=1,(Ks&62914560)===0&&(Ks=4194304),e}function nd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function lC(e,t,n,o,i,a){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var r=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-gn(n),d=1<<c;r[c]=0,s[c]=-1;var f=u[c];if(f!==null)for(u[c]=null,c=0;c<f.length;c++){var h=f[c];h!==null&&(h.lane&=-536870913)}n&=~d}o!==0&&x0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function x0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-gn(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function _0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-gn(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function E0(e,t){var n=t&-t;return n=(n&42)!==0?1:Dp(n),(n&(e.suspendedLanes|t))!==0?0:n}function Dp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Mp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function N0(){var e=De.p;return e!==0?e:(e=window.event,e===void 0?32:jb(e.type))}function Yg(e,t){var n=De.p;try{return De.p=e,t()}finally{De.p=n}}var _i=Math.random().toString(36).slice(2),Et="__reactFiber$"+_i,tn="__reactProps$"+_i,il="__reactContainer$"+_i,Ud="__reactEvents$"+_i,rC="__reactListeners$"+_i,sC="__reactHandles$"+_i,Xg="__reactResources$"+_i,Ir="__reactMarker$"+_i;function Rp(e){delete e[Et],delete e[tn],delete e[Ud],delete e[rC],delete e[sC]}function Ma(e){var t=e[Et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[il]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Wy(e);e!==null;){if(n=e[Et])return n;e=Wy(e)}return t}e=n,n=e.parentNode}return null}function al(e){if(e=e[Et]||e[il]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function rr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(I(33))}function Pa(e){var t=e[Xg];return t||(t=e[Xg]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Ir]=!0}var C0=new Set,T0={};function Qi(e,t){Qa(e,t),Qa(e+"Capture",t)}function Qa(e,t){for(T0[e]=t,e=0;e<t.length;e++)C0.add(t[e])}var uC=RegExp("^[: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]*$"),qg={},Zg={};function cC(e){return Gd.call(Zg,e)?!0:Gd.call(qg,e)?!1:uC.test(e)?Zg[e]=!0:(qg[e]=!0,!1)}function fu(e,t,n){if(cC(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function $s(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function So(e,t,n,o){if(o===null)e.removeAttribute(n);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+o)}}function An(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function w0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function fC(e,t,n){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var i=o.get,a=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){n=""+l,a.call(this,l)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pd(e){if(!e._valueTracker){var t=w0(e)?"checked":"value";e._valueTracker=fC(e,t,""+e[t])}}function A0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=w0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Mu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var dC=/[\n"\\]/g;function Rn(e){return e.replace(dC,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Id(e,t,n,o,i,a,l,r){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+An(t)):e.value!==""+An(t)&&(e.value=""+An(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Vd(e,l,An(t)):n!=null?Vd(e,l,An(n)):o!=null&&e.removeAttribute("value"),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+An(r):e.removeAttribute("name")}function D0(e,t,n,o,i,a,l,r){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Pd(e);return}n=n!=null?""+An(n):"",t=t!=null?""+An(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}o=o??i,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=r?e.checked:!!o,e.defaultChecked=!!o,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Pd(e)}function Vd(e,t,n){t==="number"&&Mu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ia(e,t,n,o){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&o&&(e[n].defaultSelected=!0)}else{for(n=""+An(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,o&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function M0(e,t,n){if(t!=null&&(t=""+An(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+An(n):""}function R0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(I(92));if(lr(o)){if(1<o.length)throw Error(I(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=An(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Pd(e)}function Fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pC=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function jg(e,t,n){var o=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,n):typeof n!="number"||n===0||pC.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function O0(e,t,n){if(t!=null&&typeof t!="object")throw Error(I(62));if(e=e.style,n!=null){for(var o in n)!n.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var i in t)o=t[i],t.hasOwnProperty(i)&&n[i]!==o&&jg(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&jg(e,a,t[a])}function Op(e){if(e.indexOf("-")===-1)return!1;switch(e){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 mC=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),hC=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function du(e){return hC.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ao(){}var Yd=null;function zp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ra=null,Va=null;function Qg(e){var t=al(e);if(t&&(e=t.stateNode)){var n=e[tn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Id(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Rn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[tn]||null;if(!i)throw Error(I(90));Id(o,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)o=n[t],o.form===e.form&&A0(o)}break e;case"textarea":M0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ia(e,!!n.multiple,t,!1)}}}var od=!1;function z0(e,t,n){if(od)return e(t,n);od=!0;try{var o=e(t);return o}finally{if(od=!1,(Ra!==null||Va!==null)&&(pc(),Ra&&(t=Ra,e=Va,Va=Ra=null,Qg(t),e)))for(t=0;t<e.length;t++)Qg(e[t])}}function Nr(e,t){var n=e.stateNode;if(n===null)return null;var o=n[tn]||null;if(o===null)return null;n=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(I(231,t,typeof n));return n}var zo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xd=!1;if(zo)try{Ea={},Object.defineProperty(Ea,"passive",{get:function(){Xd=!0}}),window.addEventListener("test",Ea,Ea),window.removeEventListener("test",Ea,Ea)}catch{Xd=!1}var Ea,ai=null,Lp=null,pu=null;function L0(){if(pu)return pu;var e,t=Lp,n=t.length,o,i="value"in ai?ai.value:ai.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(o=1;o<=l&&t[n-o]===i[a-o];o++);return pu=i.slice(e,1<o?1-o:void 0)}function mu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ws(){return!0}function Fg(){return!1}function nn(e){function t(n,o,i,a,l){this._reactName=n,this._targetInst=i,this.type=o,this.nativeEvent=a,this.target=l,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(a):a[r]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Ws:Fg,this.isPropagationStopped=Fg,this}return Ye(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ws)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ws)},persist:function(){},isPersistent:Ws}),t}var Fi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nc=nn(Fi),Vr=Ye({},Fi,{view:0,detail:0}),gC=nn(Vr),id,ad,Jl,oc=Ye({},Vr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Jl&&(Jl&&e.type==="mousemove"?(id=e.screenX-Jl.screenX,ad=e.screenY-Jl.screenY):ad=id=0,Jl=e),id)},movementY:function(e){return"movementY"in e?e.movementY:ad}}),Kg=nn(oc),yC=Ye({},oc,{dataTransfer:0}),vC=nn(yC),bC=Ye({},Vr,{relatedTarget:0}),ld=nn(bC),SC=Ye({},Fi,{animationName:0,elapsedTime:0,pseudoElement:0}),xC=nn(SC),_C=Ye({},Fi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),EC=nn(_C),NC=Ye({},Fi,{data:0}),$g=nn(NC),CC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},TC={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"},wC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function AC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=wC[e])?!!t[e]:!1}function Bp(){return AC}var DC=Ye({},Vr,{key:function(e){if(e.key){var t=CC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?TC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bp,charCode:function(e){return e.type==="keypress"?mu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),MC=nn(DC),RC=Ye({},oc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Wg=nn(RC),OC=Ye({},Vr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bp}),zC=nn(OC),LC=Ye({},Fi,{propertyName:0,elapsedTime:0,pseudoElement:0}),BC=nn(LC),HC=Ye({},oc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),kC=nn(HC),GC=Ye({},Fi,{newState:0,oldState:0}),UC=nn(GC),PC=[9,13,27,32],Hp=zo&&"CompositionEvent"in window,cr=null;zo&&"documentMode"in document&&(cr=document.documentMode);var IC=zo&&"TextEvent"in window&&!cr,B0=zo&&(!Hp||cr&&8<cr&&11>=cr),Jg=" ",ey=!1;function H0(e,t){switch(e){case"keyup":return PC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Oa=!1;function VC(e,t){switch(e){case"compositionend":return k0(t);case"keypress":return t.which!==32?null:(ey=!0,Jg);case"textInput":return e=t.data,e===Jg&&ey?null:e;default:return null}}function YC(e,t){if(Oa)return e==="compositionend"||!Hp&&H0(e,t)?(e=L0(),pu=Lp=ai=null,Oa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return B0&&t.locale!=="ko"?null:t.data;default:return null}}var XC={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 ty(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!XC[e.type]:t==="textarea"}function G0(e,t,n,o){Ra?Va?Va.push(o):Va=[o]:Ra=o,t=Qu(t,"onChange"),0<t.length&&(n=new nc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var fr=null,Cr=null;function qC(e){zb(e,0)}function ic(e){var t=rr(e);if(A0(t))return e}function ny(e,t){if(e==="change")return t}var U0=!1;zo&&(zo?(eu="oninput"in document,eu||(rd=document.createElement("div"),rd.setAttribute("oninput","return;"),eu=typeof rd.oninput=="function"),Js=eu):Js=!1,U0=Js&&(!document.documentMode||9<document.documentMode));var Js,eu,rd;function oy(){fr&&(fr.detachEvent("onpropertychange",P0),Cr=fr=null)}function P0(e){if(e.propertyName==="value"&&ic(Cr)){var t=[];G0(t,Cr,e,zp(e)),z0(qC,t)}}function ZC(e,t,n){e==="focusin"?(oy(),fr=t,Cr=n,fr.attachEvent("onpropertychange",P0)):e==="focusout"&&oy()}function jC(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ic(Cr)}function QC(e,t){if(e==="click")return ic(t)}function FC(e,t){if(e==="input"||e==="change")return ic(t)}function KC(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vn=typeof Object.is=="function"?Object.is:KC;function Tr(e,t){if(vn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(o=0;o<n.length;o++){var i=n[o];if(!Gd.call(t,i)||!vn(e[i],t[i]))return!1}return!0}function iy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ay(e,t){var n=iy(e);e=0;for(var o;n;){if(n.nodeType===3){if(o=e+n.textContent.length,e<=t&&o>=t)return{node:n,offset:t-e};e=o}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=iy(n)}}function I0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?I0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function V0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mu(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mu(e.document)}return t}function kp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var $C=zo&&"documentMode"in document&&11>=document.documentMode,za=null,qd=null,dr=null,Zd=!1;function ly(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zd||za==null||za!==Mu(o)||(o=za,"selectionStart"in o&&kp(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),dr&&Tr(dr,o)||(dr=o,o=Qu(qd,"onSelect"),0<o.length&&(t=new nc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=za)))}function zi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var La={animationend:zi("Animation","AnimationEnd"),animationiteration:zi("Animation","AnimationIteration"),animationstart:zi("Animation","AnimationStart"),transitionrun:zi("Transition","TransitionRun"),transitionstart:zi("Transition","TransitionStart"),transitioncancel:zi("Transition","TransitionCancel"),transitionend:zi("Transition","TransitionEnd")},sd={},Y0={};zo&&(Y0=document.createElement("div").style,"AnimationEvent"in window||(delete La.animationend.animation,delete La.animationiteration.animation,delete La.animationstart.animation),"TransitionEvent"in window||delete La.transitionend.transition);function Ki(e){if(sd[e])return sd[e];if(!La[e])return e;var t=La[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Y0)return sd[e]=t[n];return e}var X0=Ki("animationend"),q0=Ki("animationiteration"),Z0=Ki("animationstart"),WC=Ki("transitionrun"),JC=Ki("transitionstart"),eT=Ki("transitioncancel"),j0=Ki("transitionend"),Q0=new Map,jd="abort auxClick beforeToggle 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(" ");jd.push("scrollEnd");function Zn(e,t){Q0.set(e,t),Qi(t,[e])}var Ru=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},wn=[],Ba=0,Gp=0;function ac(){for(var e=Ba,t=Gp=Ba=0;t<e;){var n=wn[t];wn[t++]=null;var o=wn[t];wn[t++]=null;var i=wn[t];wn[t++]=null;var a=wn[t];if(wn[t++]=null,o!==null&&i!==null){var l=o.pending;l===null?i.next=i:(i.next=l.next,l.next=i),o.pending=i}a!==0&&F0(n,i,a)}}function lc(e,t,n,o){wn[Ba++]=e,wn[Ba++]=t,wn[Ba++]=n,wn[Ba++]=o,Gp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Up(e,t,n,o){return lc(e,t,n,o),Ou(e)}function $i(e,t){return lc(e,null,null,t),Ou(e)}function F0(e,t,n){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,o=a.alternate,o!==null&&(o.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-gn(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function Ou(e){if(50<xr)throw xr=0,mp=null,Error(I(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ha={};function tT(e,t,n,o){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(e,t,n,o){return new tT(e,t,n,o)}function Pp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mo(e,t){var n=e.alternate;return n===null?(n=dn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function K0(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hu(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")Pp(e)&&(l=1);else if(typeof e=="string")l=iw(e,n,ao.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ld:return e=dn(31,n,t,i),e.elementType=Ld,e.lanes=a,e;case Aa:return Ui(n.children,i,a,t);case h0:l=8,i|=24;break;case Rd:return e=dn(12,n,t,i|2),e.elementType=Rd,e.lanes=a,e;case Od:return e=dn(13,n,t,i),e.elementType=Od,e.lanes=a,e;case zd:return e=dn(19,n,t,i),e.elementType=zd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wo:l=10;break e;case g0:l=9;break e;case Tp:l=11;break e;case wp:l=14;break e;case Wo:l=16,o=null;break e}l=29,n=Error(I(130,e===null?"null":typeof e,"")),o=null}return t=dn(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function Ui(e,t,n,o){return e=dn(7,e,o,t),e.lanes=n,e}function ud(e,t,n){return e=dn(6,e,null,t),e.lanes=n,e}function $0(e){var t=dn(18,null,null,0);return t.stateNode=e,t}function cd(e,t,n){return t=dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ry=new WeakMap;function On(e,t){if(typeof e=="object"&&e!==null){var n=ry.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Vg(t)},ry.set(e,t),t)}return{value:e,source:t,stack:Vg(t)}}var ka=[],Ga=0,zu=null,wr=0,Dn=[],Mn=0,vi=null,no=1,oo="";function Co(e,t){ka[Ga++]=wr,ka[Ga++]=zu,zu=e,wr=t}function W0(e,t,n){Dn[Mn++]=no,Dn[Mn++]=oo,Dn[Mn++]=vi,vi=e;var o=no;e=oo;var i=32-gn(o)-1;o&=~(1<<i),n+=1;var a=32-gn(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,no=1<<32-gn(t)+i|n<<i|o,oo=a+e}else no=1<<a|n<<i|o,oo=e}function Ip(e){e.return!==null&&(Co(e,1),W0(e,1,0))}function Vp(e){for(;e===zu;)zu=ka[--Ga],ka[Ga]=null,wr=ka[--Ga],ka[Ga]=null;for(;e===vi;)vi=Dn[--Mn],Dn[Mn]=null,oo=Dn[--Mn],Dn[Mn]=null,no=Dn[--Mn],Dn[Mn]=null}function J0(e,t){Dn[Mn++]=no,Dn[Mn++]=oo,Dn[Mn++]=vi,no=t.id,oo=t.overflow,vi=e}var Nt=null,Ve=null,Ee=!1,ci=null,zn=!1,Qd=Error(I(519));function bi(e){var t=Error(I(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ar(On(t,e)),Qd}function sy(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[Et]=e,t[tn]=o,n){case"dialog":be("cancel",t),be("close",t);break;case"iframe":case"object":case"embed":be("load",t);break;case"video":case"audio":for(n=0;n<Or.length;n++)be(Or[n],t);break;case"source":be("error",t);break;case"img":case"image":case"link":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"input":be("invalid",t),D0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":be("invalid",t);break;case"textarea":be("invalid",t),R0(t,o.value,o.defaultValue,o.children)}n=o.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||o.suppressHydrationWarning===!0||Bb(t.textContent,n)?(o.popover!=null&&(be("beforetoggle",t),be("toggle",t)),o.onScroll!=null&&be("scroll",t),o.onScrollEnd!=null&&be("scrollend",t),o.onClick!=null&&(t.onclick=Ao),t=!0):t=!1,t||bi(e,!0)}function uy(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:zn=!1;return;case 27:case 3:zn=!0;return;default:Nt=Nt.return}}function Na(e){if(e!==Nt)return!1;if(!Ee)return uy(e),Ee=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||bp(e.type,e.memoizedProps)),n=!n),n&&Ve&&bi(e),uy(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));Ve=$y(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(317));Ve=$y(e)}else t===27?(t=Ve,Ei(e.type)?(e=Ep,Ep=null,Ve=e):Ve=t):Ve=Nt?Bn(e.stateNode.nextSibling):null;return!0}function Yi(){Ve=Nt=null,Ee=!1}function fd(){var e=ci;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),ci=null),e}function Ar(e){ci===null?ci=[e]:ci.push(e)}var Fd=lo(null),Wi=null,Do=null;function ei(e,t,n){Ge(Fd,t._currentValue),t._currentValue=n}function Ro(e){e._currentValue=Fd.current,St(Fd)}function Kd(e,t,n){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===n)break;e=e.return}}function $d(e,t,n,o){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var l=i.child;a=a.firstContext;e:for(;a!==null;){var r=a;a=i;for(var s=0;s<t.length;s++)if(r.context===t[s]){a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),Kd(a.return,n,e),o||(l=null);break e}a=r.next}}else if(i.tag===18){if(l=i.return,l===null)throw Error(I(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),Kd(l,n,e),l=null}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===e){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}}function ll(e,t,n,o){e=null;for(var i=t,a=!1;i!==null;){if(!a){if((i.flags&524288)!==0)a=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var l=i.alternate;if(l===null)throw Error(I(387));if(l=l.memoizedProps,l!==null){var r=i.type;vn(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===Tu.current){if(l=i.alternate,l===null)throw Error(I(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Lr):e=[Lr])}i=i.return}e!==null&&$d(t,e,n,o),t.flags|=262144}function Lu(e){for(e=e.firstContext;e!==null;){if(!vn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xi(e){Wi=e,Do=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ct(e){return ev(Wi,e)}function tu(e,t){return Wi===null&&Xi(e),ev(e,t)}function ev(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Do===null){if(e===null)throw Error(I(308));Do=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Do=Do.next=t;return n}var nT=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},oT=mt.unstable_scheduleCallback,iT=mt.unstable_NormalPriority,ut={$$typeof:wo,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yp(){return{controller:new nT,data:new Map,refCount:0}}function Yr(e){e.refCount--,e.refCount===0&&oT(iT,function(){e.controller.abort()})}var pr=null,Wd=0,Ka=0,Ya=null;function aT(e,t){if(pr===null){var n=pr=[];Wd=0,Ka=mm(),Ya={status:"pending",value:void 0,then:function(o){n.push(o)}}}return Wd++,t.then(cy,cy),t}function cy(){if(--Wd===0&&pr!==null){Ya!==null&&(Ya.status="fulfilled");var e=pr;pr=null,Ka=0,Ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function lT(e,t){var n=[],o={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(o.status="rejected",o.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),o}var fy=se.S;se.S=function(e,t){mb=mn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&aT(e,t),fy!==null&&fy(e,t)};var Pi=lo(null);function Xp(){var e=Pi.current;return e!==null?e:ke.pooledCache}function gu(e,t){t===null?Ge(Pi,Pi.current):Ge(Pi,t.pool)}function tv(){var e=Xp();return e===null?null:{parent:ut._currentValue,pool:e}}var rl=Error(I(460)),qp=Error(I(474)),rc=Error(I(542)),Bu={then:function(){}};function dy(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ao,Ao),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,my(e),e;default:if(typeof t.status=="string")t.then(Ao,Ao);else{if(e=ke,e!==null&&100<e.shellSuspendCounter)throw Error(I(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=o}},function(o){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,my(e),e}throw Ii=t,rl}}function Hi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ii=n,rl):n}}var Ii=null;function py(){if(Ii===null)throw Error(I(459));var e=Ii;return Ii=null,e}function my(e){if(e===rl||e===rc)throw Error(I(483))}var Xa=null,Dr=0;function nu(e){var t=Dr;return Dr+=1,Xa===null&&(Xa=[]),nv(Xa,e,t)}function er(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function ou(e,t){throw t.$$typeof===ZN?Error(I(525)):(e=Object.prototype.toString.call(t),Error(I(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ov(e){function t(p,v){if(e){var m=p.deletions;m===null?(p.deletions=[v],p.flags|=16):m.push(v)}}function n(p,v){if(!e)return null;for(;v!==null;)t(p,v),v=v.sibling;return null}function o(p){for(var v=new Map;p!==null;)p.key!==null?v.set(p.key,p):v.set(p.index,p),p=p.sibling;return v}function i(p,v){return p=Mo(p,v),p.index=0,p.sibling=null,p}function a(p,v,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<v?(p.flags|=67108866,v):m):(p.flags|=67108866,v)):(p.flags|=1048576,v)}function l(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function r(p,v,m,g){return v===null||v.tag!==6?(v=ud(m,p.mode,g),v.return=p,v):(v=i(v,m),v.return=p,v)}function s(p,v,m,g){var x=m.type;return x===Aa?c(p,v,m.props.children,g,m.key):v!==null&&(v.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Wo&&Hi(x)===v.type)?(v=i(v,m.props),er(v,m),v.return=p,v):(v=hu(m.type,m.key,m.props,null,p.mode,g),er(v,m),v.return=p,v)}function u(p,v,m,g){return v===null||v.tag!==4||v.stateNode.containerInfo!==m.containerInfo||v.stateNode.implementation!==m.implementation?(v=cd(m,p.mode,g),v.return=p,v):(v=i(v,m.children||[]),v.return=p,v)}function c(p,v,m,g,x){return v===null||v.tag!==7?(v=Ui(m,p.mode,g,x),v.return=p,v):(v=i(v,m),v.return=p,v)}function d(p,v,m){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=ud(""+v,p.mode,m),v.return=p,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case js:return m=hu(v.type,v.key,v.props,null,p.mode,m),er(m,v),m.return=p,m;case ar:return v=cd(v,p.mode,m),v.return=p,v;case Wo:return v=Hi(v),d(p,v,m)}if(lr(v)||Wl(v))return v=Ui(v,p.mode,m,null),v.return=p,v;if(typeof v.then=="function")return d(p,nu(v),m);if(v.$$typeof===wo)return d(p,tu(p,v),m);ou(p,v)}return null}function f(p,v,m,g){var x=v!==null?v.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return x!==null?null:r(p,v,""+m,g);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case js:return m.key===x?s(p,v,m,g):null;case ar:return m.key===x?u(p,v,m,g):null;case Wo:return m=Hi(m),f(p,v,m,g)}if(lr(m)||Wl(m))return x!==null?null:c(p,v,m,g,null);if(typeof m.then=="function")return f(p,v,nu(m),g);if(m.$$typeof===wo)return f(p,v,tu(p,m),g);ou(p,m)}return null}function h(p,v,m,g,x){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return p=p.get(m)||null,r(v,p,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case js:return p=p.get(g.key===null?m:g.key)||null,s(v,p,g,x);case ar:return p=p.get(g.key===null?m:g.key)||null,u(v,p,g,x);case Wo:return g=Hi(g),h(p,v,m,g,x)}if(lr(g)||Wl(g))return p=p.get(m)||null,c(v,p,g,x,null);if(typeof g.then=="function")return h(p,v,m,nu(g),x);if(g.$$typeof===wo)return h(p,v,m,tu(v,g),x);ou(v,g)}return null}function y(p,v,m,g){for(var x=null,_=null,N=v,C=v=0,w=null;N!==null&&C<m.length;C++){N.index>C?(w=N,N=null):w=N.sibling;var H=f(p,N,m[C],g);if(H===null){N===null&&(N=w);break}e&&N&&H.alternate===null&&t(p,N),v=a(H,v,C),_===null?x=H:_.sibling=H,_=H,N=w}if(C===m.length)return n(p,N),Ee&&Co(p,C),x;if(N===null){for(;C<m.length;C++)N=d(p,m[C],g),N!==null&&(v=a(N,v,C),_===null?x=N:_.sibling=N,_=N);return Ee&&Co(p,C),x}for(N=o(N);C<m.length;C++)w=h(N,p,C,m[C],g),w!==null&&(e&&w.alternate!==null&&N.delete(w.key===null?C:w.key),v=a(w,v,C),_===null?x=w:_.sibling=w,_=w);return e&&N.forEach(function(A){return t(p,A)}),Ee&&Co(p,C),x}function b(p,v,m,g){if(m==null)throw Error(I(151));for(var x=null,_=null,N=v,C=v=0,w=null,H=m.next();N!==null&&!H.done;C++,H=m.next()){N.index>C?(w=N,N=null):w=N.sibling;var A=f(p,N,H.value,g);if(A===null){N===null&&(N=w);break}e&&N&&A.alternate===null&&t(p,N),v=a(A,v,C),_===null?x=A:_.sibling=A,_=A,N=w}if(H.done)return n(p,N),Ee&&Co(p,C),x;if(N===null){for(;!H.done;C++,H=m.next())H=d(p,H.value,g),H!==null&&(v=a(H,v,C),_===null?x=H:_.sibling=H,_=H);return Ee&&Co(p,C),x}for(N=o(N);!H.done;C++,H=m.next())H=h(N,p,C,H.value,g),H!==null&&(e&&H.alternate!==null&&N.delete(H.key===null?C:H.key),v=a(H,v,C),_===null?x=H:_.sibling=H,_=H);return e&&N.forEach(function(L){return t(p,L)}),Ee&&Co(p,C),x}function S(p,v,m,g){if(typeof m=="object"&&m!==null&&m.type===Aa&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case js:e:{for(var x=m.key;v!==null;){if(v.key===x){if(x=m.type,x===Aa){if(v.tag===7){n(p,v.sibling),g=i(v,m.props.children),g.return=p,p=g;break e}}else if(v.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Wo&&Hi(x)===v.type){n(p,v.sibling),g=i(v,m.props),er(g,m),g.return=p,p=g;break e}n(p,v);break}else t(p,v);v=v.sibling}m.type===Aa?(g=Ui(m.props.children,p.mode,g,m.key),g.return=p,p=g):(g=hu(m.type,m.key,m.props,null,p.mode,g),er(g,m),g.return=p,p=g)}return l(p);case ar:e:{for(x=m.key;v!==null;){if(v.key===x)if(v.tag===4&&v.stateNode.containerInfo===m.containerInfo&&v.stateNode.implementation===m.implementation){n(p,v.sibling),g=i(v,m.children||[]),g.return=p,p=g;break e}else{n(p,v);break}else t(p,v);v=v.sibling}g=cd(m,p.mode,g),g.return=p,p=g}return l(p);case Wo:return m=Hi(m),S(p,v,m,g)}if(lr(m))return y(p,v,m,g);if(Wl(m)){if(x=Wl(m),typeof x!="function")throw Error(I(150));return m=x.call(m),b(p,v,m,g)}if(typeof m.then=="function")return S(p,v,nu(m),g);if(m.$$typeof===wo)return S(p,v,tu(p,m),g);ou(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,v!==null&&v.tag===6?(n(p,v.sibling),g=i(v,m),g.return=p,p=g):(n(p,v),g=ud(m,p.mode,g),g.return=p,p=g),l(p)):n(p,v)}return function(p,v,m,g){try{Dr=0;var x=S(p,v,m,g);return Xa=null,x}catch(N){if(N===rl||N===rc)throw N;var _=dn(29,N,null,p.mode);return _.lanes=g,_.return=p,_}}}var qi=ov(!0),iv=ov(!1),Jo=!1;function Zp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function di(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ae&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=Ou(e),F0(e,null,n),t}return lc(e,o,t,n),Ou(e)}function mr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,_0(e,n)}}function dd(e,t){var n=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,n===o)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=l:a=a.next=l,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:o.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:o.shared,callbacks:o.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ep=!1;function hr(){if(ep){var e=Ya;if(e!==null)throw e}}function gr(e,t,n,o){ep=!1;var i=e.updateQueue;Jo=!1;var a=i.firstBaseUpdate,l=i.lastBaseUpdate,r=i.shared.pending;if(r!==null){i.shared.pending=null;var s=r,u=s.next;s.next=null,l===null?a=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,r=c.lastBaseUpdate,r!==l&&(r===null?c.firstBaseUpdate=u:r.next=u,c.lastBaseUpdate=s))}if(a!==null){var d=i.baseState;l=0,c=u=s=null,r=a;do{var f=r.lane&-536870913,h=f!==r.lane;if(h?(_e&f)===f:(o&f)===f){f!==0&&f===Ka&&(ep=!0),c!==null&&(c=c.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var y=e,b=r;f=t;var S=n;switch(b.tag){case 1:if(y=b.payload,typeof y=="function"){d=y.call(S,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=b.payload,f=typeof y=="function"?y.call(S,d,f):y,f==null)break e;d=Ye({},d,f);break e;case 2:Jo=!0}}f=r.callback,f!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[f]:h.push(f))}else h={lane:f,tag:r.tag,payload:r.payload,callback:r.callback,next:null},c===null?(u=c=h,s=d):c=c.next=h,l|=f;if(r=r.next,r===null){if(r=i.shared.pending,r===null)break;h=r,r=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);c===null&&(s=d),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=c,a===null&&(i.shared.lanes=0),xi|=l,e.lanes=l,e.memoizedState=d}}function av(e,t){if(typeof e!="function")throw Error(I(191,e));e.call(t)}function lv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)av(n[e],t)}var $a=lo(null),Hu=lo(0);function hy(e,t){e=ko,Ge(Hu,e),Ge($a,t),ko=e|t.baseLanes}function tp(){Ge(Hu,ko),Ge($a,$a.current)}function jp(){ko=Hu.current,St($a),St(Hu)}var bn=lo(null),Ln=null;function ti(e){var t=e.alternate;Ge(it,it.current&1),Ge(bn,e),Ln===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(Ln=e)}function np(e){Ge(it,it.current),Ge(bn,e),Ln===null&&(Ln=e)}function rv(e){e.tag===22?(Ge(it,it.current),Ge(bn,e),Ln===null&&(Ln=e)):ni(e)}function ni(){Ge(it,it.current),Ge(bn,bn.current)}function fn(e){St(bn),Ln===e&&(Ln=null),St(it)}var it=lo(0);function ku(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||xp(n)||_p(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Lo=0,me=null,Be=null,rt=null,Gu=!1,qa=!1,Zi=!1,Uu=0,Mr=0,Za=null,rT=0;function Je(){throw Error(I(321))}function Qp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vn(e[n],t[n]))return!1;return!0}function Fp(e,t,n,o,i,a){return Lo=a,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,se.H=e===null||e.memoizedState===null?Gv:lm,Zi=!1,a=n(o,i),Zi=!1,qa&&(a=uv(t,n,o,i)),sv(e),a}function sv(e){se.H=Rr;var t=Be!==null&&Be.next!==null;if(Lo=0,rt=Be=me=null,Gu=!1,Mr=0,Za=null,t)throw Error(I(300));e===null||ct||(e=e.dependencies,e!==null&&Lu(e)&&(ct=!0))}function uv(e,t,n,o){me=e;var i=0;do{if(qa&&(Za=null),Mr=0,qa=!1,25<=i)throw Error(I(301));if(i+=1,rt=Be=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}se.H=Uv,a=t(n,o)}while(qa);return a}function sT(){var e=se.H,t=e.useState()[0];return t=typeof t.then=="function"?Xr(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(me.flags|=1024),t}function Kp(){var e=Uu!==0;return Uu=0,e}function $p(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Wp(e){if(Gu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Gu=!1}Lo=0,rt=Be=me=null,qa=!1,Mr=Uu=0,Za=null}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?me.memoizedState=rt=e:rt=rt.next=e,rt}function at(){if(Be===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=rt===null?me.memoizedState:rt.next;if(t!==null)rt=t,Be=e;else{if(e===null)throw me.alternate===null?Error(I(467)):Error(I(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},rt===null?me.memoizedState=rt=e:rt=rt.next=e}return rt}function sc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xr(e){var t=Mr;return Mr+=1,Za===null&&(Za=[]),e=nv(Za,e,t),t=me,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,se.H=t===null||t.memoizedState===null?Gv:lm),e}function uc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Xr(e);if(e.$$typeof===wo)return Ct(e)}throw Error(I(438,String(e)))}function Jp(e){var t=null,n=me.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=me.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=sc(),me.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),o=0;o<e;o++)n[o]=jN;return t.index++,n}function Bo(e,t){return typeof t=="function"?t(e):t}function yu(e){var t=at();return em(t,Be,e)}function em(e,t,n){var o=e.queue;if(o===null)throw Error(I(311));o.lastRenderedReducer=n;var i=e.baseQueue,a=o.pending;if(a!==null){if(i!==null){var l=i.next;i.next=a.next,a.next=l}t.baseQueue=i=a,o.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var r=l=null,s=null,u=t,c=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(_e&d)===d:(Lo&d)===d){var f=u.revertLane;if(f===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===Ka&&(c=!0);else if((Lo&f)===f){u=u.next,f===Ka&&(c=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=d,l=a):s=s.next=d,me.lanes|=f,xi|=f;d=u.action,Zi&&n(a,d),a=u.hasEagerState?u.eagerState:n(a,d)}else f={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(r=s=f,l=a):s=s.next=f,me.lanes|=d,xi|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=a:s.next=r,!vn(a,e.memoizedState)&&(ct=!0,c&&(n=Ya,n!==null)))throw n;e.memoizedState=a,e.baseState=l,e.baseQueue=s,o.lastRenderedState=a}return i===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function pd(e){var t=at(),n=t.queue;if(n===null)throw Error(I(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do a=e(a,l.action),l=l.next;while(l!==i);vn(a,t.memoizedState)||(ct=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function cv(e,t,n){var o=me,i=at(),a=Ee;if(a){if(n===void 0)throw Error(I(407));n=n()}else n=t();var l=!vn((Be||i).memoizedState,n);if(l&&(i.memoizedState=n,ct=!0),i=i.queue,tm(pv.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||rt!==null&&rt.memoizedState.tag&1){if(o.flags|=2048,Wa(9,{destroy:void 0},dv.bind(null,o,i,n,t),null),ke===null)throw Error(I(349));a||(Lo&127)!==0||fv(o,t,n)}return n}function fv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t=sc(),me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function dv(e,t,n,o){t.value=n,t.getSnapshot=o,mv(t)&&hv(e)}function pv(e,t,n){return n(function(){mv(t)&&hv(e)})}function mv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vn(e,n)}catch{return!0}}function hv(e){var t=$i(e,2);t!==null&&en(t,e,2)}function op(e){var t=Pt();if(typeof e=="function"){var n=e;if(e=n(),Zi){ii(!0);try{n()}finally{ii(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function gv(e,t,n,o){return e.baseState=n,em(e,Be,typeof o=="function"?o:Bo)}function uT(e,t,n,o,i){if(fc(e))throw Error(I(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){a.listeners.push(l)}};se.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,yv(t,a)):(a.next=n.next,t.pending=n.next=a)}}function yv(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=se.T,l={};se.T=l;try{var r=n(i,o),s=se.S;s!==null&&s(l,r),gy(e,t,r)}catch(u){ip(e,t,u)}finally{a!==null&&l.types!==null&&(a.types=l.types),se.T=a}}else try{a=n(i,o),gy(e,t,a)}catch(u){ip(e,t,u)}}function gy(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){yy(e,t,o)},function(o){return ip(e,t,o)}):yy(e,t,n)}function yy(e,t,n){t.status="fulfilled",t.value=n,vv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,yv(e,n)))}function ip(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,vv(t),t=t.next;while(t!==o)}e.action=null}function vv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bv(e,t){return t}function vy(e,t){if(Ee){var n=ke.formState;if(n!==null){e:{var o=me;if(Ee){if(Ve){t:{for(var i=Ve,a=zn;i.nodeType!==8;){if(!a){i=null;break t}if(i=Bn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){Ve=Bn(i.nextSibling),o=i.data==="F!";break e}}bi(o)}o=!1}o&&(t=n[0])}}return n=Pt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bv,lastRenderedState:t},n.queue=o,n=Bv.bind(null,me,o),o.dispatch=n,o=op(!1),a=am.bind(null,me,!1,o.queue),o=Pt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=uT.bind(null,me,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function by(e){var t=at();return Sv(t,Be,e)}function Sv(e,t,n){if(t=em(e,t,bv)[0],e=yu(Bo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=Xr(t)}catch(l){throw l===rl?rc:l}else o=t;t=at();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(me.flags|=2048,Wa(9,{destroy:void 0},cT.bind(null,i,n),null)),[o,a,e]}function cT(e,t){e.action=t}function Sy(e){var t=at(),n=Be;if(n!==null)return Sv(t,n,e);at(),t=t.memoizedState,n=at();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function Wa(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=me.updateQueue,t===null&&(t=sc(),me.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(o=n.next,n.next=e,e.next=o,t.lastEffect=e),e}function xv(){return at().memoizedState}function vu(e,t,n,o){var i=Pt();me.flags|=e,i.memoizedState=Wa(1|t,{destroy:void 0},n,o===void 0?null:o)}function cc(e,t,n,o){var i=at();o=o===void 0?null:o;var a=i.memoizedState.inst;Be!==null&&o!==null&&Qp(o,Be.memoizedState.deps)?i.memoizedState=Wa(t,a,n,o):(me.flags|=e,i.memoizedState=Wa(1|t,a,n,o))}function xy(e,t){vu(8390656,8,e,t)}function tm(e,t){cc(2048,8,e,t)}function fT(e){me.flags|=4;var t=me.updateQueue;if(t===null)t=sc(),me.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _v(e){var t=at().memoizedState;return fT({ref:t,nextImpl:e}),function(){if((Ae&2)!==0)throw Error(I(440));return t.impl.apply(void 0,arguments)}}function Ev(e,t){return cc(4,2,e,t)}function Nv(e,t){return cc(4,4,e,t)}function Cv(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Tv(e,t,n){n=n!=null?n.concat([e]):null,cc(4,4,Cv.bind(null,t,e),n)}function nm(){}function wv(e,t){var n=at();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&Qp(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Av(e,t){var n=at();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&Qp(t,o[1]))return o[0];if(o=e(),Zi){ii(!0);try{e()}finally{ii(!1)}}return n.memoizedState=[o,t],o}function om(e,t,n){return n===void 0||(Lo&1073741824)!==0&&(_e&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=gb(),me.lanes|=e,xi|=e,n)}function Dv(e,t,n,o){return vn(n,t)?n:$a.current!==null?(e=om(e,n,o),vn(e,t)||(ct=!0),e):(Lo&42)===0||(Lo&1073741824)!==0&&(_e&261930)===0?(ct=!0,e.memoizedState=n):(e=gb(),me.lanes|=e,xi|=e,t)}function Mv(e,t,n,o,i){var a=De.p;De.p=a!==0&&8>a?a:8;var l=se.T,r={};se.T=r,am(e,!1,t,n);try{var s=i(),u=se.S;if(u!==null&&u(r,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=lT(s,o);yr(e,t,c,yn(e))}else yr(e,t,o,yn(e))}catch(d){yr(e,t,{then:function(){},status:"rejected",reason:d},yn())}finally{De.p=a,l!==null&&r.types!==null&&(l.types=r.types),se.T=l}}function dT(){}function ap(e,t,n,o){if(e.tag!==5)throw Error(I(476));var i=Rv(e).queue;Mv(e,i,t,Gi,n===null?dT:function(){return Ov(e),n(o)})}function Rv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Gi,baseState:Gi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:Gi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ov(e){var t=Rv(e);t.next===null&&(t=e.alternate.memoizedState),yr(e,t.next.queue,{},yn())}function im(){return Ct(Lr)}function zv(){return at().memoizedState}function Lv(){return at().memoizedState}function pT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yn();e=fi(n);var o=di(t,e,n);o!==null&&(en(o,t,n),mr(o,t,n)),t={cache:Yp()},e.payload=t;return}t=t.return}}function mT(e,t,n){var o=yn();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fc(e)?Hv(t,n):(n=Up(e,t,n,o),n!==null&&(en(n,e,o),kv(n,t,o)))}function Bv(e,t,n){var o=yn();yr(e,t,n,o)}function yr(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fc(e))Hv(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var l=t.lastRenderedState,r=a(l,n);if(i.hasEagerState=!0,i.eagerState=r,vn(r,l))return lc(e,t,i,0),ke===null&&ac(),!1}catch{}if(n=Up(e,t,i,o),n!==null)return en(n,e,o),kv(n,t,o),!0}return!1}function am(e,t,n,o){if(o={lane:2,revertLane:mm(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},fc(e)){if(t)throw Error(I(479))}else t=Up(e,n,o,2),t!==null&&en(t,e,2)}function fc(e){var t=e.alternate;return e===me||t!==null&&t===me}function Hv(e,t){qa=Gu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kv(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,_0(e,n)}}var Rr={readContext:Ct,use:uc,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};Rr.useEffectEvent=Je;var Gv={readContext:Ct,use:uc,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:xy,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,vu(4194308,4,Cv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vu(4194308,4,e,t)},useInsertionEffect:function(e,t){vu(4,2,e,t)},useMemo:function(e,t){var n=Pt();t=t===void 0?null:t;var o=e();if(Zi){ii(!0);try{e()}finally{ii(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Pt();if(n!==void 0){var i=n(t);if(Zi){ii(!0);try{n(t)}finally{ii(!1)}}}else i=t;return o.memoizedState=o.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},o.queue=e,e=e.dispatch=mT.bind(null,me,e),[o.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:function(e){e=op(e);var t=e.queue,n=Bv.bind(null,me,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:nm,useDeferredValue:function(e,t){var n=Pt();return om(n,e,t)},useTransition:function(){var e=op(!1);return e=Mv.bind(null,me,e.queue,!0,!1),Pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=me,i=Pt();if(Ee){if(n===void 0)throw Error(I(407));n=n()}else{if(n=t(),ke===null)throw Error(I(349));(_e&127)!==0||fv(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,xy(pv.bind(null,o,a,e),[e]),o.flags|=2048,Wa(9,{destroy:void 0},dv.bind(null,o,a,n,t),null),n},useId:function(){var e=Pt(),t=ke.identifierPrefix;if(Ee){var n=oo,o=no;n=(o&~(1<<32-gn(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Uu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=rT++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:im,useFormState:vy,useActionState:vy,useOptimistic:function(e){var t=Pt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=am.bind(null,me,!0,n),n.dispatch=t,[e,t]},useMemoCache:Jp,useCacheRefresh:function(){return Pt().memoizedState=pT.bind(null,me)},useEffectEvent:function(e){var t=Pt(),n={impl:e};return t.memoizedState=n,function(){if((Ae&2)!==0)throw Error(I(440));return n.impl.apply(void 0,arguments)}}},lm={readContext:Ct,use:uc,useCallback:wv,useContext:Ct,useEffect:tm,useImperativeHandle:Tv,useInsertionEffect:Ev,useLayoutEffect:Nv,useMemo:Av,useReducer:yu,useRef:xv,useState:function(){return yu(Bo)},useDebugValue:nm,useDeferredValue:function(e,t){var n=at();return Dv(n,Be.memoizedState,e,t)},useTransition:function(){var e=yu(Bo)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Xr(e),t]},useSyncExternalStore:cv,useId:zv,useHostTransitionStatus:im,useFormState:by,useActionState:by,useOptimistic:function(e,t){var n=at();return gv(n,Be,e,t)},useMemoCache:Jp,useCacheRefresh:Lv};lm.useEffectEvent=_v;var Uv={readContext:Ct,use:uc,useCallback:wv,useContext:Ct,useEffect:tm,useImperativeHandle:Tv,useInsertionEffect:Ev,useLayoutEffect:Nv,useMemo:Av,useReducer:pd,useRef:xv,useState:function(){return pd(Bo)},useDebugValue:nm,useDeferredValue:function(e,t){var n=at();return Be===null?om(n,e,t):Dv(n,Be.memoizedState,e,t)},useTransition:function(){var e=pd(Bo)[0],t=at().memoizedState;return[typeof e=="boolean"?e:Xr(e),t]},useSyncExternalStore:cv,useId:zv,useHostTransitionStatus:im,useFormState:Sy,useActionState:Sy,useOptimistic:function(e,t){var n=at();return Be!==null?gv(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Jp,useCacheRefresh:Lv};Uv.useEffectEvent=_v;function md(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Ye({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var lp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=yn(),i=fi(o);i.payload=t,n!=null&&(i.callback=n),t=di(e,i,o),t!==null&&(en(t,e,o),mr(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=yn(),i=fi(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=di(e,i,o),t!==null&&(en(t,e,o),mr(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=yn(),o=fi(n);o.tag=2,t!=null&&(o.callback=t),t=di(e,o,n),t!==null&&(en(t,e,n),mr(t,e,n))}};function _y(e,t,n,o,i,a,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,l):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,o)||!Tr(i,a):!0}function Ey(e,t,n,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,o),t.state!==e&&lp.enqueueReplaceState(t,t.state,null)}function ji(e,t){var n=t;if("ref"in t){n={};for(var o in t)o!=="ref"&&(n[o]=t[o])}if(e=e.defaultProps){n===t&&(n=Ye({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Pv(e){Ru(e)}function Iv(e){console.error(e)}function Vv(e){Ru(e)}function Pu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Ny(e,t,n){try{var o=e.onCaughtError;o(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function rp(e,t,n){return n=fi(n),n.tag=3,n.payload={element:null},n.callback=function(){Pu(e,t)},n}function Yv(e){return e=fi(e),e.tag=3,e}function Xv(e,t,n,o){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var a=o.value;e.payload=function(){return i(a)},e.callback=function(){Ny(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Ny(t,n,o),typeof i!="function"&&(pi===null?pi=new Set([this]):pi.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function hT(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&ll(t,n,i,!0),n=bn.current,n!==null){switch(n.tag){case 31:case 13:return Ln===null?qu():n.alternate===null&&et===0&&(et=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===Bu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),Cd(e,o,i)),!1;case 22:return n.flags|=65536,o===Bu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([o]):n.add(o)),Cd(e,o,i)),!1}throw Error(I(435,n.tag))}return Cd(e,o,i),qu(),!1}if(Ee)return t=bn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==Qd&&(e=Error(I(422),{cause:o}),Ar(On(e,n)))):(o!==Qd&&(t=Error(I(423),{cause:o}),Ar(On(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=On(o,n),i=rp(e.stateNode,o,i),dd(e,i),et!==4&&(et=2)),!1;var a=Error(I(520),{cause:o});if(a=On(a,n),Sr===null?Sr=[a]:Sr.push(a),et!==4&&(et=2),t===null)return!0;o=On(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=rp(n.stateNode,o,e),dd(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(pi===null||!pi.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Yv(i),Xv(i,e,n,o),dd(n,i),!1}n=n.return}while(n!==null);return!1}var rm=Error(I(461)),ct=!1;function _t(e,t,n,o){t.child=e===null?iv(t,null,n,o):qi(t,e.child,n,o)}function Cy(e,t,n,o,i){n=n.render;var a=t.ref;if("ref"in o){var l={};for(var r in o)r!=="ref"&&(l[r]=o[r])}else l=o;return Xi(t),o=Fp(e,t,n,l,a,i),r=Kp(),e!==null&&!ct?($p(e,t,i),Ho(e,t,i)):(Ee&&r&&Ip(t),t.flags|=1,_t(e,t,o,i),t.child)}function Ty(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!Pp(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,qv(e,t,a,o,i)):(e=hu(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!sm(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:Tr,n(l,o)&&e.ref===t.ref)return Ho(e,t,i)}return t.flags|=1,e=Mo(a,o),e.ref=t.ref,e.return=t,t.child=e}function qv(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,o)&&e.ref===t.ref)if(ct=!1,t.pendingProps=o=a,sm(e,i))(e.flags&131072)!==0&&(ct=!0);else return t.lanes=e.lanes,Ho(e,t,i)}return sp(e,t,n,o,i)}function Zv(e,t,n,o){var i=o.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(o=t.child=e.child,i=0;o!==null;)i=i|o.lanes|o.childLanes,o=o.sibling;o=i&~a}else o=0,t.child=null;return wy(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&gu(t,a!==null?a.cachePool:null),a!==null?hy(t,a):tp(),rv(t);else return o=t.lanes=536870912,wy(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(gu(t,a.cachePool),hy(t,a),ni(t),t.memoizedState=null):(e!==null&&gu(t,null),tp(),ni(t));return _t(e,t,i,n),t.child}function sr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function wy(e,t,n,o,i){var a=Xp();return a=a===null?null:{parent:ut._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&gu(t,null),tp(),rv(t),e!==null&&ll(e,t,o,!0),t.childLanes=i,null}function bu(e,t){return t=Iu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ay(e,t,n){return qi(t,e.child,null,n),e=bu(t,t.pendingProps),e.flags|=2,fn(t),t.memoizedState=null,e}function gT(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ee){if(o.mode==="hidden")return e=bu(t,o),t.lanes=536870912,sr(null,e);if(np(t),(e=Ve)?(e=Gb(e,zn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi!==null?{id:no,overflow:oo}:null,retryLane:536870912,hydrationErrors:null},n=$0(e),n.return=t,t.child=n,Nt=t,Ve=null)):e=null,e===null)throw bi(t);return t.lanes=536870912,null}return bu(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(np(t),i)if(t.flags&256)t.flags&=-257,t=Ay(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(I(558));else if(ct||ll(e,t,n,!1),i=(n&e.childLanes)!==0,ct||i){if(o=ke,o!==null&&(l=E0(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,$i(e,l),en(o,e,l),rm;qu(),t=Ay(e,t,n)}else e=a.treeContext,Ve=Bn(l.nextSibling),Nt=t,Ee=!0,ci=null,zn=!1,e!==null&&J0(t,e),t=bu(t,o),t.flags|=4096;return t}return e=Mo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Su(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(I(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function sp(e,t,n,o,i){return Xi(t),n=Fp(e,t,n,o,void 0,i),o=Kp(),e!==null&&!ct?($p(e,t,i),Ho(e,t,i)):(Ee&&o&&Ip(t),t.flags|=1,_t(e,t,n,i),t.child)}function Dy(e,t,n,o,i,a){return Xi(t),t.updateQueue=null,n=uv(t,o,n,i),sv(e),o=Kp(),e!==null&&!ct?($p(e,t,a),Ho(e,t,a)):(Ee&&o&&Ip(t),t.flags|=1,_t(e,t,n,a),t.child)}function My(e,t,n,o,i){if(Xi(t),t.stateNode===null){var a=Ha,l=n.contextType;typeof l=="object"&&l!==null&&(a=Ct(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=lp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},Zp(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?Ct(l):Ha,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(md(t,n,l,o),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(l=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),l!==a.state&&lp.enqueueReplaceState(a,a.state,null),gr(t,o,a,i),hr(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){a=t.stateNode;var r=t.memoizedProps,s=ji(n,r);a.props=s;var u=a.context,c=n.contextType;l=Ha,typeof c=="object"&&c!==null&&(l=Ct(c));var d=n.getDerivedStateFromProps;c=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,c||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r||u!==l)&&Ey(t,a,o,l),Jo=!1;var f=t.memoizedState;a.state=f,gr(t,o,a,i),hr(),u=t.memoizedState,r||f!==u||Jo?(typeof d=="function"&&(md(t,n,d,o),u=t.memoizedState),(s=Jo||_y(t,n,s,o,f,u,l))?(c||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=u),a.props=o,a.state=u,a.context=l,o=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{a=t.stateNode,Jd(e,t),l=t.memoizedProps,c=ji(n,l),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=Ha,typeof u=="object"&&u!==null&&(s=Ct(u)),r=n.getDerivedStateFromProps,(u=typeof r=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&Ey(t,a,o,s),Jo=!1,f=t.memoizedState,a.state=f,gr(t,o,a,i),hr();var h=t.memoizedState;l!==d||f!==h||Jo||e!==null&&e.dependencies!==null&&Lu(e.dependencies)?(typeof r=="function"&&(md(t,n,r,o),h=t.memoizedState),(c=Jo||_y(t,n,c,o,f,h,s)||e!==null&&e.dependencies!==null&&Lu(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(o,h,s),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(o,h,s)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),a.props=o,a.state=h,a.context=s,o=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return a=o,Su(e,t),o=(t.flags&128)!==0,a||o?(a=t.stateNode,n=o&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&o?(t.child=qi(t,e.child,null,i),t.child=qi(t,null,n,i)):_t(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Ho(e,t,i),e}function Ry(e,t,n,o){return Yi(),t.flags|=256,_t(e,t,n,o),t.child}var hd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(e){return{baseLanes:e,cachePool:tv()}}function yd(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pn),e}function jv(e,t,n){var o=t.pendingProps,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(it.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ee){if(i?ti(t):ni(t),(e=Ve)?(e=Gb(e,zn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:vi!==null?{id:no,overflow:oo}:null,retryLane:536870912,hydrationErrors:null},n=$0(e),n.return=t,t.child=n,Nt=t,Ve=null)):e=null,e===null)throw bi(t);return _p(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(ni(t),i=t.mode,r=Iu({mode:"hidden",children:r},i),o=Ui(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=gd(n),o.childLanes=yd(e,l,n),t.memoizedState=hd,sr(null,o)):(ti(t),up(t,r))}var s=e.memoizedState;if(s!==null&&(r=s.dehydrated,r!==null)){if(a)t.flags&256?(ti(t),t.flags&=-257,t=vd(e,t,n)):t.memoizedState!==null?(ni(t),t.child=e.child,t.flags|=128,t=null):(ni(t),r=o.fallback,i=t.mode,o=Iu({mode:"visible",children:o.children},i),r=Ui(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,qi(t,e.child,null,n),o=t.child,o.memoizedState=gd(n),o.childLanes=yd(e,l,n),t.memoizedState=hd,t=sr(null,o));else if(ti(t),_p(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var u=l.dgst;l=u,o=Error(I(419)),o.stack="",o.digest=l,Ar({value:o,source:null,stack:null}),t=vd(e,t,n)}else if(ct||ll(e,t,n,!1),l=(n&e.childLanes)!==0,ct||l){if(l=ke,l!==null&&(o=E0(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,$i(e,o),en(l,e,o),rm;xp(r)||qu(),t=vd(e,t,n)}else xp(r)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,Ve=Bn(r.nextSibling),Nt=t,Ee=!0,ci=null,zn=!1,e!==null&&J0(t,e),t=up(t,o.children),t.flags|=4096);return t}return i?(ni(t),r=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Mo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?r=Mo(u,r):(r=Ui(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,sr(null,o),o=t.child,r=e.child.memoizedState,r===null?r=gd(n):(i=r.cachePool,i!==null?(s=ut._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=tv(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=yd(e,l,n),t.memoizedState=hd,sr(e.child,o)):(ti(t),n=e.child,e=n.sibling,n=Mo(n,{mode:"visible",children:o.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function up(e,t){return t=Iu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Iu(e,t){return e=dn(22,e,null,t),e.lanes=0,e}function vd(e,t,n){return qi(t,e.child,null,n),e=up(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oy(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Kd(e.return,t,n)}function bd(e,t,n,o,i,a){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:n,tailMode:i,treeForkCount:a}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=o,l.tail=n,l.tailMode=i,l.treeForkCount=a)}function Qv(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=it.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Ge(it,l),_t(e,t,o,n),o=Ee?wr:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oy(e,n,t);else if(e.tag===19)Oy(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ku(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),bd(t,!1,i,n,a,o);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ku(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}bd(t,!0,n,null,a,o);break;case"together":bd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function Ho(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),xi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ll(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(I(153));if(t.child!==null){for(e=t.child,n=Mo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Mo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function sm(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Lu(e)))}function yT(e,t,n){switch(t.tag){case 3:wu(t,t.stateNode.containerInfo),ei(t,ut,e.memoizedState.cache),Yi();break;case 27:case 5:kd(t);break;case 4:wu(t,t.stateNode.containerInfo);break;case 10:ei(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,np(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(ti(t),t.flags|=128,null):(n&t.child.childLanes)!==0?jv(e,t,n):(ti(t),e=Ho(e,t,n),e!==null?e.sibling:null);ti(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(ll(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return Qv(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ge(it,it.current),o)break;return null;case 22:return t.lanes=0,Zv(e,t,n,t.pendingProps);case 24:ei(t,ut,e.memoizedState.cache)}return Ho(e,t,n)}function Fv(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ct=!0;else{if(!sm(e,n)&&(t.flags&128)===0)return ct=!1,yT(e,t,n);ct=(e.flags&131072)!==0}else ct=!1,Ee&&(t.flags&1048576)!==0&&W0(t,wr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Hi(t.elementType),t.type=e,typeof e=="function")Pp(e)?(o=ji(e,o),t.tag=1,t=My(null,t,e,o,n)):(t.tag=0,t=sp(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===Tp){t.tag=11,t=Cy(null,t,e,o,n);break e}else if(i===wp){t.tag=14,t=Ty(null,t,e,o,n);break e}}throw t=Bd(e)||e,Error(I(306,t,""))}}return t;case 0:return sp(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=ji(o,t.pendingProps),My(e,t,o,i,n);case 3:e:{if(wu(t,t.stateNode.containerInfo),e===null)throw Error(I(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,Jd(e,t),gr(t,o,null,n);var l=t.memoizedState;if(o=l.cache,ei(t,ut,o),o!==a.cache&&$d(t,[ut],n,!0),hr(),o=l.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Ry(e,t,o,n);break e}else if(o!==i){i=On(Error(I(424)),t),Ar(i),t=Ry(e,t,o,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ve=Bn(e.firstChild),Nt=t,Ee=!0,ci=null,zn=!0,n=iv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Yi(),o===i){t=Ho(e,t,n);break e}_t(e,t,o,n)}t=t.child}return t;case 26:return Su(e,t),e===null?(n=e0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ee||(n=t.type,e=t.pendingProps,o=Fu(ui.current).createElement(n),o[Et]=t,o[tn]=e,Tt(o,n,e),bt(o),t.stateNode=o):t.memoizedState=e0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return kd(t),e===null&&Ee&&(o=t.stateNode=Ub(t.type,t.pendingProps,ui.current),Nt=t,zn=!0,i=Ve,Ei(t.type)?(Ep=i,Ve=Bn(o.firstChild)):Ve=i),_t(e,t,t.pendingProps.children,n),Su(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ee&&((i=o=Ve)&&(o=qT(o,t.type,t.pendingProps,zn),o!==null?(t.stateNode=o,Nt=t,Ve=Bn(o.firstChild),zn=!1,i=!0):i=!1),i||bi(t)),kd(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,bp(i,a)?o=null:l!==null&&bp(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=Fp(e,t,sT,null,null,n),Lr._currentValue=i),Su(e,t),_t(e,t,o,n),t.child;case 6:return e===null&&Ee&&((e=n=Ve)&&(n=ZT(n,t.pendingProps,zn),n!==null?(t.stateNode=n,Nt=t,Ve=null,e=!0):e=!1),e||bi(t)),null;case 13:return jv(e,t,n);case 4:return wu(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=qi(t,null,o,n):_t(e,t,o,n),t.child;case 11:return Cy(e,t,t.type,t.pendingProps,n);case 7:return _t(e,t,t.pendingProps,n),t.child;case 8:return _t(e,t,t.pendingProps.children,n),t.child;case 12:return _t(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,ei(t,t.type,o.value),_t(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,Xi(t),i=Ct(i),o=o(i),t.flags|=1,_t(e,t,o,n),t.child;case 14:return Ty(e,t,t.type,t.pendingProps,n);case 15:return qv(e,t,t.type,t.pendingProps,n);case 19:return Qv(e,t,n);case 31:return gT(e,t,n);case 22:return Zv(e,t,n,t.pendingProps);case 24:return Xi(t),o=Ct(ut),e===null?(i=Xp(),i===null&&(i=ke,a=Yp(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},Zp(t),ei(t,ut,i)):((e.lanes&n)!==0&&(Jd(e,t),gr(t,null,null,n),hr()),i=e.memoizedState,a=t.memoizedState,i.parent!==o?(i={parent:o,cache:o},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),ei(t,ut,o)):(o=a.cache,ei(t,ut,o),o!==i.cache&&$d(t,[ut],n,!0))),_t(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(I(156,t.tag))}function xo(e){e.flags|=4}function Sd(e,t,n,o,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(bb())e.flags|=8192;else throw Ii=Bu,qp}else e.flags&=-16777217}function zy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vb(t))if(bb())e.flags|=8192;else throw Ii=Bu,qp}function iu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?S0():536870912,e.lanes|=t,Ja|=t)}function tr(e,t){if(!Ee)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,o=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags&65011712,o|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,o|=i.subtreeFlags,o|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=o,e.childLanes=n,t}function vT(e,t,n){var o=t.pendingProps;switch(Vp(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ie(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Ro(ut),ja(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Na(t)?xo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fd())),Ie(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(xo(t),a!==null?(Ie(t),zy(t,a)):(Ie(t),Sd(t,i,null,o,n))):a?a!==e.memoizedState?(xo(t),Ie(t),zy(t,a)):(Ie(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&xo(t),Ie(t),Sd(t,i,e,o,n)),null;case 27:if(Au(t),n=ui.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&xo(t);else{if(!o){if(t.stateNode===null)throw Error(I(166));return Ie(t),null}e=ao.current,Na(t)?sy(t,e):(e=Ub(i,o,n),t.stateNode=e,xo(t))}return Ie(t),null;case 5:if(Au(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&xo(t);else{if(!o){if(t.stateNode===null)throw Error(I(166));return Ie(t),null}if(a=ao.current,Na(t))sy(t,a);else{var l=Fu(ui.current);switch(a){case 1:a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":a=l.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":a=l.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":a=l.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof o.is=="string"?l.createElement("select",{is:o.is}):l.createElement("select"),o.multiple?a.multiple=!0:o.size&&(a.size=o.size);break;default:a=typeof o.is=="string"?l.createElement(i,{is:o.is}):l.createElement(i)}}a[Et]=t,a[tn]=o;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)a.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=a;e:switch(Tt(a,i,o),i){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&xo(t)}}return Ie(t),Sd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&xo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(I(166));if(e=ui.current,Na(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=Nt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Et]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||Bb(e.nodeValue,n)),e||bi(t,!0)}else e=Fu(e).createTextNode(o),e[Et]=t,t.stateNode=e}return Ie(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=Na(t),n!==null){if(e===null){if(!o)throw Error(I(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(I(557));e[Et]=t}else Yi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),e=!1}else n=fd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fn(t),t):(fn(t),null);if((t.flags&128)!==0)throw Error(I(558))}return Ie(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Na(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(I(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(I(317));i[Et]=t}else Yi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),i=!1}else i=fd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(fn(t),t):(fn(t),null)}return fn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=o!==null,e=e!==null&&e.memoizedState!==null,n&&(o=t.child,i=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(i=o.alternate.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==i&&(o.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),iu(t,t.updateQueue),Ie(t),null);case 4:return ja(),e===null&&hm(t.stateNode.containerInfo),Ie(t),null;case 10:return Ro(t.type),Ie(t),null;case 19:if(St(it),o=t.memoizedState,o===null)return Ie(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)tr(o,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=ku(e),a!==null){for(t.flags|=128,tr(o,!1),e=a.updateQueue,t.updateQueue=e,iu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)K0(n,e),n=n.sibling;return Ge(it,it.current&1|2),Ee&&Co(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&mn()>Yu&&(t.flags|=128,i=!0,tr(o,!1),t.lanes=4194304)}else{if(!i)if(e=ku(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,iu(t,e),tr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ee)return Ie(t),null}else 2*mn()-o.renderingStartTime>Yu&&n!==536870912&&(t.flags|=128,i=!0,tr(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(e=o.last,e!==null?e.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=mn(),e.sibling=null,n=it.current,Ge(it,i?n&1|2:n&1),Ee&&Co(t,o.treeForkCount),e):(Ie(t),null);case 22:case 23:return fn(t),jp(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(n&536870912)!==0&&(t.flags&128)===0&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),n=t.updateQueue,n!==null&&iu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==n&&(t.flags|=2048),e!==null&&St(Pi),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ro(ut),Ie(t),null;case 25:return null;case 30:return null}throw Error(I(156,t.tag))}function bT(e,t){switch(Vp(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ro(ut),ja(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Au(t),null;case 31:if(t.memoizedState!==null){if(fn(t),t.alternate===null)throw Error(I(340));Yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(I(340));Yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return St(it),null;case 4:return ja(),null;case 10:return Ro(t.type),null;case 22:case 23:return fn(t),jp(),e!==null&&St(Pi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ro(ut),null;case 25:return null;default:return null}}function Kv(e,t){switch(Vp(t),t.tag){case 3:Ro(ut),ja();break;case 26:case 27:case 5:Au(t);break;case 4:ja();break;case 31:t.memoizedState!==null&&fn(t);break;case 13:fn(t);break;case 19:St(it);break;case 10:Ro(t.type);break;case 22:case 23:fn(t),jp(),e!==null&&St(Pi);break;case 24:Ro(ut)}}function qr(e,t){try{var n=t.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var i=o.next;n=i;do{if((n.tag&e)===e){o=void 0;var a=n.create,l=n.inst;o=a(),l.destroy=o}n=n.next}while(n!==i)}}catch(r){Re(t,t.return,r)}}function Si(e,t,n){try{var o=t.updateQueue,i=o!==null?o.lastEffect:null;if(i!==null){var a=i.next;o=a;do{if((o.tag&e)===e){var l=o.inst,r=l.destroy;if(r!==void 0){l.destroy=void 0,i=t;var s=n,u=r;try{u()}catch(c){Re(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){Re(t,t.return,c)}}function $v(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{lv(t,n)}catch(o){Re(e,e.return,o)}}}function Wv(e,t,n){n.props=ji(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Re(e,t,o)}}function vr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof n=="function"?e.refCleanup=n(o):n.current=o}}catch(i){Re(e,t,i)}}function io(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){Re(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Re(e,t,i)}else n.current=null}function Jv(e){var t=e.type,n=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&o.focus();break e;case"img":n.src?o.src=n.src:n.srcSet&&(o.srcset=n.srcSet)}}catch(i){Re(e,e.return,i)}}function xd(e,t,n){try{var o=e.stateNode;UT(o,e.type,n,t),o[tn]=t}catch(i){Re(e,e.return,i)}}function eb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ei(e.type)||e.tag===4}function _d(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||eb(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ei(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cp(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ao));else if(o!==4&&(o===27&&Ei(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cp(e,t,n),e=e.sibling;e!==null;)cp(e,t,n),e=e.sibling}function Vu(e,t,n){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(o!==4&&(o===27&&Ei(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Vu(e,t,n),e=e.sibling;e!==null;)Vu(e,t,n),e=e.sibling}function tb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Tt(t,o,n),t[Et]=e,t[tn]=n}catch(a){Re(e,e.return,a)}}var To=!1,st=!1,Ed=!1,Ly=typeof WeakSet=="function"?WeakSet:Set,vt=null;function ST(e,t){if(e=e.containerInfo,yp=Ju,e=V0(e),kp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var o=n.getSelection&&n.getSelection();if(o&&o.rangeCount!==0){n=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var l=0,r=-1,s=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(r=l+i),d!==a||o!==0&&d.nodeType!==3||(s=l+o),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(r=l),f===a&&++c===o&&(s=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=r===-1||s===-1?null:{start:r,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(vp={focusedElem:e,selectionRange:n},Ju=!1,vt=t;vt!==null;)if(t=vt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,vt=e;else for(;vt!==null;){switch(t=vt,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,o=n.stateNode;try{var y=ji(n.type,i);e=o.getSnapshotBeforeUpdate(y,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){Re(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Sp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Sp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(I(163))}if(e=t.sibling,e!==null){e.return=t.return,vt=e;break}vt=t.return}}function nb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Eo(e,n),o&4&&qr(5,n);break;case 1:if(Eo(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Re(n,n.return,l)}else{var i=ji(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Re(n,n.return,l)}}o&64&&$v(n),o&512&&vr(n,n.return);break;case 3:if(Eo(e,n),o&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{lv(e,t)}catch(l){Re(n,n.return,l)}}break;case 27:t===null&&o&4&&tb(n);case 26:case 5:Eo(e,n),t===null&&o&4&&Jv(n),o&512&&vr(n,n.return);break;case 12:Eo(e,n);break;case 31:Eo(e,n),o&4&&ab(e,n);break;case 13:Eo(e,n),o&4&&lb(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=DT.bind(null,n),jT(e,n))));break;case 22:if(o=n.memoizedState!==null||To,!o){t=t!==null&&t.memoizedState!==null||st,i=To;var a=st;To=o,(st=t)&&!a?No(e,n,(n.subtreeFlags&8772)!==0):Eo(e,n),To=i,st=a}break;case 30:break;default:Eo(e,n)}}function ob(e){var t=e.alternate;t!==null&&(e.alternate=null,ob(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Rp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ze=null,Wt=!1;function _o(e,t,n){for(n=n.child;n!==null;)ib(e,t,n),n=n.sibling}function ib(e,t,n){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(Gr,n)}catch{}switch(n.tag){case 26:st||io(n,t),_o(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:st||io(n,t);var o=Ze,i=Wt;Ei(n.type)&&(Ze=n.stateNode,Wt=!1),_o(e,t,n),_r(n.stateNode),Ze=o,Wt=i;break;case 5:st||io(n,t);case 6:if(o=Ze,i=Wt,Ze=null,_o(e,t,n),Ze=o,Wt=i,Ze!==null)if(Wt)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(n.stateNode)}catch(a){Re(n,t,a)}else try{Ze.removeChild(n.stateNode)}catch(a){Re(n,t,a)}break;case 18:Ze!==null&&(Wt?(e=Ze,Fy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ol(e)):Fy(Ze,n.stateNode));break;case 4:o=Ze,i=Wt,Ze=n.stateNode.containerInfo,Wt=!0,_o(e,t,n),Ze=o,Wt=i;break;case 0:case 11:case 14:case 15:Si(2,n,t),st||Si(4,n,t),_o(e,t,n);break;case 1:st||(io(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&Wv(n,t,o)),_o(e,t,n);break;case 21:_o(e,t,n);break;case 22:st=(o=st)||n.memoizedState!==null,_o(e,t,n),st=o;break;default:_o(e,t,n)}}function ab(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ol(e)}catch(n){Re(t,t.return,n)}}}function lb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ol(e)}catch(n){Re(t,t.return,n)}}function xT(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ly),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ly),t;default:throw Error(I(435,e.tag))}}function au(e,t){var n=xT(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=MT.bind(null,e,o);o.then(i,i)}})}function Kt(e,t){var n=t.deletions;if(n!==null)for(var o=0;o<n.length;o++){var i=n[o],a=e,l=t,r=l;e:for(;r!==null;){switch(r.tag){case 27:if(Ei(r.type)){Ze=r.stateNode,Wt=!1;break e}break;case 5:Ze=r.stateNode,Wt=!1;break e;case 3:case 4:Ze=r.stateNode.containerInfo,Wt=!0;break e}r=r.return}if(Ze===null)throw Error(I(160));ib(a,l,i),Ze=null,Wt=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)rb(t,e),t=t.sibling}var qn=null;function rb(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kt(t,e),$t(e),o&4&&(Si(3,e,e.return),qr(3,e),Si(5,e,e.return));break;case 1:Kt(t,e),$t(e),o&512&&(st||n===null||io(n,n.return)),o&64&&To&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?o:n.concat(o))));break;case 26:var i=qn;if(Kt(t,e),$t(e),o&512&&(st||n===null||io(n,n.return)),o&4){var a=n!==null?n.memoizedState:null;if(o=e.memoizedState,n===null)if(o===null)if(e.stateNode===null){e:{o=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(o){case"title":a=i.getElementsByTagName("title")[0],(!a||a[Ir]||a[Et]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),Tt(a,o,n),a[Et]=e,bt(a),o=a;break e;case"link":var l=n0("link","href",i).get(o+(n.href||""));if(l){for(var r=0;r<l.length;r++)if(a=l[r],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(r,1);break t}}a=i.createElement(o),Tt(a,o,n),i.head.appendChild(a);break;case"meta":if(l=n0("meta","content",i).get(o+(n.content||""))){for(r=0;r<l.length;r++)if(a=l[r],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(r,1);break t}}a=i.createElement(o),Tt(a,o,n),i.head.appendChild(a);break;default:throw Error(I(468,o))}a[Et]=e,bt(a),o=a}e.stateNode=o}else o0(i,e.type,e.stateNode);else e.stateNode=t0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?o0(i,e.type,e.stateNode):t0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&xd(e,e.memoizedProps,n.memoizedProps)}break;case 27:Kt(t,e),$t(e),o&512&&(st||n===null||io(n,n.return)),n!==null&&o&4&&xd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Kt(t,e),$t(e),o&512&&(st||n===null||io(n,n.return)),e.flags&32){i=e.stateNode;try{Fa(i,"")}catch(y){Re(e,e.return,y)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,xd(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Ed=!0);break;case 6:if(Kt(t,e),$t(e),o&4){if(e.stateNode===null)throw Error(I(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(y){Re(e,e.return,y)}}break;case 3:if(Eu=null,i=qn,qn=Ku(t.containerInfo),Kt(t,e),qn=i,$t(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{ol(t.containerInfo)}catch(y){Re(e,e.return,y)}Ed&&(Ed=!1,sb(e));break;case 4:o=qn,qn=Ku(e.stateNode.containerInfo),Kt(t,e),$t(e),qn=o;break;case 12:Kt(t,e),$t(e);break;case 31:Kt(t,e),$t(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 13:Kt(t,e),$t(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(dc=mn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=To,c=st;if(To=u||i,st=c||s,Kt(t,e),st=c,To=u,$t(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||To||st||ki(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(a=s.stateNode,i)l=a.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{r=s.stateNode;var d=s.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;r.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(y){Re(s,s.return,y)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(y){Re(s,s.return,y)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;i?Ky(h,!0):Ky(s.stateNode,!1)}catch(y){Re(s,s.return,y)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(n=o.retryQueue,n!==null&&(o.retryQueue=null,au(e,n))));break;case 19:Kt(t,e),$t(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,au(e,o)));break;case 30:break;case 21:break;default:Kt(t,e),$t(e)}}function $t(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(eb(o)){n=o;break}o=o.return}if(n==null)throw Error(I(160));switch(n.tag){case 27:var i=n.stateNode,a=_d(e);Vu(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(Fa(l,""),n.flags&=-33);var r=_d(e);Vu(e,r,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=_d(e);cp(e,u,s);break;default:throw Error(I(161))}}catch(c){Re(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Eo(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nb(e,t.alternate,t),t=t.sibling}function ki(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Si(4,t,t.return),ki(t);break;case 1:io(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Wv(t,t.return,n),ki(t);break;case 27:_r(t.stateNode);case 26:case 5:io(t,t.return),ki(t);break;case 22:t.memoizedState===null&&ki(t);break;case 30:ki(t);break;default:ki(t)}e=e.sibling}}function No(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,i=e,a=t,l=a.flags;switch(a.tag){case 0:case 11:case 15:No(i,a,n),qr(4,a);break;case 1:if(No(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){Re(o,o.return,u)}if(o=a,i=o.updateQueue,i!==null){var r=o.stateNode;try{var s=i.shared.hiddenCallbacks;if(s!==null)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)av(s[i],r)}catch(u){Re(o,o.return,u)}}n&&l&64&&$v(a),vr(a,a.return);break;case 27:tb(a);case 26:case 5:No(i,a,n),n&&o===null&&l&4&&Jv(a),vr(a,a.return);break;case 12:No(i,a,n);break;case 31:No(i,a,n),n&&l&4&&ab(i,a);break;case 13:No(i,a,n),n&&l&4&&lb(i,a);break;case 22:a.memoizedState===null&&No(i,a,n),vr(a,a.return);break;case 30:break;default:No(i,a,n)}t=t.sibling}}function um(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Yr(n))}function cm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yr(e))}function Xn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ub(e,t,n,o),t=t.sibling}function ub(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,n,o),i&2048&&qr(9,t);break;case 1:Xn(e,t,n,o);break;case 3:Xn(e,t,n,o),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Yr(e)));break;case 12:if(i&2048){Xn(e,t,n,o),e=t.stateNode;try{var a=t.memoizedProps,l=a.id,r=a.onPostCommit;typeof r=="function"&&r(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){Re(t,t.return,s)}}else Xn(e,t,n,o);break;case 31:Xn(e,t,n,o);break;case 13:Xn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Xn(e,t,n,o):br(e,t):a._visibility&2?Xn(e,t,n,o):(a._visibility|=2,Ta(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&um(l,t);break;case 24:Xn(e,t,n,o),i&2048&&cm(t.alternate,t);break;default:Xn(e,t,n,o)}}function Ta(e,t,n,o,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,l=t,r=n,s=o,u=l.flags;switch(l.tag){case 0:case 11:case 15:Ta(a,l,r,s,i),qr(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?Ta(a,l,r,s,i):br(a,l):(c._visibility|=2,Ta(a,l,r,s,i)),i&&u&2048&&um(l.alternate,l);break;case 24:Ta(a,l,r,s,i),i&&u&2048&&cm(l.alternate,l);break;default:Ta(a,l,r,s,i)}t=t.sibling}}function br(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,o=t,i=o.flags;switch(o.tag){case 22:br(n,o),i&2048&&um(o.alternate,o);break;case 24:br(n,o),i&2048&&cm(o.alternate,o);break;default:br(n,o)}t=t.sibling}}var ur=8192;function Ca(e,t,n){if(e.subtreeFlags&ur)for(e=e.child;e!==null;)cb(e,t,n),e=e.sibling}function cb(e,t,n){switch(e.tag){case 26:Ca(e,t,n),e.flags&ur&&e.memoizedState!==null&&aw(n,qn,e.memoizedState,e.memoizedProps);break;case 5:Ca(e,t,n);break;case 3:case 4:var o=qn;qn=Ku(e.stateNode.containerInfo),Ca(e,t,n),qn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=ur,ur=16777216,Ca(e,t,n),ur=o):Ca(e,t,n));break;default:Ca(e,t,n)}}function fb(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function nr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];vt=o,pb(o,e)}fb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)db(e),e=e.sibling}function db(e){switch(e.tag){case 0:case 11:case 15:nr(e),e.flags&2048&&Si(9,e,e.return);break;case 3:nr(e);break;case 12:nr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,xu(e)):nr(e);break;default:nr(e)}}function xu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var o=t[n];vt=o,pb(o,e)}fb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Si(8,t,t.return),xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,xu(t));break;default:xu(t)}e=e.sibling}}function pb(e,t){for(;vt!==null;){var n=vt;switch(n.tag){case 0:case 11:case 15:Si(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var o=n.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Yr(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,vt=o;else e:for(n=e;vt!==null;){o=vt;var i=o.sibling,a=o.return;if(ob(o),o===n){vt=null;break e}if(i!==null){i.return=a,vt=i;break e}vt=a}}}var _T={getCacheForType:function(e){var t=Ct(ut),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ct(ut).controller.signal}},ET=typeof WeakMap=="function"?WeakMap:Map,Ae=0,ke=null,Se=null,_e=0,Me=0,cn=null,li=!1,sl=!1,fm=!1,ko=0,et=0,xi=0,Vi=0,dm=0,pn=0,Ja=0,Sr=null,Jt=null,fp=!1,dc=0,mb=0,Yu=1/0,Xu=null,pi=null,pt=0,mi=null,el=null,Oo=0,dp=0,pp=null,hb=null,xr=0,mp=null;function yn(){return(Ae&2)!==0&&_e!==0?_e&-_e:se.T!==null?mm():N0()}function gb(){if(pn===0)if((_e&536870912)===0||Ee){var e=Fs;Fs<<=1,(Fs&3932160)===0&&(Fs=262144),pn=e}else pn=536870912;return e=bn.current,e!==null&&(e.flags|=32),pn}function en(e,t,n){(e===ke&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(tl(e,0),ri(e,_e,pn,!1)),Pr(e,n),((Ae&2)===0||e!==ke)&&(e===ke&&((Ae&2)===0&&(Vi|=n),et===4&&ri(e,_e,pn,!1)),ro(e))}function yb(e,t,n){if((Ae&6)!==0)throw Error(I(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ur(e,t),i=o?TT(e,t):Nd(e,t,!0),a=o;do{if(i===0){sl&&!o&&ri(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!NT(n)){i=Nd(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var r=e;i=Sr;var s=r.current.memoizedState.isDehydrated;if(s&&(tl(r,l).flags|=256),l=Nd(r,l,!1),l!==2){if(fm&&!s){r.errorRecoveryDisabledLanes|=a,Vi|=a,i=4;break e}a=Jt,Jt=i,a!==null&&(Jt===null?Jt=a:Jt.push.apply(Jt,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){tl(e,0),ri(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(I(345));case 4:if((t&4194048)!==t)break;case 6:ri(o,t,pn,!li);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(I(329))}if((t&62914560)===t&&(i=dc+300-mn(),10<i)){if(ri(o,t,pn,!li),tc(o,0,!0)!==0)break e;Oo=t,o.timeoutHandle=kb(By.bind(null,o,n,Jt,Xu,fp,t,pn,Vi,Ja,li,a,"Throttled",-0,0),i);break e}By(o,n,Jt,Xu,fp,t,pn,Vi,Ja,li,a,null,-0,0)}}break}while(!0);ro(e)}function By(e,t,n,o,i,a,l,r,s,u,c,d,f,h){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ao},cb(t,a,d);var y=(a&62914560)===a?dc-mn():(a&4194048)===a?mb-mn():0;if(y=lw(d,y),y!==null){Oo=a,e.cancelPendingCommit=y(ky.bind(null,e,t,a,n,o,i,l,r,s,c,d,null,f,h)),ri(e,a,l,!u);return}}ky(e,t,a,n,o,i,l,r,s)}function NT(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var o=0;o<n.length;o++){var i=n[o],a=i.getSnapshot;i=i.value;try{if(!vn(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ri(e,t,n,o){t&=~dm,t&=~Vi,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-gn(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&x0(e,n,t)}function pc(){return(Ae&6)===0?(Zr(0,!1),!1):!0}function pm(){if(Se!==null){if(Me===0)var e=Se.return;else e=Se,Do=Wi=null,Wp(e),Xa=null,Dr=0,e=Se;for(;e!==null;)Kv(e.alternate,e),e=e.return;Se=null}}function tl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,VT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Oo=0,pm(),ke=e,Se=n=Mo(e.current,null),_e=t,Me=0,cn=null,li=!1,sl=Ur(e,t),fm=!1,Ja=pn=dm=Vi=xi=et=0,Jt=Sr=null,fp=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var i=31-gn(o),a=1<<i;t|=e[i],o&=~a}return ko=t,ac(),n}function vb(e,t){me=null,se.H=Rr,t===rl||t===rc?(t=py(),Me=3):t===qp?(t=py(),Me=4):Me=t===rm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,cn=t,Se===null&&(et=1,Pu(e,On(t,e.current)))}function bb(){var e=bn.current;return e===null?!0:(_e&4194048)===_e?Ln===null:(_e&62914560)===_e||(_e&536870912)!==0?e===Ln:!1}function Sb(){var e=se.H;return se.H=Rr,e===null?Rr:e}function xb(){var e=se.A;return se.A=_T,e}function qu(){et=4,li||(_e&4194048)!==_e&&bn.current!==null||(sl=!0),(xi&134217727)===0&&(Vi&134217727)===0||ke===null||ri(ke,_e,pn,!1)}function Nd(e,t,n){var o=Ae;Ae|=2;var i=Sb(),a=xb();(ke!==e||_e!==t)&&(Xu=null,tl(e,t)),t=!1;var l=et;e:do try{if(Me!==0&&Se!==null){var r=Se,s=cn;switch(Me){case 8:pm(),l=6;break e;case 3:case 2:case 9:case 6:bn.current===null&&(t=!0);var u=Me;if(Me=0,cn=null,Ua(e,r,s,u),n&&sl){l=0;break e}break;default:u=Me,Me=0,cn=null,Ua(e,r,s,u)}}CT(),l=et;break}catch(c){vb(e,c)}while(!0);return t&&e.shellSuspendCounter++,Do=Wi=null,Ae=o,se.H=i,se.A=a,Se===null&&(ke=null,_e=0,ac()),l}function CT(){for(;Se!==null;)_b(Se)}function TT(e,t){var n=Ae;Ae|=2;var o=Sb(),i=xb();ke!==e||_e!==t?(Xu=null,Yu=mn()+500,tl(e,t)):sl=Ur(e,t);e:do try{if(Me!==0&&Se!==null){t=Se;var a=cn;t:switch(Me){case 1:Me=0,cn=null,Ua(e,t,a,1);break;case 2:case 9:if(dy(a)){Me=0,cn=null,Hy(t);break}t=function(){Me!==2&&Me!==9||ke!==e||(Me=7),ro(e)},a.then(t,t);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:dy(a)?(Me=0,cn=null,Hy(t)):(Me=0,cn=null,Ua(e,t,a,7));break;case 5:var l=null;switch(Se.tag){case 26:l=Se.memoizedState;case 5:case 27:var r=Se;if(l?Vb(l):r.stateNode.complete){Me=0,cn=null;var s=r.sibling;if(s!==null)Se=s;else{var u=r.return;u!==null?(Se=u,mc(u)):Se=null}break t}}Me=0,cn=null,Ua(e,t,a,5);break;case 6:Me=0,cn=null,Ua(e,t,a,6);break;case 8:pm(),et=6;break e;default:throw Error(I(462))}}wT();break}catch(c){vb(e,c)}while(!0);return Do=Wi=null,se.H=o,se.A=i,Ae=n,Se!==null?0:(ke=null,_e=0,ac(),et)}function wT(){for(;Se!==null&&!KN();)_b(Se)}function _b(e){var t=Fv(e.alternate,e,ko);e.memoizedProps=e.pendingProps,t===null?mc(e):Se=t}function Hy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Dy(n,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=Dy(n,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:Wp(t);default:Kv(n,t),t=Se=K0(t,ko),t=Fv(n,t,ko)}e.memoizedProps=e.pendingProps,t===null?mc(e):Se=t}function Ua(e,t,n,o){Do=Wi=null,Wp(t),Xa=null,Dr=0;var i=t.return;try{if(hT(e,i,t,n,_e)){et=1,Pu(e,On(n,e.current)),Se=null;return}}catch(a){if(i!==null)throw Se=i,a;et=1,Pu(e,On(n,e.current)),Se=null;return}t.flags&32768?(Ee||o===1?e=!0:sl||(_e&536870912)!==0?e=!1:(li=e=!0,(o===2||o===9||o===3||o===6)&&(o=bn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Eb(t,e)):mc(t)}function mc(e){var t=e;do{if((t.flags&32768)!==0){Eb(t,li);return}e=t.return;var n=vT(t.alternate,t,ko);if(n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);et===0&&(et=5)}function Eb(e,t){do{var n=bT(e.alternate,e);if(n!==null){n.flags&=32767,Se=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=n}while(e!==null);et=6,Se=null}function ky(e,t,n,o,i,a,l,r,s){e.cancelPendingCommit=null;do hc();while(pt!==0);if((Ae&6)!==0)throw Error(I(327));if(t!==null){if(t===e.current)throw Error(I(177));if(a=t.lanes|t.childLanes,a|=Gp,lC(e,n,a,l,r,s),e===ke&&(Se=ke=null,_e=0),el=t,mi=e,Oo=n,dp=a,pp=i,hb=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,RT(Du,function(){return Ab(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=se.T,se.T=null,i=De.p,De.p=2,l=Ae,Ae|=4;try{ST(e,t,n)}finally{Ae=l,De.p=i,se.T=o}}pt=1,Nb(),Cb(),Tb()}}function Nb(){if(pt===1){pt=0;var e=mi,t=el,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=se.T,se.T=null;var o=De.p;De.p=2;var i=Ae;Ae|=4;try{rb(t,e);var a=vp,l=V0(e.containerInfo),r=a.focusedElem,s=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&I0(r.ownerDocument.documentElement,r)){if(s!==null&&kp(r)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in r)r.selectionStart=u,r.selectionEnd=Math.min(c,r.value.length);else{var d=r.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var h=f.getSelection(),y=r.textContent.length,b=Math.min(s.start,y),S=s.end===void 0?b:Math.min(s.end,y);!h.extend&&b>S&&(l=S,S=b,b=l);var p=ay(r,b),v=ay(r,S);if(p&&v&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==v.node||h.focusOffset!==v.offset)){var m=d.createRange();m.setStart(p.node,p.offset),h.removeAllRanges(),b>S?(h.addRange(m),h.extend(v.node,v.offset)):(m.setEnd(v.node,v.offset),h.addRange(m))}}}}for(d=[],h=r;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<d.length;r++){var g=d[r];g.element.scrollLeft=g.left,g.element.scrollTop=g.top}}Ju=!!yp,vp=yp=null}finally{Ae=i,De.p=o,se.T=n}}e.current=t,pt=2}}function Cb(){if(pt===2){pt=0;var e=mi,t=el,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=se.T,se.T=null;var o=De.p;De.p=2;var i=Ae;Ae|=4;try{nb(e,t.alternate,t)}finally{Ae=i,De.p=o,se.T=n}}pt=3}}function Tb(){if(pt===4||pt===3){pt=0,$N();var e=mi,t=el,n=Oo,o=hb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?pt=5:(pt=0,el=mi=null,wb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(pi=null),Mp(n),t=t.stateNode,hn&&typeof hn.onCommitFiberRoot=="function")try{hn.onCommitFiberRoot(Gr,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=se.T,i=De.p,De.p=2,se.T=null;try{for(var a=e.onRecoverableError,l=0;l<o.length;l++){var r=o[l];a(r.value,{componentStack:r.stack})}}finally{se.T=t,De.p=i}}(Oo&3)!==0&&hc(),ro(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===mp?xr++:(xr=0,mp=e):xr=0,Zr(0,!1)}}function wb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Yr(t)))}function hc(){return Nb(),Cb(),Tb(),Ab()}function Ab(){if(pt!==5)return!1;var e=mi,t=dp;dp=0;var n=Mp(Oo),o=se.T,i=De.p;try{De.p=32>n?32:n,se.T=null,n=pp,pp=null;var a=mi,l=Oo;if(pt=0,el=mi=null,Oo=0,(Ae&6)!==0)throw Error(I(331));var r=Ae;if(Ae|=4,db(a.current),ub(a,a.current,l,n),Ae=r,Zr(0,!1),hn&&typeof hn.onPostCommitFiberRoot=="function")try{hn.onPostCommitFiberRoot(Gr,a)}catch{}return!0}finally{De.p=i,se.T=o,wb(e,t)}}function Gy(e,t,n){t=On(n,t),t=rp(e.stateNode,t,2),e=di(e,t,2),e!==null&&(Pr(e,2),ro(e))}function Re(e,t,n){if(e.tag===3)Gy(e,e,n);else for(;t!==null;){if(t.tag===3){Gy(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(pi===null||!pi.has(o))){e=On(n,e),n=Yv(2),o=di(t,n,2),o!==null&&(Xv(n,o,t,e),Pr(o,2),ro(o));break}}t=t.return}}function Cd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new ET;var i=new Set;o.set(t,i)}else i=o.get(t),i===void 0&&(i=new Set,o.set(t,i));i.has(n)||(fm=!0,i.add(n),e=AT.bind(null,e,t,n),t.then(e,e))}function AT(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ke===e&&(_e&n)===n&&(et===4||et===3&&(_e&62914560)===_e&&300>mn()-dc?(Ae&2)===0&&tl(e,0):dm|=n,Ja===_e&&(Ja=0)),ro(e)}function Db(e,t){t===0&&(t=S0()),e=$i(e,t),e!==null&&(Pr(e,t),ro(e))}function DT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Db(e,n)}function MT(e,t){var n=0;switch(e.tag){case 31:case 13:var o=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(I(314))}o!==null&&o.delete(t),Db(e,n)}function RT(e,t){return Ap(e,t)}var Zu=null,wa=null,hp=!1,ju=!1,Td=!1,si=0;function ro(e){e!==wa&&e.next===null&&(wa===null?Zu=wa=e:wa=wa.next=e),ju=!0,hp||(hp=!0,zT())}function Zr(e,t){if(!Td&&ju){Td=!0;do for(var n=!1,o=Zu;o!==null;){if(!t)if(e!==0){var i=o.pendingLanes;if(i===0)var a=0;else{var l=o.suspendedLanes,r=o.pingedLanes;a=(1<<31-gn(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Uy(o,a))}else a=_e,a=tc(o,o===ke?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||Ur(o,a)||(n=!0,Uy(o,a));o=o.next}while(n);Td=!1}}function OT(){Mb()}function Mb(){ju=hp=!1;var e=0;si!==0&&IT()&&(e=si);for(var t=mn(),n=null,o=Zu;o!==null;){var i=o.next,a=Rb(o,t);a===0?(o.next=null,n===null?Zu=i:n.next=i,i===null&&(wa=n)):(n=o,(e!==0||(a&3)!==0)&&(ju=!0)),o=i}pt!==0&&pt!==5||Zr(e,!1),si!==0&&(si=0)}function Rb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-gn(a),r=1<<l,s=i[l];s===-1?((r&n)===0||(r&o)!==0)&&(i[l]=aC(r,t)):s<=t&&(e.expiredLanes|=r),a&=~r}if(t=ke,n=_e,n=tc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&td(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ur(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&td(o),Mp(n)){case 2:case 8:n=v0;break;case 32:n=Du;break;case 268435456:n=b0;break;default:n=Du}return o=Ob.bind(null,e),n=Ap(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&td(o),e.callbackPriority=2,e.callbackNode=null,2}function Ob(e,t){if(pt!==0&&pt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(hc()&&e.callbackNode!==n)return null;var o=_e;return o=tc(e,e===ke?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(yb(e,o,t),Rb(e,mn()),e.callbackNode!=null&&e.callbackNode===n?Ob.bind(null,e):null)}function Uy(e,t){if(hc())return null;yb(e,t,!0)}function zT(){YT(function(){(Ae&6)!==0?Ap(y0,OT):Mb()})}function mm(){if(si===0){var e=Ka;e===0&&(e=Qs,Qs<<=1,(Qs&261888)===0&&(Qs=256)),si=e}return si}function Py(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:du(""+e)}function Iy(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function LT(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=Py((i[tn]||null).action),l=o.submitter;l&&(t=(t=l[tn]||null)?Py(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new nc("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(si!==0){var s=l?Iy(i,l):new FormData(i);ap(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(r.preventDefault(),s=l?Iy(i,l):new FormData(i),ap(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(lu=0;lu<jd.length;lu++)ru=jd[lu],Vy=ru.toLowerCase(),Yy=ru[0].toUpperCase()+ru.slice(1),Zn(Vy,"on"+Yy);var ru,Vy,Yy,lu;Zn(X0,"onAnimationEnd");Zn(q0,"onAnimationIteration");Zn(Z0,"onAnimationStart");Zn("dblclick","onDoubleClick");Zn("focusin","onFocus");Zn("focusout","onBlur");Zn(WC,"onTransitionRun");Zn(JC,"onTransitionStart");Zn(eT,"onTransitionCancel");Zn(j0,"onTransitionEnd");Qa("onMouseEnter",["mouseout","mouseover"]);Qa("onMouseLeave",["mouseout","mouseover"]);Qa("onPointerEnter",["pointerout","pointerover"]);Qa("onPointerLeave",["pointerout","pointerover"]);Qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="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(" "),BT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Or));function zb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var o=e[n],i=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var l=o.length-1;0<=l;l--){var r=o[l],s=r.instance,u=r.currentTarget;if(r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){Ru(c)}i.currentTarget=null,a=s}else for(l=0;l<o.length;l++){if(r=o[l],s=r.instance,u=r.currentTarget,r=r.listener,s!==a&&i.isPropagationStopped())break e;a=r,i.currentTarget=u;try{a(i)}catch(c){Ru(c)}i.currentTarget=null,a=s}}}}function be(e,t){var n=t[Ud];n===void 0&&(n=t[Ud]=new Set);var o=e+"__bubble";n.has(o)||(Lb(t,e,2,!1),n.add(o))}function wd(e,t,n){var o=0;t&&(o|=4),Lb(n,e,o,t)}var su="_reactListening"+Math.random().toString(36).slice(2);function hm(e){if(!e[su]){e[su]=!0,C0.forEach(function(n){n!=="selectionchange"&&(BT.has(n)||wd(n,!1,e),wd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[su]||(t[su]=!0,wd("selectionchange",!1,t))}}function Lb(e,t,n,o){switch(jb(t)){case 2:var i=uw;break;case 8:i=cw;break;default:i=bm}n=i.bind(null,t,n,e),i=void 0,!Xd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),o?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Ad(e,t,n,o,i){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var l=o.tag;if(l===3||l===4){var r=o.stateNode.containerInfo;if(r===i)break;if(l===4)for(l=o.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===i)return;l=l.return}for(;r!==null;){if(l=Ma(r),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){o=a=l;continue e}r=r.parentNode}}o=o.return}z0(function(){var u=a,c=zp(n),d=[];e:{var f=Q0.get(e);if(f!==void 0){var h=nc,y=e;switch(e){case"keypress":if(mu(n)===0)break e;case"keydown":case"keyup":h=MC;break;case"focusin":y="focus",h=ld;break;case"focusout":y="blur",h=ld;break;case"beforeblur":case"afterblur":h=ld;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Kg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=vC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=zC;break;case X0:case q0:case Z0:h=xC;break;case j0:h=BC;break;case"scroll":case"scrollend":h=gC;break;case"wheel":h=kC;break;case"copy":case"cut":case"paste":h=EC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Wg;break;case"toggle":case"beforetoggle":h=UC}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),p=b?f!==null?f+"Capture":null:f;b=[];for(var v=u,m;v!==null;){var g=v;if(m=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||m===null||p===null||(g=Nr(v,p),g!=null&&b.push(zr(v,g,m))),S)break;v=v.return}0<b.length&&(f=new h(f,y,null,n,c),d.push({event:f,listeners:b}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Yd&&(y=n.relatedTarget||n.fromElement)&&(Ma(y)||y[il]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?Ma(y):null,y!==null&&(S=kr(y),b=y.tag,y!==S||b!==5&&b!==27&&b!==6)&&(y=null)):(h=null,y=u),h!==y)){if(b=Kg,g="onMouseLeave",p="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(b=Wg,g="onPointerLeave",p="onPointerEnter",v="pointer"),S=h==null?f:rr(h),m=y==null?f:rr(y),f=new b(g,v+"leave",h,n,c),f.target=S,f.relatedTarget=m,g=null,Ma(c)===u&&(b=new b(p,v+"enter",y,n,c),b.target=m,b.relatedTarget=S,g=b),S=g,h&&y)t:{for(b=HT,p=h,v=y,m=0,g=p;g;g=b(g))m++;g=0;for(var x=v;x;x=b(x))g++;for(;0<m-g;)p=b(p),m--;for(;0<g-m;)v=b(v),g--;for(;m--;){if(p===v||v!==null&&p===v.alternate){b=p;break t}p=b(p),v=b(v)}b=null}else b=null;h!==null&&Xy(d,f,h,b,!1),y!==null&&S!==null&&Xy(d,S,y,b,!0)}}e:{if(f=u?rr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=ny;else if(ty(f))if(U0)_=FC;else{_=jC;var N=ZC}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Op(u.elementType)&&(_=ny):_=QC;if(_&&(_=_(e,u))){G0(d,_,n,c);break e}N&&N(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&Vd(f,"number",f.value)}switch(N=u?rr(u):window,e){case"focusin":(ty(N)||N.contentEditable==="true")&&(za=N,qd=u,dr=null);break;case"focusout":dr=qd=za=null;break;case"mousedown":Zd=!0;break;case"contextmenu":case"mouseup":case"dragend":Zd=!1,ly(d,n,c);break;case"selectionchange":if($C)break;case"keydown":case"keyup":ly(d,n,c)}var C;if(Hp)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Oa?H0(e,n)&&(w="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(w="onCompositionStart");w&&(B0&&n.locale!=="ko"&&(Oa||w!=="onCompositionStart"?w==="onCompositionEnd"&&Oa&&(C=L0()):(ai=c,Lp="value"in ai?ai.value:ai.textContent,Oa=!0)),N=Qu(u,w),0<N.length&&(w=new $g(w,e,null,n,c),d.push({event:w,listeners:N}),C?w.data=C:(C=k0(n),C!==null&&(w.data=C)))),(C=IC?VC(e,n):YC(e,n))&&(w=Qu(u,"onBeforeInput"),0<w.length&&(N=new $g("onBeforeInput","beforeinput",null,n,c),d.push({event:N,listeners:w}),N.data=C)),LT(d,e,u,n,c)}zb(d,t)})}function zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qu(e,t){for(var n=t+"Capture",o=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Nr(e,n),i!=null&&o.unshift(zr(e,i,a)),i=Nr(e,t),i!=null&&o.push(zr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function HT(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Xy(e,t,n,o,i){for(var a=t._reactName,l=[];n!==null&&n!==o;){var r=n,s=r.alternate,u=r.stateNode;if(r=r.tag,s!==null&&s===o)break;r!==5&&r!==26&&r!==27||u===null||(s=u,i?(u=Nr(n,a),u!=null&&l.unshift(zr(n,u,s))):i||(u=Nr(n,a),u!=null&&l.push(zr(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var kT=/\r\n?/g,GT=/\u0000|\uFFFD/g;function qy(e){return(typeof e=="string"?e:""+e).replace(kT,`
2264
+ `).replace(GT,"")}function Bb(e,t){return t=qy(t),qy(e)===t}function Le(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||Fa(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&Fa(e,""+o);break;case"className":$s(e,"class",o);break;case"tabIndex":$s(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":$s(e,n,o);break;case"style":O0(e,o,a);break;case"data":if(t!=="object"){$s(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=du(""+o),e.setAttribute(n,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&Le(e,t,"name",i.name,i,null),Le(e,t,"formEncType",i.formEncType,i,null),Le(e,t,"formMethod",i.formMethod,i,null),Le(e,t,"formTarget",i.formTarget,i,null)):(Le(e,t,"encType",i.encType,i,null),Le(e,t,"method",i.method,i,null),Le(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=du(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=Ao);break;case"onScroll":o!=null&&be("scroll",e);break;case"onScrollEnd":o!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(I(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(I(60));e.innerHTML=n}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}n=du(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""+o):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":o===!0?e.setAttribute(n,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(n,o):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(n,o):e.removeAttribute(n);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(n):e.setAttribute(n,o);break;case"popover":be("beforetoggle",e),be("toggle",e),fu(e,"popover",o);break;case"xlinkActuate":So(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":So(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":So(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":So(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":So(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":So(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":So(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":So(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":So(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":fu(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=mC.get(n)||n,fu(e,n,o))}}function gp(e,t,n,o,i,a){switch(n){case"style":O0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(I(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(I(60));e.innerHTML=n}}break;case"children":typeof o=="string"?Fa(e,o):(typeof o=="number"||typeof o=="bigint")&&Fa(e,""+o);break;case"onScroll":o!=null&&be("scroll",e);break;case"onScrollEnd":o!=null&&be("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Ao);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!T0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),a=e[tn]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,i),typeof o=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,o,i);break e}n in e?e[n]=o:o===!0?e.setAttribute(n,""):fu(e,n,o)}}}function Tt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var o=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var l=n[a];if(l!=null)switch(a){case"src":o=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:Le(e,t,a,l,n,null)}}i&&Le(e,t,"srcSet",n.srcSet,n,null),o&&Le(e,t,"src",n.src,n,null);return;case"input":be("invalid",e);var r=a=l=i=null,s=null,u=null;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"name":i=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":a=c;break;case"defaultValue":r=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(I(137,t));break;default:Le(e,t,o,c,n,null)}}D0(e,a,r,s,u,l,i,!1);return;case"select":be("invalid",e),o=l=a=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":a=r;break;case"defaultValue":l=r;break;case"multiple":o=r;default:Le(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?Ia(e,!!o,t,!1):n!=null&&Ia(e,!!o,n,!0);return;case"textarea":be("invalid",e),a=i=o=null;for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"value":o=r;break;case"defaultValue":i=r;break;case"children":a=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(I(91));break;default:Le(e,t,l,r,n,null)}R0(e,o,i,a);return;case"option":for(s in n)n.hasOwnProperty(s)&&(o=n[s],o!=null)&&(s==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Le(e,t,s,o,n,null));return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(o=0;o<Or.length;o++)be(Or[o],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(o=n[u],o!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(I(137,t));default:Le(e,t,u,o,n,null)}return;default:if(Op(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&gp(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&Le(e,t,r,o,n,null))}function UT(e,t,n,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,a=null,l=null,r=null,s=null,u=null,c=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=d;default:o.hasOwnProperty(h)||Le(e,t,h,null,o,d)}}for(var f in o){var h=o[f];if(d=n[f],o.hasOwnProperty(f)&&(h!=null||d!=null))switch(f){case"type":a=h;break;case"name":i=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":l=h;break;case"defaultValue":r=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(I(137,t));break;default:h!==d&&Le(e,t,f,h,o,d)}}Id(e,l,r,s,u,c,a,i);return;case"select":h=l=r=f=null;for(a in n)if(s=n[a],n.hasOwnProperty(a)&&s!=null)switch(a){case"value":break;case"multiple":h=s;default:o.hasOwnProperty(a)||Le(e,t,a,null,o,s)}for(i in o)if(a=o[i],s=n[i],o.hasOwnProperty(i)&&(a!=null||s!=null))switch(i){case"value":f=a;break;case"defaultValue":r=a;break;case"multiple":l=a;default:a!==s&&Le(e,t,i,a,o,s)}t=r,n=l,o=h,f!=null?Ia(e,!!n,f,!1):!!o!=!!n&&(t!=null?Ia(e,!!n,t,!0):Ia(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(r in n)if(i=n[r],n.hasOwnProperty(r)&&i!=null&&!o.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:Le(e,t,r,null,o,i)}for(l in o)if(i=o[l],a=n[l],o.hasOwnProperty(l)&&(i!=null||a!=null))switch(l){case"value":f=i;break;case"defaultValue":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(I(91));break;default:i!==a&&Le(e,t,l,i,o,a)}M0(e,f,h);return;case"option":for(var y in n)f=n[y],n.hasOwnProperty(y)&&f!=null&&!o.hasOwnProperty(y)&&(y==="selected"?e.selected=!1:Le(e,t,y,null,o,f));for(s in o)f=o[s],h=n[s],o.hasOwnProperty(s)&&f!==h&&(f!=null||h!=null)&&(s==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":Le(e,t,s,f,o,h));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!o.hasOwnProperty(b)&&Le(e,t,b,null,o,f);for(u in o)if(f=o[u],h=n[u],o.hasOwnProperty(u)&&f!==h&&(f!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(I(137,t));break;default:Le(e,t,u,f,o,h)}return;default:if(Op(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&gp(e,t,S,void 0,o,f);for(c in o)f=o[c],h=n[c],!o.hasOwnProperty(c)||f===h||f===void 0&&h===void 0||gp(e,t,c,f,o,h);return}}for(var p in n)f=n[p],n.hasOwnProperty(p)&&f!=null&&!o.hasOwnProperty(p)&&Le(e,t,p,null,o,f);for(d in o)f=o[d],h=n[d],!o.hasOwnProperty(d)||f===h||f==null&&h==null||Le(e,t,d,f,o,h)}function Zy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PT(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),o=0;o<n.length;o++){var i=n[o],a=i.transferSize,l=i.initiatorType,r=i.duration;if(a&&r&&Zy(l)){for(l=0,r=i.responseEnd,o+=1;o<n.length;o++){var s=n[o],u=s.startTime;if(u>r)break;var c=s.transferSize,d=s.initiatorType;c&&Zy(d)&&(s=s.responseEnd,l+=c*(s<r?1:(r-u)/(s-u)))}if(--o,t+=8*(a+l)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var yp=null,vp=null;function Fu(e){return e.nodeType===9?e:e.ownerDocument}function jy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hb(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function bp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Dd=null;function IT(){var e=window.event;return e&&e.type==="popstate"?e===Dd?!1:(Dd=e,!0):(Dd=null,!1)}var kb=typeof setTimeout=="function"?setTimeout:void 0,VT=typeof clearTimeout=="function"?clearTimeout:void 0,Qy=typeof Promise=="function"?Promise:void 0,YT=typeof queueMicrotask=="function"?queueMicrotask:typeof Qy<"u"?function(e){return Qy.resolve(null).then(e).catch(XT)}:kb;function XT(e){setTimeout(function(){throw e})}function Ei(e){return e==="head"}function Fy(e,t){var n=t,o=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(o===0){e.removeChild(i),ol(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")_r(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,_r(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[Ir]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&_r(e.ownerDocument.body);n=i}while(n);ol(t)}function Ky(e,t){var n=e;e=0;do{var o=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=o}while(n)}function Sp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Sp(n),Rp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function qT(e,t,n,o){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[Ir])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Bn(e.nextSibling),e===null)break}return null}function ZT(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Bn(e.nextSibling),e===null))return null;return e}function Gb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Bn(e.nextSibling),e===null))return null;return e}function xp(e){return e.data==="$?"||e.data==="$~"}function _p(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function jT(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var o=function(){t(),n.removeEventListener("DOMContentLoaded",o)};n.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function Bn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ep=null;function $y(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Bn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Wy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Ub(e,t,n){switch(t=Fu(n),e){case"html":if(e=t.documentElement,!e)throw Error(I(452));return e;case"head":if(e=t.head,!e)throw Error(I(453));return e;case"body":if(e=t.body,!e)throw Error(I(454));return e;default:throw Error(I(451))}}function _r(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Rp(e)}var Hn=new Map,Jy=new Set;function Ku(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Go=De.d;De.d={f:QT,r:FT,D:KT,C:$T,L:WT,m:JT,X:tw,S:ew,M:nw};function QT(){var e=Go.f(),t=pc();return e||t}function FT(e){var t=al(e);t!==null&&t.tag===5&&t.type==="form"?Ov(t):Go.r(e)}var ul=typeof document>"u"?null:document;function Pb(e,t,n){var o=ul;if(o&&typeof t=="string"&&t){var i=Rn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Jy.has(i)||(Jy.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),Tt(t,"link",e),bt(t),o.head.appendChild(t)))}}function KT(e){Go.D(e),Pb("dns-prefetch",e,null)}function $T(e,t){Go.C(e,t),Pb("preconnect",e,t)}function WT(e,t,n){Go.L(e,t,n);var o=ul;if(o&&e&&t){var i='link[rel="preload"][as="'+Rn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Rn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Rn(n.imageSizes)+'"]')):i+='[href="'+Rn(e)+'"]';var a=i;switch(t){case"style":a=nl(e);break;case"script":a=cl(e)}Hn.has(a)||(e=Ye({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Hn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(jr(a))||t==="script"&&o.querySelector(Qr(a))||(t=o.createElement("link"),Tt(t,"link",e),bt(t),o.head.appendChild(t)))}}function JT(e,t){Go.m(e,t);var n=ul;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Rn(o)+'"][href="'+Rn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=cl(e)}if(!Hn.has(a)&&(e=Ye({rel:"modulepreload",href:e},t),Hn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Qr(a)))return}o=n.createElement("link"),Tt(o,"link",e),bt(o),n.head.appendChild(o)}}}function ew(e,t,n){Go.S(e,t,n);var o=ul;if(o&&e){var i=Pa(o).hoistableStyles,a=nl(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(jr(a)))r.loading=5;else{e=Ye({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Hn.get(a))&&gm(e,n);var s=l=o.createElement("link");bt(s),Tt(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){r.loading|=1}),s.addEventListener("error",function(){r.loading|=2}),r.loading|=4,_u(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function tw(e,t){Go.X(e,t);var n=ul;if(n&&e){var o=Pa(n).hoistableScripts,i=cl(e),a=o.get(i);a||(a=n.querySelector(Qr(i)),a||(e=Ye({src:e,async:!0},t),(t=Hn.get(i))&&ym(e,t),a=n.createElement("script"),bt(a),Tt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function nw(e,t){Go.M(e,t);var n=ul;if(n&&e){var o=Pa(n).hoistableScripts,i=cl(e),a=o.get(i);a||(a=n.querySelector(Qr(i)),a||(e=Ye({src:e,async:!0,type:"module"},t),(t=Hn.get(i))&&ym(e,t),a=n.createElement("script"),bt(a),Tt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function e0(e,t,n,o){var i=(i=ui.current)?Ku(i):null;if(!i)throw Error(I(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=nl(n.href),n=Pa(i).hoistableStyles,o=n.get(t),o||(o={type:"style",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=nl(n.href);var a=Pa(i).hoistableStyles,l=a.get(e);if(l||(i=i.ownerDocument||i,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,l),(a=i.querySelector(jr(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Hn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Hn.set(e,n),a||ow(i,e,n,l.state))),t&&o===null)throw Error(I(528,""));return l}if(t&&o!==null)throw Error(I(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=cl(n),n=Pa(i).hoistableScripts,o=n.get(t),o||(o={type:"script",instance:null,count:0,state:null},n.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(I(444,e))}}function nl(e){return'href="'+Rn(e)+'"'}function jr(e){return'link[rel="stylesheet"]['+e+"]"}function Ib(e){return Ye({},e,{"data-precedence":e.precedence,precedence:null})}function ow(e,t,n,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),Tt(t,"link",n),bt(t),e.head.appendChild(t))}function cl(e){return'[src="'+Rn(e)+'"]'}function Qr(e){return"script[async]"+e}function t0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Rn(n.href)+'"]');if(o)return t.instance=o,bt(o),o;var i=Ye({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),bt(o),Tt(o,"style",i),_u(o,n.precedence,e),t.instance=o;case"stylesheet":i=nl(n.href);var a=e.querySelector(jr(i));if(a)return t.state.loading|=4,t.instance=a,bt(a),a;o=Ib(n),(i=Hn.get(i))&&gm(o,i),a=(e.ownerDocument||e).createElement("link"),bt(a);var l=a;return l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),Tt(a,"link",o),t.state.loading|=4,_u(a,n.precedence,e),t.instance=a;case"script":return a=cl(n.src),(i=e.querySelector(Qr(a)))?(t.instance=i,bt(i),i):(o=n,(i=Hn.get(a))&&(o=Ye({},n),ym(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),bt(i),Tt(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(I(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,_u(o,n.precedence,e));return t.instance}function _u(e,t,n){for(var o=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=o.length?o[o.length-1]:null,a=i,l=0;l<o.length;l++){var r=o[l];if(r.dataset.precedence===t)a=r;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function gm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ym(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Eu=null;function n0(e,t,n){if(Eu===null){var o=new Map,i=Eu=new Map;i.set(n,o)}else i=Eu,o=i.get(n),o||(o=new Map,i.set(n,o));if(o.has(e))return o;for(o.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Ir]||a[Et]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var l=a.getAttribute(t)||"";l=e+l;var r=o.get(l);r?r.push(a):o.set(l,[a])}}return o}function o0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function iw(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Vb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function aw(e,t,n,o){if(n.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=nl(o.href),a=t.querySelector(jr(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=$u.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,o=Ib(o),(i=Hn.get(i))&&gm(o,i),a=a.createElement("link"),bt(a);var l=a;l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),Tt(a,"link",o),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=$u.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Md=0;function lw(e,t){return e.stylesheets&&e.count===0&&Nu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&Nu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Md===0&&(Md=62500*PT());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Nu(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Md?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function $u(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Wu=null;function Nu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wu=new Map,t.forEach(rw,e),Wu=null,$u.call(e))}function rw(e,t){if(!(t.state.loading&4)){var n=Wu.get(e);if(n)var o=n.get(null);else{n=new Map,Wu.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<i.length;a++){var l=i[a];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),o=l)}o&&n.set(null,o)}i=t.instance,l=i.getAttribute("data-precedence"),a=n.get(l)||o,a===o&&n.set(null,i),n.set(l,i),this.count++,o=$u.bind(this),i.addEventListener("load",o),i.addEventListener("error",o),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Lr={$$typeof:wo,Provider:null,Consumer:null,_currentValue:Gi,_currentValue2:Gi,_threadCount:0};function sw(e,t,n,o,i,a,l,r,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nd(0),this.hiddenUpdates=nd(null),this.identifierPrefix=o,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function Yb(e,t,n,o,i,a,l,r,s,u,c,d){return e=new sw(e,t,n,l,s,u,c,d,r),t=1,a===!0&&(t|=24),a=dn(3,null,null,t),e.current=a,a.stateNode=e,t=Yp(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},Zp(a),e}function Xb(e){return e?(e=Ha,e):Ha}function qb(e,t,n,o,i,a){i=Xb(i),o.context===null?o.context=i:o.pendingContext=i,o=fi(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=di(e,o,t),n!==null&&(en(n,e,t),mr(n,e,t))}function i0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function vm(e,t){i0(e,t),(e=e.alternate)&&i0(e,t)}function Zb(e){if(e.tag===13||e.tag===31){var t=$i(e,67108864);t!==null&&en(t,e,67108864),vm(e,67108864)}}function a0(e){if(e.tag===13||e.tag===31){var t=yn();t=Dp(t);var n=$i(e,t);n!==null&&en(n,e,t),vm(e,t)}}var Ju=!0;function uw(e,t,n,o){var i=se.T;se.T=null;var a=De.p;try{De.p=2,bm(e,t,n,o)}finally{De.p=a,se.T=i}}function cw(e,t,n,o){var i=se.T;se.T=null;var a=De.p;try{De.p=8,bm(e,t,n,o)}finally{De.p=a,se.T=i}}function bm(e,t,n,o){if(Ju){var i=Np(o);if(i===null)Ad(e,t,o,ec,n),l0(e,o);else if(dw(i,e,t,n,o))o.stopPropagation();else if(l0(e,o),t&4&&-1<fw.indexOf(e)){for(;i!==null;){var a=al(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=Bi(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var s=1<<31-gn(l);r.entanglements[1]|=s,l&=~s}ro(a),(Ae&6)===0&&(Yu=mn()+500,Zr(0,!1))}}break;case 31:case 13:r=$i(a,2),r!==null&&en(r,a,2),pc(),vm(a,2)}if(a=Np(o),a===null&&Ad(e,t,o,ec,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Ad(e,t,o,null,n)}}function Np(e){return e=zp(e),Sm(e)}var ec=null;function Sm(e){if(ec=null,e=Ma(e),e!==null){var t=kr(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=d0(t),e!==null)return e;e=null}else if(n===31){if(e=p0(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ec=e,null}function jb(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(WN()){case y0:return 2;case v0:return 8;case Du:case JN:return 32;case b0:return 268435456;default:return 32}default:return 32}}var Cp=!1,hi=null,gi=null,yi=null,Br=new Map,Hr=new Map,oi=[],fw="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".split(" ");function l0(e,t){switch(e){case"focusin":case"focusout":hi=null;break;case"dragenter":case"dragleave":gi=null;break;case"mouseover":case"mouseout":yi=null;break;case"pointerover":case"pointerout":Br.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hr.delete(t.pointerId)}}function or(e,t,n,o,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:o,nativeEvent:a,targetContainers:[i]},t!==null&&(t=al(t),t!==null&&Zb(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function dw(e,t,n,o,i){switch(t){case"focusin":return hi=or(hi,e,t,n,o,i),!0;case"dragenter":return gi=or(gi,e,t,n,o,i),!0;case"mouseover":return yi=or(yi,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return Br.set(a,or(Br.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,Hr.set(a,or(Hr.get(a)||null,e,t,n,o,i)),!0}return!1}function Qb(e){var t=Ma(e.target);if(t!==null){var n=kr(t);if(n!==null){if(t=n.tag,t===13){if(t=d0(n),t!==null){e.blockedOn=t,Yg(e.priority,function(){a0(n)});return}}else if(t===31){if(t=p0(n),t!==null){e.blockedOn=t,Yg(e.priority,function(){a0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Cu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Np(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);Yd=o,n.target.dispatchEvent(o),Yd=null}else return t=al(n),t!==null&&Zb(t),e.blockedOn=n,!1;t.shift()}return!0}function r0(e,t,n){Cu(e)&&n.delete(t)}function pw(){Cp=!1,hi!==null&&Cu(hi)&&(hi=null),gi!==null&&Cu(gi)&&(gi=null),yi!==null&&Cu(yi)&&(yi=null),Br.forEach(r0),Hr.forEach(r0)}function uu(e,t){e.blockedOn===t&&(e.blockedOn=null,Cp||(Cp=!0,mt.unstable_scheduleCallback(mt.unstable_NormalPriority,pw)))}var cu=null;function s0(e){cu!==e&&(cu=e,mt.unstable_scheduleCallback(mt.unstable_NormalPriority,function(){cu===e&&(cu=null);for(var t=0;t<e.length;t+=3){var n=e[t],o=e[t+1],i=e[t+2];if(typeof o!="function"){if(Sm(o||n)===null)continue;break}var a=al(n);a!==null&&(e.splice(t,3),t-=3,ap(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function ol(e){function t(s){return uu(s,e)}hi!==null&&uu(hi,e),gi!==null&&uu(gi,e),yi!==null&&uu(yi,e),Br.forEach(t),Hr.forEach(t);for(var n=0;n<oi.length;n++){var o=oi[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<oi.length&&(n=oi[0],n.blockedOn===null);)Qb(n),n.blockedOn===null&&oi.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(o=0;o<n.length;o+=3){var i=n[o],a=n[o+1],l=i[tn]||null;if(typeof a=="function")l||s0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[tn]||null)r=l.formAction;else if(Sm(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),s0(n)}}}function Fb(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(l){return i=l})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),o||setTimeout(n,20)}function n(){if(!o&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function xm(e){this._internalRoot=e}gc.prototype.render=xm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(I(409));var n=t.current,o=yn();qb(n,o,e,t,null,null)};gc.prototype.unmount=xm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;qb(e.current,2,null,e,null,null),pc(),t[il]=null}};function gc(e){this._internalRoot=e}gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=N0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<oi.length&&t!==0&&t<oi[n].priority;n++);oi.splice(n,0,e),n===0&&Qb(e)}};var u0=c0.version;if(u0!=="19.2.4")throw Error(I(527,u0,"19.2.4"));De.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(I(188)):(e=Object.keys(e).join(","),Error(I(268,e)));return e=qN(t),e=e!==null?m0(e):null,e=e===null?null:e.stateNode,e};var mw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:se,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ir=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ir.isDisabled&&ir.supportsFiber))try{Gr=ir.inject(mw),hn=ir}catch{}var ir;yc.createRoot=function(e,t){if(!f0(e))throw Error(I(299));var n=!1,o="",i=Pv,a=Iv,l=Vv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Yb(e,1,!1,null,null,n,o,null,i,a,l,Fb),e[il]=t.current,hm(e),new xm(t)};yc.hydrateRoot=function(e,t,n){if(!f0(e))throw Error(I(299));var o=!1,i="",a=Pv,l=Iv,r=Vv,s=null;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=Yb(e,1,!0,t,n??null,o,i,s,a,l,r,Fb),t.context=Xb(null),n=t.current,o=yn(),o=Dp(o),i=fi(o),i.callback=null,di(n,i,o),n=o,t.current.lanes=n,Pr(t,n),ro(t),e[il]=t.current,hm(e),new gc(t)};yc.version="19.2.4"});var Jb=Ft((Vz,Wb)=>{"use strict";function $b(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE($b)}catch(e){console.error(e)}}$b(),Wb.exports=Kb()});var t1=Ft(vc=>{"use strict";var hw=Symbol.for("react.transitional.element"),gw=Symbol.for("react.fragment");function e1(e,t,n){var o=null;if(n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:hw,type:e,key:o,ref:t!==void 0?t:null,props:n}}vc.Fragment=gw;vc.jsx=e1;vc.jsxs=e1});var he=Ft((Xz,n1)=>{"use strict";n1.exports=t1()});var Ux=Ft(Gx=>{"use strict";var wl=kt();function fD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dD=typeof Object.is=="function"?Object.is:fD,pD=wl.useState,mD=wl.useEffect,hD=wl.useLayoutEffect,gD=wl.useDebugValue;function yD(e,t){var n=t(),o=pD({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return hD(function(){i.value=n,i.getSnapshot=t,ch(i)&&a({inst:i})},[e,n,t]),mD(function(){return ch(i)&&a({inst:i}),e(function(){ch(i)&&a({inst:i})})},[e]),gD(n),n}function ch(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dD(e,n)}catch{return!0}}function vD(e,t){return t()}var bD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?vD:yD;Gx.useSyncExternalStore=wl.useSyncExternalStore!==void 0?wl.useSyncExternalStore:bD});var Ix=Ft((k6,Px)=>{"use strict";Px.exports=Ux()});var Yx=Ft(Vx=>{"use strict";var cf=kt(),SD=Ix();function xD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _D=typeof Object.is=="function"?Object.is:xD,ED=SD.useSyncExternalStore,ND=cf.useRef,CD=cf.useEffect,TD=cf.useMemo,wD=cf.useDebugValue;Vx.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=ND(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=TD(function(){function s(h){if(!u){if(u=!0,c=h,h=o(h),i!==void 0&&l.hasValue){var y=l.value;if(i(y,h))return d=y}return d=h}if(y=d,_D(c,h))return y;var b=o(h);return i!==void 0&&i(y,b)?(c=h,y):(c=h,d=b)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return s(t())},f===null?void 0:function(){return s(f())}]},[t,n,o,i]);var r=ED(e,a[0],a[1]);return CD(function(){l.hasValue=!0,l.value=r},[r]),wD(r),r}});var qx=Ft((U6,Xx)=>{"use strict";Xx.exports=Yx()});var lg=ae(kt(),1),aN=ae(Jb(),1);var ge=ae(kt(),1);var B=ae(he()),U=ae(kt());function tt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=tt(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var yw={value:()=>{}};function i1(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new bc(n)}function bc(e){this._=e}function vw(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",i=n.indexOf(".");if(i>=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}bc.prototype=i1.prototype={constructor:bc,on:function(e,t){var n=this._,o=vw(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=bw(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(i=(e=o[a]).type)n[i]=o1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=o1(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new bc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),o=0,i,a;o<i;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,i=a.length;o<i;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,a=o.length;i<a;++i)o[i].value.apply(t,n)}};function bw(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function o1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=yw,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ji=i1;var Sc="http://www.w3.org/1999/xhtml",_m={svg:"http://www.w3.org/2000/svg",xhtml:Sc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Uo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),_m.hasOwnProperty(t)?{space:_m[t],local:e}:e}function Sw(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Sc&&t.documentElement.namespaceURI===Sc?t.createElement(e):t.createElementNS(n,e)}}function xw(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function xc(e){var t=Uo(e);return(t.local?xw:Sw)(t)}function _w(){}function ea(e){return e==null?_w:function(){return this.querySelector(e)}}function a1(e){typeof e!="function"&&(e=ea(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=new Array(l),s,u,c=0;c<l;++c)(s=a[c])&&(u=e.call(s,s.__data__,c,a))&&("__data__"in s&&(u.__data__=s.__data__),r[c]=u);return new nt(o,this._parents)}function Em(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Ew(){return[]}function Fr(e){return e==null?Ew:function(){return this.querySelectorAll(e)}}function Nw(e){return function(){return Em(e.apply(this,arguments))}}function l1(e){typeof e=="function"?e=Nw(e):e=Fr(e);for(var t=this._groups,n=t.length,o=[],i=[],a=0;a<n;++a)for(var l=t[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&(o.push(e.call(s,s.__data__,u,l)),i.push(s));return new nt(o,i)}function Kr(e){return function(){return this.matches(e)}}function _c(e){return function(t){return t.matches(e)}}var Cw=Array.prototype.find;function Tw(e){return function(){return Cw.call(this.children,e)}}function ww(){return this.firstElementChild}function r1(e){return this.select(e==null?ww:Tw(typeof e=="function"?e:_c(e)))}var Aw=Array.prototype.filter;function Dw(){return Array.from(this.children)}function Mw(e){return function(){return Aw.call(this.children,e)}}function s1(e){return this.selectAll(e==null?Dw:Mw(typeof e=="function"?e:_c(e)))}function u1(e){typeof e!="function"&&(e=Kr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new nt(o,this._parents)}function Ec(e){return new Array(e.length)}function c1(){return new nt(this._enter||this._groups.map(Ec),this._parents)}function $r(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}$r.prototype={constructor:$r,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function f1(e){return function(){return e}}function Rw(e,t,n,o,i,a){for(var l=0,r,s=t.length,u=a.length;l<u;++l)(r=t[l])?(r.__data__=a[l],o[l]=r):n[l]=new $r(e,a[l]);for(;l<s;++l)(r=t[l])&&(i[l]=r)}function Ow(e,t,n,o,i,a,l){var r,s,u=new Map,c=t.length,d=a.length,f=new Array(c),h;for(r=0;r<c;++r)(s=t[r])&&(f[r]=h=l.call(s,s.__data__,r,t)+"",u.has(h)?i[r]=s:u.set(h,s));for(r=0;r<d;++r)h=l.call(e,a[r],r,a)+"",(s=u.get(h))?(o[r]=s,s.__data__=a[r],u.delete(h)):n[r]=new $r(e,a[r]);for(r=0;r<c;++r)(s=t[r])&&u.get(f[r])===s&&(i[r]=s)}function zw(e){return e.__data__}function d1(e,t){if(!arguments.length)return Array.from(this,zw);var n=t?Ow:Rw,o=this._parents,i=this._groups;typeof e!="function"&&(e=f1(e));for(var a=i.length,l=new Array(a),r=new Array(a),s=new Array(a),u=0;u<a;++u){var c=o[u],d=i[u],f=d.length,h=Lw(e.call(c,c&&c.__data__,u,o)),y=h.length,b=r[u]=new Array(y),S=l[u]=new Array(y),p=s[u]=new Array(f);n(c,d,b,S,p,h,t);for(var v=0,m=0,g,x;v<y;++v)if(g=b[v]){for(v>=m&&(m=v+1);!(x=S[m])&&++m<y;);g._next=x||null}}return l=new nt(l,o),l._enter=r,l._exit=s,l}function Lw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function p1(){return new nt(this._exit||this._groups.map(Ec),this._parents)}function m1(e,t,n){var o=this.enter(),i=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),o&&i?o.merge(i).order():i}function h1(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,a=o.length,l=Math.min(i,a),r=new Array(i),s=0;s<l;++s)for(var u=n[s],c=o[s],d=u.length,f=r[s]=new Array(d),h,y=0;y<d;++y)(h=u[y]||c[y])&&(f[y]=h);for(;s<i;++s)r[s]=n[s];return new nt(r,this._parents)}function g1(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],i=o.length-1,a=o[i],l;--i>=0;)(l=o[i])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function y1(e){e||(e=Bw);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,i=new Array(o),a=0;a<o;++a){for(var l=n[a],r=l.length,s=i[a]=new Array(r),u,c=0;c<r;++c)(u=l[c])&&(s[c]=u);s.sort(t)}return new nt(i,this._parents).order()}function Bw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function v1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function b1(){return Array.from(this)}function S1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length;i<a;++i){var l=o[i];if(l)return l}return null}function x1(){let e=0;for(let t of this)++e;return e}function _1(){return!this.node()}function E1(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i=t[n],a=0,l=i.length,r;a<l;++a)(r=i[a])&&e.call(r,r.__data__,a,i);return this}function Hw(e){return function(){this.removeAttribute(e)}}function kw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gw(e,t){return function(){this.setAttribute(e,t)}}function Uw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Pw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Iw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function N1(e,t){var n=Uo(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?kw:Hw:typeof t=="function"?n.local?Iw:Pw:n.local?Uw:Gw)(n,t))}function Nc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Vw(e){return function(){this.style.removeProperty(e)}}function Yw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Xw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function C1(e,t,n){return arguments.length>1?this.each((t==null?Vw:typeof t=="function"?Xw:Yw)(e,t,n??"")):Ni(this.node(),e)}function Ni(e,t){return e.style.getPropertyValue(t)||Nc(e).getComputedStyle(e,null).getPropertyValue(t)}function qw(e){return function(){delete this[e]}}function Zw(e,t){return function(){this[e]=t}}function jw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function T1(e,t){return arguments.length>1?this.each((t==null?qw:typeof t=="function"?jw:Zw)(e,t)):this.node()[e]}function w1(e){return e.trim().split(/^|\s+/)}function Nm(e){return e.classList||new A1(e)}function A1(e){this._node=e,this._names=w1(e.getAttribute("class")||"")}A1.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function D1(e,t){for(var n=Nm(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function M1(e,t){for(var n=Nm(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Qw(e){return function(){D1(this,e)}}function Fw(e){return function(){M1(this,e)}}function Kw(e,t){return function(){(t.apply(this,arguments)?D1:M1)(this,e)}}function R1(e,t){var n=w1(e+"");if(arguments.length<2){for(var o=Nm(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Kw:t?Qw:Fw)(n,t))}function $w(){this.textContent=""}function Ww(e){return function(){this.textContent=e}}function Jw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function O1(e){return arguments.length?this.each(e==null?$w:(typeof e=="function"?Jw:Ww)(e)):this.node().textContent}function e2(){this.innerHTML=""}function t2(e){return function(){this.innerHTML=e}}function n2(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function z1(e){return arguments.length?this.each(e==null?e2:(typeof e=="function"?n2:t2)(e)):this.node().innerHTML}function o2(){this.nextSibling&&this.parentNode.appendChild(this)}function L1(){return this.each(o2)}function i2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B1(){return this.each(i2)}function H1(e){var t=typeof e=="function"?e:xc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function a2(){return null}function k1(e,t){var n=typeof e=="function"?e:xc(e),o=t==null?a2:typeof t=="function"?t:ea(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function l2(){var e=this.parentNode;e&&e.removeChild(this)}function G1(){return this.each(l2)}function r2(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function s2(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function U1(e){return this.select(e?s2:r2)}function P1(e){return arguments.length?this.property("__data__",e):this.node().__data__}function u2(e){return function(t){e.call(this,t,this.__data__)}}function c2(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function f2(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function d2(e,t,n){return function(){var o=this.__on,i,a=u2(t);if(o){for(var l=0,r=o.length;l<r;++l)if((i=o[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(i):this.__on=[i]}}function I1(e,t,n){var o=c2(e+""),i,a=o.length,l;if(arguments.length<2){var r=this.node().__on;if(r){for(var s=0,u=r.length,c;s<u;++s)for(i=0,c=r[s];i<a;++i)if((l=o[i]).type===c.type&&l.name===c.name)return c.value}return}for(r=t?d2:f2,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function V1(e,t,n){var o=Nc(e),i=o.CustomEvent;typeof i=="function"?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function p2(e,t){return function(){return V1(this,e,t)}}function m2(e,t){return function(){return V1(this,e,t.apply(this,arguments))}}function Y1(e,t){return this.each((typeof t=="function"?m2:p2)(e,t))}function*X1(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,a=o.length,l;i<a;++i)(l=o[i])&&(yield l)}var Cm=[null];function nt(e,t){this._groups=e,this._parents=t}function q1(){return new nt([[document.documentElement]],Cm)}function h2(){return this}nt.prototype=q1.prototype={constructor:nt,select:a1,selectAll:l1,selectChild:r1,selectChildren:s1,filter:u1,data:d1,enter:c1,exit:p1,join:m1,merge:h1,selection:h2,order:g1,sort:y1,call:v1,nodes:b1,node:S1,size:x1,empty:_1,each:E1,attr:N1,style:C1,property:T1,classed:R1,text:O1,html:z1,raise:L1,lower:B1,append:H1,insert:k1,remove:G1,clone:U1,datum:P1,on:I1,dispatch:Y1,[Symbol.iterator]:X1};var Po=q1;function xt(e){return typeof e=="string"?new nt([[document.querySelector(e)]],[document.documentElement]):new nt([[e]],Cm)}function Z1(e){let t;for(;t=e.sourceEvent;)e=t;return e}function It(e,t){if(e=Z1(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}var j1={passive:!1},ta={capture:!0,passive:!1};function Cc(e){e.stopImmediatePropagation()}function Ci(e){e.preventDefault(),e.stopImmediatePropagation()}function Wr(e){var t=e.document.documentElement,n=xt(e).on("dragstart.drag",Ci,ta);"onselectstart"in t?n.on("selectstart.drag",Ci,ta):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Jr(e,t){var n=e.document.documentElement,o=xt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Ci,ta),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var es=e=>()=>e;function ts(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:a,x:l,y:r,dx:s,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:r,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}ts.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function g2(e){return!e.ctrlKey&&!e.button}function y2(){return this.parentNode}function v2(e,t){return t??{x:e.x,y:e.y}}function b2(){return navigator.maxTouchPoints||"ontouchstart"in this}function Tc(){var e=g2,t=y2,n=v2,o=b2,i={},a=Ji("start","drag","end"),l=0,r,s,u,c,d=0;function f(g){g.on("mousedown.drag",h).filter(o).on("touchstart.drag",S).on("touchmove.drag",p,j1).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(g,x){if(!(c||!e.call(this,g,x))){var _=m(this,t.call(this,g,x),g,x,"mouse");_&&(xt(g.view).on("mousemove.drag",y,ta).on("mouseup.drag",b,ta),Wr(g.view),Cc(g),u=!1,r=g.clientX,s=g.clientY,_("start",g))}}function y(g){if(Ci(g),!u){var x=g.clientX-r,_=g.clientY-s;u=x*x+_*_>d}i.mouse("drag",g)}function b(g){xt(g.view).on("mousemove.drag mouseup.drag",null),Jr(g.view,u),Ci(g),i.mouse("end",g)}function S(g,x){if(e.call(this,g,x)){var _=g.changedTouches,N=t.call(this,g,x),C=_.length,w,H;for(w=0;w<C;++w)(H=m(this,N,g,x,_[w].identifier,_[w]))&&(Cc(g),H("start",g,_[w]))}}function p(g){var x=g.changedTouches,_=x.length,N,C;for(N=0;N<_;++N)(C=i[x[N].identifier])&&(Ci(g),C("drag",g,x[N]))}function v(g){var x=g.changedTouches,_=x.length,N,C;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),N=0;N<_;++N)(C=i[x[N].identifier])&&(Cc(g),C("end",g,x[N]))}function m(g,x,_,N,C,w){var H=a.copy(),A=It(w||_,x),L,k,E;if((E=n.call(g,new ts("beforestart",{sourceEvent:_,target:f,identifier:C,active:l,x:A[0],y:A[1],dx:0,dy:0,dispatch:H}),N))!=null)return L=E.x-A[0]||0,k=E.y-A[1]||0,function M(D,O,R){var z=A,V;switch(D){case"start":i[C]=M,V=l++;break;case"end":delete i[C],--l;case"drag":A=It(R||O,x),V=l;break}H.call(D,g,new ts(D,{sourceEvent:O,subject:E,target:f,identifier:C,active:V,x:A[0]+L,y:A[1]+k,dx:A[0]-z[0],dy:A[1]-z[1],dispatch:H}),N)}}return f.filter=function(g){return arguments.length?(e=typeof g=="function"?g:es(!!g),f):e},f.container=function(g){return arguments.length?(t=typeof g=="function"?g:es(g),f):t},f.subject=function(g){return arguments.length?(n=typeof g=="function"?g:es(g),f):n},f.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:es(!!g),f):o},f.on=function(){var g=a.on.apply(a,arguments);return g===a?f:g},f.clickDistance=function(g){return arguments.length?(d=(g=+g)*g,f):Math.sqrt(d)},f}function wc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Tm(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function is(){}var ns=.7,Mc=1/ns,fl="\\s*([+-]?\\d+)\\s*",os="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",so="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",S2=/^#([0-9a-f]{3,8})$/,x2=new RegExp(`^rgb\\(${fl},${fl},${fl}\\)$`),_2=new RegExp(`^rgb\\(${so},${so},${so}\\)$`),E2=new RegExp(`^rgba\\(${fl},${fl},${fl},${os}\\)$`),N2=new RegExp(`^rgba\\(${so},${so},${so},${os}\\)$`),C2=new RegExp(`^hsl\\(${os},${so},${so}\\)$`),T2=new RegExp(`^hsla\\(${os},${so},${so},${os}\\)$`),Q1={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};wc(is,Qn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:F1,formatHex:F1,formatHex8:w2,formatHsl:A2,formatRgb:K1,toString:K1});function F1(){return this.rgb().formatHex()}function w2(){return this.rgb().formatHex8()}function A2(){return nS(this).formatHsl()}function K1(){return this.rgb().formatRgb()}function Qn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=S2.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?$1(t):n===3?new on(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ac(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ac(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=x2.exec(e))?new on(t[1],t[2],t[3],1):(t=_2.exec(e))?new on(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=E2.exec(e))?Ac(t[1],t[2],t[3],t[4]):(t=N2.exec(e))?Ac(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=C2.exec(e))?eS(t[1],t[2]/100,t[3]/100,1):(t=T2.exec(e))?eS(t[1],t[2]/100,t[3]/100,t[4]):Q1.hasOwnProperty(e)?$1(Q1[e]):e==="transparent"?new on(NaN,NaN,NaN,0):null}function $1(e){return new on(e>>16&255,e>>8&255,e&255,1)}function Ac(e,t,n,o){return o<=0&&(e=t=n=NaN),new on(e,t,n,o)}function D2(e){return e instanceof is||(e=Qn(e)),e?(e=e.rgb(),new on(e.r,e.g,e.b,e.opacity)):new on}function dl(e,t,n,o){return arguments.length===1?D2(e):new on(e,t,n,o??1)}function on(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}wc(on,dl,Tm(is,{brighter(e){return e=e==null?Mc:Math.pow(Mc,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ns:Math.pow(ns,e),new on(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new on(oa(this.r),oa(this.g),oa(this.b),Rc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:W1,formatHex:W1,formatHex8:M2,formatRgb:J1,toString:J1}));function W1(){return`#${na(this.r)}${na(this.g)}${na(this.b)}`}function M2(){return`#${na(this.r)}${na(this.g)}${na(this.b)}${na((isNaN(this.opacity)?1:this.opacity)*255)}`}function J1(){let e=Rc(this.opacity);return`${e===1?"rgb(":"rgba("}${oa(this.r)}, ${oa(this.g)}, ${oa(this.b)}${e===1?")":`, ${e})`}`}function Rc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function oa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function na(e){return e=oa(e),(e<16?"0":"")+e.toString(16)}function eS(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jn(e,t,n,o)}function nS(e){if(e instanceof jn)return new jn(e.h,e.s,e.l,e.opacity);if(e instanceof is||(e=Qn(e)),!e)return new jn;if(e instanceof jn)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),l=NaN,r=a-i,s=(a+i)/2;return r?(t===a?l=(n-o)/r+(n<o)*6:n===a?l=(o-t)/r+2:l=(t-n)/r+4,r/=s<.5?a+i:2-a-i,l*=60):r=s>0&&s<1?0:l,new jn(l,r,s,e.opacity)}function oS(e,t,n,o){return arguments.length===1?nS(e):new jn(e,t,n,o??1)}function jn(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}wc(jn,oS,Tm(is,{brighter(e){return e=e==null?Mc:Math.pow(Mc,e),new jn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ns:Math.pow(ns,e),new jn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new on(wm(e>=240?e-240:e+120,i,o),wm(e,i,o),wm(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new jn(tS(this.h),Dc(this.s),Dc(this.l),Rc(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 e=Rc(this.opacity);return`${e===1?"hsl(":"hsla("}${tS(this.h)}, ${Dc(this.s)*100}%, ${Dc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function tS(e){return e=(e||0)%360,e<0?e+360:e}function Dc(e){return Math.max(0,Math.min(1,e||0))}function wm(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Am(e,t,n,o,i){var a=e*e,l=a*e;return((1-3*e+3*a-l)*t+(4-6*a+3*l)*n+(1+3*e+3*a-3*l)*o+l*i)/6}function iS(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[o],a=e[o+1],l=o>0?e[o-1]:2*i-a,r=o<t-1?e[o+2]:2*a-i;return Am((n-o/t)*t,l,i,a,r)}}function aS(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),i=e[(o+t-1)%t],a=e[o%t],l=e[(o+1)%t],r=e[(o+2)%t];return Am((n-o/t)*t,i,a,l,r)}}var as=e=>()=>e;function R2(e,t){return function(n){return e+n*t}}function O2(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function lS(e){return(e=+e)==1?Oc:function(t,n){return n-t?O2(t,n,e):as(isNaN(t)?n:t)}}function Oc(e,t){var n=t-e;return n?R2(e,n):as(isNaN(e)?t:e)}var ia=(function e(t){var n=lS(t);function o(i,a){var l=n((i=dl(i)).r,(a=dl(a)).r),r=n(i.g,a.g),s=n(i.b,a.b),u=Oc(i.opacity,a.opacity);return function(c){return i.r=l(c),i.g=r(c),i.b=s(c),i.opacity=u(c),i+""}}return o.gamma=e,o})(1);function rS(e){return function(t){var n=t.length,o=new Array(n),i=new Array(n),a=new Array(n),l,r;for(l=0;l<n;++l)r=dl(t[l]),o[l]=r.r||0,i[l]=r.g||0,a[l]=r.b||0;return o=e(o),i=e(i),a=e(a),r.opacity=1,function(s){return r.r=o(s),r.g=i(s),r.b=a(s),r+""}}}var z2=rS(iS),L2=rS(aS);function sS(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(a){for(i=0;i<n;++i)o[i]=e[i]*(1-a)+t[i]*a;return o}}function uS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function cS(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,i=new Array(o),a=new Array(n),l;for(l=0;l<o;++l)i[l]=Io(e[l],t[l]);for(;l<n;++l)a[l]=t[l];return function(r){for(l=0;l<o;++l)a[l]=i[l](r);return a}}function fS(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Vt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function dS(e,t){var n={},o={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=Io(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Mm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Dm=new RegExp(Mm.source,"g");function B2(e){return function(){return e}}function H2(e){return function(t){return e(t)+""}}function ls(e,t){var n=Mm.lastIndex=Dm.lastIndex=0,o,i,a,l=-1,r=[],s=[];for(e=e+"",t=t+"";(o=Mm.exec(e))&&(i=Dm.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),r[l]?r[l]+=a:r[++l]=a),(o=o[0])===(i=i[0])?r[l]?r[l]+=i:r[++l]=i:(r[++l]=null,s.push({i:l,x:Vt(o,i)})),n=Dm.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?s[0]?H2(s[0].x):B2(t):(t=s.length,function(u){for(var c=0,d;c<t;++c)r[(d=s[c]).i]=d.x(u);return r.join("")})}function Io(e,t){var n=typeof t,o;return t==null||n==="boolean"?as(t):(n==="number"?Vt:n==="string"?(o=Qn(t))?(t=o,ia):ls:t instanceof Qn?ia:t instanceof Date?fS:uS(t)?sS:Array.isArray(t)?cS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?dS:Vt)(e,t)}var pS=180/Math.PI,zc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Rm(e,t,n,o,i,a){var l,r,s;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(s=e*n+t*o)&&(n-=e*s,o-=t*s),(r=Math.sqrt(n*n+o*o))&&(n/=r,o/=r,s/=r),e*o<t*n&&(e=-e,t=-t,s=-s,l=-l),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*pS,skewX:Math.atan(s)*pS,scaleX:l,scaleY:r}}var Lc;function mS(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?zc:Rm(t.a,t.b,t.c,t.d,t.e,t.f)}function hS(e){return e==null?zc:(Lc||(Lc=document.createElementNS("http://www.w3.org/2000/svg","g")),Lc.setAttribute("transform",e),(e=Lc.transform.baseVal.consolidate())?(e=e.matrix,Rm(e.a,e.b,e.c,e.d,e.e,e.f)):zc)}function gS(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,h,y){if(u!==d||c!==f){var b=h.push("translate(",null,t,null,n);y.push({i:b-4,x:Vt(u,d)},{i:b-2,x:Vt(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function l(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,o)-2,x:Vt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function r(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,o)-2,x:Vt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function s(u,c,d,f,h,y){if(u!==d||c!==f){var b=h.push(i(h)+"scale(",null,",",null,")");y.push({i:b-4,x:Vt(u,d)},{i:b-2,x:Vt(c,f)})}else(d!==1||f!==1)&&h.push(i(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,d,f),l(u.rotate,c.rotate,d,f),r(u.skewX,c.skewX,d,f),s(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var y=-1,b=f.length,S;++y<b;)d[(S=f[y]).i]=S.x(h);return d.join("")}}}var Om=gS(mS,"px, ","px)","deg)"),zm=gS(hS,", ",")",")");var k2=1e-12;function yS(e){return((e=Math.exp(e))+1/e)/2}function G2(e){return((e=Math.exp(e))-1/e)/2}function U2(e){return((e=Math.exp(2*e))-1)/(e+1)}var aa=(function e(t,n,o){function i(a,l){var r=a[0],s=a[1],u=a[2],c=l[0],d=l[1],f=l[2],h=c-r,y=d-s,b=h*h+y*y,S,p;if(b<k2)p=Math.log(f/u)/t,S=function(N){return[r+N*h,s+N*y,u*Math.exp(t*N*p)]};else{var v=Math.sqrt(b),m=(f*f-u*u+o*b)/(2*u*n*v),g=(f*f-u*u-o*b)/(2*f*n*v),x=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(g*g+1)-g);p=(_-x)/t,S=function(N){var C=N*p,w=yS(x),H=u/(n*v)*(w*U2(t*C+x)-G2(x));return[r+H*h,s+H*y,u*w/yS(t*C+x)]}}return S.duration=p*1e3*t/Math.SQRT2,S}return i.rho=function(a){var l=Math.max(.001,+a),r=l*l,s=r*r;return e(l,r,s)},i})(Math.SQRT2,2,4);var pl=0,ss=0,rs=0,bS=1e3,Bc,us,Hc=0,la=0,kc=0,cs=typeof performance=="object"&&performance.now?performance:Date,SS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ds(){return la||(SS(P2),la=cs.now()+kc)}function P2(){la=0}function fs(){this._call=this._time=this._next=null}fs.prototype=Gc.prototype={constructor:fs,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ds():+n)+(t==null?0:+t),!this._next&&us!==this&&(us?us._next=this:Bc=this,us=this),this._call=e,this._time=n,Lm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Lm())}};function Gc(e,t,n){var o=new fs;return o.restart(e,t,n),o}function xS(){ds(),++pl;for(var e=Bc,t;e;)(t=la-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pl}function vS(){la=(Hc=cs.now())+kc,pl=ss=0;try{xS()}finally{pl=0,V2(),la=0}}function I2(){var e=cs.now(),t=e-Hc;t>bS&&(kc-=t,Hc=e)}function V2(){for(var e,t=Bc,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Bc=n);us=e,Lm(o)}function Lm(e){if(!pl){ss&&(ss=clearTimeout(ss));var t=e-la;t>24?(e<1/0&&(ss=setTimeout(vS,e-cs.now()-kc)),rs&&(rs=clearInterval(rs))):(rs||(Hc=cs.now(),rs=setInterval(I2,bS)),pl=1,SS(vS))}}function Uc(e,t,n){var o=new fs;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var Y2=Ji("start","end","cancel","interrupt"),X2=[],NS=0,_S=1,Ic=2,Pc=3,ES=4,Vc=5,ps=6;function Ti(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;q2(e,n,{name:t,index:o,group:i,on:Y2,tween:X2,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:NS})}function ms(e,t){var n=ht(e,t);if(n.state>NS)throw new Error("too late; already scheduled");return n}function wt(e,t){var n=ht(e,t);if(n.state>Pc)throw new Error("too late; already running");return n}function ht(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function q2(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Gc(a,0,n.time);function a(u){n.state=_S,n.timer.restart(l,n.delay,n.time),n.delay<=u&&l(u-n.delay)}function l(u){var c,d,f,h;if(n.state!==_S)return s();for(c in o)if(h=o[c],h.name===n.name){if(h.state===Pc)return Uc(l);h.state===ES?(h.state=ps,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=ps,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(Uc(function(){n.state===Pc&&(n.state=ES,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=Ic,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Ic){for(n.state=Pc,i=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=h);i.length=d+1}}function r(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(s),n.state=Vc,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===Vc&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=ps,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function ra(e,t){var n=e.__transition,o,i,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((o=n[l]).name!==t){a=!1;continue}i=o.state>Ic&&o.state<Vc,o.state=ps,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function CS(e){return this.each(function(){ra(this,e)})}function Z2(e,t){var n,o;return function(){var i=wt(this,e),a=i.tween;if(a!==n){o=n=a;for(var l=0,r=o.length;l<r;++l)if(o[l].name===t){o=o.slice(),o.splice(l,1);break}}i.tween=o}}function j2(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=wt(this,e),l=a.tween;if(l!==o){i=(o=l).slice();for(var r={name:t,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===t){i[s]=r;break}s===u&&i.push(r)}a.tween=i}}function TS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=ht(this.node(),n).tween,i=0,a=o.length,l;i<a;++i)if((l=o[i]).name===e)return l.value;return null}return this.each((t==null?Z2:j2)(n,e,t))}function ml(e,t,n){var o=e._id;return e.each(function(){var i=wt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return ht(i,o).value[t]}}function Yc(e,t){var n;return(typeof t=="number"?Vt:t instanceof Qn?ia:(n=Qn(t))?(t=n,ia):ls)(e,t)}function Q2(e){return function(){this.removeAttribute(e)}}function F2(e){return function(){this.removeAttributeNS(e.space,e.local)}}function K2(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttribute(e);return l===i?null:l===o?a:a=t(o=l,n)}}function $2(e,t,n){var o,i=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===o?a:a=t(o=l,n)}}function W2(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttribute(e):(l=this.getAttribute(e),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function J2(e,t,n){var o,i,a;return function(){var l,r=n(this),s;return r==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),s=r+"",l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r)))}}function wS(e,t){var n=Uo(e),o=n==="transform"?zm:Yc;return this.attrTween(e,typeof t=="function"?(n.local?J2:W2)(n,o,ml(this,"attr."+e,t)):t==null?(n.local?F2:Q2)(n):(n.local?$2:K2)(n,o,t))}function eA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function tA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function nA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&tA(e,a)),n}return i._value=t,i}function oA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&eA(e,a)),n}return i._value=t,i}function AS(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Uo(e);return this.tween(n,(o.local?nA:oA)(o,t))}function iA(e,t){return function(){ms(this,e).delay=+t.apply(this,arguments)}}function aA(e,t){return t=+t,function(){ms(this,e).delay=t}}function DS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?iA:aA)(t,e)):ht(this.node(),t).delay}function lA(e,t){return function(){wt(this,e).duration=+t.apply(this,arguments)}}function rA(e,t){return t=+t,function(){wt(this,e).duration=t}}function MS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?lA:rA)(t,e)):ht(this.node(),t).duration}function sA(e,t){if(typeof t!="function")throw new Error;return function(){wt(this,e).ease=t}}function RS(e){var t=this._id;return arguments.length?this.each(sA(t,e)):ht(this.node(),t).ease}function uA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;wt(this,e).ease=n}}function OS(e){if(typeof e!="function")throw new Error;return this.each(uA(this._id,e))}function zS(e){typeof e!="function"&&(e=Kr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var a=t[i],l=a.length,r=o[i]=[],s,u=0;u<l;++u)(s=a[u])&&e.call(s,s.__data__,u,a)&&r.push(s);return new Yt(o,this._parents,this._name,this._id)}function LS(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,a=Math.min(o,i),l=new Array(o),r=0;r<a;++r)for(var s=t[r],u=n[r],c=s.length,d=l[r]=new Array(c),f,h=0;h<c;++h)(f=s[h]||u[h])&&(d[h]=f);for(;r<o;++r)l[r]=t[r];return new Yt(l,this._parents,this._name,this._id)}function cA(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function fA(e,t,n){var o,i,a=cA(t)?ms:wt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function BS(e,t){var n=this._id;return arguments.length<2?ht(this.node(),n).on.on(e):this.each(fA(n,e,t))}function dA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function HS(){return this.on("end.remove",dA(this._id))}function kS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ea(e));for(var o=this._groups,i=o.length,a=new Array(i),l=0;l<i;++l)for(var r=o[l],s=r.length,u=a[l]=new Array(s),c,d,f=0;f<s;++f)(c=r[f])&&(d=e.call(c,c.__data__,f,r))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Ti(u[f],t,n,f,u,ht(c,n)));return new Yt(a,this._parents,t,n)}function GS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Fr(e));for(var o=this._groups,i=o.length,a=[],l=[],r=0;r<i;++r)for(var s=o[r],u=s.length,c,d=0;d<u;++d)if(c=s[d]){for(var f=e.call(c,c.__data__,d,s),h,y=ht(c,n),b=0,S=f.length;b<S;++b)(h=f[b])&&Ti(h,t,n,b,f,y);a.push(f),l.push(c)}return new Yt(a,l,t,n)}var pA=Po.prototype.constructor;function US(){return new pA(this._groups,this._parents)}function mA(e,t){var n,o,i;return function(){var a=Ni(this,e),l=(this.style.removeProperty(e),Ni(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function PS(e){return function(){this.style.removeProperty(e)}}function hA(e,t,n){var o,i=n+"",a;return function(){var l=Ni(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function gA(e,t,n){var o,i,a;return function(){var l=Ni(this,e),r=n(this),s=r+"";return r==null&&(s=r=(this.style.removeProperty(e),Ni(this,e))),l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r))}}function yA(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var s=wt(this,e),u=s.on,c=s.value[a]==null?r||(r=PS(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(l,i=c),s.on=o}}function IS(e,t,n){var o=(e+="")=="transform"?Om:Yc;return t==null?this.styleTween(e,mA(e,o)).on("end.style."+e,PS(e)):typeof t=="function"?this.styleTween(e,gA(e,o,ml(this,"style."+e,t))).each(yA(this._id,e)):this.styleTween(e,hA(e,o,t),n).on("end.style."+e,null)}function vA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function bA(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&vA(e,l,n)),o}return a._value=t,a}function VS(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,bA(e,t,n??""))}function SA(e){return function(){this.textContent=e}}function xA(e){return function(){var t=e(this);this.textContent=t??""}}function YS(e){return this.tween("text",typeof e=="function"?xA(ml(this,"text",e)):SA(e==null?"":e+""))}function _A(e){return function(t){this.textContent=e.call(this,t)}}function EA(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&_A(i)),t}return o._value=e,o}function XS(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,EA(e))}function qS(){for(var e=this._name,t=this._id,n=Xc(),o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)if(s=l[u]){var c=ht(s,t);Ti(s,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Yt(o,this._parents,e,n)}function ZS(){var e,t,n=this,o=n._id,i=n.size();return new Promise(function(a,l){var r={value:l},s={value:function(){--i===0&&a()}};n.each(function(){var u=wt(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(r),t._.interrupt.push(r),t._.end.push(s)),u.on=t}),i===0&&a()})}var NA=0;function Yt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function jS(e){return Po().transition(e)}function Xc(){return++NA}var Vo=Po.prototype;Yt.prototype=jS.prototype={constructor:Yt,select:kS,selectAll:GS,selectChild:Vo.selectChild,selectChildren:Vo.selectChildren,filter:zS,merge:LS,selection:US,transition:qS,call:Vo.call,nodes:Vo.nodes,node:Vo.node,size:Vo.size,empty:Vo.empty,each:Vo.each,on:BS,attr:wS,attrTween:AS,style:IS,styleTween:VS,text:YS,textTween:XS,remove:HS,tween:TS,delay:DS,duration:MS,ease:RS,easeVarying:OS,end:ZS,[Symbol.iterator]:Vo[Symbol.iterator]};function qc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var CA={time:null,delay:0,duration:250,ease:qc};function TA(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function QS(e){var t,n;e instanceof Yt?(t=e._id,e=e._name):(t=Xc(),(n=CA).time=ds(),e=e==null?null:e+"");for(var o=this._groups,i=o.length,a=0;a<i;++a)for(var l=o[a],r=l.length,s,u=0;u<r;++u)(s=l[u])&&Ti(s,e,t,u,l,n||TA(s,t));return new Yt(o,this._parents,e,t)}Po.prototype.interrupt=CS;Po.prototype.transition=QS;var hs=e=>()=>e;function Bm(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Fn(e,t,n){this.k=e,this.x=t,this.y=n}Fn.prototype={constructor:Fn,scale:function(e){return e===1?this:new Fn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Fn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var sa=new Fn(1,0,0);gs.prototype=Fn.prototype;function gs(e){for(;!e.__zoom;)if(!(e=e.parentNode))return sa;return e.__zoom}function Zc(e){e.stopImmediatePropagation()}function hl(e){e.preventDefault(),e.stopImmediatePropagation()}function wA(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function AA(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function FS(){return this.__zoom||sa}function DA(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function MA(){return navigator.maxTouchPoints||"ontouchstart"in this}function RA(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),l>a?(a+l)/2:Math.min(0,a)||Math.max(0,l))}function jc(){var e=wA,t=AA,n=RA,o=DA,i=MA,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,s=aa,u=Ji("start","zoom","end"),c,d,f,h=500,y=150,b=0,S=10;function p(E){E.property("__zoom",FS).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",H).filter(i).on("touchstart.zoom",A).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(E,M,D,O){var R=E.selection?E.selection():E;R.property("__zoom",FS),E!==R?x(E,M,D,O):R.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof M=="function"?M.apply(this,arguments):M).end()})},p.scaleBy=function(E,M,D,O){p.scaleTo(E,function(){var R=this.__zoom.k,z=typeof M=="function"?M.apply(this,arguments):M;return R*z},D,O)},p.scaleTo=function(E,M,D,O){p.transform(E,function(){var R=t.apply(this,arguments),z=this.__zoom,V=D==null?g(R):typeof D=="function"?D.apply(this,arguments):D,G=z.invert(V),P=typeof M=="function"?M.apply(this,arguments):M;return n(m(v(z,P),V,G),R,l)},D,O)},p.translateBy=function(E,M,D,O){p.transform(E,function(){return n(this.__zoom.translate(typeof M=="function"?M.apply(this,arguments):M,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),l)},null,O)},p.translateTo=function(E,M,D,O,R){p.transform(E,function(){var z=t.apply(this,arguments),V=this.__zoom,G=O==null?g(z):typeof O=="function"?O.apply(this,arguments):O;return n(sa.translate(G[0],G[1]).scale(V.k).translate(typeof M=="function"?-M.apply(this,arguments):-M,typeof D=="function"?-D.apply(this,arguments):-D),z,l)},O,R)};function v(E,M){return M=Math.max(a[0],Math.min(a[1],M)),M===E.k?E:new Fn(M,E.x,E.y)}function m(E,M,D){var O=M[0]-D[0]*E.k,R=M[1]-D[1]*E.k;return O===E.x&&R===E.y?E:new Fn(E.k,O,R)}function g(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function x(E,M,D,O){E.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var R=this,z=arguments,V=_(R,z).event(O),G=t.apply(R,z),P=D==null?g(G):typeof D=="function"?D.apply(R,z):D,q=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),Z=R.__zoom,j=typeof M=="function"?M.apply(R,z):M,re=s(Z.invert(P).concat(q/Z.k),j.invert(P).concat(q/j.k));return function($){if($===1)$=j;else{var Y=re($),K=q/Y[2];$=new Fn(K,P[0]-Y[0]*K,P[1]-Y[1]*K)}V.zoom(null,$)}})}function _(E,M,D){return!D&&E.__zooming||new N(E,M)}function N(E,M){this.that=E,this.args=M,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,M),this.taps=0}N.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,M){return this.mouse&&E!=="mouse"&&(this.mouse[1]=M.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=M.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=M.invert(this.touch1[0])),this.that.__zoom=M,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var M=xt(this.that).datum();u.call(E,this.that,new Bm(E,{sourceEvent:this.sourceEvent,target:p,type:E,transform:this.that.__zoom,dispatch:u}),M)}};function C(E,...M){if(!e.apply(this,arguments))return;var D=_(this,M).event(E),O=this.__zoom,R=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),z=It(E);if(D.wheel)(D.mouse[0][0]!==z[0]||D.mouse[0][1]!==z[1])&&(D.mouse[1]=O.invert(D.mouse[0]=z)),clearTimeout(D.wheel);else{if(O.k===R)return;D.mouse=[z,O.invert(z)],ra(this),D.start()}hl(E),D.wheel=setTimeout(V,y),D.zoom("mouse",n(m(v(O,R),D.mouse[0],D.mouse[1]),D.extent,l));function V(){D.wheel=null,D.end()}}function w(E,...M){if(f||!e.apply(this,arguments))return;var D=E.currentTarget,O=_(this,M,!0).event(E),R=xt(E.view).on("mousemove.zoom",P,!0).on("mouseup.zoom",q,!0),z=It(E,D),V=E.clientX,G=E.clientY;Wr(E.view),Zc(E),O.mouse=[z,this.__zoom.invert(z)],ra(this),O.start();function P(Z){if(hl(Z),!O.moved){var j=Z.clientX-V,re=Z.clientY-G;O.moved=j*j+re*re>b}O.event(Z).zoom("mouse",n(m(O.that.__zoom,O.mouse[0]=It(Z,D),O.mouse[1]),O.extent,l))}function q(Z){R.on("mousemove.zoom mouseup.zoom",null),Jr(Z.view,O.moved),hl(Z),O.event(Z).end()}}function H(E,...M){if(e.apply(this,arguments)){var D=this.__zoom,O=It(E.changedTouches?E.changedTouches[0]:E,this),R=D.invert(O),z=D.k*(E.shiftKey?.5:2),V=n(m(v(D,z),O,R),t.apply(this,M),l);hl(E),r>0?xt(this).transition().duration(r).call(x,V,O,E):xt(this).call(p.transform,V,O,E)}}function A(E,...M){if(e.apply(this,arguments)){var D=E.touches,O=D.length,R=_(this,M,E.changedTouches.length===O).event(E),z,V,G,P;for(Zc(E),V=0;V<O;++V)G=D[V],P=It(G,this),P=[P,this.__zoom.invert(P),G.identifier],R.touch0?!R.touch1&&R.touch0[2]!==P[2]&&(R.touch1=P,R.taps=0):(R.touch0=P,z=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(R.taps<2&&(d=P[0],c=setTimeout(function(){c=null},h)),ra(this),R.start())}}function L(E,...M){if(this.__zooming){var D=_(this,M).event(E),O=E.changedTouches,R=O.length,z,V,G,P;for(hl(E),z=0;z<R;++z)V=O[z],G=It(V,this),D.touch0&&D.touch0[2]===V.identifier?D.touch0[0]=G:D.touch1&&D.touch1[2]===V.identifier&&(D.touch1[0]=G);if(V=D.that.__zoom,D.touch1){var q=D.touch0[0],Z=D.touch0[1],j=D.touch1[0],re=D.touch1[1],$=($=j[0]-q[0])*$+($=j[1]-q[1])*$,Y=(Y=re[0]-Z[0])*Y+(Y=re[1]-Z[1])*Y;V=v(V,Math.sqrt($/Y)),G=[(q[0]+j[0])/2,(q[1]+j[1])/2],P=[(Z[0]+re[0])/2,(Z[1]+re[1])/2]}else if(D.touch0)G=D.touch0[0],P=D.touch0[1];else return;D.zoom("touch",n(m(V,G,P),D.extent,l))}}function k(E,...M){if(this.__zooming){var D=_(this,M).event(E),O=E.changedTouches,R=O.length,z,V;for(Zc(E),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),z=0;z<R;++z)V=O[z],D.touch0&&D.touch0[2]===V.identifier?delete D.touch0:D.touch1&&D.touch1[2]===V.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(V=It(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<S)){var G=xt(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return p.wheelDelta=function(E){return arguments.length?(o=typeof E=="function"?E:hs(+E),p):o},p.filter=function(E){return arguments.length?(e=typeof E=="function"?E:hs(!!E),p):e},p.touchable=function(E){return arguments.length?(i=typeof E=="function"?E:hs(!!E),p):i},p.extent=function(E){return arguments.length?(t=typeof E=="function"?E:hs([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),p):t},p.scaleExtent=function(E){return arguments.length?(a[0]=+E[0],a[1]=+E[1],p):[a[0],a[1]]},p.translateExtent=function(E){return arguments.length?(l[0][0]=+E[0][0],l[1][0]=+E[1][0],l[0][1]=+E[0][1],l[1][1]=+E[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(E){return arguments.length?(n=E,p):n},p.duration=function(E){return arguments.length?(r=+E,p):r},p.interpolate=function(E){return arguments.length?(s=E,p):s},p.on=function(){var E=u.on.apply(u,arguments);return E===u?p:E},p.clickDistance=function(E){return arguments.length?(b=(E=+E)*E,p):Math.sqrt(b)},p.tapDistance=function(E){return arguments.length?(S=+E,p):S},p}var Sn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.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:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/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."},xl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Pm=["Enter"," ","Escape"],Im={"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:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"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"},Di;(function(e){e.Strict="strict",e.Loose="loose"})(Di||(Di={}));var Yo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Yo||(Yo={}));var ua;(function(e){e.Partial="partial",e.Full="full"})(ua||(ua={}));var Vm={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},uo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(uo||(uo={}));var vl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(vl||(vl={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));var KS={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top};function Ym(e){return e===null?null:e?"valid":"invalid"}var Xm=e=>"id"in e&&"source"in e&&"target"in e,ux=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),qm=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var bs=(e,t=[0,0])=>{let{width:n,height:o}=co(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},Zm=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=e.reduce((o,i)=>{let a=typeof i=="string",l=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(l=a?t.nodeLookup.get(i):qm(i)?i:t.nodeLookup.get(i.id));let r=l?Kc(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Wc(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Jc(n)},_l=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Wc(n,Kc(i)),o=!0)}),o?Jc(n):{x:0,y:0,width:0,height:0}},$c=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...Cl(t,[n,o,i]),width:t.width/i,height:t.height/i},s=[];for(let u of e.values()){let{measured:c,selectable:d=!0,hidden:f=!1}=u;if(l&&!d||f)continue;let h=c.width??u.width??u.initialWidth??null,y=c.height??u.height??u.initialHeight??null,b=El(r,fa(u)),S=(h??0)*(y??0),p=a&&b>0;(!u.internals.handleBounds||p||b>=S||u.dragging)&&s.push(u)}return s},cx=(e,t)=>{let n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function OA(e,t){let n=new Map,o=t?.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&(t?.includeHiddenNodes||!i.hidden)&&(!o||o.has(i.id))&&n.set(i.id,i)}),n}async function fx({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=OA(e,l),s=_l(r),u=Ss(s,t,n,l?.minZoom??i,l?.maxZoom??a,l?.padding??.1);return await o.setViewport(u,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)}function jm({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:i,onError:a}){let l=n.get(e),r=l.parentId?n.get(l.parentId):void 0,{x:s,y:u}=r?r.internals.positionAbsolute:{x:0,y:0},c=l.origin??o,d=l.extent||i;if(l.extent==="parent"&&!l.expandParent)if(!r)a?.("005",Sn.error005());else{let h=r.measured.width,y=r.measured.height;h&&y&&(d=[[s,u],[s+h,u+y]])}else r&&Sl(l.extent)&&(d=[[l.extent[0][0]+s,l.extent[0][1]+u],[l.extent[1][0]+s,l.extent[1][1]+u]]);let f=Sl(d)?ca(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",Sn.error015()),{position:{x:f.x-s+(l.measured.width??0)*c[0],y:f.y-u+(l.measured.height??0)*c[1]},positionAbsolute:f}}async function dx({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:i}){let a=new Set(e.map(f=>f.id)),l=[];for(let f of n){if(f.deletable===!1)continue;let h=a.has(f.id),y=!h&&f.parentId&&l.find(b=>b.id===f.parentId);(h||y)&&l.push(f)}let r=new Set(t.map(f=>f.id)),s=o.filter(f=>f.deletable!==!1),c=cx(l,s);for(let f of s)r.has(f.id)&&!c.find(y=>y.id===f.id)&&c.push(f);if(!i)return{edges:c,nodes:l};let d=await i({nodes:l,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:l}:{edges:[],nodes:[]}:d}var bl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),ca=(e={x:0,y:0},t,n)=>({x:bl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:bl(e.y,t[0][1],t[1][1]-(n?.height??0))});function px(e,t,n){let{width:o,height:i}=co(n),{x:a,y:l}=n.internals.positionAbsolute;return ca(e,[[a,l],[a+o,l+i]],t)}var $S=(e,t,n)=>e<t?bl(Math.abs(e-t),1,t)/t:e>n?-bl(Math.abs(e-n),1,t)/t:0,mx=(e,t,n=15,o=40)=>{let i=$S(e.x,o,t.width-o)*n,a=$S(e.y,o,t.height-o)*n;return[i,a]},Wc=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Um=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),Jc=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),fa=(e,t=[0,0])=>{let{x:n,y:o}=qm(e)?e.internals.positionAbsolute:bs(e,t);return{x:n,y:o,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Kc=(e,t=[0,0])=>{let{x:n,y:o}=qm(e)?e.internals.positionAbsolute:bs(e,t);return{x:n,y:o,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:o+(e.measured?.height??e.height??e.initialHeight??0)}},Qm=(e,t)=>Jc(Wc(Um(e),Um(t))),El=(e,t)=>{let n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},Fm=e=>kn(e.width)&&kn(e.height)&&kn(e.x)&&kn(e.y),kn=e=>!isNaN(e)&&isFinite(e),Km=(e,t)=>{},Nl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Cl=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?Nl(r,l):r},vs=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function gl(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function zA(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=gl(e,n),i=gl(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=gl(e.top??e.y??0,n),i=gl(e.bottom??e.y??0,n),a=gl(e.left??e.x??0,t),l=gl(e.right??e.x??0,t);return{top:o,right:l,bottom:i,left:a,x:a+l,y:o+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function LA(e,t,n,o,i,a){let{x:l,y:r}=vs(e,[t,n,o]),{x:s,y:u}=vs({x:e.x+e.width,y:e.y+e.height},[t,n,o]),c=i-s,d=a-u;return{left:Math.floor(l),top:Math.floor(r),right:Math.floor(c),bottom:Math.floor(d)}}var Ss=(e,t,n,o,i,a)=>{let l=zA(a,t,n),r=(t-l.x)/e.width,s=(n-l.y)/e.height,u=Math.min(r,s),c=bl(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,y=n/2-f*c,b=LA(e,h,y,c,t,n),S={left:Math.min(b.left-l.left,0),top:Math.min(b.top-l.top,0),right:Math.min(b.right-l.right,0),bottom:Math.min(b.bottom-l.bottom,0)};return{x:h-S.left+S.right,y:y-S.top+S.bottom,zoom:c}},Tl=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Sl(e){return e!=null&&e!=="parent"}function co(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function $m(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Wm(e,t={width:0,height:0},n,o,i){let a={...e},l=o.get(n);if(l){let r=l.origin||i;a.x+=l.internals.positionAbsolute.x-(t.width??0)*r[0],a.y+=l.internals.positionAbsolute.y-(t.height??0)*r[1]}return a}function Jm(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function hx(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function gx(e){return{...Im,...e||{}}}function ys(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=Gn(e),r=Cl({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:s,y:u}=n?Nl(r,t):r;return{xSnapped:s,ySnapped:u,...r}}var ef=e=>({width:e.offsetWidth,height:e.offsetHeight}),eh=e=>e?.getRootNode?.()||window?.document,BA=["INPUT","SELECT","TEXTAREA"];function th(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:BA.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var nh=e=>"clientX"in e,Gn=(e,t)=>{let n=nh(e),o=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:o-(t?.left??0),y:i-(t?.top??0)}},WS=(e,t,n,o,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(l=>{let r=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(r.left-n.left)/o,y:(r.top-n.top)/o,...ef(l)}})};function tf({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:i,sourceControlY:a,targetControlX:l,targetControlY:r}){let s=e*.125+i*.375+l*.375+n*.125,u=t*.125+a*.375+r*.375+o*.125,c=Math.abs(s-e),d=Math.abs(u-t);return[s,u,c,d]}function Qc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function JS({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case W.Left:return[t-Qc(t-o,a),n];case W.Right:return[t+Qc(o-t,a),n];case W.Top:return[t,n-Qc(n-i,a)];case W.Bottom:return[t,n+Qc(i-n,a)]}}function nf({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,curvature:l=.25}){let[r,s]=JS({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[u,c]=JS({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,h,y]=tf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:r,sourceControlY:s,targetControlX:u,targetControlY:c});return[`M${e},${t} C${r},${s} ${u},${c} ${o},${i}`,d,f,h,y]}function oh({sourceX:e,sourceY:t,targetX:n,targetY:o}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,l=Math.abs(o-t)/2,r=o<t?o+l:o-l;return[a,r,i,l]}function yx({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return o;let l=i&&n?o+1e3:o,r=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return l+r}function vx({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=Wc(Kc(e),Kc(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);let l={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:o/i[2]};return El(l,Jc(a))>0}var HA=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,kA=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),ih=(e,t,n={})=>{if(!e.source||!e.target)return Km("006",Sn.error006()),t;let o=n.getEdgeId||HA,i;return Xm(e)?i={...e}:i={...e,id:o(e)},kA(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function of({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=oh({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,l,r]}var ex={[W.Left]:{x:-1,y:0},[W.Right]:{x:1,y:0},[W.Top]:{x:0,y:-1},[W.Bottom]:{x:0,y:1}},GA=({source:e,sourcePosition:t=W.Bottom,target:n})=>t===W.Left||t===W.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},tx=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function UA({source:e,sourcePosition:t=W.Bottom,target:n,targetPosition:o=W.Top,center:i,offset:a,stepPosition:l}){let r=ex[t],s=ex[o],u={x:e.x+r.x*a,y:e.y+r.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},d=GA({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f],y=[],b,S,p={x:0,y:0},v={x:0,y:0},[,,m,g]=oh({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(r[f]*s[f]===-1){f==="x"?(b=i.x??u.x+(c.x-u.x)*l,S=i.y??(u.y+c.y)/2):(b=i.x??(u.x+c.x)/2,S=i.y??u.y+(c.y-u.y)*l);let _=[{x:b,y:u.y},{x:b,y:c.y}],N=[{x:u.x,y:S},{x:c.x,y:S}];r[f]===h?y=f==="x"?_:N:y=f==="x"?N:_}else{let _=[{x:u.x,y:c.y}],N=[{x:c.x,y:u.y}];if(f==="x"?y=r.x===h?N:_:y=r.y===h?_:N,t===o){let L=Math.abs(e[f]-n[f]);if(L<=a){let k=Math.min(a-1,a-L);r[f]===h?p[f]=(u[f]>e[f]?-1:1)*k:v[f]=(c[f]>n[f]?-1:1)*k}}if(t!==o){let L=f==="x"?"y":"x",k=r[f]===s[L],E=u[L]>c[L],M=u[L]<c[L];(r[f]===1&&(!k&&E||k&&M)||r[f]!==1&&(!k&&M||k&&E))&&(y=f==="x"?_:N)}let C={x:u.x+p.x,y:u.y+p.y},w={x:c.x+v.x,y:c.y+v.y},H=Math.max(Math.abs(C.x-y[0].x),Math.abs(w.x-y[0].x)),A=Math.max(Math.abs(C.y-y[0].y),Math.abs(w.y-y[0].y));H>=A?(b=(C.x+w.x)/2,S=y[0].y):(b=y[0].x,S=(C.y+w.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...y,{x:c.x+v.x,y:c.y+v.y},n],b,S,m,g]}function PA(e,t,n,o){let i=Math.min(tx(e,t)/2,tx(t,n)/2,o),{x:a,y:l}=t;if(e.x===a&&a===n.x||e.y===l&&l===n.y)return`L${a} ${l}`;if(e.y===l){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*u},${l}Q ${a},${l} ${a},${l+i*c}`}let r=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return`L ${a},${l+i*s}Q ${a},${l} ${a+i*r},${l}`}function xs({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,borderRadius:l=5,centerX:r,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,f,h,y,b]=UA({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:i},targetPosition:a,center:{x:r,y:s},offset:u,stepPosition:c});return[d.reduce((p,v,m)=>{let g="";return m>0&&m<d.length-1?g=PA(d[m-1],v,d[m+1],l):g=`${m===0?"M":"L"}${v.x} ${v.y}`,p+=g,p},""),f,h,y,b]}function nx(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function bx(e){let{sourceNode:t,targetNode:n}=e;if(!nx(t)||!nx(n))return null;let o=t.internals.handleBounds||ox(t.handles),i=n.internals.handleBounds||ox(n.handles),a=ix(o?.source??[],e.sourceHandle),l=ix(e.connectionMode===Di.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",Sn.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||W.Bottom,s=l?.position||W.Top,u=Mi(t,a,r),c=Mi(n,l,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:s}}function ox(e){if(!e)return null;let t=[],n=[];for(let o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Mi(e,t,n=W.Left,o=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:l,height:r}=t??co(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case W.Top:return{x:i+l/2,y:a};case W.Right:return{x:i+l,y:a+r/2};case W.Bottom:return{x:i+l/2,y:a+r};case W.Left:return{x:i,y:a+r/2}}}function ix(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function af(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Sx(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:i}){let a=new Set;return e.reduce((l,r)=>([r.markerStart||o,r.markerEnd||i].forEach(s=>{if(s&&typeof s=="object"){let u=af(s,t);a.has(u)||(l.push({id:u,color:s.color||n,...s}),a.add(u))}}),l),[]).sort((l,r)=>l.id.localeCompare(r.id))}var xx=1e3,IA=10,ah={nodeOrigin:[0,0],nodeExtent:xl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},VA={...ah,checkEquality:!0};function lh(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function _x(e,t,n){let o=lh(ah,n);for(let i of e.values())if(i.parentId)sh(i,e,t,o);else{let a=bs(i,o.nodeOrigin),l=Sl(i.extent)?i.extent:o.nodeExtent,r=ca(a,l,co(i));i.internals.positionAbsolute=r}}function YA(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],o=[];for(let i of e.handles){let a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&o.push(a)}return{source:n,target:o}}function rh(e){return e==="manual"}function lf(e,t,n,o={}){let i=lh(VA,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!rh(i.zIndexMode)?xx:0,s=e.length>0;t.clear(),n.clear();for(let u of e){let c=l.get(u.id);if(i.checkEquality&&u===c?.internals.userNode)t.set(u.id,c);else{let d=bs(u,i.nodeOrigin),f=Sl(u.extent)?u.extent:i.nodeExtent,h=ca(d,f,co(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:YA(u,c),z:Ex(u,r,i.zIndexMode),userNode:u}},t.set(u.id,c)}(c.measured===void 0||c.measured.width===void 0||c.measured.height===void 0)&&!c.hidden&&(s=!1),u.parentId&&sh(c,t,n,o,a)}return s}function XA(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function sh(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:s}=lh(ah,o),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}XA(e,n),i&&!c.parentId&&c.internals.rootParentIndex===void 0&&s==="auto"&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+i.i*IA),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!rh(s)?xx:0,{x:f,y:h,z:y}=qA(e,c,l,r,d,s),{positionAbsolute:b}=e.internals,S=f!==b.x||h!==b.y;(S||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:f,y:h}:b,z:y}})}function Ex(e,t,n){let o=kn(e.zIndex)?e.zIndex:0;return rh(n)?o:o+(e.selected?t:0)}function qA(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,s=co(e),u=bs(e,n),c=Sl(e.extent)?ca(u,e.extent,s):u,d=ca({x:l+c.x,y:r+c.y},o,s);e.extent==="parent"&&(d=px(d,s,t));let f=Ex(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function rf(e,t,n,o=[0,0]){let i=[],a=new Map;for(let l of e){let r=t.get(l.parentId);if(!r)continue;let s=a.get(l.parentId)?.expandedRect??fa(r),u=Qm(s,l.rect);a.set(l.parentId,{expandedRect:u,parent:r})}return a.size>0&&a.forEach(({expandedRect:l,parent:r},s)=>{let u=r.internals.positionAbsolute,c=co(r),d=r.origin??o,f=l.x<u.x?Math.round(Math.abs(u.x-l.x)):0,h=l.y<u.y?Math.round(Math.abs(u.y-l.y)):0,y=Math.max(c.width,Math.round(l.width)),b=Math.max(c.height,Math.round(l.height)),S=(y-c.width)*d[0],p=(b-c.height)*d[1];(f>0||h>0||S||p)&&(i.push({id:s,type:"position",position:{x:r.position.x-f+S,y:r.position.y-h+p}}),n.get(s)?.forEach(v=>{e.some(m=>m.id===v.id)||i.push({id:v.id,type:"position",position:{x:v.position.x+f,y:v.position.y+h}})})),(c.width<l.width||c.height<l.height||f||h)&&i.push({id:s,type:"dimensions",setAttributes:!0,dimensions:{width:y+(f?d[0]*f-S:0),height:b+(h?d[1]*h-p:0)}})}),i}function Nx(e,t,n,o,i,a,l){let r=o?.querySelector(".xyflow__viewport"),s=!1;if(!r)return{changes:[],updatedInternals:s};let u=[],c=window.getComputedStyle(r),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let h of e.values()){let y=t.get(h.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),s=!0;continue}let b=ef(h.nodeElement),S=y.measured.width!==b.width||y.measured.height!==b.height;if(!!(b.width&&b.height&&(S||!y.internals.handleBounds||h.force))){let v=h.nodeElement.getBoundingClientRect(),m=Sl(y.extent)?y.extent:a,{positionAbsolute:g}=y.internals;y.parentId&&y.extent==="parent"?g=px(g,b,t.get(y.parentId)):m&&(g=ca(g,m,b));let x={...y,measured:b,internals:{...y.internals,positionAbsolute:g,handleBounds:{source:WS("source",h.nodeElement,v,d,y.id),target:WS("target",h.nodeElement,v,d,y.id)}}};t.set(y.id,x),y.parentId&&sh(x,t,n,{nodeOrigin:i,zIndexMode:l}),s=!0,S&&(u.push({id:y.id,type:"dimensions",dimensions:b}),y.expandParent&&y.parentId&&f.push({id:y.id,parentId:y.parentId,rect:fa(x,i)}))}}if(f.length>0){let h=rf(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:s}}async function Cx({delta:e,panZoom:t,transform:n,translateExtent:o,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);let l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],o),r=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(r)}function ax(e,t,n,o,i,a){let l=i,r=o.get(l)||new Map;o.set(l,r.set(n,t)),l=`${i}-${e}`;let s=o.get(l)||new Map;if(o.set(l,s.set(n,t)),a){l=`${i}-${e}-${a}`;let u=o.get(l)||new Map;o.set(l,u.set(n,t))}}function uh(e,t,n){e.clear(),t.clear();for(let o of n){let{source:i,target:a,sourceHandle:l=null,targetHandle:r=null}=o,s={edgeId:o.id,source:i,target:a,sourceHandle:l,targetHandle:r},u=`${i}-${l}--${a}-${r}`,c=`${a}-${r}--${i}-${l}`;ax("source",s,c,e,i,l),ax("target",s,u,e,a,r),t.set(o.id,o)}}function Tx(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Tx(n,t):!1}function lx(e,t,n){let o=e;do{if(o?.matches?.(t))return!0;if(o===n)return!1;o=o?.parentElement}while(o);return!1}function ZA(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!Tx(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let r=e.get(a);r&&i.set(a,{id:a,position:r.position||{x:0,y:0},distance:{x:n.x-r.internals.positionAbsolute.x,y:n.y-r.internals.positionAbsolute.y},extent:r.extent,parentId:r.parentId,origin:r.origin,expandParent:r.expandParent,internals:{positionAbsolute:r.internals.positionAbsolute||{x:0,y:0}},measured:{width:r.measured.width??0,height:r.measured.height??0}})}return i}function Hm({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){let i=[];for(let[l,r]of t){let s=n.get(l)?.internals.userNode;s&&i.push({...s,position:r.position,dragging:o})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:o}:i[0],i]}function jA({dragItems:e,snapGrid:t,x:n,y:o}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:o-i.distance.y},l=Nl(a,t);return{x:l.x-a.x,y:l.y-a.y}}function wx({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:i}){let a={x:null,y:null},l=0,r=new Map,s=!1,u={x:0,y:0},c=null,d=!1,f=null,h=!1,y=!1,b=null;function S({noDragClassName:v,handleSelector:m,domNode:g,isSelectable:x,nodeId:_,nodeClickDistance:N=0}){f=xt(g);function C({x:L,y:k}){let{nodeLookup:E,nodeExtent:M,snapGrid:D,snapToGrid:O,nodeOrigin:R,onNodeDrag:z,onSelectionDrag:V,onError:G,updateNodePositions:P}=t();a={x:L,y:k};let q=!1,Z=r.size>1,j=Z&&M?Um(_l(r)):null,re=Z&&O?jA({dragItems:r,snapGrid:D,x:L,y:k}):null;for(let[$,Y]of r){if(!E.has($))continue;let K={x:L-Y.distance.x,y:k-Y.distance.y};O&&(K=re?{x:Math.round(K.x+re.x),y:Math.round(K.y+re.y)}:Nl(K,D));let ce=null;if(Z&&M&&!Y.extent&&j){let{positionAbsolute:ee}=Y.internals,ye=ee.x-j.x+M[0][0],xe=ee.x+Y.measured.width-j.x2+M[1][0],Ne=ee.y-j.y+M[0][1],Qe=ee.y+Y.measured.height-j.y2+M[1][1];ce=[[ye,Ne],[xe,Qe]]}let{position:de,positionAbsolute:te}=jm({nodeId:$,nextPosition:K,nodeLookup:E,nodeExtent:ce||M,nodeOrigin:R,onError:G});q=q||Y.position.x!==de.x||Y.position.y!==de.y,Y.position=de,Y.internals.positionAbsolute=te}if(y=y||q,!!q&&(P(r,!0),b&&(o||z||!_&&V))){let[$,Y]=Hm({nodeId:_,dragItems:r,nodeLookup:E});o?.(b,r,$,Y),z?.(b,$,Y),_||V?.(b,Y)}}async function w(){if(!c)return;let{transform:L,panBy:k,autoPanSpeed:E,autoPanOnNodeDrag:M}=t();if(!M){s=!1,cancelAnimationFrame(l);return}let[D,O]=mx(u,c,E);(D!==0||O!==0)&&(a.x=(a.x??0)-D/L[2],a.y=(a.y??0)-O/L[2],await k({x:D,y:O})&&C(a)),l=requestAnimationFrame(w)}function H(L){let{nodeLookup:k,multiSelectionActive:E,nodesDraggable:M,transform:D,snapGrid:O,snapToGrid:R,selectNodesOnDrag:z,onNodeDragStart:V,onSelectionDragStart:G,unselectNodesAndEdges:P}=t();d=!0,(!z||!x)&&!E&&_&&(k.get(_)?.selected||P()),x&&z&&_&&e?.(_);let q=ys(L.sourceEvent,{transform:D,snapGrid:O,snapToGrid:R,containerBounds:c});if(a=q,r=ZA(k,M,q,_),r.size>0&&(n||V||!_&&G)){let[Z,j]=Hm({nodeId:_,dragItems:r,nodeLookup:k});n?.(L.sourceEvent,r,Z,j),V?.(L.sourceEvent,Z,j),_||G?.(L.sourceEvent,j)}}let A=Tc().clickDistance(N).on("start",L=>{let{domNode:k,nodeDragThreshold:E,transform:M,snapGrid:D,snapToGrid:O}=t();c=k?.getBoundingClientRect()||null,h=!1,y=!1,b=L.sourceEvent,E===0&&H(L),a=ys(L.sourceEvent,{transform:M,snapGrid:D,snapToGrid:O,containerBounds:c}),u=Gn(L.sourceEvent,c)}).on("drag",L=>{let{autoPanOnNodeDrag:k,transform:E,snapGrid:M,snapToGrid:D,nodeDragThreshold:O,nodeLookup:R}=t(),z=ys(L.sourceEvent,{transform:E,snapGrid:M,snapToGrid:D,containerBounds:c});if(b=L.sourceEvent,(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1||_&&!R.has(_))&&(h=!0),!h){if(!s&&k&&d&&(s=!0,w()),!d){let V=Gn(L.sourceEvent,c),G=V.x-u.x,P=V.y-u.y;Math.sqrt(G*G+P*P)>O&&H(L)}(a.x!==z.xSnapped||a.y!==z.ySnapped)&&r&&d&&(u=Gn(L.sourceEvent,c),C(z))}}).on("end",L=>{if(!(!d||h)&&(s=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:k,updateNodePositions:E,onNodeDragStop:M,onSelectionDragStop:D}=t();if(y&&(E(r,!1),y=!1),i||M||!_&&D){let[O,R]=Hm({nodeId:_,dragItems:r,nodeLookup:k,dragging:!1});i?.(L.sourceEvent,r,O,R),M?.(L.sourceEvent,O,R),_||D?.(L.sourceEvent,R)}}}).filter(L=>{let k=L.target;return!L.button&&(!v||!lx(k,`.${v}`,g))&&(!m||lx(k,m,g))});f.call(A)}function p(){f?.on(".drag",null)}return{update:S,destroy:p}}function QA(e,t,n){let o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let a of t.values())El(i,fa(a))>0&&o.push(a);return o}var FA=250;function KA(e,t,n,o){let i=[],a=1/0,l=QA(e,n,t+FA);for(let r of l){let s=[...r.internals.handleBounds?.source??[],...r.internals.handleBounds?.target??[]];for(let u of s){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;let{x:c,y:d}=Mi(r,u,u.position,!0),f=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(d-e.y,2));f>t||(f<a?(i=[{...u,x:c,y:d}],a=f):f===a&&i.push({...u,x:c,y:d}))}}if(!i.length)return null;if(i.length>1){let r=o.type==="source"?"target":"source";return i.find(s=>s.type===r)??i[0]}return i[0]}function Ax(e,t,n,o,i,a=!1){let l=o.get(e);if(!l)return null;let r=i==="strict"?l.internals.handleBounds?.[t]:[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]],s=(n?r?.find(u=>u.id===n):r?.[0])??null;return s&&a?{...s,...Mi(l,s,s.position,!0)}:s}function Dx(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function $A(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var Mx=()=>!0;function WA(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:i,edgeUpdaterType:a,isTarget:l,domNode:r,nodeLookup:s,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:h,onConnectStart:y,onConnect:b,onConnectEnd:S,isValidConnection:p=Mx,onReconnectEnd:v,updateConnection:m,getTransform:g,getFromHandle:x,autoPanSpeed:_,dragThreshold:N=1,handleDomNode:C}){let w=eh(e.target),H=0,A,{x:L,y:k}=Gn(e),E=Dx(a,C),M=r?.getBoundingClientRect(),D=!1;if(!M||!E)return;let O=Ax(i,E,o,s,t);if(!O)return;let R=Gn(e,M),z=!1,V=null,G=!1,P=null;function q(){if(!c||!M)return;let[de,te]=mx(R,M,_);f({x:de,y:te}),H=requestAnimationFrame(q)}let Z={...O,nodeId:i,type:E,position:O.position},j=s.get(i),$={inProgress:!0,isValid:null,from:Mi(j,Z,W.Left,!0),fromHandle:Z,fromPosition:Z.position,fromNode:j,to:R,toHandle:null,toPosition:KS[Z.position],toNode:null,pointer:R};function Y(){D=!0,m($),y?.(e,{nodeId:i,handleId:o,handleType:E})}N===0&&Y();function K(de){if(!D){let{x:Qe,y:$e}=Gn(de),lt=Qe-L,zt=$e-k;if(!(lt*lt+zt*zt>N*N))return;Y()}if(!x()||!Z){ce(de);return}let te=g();R=Gn(de,M),A=KA(Cl(R,te,!1,[1,1]),n,s,Z),z||(q(),z=!0);let ee=Rx(de,{handle:A,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:p,doc:w,lib:u,flowId:d,nodeLookup:s});P=ee.handleDomNode,V=ee.connection,G=$A(!!A,ee.isValid);let ye=s.get(i),xe=ye?Mi(ye,Z,W.Left,!0):$.from,Ne={...$,from:xe,isValid:G,to:ee.toHandle&&G?vs({x:ee.toHandle.x,y:ee.toHandle.y},te):R,toHandle:ee.toHandle,toPosition:G&&ee.toHandle?ee.toHandle.position:KS[Z.position],toNode:ee.toHandle?s.get(ee.toHandle.nodeId):null,pointer:R};m(Ne),$=Ne}function ce(de){if(!("touches"in de&&de.touches.length>0)){if(D){(A||P)&&V&&G&&b?.(V);let{inProgress:te,...ee}=$,ye={...ee,toPosition:$.toHandle?$.toPosition:null};S?.(de,ye),a&&v?.(de,ye)}h(),cancelAnimationFrame(H),z=!1,G=!1,V=null,P=null,w.removeEventListener("mousemove",K),w.removeEventListener("mouseup",ce),w.removeEventListener("touchmove",K),w.removeEventListener("touchend",ce)}}w.addEventListener("mousemove",K),w.addEventListener("mouseup",ce),w.addEventListener("touchmove",K),w.addEventListener("touchend",ce)}function Rx(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:s,isValidConnection:u=Mx,nodeLookup:c}){let d=a==="target",f=t?l.querySelector(`.${r}-flow__handle[data-id="${s}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y}=Gn(e),b=l.elementFromPoint(h,y),S=b?.classList.contains(`${r}-flow__handle`)?b:f,p={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){let v=Dx(void 0,S),m=S.getAttribute("data-nodeid"),g=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),_=S.classList.contains("connectableend");if(!m||!v)return p;let N={source:d?m:o,sourceHandle:d?g:i,target:d?o:m,targetHandle:d?i:g};p.connection=N;let w=x&&_&&(n===Di.Strict?d&&v==="source"||!d&&v==="target":m!==o||g!==i);p.isValid=w&&u(N),p.toHandle=Ax(m,v,g,c,n,!0)}return p}var sf={onPointerDown:WA,isValid:Rx};function Ox({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=xt(e);function a({translateExtent:r,width:s,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){let y=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let g=n(),x=m.sourceEvent.ctrlKey&&Tl()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,N=g[2]*Math.pow(2,_*x);t.scaleTo(N)},b=[0,0],S=m=>{(m.sourceEvent.type==="mousedown"||m.sourceEvent.type==="touchstart")&&(b=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY])},p=m=>{let g=n();if(m.sourceEvent.type!=="mousemove"&&m.sourceEvent.type!=="touchmove"||!t)return;let x=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[x[0]-b[0],x[1]-b[1]];b=x;let N=o()*Math.max(g[2],Math.log(g[2]))*(h?-1:1),C={x:g[0]-_[0]*N,y:g[1]-_[1]*N},w=[[0,0],[s,u]];t.setViewportConstrained({x:C.x,y:C.y,zoom:g[2]},w,r)},v=jc().on("start",S).on("zoom",d?p:null).on("zoom.wheel",f?y:null);i.call(v,{})}function l(){i.on("zoom",null)}return{update:a,destroy:l,pointer:It}}var uf=e=>({x:e.x,y:e.y,zoom:e.k}),km=({x:e,y:t,zoom:n})=>sa.translate(e,t).scale(n),yl=(e,t)=>e.target.closest(`.${t}`),zx=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),JA=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Gm=(e,t=0,n=JA,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},Lx=e=>{let t=e.ctrlKey&&Tl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function eD({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(yl(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&l){let S=It(c),p=Lx(c),v=d*Math.pow(2,p);o.scaleTo(n,v,S,c);return}let f=c.deltaMode===1?20:1,h=i===Yo.Vertical?0:c.deltaX*f,y=i===Yo.Horizontal?0:c.deltaY*f;!Tl()&&c.shiftKey&&i!==Yo.Vertical&&(h=c.deltaY*f,y=0),o.translateBy(n,-(h/d)*a,-(y/d)*a,{internal:!0});let b=uf(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(s?.(c,b),e.panScrollTimeout=setTimeout(()=>{u?.(c,b),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,r?.(c,b))}}function tD({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=yl(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function nD({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=uf(o.transform);e.mouseButton=o.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=i,o.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(o.sourceEvent,i)}}function oD({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&zx(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,uf(a.transform))}}function iD({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&zx(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=uf(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function aD({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:r,noPanClassName:s,lib:u,connectionInProgress:c}){return d=>{let f=e||t,h=n&&d.ctrlKey,y=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(yl(d,`${u}-flow__node`)||yl(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!y||yl(d,r)&&y||yl(d,s)&&(!y||i&&y&&!e)||!n&&d.ctrlKey&&y)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&y||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let b=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||y)&&b}}function Bx({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:i,onPanZoom:a,onPanZoomStart:l,onPanZoomEnd:r,onDraggingChange:s}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=jc().scaleExtent([t,n]).translateExtent(o),f=xt(e).call(d);v({x:i.x,y:i.y,zoom:bl(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let h=f.on("wheel.zoom"),y=f.on("dblclick.zoom");d.wheelDelta(Lx);function b(A,L){return f?new Promise(k=>{d?.interpolate(L?.interpolate==="linear"?Io:aa).transform(Gm(f,L?.duration,L?.ease,()=>k(!0)),A)}):Promise.resolve(!1)}function S({noWheelClassName:A,noPanClassName:L,onPaneContextMenu:k,userSelectionActive:E,panOnScroll:M,panOnDrag:D,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:z,zoomOnPinch:V,zoomOnScroll:G,zoomOnDoubleClick:P,zoomActivationKeyPressed:q,lib:Z,onTransformChange:j,connectionInProgress:re,paneClickDistance:$,selectionOnDrag:Y}){E&&!u.isZoomingOrPanning&&p();let K=M&&!q&&!E;d.clickDistance(Y?1/0:!kn($)||$<0?0:$);let ce=K?eD({zoomPanValues:u,noWheelClassName:A,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):tD({noWheelClassName:A,preventScrolling:z,d3ZoomHandler:h});if(f.on("wheel.zoom",ce,{passive:!1}),!E){let te=nD({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:l});d.on("start",te);let ee=oD({zoomPanValues:u,panOnDrag:D,onPaneContextMenu:!!k,onPanZoom:a,onTransformChange:j});d.on("zoom",ee);let ye=iD({zoomPanValues:u,panOnDrag:D,panOnScroll:M,onPaneContextMenu:k,onPanZoomEnd:r,onDraggingChange:s});d.on("end",ye)}let de=aD({zoomActivationKeyPressed:q,panOnDrag:D,zoomOnScroll:G,panOnScroll:M,zoomOnDoubleClick:P,zoomOnPinch:V,userSelectionActive:E,noPanClassName:L,noWheelClassName:A,lib:Z,connectionInProgress:re});d.filter(de),P?f.on("dblclick.zoom",y):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function v(A,L,k){let E=km(A),M=d?.constrain()(E,L,k);return M&&await b(M),new Promise(D=>D(M))}async function m(A,L){let k=km(A);return await b(k,L),new Promise(E=>E(k))}function g(A){if(f){let L=km(A),k=f.property("__zoom");(k.k!==A.zoom||k.x!==A.x||k.y!==A.y)&&d?.transform(f,L,null,{sync:!0})}}function x(){let A=f?gs(f.node()):{x:0,y:0,k:1};return{x:A.x,y:A.y,zoom:A.k}}function _(A,L){return f?new Promise(k=>{d?.interpolate(L?.interpolate==="linear"?Io:aa).scaleTo(Gm(f,L?.duration,L?.ease,()=>k(!0)),A)}):Promise.resolve(!1)}function N(A,L){return f?new Promise(k=>{d?.interpolate(L?.interpolate==="linear"?Io:aa).scaleBy(Gm(f,L?.duration,L?.ease,()=>k(!0)),A)}):Promise.resolve(!1)}function C(A){d?.scaleExtent(A)}function w(A){d?.translateExtent(A)}function H(A){let L=!kn(A)||A<0?0:A;d?.clickDistance(L)}return{update:S,destroy:p,setViewport:m,setViewportConstrained:v,getViewport:x,scaleTo:_,scaleBy:N,setScaleExtent:C,setTranslateExtent:w,syncViewport:g,setClickDistance:H}}var Ri;(function(e){e.Line="line",e.Handle="handle"})(Ri||(Ri={}));function lD({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:i,affectsY:a}){let l=e-t,r=n-o,s=[l>0?1:l<0?-1:0,r>0?1:r<0?-1:0];return l&&i&&(s[0]=s[0]*-1),r&&a&&(s[1]=s[1]*-1),s}function rx(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:i}}function wi(e,t){return Math.max(0,t-e)}function Ai(e,t){return Math.max(0,e-t)}function Fc(e,t,n){return Math.max(0,t-e,e-n)}function sx(e,t){return e?!t:t}function rD(e,t,n,o,i,a,l,r){let{affectsX:s,affectsY:u}=t,{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:h,ySnapped:y}=n,{minWidth:b,maxWidth:S,minHeight:p,maxHeight:v}=o,{x:m,y:g,width:x,height:_,aspectRatio:N}=e,C=Math.floor(c?h-e.pointerX:0),w=Math.floor(d?y-e.pointerY:0),H=x+(s?-C:C),A=_+(u?-w:w),L=-a[0]*x,k=-a[1]*_,E=Fc(H,b,S),M=Fc(A,p,v);if(l){let R=0,z=0;s&&C<0?R=wi(m+C+L,l[0][0]):!s&&C>0&&(R=Ai(m+H+L,l[1][0])),u&&w<0?z=wi(g+w+k,l[0][1]):!u&&w>0&&(z=Ai(g+A+k,l[1][1])),E=Math.max(E,R),M=Math.max(M,z)}if(r){let R=0,z=0;s&&C>0?R=Ai(m+C,r[0][0]):!s&&C<0&&(R=wi(m+H,r[1][0])),u&&w>0?z=Ai(g+w,r[0][1]):!u&&w<0&&(z=wi(g+A,r[1][1])),E=Math.max(E,R),M=Math.max(M,z)}if(i){if(c){let R=Fc(H/N,p,v)*N;if(E=Math.max(E,R),l){let z=0;!s&&!u||s&&!u&&f?z=Ai(g+k+H/N,l[1][1])*N:z=wi(g+k+(s?C:-C)/N,l[0][1])*N,E=Math.max(E,z)}if(r){let z=0;!s&&!u||s&&!u&&f?z=wi(g+H/N,r[1][1])*N:z=Ai(g+(s?C:-C)/N,r[0][1])*N,E=Math.max(E,z)}}if(d){let R=Fc(A*N,b,S)/N;if(M=Math.max(M,R),l){let z=0;!s&&!u||u&&!s&&f?z=Ai(m+A*N+L,l[1][0])/N:z=wi(m+(u?w:-w)*N+L,l[0][0])/N,M=Math.max(M,z)}if(r){let z=0;!s&&!u||u&&!s&&f?z=wi(m+A*N,r[1][0])/N:z=Ai(m+(u?w:-w)*N,r[0][0])/N,M=Math.max(M,z)}}}w=w+(w<0?M:-M),C=C+(C<0?E:-E),i&&(f?H>A*N?w=(sx(s,u)?-C:C)/N:C=(sx(s,u)?-w:w)*N:c?(w=C/N,u=s):(C=w*N,s=u));let D=s?m+C:m,O=u?g+w:g;return{width:x+(s?-C:C),height:_+(u?-w:w),x:a[0]*C*(s?-1:1)+D,y:a[1]*w*(u?-1:1)+O}}var Hx={width:0,height:0,x:0,y:0},sD={...Hx,pointerX:0,pointerY:0,aspectRatio:1};function uD(e){return[[0,0],[e.measured.width,e.measured.height]]}function cD(e,t,n){let o=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,l=e.measured.height??0,r=n[0]*a,s=n[1]*l;return[[o-r,i-s],[o+a-r,i+l-s]]}function kx({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=xt(e),l={controlDirection:rx("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function r({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:y,onResizeEnd:b,shouldResize:S}){let p={...Hx},v={...sD};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:rx(u)};let m,g=null,x=[],_,N,C,w=!1,H=Tc().on("start",A=>{let{nodeLookup:L,transform:k,snapGrid:E,snapToGrid:M,nodeOrigin:D,paneDomNode:O}=n();if(m=L.get(t),!m)return;g=O?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:z}=ys(A.sourceEvent,{transform:k,snapGrid:E,snapToGrid:M,containerBounds:g});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},v={...p,pointerX:R,pointerY:z,aspectRatio:p.width/p.height},_=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=L.get(m.parentId),N=_&&m.extent==="parent"?uD(_):void 0),x=[],C=void 0;for(let[V,G]of L)if(G.parentId===t&&(x.push({id:V,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){let P=cD(G,m,G.origin??D);C?C=[[Math.min(P[0][0],C[0][0]),Math.min(P[0][1],C[0][1])],[Math.max(P[1][0],C[1][0]),Math.max(P[1][1],C[1][1])]]:C=P}h?.(A,{...p})}).on("drag",A=>{let{transform:L,snapGrid:k,snapToGrid:E,nodeOrigin:M}=n(),D=ys(A.sourceEvent,{transform:L,snapGrid:k,snapToGrid:E,containerBounds:g}),O=[];if(!m)return;let{x:R,y:z,width:V,height:G}=p,P={},q=m.origin??M,{width:Z,height:j,x:re,y:$}=rD(v,l.controlDirection,D,l.boundaries,l.keepAspectRatio,q,N,C),Y=Z!==V,K=j!==G,ce=re!==R&&Y,de=$!==z&&K;if(!ce&&!de&&!Y&&!K)return;if((ce||de||q[0]===1||q[1]===1)&&(P.x=ce?re:p.x,P.y=de?$:p.y,p.x=P.x,p.y=P.y,x.length>0)){let xe=re-R,Ne=$-z;for(let Qe of x)Qe.position={x:Qe.position.x-xe+q[0]*(Z-V),y:Qe.position.y-Ne+q[1]*(j-G)},O.push(Qe)}if((Y||K)&&(P.width=Y&&(!l.resizeDirection||l.resizeDirection==="horizontal")?Z:p.width,P.height=K&&(!l.resizeDirection||l.resizeDirection==="vertical")?j:p.height,p.width=P.width,p.height=P.height),_&&m.expandParent){let xe=q[0]*(P.width??0);P.x&&P.x<xe&&(p.x=xe,v.x=v.x-(P.x-xe));let Ne=q[1]*(P.height??0);P.y&&P.y<Ne&&(p.y=Ne,v.y=v.y-(P.y-Ne))}let te=lD({width:p.width,prevWidth:V,height:p.height,prevHeight:G,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),ee={...p,direction:te};S?.(A,ee)!==!1&&(w=!0,y?.(A,ee),o(P,O))}).on("end",A=>{w&&(b?.(A,{...p}),i?.({...p}),w=!1)});a.call(H)}function s(){a.on(".drag",null)}return{update:r,destroy:s}}var Kx=ae(kt(),1),$x=ae(qx(),1);var jx={},Zx=e=>{let t,n=new Set,o=(c,d)=>{let f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){let h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(y=>y(t,h))}},i=()=>t,s={setState:o,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(jx.env?jx.env.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."),n.clear()}},u=t=e(o,i,s);return s},Qx=e=>e?Zx(e):Zx;var{useDebugValue:AD}=Kx.default,{useSyncExternalStoreWithSelector:DD}=$x.default,MD=e=>e;function fh(e,t=MD,n){let o=DD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return AD(o),o}var Fx=(e,t)=>{let n=Qx(e),o=(i,a=t)=>fh(n,i,a);return Object.assign(o,n),o},Wx=(e,t)=>e?Fx(e,t):Fx;function Xe(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[o,i]of e)if(!Object.is(i,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let o of e)if(!t.has(o))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var RD=ae($f()),mf=(0,U.createContext)(null),OD=mf.Provider,__=Sn.error001();function Te(e,t){let n=(0,U.useContext)(mf);if(n===null)throw new Error(__);return fh(n,e,t)}function je(){let e=(0,U.useContext)(mf);if(e===null)throw new Error(__);return(0,U.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var Jx={display:"none"},zD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},E_="react-flow__node-desc",N_="react-flow__edge-desc",LD="react-flow__aria-live",BD=e=>e.ariaLiveMessage,HD=e=>e.ariaLabelConfig;function kD({rfId:e}){let t=Te(BD);return(0,B.jsx)("div",{id:`${LD}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:zD,children:t})}function GD({rfId:e,disableKeyboardA11y:t}){let n=Te(HD);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{id:`${E_}-${e}`,style:Jx,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,B.jsx)("div",{id:`${N_}-${e}`,style:Jx,children:n["edge.a11yDescription.default"]}),!t&&(0,B.jsx)(kD,{rfId:e})]})}var hf=(0,U.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let l=`${e}`.split("-");return(0,B.jsx)("div",{className:tt(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});hf.displayName="Panel";function UD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,B.jsx)(hf,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,B.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var PD=e=>{let t=[],n=[];for(let[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(let[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},ff=e=>e.id;function ID(e,t){return Xe(e.selectedNodes.map(ff),t.selectedNodes.map(ff))&&Xe(e.selectedEdges.map(ff),t.selectedEdges.map(ff))}function VD({onSelectionChange:e}){let t=je(),{selectedNodes:n,selectedEdges:o}=Te(PD,ID);return(0,U.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var YD=e=>!!e.onSelectionChangeHandlers;function XD({onSelectionChange:e}){let t=Te(YD);return e||t?(0,B.jsx)(VD,{onSelectionChange:e}):null}var C_=[0,0],qD={x:0,y:0,zoom:1},ZD=["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"],e_=[...ZD,"rfId"],jD=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),t_={translateExtent:xl,nodeOrigin:C_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function QD(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:s}=Te(jD,Xe),u=je();(0,U.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=t_,r()}),[]);let c=(0,U.useRef)(t_);return(0,U.useEffect)(()=>{for(let d of e_){let f=e[d],h=c.current[d];f!==h&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?o(f):d==="maxZoom"?i(f):d==="translateExtent"?a(f):d==="nodeExtent"?l(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:gx(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},e_.map(d=>e[d])),null}function n_(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function FD(e){let[t,n]=(0,U.useState)(e==="system"?null:e);return(0,U.useEffect)(()=>{if(e!=="system"){n(e);return}let o=n_(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:n_()?.matches?"dark":"light"}var o_=typeof document<"u"?document:null;function _s(e=null,t={target:o_,actInsideInputWithModifier:!0}){let[n,o]=(0,U.useState)(!1),i=(0,U.useRef)(!1),a=(0,U.useRef)(new Set([])),[l,r]=(0,U.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
2265
+ `).replace(`
2266
+
2267
+ `,`
2268
+ +`).split(`
2269
+ `)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,U.useEffect)(()=>{let s=t?.target??o_,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!i.current||i.current&&!u)&&th(h))return!1;let b=a_(h.code,r);if(a.current.add(h[b]),i_(l,a.current,!1)){let S=h.composedPath?.()?.[0]||h.target,p=S?.nodeName==="BUTTON"||S?.nodeName==="A";t.preventDefault!==!1&&(i.current||!p)&&h.preventDefault(),o(!0)}},d=h=>{let y=a_(h.code,r);i_(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(h[y]),h.key==="Meta"&&a.current.clear(),i.current=!1},f=()=>{a.current.clear(),o(!1)};return s?.addEventListener("keydown",c),s?.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{s?.removeEventListener("keydown",c),s?.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,o]),n}function i_(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function a_(e,t){return t.includes(e)?"code":"key"}var KD=()=>{let e=je();return(0,U.useMemo)(()=>({zoomIn:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomOut:t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t?.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{let{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:n?.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[o,i,a],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??o,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{let[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{let{width:o,height:i,minZoom:a,maxZoom:l,panZoom:r}=e.getState(),s=Ss(t,o,i,a,l,n?.padding??.1);return r?(await r.setViewport(s,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{let{transform:o,snapGrid:i,snapToGrid:a,domNode:l}=e.getState();if(!l)return t;let{x:r,y:s}=l.getBoundingClientRect(),u={x:t.x-r,y:t.y-s},c=n.snapGrid??i,d=n.snapToGrid??a;return Cl(u,o,d,c)},flowToScreenPosition:t=>{let{transform:n,domNode:o}=e.getState();if(!o)return t;let{x:i,y:a}=o.getBoundingClientRect(),l=vs(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function T_(e,t){let n=[],o=new Map,i=[];for(let a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{let l=o.get(a.id);l?l.push(a):o.set(a.id,[a])}for(let a of t){let l=o.get(a.id);if(!l){n.push(a);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}let r={...a};for(let s of l)$D(s,r);n.push(r)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function $D(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function w_(e,t){return T_(e,t)}function A_(e,t){return T_(e,t)}function da(e,t){return{id:e,type:"select",selected:t}}function Al(e,t=new Set,n=!1){let o=[];for(let[i,a]of e){let l=t.has(i);!(a.selected===void 0&&!l)&&a.selected!==l&&(n&&(a.selected=l),o.push(da(a.id,l)))}return o}function l_({items:e=[],lookup:t}){let n=[],o=new Map(e.map(i=>[i.id,i]));for(let[i,a]of e.entries()){let l=t.get(a.id),r=l?.internals?.userNode??l;r!==void 0&&r!==a&&n.push({id:a.id,item:a,type:"replace"}),r===void 0&&n.push({item:a,type:"add",index:i})}for(let[i]of t)o.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function r_(e){return{id:e.id,type:"remove"}}var s_=e=>ux(e),WD=e=>Xm(e);function D_(e){return(0,U.forwardRef)(e)}var JD=typeof window<"u"?U.useLayoutEffect:U.useEffect;function u_(e){let[t,n]=(0,U.useState)(BigInt(0)),[o]=(0,U.useState)(()=>eM(()=>n(i=>i+BigInt(1))));return JD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function eM(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var M_=(0,U.createContext)(null);function tM({children:e}){let t=je(),n=(0,U.useCallback)(r=>{let{nodes:s=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:y}=t.getState(),b=s;for(let p of r)b=typeof p=="function"?p(b):p;let S=l_({items:b,lookup:f});for(let p of y.values())S=p(S);c&&u(b),S.length>0?d?.(S):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:p,nodes:v,setNodes:m}=t.getState();p&&m(v)})},[]),o=u_(n),i=(0,U.useCallback)(r=>{let{edges:s=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),h=s;for(let y of r)h=typeof y=="function"?y(h):y;c?u(h):d&&d(l_({items:h,lookup:f}))},[]),a=u_(i),l=(0,U.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,B.jsx)(M_.Provider,{value:l,children:e})}function nM(){let e=(0,U.useContext)(M_);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var oM=e=>!!e.panZoom;function hh(){let e=KD(),t=je(),n=nM(),o=Te(oM),i=(0,U.useMemo)(()=>{let a=d=>t.getState().nodeLookup.get(d),l=d=>{n.nodeQueue.push(d)},r=d=>{n.edgeQueue.push(d)},s=d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState(),y=s_(d)?d:f.get(d.id),b=y.parentId?Wm(y.position,y.measured,y.parentId,f,h):y.position,S={...y,position:b,width:y.measured?.width??y.width,height:y.measured?.height??y.height};return fa(S)},u=(d,f,h={replace:!1})=>{l(y=>y.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&s_(S)?S:{...b,...S}}return b}))},c=(d,f,h={replace:!1})=>{r(y=>y.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&WD(S)?S:{...b,...S}}return b}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>a(d)?.internals.userNode,getInternalNode:a,getEdges:()=>{let{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:l,setEdges:r,addNodes:d=>{let f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{let f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{let{nodes:d=[],edges:f=[],transform:h}=t.getState(),[y,b,S]=h;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x:y,y:b,zoom:S}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:h,edges:y,onNodesDelete:b,onEdgesDelete:S,triggerNodeChanges:p,triggerEdgeChanges:v,onDelete:m,onBeforeDelete:g}=t.getState(),{nodes:x,edges:_}=await dx({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:y,onBeforeDelete:g}),N=_.length>0,C=x.length>0;if(N){let w=_.map(r_);S?.(_),v(w)}if(C){let w=x.map(r_);b?.(x),p(w)}return(C||N)&&m?.({nodes:x,edges:_}),{deletedNodes:x,deletedEdges:_}},getIntersectingNodes:(d,f=!0,h)=>{let y=Fm(d),b=y?d:s(d),S=h!==void 0;return b?(h||t.getState().nodes).filter(p=>{let v=t.getState().nodeLookup.get(p.id);if(v&&!y&&(p.id===d.id||!v.internals.positionAbsolute))return!1;let m=fa(S?p:v),g=El(m,b);return f&&g>0||g>=m.width*m.height||g>=b.width*b.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{let b=Fm(d)?d:s(d);if(!b)return!1;let S=El(b,f);return h&&S>0||S>=f.width*f.height||S>=b.width*b.height},updateNode:u,updateNodeData:(d,f,h={replace:!1})=>{u(d,y=>{let b=typeof f=="function"?f(y):f;return h.replace?{...y,data:b}:{...y,data:{...y.data,...b}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,y=>{let b=typeof f=="function"?f(y):f;return h.replace?{...y,data:b}:{...y,data:{...y.data,...b}}},h)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState();return Zm(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`)?.values()??[]),getNodeConnections:({type:d,handleId:f,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`)?.values()??[]),fitView:async d=>{let f=t.getState().fitViewResolver??hx();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return(0,U.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var c_=e=>e.selected,iM=typeof window<"u"?window:void 0;function aM({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=je(),{deleteElements:o}=hh(),i=_s(e,{actInsideInputWithModifier:!1}),a=_s(t,{target:iM});(0,U.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(c_),edges:l.filter(c_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,U.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function lM(e){let t=je();(0,U.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=ef(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",Sn.error004()),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);let o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}var gf={position:"absolute",width:"100%",height:"100%",top:0,left:0},rM=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function sM({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=Yo.Free,zoomOnDoubleClick:l=!0,panOnDrag:r=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:y,noWheelClassName:b,noPanClassName:S,onViewportChange:p,isControlledViewport:v,paneClickDistance:m,selectionOnDrag:g}){let x=je(),_=(0,U.useRef)(null),{userSelectionActive:N,lib:C,connectionInProgress:w}=Te(rM,Xe),H=_s(f),A=(0,U.useRef)();lM(_);let L=(0,U.useCallback)(k=>{p?.({x:k[0],y:k[1],zoom:k[2]}),v||x.setState({transform:k})},[p,v]);return(0,U.useEffect)(()=>{if(_.current){A.current=Bx({domNode:_.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:D=>x.setState(O=>O.paneDragging===D?O:{paneDragging:D}),onPanZoomStart:(D,O)=>{let{onViewportChangeStart:R,onMoveStart:z}=x.getState();z?.(D,O),R?.(O)},onPanZoom:(D,O)=>{let{onViewportChange:R,onMove:z}=x.getState();z?.(D,O),R?.(O)},onPanZoomEnd:(D,O)=>{let{onViewportChangeEnd:R,onMoveEnd:z}=x.getState();z?.(D,O),R?.(O)}});let{x:k,y:E,zoom:M}=A.current.getViewport();return x.setState({panZoom:A.current,transform:[k,E,M],domNode:_.current.closest(".react-flow")}),()=>{A.current?.destroy()}}},[]),(0,U.useEffect)(()=>{A.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:H,preventScrolling:h,noPanClassName:S,userSelectionActive:N,noWheelClassName:b,lib:C,onTransformChange:L,connectionInProgress:w,selectionOnDrag:g,paneClickDistance:m})},[e,t,n,o,i,a,l,r,H,h,S,N,b,C,L,w,g,m]),(0,B.jsx)("div",{className:"react-flow__renderer",ref:_,style:gf,children:y})}var uM=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function cM(){let{userSelectionActive:e,userSelectionRect:t}=Te(uM,Xe);return e&&t?(0,B.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var dh=(e,t)=>n=>{n.target===t.current&&e?.(n)},fM=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function dM({isSelecting:e,selectionKeyPressed:t,selectionMode:n=ua.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:r,onPaneClick:s,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:y}){let b=je(),{userSelectionActive:S,elementsSelectable:p,dragging:v,connectionInProgress:m}=Te(fM,Xe),g=p&&(e||S),x=(0,U.useRef)(null),_=(0,U.useRef)(),N=(0,U.useRef)(new Set),C=(0,U.useRef)(new Set),w=(0,U.useRef)(!1),H=R=>{if(w.current||m){w.current=!1;return}s?.(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},A=R=>{if(Array.isArray(o)&&o?.includes(2)){R.preventDefault();return}u?.(R)},L=c?R=>c(R):void 0,k=R=>{w.current&&(R.stopPropagation(),w.current=!1)},E=R=>{let{domNode:z}=b.getState();if(_.current=z?.getBoundingClientRect(),!_.current)return;let V=R.target===x.current;if(!V&&!!R.target.closest(".nokey")||!e||!(a&&V||t)||R.button!==0||!R.isPrimary)return;R.target?.setPointerCapture?.(R.pointerId),w.current=!1;let{x:q,y:Z}=Gn(R.nativeEvent,_.current);b.setState({userSelectionRect:{width:0,height:0,startX:q,startY:Z,x:q,y:Z}}),V||(R.stopPropagation(),R.preventDefault())},M=R=>{let{userSelectionRect:z,transform:V,nodeLookup:G,edgeLookup:P,connectionLookup:q,triggerNodeChanges:Z,triggerEdgeChanges:j,defaultEdgeOptions:re,resetSelectedElements:$}=b.getState();if(!_.current||!z)return;let{x:Y,y:K}=Gn(R.nativeEvent,_.current),{startX:ce,startY:de}=z;if(!w.current){let Ne=t?0:i;if(Math.hypot(Y-ce,K-de)<=Ne)return;$(),l?.(R)}w.current=!0;let te={startX:ce,startY:de,x:Y<ce?Y:ce,y:K<de?K:de,width:Math.abs(Y-ce),height:Math.abs(K-de)},ee=N.current,ye=C.current;N.current=new Set($c(G,te,V,n===ua.Partial,!0).map(Ne=>Ne.id)),C.current=new Set;let xe=re?.selectable??!0;for(let Ne of N.current){let Qe=q.get(Ne);if(Qe)for(let{edgeId:$e}of Qe.values()){let lt=P.get($e);lt&&(lt.selectable??xe)&&C.current.add($e)}}if(!Jm(ee,N.current)){let Ne=Al(G,N.current,!0);Z(Ne)}if(!Jm(ye,C.current)){let Ne=Al(P,C.current);j(Ne)}b.setState({userSelectionRect:te,userSelectionActive:!0,nodesSelectionActive:!1})},D=R=>{R.button===0&&(R.target?.releasePointerCapture?.(R.pointerId),!S&&R.target===x.current&&b.getState().userSelectionRect&&H?.(R),b.setState({userSelectionActive:!1,userSelectionRect:null}),w.current&&(r?.(R),b.setState({nodesSelectionActive:N.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return(0,B.jsxs)("div",{className:tt(["react-flow__pane",{draggable:O,dragging:v,selection:e}]),onClick:g?void 0:dh(H,x),onContextMenu:dh(A,x),onWheel:dh(L,x),onPointerEnter:g?void 0:d,onPointerMove:g?M:f,onPointerUp:g?D:void 0,onPointerDownCapture:g?E:void 0,onClickCapture:g?k:void 0,onPointerLeave:h,ref:x,style:gf,children:[y,(0,B.jsx)(cM,{})]})}function mh({id:e,store:t,unselect:n=!1,nodeRef:o}){let{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:r,onError:s}=t.getState(),u=r.get(e);if(!u){s?.("012",Sn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function R_({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=je(),[s,u]=(0,U.useState)(!1),c=(0,U.useRef)();return(0,U.useEffect)(()=>{c.current=wx({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{mh({id:d,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,U.useEffect)(()=>{if(!(t||!e.current||!c.current))return c.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:l}),()=>{c.current?.destroy()}},[n,o,t,a,e,i,l]),s}var pM=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function O_(){let e=je();return(0,U.useCallback)(n=>{let{nodeExtent:o,snapToGrid:i,snapGrid:a,nodesDraggable:l,onError:r,updateNodePositions:s,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=pM(l),h=i?a[0]:5,y=i?a[1]:5,b=n.direction.x*h*n.factor,S=n.direction.y*y*n.factor;for(let[,p]of u){if(!f(p))continue;let v={x:p.internals.positionAbsolute.x+b,y:p.internals.positionAbsolute.y+S};i&&(v=Nl(v,a));let{position:m,positionAbsolute:g}=jm({nodeId:p.id,nextPosition:v,nodeLookup:u,nodeExtent:o,nodeOrigin:c,onError:r});p.position=m,p.internals.positionAbsolute=g,d.set(p.id,p)}s(d)},[])}var gh=(0,U.createContext)(null),mM=gh.Provider;gh.Consumer;var z_=()=>(0,U.useContext)(gh),hM=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),gM=(e,t,n)=>o=>{let{connectionClickStartHandle:i,connectionMode:a,connection:l}=o,{fromHandle:r,toHandle:s,isValid:u}=l,c=s?.nodeId===e&&s?.id===t&&s?.type===n;return{connectingFrom:r?.nodeId===e&&r?.id===t&&r?.type===n,connectingTo:c,clickConnecting:i?.nodeId===e&&i?.id===t&&i?.type===n,isPossibleEndHandle:a===Di.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&u}};function yM({type:e="source",position:t=W.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:l,onConnect:r,children:s,className:u,onMouseDown:c,onTouchStart:d,...f},h){let y=l||null,b=e==="target",S=je(),p=z_(),{connectOnClick:v,noPanClassName:m,rfId:g}=Te(hM,Xe),{connectingFrom:x,connectingTo:_,clickConnecting:N,isPossibleEndHandle:C,connectionInProcess:w,clickConnectionInProcess:H,valid:A}=Te(gM(p,y,e),Xe);p||S.getState().onError?.("010",Sn.error010());let L=M=>{let{defaultEdgeOptions:D,onConnect:O,hasDefaultEdges:R}=S.getState(),z={...D,...M};if(R){let{edges:V,setEdges:G}=S.getState();G(ih(z,V))}O?.(z),r?.(z)},k=M=>{if(!p)return;let D=nh(M.nativeEvent);if(i&&(D&&M.button===0||!D)){let O=S.getState();sf.onPointerDown(M.nativeEvent,{handleDomNode:M.currentTarget,autoPanOnConnect:O.autoPanOnConnect,connectionMode:O.connectionMode,connectionRadius:O.connectionRadius,domNode:O.domNode,nodeLookup:O.nodeLookup,lib:O.lib,isTarget:b,handleId:y,nodeId:p,flowId:O.rfId,panBy:O.panBy,cancelConnection:O.cancelConnection,onConnectStart:O.onConnectStart,onConnectEnd:(...R)=>S.getState().onConnectEnd?.(...R),updateConnection:O.updateConnection,onConnect:L,isValidConnection:n||((...R)=>S.getState().isValidConnection?.(...R)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}D?c?.(M):d?.(M)},E=M=>{let{onClickConnectStart:D,onClickConnectEnd:O,connectionClickStartHandle:R,connectionMode:z,isValidConnection:V,lib:G,rfId:P,nodeLookup:q,connection:Z}=S.getState();if(!p||!R&&!i)return;if(!R){D?.(M.nativeEvent,{nodeId:p,handleId:y,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:p,type:e,id:y}});return}let j=eh(M.target),re=n||V,{connection:$,isValid:Y}=sf.isValid(M.nativeEvent,{handle:{nodeId:p,id:y,type:e},connectionMode:z,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:re,flowId:P,doc:j,lib:G,nodeLookup:q});Y&&$&&L($);let K=structuredClone(Z);delete K.inProgress,K.toPosition=K.toHandle?K.toHandle.position:null,O?.(M,K),S.setState({connectionClickStartHandle:null})};return(0,B.jsx)("div",{"data-handleid":y,"data-nodeid":p,"data-handlepos":t,"data-id":`${g}-${p}-${y}-${e}`,className:tt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:N,connectingfrom:x,connectingto:_,valid:A,connectionindicator:o&&(!w||C)&&(w||H?a:i)}]),onMouseDown:k,onTouchStart:k,onClick:v?E:void 0,ref:h,...f,children:s})}var pa=(0,U.memo)(D_(yM));function vM({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[e?.label,(0,B.jsx)(pa,{type:"source",position:n,isConnectable:t})]})}function bM({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:o=W.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(pa,{type:"target",position:n,isConnectable:t}),e?.label,(0,B.jsx)(pa,{type:"source",position:o,isConnectable:t})]})}function SM(){return null}function xM({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(pa,{type:"target",position:n,isConnectable:t}),e?.label]})}var pf={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},f_={input:vM,default:bM,output:xM,group:SM};function _M(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var EM=e=>{let{width:t,height:n,x:o,y:i}=_l(e.nodeLookup,{filter:a=>!!a.selected});return{width:kn(t)?t:null,height:kn(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${i}px)`}};function NM({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=je(),{width:i,height:a,transformString:l,userSelectionActive:r}=Te(EM,Xe),s=O_(),u=(0,U.useRef)(null);(0,U.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(R_({nodeRef:u,disabled:!c}),!c)return null;let d=e?h=>{let y=o.getState().nodes.filter(b=>b.selected);e(h,y)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(pf,h.key)&&(h.preventDefault(),s({direction:pf[h.key],factor:h.shiftKey?4:1}))};return(0,B.jsx)("div",{className:tt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:(0,B.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:f,style:{width:i,height:a}})})}var d_=typeof window<"u"?window:void 0,CM=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function L_({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,paneClickDistance:r,deleteKeyCode:s,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:y,panActivationKeyCode:b,zoomActivationKeyCode:S,elementsSelectable:p,zoomOnScroll:v,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:N,panOnDrag:C,defaultViewport:w,translateExtent:H,minZoom:A,maxZoom:L,preventScrolling:k,onSelectionContextMenu:E,noWheelClassName:M,noPanClassName:D,disableKeyboardA11y:O,onViewportChange:R,isControlledViewport:z}){let{nodesSelectionActive:V,userSelectionActive:G}=Te(CM,Xe),P=_s(u,{target:d_}),q=_s(b,{target:d_}),Z=q||C,j=q||g,re=c&&Z!==!0,$=P||G||re;return aM({deleteKeyCode:s,multiSelectionKeyCode:y}),(0,B.jsx)(sM,{onPaneContextMenu:a,elementsSelectable:p,zoomOnScroll:v,zoomOnPinch:m,panOnScroll:j,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:N,panOnDrag:!P&&Z,defaultViewport:w,translateExtent:H,minZoom:A,maxZoom:L,zoomActivationKeyCode:S,preventScrolling:k,noWheelClassName:M,noPanClassName:D,onViewportChange:R,isControlledViewport:z,paneClickDistance:r,selectionOnDrag:re,children:(0,B.jsxs)(dM,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:Z,isSelecting:!!$,selectionMode:d,selectionKeyPressed:P,paneClickDistance:r,selectionOnDrag:re,children:[e,V&&(0,B.jsx)(NM,{onSelectionContextMenu:E,noPanClassName:D,disableKeyboardA11y:O})]})})}L_.displayName="FlowRenderer";var TM=(0,U.memo)(L_),wM=e=>t=>e?$c(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function AM(e){return Te((0,U.useCallback)(wM(e),[e]),Xe)}var DM=e=>e.updateNodeInternals;function MM(){let e=Te(DM),[t]=(0,U.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let o=new Map;n.forEach(i=>{let a=i.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:i.target,force:!0})}),e(o)}));return(0,U.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function RM({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=je(),a=(0,U.useRef)(null),l=(0,U.useRef)(null),r=(0,U.useRef)(e.sourcePosition),s=(0,U.useRef)(e.targetPosition),u=(0,U.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,U.useEffect)(()=>{a.current&&!e.hidden&&(!c||l.current!==a.current)&&(l.current&&o?.unobserve(l.current),o?.observe(a.current),l.current=a.current)},[c,e.hidden]),(0,U.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,U.useEffect)(()=>{if(a.current){let d=u.current!==t,f=r.current!==e.sourcePosition,h=s.current!==e.targetPosition;(d||f||h)&&(u.current=t,r.current=e.sourcePosition,s.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function OM({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:i,onContextMenu:a,onDoubleClick:l,nodesDraggable:r,elementsSelectable:s,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:y,rfId:b,nodeTypes:S,nodeClickDistance:p,onError:v}){let{node:m,internals:g,isParent:x}=Te(Y=>{let K=Y.nodeLookup.get(e),ce=Y.parentLookup.has(e);return{node:K,internals:K.internals,isParent:ce}},Xe),_=m.type||"default",N=S?.[_]||f_[_];N===void 0&&(v?.("003",Sn.error003(_)),_="default",N=S?.default||f_.default);let C=!!(m.draggable||r&&typeof m.draggable>"u"),w=!!(m.selectable||s&&typeof m.selectable>"u"),H=!!(m.connectable||u&&typeof m.connectable>"u"),A=!!(m.focusable||c&&typeof m.focusable>"u"),L=je(),k=$m(m),E=RM({node:m,nodeType:_,hasDimensions:k,resizeObserver:d}),M=R_({nodeRef:E,disabled:m.hidden||!C,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:w,nodeClickDistance:p}),D=O_();if(m.hidden)return null;let O=co(m),R=_M(m),z=w||C||t||n||o||i,V=n?Y=>n(Y,{...g.userNode}):void 0,G=o?Y=>o(Y,{...g.userNode}):void 0,P=i?Y=>i(Y,{...g.userNode}):void 0,q=a?Y=>a(Y,{...g.userNode}):void 0,Z=l?Y=>l(Y,{...g.userNode}):void 0,j=Y=>{let{selectNodesOnDrag:K,nodeDragThreshold:ce}=L.getState();w&&(!K||!C||ce>0)&&mh({id:e,store:L,nodeRef:E}),t&&t(Y,{...g.userNode})},re=Y=>{if(!(th(Y.nativeEvent)||y)){if(Pm.includes(Y.key)&&w){let K=Y.key==="Escape";mh({id:e,store:L,unselect:K,nodeRef:E})}else if(C&&m.selected&&Object.prototype.hasOwnProperty.call(pf,Y.key)){Y.preventDefault();let{ariaLabelConfig:K}=L.getState();L.setState({ariaLiveMessage:K["node.a11yDescription.ariaLiveMessage"]({direction:Y.key.replace("Arrow","").toLowerCase(),x:~~g.positionAbsolute.x,y:~~g.positionAbsolute.y})}),D({direction:pf[Y.key],factor:Y.shiftKey?4:1})}}},$=()=>{if(y||!E.current?.matches(":focus-visible"))return;let{transform:Y,width:K,height:ce,autoPanOnNodeFocus:de,setCenter:te}=L.getState();if(!de)return;$c(new Map([[e,m]]),{x:0,y:0,width:K,height:ce},Y,!0).length>0||te(m.position.x+O.width/2,m.position.y+O.height/2,{zoom:Y[2]})};return(0,B.jsx)("div",{className:tt(["react-flow__node",`react-flow__node-${_}`,{[h]:C},m.className,{selected:m.selected,selectable:w,parent:x,draggable:C,dragging:M}]),ref:E,style:{zIndex:g.z,transform:`translate(${g.positionAbsolute.x}px,${g.positionAbsolute.y}px)`,pointerEvents:z?"all":"none",visibility:k?"visible":"hidden",...m.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:G,onMouseLeave:P,onContextMenu:q,onClick:j,onDoubleClick:Z,onKeyDown:A?re:void 0,tabIndex:A?0:void 0,onFocus:A?$:void 0,role:m.ariaRole??(A?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${E_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,B.jsx)(mM,{value:e,children:(0,B.jsx)(N,{id:e,data:m.data,type:_,positionAbsoluteX:g.positionAbsolute.x,positionAbsoluteY:g.positionAbsolute.y,selected:m.selected??!1,selectable:w,draggable:C,deletable:m.deletable??!0,isConnectable:H,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:M,dragHandle:m.dragHandle,zIndex:g.z,parentId:m.parentId,...O})})})}var zM=(0,U.memo)(OM),LM=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function B_(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Te(LM,Xe),l=AM(e.onlyRenderVisibleElements),r=MM();return(0,B.jsx)("div",{className:"react-flow__nodes",style:gf,children:l.map(s=>(0,B.jsx)(zM,{id:s,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:r,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},s))})}B_.displayName="NodeRenderer";var BM=(0,U.memo)(B_);function HM(e){return Te((0,U.useCallback)(n=>{if(!e)return n.edges.map(i=>i.id);let o=[];if(n.width&&n.height)for(let i of n.edges){let a=n.nodeLookup.get(i.source),l=n.nodeLookup.get(i.target);a&&l&&vx({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),Xe)}var kM=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,B.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},GM=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,B.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},p_={[vl.Arrow]:kM,[vl.ArrowClosed]:GM};function UM(e){let t=je();return(0,U.useMemo)(()=>Object.prototype.hasOwnProperty.call(p_,e)?p_[e]:(t.getState().onError?.("009",Sn.error009(e)),null),[e])}var PM=({id:e,type:t,color:n,width:o=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:l,orient:r="auto-start-reverse"})=>{let s=UM(t);return s?(0,B.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:r,refX:"0",refY:"0",children:(0,B.jsx)(s,{color:n,strokeWidth:l})}):null},H_=({defaultColor:e,rfId:t})=>{let n=Te(a=>a.edges),o=Te(a=>a.defaultEdgeOptions),i=(0,U.useMemo)(()=>Sx(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,B.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,B.jsx)("defs",{children:i.map(a=>(0,B.jsx)(PM,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};H_.displayName="MarkerDefinitions";var IM=(0,U.memo)(H_);function k_({x:e,y:t,label:n,labelStyle:o,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:l=[2,4],labelBgBorderRadius:r=2,children:s,className:u,...c}){let[d,f]=(0,U.useState)({x:1,y:0,width:0,height:0}),h=tt(["react-flow__edge-textwrapper",u]),y=(0,U.useRef)(null);return(0,U.useEffect)(()=>{if(y.current){let b=y.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,B.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,B.jsx)("rect",{width:d.width+2*l[0],x:-l[0],y:-l[1],height:d.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:r,ry:r}),(0,B.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:y,style:o,children:n}),s]}):null}k_.displayName="EdgeText";var VM=(0,U.memo)(k_);function yf({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("path",{...c,d:e,fill:"none",className:tt(["react-flow__edge-path",c.className])}),u?(0,B.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&kn(t)&&kn(n)?(0,B.jsx)(VM,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s}):null]})}function m_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===W.Left||e===W.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function G_({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top}){let[l,r]=m_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=m_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=tf({sourceX:e,sourceY:t,targetX:o,targetY:i,sourceControlX:l,sourceControlY:r,targetControlX:s,targetControlY:u});return[`M${e},${t} C${l},${r} ${s},${u} ${o},${i}`,c,d,f,h]}function U_(e){return(0,U.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l,targetPosition:r,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:S,interactionWidth:p})=>{let[v,m,g]=G_({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,B.jsx)(yf,{id:x,path:v,labelX:m,labelY:g,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:S,interactionWidth:p})})}var YM=U_({isInternal:!1}),P_=U_({isInternal:!0});YM.displayName="SimpleBezierEdge";P_.displayName="SimpleBezierEdgeInternal";function I_(e){return(0,U.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:h=W.Bottom,targetPosition:y=W.Top,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:v})=>{let[m,g,x]=xs({sourceX:n,sourceY:o,sourcePosition:h,targetX:i,targetY:a,targetPosition:y,borderRadius:p?.borderRadius,offset:p?.offset,stepPosition:p?.stepPosition}),_=e.isInternal?void 0:t;return(0,B.jsx)(yf,{id:_,path:m,labelX:g,labelY:x,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:S,interactionWidth:v})})}var V_=I_({isInternal:!1}),Y_=I_({isInternal:!0});V_.displayName="SmoothStepEdge";Y_.displayName="SmoothStepEdgeInternal";function X_(e){return(0,U.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,B.jsx)(V_,{...n,id:o,pathOptions:(0,U.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var XM=X_({isInternal:!1}),q_=X_({isInternal:!0});XM.displayName="StepEdge";q_.displayName="StepEdgeInternal";function Z_(e){return(0,U.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:y,interactionWidth:b})=>{let[S,p,v]=of({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,B.jsx)(yf,{id:m,path:S,labelX:p,labelY:v,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:y,interactionWidth:b})})}var qM=Z_({isInternal:!1}),j_=Z_({isInternal:!0});qM.displayName="StraightEdge";j_.displayName="StraightEdgeInternal";function Q_(e){return(0,U.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=W.Bottom,targetPosition:r=W.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:v})=>{let[m,g,x]=nf({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:p?.curvature}),_=e.isInternal?void 0:t;return(0,B.jsx)(yf,{id:_,path:m,labelX:g,labelY:x,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:S,interactionWidth:v})})}var ZM=Q_({isInternal:!1}),F_=Q_({isInternal:!0});ZM.displayName="BezierEdge";F_.displayName="BezierEdgeInternal";var h_={default:F_,straight:j_,step:q_,smoothstep:Y_,simplebezier:P_},g_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},jM=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,QM=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,y_="react-flow__edgeupdater";function v_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:l,type:r}){return(0,B.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:l,className:tt([y_,`${y_}-${r}`]),cx:jM(t,o,e),cy:QM(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function FM({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:r,targetPosition:s,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){let y=je(),b=(g,x)=>{if(g.button!==0)return;let{autoPanOnConnect:_,domNode:N,connectionMode:C,connectionRadius:w,lib:H,onConnectStart:A,cancelConnection:L,nodeLookup:k,rfId:E,panBy:M,updateConnection:D}=y.getState(),O=x.type==="target",R=(G,P)=>{f(!1),d?.(G,n,x.type,P)},z=G=>u?.(n,G),V=(G,P)=>{f(!0),c?.(g,n,x.type),A?.(G,P)};sf.onPointerDown(g.nativeEvent,{autoPanOnConnect:_,connectionMode:C,connectionRadius:w,domNode:N,handleId:x.id,nodeId:x.nodeId,nodeLookup:k,isTarget:O,edgeUpdaterType:x.type,lib:H,flowId:E,cancelConnection:L,panBy:M,isValidConnection:(...G)=>y.getState().isValidConnection?.(...G)??!0,onConnect:z,onConnectStart:V,onConnectEnd:(...G)=>y.getState().onConnectEnd?.(...G),onReconnectEnd:R,updateConnection:D,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:g.currentTarget})},S=g=>b(g,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),p=g=>b(g,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),v=()=>h(!0),m=()=>h(!1);return(0,B.jsxs)(B.Fragment,{children:[(e===!0||e==="source")&&(0,B.jsx)(v_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:v,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,B.jsx)(v_,{position:s,centerX:a,centerY:l,radius:t,onMouseDown:p,onMouseEnter:v,onMouseOut:m,type:"target"})]})}function KM({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:i,onDoubleClick:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:y,edgeTypes:b,noPanClassName:S,onError:p,disableKeyboardA11y:v}){let m=Te(te=>te.edgeLookup.get(e)),g=Te(te=>te.defaultEdgeOptions);m=g?{...g,...m}:m;let x=m.type||"default",_=b?.[x]||h_[x];_===void 0&&(p?.("011",Sn.error011(x)),x="default",_=b?.default||h_.default);let N=!!(m.focusable||t&&typeof m.focusable>"u"),C=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),w=!!(m.selectable||o&&typeof m.selectable>"u"),H=(0,U.useRef)(null),[A,L]=(0,U.useState)(!1),[k,E]=(0,U.useState)(!1),M=je(),{zIndex:D,sourceX:O,sourceY:R,targetX:z,targetY:V,sourcePosition:G,targetPosition:P}=Te((0,U.useCallback)(te=>{let ee=te.nodeLookup.get(m.source),ye=te.nodeLookup.get(m.target);if(!ee||!ye)return{zIndex:m.zIndex,...g_};let xe=bx({id:e,sourceNode:ee,targetNode:ye,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:te.connectionMode,onError:p});return{zIndex:yx({selected:m.selected,zIndex:m.zIndex,sourceNode:ee,targetNode:ye,elevateOnSelect:te.elevateEdgesOnSelect,zIndexMode:te.zIndexMode}),...xe||g_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),Xe),q=(0,U.useMemo)(()=>m.markerStart?`url('#${af(m.markerStart,y)}')`:void 0,[m.markerStart,y]),Z=(0,U.useMemo)(()=>m.markerEnd?`url('#${af(m.markerEnd,y)}')`:void 0,[m.markerEnd,y]);if(m.hidden||O===null||R===null||z===null||V===null)return null;let j=te=>{let{addSelectedEdges:ee,unselectNodesAndEdges:ye,multiSelectionActive:xe}=M.getState();w&&(M.setState({nodesSelectionActive:!1}),m.selected&&xe?(ye({nodes:[],edges:[m]}),H.current?.blur()):ee([e])),i&&i(te,m)},re=a?te=>{a(te,{...m})}:void 0,$=l?te=>{l(te,{...m})}:void 0,Y=r?te=>{r(te,{...m})}:void 0,K=s?te=>{s(te,{...m})}:void 0,ce=u?te=>{u(te,{...m})}:void 0,de=te=>{if(!v&&Pm.includes(te.key)&&w){let{unselectNodesAndEdges:ee,addSelectedEdges:ye}=M.getState();te.key==="Escape"?(H.current?.blur(),ee({edges:[m]})):ye([e])}};return(0,B.jsx)("svg",{style:{zIndex:D},children:(0,B.jsxs)("g",{className:tt(["react-flow__edge",`react-flow__edge-${x}`,m.className,S,{selected:m.selected,animated:m.animated,inactive:!w&&!i,updating:A,selectable:w}]),onClick:j,onDoubleClick:re,onContextMenu:$,onMouseEnter:Y,onMouseMove:K,onMouseLeave:ce,onKeyDown:N?de:void 0,tabIndex:N?0:void 0,role:m.ariaRole??(N?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":m.ariaLabel===null?void 0:m.ariaLabel||`Edge from ${m.source} to ${m.target}`,"aria-describedby":N?`${N_}-${y}`:void 0,ref:H,...m.domAttributes,children:[!k&&(0,B.jsx)(_,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:w,deletable:m.deletable??!0,label:m.label,labelStyle:m.labelStyle,labelShowBg:m.labelShowBg,labelBgStyle:m.labelBgStyle,labelBgPadding:m.labelBgPadding,labelBgBorderRadius:m.labelBgBorderRadius,sourceX:O,sourceY:R,targetX:z,targetY:V,sourcePosition:G,targetPosition:P,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:q,markerEnd:Z,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),C&&(0,B.jsx)(FM,{edge:m,isReconnectable:C,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:R,targetX:z,targetY:V,sourcePosition:G,targetPosition:P,setUpdateHover:L,setReconnecting:E})]})})}var $M=(0,U.memo)(KM),WM=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function K_({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:i,onReconnect:a,onEdgeContextMenu:l,onEdgeMouseEnter:r,onEdgeMouseMove:s,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:y,disableKeyboardA11y:b}){let{edgesFocusable:S,edgesReconnectable:p,elementsSelectable:v,onError:m}=Te(WM,Xe),g=HM(t);return(0,B.jsxs)("div",{className:"react-flow__edges",children:[(0,B.jsx)(IM,{defaultColor:e,rfId:n}),g.map(x=>(0,B.jsx)($M,{id:x,edgesFocusable:S,edgesReconnectable:p,elementsSelectable:v,noPanClassName:i,onReconnect:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:y,rfId:n,onError:m,edgeTypes:o,disableKeyboardA11y:b},x))]})}K_.displayName="EdgeRenderer";var JM=(0,U.memo)(K_),eR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function tR({children:e}){let t=Te(eR);return(0,B.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function nR(e){let t=hh(),n=(0,U.useRef)(!1);(0,U.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var oR=e=>e.panZoom?.syncViewport;function iR(e){let t=Te(oR),n=je();return(0,U.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function b_(e){return e.connection.inProgress?{...e.connection,to:Cl(e.connection.to,e.transform)}:{...e.connection}}function aR(e){return e?n=>{let o=b_(n);return e(o)}:b_}function lR(e){let t=aR(e);return Te(t,Xe)}var rR=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function sR({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:s}=Te(rR,Xe);return!(a&&i&&s)?null:(0,B.jsx)("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:(0,B.jsx)("g",{className:tt(["react-flow__connection",Ym(r)]),children:(0,B.jsx)($_,{style:t,type:n,CustomComponent:o,isValid:r})})})}var $_=({style:e,type:t=uo.Bezier,CustomComponent:n,isValid:o})=>{let{inProgress:i,from:a,fromNode:l,fromHandle:r,fromPosition:s,to:u,toNode:c,toHandle:d,toPosition:f,pointer:h}=lR();if(!i)return;if(n)return(0,B.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:r,fromX:a.x,fromY:a.y,toX:u.x,toY:u.y,fromPosition:s,toPosition:f,connectionStatus:Ym(o),toNode:c,toHandle:d,pointer:h});let y="",b={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case uo.Bezier:[y]=nf(b);break;case uo.SimpleBezier:[y]=G_(b);break;case uo.Step:[y]=xs({...b,borderRadius:0});break;case uo.SmoothStep:[y]=xs(b);break;default:[y]=of(b)}return(0,B.jsx)("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};$_.displayName="ConnectionLine";var uR={};function S_(e=uR){let t=(0,U.useRef)(e),n=je();(0,U.useEffect)(()=>{},[e])}function cR(){let e=je(),t=(0,U.useRef)(!1);(0,U.useEffect)(()=>{},[])}function W_({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:l,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:y,connectionLineStyle:b,connectionLineComponent:S,connectionLineContainerStyle:p,selectionKeyCode:v,selectionOnDrag:m,selectionMode:g,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:N,deleteKeyCode:C,onlyRenderVisibleElements:w,elementsSelectable:H,defaultViewport:A,translateExtent:L,minZoom:k,maxZoom:E,preventScrolling:M,defaultMarkerColor:D,zoomOnScroll:O,zoomOnPinch:R,panOnScroll:z,panOnScrollSpeed:V,panOnScrollMode:G,zoomOnDoubleClick:P,panOnDrag:q,onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:re,onPaneMouseLeave:$,onPaneScroll:Y,onPaneContextMenu:K,paneClickDistance:ce,nodeClickDistance:de,onEdgeContextMenu:te,onEdgeMouseEnter:ee,onEdgeMouseMove:ye,onEdgeMouseLeave:xe,reconnectRadius:Ne,onReconnect:Qe,onReconnectStart:$e,onReconnectEnd:lt,noDragClassName:zt,noWheelClassName:Lt,noPanClassName:Pn,disableKeyboardA11y:sn,nodeExtent:In,rfId:Dt,viewport:Bt,onViewportChange:gt}){return S_(e),S_(t),cR(),nR(n),iR(Bt),(0,B.jsx)(TM,{onPaneClick:Z,onPaneMouseEnter:j,onPaneMouseMove:re,onPaneMouseLeave:$,onPaneContextMenu:K,onPaneScroll:Y,paneClickDistance:ce,deleteKeyCode:C,selectionKeyCode:v,selectionOnDrag:m,selectionMode:g,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:N,elementsSelectable:H,zoomOnScroll:O,zoomOnPinch:R,zoomOnDoubleClick:P,panOnScroll:z,panOnScrollSpeed:V,panOnScrollMode:G,panOnDrag:q,defaultViewport:A,translateExtent:L,minZoom:k,maxZoom:E,onSelectionContextMenu:d,preventScrolling:M,noDragClassName:zt,noWheelClassName:Lt,noPanClassName:Pn,disableKeyboardA11y:sn,onViewportChange:gt,isControlledViewport:!!Bt,children:(0,B.jsxs)(tR,{children:[(0,B.jsx)(JM,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Qe,onReconnectStart:$e,onReconnectEnd:lt,onlyRenderVisibleElements:w,onEdgeContextMenu:te,onEdgeMouseEnter:ee,onEdgeMouseMove:ye,onEdgeMouseLeave:xe,reconnectRadius:Ne,defaultMarkerColor:D,noPanClassName:Pn,disableKeyboardA11y:sn,rfId:Dt}),(0,B.jsx)(sR,{style:b,type:y,component:S,containerStyle:p}),(0,B.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,B.jsx)(BM,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:de,onlyRenderVisibleElements:w,noPanClassName:Pn,noDragClassName:zt,disableKeyboardA11y:sn,nodeExtent:In,rfId:Dt}),(0,B.jsx)("div",{className:"react-flow__viewport-portal"})]})})}W_.displayName="GraphView";var fR=(0,U.memo)(W_),x_=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{let h=new Map,y=new Map,b=new Map,S=new Map,p=o??t??[],v=n??e??[],m=c??[0,0],g=d??xl;uh(b,S,p);let x=lf(v,h,y,{nodeOrigin:m,nodeExtent:g,zIndexMode:f}),_=[0,0,1];if(l&&i&&a){let N=_l(h,{filter:A=>!!((A.width||A.initialWidth)&&(A.height||A.initialHeight))}),{x:C,y:w,zoom:H}=Ss(N,i,a,s,u,r?.padding??.1);_=[C,w,H]}return{rfId:"1",width:i??0,height:a??0,transform:_,nodes:v,nodesInitialized:x,nodeLookup:h,parentLookup:y,edges:p,edgeLookup:S,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:s,maxZoom:u,translateExtent:xl,nodeExtent:g,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Di.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:m,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:l??!1,fitViewOptions:r,fitViewResolver:null,connection:{...Vm},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Km,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Im,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},dR=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>Wx((h,y)=>{async function b(){let{nodeLookup:S,panZoom:p,fitViewOptions:v,fitViewResolver:m,width:g,height:x,minZoom:_,maxZoom:N}=y();p&&(await fx({nodes:S,width:g,height:x,panZoom:p,minZoom:_,maxZoom:N},v),m?.resolve(!0),h({fitViewResolver:null}))}return{...x_({nodes:e,edges:t,width:i,height:a,fitView:l,fitViewOptions:r,minZoom:s,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:o,zIndexMode:f}),setNodes:S=>{let{nodeLookup:p,parentLookup:v,nodeOrigin:m,elevateNodesOnSelect:g,fitViewQueued:x,zIndexMode:_}=y(),N=lf(S,p,v,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:g,checkEquality:!0,zIndexMode:_});x&&N?(b(),h({nodes:S,nodesInitialized:N,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:S,nodesInitialized:N})},setEdges:S=>{let{connectionLookup:p,edgeLookup:v}=y();uh(p,v,S),h({edges:S})},setDefaultNodesAndEdges:(S,p)=>{if(S){let{setNodes:v}=y();v(S),h({hasDefaultNodes:!0})}if(p){let{setEdges:v}=y();v(p),h({hasDefaultEdges:!0})}},updateNodeInternals:S=>{let{triggerNodeChanges:p,nodeLookup:v,parentLookup:m,domNode:g,nodeOrigin:x,nodeExtent:_,debug:N,fitViewQueued:C,zIndexMode:w}=y(),{changes:H,updatedInternals:A}=Nx(S,v,m,g,x,_,w);A&&(_x(v,m,{nodeOrigin:x,nodeExtent:_,zIndexMode:w}),C?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),H?.length>0&&(N&&console.log("React Flow: trigger node changes",H),p?.(H)))},updateNodePositions:(S,p=!1)=>{let v=[],m=[],{nodeLookup:g,triggerNodeChanges:x,connection:_,updateConnection:N,onNodesChangeMiddlewareMap:C}=y();for(let[w,H]of S){let A=g.get(w),L=!!(A?.expandParent&&A?.parentId&&H?.position),k={id:w,type:"position",position:L?{x:Math.max(0,H.position.x),y:Math.max(0,H.position.y)}:H.position,dragging:p};if(A&&_.inProgress&&_.fromNode.id===A.id){let E=Mi(A,_.fromHandle,W.Left,!0);N({..._,from:E})}L&&A.parentId&&v.push({id:w,parentId:A.parentId,rect:{...H.internals.positionAbsolute,width:H.measured.width??0,height:H.measured.height??0}}),m.push(k)}if(v.length>0){let{parentLookup:w,nodeOrigin:H}=y(),A=rf(v,g,w,H);m.push(...A)}for(let w of C.values())m=w(m);x(m)},triggerNodeChanges:S=>{let{onNodesChange:p,setNodes:v,nodes:m,hasDefaultNodes:g,debug:x}=y();if(S?.length){if(g){let _=w_(S,m);v(_)}x&&console.log("React Flow: trigger node changes",S),p?.(S)}},triggerEdgeChanges:S=>{let{onEdgesChange:p,setEdges:v,edges:m,hasDefaultEdges:g,debug:x}=y();if(S?.length){if(g){let _=A_(S,m);v(_)}x&&console.log("React Flow: trigger edge changes",S),p?.(S)}},addSelectedNodes:S=>{let{multiSelectionActive:p,edgeLookup:v,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=y();if(p){let _=S.map(N=>da(N,!0));g(_);return}g(Al(m,new Set([...S]),!0)),x(Al(v))},addSelectedEdges:S=>{let{multiSelectionActive:p,edgeLookup:v,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=y();if(p){let _=S.map(N=>da(N,!0));x(_);return}x(Al(v,new Set([...S]))),g(Al(m,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:p}={})=>{let{edges:v,nodes:m,nodeLookup:g,triggerNodeChanges:x,triggerEdgeChanges:_}=y(),N=S||m,C=p||v,w=[];for(let A of N){if(!A.selected)continue;let L=g.get(A.id);L&&(L.selected=!1),w.push(da(A.id,!1))}let H=[];for(let A of C)A.selected&&H.push(da(A.id,!1));x(w),_(H)},setMinZoom:S=>{let{panZoom:p,maxZoom:v}=y();p?.setScaleExtent([S,v]),h({minZoom:S})},setMaxZoom:S=>{let{panZoom:p,minZoom:v}=y();p?.setScaleExtent([v,S]),h({maxZoom:S})},setTranslateExtent:S=>{y().panZoom?.setTranslateExtent(S),h({translateExtent:S})},resetSelectedElements:()=>{let{edges:S,nodes:p,triggerNodeChanges:v,triggerEdgeChanges:m,elementsSelectable:g}=y();if(!g)return;let x=p.reduce((N,C)=>C.selected?[...N,da(C.id,!1)]:N,[]),_=S.reduce((N,C)=>C.selected?[...N,da(C.id,!1)]:N,[]);v(x),m(_)},setNodeExtent:S=>{let{nodes:p,nodeLookup:v,parentLookup:m,nodeOrigin:g,elevateNodesOnSelect:x,nodeExtent:_,zIndexMode:N}=y();S[0][0]===_[0][0]&&S[0][1]===_[0][1]&&S[1][0]===_[1][0]&&S[1][1]===_[1][1]||(lf(p,v,m,{nodeOrigin:g,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:N}),h({nodeExtent:S}))},panBy:S=>{let{transform:p,width:v,height:m,panZoom:g,translateExtent:x}=y();return Cx({delta:S,panZoom:g,transform:p,translateExtent:x,width:v,height:m})},setCenter:async(S,p,v)=>{let{width:m,height:g,maxZoom:x,panZoom:_}=y();if(!_)return Promise.resolve(!1);let N=typeof v?.zoom<"u"?v.zoom:x;return await _.setViewport({x:m/2-S*N,y:g/2-p*N,zoom:N},{duration:v?.duration,ease:v?.ease,interpolate:v?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...Vm}})},updateConnection:S=>{h({connection:S})},reset:()=>h({...x_()})}},Object.is);function pR({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:i,initialHeight:a,initialMinZoom:l,initialMaxZoom:r,initialFitViewOptions:s,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:h}){let[y]=(0,U.useState)(()=>dR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:i,height:a,fitView:u,minZoom:l,maxZoom:r,fitViewOptions:s,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return(0,B.jsx)(OD,{value:y,children:(0,B.jsx)(tM,{children:h})})}function mR({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:a,height:l,fitView:r,fitViewOptions:s,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return(0,U.useContext)(mf)?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsx)(pR,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:a,initialHeight:l,fitView:r,initialFitViewOptions:s,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}var hR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function gR({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:i,nodeTypes:a,edgeTypes:l,onNodeClick:r,onEdgeClick:s,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:y,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,onNodeMouseEnter:v,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,onNodeDragStart:N,onNodeDrag:C,onNodeDragStop:w,onNodesDelete:H,onEdgesDelete:A,onDelete:L,onSelectionChange:k,onSelectionDragStart:E,onSelectionDrag:M,onSelectionDragStop:D,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:z,onBeforeDelete:V,connectionMode:G,connectionLineType:P=uo.Bezier,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,deleteKeyCode:re="Backspace",selectionKeyCode:$="Shift",selectionOnDrag:Y=!1,selectionMode:K=ua.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:de=Tl()?"Meta":"Control",zoomActivationKeyCode:te=Tl()?"Meta":"Control",snapToGrid:ee,snapGrid:ye,onlyRenderVisibleElements:xe=!1,selectNodesOnDrag:Ne,nodesDraggable:Qe,autoPanOnNodeFocus:$e,nodesConnectable:lt,nodesFocusable:zt,nodeOrigin:Lt=C_,edgesFocusable:Pn,edgesReconnectable:sn,elementsSelectable:In=!0,defaultViewport:Dt=qD,minZoom:Bt=.5,maxZoom:gt=2,translateExtent:go=xl,preventScrolling:ya=!0,nodeExtent:yo,defaultMarkerColor:Qo="#b1b1b7",zoomOnScroll:Ul=!0,zoomOnPinch:Cn=!0,panOnScroll:Vn=!1,panOnScrollSpeed:ue=.5,panOnScrollMode:ie=Yo.Free,zoomOnDoubleClick:oe=!0,panOnDrag:Ce=!0,onPaneClick:ze,onPaneMouseEnter:Fe,onPaneMouseMove:ft,onPaneMouseLeave:Wn,onPaneScroll:Qt,onPaneContextMenu:va,paneClickDistance:Jn=1,nodeClickDistance:ot=0,children:Fo,onReconnect:zf,onReconnectStart:Ls,onReconnectEnd:Pl,onEdgeContextMenu:Bs,onEdgeDoubleClick:Hs,onEdgeMouseEnter:Lf,onEdgeMouseMove:un,onEdgeMouseLeave:vo,reconnectRadius:ks=10,onNodesChange:Gs,onEdgesChange:Il,noDragClassName:Vl="nodrag",noWheelClassName:Yn="nowheel",noPanClassName:Yl="nopan",fitView:Xl,fitViewOptions:ql,connectOnClick:Us,attributionPosition:Ps,proOptions:ne,defaultEdgeOptions:T,elevateNodesOnSelect:X=!0,elevateEdgesOnSelect:F=!1,disableKeyboardA11y:He=!1,autoPanOnConnect:yt,autoPanOnNodeDrag:We,autoPanSpeed:Mt,connectionRadius:Ht,isValidConnection:eo,onError:Zl,style:dt,id:jl,nodeDragThreshold:Is,connectionDragThreshold:lN,viewport:rN,onViewportChange:sN,width:uN,height:cN,colorMode:fN="light",debug:dN,onScroll:rg,ariaLabelConfig:pN,zIndexMode:sg="basic",...mN},hN){let Bf=jl||"1",gN=FD(fN),yN=(0,U.useCallback)(ug=>{ug.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),rg?.(ug)},[rg]);return(0,B.jsx)("div",{"data-testid":"rf__wrapper",...mN,onScroll:yN,style:{...dt,...hR},ref:hN,className:tt(["react-flow",i,gN]),id:jl,role:"application",children:(0,B.jsxs)(mR,{nodes:e,edges:t,width:uN,height:cN,fitView:Xl,fitViewOptions:ql,minZoom:Bt,maxZoom:gt,nodeOrigin:Lt,nodeExtent:yo,zIndexMode:sg,children:[(0,B.jsx)(fR,{onInit:u,onNodeClick:r,onEdgeClick:s,onNodeMouseEnter:v,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:P,connectionLineStyle:q,connectionLineComponent:Z,connectionLineContainerStyle:j,selectionKeyCode:$,selectionOnDrag:Y,selectionMode:K,deleteKeyCode:re,multiSelectionKeyCode:de,panActivationKeyCode:ce,zoomActivationKeyCode:te,onlyRenderVisibleElements:xe,defaultViewport:Dt,translateExtent:go,minZoom:Bt,maxZoom:gt,preventScrolling:ya,zoomOnScroll:Ul,zoomOnPinch:Cn,zoomOnDoubleClick:oe,panOnScroll:Vn,panOnScrollSpeed:ue,panOnScrollMode:ie,panOnDrag:Ce,onPaneClick:ze,onPaneMouseEnter:Fe,onPaneMouseMove:ft,onPaneMouseLeave:Wn,onPaneScroll:Qt,onPaneContextMenu:va,paneClickDistance:Jn,nodeClickDistance:ot,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:z,onReconnect:zf,onReconnectStart:Ls,onReconnectEnd:Pl,onEdgeContextMenu:Bs,onEdgeDoubleClick:Hs,onEdgeMouseEnter:Lf,onEdgeMouseMove:un,onEdgeMouseLeave:vo,reconnectRadius:ks,defaultMarkerColor:Qo,noDragClassName:Vl,noWheelClassName:Yn,noPanClassName:Yl,rfId:Bf,disableKeyboardA11y:He,nodeExtent:yo,viewport:rN,onViewportChange:sN}),(0,B.jsx)(QD,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:y,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,nodesDraggable:Qe,autoPanOnNodeFocus:$e,nodesConnectable:lt,nodesFocusable:zt,edgesFocusable:Pn,edgesReconnectable:sn,elementsSelectable:In,elevateNodesOnSelect:X,elevateEdgesOnSelect:F,minZoom:Bt,maxZoom:gt,nodeExtent:yo,onNodesChange:Gs,onEdgesChange:Il,snapToGrid:ee,snapGrid:ye,connectionMode:G,translateExtent:go,connectOnClick:Us,defaultEdgeOptions:T,fitView:Xl,fitViewOptions:ql,onNodesDelete:H,onEdgesDelete:A,onDelete:L,onNodeDragStart:N,onNodeDrag:C,onNodeDragStop:w,onSelectionDrag:M,onSelectionDragStart:E,onSelectionDragStop:D,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:Yl,nodeOrigin:Lt,rfId:Bf,autoPanOnConnect:yt,autoPanOnNodeDrag:We,autoPanSpeed:Mt,onError:Zl,connectionRadius:Ht,isValidConnection:eo,selectNodesOnDrag:Ne,nodeDragThreshold:Is,connectionDragThreshold:lN,onBeforeDelete:V,debug:dN,ariaLabelConfig:pN,zIndexMode:sg}),(0,B.jsx)(XD,{onSelectionChange:k}),Fo,(0,B.jsx)(UD,{proOptions:ne,position:Ps}),(0,B.jsx)(GD,{rfId:Bf,disableKeyboardA11y:He})]})})}var J_=D_(gR);function eE(e){let[t,n]=(0,U.useState)(e),o=(0,U.useCallback)(i=>n(a=>w_(i,a)),[]);return[t,n,o]}function tE(e){let[t,n]=(0,U.useState)(e),o=(0,U.useCallback)(i=>n(a=>A_(i,a)),[]);return[t,n,o]}var iH=Sn.error014();function yR({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,B.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:tt(["react-flow__background-pattern",n,o])})}function vR({radius:e,className:t}){return(0,B.jsx)("circle",{cx:e,cy:e,r:e,className:tt(["react-flow__background-pattern","dots",t])})}var fo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(fo||(fo={}));var bR={[fo.Dots]:1,[fo.Lines]:1,[fo.Cross]:6},SR=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function nE({id:e,variant:t=fo.Dots,gap:n=20,size:o,lineWidth:i=1,offset:a=0,color:l,bgColor:r,style:s,className:u,patternClassName:c}){let d=(0,U.useRef)(null),{transform:f,patternId:h}=Te(SR,Xe),y=o||bR[t],b=t===fo.Dots,S=t===fo.Cross,p=Array.isArray(n)?n:[n,n],v=[p[0]*f[2]||1,p[1]*f[2]||1],m=y*f[2],g=Array.isArray(a)?a:[a,a],x=S?[m,m]:v,_=[g[0]*f[2]||1+x[0]/2,g[1]*f[2]||1+x[1]/2],N=`${h}${e||""}`;return(0,B.jsxs)("svg",{className:tt(["react-flow__background",u]),style:{...s,...gf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,B.jsx)("pattern",{id:N,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:b?(0,B.jsx)(vR,{radius:m/2,className:c}):(0,B.jsx)(yR,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,B.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${N})`})]})}nE.displayName="Background";var oE=(0,U.memo)(nE);function xR(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,B.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function _R(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,B.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function ER(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,B.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 NR(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,B.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 CR(){return(0,B.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,B.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 df({children:e,className:t,...n}){return(0,B.jsx)("button",{type:"button",className:tt(["react-flow__controls-button",t]),...n,children:e})}var TR=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function iE({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:l,onFitView:r,onInteractiveChange:s,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":h}){let y=je(),{isInteractive:b,minZoomReached:S,maxZoomReached:p,ariaLabelConfig:v}=Te(TR,Xe),{zoomIn:m,zoomOut:g,fitView:x}=hh(),_=()=>{m(),a?.()},N=()=>{g(),l?.()},C=()=>{x(i),r?.()},w=()=>{y.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,B.jsxs)(hf,{className:tt(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??v["controls.ariaLabel"],children:[t&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(df,{onClick:_,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:p,children:(0,B.jsx)(xR,{})}),(0,B.jsx)(df,{onClick:N,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:S,children:(0,B.jsx)(_R,{})})]}),n&&(0,B.jsx)(df,{className:"react-flow__controls-fitview",onClick:C,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:(0,B.jsx)(ER,{})}),o&&(0,B.jsx)(df,{className:"react-flow__controls-interactive",onClick:w,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:b?(0,B.jsx)(CR,{}):(0,B.jsx)(NR,{})}),c]})}iE.displayName="Controls";var aH=(0,U.memo)(iE);function wR({id:e,x:t,y:n,width:o,height:i,style:a,color:l,strokeColor:r,strokeWidth:s,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:h}){let{background:y,backgroundColor:b}=a||{},S=l||y||b;return(0,B.jsx)("rect",{className:tt(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:o,height:i,style:{fill:S,stroke:r,strokeWidth:s},shapeRendering:d,onClick:h?p=>h(p,e):void 0})}var AR=(0,U.memo)(wR),DR=e=>e.nodes.map(t=>t.id),ph=e=>e instanceof Function?e:()=>e;function MR({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=AR,onClick:l}){let r=Te(DR,Xe),s=ph(t),u=ph(e),c=ph(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,B.jsx)(B.Fragment,{children:r.map(f=>(0,B.jsx)(OR,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function RR({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:l,NodeComponent:r,onClick:s}){let{node:u,x:c,y:d,width:f,height:h}=Te(y=>{let b=y.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let S=b.internals.userNode,{x:p,y:v}=b.internals.positionAbsolute,{width:m,height:g}=co(S);return{node:S,x:p,y:v,width:m,height:g}},Xe);return!u||u.hidden||!$m(u)?null:(0,B.jsx)(r,{x:c,y:d,width:f,height:h,style:u.style,selected:!!u.selected,className:o(u),color:t(u),borderRadius:i,strokeColor:n(u),strokeWidth:a,shapeRendering:l,onClick:s,id:u.id})}var OR=(0,U.memo)(RR),zR=(0,U.memo)(MR),LR=200,BR=150,HR=e=>!e.hidden,kR=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Qm(_l(e.nodeLookup,{filter:HR}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},GR="react-flow__minimap-desc";function aE({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l,nodeComponent:r,bgColor:s,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:y,pannable:b=!1,zoomable:S=!1,ariaLabel:p,inversePan:v,zoomStep:m=1,offsetScale:g=5}){let x=je(),_=(0,U.useRef)(null),{boundingRect:N,viewBB:C,rfId:w,panZoom:H,translateExtent:A,flowWidth:L,flowHeight:k,ariaLabelConfig:E}=Te(kR,Xe),M=e?.width??LR,D=e?.height??BR,O=N.width/M,R=N.height/D,z=Math.max(O,R),V=z*M,G=z*D,P=g*z,q=N.x-(V-N.width)/2-P,Z=N.y-(G-N.height)/2-P,j=V+P*2,re=G+P*2,$=`${GR}-${w}`,Y=(0,U.useRef)(0),K=(0,U.useRef)();Y.current=z,(0,U.useEffect)(()=>{if(_.current&&H)return K.current=Ox({domNode:_.current,panZoom:H,getTransform:()=>x.getState().transform,getViewScale:()=>Y.current}),()=>{K.current?.destroy()}},[H]),(0,U.useEffect)(()=>{K.current?.update({translateExtent:A,width:L,height:k,inversePan:v,pannable:b,zoomStep:m,zoomable:S})},[b,S,v,m,A,L,k]);let ce=h?ee=>{let[ye,xe]=K.current?.pointer(ee)||[0,0];h(ee,{x:ye,y:xe})}:void 0,de=y?(0,U.useCallback)((ee,ye)=>{let xe=x.getState().nodeLookup.get(ye).internals.userNode;y(ee,xe)},[]):void 0,te=p??E["minimap.ariaLabel"];return(0,B.jsx)(hf,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*z:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:tt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,B.jsxs)("svg",{width:M,height:D,viewBox:`${q} ${Z} ${j} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":$,ref:_,onClick:ce,children:[te&&(0,B.jsx)("title",{id:$,children:te}),(0,B.jsx)(zR,{onClick:de,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,B.jsx)("path",{className:"react-flow__minimap-mask",d:`M${q-P},${Z-P}h${j+P*2}v${re+P*2}h${-j-P*2}z
2270
+ M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}aE.displayName="MiniMap";var lH=(0,U.memo)(aE),UR=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,PR={[Ri.Line]:"right",[Ri.Handle]:"bottom-right"};function IR({nodeId:e,position:t,variant:n=Ri.Handle,className:o,style:i=void 0,children:a,color:l,minWidth:r=10,minHeight:s=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:y,onResizeStart:b,onResize:S,onResizeEnd:p}){let v=z_(),m=typeof e=="string"?e:v,g=je(),x=(0,U.useRef)(null),_=n===Ri.Handle,N=Te((0,U.useCallback)(UR(_&&h),[_,h]),Xe),C=(0,U.useRef)(null),w=t??PR[n];(0,U.useEffect)(()=>{if(!(!x.current||!m))return C.current||(C.current=kx({domNode:x.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:A,transform:L,snapGrid:k,snapToGrid:E,nodeOrigin:M,domNode:D}=g.getState();return{nodeLookup:A,transform:L,snapGrid:k,snapToGrid:E,nodeOrigin:M,paneDomNode:D}},onChange:(A,L)=>{let{triggerNodeChanges:k,nodeLookup:E,parentLookup:M,nodeOrigin:D}=g.getState(),O=[],R={x:A.x,y:A.y},z=E.get(m);if(z&&z.expandParent&&z.parentId){let V=z.origin??D,G=A.width??z.measured.width??0,P=A.height??z.measured.height??0,q={id:z.id,parentId:z.parentId,rect:{width:G,height:P,...Wm({x:A.x??z.position.x,y:A.y??z.position.y},{width:G,height:P},z.parentId,E,V)}},Z=rf([q],E,M,D);O.push(...Z),R.x=A.x?Math.max(V[0]*G,A.x):void 0,R.y=A.y?Math.max(V[1]*P,A.y):void 0}if(R.x!==void 0&&R.y!==void 0){let V={id:m,type:"position",position:{...R}};O.push(V)}if(A.width!==void 0&&A.height!==void 0){let G={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:A.width,height:A.height}};O.push(G)}for(let V of L){let G={...V,type:"position"};O.push(G)}k(O)},onEnd:({width:A,height:L})=>{let k={id:m,type:"dimensions",resizing:!1,dimensions:{width:A,height:L}};g.getState().triggerNodeChanges([k])}})),C.current.update({controlPosition:w,boundaries:{minWidth:r,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:S,onResizeEnd:p,shouldResize:y}),()=>{C.current?.destroy()}},[w,r,s,u,c,d,b,S,p,y]);let H=w.split("-");return(0,B.jsx)("div",{className:tt(["react-flow__resize-control","nodrag",...H,n,o]),ref:x,style:{...i,scale:N,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:a})}var rH=(0,U.memo)(IR);var Dl="pipeCard",lE="default",rE="controllerGroup",yh="stuff_";function Oi(e){return yh+e}function Ml(e){return e.startsWith(yh)}function Es(e){return e.slice(yh.length)}var xn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},vf={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},po={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},bf=40,Sf=48,xf=20,ma="arrowclosed";function sE(e){let t=e.style?.width;if(t==null)return 200;let n=typeof t=="number"?t:parseFloat(t);return isNaN(n)||n<=0?200:n}function uE(e){let t=e.style?.height;if(t!=null){let n=typeof t=="number"?t:parseFloat(t);if(!isNaN(n)&&n>0)return n}return e.data?.isStuff?60:70}function cE(e){if(!e)return null;let t={},n={},o={},i={},a=new Set;for(let r of e.edges)r.kind==="contains"&&(i[r.source]||(i[r.source]=[]),i[r.source].push(r.target),a.add(r.target));let l=new Set(Object.keys(i));for(let r of e.nodes){let s=r.io||{},u=l.has(r.id);for(let c of s.outputs||[])c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(n[c.digest]=r.id);for(let c of s.inputs||[])c.digest&&!t[c.digest]&&(t[c.digest]={name:c.name,concept:c.concept,contentType:c.content_type}),c.digest&&!u&&(o[c.digest]||(o[c.digest]=[]),o[c.digest].push(r.id))}return{stuffRegistry:t,stuffProducers:n,stuffConsumers:o,controllerNodeIds:l,childNodeIds:a,containmentTree:i}}function mo(e,t){let n={};for(let[l,r]of Object.entries(t.containmentTree))for(let s of r)n[s]=l;for(let[l,r]of Object.entries(t.stuffProducers)){let s="stuff_"+l,u=n[r];u&&(n[s]=u)}for(let l of e.nodes){if(!t.controllerNodeIds.has(l.id))continue;let r=n[l.id];if(r)for(let s of l.io?.outputs||[]){if(!s.digest)continue;let u="stuff_"+s.digest;n[u]||(n[u]=r)}}for(let l of e.edges)if(l.kind==="batch_item"&&l.target_stuff_digest){let r="stuff_"+l.target_stuff_digest;t.controllerNodeIds.has(l.source)&&(n[r]=l.source)}let o=new Set;for(let l of e.edges)(l.kind==="batch_item"||l.kind==="batch_aggregate"||l.kind==="parallel_combine")&&(l.source_stuff_digest&&o.add(l.source_stuff_digest),l.target_stuff_digest&&o.add(l.target_stuff_digest));let i="stuff_",a=Object.keys(n).filter(l=>l.startsWith(i));for(let l of a){let r=l.slice(i.length),s=n[l];if(!s)continue;let u=t.stuffConsumers[r]||[];if(u.length===0){o.has(r)||delete n[l];continue}for(;s;){let c=s;if(u.some(h=>VR(h,c,n)))break;let f=n[s];f?(n[l]=f,s=f):(delete n[l],s=void 0)}}return n}function VR(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function fE(e,t){return e.pipe_registry?.[t]}function vh(e,t){if(!e.concept_registry)return;let n=e.concept_registry[t];if(n)return n;for(let o of Object.values(e.concept_registry))if(o.code===t)return o}function dE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function _f(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function pE(e){if(!e)return null;if(typeof e=="string")return dE(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(dE(o))return o;return null}function mE(e){if(!e)return null;if(typeof e=="string")return _f(e)?e:null;if(typeof e!="object")return null;let t=e,n=[t.public_url,t.src,t.href,t.uri,t.url];for(let o of n)if(_f(o))return o;return null}function hE(e){if(!e)return null;if(typeof e=="string")return e.startsWith("pipelex-storage://")?e:null;if(typeof e!="object")return null;let t=e,n=[t.uri,t.url,t.src,t.href];for(let o of n)if(typeof o=="string"&&o.startsWith("pipelex-storage://"))return o;return null}function bh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function gE(e,t,n){if(t&&t.includes("/"))return t;if(e&&typeof e=="object"){let i=e;if(typeof i.mime_type=="string"&&i.mime_type)return i.mime_type}let o=bh(e)||n||(typeof e=="string"?e:null);if(o){let a=o.match(/\.([a-zA-Z0-9]+)(?:\?|#|$)/)?.[1]?.toLowerCase();if(a){if(a==="pdf")return"application/pdf";if(["png","jpg","jpeg","gif","webp","svg","bmp"].includes(a))return`image/${a==="jpg"?"jpeg":a==="svg"?"svg+xml":a}`}}return null}function yE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Sh(e,t){for(let n of e.nodes)for(let o of n.io?.outputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};for(let n of e.nodes)for(let o of n.io?.inputs??[])if(o.digest===t)return{digest:t,name:o.name,concept:o.concept,contentType:o.content_type,data:o.data,dataText:o.data_text,dataHtml:o.data_html};return null}var _n=ae(kt(),1);var{entries:TE,setPrototypeOf:vE,isFrozen:YR,getPrototypeOf:XR,getOwnPropertyDescriptor:qR}=Object,{freeze:qt,seal:Un,create:Ds}=Object,{apply:wh,construct:Ah}=typeof Reflect<"u"&&Reflect;qt||(qt=function(t){return t});Un||(Un=function(t){return t});wh||(wh=function(t,n){for(var o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return t.apply(n,i)});Ah||(Ah=function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return new t(...o)});var Ns=Zt(Array.prototype.forEach),ZR=Zt(Array.prototype.lastIndexOf),bE=Zt(Array.prototype.pop),Cs=Zt(Array.prototype.push),jR=Zt(Array.prototype.splice),Nf=Zt(String.prototype.toLowerCase),xh=Zt(String.prototype.toString),_h=Zt(String.prototype.match),Rl=Zt(String.prototype.replace),QR=Zt(String.prototype.indexOf),FR=Zt(String.prototype.trim),Kn=Zt(Object.prototype.hasOwnProperty),Xt=Zt(RegExp.prototype.test),Ts=KR(TypeError);function Zt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return wh(e,t,o)}}function KR(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Ah(e,n)}}function ve(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Nf;vE&&vE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(YR(t)||(t[o]=a),i=a)}e[i]=!0}return e}function $R(e){for(let t=0;t<e.length;t++)Kn(e,t)||(e[t]=null);return e}function ho(e){let t=Ds(null);for(let[n,o]of TE(e))Kn(e,n)&&(Array.isArray(o)?t[n]=$R(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=ho(o):t[n]=o);return t}function ws(e,t){for(;e!==null;){let o=qR(e,t);if(o){if(o.get)return Zt(o.get);if(typeof o.value=="function")return Zt(o.value)}e=XR(e)}function n(){return null}return n}var SE=qt(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Eh=qt(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Nh=qt(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),WR=qt(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ch=qt(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),JR=qt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),xE=qt(["#text"]),_E=qt(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Th=qt(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),EE=qt(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ef=qt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),eO=Un(/\{\{[\w\W]*|[\w\W]*\}\}/gm),tO=Un(/<%[\w\W]*|[\w\W]*%>/gm),nO=Un(/\$\{[\w\W]*/gm),oO=Un(/^data-[\-\w.\u00B7-\uFFFF]+$/),iO=Un(/^aria-[\-\w]+$/),wE=Un(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),aO=Un(/^(?:\w+script|data):/i),lO=Un(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),AE=Un(/^html$/i),rO=Un(/^[a-z][.\w]*(-[.\w]+)+$/i),NE=Object.freeze({__proto__:null,ARIA_ATTR:iO,ATTR_WHITESPACE:lO,CUSTOM_ELEMENT:rO,DATA_ATTR:oO,DOCTYPE_NAME:AE,ERB_EXPR:tO,IS_ALLOWED_URI:wE,IS_SCRIPT_OR_DATA:aO,MUSTACHE_EXPR:eO,TMPLIT_EXPR:nO}),As={element:1,text:3,progressingInstruction:7,comment:8,document:9},sO=function(){return typeof window>"u"?null:window},uO=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let o=null,i="data-tt-policy-suffix";n&&n.hasAttribute(i)&&(o=n.getAttribute(i));let a="dompurify"+(o?"#"+o:"");try{return t.createPolicy(a,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},CE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function DE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sO(),t=ne=>DE(ne);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==As.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,o=n,i=o.currentScript,{DocumentFragment:a,HTMLTemplateElement:l,Node:r,Element:s,NodeFilter:u,NamedNodeMap:c=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:h}=e,y=s.prototype,b=ws(y,"cloneNode"),S=ws(y,"remove"),p=ws(y,"nextSibling"),v=ws(y,"childNodes"),m=ws(y,"parentNode");if(typeof l=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let g,x="",{implementation:_,createNodeIterator:N,createDocumentFragment:C,getElementsByTagName:w}=n,{importNode:H}=o,A=CE();t.isSupported=typeof TE=="function"&&typeof m=="function"&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:L,ERB_EXPR:k,TMPLIT_EXPR:E,DATA_ATTR:M,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:z}=NE,{IS_ALLOWED_URI:V}=NE,G=null,P=ve({},[...SE,...Eh,...Nh,...Ch,...xE]),q=null,Z=ve({},[..._E,...Th,...EE,...Ef]),j=Object.seal(Ds(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),re=null,$=null,Y=Object.seal(Ds(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),K=!0,ce=!0,de=!1,te=!0,ee=!1,ye=!0,xe=!1,Ne=!1,Qe=!1,$e=!1,lt=!1,zt=!1,Lt=!0,Pn=!1,sn="user-content-",In=!0,Dt=!1,Bt={},gt=null,go=ve({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ya=null,yo=ve({},["audio","video","img","source","image","track"]),Qo=null,Ul=ve({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Cn="http://www.w3.org/1998/Math/MathML",Vn="http://www.w3.org/2000/svg",ue="http://www.w3.org/1999/xhtml",ie=ue,oe=!1,Ce=null,ze=ve({},[Cn,Vn,ue],xh),Fe=ve({},["mi","mo","mn","ms","mtext"]),ft=ve({},["annotation-xml"]),Wn=ve({},["title","style","font","a","script"]),Qt=null,va=["application/xhtml+xml","text/html"],Jn="text/html",ot=null,Fo=null,zf=n.createElement("form"),Ls=function(T){return T instanceof RegExp||T instanceof Function},Pl=function(){let T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Fo&&Fo===T)){if((!T||typeof T!="object")&&(T={}),T=ho(T),Qt=va.indexOf(T.PARSER_MEDIA_TYPE)===-1?Jn:T.PARSER_MEDIA_TYPE,ot=Qt==="application/xhtml+xml"?xh:Nf,G=Kn(T,"ALLOWED_TAGS")?ve({},T.ALLOWED_TAGS,ot):P,q=Kn(T,"ALLOWED_ATTR")?ve({},T.ALLOWED_ATTR,ot):Z,Ce=Kn(T,"ALLOWED_NAMESPACES")?ve({},T.ALLOWED_NAMESPACES,xh):ze,Qo=Kn(T,"ADD_URI_SAFE_ATTR")?ve(ho(Ul),T.ADD_URI_SAFE_ATTR,ot):Ul,ya=Kn(T,"ADD_DATA_URI_TAGS")?ve(ho(yo),T.ADD_DATA_URI_TAGS,ot):yo,gt=Kn(T,"FORBID_CONTENTS")?ve({},T.FORBID_CONTENTS,ot):go,re=Kn(T,"FORBID_TAGS")?ve({},T.FORBID_TAGS,ot):ho({}),$=Kn(T,"FORBID_ATTR")?ve({},T.FORBID_ATTR,ot):ho({}),Bt=Kn(T,"USE_PROFILES")?T.USE_PROFILES:!1,K=T.ALLOW_ARIA_ATTR!==!1,ce=T.ALLOW_DATA_ATTR!==!1,de=T.ALLOW_UNKNOWN_PROTOCOLS||!1,te=T.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=T.SAFE_FOR_TEMPLATES||!1,ye=T.SAFE_FOR_XML!==!1,xe=T.WHOLE_DOCUMENT||!1,$e=T.RETURN_DOM||!1,lt=T.RETURN_DOM_FRAGMENT||!1,zt=T.RETURN_TRUSTED_TYPE||!1,Qe=T.FORCE_BODY||!1,Lt=T.SANITIZE_DOM!==!1,Pn=T.SANITIZE_NAMED_PROPS||!1,In=T.KEEP_CONTENT!==!1,Dt=T.IN_PLACE||!1,V=T.ALLOWED_URI_REGEXP||wE,ie=T.NAMESPACE||ue,Fe=T.MATHML_TEXT_INTEGRATION_POINTS||Fe,ft=T.HTML_INTEGRATION_POINTS||ft,j=T.CUSTOM_ELEMENT_HANDLING||Ds(null),T.CUSTOM_ELEMENT_HANDLING&&Ls(T.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=T.CUSTOM_ELEMENT_HANDLING.tagNameCheck),T.CUSTOM_ELEMENT_HANDLING&&Ls(T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=T.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),T.CUSTOM_ELEMENT_HANDLING&&typeof T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=T.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(ce=!1),lt&&($e=!0),Bt&&(G=ve({},xE),q=Ds(null),Bt.html===!0&&(ve(G,SE),ve(q,_E)),Bt.svg===!0&&(ve(G,Eh),ve(q,Th),ve(q,Ef)),Bt.svgFilters===!0&&(ve(G,Nh),ve(q,Th),ve(q,Ef)),Bt.mathMl===!0&&(ve(G,Ch),ve(q,EE),ve(q,Ef))),Y.tagCheck=null,Y.attributeCheck=null,T.ADD_TAGS&&(typeof T.ADD_TAGS=="function"?Y.tagCheck=T.ADD_TAGS:(G===P&&(G=ho(G)),ve(G,T.ADD_TAGS,ot))),T.ADD_ATTR&&(typeof T.ADD_ATTR=="function"?Y.attributeCheck=T.ADD_ATTR:(q===Z&&(q=ho(q)),ve(q,T.ADD_ATTR,ot))),T.ADD_URI_SAFE_ATTR&&ve(Qo,T.ADD_URI_SAFE_ATTR,ot),T.FORBID_CONTENTS&&(gt===go&&(gt=ho(gt)),ve(gt,T.FORBID_CONTENTS,ot)),T.ADD_FORBID_CONTENTS&&(gt===go&&(gt=ho(gt)),ve(gt,T.ADD_FORBID_CONTENTS,ot)),In&&(G["#text"]=!0),xe&&ve(G,["html","head","body"]),G.table&&(ve(G,["tbody"]),delete re.tbody),T.TRUSTED_TYPES_POLICY){if(typeof T.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ts('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof T.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ts('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=T.TRUSTED_TYPES_POLICY,x=g.createHTML("")}else g===void 0&&(g=uO(h,i)),g!==null&&typeof x=="string"&&(x=g.createHTML(""));qt&&qt(T),Fo=T}},Bs=ve({},[...Eh,...Nh,...WR]),Hs=ve({},[...Ch,...JR]),Lf=function(T){let X=m(T);(!X||!X.tagName)&&(X={namespaceURI:ie,tagName:"template"});let F=Nf(T.tagName),He=Nf(X.tagName);return Ce[T.namespaceURI]?T.namespaceURI===Vn?X.namespaceURI===ue?F==="svg":X.namespaceURI===Cn?F==="svg"&&(He==="annotation-xml"||Fe[He]):!!Bs[F]:T.namespaceURI===Cn?X.namespaceURI===ue?F==="math":X.namespaceURI===Vn?F==="math"&&ft[He]:!!Hs[F]:T.namespaceURI===ue?X.namespaceURI===Vn&&!ft[He]||X.namespaceURI===Cn&&!Fe[He]?!1:!Hs[F]&&(Wn[F]||!Bs[F]):!!(Qt==="application/xhtml+xml"&&Ce[T.namespaceURI]):!1},un=function(T){Cs(t.removed,{element:T});try{m(T).removeChild(T)}catch{S(T)}},vo=function(T,X){try{Cs(t.removed,{attribute:X.getAttributeNode(T),from:X})}catch{Cs(t.removed,{attribute:null,from:X})}if(X.removeAttribute(T),T==="is")if($e||lt)try{un(X)}catch{}else try{X.setAttribute(T,"")}catch{}},ks=function(T){let X=null,F=null;if(Qe)T="<remove></remove>"+T;else{let We=_h(T,/^[\r\n\t ]+/);F=We&&We[0]}Qt==="application/xhtml+xml"&&ie===ue&&(T='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+T+"</body></html>");let He=g?g.createHTML(T):T;if(ie===ue)try{X=new f().parseFromString(He,Qt)}catch{}if(!X||!X.documentElement){X=_.createDocument(ie,"template",null);try{X.documentElement.innerHTML=oe?x:He}catch{}}let yt=X.body||X.documentElement;return T&&F&&yt.insertBefore(n.createTextNode(F),yt.childNodes[0]||null),ie===ue?w.call(X,xe?"html":"body")[0]:xe?X.documentElement:yt},Gs=function(T){return N.call(T.ownerDocument||T,T,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Il=function(T){return T instanceof d&&(typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof c)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"||typeof T.hasChildNodes!="function")},Vl=function(T){return typeof r=="function"&&T instanceof r};function Yn(ne,T,X){Ns(ne,F=>{F.call(t,T,X,Fo)})}let Yl=function(T){let X=null;if(Yn(A.beforeSanitizeElements,T,null),Il(T))return un(T),!0;let F=ot(T.nodeName);if(Yn(A.uponSanitizeElement,T,{tagName:F,allowedTags:G}),ye&&T.hasChildNodes()&&!Vl(T.firstElementChild)&&Xt(/<[/\w!]/g,T.innerHTML)&&Xt(/<[/\w!]/g,T.textContent)||ye&&T.namespaceURI===ue&&F==="style"&&Vl(T.firstElementChild)||T.nodeType===As.progressingInstruction||ye&&T.nodeType===As.comment&&Xt(/<[/\w]/g,T.data))return un(T),!0;if(re[F]||!(Y.tagCheck instanceof Function&&Y.tagCheck(F))&&!G[F]){if(!re[F]&&ql(F)&&(j.tagNameCheck instanceof RegExp&&Xt(j.tagNameCheck,F)||j.tagNameCheck instanceof Function&&j.tagNameCheck(F)))return!1;if(In&&!gt[F]){let He=m(T)||T.parentNode,yt=v(T)||T.childNodes;if(yt&&He){let We=yt.length;for(let Mt=We-1;Mt>=0;--Mt){let Ht=b(yt[Mt],!0);Ht.__removalCount=(T.__removalCount||0)+1,He.insertBefore(Ht,p(T))}}}return un(T),!0}return T instanceof s&&!Lf(T)||(F==="noscript"||F==="noembed"||F==="noframes")&&Xt(/<\/no(script|embed|frames)/i,T.innerHTML)?(un(T),!0):(ee&&T.nodeType===As.text&&(X=T.textContent,Ns([L,k,E],He=>{X=Rl(X,He," ")}),T.textContent!==X&&(Cs(t.removed,{element:T.cloneNode()}),T.textContent=X)),Yn(A.afterSanitizeElements,T,null),!1)},Xl=function(T,X,F){if($[X]||Lt&&(X==="id"||X==="name")&&(F in n||F in zf))return!1;if(!(ce&&!$[X]&&Xt(M,X))){if(!(K&&Xt(D,X))){if(!(Y.attributeCheck instanceof Function&&Y.attributeCheck(X,T))){if(!q[X]||$[X]){if(!(ql(T)&&(j.tagNameCheck instanceof RegExp&&Xt(j.tagNameCheck,T)||j.tagNameCheck instanceof Function&&j.tagNameCheck(T))&&(j.attributeNameCheck instanceof RegExp&&Xt(j.attributeNameCheck,X)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(X,T))||X==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&Xt(j.tagNameCheck,F)||j.tagNameCheck instanceof Function&&j.tagNameCheck(F))))return!1}else if(!Qo[X]){if(!Xt(V,Rl(F,R,""))){if(!((X==="src"||X==="xlink:href"||X==="href")&&T!=="script"&&QR(F,"data:")===0&&ya[T])){if(!(de&&!Xt(O,Rl(F,R,"")))){if(F)return!1}}}}}}}return!0},ql=function(T){return T!=="annotation-xml"&&_h(T,z)},Us=function(T){Yn(A.beforeSanitizeAttributes,T,null);let{attributes:X}=T;if(!X||Il(T))return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0},He=X.length;for(;He--;){let yt=X[He],{name:We,namespaceURI:Mt,value:Ht}=yt,eo=ot(We),Zl=Ht,dt=We==="value"?Zl:FR(Zl);if(F.attrName=eo,F.attrValue=dt,F.keepAttr=!0,F.forceKeepAttr=void 0,Yn(A.uponSanitizeAttribute,T,F),dt=F.attrValue,Pn&&(eo==="id"||eo==="name")&&(vo(We,T),dt=sn+dt),ye&&Xt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,dt)){vo(We,T);continue}if(eo==="attributename"&&_h(dt,"href")){vo(We,T);continue}if(F.forceKeepAttr)continue;if(!F.keepAttr){vo(We,T);continue}if(!te&&Xt(/\/>/i,dt)){vo(We,T);continue}ee&&Ns([L,k,E],Is=>{dt=Rl(dt,Is," ")});let jl=ot(T.nodeName);if(!Xl(jl,eo,dt)){vo(We,T);continue}if(g&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Mt)switch(h.getAttributeType(jl,eo)){case"TrustedHTML":{dt=g.createHTML(dt);break}case"TrustedScriptURL":{dt=g.createScriptURL(dt);break}}if(dt!==Zl)try{Mt?T.setAttributeNS(Mt,We,dt):T.setAttribute(We,dt),Il(T)?un(T):bE(t.removed)}catch{vo(We,T)}}Yn(A.afterSanitizeAttributes,T,null)},Ps=function(T){let X=null,F=Gs(T);for(Yn(A.beforeSanitizeShadowDOM,T,null);X=F.nextNode();)Yn(A.uponSanitizeShadowNode,X,null),Yl(X),Us(X),X.content instanceof a&&Ps(X.content);Yn(A.afterSanitizeShadowDOM,T,null)};return t.sanitize=function(ne){let T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},X=null,F=null,He=null,yt=null;if(oe=!ne,oe&&(ne="<!-->"),typeof ne!="string"&&!Vl(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw Ts("dirty is not a string, aborting")}else throw Ts("toString is not a function");if(!t.isSupported)return ne;if(Ne||Pl(T),t.removed=[],typeof ne=="string"&&(Dt=!1),Dt){if(ne.nodeName){let Ht=ot(ne.nodeName);if(!G[Ht]||re[Ht])throw Ts("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof r)X=ks("<!---->"),F=X.ownerDocument.importNode(ne,!0),F.nodeType===As.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?X=F:X.appendChild(F);else{if(!$e&&!ee&&!xe&&ne.indexOf("<")===-1)return g&&zt?g.createHTML(ne):ne;if(X=ks(ne),!X)return $e?null:zt?x:""}X&&Qe&&un(X.firstChild);let We=Gs(Dt?ne:X);for(;He=We.nextNode();)Yl(He),Us(He),He.content instanceof a&&Ps(He.content);if(Dt)return ne;if($e){if(ee){X.normalize();let Ht=X.innerHTML;Ns([L,k,E],eo=>{Ht=Rl(Ht,eo," ")}),X.innerHTML=Ht}if(lt)for(yt=C.call(X.ownerDocument);X.firstChild;)yt.appendChild(X.firstChild);else yt=X;return(q.shadowroot||q.shadowrootmode)&&(yt=H.call(o,yt,!0)),yt}let Mt=xe?X.outerHTML:X.innerHTML;return xe&&G["!doctype"]&&X.ownerDocument&&X.ownerDocument.doctype&&X.ownerDocument.doctype.name&&Xt(AE,X.ownerDocument.doctype.name)&&(Mt="<!DOCTYPE "+X.ownerDocument.doctype.name+`>
2271
+ `+Mt),ee&&Ns([L,k,E],Ht=>{Mt=Rl(Mt,Ht," ")}),g&&zt?g.createHTML(Mt):Mt},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Pl(ne),Ne=!0},t.clearConfig=function(){Fo=null,Ne=!1},t.isValidAttribute=function(ne,T,X){Fo||Pl({});let F=ot(ne),He=ot(T);return Xl(F,He,X)},t.addHook=function(ne,T){typeof T=="function"&&Cs(A[ne],T)},t.removeHook=function(ne,T){if(T!==void 0){let X=ZR(A[ne],T);return X===-1?void 0:jR(A[ne],X,1)[0]}return bE(A[ne])},t.removeHooks=function(ne){A[ne]=[]},t.removeAllHooks=function(){A=CE()},t}var ME=DE();var fe=ae(he(),1),cO=(0,fe.jsx)("svg",{viewBox:"0 0 24 24",children:(0,fe.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),fO=(0,fe.jsx)("svg",{viewBox:"0 0 24 24",children:(0,fe.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),dO=(0,fe.jsx)("svg",{viewBox:"0 0 24 24",children:(0,fe.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),pO=(0,fe.jsx)("svg",{viewBox:"0 0 24 24",children:(0,fe.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"})}),RE=(0,fe.jsx)("svg",{viewBox:"0 0 24 24",children:(0,fe.jsx)("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"})});function Cf(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Dh(e,t,n){let o=new Blob([e],{type:n}),i=URL.createObjectURL(o),a=document.createElement("a");a.href=i,a.download=t,a.click(),setTimeout(()=>URL.revokeObjectURL(i),1e4)}function OE(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function Tf({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,l]=_n.default.useState("html"),[r,s]=_n.default.useState(!1),u=_n.default.useRef(null),c=_n.default.useMemo(()=>mE(e.data),[e.data]),d=_n.default.useMemo(()=>pE(e.data),[e.data]),f=_n.default.useMemo(()=>hE(e.data),[e.data]),h=_n.default.useMemo(()=>bh(e.data),[e.data]),[y,b]=_n.default.useState(null);_n.default.useEffect(()=>{if(b(null),!f||!n||c)return;let k=!1;return n(f).then(E=>{k||b(_f(E)?E:null)}).catch(()=>{k||b(null)}),()=>{k=!0}},[f,n,c]);let S=c??y,p=d??y,v=_n.default.useMemo(()=>gE(e.data,e.contentType,p??f),[e.data,e.contentType,p,f]),m=v==="application/pdf",g=v?.startsWith("image/")??!1,x=yE(v??e.contentType),_=_n.default.useMemo(()=>{if(e.data==null)return null;try{return JSON.stringify(e.data,null,2)}catch{return"[Unable to serialize data]"}},[e.data]);_n.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(k=>{k.setAttribute("target","_blank"),k.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function N(k){let E=h||e.name;return(0,fe.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,fe.jsx)("div",{className:"stuff-viewer-local-file-icon",children:RE}),(0,fe.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[E&&(0,fe.jsx)("div",{className:"stuff-viewer-local-file-name",children:E}),(0,fe.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[k," \u2014 no preview available"]})]})]})}function C(){if(a==="html"){if(m){if(o!==!1&&S){let E=S.includes("#")?S:`${S}#pagemode=none`;return(0,fe.jsx)("div",{className:"stuff-viewer-pdf",children:(0,fe.jsx)("embed",{src:E,type:"application/pdf"})})}if(p){let E=h||e.name;return(0,fe.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:A,children:[(0,fe.jsx)("div",{className:"stuff-viewer-local-file-icon",children:RE}),(0,fe.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[E&&(0,fe.jsx)("div",{className:"stuff-viewer-local-file-name",children:E}),(0,fe.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return N("PDF")}return g?S?(0,fe.jsx)("div",{className:"stuff-viewer-image",children:(0,fe.jsx)("img",{src:S,alt:e.name||"Image content"})}):N("Image"):e.dataHtml?(0,fe.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:ME.sanitize(e.dataHtml)}}):_?(0,fe.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Cf(_)}}):(0,fe.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?_?(0,fe.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Cf(_)}}):(0,fe.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,fe.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Cf(e.dataText)}}):_?(0,fe.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Cf(_)}}):(0,fe.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function w(){let k;a==="json"?k=_||"":a==="text"?k=e.dataText||_||"":k=e.dataText||e.dataHtml||_||"",k&&navigator.clipboard&&navigator.clipboard.writeText(k).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function H(){if(g&&p){let k=v?.split("/")[1]||"png";OE(p,`${e.name||"stuff"}.${k}`);return}if(m&&p){OE(p,`${e.name||"stuff"}.pdf`);return}a==="json"?Dh(_||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Dh(e.dataText||_||"",`${e.name||"stuff"}.txt`,"text/plain"):Dh(e.dataHtml||_||"",`${e.name||"stuff"}.html`,"text/html")}function A(){if(p){if(i){i(p,h??void 0);return}window.open(p,"_blank","noopener,noreferrer")}}let L=["stuff-viewer",t].filter(Boolean).join(" ");return(0,fe.jsxs)("div",{className:L,children:[(0,fe.jsxs)("div",{className:"stuff-viewer-header",children:[(0,fe.jsx)("h3",{className:"stuff-viewer-title",children:e.name||"Data"}),e.concept&&(0,fe.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,fe.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,fe.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(k=>(0,fe.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===k?" stuff-viewer-tab--active":""}`,onClick:()=>l(k),children:k==="html"?x:k==="json"?"JSON":"Pretty"},k))}),(0,fe.jsxs)("div",{className:"stuff-viewer-actions",children:[p&&(0,fe.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:A,title:"Open in new window","aria-label":"Open in new window",children:pO}),(0,fe.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${r?" stuff-viewer-action-btn--copied":""}`,onClick:w,title:"Copy","aria-label":"Copy",children:r?fO:cO}),(0,fe.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:H,title:"Download","aria-label":"Download",children:dO})]})]}),(0,fe.jsx)("div",{className:"stuff-viewer-content",ref:u,children:C()})]})}var zE=ae(kt(),1);var Ol=ae(he(),1);function LE({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){zE.default.useEffect(()=>{if(!e||!l)return;let s=u=>{u.key==="Escape"&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,l,t]);let r=["detail-panel",!e&&"detail-panel--closed",i&&"detail-panel--dragging"].filter(Boolean).join(" ");return(0,Ol.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,Ol.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,Ol.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"}),(0,Ol.jsx)("div",{className:"detail-panel-content",children:n})]})}var ha=ae(kt(),1),mO=.6;function BE({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=ha.default.useState(e),[l,r]=ha.default.useState(!1),s=ha.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=ha.default.useRef(null),c=ha.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,h=f?Math.min(n,f*mO):n;s.current={startX:d.clientX,startWidth:i,maxAllowed:h},r(!0),document.body.style.userSelect="none",document.body.style.cursor="col-resize"},[i,n,o]);return ha.default.useEffect(()=>{if(!l)return;let d=h=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:y,startWidth:b,maxAllowed:S}=s.current,p=y-h.clientX,v=Math.max(t,Math.min(S,b+p));a(v),u.current=null})},f=()=>{r(!1),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)};return document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),()=>{document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.body.style.userSelect="",document.body.style.cursor="",u.current!==null&&(cancelAnimationFrame(u.current),u.current=null)}},[l,t]),{width:i,isDragging:l,handleMouseDown:c}}var GE=ae(kt(),1);var wf=ae(kt(),1),Ue=ae(he(),1);function Mh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function J({label:e,value:t}){return t==null?null:(0,Ue.jsxs)("div",{className:"detail-kv-row",children:[(0,Ue.jsx)("span",{className:"detail-kv-key",children:e}),(0,Ue.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function Rh({label:e,text:t}){return t?(0,Ue.jsxs)("div",{children:[(0,Ue.jsx)("div",{className:"detail-section-label",children:e}),(0,Ue.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var hO=(0,Ue.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ue.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),gO=(0,Ue.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ue.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),yO=(0,Ue.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ue.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"})}),vO=(0,Ue.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ue.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),HE={all:"unset",cursor:"pointer",display:"flex",alignItems:"center",gap:4,fontSize:9,color:"#64748b",padding:"2px 6px",borderRadius:3,background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.06)",transition:"color 0.15s"};function $n({label:e,templateText:t,renderedText:n}){let[o,i]=(0,wf.useState)(!1),[a,l]=(0,wf.useState)(!1),[r,s]=(0,wf.useState)(!1),u=!!t,c=!!n;if(!u&&!c)return null;let d=u&&c,f=d?o?t:n:t||n;function h(){!f||!navigator.clipboard||navigator.clipboard.writeText(f).then(()=>{l(!0),setTimeout(()=>l(!1),1500)}).catch(()=>{})}return(0,Ue.jsxs)("div",{children:[(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,Ue.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,Ue.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,Ue.jsx)("button",{onClick:()=>s(y=>!y),title:r?"Collapse prompt":"Expand prompt","aria-label":r?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:r?gO:hO}),(0,Ue.jsx)("button",{onClick:h,title:"Copy prompt","aria-label":"Copy prompt",style:{...HE,color:a?"#10b981":"#64748b"},children:a?vO:yO}),d&&(0,Ue.jsxs)("button",{onClick:()=>i(y=>!y),style:HE,children:[(0,Ue.jsx)("span",{style:{width:22,height:12,borderRadius:6,background:o?"rgba(255,255,255,0.12)":"#50FA7B33",position:"relative",display:"inline-block",transition:"background 0.15s"},children:(0,Ue.jsx)("span",{style:{position:"absolute",top:2,left:o?2:12,width:8,height:8,borderRadius:"50%",background:o?"#94a3b8":"#50FA7B",transition:"left 0.15s, background 0.15s"}})}),o?"template":"rendered"]})]})]}),(0,Ue.jsx)("div",{className:`detail-prompt-block ${r?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var At=ae(he(),1);function Oh({blueprint:e,executionData:t}){let n=e.llm_prompt_spec,o=n.user_image_references&&n.user_image_references.length>0,i=n.user_document_references&&n.user_document_references.length>0,a=n.system_image_references&&n.system_image_references.length>0,l=n.system_document_references&&n.system_document_references.length>0,r=t?.resolved_model,s=t?.resolved_model_for_object,u=t?.rendered_system_prompt,c=t?.rendered_user_prompt,d=t?.structuring_path,f=t?.is_multiple_output,h=r||e.llm_choices?.for_text,y=s||e.llm_choices?.for_object;return(0,At.jsxs)(At.Fragment,{children:[(0,At.jsx)(J,{label:"Model",value:h}),y&&y!==h&&(0,At.jsx)(J,{label:"Model (object)",value:y}),(0,At.jsx)(J,{label:"Structuring",value:d||e.structuring_method}),(0,At.jsx)(J,{label:"Multiple Output",value:f}),(0,At.jsx)(J,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,At.jsx)(J,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,At.jsx)(J,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,At.jsx)(J,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,At.jsx)(J,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,At.jsx)(J,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,At.jsx)($n,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,At.jsx)($n,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}function zh(e){return null}var an=ae(he(),1);function Lh({blueprint:e,executionData:t}){let n=e.img_gen_prompt_blueprint,o=t?.resolved_model,i=t?.rendered_prompt,a=t?.rendered_negative_prompt;return(0,an.jsxs)(an.Fragment,{children:[(0,an.jsx)(J,{label:"Model",value:o||e.img_gen_choice}),(0,an.jsx)($n,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,an.jsx)($n,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,an.jsx)(J,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,an.jsx)(J,{label:"Output Format",value:e.output_format}),(0,an.jsx)(J,{label:"Background",value:e.background}),(0,an.jsx)(J,{label:"Is Raw",value:e.is_raw}),(0,an.jsx)(J,{label:"Seed",value:e.seed}),(0,an.jsx)(J,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}function Bh(e){return null}var ln=ae(he(),1);function Hh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,ln.jsxs)(ln.Fragment,{children:[(0,ln.jsx)(J,{label:"Model",value:n||e.extract_choice}),(0,ln.jsx)(J,{label:"Document Variable",value:e.document_stuff_name}),(0,ln.jsx)(J,{label:"Caption Images",value:e.should_caption_images}),(0,ln.jsx)(J,{label:"Max Page Images",value:e.max_page_images}),(0,ln.jsx)(J,{label:"Include Page Views",value:e.should_include_page_views}),(0,ln.jsx)(J,{label:"Page Views DPI",value:e.page_views_dpi}),(0,ln.jsx)(J,{label:"Render JS",value:e.render_js}),(0,ln.jsx)(J,{label:"Include Raw HTML",value:e.include_raw_html}),(0,ln.jsx)(J,{label:"Image Variable",value:e.image_stuff_name})]})}function kh(e){return null}var rn=ae(he(),1);function Gh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,rn.jsxs)(rn.Fragment,{children:[(0,rn.jsx)(J,{label:"Model",value:n||e.search_choice}),(0,rn.jsx)($n,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,rn.jsx)(J,{label:"Max Results",value:e.max_results_override}),(0,rn.jsx)(J,{label:"Include Images",value:e.include_images_override}),(0,rn.jsx)(J,{label:"Structured Output",value:e.is_structured_output}),(0,rn.jsx)(J,{label:"From Date",value:e.from_date}),(0,rn.jsx)(J,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,rn.jsx)(J,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,rn.jsx)(J,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}function Uh(e){return null}var Oe=ae(he(),1);function bO(e){switch(e.method){case"from_var":{let t=`\u2190 ${e.from_path??"?"}`;return e.list_to_dict_keyed_by?`${t} (keyed by ${e.list_to_dict_keyed_by})`:t}case"fixed":return`= ${JSON.stringify(e.fixed_value)}`;case"nested":return"(nested construct)";case"template":return e.template??"(empty template)"}}var SO=60;function xO(e){return e.length>SO||e.includes(`
2272
+ `)}function _O({label:e,value:t}){return(0,Oe.jsxs)("div",{className:"detail-field-block",children:[(0,Oe.jsx)("div",{className:"detail-field-block-label",children:e}),(0,Oe.jsx)("div",{className:"detail-field-block-value",children:t})]})}function kE({blueprint:e,depth:t,fieldResolutions:n}){let o=[],i=[],a=[];for(let[r,s]of Object.entries(e.fields))s.method==="template"?a.push([r,s]):s.method==="nested"?i.push([r,s]):o.push([r,s]);let l=t>0?{paddingLeft:t*12}:void 0;return(0,Oe.jsxs)(Oe.Fragment,{children:[o.map(([r,s])=>{let u=bO(s);return xO(u)?(0,Oe.jsx)("div",{style:l,children:(0,Oe.jsx)(_O,{label:r,value:u})},r):(0,Oe.jsx)("div",{style:l,children:(0,Oe.jsx)(J,{label:r,value:u})},r)}),a.map(([r,s])=>{let u=n?.[r]?.rendered;return(0,Oe.jsx)("div",{style:l,children:(0,Oe.jsx)($n,{label:`Template \u2014 ${r}`,templateText:s.template??null,renderedText:u})},r)}),i.map(([r,s])=>s.nested?(0,Oe.jsxs)("div",{children:[(0,Oe.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,Oe.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,Oe.jsxs)("span",{className:"detail-nested-header-meta",children:["nested \xB7 ",Object.keys(s.nested.fields).length," field",Object.keys(s.nested.fields).length===1?"":"s"]})]}),(0,Oe.jsx)(kE,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},r):null)]})}function Ph({blueprint:e,executionData:t}){let n=t?.rendered_text,o=t?.compose_mode,i=t?.fields??null,a=e.construct_blueprint,l=a!==null&&Object.keys(a.fields).length>0;return(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)(J,{label:"Mode",value:o||(l?"construct":"template")}),(0,Oe.jsx)(J,{label:"Category",value:e.category}),(0,Oe.jsx)(J,{label:"Templating Style",value:e.templating_style}),e.template&&(0,Oe.jsx)($n,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,Oe.jsx)(kE,{blueprint:a,depth:0,fieldResolutions:i})]})]})}function Ih(e){return null}var Ot=ae(he(),1);function Vh({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(Rh,{label:"Expression",text:e.expression}),n&&(0,Ot.jsx)(J,{label:"Expression Result",value:n}),(0,Ot.jsxs)("div",{children:[(0,Ot.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,Ot.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,Ot.jsx)("span",{className:"detail-kv-key",children:i}),(0,Ot.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,Ot.jsxs)("div",{className:"detail-kv-row",children:[(0,Ot.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,Ot.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,Ot.jsx)(J,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}function Yh(e){return null}var Xo=ae(he(),1);function Xh({blueprint:e}){return(0,Xo.jsxs)("div",{children:[(0,Xo.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,Xo.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,Xo.jsxs)("div",{className:"detail-step-item",children:[(0,Xo.jsx)("span",{className:"detail-step-index",children:n+1}),(0,Xo.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Xo.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}function qh(e){return null}var En=ae(he(),1);function Zh({blueprint:e}){return(0,En.jsxs)(En.Fragment,{children:[(0,En.jsxs)("div",{children:[(0,En.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,En.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,En.jsxs)("div",{className:"detail-step-item",children:[(0,En.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,En.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,En.jsx)(J,{label:"Add Each Output",value:e.add_each_output}),(0,En.jsx)(J,{label:"Combined Output",value:e.combined_output})]})}function jh(e){return null}var qo=ae(he(),1);function Qh({blueprint:e,executionData:t}){let n=t?.item_count;return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(J,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,qo.jsx)(J,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,qo.jsx)(J,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,qo.jsx)(J,{label:"Items Processed",value:n})]})}function Fh(e){return null}var Q=ae(he(),1),EO={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},NO=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),CO={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4"};function UE({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type??"PipeFunc",i=NO.has(o),a=EO[o]??o,l=e.status??"scheduled",r=CO[l]??"#6272a4",s=GE.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,h=fE(t,f);if(h)return h;for(let[y,b]of Object.entries(t.pipe_registry))if(y.endsWith(`.${e.pipe_code}`))return b},[e.pipe_code,t]),u=e.io?.inputs??[],c=e.io?.outputs??[],d=s?.description??e.description;return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)("div",{className:"detail-sticky-header",children:[(0,Q.jsxs)("div",{className:"detail-header",children:[(0,Q.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,Q.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code??"unknown"})]}),(0,Q.jsxs)("div",{className:"detail-status",children:[(0,Q.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,Q.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,Q.jsx)("span",{className:"detail-duration",children:Mh(e.timing.duration)})]}),d&&(0,Q.jsx)("div",{className:"detail-description",children:d}),u.length>0&&(0,Q.jsxs)("div",{children:[(0,Q.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,Q.jsx)("div",{className:"detail-io-list",children:u.map((f,h)=>(0,Q.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,Q.jsx)("span",{className:"detail-io-name",children:f.name??"unnamed"}),f.concept&&(0,Q.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),c.length>0&&(0,Q.jsxs)("div",{children:[(0,Q.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,Q.jsx)("div",{className:"detail-io-list",children:c.map((f,h)=>(0,Q.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,Q.jsx)("span",{className:"detail-io-name",children:f.name??"unnamed"}),f.concept&&(0,Q.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),(u.length>0||c.length>0)&&(0,Q.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),s&&(0,Q.jsx)(TO,{blueprint:s,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,Q.jsx)(wO,{executionData:e.execution_data,pipeType:o}),e.error&&(0,Q.jsxs)("div",{className:"detail-error",children:[(0,Q.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,Q.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,Q.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,Q.jsxs)("div",{children:[(0,Q.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,h])=>(0,Q.jsx)(J,{label:f,value:typeof h=="number"?h.toLocaleString():String(h)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,Q.jsxs)("div",{children:[(0,Q.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,Q.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,h])=>(0,Q.jsxs)("span",{className:"detail-tag",children:[(0,Q.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,Q.jsx)("span",{className:"detail-tag-value",children:h})]},f))})]}),!s&&(0,Q.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function TO({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,Q.jsx)(Oh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,Q.jsx)(Lh,{blueprint:e,executionData:t});case"PipeCompose":return(0,Q.jsx)(Ph,{blueprint:e,executionData:t});case"PipeExtract":return(0,Q.jsx)(Hh,{blueprint:e,executionData:t});case"PipeSearch":return(0,Q.jsx)(Gh,{blueprint:e,executionData:t});case"PipeSequence":return(0,Q.jsx)(Xh,{blueprint:e,executionData:t});case"PipeParallel":return(0,Q.jsx)(Zh,{blueprint:e,executionData:t});case"PipeCondition":return(0,Q.jsx)(Vh,{blueprint:e,executionData:t});case"PipeBatch":return(0,Q.jsx)(Qh,{blueprint:e,executionData:t});case"PipeFunc":return null}}function wO({executionData:e,pipeType:t}){switch(t){case"PipeLLM":return(0,Q.jsx)(zh,{data:e});case"PipeImgGen":return(0,Q.jsx)(Bh,{data:e});case"PipeExtract":return(0,Q.jsx)(kh,{data:e});case"PipeSearch":return(0,Q.jsx)(Uh,{data:e});case"PipeCompose":return(0,Q.jsx)(Ih,{data:e});case"PipeCondition":return(0,Q.jsx)(Yh,{data:e});case"PipeSequence":return(0,Q.jsx)(qh,{data:e});case"PipeParallel":return(0,Q.jsx)(jh,{data:e});case"PipeBatch":return(0,Q.jsx)(Fh,{data:e});default:return(0,Q.jsx)(AO,{data:e})}}function AO({data:e}){let t=Object.entries(e);return t.length===0?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,Q.jsx)(J,{label:n,value:String(o)},n))]})}var we=ae(he(),1);function Kh({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){return(0,we.jsxs)(we.Fragment,{children:[(0,we.jsxs)("div",{className:"detail-header",children:[(0,we.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,we.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,we.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,we.jsxs)("div",{className:"detail-refines",children:["refines ",(0,we.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),e.json_schema?(0,we.jsxs)("div",{children:[(0,we.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,we.jsx)(DO,{schema:e.json_schema,isDryRun:n})]}):(0,we.jsx)("div",{className:"detail-not-available",children:"Schema not available"}),t&&!n&&(0,we.jsxs)("div",{children:[(0,we.jsx)("div",{className:"detail-section-label",children:"Data"}),(0,we.jsx)(Tf,{stuff:RO(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})]})]})}function DO({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,we.jsx)("div",{className:"detail-not-available",children:"No fields defined"});let i=Object.entries(n),a=t?i.filter(([l])=>o.has(l)):i;return(0,we.jsxs)("table",{className:"detail-schema-table",children:[(0,we.jsx)("thead",{children:(0,we.jsxs)("tr",{children:[(0,we.jsx)("th",{children:"Field"}),(0,we.jsx)("th",{children:"Type"}),(0,we.jsx)("th",{}),(0,we.jsx)("th",{children:"Description"})]})}),(0,we.jsx)("tbody",{children:a.map(([l,r])=>(0,we.jsxs)("tr",{children:[(0,we.jsx)("td",{className:"detail-schema-field",children:l}),(0,we.jsx)("td",{className:"detail-schema-type",children:MO(r)}),(0,we.jsx)("td",{children:o.has(l)&&(0,we.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,we.jsx)("td",{children:r.description??""})]},l))})]})}function MO(e){return e.type?String(e.type):e.anyOf?"union":e.allOf?"all":e.$ref?String(e.$ref).split("/").pop()??"ref":"unknown"}function RO(e){return"digest"in e?e:{digest:e.digest??"",name:e.name,concept:e.concept,contentType:e.content_type,data:e.data,dataText:e.data_text,dataHtml:e.data_html}}function zl(e){return e.map(t=>({id:t.id,type:t.type,data:t.data,position:t.position,style:t.style,sourcePosition:t.sourcePosition,targetPosition:t.targetPosition,parentId:t.parentId,extent:t.extent,selected:t.selected}))}function Ll(e){return e.map(t=>({id:t.id,source:t.source,target:t.target,type:t.type,animated:t.animated,label:t.label,labelStyle:t.labelStyle,labelBgStyle:t.labelBgStyle,labelBgPadding:t.labelBgPadding,labelBgBorderRadius:t.labelBgBorderRadius,style:t.style,markerEnd:t.markerEnd}))}function OO(e,t){let n=t||"this step";return`${{PipeLLM:"Analyze and generate output using",PipeExtract:"Extract content from",PipeCompose:"Compose output using",PipeImgGen:"Generate image for",PipeSearch:"Search the web for",PipeFunc:"Process data in"}[e]||"Execute"} ${n.replace(/_/g," ")}`}function Af(e,t,n){let o=e.pipe_type,i=e.pipe_code||e.id,a=n.controllerNodeIds.has(e.id),l=(e.io?.inputs??[]).map(c=>({name:c.name??"",concept:c.concept??""})),r=(e.io?.outputs??[]).map(c=>({name:c.name??"",concept:c.concept??""})),s=e.pipe_code?t.pipe_registry?.[e.pipe_code]?.description:void 0,u;return e.description?u=e.description:s?u=s:a?u=void 0:u=OO(o,e.pipe_code),{pipeCode:i,pipeType:o,description:u,status:e.status??"scheduled",inputs:l,outputs:r}}var zO=7,LO=48,BO=140;function HO(e,t,n){let o=[],i=[],a=new Set;for(let s of Object.values(t.stuffProducers))a.add(s);for(let s of Object.values(t.stuffConsumers))for(let u of s)a.add(u);for(let s of e.nodes){if(!a.has(s.id))continue;let u=s.status==="failed",c=s.pipe_code||s.id.split(":").pop()||s.id,d=Af(s,e,t);o.push({id:s.id,type:Dl,data:{labelDescriptor:{kind:"pipe",label:c,isFailed:u},nodeData:s,isPipe:!0,isStuff:!1,labelText:c,pipeCode:d.pipeCode,pipeType:s.pipe_type,pipeCardData:d},position:{x:0,y:0}})}for(let[s,u]of Object.entries(t.stuffRegistry)){let c=Oi(s),d=u.name||"data",f=u.concept||"",h=Math.max(d.length,f.length)*zO+LO,y=Math.max(BO,h),b=!t.stuffProducers[s],S=!b&&!t.stuffConsumers[s]?.length,p=b?"input":S?"output":void 0,v=b?"var(--color-stuff-input-border, #50FA7B)":S?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:lE,data:{labelDescriptor:{kind:"stuff",label:d,concept:f},isStuff:!0,isPipe:!1,labelText:d,stuffRole:p,stuffDigest:s},position:{x:0,y:0},style:{background:"var(--color-stuff-bg)",border:`2px solid ${v}`,borderRadius:"999px",padding:"0",width:y+"px",boxShadow:"var(--shadow-md)"}})}let l=0;for(let[s,u]of Object.entries(t.stuffProducers)){let c=Oi(s);i.push({id:"edge_"+l++,source:u,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ma,color:"var(--color-edge)"}})}for(let[s,u]of Object.entries(t.stuffConsumers)){let c=Oi(s);for(let d of u)i.push({id:"edge_"+l++,source:c,target:d,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:ma,color:"var(--color-edge)"}})}for(let s of e.edges){if(s.kind!=="parallel_combine"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Oi(s.source_stuff_digest),c=Oi(s.target_stuff_digest);i.push({id:s.id||"edge_"+l++,source:u,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ma,color:"var(--color-parallel-combine)"}})}for(let s of e.edges){if(s.kind!=="batch_item"&&s.kind!=="batch_aggregate"||!s.source_stuff_digest||!s.target_stuff_digest||!t.stuffRegistry[s.source_stuff_digest]||!t.stuffRegistry[s.target_stuff_digest])continue;let u=Oi(s.source_stuff_digest),c=Oi(s.target_stuff_digest),d=s.kind==="batch_item";i.push({id:s.id||"edge_"+l++,source:u,target:c,type:n,animated:!1,_batchEdge:!0,label:s.label||"",labelStyle:{fontSize:"10px",fontFamily:"var(--font-mono)",fill:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"},labelBgStyle:{fill:"var(--color-bg)",fillOpacity:.9},style:{stroke:d?"var(--color-batch-item)":"var(--color-batch-aggregate)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:ma,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=mo(e,t);for(let s of i){let u=r[s.source]||null,c=r[s.target]||null;u&&c&&u!==c&&(s._crossGroup=!0,s.style={...s.style,strokeWidth:1.5,opacity:.65})}for(let s of i)s._batchEdge&&(s.style={...s.style,opacity:.7});return{nodes:o,edges:i}}function PE(e,t){if(e){let n=cE(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:HO(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}function VE(e,t,n){let o=new Set([e]),a=t.nodes.find(l=>l.id===e)?.pipe_code;if(!a)return o;for(let l of t.nodes)l.pipe_code===a&&n.has(l.id)&&o.add(l.id);return o}function kO(e,t){let n=[],o=t[e],i=new Set;for(;o&&!i.has(o);)n.push(o),i.add(o),o=t[o];return n}function Ms(e,t,n){let o=kO(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function Df(e,t,n){return Ms(e,t,n)??e}function IE(e,t){return e.nodes.find(n=>n.id===t)}function $h(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=mo(n,t),l=new Map;for(let p of o){let m=IE(n,p)?.io?.outputs;if(m)for(let g of m){if(!g.digest)continue;let x=l.get(g.digest);x||(x=new Set,l.set(g.digest,x)),x.add(p)}}if(l.size>0)for(let p of e.nodes){if(!Ml(p.id))continue;let v=l.get(Es(p.id));if(!v)continue;let m=a[p.id],g=null,x=new Set;for(;m&&!x.has(m);)x.add(m),v.has(m)&&(g=m),m=a[m];if(!g)continue;let _=a[g];_?a[p.id]=_:delete a[p.id]}let r=[];for(let p of e.nodes)Ms(p.id,a,o)||r.push(p);for(let p of o){if(Ms(p,a,o))continue;let v=IE(n,p);if(!v)continue;let m=Af(v,n,t);i&&(m.onExpand=x=>i(p,x));let g={id:p,type:Dl,data:{labelDescriptor:{kind:"pipe",label:m.pipeCode,isFailed:m.status==="failed"},nodeData:v,isPipe:!1,isStuff:!1,isController:!0,labelText:m.pipeCode,pipeCode:m.pipeCode,pipeType:v.pipe_type,pipeCardData:m},position:{x:0,y:0}};r.push(g)}let s=new Set;for(let p of t.controllerNodeIds)o.has(p)||Ms(p,a,o)||s.add(p);let u={};for(let p of s){let v=t.containmentTree[p]??[],m=[];for(let g of v){let x=Ms(g,a,o);x&&x!==g||m.push(g)}u[p]=m}let c=new Set;for(let p of Object.values(u))for(let v of p)c.add(v);let d={};for(let[p,v]of Object.entries(t.stuffProducers))d[p]=Df(v,a,o);let f={};for(let[p,v]of Object.entries(t.stuffConsumers)){let m=new Set;for(let g of v)m.add(Df(g,a,o));f[p]=[...m]}let h={stuffRegistry:t.stuffRegistry,stuffProducers:d,stuffConsumers:f,controllerNodeIds:s,childNodeIds:c,containmentTree:u},y=new Map;for(let p of e.edges){let v=Df(p.source,a,o),m=Df(p.target,a,o);if(v===m)continue;let g=p._batchEdge?"batch":"data",x=`${v}->${m}|${g}`;if(y.has(x))continue;let _={...p,source:v,target:m,id:p.id};p._batchEdge&&(v!==p.source||m!==p.target)&&(_.label="[N]"),delete _._crossGroup,y.set(x,_)}let b=mo({...n,edges:n.edges.filter(p=>p.kind!=="contains"?!0:s.has(p.source))},h),S=[];for(let p of y.values()){let v=b[p.source]||null,m=b[p.target]||null;if(v&&m&&v!==m)p._crossGroup=!0,p.style={...p.style,strokeWidth:1.5,opacity:.65};else if(p.style&&(p.style.opacity===.65||p.style.strokeWidth===1.5)){let{opacity:g,strokeWidth:x,..._}=p.style;p.style={..._,strokeWidth:2},p.markerEnd||(p.markerEnd={type:ma,color:"var(--color-edge)"})}S.push(p)}return{nodes:r,edges:S,analysis:h}}var GO=window.ELK,YE=GO;function UO(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var PO="_in",IO="_out";function Jh(e){return e+PO}function eg(e){return e+IO}function VO(e,t,n){let o={LR:{inSide:"WEST",outSide:"EAST"},RL:{inSide:"EAST",outSide:"WEST"},TB:{inSide:"NORTH",outSide:"SOUTH"},BT:{inSide:"SOUTH",outSide:"NORTH"}},{inSide:i,outSide:a}=o[n],l=n==="LR"||n==="RL",r=l?n==="LR"?0:t.width:t.width/2,s=l?t.height/2:n==="TB"?0:t.height,u=l?n==="LR"?t.width:0:t.width/2,c=l?t.height/2:n==="TB"?t.height:0;return[{id:Jh(e),x:r,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:eg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var YO=320,jE=28,XO=24,Wh=8,qO=22,ZO=50,jO=16,QO=3,XE=38,qE=30,Mf=22,FO=140,KO=100,$O=17,WO=58,JO=5.5,ez=5,tz=4.5,nz=4;function oz(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-jE,i=Math.max(1,Math.floor(o/JO)),a=Math.ceil(e.length/i);return Math.min(QO,Math.max(1,a))}function iz(e,t){let n=Math.min(FO,Math.ceil(e.length*ez)),o=Math.min(KO,Math.ceil(t.length*tz));return n+o+$O}function ZE(e,t){if(e.length===0)return 0;let n=t-jE-WO,o=1,i=0;for(let a of e){let l=iz(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function Bl(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===Dl,l=t?180:280,r=t?240:400,s=Math.max(180,Math.min(r,i.length*8+60)),u;o?u=Math.max(180,s):a&&n.pipeCardData?u=r:u=Math.max(a?l:200,s);let c;if(o)c=60;else if(a&&n.pipeCardData){let d=n.pipeCardData,f=d.inputs??[],h=d.outputs??[],y=d.description||n.nodeData?.description||"",b=XO+(t?ZO:qO),S=oz(y,t,u);S>0&&(b+=Wh+S*jO);let p=f.slice(0,nz);if(p.length>0)if(b+=Wh,t)b+=XE+(p.length-1)*Mf;else{let v=ZE(p,u);b+=qE+(v-1)*Mf}if(h.length>0)if(b+=Wh,t)b+=XE+(h.length-1)*Mf;else{let v=ZE(h,u);b+=qE+(v-1)*Mf}c=Math.min(YO,b)}else c=a?120:70;return{width:u,height:c}}function az(e,t){let n={},o=new Set;function i(a){if(n[a]!==void 0)return n[a];if(o.has(a))return 0;o.add(a);let l=t[a]||[],r=-1;for(let s of l)e.has(s)&&(r=Math.max(r,i(s)));return o.delete(a),n[a]=r+1,n[a]}for(let a of e)i(a);return n}function Rf(e,t,n){return{id:e,width:t.width,height:t.height,ports:VO(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function QE(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,s=a?.ranksep??70,u=UO(i),c="30",d={"elk.algorithm":"layered","elk.direction":u,"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.spacing.edgeEdge":"20","elk.layered.spacing.edgeNodeBetweenLayers":c,"elk.layered.spacing.edgeEdgeBetweenLayers":"15","elk.layered.nodePlacement.favorStraightEdges":"true"};if(!n||!o||o.controllerNodeIds.size===0){let x={},_=e.map(C=>{let w=Bl(C,l);return x[C.id]=w,Rf(C.id,w,i)}),N=t.map(C=>({id:C.id,sources:[eg(C.source)],targets:[Jh(C.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:_,edges:N},dimensionMap:x}}let f=mo(n,o),h=az(o.controllerNodeIds,o.containmentTree),y={},b=new Map;for(let x of e)b.set(x.id,x);let S={},p=Array.from(o.controllerNodeIds);p.sort((x,_)=>(h[x]??0)-(h[_]??0));for(let x of p){let N=1+(h[x]??0)*.15,C=Math.round(bf*N),w=Math.round(Sf*N),H=Math.round(xf*N),A={"elk.padding":`[top=${w},left=${C},bottom=${H},right=${C}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},L=[],k=o.containmentTree[x]||[];for(let E of k)if(o.controllerNodeIds.has(E)){let M=S[E];M&&L.push(M)}else{let M=b.get(E);if(M){let D=Bl(M,l);y[E]=D,L.push(Rf(E,D,i))}}for(let E of e)if(E.data.isStuff&&f[E.id]===x&&!L.some(M=>M.id===E.id)){let M=Bl(E,l);y[E.id]=M,L.push(Rf(E.id,M,i))}S[x]={id:x,layoutOptions:A,children:L}}let v=[];for(let x of p)if(!f[x]){let _=S[x];_&&v.push(_)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let _=Bl(x,l);y[x.id]=_,v.push(Rf(x.id,_,i))}let m=new Set(e.map(x=>x.id)),g=t.filter(x=>m.has(x.source)&&m.has(x.target)).map(x=>({id:x.id,sources:[eg(x.source)],targets:[Jh(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:v,edges:g},dimensionMap:y}}function FE(e){let t={};function n(o,i,a){let l=i+(o.x??0),r=a+(o.y??0);o.id!=="root"&&(t[o.id]={x:l,y:r,width:o.width??0,height:o.height??0});for(let s of o.children??[])n(s,l,r)}return n(e,0,0),t}var tg=null;function lz(){return tg||(tg=new YE),tg}async function Of(e,t,n,o,i,a){if(e.length===0)return{nodes:[],edges:t,controllerPositions:{}};let l=n==="LR"||n==="RL",{elkGraph:r,dimensionMap:s}=QE(e,t,i??null,a??null,n,o),u=await lz().layout(r),c=FE(u),d={};if(a)for(let h of a.controllerNodeIds)c[h]&&(d[h]=c[h]);return{nodes:e.map(h=>{let y=c[h.id],b=s[h.id]??Bl(h,l),S=b.width,p=b.height,v=h.data.pipeCardData,g=v?{...v,direction:l?"LR":"TB"}:void 0;return{...h,data:{...h.data,_estimatedWidth:S,_estimatedHeight:p,pipeCardData:g},style:{...h.style,width:S+"px",height:p+"px"},position:{x:y?y.x:0,y:y?y.y:0},sourcePosition:l?n==="LR"?"right":"left":n==="TB"?"bottom":"top",targetPosition:l?n==="LR"?"left":"right":n==="TB"?"top":"bottom"}}),edges:t,controllerPositions:d}}var Rs=5;function rz(e,t,n){let o=new Set,i=[e];for(;i.length>0;){let a=i.pop();for(let l of t[a]||[])o.add(l),n.has(l)&&i.push(l)}return o}function sz(e,t,n,o){let i={};for(let y of n)i[y.id]=y;let a={};for(let y of e.nodes)t.controllerNodeIds.has(y.id)&&(a[y.id]=y);let l={},r=new Set;function s(y){if(l[y]!==void 0)return l[y];if(r.has(y))throw new Error(`Cycle detected in containment tree: controller "${y}" is part of a containment cycle`);r.add(y);let b=t.containmentTree[y]||[],S=-1;for(let p of b)t.controllerNodeIds.has(p)&&(S=Math.max(S,s(p)));return r.delete(y),l[y]=S+1,l[y]}let u=mo(e,t),c={};for(let[y,b]of Object.entries(u))Ml(y)&&i[y]&&(c[b]||(c[b]=[]),c[b].push(y));let d=Array.from(t.controllerNodeIds);for(let y of d)s(y);d.sort((y,b)=>l[y]-l[b]);let f=[],h={};for(let y of d){let S=(t.containmentTree[y]||[]).filter(A=>i[A]),p=c[y]||[],v=[...S,...p];if(v.length===0)continue;let m,g,x,_,N=o?.[y];if(N)m=N.x,g=N.y,x=N.width,_=N.height;else{let A=1/0,L=1/0,k=-1/0,E=-1/0;for(let V of v){let G=i[V],P=G.position,q=sE(G),Z=uE(G);A=Math.min(A,P.x),L=Math.min(L,P.y),k=Math.max(k,P.x+q),E=Math.max(E,P.y+Z)}let D=1+(l[y]??0)*.15,O=Math.round(bf*D),R=Math.round(Sf*D),z=Math.round(xf*D);m=A-O,g=L-R,x=k-A+2*O,_=E-L+R+z}let C=a[y]||{},w=C.pipe_code||y.split(":").pop()||y,H={id:y,type:rE,data:{label:w,pipeType:C.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:w,labelText:w},position:{x:m,y:g},style:{width:x+"px",height:_+"px",padding:"0"}};f.push(H),i[y]=H;for(let A of v)h[A]=y}for(let[y,b]of Object.entries(h)){let S=i[y],p=i[b];!S||!p||(S.position={x:S.position.x-p.position.x,y:S.position.y-p.position.y},S.parentId=b,S.extent="parent")}return f}function Hl(e,t,n,o,i,a,l,r,s){if(!i||!o||!n)return{nodes:e,edges:t};let u={},c=new Set,d={};for(let g of n.nodes)o.controllerNodeIds.has(g.id)&&(d[g.id]=g.pipe_type);for(let g of o.controllerNodeIds){let x=o.containmentTree[g]||[];u[g]=x.length;let _=d[g];(_==="PipeParallel"||_==="PipeBatch")&&x.length>Rs&&!a?.has(g)&&c.add(g)}let f=e,h=t;if(c.size>0){let g=new Set;for(let _ of c){let C=(o.containmentTree[_]||[]).slice(Rs);for(let w of C)if(g.add(w),o.controllerNodeIds.has(w))for(let H of rz(w,o.containmentTree,o.controllerNodeIds))g.add(H)}let x=mo(n,o);for(let _ of e){if(!Ml(_.id)||g.has(_.id))continue;let N=x[_.id];if(!N||!c.has(N)&&!g.has(N))continue;let C=t.filter(w=>{if(w.source!==_.id&&w.target!==_.id)return!1;let H=w.source===_.id?w.target:w.source;return!Ml(H)});(C.length===0||C.every(w=>{let H=w.source===_.id?w.target:w.source;return g.has(H)}))&&g.add(_.id)}f=e.filter(_=>!g.has(_.id)),h=t.filter(_=>!g.has(_.source)&&!g.has(_.target))}let y=sz(n,o,f,r);if(y.length===0)return{nodes:f,edges:h};for(let g of y){let x=u[g.id]??0,_=c.has(g.id);if(g.data.childCount=x,g.data.isCollapsed=_,l){let N=g.id;g.data.onToggleCollapse=()=>l(N)}if(s){let N=g.id;g.data.onToggleFold=C=>s(N,C)}}let b=[...y,...f],S={};for(let g of b)S[g.id]=g;let p={},v=new Set;function m(g){if(p[g]!==void 0)return p[g];if(v.has(g))throw new Error(`Cycle detected in node parent chain: node "${g}" references itself as an ancestor`);v.add(g);let x=S[g];return p[g]=x&&x.parentId?1+m(x.parentId):0,v.delete(g),p[g]}for(let g of b)m(g.id);return b.sort((g,x)=>p[g.id]-p[x.id]),{nodes:b,edges:h}}var kl={direction:"LR",showControllers:!1,foldMode:po.EXPANDED,nodesep:50,ranksep:100,edgeType:vf.DEFAULT,initialZoom:null,panToTop:!0,paletteColors:{"--color-pipe":"#ff6b6b","--color-pipe-bg":"rgba(224,108,117,0.18)","--color-pipe-text":"#ffffff","--color-stuff":"#4ECDC4","--color-stuff-bg":"rgba(78,205,196,0.12)","--color-stuff-border":"#9ddcfd","--color-stuff-text":"#98FB98","--color-stuff-text-dim":"#9ddcfd","--color-edge":"#FFFACD","--color-batch-item":"#bd93f9","--color-batch-aggregate":"#50fa7b","--color-parallel-combine":"#d6a4ff","--color-success":"#50FA7B","--color-success-bg":"rgba(80,250,123,0.15)","--color-error":"#FF5555","--color-error-bg":"rgba(255,85,85,0.15)","--color-accent":"#8BE9FD","--color-warning":"#FFB86C","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8","--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace',"--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)"}};var ga=ae(he(),1);function uz(e){return e.kind==="pipe"?(0,ga.jsx)("div",{style:{padding:"10px 14px",display:"flex",flexDirection:"column",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.label,children:(0,ga.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"13px",fontWeight:600,color:"var(--color-pipe-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label})}):(0,ga.jsxs)("div",{style:{padding:"8px 24px",display:"flex",flexDirection:"column",alignItems:"center",gap:"2px",textAlign:"center",width:"100%",boxSizing:"border-box",minWidth:0},title:e.concept?`${e.label}: ${e.concept}`:e.label,children:[(0,ga.jsx)("span",{style:{fontFamily:"var(--font-mono)",fontSize:"12px",fontWeight:600,color:"var(--color-stuff-text)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),e.concept&&(0,ga.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function Gl(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:uz(t.data.labelDescriptor)}}:t)}var le=ae(he(),1),cz=(0,le.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,le.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,le.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),fz=(0,le.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,le.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,le.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),dz=(0,le.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,le.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),pz=(0,le.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,le.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,le.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),mz=(0,le.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,le.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,le.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,le.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,le.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),hz=(0,le.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,le.jsx)("path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z"}),(0,le.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,le.jsx)("path",{d:"m7 16.5 5-3"}),(0,le.jsx)("path",{d:"M7 16.5v5.17"}),(0,le.jsx)("path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z"}),(0,le.jsx)("path",{d:"m17 16.5-5-3"}),(0,le.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,le.jsx)("path",{d:"M17 16.5v5.17"}),(0,le.jsx)("path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z"}),(0,le.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,le.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,le.jsx)("path",{d:"M12 13.5V8"})]}),gz=(0,le.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,le.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,le.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,le.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,le.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,le.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),yz=(0,le.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,le.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,le.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,le.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,le.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,le.jsx)("polyline",{points:"21 21 17 17 21 17"})]});function KE({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:l,onFoldAll:r,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,rightOffset:d=0}){let f=e===xn.TB||e===xn.BT,h=f?"Switch to horizontal layout":"Switch to vertical layout",y=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",b=r||s,S=u?"Fold all controllers (nothing to fold)":"Fold all controllers",p=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,le.jsxs)("div",{className:"graph-toolbar",style:{right:`${d+8}px`},children:[r&&(0,le.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,disabled:u,title:S,"aria-label":S,children:gz}),s&&(0,le.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:p,"aria-label":p,children:yz}),b&&(0,le.jsx)("div",{className:"graph-toolbar-separator"}),(0,le.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:y,"aria-label":y,children:hz}),(0,le.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(f?xn.LR:xn.TB),title:h,"aria-label":h,children:f?cz:fz}),(a||i||l)&&(0,le.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,le.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:dz}),i&&(0,le.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:pz}),l&&(0,le.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,title:"Fit view","aria-label":"Fit view",children:mz})]})}var Zo=ae(he(),1),vz={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function bz(e){return e?vz[e]:{badge:"",icon:""}}function Sz(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function xz({data:e}){let t=bz(e.pipeType),n=Sz(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>Rs,i=o?(e.childCount??0)-Rs:0;return(0,Zo.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,Zo.jsxs)("div",{className:"controller-group-header",children:[(0,Zo.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,Zo.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,Zo.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,Zo.jsx)("button",{type:"button",className:"controller-group-fold",title:"Fold controller (alt/option: only this one)","aria-label":"Fold controller",onClick:a=>{a.stopPropagation(),e.onToggleFold?.({soloMode:a.altKey})},children:"\u2921"})]}),o&&(0,Zo.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var $E={controllerGroup:xz};var JE=ae(kt(),1),Ke=ae(he(),1),_z={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},Ez={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function Nz(e){return e in Ez}var WE={succeeded:{color:"#50FA7B",label:"Succeeded"},failed:{color:"#FF5555",label:"Failed"},running:{color:"#8BE9FD",label:"Running"},scheduled:{color:"#6272a4",label:"Scheduled"},skipped:{color:"#6272a4",label:"Skipped"}},ng=4;function Cz(e){return _z[e]}function Nn({data:e,children:t}){let n=Cz(e.pipeType),o=WE[e.status]??WE.scheduled,i=e.status==="running",a=Nz(e.pipeType),[l,r]=(0,JE.useState)(!1),s=e.inputs.length>ng,u=s&&!l?e.inputs.slice(0,ng):e.inputs,c=e.inputs.length-ng,d=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr",f=a?" pipe-card--controller":"",h=a?"pipe-card-badge pipe-card-badge--controller":"pipe-card-badge";return(0,Ke.jsxs)("div",{className:`pipe-card ${d}${f}`,children:[(0,Ke.jsxs)("div",{className:"pipe-card-header",children:[(0,Ke.jsx)("span",{className:h,children:n}),(0,Ke.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Ke.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Ke.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Ke.jsx)("button",{type:"button",className:"pipe-card-expand",title:"Expand controller (alt/option: only this one)","aria-label":"Expand controller",onClick:y=>{y.stopPropagation(),e.onExpand?.({soloMode:y.altKey})},children:"\u2922"})]}),e.description&&(0,Ke.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Ke.jsxs)("div",{className:"pipe-card-io",children:[(0,Ke.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Ke.jsxs)("div",{className:"pipe-card-io-pills",children:[u.map(y=>(0,Ke.jsxs)("span",{className:"pipe-card-io-pill",title:`${y.name}: ${y.concept}`,children:[(0,Ke.jsx)("span",{className:"pipe-card-io-pill-name",children:y.name}),(0,Ke.jsx)("span",{className:"pipe-card-io-pill-concept",children:y.concept})]},y.name)),s&&(0,Ke.jsx)("button",{className:"pipe-card-io-more",onClick:y=>{y.stopPropagation(),r(b=>!b)},children:l?"show less":`+${c} more`})]})]}),e.outputs.length>0&&(0,Ke.jsxs)("div",{className:"pipe-card-io",children:[(0,Ke.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Ke.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(y=>(0,Ke.jsxs)("span",{className:"pipe-card-io-pill",title:`${y.name}: ${y.concept}`,children:[(0,Ke.jsx)("span",{className:"pipe-card-io-pill-name",children:y.name}),(0,Ke.jsx)("span",{className:"pipe-card-io-pill-concept",children:y.concept})]},y.name))})]}),t]})}var Tz={PipeLLM:Nn,PipeExtract:Nn,PipeCompose:Nn,PipeImgGen:Nn,PipeSearch:Nn,PipeFunc:Nn,PipeSequence:Nn,PipeParallel:Nn,PipeCondition:Nn,PipeBatch:Nn};function eN(e){return Tz[e]}var jo=ae(he(),1);function wz({data:e}){let t=eN(e.pipeType)??Nn;return(0,jo.jsx)(t,{data:e})}function tN({data:e,sourcePosition:t=W.Bottom,targetPosition:n=W.Top}){let o=e.pipeCardData;return o?(0,jo.jsxs)(jo.Fragment,{children:[(0,jo.jsx)(pa,{type:"target",position:n}),(0,jo.jsx)(wz,{data:o}),(0,jo.jsx)(pa,{type:"source",position:t})]}):null}var jt=ae(he(),1),Az={...$E,pipeCard:tN};function Dz({stuffData:e,graphspec:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let a=e.concept&&t?vh(t,e.concept):void 0;return(0,jt.jsx)(jt.Fragment,{children:a?(0,jt.jsx)(Kh,{concept:a,ioData:e,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}):(0,jt.jsx)(Tf,{stuff:e,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i})})}function Mz(e,t){return e===po.FOLDED?new Set(t):new Set}function Os(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function zs(e,t){return!t||Object.keys(t).length===0?e:e.map(n=>{let o=n.data.pipeCode;if(!o||!Object.hasOwn(t,o))return n;let i=t[o];return n.data.pipeCardData?.status===i?n:{...n,data:{...n.data,nodeData:n.data.nodeData?{...n.data.nodeData,status:i}:n.data.nodeData,pipeCardData:n.data.pipeCardData?{...n.data.pipeCardData,status:i}:n.data.pipeCardData}}})}function nN(e){let{graphspec:t,config:n=kl,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:l=!1,onNavigateToPipe:r,onStuffNodeClick:s,onReactFlowInit:u,statusMap:c,onNodeSelect:d,onPaneClick:f,renderDetailExtra:h,resolveStorageUrl:y,canEmbedPdf:b,onOpenExternally:S}=e,[p,v]=ge.default.useState(()=>o??n.direction??kl.direction??xn.TB),[m,g]=ge.default.useState(()=>i??n.showControllers??kl.showControllers??!1),x=a??n.foldMode??kl.foldMode??po.EXPANDED,_=ge.default.useRef(x);_.current=x;let N=ge.default.useRef(null),[C,w]=ge.default.useState(null),[H,A]=ge.default.useState(null),{width:L,isDragging:k,handleMouseDown:E}=BE({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:N});ge.default.useEffect(()=>{w(null),A(null)},[t]),ge.default.useEffect(()=>{let ue=N.current;if(!ue)return;let ie=n.paletteColors??kl.paletteColors;if(ie){for(let[oe,Ce]of Object.entries(ie))ue.style.setProperty(oe,Ce);return()=>{for(let oe of Object.keys(ie))ue.style.removeProperty(oe)}}},[n.paletteColors]);let[M,D,O]=eE([]),[R,z,V]=tE([]),G=ge.default.useRef(null),P=ge.default.useRef(null),q=ge.default.useRef(null),Z=ge.default.useRef(null),[j,re]=ge.default.useState(new Set),$=ge.default.useCallback(ue=>{re(ie=>{let oe=new Set(ie);return oe.has(ue)?oe.delete(ue):oe.add(ue),oe})},[]),[Y,K]=ge.default.useState(new Set),ce=ge.default.useCallback((ue,ie)=>{K(oe=>{let Ce=new Set(oe),ze=!Ce.has(ue),Fe=q.current,ft=!ie?.soloMode&&Fe?.graphspec&&Fe.analysis?VE(ue,Fe.graphspec,Fe.analysis.controllerNodeIds):new Set([ue]);for(let Wn of ft)ze?Ce.add(Wn):Ce.delete(Wn);return Ce})},[]),de=n.edgeType||vf.DEFAULT,te=ge.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),ee=ge.default.useRef(m);ee.current=m;let ye=ge.default.useRef(p);ye.current=p;let xe=ge.default.useRef(te);xe.current=te;let Ne=ge.default.useRef(n.initialZoom);Ne.current=n.initialZoom;let Qe=ge.default.useRef(n.panToTop);Qe.current=n.panToTop;let $e=ge.default.useRef(j);$e.current=j;let lt=ge.default.useRef($);lt.current=$;let zt=ge.default.useRef(Y);zt.current=Y;let Lt=ge.default.useRef(ce);Lt.current=ce;let Pn=ge.default.useRef(!0),sn=ge.default.useRef(0),In=ge.default.useRef(!1),Dt=ge.default.useRef(c);Dt.current=c,ge.default.useEffect(()=>{if(!P.current)return;let ue=!1;return(async()=>{try{let ie=P.current;if(!ie)return;let oe=await Of(ie.nodes,ie.edges,p,te,ie._graphspec,ie._analysis);if(ue)return;Z.current={nodes:oe.nodes,edges:oe.edges,controllerPositions:oe.controllerPositions};let Ce=Hl(Os(oe.nodes),oe.edges,ie._graphspec,ie._analysis,ee.current,$e.current,lt.current,oe.controllerPositions,Lt.current);D(zs(zl(Gl(Ce.nodes)),Dt.current)),z(Ll(Ce.edges)),setTimeout(()=>{!ue&&G.current&&G.current.fitView({padding:.1})},50)}catch(ie){console.error("[GraphViewer] ELK layout failed:",ie)}})(),()=>{ue=!0}},[p,te]),ge.default.useEffect(()=>{if(!Z.current||!P.current)return;let ue=Os(Z.current.nodes),ie=Z.current.edges,oe=Hl(ue,ie,P.current._graphspec,P.current._analysis,m,j,$,Z.current.controllerPositions,ce);D(zs(zl(Gl(oe.nodes)),Dt.current)),z(Ll(oe.edges))},[m,j,$,ce]),ge.default.useEffect(()=>{if(!t){P.current=null,q.current=null,Z.current=null,D([]),z([]);return}let ue=!1;re(new Set),$e.current=new Set;let{graphData:ie,analysis:oe}=PE(t,de);q.current={nodes:ie.nodes,edges:ie.edges,analysis:oe,graphspec:t};let Ce=oe?Mz(_.current,oe.controllerNodeIds):new Set;K(Ce),zt.current=Ce,In.current=Ce.size>0,sn.current=Ce.size;let ze=Ce.size>0&&oe?$h({nodes:ie.nodes,edges:ie.edges},oe,t,Ce,Lt.current):{nodes:ie.nodes,edges:ie.edges,analysis:oe};return P.current={nodes:ze.nodes,edges:ze.edges,_analysis:ze.analysis,_graphspec:t},(async()=>{try{let Fe=ye.current,ft=xe.current,Qt=ze.nodes.some(Jn=>!Jn.position||Jn.position.x===0&&Jn.position.y===0)?await Of(ze.nodes,ze.edges,Fe,ft,t,ze.analysis):{nodes:ze.nodes,edges:ze.edges,controllerPositions:{}};if(ue)return;Z.current={nodes:Qt.nodes,edges:Qt.edges,controllerPositions:Qt.controllerPositions};let va=Hl(Os(Qt.nodes),Qt.edges,t,ze.analysis,ee.current,$e.current,lt.current,Qt.controllerPositions,Lt.current);D(zs(zl(Gl(va.nodes)),Dt.current)),z(Ll(va.edges)),setTimeout(()=>{if(!ue&&G.current&&(G.current.fitView({padding:.1}),Ne.current!==void 0&&Ne.current!==null&&G.current.zoomTo(Ne.current),Qe.current)){let Jn=G.current.getViewport();G.current.setViewport({x:Jn.x,y:20,zoom:Jn.zoom})}},100)}catch(Fe){console.error("[GraphViewer] ELK layout failed:",Fe)}})(),()=>{ue=!0}},[t,de]),ge.default.useEffect(()=>{if(Pn.current){Pn.current=!1,sn.current=Y.size;return}if(In.current){In.current=!1,sn.current=Y.size;return}let ue=sn.current;if(sn.current=Y.size,ue===0&&Y.size===0||!q.current||!q.current.analysis)return;let ie=q.current,oe=ie.graphspec,Ce=ie.analysis;if(!oe||!Ce)return;let ze=!1,Fe=$h({nodes:ie.nodes,edges:ie.edges},Ce,oe,Y,ce);return P.current={nodes:Fe.nodes,edges:Fe.edges,_analysis:Fe.analysis,_graphspec:oe},(async()=>{try{let ft=await Of(Fe.nodes,Fe.edges,ye.current,xe.current,oe,Fe.analysis);if(ze)return;Z.current={nodes:ft.nodes,edges:ft.edges,controllerPositions:ft.controllerPositions};let Wn=Hl(Os(ft.nodes),ft.edges,oe,Fe.analysis,ee.current,$e.current,lt.current,ft.controllerPositions,Lt.current);D(zs(zl(Gl(Wn.nodes)),Dt.current)),z(Ll(Wn.edges)),setTimeout(()=>{!ze&&G.current&&G.current.fitView({padding:.1})},50)}catch(ft){console.error("[GraphViewer] ELK layout failed:",ft)}})(),()=>{ze=!0}},[Y,ce]),ge.default.useEffect(()=>{if(!Z.current||!P.current)return;let ue=Os(Z.current.nodes),ie=Z.current.edges,oe=Hl(ue,ie,P.current._graphspec,P.current._analysis,ee.current,$e.current,lt.current,Z.current.controllerPositions,Lt.current);D(zs(zl(Gl(oe.nodes)),c)),z(Ll(oe.edges))},[c]);let Bt=ge.default.useCallback((ue,ie)=>{let oe=ie.data;if(d?.(ie.id,oe,ue),oe.isController||oe.isPipe){let Ce=oe.pipeCode||oe.labelText;Ce&&r&&r(Ce,oe.pipeCardData?.status)}else if(oe.isStuff&&s&&t){let Ce=Es(ie.id),ze=Sh(t,Ce);ze&&s(ze)}if(A(null),C?.nodeId===ie.id&&!H)w(null);else if(oe.isPipe||oe.isController)w({kind:"pipe",nodeId:ie.id,nodeData:oe});else if(oe.isStuff&&t){let Ce=Es(ie.id),ze=Sh(t,Ce);w({kind:"stuff",nodeId:ie.id,nodeData:oe,stuffData:ze??void 0})}D(Ce=>Ce.map(ze=>({...ze,selected:ze.id===ie.id})))},[D,r,d,s,t,C,H]),gt=ge.default.useCallback(ue=>{G.current=ue,u&&u(ue)},[u]),go=ge.default.useCallback(()=>{w(null),A(null),f?.()},[f]),ya=ge.default.useCallback(ue=>{if(!t)return;let ie=vh(t,ue);ie&&A(ie)},[t]),yo=C?.kind==="pipe"&&t?t.nodes.find(ue=>ue.pipe_code===C.nodeData.pipeCode):void 0,Qo=C!==null||H!==null,Cn=q.current?.analysis?.controllerNodeIds,Vn=ge.default.useMemo(()=>!m||!Cn||Cn.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>K(new Set(Cn)),onExpandAll:()=>K(new Set),foldAllDisabled:Y.size===Cn.size,expandAllDisabled:Y.size===0},[m,Cn,Y]);return(0,jt.jsxs)("div",{ref:N,className:"react-flow-container",children:[(0,jt.jsx)(J_,{nodes:M,edges:R,nodeTypes:Az,onNodesChange:O,onEdgesChange:V,onNodeClick:Bt,onPaneClick:go,onInit:gt,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:de},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:(0,jt.jsx)(oE,{variant:fo.Dots,gap:20,size:1,color:"var(--color-bg-dots)"})}),(0,jt.jsxs)(LE,{isOpen:Qo,onClose:go,width:L,isDragging:k,onResizeHandleMouseDown:E,children:[H?(0,jt.jsx)(Kh,{concept:H}):yo&&t?(0,jt.jsx)(UE,{node:yo,spec:t,onConceptClick:ya}):C?.stuffData?(0,jt.jsx)(Dz,{stuffData:C.stuffData,graphspec:t,resolveStorageUrl:y,canEmbedPdf:b,onOpenExternally:S}):null,h&&C&&!H&&h(C.nodeId,C.nodeData)]}),!l&&(0,jt.jsx)(KE,{direction:p,onDirectionChange:v,showControllers:m,onShowControllersChange:g,onZoomIn:()=>G.current?.zoomIn(),onZoomOut:()=>G.current?.zoomOut(),onFitView:()=>G.current?.fitView({padding:.1}),onFoldAll:Vn.onFoldAll,onExpandAll:Vn.onExpandAll,foldAllDisabled:Vn.foldAllDisabled,expandAllDisabled:Vn.expandAllDisabled,rightOffset:Qo?L:0})]})}function Rz(e){return e===po.FOLDED||e===po.EXPANDED||e===po.AUTO?e:po.EXPANDED}function Oz(e){return e===xn.LR||e===xn.RL||e===xn.TB||e===xn.BT?e:xn.LR}function og(e,t){let n=e&&typeof e=="object"?e:{},o=Oz(n.direction),i=!!n.showControllers,a=Rz(n.foldMode);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a},initialDirection:o,initialShowControllers:i,initialFoldMode:a}}var ag=og({},null),ig=null;function oN(e){let t=document.getElementById(e);if(!t?.textContent)return null;try{return JSON.parse(t.textContent)}catch{return null}}function zz(){return lg.default.createElement(nN,ag)}function iN(){let e=document.getElementById("root");if(!e)return;let t=(0,aN.createRoot)(e);ig=()=>{t.render(lg.default.createElement(zz))},ig(),setTimeout(()=>{let n=oN("pipelex-config"),o=oN("pipelex-graphspec");ag=og(n,o);let i=ag.config.paletteColors;if(i)for(let[a,l]of Object.entries(i))document.body.style.setProperty(a,l);ig?.()},0),document.getElementById("theme-toggle")?.addEventListener("click",()=>{let n=document.body.getAttribute("data-theme")||"dark",o=n==="dark"?"light":n==="light"?"system":"dark";document.body.setAttribute("data-theme",o);let i=document.getElementById("theme-toggle")?.querySelector(".theme-label");i&&(i.textContent=o)})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",iN):iN();})();
2273
+ /*! Bundled license information:
2274
+
2275
+ react/cjs/react.production.js:
2276
+ (**
2277
+ * @license React
2278
+ * react.production.js
2279
+ *
2280
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2281
+ *
2282
+ * This source code is licensed under the MIT license found in the
2283
+ * LICENSE file in the root directory of this source tree.
2284
+ *)
2285
+
2286
+ scheduler/cjs/scheduler.production.js:
2287
+ (**
2288
+ * @license React
2289
+ * scheduler.production.js
2290
+ *
2291
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2292
+ *
2293
+ * This source code is licensed under the MIT license found in the
2294
+ * LICENSE file in the root directory of this source tree.
2295
+ *)
2296
+
2297
+ react-dom/cjs/react-dom.production.js:
2298
+ (**
2299
+ * @license React
2300
+ * react-dom.production.js
2301
+ *
2302
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2303
+ *
2304
+ * This source code is licensed under the MIT license found in the
2305
+ * LICENSE file in the root directory of this source tree.
2306
+ *)
2307
+
2308
+ react-dom/cjs/react-dom-client.production.js:
2309
+ (**
2310
+ * @license React
2311
+ * react-dom-client.production.js
2312
+ *
2313
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2314
+ *
2315
+ * This source code is licensed under the MIT license found in the
2316
+ * LICENSE file in the root directory of this source tree.
2317
+ *)
2318
+
2319
+ react/cjs/react-jsx-runtime.production.js:
2320
+ (**
2321
+ * @license React
2322
+ * react-jsx-runtime.production.js
2323
+ *
2324
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2325
+ *
2326
+ * This source code is licensed under the MIT license found in the
2327
+ * LICENSE file in the root directory of this source tree.
2328
+ *)
2329
+
2330
+ use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
2331
+ (**
2332
+ * @license React
2333
+ * use-sync-external-store-shim.production.js
2334
+ *
2335
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2336
+ *
2337
+ * This source code is licensed under the MIT license found in the
2338
+ * LICENSE file in the root directory of this source tree.
2339
+ *)
2340
+
2341
+ use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
2342
+ (**
2343
+ * @license React
2344
+ * use-sync-external-store-shim/with-selector.production.js
2345
+ *
2346
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
2347
+ *
2348
+ * This source code is licensed under the MIT license found in the
2349
+ * LICENSE file in the root directory of this source tree.
2350
+ *)
2351
+
2352
+ dompurify/dist/purify.es.mjs:
2353
+ (*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE *)
2354
+ */
2355
+
2356
+ </script>
2357
+ </body>
2358
+ </html>