@pipelex/mthds-ui 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ILX53OYM.js → chunk-WNSV4E7G.js} +12 -2
- package/dist/{chunk-ILX53OYM.js.map → chunk-WNSV4E7G.js.map} +1 -1
- package/dist/graph/index.d.ts +2 -2
- package/dist/graph/index.js +3 -1
- package/dist/graph/react/graph-core.css +13 -0
- package/dist/graph/react/index.d.ts +47 -13
- package/dist/graph/react/index.js +210 -103
- package/dist/graph/react/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/standalone/graph-standalone.html +136 -94
- package/dist/standalone/graph-viewer.css +94 -54
- package/dist/standalone/graph-viewer.js +9 -9
- package/dist/{types-DJTrDxjV.d.ts → types-uGRs3n4k.d.ts} +43 -4
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
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 */
|
|
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
9
|
/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
|
|
10
10
|
.react-flow {
|
|
11
11
|
direction: ltr;
|
|
@@ -1014,6 +1014,19 @@ svg.react-flow__connectionline {
|
|
|
1014
1014
|
.pipe-card--controller {
|
|
1015
1015
|
--pipe-card-accent: var(--text-muted);
|
|
1016
1016
|
}
|
|
1017
|
+
|
|
1018
|
+
/* Signature (unimplemented stub) — dashed + muted so it reads as "declared,
|
|
1019
|
+
not built yet", distinct from operator (solid accent) and controller (tinted). */
|
|
1020
|
+
.pipe-card--signature {
|
|
1021
|
+
--pipe-card-accent: var(--text-muted);
|
|
1022
|
+
border-left-style: dashed;
|
|
1023
|
+
opacity: 0.85;
|
|
1024
|
+
}
|
|
1025
|
+
.pipe-card-badge--signature {
|
|
1026
|
+
background: transparent;
|
|
1027
|
+
color: var(--text-muted);
|
|
1028
|
+
border: 1px dashed var(--text-muted);
|
|
1029
|
+
}
|
|
1017
1030
|
@keyframes pipe-card-pulse {
|
|
1018
1031
|
0%,
|
|
1019
1032
|
100% {
|
|
@@ -2166,20 +2179,37 @@ button.stuff-viewer-local-file--button:focus-visible {
|
|
|
2166
2179
|
|
|
2167
2180
|
/* ─── Standalone GraphViewer chrome (toolbar, theme, layout) ─────────── */
|
|
2168
2181
|
|
|
2169
|
-
* {
|
|
2182
|
+
* {
|
|
2183
|
+
box-sizing: border-box;
|
|
2184
|
+
margin: 0;
|
|
2185
|
+
padding: 0;
|
|
2186
|
+
}
|
|
2170
2187
|
|
|
2171
|
-
html,
|
|
2188
|
+
html,
|
|
2189
|
+
body {
|
|
2172
2190
|
height: 100%;
|
|
2173
2191
|
overflow: hidden;
|
|
2174
|
-
font-family:
|
|
2192
|
+
font-family:
|
|
2193
|
+
"Inter",
|
|
2194
|
+
-apple-system,
|
|
2195
|
+
sans-serif;
|
|
2175
2196
|
}
|
|
2176
2197
|
|
|
2177
2198
|
/* ─── Theme system ──────────────────────────────────────────────────── */
|
|
2178
2199
|
|
|
2179
|
-
|
|
2200
|
+
/* `data-theme="system"` defaults to the dark palette so a host with no
|
|
2201
|
+
`prefers-color-scheme` support (legacy WebKit / older Electron / some
|
|
2202
|
+
webviews) still gets themed chrome on first paint, before — and even if —
|
|
2203
|
+
the JS bundle loads. This mirrors the JS side, where `detectSystemTheme()`
|
|
2204
|
+
also falls back to dark. The `prefers-color-scheme: light` query below flips
|
|
2205
|
+
it to light when the engine supports it; `prefers-color-scheme: dark` needs
|
|
2206
|
+
no block because it already matches this default. */
|
|
2207
|
+
body[data-theme="dark"],
|
|
2208
|
+
body[data-theme="system"],
|
|
2209
|
+
body:not([data-theme]) {
|
|
2180
2210
|
--chrome-bg: #0d1117;
|
|
2181
2211
|
--chrome-surface: #161b22;
|
|
2182
|
-
--chrome-border: rgba(255,255,255,0.08);
|
|
2212
|
+
--chrome-border: rgba(255, 255, 255, 0.08);
|
|
2183
2213
|
--chrome-text: #e2e8f0;
|
|
2184
2214
|
--chrome-text-muted: #8b949e;
|
|
2185
2215
|
background: #0a0a0f;
|
|
@@ -2189,7 +2219,7 @@ body[data-theme="dark"], body:not([data-theme]) {
|
|
|
2189
2219
|
body[data-theme="light"] {
|
|
2190
2220
|
--chrome-bg: #ffffff;
|
|
2191
2221
|
--chrome-surface: #f6f8fa;
|
|
2192
|
-
--chrome-border: rgba(0,0,0,0.1);
|
|
2222
|
+
--chrome-border: rgba(0, 0, 0, 0.1);
|
|
2193
2223
|
--chrome-text: #1f2328;
|
|
2194
2224
|
--chrome-text-muted: #656d76;
|
|
2195
2225
|
background: #ffffff;
|
|
@@ -2200,7 +2230,7 @@ body[data-theme="light"] {
|
|
|
2200
2230
|
body[data-theme="system"] {
|
|
2201
2231
|
--chrome-bg: #ffffff;
|
|
2202
2232
|
--chrome-surface: #f6f8fa;
|
|
2203
|
-
--chrome-border: rgba(0,0,0,0.1);
|
|
2233
|
+
--chrome-border: rgba(0, 0, 0, 0.1);
|
|
2204
2234
|
--chrome-text: #1f2328;
|
|
2205
2235
|
--chrome-text-muted: #656d76;
|
|
2206
2236
|
background: #ffffff;
|
|
@@ -2208,18 +2238,6 @@ body[data-theme="light"] {
|
|
|
2208
2238
|
}
|
|
2209
2239
|
}
|
|
2210
2240
|
|
|
2211
|
-
@media (prefers-color-scheme: dark) {
|
|
2212
|
-
body[data-theme="system"] {
|
|
2213
|
-
--chrome-bg: #0d1117;
|
|
2214
|
-
--chrome-surface: #161b22;
|
|
2215
|
-
--chrome-border: rgba(255,255,255,0.08);
|
|
2216
|
-
--chrome-text: #e2e8f0;
|
|
2217
|
-
--chrome-text-muted: #8b949e;
|
|
2218
|
-
background: #0a0a0f;
|
|
2219
|
-
color: #e2e8f0;
|
|
2220
|
-
}
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
2241
|
/* ─── Layout ────────────────────────────────────────────────────────── */
|
|
2224
2242
|
|
|
2225
2243
|
#app-container {
|
|
@@ -2247,7 +2265,9 @@ body[data-theme="light"] {
|
|
|
2247
2265
|
z-index: 20;
|
|
2248
2266
|
}
|
|
2249
2267
|
|
|
2250
|
-
.toolbar-spacer {
|
|
2268
|
+
.toolbar-spacer {
|
|
2269
|
+
flex: 1;
|
|
2270
|
+
}
|
|
2251
2271
|
|
|
2252
2272
|
.toolbar-btn {
|
|
2253
2273
|
all: unset;
|
|
@@ -2259,7 +2279,9 @@ body[data-theme="light"] {
|
|
|
2259
2279
|
height: 28px;
|
|
2260
2280
|
border-radius: 4px;
|
|
2261
2281
|
color: var(--chrome-text-muted);
|
|
2262
|
-
transition:
|
|
2282
|
+
transition:
|
|
2283
|
+
background 0.15s,
|
|
2284
|
+
color 0.15s;
|
|
2263
2285
|
}
|
|
2264
2286
|
|
|
2265
2287
|
.toolbar-btn:hover {
|
|
@@ -2273,8 +2295,12 @@ body[data-theme="light"] {
|
|
|
2273
2295
|
}
|
|
2274
2296
|
|
|
2275
2297
|
/* Direction toggle */
|
|
2276
|
-
.direction-icon {
|
|
2277
|
-
|
|
2298
|
+
.direction-icon {
|
|
2299
|
+
display: none;
|
|
2300
|
+
}
|
|
2301
|
+
.direction-icon.active {
|
|
2302
|
+
display: inline-flex;
|
|
2303
|
+
}
|
|
2278
2304
|
|
|
2279
2305
|
/* Controllers toggle */
|
|
2280
2306
|
.toggle-switch {
|
|
@@ -2287,7 +2313,9 @@ body[data-theme="light"] {
|
|
|
2287
2313
|
user-select: none;
|
|
2288
2314
|
}
|
|
2289
2315
|
|
|
2290
|
-
.toggle-switch input {
|
|
2316
|
+
.toggle-switch input {
|
|
2317
|
+
display: none;
|
|
2318
|
+
}
|
|
2291
2319
|
|
|
2292
2320
|
.toggle-track {
|
|
2293
2321
|
width: 28px;
|
|
@@ -2299,7 +2327,7 @@ body[data-theme="light"] {
|
|
|
2299
2327
|
}
|
|
2300
2328
|
|
|
2301
2329
|
.toggle-switch input:checked + .toggle-track {
|
|
2302
|
-
background: #
|
|
2330
|
+
background: #50fa7b44;
|
|
2303
2331
|
}
|
|
2304
2332
|
|
|
2305
2333
|
.toggle-knob {
|
|
@@ -2310,39 +2338,22 @@ body[data-theme="light"] {
|
|
|
2310
2338
|
height: 12px;
|
|
2311
2339
|
border-radius: 50%;
|
|
2312
2340
|
background: var(--chrome-text-muted);
|
|
2313
|
-
transition:
|
|
2341
|
+
transition:
|
|
2342
|
+
left 0.15s,
|
|
2343
|
+
background 0.15s;
|
|
2314
2344
|
}
|
|
2315
2345
|
|
|
2316
2346
|
.toggle-switch input:checked + .toggle-track .toggle-knob {
|
|
2317
2347
|
left: 14px;
|
|
2318
|
-
background: #
|
|
2348
|
+
background: #50fa7b;
|
|
2319
2349
|
}
|
|
2320
2350
|
|
|
2321
2351
|
.toggle-label {
|
|
2322
2352
|
font-size: 11px;
|
|
2323
2353
|
}
|
|
2324
2354
|
|
|
2325
|
-
/*
|
|
2326
|
-
|
|
2327
|
-
all: unset;
|
|
2328
|
-
cursor: pointer;
|
|
2329
|
-
display: flex;
|
|
2330
|
-
align-items: center;
|
|
2331
|
-
gap: 4px;
|
|
2332
|
-
font-size: 10px;
|
|
2333
|
-
color: var(--chrome-text-muted);
|
|
2334
|
-
padding: 4px 8px;
|
|
2335
|
-
border-radius: 4px;
|
|
2336
|
-
transition: background 0.15s;
|
|
2337
|
-
}
|
|
2338
|
-
|
|
2339
|
-
.theme-btn:hover {
|
|
2340
|
-
background: var(--chrome-border);
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
.theme-label {
|
|
2344
|
-
text-transform: capitalize;
|
|
2345
|
-
}
|
|
2355
|
+
/* The theme toggle lives in the in-graph toolbar (library-owned tri-state);
|
|
2356
|
+
the standalone page no longer renders its own theme button. */
|
|
2346
2357
|
|
|
2347
2358
|
/* ─── Header branding ───────────────────────────────────────────────── */
|
|
2348
2359
|
|
|
@@ -2357,7 +2368,10 @@ body[data-theme="light"] {
|
|
|
2357
2368
|
opacity: 0.7;
|
|
2358
2369
|
}
|
|
2359
2370
|
|
|
2371
|
+
/* `system` defaults to the dark logo (hide the light variant), matching the
|
|
2372
|
+
chrome default above; the `prefers-color-scheme: light` query flips it. */
|
|
2360
2373
|
body[data-theme="dark"] .header-logo.light-logo,
|
|
2374
|
+
body[data-theme="system"] .header-logo.light-logo,
|
|
2361
2375
|
body:not([data-theme]) .header-logo.light-logo {
|
|
2362
2376
|
display: none;
|
|
2363
2377
|
}
|
|
@@ -2379,58 +2393,86 @@ body[data-theme="light"] .header-logo.light-logo {
|
|
|
2379
2393
|
}
|
|
2380
2394
|
}
|
|
2381
2395
|
|
|
2382
|
-
@media (prefers-color-scheme: dark) {
|
|
2383
|
-
body[data-theme="system"] .header-logo.light-logo {
|
|
2384
|
-
display: none;
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
|
|
2388
2396
|
.header-title {
|
|
2389
2397
|
font-size: 12px;
|
|
2390
2398
|
font-weight: 600;
|
|
2391
2399
|
color: var(--chrome-text-muted);
|
|
2392
2400
|
}
|
|
2393
2401
|
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2402
|
+
/* ─── Error screen ──────────────────────────────────────────────────── */
|
|
2403
|
+
|
|
2404
|
+
/* Shown when the embedded config or spec is malformed. Uses explicit colors
|
|
2405
|
+
rather than the `--chrome-*` vars so it stays legible even when the theme
|
|
2406
|
+
parse is the thing that failed. */
|
|
2407
|
+
.standalone-error {
|
|
2408
|
+
display: flex;
|
|
2409
|
+
flex-direction: column;
|
|
2410
|
+
gap: 8px;
|
|
2411
|
+
height: 100%;
|
|
2412
|
+
padding: 24px;
|
|
2413
|
+
overflow: auto;
|
|
2414
|
+
background: #0a0a0f;
|
|
2415
|
+
color: #e2e8f0;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
.standalone-error-title {
|
|
2419
|
+
font-size: 14px;
|
|
2420
|
+
font-weight: 600;
|
|
2421
|
+
color: #ff6b6b;
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
.standalone-error-message {
|
|
2425
|
+
margin: 0;
|
|
2426
|
+
font-family: ui-monospace, "SF Mono", Menlo, monospace;
|
|
2427
|
+
font-size: 12px;
|
|
2428
|
+
line-height: 1.5;
|
|
2429
|
+
white-space: pre-wrap;
|
|
2430
|
+
word-break: break-word;
|
|
2431
|
+
color: #8b949e;
|
|
2432
|
+
}
|
|
2433
|
+
|
|
2434
|
+
</style>
|
|
2435
|
+
</head>
|
|
2436
|
+
<body data-theme="<!--PIPELEX_THEME-->">
|
|
2437
|
+
<div id="app-container">
|
|
2438
|
+
<div class="toolbar">
|
|
2439
|
+
<div class="header-brand">
|
|
2440
|
+
<img src="<!--PIPELEX_LOGO_DARK-->" alt="Pipelex" class="header-logo dark-logo" />
|
|
2441
|
+
<img src="<!--PIPELEX_LOGO_LIGHT-->" alt="Pipelex" class="header-logo light-logo" />
|
|
2442
|
+
<span class="header-title"><!--PIPELEX_TITLE--></span>
|
|
2443
|
+
</div>
|
|
2444
|
+
<div class="toolbar-spacer"></div>
|
|
2445
|
+
<!-- Theme toggle lives in the in-graph toolbar (the library owns the
|
|
2446
|
+
tri-state dark/light/system). The page no longer renders its own. -->
|
|
2447
|
+
</div>
|
|
2448
|
+
<div id="root"></div>
|
|
2403
2449
|
</div>
|
|
2404
|
-
|
|
2405
|
-
<
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
<script type="application/json" id="pipelex-graphspec"><!--PIPELEX_GRAPHSPEC--></script>
|
|
2414
|
-
<script type="application/json" id="pipelex-config"><!--PIPELEX_CONFIG--></script>
|
|
2415
|
-
|
|
2416
|
-
<script nonce="PIPELEX_CSP_NONCE">
|
|
2417
|
-
"use strict";(()=>{var HT=Object.create;var _g=Object.defineProperty;var kT=Object.getOwnPropertyDescriptor;var PT=Object.getOwnPropertyNames;var GT=Object.getPrototypeOf,UT=Object.prototype.hasOwnProperty;var Wt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var IT=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of PT(t))!UT.call(e,i)&&i!==n&&_g(e,i,{get:()=>t[i],enumerable:!(o=kT(t,i))||o.enumerable});return e};var le=(e,t,n)=>(n=e!=null?HT(GT(e)):{},IT(t||!e||!e.__esModule?_g(n,"default",{value:e,enumerable:!0}):n,e));var zg=Wt(pe=>{"use strict";var Qf=Symbol.for("react.transitional.element"),VT=Symbol.for("react.portal"),YT=Symbol.for("react.fragment"),XT=Symbol.for("react.strict_mode"),qT=Symbol.for("react.profiler"),ZT=Symbol.for("react.consumer"),jT=Symbol.for("react.context"),$T=Symbol.for("react.forward_ref"),QT=Symbol.for("react.suspense"),KT=Symbol.for("react.memo"),wg=Symbol.for("react.lazy"),FT=Symbol.for("react.activity"),Eg=Symbol.iterator;function WT(e){return e===null||typeof e!="object"?null:(e=Eg&&e[Eg]||e["@@iterator"],typeof e=="function"?e:null)}var Ag={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dg=Object.assign,Mg={};function Oa(e,t,n){this.props=e,this.context=t,this.refs=Mg,this.updater=n||Ag}Oa.prototype.isReactComponent={};Oa.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")};Oa.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rg(){}Rg.prototype=Oa.prototype;function Kf(e,t,n){this.props=e,this.context=t,this.refs=Mg,this.updater=n||Ag}var Ff=Kf.prototype=new Rg;Ff.constructor=Kf;Dg(Ff,Oa.prototype);Ff.isPureReactComponent=!0;var Tg=Array.isArray;function $f(){}var Ve={H:null,A:null,T:null,S:null},Og=Object.prototype.hasOwnProperty;function Wf(e,t,n){var o=n.ref;return{$$typeof:Qf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function JT(e,t){return Wf(e.type,t,e.props)}function Jf(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qf}function e2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ng=/\/+/g;function jf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?e2(""+e.key):t.toString(36)}function t2(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then($f,$f):(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 Ra(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 Qf:case VT:l=!0;break;case wg:return l=e._init,Ra(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+jf(e,0):o,Tg(i)?(n="",l!=null&&(n=l.replace(Ng,"$&/")+"/"),Ra(i,t,n,"",function(u){return u})):i!=null&&(Jf(i)&&(i=JT(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Ng,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(Tg(e))for(var s=0;s<e.length;s++)o=e[s],a=r+jf(o,s),l+=Ra(o,t,n,a,i);else if(s=WT(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+jf(o,s++),l+=Ra(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return Ra(t2(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 Ws(e,t,n){if(e==null)return e;var o=[],i=0;return Ra(e,o,"","",function(a){return t.call(n,a,i++)}),o}function n2(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 Cg=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)},o2={map:Ws,forEach:function(e,t,n){Ws(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ws(e,function(){t++}),t},toArray:function(e){return Ws(e,function(t){return t})||[]},only:function(e){if(!Jf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Activity=FT;pe.Children=o2;pe.Component=Oa;pe.Fragment=YT;pe.Profiler=qT;pe.PureComponent=Kf;pe.StrictMode=XT;pe.Suspense=QT;pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ve;pe.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ve.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=Dg({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Og.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 Wf(e.type,i,o)};pe.createContext=function(e){return e={$$typeof:jT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:ZT,_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)Og.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 Wf(e,a,i)};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:$T,render:e}};pe.isValidElement=Jf;pe.lazy=function(e){return{$$typeof:wg,_payload:{_status:-1,_result:e},_init:n2}};pe.memo=function(e,t){return{$$typeof:KT,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=Ve.T,n={};Ve.T=n;try{var o=e(),i=Ve.S;i!==null&&i(n,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then($f,Cg)}catch(a){Cg(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ve.T=t}};pe.unstable_useCacheRefresh=function(){return Ve.H.useCacheRefresh()};pe.use=function(e){return Ve.H.use(e)};pe.useActionState=function(e,t,n){return Ve.H.useActionState(e,t,n)};pe.useCallback=function(e,t){return Ve.H.useCallback(e,t)};pe.useContext=function(e){return Ve.H.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e,t){return Ve.H.useDeferredValue(e,t)};pe.useEffect=function(e,t){return Ve.H.useEffect(e,t)};pe.useEffectEvent=function(e){return Ve.H.useEffectEvent(e)};pe.useId=function(){return Ve.H.useId()};pe.useImperativeHandle=function(e,t,n){return Ve.H.useImperativeHandle(e,t,n)};pe.useInsertionEffect=function(e,t){return Ve.H.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Ve.H.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Ve.H.useMemo(e,t)};pe.useOptimistic=function(e,t){return Ve.H.useOptimistic(e,t)};pe.useReducer=function(e,t,n){return Ve.H.useReducer(e,t,n)};pe.useRef=function(e){return Ve.H.useRef(e)};pe.useState=function(e){return Ve.H.useState(e)};pe.useSyncExternalStore=function(e,t,n){return Ve.H.useSyncExternalStore(e,t,n)};pe.useTransition=function(){return Ve.H.useTransition()};pe.version="19.2.4"});var Ht=Wt((fz,Lg)=>{"use strict";Lg.exports=zg()});var Xg=Wt($e=>{"use strict";function od(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<Js(i,t))e[o]=t,e[n]=i,n=o;else break e}}function co(e){return e.length===0?null:e[0]}function tu(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>Js(r,n))s<i&&0>Js(u,r)?(e[o]=u,e[s]=n,o=s):(e[o]=r,e[l]=n,o=l);else if(s<i&&0>Js(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function Js(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}$e.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Bg=performance,$e.unstable_now=function(){return Bg.now()}):(ed=Date,Hg=ed.now(),$e.unstable_now=function(){return ed.now()-Hg});var Bg,ed,Hg,Ao=[],ai=[],i2=1,zn=null,kt=3,id=!1,ar=!1,lr=!1,ad=!1,Gg=typeof setTimeout=="function"?setTimeout:null,Ug=typeof clearTimeout=="function"?clearTimeout:null,kg=typeof setImmediate<"u"?setImmediate:null;function eu(e){for(var t=co(ai);t!==null;){if(t.callback===null)tu(ai);else if(t.startTime<=e)tu(ai),t.sortIndex=t.expirationTime,od(Ao,t);else break;t=co(ai)}}function ld(e){if(lr=!1,eu(e),!ar)if(co(Ao)!==null)ar=!0,La||(La=!0,za());else{var t=co(ai);t!==null&&rd(ld,t.startTime-e)}}var La=!1,rr=-1,Ig=5,Vg=-1;function Yg(){return ad?!0:!($e.unstable_now()-Vg<Ig)}function td(){if(ad=!1,La){var e=$e.unstable_now();Vg=e;var t=!0;try{e:{ar=!1,lr&&(lr=!1,Ug(rr),rr=-1),id=!0;var n=kt;try{t:{for(eu(e),zn=co(Ao);zn!==null&&!(zn.expirationTime>e&&Yg());){var o=zn.callback;if(typeof o=="function"){zn.callback=null,kt=zn.priorityLevel;var i=o(zn.expirationTime<=e);if(e=$e.unstable_now(),typeof i=="function"){zn.callback=i,eu(e),t=!0;break t}zn===co(Ao)&&tu(Ao),eu(e)}else tu(Ao);zn=co(Ao)}if(zn!==null)t=!0;else{var a=co(ai);a!==null&&rd(ld,a.startTime-e),t=!1}}break e}finally{zn=null,kt=n,id=!1}t=void 0}}finally{t?za():La=!1}}}var za;typeof kg=="function"?za=function(){kg(td)}:typeof MessageChannel<"u"?(nd=new MessageChannel,Pg=nd.port2,nd.port1.onmessage=td,za=function(){Pg.postMessage(null)}):za=function(){Gg(td,0)};var nd,Pg;function rd(e,t){rr=Gg(function(){e($e.unstable_now())},t)}$e.unstable_IdlePriority=5;$e.unstable_ImmediatePriority=1;$e.unstable_LowPriority=4;$e.unstable_NormalPriority=3;$e.unstable_Profiling=null;$e.unstable_UserBlockingPriority=2;$e.unstable_cancelCallback=function(e){e.callback=null};$e.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"):Ig=0<e?Math.floor(1e3/e):5};$e.unstable_getCurrentPriorityLevel=function(){return kt};$e.unstable_next=function(e){switch(kt){case 1:case 2:case 3:var t=3;break;default:t=kt}var n=kt;kt=t;try{return e()}finally{kt=n}};$e.unstable_requestPaint=function(){ad=!0};$e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=kt;kt=e;try{return t()}finally{kt=n}};$e.unstable_scheduleCallback=function(e,t,n){var o=$e.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:i2++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,od(ai,e),co(Ao)===null&&e===co(ai)&&(lr?(Ug(rr),rr=-1):lr=!0,rd(ld,n-o))):(e.sortIndex=i,od(Ao,e),ar||id||(ar=!0,La||(La=!0,za()))),e};$e.unstable_shouldYield=Yg;$e.unstable_wrapCallback=function(e){var t=kt;return function(){var n=kt;kt=t;try{return e.apply(this,arguments)}finally{kt=n}}}});var Zg=Wt((pz,qg)=>{"use strict";qg.exports=Xg()});var $g=Wt(Vt=>{"use strict";var a2=Ht();function jg(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 li(){}var It={d:{f:li,r:function(){throw Error(jg(522))},D:li,C:li,L:li,m:li,X:li,S:li,M:li},p:0,findDOMNode:null},l2=Symbol.for("react.portal");function r2(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l2,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var sr=a2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function nu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=It;Vt.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(jg(299));return r2(e,t,null,n)};Vt.flushSync=function(e){var t=sr.T,n=It.p;try{if(sr.T=null,It.p=2,e)return e()}finally{sr.T=t,It.p=n,It.d.f()}};Vt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,It.d.C(e,t))};Vt.prefetchDNS=function(e){typeof e=="string"&&It.d.D(e)};Vt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=nu(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?It.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&It.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Vt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=nu(t.as,t.crossOrigin);It.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&&It.d.M(e)};Vt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=nu(n,t.crossOrigin);It.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})}};Vt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=nu(t.as,t.crossOrigin);It.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 It.d.m(e)};Vt.requestFormReset=function(e){It.d.r(e)};Vt.unstable_batchedUpdates=function(e,t){return e(t)};Vt.useFormState=function(e,t,n){return sr.H.useFormState(e,t,n)};Vt.useFormStatus=function(){return sr.H.useHostTransitionStatus()};Vt.version="19.2.4"});var sd=Wt((hz,Kg)=>{"use strict";function Qg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qg)}catch(e){console.error(e)}}Qg(),Kg.exports=$g()});var s1=Wt(wc=>{"use strict";var ht=Zg(),_0=Ht(),s2=sd();function G(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 E0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $r(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 T0(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 N0(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 Fg(e){if($r(e)!==e)throw Error(G(188))}function u2(e){var t=e.alternate;if(!t){if(t=$r(e),t===null)throw Error(G(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 Fg(i),e;if(a===o)return Fg(i),t;a=a.sibling}throw Error(G(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(G(189))}}if(n.alternate!==o)throw Error(G(190))}if(n.tag!==3)throw Error(G(188));return n.stateNode.current===n?e:t}function C0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=C0(e),t!==null)return t;e=e.sibling}return null}var qe=Object.assign,c2=Symbol.for("react.element"),ou=Symbol.for("react.transitional.element"),gr=Symbol.for("react.portal"),Ua=Symbol.for("react.fragment"),w0=Symbol.for("react.strict_mode"),Vd=Symbol.for("react.profiler"),A0=Symbol.for("react.consumer"),Ho=Symbol.for("react.context"),kp=Symbol.for("react.forward_ref"),Yd=Symbol.for("react.suspense"),Xd=Symbol.for("react.suspense_list"),Pp=Symbol.for("react.memo"),ri=Symbol.for("react.lazy"),qd=Symbol.for("react.activity"),f2=Symbol.for("react.memo_cache_sentinel"),Wg=Symbol.iterator;function ur(e){return e===null||typeof e!="object"?null:(e=Wg&&e[Wg]||e["@@iterator"],typeof e=="function"?e:null)}var d2=Symbol.for("react.client.reference");function Zd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===d2?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ua:return"Fragment";case Vd:return"Profiler";case w0:return"StrictMode";case Yd:return"Suspense";case Xd:return"SuspenseList";case qd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case gr:return"Portal";case Ho:return e.displayName||"Context";case A0:return(e._context.displayName||"Context")+".Consumer";case kp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pp:return t=e.displayName||null,t!==null?t:Zd(e.type)||"Memo";case ri:t=e._payload,e=e._init;try{return Zd(e(t))}catch{}}return null}var yr=Array.isArray,ce=_0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Me=s2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Fi={pending:!1,data:null,method:null,action:null},jd=[],Ia=-1;function go(e){return{current:e}}function Et(e){0>Ia||(e.current=jd[Ia],jd[Ia]=null,Ia--)}function Ge(e,t){Ia++,jd[Ia]=e.current,e.current=t}var ho=go(null),Lr=go(null),vi=go(null),Hu=go(null);function ku(e,t){switch(Ge(vi,t),Ge(Lr,e),Ge(ho,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?a0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=a0(t),e=$b(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Et(ho),Ge(ho,e)}function al(){Et(ho),Et(Lr),Et(vi)}function $d(e){e.memoizedState!==null&&Ge(Hu,e);var t=ho.current,n=$b(t,e.type);t!==n&&(Ge(Lr,e),Ge(ho,n))}function Pu(e){Lr.current===e&&(Et(ho),Et(Lr)),Hu.current===e&&(Et(Hu),qr._currentValue=Fi)}var ud,Jg;function ji(e){if(ud===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ud=t&&t[1]||"",Jg=-1<n.stack.indexOf(`
|
|
2450
|
+
|
|
2451
|
+
<script type="application/json" id="pipelex-graphspec">
|
|
2452
|
+
<!--PIPELEX_GRAPHSPEC-->
|
|
2453
|
+
</script>
|
|
2454
|
+
<script type="application/json" id="pipelex-config">
|
|
2455
|
+
<!--PIPELEX_CONFIG-->
|
|
2456
|
+
</script>
|
|
2457
|
+
|
|
2458
|
+
<script nonce="PIPELEX_CSP_NONCE">
|
|
2459
|
+
"use strict";(()=>{var YT=Object.create;var Ng=Object.defineProperty;var XT=Object.getOwnPropertyDescriptor;var qT=Object.getOwnPropertyNames;var ZT=Object.getPrototypeOf,jT=Object.prototype.hasOwnProperty;var en=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var $T=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qT(t))!jT.call(e,i)&&i!==n&&Ng(e,i,{get:()=>t[i],enumerable:!(o=XT(t,i))||o.enumerable});return e};var oe=(e,t,n)=>(n=e!=null?YT(ZT(e)):{},$T(t||!e||!e.__esModule?Ng(n,"default",{value:e,enumerable:!0}):n,e));var Bg=en(pe=>{"use strict";var Qf=Symbol.for("react.transitional.element"),KT=Symbol.for("react.portal"),QT=Symbol.for("react.fragment"),FT=Symbol.for("react.strict_mode"),WT=Symbol.for("react.profiler"),JT=Symbol.for("react.consumer"),e2=Symbol.for("react.context"),t2=Symbol.for("react.forward_ref"),n2=Symbol.for("react.suspense"),o2=Symbol.for("react.memo"),Dg=Symbol.for("react.lazy"),i2=Symbol.for("react.activity"),Cg=Symbol.iterator;function a2(e){return e===null||typeof e!="object"?null:(e=Cg&&e[Cg]||e["@@iterator"],typeof e=="function"?e:null)}var Rg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Og=Object.assign,zg={};function Ha(e,t,n){this.props=e,this.context=t,this.refs=zg,this.updater=n||Rg}Ha.prototype.isReactComponent={};Ha.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")};Ha.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Lg(){}Lg.prototype=Ha.prototype;function Ff(e,t,n){this.props=e,this.context=t,this.refs=zg,this.updater=n||Rg}var Wf=Ff.prototype=new Lg;Wf.constructor=Ff;Og(Wf,Ha.prototype);Wf.isPureReactComponent=!0;var wg=Array.isArray;function Kf(){}var Ye={H:null,A:null,T:null,S:null},Hg=Object.prototype.hasOwnProperty;function Jf(e,t,n){var o=n.ref;return{$$typeof:Qf,type:e,key:t,ref:o!==void 0?o:null,props:n}}function l2(e,t){return Jf(e.type,t,e.props)}function ed(e){return typeof e=="object"&&e!==null&&e.$$typeof===Qf}function r2(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ag=/\/+/g;function $f(e,t){return typeof e=="object"&&e!==null&&e.key!=null?r2(""+e.key):t.toString(36)}function s2(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 La(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 Qf:case KT:l=!0;break;case Dg:return l=e._init,La(l(e._payload),t,n,o,i)}}if(l)return i=i(e),l=o===""?"."+$f(e,0):o,wg(i)?(n="",l!=null&&(n=l.replace(Ag,"$&/")+"/"),La(i,t,n,"",function(u){return u})):i!=null&&(ed(i)&&(i=l2(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(Ag,"$&/")+"/")+l)),t.push(i)),1;l=0;var r=o===""?".":o+":";if(wg(e))for(var s=0;s<e.length;s++)o=e[s],a=r+$f(o,s),l+=La(o,t,n,a,i);else if(s=a2(e),typeof s=="function")for(e=s.call(e),s=0;!(o=e.next()).done;)o=o.value,a=r+$f(o,s++),l+=La(o,t,n,a,i);else if(a==="object"){if(typeof e.then=="function")return La(s2(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 eu(e,t,n){if(e==null)return e;var o=[],i=0;return La(e,o,"","",function(a){return t.call(n,a,i++)}),o}function u2(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)},c2={map:eu,forEach:function(e,t,n){eu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return eu(e,function(){t++}),t},toArray:function(e){return eu(e,function(t){return t})||[]},only:function(e){if(!ed(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Activity=i2;pe.Children=c2;pe.Component=Ha;pe.Fragment=QT;pe.Profiler=WT;pe.PureComponent=Ff;pe.StrictMode=FT;pe.Suspense=n2;pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ye;pe.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ye.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=Og({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)!Hg.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 Jf(e.type,i,o)};pe.createContext=function(e){return e={$$typeof:e2,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:JT,_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)Hg.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 Jf(e,a,i)};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:t2,render:e}};pe.isValidElement=ed;pe.lazy=function(e){return{$$typeof:Dg,_payload:{_status:-1,_result:e},_init:u2}};pe.memo=function(e,t){return{$$typeof:o2,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=Ye.T,n={};Ye.T=n;try{var o=e(),i=Ye.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),Ye.T=t}};pe.unstable_useCacheRefresh=function(){return Ye.H.useCacheRefresh()};pe.use=function(e){return Ye.H.use(e)};pe.useActionState=function(e,t,n){return Ye.H.useActionState(e,t,n)};pe.useCallback=function(e,t){return Ye.H.useCallback(e,t)};pe.useContext=function(e){return Ye.H.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e,t){return Ye.H.useDeferredValue(e,t)};pe.useEffect=function(e,t){return Ye.H.useEffect(e,t)};pe.useEffectEvent=function(e){return Ye.H.useEffectEvent(e)};pe.useId=function(){return Ye.H.useId()};pe.useImperativeHandle=function(e,t,n){return Ye.H.useImperativeHandle(e,t,n)};pe.useInsertionEffect=function(e,t){return Ye.H.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Ye.H.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Ye.H.useMemo(e,t)};pe.useOptimistic=function(e,t){return Ye.H.useOptimistic(e,t)};pe.useReducer=function(e,t,n){return Ye.H.useReducer(e,t,n)};pe.useRef=function(e){return Ye.H.useRef(e)};pe.useState=function(e){return Ye.H.useState(e)};pe.useSyncExternalStore=function(e,t,n){return Ye.H.useSyncExternalStore(e,t,n)};pe.useTransition=function(){return Ye.H.useTransition()};pe.version="19.2.4"});var wt=en((Tz,kg)=>{"use strict";kg.exports=Bg()});var jg=en($e=>{"use strict";function id(e,t){var n=e.length;e.push(t);e:for(;0<n;){var o=n-1>>>1,i=e[o];if(0<tu(i,t))e[o]=t,e[n]=i,n=o;else break e}}function fo(e){return e.length===0?null:e[0]}function ou(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>tu(r,n))s<i&&0>tu(u,r)?(e[o]=u,e[s]=n,o=s):(e[o]=r,e[l]=n,o=l);else if(s<i&&0>tu(u,n))e[o]=u,e[s]=n,o=s;else break e}}return t}function tu(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}$e.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Gg=performance,$e.unstable_now=function(){return Gg.now()}):(td=Date,Pg=td.now(),$e.unstable_now=function(){return td.now()-Pg});var Gg,td,Pg,Ro=[],ri=[],f2=1,Ln=null,kt=3,ad=!1,sr=!1,ur=!1,ld=!1,Vg=typeof setTimeout=="function"?setTimeout:null,Yg=typeof clearTimeout=="function"?clearTimeout:null,Ug=typeof setImmediate<"u"?setImmediate:null;function nu(e){for(var t=fo(ri);t!==null;){if(t.callback===null)ou(ri);else if(t.startTime<=e)ou(ri),t.sortIndex=t.expirationTime,id(Ro,t);else break;t=fo(ri)}}function rd(e){if(ur=!1,nu(e),!sr)if(fo(Ro)!==null)sr=!0,ka||(ka=!0,Ba());else{var t=fo(ri);t!==null&&sd(rd,t.startTime-e)}}var ka=!1,cr=-1,Xg=5,qg=-1;function Zg(){return ld?!0:!($e.unstable_now()-qg<Xg)}function nd(){if(ld=!1,ka){var e=$e.unstable_now();qg=e;var t=!0;try{e:{sr=!1,ur&&(ur=!1,Yg(cr),cr=-1),ad=!0;var n=kt;try{t:{for(nu(e),Ln=fo(Ro);Ln!==null&&!(Ln.expirationTime>e&&Zg());){var o=Ln.callback;if(typeof o=="function"){Ln.callback=null,kt=Ln.priorityLevel;var i=o(Ln.expirationTime<=e);if(e=$e.unstable_now(),typeof i=="function"){Ln.callback=i,nu(e),t=!0;break t}Ln===fo(Ro)&&ou(Ro),nu(e)}else ou(Ro);Ln=fo(Ro)}if(Ln!==null)t=!0;else{var a=fo(ri);a!==null&&sd(rd,a.startTime-e),t=!1}}break e}finally{Ln=null,kt=n,ad=!1}t=void 0}}finally{t?Ba():ka=!1}}}var Ba;typeof Ug=="function"?Ba=function(){Ug(nd)}:typeof MessageChannel<"u"?(od=new MessageChannel,Ig=od.port2,od.port1.onmessage=nd,Ba=function(){Ig.postMessage(null)}):Ba=function(){Vg(nd,0)};var od,Ig;function sd(e,t){cr=Vg(function(){e($e.unstable_now())},t)}$e.unstable_IdlePriority=5;$e.unstable_ImmediatePriority=1;$e.unstable_LowPriority=4;$e.unstable_NormalPriority=3;$e.unstable_Profiling=null;$e.unstable_UserBlockingPriority=2;$e.unstable_cancelCallback=function(e){e.callback=null};$e.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"):Xg=0<e?Math.floor(1e3/e):5};$e.unstable_getCurrentPriorityLevel=function(){return kt};$e.unstable_next=function(e){switch(kt){case 1:case 2:case 3:var t=3;break;default:t=kt}var n=kt;kt=t;try{return e()}finally{kt=n}};$e.unstable_requestPaint=function(){ld=!0};$e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=kt;kt=e;try{return t()}finally{kt=n}};$e.unstable_scheduleCallback=function(e,t,n){var o=$e.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:f2++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>o?(e.sortIndex=n,id(ri,e),fo(Ro)===null&&e===fo(ri)&&(ur?(Yg(cr),cr=-1):ur=!0,sd(rd,n-o))):(e.sortIndex=i,id(Ro,e),sr||ad||(sr=!0,ka||(ka=!0,Ba()))),e};$e.unstable_shouldYield=Zg;$e.unstable_wrapCallback=function(e){var t=kt;return function(){var n=kt;kt=t;try{return e.apply(this,arguments)}finally{kt=n}}}});var Kg=en((Cz,$g)=>{"use strict";$g.exports=jg()});var Fg=en(Yt=>{"use strict";var d2=wt();function Qg(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 si(){}var Vt={d:{f:si,r:function(){throw Error(Qg(522))},D:si,C:si,L:si,m:si,X:si,S:si,M:si},p:0,findDOMNode:null},p2=Symbol.for("react.portal");function m2(e,t,n){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p2,key:o==null?null:""+o,children:e,containerInfo:t,implementation:n}}var fr=d2.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function iu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Vt;Yt.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(Qg(299));return m2(e,t,null,n)};Yt.flushSync=function(e){var t=fr.T,n=Vt.p;try{if(fr.T=null,Vt.p=2,e)return e()}finally{fr.T=t,Vt.p=n,Vt.d.f()}};Yt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Vt.d.C(e,t))};Yt.prefetchDNS=function(e){typeof e=="string"&&Vt.d.D(e)};Yt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,o=iu(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Vt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:i,fetchPriority:a}):n==="script"&&Vt.d.X(e,{crossOrigin:o,integrity:i,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Yt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=iu(t.as,t.crossOrigin);Vt.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&&Vt.d.M(e)};Yt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,o=iu(n,t.crossOrigin);Vt.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})}};Yt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=iu(t.as,t.crossOrigin);Vt.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 Vt.d.m(e)};Yt.requestFormReset=function(e){Vt.d.r(e)};Yt.unstable_batchedUpdates=function(e,t){return e(t)};Yt.useFormState=function(e,t,n){return fr.H.useFormState(e,t,n)};Yt.useFormStatus=function(){return fr.H.useHostTransitionStatus()};Yt.version="19.2.4"});var ud=en((Az,Jg)=>{"use strict";function Wg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Wg)}catch(e){console.error(e)}}Wg(),Jg.exports=Fg()});var f1=en(Mc=>{"use strict";var gt=Kg(),N0=wt(),h2=ud();function U(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 C0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fr(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 w0(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 A0(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 ey(e){if(Fr(e)!==e)throw Error(U(188))}function g2(e){var t=e.alternate;if(!t){if(t=Fr(e),t===null)throw Error(U(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 ey(i),e;if(a===o)return ey(i),t;a=a.sibling}throw Error(U(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(U(189))}}if(n.alternate!==o)throw Error(U(190))}if(n.tag!==3)throw Error(U(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 Ze=Object.assign,y2=Symbol.for("react.element"),au=Symbol.for("react.transitional.element"),br=Symbol.for("react.portal"),Ya=Symbol.for("react.fragment"),D0=Symbol.for("react.strict_mode"),Yd=Symbol.for("react.profiler"),R0=Symbol.for("react.consumer"),Po=Symbol.for("react.context"),Gp=Symbol.for("react.forward_ref"),Xd=Symbol.for("react.suspense"),qd=Symbol.for("react.suspense_list"),Pp=Symbol.for("react.memo"),ui=Symbol.for("react.lazy"),Zd=Symbol.for("react.activity"),v2=Symbol.for("react.memo_cache_sentinel"),ty=Symbol.iterator;function dr(e){return e===null||typeof e!="object"?null:(e=ty&&e[ty]||e["@@iterator"],typeof e=="function"?e:null)}var b2=Symbol.for("react.client.reference");function jd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===b2?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ya:return"Fragment";case Yd:return"Profiler";case D0:return"StrictMode";case Xd:return"Suspense";case qd:return"SuspenseList";case Zd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case br:return"Portal";case Po:return e.displayName||"Context";case R0:return(e._context.displayName||"Context")+".Consumer";case Gp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Pp:return t=e.displayName||null,t!==null?t:jd(e.type)||"Memo";case ui:t=e._payload,e=e._init;try{return jd(e(t))}catch{}}return null}var Sr=Array.isArray,ue=N0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Re=h2.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Fi={pending:!1,data:null,method:null,action:null},$d=[],Xa=-1;function yo(e){return{current:e}}function Et(e){0>Xa||(e.current=$d[Xa],$d[Xa]=null,Xa--)}function Ie(e,t){Xa++,$d[Xa]=e.current,e.current=t}var go=yo(null),kr=yo(null),Si=yo(null),Gu=yo(null);function Pu(e,t){switch(Ie(Si,t),Ie(kr,e),Ie(go,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?s0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=s0(t),e=Fb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Et(go),Ie(go,e)}function sl(){Et(go),Et(kr),Et(Si)}function Kd(e){e.memoizedState!==null&&Ie(Gu,e);var t=go.current,n=Fb(t,e.type);t!==n&&(Ie(kr,e),Ie(go,n))}function Uu(e){kr.current===e&&(Et(go),Et(kr)),Gu.current===e&&(Et(Gu),$r._currentValue=Fi)}var cd,ny;function ji(e){if(cd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);cd=t&&t[1]||"",ny=-1<n.stack.indexOf(`
|
|
2418
2460
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
2419
|
-
`+
|
|
2461
|
+
`+cd+e+ny}var fd=!1;function dd(e,t){if(!e||fd)return"";fd=!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(`
|
|
2420
2462
|
`),u=r.split(`
|
|
2421
2463
|
`);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=`
|
|
2422
|
-
`+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{
|
|
2464
|
+
`+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{fd=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ji(n):""}function S2(e,t){switch(e.tag){case 26:case 27:case 5:return ji(e.type);case 16:return ji("Lazy");case 13:return e.child!==t&&t!==null?ji("Suspense Fallback"):ji("Suspense");case 19:return ji("SuspenseList");case 0:case 15:return dd(e.type,!1);case 11:return dd(e.type.render,!1);case 1:return dd(e.type,!0);case 31:return ji("Activity");default:return""}}function oy(e){try{var t="",n=null;do t+=S2(e,n),n=e,e=e.return;while(e);return t}catch(o){return`
|
|
2423
2465
|
Error generating stack: `+o.message+`
|
|
2424
|
-
`+o.stack}}var Qd=Object.prototype.hasOwnProperty,Gp=ht.unstable_scheduleCallback,dd=ht.unstable_cancelCallback,m2=ht.unstable_shouldYield,h2=ht.unstable_requestPaint,vn=ht.unstable_now,g2=ht.unstable_getCurrentPriorityLevel,D0=ht.unstable_ImmediatePriority,M0=ht.unstable_UserBlockingPriority,Gu=ht.unstable_NormalPriority,y2=ht.unstable_LowPriority,R0=ht.unstable_IdlePriority,v2=ht.log,b2=ht.unstable_setDisableYieldValue,Qr=null,bn=null;function pi(e){if(typeof v2=="function"&&b2(e),bn&&typeof bn.setStrictMode=="function")try{bn.setStrictMode(Qr,e)}catch{}}var xn=Math.clz32?Math.clz32:_2,x2=Math.log,S2=Math.LN2;function _2(e){return e>>>=0,e===0?32:31-(x2(e)/S2|0)|0}var iu=256,au=262144,lu=4194304;function $i(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 fc(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=$i(o):(l&=r,l!==0?i=$i(l):n||(n=r&~e,n!==0&&(i=$i(n))))):(r=o&~a,r!==0?i=$i(r):l!==0?i=$i(l):n||(n=o&~e,n!==0&&(i=$i(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 Kr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function E2(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 O0(){var e=lu;return lu<<=1,(lu&62914560)===0&&(lu=4194304),e}function pd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T2(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-xn(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&&z0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function z0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-xn(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function L0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-xn(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function B0(e,t){var n=t&-t;return n=(n&42)!==0?1:Up(n),(n&(e.suspendedLanes|t))!==0?0:n}function Up(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 Ip(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function H0(){var e=Me.p;return e!==0?e:(e=window.event,e===void 0?32:a1(e.type))}function ty(e,t){var n=Me.p;try{return Me.p=e,t()}finally{Me.p=n}}var Ri=Math.random().toString(36).slice(2),wt="__reactFiber$"+Ri,an="__reactProps$"+Ri,gl="__reactContainer$"+Ri,Kd="__reactEvents$"+Ri,N2="__reactListeners$"+Ri,C2="__reactHandles$"+Ri,ny="__reactResources$"+Ri,Wr="__reactMarker$"+Ri;function Vp(e){delete e[wt],delete e[an],delete e[Kd],delete e[N2],delete e[C2]}function Va(e){var t=e[wt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[gl]||n[wt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=c0(e);e!==null;){if(n=e[wt])return n;e=c0(e)}return t}e=n,n=e.parentNode}return null}function yl(e){if(e=e[wt]||e[gl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(G(33))}function Wa(e){var t=e[ny];return t||(t=e[ny]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Wr]=!0}var k0=new Set,P0={};function ra(e,t){ll(e,t),ll(e+"Capture",t)}function ll(e,t){for(P0[e]=t,e=0;e<t.length;e++)k0.add(t[e])}var w2=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]*$"),oy={},iy={};function A2(e){return Qd.call(iy,e)?!0:Qd.call(oy,e)?!1:w2.test(e)?iy[e]=!0:(oy[e]=!0,!1)}function Su(e,t,n){if(A2(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 ru(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 Do(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 Bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function G0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function D2(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 Fd(e){if(!e._valueTracker){var t=G0(e)?"checked":"value";e._valueTracker=D2(e,t,""+e[t])}}function U0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=G0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Uu(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 M2=/[\n"\\]/g;function Pn(e){return e.replace(M2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wd(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=""+Bn(t)):e.value!==""+Bn(t)&&(e.value=""+Bn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Jd(e,l,Bn(t)):n!=null?Jd(e,l,Bn(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=""+Bn(r):e.removeAttribute("name")}function I0(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)){Fd(e);return}n=n!=null?""+Bn(n):"",t=t!=null?""+Bn(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),Fd(e)}function Jd(e,t,n){t==="number"&&Uu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ja(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=""+Bn(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 V0(e,t,n){if(t!=null&&(t=""+Bn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Bn(n):""}function Y0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(G(92));if(yr(o)){if(1<o.length)throw Error(G(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=Bn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Fd(e)}function rl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var R2=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 ay(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||R2.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function X0(e,t,n){if(t!=null&&typeof t!="object")throw Error(G(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&&ay(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&ay(e,a,t[a])}function Yp(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 O2=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"]]),z2=/^[\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 _u(e){return z2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ko(){}var ep=null;function Xp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ya=null,el=null;function ly(e){var t=yl(e);if(t&&(e=t.stateNode)){var n=e[an]||null;e:switch(e=t.stateNode,t.type){case"input":if(Wd(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="'+Pn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[an]||null;if(!i)throw Error(G(90));Wd(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&&U0(o)}break e;case"textarea":V0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ja(e,!!n.multiple,t,!1)}}}var md=!1;function q0(e,t,n){if(md)return e(t,n);md=!0;try{var o=e(t);return o}finally{if(md=!1,(Ya!==null||el!==null)&&(Ec(),Ya&&(t=Ya,e=el,el=Ya=null,ly(t),e)))for(t=0;t<e.length;t++)ly(e[t])}}function Br(e,t){var n=e.stateNode;if(n===null)return null;var o=n[an]||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(G(231,t,typeof n));return n}var Vo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tp=!1;if(Vo)try{Ba={},Object.defineProperty(Ba,"passive",{get:function(){tp=!0}}),window.addEventListener("test",Ba,Ba),window.removeEventListener("test",Ba,Ba)}catch{tp=!1}var Ba,mi=null,qp=null,Eu=null;function Z0(){if(Eu)return Eu;var e,t=qp,n=t.length,o,i="value"in mi?mi.value:mi.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 Eu=i.slice(e,1<o?1-o:void 0)}function Tu(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 su(){return!0}function ry(){return!1}function ln(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)?su:ry,this.isPropagationStopped=ry,this}return qe(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=su)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=su)},persist:function(){},isPersistent:su}),t}var sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dc=ln(sa),Jr=qe({},sa,{view:0,detail:0}),L2=ln(Jr),hd,gd,cr,pc=qe({},Jr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zp,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!==cr&&(cr&&e.type==="mousemove"?(hd=e.screenX-cr.screenX,gd=e.screenY-cr.screenY):gd=hd=0,cr=e),hd)},movementY:function(e){return"movementY"in e?e.movementY:gd}}),sy=ln(pc),B2=qe({},pc,{dataTransfer:0}),H2=ln(B2),k2=qe({},Jr,{relatedTarget:0}),yd=ln(k2),P2=qe({},sa,{animationName:0,elapsedTime:0,pseudoElement:0}),G2=ln(P2),U2=qe({},sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),I2=ln(U2),V2=qe({},sa,{data:0}),uy=ln(V2),Y2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X2={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"},q2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=q2[e])?!!t[e]:!1}function Zp(){return Z2}var j2=qe({},Jr,{key:function(e){if(e.key){var t=Y2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Tu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?X2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zp,charCode:function(e){return e.type==="keypress"?Tu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Tu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$2=ln(j2),Q2=qe({},pc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cy=ln(Q2),K2=qe({},Jr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zp}),F2=ln(K2),W2=qe({},sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),J2=ln(W2),eN=qe({},pc,{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}),tN=ln(eN),nN=qe({},sa,{newState:0,oldState:0}),oN=ln(nN),iN=[9,13,27,32],jp=Vo&&"CompositionEvent"in window,Sr=null;Vo&&"documentMode"in document&&(Sr=document.documentMode);var aN=Vo&&"TextEvent"in window&&!Sr,j0=Vo&&(!jp||Sr&&8<Sr&&11>=Sr),fy=" ",dy=!1;function $0(e,t){switch(e){case"keyup":return iN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Q0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xa=!1;function lN(e,t){switch(e){case"compositionend":return Q0(t);case"keypress":return t.which!==32?null:(dy=!0,fy);case"textInput":return e=t.data,e===fy&&dy?null:e;default:return null}}function rN(e,t){if(Xa)return e==="compositionend"||!jp&&$0(e,t)?(e=Z0(),Eu=qp=mi=null,Xa=!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 j0&&t.locale!=="ko"?null:t.data;default:return null}}var sN={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 py(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sN[e.type]:t==="textarea"}function K0(e,t,n,o){Ya?el?el.push(o):el=[o]:Ya=o,t=ic(t,"onChange"),0<t.length&&(n=new dc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var _r=null,Hr=null;function uN(e){qb(e,0)}function mc(e){var t=vr(e);if(U0(t))return e}function my(e,t){if(e==="change")return t}var F0=!1;Vo&&(Vo?(cu="oninput"in document,cu||(vd=document.createElement("div"),vd.setAttribute("oninput","return;"),cu=typeof vd.oninput=="function"),uu=cu):uu=!1,F0=uu&&(!document.documentMode||9<document.documentMode));var uu,cu,vd;function hy(){_r&&(_r.detachEvent("onpropertychange",W0),Hr=_r=null)}function W0(e){if(e.propertyName==="value"&&mc(Hr)){var t=[];K0(t,Hr,e,Xp(e)),q0(uN,t)}}function cN(e,t,n){e==="focusin"?(hy(),_r=t,Hr=n,_r.attachEvent("onpropertychange",W0)):e==="focusout"&&hy()}function fN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mc(Hr)}function dN(e,t){if(e==="click")return mc(t)}function pN(e,t){if(e==="input"||e==="change")return mc(t)}function mN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _n=typeof Object.is=="function"?Object.is:mN;function kr(e,t){if(_n(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(!Qd.call(t,i)||!_n(e[i],t[i]))return!1}return!0}function gy(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yy(e,t){var n=gy(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=gy(n)}}function J0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?J0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ev(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Uu(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=Uu(e.document)}return t}function $p(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 hN=Vo&&"documentMode"in document&&11>=document.documentMode,qa=null,np=null,Er=null,op=!1;function vy(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;op||qa==null||qa!==Uu(o)||(o=qa,"selectionStart"in o&&$p(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}),Er&&kr(Er,o)||(Er=o,o=ic(np,"onSelect"),0<o.length&&(t=new dc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=qa)))}function Zi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Za={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")},bd={},tv={};Vo&&(tv=document.createElement("div").style,"AnimationEvent"in window||(delete Za.animationend.animation,delete Za.animationiteration.animation,delete Za.animationstart.animation),"TransitionEvent"in window||delete Za.transitionend.transition);function ua(e){if(bd[e])return bd[e];if(!Za[e])return e;var t=Za[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in tv)return bd[e]=t[n];return e}var nv=ua("animationend"),ov=ua("animationiteration"),iv=ua("animationstart"),gN=ua("transitionrun"),yN=ua("transitionstart"),vN=ua("transitioncancel"),av=ua("transitionend"),lv=new Map,ip="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(" ");ip.push("scrollEnd");function Wn(e,t){lv.set(e,t),ra(t,[e])}var Iu=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)},Ln=[],ja=0,Qp=0;function hc(){for(var e=ja,t=Qp=ja=0;t<e;){var n=Ln[t];Ln[t++]=null;var o=Ln[t];Ln[t++]=null;var i=Ln[t];Ln[t++]=null;var a=Ln[t];if(Ln[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&&rv(n,i,a)}}function gc(e,t,n,o){Ln[ja++]=e,Ln[ja++]=t,Ln[ja++]=n,Ln[ja++]=o,Qp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Kp(e,t,n,o){return gc(e,t,n,o),Vu(e)}function ca(e,t){return gc(e,null,null,t),Vu(e)}function rv(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-xn(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function Vu(e){if(50<Or)throw Or=0,Np=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var $a={};function bN(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 gn(e,t,n,o){return new bN(e,t,n,o)}function Fp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Go(e,t){var n=e.alternate;return n===null?(n=gn(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 sv(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 Nu(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")Fp(e)&&(l=1);else if(typeof e=="string")l=_C(e,n,ho.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case qd:return e=gn(31,n,t,i),e.elementType=qd,e.lanes=a,e;case Ua:return Wi(n.children,i,a,t);case w0:l=8,i|=24;break;case Vd:return e=gn(12,n,t,i|2),e.elementType=Vd,e.lanes=a,e;case Yd:return e=gn(13,n,t,i),e.elementType=Yd,e.lanes=a,e;case Xd:return e=gn(19,n,t,i),e.elementType=Xd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ho:l=10;break e;case A0:l=9;break e;case kp:l=11;break e;case Pp:l=14;break e;case ri:l=16,o=null;break e}l=29,n=Error(G(130,e===null?"null":typeof e,"")),o=null}return t=gn(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function Wi(e,t,n,o){return e=gn(7,e,o,t),e.lanes=n,e}function xd(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function uv(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function Sd(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var by=new WeakMap;function Gn(e,t){if(typeof e=="object"&&e!==null){var n=by.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ey(t)},by.set(e,t),t)}return{value:e,source:t,stack:ey(t)}}var Qa=[],Ka=0,Yu=null,Pr=0,Hn=[],kn=0,wi=null,fo=1,po="";function Lo(e,t){Qa[Ka++]=Pr,Qa[Ka++]=Yu,Yu=e,Pr=t}function cv(e,t,n){Hn[kn++]=fo,Hn[kn++]=po,Hn[kn++]=wi,wi=e;var o=fo;e=po;var i=32-xn(o)-1;o&=~(1<<i),n+=1;var a=32-xn(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,fo=1<<32-xn(t)+i|n<<i|o,po=a+e}else fo=1<<a|n<<i|o,po=e}function Wp(e){e.return!==null&&(Lo(e,1),cv(e,1,0))}function Jp(e){for(;e===Yu;)Yu=Qa[--Ka],Qa[Ka]=null,Pr=Qa[--Ka],Qa[Ka]=null;for(;e===wi;)wi=Hn[--kn],Hn[kn]=null,po=Hn[--kn],Hn[kn]=null,fo=Hn[--kn],Hn[kn]=null}function fv(e,t){Hn[kn++]=fo,Hn[kn++]=po,Hn[kn++]=wi,fo=t.id,po=t.overflow,wi=e}var At=null,Xe=null,Te=!1,bi=null,Un=!1,ap=Error(G(519));function Ai(e){var t=Error(G(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gr(Gn(t,e)),ap}function xy(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[wt]=e,t[an]=o,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Yr.length;n++)xe(Yr[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),I0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Y0(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||jb(t.textContent,n)?(o.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),o.onScroll!=null&&xe("scroll",t),o.onScrollEnd!=null&&xe("scrollend",t),o.onClick!=null&&(t.onclick=ko),t=!0):t=!1,t||Ai(e,!0)}function Sy(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:At=At.return}}function Ha(e){if(e!==At)return!1;if(!Te)return Sy(e),Te=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Mp(e.type,e.memoizedProps)),n=!n),n&&Xe&&Ai(e),Sy(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Xe=u0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Xe=u0(e)}else t===27?(t=Xe,Oi(e.type)?(e=Lp,Lp=null,Xe=e):Xe=t):Xe=At?Vn(e.stateNode.nextSibling):null;return!0}function na(){Xe=At=null,Te=!1}function _d(){var e=bi;return e!==null&&(nn===null?nn=e:nn.push.apply(nn,e),bi=null),e}function Gr(e){bi===null?bi=[e]:bi.push(e)}var lp=go(null),fa=null,Po=null;function ui(e,t,n){Ge(lp,t._currentValue),t._currentValue=n}function Uo(e){e._currentValue=lp.current,Et(lp)}function rp(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 sp(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),rp(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(G(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),rp(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 vl(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(G(387));if(l=l.memoizedProps,l!==null){var r=i.type;_n(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===Hu.current){if(l=i.alternate,l===null)throw Error(G(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(qr):e=[qr])}i=i.return}e!==null&&sp(t,e,n,o),t.flags|=262144}function Xu(e){for(e=e.firstContext;e!==null;){if(!_n(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){fa=e,Po=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return dv(fa,e)}function fu(e,t){return fa===null&&oa(e),dv(e,t)}function dv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Po===null){if(e===null)throw Error(G(308));Po=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Po=Po.next=t;return n}var xN=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()})}},SN=ht.unstable_scheduleCallback,_N=ht.unstable_NormalPriority,rt={$$typeof:Ho,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function em(){return{controller:new xN,data:new Map,refCount:0}}function es(e){e.refCount--,e.refCount===0&&SN(_N,function(){e.controller.abort()})}var Tr=null,up=0,sl=0,tl=null;function EN(e,t){if(Tr===null){var n=Tr=[];up=0,sl=Nm(),tl={status:"pending",value:void 0,then:function(o){n.push(o)}}}return up++,t.then(_y,_y),t}function _y(){if(--up===0&&Tr!==null){tl!==null&&(tl.status="fulfilled");var e=Tr;Tr=null,sl=0,tl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function TN(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 Ey=ce.S;ce.S=function(e,t){Cb=vn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&EN(e,t),Ey!==null&&Ey(e,t)};var Ji=go(null);function tm(){var e=Ji.current;return e!==null?e:Pe.pooledCache}function Cu(e,t){t===null?Ge(Ji,Ji.current):Ge(Ji,t.pool)}function pv(){var e=tm();return e===null?null:{parent:rt._currentValue,pool:e}}var bl=Error(G(460)),nm=Error(G(474)),yc=Error(G(542)),qu={then:function(){}};function Ty(e){return e=e.status,e==="fulfilled"||e==="rejected"}function mv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ko,ko),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Cy(e),e;default:if(typeof t.status=="string")t.then(ko,ko);else{if(e=Pe,e!==null&&100<e.shellSuspendCounter)throw Error(G(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,Cy(e),e}throw ea=t,bl}}function Qi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ea=n,bl):n}}var ea=null;function Ny(){if(ea===null)throw Error(G(459));var e=ea;return ea=null,e}function Cy(e){if(e===bl||e===yc)throw Error(G(483))}var nl=null,Ur=0;function du(e){var t=Ur;return Ur+=1,nl===null&&(nl=[]),mv(nl,e,t)}function fr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function pu(e,t){throw t.$$typeof===c2?Error(G(525)):(e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hv(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=Go(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=xd(m,p.mode,g),v.return=p,v):(v=i(v,m),v.return=p,v)}function s(p,v,m,g){var S=m.type;return S===Ua?c(p,v,m.props.children,g,m.key):v!==null&&(v.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ri&&Qi(S)===v.type)?(v=i(v,m.props),fr(v,m),v.return=p,v):(v=Nu(m.type,m.key,m.props,null,p.mode,g),fr(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=Sd(m,p.mode,g),v.return=p,v):(v=i(v,m.children||[]),v.return=p,v)}function c(p,v,m,g,S){return v===null||v.tag!==7?(v=Wi(m,p.mode,g,S),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=xd(""+v,p.mode,m),v.return=p,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case ou:return m=Nu(v.type,v.key,v.props,null,p.mode,m),fr(m,v),m.return=p,m;case gr:return v=Sd(v,p.mode,m),v.return=p,v;case ri:return v=Qi(v),d(p,v,m)}if(yr(v)||ur(v))return v=Wi(v,p.mode,m,null),v.return=p,v;if(typeof v.then=="function")return d(p,du(v),m);if(v.$$typeof===Ho)return d(p,fu(p,v),m);pu(p,v)}return null}function f(p,v,m,g){var S=v!==null?v.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return S!==null?null:r(p,v,""+m,g);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ou:return m.key===S?s(p,v,m,g):null;case gr:return m.key===S?u(p,v,m,g):null;case ri:return m=Qi(m),f(p,v,m,g)}if(yr(m)||ur(m))return S!==null?null:c(p,v,m,g,null);if(typeof m.then=="function")return f(p,v,du(m),g);if(m.$$typeof===Ho)return f(p,v,fu(p,m),g);pu(p,m)}return null}function h(p,v,m,g,S){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return p=p.get(m)||null,r(v,p,""+g,S);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ou:return p=p.get(g.key===null?m:g.key)||null,s(v,p,g,S);case gr:return p=p.get(g.key===null?m:g.key)||null,u(v,p,g,S);case ri:return g=Qi(g),h(p,v,m,g,S)}if(yr(g)||ur(g))return p=p.get(m)||null,c(v,p,g,S,null);if(typeof g.then=="function")return h(p,v,m,du(g),S);if(g.$$typeof===Ho)return h(p,v,m,fu(v,g),S);pu(v,g)}return null}function y(p,v,m,g){for(var S=null,_=null,E=v,N=v=0,w=null;E!==null&&N<m.length;N++){E.index>N?(w=E,E=null):w=E.sibling;var k=f(p,E,m[N],g);if(k===null){E===null&&(E=w);break}e&&E&&k.alternate===null&&t(p,E),v=a(k,v,N),_===null?S=k:_.sibling=k,_=k,E=w}if(N===m.length)return n(p,E),Te&&Lo(p,N),S;if(E===null){for(;N<m.length;N++)E=d(p,m[N],g),E!==null&&(v=a(E,v,N),_===null?S=E:_.sibling=E,_=E);return Te&&Lo(p,N),S}for(E=o(E);N<m.length;N++)w=h(E,p,N,m[N],g),w!==null&&(e&&w.alternate!==null&&E.delete(w.key===null?N:w.key),v=a(w,v,N),_===null?S=w:_.sibling=w,_=w);return e&&E.forEach(function(M){return t(p,M)}),Te&&Lo(p,N),S}function b(p,v,m,g){if(m==null)throw Error(G(151));for(var S=null,_=null,E=v,N=v=0,w=null,k=m.next();E!==null&&!k.done;N++,k=m.next()){E.index>N?(w=E,E=null):w=E.sibling;var M=f(p,E,k.value,g);if(M===null){E===null&&(E=w);break}e&&E&&M.alternate===null&&t(p,E),v=a(M,v,N),_===null?S=M:_.sibling=M,_=M,E=w}if(k.done)return n(p,E),Te&&Lo(p,N),S;if(E===null){for(;!k.done;N++,k=m.next())k=d(p,k.value,g),k!==null&&(v=a(k,v,N),_===null?S=k:_.sibling=k,_=k);return Te&&Lo(p,N),S}for(E=o(E);!k.done;N++,k=m.next())k=h(E,p,N,k.value,g),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?N:k.key),v=a(k,v,N),_===null?S=k:_.sibling=k,_=k);return e&&E.forEach(function(z){return t(p,z)}),Te&&Lo(p,N),S}function x(p,v,m,g){if(typeof m=="object"&&m!==null&&m.type===Ua&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ou:e:{for(var S=m.key;v!==null;){if(v.key===S){if(S=m.type,S===Ua){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===S||typeof S=="object"&&S!==null&&S.$$typeof===ri&&Qi(S)===v.type){n(p,v.sibling),g=i(v,m.props),fr(g,m),g.return=p,p=g;break e}n(p,v);break}else t(p,v);v=v.sibling}m.type===Ua?(g=Wi(m.props.children,p.mode,g,m.key),g.return=p,p=g):(g=Nu(m.type,m.key,m.props,null,p.mode,g),fr(g,m),g.return=p,p=g)}return l(p);case gr:e:{for(S=m.key;v!==null;){if(v.key===S)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=Sd(m,p.mode,g),g.return=p,p=g}return l(p);case ri:return m=Qi(m),x(p,v,m,g)}if(yr(m))return y(p,v,m,g);if(ur(m)){if(S=ur(m),typeof S!="function")throw Error(G(150));return m=S.call(m),b(p,v,m,g)}if(typeof m.then=="function")return x(p,v,du(m),g);if(m.$$typeof===Ho)return x(p,v,fu(p,m),g);pu(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=xd(m,p.mode,g),g.return=p,p=g),l(p)):n(p,v)}return function(p,v,m,g){try{Ur=0;var S=x(p,v,m,g);return nl=null,S}catch(E){if(E===bl||E===yc)throw E;var _=gn(29,E,null,p.mode);return _.lanes=g,_.return=p,_}}}var ia=hv(!0),gv=hv(!1),si=!1;function om(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function cp(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 xi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Si(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(De&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=Vu(e),rv(e,null,n),t}return gc(e,o,t,n),Vu(e)}function Nr(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,L0(e,n)}}function Ed(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 fp=!1;function Cr(){if(fp){var e=tl;if(e!==null)throw e}}function wr(e,t,n,o){fp=!1;var i=e.updateQueue;si=!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?(Ee&f)===f:(o&f)===f){f!==0&&f===sl&&(fp=!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 x=n;switch(b.tag){case 1:if(y=b.payload,typeof y=="function"){d=y.call(x,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(x,d,f):y,f==null)break e;d=qe({},d,f);break e;case 2:si=!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),Mi|=l,e.lanes=l,e.memoizedState=d}}function yv(e,t){if(typeof e!="function")throw Error(G(191,e));e.call(t)}function vv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)yv(n[e],t)}var ul=go(null),Zu=go(0);function wy(e,t){e=Zo,Ge(Zu,e),Ge(ul,t),Zo=e|t.baseLanes}function dp(){Ge(Zu,Zo),Ge(ul,ul.current)}function im(){Zo=Zu.current,Et(ul),Et(Zu)}var En=go(null),In=null;function ci(e){var t=e.alternate;Ge(ot,ot.current&1),Ge(En,e),In===null&&(t===null||ul.current!==null||t.memoizedState!==null)&&(In=e)}function pp(e){Ge(ot,ot.current),Ge(En,e),In===null&&(In=e)}function bv(e){e.tag===22?(Ge(ot,ot.current),Ge(En,e),In===null&&(In=e)):fi(e)}function fi(){Ge(ot,ot.current),Ge(En,En.current)}function hn(e){Et(En),In===e&&(In=null),Et(ot)}var ot=go(0);function ju(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Op(n)||zp(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 Yo=0,me=null,Be=null,at=null,$u=!1,ol=!1,aa=!1,Qu=0,Ir=0,il=null,NN=0;function Je(){throw Error(G(321))}function am(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_n(e[n],t[n]))return!1;return!0}function lm(e,t,n,o,i,a){return Yo=a,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ce.H=e===null||e.memoizedState===null?Kv:ym,aa=!1,a=n(o,i),aa=!1,ol&&(a=Sv(t,n,o,i)),xv(e),a}function xv(e){ce.H=Vr;var t=Be!==null&&Be.next!==null;if(Yo=0,at=Be=me=null,$u=!1,Ir=0,il=null,t)throw Error(G(300));e===null||st||(e=e.dependencies,e!==null&&Xu(e)&&(st=!0))}function Sv(e,t,n,o){me=e;var i=0;do{if(ol&&(il=null),Ir=0,ol=!1,25<=i)throw Error(G(301));if(i+=1,at=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)}ce.H=Fv,a=t(n,o)}while(ol);return a}function CN(){var e=ce.H,t=e.useState()[0];return t=typeof t.then=="function"?ts(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(me.flags|=1024),t}function rm(){var e=Qu!==0;return Qu=0,e}function sm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function um(e){if($u){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}$u=!1}Yo=0,at=Be=me=null,ol=!1,Ir=Qu=0,il=null}function Yt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return at===null?me.memoizedState=at=e:at=at.next=e,at}function it(){if(Be===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=at===null?me.memoizedState:at.next;if(t!==null)at=t,Be=e;else{if(e===null)throw me.alternate===null?Error(G(467)):Error(G(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},at===null?me.memoizedState=at=e:at=at.next=e}return at}function vc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ts(e){var t=Ir;return Ir+=1,il===null&&(il=[]),e=mv(il,e,t),t=me,(at===null?t.memoizedState:at.next)===null&&(t=t.alternate,ce.H=t===null||t.memoizedState===null?Kv:ym),e}function bc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ts(e);if(e.$$typeof===Ho)return Dt(e)}throw Error(G(438,String(e)))}function cm(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=vc(),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]=f2;return t.index++,n}function Xo(e,t){return typeof t=="function"?t(e):t}function wu(e){var t=it();return fm(t,Be,e)}function fm(e,t,n){var o=e.queue;if(o===null)throw Error(G(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?(Ee&d)===d:(Yo&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===sl&&(c=!0);else if((Yo&f)===f){u=u.next,f===sl&&(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,Mi|=f;d=u.action,aa&&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,Mi|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=a:s.next=r,!_n(a,e.memoizedState)&&(st=!0,c&&(n=tl,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 Td(e){var t=it(),n=t.queue;if(n===null)throw Error(G(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);_n(a,t.memoizedState)||(st=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function _v(e,t,n){var o=me,i=it(),a=Te;if(a){if(n===void 0)throw Error(G(407));n=n()}else n=t();var l=!_n((Be||i).memoizedState,n);if(l&&(i.memoizedState=n,st=!0),i=i.queue,dm(Nv.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||at!==null&&at.memoizedState.tag&1){if(o.flags|=2048,cl(9,{destroy:void 0},Tv.bind(null,o,i,n,t),null),Pe===null)throw Error(G(349));a||(Yo&127)!==0||Ev(o,t,n)}return n}function Ev(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t=vc(),me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Tv(e,t,n,o){t.value=n,t.getSnapshot=o,Cv(t)&&wv(e)}function Nv(e,t,n){return n(function(){Cv(t)&&wv(e)})}function Cv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_n(e,n)}catch{return!0}}function wv(e){var t=ca(e,2);t!==null&&on(t,e,2)}function mp(e){var t=Yt();if(typeof e=="function"){var n=e;if(e=n(),aa){pi(!0);try{n()}finally{pi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:e},t}function Av(e,t,n,o){return e.baseState=n,fm(e,Be,typeof o=="function"?o:Xo)}function wN(e,t,n,o,i){if(Sc(e))throw Error(G(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)}};ce.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,Dv(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Dv(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=ce.T,l={};ce.T=l;try{var r=n(i,o),s=ce.S;s!==null&&s(l,r),Ay(e,t,r)}catch(u){hp(e,t,u)}finally{a!==null&&l.types!==null&&(a.types=l.types),ce.T=a}}else try{a=n(i,o),Ay(e,t,a)}catch(u){hp(e,t,u)}}function Ay(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){Dy(e,t,o)},function(o){return hp(e,t,o)}):Dy(e,t,n)}function Dy(e,t,n){t.status="fulfilled",t.value=n,Mv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Dv(e,n)))}function hp(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,Mv(t),t=t.next;while(t!==o)}e.action=null}function Mv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rv(e,t){return t}function My(e,t){if(Te){var n=Pe.formState;if(n!==null){e:{var o=me;if(Te){if(Xe){t:{for(var i=Xe,a=Un;i.nodeType!==8;){if(!a){i=null;break t}if(i=Vn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){Xe=Vn(i.nextSibling),o=i.data==="F!";break e}}Ai(o)}o=!1}o&&(t=n[0])}}return n=Yt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rv,lastRenderedState:t},n.queue=o,n=jv.bind(null,me,o),o.dispatch=n,o=mp(!1),a=gm.bind(null,me,!1,o.queue),o=Yt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=wN.bind(null,me,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function Ry(e){var t=it();return Ov(t,Be,e)}function Ov(e,t,n){if(t=fm(e,t,Rv)[0],e=wu(Xo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=ts(t)}catch(l){throw l===bl?yc:l}else o=t;t=it();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(me.flags|=2048,cl(9,{destroy:void 0},AN.bind(null,i,n),null)),[o,a,e]}function AN(e,t){e.action=t}function Oy(e){var t=it(),n=Be;if(n!==null)return Ov(t,n,e);it(),t=t.memoizedState,n=it();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function cl(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=me.updateQueue,t===null&&(t=vc(),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 zv(){return it().memoizedState}function Au(e,t,n,o){var i=Yt();me.flags|=e,i.memoizedState=cl(1|t,{destroy:void 0},n,o===void 0?null:o)}function xc(e,t,n,o){var i=it();o=o===void 0?null:o;var a=i.memoizedState.inst;Be!==null&&o!==null&&am(o,Be.memoizedState.deps)?i.memoizedState=cl(t,a,n,o):(me.flags|=e,i.memoizedState=cl(1|t,a,n,o))}function zy(e,t){Au(8390656,8,e,t)}function dm(e,t){xc(2048,8,e,t)}function DN(e){me.flags|=4;var t=me.updateQueue;if(t===null)t=vc(),me.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Lv(e){var t=it().memoizedState;return DN({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(G(440));return t.impl.apply(void 0,arguments)}}function Bv(e,t){return xc(4,2,e,t)}function Hv(e,t){return xc(4,4,e,t)}function kv(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 Pv(e,t,n){n=n!=null?n.concat([e]):null,xc(4,4,kv.bind(null,t,e),n)}function pm(){}function Gv(e,t){var n=it();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&am(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Uv(e,t){var n=it();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&am(t,o[1]))return o[0];if(o=e(),aa){pi(!0);try{e()}finally{pi(!1)}}return n.memoizedState=[o,t],o}function mm(e,t,n){return n===void 0||(Yo&1073741824)!==0&&(Ee&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ab(),me.lanes|=e,Mi|=e,n)}function Iv(e,t,n,o){return _n(n,t)?n:ul.current!==null?(e=mm(e,n,o),_n(e,t)||(st=!0),e):(Yo&42)===0||(Yo&1073741824)!==0&&(Ee&261930)===0?(st=!0,e.memoizedState=n):(e=Ab(),me.lanes|=e,Mi|=e,t)}function Vv(e,t,n,o,i){var a=Me.p;Me.p=a!==0&&8>a?a:8;var l=ce.T,r={};ce.T=r,gm(e,!1,t,n);try{var s=i(),u=ce.S;if(u!==null&&u(r,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=TN(s,o);Ar(e,t,c,Sn(e))}else Ar(e,t,o,Sn(e))}catch(d){Ar(e,t,{then:function(){},status:"rejected",reason:d},Sn())}finally{Me.p=a,l!==null&&r.types!==null&&(l.types=r.types),ce.T=l}}function MN(){}function gp(e,t,n,o){if(e.tag!==5)throw Error(G(476));var i=Yv(e).queue;Vv(e,i,t,Fi,n===null?MN:function(){return Xv(e),n(o)})}function Yv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fi,baseState:Fi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:Fi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Xv(e){var t=Yv(e);t.next===null&&(t=e.alternate.memoizedState),Ar(e,t.next.queue,{},Sn())}function hm(){return Dt(qr)}function qv(){return it().memoizedState}function Zv(){return it().memoizedState}function RN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Sn();e=xi(n);var o=Si(t,e,n);o!==null&&(on(o,t,n),Nr(o,t,n)),t={cache:em()},e.payload=t;return}t=t.return}}function ON(e,t,n){var o=Sn();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Sc(e)?$v(t,n):(n=Kp(e,t,n,o),n!==null&&(on(n,e,o),Qv(n,t,o)))}function jv(e,t,n){var o=Sn();Ar(e,t,n,o)}function Ar(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Sc(e))$v(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,_n(r,l))return gc(e,t,i,0),Pe===null&&hc(),!1}catch{}if(n=Kp(e,t,i,o),n!==null)return on(n,e,o),Qv(n,t,o),!0}return!1}function gm(e,t,n,o){if(o={lane:2,revertLane:Nm(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Sc(e)){if(t)throw Error(G(479))}else t=Kp(e,n,o,2),t!==null&&on(t,e,2)}function Sc(e){var t=e.alternate;return e===me||t!==null&&t===me}function $v(e,t){ol=$u=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qv(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,L0(e,n)}}var Vr={readContext:Dt,use:bc,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};Vr.useEffectEvent=Je;var Kv={readContext:Dt,use:bc,useCallback:function(e,t){return Yt().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:zy,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Au(4194308,4,kv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Au(4194308,4,e,t)},useInsertionEffect:function(e,t){Au(4,2,e,t)},useMemo:function(e,t){var n=Yt();t=t===void 0?null:t;var o=e();if(aa){pi(!0);try{e()}finally{pi(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Yt();if(n!==void 0){var i=n(t);if(aa){pi(!0);try{n(t)}finally{pi(!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=ON.bind(null,me,e),[o.memoizedState,e]},useRef:function(e){var t=Yt();return e={current:e},t.memoizedState=e},useState:function(e){e=mp(e);var t=e.queue,n=jv.bind(null,me,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:pm,useDeferredValue:function(e,t){var n=Yt();return mm(n,e,t)},useTransition:function(){var e=mp(!1);return e=Vv.bind(null,me,e.queue,!0,!1),Yt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=me,i=Yt();if(Te){if(n===void 0)throw Error(G(407));n=n()}else{if(n=t(),Pe===null)throw Error(G(349));(Ee&127)!==0||Ev(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,zy(Nv.bind(null,o,a,e),[e]),o.flags|=2048,cl(9,{destroy:void 0},Tv.bind(null,o,a,n,t),null),n},useId:function(){var e=Yt(),t=Pe.identifierPrefix;if(Te){var n=po,o=fo;n=(o&~(1<<32-xn(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Qu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=NN++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:hm,useFormState:My,useActionState:My,useOptimistic:function(e){var t=Yt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=gm.bind(null,me,!0,n),n.dispatch=t,[e,t]},useMemoCache:cm,useCacheRefresh:function(){return Yt().memoizedState=RN.bind(null,me)},useEffectEvent:function(e){var t=Yt(),n={impl:e};return t.memoizedState=n,function(){if((De&2)!==0)throw Error(G(440));return n.impl.apply(void 0,arguments)}}},ym={readContext:Dt,use:bc,useCallback:Gv,useContext:Dt,useEffect:dm,useImperativeHandle:Pv,useInsertionEffect:Bv,useLayoutEffect:Hv,useMemo:Uv,useReducer:wu,useRef:zv,useState:function(){return wu(Xo)},useDebugValue:pm,useDeferredValue:function(e,t){var n=it();return Iv(n,Be.memoizedState,e,t)},useTransition:function(){var e=wu(Xo)[0],t=it().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:_v,useId:qv,useHostTransitionStatus:hm,useFormState:Ry,useActionState:Ry,useOptimistic:function(e,t){var n=it();return Av(n,Be,e,t)},useMemoCache:cm,useCacheRefresh:Zv};ym.useEffectEvent=Lv;var Fv={readContext:Dt,use:bc,useCallback:Gv,useContext:Dt,useEffect:dm,useImperativeHandle:Pv,useInsertionEffect:Bv,useLayoutEffect:Hv,useMemo:Uv,useReducer:Td,useRef:zv,useState:function(){return Td(Xo)},useDebugValue:pm,useDeferredValue:function(e,t){var n=it();return Be===null?mm(n,e,t):Iv(n,Be.memoizedState,e,t)},useTransition:function(){var e=Td(Xo)[0],t=it().memoizedState;return[typeof e=="boolean"?e:ts(e),t]},useSyncExternalStore:_v,useId:qv,useHostTransitionStatus:hm,useFormState:Oy,useActionState:Oy,useOptimistic:function(e,t){var n=it();return Be!==null?Av(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:cm,useCacheRefresh:Zv};Fv.useEffectEvent=Lv;function Nd(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var yp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=Sn(),i=xi(o);i.payload=t,n!=null&&(i.callback=n),t=Si(e,i,o),t!==null&&(on(t,e,o),Nr(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=Sn(),i=xi(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Si(e,i,o),t!==null&&(on(t,e,o),Nr(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),o=xi(n);o.tag=2,t!=null&&(o.callback=t),t=Si(e,o,n),t!==null&&(on(t,e,n),Nr(t,e,n))}};function Ly(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?!kr(n,o)||!kr(i,a):!0}function By(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&&yp.enqueueReplaceState(t,t.state,null)}function la(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=qe({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function Wv(e){Iu(e)}function Jv(e){console.error(e)}function eb(e){Iu(e)}function Ku(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Hy(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 vp(e,t,n){return n=xi(n),n.tag=3,n.payload={element:null},n.callback=function(){Ku(e,t)},n}function tb(e){return e=xi(e),e.tag=3,e}function nb(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(){Hy(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Hy(t,n,o),typeof i!="function"&&(_i===null?_i=new Set([this]):_i.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function zN(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&vl(t,n,i,!0),n=En.current,n!==null){switch(n.tag){case 31:case 13:return In===null?tc():n.alternate===null&&et===0&&(et=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===qu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),Hd(e,o,i)),!1;case 22:return n.flags|=65536,o===qu?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)),Hd(e,o,i)),!1}throw Error(G(435,n.tag))}return Hd(e,o,i),tc(),!1}if(Te)return t=En.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==ap&&(e=Error(G(422),{cause:o}),Gr(Gn(e,n)))):(o!==ap&&(t=Error(G(423),{cause:o}),Gr(Gn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=Gn(o,n),i=vp(e.stateNode,o,i),Ed(e,i),et!==4&&(et=2)),!1;var a=Error(G(520),{cause:o});if(a=Gn(a,n),Rr===null?Rr=[a]:Rr.push(a),et!==4&&(et=2),t===null)return!0;o=Gn(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=vp(n.stateNode,o,e),Ed(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"&&(_i===null||!_i.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=tb(i),nb(i,e,n,o),Ed(n,i),!1}n=n.return}while(n!==null);return!1}var vm=Error(G(461)),st=!1;function Ct(e,t,n,o){t.child=e===null?gv(t,null,n,o):ia(t,e.child,n,o)}function ky(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 oa(t),o=lm(e,t,n,l,a,i),r=rm(),e!==null&&!st?(sm(e,t,i),qo(e,t,i)):(Te&&r&&Wp(t),t.flags|=1,Ct(e,t,o,i),t.child)}function Py(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!Fp(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ob(e,t,a,o,i)):(e=Nu(n.type,null,o,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!bm(e,i)){var l=a.memoizedProps;if(n=n.compare,n=n!==null?n:kr,n(l,o)&&e.ref===t.ref)return qo(e,t,i)}return t.flags|=1,e=Go(a,o),e.ref=t.ref,e.return=t,t.child=e}function ob(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(kr(a,o)&&e.ref===t.ref)if(st=!1,t.pendingProps=o=a,bm(e,i))(e.flags&131072)!==0&&(st=!0);else return t.lanes=e.lanes,qo(e,t,i)}return bp(e,t,n,o,i)}function ib(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 Gy(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Cu(t,a!==null?a.cachePool:null),a!==null?wy(t,a):dp(),bv(t);else return o=t.lanes=536870912,Gy(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(Cu(t,a.cachePool),wy(t,a),fi(t),t.memoizedState=null):(e!==null&&Cu(t,null),dp(),fi(t));return Ct(e,t,i,n),t.child}function br(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Gy(e,t,n,o,i){var a=tm();return a=a===null?null:{parent:rt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Cu(t,null),dp(),bv(t),e!==null&&vl(e,t,o,!0),t.childLanes=i,null}function Du(e,t){return t=Fu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Uy(e,t,n){return ia(t,e.child,null,n),e=Du(t,t.pendingProps),e.flags|=2,hn(t),t.memoizedState=null,e}function LN(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(o.mode==="hidden")return e=Du(t,o),t.lanes=536870912,br(null,e);if(pp(t),(e=Xe)?(e=Kb(e,Un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi!==null?{id:fo,overflow:po}:null,retryLane:536870912,hydrationErrors:null},n=uv(e),n.return=t,t.child=n,At=t,Xe=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return Du(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(pp(t),i)if(t.flags&256)t.flags&=-257,t=Uy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(G(558));else if(st||vl(e,t,n,!1),i=(n&e.childLanes)!==0,st||i){if(o=Pe,o!==null&&(l=B0(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,ca(e,l),on(o,e,l),vm;tc(),t=Uy(e,t,n)}else e=a.treeContext,Xe=Vn(l.nextSibling),At=t,Te=!0,bi=null,Un=!1,e!==null&&fv(t,e),t=Du(t,o),t.flags|=4096;return t}return e=Go(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Mu(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(G(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function bp(e,t,n,o,i){return oa(t),n=lm(e,t,n,o,void 0,i),o=rm(),e!==null&&!st?(sm(e,t,i),qo(e,t,i)):(Te&&o&&Wp(t),t.flags|=1,Ct(e,t,n,i),t.child)}function Iy(e,t,n,o,i,a){return oa(t),t.updateQueue=null,n=Sv(t,o,n,i),xv(e),o=rm(),e!==null&&!st?(sm(e,t,a),qo(e,t,a)):(Te&&o&&Wp(t),t.flags|=1,Ct(e,t,n,a),t.child)}function Vy(e,t,n,o,i){if(oa(t),t.stateNode===null){var a=$a,l=n.contextType;typeof l=="object"&&l!==null&&(a=Dt(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=yp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},om(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?Dt(l):$a,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(Nd(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&&yp.enqueueReplaceState(a,a.state,null),wr(t,o,a,i),Cr(),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=la(n,r);a.props=s;var u=a.context,c=n.contextType;l=$a,typeof c=="object"&&c!==null&&(l=Dt(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)&&By(t,a,o,l),si=!1;var f=t.memoizedState;a.state=f,wr(t,o,a,i),Cr(),u=t.memoizedState,r||f!==u||si?(typeof d=="function"&&(Nd(t,n,d,o),u=t.memoizedState),(s=si||Ly(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,cp(e,t),l=t.memoizedProps,c=la(n,l),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=$a,typeof u=="object"&&u!==null&&(s=Dt(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)&&By(t,a,o,s),si=!1,f=t.memoizedState,a.state=f,wr(t,o,a,i),Cr();var h=t.memoizedState;l!==d||f!==h||si||e!==null&&e.dependencies!==null&&Xu(e.dependencies)?(typeof r=="function"&&(Nd(t,n,r,o),h=t.memoizedState),(c=si||Ly(t,n,c,o,f,h,s)||e!==null&&e.dependencies!==null&&Xu(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,Mu(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=ia(t,e.child,null,i),t.child=ia(t,null,n,i)):Ct(e,t,n,i),t.memoizedState=a.state,e=t.child):e=qo(e,t,i),e}function Yy(e,t,n,o){return na(),t.flags|=256,Ct(e,t,n,o),t.child}var Cd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wd(e){return{baseLanes:e,cachePool:pv()}}function Ad(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=yn),e}function ab(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:(ot.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(i?ci(t):fi(t),(e=Xe)?(e=Kb(e,Un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi!==null?{id:fo,overflow:po}:null,retryLane:536870912,hydrationErrors:null},n=uv(e),n.return=t,t.child=n,At=t,Xe=null)):e=null,e===null)throw Ai(t);return zp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(fi(t),i=t.mode,r=Fu({mode:"hidden",children:r},i),o=Wi(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=wd(n),o.childLanes=Ad(e,l,n),t.memoizedState=Cd,br(null,o)):(ci(t),xp(t,r))}var s=e.memoizedState;if(s!==null&&(r=s.dehydrated,r!==null)){if(a)t.flags&256?(ci(t),t.flags&=-257,t=Dd(e,t,n)):t.memoizedState!==null?(fi(t),t.child=e.child,t.flags|=128,t=null):(fi(t),r=o.fallback,i=t.mode,o=Fu({mode:"visible",children:o.children},i),r=Wi(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,ia(t,e.child,null,n),o=t.child,o.memoizedState=wd(n),o.childLanes=Ad(e,l,n),t.memoizedState=Cd,t=br(null,o));else if(ci(t),zp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var u=l.dgst;l=u,o=Error(G(419)),o.stack="",o.digest=l,Gr({value:o,source:null,stack:null}),t=Dd(e,t,n)}else if(st||vl(e,t,n,!1),l=(n&e.childLanes)!==0,st||l){if(l=Pe,l!==null&&(o=B0(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,ca(e,o),on(l,e,o),vm;Op(r)||tc(),t=Dd(e,t,n)}else Op(r)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,Xe=Vn(r.nextSibling),At=t,Te=!0,bi=null,Un=!1,e!==null&&fv(t,e),t=xp(t,o.children),t.flags|=4096);return t}return i?(fi(t),r=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Go(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?r=Go(u,r):(r=Wi(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,br(null,o),o=t.child,r=e.child.memoizedState,r===null?r=wd(n):(i=r.cachePool,i!==null?(s=rt._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=pv(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=Ad(e,l,n),t.memoizedState=Cd,br(e.child,o)):(ci(t),n=e.child,e=n.sibling,n=Go(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 xp(e,t){return t=Fu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fu(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function Dd(e,t,n){return ia(t,e.child,null,n),e=xp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Xy(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),rp(e.return,t,n)}function Md(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 lb(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=ot.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Ge(ot,l),Ct(e,t,o,n),o=Te?Pr:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xy(e,n,t);else if(e.tag===19)Xy(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&&ju(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Md(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&&ju(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Md(t,!0,n,null,a,o);break;case"together":Md(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function qo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Mi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(vl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,n=Go(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Go(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function bm(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Xu(e)))}function BN(e,t,n){switch(t.tag){case 3:ku(t,t.stateNode.containerInfo),ui(t,rt,e.memoizedState.cache),na();break;case 27:case 5:$d(t);break;case 4:ku(t,t.stateNode.containerInfo);break;case 10:ui(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,pp(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(ci(t),t.flags|=128,null):(n&t.child.childLanes)!==0?ab(e,t,n):(ci(t),e=qo(e,t,n),e!==null?e.sibling:null);ci(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(vl(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return lb(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ge(ot,ot.current),o)break;return null;case 22:return t.lanes=0,ib(e,t,n,t.pendingProps);case 24:ui(t,rt,e.memoizedState.cache)}return qo(e,t,n)}function rb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!bm(e,n)&&(t.flags&128)===0)return st=!1,BN(e,t,n);st=(e.flags&131072)!==0}else st=!1,Te&&(t.flags&1048576)!==0&&cv(t,Pr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Qi(t.elementType),t.type=e,typeof e=="function")Fp(e)?(o=la(e,o),t.tag=1,t=Vy(null,t,e,o,n)):(t.tag=0,t=bp(null,t,e,o,n));else{if(e!=null){var i=e.$$typeof;if(i===kp){t.tag=11,t=ky(null,t,e,o,n);break e}else if(i===Pp){t.tag=14,t=Py(null,t,e,o,n);break e}}throw t=Zd(e)||e,Error(G(306,t,""))}}return t;case 0:return bp(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=la(o,t.pendingProps),Vy(e,t,o,i,n);case 3:e:{if(ku(t,t.stateNode.containerInfo),e===null)throw Error(G(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,cp(e,t),wr(t,o,null,n);var l=t.memoizedState;if(o=l.cache,ui(t,rt,o),o!==a.cache&&sp(t,[rt],n,!0),Cr(),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=Yy(e,t,o,n);break e}else if(o!==i){i=Gn(Error(G(424)),t),Gr(i),t=Yy(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,Xe=Vn(e.firstChild),At=t,Te=!0,bi=null,Un=!0,n=gv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(na(),o===i){t=qo(e,t,n);break e}Ct(e,t,o,n)}t=t.child}return t;case 26:return Mu(e,t),e===null?(n=d0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Te||(n=t.type,e=t.pendingProps,o=ac(vi.current).createElement(n),o[wt]=t,o[an]=e,Mt(o,n,e),_t(o),t.stateNode=o):t.memoizedState=d0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $d(t),e===null&&Te&&(o=t.stateNode=Fb(t.type,t.pendingProps,vi.current),At=t,Un=!0,i=Xe,Oi(t.type)?(Lp=i,Xe=Vn(o.firstChild)):Xe=i),Ct(e,t,t.pendingProps.children,n),Mu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((i=o=Xe)&&(o=uC(o,t.type,t.pendingProps,Un),o!==null?(t.stateNode=o,At=t,Xe=Vn(o.firstChild),Un=!1,i=!0):i=!1),i||Ai(t)),$d(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,Mp(i,a)?o=null:l!==null&&Mp(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=lm(e,t,CN,null,null,n),qr._currentValue=i),Mu(e,t),Ct(e,t,o,n),t.child;case 6:return e===null&&Te&&((e=n=Xe)&&(n=cC(n,t.pendingProps,Un),n!==null?(t.stateNode=n,At=t,Xe=null,e=!0):e=!1),e||Ai(t)),null;case 13:return ab(e,t,n);case 4:return ku(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ia(t,null,o,n):Ct(e,t,o,n),t.child;case 11:return ky(e,t,t.type,t.pendingProps,n);case 7:return Ct(e,t,t.pendingProps,n),t.child;case 8:return Ct(e,t,t.pendingProps.children,n),t.child;case 12:return Ct(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,ui(t,t.type,o.value),Ct(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,oa(t),i=Dt(i),o=o(i),t.flags|=1,Ct(e,t,o,n),t.child;case 14:return Py(e,t,t.type,t.pendingProps,n);case 15:return ob(e,t,t.type,t.pendingProps,n);case 19:return lb(e,t,n);case 31:return LN(e,t,n);case 22:return ib(e,t,n,t.pendingProps);case 24:return oa(t),o=Dt(rt),e===null?(i=tm(),i===null&&(i=Pe,a=em(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},om(t),ui(t,rt,i)):((e.lanes&n)!==0&&(cp(e,t),wr(t,null,null,n),Cr()),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),ui(t,rt,o)):(o=a.cache,ui(t,rt,o),o!==i.cache&&sp(t,[rt],n,!0))),Ct(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}function Mo(e){e.flags|=4}function Rd(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(Rb())e.flags|=8192;else throw ea=qu,nm}else e.flags&=-16777217}function qy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!e1(t))if(Rb())e.flags|=8192;else throw ea=qu,nm}function mu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?O0():536870912,e.lanes|=t,fl|=t)}function dr(e,t){if(!Te)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 Ye(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 HN(e,t,n){var o=t.pendingProps;switch(Jp(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return Ye(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Uo(rt),al(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ha(t)?Mo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_d())),Ye(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Mo(t),a!==null?(Ye(t),qy(t,a)):(Ye(t),Rd(t,i,null,o,n))):a?a!==e.memoizedState?(Mo(t),Ye(t),qy(t,a)):(Ye(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&Mo(t),Ye(t),Rd(t,i,e,o,n)),null;case 27:if(Pu(t),n=vi.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Mo(t);else{if(!o){if(t.stateNode===null)throw Error(G(166));return Ye(t),null}e=ho.current,Ha(t)?xy(t,e):(e=Fb(i,o,n),t.stateNode=e,Mo(t))}return Ye(t),null;case 5:if(Pu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&Mo(t);else{if(!o){if(t.stateNode===null)throw Error(G(166));return Ye(t),null}if(a=ho.current,Ha(t))xy(t,a);else{var l=ac(vi.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[wt]=t,a[an]=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(Mt(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&&Mo(t)}}return Ye(t),Rd(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&Mo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(G(166));if(e=vi.current,Ha(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=At,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[wt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||jb(e.nodeValue,n)),e||Ai(t,!0)}else e=ac(e).createTextNode(o),e[wt]=t,t.stateNode=e}return Ye(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=Ha(t),n!==null){if(e===null){if(!o)throw Error(G(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(557));e[wt]=t}else na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),e=!1}else n=_d(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(hn(t),t):(hn(t),null);if((t.flags&128)!==0)throw Error(G(558))}return Ye(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ha(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(G(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(G(317));i[wt]=t}else na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ye(t),i=!1}else i=_d(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(hn(t),t):(hn(t),null)}return hn(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),mu(t,t.updateQueue),Ye(t),null);case 4:return al(),e===null&&Cm(t.stateNode.containerInfo),Ye(t),null;case 10:return Uo(t.type),Ye(t),null;case 19:if(Et(ot),o=t.memoizedState,o===null)return Ye(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)dr(o,!1);else{if(et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=ju(e),a!==null){for(t.flags|=128,dr(o,!1),e=a.updateQueue,t.updateQueue=e,mu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)sv(n,e),n=n.sibling;return Ge(ot,ot.current&1|2),Te&&Lo(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&vn()>Ju&&(t.flags|=128,i=!0,dr(o,!1),t.lanes=4194304)}else{if(!i)if(e=ju(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,mu(t,e),dr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Te)return Ye(t),null}else 2*vn()-o.renderingStartTime>Ju&&n!==536870912&&(t.flags|=128,i=!0,dr(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=vn(),e.sibling=null,n=ot.current,Ge(ot,i?n&1|2:n&1),Te&&Lo(t,o.treeForkCount),e):(Ye(t),null);case 22:case 23:return hn(t),im(),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&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),n=t.updateQueue,n!==null&&mu(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&&Et(Ji),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Uo(rt),Ye(t),null;case 25:return null;case 30:return null}throw Error(G(156,t.tag))}function kN(e,t){switch(Jp(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Uo(rt),al(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pu(t),null;case 31:if(t.memoizedState!==null){if(hn(t),t.alternate===null)throw Error(G(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Et(ot),null;case 4:return al(),null;case 10:return Uo(t.type),null;case 22:case 23:return hn(t),im(),e!==null&&Et(Ji),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Uo(rt),null;case 25:return null;default:return null}}function sb(e,t){switch(Jp(t),t.tag){case 3:Uo(rt),al();break;case 26:case 27:case 5:Pu(t);break;case 4:al();break;case 31:t.memoizedState!==null&&hn(t);break;case 13:hn(t);break;case 19:Et(ot);break;case 10:Uo(t.type);break;case 22:case 23:hn(t),im(),e!==null&&Et(Ji);break;case 24:Uo(rt)}}function ns(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){Oe(t,t.return,r)}}function Di(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){Oe(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){Oe(t,t.return,c)}}function ub(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{vv(t,n)}catch(o){Oe(e,e.return,o)}}}function cb(e,t,n){n.props=la(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){Oe(e,t,o)}}function Dr(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){Oe(e,t,i)}}function mo(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){Oe(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){Oe(e,t,i)}else n.current=null}function fb(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){Oe(e,e.return,i)}}function Od(e,t,n){try{var o=e.stateNode;oC(o,e.type,n,t),o[an]=t}catch(i){Oe(e,e.return,i)}}function db(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Oi(e.type)||e.tag===4}function zd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||db(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&&Oi(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 Sp(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=ko));else if(o!==4&&(o===27&&Oi(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Sp(e,t,n),e=e.sibling;e!==null;)Sp(e,t,n),e=e.sibling}function Wu(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&&Oi(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Wu(e,t,n),e=e.sibling;e!==null;)Wu(e,t,n),e=e.sibling}function pb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Mt(t,o,n),t[wt]=e,t[an]=n}catch(a){Oe(e,e.return,a)}}var Bo=!1,lt=!1,Ld=!1,Zy=typeof WeakSet=="function"?WeakSet:Set,St=null;function PN(e,t){if(e=e.containerInfo,Ap=uc,e=ev(e),$p(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(Dp={focusedElem:e,selectionRange:n},uc=!1,St=t;St!==null;)if(t=St,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,St=e;else for(;St!==null;){switch(t=St,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=la(n.type,i);e=o.getSnapshotBeforeUpdate(y,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){Oe(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Rp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rp(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(G(163))}if(e=t.sibling,e!==null){e.return=t.return,St=e;break}St=t.return}}function mb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Oo(e,n),o&4&&ns(5,n);break;case 1:if(Oo(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Oe(n,n.return,l)}else{var i=la(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Oe(n,n.return,l)}}o&64&&ub(n),o&512&&Dr(n,n.return);break;case 3:if(Oo(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{vv(e,t)}catch(l){Oe(n,n.return,l)}}break;case 27:t===null&&o&4&&pb(n);case 26:case 5:Oo(e,n),t===null&&o&4&&fb(n),o&512&&Dr(n,n.return);break;case 12:Oo(e,n);break;case 31:Oo(e,n),o&4&&yb(e,n);break;case 13:Oo(e,n),o&4&&vb(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=jN.bind(null,n),fC(e,n))));break;case 22:if(o=n.memoizedState!==null||Bo,!o){t=t!==null&&t.memoizedState!==null||lt,i=Bo;var a=lt;Bo=o,(lt=t)&&!a?zo(e,n,(n.subtreeFlags&8772)!==0):Oo(e,n),Bo=i,lt=a}break;case 30:break;default:Oo(e,n)}}function hb(e){var t=e.alternate;t!==null&&(e.alternate=null,hb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Vp(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 Qe=null,tn=!1;function Ro(e,t,n){for(n=n.child;n!==null;)gb(e,t,n),n=n.sibling}function gb(e,t,n){if(bn&&typeof bn.onCommitFiberUnmount=="function")try{bn.onCommitFiberUnmount(Qr,n)}catch{}switch(n.tag){case 26:lt||mo(n,t),Ro(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:lt||mo(n,t);var o=Qe,i=tn;Oi(n.type)&&(Qe=n.stateNode,tn=!1),Ro(e,t,n),zr(n.stateNode),Qe=o,tn=i;break;case 5:lt||mo(n,t);case 6:if(o=Qe,i=tn,Qe=null,Ro(e,t,n),Qe=o,tn=i,Qe!==null)if(tn)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(n.stateNode)}catch(a){Oe(n,t,a)}else try{Qe.removeChild(n.stateNode)}catch(a){Oe(n,t,a)}break;case 18:Qe!==null&&(tn?(e=Qe,r0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),hl(e)):r0(Qe,n.stateNode));break;case 4:o=Qe,i=tn,Qe=n.stateNode.containerInfo,tn=!0,Ro(e,t,n),Qe=o,tn=i;break;case 0:case 11:case 14:case 15:Di(2,n,t),lt||Di(4,n,t),Ro(e,t,n);break;case 1:lt||(mo(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&cb(n,t,o)),Ro(e,t,n);break;case 21:Ro(e,t,n);break;case 22:lt=(o=lt)||n.memoizedState!==null,Ro(e,t,n),lt=o;break;default:Ro(e,t,n)}}function yb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{hl(e)}catch(n){Oe(t,t.return,n)}}}function vb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{hl(e)}catch(n){Oe(t,t.return,n)}}function GN(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Zy),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Zy),t;default:throw Error(G(435,e.tag))}}function hu(e,t){var n=GN(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=$N.bind(null,e,o);o.then(i,i)}})}function Jt(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(Oi(r.type)){Qe=r.stateNode,tn=!1;break e}break;case 5:Qe=r.stateNode,tn=!1;break e;case 3:case 4:Qe=r.stateNode.containerInfo,tn=!0;break e}r=r.return}if(Qe===null)throw Error(G(160));gb(a,l,i),Qe=null,tn=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bb(t,e),t=t.sibling}var Fn=null;function bb(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(t,e),en(e),o&4&&(Di(3,e,e.return),ns(3,e),Di(5,e,e.return));break;case 1:Jt(t,e),en(e),o&512&&(lt||n===null||mo(n,n.return)),o&64&&Bo&&(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=Fn;if(Jt(t,e),en(e),o&512&&(lt||n===null||mo(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[Wr]||a[wt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),Mt(a,o,n),a[wt]=e,_t(a),o=a;break e;case"link":var l=m0("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),Mt(a,o,n),i.head.appendChild(a);break;case"meta":if(l=m0("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),Mt(a,o,n),i.head.appendChild(a);break;default:throw Error(G(468,o))}a[wt]=e,_t(a),o=a}e.stateNode=o}else h0(i,e.type,e.stateNode);else e.stateNode=p0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?h0(i,e.type,e.stateNode):p0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Od(e,e.memoizedProps,n.memoizedProps)}break;case 27:Jt(t,e),en(e),o&512&&(lt||n===null||mo(n,n.return)),n!==null&&o&4&&Od(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Jt(t,e),en(e),o&512&&(lt||n===null||mo(n,n.return)),e.flags&32){i=e.stateNode;try{rl(i,"")}catch(y){Oe(e,e.return,y)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,Od(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Ld=!0);break;case 6:if(Jt(t,e),en(e),o&4){if(e.stateNode===null)throw Error(G(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(y){Oe(e,e.return,y)}}break;case 3:if(zu=null,i=Fn,Fn=lc(t.containerInfo),Jt(t,e),Fn=i,en(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{hl(t.containerInfo)}catch(y){Oe(e,e.return,y)}Ld&&(Ld=!1,xb(e));break;case 4:o=Fn,Fn=lc(e.stateNode.containerInfo),Jt(t,e),en(e),Fn=o;break;case 12:Jt(t,e),en(e);break;case 31:Jt(t,e),en(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,hu(e,o)));break;case 13:Jt(t,e),en(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(_c=vn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,hu(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=Bo,c=lt;if(Bo=u||i,lt=c||s,Jt(t,e),lt=c,Bo=u,en(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||Bo||lt||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){Oe(s,s.return,y)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(y){Oe(s,s.return,y)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;i?s0(h,!0):s0(s.stateNode,!1)}catch(y){Oe(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,hu(e,n))));break;case 19:Jt(t,e),en(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,hu(e,o)));break;case 30:break;case 21:break;default:Jt(t,e),en(e)}}function en(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(db(o)){n=o;break}o=o.return}if(n==null)throw Error(G(160));switch(n.tag){case 27:var i=n.stateNode,a=zd(e);Wu(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(rl(l,""),n.flags&=-33);var r=zd(e);Wu(e,r,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=zd(e);Sp(e,u,s);break;default:throw Error(G(161))}}catch(c){Oe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Oo(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mb(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:Di(4,t,t.return),Ki(t);break;case 1:mo(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&cb(t,t.return,n),Ki(t);break;case 27:zr(t.stateNode);case 26:case 5:mo(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 zo(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:zo(i,a,n),ns(4,a);break;case 1:if(zo(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){Oe(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++)yv(s[i],r)}catch(u){Oe(o,o.return,u)}}n&&l&64&&ub(a),Dr(a,a.return);break;case 27:pb(a);case 26:case 5:zo(i,a,n),n&&o===null&&l&4&&fb(a),Dr(a,a.return);break;case 12:zo(i,a,n);break;case 31:zo(i,a,n),n&&l&4&&yb(i,a);break;case 13:zo(i,a,n),n&&l&4&&vb(i,a);break;case 22:a.memoizedState===null&&zo(i,a,n),Dr(a,a.return);break;case 30:break;default:zo(i,a,n)}t=t.sibling}}function xm(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&&es(n))}function Sm(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&es(e))}function Kn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Sb(e,t,n,o),t=t.sibling}function Sb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Kn(e,t,n,o),i&2048&&ns(9,t);break;case 1:Kn(e,t,n,o);break;case 3:Kn(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&&es(e)));break;case 12:if(i&2048){Kn(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){Oe(t,t.return,s)}}else Kn(e,t,n,o);break;case 31:Kn(e,t,n,o);break;case 13:Kn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Kn(e,t,n,o):Mr(e,t):a._visibility&2?Kn(e,t,n,o):(a._visibility|=2,Pa(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&xm(l,t);break;case 24:Kn(e,t,n,o),i&2048&&Sm(t.alternate,t);break;default:Kn(e,t,n,o)}}function Pa(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:Pa(a,l,r,s,i),ns(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?Pa(a,l,r,s,i):Mr(a,l):(c._visibility|=2,Pa(a,l,r,s,i)),i&&u&2048&&xm(l.alternate,l);break;case 24:Pa(a,l,r,s,i),i&&u&2048&&Sm(l.alternate,l);break;default:Pa(a,l,r,s,i)}t=t.sibling}}function Mr(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:Mr(n,o),i&2048&&xm(o.alternate,o);break;case 24:Mr(n,o),i&2048&&Sm(o.alternate,o);break;default:Mr(n,o)}t=t.sibling}}var xr=8192;function ka(e,t,n){if(e.subtreeFlags&xr)for(e=e.child;e!==null;)_b(e,t,n),e=e.sibling}function _b(e,t,n){switch(e.tag){case 26:ka(e,t,n),e.flags&xr&&e.memoizedState!==null&&EC(n,Fn,e.memoizedState,e.memoizedProps);break;case 5:ka(e,t,n);break;case 3:case 4:var o=Fn;Fn=lc(e.stateNode.containerInfo),ka(e,t,n),Fn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=xr,xr=16777216,ka(e,t,n),xr=o):ka(e,t,n));break;default:ka(e,t,n)}}function Eb(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 pr(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];St=o,Nb(o,e)}Eb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tb(e),e=e.sibling}function Tb(e){switch(e.tag){case 0:case 11:case 15:pr(e),e.flags&2048&&Di(9,e,e.return);break;case 3:pr(e);break;case 12:pr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ru(e)):pr(e);break;default:pr(e)}}function Ru(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];St=o,Nb(o,e)}Eb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Di(8,t,t.return),Ru(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ru(t));break;default:Ru(t)}e=e.sibling}}function Nb(e,t){for(;St!==null;){var n=St;switch(n.tag){case 0:case 11:case 15:Di(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:es(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,St=o;else e:for(n=e;St!==null;){o=St;var i=o.sibling,a=o.return;if(hb(o),o===n){St=null;break e}if(i!==null){i.return=a,St=i;break e}St=a}}}var UN={getCacheForType:function(e){var t=Dt(rt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Dt(rt).controller.signal}},IN=typeof WeakMap=="function"?WeakMap:Map,De=0,Pe=null,Se=null,Ee=0,Re=0,mn=null,hi=!1,xl=!1,_m=!1,Zo=0,et=0,Mi=0,ta=0,Em=0,yn=0,fl=0,Rr=null,nn=null,_p=!1,_c=0,Cb=0,Ju=1/0,ec=null,_i=null,mt=0,Ei=null,dl=null,Io=0,Ep=0,Tp=null,wb=null,Or=0,Np=null;function Sn(){return(De&2)!==0&&Ee!==0?Ee&-Ee:ce.T!==null?Nm():H0()}function Ab(){if(yn===0)if((Ee&536870912)===0||Te){var e=au;au<<=1,(au&3932160)===0&&(au=262144),yn=e}else yn=536870912;return e=En.current,e!==null&&(e.flags|=32),yn}function on(e,t,n){(e===Pe&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(pl(e,0),gi(e,Ee,yn,!1)),Fr(e,n),((De&2)===0||e!==Pe)&&(e===Pe&&((De&2)===0&&(ta|=n),et===4&&gi(e,Ee,yn,!1)),yo(e))}function Db(e,t,n){if((De&6)!==0)throw Error(G(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Kr(e,t),i=o?XN(e,t):Bd(e,t,!0),a=o;do{if(i===0){xl&&!o&&gi(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!VN(n)){i=Bd(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=Rr;var s=r.current.memoizedState.isDehydrated;if(s&&(pl(r,l).flags|=256),l=Bd(r,l,!1),l!==2){if(_m&&!s){r.errorRecoveryDisabledLanes|=a,ta|=a,i=4;break e}a=nn,nn=i,a!==null&&(nn===null?nn=a:nn.push.apply(nn,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){pl(e,0),gi(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(G(345));case 4:if((t&4194048)!==t)break;case 6:gi(o,t,yn,!hi);break e;case 2:nn=null;break;case 3:case 5:break;default:throw Error(G(329))}if((t&62914560)===t&&(i=_c+300-vn(),10<i)){if(gi(o,t,yn,!hi),fc(o,0,!0)!==0)break e;Io=t,o.timeoutHandle=Qb(jy.bind(null,o,n,nn,ec,_p,t,yn,ta,fl,hi,a,"Throttled",-0,0),i);break e}jy(o,n,nn,ec,_p,t,yn,ta,fl,hi,a,null,-0,0)}}break}while(!0);yo(e)}function jy(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:ko},_b(t,a,d);var y=(a&62914560)===a?_c-vn():(a&4194048)===a?Cb-vn():0;if(y=TC(d,y),y!==null){Io=a,e.cancelPendingCommit=y(Qy.bind(null,e,t,a,n,o,i,l,r,s,c,d,null,f,h)),gi(e,a,l,!u);return}}Qy(e,t,a,n,o,i,l,r,s)}function VN(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(!_n(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 gi(e,t,n,o){t&=~Em,t&=~ta,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-xn(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&z0(e,n,t)}function Ec(){return(De&6)===0?(os(0,!1),!1):!0}function Tm(){if(Se!==null){if(Re===0)var e=Se.return;else e=Se,Po=fa=null,um(e),nl=null,Ur=0,e=Se;for(;e!==null;)sb(e.alternate,e),e=e.return;Se=null}}function pl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,lC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Io=0,Tm(),Pe=e,Se=n=Go(e.current,null),Ee=t,Re=0,mn=null,hi=!1,xl=Kr(e,t),_m=!1,fl=yn=Em=ta=Mi=et=0,nn=Rr=null,_p=!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-xn(o),a=1<<i;t|=e[i],o&=~a}return Zo=t,hc(),n}function Mb(e,t){me=null,ce.H=Vr,t===bl||t===yc?(t=Ny(),Re=3):t===nm?(t=Ny(),Re=4):Re=t===vm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,mn=t,Se===null&&(et=1,Ku(e,Gn(t,e.current)))}function Rb(){var e=En.current;return e===null?!0:(Ee&4194048)===Ee?In===null:(Ee&62914560)===Ee||(Ee&536870912)!==0?e===In:!1}function Ob(){var e=ce.H;return ce.H=Vr,e===null?Vr:e}function zb(){var e=ce.A;return ce.A=UN,e}function tc(){et=4,hi||(Ee&4194048)!==Ee&&En.current!==null||(xl=!0),(Mi&134217727)===0&&(ta&134217727)===0||Pe===null||gi(Pe,Ee,yn,!1)}function Bd(e,t,n){var o=De;De|=2;var i=Ob(),a=zb();(Pe!==e||Ee!==t)&&(ec=null,pl(e,t)),t=!1;var l=et;e:do try{if(Re!==0&&Se!==null){var r=Se,s=mn;switch(Re){case 8:Tm(),l=6;break e;case 3:case 2:case 9:case 6:En.current===null&&(t=!0);var u=Re;if(Re=0,mn=null,Fa(e,r,s,u),n&&xl){l=0;break e}break;default:u=Re,Re=0,mn=null,Fa(e,r,s,u)}}YN(),l=et;break}catch(c){Mb(e,c)}while(!0);return t&&e.shellSuspendCounter++,Po=fa=null,De=o,ce.H=i,ce.A=a,Se===null&&(Pe=null,Ee=0,hc()),l}function YN(){for(;Se!==null;)Lb(Se)}function XN(e,t){var n=De;De|=2;var o=Ob(),i=zb();Pe!==e||Ee!==t?(ec=null,Ju=vn()+500,pl(e,t)):xl=Kr(e,t);e:do try{if(Re!==0&&Se!==null){t=Se;var a=mn;t:switch(Re){case 1:Re=0,mn=null,Fa(e,t,a,1);break;case 2:case 9:if(Ty(a)){Re=0,mn=null,$y(t);break}t=function(){Re!==2&&Re!==9||Pe!==e||(Re=7),yo(e)},a.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Ty(a)?(Re=0,mn=null,$y(t)):(Re=0,mn=null,Fa(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?e1(l):r.stateNode.complete){Re=0,mn=null;var s=r.sibling;if(s!==null)Se=s;else{var u=r.return;u!==null?(Se=u,Tc(u)):Se=null}break t}}Re=0,mn=null,Fa(e,t,a,5);break;case 6:Re=0,mn=null,Fa(e,t,a,6);break;case 8:Tm(),et=6;break e;default:throw Error(G(462))}}qN();break}catch(c){Mb(e,c)}while(!0);return Po=fa=null,ce.H=o,ce.A=i,De=n,Se!==null?0:(Pe=null,Ee=0,hc(),et)}function qN(){for(;Se!==null&&!m2();)Lb(Se)}function Lb(e){var t=rb(e.alternate,e,Zo);e.memoizedProps=e.pendingProps,t===null?Tc(e):Se=t}function $y(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Iy(n,t,t.pendingProps,t.type,void 0,Ee);break;case 11:t=Iy(n,t,t.pendingProps,t.type.render,t.ref,Ee);break;case 5:um(t);default:sb(n,t),t=Se=sv(t,Zo),t=rb(n,t,Zo)}e.memoizedProps=e.pendingProps,t===null?Tc(e):Se=t}function Fa(e,t,n,o){Po=fa=null,um(t),nl=null,Ur=0;var i=t.return;try{if(zN(e,i,t,n,Ee)){et=1,Ku(e,Gn(n,e.current)),Se=null;return}}catch(a){if(i!==null)throw Se=i,a;et=1,Ku(e,Gn(n,e.current)),Se=null;return}t.flags&32768?(Te||o===1?e=!0:xl||(Ee&536870912)!==0?e=!1:(hi=e=!0,(o===2||o===9||o===3||o===6)&&(o=En.current,o!==null&&o.tag===13&&(o.flags|=16384))),Bb(t,e)):Tc(t)}function Tc(e){var t=e;do{if((t.flags&32768)!==0){Bb(t,hi);return}e=t.return;var n=HN(t.alternate,t,Zo);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 Bb(e,t){do{var n=kN(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 Qy(e,t,n,o,i,a,l,r,s){e.cancelPendingCommit=null;do Nc();while(mt!==0);if((De&6)!==0)throw Error(G(327));if(t!==null){if(t===e.current)throw Error(G(177));if(a=t.lanes|t.childLanes,a|=Qp,T2(e,n,a,l,r,s),e===Pe&&(Se=Pe=null,Ee=0),dl=t,Ei=e,Io=n,Ep=a,Tp=i,wb=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,QN(Gu,function(){return Ub(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ce.T,ce.T=null,i=Me.p,Me.p=2,l=De,De|=4;try{PN(e,t,n)}finally{De=l,Me.p=i,ce.T=o}}mt=1,Hb(),kb(),Pb()}}function Hb(){if(mt===1){mt=0;var e=Ei,t=dl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ce.T,ce.T=null;var o=Me.p;Me.p=2;var i=De;De|=4;try{bb(t,e);var a=Dp,l=ev(e.containerInfo),r=a.focusedElem,s=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&J0(r.ownerDocument.documentElement,r)){if(s!==null&&$p(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),x=s.end===void 0?b:Math.min(s.end,y);!h.extend&&b>x&&(l=x,x=b,b=l);var p=yy(r,b),v=yy(r,x);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>x?(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}}uc=!!Ap,Dp=Ap=null}finally{De=i,Me.p=o,ce.T=n}}e.current=t,mt=2}}function kb(){if(mt===2){mt=0;var e=Ei,t=dl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ce.T,ce.T=null;var o=Me.p;Me.p=2;var i=De;De|=4;try{mb(e,t.alternate,t)}finally{De=i,Me.p=o,ce.T=n}}mt=3}}function Pb(){if(mt===4||mt===3){mt=0,h2();var e=Ei,t=dl,n=Io,o=wb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?mt=5:(mt=0,dl=Ei=null,Gb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(_i=null),Ip(n),t=t.stateNode,bn&&typeof bn.onCommitFiberRoot=="function")try{bn.onCommitFiberRoot(Qr,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=ce.T,i=Me.p,Me.p=2,ce.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{ce.T=t,Me.p=i}}(Io&3)!==0&&Nc(),yo(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Np?Or++:(Or=0,Np=e):Or=0,os(0,!1)}}function Gb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,es(t)))}function Nc(){return Hb(),kb(),Pb(),Ub()}function Ub(){if(mt!==5)return!1;var e=Ei,t=Ep;Ep=0;var n=Ip(Io),o=ce.T,i=Me.p;try{Me.p=32>n?32:n,ce.T=null,n=Tp,Tp=null;var a=Ei,l=Io;if(mt=0,dl=Ei=null,Io=0,(De&6)!==0)throw Error(G(331));var r=De;if(De|=4,Tb(a.current),Sb(a,a.current,l,n),De=r,os(0,!1),bn&&typeof bn.onPostCommitFiberRoot=="function")try{bn.onPostCommitFiberRoot(Qr,a)}catch{}return!0}finally{Me.p=i,ce.T=o,Gb(e,t)}}function Ky(e,t,n){t=Gn(n,t),t=vp(e.stateNode,t,2),e=Si(e,t,2),e!==null&&(Fr(e,2),yo(e))}function Oe(e,t,n){if(e.tag===3)Ky(e,e,n);else for(;t!==null;){if(t.tag===3){Ky(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(_i===null||!_i.has(o))){e=Gn(n,e),n=tb(2),o=Si(t,n,2),o!==null&&(nb(n,o,t,e),Fr(o,2),yo(o));break}}t=t.return}}function Hd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new IN;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)||(_m=!0,i.add(n),e=ZN.bind(null,e,t,n),t.then(e,e))}function ZN(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Pe===e&&(Ee&n)===n&&(et===4||et===3&&(Ee&62914560)===Ee&&300>vn()-_c?(De&2)===0&&pl(e,0):Em|=n,fl===Ee&&(fl=0)),yo(e)}function Ib(e,t){t===0&&(t=O0()),e=ca(e,t),e!==null&&(Fr(e,t),yo(e))}function jN(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ib(e,n)}function $N(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(G(314))}o!==null&&o.delete(t),Ib(e,n)}function QN(e,t){return Gp(e,t)}var nc=null,Ga=null,Cp=!1,oc=!1,kd=!1,yi=0;function yo(e){e!==Ga&&e.next===null&&(Ga===null?nc=Ga=e:Ga=Ga.next=e),oc=!0,Cp||(Cp=!0,FN())}function os(e,t){if(!kd&&oc){kd=!0;do for(var n=!1,o=nc;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-xn(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Fy(o,a))}else a=Ee,a=fc(o,o===Pe?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||Kr(o,a)||(n=!0,Fy(o,a));o=o.next}while(n);kd=!1}}function KN(){Vb()}function Vb(){oc=Cp=!1;var e=0;yi!==0&&aC()&&(e=yi);for(var t=vn(),n=null,o=nc;o!==null;){var i=o.next,a=Yb(o,t);a===0?(o.next=null,n===null?nc=i:n.next=i,i===null&&(Ga=n)):(n=o,(e!==0||(a&3)!==0)&&(oc=!0)),o=i}mt!==0&&mt!==5||os(e,!1),yi!==0&&(yi=0)}function Yb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-xn(a),r=1<<l,s=i[l];s===-1?((r&n)===0||(r&o)!==0)&&(i[l]=E2(r,t)):s<=t&&(e.expiredLanes|=r),a&=~r}if(t=Pe,n=Ee,n=fc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&dd(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Kr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&dd(o),Ip(n)){case 2:case 8:n=M0;break;case 32:n=Gu;break;case 268435456:n=R0;break;default:n=Gu}return o=Xb.bind(null,e),n=Gp(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&dd(o),e.callbackPriority=2,e.callbackNode=null,2}function Xb(e,t){if(mt!==0&&mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Nc()&&e.callbackNode!==n)return null;var o=Ee;return o=fc(e,e===Pe?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Db(e,o,t),Yb(e,vn()),e.callbackNode!=null&&e.callbackNode===n?Xb.bind(null,e):null)}function Fy(e,t){if(Nc())return null;Db(e,t,!0)}function FN(){rC(function(){(De&6)!==0?Gp(D0,KN):Vb()})}function Nm(){if(yi===0){var e=sl;e===0&&(e=iu,iu<<=1,(iu&261888)===0&&(iu=256)),yi=e}return yi}function Wy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:_u(""+e)}function Jy(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 WN(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=Wy((i[an]||null).action),l=o.submitter;l&&(t=(t=l[an]||null)?Wy(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new dc("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(yi!==0){var s=l?Jy(i,l):new FormData(i);gp(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(r.preventDefault(),s=l?Jy(i,l):new FormData(i),gp(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(gu=0;gu<ip.length;gu++)yu=ip[gu],e0=yu.toLowerCase(),t0=yu[0].toUpperCase()+yu.slice(1),Wn(e0,"on"+t0);var yu,e0,t0,gu;Wn(nv,"onAnimationEnd");Wn(ov,"onAnimationIteration");Wn(iv,"onAnimationStart");Wn("dblclick","onDoubleClick");Wn("focusin","onFocus");Wn("focusout","onBlur");Wn(gN,"onTransitionRun");Wn(yN,"onTransitionStart");Wn(vN,"onTransitionCancel");Wn(av,"onTransitionEnd");ll("onMouseEnter",["mouseout","mouseover"]);ll("onMouseLeave",["mouseout","mouseover"]);ll("onPointerEnter",["pointerout","pointerover"]);ll("onPointerLeave",["pointerout","pointerover"]);ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ra("onBeforeInput",["compositionend","keypress","textInput","paste"]);ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Yr="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(" "),JN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Yr));function qb(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){Iu(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){Iu(c)}i.currentTarget=null,a=s}}}}function xe(e,t){var n=t[Kd];n===void 0&&(n=t[Kd]=new Set);var o=e+"__bubble";n.has(o)||(Zb(t,e,2,!1),n.add(o))}function Pd(e,t,n){var o=0;t&&(o|=4),Zb(n,e,o,t)}var vu="_reactListening"+Math.random().toString(36).slice(2);function Cm(e){if(!e[vu]){e[vu]=!0,k0.forEach(function(n){n!=="selectionchange"&&(JN.has(n)||Pd(n,!1,e),Pd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vu]||(t[vu]=!0,Pd("selectionchange",!1,t))}}function Zb(e,t,n,o){switch(a1(t)){case 2:var i=wC;break;case 8:i=AC;break;default:i=Mm}n=i.bind(null,t,n,e),i=void 0,!tp||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 Gd(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=Va(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}q0(function(){var u=a,c=Xp(n),d=[];e:{var f=lv.get(e);if(f!==void 0){var h=dc,y=e;switch(e){case"keypress":if(Tu(n)===0)break e;case"keydown":case"keyup":h=$2;break;case"focusin":y="focus",h=yd;break;case"focusout":y="blur",h=yd;break;case"beforeblur":case"afterblur":h=yd;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=sy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=H2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=F2;break;case nv:case ov:case iv:h=G2;break;case av:h=J2;break;case"scroll":case"scrollend":h=L2;break;case"wheel":h=tN;break;case"copy":case"cut":case"paste":h=I2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=cy;break;case"toggle":case"beforetoggle":h=oN}var b=(t&4)!==0,x=!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=Br(v,p),g!=null&&b.push(Xr(v,g,m))),x)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!==ep&&(y=n.relatedTarget||n.fromElement)&&(Va(y)||y[gl]))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?Va(y):null,y!==null&&(x=$r(y),b=y.tag,y!==x||b!==5&&b!==27&&b!==6)&&(y=null)):(h=null,y=u),h!==y)){if(b=sy,g="onMouseLeave",p="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(b=cy,g="onPointerLeave",p="onPointerEnter",v="pointer"),x=h==null?f:vr(h),m=y==null?f:vr(y),f=new b(g,v+"leave",h,n,c),f.target=x,f.relatedTarget=m,g=null,Va(c)===u&&(b=new b(p,v+"enter",y,n,c),b.target=m,b.relatedTarget=x,g=b),x=g,h&&y)t:{for(b=eC,p=h,v=y,m=0,g=p;g;g=b(g))m++;g=0;for(var S=v;S;S=b(S))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&&n0(d,f,h,b,!1),y!==null&&x!==null&&n0(d,x,y,b,!0)}}e:{if(f=u?vr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=my;else if(py(f))if(F0)_=pN;else{_=fN;var E=cN}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Yp(u.elementType)&&(_=my):_=dN;if(_&&(_=_(e,u))){K0(d,_,n,c);break e}E&&E(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&Jd(f,"number",f.value)}switch(E=u?vr(u):window,e){case"focusin":(py(E)||E.contentEditable==="true")&&(qa=E,np=u,Er=null);break;case"focusout":Er=np=qa=null;break;case"mousedown":op=!0;break;case"contextmenu":case"mouseup":case"dragend":op=!1,vy(d,n,c);break;case"selectionchange":if(hN)break;case"keydown":case"keyup":vy(d,n,c)}var N;if(jp)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 Xa?$0(e,n)&&(w="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(w="onCompositionStart");w&&(j0&&n.locale!=="ko"&&(Xa||w!=="onCompositionStart"?w==="onCompositionEnd"&&Xa&&(N=Z0()):(mi=c,qp="value"in mi?mi.value:mi.textContent,Xa=!0)),E=ic(u,w),0<E.length&&(w=new uy(w,e,null,n,c),d.push({event:w,listeners:E}),N?w.data=N:(N=Q0(n),N!==null&&(w.data=N)))),(N=aN?lN(e,n):rN(e,n))&&(w=ic(u,"onBeforeInput"),0<w.length&&(E=new uy("onBeforeInput","beforeinput",null,n,c),d.push({event:E,listeners:w}),E.data=N)),WN(d,e,u,n,c)}qb(d,t)})}function Xr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ic(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=Br(e,n),i!=null&&o.unshift(Xr(e,i,a)),i=Br(e,t),i!=null&&o.push(Xr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function eC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function n0(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=Br(n,a),u!=null&&l.unshift(Xr(n,u,s))):i||(u=Br(n,a),u!=null&&l.push(Xr(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var tC=/\r\n?/g,nC=/\u0000|\uFFFD/g;function o0(e){return(typeof e=="string"?e:""+e).replace(tC,`
|
|
2425
|
-
`).replace(nC,"")}function jb(e,t){return t=o0(t),o0(e)===t}function Le(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||rl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&rl(e,""+o);break;case"className":ru(e,"class",o);break;case"tabIndex":ru(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":ru(e,n,o);break;case"style":X0(e,o,a);break;case"data":if(t!=="object"){ru(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=_u(""+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=_u(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=ko);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(G(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(G(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=_u(""+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":xe("beforetoggle",e),xe("toggle",e),Su(e,"popover",o);break;case"xlinkActuate":Do(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Do(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Do(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Do(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Do(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Do(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Do(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Do(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Do(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Su(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=O2.get(n)||n,Su(e,n,o))}}function wp(e,t,n,o,i,a){switch(n){case"style":X0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(G(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(G(60));e.innerHTML=n}}break;case"children":typeof o=="string"?rl(e,o):(typeof o=="number"||typeof o=="bigint")&&rl(e,""+o);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=ko);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!P0.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[an]||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,""):Su(e,n,o)}}}function Mt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("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(G(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":xe("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(G(137,t));break;default:Le(e,t,o,c,n,null)}}I0(e,a,r,s,u,l,i,!1);return;case"select":xe("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?Ja(e,!!o,t,!1):n!=null&&Ja(e,!!o,n,!0);return;case"textarea":xe("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(G(91));break;default:Le(e,t,l,r,n,null)}Y0(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":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(o=0;o<Yr.length;o++)xe(Yr[o],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("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(G(137,t));default:Le(e,t,u,o,n,null)}return;default:if(Yp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&wp(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 oC(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(G(137,t));break;default:h!==d&&Le(e,t,f,h,o,d)}}Wd(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?Ja(e,!!n,f,!1):!!o!=!!n&&(t!=null?Ja(e,!!n,t,!0):Ja(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(G(91));break;default:i!==a&&Le(e,t,l,i,o,a)}V0(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(G(137,t));break;default:Le(e,t,u,f,o,h)}return;default:if(Yp(t)){for(var x in n)f=n[x],n.hasOwnProperty(x)&&f!==void 0&&!o.hasOwnProperty(x)&&wp(e,t,x,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||wp(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 i0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function iC(){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&&i0(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&&i0(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 Ap=null,Dp=null;function ac(e){return e.nodeType===9?e:e.ownerDocument}function a0(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 $b(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 Mp(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 Ud=null;function aC(){var e=window.event;return e&&e.type==="popstate"?e===Ud?!1:(Ud=e,!0):(Ud=null,!1)}var Qb=typeof setTimeout=="function"?setTimeout:void 0,lC=typeof clearTimeout=="function"?clearTimeout:void 0,l0=typeof Promise=="function"?Promise:void 0,rC=typeof queueMicrotask=="function"?queueMicrotask:typeof l0<"u"?function(e){return l0.resolve(null).then(e).catch(sC)}:Qb;function sC(e){setTimeout(function(){throw e})}function Oi(e){return e==="head"}function r0(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),hl(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")zr(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,zr(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[Wr]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&zr(e.ownerDocument.body);n=i}while(n);hl(t)}function s0(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 Rp(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":Rp(n),Vp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function uC(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[Wr])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=Vn(e.nextSibling),e===null)break}return null}function cC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Vn(e.nextSibling),e===null))return null;return e}function Kb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Vn(e.nextSibling),e===null))return null;return e}function Op(e){return e.data==="$?"||e.data==="$~"}function zp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function fC(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 Vn(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 Lp=null;function u0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Vn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function c0(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 Fb(e,t,n){switch(t=ac(n),e){case"html":if(e=t.documentElement,!e)throw Error(G(452));return e;case"head":if(e=t.head,!e)throw Error(G(453));return e;case"body":if(e=t.body,!e)throw Error(G(454));return e;default:throw Error(G(451))}}function zr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Vp(e)}var Yn=new Map,f0=new Set;function lc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jo=Me.d;Me.d={f:dC,r:pC,D:mC,C:hC,L:gC,m:yC,X:bC,S:vC,M:xC};function dC(){var e=jo.f(),t=Ec();return e||t}function pC(e){var t=yl(e);t!==null&&t.tag===5&&t.type==="form"?Xv(t):jo.r(e)}var Sl=typeof document>"u"?null:document;function Wb(e,t,n){var o=Sl;if(o&&typeof t=="string"&&t){var i=Pn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),f0.has(i)||(f0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),Mt(t,"link",e),_t(t),o.head.appendChild(t)))}}function mC(e){jo.D(e),Wb("dns-prefetch",e,null)}function hC(e,t){jo.C(e,t),Wb("preconnect",e,t)}function gC(e,t,n){jo.L(e,t,n);var o=Sl;if(o&&e&&t){var i='link[rel="preload"][as="'+Pn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Pn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Pn(n.imageSizes)+'"]')):i+='[href="'+Pn(e)+'"]';var a=i;switch(t){case"style":a=ml(e);break;case"script":a=_l(e)}Yn.has(a)||(e=qe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Yn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(is(a))||t==="script"&&o.querySelector(as(a))||(t=o.createElement("link"),Mt(t,"link",e),_t(t),o.head.appendChild(t)))}}function yC(e,t){jo.m(e,t);var n=Sl;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Pn(o)+'"][href="'+Pn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=_l(e)}if(!Yn.has(a)&&(e=qe({rel:"modulepreload",href:e},t),Yn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(as(a)))return}o=n.createElement("link"),Mt(o,"link",e),_t(o),n.head.appendChild(o)}}}function vC(e,t,n){jo.S(e,t,n);var o=Sl;if(o&&e){var i=Wa(o).hoistableStyles,a=ml(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(is(a)))r.loading=5;else{e=qe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Yn.get(a))&&wm(e,n);var s=l=o.createElement("link");_t(s),Mt(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,Ou(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function bC(e,t){jo.X(e,t);var n=Sl;if(n&&e){var o=Wa(n).hoistableScripts,i=_l(e),a=o.get(i);a||(a=n.querySelector(as(i)),a||(e=qe({src:e,async:!0},t),(t=Yn.get(i))&&Am(e,t),a=n.createElement("script"),_t(a),Mt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function xC(e,t){jo.M(e,t);var n=Sl;if(n&&e){var o=Wa(n).hoistableScripts,i=_l(e),a=o.get(i);a||(a=n.querySelector(as(i)),a||(e=qe({src:e,async:!0,type:"module"},t),(t=Yn.get(i))&&Am(e,t),a=n.createElement("script"),_t(a),Mt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function d0(e,t,n,o){var i=(i=vi.current)?lc(i):null;if(!i)throw Error(G(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=ml(n.href),n=Wa(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=ml(n.href);var a=Wa(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(is(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Yn.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},Yn.set(e,n),a||SC(i,e,n,l.state))),t&&o===null)throw Error(G(528,""));return l}if(t&&o!==null)throw Error(G(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=_l(n),n=Wa(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(G(444,e))}}function ml(e){return'href="'+Pn(e)+'"'}function is(e){return'link[rel="stylesheet"]['+e+"]"}function Jb(e){return qe({},e,{"data-precedence":e.precedence,precedence:null})}function SC(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}),Mt(t,"link",n),_t(t),e.head.appendChild(t))}function _l(e){return'[src="'+Pn(e)+'"]'}function as(e){return"script[async]"+e}function p0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Pn(n.href)+'"]');if(o)return t.instance=o,_t(o),o;var i=qe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),_t(o),Mt(o,"style",i),Ou(o,n.precedence,e),t.instance=o;case"stylesheet":i=ml(n.href);var a=e.querySelector(is(i));if(a)return t.state.loading|=4,t.instance=a,_t(a),a;o=Jb(n),(i=Yn.get(i))&&wm(o,i),a=(e.ownerDocument||e).createElement("link"),_t(a);var l=a;return l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),Mt(a,"link",o),t.state.loading|=4,Ou(a,n.precedence,e),t.instance=a;case"script":return a=_l(n.src),(i=e.querySelector(as(a)))?(t.instance=i,_t(i),i):(o=n,(i=Yn.get(a))&&(o=qe({},n),Am(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),_t(i),Mt(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(G(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Ou(o,n.precedence,e));return t.instance}function Ou(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 wm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Am(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var zu=null;function m0(e,t,n){if(zu===null){var o=new Map,i=zu=new Map;i.set(n,o)}else i=zu,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[Wr]||a[wt]||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 h0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function _C(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 e1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function EC(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=ml(o.href),a=t.querySelector(is(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=rc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,o=Jb(o),(i=Yn.get(i))&&wm(o,i),a=a.createElement("link"),_t(a);var l=a;l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),Mt(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=rc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Id=0;function TC(e,t){return e.stylesheets&&e.count===0&&Lu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&Lu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Id===0&&(Id=62500*iC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Lu(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Id?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function rc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sc=null;function Lu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sc=new Map,t.forEach(NC,e),sc=null,rc.call(e))}function NC(e,t){if(!(t.state.loading&4)){var n=sc.get(e);if(n)var o=n.get(null);else{n=new Map,sc.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=rc.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 qr={$$typeof:Ho,Provider:null,Consumer:null,_currentValue:Fi,_currentValue2:Fi,_threadCount:0};function CC(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=pd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pd(0),this.hiddenUpdates=pd(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 t1(e,t,n,o,i,a,l,r,s,u,c,d){return e=new CC(e,t,n,l,s,u,c,d,r),t=1,a===!0&&(t|=24),a=gn(3,null,null,t),e.current=a,a.stateNode=e,t=em(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},om(a),e}function n1(e){return e?(e=$a,e):$a}function o1(e,t,n,o,i,a){i=n1(i),o.context===null?o.context=i:o.pendingContext=i,o=xi(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=Si(e,o,t),n!==null&&(on(n,e,t),Nr(n,e,t))}function g0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Dm(e,t){g0(e,t),(e=e.alternate)&&g0(e,t)}function i1(e){if(e.tag===13||e.tag===31){var t=ca(e,67108864);t!==null&&on(t,e,67108864),Dm(e,67108864)}}function y0(e){if(e.tag===13||e.tag===31){var t=Sn();t=Up(t);var n=ca(e,t);n!==null&&on(n,e,t),Dm(e,t)}}var uc=!0;function wC(e,t,n,o){var i=ce.T;ce.T=null;var a=Me.p;try{Me.p=2,Mm(e,t,n,o)}finally{Me.p=a,ce.T=i}}function AC(e,t,n,o){var i=ce.T;ce.T=null;var a=Me.p;try{Me.p=8,Mm(e,t,n,o)}finally{Me.p=a,ce.T=i}}function Mm(e,t,n,o){if(uc){var i=Bp(o);if(i===null)Gd(e,t,o,cc,n),v0(e,o);else if(MC(i,e,t,n,o))o.stopPropagation();else if(v0(e,o),t&4&&-1<DC.indexOf(e)){for(;i!==null;){var a=yl(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=$i(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var s=1<<31-xn(l);r.entanglements[1]|=s,l&=~s}yo(a),(De&6)===0&&(Ju=vn()+500,os(0,!1))}}break;case 31:case 13:r=ca(a,2),r!==null&&on(r,a,2),Ec(),Dm(a,2)}if(a=Bp(o),a===null&&Gd(e,t,o,cc,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Gd(e,t,o,null,n)}}function Bp(e){return e=Xp(e),Rm(e)}var cc=null;function Rm(e){if(cc=null,e=Va(e),e!==null){var t=$r(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=T0(t),e!==null)return e;e=null}else if(n===31){if(e=N0(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 cc=e,null}function a1(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(g2()){case D0:return 2;case M0:return 8;case Gu:case y2:return 32;case R0:return 268435456;default:return 32}default:return 32}}var Hp=!1,Ti=null,Ni=null,Ci=null,Zr=new Map,jr=new Map,di=[],DC="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 v0(e,t){switch(e){case"focusin":case"focusout":Ti=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":Ci=null;break;case"pointerover":case"pointerout":Zr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":jr.delete(t.pointerId)}}function mr(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=yl(t),t!==null&&i1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function MC(e,t,n,o,i){switch(t){case"focusin":return Ti=mr(Ti,e,t,n,o,i),!0;case"dragenter":return Ni=mr(Ni,e,t,n,o,i),!0;case"mouseover":return Ci=mr(Ci,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return Zr.set(a,mr(Zr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,jr.set(a,mr(jr.get(a)||null,e,t,n,o,i)),!0}return!1}function l1(e){var t=Va(e.target);if(t!==null){var n=$r(t);if(n!==null){if(t=n.tag,t===13){if(t=T0(n),t!==null){e.blockedOn=t,ty(e.priority,function(){y0(n)});return}}else if(t===31){if(t=N0(n),t!==null){e.blockedOn=t,ty(e.priority,function(){y0(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 Bu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);ep=o,n.target.dispatchEvent(o),ep=null}else return t=yl(n),t!==null&&i1(t),e.blockedOn=n,!1;t.shift()}return!0}function b0(e,t,n){Bu(e)&&n.delete(t)}function RC(){Hp=!1,Ti!==null&&Bu(Ti)&&(Ti=null),Ni!==null&&Bu(Ni)&&(Ni=null),Ci!==null&&Bu(Ci)&&(Ci=null),Zr.forEach(b0),jr.forEach(b0)}function bu(e,t){e.blockedOn===t&&(e.blockedOn=null,Hp||(Hp=!0,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,RC)))}var xu=null;function x0(e){xu!==e&&(xu=e,ht.unstable_scheduleCallback(ht.unstable_NormalPriority,function(){xu===e&&(xu=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(Rm(o||n)===null)continue;break}var a=yl(n);a!==null&&(e.splice(t,3),t-=3,gp(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function hl(e){function t(s){return bu(s,e)}Ti!==null&&bu(Ti,e),Ni!==null&&bu(Ni,e),Ci!==null&&bu(Ci,e),Zr.forEach(t),jr.forEach(t);for(var n=0;n<di.length;n++){var o=di[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<di.length&&(n=di[0],n.blockedOn===null);)l1(n),n.blockedOn===null&&di.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[an]||null;if(typeof a=="function")l||x0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[an]||null)r=l.formAction;else if(Rm(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),x0(n)}}}function r1(){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 Om(e){this._internalRoot=e}Cc.prototype.render=Om.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var n=t.current,o=Sn();o1(n,o,e,t,null,null)};Cc.prototype.unmount=Om.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;o1(e.current,2,null,e,null,null),Ec(),t[gl]=null}};function Cc(e){this._internalRoot=e}Cc.prototype.unstable_scheduleHydration=function(e){if(e){var t=H0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<di.length&&t!==0&&t<di[n].priority;n++);di.splice(n,0,e),n===0&&l1(e)}};var S0=_0.version;if(S0!=="19.2.4")throw Error(G(527,S0,"19.2.4"));Me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=u2(t),e=e!==null?C0(e):null,e=e===null?null:e.stateNode,e};var OC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ce,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(hr=__REACT_DEVTOOLS_GLOBAL_HOOK__,!hr.isDisabled&&hr.supportsFiber))try{Qr=hr.inject(OC),bn=hr}catch{}var hr;wc.createRoot=function(e,t){if(!E0(e))throw Error(G(299));var n=!1,o="",i=Wv,a=Jv,l=eb;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=t1(e,1,!1,null,null,n,o,null,i,a,l,r1),e[gl]=t.current,Cm(e),new Om(t)};wc.hydrateRoot=function(e,t,n){if(!E0(e))throw Error(G(299));var o=!1,i="",a=Wv,l=Jv,r=eb,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=t1(e,1,!0,t,n??null,o,i,s,a,l,r,r1),t.context=n1(null),n=t.current,o=Sn(),o=Up(o),i=xi(o),i.callback=null,Si(n,i,o),n=o,t.current.lanes=n,Fr(t,n),yo(t),e[gl]=t.current,Cm(e),new Cc(t)};wc.version="19.2.4"});var f1=Wt((yz,c1)=>{"use strict";function u1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u1)}catch(e){console.error(e)}}u1(),c1.exports=s1()});var S1=Wt(zc=>{"use strict";var HC=Symbol.for("react.transitional.element"),kC=Symbol.for("react.fragment");function x1(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:HC,type:e,key:o,ref:t!==void 0?t:null,props:n}}zc.Fragment=kC;zc.jsx=x1;zc.jsxs=x1});var he=Wt((_z,_1)=>{"use strict";_1.exports=S1()});var a_=Wt(i_=>{"use strict";var Vl=Ht();function OD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zD=typeof Object.is=="function"?Object.is:OD,LD=Vl.useState,BD=Vl.useEffect,HD=Vl.useLayoutEffect,kD=Vl.useDebugValue;function PD(e,t){var n=t(),o=LD({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return HD(function(){i.value=n,i.getSnapshot=t,_h(i)&&a({inst:i})},[e,n,t]),BD(function(){return _h(i)&&a({inst:i}),e(function(){_h(i)&&a({inst:i})})},[e]),kD(n),n}function _h(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zD(e,n)}catch{return!0}}function GD(e,t){return t()}var UD=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?GD:PD;i_.useSyncExternalStore=Vl.useSyncExternalStore!==void 0?Vl.useSyncExternalStore:UD});var r_=Wt((hB,l_)=>{"use strict";l_.exports=a_()});var u_=Wt(s_=>{"use strict";var Nf=Ht(),ID=r_();function VD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var YD=typeof Object.is=="function"?Object.is:VD,XD=ID.useSyncExternalStore,qD=Nf.useRef,ZD=Nf.useEffect,jD=Nf.useMemo,$D=Nf.useDebugValue;s_.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=qD(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=jD(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,YD(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=XD(e,a[0],a[1]);return ZD(function(){l.hasValue=!0,l.value=r},[r]),$D(r),r}});var f_=Wt((yB,c_)=>{"use strict";c_.exports=u_()});var vg=le(Ht(),1),ET=le(f1(),1);var zC={PipeLLM:!0,PipeExtract:!0,PipeCompose:!0,PipeImgGen:!0,PipeSearch:!0,PipeFunc:!0,PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0},d1=new Set(Object.keys(zC)),El="pipeCard",p1="default",m1="controllerGroup",zm="stuff_";function zi(e){return zm+e}function Tl(e){return e.startsWith(zm)}function ls(e){return e.slice(zm.length)}var Tn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},Ac={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},Jn={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},ut={DARK:"dark",LIGHT:"light"},Dc=40,Mc=48,Rc=20,da="arrowclosed";function h1(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 g1(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}var rs=class extends Error{constructor(t,n){let o=t===""?"<root>":t;super(`GraphSpec validation failed at ${o}: ${n}`),this.name="GraphSpecValidationError",this.path=t}},y1=new Set(["succeeded","failed","running","scheduled","skipped","canceled"]),v1=new Set(["contains","data","control","selected_outcome","batch_item","batch_aggregate","parallel_combine"]);function Li(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Nn(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"an array":`a ${typeof e}`}function gt(e,t){throw new rs(e,t)}function vo(e,t){return(typeof e!="string"||e.length===0)&>(t,`expected a non-empty string, got ${Nn(e)}`),e}function b1(e,t){Li(e)||gt(t,`expected an object, got ${Nn(e)}`),vo(e.name,`${t}.name`)}function LC(e,t){Li(e)||gt(t,`expected an object, got ${Nn(e)}`),vo(e.id,`${t}.id`),e.kind!=="controller"&&e.kind!=="operator"&>(`${t}.kind`,`expected "controller" or "operator" \u2014 a real pipelex run emits only pipe-call nodes, got ${JSON.stringify(e.kind)}`),(typeof e.status!="string"||!y1.has(e.status))&>(`${t}.status`,`expected one of ${[...y1].join(", ")}, got ${JSON.stringify(e.status)}`),vo(e.pipe_code,`${t}.pipe_code`);let n=vo(e.pipe_type,`${t}.pipe_type`);d1.has(n)||gt(`${t}.pipe_type`,`unrecognized pipe class "${n}" \u2014 add it to PipeOperatorType or PipeControllerType in types.ts`),vo(e.description,`${t}.description`),vo(e.domain_code,`${t}.domain_code`);let o=e.io;o===void 0&&(o={inputs:[],outputs:[]},e.io=o),Li(o)||gt(`${t}.io`,`expected an object, got ${Nn(o)}`),o.inputs===void 0?o.inputs=[]:Array.isArray(o.inputs)||gt(`${t}.io.inputs`,`expected an array, got ${Nn(o.inputs)}`),o.outputs===void 0?o.outputs=[]:Array.isArray(o.outputs)||gt(`${t}.io.outputs`,`expected an array, got ${Nn(o.outputs)}`),o.inputs.forEach((i,a)=>b1(i,`${t}.io.inputs[${a}]`)),o.outputs.forEach((i,a)=>b1(i,`${t}.io.outputs[${a}]`))}function BC(e,t){Li(e)||gt(t,`expected an object, got ${Nn(e)}`),vo(e.id,`${t}.id`),vo(e.source,`${t}.source`),vo(e.target,`${t}.target`),(typeof e.kind!="string"||!v1.has(e.kind))&>(`${t}.kind`,`expected one of ${[...v1].join(", ")}, got ${JSON.stringify(e.kind)}`)}function Oc(e){return Li(e)||gt("",`expected a GraphSpec object, got ${Nn(e)}`),Array.isArray(e.nodes)||gt("nodes",`expected an array, got ${Nn(e.nodes)}`),Array.isArray(e.edges)||gt("edges",`expected an array, got ${Nn(e.edges)}`),Li(e.meta)||gt("meta",`expected an object, got ${Nn(e.meta)}`),e.meta.format!=="mthds"&>("meta.format",`expected "mthds" (this does not look like pipelex GraphSpec JSON), got ${JSON.stringify(e.meta.format)}`),e.pipe_registry!==void 0&&!Li(e.pipe_registry)&>("pipe_registry",`expected an object when present, got ${Nn(e.pipe_registry)}`),e.concept_registry!==void 0&&!Li(e.concept_registry)&>("concept_registry",`expected an object when present, got ${Nn(e.concept_registry)}`),e.nodes.forEach((t,n)=>LC(t,`nodes[${n}]`)),e.edges.forEach((t,n)=>BC(t,`edges[${n}]`)),e}function Nl(e,t="node"){return e.kind!=="controller"&&e.kind!=="operator"&>(`${t}.kind`,`expected a pipe-call node ("controller" or "operator"), got ${JSON.stringify(e.kind)}`),vo(e.pipe_code,`${t}.pipe_code`),e}var fe=le(Ht(),1);var B=le(he()),H=le(Ht());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 PC={value:()=>{}};function T1(){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 Lc(n)}function Lc(e){this._=e}function GC(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}})}Lc.prototype=T1.prototype={constructor:Lc,on:function(e,t){var n=this._,o=GC(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=UC(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]=E1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=E1(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 Lc(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 UC(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function E1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=PC,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var pa=T1;var Bc="http://www.w3.org/1999/xhtml",Lm={svg:"http://www.w3.org/2000/svg",xhtml:Bc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $o(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Lm.hasOwnProperty(t)?{space:Lm[t],local:e}:e}function IC(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Bc&&t.documentElement.namespaceURI===Bc?t.createElement(e):t.createElementNS(n,e)}}function VC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Hc(e){var t=$o(e);return(t.local?VC:IC)(t)}function YC(){}function ma(e){return e==null?YC:function(){return this.querySelector(e)}}function N1(e){typeof e!="function"&&(e=ma(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 Bm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function XC(){return[]}function ss(e){return e==null?XC:function(){return this.querySelectorAll(e)}}function qC(e){return function(){return Bm(e.apply(this,arguments))}}function C1(e){typeof e=="function"?e=qC(e):e=ss(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 us(e){return function(){return this.matches(e)}}function kc(e){return function(t){return t.matches(e)}}var ZC=Array.prototype.find;function jC(e){return function(){return ZC.call(this.children,e)}}function $C(){return this.firstElementChild}function w1(e){return this.select(e==null?$C:jC(typeof e=="function"?e:kc(e)))}var QC=Array.prototype.filter;function KC(){return Array.from(this.children)}function FC(e){return function(){return QC.call(this.children,e)}}function A1(e){return this.selectAll(e==null?KC:FC(typeof e=="function"?e:kc(e)))}function D1(e){typeof e!="function"&&(e=us(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 Pc(e){return new Array(e.length)}function M1(){return new nt(this._enter||this._groups.map(Pc),this._parents)}function cs(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}cs.prototype={constructor:cs,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 R1(e){return function(){return e}}function WC(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 cs(e,a[l]);for(;l<s;++l)(r=t[l])&&(i[l]=r)}function JC(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 cs(e,a[r]);for(r=0;r<c;++r)(s=t[r])&&u.get(f[r])===s&&(i[r]=s)}function ew(e){return e.__data__}function O1(e,t){if(!arguments.length)return Array.from(this,ew);var n=t?JC:WC,o=this._parents,i=this._groups;typeof e!="function"&&(e=R1(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=tw(e.call(c,c&&c.__data__,u,o)),y=h.length,b=r[u]=new Array(y),x=l[u]=new Array(y),p=s[u]=new Array(f);n(c,d,b,x,p,h,t);for(var v=0,m=0,g,S;v<y;++v)if(g=b[v]){for(v>=m&&(m=v+1);!(S=x[m])&&++m<y;);g._next=S||null}}return l=new nt(l,o),l._enter=r,l._exit=s,l}function tw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function z1(){return new nt(this._exit||this._groups.map(Pc),this._parents)}function L1(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 B1(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 H1(){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 k1(e){e||(e=nw);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 nw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function P1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function G1(){return Array.from(this)}function U1(){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 I1(){let e=0;for(let t of this)++e;return e}function V1(){return!this.node()}function Y1(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 ow(e){return function(){this.removeAttribute(e)}}function iw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function aw(e,t){return function(){this.setAttribute(e,t)}}function lw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function sw(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 X1(e,t){var n=$o(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?iw:ow:typeof t=="function"?n.local?sw:rw:n.local?lw:aw)(n,t))}function Gc(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function uw(e){return function(){this.style.removeProperty(e)}}function cw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function fw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function q1(e,t,n){return arguments.length>1?this.each((t==null?uw:typeof t=="function"?fw:cw)(e,t,n??"")):Bi(this.node(),e)}function Bi(e,t){return e.style.getPropertyValue(t)||Gc(e).getComputedStyle(e,null).getPropertyValue(t)}function dw(e){return function(){delete this[e]}}function pw(e,t){return function(){this[e]=t}}function mw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Z1(e,t){return arguments.length>1?this.each((t==null?dw:typeof t=="function"?mw:pw)(e,t)):this.node()[e]}function j1(e){return e.trim().split(/^|\s+/)}function Hm(e){return e.classList||new $1(e)}function $1(e){this._node=e,this._names=j1(e.getAttribute("class")||"")}$1.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 Q1(e,t){for(var n=Hm(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function K1(e,t){for(var n=Hm(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function hw(e){return function(){Q1(this,e)}}function gw(e){return function(){K1(this,e)}}function yw(e,t){return function(){(t.apply(this,arguments)?Q1:K1)(this,e)}}function F1(e,t){var n=j1(e+"");if(arguments.length<2){for(var o=Hm(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?yw:t?hw:gw)(n,t))}function vw(){this.textContent=""}function bw(e){return function(){this.textContent=e}}function xw(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function W1(e){return arguments.length?this.each(e==null?vw:(typeof e=="function"?xw:bw)(e)):this.node().textContent}function Sw(){this.innerHTML=""}function _w(e){return function(){this.innerHTML=e}}function Ew(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function J1(e){return arguments.length?this.each(e==null?Sw:(typeof e=="function"?Ew:_w)(e)):this.node().innerHTML}function Tw(){this.nextSibling&&this.parentNode.appendChild(this)}function ex(){return this.each(Tw)}function Nw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tx(){return this.each(Nw)}function nx(e){var t=typeof e=="function"?e:Hc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Cw(){return null}function ox(e,t){var n=typeof e=="function"?e:Hc(e),o=t==null?Cw:typeof t=="function"?t:ma(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function ww(){var e=this.parentNode;e&&e.removeChild(this)}function ix(){return this.each(ww)}function Aw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Dw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ax(e){return this.select(e?Dw:Aw)}function lx(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Mw(e){return function(t){e.call(this,t,this.__data__)}}function Rw(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 Ow(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 zw(e,t,n){return function(){var o=this.__on,i,a=Mw(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 rx(e,t,n){var o=Rw(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?zw:Ow,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function sx(e,t,n){var o=Gc(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 Lw(e,t){return function(){return sx(this,e,t)}}function Bw(e,t){return function(){return sx(this,e,t.apply(this,arguments))}}function ux(e,t){return this.each((typeof t=="function"?Bw:Lw)(e,t))}function*cx(){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 km=[null];function nt(e,t){this._groups=e,this._parents=t}function fx(){return new nt([[document.documentElement]],km)}function Hw(){return this}nt.prototype=fx.prototype={constructor:nt,select:N1,selectAll:C1,selectChild:w1,selectChildren:A1,filter:D1,data:O1,enter:M1,exit:z1,join:L1,merge:B1,selection:Hw,order:H1,sort:k1,call:P1,nodes:G1,node:U1,size:I1,empty:V1,each:Y1,attr:X1,style:q1,property:Z1,classed:F1,text:W1,html:J1,raise:ex,lower:tx,append:nx,insert:ox,remove:ix,clone:ax,datum:lx,on:rx,dispatch:ux,[Symbol.iterator]:cx};var Qo=fx;function Tt(e){return typeof e=="string"?new nt([[document.querySelector(e)]],[document.documentElement]):new nt([[e]],km)}function dx(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xt(e,t){if(e=dx(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 px={passive:!1},ha={capture:!0,passive:!1};function Uc(e){e.stopImmediatePropagation()}function Hi(e){e.preventDefault(),e.stopImmediatePropagation()}function fs(e){var t=e.document.documentElement,n=Tt(e).on("dragstart.drag",Hi,ha);"onselectstart"in t?n.on("selectstart.drag",Hi,ha):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ds(e,t){var n=e.document.documentElement,o=Tt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Hi,ha),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 ps=e=>()=>e;function ms(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}})}ms.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function kw(e){return!e.ctrlKey&&!e.button}function Pw(){return this.parentNode}function Gw(e,t){return t??{x:e.x,y:e.y}}function Uw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ic(){var e=kw,t=Pw,n=Gw,o=Uw,i={},a=pa("start","drag","end"),l=0,r,s,u,c,d=0;function f(g){g.on("mousedown.drag",h).filter(o).on("touchstart.drag",x).on("touchmove.drag",p,px).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(g,S){if(!(c||!e.call(this,g,S))){var _=m(this,t.call(this,g,S),g,S,"mouse");_&&(Tt(g.view).on("mousemove.drag",y,ha).on("mouseup.drag",b,ha),fs(g.view),Uc(g),u=!1,r=g.clientX,s=g.clientY,_("start",g))}}function y(g){if(Hi(g),!u){var S=g.clientX-r,_=g.clientY-s;u=S*S+_*_>d}i.mouse("drag",g)}function b(g){Tt(g.view).on("mousemove.drag mouseup.drag",null),ds(g.view,u),Hi(g),i.mouse("end",g)}function x(g,S){if(e.call(this,g,S)){var _=g.changedTouches,E=t.call(this,g,S),N=_.length,w,k;for(w=0;w<N;++w)(k=m(this,E,g,S,_[w].identifier,_[w]))&&(Uc(g),k("start",g,_[w]))}}function p(g){var S=g.changedTouches,_=S.length,E,N;for(E=0;E<_;++E)(N=i[S[E].identifier])&&(Hi(g),N("drag",g,S[E]))}function v(g){var S=g.changedTouches,_=S.length,E,N;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<_;++E)(N=i[S[E].identifier])&&(Uc(g),N("end",g,S[E]))}function m(g,S,_,E,N,w){var k=a.copy(),M=Xt(w||_,S),z,U,T;if((T=n.call(g,new ms("beforestart",{sourceEvent:_,target:f,identifier:N,active:l,x:M[0],y:M[1],dx:0,dy:0,dispatch:k}),E))!=null)return z=T.x-M[0]||0,U=T.y-M[1]||0,function A(D,O,R){var L=M,I;switch(D){case"start":i[N]=A,I=l++;break;case"end":delete i[N],--l;case"drag":M=Xt(R||O,S),I=l;break}k.call(D,g,new ms(D,{sourceEvent:O,subject:T,target:f,identifier:N,active:I,x:M[0]+z,y:M[1]+U,dx:M[0]-L[0],dy:M[1]-L[1],dispatch:k}),E)}}return f.filter=function(g){return arguments.length?(e=typeof g=="function"?g:ps(!!g),f):e},f.container=function(g){return arguments.length?(t=typeof g=="function"?g:ps(g),f):t},f.subject=function(g){return arguments.length?(n=typeof g=="function"?g:ps(g),f):n},f.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:ps(!!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 Vc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pm(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function ys(){}var hs=.7,qc=1/hs,Cl="\\s*([+-]?\\d+)\\s*",gs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Iw=/^#([0-9a-f]{3,8})$/,Vw=new RegExp(`^rgb\\(${Cl},${Cl},${Cl}\\)$`),Yw=new RegExp(`^rgb\\(${bo},${bo},${bo}\\)$`),Xw=new RegExp(`^rgba\\(${Cl},${Cl},${Cl},${gs}\\)$`),qw=new RegExp(`^rgba\\(${bo},${bo},${bo},${gs}\\)$`),Zw=new RegExp(`^hsl\\(${gs},${bo},${bo}\\)$`),jw=new RegExp(`^hsla\\(${gs},${bo},${bo},${gs}\\)$`),mx={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};Vc(ys,to,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:hx,formatHex:hx,formatHex8:$w,formatHsl:Qw,formatRgb:gx,toString:gx});function hx(){return this.rgb().formatHex()}function $w(){return this.rgb().formatHex8()}function Qw(){return _x(this).formatHsl()}function gx(){return this.rgb().formatRgb()}function to(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Iw.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?yx(t):n===3?new rn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Yc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Yc(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=Vw.exec(e))?new rn(t[1],t[2],t[3],1):(t=Yw.exec(e))?new rn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Xw.exec(e))?Yc(t[1],t[2],t[3],t[4]):(t=qw.exec(e))?Yc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Zw.exec(e))?xx(t[1],t[2]/100,t[3]/100,1):(t=jw.exec(e))?xx(t[1],t[2]/100,t[3]/100,t[4]):mx.hasOwnProperty(e)?yx(mx[e]):e==="transparent"?new rn(NaN,NaN,NaN,0):null}function yx(e){return new rn(e>>16&255,e>>8&255,e&255,1)}function Yc(e,t,n,o){return o<=0&&(e=t=n=NaN),new rn(e,t,n,o)}function Kw(e){return e instanceof ys||(e=to(e)),e?(e=e.rgb(),new rn(e.r,e.g,e.b,e.opacity)):new rn}function wl(e,t,n,o){return arguments.length===1?Kw(e):new rn(e,t,n,o??1)}function rn(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Vc(rn,wl,Pm(ys,{brighter(e){return e=e==null?qc:Math.pow(qc,e),new rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hs:Math.pow(hs,e),new rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new rn(ya(this.r),ya(this.g),ya(this.b),Zc(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:vx,formatHex:vx,formatHex8:Fw,formatRgb:bx,toString:bx}));function vx(){return`#${ga(this.r)}${ga(this.g)}${ga(this.b)}`}function Fw(){return`#${ga(this.r)}${ga(this.g)}${ga(this.b)}${ga((isNaN(this.opacity)?1:this.opacity)*255)}`}function bx(){let e=Zc(this.opacity);return`${e===1?"rgb(":"rgba("}${ya(this.r)}, ${ya(this.g)}, ${ya(this.b)}${e===1?")":`, ${e})`}`}function Zc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ya(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ga(e){return e=ya(e),(e<16?"0":"")+e.toString(16)}function xx(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new eo(e,t,n,o)}function _x(e){if(e instanceof eo)return new eo(e.h,e.s,e.l,e.opacity);if(e instanceof ys||(e=to(e)),!e)return new eo;if(e instanceof eo)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 eo(l,r,s,e.opacity)}function Ex(e,t,n,o){return arguments.length===1?_x(e):new eo(e,t,n,o??1)}function eo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Vc(eo,Ex,Pm(ys,{brighter(e){return e=e==null?qc:Math.pow(qc,e),new eo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hs:Math.pow(hs,e),new eo(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 rn(Gm(e>=240?e-240:e+120,i,o),Gm(e,i,o),Gm(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new eo(Sx(this.h),Xc(this.s),Xc(this.l),Zc(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=Zc(this.opacity);return`${e===1?"hsl(":"hsla("}${Sx(this.h)}, ${Xc(this.s)*100}%, ${Xc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Sx(e){return e=(e||0)%360,e<0?e+360:e}function Xc(e){return Math.max(0,Math.min(1,e||0))}function Gm(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 Um(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 Tx(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 Um((n-o/t)*t,l,i,a,r)}}function Nx(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 Um((n-o/t)*t,i,a,l,r)}}var vs=e=>()=>e;function Ww(e,t){return function(n){return e+n*t}}function Jw(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 Cx(e){return(e=+e)==1?jc:function(t,n){return n-t?Jw(t,n,e):vs(isNaN(t)?n:t)}}function jc(e,t){var n=t-e;return n?Ww(e,n):vs(isNaN(e)?t:e)}var va=(function e(t){var n=Cx(t);function o(i,a){var l=n((i=wl(i)).r,(a=wl(a)).r),r=n(i.g,a.g),s=n(i.b,a.b),u=jc(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 wx(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=wl(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 eA=wx(Tx),tA=wx(Nx);function Ax(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 Dx(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Mx(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]=Ko(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 Rx(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function qt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Ox(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]=Ko(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Vm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Im=new RegExp(Vm.source,"g");function nA(e){return function(){return e}}function oA(e){return function(t){return e(t)+""}}function bs(e,t){var n=Vm.lastIndex=Im.lastIndex=0,o,i,a,l=-1,r=[],s=[];for(e=e+"",t=t+"";(o=Vm.exec(e))&&(i=Im.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:qt(o,i)})),n=Im.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?s[0]?oA(s[0].x):nA(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 Ko(e,t){var n=typeof t,o;return t==null||n==="boolean"?vs(t):(n==="number"?qt:n==="string"?(o=to(t))?(t=o,va):bs:t instanceof to?va:t instanceof Date?Rx:Dx(t)?Ax:Array.isArray(t)?Mx:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Ox:qt)(e,t)}var zx=180/Math.PI,$c={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ym(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)*zx,skewX:Math.atan(s)*zx,scaleX:l,scaleY:r}}var Qc;function Lx(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?$c:Ym(t.a,t.b,t.c,t.d,t.e,t.f)}function Bx(e){return e==null?$c:(Qc||(Qc=document.createElementNS("http://www.w3.org/2000/svg","g")),Qc.setAttribute("transform",e),(e=Qc.transform.baseVal.consolidate())?(e=e.matrix,Ym(e.a,e.b,e.c,e.d,e.e,e.f)):$c)}function Hx(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:qt(u,d)},{i:b-2,x:qt(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:qt(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:qt(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:qt(u,d)},{i:b-2,x:qt(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,x;++y<b;)d[(x=f[y]).i]=x.x(h);return d.join("")}}}var Xm=Hx(Lx,"px, ","px)","deg)"),qm=Hx(Bx,", ",")",")");var iA=1e-12;function kx(e){return((e=Math.exp(e))+1/e)/2}function aA(e){return((e=Math.exp(e))-1/e)/2}function lA(e){return((e=Math.exp(2*e))-1)/(e+1)}var ba=(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,x,p;if(b<iA)p=Math.log(f/u)/t,x=function(E){return[r+E*h,s+E*y,u*Math.exp(t*E*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),S=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(g*g+1)-g);p=(_-S)/t,x=function(E){var N=E*p,w=kx(S),k=u/(n*v)*(w*lA(t*N+S)-aA(S));return[r+k*h,s+k*y,u*w/kx(t*N+S)]}}return x.duration=p*1e3*t/Math.SQRT2,x}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 Al=0,Ss=0,xs=0,Gx=1e3,Kc,_s,Fc=0,xa=0,Wc=0,Es=typeof performance=="object"&&performance.now?performance:Date,Ux=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ns(){return xa||(Ux(rA),xa=Es.now()+Wc)}function rA(){xa=0}function Ts(){this._call=this._time=this._next=null}Ts.prototype=Jc.prototype={constructor:Ts,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Ns():+n)+(t==null?0:+t),!this._next&&_s!==this&&(_s?_s._next=this:Kc=this,_s=this),this._call=e,this._time=n,Zm()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zm())}};function Jc(e,t,n){var o=new Ts;return o.restart(e,t,n),o}function Ix(){Ns(),++Al;for(var e=Kc,t;e;)(t=xa-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Al}function Px(){xa=(Fc=Es.now())+Wc,Al=Ss=0;try{Ix()}finally{Al=0,uA(),xa=0}}function sA(){var e=Es.now(),t=e-Fc;t>Gx&&(Wc-=t,Fc=e)}function uA(){for(var e,t=Kc,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:Kc=n);_s=e,Zm(o)}function Zm(e){if(!Al){Ss&&(Ss=clearTimeout(Ss));var t=e-xa;t>24?(e<1/0&&(Ss=setTimeout(Px,e-Es.now()-Wc)),xs&&(xs=clearInterval(xs))):(xs||(Fc=Es.now(),xs=setInterval(sA,Gx)),Al=1,Ux(Px))}}function ef(e,t,n){var o=new Ts;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var cA=pa("start","end","cancel","interrupt"),fA=[],Xx=0,Vx=1,nf=2,tf=3,Yx=4,of=5,Cs=6;function ki(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;dA(e,n,{name:t,index:o,group:i,on:cA,tween:fA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Xx})}function ws(e,t){var n=yt(e,t);if(n.state>Xx)throw new Error("too late; already scheduled");return n}function Rt(e,t){var n=yt(e,t);if(n.state>tf)throw new Error("too late; already running");return n}function yt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function dA(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Jc(a,0,n.time);function a(u){n.state=Vx,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!==Vx)return s();for(c in o)if(h=o[c],h.name===n.name){if(h.state===tf)return ef(l);h.state===Yx?(h.state=Cs,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Cs,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(ef(function(){n.state===tf&&(n.state=Yx,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=nf,n.on.call("start",e,e.__data__,n.index,n.group),n.state===nf){for(n.state=tf,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=of,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===of&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=Cs,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Sa(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>nf&&o.state<of,o.state=Cs,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function qx(e){return this.each(function(){Sa(this,e)})}function pA(e,t){var n,o;return function(){var i=Rt(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 mA(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=Rt(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 Zx(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=yt(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?pA:mA)(n,e,t))}function Dl(e,t,n){var o=e._id;return e.each(function(){var i=Rt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return yt(i,o).value[t]}}function af(e,t){var n;return(typeof t=="number"?qt:t instanceof to?va:(n=to(t))?(t=n,va):bs)(e,t)}function hA(e){return function(){this.removeAttribute(e)}}function gA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yA(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 vA(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 bA(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 xA(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 jx(e,t){var n=$o(e),o=n==="transform"?qm:af;return this.attrTween(e,typeof t=="function"?(n.local?xA:bA)(n,o,Dl(this,"attr."+e,t)):t==null?(n.local?gA:hA)(n):(n.local?vA:yA)(n,o,t))}function SA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function _A(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function EA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&_A(e,a)),n}return i._value=t,i}function TA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&SA(e,a)),n}return i._value=t,i}function $x(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=$o(e);return this.tween(n,(o.local?EA:TA)(o,t))}function NA(e,t){return function(){ws(this,e).delay=+t.apply(this,arguments)}}function CA(e,t){return t=+t,function(){ws(this,e).delay=t}}function Qx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?NA:CA)(t,e)):yt(this.node(),t).delay}function wA(e,t){return function(){Rt(this,e).duration=+t.apply(this,arguments)}}function AA(e,t){return t=+t,function(){Rt(this,e).duration=t}}function Kx(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?wA:AA)(t,e)):yt(this.node(),t).duration}function DA(e,t){if(typeof t!="function")throw new Error;return function(){Rt(this,e).ease=t}}function Fx(e){var t=this._id;return arguments.length?this.each(DA(t,e)):yt(this.node(),t).ease}function MA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Rt(this,e).ease=n}}function Wx(e){if(typeof e!="function")throw new Error;return this.each(MA(this._id,e))}function Jx(e){typeof e!="function"&&(e=us(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 Zt(o,this._parents,this._name,this._id)}function eS(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 Zt(l,this._parents,this._name,this._id)}function RA(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 OA(e,t,n){var o,i,a=RA(t)?ws:Rt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function tS(e,t){var n=this._id;return arguments.length<2?yt(this.node(),n).on.on(e):this.each(OA(n,e,t))}function zA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function nS(){return this.on("end.remove",zA(this._id))}function oS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ma(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,ki(u[f],t,n,f,u,yt(c,n)));return new Zt(a,this._parents,t,n)}function iS(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ss(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=yt(c,n),b=0,x=f.length;b<x;++b)(h=f[b])&&ki(h,t,n,b,f,y);a.push(f),l.push(c)}return new Zt(a,l,t,n)}var LA=Qo.prototype.constructor;function aS(){return new LA(this._groups,this._parents)}function BA(e,t){var n,o,i;return function(){var a=Bi(this,e),l=(this.style.removeProperty(e),Bi(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function lS(e){return function(){this.style.removeProperty(e)}}function HA(e,t,n){var o,i=n+"",a;return function(){var l=Bi(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function kA(e,t,n){var o,i,a;return function(){var l=Bi(this,e),r=n(this),s=r+"";return r==null&&(s=r=(this.style.removeProperty(e),Bi(this,e))),l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r))}}function PA(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var s=Rt(this,e),u=s.on,c=s.value[a]==null?r||(r=lS(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(l,i=c),s.on=o}}function rS(e,t,n){var o=(e+="")=="transform"?Xm:af;return t==null?this.styleTween(e,BA(e,o)).on("end.style."+e,lS(e)):typeof t=="function"?this.styleTween(e,kA(e,o,Dl(this,"style."+e,t))).each(PA(this._id,e)):this.styleTween(e,HA(e,o,t),n).on("end.style."+e,null)}function GA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function UA(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&GA(e,l,n)),o}return a._value=t,a}function sS(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,UA(e,t,n??""))}function IA(e){return function(){this.textContent=e}}function VA(e){return function(){var t=e(this);this.textContent=t??""}}function uS(e){return this.tween("text",typeof e=="function"?VA(Dl(this,"text",e)):IA(e==null?"":e+""))}function YA(e){return function(t){this.textContent=e.call(this,t)}}function XA(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&YA(i)),t}return o._value=e,o}function cS(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,XA(e))}function fS(){for(var e=this._name,t=this._id,n=lf(),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=yt(s,t);ki(s,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Zt(o,this._parents,e,n)}function dS(){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=Rt(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 qA=0;function Zt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function pS(e){return Qo().transition(e)}function lf(){return++qA}var Fo=Qo.prototype;Zt.prototype=pS.prototype={constructor:Zt,select:oS,selectAll:iS,selectChild:Fo.selectChild,selectChildren:Fo.selectChildren,filter:Jx,merge:eS,selection:aS,transition:fS,call:Fo.call,nodes:Fo.nodes,node:Fo.node,size:Fo.size,empty:Fo.empty,each:Fo.each,on:tS,attr:jx,attrTween:$x,style:rS,styleTween:sS,text:uS,textTween:cS,remove:nS,tween:Zx,delay:Qx,duration:Kx,ease:Fx,easeVarying:Wx,end:dS,[Symbol.iterator]:Fo[Symbol.iterator]};function rf(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ZA={time:null,delay:0,duration:250,ease:rf};function jA(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 mS(e){var t,n;e instanceof Zt?(t=e._id,e=e._name):(t=lf(),(n=ZA).time=Ns(),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])&&ki(s,e,t,u,l,n||jA(s,t));return new Zt(o,this._parents,e,t)}Qo.prototype.interrupt=qx;Qo.prototype.transition=mS;var As=e=>()=>e;function jm(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 no(e,t,n){this.k=e,this.x=t,this.y=n}no.prototype={constructor:no,scale:function(e){return e===1?this:new no(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new no(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 _a=new no(1,0,0);Ds.prototype=no.prototype;function Ds(e){for(;!e.__zoom;)if(!(e=e.parentNode))return _a;return e.__zoom}function sf(e){e.stopImmediatePropagation()}function Ml(e){e.preventDefault(),e.stopImmediatePropagation()}function $A(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function QA(){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 hS(){return this.__zoom||_a}function KA(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function FA(){return navigator.maxTouchPoints||"ontouchstart"in this}function WA(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 uf(){var e=$A,t=QA,n=WA,o=KA,i=FA,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,s=ba,u=pa("start","zoom","end"),c,d,f,h=500,y=150,b=0,x=10;function p(T){T.property("__zoom",hS).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",k).filter(i).on("touchstart.zoom",M).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(T,A,D,O){var R=T.selection?T.selection():T;R.property("__zoom",hS),T!==R?S(T,A,D,O):R.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},p.scaleBy=function(T,A,D,O){p.scaleTo(T,function(){var R=this.__zoom.k,L=typeof A=="function"?A.apply(this,arguments):A;return R*L},D,O)},p.scaleTo=function(T,A,D,O){p.transform(T,function(){var R=t.apply(this,arguments),L=this.__zoom,I=D==null?g(R):typeof D=="function"?D.apply(this,arguments):D,P=L.invert(I),V=typeof A=="function"?A.apply(this,arguments):A;return n(m(v(L,V),I,P),R,l)},D,O)},p.translateBy=function(T,A,D,O){p.transform(T,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),l)},null,O)},p.translateTo=function(T,A,D,O,R){p.transform(T,function(){var L=t.apply(this,arguments),I=this.__zoom,P=O==null?g(L):typeof O=="function"?O.apply(this,arguments):O;return n(_a.translate(P[0],P[1]).scale(I.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof D=="function"?-D.apply(this,arguments):-D),L,l)},O,R)};function v(T,A){return A=Math.max(a[0],Math.min(a[1],A)),A===T.k?T:new no(A,T.x,T.y)}function m(T,A,D){var O=A[0]-D[0]*T.k,R=A[1]-D[1]*T.k;return O===T.x&&R===T.y?T:new no(T.k,O,R)}function g(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function S(T,A,D,O){T.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,L=arguments,I=_(R,L).event(O),P=t.apply(R,L),V=D==null?g(P):typeof D=="function"?D.apply(R,L):D,q=Math.max(P[1][0]-P[0][0],P[1][1]-P[0][1]),j=R.__zoom,Z=typeof A=="function"?A.apply(R,L):A,re=s(j.invert(V).concat(q/j.k),Z.invert(V).concat(q/Z.k));return function(ne){if(ne===1)ne=Z;else{var X=re(ne),F=q/X[2];ne=new no(F,V[0]-X[0]*F,V[1]-X[1]*F)}I.zoom(null,ne)}})}function _(T,A,D){return!D&&T.__zooming||new E(T,A)}function E(T,A){this.that=T,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,A),this.taps=0}E.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,A){return this.mouse&&T!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var A=Tt(this.that).datum();u.call(T,this.that,new jm(T,{sourceEvent:this.sourceEvent,target:p,type:T,transform:this.that.__zoom,dispatch:u}),A)}};function N(T,...A){if(!e.apply(this,arguments))return;var D=_(this,A).event(T),O=this.__zoom,R=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),L=Xt(T);if(D.wheel)(D.mouse[0][0]!==L[0]||D.mouse[0][1]!==L[1])&&(D.mouse[1]=O.invert(D.mouse[0]=L)),clearTimeout(D.wheel);else{if(O.k===R)return;D.mouse=[L,O.invert(L)],Sa(this),D.start()}Ml(T),D.wheel=setTimeout(I,y),D.zoom("mouse",n(m(v(O,R),D.mouse[0],D.mouse[1]),D.extent,l));function I(){D.wheel=null,D.end()}}function w(T,...A){if(f||!e.apply(this,arguments))return;var D=T.currentTarget,O=_(this,A,!0).event(T),R=Tt(T.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",q,!0),L=Xt(T,D),I=T.clientX,P=T.clientY;fs(T.view),sf(T),O.mouse=[L,this.__zoom.invert(L)],Sa(this),O.start();function V(j){if(Ml(j),!O.moved){var Z=j.clientX-I,re=j.clientY-P;O.moved=Z*Z+re*re>b}O.event(j).zoom("mouse",n(m(O.that.__zoom,O.mouse[0]=Xt(j,D),O.mouse[1]),O.extent,l))}function q(j){R.on("mousemove.zoom mouseup.zoom",null),ds(j.view,O.moved),Ml(j),O.event(j).end()}}function k(T,...A){if(e.apply(this,arguments)){var D=this.__zoom,O=Xt(T.changedTouches?T.changedTouches[0]:T,this),R=D.invert(O),L=D.k*(T.shiftKey?.5:2),I=n(m(v(D,L),O,R),t.apply(this,A),l);Ml(T),r>0?Tt(this).transition().duration(r).call(S,I,O,T):Tt(this).call(p.transform,I,O,T)}}function M(T,...A){if(e.apply(this,arguments)){var D=T.touches,O=D.length,R=_(this,A,T.changedTouches.length===O).event(T),L,I,P,V;for(sf(T),I=0;I<O;++I)P=D[I],V=Xt(P,this),V=[V,this.__zoom.invert(V),P.identifier],R.touch0?!R.touch1&&R.touch0[2]!==V[2]&&(R.touch1=V,R.taps=0):(R.touch0=V,L=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(R.taps<2&&(d=V[0],c=setTimeout(function(){c=null},h)),Sa(this),R.start())}}function z(T,...A){if(this.__zooming){var D=_(this,A).event(T),O=T.changedTouches,R=O.length,L,I,P,V;for(Ml(T),L=0;L<R;++L)I=O[L],P=Xt(I,this),D.touch0&&D.touch0[2]===I.identifier?D.touch0[0]=P:D.touch1&&D.touch1[2]===I.identifier&&(D.touch1[0]=P);if(I=D.that.__zoom,D.touch1){var q=D.touch0[0],j=D.touch0[1],Z=D.touch1[0],re=D.touch1[1],ne=(ne=Z[0]-q[0])*ne+(ne=Z[1]-q[1])*ne,X=(X=re[0]-j[0])*X+(X=re[1]-j[1])*X;I=v(I,Math.sqrt(ne/X)),P=[(q[0]+Z[0])/2,(q[1]+Z[1])/2],V=[(j[0]+re[0])/2,(j[1]+re[1])/2]}else if(D.touch0)P=D.touch0[0],V=D.touch0[1];else return;D.zoom("touch",n(m(I,P,V),D.extent,l))}}function U(T,...A){if(this.__zooming){var D=_(this,A).event(T),O=T.changedTouches,R=O.length,L,I;for(sf(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),L=0;L<R;++L)I=O[L],D.touch0&&D.touch0[2]===I.identifier?delete D.touch0:D.touch1&&D.touch1[2]===I.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&&(I=Xt(I,this),Math.hypot(d[0]-I[0],d[1]-I[1])<x)){var P=Tt(this).on("dblclick.zoom");P&&P.apply(this,arguments)}}}return p.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:As(+T),p):o},p.filter=function(T){return arguments.length?(e=typeof T=="function"?T:As(!!T),p):e},p.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:As(!!T),p):i},p.extent=function(T){return arguments.length?(t=typeof T=="function"?T:As([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),p):t},p.scaleExtent=function(T){return arguments.length?(a[0]=+T[0],a[1]=+T[1],p):[a[0],a[1]]},p.translateExtent=function(T){return arguments.length?(l[0][0]=+T[0][0],l[1][0]=+T[1][0],l[0][1]=+T[0][1],l[1][1]=+T[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(T){return arguments.length?(n=T,p):n},p.duration=function(T){return arguments.length?(r=+T,p):r},p.interpolate=function(T){return arguments.length?(s=T,p):s},p.on=function(){var T=u.on.apply(u,arguments);return T===u?p:T},p.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,p):Math.sqrt(b)},p.tapDistance=function(T){return arguments.length?(x=+T,p):x},p}var Cn={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."},Hl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Wm=["Enter"," ","Escape"],Jm={"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"},Ui;(function(e){e.Strict="strict",e.Loose="loose"})(Ui||(Ui={}));var Wo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Wo||(Wo={}));var Ea;(function(e){e.Partial="partial",e.Full="full"})(Ea||(Ea={}));var eh={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},xo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(xo||(xo={}));var zl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(zl||(zl={}));var te;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(te||(te={}));var gS={[te.Left]:te.Right,[te.Right]:te.Left,[te.Top]:te.Bottom,[te.Bottom]:te.Top};function th(e){return e===null?null:e?"valid":"invalid"}var nh=e=>"id"in e&&"source"in e&&"target"in e,DS=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),oh=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var Os=(e,t=[0,0])=>{let{width:n,height:o}=So(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},ih=(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):oh(i)?i:t.nodeLookup.get(i.id));let r=l?df(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return mf(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return hf(n)},kl=(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=mf(n,df(i)),o=!0)}),o?hf(n):{x:0,y:0,width:0,height:0}},pf=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...Ul(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=Pl(r,Na(u)),x=(h??0)*(y??0),p=a&&b>0;(!u.internals.handleBounds||p||b>=x||u.dragging)&&s.push(u)}return s},MS=(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 JA(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 RS({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=JA(e,l),s=kl(r),u=zs(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 ah({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",Cn.error005());else{let h=r.measured.width,y=r.measured.height;h&&y&&(d=[[s,u],[s+h,u+y]])}else r&&Bl(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=Bl(d)?Ta(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",Cn.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 OS({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=MS(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 Ll=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ta=(e={x:0,y:0},t,n)=>({x:Ll(e.x,t[0][0],t[1][0]-(n?.width??0)),y:Ll(e.y,t[0][1],t[1][1]-(n?.height??0))});function zS(e,t,n){let{width:o,height:i}=So(n),{x:a,y:l}=n.internals.positionAbsolute;return Ta(e,[[a,l],[a+o,l+i]],t)}var yS=(e,t,n)=>e<t?Ll(Math.abs(e-t),1,t)/t:e>n?-Ll(Math.abs(e-n),1,t)/t:0,LS=(e,t,n=15,o=40)=>{let i=yS(e.x,o,t.width-o)*n,a=yS(e.y,o,t.height-o)*n;return[i,a]},mf=(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)}),Fm=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),hf=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),Na=(e,t=[0,0])=>{let{x:n,y:o}=oh(e)?e.internals.positionAbsolute:Os(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}},df=(e,t=[0,0])=>{let{x:n,y:o}=oh(e)?e.internals.positionAbsolute:Os(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)}},lh=(e,t)=>hf(mf(Fm(e),Fm(t))),Pl=(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)},rh=e=>Xn(e.width)&&Xn(e.height)&&Xn(e.x)&&Xn(e.y),Xn=e=>!isNaN(e)&&isFinite(e),sh=(e,t)=>{},Gl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Ul=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?Gl(r,l):r},Rs=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function Rl(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 eD(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=Rl(e,n),i=Rl(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=Rl(e.top??e.y??0,n),i=Rl(e.bottom??e.y??0,n),a=Rl(e.left??e.x??0,t),l=Rl(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 tD(e,t,n,o,i,a){let{x:l,y:r}=Rs(e,[t,n,o]),{x:s,y:u}=Rs({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 zs=(e,t,n,o,i,a)=>{let l=eD(a,t,n),r=(t-l.x)/e.width,s=(n-l.y)/e.height,u=Math.min(r,s),c=Ll(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=tD(e,h,y,c,t,n),x={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-x.left+x.right,y:y-x.top+x.bottom,zoom:c}},Il=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Bl(e){return e!=null&&e!=="parent"}function So(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function uh(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function ch(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 fh(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function BS(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function HS(e){return{...Jm,...e||{}}}function Ms(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=qn(e),r=Ul({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:s,y:u}=n?Gl(r,t):r;return{xSnapped:s,ySnapped:u,...r}}var gf=e=>({width:e.offsetWidth,height:e.offsetHeight}),dh=e=>e?.getRootNode?.()||window?.document,nD=["INPUT","SELECT","TEXTAREA"];function ph(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:nD.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var mh=e=>"clientX"in e,qn=(e,t)=>{let n=mh(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)}},vS=(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,...gf(l)}})};function yf({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 cf(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function bS({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case te.Left:return[t-cf(t-o,a),n];case te.Right:return[t+cf(o-t,a),n];case te.Top:return[t,n-cf(n-i,a)];case te.Bottom:return[t,n+cf(i-n,a)]}}function vf({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:o,targetY:i,targetPosition:a=te.Top,curvature:l=.25}){let[r,s]=bS({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[u,c]=bS({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,h,y]=yf({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 hh({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 kS({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 PS({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=mf(df(e),df(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 Pl(l,hf(a))>0}var oD=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,iD=(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)),gh=(e,t,n={})=>{if(!e.source||!e.target)return sh("006",Cn.error006()),t;let o=n.getEdgeId||oD,i;return nh(e)?i={...e}:i={...e,id:o(e)},iD(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function bf({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=hh({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,i,a,l,r]}var xS={[te.Left]:{x:-1,y:0},[te.Right]:{x:1,y:0},[te.Top]:{x:0,y:-1},[te.Bottom]:{x:0,y:1}},aD=({source:e,sourcePosition:t=te.Bottom,target:n})=>t===te.Left||t===te.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},SS=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function lD({source:e,sourcePosition:t=te.Bottom,target:n,targetPosition:o=te.Top,center:i,offset:a,stepPosition:l}){let r=xS[t],s=xS[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=aD({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f],y=[],b,x,p={x:0,y:0},v={x:0,y:0},[,,m,g]=hh({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,x=i.y??(u.y+c.y)/2):(b=i.x??(u.x+c.x)/2,x=i.y??u.y+(c.y-u.y)*l);let _=[{x:b,y:u.y},{x:b,y:c.y}],E=[{x:u.x,y:x},{x:c.x,y:x}];r[f]===h?y=f==="x"?_:E:y=f==="x"?E:_}else{let _=[{x:u.x,y:c.y}],E=[{x:c.x,y:u.y}];if(f==="x"?y=r.x===h?E:_:y=r.y===h?_:E,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let U=Math.min(a-1,a-z);r[f]===h?p[f]=(u[f]>e[f]?-1:1)*U:v[f]=(c[f]>n[f]?-1:1)*U}}if(t!==o){let z=f==="x"?"y":"x",U=r[f]===s[z],T=u[z]>c[z],A=u[z]<c[z];(r[f]===1&&(!U&&T||U&&A)||r[f]!==1&&(!U&&A||U&&T))&&(y=f==="x"?_:E)}let N={x:u.x+p.x,y:u.y+p.y},w={x:c.x+v.x,y:c.y+v.y},k=Math.max(Math.abs(N.x-y[0].x),Math.abs(w.x-y[0].x)),M=Math.max(Math.abs(N.y-y[0].y),Math.abs(w.y-y[0].y));k>=M?(b=(N.x+w.x)/2,x=y[0].y):(b=y[0].x,x=(N.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,x,m,g]}function rD(e,t,n,o){let i=Math.min(SS(e,t)/2,SS(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 Ls({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:o,targetY:i,targetPosition:a=te.Top,borderRadius:l=5,centerX:r,centerY:s,offset:u=20,stepPosition:c=.5}){let[d,f,h,y,b]=lD({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=rD(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 _S(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function GS(e){let{sourceNode:t,targetNode:n}=e;if(!_S(t)||!_S(n))return null;let o=t.internals.handleBounds||ES(t.handles),i=n.internals.handleBounds||ES(n.handles),a=TS(o?.source??[],e.sourceHandle),l=TS(e.connectionMode===Ui.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",Cn.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let r=a?.position||te.Bottom,s=l?.position||te.Top,u=Ii(t,a,r),c=Ii(n,l,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:s}}function ES(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 Ii(e,t,n=te.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??So(e);if(o)return{x:i+l/2,y:a+r/2};switch(t?.position??n){case te.Top:return{x:i+l/2,y:a};case te.Right:return{x:i+l,y:a+r/2};case te.Bottom:return{x:i+l/2,y:a+r};case te.Left:return{x:i,y:a+r/2}}}function TS(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function xf(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function US(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=xf(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 IS=1e3,sD=10,yh={nodeOrigin:[0,0],nodeExtent:Hl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},uD={...yh,checkEquality:!0};function vh(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function VS(e,t,n){let o=vh(yh,n);for(let i of e.values())if(i.parentId)xh(i,e,t,o);else{let a=Os(i,o.nodeOrigin),l=Bl(i.extent)?i.extent:o.nodeExtent,r=Ta(a,l,So(i));i.internals.positionAbsolute=r}}function cD(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 bh(e){return e==="manual"}function Sf(e,t,n,o={}){let i=vh(uD,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!bh(i.zIndexMode)?IS: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=Os(u,i.nodeOrigin),f=Bl(u.extent)?u.extent:i.nodeExtent,h=Ta(d,f,So(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:cD(u,c),z:YS(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&&xh(c,t,n,o,a)}return s}function fD(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 xh(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:s}=vh(yh,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}fD(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*sD),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!bh(s)?IS:0,{x:f,y:h,z:y}=dD(e,c,l,r,d,s),{positionAbsolute:b}=e.internals,x=f!==b.x||h!==b.y;(x||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:f,y:h}:b,z:y}})}function YS(e,t,n){let o=Xn(e.zIndex)?e.zIndex:0;return bh(n)?o:o+(e.selected?t:0)}function dD(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,s=So(e),u=Os(e,n),c=Bl(e.extent)?Ta(u,e.extent,s):u,d=Ta({x:l+c.x,y:r+c.y},o,s);e.extent==="parent"&&(d=zS(d,s,t));let f=YS(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function _f(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??Na(r),u=lh(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=So(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)),x=(y-c.width)*d[0],p=(b-c.height)*d[1];(f>0||h>0||x||p)&&(i.push({id:s,type:"position",position:{x:r.position.x-f+x,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-x:0),height:b+(h?d[1]*h-p:0)}})}),i}function XS(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=gf(h.nodeElement),x=y.measured.width!==b.width||y.measured.height!==b.height;if(!!(b.width&&b.height&&(x||!y.internals.handleBounds||h.force))){let v=h.nodeElement.getBoundingClientRect(),m=Bl(y.extent)?y.extent:a,{positionAbsolute:g}=y.internals;y.parentId&&y.extent==="parent"?g=zS(g,b,t.get(y.parentId)):m&&(g=Ta(g,m,b));let S={...y,measured:b,internals:{...y.internals,positionAbsolute:g,handleBounds:{source:vS("source",h.nodeElement,v,d,y.id),target:vS("target",h.nodeElement,v,d,y.id)}}};t.set(y.id,S),y.parentId&&xh(S,t,n,{nodeOrigin:i,zIndexMode:l}),s=!0,x&&(u.push({id:y.id,type:"dimensions",dimensions:b}),y.expandParent&&y.parentId&&f.push({id:y.id,parentId:y.parentId,rect:Na(S,i)}))}}if(f.length>0){let h=_f(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:s}}async function qS({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 NS(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 Sh(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}`;NS("source",s,c,e,i,l),NS("target",s,u,e,a,r),t.set(o.id,o)}}function ZS(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:ZS(n,t):!1}function CS(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 pD(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!ZS(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 $m({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 mD({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=Gl(a,t);return{x:l.x-a.x,y:l.y-a.y}}function jS({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 x({noDragClassName:v,handleSelector:m,domNode:g,isSelectable:S,nodeId:_,nodeClickDistance:E=0}){f=Tt(g);function N({x:z,y:U}){let{nodeLookup:T,nodeExtent:A,snapGrid:D,snapToGrid:O,nodeOrigin:R,onNodeDrag:L,onSelectionDrag:I,onError:P,updateNodePositions:V}=t();a={x:z,y:U};let q=!1,j=r.size>1,Z=j&&A?Fm(kl(r)):null,re=j&&O?mD({dragItems:r,snapGrid:D,x:z,y:U}):null;for(let[ne,X]of r){if(!T.has(ne))continue;let F={x:z-X.distance.x,y:U-X.distance.y};O&&(F=re?{x:Math.round(F.x+re.x),y:Math.round(F.y+re.y)}:Gl(F,D));let ge=null;if(j&&A&&!X.extent&&Z){let{positionAbsolute:ee}=X.internals,de=ee.x-Z.x+A[0][0],be=ee.x+X.measured.width-Z.x2+A[1][0],Ae=ee.y-Z.y+A[0][1],Ie=ee.y+X.measured.height-Z.y2+A[1][1];ge=[[de,Ae],[be,Ie]]}let{position:se,positionAbsolute:J}=ah({nodeId:ne,nextPosition:F,nodeLookup:T,nodeExtent:ge||A,nodeOrigin:R,onError:P});q=q||X.position.x!==se.x||X.position.y!==se.y,X.position=se,X.internals.positionAbsolute=J}if(y=y||q,!!q&&(V(r,!0),b&&(o||L||!_&&I))){let[ne,X]=$m({nodeId:_,dragItems:r,nodeLookup:T});o?.(b,r,ne,X),L?.(b,ne,X),_||I?.(b,X)}}async function w(){if(!c)return;let{transform:z,panBy:U,autoPanSpeed:T,autoPanOnNodeDrag:A}=t();if(!A){s=!1,cancelAnimationFrame(l);return}let[D,O]=LS(u,c,T);(D!==0||O!==0)&&(a.x=(a.x??0)-D/z[2],a.y=(a.y??0)-O/z[2],await U({x:D,y:O})&&N(a)),l=requestAnimationFrame(w)}function k(z){let{nodeLookup:U,multiSelectionActive:T,nodesDraggable:A,transform:D,snapGrid:O,snapToGrid:R,selectNodesOnDrag:L,onNodeDragStart:I,onSelectionDragStart:P,unselectNodesAndEdges:V}=t();d=!0,(!L||!S)&&!T&&_&&(U.get(_)?.selected||V()),S&&L&&_&&e?.(_);let q=Ms(z.sourceEvent,{transform:D,snapGrid:O,snapToGrid:R,containerBounds:c});if(a=q,r=pD(U,A,q,_),r.size>0&&(n||I||!_&&P)){let[j,Z]=$m({nodeId:_,dragItems:r,nodeLookup:U});n?.(z.sourceEvent,r,j,Z),I?.(z.sourceEvent,j,Z),_||P?.(z.sourceEvent,Z)}}let M=Ic().clickDistance(E).on("start",z=>{let{domNode:U,nodeDragThreshold:T,transform:A,snapGrid:D,snapToGrid:O}=t();c=U?.getBoundingClientRect()||null,h=!1,y=!1,b=z.sourceEvent,T===0&&k(z),a=Ms(z.sourceEvent,{transform:A,snapGrid:D,snapToGrid:O,containerBounds:c}),u=qn(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:U,transform:T,snapGrid:A,snapToGrid:D,nodeDragThreshold:O,nodeLookup:R}=t(),L=Ms(z.sourceEvent,{transform:T,snapGrid:A,snapToGrid:D,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!R.has(_))&&(h=!0),!h){if(!s&&U&&d&&(s=!0,w()),!d){let I=qn(z.sourceEvent,c),P=I.x-u.x,V=I.y-u.y;Math.sqrt(P*P+V*V)>O&&k(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&r&&d&&(u=qn(z.sourceEvent,c),N(L))}}).on("end",z=>{if(!(!d||h)&&(s=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:U,updateNodePositions:T,onNodeDragStop:A,onSelectionDragStop:D}=t();if(y&&(T(r,!1),y=!1),i||A||!_&&D){let[O,R]=$m({nodeId:_,dragItems:r,nodeLookup:U,dragging:!1});i?.(z.sourceEvent,r,O,R),A?.(z.sourceEvent,O,R),_||D?.(z.sourceEvent,R)}}}).filter(z=>{let U=z.target;return!z.button&&(!v||!CS(U,`.${v}`,g))&&(!m||CS(U,m,g))});f.call(M)}function p(){f?.on(".drag",null)}return{update:x,destroy:p}}function hD(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())Pl(i,Na(a))>0&&o.push(a);return o}var gD=250;function yD(e,t,n,o){let i=[],a=1/0,l=hD(e,n,t+gD);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}=Ii(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 $S(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,...Ii(l,s,s.position,!0)}:s}function QS(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function vD(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var KS=()=>!0;function bD(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:x,isValidConnection:p=KS,onReconnectEnd:v,updateConnection:m,getTransform:g,getFromHandle:S,autoPanSpeed:_,dragThreshold:E=1,handleDomNode:N}){let w=dh(e.target),k=0,M,{x:z,y:U}=qn(e),T=QS(a,N),A=r?.getBoundingClientRect(),D=!1;if(!A||!T)return;let O=$S(i,T,o,s,t);if(!O)return;let R=qn(e,A),L=!1,I=null,P=!1,V=null;function q(){if(!c||!A)return;let[se,J]=LS(R,A,_);f({x:se,y:J}),k=requestAnimationFrame(q)}let j={...O,nodeId:i,type:T,position:O.position},Z=s.get(i),ne={inProgress:!0,isValid:null,from:Ii(Z,j,te.Left,!0),fromHandle:j,fromPosition:j.position,fromNode:Z,to:R,toHandle:null,toPosition:gS[j.position],toNode:null,pointer:R};function X(){D=!0,m(ne),y?.(e,{nodeId:i,handleId:o,handleType:T})}E===0&&X();function F(se){if(!D){let{x:Ie,y:He}=qn(se),ct=Ie-z,ft=He-U;if(!(ct*ct+ft*ft>E*E))return;X()}if(!S()||!j){ge(se);return}let J=g();R=qn(se,A),M=yD(Ul(R,J,!1,[1,1]),n,s,j),L||(q(),L=!0);let ee=FS(se,{handle:M,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:p,doc:w,lib:u,flowId:d,nodeLookup:s});V=ee.handleDomNode,I=ee.connection,P=vD(!!M,ee.isValid);let de=s.get(i),be=de?Ii(de,j,te.Left,!0):ne.from,Ae={...ne,from:be,isValid:P,to:ee.toHandle&&P?Rs({x:ee.toHandle.x,y:ee.toHandle.y},J):R,toHandle:ee.toHandle,toPosition:P&&ee.toHandle?ee.toHandle.position:gS[j.position],toNode:ee.toHandle?s.get(ee.toHandle.nodeId):null,pointer:R};m(Ae),ne=Ae}function ge(se){if(!("touches"in se&&se.touches.length>0)){if(D){(M||V)&&I&&P&&b?.(I);let{inProgress:J,...ee}=ne,de={...ee,toPosition:ne.toHandle?ne.toPosition:null};x?.(se,de),a&&v?.(se,de)}h(),cancelAnimationFrame(k),L=!1,P=!1,I=null,V=null,w.removeEventListener("mousemove",F),w.removeEventListener("mouseup",ge),w.removeEventListener("touchmove",F),w.removeEventListener("touchend",ge)}}w.addEventListener("mousemove",F),w.addEventListener("mouseup",ge),w.addEventListener("touchmove",F),w.addEventListener("touchend",ge)}function FS(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:s,isValidConnection:u=KS,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}=qn(e),b=l.elementFromPoint(h,y),x=b?.classList.contains(`${r}-flow__handle`)?b:f,p={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){let v=QS(void 0,x),m=x.getAttribute("data-nodeid"),g=x.getAttribute("data-handleid"),S=x.classList.contains("connectable"),_=x.classList.contains("connectableend");if(!m||!v)return p;let E={source:d?m:o,sourceHandle:d?g:i,target:d?o:m,targetHandle:d?i:g};p.connection=E;let w=S&&_&&(n===Ui.Strict?d&&v==="source"||!d&&v==="target":m!==o||g!==i);p.isValid=w&&u(E),p.toHandle=$S(m,v,g,c,n,!0)}return p}var Ef={onPointerDown:bD,isValid:FS};function WS({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=Tt(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(),S=m.sourceEvent.ctrlKey&&Il()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,E=g[2]*Math.pow(2,_*S);t.scaleTo(E)},b=[0,0],x=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 S=[m.sourceEvent.clientX??m.sourceEvent.touches[0].clientX,m.sourceEvent.clientY??m.sourceEvent.touches[0].clientY],_=[S[0]-b[0],S[1]-b[1]];b=S;let E=o()*Math.max(g[2],Math.log(g[2]))*(h?-1:1),N={x:g[0]-_[0]*E,y:g[1]-_[1]*E},w=[[0,0],[s,u]];t.setViewportConstrained({x:N.x,y:N.y,zoom:g[2]},w,r)},v=uf().on("start",x).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:Xt}}var Tf=e=>({x:e.x,y:e.y,zoom:e.k}),Qm=({x:e,y:t,zoom:n})=>_a.translate(e,t).scale(n),Ol=(e,t)=>e.target.closest(`.${t}`),JS=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),xD=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Km=(e,t=0,n=xD,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},e_=e=>{let t=e.ctrlKey&&Il()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function SD({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(Ol(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let d=n.property("__zoom").k||1;if(c.ctrlKey&&l){let x=Xt(c),p=e_(c),v=d*Math.pow(2,p);o.scaleTo(n,v,x,c);return}let f=c.deltaMode===1?20:1,h=i===Wo.Vertical?0:c.deltaX*f,y=i===Wo.Horizontal?0:c.deltaY*f;!Il()&&c.shiftKey&&i!==Wo.Vertical&&(h=c.deltaY*f,y=0),o.translateBy(n,-(h/d)*a,-(y/d)*a,{internal:!0});let b=Tf(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 _D({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=Ol(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function ED({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Tf(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 TD({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&JS(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Tf(a.transform))}}function ND({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&JS(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=Tf(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function CD({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"&&(Ol(d,`${u}-flow__node`)||Ol(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!y||Ol(d,r)&&y||Ol(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 t_({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=uf().scaleExtent([t,n]).translateExtent(o),f=Tt(e).call(d);v({x:i.x,y:i.y,zoom:Ll(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let h=f.on("wheel.zoom"),y=f.on("dblclick.zoom");d.wheelDelta(e_);function b(M,z){return f?new Promise(U=>{d?.interpolate(z?.interpolate==="linear"?Ko:ba).transform(Km(f,z?.duration,z?.ease,()=>U(!0)),M)}):Promise.resolve(!1)}function x({noWheelClassName:M,noPanClassName:z,onPaneContextMenu:U,userSelectionActive:T,panOnScroll:A,panOnDrag:D,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:L,zoomOnPinch:I,zoomOnScroll:P,zoomOnDoubleClick:V,zoomActivationKeyPressed:q,lib:j,onTransformChange:Z,connectionInProgress:re,paneClickDistance:ne,selectionOnDrag:X}){T&&!u.isZoomingOrPanning&&p();let F=A&&!q&&!T;d.clickDistance(X?1/0:!Xn(ne)||ne<0?0:ne);let ge=F?SD({zoomPanValues:u,noWheelClassName:M,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:I,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):_D({noWheelClassName:M,preventScrolling:L,d3ZoomHandler:h});if(f.on("wheel.zoom",ge,{passive:!1}),!T){let J=ED({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:l});d.on("start",J);let ee=TD({zoomPanValues:u,panOnDrag:D,onPaneContextMenu:!!U,onPanZoom:a,onTransformChange:Z});d.on("zoom",ee);let de=ND({zoomPanValues:u,panOnDrag:D,panOnScroll:A,onPaneContextMenu:U,onPanZoomEnd:r,onDraggingChange:s});d.on("end",de)}let se=CD({zoomActivationKeyPressed:q,panOnDrag:D,zoomOnScroll:P,panOnScroll:A,zoomOnDoubleClick:V,zoomOnPinch:I,userSelectionActive:T,noPanClassName:z,noWheelClassName:M,lib:j,connectionInProgress:re});d.filter(se),V?f.on("dblclick.zoom",y):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function v(M,z,U){let T=Qm(M),A=d?.constrain()(T,z,U);return A&&await b(A),new Promise(D=>D(A))}async function m(M,z){let U=Qm(M);return await b(U,z),new Promise(T=>T(U))}function g(M){if(f){let z=Qm(M),U=f.property("__zoom");(U.k!==M.zoom||U.x!==M.x||U.y!==M.y)&&d?.transform(f,z,null,{sync:!0})}}function S(){let M=f?Ds(f.node()):{x:0,y:0,k:1};return{x:M.x,y:M.y,zoom:M.k}}function _(M,z){return f?new Promise(U=>{d?.interpolate(z?.interpolate==="linear"?Ko:ba).scaleTo(Km(f,z?.duration,z?.ease,()=>U(!0)),M)}):Promise.resolve(!1)}function E(M,z){return f?new Promise(U=>{d?.interpolate(z?.interpolate==="linear"?Ko:ba).scaleBy(Km(f,z?.duration,z?.ease,()=>U(!0)),M)}):Promise.resolve(!1)}function N(M){d?.scaleExtent(M)}function w(M){d?.translateExtent(M)}function k(M){let z=!Xn(M)||M<0?0:M;d?.clickDistance(z)}return{update:x,destroy:p,setViewport:m,setViewportConstrained:v,getViewport:S,scaleTo:_,scaleBy:E,setScaleExtent:N,setTranslateExtent:w,syncViewport:g,setClickDistance:k}}var Vi;(function(e){e.Line="line",e.Handle="handle"})(Vi||(Vi={}));function wD({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 wS(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 Pi(e,t){return Math.max(0,t-e)}function Gi(e,t){return Math.max(0,e-t)}function ff(e,t,n){return Math.max(0,t-e,e-n)}function AS(e,t){return e?!t:t}function AD(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:x,minHeight:p,maxHeight:v}=o,{x:m,y:g,width:S,height:_,aspectRatio:E}=e,N=Math.floor(c?h-e.pointerX:0),w=Math.floor(d?y-e.pointerY:0),k=S+(s?-N:N),M=_+(u?-w:w),z=-a[0]*S,U=-a[1]*_,T=ff(k,b,x),A=ff(M,p,v);if(l){let R=0,L=0;s&&N<0?R=Pi(m+N+z,l[0][0]):!s&&N>0&&(R=Gi(m+k+z,l[1][0])),u&&w<0?L=Pi(g+w+U,l[0][1]):!u&&w>0&&(L=Gi(g+M+U,l[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(r){let R=0,L=0;s&&N>0?R=Gi(m+N,r[0][0]):!s&&N<0&&(R=Pi(m+k,r[1][0])),u&&w>0?L=Gi(g+w,r[0][1]):!u&&w<0&&(L=Pi(g+M,r[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(i){if(c){let R=ff(k/E,p,v)*E;if(T=Math.max(T,R),l){let L=0;!s&&!u||s&&!u&&f?L=Gi(g+U+k/E,l[1][1])*E:L=Pi(g+U+(s?N:-N)/E,l[0][1])*E,T=Math.max(T,L)}if(r){let L=0;!s&&!u||s&&!u&&f?L=Pi(g+k/E,r[1][1])*E:L=Gi(g+(s?N:-N)/E,r[0][1])*E,T=Math.max(T,L)}}if(d){let R=ff(M*E,b,x)/E;if(A=Math.max(A,R),l){let L=0;!s&&!u||u&&!s&&f?L=Gi(m+M*E+z,l[1][0])/E:L=Pi(m+(u?w:-w)*E+z,l[0][0])/E,A=Math.max(A,L)}if(r){let L=0;!s&&!u||u&&!s&&f?L=Pi(m+M*E,r[1][0])/E:L=Gi(m+(u?w:-w)*E,r[0][0])/E,A=Math.max(A,L)}}}w=w+(w<0?A:-A),N=N+(N<0?T:-T),i&&(f?k>M*E?w=(AS(s,u)?-N:N)/E:N=(AS(s,u)?-w:w)*E:c?(w=N/E,u=s):(N=w*E,s=u));let D=s?m+N:m,O=u?g+w:g;return{width:S+(s?-N:N),height:_+(u?-w:w),x:a[0]*N*(s?-1:1)+D,y:a[1]*w*(u?-1:1)+O}}var n_={width:0,height:0,x:0,y:0},DD={...n_,pointerX:0,pointerY:0,aspectRatio:1};function MD(e){return[[0,0],[e.measured.width,e.measured.height]]}function RD(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 o_({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=Tt(e),l={controlDirection:wS("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:x}){let p={...n_},v={...DD};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:wS(u)};let m,g=null,S=[],_,E,N,w=!1,k=Ic().on("start",M=>{let{nodeLookup:z,transform:U,snapGrid:T,snapToGrid:A,nodeOrigin:D,paneDomNode:O}=n();if(m=z.get(t),!m)return;g=O?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:L}=Ms(M.sourceEvent,{transform:U,snapGrid:T,snapToGrid:A,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:L,aspectRatio:p.width/p.height},_=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=z.get(m.parentId),E=_&&m.extent==="parent"?MD(_):void 0),S=[],N=void 0;for(let[I,P]of z)if(P.parentId===t&&(S.push({id:I,position:{...P.position},extent:P.extent}),P.extent==="parent"||P.expandParent)){let V=RD(P,m,P.origin??D);N?N=[[Math.min(V[0][0],N[0][0]),Math.min(V[0][1],N[0][1])],[Math.max(V[1][0],N[1][0]),Math.max(V[1][1],N[1][1])]]:N=V}h?.(M,{...p})}).on("drag",M=>{let{transform:z,snapGrid:U,snapToGrid:T,nodeOrigin:A}=n(),D=Ms(M.sourceEvent,{transform:z,snapGrid:U,snapToGrid:T,containerBounds:g}),O=[];if(!m)return;let{x:R,y:L,width:I,height:P}=p,V={},q=m.origin??A,{width:j,height:Z,x:re,y:ne}=AD(v,l.controlDirection,D,l.boundaries,l.keepAspectRatio,q,E,N),X=j!==I,F=Z!==P,ge=re!==R&&X,se=ne!==L&&F;if(!ge&&!se&&!X&&!F)return;if((ge||se||q[0]===1||q[1]===1)&&(V.x=ge?re:p.x,V.y=se?ne:p.y,p.x=V.x,p.y=V.y,S.length>0)){let be=re-R,Ae=ne-L;for(let Ie of S)Ie.position={x:Ie.position.x-be+q[0]*(j-I),y:Ie.position.y-Ae+q[1]*(Z-P)},O.push(Ie)}if((X||F)&&(V.width=X&&(!l.resizeDirection||l.resizeDirection==="horizontal")?j:p.width,V.height=F&&(!l.resizeDirection||l.resizeDirection==="vertical")?Z:p.height,p.width=V.width,p.height=V.height),_&&m.expandParent){let be=q[0]*(V.width??0);V.x&&V.x<be&&(p.x=be,v.x=v.x-(V.x-be));let Ae=q[1]*(V.height??0);V.y&&V.y<Ae&&(p.y=Ae,v.y=v.y-(V.y-Ae))}let J=wD({width:p.width,prevWidth:I,height:p.height,prevHeight:P,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),ee={...p,direction:J};x?.(M,ee)!==!1&&(w=!0,y?.(M,ee),o(V,O))}).on("end",M=>{w&&(b?.(M,{...p}),i?.({...p}),w=!1)});a.call(k)}function s(){a.on(".drag",null)}return{update:r,destroy:s}}var g_=le(Ht(),1),y_=le(f_(),1);var p_={},d_=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:()=>{(p_.env?p_.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},m_=e=>e?d_(e):d_;var{useDebugValue:QD}=g_.default,{useSyncExternalStoreWithSelector:KD}=y_.default,FD=e=>e;function Eh(e,t=FD,n){let o=KD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return QD(o),o}var h_=(e,t)=>{let n=m_(e),o=(i,a=t)=>Eh(n,i,a);return Object.assign(o,n),o},v_=(e,t)=>e?h_(e,t):h_;function Ze(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 WD=le(sd()),Df=(0,H.createContext)(null),JD=Df.Provider,V_=Cn.error001();function Ce(e,t){let n=(0,H.useContext)(Df);if(n===null)throw new Error(V_);return Eh(n,e,t)}function Ke(){let e=(0,H.useContext)(Df);if(e===null)throw new Error(V_);return(0,H.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var b_={display:"none"},eM={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Y_="react-flow__node-desc",X_="react-flow__edge-desc",tM="react-flow__aria-live",nM=e=>e.ariaLiveMessage,oM=e=>e.ariaLabelConfig;function iM({rfId:e}){let t=Ce(nM);return(0,B.jsx)("div",{id:`${tM}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:eM,children:t})}function aM({rfId:e,disableKeyboardA11y:t}){let n=Ce(oM);return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{id:`${Y_}-${e}`,style:b_,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,B.jsx)("div",{id:`${X_}-${e}`,style:b_,children:n["edge.a11yDescription.default"]}),!t&&(0,B.jsx)(iM,{rfId:e})]})}var Mf=(0,H.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})});Mf.displayName="Panel";function lM({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,B.jsx)(Mf,{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 rM=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}},Cf=e=>e.id;function sM(e,t){return Ze(e.selectedNodes.map(Cf),t.selectedNodes.map(Cf))&&Ze(e.selectedEdges.map(Cf),t.selectedEdges.map(Cf))}function uM({onSelectionChange:e}){let t=Ke(),{selectedNodes:n,selectedEdges:o}=Ce(rM,sM);return(0,H.useEffect)(()=>{let i={nodes:n,edges:o};e?.(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,o,e]),null}var cM=e=>!!e.onSelectionChangeHandlers;function fM({onSelectionChange:e}){let t=Ce(cM);return e||t?(0,B.jsx)(uM,{onSelectionChange:e}):null}var q_=[0,0],dM={x:0,y:0,zoom:1},pM=["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"],x_=[...pM,"rfId"],mM=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}),S_={translateExtent:Hl,nodeOrigin:q_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function hM(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:s}=Ce(mM,Ze),u=Ke();(0,H.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=S_,r()}),[]);let c=(0,H.useRef)(S_);return(0,H.useEffect)(()=>{for(let d of x_){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:HS(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},x_.map(d=>e[d])),null}function __(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function gM(e){let[t,n]=(0,H.useState)(e==="system"?null:e);return(0,H.useEffect)(()=>{if(e!=="system"){n(e);return}let o=__(),i=()=>n(o?.matches?"dark":"light");return i(),o?.addEventListener("change",i),()=>{o?.removeEventListener("change",i)}},[e]),t!==null?t:__()?.matches?"dark":"light"}var E_=typeof document<"u"?document:null;function Bs(e=null,t={target:E_,actInsideInputWithModifier:!0}){let[n,o]=(0,H.useState)(!1),i=(0,H.useRef)(!1),a=(0,H.useRef)(new Set([])),[l,r]=(0,H.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
2466
|
+
`+o.stack}}var Qd=Object.prototype.hasOwnProperty,Up=gt.unstable_scheduleCallback,pd=gt.unstable_cancelCallback,x2=gt.unstable_shouldYield,_2=gt.unstable_requestPaint,xn=gt.unstable_now,E2=gt.unstable_getCurrentPriorityLevel,O0=gt.unstable_ImmediatePriority,z0=gt.unstable_UserBlockingPriority,Iu=gt.unstable_NormalPriority,T2=gt.unstable_LowPriority,L0=gt.unstable_IdlePriority,N2=gt.log,C2=gt.unstable_setDisableYieldValue,Wr=null,_n=null;function hi(e){if(typeof N2=="function"&&C2(e),_n&&typeof _n.setStrictMode=="function")try{_n.setStrictMode(Wr,e)}catch{}}var En=Math.clz32?Math.clz32:M2,w2=Math.log,A2=Math.LN2;function M2(e){return e>>>=0,e===0?32:31-(w2(e)/A2|0)|0}var lu=256,ru=262144,su=4194304;function $i(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 pc(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=$i(o):(l&=r,l!==0?i=$i(l):n||(n=r&~e,n!==0&&(i=$i(n))))):(r=o&~a,r!==0?i=$i(r):l!==0?i=$i(l):n||(n=o&~e,n!==0&&(i=$i(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 Jr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function D2(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 H0(){var e=su;return su<<=1,(su&62914560)===0&&(su=4194304),e}function md(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function es(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function R2(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-En(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&&B0(e,o,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(l&~t))}function B0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-En(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|n&261930}function k0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var o=31-En(n),i=1<<o;i&t|e[o]&t&&(e[o]|=t),n&=~i}}function G0(e,t){var n=t&-t;return n=(n&42)!==0?1:Ip(n),(n&(e.suspendedLanes|t))!==0?0:n}function Ip(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 Vp(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function P0(){var e=Re.p;return e!==0?e:(e=window.event,e===void 0?32:s1(e.type))}function iy(e,t){var n=Re.p;try{return Re.p=e,t()}finally{Re.p=n}}var zi=Math.random().toString(36).slice(2),Mt="__reactFiber$"+zi,rn="__reactProps$"+zi,bl="__reactContainer$"+zi,Fd="__reactEvents$"+zi,O2="__reactListeners$"+zi,z2="__reactHandles$"+zi,ay="__reactResources$"+zi,ts="__reactMarker$"+zi;function Yp(e){delete e[Mt],delete e[rn],delete e[Fd],delete e[O2],delete e[z2]}function qa(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[bl]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=p0(e);e!==null;){if(n=e[Mt])return n;e=p0(e)}return t}e=n,n=e.parentNode}return null}function Sl(e){if(e=e[Mt]||e[bl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(U(33))}function tl(e){var t=e[ay];return t||(t=e[ay]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[ts]=!0}var U0=new Set,I0={};function ra(e,t){ul(e,t),ul(e+"Capture",t)}function ul(e,t){for(I0[e]=t,e=0;e<t.length;e++)U0.add(t[e])}var L2=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]*$"),ly={},ry={};function H2(e){return Qd.call(ry,e)?!0:Qd.call(ly,e)?!1:L2.test(e)?ry[e]=!0:(ly[e]=!0,!1)}function Eu(e,t,n){if(H2(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 uu(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 Oo(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 Bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function V0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function B2(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 Wd(e){if(!e._valueTracker){var t=V0(e)?"checked":"value";e._valueTracker=B2(e,t,""+e[t])}}function Y0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),o="";return e&&(o=V0(e)?e.checked?"true":"false":e.value),e=o,e!==n?(t.setValue(e),!0):!1}function Vu(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 k2=/[\n"\\]/g;function Pn(e){return e.replace(k2,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Jd(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=""+Bn(t)):e.value!==""+Bn(t)&&(e.value=""+Bn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?ep(e,l,Bn(t)):n!=null?ep(e,l,Bn(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=""+Bn(r):e.removeAttribute("name")}function X0(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)){Wd(e);return}n=n!=null?""+Bn(n):"",t=t!=null?""+Bn(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),Wd(e)}function ep(e,t,n){t==="number"&&Vu(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function nl(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=""+Bn(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 q0(e,t,n){if(t!=null&&(t=""+Bn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Bn(n):""}function Z0(e,t,n,o){if(t==null){if(o!=null){if(n!=null)throw Error(U(92));if(Sr(o)){if(1<o.length)throw Error(U(93));o=o[0]}n=o}n==null&&(n=""),t=n}n=Bn(t),e.defaultValue=n,o=e.textContent,o===n&&o!==""&&o!==null&&(e.value=o),Wd(e)}function cl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var G2=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 sy(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||G2.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function j0(e,t,n){if(t!=null&&typeof t!="object")throw Error(U(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&&sy(e,i,o)}else for(var a in t)t.hasOwnProperty(a)&&sy(e,a,t[a])}function Xp(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 P2=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"]]),U2=/^[\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 Tu(e){return U2.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Uo(){}var tp=null;function qp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Za=null,ol=null;function uy(e){var t=Sl(e);if(t&&(e=t.stateNode)){var n=e[rn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Jd(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="'+Pn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var o=n[t];if(o!==e&&o.form===e.form){var i=o[rn]||null;if(!i)throw Error(U(90));Jd(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&&Y0(o)}break e;case"textarea":q0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&nl(e,!!n.multiple,t,!1)}}}var hd=!1;function $0(e,t,n){if(hd)return e(t,n);hd=!0;try{var o=e(t);return o}finally{if(hd=!1,(Za!==null||ol!==null)&&(Nc(),Za&&(t=Za,e=ol,ol=Za=null,uy(t),e)))for(t=0;t<e.length;t++)uy(e[t])}}function Gr(e,t){var n=e.stateNode;if(n===null)return null;var o=n[rn]||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(U(231,t,typeof n));return n}var qo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),np=!1;if(qo)try{Ga={},Object.defineProperty(Ga,"passive",{get:function(){np=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{np=!1}var Ga,gi=null,Zp=null,Nu=null;function K0(){if(Nu)return Nu;var e,t=Zp,n=t.length,o,i="value"in gi?gi.value:gi.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 Nu=i.slice(e,1<o?1-o:void 0)}function Cu(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 cu(){return!0}function cy(){return!1}function sn(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)?cu:cy,this.isPropagationStopped=cy,this}return Ze(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=cu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=cu)},persist:function(){},isPersistent:cu}),t}var sa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mc=sn(sa),ns=Ze({},sa,{view:0,detail:0}),I2=sn(ns),gd,yd,pr,hc=Ze({},ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jp,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!==pr&&(pr&&e.type==="mousemove"?(gd=e.screenX-pr.screenX,yd=e.screenY-pr.screenY):yd=gd=0,pr=e),gd)},movementY:function(e){return"movementY"in e?e.movementY:yd}}),fy=sn(hc),V2=Ze({},hc,{dataTransfer:0}),Y2=sn(V2),X2=Ze({},ns,{relatedTarget:0}),vd=sn(X2),q2=Ze({},sa,{animationName:0,elapsedTime:0,pseudoElement:0}),Z2=sn(q2),j2=Ze({},sa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$2=sn(j2),K2=Ze({},sa,{data:0}),dy=sn(K2),Q2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},F2={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"},W2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=W2[e])?!!t[e]:!1}function jp(){return J2}var eN=Ze({},ns,{key:function(e){if(e.key){var t=Q2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?F2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jp,charCode:function(e){return e.type==="keypress"?Cu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tN=sn(eN),nN=Ze({},hc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),py=sn(nN),oN=Ze({},ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jp}),iN=sn(oN),aN=Ze({},sa,{propertyName:0,elapsedTime:0,pseudoElement:0}),lN=sn(aN),rN=Ze({},hc,{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}),sN=sn(rN),uN=Ze({},sa,{newState:0,oldState:0}),cN=sn(uN),fN=[9,13,27,32],$p=qo&&"CompositionEvent"in window,Tr=null;qo&&"documentMode"in document&&(Tr=document.documentMode);var dN=qo&&"TextEvent"in window&&!Tr,Q0=qo&&(!$p||Tr&&8<Tr&&11>=Tr),my=" ",hy=!1;function F0(e,t){switch(e){case"keyup":return fN.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function W0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ja=!1;function pN(e,t){switch(e){case"compositionend":return W0(t);case"keypress":return t.which!==32?null:(hy=!0,my);case"textInput":return e=t.data,e===my&&hy?null:e;default:return null}}function mN(e,t){if(ja)return e==="compositionend"||!$p&&F0(e,t)?(e=K0(),Nu=Zp=gi=null,ja=!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 Q0&&t.locale!=="ko"?null:t.data;default:return null}}var hN={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 gy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hN[e.type]:t==="textarea"}function J0(e,t,n,o){Za?ol?ol.push(o):ol=[o]:Za=o,t=lc(t,"onChange"),0<t.length&&(n=new mc("onChange","change",null,n,o),e.push({event:n,listeners:t}))}var Nr=null,Pr=null;function gN(e){$b(e,0)}function gc(e){var t=xr(e);if(Y0(t))return e}function yy(e,t){if(e==="change")return t}var ev=!1;qo&&(qo?(du="oninput"in document,du||(bd=document.createElement("div"),bd.setAttribute("oninput","return;"),du=typeof bd.oninput=="function"),fu=du):fu=!1,ev=fu&&(!document.documentMode||9<document.documentMode));var fu,du,bd;function vy(){Nr&&(Nr.detachEvent("onpropertychange",tv),Pr=Nr=null)}function tv(e){if(e.propertyName==="value"&&gc(Pr)){var t=[];J0(t,Pr,e,qp(e)),$0(gN,t)}}function yN(e,t,n){e==="focusin"?(vy(),Nr=t,Pr=n,Nr.attachEvent("onpropertychange",tv)):e==="focusout"&&vy()}function vN(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gc(Pr)}function bN(e,t){if(e==="click")return gc(t)}function SN(e,t){if(e==="input"||e==="change")return gc(t)}function xN(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Nn=typeof Object.is=="function"?Object.is:xN;function Ur(e,t){if(Nn(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(!Qd.call(t,i)||!Nn(e[i],t[i]))return!1}return!0}function by(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sy(e,t){var n=by(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=by(n)}}function nv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ov(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vu(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=Vu(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 _N=qo&&"documentMode"in document&&11>=document.documentMode,$a=null,op=null,Cr=null,ip=!1;function xy(e,t,n){var o=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ip||$a==null||$a!==Vu(o)||(o=$a,"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}),Cr&&Ur(Cr,o)||(Cr=o,o=lc(op,"onSelect"),0<o.length&&(t=new mc("onSelect","select",null,t,n),e.push({event:t,listeners:o}),t.target=$a)))}function Zi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ka={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={},iv={};qo&&(iv=document.createElement("div").style,"AnimationEvent"in window||(delete Ka.animationend.animation,delete Ka.animationiteration.animation,delete Ka.animationstart.animation),"TransitionEvent"in window||delete Ka.transitionend.transition);function ua(e){if(Sd[e])return Sd[e];if(!Ka[e])return e;var t=Ka[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in iv)return Sd[e]=t[n];return e}var av=ua("animationend"),lv=ua("animationiteration"),rv=ua("animationstart"),EN=ua("transitionrun"),TN=ua("transitionstart"),NN=ua("transitioncancel"),sv=ua("transitionend"),uv=new Map,ap="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(" ");ap.push("scrollEnd");function eo(e,t){uv.set(e,t),ra(t,[e])}var Yu=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)},Hn=[],Qa=0,Qp=0;function yc(){for(var e=Qa,t=Qp=Qa=0;t<e;){var n=Hn[t];Hn[t++]=null;var o=Hn[t];Hn[t++]=null;var i=Hn[t];Hn[t++]=null;var a=Hn[t];if(Hn[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&&cv(n,i,a)}}function vc(e,t,n,o){Hn[Qa++]=e,Hn[Qa++]=t,Hn[Qa++]=n,Hn[Qa++]=o,Qp|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Fp(e,t,n,o){return vc(e,t,n,o),Xu(e)}function ca(e,t){return vc(e,null,null,t),Xu(e)}function cv(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-En(n),e=a.hiddenUpdates,o=e[i],o===null?e[i]=[t]:o.push(t),t.lane=n|536870912),a):null}function Xu(e){if(50<Hr)throw Hr=0,Cp=null,Error(U(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fa={};function CN(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 bn(e,t,n,o){return new CN(e,t,n,o)}function Wp(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vo(e,t){var n=e.alternate;return n===null?(n=bn(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 fv(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 wu(e,t,n,o,i,a){var l=0;if(o=e,typeof e=="function")Wp(e)&&(l=1);else if(typeof e=="string")l=MC(e,n,go.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Zd:return e=bn(31,n,t,i),e.elementType=Zd,e.lanes=a,e;case Ya:return Wi(n.children,i,a,t);case D0:l=8,i|=24;break;case Yd:return e=bn(12,n,t,i|2),e.elementType=Yd,e.lanes=a,e;case Xd:return e=bn(13,n,t,i),e.elementType=Xd,e.lanes=a,e;case qd:return e=bn(19,n,t,i),e.elementType=qd,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Po:l=10;break e;case R0:l=9;break e;case Gp:l=11;break e;case Pp:l=14;break e;case ui:l=16,o=null;break e}l=29,n=Error(U(130,e===null?"null":typeof e,"")),o=null}return t=bn(l,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function Wi(e,t,n,o){return e=bn(7,e,o,t),e.lanes=n,e}function xd(e,t,n){return e=bn(6,e,null,t),e.lanes=n,e}function dv(e){var t=bn(18,null,null,0);return t.stateNode=e,t}function _d(e,t,n){return t=bn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var _y=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var n=_y.get(e);return n!==void 0?n:(t={value:e,source:t,stack:oy(t)},_y.set(e,t),t)}return{value:e,source:t,stack:oy(t)}}var Wa=[],Ja=0,qu=null,Ir=0,kn=[],Gn=0,Mi=null,po=1,mo="";function ko(e,t){Wa[Ja++]=Ir,Wa[Ja++]=qu,qu=e,Ir=t}function pv(e,t,n){kn[Gn++]=po,kn[Gn++]=mo,kn[Gn++]=Mi,Mi=e;var o=po;e=mo;var i=32-En(o)-1;o&=~(1<<i),n+=1;var a=32-En(t)+i;if(30<a){var l=i-i%5;a=(o&(1<<l)-1).toString(32),o>>=l,i-=l,po=1<<32-En(t)+i|n<<i|o,mo=a+e}else po=1<<a|n<<i|o,mo=e}function Jp(e){e.return!==null&&(ko(e,1),pv(e,1,0))}function em(e){for(;e===qu;)qu=Wa[--Ja],Wa[Ja]=null,Ir=Wa[--Ja],Wa[Ja]=null;for(;e===Mi;)Mi=kn[--Gn],kn[Gn]=null,mo=kn[--Gn],kn[Gn]=null,po=kn[--Gn],kn[Gn]=null}function mv(e,t){kn[Gn++]=po,kn[Gn++]=mo,kn[Gn++]=Mi,po=t.id,mo=t.overflow,Mi=e}var Dt=null,qe=null,Ce=!1,xi=null,In=!1,lp=Error(U(519));function Di(e){var t=Error(U(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Vr(Un(t,e)),lp}function Ey(e){var t=e.stateNode,n=e.type,o=e.memoizedProps;switch(t[Mt]=e,t[rn]=o,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Zr.length;n++)xe(Zr[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),X0(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),Z0(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||Qb(t.textContent,n)?(o.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),o.onScroll!=null&&xe("scroll",t),o.onScrollEnd!=null&&xe("scrollend",t),o.onClick!=null&&(t.onclick=Uo),t=!0):t=!1,t||Di(e,!0)}function Ty(e){for(Dt=e.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:In=!1;return;case 27:case 3:In=!0;return;default:Dt=Dt.return}}function Pa(e){if(e!==Dt)return!1;if(!Ce)return Ty(e),Ce=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Rp(e.type,e.memoizedProps)),n=!n),n&&qe&&Di(e),Ty(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=d0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));qe=d0(e)}else t===27?(t=qe,Li(e.type)?(e=Hp,Hp=null,qe=e):qe=t):qe=Dt?Yn(e.stateNode.nextSibling):null;return!0}function na(){qe=Dt=null,Ce=!1}function Ed(){var e=xi;return e!==null&&(an===null?an=e:an.push.apply(an,e),xi=null),e}function Vr(e){xi===null?xi=[e]:xi.push(e)}var rp=yo(null),fa=null,Io=null;function fi(e,t,n){Ie(rp,t._currentValue),t._currentValue=n}function Yo(e){e._currentValue=rp.current,Et(rp)}function sp(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 up(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),sp(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(U(341));l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),sp(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 xl(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(U(387));if(l=l.memoizedProps,l!==null){var r=i.type;Nn(i.pendingProps.value,l.value)||(e!==null?e.push(r):e=[r])}}else if(i===Gu.current){if(l=i.alternate,l===null)throw Error(U(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push($r):e=[$r])}i=i.return}e!==null&&up(t,e,n,o),t.flags|=262144}function Zu(e){for(e=e.firstContext;e!==null;){if(!Nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function oa(e){fa=e,Io=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Rt(e){return hv(fa,e)}function pu(e,t){return fa===null&&oa(e),hv(e,t)}function hv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Io===null){if(e===null)throw Error(U(308));Io=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Io=Io.next=t;return n}var wN=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()})}},AN=gt.unstable_scheduleCallback,MN=gt.unstable_NormalPriority,dt={$$typeof:Po,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function tm(){return{controller:new wN,data:new Map,refCount:0}}function os(e){e.refCount--,e.refCount===0&&AN(MN,function(){e.controller.abort()})}var wr=null,cp=0,fl=0,il=null;function DN(e,t){if(wr===null){var n=wr=[];cp=0,fl=Cm(),il={status:"pending",value:void 0,then:function(o){n.push(o)}}}return cp++,t.then(Ny,Ny),t}function Ny(){if(--cp===0&&wr!==null){il!==null&&(il.status="fulfilled");var e=wr;wr=null,fl=0,il=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function RN(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 Cy=ue.S;ue.S=function(e,t){Mb=xn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&DN(e,t),Cy!==null&&Cy(e,t)};var Ji=yo(null);function nm(){var e=Ji.current;return e!==null?e:Pe.pooledCache}function Au(e,t){t===null?Ie(Ji,Ji.current):Ie(Ji,t.pool)}function gv(){var e=nm();return e===null?null:{parent:dt._currentValue,pool:e}}var _l=Error(U(460)),om=Error(U(474)),bc=Error(U(542)),ju={then:function(){}};function wy(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Uo,Uo),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(Uo,Uo);else{if(e=Pe,e!==null&&100<e.shellSuspendCounter)throw Error(U(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 ea=t,_l}}function Ki(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ea=n,_l):n}}var ea=null;function Ay(){if(ea===null)throw Error(U(459));var e=ea;return ea=null,e}function My(e){if(e===_l||e===bc)throw Error(U(483))}var al=null,Yr=0;function mu(e){var t=Yr;return Yr+=1,al===null&&(al=[]),yv(al,e,t)}function mr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function hu(e,t){throw t.$$typeof===y2?Error(U(525)):(e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function vv(e){function t(p,y){if(e){var m=p.deletions;m===null?(p.deletions=[y],p.flags|=16):m.push(y)}}function n(p,y){if(!e)return null;for(;y!==null;)t(p,y),y=y.sibling;return null}function o(p){for(var y=new Map;p!==null;)p.key!==null?y.set(p.key,p):y.set(p.index,p),p=p.sibling;return y}function i(p,y){return p=Vo(p,y),p.index=0,p.sibling=null,p}function a(p,y,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<y?(p.flags|=67108866,y):m):(p.flags|=67108866,y)):(p.flags|=1048576,y)}function l(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function r(p,y,m,g){return y===null||y.tag!==6?(y=xd(m,p.mode,g),y.return=p,y):(y=i(y,m),y.return=p,y)}function s(p,y,m,g){var x=m.type;return x===Ya?c(p,y,m.props.children,g,m.key):y!==null&&(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===ui&&Ki(x)===y.type)?(y=i(y,m.props),mr(y,m),y.return=p,y):(y=wu(m.type,m.key,m.props,null,p.mode,g),mr(y,m),y.return=p,y)}function u(p,y,m,g){return y===null||y.tag!==4||y.stateNode.containerInfo!==m.containerInfo||y.stateNode.implementation!==m.implementation?(y=_d(m,p.mode,g),y.return=p,y):(y=i(y,m.children||[]),y.return=p,y)}function c(p,y,m,g,x){return y===null||y.tag!==7?(y=Wi(m,p.mode,g,x),y.return=p,y):(y=i(y,m),y.return=p,y)}function d(p,y,m){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=xd(""+y,p.mode,m),y.return=p,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case au:return m=wu(y.type,y.key,y.props,null,p.mode,m),mr(m,y),m.return=p,m;case br:return y=_d(y,p.mode,m),y.return=p,y;case ui:return y=Ki(y),d(p,y,m)}if(Sr(y)||dr(y))return y=Wi(y,p.mode,m,null),y.return=p,y;if(typeof y.then=="function")return d(p,mu(y),m);if(y.$$typeof===Po)return d(p,pu(p,y),m);hu(p,y)}return null}function f(p,y,m,g){var x=y!==null?y.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return x!==null?null:r(p,y,""+m,g);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case au:return m.key===x?s(p,y,m,g):null;case br:return m.key===x?u(p,y,m,g):null;case ui:return m=Ki(m),f(p,y,m,g)}if(Sr(m)||dr(m))return x!==null?null:c(p,y,m,g,null);if(typeof m.then=="function")return f(p,y,mu(m),g);if(m.$$typeof===Po)return f(p,y,pu(p,m),g);hu(p,m)}return null}function h(p,y,m,g,x){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return p=p.get(m)||null,r(y,p,""+g,x);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case au:return p=p.get(g.key===null?m:g.key)||null,s(y,p,g,x);case br:return p=p.get(g.key===null?m:g.key)||null,u(y,p,g,x);case ui:return g=Ki(g),h(p,y,m,g,x)}if(Sr(g)||dr(g))return p=p.get(m)||null,c(y,p,g,x,null);if(typeof g.then=="function")return h(p,y,m,mu(g),x);if(g.$$typeof===Po)return h(p,y,m,pu(y,g),x);hu(y,g)}return null}function v(p,y,m,g){for(var x=null,_=null,E=y,w=y=0,N=null;E!==null&&w<m.length;w++){E.index>w?(N=E,E=null):N=E.sibling;var k=f(p,E,m[w],g);if(k===null){E===null&&(E=N);break}e&&E&&k.alternate===null&&t(p,E),y=a(k,y,w),_===null?x=k:_.sibling=k,_=k,E=N}if(w===m.length)return n(p,E),Ce&&ko(p,w),x;if(E===null){for(;w<m.length;w++)E=d(p,m[w],g),E!==null&&(y=a(E,y,w),_===null?x=E:_.sibling=E,_=E);return Ce&&ko(p,w),x}for(E=o(E);w<m.length;w++)N=h(E,p,w,m[w],g),N!==null&&(e&&N.alternate!==null&&E.delete(N.key===null?w:N.key),y=a(N,y,w),_===null?x=N:_.sibling=N,_=N);return e&&E.forEach(function(D){return t(p,D)}),Ce&&ko(p,w),x}function b(p,y,m,g){if(m==null)throw Error(U(151));for(var x=null,_=null,E=y,w=y=0,N=null,k=m.next();E!==null&&!k.done;w++,k=m.next()){E.index>w?(N=E,E=null):N=E.sibling;var D=f(p,E,k.value,g);if(D===null){E===null&&(E=N);break}e&&E&&D.alternate===null&&t(p,E),y=a(D,y,w),_===null?x=D:_.sibling=D,_=D,E=N}if(k.done)return n(p,E),Ce&&ko(p,w),x;if(E===null){for(;!k.done;w++,k=m.next())k=d(p,k.value,g),k!==null&&(y=a(k,y,w),_===null?x=k:_.sibling=k,_=k);return Ce&&ko(p,w),x}for(E=o(E);!k.done;w++,k=m.next())k=h(E,p,w,k.value,g),k!==null&&(e&&k.alternate!==null&&E.delete(k.key===null?w:k.key),y=a(k,y,w),_===null?x=k:_.sibling=k,_=k);return e&&E.forEach(function(z){return t(p,z)}),Ce&&ko(p,w),x}function S(p,y,m,g){if(typeof m=="object"&&m!==null&&m.type===Ya&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case au:e:{for(var x=m.key;y!==null;){if(y.key===x){if(x=m.type,x===Ya){if(y.tag===7){n(p,y.sibling),g=i(y,m.props.children),g.return=p,p=g;break e}}else if(y.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===ui&&Ki(x)===y.type){n(p,y.sibling),g=i(y,m.props),mr(g,m),g.return=p,p=g;break e}n(p,y);break}else t(p,y);y=y.sibling}m.type===Ya?(g=Wi(m.props.children,p.mode,g,m.key),g.return=p,p=g):(g=wu(m.type,m.key,m.props,null,p.mode,g),mr(g,m),g.return=p,p=g)}return l(p);case br:e:{for(x=m.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===m.containerInfo&&y.stateNode.implementation===m.implementation){n(p,y.sibling),g=i(y,m.children||[]),g.return=p,p=g;break e}else{n(p,y);break}else t(p,y);y=y.sibling}g=_d(m,p.mode,g),g.return=p,p=g}return l(p);case ui:return m=Ki(m),S(p,y,m,g)}if(Sr(m))return v(p,y,m,g);if(dr(m)){if(x=dr(m),typeof x!="function")throw Error(U(150));return m=x.call(m),b(p,y,m,g)}if(typeof m.then=="function")return S(p,y,mu(m),g);if(m.$$typeof===Po)return S(p,y,pu(p,m),g);hu(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,y!==null&&y.tag===6?(n(p,y.sibling),g=i(y,m),g.return=p,p=g):(n(p,y),g=xd(m,p.mode,g),g.return=p,p=g),l(p)):n(p,y)}return function(p,y,m,g){try{Yr=0;var x=S(p,y,m,g);return al=null,x}catch(E){if(E===_l||E===bc)throw E;var _=bn(29,E,null,p.mode);return _.lanes=g,_.return=p,_}}}var ia=vv(!0),bv=vv(!1),ci=!1;function im(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fp(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 _i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ei(e,t,n){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(De&2)!==0){var i=o.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),o.pending=t,t=Xu(e),cv(e,null,n),t}return vc(e,o,t,n),Xu(e)}function Ar(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,k0(e,n)}}function Td(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 dp=!1;function Mr(){if(dp){var e=il;if(e!==null)throw e}}function Dr(e,t,n,o){dp=!1;var i=e.updateQueue;ci=!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?(Te&f)===f:(o&f)===f){f!==0&&f===fl&&(dp=!0),c!==null&&(c=c.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var v=e,b=r;f=t;var S=n;switch(b.tag){case 1:if(v=b.payload,typeof v=="function"){d=v.call(S,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=b.payload,f=typeof v=="function"?v.call(S,d,f):v,f==null)break e;d=Ze({},d,f);break e;case 2:ci=!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),Oi|=l,e.lanes=l,e.memoizedState=d}}function Sv(e,t){if(typeof e!="function")throw Error(U(191,e));e.call(t)}function xv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Sv(n[e],t)}var dl=yo(null),$u=yo(0);function Dy(e,t){e=Ko,Ie($u,e),Ie(dl,t),Ko=e|t.baseLanes}function pp(){Ie($u,Ko),Ie(dl,dl.current)}function am(){Ko=$u.current,Et(dl),Et($u)}var Cn=yo(null),Vn=null;function di(e){var t=e.alternate;Ie(at,at.current&1),Ie(Cn,e),Vn===null&&(t===null||dl.current!==null||t.memoizedState!==null)&&(Vn=e)}function mp(e){Ie(at,at.current),Ie(Cn,e),Vn===null&&(Vn=e)}function _v(e){e.tag===22?(Ie(at,at.current),Ie(Cn,e),Vn===null&&(Vn=e)):pi(e)}function pi(){Ie(at,at.current),Ie(Cn,Cn.current)}function vn(e){Et(Cn),Vn===e&&(Vn=null),Et(at)}var at=yo(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||zp(n)||Lp(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 Zo=0,he=null,Be=null,ct=null,Qu=!1,ll=!1,aa=!1,Fu=0,Xr=0,rl=null,ON=0;function et(){throw Error(U(321))}function lm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Nn(e[n],t[n]))return!1;return!0}function rm(e,t,n,o,i,a){return Zo=a,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?Jv:vm,aa=!1,a=n(o,i),aa=!1,ll&&(a=Tv(t,n,o,i)),Ev(e),a}function Ev(e){ue.H=qr;var t=Be!==null&&Be.next!==null;if(Zo=0,ct=Be=he=null,Qu=!1,Xr=0,rl=null,t)throw Error(U(300));e===null||pt||(e=e.dependencies,e!==null&&Zu(e)&&(pt=!0))}function Tv(e,t,n,o){he=e;var i=0;do{if(ll&&(rl=null),Xr=0,ll=!1,25<=i)throw Error(U(301));if(i+=1,ct=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)}ue.H=eb,a=t(n,o)}while(ll);return a}function zN(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?is(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(he.flags|=1024),t}function sm(){var e=Fu!==0;return Fu=0,e}function um(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function cm(e){if(Qu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qu=!1}Zo=0,ct=Be=he=null,ll=!1,Xr=Fu=0,rl=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?he.memoizedState=ct=e:ct=ct.next=e,ct}function lt(){if(Be===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=ct===null?he.memoizedState:ct.next;if(t!==null)ct=t,Be=e;else{if(e===null)throw he.alternate===null?Error(U(467)):Error(U(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},ct===null?he.memoizedState=ct=e:ct=ct.next=e}return ct}function Sc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function is(e){var t=Xr;return Xr+=1,rl===null&&(rl=[]),e=yv(rl,e,t),t=he,(ct===null?t.memoizedState:ct.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?Jv:vm),e}function xc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return is(e);if(e.$$typeof===Po)return Rt(e)}throw Error(U(438,String(e)))}function fm(e){var t=null,n=he.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var o=he.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(),he.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]=v2;return t.index++,n}function jo(e,t){return typeof t=="function"?t(e):t}function Mu(e){var t=lt();return dm(t,Be,e)}function dm(e,t,n){var o=e.queue;if(o===null)throw Error(U(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?(Te&d)===d:(Zo&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===fl&&(c=!0);else if((Zo&f)===f){u=u.next,f===fl&&(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,he.lanes|=f,Oi|=f;d=u.action,aa&&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,he.lanes|=d,Oi|=d;u=u.next}while(u!==null&&u!==t);if(s===null?l=a:s.next=r,!Nn(a,e.memoizedState)&&(pt=!0,c&&(n=il,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 Nd(e){var t=lt(),n=t.queue;if(n===null)throw Error(U(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);Nn(a,t.memoizedState)||(pt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function Nv(e,t,n){var o=he,i=lt(),a=Ce;if(a){if(n===void 0)throw Error(U(407));n=n()}else n=t();var l=!Nn((Be||i).memoizedState,n);if(l&&(i.memoizedState=n,pt=!0),i=i.queue,pm(Av.bind(null,o,i,e),[e]),i.getSnapshot!==t||l||ct!==null&&ct.memoizedState.tag&1){if(o.flags|=2048,pl(9,{destroy:void 0},wv.bind(null,o,i,n,t),null),Pe===null)throw Error(U(349));a||(Zo&127)!==0||Cv(o,t,n)}return n}function Cv(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t=Sc(),he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wv(e,t,n,o){t.value=n,t.getSnapshot=o,Mv(t)&&Dv(e)}function Av(e,t,n){return n(function(){Mv(t)&&Dv(e)})}function Mv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Nn(e,n)}catch{return!0}}function Dv(e){var t=ca(e,2);t!==null&&ln(t,e,2)}function hp(e){var t=Xt();if(typeof e=="function"){var n=e;if(e=n(),aa){hi(!0);try{n()}finally{hi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:e},t}function Rv(e,t,n,o){return e.baseState=n,dm(e,Be,typeof o=="function"?o:jo)}function LN(e,t,n,o,i){if(Ec(e))throw Error(U(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)}};ue.T!==null?n(!0):a.isTransition=!1,o(a),n=t.pending,n===null?(a.next=t.pending=a,Ov(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Ov(e,t){var n=t.action,o=t.payload,i=e.state;if(t.isTransition){var a=ue.T,l={};ue.T=l;try{var r=n(i,o),s=ue.S;s!==null&&s(l,r),Ry(e,t,r)}catch(u){gp(e,t,u)}finally{a!==null&&l.types!==null&&(a.types=l.types),ue.T=a}}else try{a=n(i,o),Ry(e,t,a)}catch(u){gp(e,t,u)}}function Ry(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(o){Oy(e,t,o)},function(o){return gp(e,t,o)}):Oy(e,t,n)}function Oy(e,t,n){t.status="fulfilled",t.value=n,zv(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ov(e,n)))}function gp(e,t,n){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=n,zv(t),t=t.next;while(t!==o)}e.action=null}function zv(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Lv(e,t){return t}function zy(e,t){if(Ce){var n=Pe.formState;if(n!==null){e:{var o=he;if(Ce){if(qe){t:{for(var i=qe,a=In;i.nodeType!==8;){if(!a){i=null;break t}if(i=Yn(i.nextSibling),i===null){i=null;break t}}a=i.data,i=a==="F!"||a==="F"?i:null}if(i){qe=Yn(i.nextSibling),o=i.data==="F!";break e}}Di(o)}o=!1}o&&(t=n[0])}}return n=Xt(),n.memoizedState=n.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lv,lastRenderedState:t},n.queue=o,n=Qv.bind(null,he,o),o.dispatch=n,o=hp(!1),a=ym.bind(null,he,!1,o.queue),o=Xt(),i={state:t,dispatch:null,action:e,pending:null},o.queue=i,n=LN.bind(null,he,i,a,n),i.dispatch=n,o.memoizedState=e,[t,n,!1]}function Ly(e){var t=lt();return Hv(t,Be,e)}function Hv(e,t,n){if(t=dm(e,t,Lv)[0],e=Mu(jo)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=is(t)}catch(l){throw l===_l?bc:l}else o=t;t=lt();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(he.flags|=2048,pl(9,{destroy:void 0},HN.bind(null,i,n),null)),[o,a,e]}function HN(e,t){e.action=t}function Hy(e){var t=lt(),n=Be;if(n!==null)return Hv(t,n,e);lt(),t=t.memoizedState,n=lt();var o=n.queue.dispatch;return n.memoizedState=e,[t,o,!1]}function pl(e,t,n,o){return e={tag:e,create:n,deps:o,inst:t,next:null},t=he.updateQueue,t===null&&(t=Sc(),he.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 Bv(){return lt().memoizedState}function Du(e,t,n,o){var i=Xt();he.flags|=e,i.memoizedState=pl(1|t,{destroy:void 0},n,o===void 0?null:o)}function _c(e,t,n,o){var i=lt();o=o===void 0?null:o;var a=i.memoizedState.inst;Be!==null&&o!==null&&lm(o,Be.memoizedState.deps)?i.memoizedState=pl(t,a,n,o):(he.flags|=e,i.memoizedState=pl(1|t,a,n,o))}function By(e,t){Du(8390656,8,e,t)}function pm(e,t){_c(2048,8,e,t)}function BN(e){he.flags|=4;var t=he.updateQueue;if(t===null)t=Sc(),he.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function kv(e){var t=lt().memoizedState;return BN({ref:t,nextImpl:e}),function(){if((De&2)!==0)throw Error(U(440));return t.impl.apply(void 0,arguments)}}function Gv(e,t){return _c(4,2,e,t)}function Pv(e,t){return _c(4,4,e,t)}function Uv(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 Iv(e,t,n){n=n!=null?n.concat([e]):null,_c(4,4,Uv.bind(null,t,e),n)}function mm(){}function Vv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;return t!==null&&lm(t,o[1])?o[0]:(n.memoizedState=[e,t],e)}function Yv(e,t){var n=lt();t=t===void 0?null:t;var o=n.memoizedState;if(t!==null&&lm(t,o[1]))return o[0];if(o=e(),aa){hi(!0);try{e()}finally{hi(!1)}}return n.memoizedState=[o,t],o}function hm(e,t,n){return n===void 0||(Zo&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Rb(),he.lanes|=e,Oi|=e,n)}function Xv(e,t,n,o){return Nn(n,t)?n:dl.current!==null?(e=hm(e,n,o),Nn(e,t)||(pt=!0),e):(Zo&42)===0||(Zo&1073741824)!==0&&(Te&261930)===0?(pt=!0,e.memoizedState=n):(e=Rb(),he.lanes|=e,Oi|=e,t)}function qv(e,t,n,o,i){var a=Re.p;Re.p=a!==0&&8>a?a:8;var l=ue.T,r={};ue.T=r,ym(e,!1,t,n);try{var s=i(),u=ue.S;if(u!==null&&u(r,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=RN(s,o);Rr(e,t,c,Tn(e))}else Rr(e,t,o,Tn(e))}catch(d){Rr(e,t,{then:function(){},status:"rejected",reason:d},Tn())}finally{Re.p=a,l!==null&&r.types!==null&&(l.types=r.types),ue.T=l}}function kN(){}function yp(e,t,n,o){if(e.tag!==5)throw Error(U(476));var i=Zv(e).queue;qv(e,i,t,Fi,n===null?kN:function(){return jv(e),n(o)})}function Zv(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Fi,baseState:Fi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:Fi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function jv(e){var t=Zv(e);t.next===null&&(t=e.alternate.memoizedState),Rr(e,t.next.queue,{},Tn())}function gm(){return Rt($r)}function $v(){return lt().memoizedState}function Kv(){return lt().memoizedState}function GN(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tn();e=_i(n);var o=Ei(t,e,n);o!==null&&(ln(o,t,n),Ar(o,t,n)),t={cache:tm()},e.payload=t;return}t=t.return}}function PN(e,t,n){var o=Tn();n={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ec(e)?Fv(t,n):(n=Fp(e,t,n,o),n!==null&&(ln(n,e,o),Wv(n,t,o)))}function Qv(e,t,n){var o=Tn();Rr(e,t,n,o)}function Rr(e,t,n,o){var i={lane:o,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ec(e))Fv(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,Nn(r,l))return vc(e,t,i,0),Pe===null&&yc(),!1}catch{}if(n=Fp(e,t,i,o),n!==null)return ln(n,e,o),Wv(n,t,o),!0}return!1}function ym(e,t,n,o){if(o={lane:2,revertLane:Cm(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Ec(e)){if(t)throw Error(U(479))}else t=Fp(e,n,o,2),t!==null&&ln(t,e,2)}function Ec(e){var t=e.alternate;return e===he||t!==null&&t===he}function Fv(e,t){ll=Qu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Wv(e,t,n){if((n&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,n|=o,t.lanes=n,k0(e,n)}}var qr={readContext:Rt,use:xc,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};qr.useEffectEvent=et;var Jv={readContext:Rt,use:xc,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:Rt,useEffect:By,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Du(4194308,4,Uv.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Du(4194308,4,e,t)},useInsertionEffect:function(e,t){Du(4,2,e,t)},useMemo:function(e,t){var n=Xt();t=t===void 0?null:t;var o=e();if(aa){hi(!0);try{e()}finally{hi(!1)}}return n.memoizedState=[o,t],o},useReducer:function(e,t,n){var o=Xt();if(n!==void 0){var i=n(t);if(aa){hi(!0);try{n(t)}finally{hi(!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=PN.bind(null,he,e),[o.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=hp(e);var t=e.queue,n=Qv.bind(null,he,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:mm,useDeferredValue:function(e,t){var n=Xt();return hm(n,e,t)},useTransition:function(){var e=hp(!1);return e=qv.bind(null,he,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var o=he,i=Xt();if(Ce){if(n===void 0)throw Error(U(407));n=n()}else{if(n=t(),Pe===null)throw Error(U(349));(Te&127)!==0||Cv(o,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,By(Av.bind(null,o,a,e),[e]),o.flags|=2048,pl(9,{destroy:void 0},wv.bind(null,o,a,n,t),null),n},useId:function(){var e=Xt(),t=Pe.identifierPrefix;if(Ce){var n=mo,o=po;n=(o&~(1<<32-En(o)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Fu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=ON++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:gm,useFormState:zy,useActionState:zy,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ym.bind(null,he,!0,n),n.dispatch=t,[e,t]},useMemoCache:fm,useCacheRefresh:function(){return Xt().memoizedState=GN.bind(null,he)},useEffectEvent:function(e){var t=Xt(),n={impl:e};return t.memoizedState=n,function(){if((De&2)!==0)throw Error(U(440));return n.impl.apply(void 0,arguments)}}},vm={readContext:Rt,use:xc,useCallback:Vv,useContext:Rt,useEffect:pm,useImperativeHandle:Iv,useInsertionEffect:Gv,useLayoutEffect:Pv,useMemo:Yv,useReducer:Mu,useRef:Bv,useState:function(){return Mu(jo)},useDebugValue:mm,useDeferredValue:function(e,t){var n=lt();return Xv(n,Be.memoizedState,e,t)},useTransition:function(){var e=Mu(jo)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:is(e),t]},useSyncExternalStore:Nv,useId:$v,useHostTransitionStatus:gm,useFormState:Ly,useActionState:Ly,useOptimistic:function(e,t){var n=lt();return Rv(n,Be,e,t)},useMemoCache:fm,useCacheRefresh:Kv};vm.useEffectEvent=kv;var eb={readContext:Rt,use:xc,useCallback:Vv,useContext:Rt,useEffect:pm,useImperativeHandle:Iv,useInsertionEffect:Gv,useLayoutEffect:Pv,useMemo:Yv,useReducer:Nd,useRef:Bv,useState:function(){return Nd(jo)},useDebugValue:mm,useDeferredValue:function(e,t){var n=lt();return Be===null?hm(n,e,t):Xv(n,Be.memoizedState,e,t)},useTransition:function(){var e=Nd(jo)[0],t=lt().memoizedState;return[typeof e=="boolean"?e:is(e),t]},useSyncExternalStore:Nv,useId:$v,useHostTransitionStatus:gm,useFormState:Hy,useActionState:Hy,useOptimistic:function(e,t){var n=lt();return Be!==null?Rv(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:fm,useCacheRefresh:Kv};eb.useEffectEvent=kv;function Cd(e,t,n,o){t=e.memoizedState,n=n(o,t),n=n==null?t:Ze({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vp={enqueueSetState:function(e,t,n){e=e._reactInternals;var o=Tn(),i=_i(o);i.payload=t,n!=null&&(i.callback=n),t=Ei(e,i,o),t!==null&&(ln(t,e,o),Ar(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var o=Tn(),i=_i(o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ei(e,i,o),t!==null&&(ln(t,e,o),Ar(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tn(),o=_i(n);o.tag=2,t!=null&&(o.callback=t),t=Ei(e,o,n),t!==null&&(ln(t,e,n),Ar(t,e,n))}};function ky(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?!Ur(n,o)||!Ur(i,a):!0}function Gy(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&&vp.enqueueReplaceState(t,t.state,null)}function la(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=Ze({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function tb(e){Yu(e)}function nb(e){console.error(e)}function ob(e){Yu(e)}function Wu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Py(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 bp(e,t,n){return n=_i(n),n.tag=3,n.payload={element:null},n.callback=function(){Wu(e,t)},n}function ib(e){return e=_i(e),e.tag=3,e}function ab(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(){Py(t,n,o)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Py(t,n,o),typeof i!="function"&&(Ti===null?Ti=new Set([this]):Ti.add(this));var r=o.stack;this.componentDidCatch(o.value,{componentStack:r!==null?r:""})})}function UN(e,t,n,o,i){if(n.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=n.alternate,t!==null&&xl(t,n,i,!0),n=Cn.current,n!==null){switch(n.tag){case 31:case 13:return Vn===null?oc():n.alternate===null&&tt===0&&(tt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,o===ju?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([o]):t.add(o),kd(e,o,i)),!1;case 22:return n.flags|=65536,o===ju?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)),kd(e,o,i)),!1}throw Error(U(435,n.tag))}return kd(e,o,i),oc(),!1}if(Ce)return t=Cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,o!==lp&&(e=Error(U(422),{cause:o}),Vr(Un(e,n)))):(o!==lp&&(t=Error(U(423),{cause:o}),Vr(Un(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,o=Un(o,n),i=bp(e.stateNode,o,i),Td(e,i),tt!==4&&(tt=2)),!1;var a=Error(U(520),{cause:o});if(a=Un(a,n),Lr===null?Lr=[a]:Lr.push(a),tt!==4&&(tt=2),t===null)return!0;o=Un(o,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=bp(n.stateNode,o,e),Td(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"&&(Ti===null||!Ti.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=ib(i),ab(i,e,n,o),Td(n,i),!1}n=n.return}while(n!==null);return!1}var bm=Error(U(461)),pt=!1;function At(e,t,n,o){t.child=e===null?bv(t,null,n,o):ia(t,e.child,n,o)}function Uy(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 oa(t),o=rm(e,t,n,l,a,i),r=sm(),e!==null&&!pt?(um(e,t,i),$o(e,t,i)):(Ce&&r&&Jp(t),t.flags|=1,At(e,t,o,i),t.child)}function Iy(e,t,n,o,i){if(e===null){var a=n.type;return typeof a=="function"&&!Wp(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,lb(e,t,a,o,i)):(e=wu(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:Ur,n(l,o)&&e.ref===t.ref)return $o(e,t,i)}return t.flags|=1,e=Vo(a,o),e.ref=t.ref,e.return=t,t.child=e}function lb(e,t,n,o,i){if(e!==null){var a=e.memoizedProps;if(Ur(a,o)&&e.ref===t.ref)if(pt=!1,t.pendingProps=o=a,Sm(e,i))(e.flags&131072)!==0&&(pt=!0);else return t.lanes=e.lanes,$o(e,t,i)}return Sp(e,t,n,o,i)}function rb(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 Vy(e,t,a,n,o)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Au(t,a!==null?a.cachePool:null),a!==null?Dy(t,a):pp(),_v(t);else return o=t.lanes=536870912,Vy(e,t,a!==null?a.baseLanes|n:n,n,o)}else a!==null?(Au(t,a.cachePool),Dy(t,a),pi(t),t.memoizedState=null):(e!==null&&Au(t,null),pp(),pi(t));return At(e,t,i,n),t.child}function _r(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vy(e,t,n,o,i){var a=nm();return a=a===null?null:{parent:dt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Au(t,null),pp(),_v(t),e!==null&&xl(e,t,o,!0),t.childLanes=i,null}function Ru(e,t){return t=Ju({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yy(e,t,n){return ia(t,e.child,null,n),e=Ru(t,t.pendingProps),e.flags|=2,vn(t),t.memoizedState=null,e}function IN(e,t,n){var o=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ce){if(o.mode==="hidden")return e=Ru(t,o),t.lanes=536870912,_r(null,e);if(mp(t),(e=qe)?(e=Jb(e,In),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi!==null?{id:po,overflow:mo}:null,retryLane:536870912,hydrationErrors:null},n=dv(e),n.return=t,t.child=n,Dt=t,qe=null)):e=null,e===null)throw Di(t);return t.lanes=536870912,null}return Ru(t,o)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(mp(t),i)if(t.flags&256)t.flags&=-257,t=Yy(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(U(558));else if(pt||xl(e,t,n,!1),i=(n&e.childLanes)!==0,pt||i){if(o=Pe,o!==null&&(l=G0(o,n),l!==0&&l!==a.retryLane))throw a.retryLane=l,ca(e,l),ln(o,e,l),bm;oc(),t=Yy(e,t,n)}else e=a.treeContext,qe=Yn(l.nextSibling),Dt=t,Ce=!0,xi=null,In=!1,e!==null&&mv(t,e),t=Ru(t,o),t.flags|=4096;return t}return e=Vo(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ou(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(U(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Sp(e,t,n,o,i){return oa(t),n=rm(e,t,n,o,void 0,i),o=sm(),e!==null&&!pt?(um(e,t,i),$o(e,t,i)):(Ce&&o&&Jp(t),t.flags|=1,At(e,t,n,i),t.child)}function Xy(e,t,n,o,i,a){return oa(t),t.updateQueue=null,n=Tv(t,o,n,i),Ev(e),o=sm(),e!==null&&!pt?(um(e,t,a),$o(e,t,a)):(Ce&&o&&Jp(t),t.flags|=1,At(e,t,n,a),t.child)}function qy(e,t,n,o,i){if(oa(t),t.stateNode===null){var a=Fa,l=n.contextType;typeof l=="object"&&l!==null&&(a=Rt(l)),a=new n(o,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=vp,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=o,a.state=t.memoizedState,a.refs={},im(t),l=n.contextType,a.context=typeof l=="object"&&l!==null?Rt(l):Fa,a.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(Cd(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&&vp.enqueueReplaceState(a,a.state,null),Dr(t,o,a,i),Mr(),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=la(n,r);a.props=s;var u=a.context,c=n.contextType;l=Fa,typeof c=="object"&&c!==null&&(l=Rt(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)&&Gy(t,a,o,l),ci=!1;var f=t.memoizedState;a.state=f,Dr(t,o,a,i),Mr(),u=t.memoizedState,r||f!==u||ci?(typeof d=="function"&&(Cd(t,n,d,o),u=t.memoizedState),(s=ci||ky(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,fp(e,t),l=t.memoizedProps,c=la(n,l),a.props=c,d=t.pendingProps,f=a.context,u=n.contextType,s=Fa,typeof u=="object"&&u!==null&&(s=Rt(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)&&Gy(t,a,o,s),ci=!1,f=t.memoizedState,a.state=f,Dr(t,o,a,i),Mr();var h=t.memoizedState;l!==d||f!==h||ci||e!==null&&e.dependencies!==null&&Zu(e.dependencies)?(typeof r=="function"&&(Cd(t,n,r,o),h=t.memoizedState),(c=ci||ky(t,n,c,o,f,h,s)||e!==null&&e.dependencies!==null&&Zu(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,Ou(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=ia(t,e.child,null,i),t.child=ia(t,null,n,i)):At(e,t,n,i),t.memoizedState=a.state,e=t.child):e=$o(e,t,i),e}function Zy(e,t,n,o){return na(),t.flags|=256,At(e,t,n,o),t.child}var wd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ad(e){return{baseLanes:e,cachePool:gv()}}function Md(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Sn),e}function sb(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:(at.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ce){if(i?di(t):pi(t),(e=qe)?(e=Jb(e,In),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi!==null?{id:po,overflow:mo}:null,retryLane:536870912,hydrationErrors:null},n=dv(e),n.return=t,t.child=n,Dt=t,qe=null)):e=null,e===null)throw Di(t);return Lp(e)?t.lanes=32:t.lanes=536870912,null}var r=o.children;return o=o.fallback,i?(pi(t),i=t.mode,r=Ju({mode:"hidden",children:r},i),o=Wi(o,i,n,null),r.return=t,o.return=t,r.sibling=o,t.child=r,o=t.child,o.memoizedState=Ad(n),o.childLanes=Md(e,l,n),t.memoizedState=wd,_r(null,o)):(di(t),xp(t,r))}var s=e.memoizedState;if(s!==null&&(r=s.dehydrated,r!==null)){if(a)t.flags&256?(di(t),t.flags&=-257,t=Dd(e,t,n)):t.memoizedState!==null?(pi(t),t.child=e.child,t.flags|=128,t=null):(pi(t),r=o.fallback,i=t.mode,o=Ju({mode:"visible",children:o.children},i),r=Wi(r,i,n,null),r.flags|=2,o.return=t,r.return=t,o.sibling=r,t.child=o,ia(t,e.child,null,n),o=t.child,o.memoizedState=Ad(n),o.childLanes=Md(e,l,n),t.memoizedState=wd,t=_r(null,o));else if(di(t),Lp(r)){if(l=r.nextSibling&&r.nextSibling.dataset,l)var u=l.dgst;l=u,o=Error(U(419)),o.stack="",o.digest=l,Vr({value:o,source:null,stack:null}),t=Dd(e,t,n)}else if(pt||xl(e,t,n,!1),l=(n&e.childLanes)!==0,pt||l){if(l=Pe,l!==null&&(o=G0(l,n),o!==0&&o!==s.retryLane))throw s.retryLane=o,ca(e,o),ln(l,e,o),bm;zp(r)||oc(),t=Dd(e,t,n)}else zp(r)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,qe=Yn(r.nextSibling),Dt=t,Ce=!0,xi=null,In=!1,e!==null&&mv(t,e),t=xp(t,o.children),t.flags|=4096);return t}return i?(pi(t),r=o.fallback,i=t.mode,s=e.child,u=s.sibling,o=Vo(s,{mode:"hidden",children:o.children}),o.subtreeFlags=s.subtreeFlags&65011712,u!==null?r=Vo(u,r):(r=Wi(r,i,n,null),r.flags|=2),r.return=t,o.return=t,o.sibling=r,t.child=o,_r(null,o),o=t.child,r=e.child.memoizedState,r===null?r=Ad(n):(i=r.cachePool,i!==null?(s=dt._currentValue,i=i.parent!==s?{parent:s,pool:s}:i):i=gv(),r={baseLanes:r.baseLanes|n,cachePool:i}),o.memoizedState=r,o.childLanes=Md(e,l,n),t.memoizedState=wd,_r(e.child,o)):(di(t),n=e.child,e=n.sibling,n=Vo(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 xp(e,t){return t=Ju({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ju(e,t){return e=bn(22,e,null,t),e.lanes=0,e}function Dd(e,t,n){return ia(t,e.child,null,n),e=xp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jy(e,t,n){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),sp(e.return,t,n)}function Rd(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 ub(e,t,n){var o=t.pendingProps,i=o.revealOrder,a=o.tail;o=o.children;var l=at.current,r=(l&2)!==0;if(r?(l=l&1|2,t.flags|=128):l&=1,Ie(at,l),At(e,t,o,n),o=Ce?Ir:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jy(e,n,t);else if(e.tag===19)jy(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),Rd(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}Rd(t,!0,n,null,a,o);break;case"together":Rd(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function $o(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Oi|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(xl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,n=Vo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Vo(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&&Zu(e)))}function VN(e,t,n){switch(t.tag){case 3:Pu(t,t.stateNode.containerInfo),fi(t,dt,e.memoizedState.cache),na();break;case 27:case 5:Kd(t);break;case 4:Pu(t,t.stateNode.containerInfo);break;case 10:fi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mp(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(di(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sb(e,t,n):(di(t),e=$o(e,t,n),e!==null?e.sibling:null);di(t);break;case 19:var i=(e.flags&128)!==0;if(o=(n&t.childLanes)!==0,o||(xl(e,t,n,!1),o=(n&t.childLanes)!==0),i){if(o)return ub(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ie(at,at.current),o)break;return null;case 22:return t.lanes=0,rb(e,t,n,t.pendingProps);case 24:fi(t,dt,e.memoizedState.cache)}return $o(e,t,n)}function cb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)pt=!0;else{if(!Sm(e,n)&&(t.flags&128)===0)return pt=!1,VN(e,t,n);pt=(e.flags&131072)!==0}else pt=!1,Ce&&(t.flags&1048576)!==0&&pv(t,Ir,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Ki(t.elementType),t.type=e,typeof e=="function")Wp(e)?(o=la(e,o),t.tag=1,t=qy(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===Gp){t.tag=11,t=Uy(null,t,e,o,n);break e}else if(i===Pp){t.tag=14,t=Iy(null,t,e,o,n);break e}}throw t=jd(e)||e,Error(U(306,t,""))}}return t;case 0:return Sp(e,t,t.type,t.pendingProps,n);case 1:return o=t.type,i=la(o,t.pendingProps),qy(e,t,o,i,n);case 3:e:{if(Pu(t,t.stateNode.containerInfo),e===null)throw Error(U(387));o=t.pendingProps;var a=t.memoizedState;i=a.element,fp(e,t),Dr(t,o,null,n);var l=t.memoizedState;if(o=l.cache,fi(t,dt,o),o!==a.cache&&up(t,[dt],n,!0),Mr(),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=Zy(e,t,o,n);break e}else if(o!==i){i=Un(Error(U(424)),t),Vr(i),t=Zy(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,qe=Yn(e.firstChild),Dt=t,Ce=!0,xi=null,In=!0,n=bv(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(na(),o===i){t=$o(e,t,n);break e}At(e,t,o,n)}t=t.child}return t;case 26:return Ou(e,t),e===null?(n=h0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ce||(n=t.type,e=t.pendingProps,o=rc(Si.current).createElement(n),o[Mt]=t,o[rn]=e,Ot(o,n,e),_t(o),t.stateNode=o):t.memoizedState=h0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kd(t),e===null&&Ce&&(o=t.stateNode=e1(t.type,t.pendingProps,Si.current),Dt=t,In=!0,i=qe,Li(t.type)?(Hp=i,qe=Yn(o.firstChild)):qe=i),At(e,t,t.pendingProps.children,n),Ou(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ce&&((i=o=qe)&&(o=gC(o,t.type,t.pendingProps,In),o!==null?(t.stateNode=o,Dt=t,qe=Yn(o.firstChild),In=!1,i=!0):i=!1),i||Di(t)),Kd(t),i=t.type,a=t.pendingProps,l=e!==null?e.memoizedProps:null,o=a.children,Rp(i,a)?o=null:l!==null&&Rp(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=rm(e,t,zN,null,null,n),$r._currentValue=i),Ou(e,t),At(e,t,o,n),t.child;case 6:return e===null&&Ce&&((e=n=qe)&&(n=yC(n,t.pendingProps,In),n!==null?(t.stateNode=n,Dt=t,qe=null,e=!0):e=!1),e||Di(t)),null;case 13:return sb(e,t,n);case 4:return Pu(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=ia(t,null,o,n):At(e,t,o,n),t.child;case 11:return Uy(e,t,t.type,t.pendingProps,n);case 7:return At(e,t,t.pendingProps,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:return o=t.pendingProps,fi(t,t.type,o.value),At(e,t,o.children,n),t.child;case 9:return i=t.type._context,o=t.pendingProps.children,oa(t),i=Rt(i),o=o(i),t.flags|=1,At(e,t,o,n),t.child;case 14:return Iy(e,t,t.type,t.pendingProps,n);case 15:return lb(e,t,t.type,t.pendingProps,n);case 19:return ub(e,t,n);case 31:return IN(e,t,n);case 22:return rb(e,t,n,t.pendingProps);case 24:return oa(t),o=Rt(dt),e===null?(i=nm(),i===null&&(i=Pe,a=tm(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:o,cache:i},im(t),fi(t,dt,i)):((e.lanes&n)!==0&&(fp(e,t),Dr(t,null,null,n),Mr()),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),fi(t,dt,o)):(o=a.cache,fi(t,dt,o),o!==i.cache&&up(t,[dt],n,!0))),At(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(U(156,t.tag))}function zo(e){e.flags|=4}function Od(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(Lb())e.flags|=8192;else throw ea=ju,om}else e.flags&=-16777217}function $y(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!o1(t))if(Lb())e.flags|=8192;else throw ea=ju,om}function gu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?H0():536870912,e.lanes|=t,ml|=t)}function hr(e,t){if(!Ce)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 Xe(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 YN(e,t,n){var o=t.pendingProps;switch(em(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return n=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),Yo(dt),sl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pa(t)?zo(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ed())),Xe(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(zo(t),a!==null?(Xe(t),$y(t,a)):(Xe(t),Od(t,i,null,o,n))):a?a!==e.memoizedState?(zo(t),Xe(t),$y(t,a)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&zo(t),Xe(t),Od(t,i,e,o,n)),null;case 27:if(Uu(t),n=Si.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}e=go.current,Pa(t)?Ey(t,e):(e=e1(i,o,n),t.stateNode=e,zo(t))}return Xe(t),null;case 5:if(Uu(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(!o){if(t.stateNode===null)throw Error(U(166));return Xe(t),null}if(a=go.current,Pa(t))Ey(t,a);else{var l=rc(Si.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[Mt]=t,a[rn]=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(Ot(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&&zo(t)}}return Xe(t),Od(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&zo(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(U(166));if(e=Si.current,Pa(t)){if(e=t.stateNode,n=t.memoizedProps,o=null,i=Dt,i!==null)switch(i.tag){case 27:case 5:o=i.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===n||o!==null&&o.suppressHydrationWarning===!0||Qb(e.nodeValue,n)),e||Di(t,!0)}else e=rc(e).createTextNode(o),e[Mt]=t,t.stateNode=e}return Xe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(o=Pa(t),n!==null){if(e===null){if(!o)throw Error(U(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(557));e[Mt]=t}else na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else n=Ed(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(vn(t),t):(vn(t),null);if((t.flags&128)!==0)throw Error(U(558))}return Xe(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Pa(t),o!==null&&o.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[Mt]=t}else na(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),i=!1}else i=Ed(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(vn(t),t):(vn(t),null)}return vn(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),gu(t,t.updateQueue),Xe(t),null);case 4:return sl(),e===null&&wm(t.stateNode.containerInfo),Xe(t),null;case 10:return Yo(t.type),Xe(t),null;case 19:if(Et(at),o=t.memoizedState,o===null)return Xe(t),null;if(i=(t.flags&128)!==0,a=o.rendering,a===null)if(i)hr(o,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=Ku(e),a!==null){for(t.flags|=128,hr(o,!1),e=a.updateQueue,t.updateQueue=e,gu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fv(n,e),n=n.sibling;return Ie(at,at.current&1|2),Ce&&ko(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&xn()>tc&&(t.flags|=128,i=!0,hr(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,gu(t,e),hr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ce)return Xe(t),null}else 2*xn()-o.renderingStartTime>tc&&n!==536870912&&(t.flags|=128,i=!0,hr(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=xn(),e.sibling=null,n=at.current,Ie(at,i?n&1|2:n&1),Ce&&ko(t,o.treeForkCount),e):(Xe(t),null);case 22:case 23:return vn(t),am(),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&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),n=t.updateQueue,n!==null&&gu(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&&Et(Ji),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yo(dt),Xe(t),null;case 25:return null;case 30:return null}throw Error(U(156,t.tag))}function XN(e,t){switch(em(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Yo(dt),sl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Uu(t),null;case 31:if(t.memoizedState!==null){if(vn(t),t.alternate===null)throw Error(U(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Et(at),null;case 4:return sl(),null;case 10:return Yo(t.type),null;case 22:case 23:return vn(t),am(),e!==null&&Et(Ji),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Yo(dt),null;case 25:return null;default:return null}}function fb(e,t){switch(em(t),t.tag){case 3:Yo(dt),sl();break;case 26:case 27:case 5:Uu(t);break;case 4:sl();break;case 31:t.memoizedState!==null&&vn(t);break;case 13:vn(t);break;case 19:Et(at);break;case 10:Yo(t.type);break;case 22:case 23:vn(t),am(),e!==null&&Et(Ji);break;case 24:Yo(dt)}}function as(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){ze(t,t.return,r)}}function Ri(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){ze(i,s,c)}}}o=o.next}while(o!==a)}}catch(c){ze(t,t.return,c)}}function db(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xv(t,n)}catch(o){ze(e,e.return,o)}}}function pb(e,t,n){n.props=la(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(o){ze(e,t,o)}}function Or(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){ze(e,t,i)}}function ho(e,t){var n=e.ref,o=e.refCleanup;if(n!==null)if(typeof o=="function")try{o()}catch(i){ze(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){ze(e,t,i)}else n.current=null}function mb(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){ze(e,e.return,i)}}function zd(e,t,n){try{var o=e.stateNode;cC(o,e.type,n,t),o[rn]=t}catch(i){ze(e,e.return,i)}}function hb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Li(e.type)||e.tag===4}function Ld(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hb(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&&Li(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 _p(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=Uo));else if(o!==4&&(o===27&&Li(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(_p(e,t,n),e=e.sibling;e!==null;)_p(e,t,n),e=e.sibling}function ec(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&&Li(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ec(e,t,n),e=e.sibling;e!==null;)ec(e,t,n),e=e.sibling}function gb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var o=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ot(t,o,n),t[Mt]=e,t[rn]=n}catch(a){ze(e,e.return,a)}}var Go=!1,ft=!1,Hd=!1,Ky=typeof WeakSet=="function"?WeakSet:Set,xt=null;function qN(e,t){if(e=e.containerInfo,Mp=fc,e=ov(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(Dp={focusedElem:e,selectionRange:n},fc=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){switch(t=xt,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 v=la(n.type,i);e=o.getSnapshotBeforeUpdate(v,a),o.__reactInternalSnapshotBeforeUpdate=e}catch(b){ze(n,n.return,b)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Op(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Op(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(U(163))}if(e=t.sibling,e!==null){e.return=t.return,xt=e;break}xt=t.return}}function yb(e,t,n){var o=n.flags;switch(n.tag){case 0:case 11:case 15:Ho(e,n),o&4&&as(5,n);break;case 1:if(Ho(e,n),o&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){ze(n,n.return,l)}else{var i=la(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){ze(n,n.return,l)}}o&64&&db(n),o&512&&Or(n,n.return);break;case 3:if(Ho(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{xv(e,t)}catch(l){ze(n,n.return,l)}}break;case 27:t===null&&o&4&&gb(n);case 26:case 5:Ho(e,n),t===null&&o&4&&mb(n),o&512&&Or(n,n.return);break;case 12:Ho(e,n);break;case 31:Ho(e,n),o&4&&Sb(e,n);break;case 13:Ho(e,n),o&4&&xb(e,n),o&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=eC.bind(null,n),vC(e,n))));break;case 22:if(o=n.memoizedState!==null||Go,!o){t=t!==null&&t.memoizedState!==null||ft,i=Go;var a=ft;Go=o,(ft=t)&&!a?Bo(e,n,(n.subtreeFlags&8772)!==0):Ho(e,n),Go=i,ft=a}break;case 30:break;default:Ho(e,n)}}function vb(e){var t=e.alternate;t!==null&&(e.alternate=null,vb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yp(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 Ke=null,on=!1;function Lo(e,t,n){for(n=n.child;n!==null;)bb(e,t,n),n=n.sibling}function bb(e,t,n){if(_n&&typeof _n.onCommitFiberUnmount=="function")try{_n.onCommitFiberUnmount(Wr,n)}catch{}switch(n.tag){case 26:ft||ho(n,t),Lo(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ft||ho(n,t);var o=Ke,i=on;Li(n.type)&&(Ke=n.stateNode,on=!1),Lo(e,t,n),Br(n.stateNode),Ke=o,on=i;break;case 5:ft||ho(n,t);case 6:if(o=Ke,i=on,Ke=null,Lo(e,t,n),Ke=o,on=i,Ke!==null)if(on)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(a){ze(n,t,a)}else try{Ke.removeChild(n.stateNode)}catch(a){ze(n,t,a)}break;case 18:Ke!==null&&(on?(e=Ke,c0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),vl(e)):c0(Ke,n.stateNode));break;case 4:o=Ke,i=on,Ke=n.stateNode.containerInfo,on=!0,Lo(e,t,n),Ke=o,on=i;break;case 0:case 11:case 14:case 15:Ri(2,n,t),ft||Ri(4,n,t),Lo(e,t,n);break;case 1:ft||(ho(n,t),o=n.stateNode,typeof o.componentWillUnmount=="function"&&pb(n,t,o)),Lo(e,t,n);break;case 21:Lo(e,t,n);break;case 22:ft=(o=ft)||n.memoizedState!==null,Lo(e,t,n),ft=o;break;default:Lo(e,t,n)}}function Sb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{vl(e)}catch(n){ze(t,t.return,n)}}}function xb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{vl(e)}catch(n){ze(t,t.return,n)}}function ZN(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ky),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ky),t;default:throw Error(U(435,e.tag))}}function yu(e,t){var n=ZN(e);t.forEach(function(o){if(!n.has(o)){n.add(o);var i=tC.bind(null,e,o);o.then(i,i)}})}function tn(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(Li(r.type)){Ke=r.stateNode,on=!1;break e}break;case 5:Ke=r.stateNode,on=!1;break e;case 3:case 4:Ke=r.stateNode.containerInfo,on=!0;break e}r=r.return}if(Ke===null)throw Error(U(160));bb(a,l,i),Ke=null,on=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_b(t,e),t=t.sibling}var Jn=null;function _b(e,t){var n=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(t,e),nn(e),o&4&&(Ri(3,e,e.return),as(3,e),Ri(5,e,e.return));break;case 1:tn(t,e),nn(e),o&512&&(ft||n===null||ho(n,n.return)),o&64&&Go&&(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=Jn;if(tn(t,e),nn(e),o&512&&(ft||n===null||ho(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[ts]||a[Mt]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=i.createElement(o),i.head.insertBefore(a,i.querySelector("head > title"))),Ot(a,o,n),a[Mt]=e,_t(a),o=a;break e;case"link":var l=y0("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),Ot(a,o,n),i.head.appendChild(a);break;case"meta":if(l=y0("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),Ot(a,o,n),i.head.appendChild(a);break;default:throw Error(U(468,o))}a[Mt]=e,_t(a),o=a}e.stateNode=o}else v0(i,e.type,e.stateNode);else e.stateNode=g0(i,o,e.memoizedProps);else a!==o?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,o===null?v0(i,e.type,e.stateNode):g0(i,o,e.memoizedProps)):o===null&&e.stateNode!==null&&zd(e,e.memoizedProps,n.memoizedProps)}break;case 27:tn(t,e),nn(e),o&512&&(ft||n===null||ho(n,n.return)),n!==null&&o&4&&zd(e,e.memoizedProps,n.memoizedProps);break;case 5:if(tn(t,e),nn(e),o&512&&(ft||n===null||ho(n,n.return)),e.flags&32){i=e.stateNode;try{cl(i,"")}catch(v){ze(e,e.return,v)}}o&4&&e.stateNode!=null&&(i=e.memoizedProps,zd(e,i,n!==null?n.memoizedProps:i)),o&1024&&(Hd=!0);break;case 6:if(tn(t,e),nn(e),o&4){if(e.stateNode===null)throw Error(U(162));o=e.memoizedProps,n=e.stateNode;try{n.nodeValue=o}catch(v){ze(e,e.return,v)}}break;case 3:if(Hu=null,i=Jn,Jn=sc(t.containerInfo),tn(t,e),Jn=i,nn(e),o&4&&n!==null&&n.memoizedState.isDehydrated)try{vl(t.containerInfo)}catch(v){ze(e,e.return,v)}Hd&&(Hd=!1,Eb(e));break;case 4:o=Jn,Jn=sc(e.stateNode.containerInfo),tn(t,e),nn(e),Jn=o;break;case 12:tn(t,e),nn(e);break;case 31:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,yu(e,o)));break;case 13:tn(t,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Tc=xn()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,yu(e,o)));break;case 22:i=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=Go,c=ft;if(Go=u||i,ft=c||s,tn(t,e),ft=c,Go=u,nn(e),o&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||s||Go||ft||Qi(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(v){ze(s,s.return,v)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(v){ze(s,s.return,v)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;i?f0(h,!0):f0(s.stateNode,!1)}catch(v){ze(s,s.return,v)}}}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,yu(e,n))));break;case 19:tn(t,e),nn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,yu(e,o)));break;case 30:break;case 21:break;default:tn(t,e),nn(e)}}function nn(e){var t=e.flags;if(t&2){try{for(var n,o=e.return;o!==null;){if(hb(o)){n=o;break}o=o.return}if(n==null)throw Error(U(160));switch(n.tag){case 27:var i=n.stateNode,a=Ld(e);ec(e,a,i);break;case 5:var l=n.stateNode;n.flags&32&&(cl(l,""),n.flags&=-33);var r=Ld(e);ec(e,r,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Ld(e);_p(e,u,s);break;default:throw Error(U(161))}}catch(c){ze(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ho(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)yb(e,t.alternate,t),t=t.sibling}function Qi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ri(4,t,t.return),Qi(t);break;case 1:ho(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&pb(t,t.return,n),Qi(t);break;case 27:Br(t.stateNode);case 26:case 5:ho(t,t.return),Qi(t);break;case 22:t.memoizedState===null&&Qi(t);break;case 30:Qi(t);break;default:Qi(t)}e=e.sibling}}function Bo(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:Bo(i,a,n),as(4,a);break;case 1:if(Bo(i,a,n),o=a,i=o.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){ze(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++)Sv(s[i],r)}catch(u){ze(o,o.return,u)}}n&&l&64&&db(a),Or(a,a.return);break;case 27:gb(a);case 26:case 5:Bo(i,a,n),n&&o===null&&l&4&&mb(a),Or(a,a.return);break;case 12:Bo(i,a,n);break;case 31:Bo(i,a,n),n&&l&4&&Sb(i,a);break;case 13:Bo(i,a,n),n&&l&4&&xb(i,a);break;case 22:a.memoizedState===null&&Bo(i,a,n),Or(a,a.return);break;case 30:break;default:Bo(i,a,n)}t=t.sibling}}function xm(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&&os(n))}function _m(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&os(e))}function Wn(e,t,n,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Tb(e,t,n,o),t=t.sibling}function Tb(e,t,n,o){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Wn(e,t,n,o),i&2048&&as(9,t);break;case 1:Wn(e,t,n,o);break;case 3:Wn(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&&os(e)));break;case 12:if(i&2048){Wn(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){ze(t,t.return,s)}}else Wn(e,t,n,o);break;case 31:Wn(e,t,n,o);break;case 13:Wn(e,t,n,o);break;case 23:break;case 22:a=t.stateNode,l=t.alternate,t.memoizedState!==null?a._visibility&2?Wn(e,t,n,o):zr(e,t):a._visibility&2?Wn(e,t,n,o):(a._visibility|=2,Ia(e,t,n,o,(t.subtreeFlags&10256)!==0||!1)),i&2048&&xm(l,t);break;case 24:Wn(e,t,n,o),i&2048&&_m(t.alternate,t);break;default:Wn(e,t,n,o)}}function Ia(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:Ia(a,l,r,s,i),as(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?Ia(a,l,r,s,i):zr(a,l):(c._visibility|=2,Ia(a,l,r,s,i)),i&&u&2048&&xm(l.alternate,l);break;case 24:Ia(a,l,r,s,i),i&&u&2048&&_m(l.alternate,l);break;default:Ia(a,l,r,s,i)}t=t.sibling}}function zr(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:zr(n,o),i&2048&&xm(o.alternate,o);break;case 24:zr(n,o),i&2048&&_m(o.alternate,o);break;default:zr(n,o)}t=t.sibling}}var Er=8192;function Ua(e,t,n){if(e.subtreeFlags&Er)for(e=e.child;e!==null;)Nb(e,t,n),e=e.sibling}function Nb(e,t,n){switch(e.tag){case 26:Ua(e,t,n),e.flags&Er&&e.memoizedState!==null&&DC(n,Jn,e.memoizedState,e.memoizedProps);break;case 5:Ua(e,t,n);break;case 3:case 4:var o=Jn;Jn=sc(e.stateNode.containerInfo),Ua(e,t,n),Jn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Er,Er=16777216,Ua(e,t,n),Er=o):Ua(e,t,n));break;default:Ua(e,t,n)}}function Cb(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 gr(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];xt=o,Ab(o,e)}Cb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wb(e),e=e.sibling}function wb(e){switch(e.tag){case 0:case 11:case 15:gr(e),e.flags&2048&&Ri(9,e,e.return);break;case 3:gr(e);break;case 12:gr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zu(e)):gr(e);break;default:gr(e)}}function zu(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];xt=o,Ab(o,e)}Cb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ri(8,t,t.return),zu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zu(t));break;default:zu(t)}e=e.sibling}}function Ab(e,t){for(;xt!==null;){var n=xt;switch(n.tag){case 0:case 11:case 15:Ri(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:os(n.memoizedState.cache)}if(o=n.child,o!==null)o.return=n,xt=o;else e:for(n=e;xt!==null;){o=xt;var i=o.sibling,a=o.return;if(vb(o),o===n){xt=null;break e}if(i!==null){i.return=a,xt=i;break e}xt=a}}}var jN={getCacheForType:function(e){var t=Rt(dt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Rt(dt).controller.signal}},$N=typeof WeakMap=="function"?WeakMap:Map,De=0,Pe=null,_e=null,Te=0,Oe=0,yn=null,yi=!1,El=!1,Em=!1,Ko=0,tt=0,Oi=0,ta=0,Tm=0,Sn=0,ml=0,Lr=null,an=null,Ep=!1,Tc=0,Mb=0,tc=1/0,nc=null,Ti=null,ht=0,Ni=null,hl=null,Xo=0,Tp=0,Np=null,Db=null,Hr=0,Cp=null;function Tn(){return(De&2)!==0&&Te!==0?Te&-Te:ue.T!==null?Cm():P0()}function Rb(){if(Sn===0)if((Te&536870912)===0||Ce){var e=ru;ru<<=1,(ru&3932160)===0&&(ru=262144),Sn=e}else Sn=536870912;return e=Cn.current,e!==null&&(e.flags|=32),Sn}function ln(e,t,n){(e===Pe&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)&&(gl(e,0),vi(e,Te,Sn,!1)),es(e,n),((De&2)===0||e!==Pe)&&(e===Pe&&((De&2)===0&&(ta|=n),tt===4&&vi(e,Te,Sn,!1)),vo(e))}function Ob(e,t,n){if((De&6)!==0)throw Error(U(327));var o=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Jr(e,t),i=o?FN(e,t):Bd(e,t,!0),a=o;do{if(i===0){El&&!o&&vi(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!KN(n)){i=Bd(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=Lr;var s=r.current.memoizedState.isDehydrated;if(s&&(gl(r,l).flags|=256),l=Bd(r,l,!1),l!==2){if(Em&&!s){r.errorRecoveryDisabledLanes|=a,ta|=a,i=4;break e}a=an,an=i,a!==null&&(an===null?an=a:an.push.apply(an,a))}i=l}if(a=!1,i!==2)continue}}if(i===1){gl(e,0),vi(e,t,0,!0);break}e:{switch(o=e,a=i,a){case 0:case 1:throw Error(U(345));case 4:if((t&4194048)!==t)break;case 6:vi(o,t,Sn,!yi);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(U(329))}if((t&62914560)===t&&(i=Tc+300-xn(),10<i)){if(vi(o,t,Sn,!yi),pc(o,0,!0)!==0)break e;Xo=t,o.timeoutHandle=Wb(Qy.bind(null,o,n,an,nc,Ep,t,Sn,ta,ml,yi,a,"Throttled",-0,0),i);break e}Qy(o,n,an,nc,Ep,t,Sn,ta,ml,yi,a,null,-0,0)}}break}while(!0);vo(e)}function Qy(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:Uo},Nb(t,a,d);var v=(a&62914560)===a?Tc-xn():(a&4194048)===a?Mb-xn():0;if(v=RC(d,v),v!==null){Xo=a,e.cancelPendingCommit=v(Wy.bind(null,e,t,a,n,o,i,l,r,s,c,d,null,f,h)),vi(e,a,l,!u);return}}Wy(e,t,a,n,o,i,l,r,s)}function KN(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(!Nn(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 vi(e,t,n,o){t&=~Tm,t&=~ta,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var i=t;0<i;){var a=31-En(i),l=1<<a;o[a]=-1,i&=~l}n!==0&&B0(e,n,t)}function Nc(){return(De&6)===0?(ls(0,!1),!1):!0}function Nm(){if(_e!==null){if(Oe===0)var e=_e.return;else e=_e,Io=fa=null,cm(e),al=null,Yr=0,e=_e;for(;e!==null;)fb(e.alternate,e),e=e.return;_e=null}}function gl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,pC(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Xo=0,Nm(),Pe=e,_e=n=Vo(e.current,null),Te=t,Oe=0,yn=null,yi=!1,El=Jr(e,t),Em=!1,ml=Sn=Tm=ta=Oi=tt=0,an=Lr=null,Ep=!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-En(o),a=1<<i;t|=e[i],o&=~a}return Ko=t,yc(),n}function zb(e,t){he=null,ue.H=qr,t===_l||t===bc?(t=Ay(),Oe=3):t===om?(t=Ay(),Oe=4):Oe=t===bm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yn=t,_e===null&&(tt=1,Wu(e,Un(t,e.current)))}function Lb(){var e=Cn.current;return e===null?!0:(Te&4194048)===Te?Vn===null:(Te&62914560)===Te||(Te&536870912)!==0?e===Vn:!1}function Hb(){var e=ue.H;return ue.H=qr,e===null?qr:e}function Bb(){var e=ue.A;return ue.A=jN,e}function oc(){tt=4,yi||(Te&4194048)!==Te&&Cn.current!==null||(El=!0),(Oi&134217727)===0&&(ta&134217727)===0||Pe===null||vi(Pe,Te,Sn,!1)}function Bd(e,t,n){var o=De;De|=2;var i=Hb(),a=Bb();(Pe!==e||Te!==t)&&(nc=null,gl(e,t)),t=!1;var l=tt;e:do try{if(Oe!==0&&_e!==null){var r=_e,s=yn;switch(Oe){case 8:Nm(),l=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(t=!0);var u=Oe;if(Oe=0,yn=null,el(e,r,s,u),n&&El){l=0;break e}break;default:u=Oe,Oe=0,yn=null,el(e,r,s,u)}}QN(),l=tt;break}catch(c){zb(e,c)}while(!0);return t&&e.shellSuspendCounter++,Io=fa=null,De=o,ue.H=i,ue.A=a,_e===null&&(Pe=null,Te=0,yc()),l}function QN(){for(;_e!==null;)kb(_e)}function FN(e,t){var n=De;De|=2;var o=Hb(),i=Bb();Pe!==e||Te!==t?(nc=null,tc=xn()+500,gl(e,t)):El=Jr(e,t);e:do try{if(Oe!==0&&_e!==null){t=_e;var a=yn;t:switch(Oe){case 1:Oe=0,yn=null,el(e,t,a,1);break;case 2:case 9:if(wy(a)){Oe=0,yn=null,Fy(t);break}t=function(){Oe!==2&&Oe!==9||Pe!==e||(Oe=7),vo(e)},a.then(t,t);break e;case 3:Oe=7;break e;case 4:Oe=5;break e;case 7:wy(a)?(Oe=0,yn=null,Fy(t)):(Oe=0,yn=null,el(e,t,a,7));break;case 5:var l=null;switch(_e.tag){case 26:l=_e.memoizedState;case 5:case 27:var r=_e;if(l?o1(l):r.stateNode.complete){Oe=0,yn=null;var s=r.sibling;if(s!==null)_e=s;else{var u=r.return;u!==null?(_e=u,Cc(u)):_e=null}break t}}Oe=0,yn=null,el(e,t,a,5);break;case 6:Oe=0,yn=null,el(e,t,a,6);break;case 8:Nm(),tt=6;break e;default:throw Error(U(462))}}WN();break}catch(c){zb(e,c)}while(!0);return Io=fa=null,ue.H=o,ue.A=i,De=n,_e!==null?0:(Pe=null,Te=0,yc(),tt)}function WN(){for(;_e!==null&&!x2();)kb(_e)}function kb(e){var t=cb(e.alternate,e,Ko);e.memoizedProps=e.pendingProps,t===null?Cc(e):_e=t}function Fy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Xy(n,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Xy(n,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:cm(t);default:fb(n,t),t=_e=fv(t,Ko),t=cb(n,t,Ko)}e.memoizedProps=e.pendingProps,t===null?Cc(e):_e=t}function el(e,t,n,o){Io=fa=null,cm(t),al=null,Yr=0;var i=t.return;try{if(UN(e,i,t,n,Te)){tt=1,Wu(e,Un(n,e.current)),_e=null;return}}catch(a){if(i!==null)throw _e=i,a;tt=1,Wu(e,Un(n,e.current)),_e=null;return}t.flags&32768?(Ce||o===1?e=!0:El||(Te&536870912)!==0?e=!1:(yi=e=!0,(o===2||o===9||o===3||o===6)&&(o=Cn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Gb(t,e)):Cc(t)}function Cc(e){var t=e;do{if((t.flags&32768)!==0){Gb(t,yi);return}e=t.return;var n=YN(t.alternate,t,Ko);if(n!==null){_e=n;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);tt===0&&(tt=5)}function Gb(e,t){do{var n=XN(e.alternate,e);if(n!==null){n.flags&=32767,_e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=n}while(e!==null);tt=6,_e=null}function Wy(e,t,n,o,i,a,l,r,s){e.cancelPendingCommit=null;do wc();while(ht!==0);if((De&6)!==0)throw Error(U(327));if(t!==null){if(t===e.current)throw Error(U(177));if(a=t.lanes|t.childLanes,a|=Qp,R2(e,n,a,l,r,s),e===Pe&&(_e=Pe=null,Te=0),hl=t,Ni=e,Xo=n,Tp=a,Np=i,Db=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nC(Iu,function(){return Yb(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=ue.T,ue.T=null,i=Re.p,Re.p=2,l=De,De|=4;try{qN(e,t,n)}finally{De=l,Re.p=i,ue.T=o}}ht=1,Pb(),Ub(),Ib()}}function Pb(){if(ht===1){ht=0;var e=Ni,t=hl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ue.T,ue.T=null;var o=Re.p;Re.p=2;var i=De;De|=4;try{_b(t,e);var a=Dp,l=ov(e.containerInfo),r=a.focusedElem,s=a.selectionRange;if(l!==r&&r&&r.ownerDocument&&nv(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(),v=r.textContent.length,b=Math.min(s.start,v),S=s.end===void 0?b:Math.min(s.end,v);!h.extend&&b>S&&(l=S,S=b,b=l);var p=Sy(r,b),y=Sy(r,S);if(p&&y&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var m=d.createRange();m.setStart(p.node,p.offset),h.removeAllRanges(),b>S?(h.addRange(m),h.extend(y.node,y.offset)):(m.setEnd(y.node,y.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}}fc=!!Mp,Dp=Mp=null}finally{De=i,Re.p=o,ue.T=n}}e.current=t,ht=2}}function Ub(){if(ht===2){ht=0;var e=Ni,t=hl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ue.T,ue.T=null;var o=Re.p;Re.p=2;var i=De;De|=4;try{yb(e,t.alternate,t)}finally{De=i,Re.p=o,ue.T=n}}ht=3}}function Ib(){if(ht===4||ht===3){ht=0,_2();var e=Ni,t=hl,n=Xo,o=Db;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ht=5:(ht=0,hl=Ni=null,Vb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ti=null),Vp(n),t=t.stateNode,_n&&typeof _n.onCommitFiberRoot=="function")try{_n.onCommitFiberRoot(Wr,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=ue.T,i=Re.p,Re.p=2,ue.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{ue.T=t,Re.p=i}}(Xo&3)!==0&&wc(),vo(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===Cp?Hr++:(Hr=0,Cp=e):Hr=0,ls(0,!1)}}function Vb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,os(t)))}function wc(){return Pb(),Ub(),Ib(),Yb()}function Yb(){if(ht!==5)return!1;var e=Ni,t=Tp;Tp=0;var n=Vp(Xo),o=ue.T,i=Re.p;try{Re.p=32>n?32:n,ue.T=null,n=Np,Np=null;var a=Ni,l=Xo;if(ht=0,hl=Ni=null,Xo=0,(De&6)!==0)throw Error(U(331));var r=De;if(De|=4,wb(a.current),Tb(a,a.current,l,n),De=r,ls(0,!1),_n&&typeof _n.onPostCommitFiberRoot=="function")try{_n.onPostCommitFiberRoot(Wr,a)}catch{}return!0}finally{Re.p=i,ue.T=o,Vb(e,t)}}function Jy(e,t,n){t=Un(n,t),t=bp(e.stateNode,t,2),e=Ei(e,t,2),e!==null&&(es(e,2),vo(e))}function ze(e,t,n){if(e.tag===3)Jy(e,e,n);else for(;t!==null;){if(t.tag===3){Jy(t,e,n);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Ti===null||!Ti.has(o))){e=Un(n,e),n=ib(2),o=Ei(t,n,2),o!==null&&(ab(n,o,t,e),es(o,2),vo(o));break}}t=t.return}}function kd(e,t,n){var o=e.pingCache;if(o===null){o=e.pingCache=new $N;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)||(Em=!0,i.add(n),e=JN.bind(null,e,t,n),t.then(e,e))}function JN(e,t,n){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Pe===e&&(Te&n)===n&&(tt===4||tt===3&&(Te&62914560)===Te&&300>xn()-Tc?(De&2)===0&&gl(e,0):Tm|=n,ml===Te&&(ml=0)),vo(e)}function Xb(e,t){t===0&&(t=H0()),e=ca(e,t),e!==null&&(es(e,t),vo(e))}function eC(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xb(e,n)}function tC(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(U(314))}o!==null&&o.delete(t),Xb(e,n)}function nC(e,t){return Up(e,t)}var ic=null,Va=null,wp=!1,ac=!1,Gd=!1,bi=0;function vo(e){e!==Va&&e.next===null&&(Va===null?ic=Va=e:Va=Va.next=e),ac=!0,wp||(wp=!0,iC())}function ls(e,t){if(!Gd&&ac){Gd=!0;do for(var n=!1,o=ic;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-En(42|e)+1)-1,a&=i&~(l&~r),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,e0(o,a))}else a=Te,a=pc(o,o===Pe?a:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(a&3)===0||Jr(o,a)||(n=!0,e0(o,a));o=o.next}while(n);Gd=!1}}function oC(){qb()}function qb(){ac=wp=!1;var e=0;bi!==0&&dC()&&(e=bi);for(var t=xn(),n=null,o=ic;o!==null;){var i=o.next,a=Zb(o,t);a===0?(o.next=null,n===null?ic=i:n.next=i,i===null&&(Va=n)):(n=o,(e!==0||(a&3)!==0)&&(ac=!0)),o=i}ht!==0&&ht!==5||ls(e,!1),bi!==0&&(bi=0)}function Zb(e,t){for(var n=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var l=31-En(a),r=1<<l,s=i[l];s===-1?((r&n)===0||(r&o)!==0)&&(i[l]=D2(r,t)):s<=t&&(e.expiredLanes|=r),a&=~r}if(t=Pe,n=Te,n=pc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,n===0||e===t&&(Oe===2||Oe===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&pd(o),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Jr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(o!==null&&pd(o),Vp(n)){case 2:case 8:n=z0;break;case 32:n=Iu;break;case 268435456:n=L0;break;default:n=Iu}return o=jb.bind(null,e),n=Up(n,o),e.callbackPriority=t,e.callbackNode=n,t}return o!==null&&o!==null&&pd(o),e.callbackPriority=2,e.callbackNode=null,2}function jb(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wc()&&e.callbackNode!==n)return null;var o=Te;return o=pc(e,e===Pe?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Ob(e,o,t),Zb(e,xn()),e.callbackNode!=null&&e.callbackNode===n?jb.bind(null,e):null)}function e0(e,t){if(wc())return null;Ob(e,t,!0)}function iC(){mC(function(){(De&6)!==0?Up(O0,oC):qb()})}function Cm(){if(bi===0){var e=fl;e===0&&(e=lu,lu<<=1,(lu&261888)===0&&(lu=256)),bi=e}return bi}function t0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Tu(""+e)}function n0(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 aC(e,t,n,o,i){if(t==="submit"&&n&&n.stateNode===i){var a=t0((i[rn]||null).action),l=o.submitter;l&&(t=(t=l[rn]||null)?t0(t.formAction):l.getAttribute("formAction"),t!==null&&(a=t,l=null));var r=new mc("action","action",null,o,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(bi!==0){var s=l?n0(i,l):new FormData(i);yp(n,{pending:!0,data:s,method:i.method,action:a},null,s)}}else typeof a=="function"&&(r.preventDefault(),s=l?n0(i,l):new FormData(i),yp(n,{pending:!0,data:s,method:i.method,action:a},a,s))},currentTarget:i}]})}}for(vu=0;vu<ap.length;vu++)bu=ap[vu],o0=bu.toLowerCase(),i0=bu[0].toUpperCase()+bu.slice(1),eo(o0,"on"+i0);var bu,o0,i0,vu;eo(av,"onAnimationEnd");eo(lv,"onAnimationIteration");eo(rv,"onAnimationStart");eo("dblclick","onDoubleClick");eo("focusin","onFocus");eo("focusout","onBlur");eo(EN,"onTransitionRun");eo(TN,"onTransitionStart");eo(NN,"onTransitionCancel");eo(sv,"onTransitionEnd");ul("onMouseEnter",["mouseout","mouseover"]);ul("onMouseLeave",["mouseout","mouseover"]);ul("onPointerEnter",["pointerout","pointerover"]);ul("onPointerLeave",["pointerout","pointerover"]);ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ra("onBeforeInput",["compositionend","keypress","textInput","paste"]);ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zr="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(" "),lC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Zr));function $b(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){Yu(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){Yu(c)}i.currentTarget=null,a=s}}}}function xe(e,t){var n=t[Fd];n===void 0&&(n=t[Fd]=new Set);var o=e+"__bubble";n.has(o)||(Kb(t,e,2,!1),n.add(o))}function Pd(e,t,n){var o=0;t&&(o|=4),Kb(n,e,o,t)}var Su="_reactListening"+Math.random().toString(36).slice(2);function wm(e){if(!e[Su]){e[Su]=!0,U0.forEach(function(n){n!=="selectionchange"&&(lC.has(n)||Pd(n,!1,e),Pd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Su]||(t[Su]=!0,Pd("selectionchange",!1,t))}}function Kb(e,t,n,o){switch(s1(t)){case 2:var i=LC;break;case 8:i=HC;break;default:i=Rm}n=i.bind(null,t,n,e),i=void 0,!np||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 Ud(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=qa(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}$0(function(){var u=a,c=qp(n),d=[];e:{var f=uv.get(e);if(f!==void 0){var h=mc,v=e;switch(e){case"keypress":if(Cu(n)===0)break e;case"keydown":case"keyup":h=tN;break;case"focusin":v="focus",h=vd;break;case"focusout":v="blur",h=vd;break;case"beforeblur":case"afterblur":h=vd;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=fy;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=Y2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=iN;break;case av:case lv:case rv:h=Z2;break;case sv:h=lN;break;case"scroll":case"scrollend":h=I2;break;case"wheel":h=sN;break;case"copy":case"cut":case"paste":h=$2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=py;break;case"toggle":case"beforetoggle":h=cN}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),p=b?f!==null?f+"Capture":null:f;b=[];for(var y=u,m;y!==null;){var g=y;if(m=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||m===null||p===null||(g=Gr(y,p),g!=null&&b.push(jr(y,g,m))),S)break;y=y.return}0<b.length&&(f=new h(f,v,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!==tp&&(v=n.relatedTarget||n.fromElement)&&(qa(v)||v[bl]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(v=n.relatedTarget||n.toElement,h=u,v=v?qa(v):null,v!==null&&(S=Fr(v),b=v.tag,v!==S||b!==5&&b!==27&&b!==6)&&(v=null)):(h=null,v=u),h!==v)){if(b=fy,g="onMouseLeave",p="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=py,g="onPointerLeave",p="onPointerEnter",y="pointer"),S=h==null?f:xr(h),m=v==null?f:xr(v),f=new b(g,y+"leave",h,n,c),f.target=S,f.relatedTarget=m,g=null,qa(c)===u&&(b=new b(p,y+"enter",v,n,c),b.target=m,b.relatedTarget=S,g=b),S=g,h&&v)t:{for(b=rC,p=h,y=v,m=0,g=p;g;g=b(g))m++;g=0;for(var x=y;x;x=b(x))g++;for(;0<m-g;)p=b(p),m--;for(;0<g-m;)y=b(y),g--;for(;m--;){if(p===y||y!==null&&p===y.alternate){b=p;break t}p=b(p),y=b(y)}b=null}else b=null;h!==null&&a0(d,f,h,b,!1),v!==null&&S!==null&&a0(d,S,v,b,!0)}}e:{if(f=u?xr(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=yy;else if(gy(f))if(ev)_=SN;else{_=vN;var E=yN}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&Xp(u.elementType)&&(_=yy):_=bN;if(_&&(_=_(e,u))){J0(d,_,n,c);break e}E&&E(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&ep(f,"number",f.value)}switch(E=u?xr(u):window,e){case"focusin":(gy(E)||E.contentEditable==="true")&&($a=E,op=u,Cr=null);break;case"focusout":Cr=op=$a=null;break;case"mousedown":ip=!0;break;case"contextmenu":case"mouseup":case"dragend":ip=!1,xy(d,n,c);break;case"selectionchange":if(_N)break;case"keydown":case"keyup":xy(d,n,c)}var w;if($p)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else ja?F0(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Q0&&n.locale!=="ko"&&(ja||N!=="onCompositionStart"?N==="onCompositionEnd"&&ja&&(w=K0()):(gi=c,Zp="value"in gi?gi.value:gi.textContent,ja=!0)),E=lc(u,N),0<E.length&&(N=new dy(N,e,null,n,c),d.push({event:N,listeners:E}),w?N.data=w:(w=W0(n),w!==null&&(N.data=w)))),(w=dN?pN(e,n):mN(e,n))&&(N=lc(u,"onBeforeInput"),0<N.length&&(E=new dy("onBeforeInput","beforeinput",null,n,c),d.push({event:E,listeners:N}),E.data=w)),aC(d,e,u,n,c)}$b(d,t)})}function jr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function lc(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=Gr(e,n),i!=null&&o.unshift(jr(e,i,a)),i=Gr(e,t),i!=null&&o.push(jr(e,i,a))),e.tag===3)return o;e=e.return}return[]}function rC(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function a0(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=Gr(n,a),u!=null&&l.unshift(jr(n,u,s))):i||(u=Gr(n,a),u!=null&&l.push(jr(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var sC=/\r\n?/g,uC=/\u0000|\uFFFD/g;function l0(e){return(typeof e=="string"?e:""+e).replace(sC,`
|
|
2467
|
+
`).replace(uC,"")}function Qb(e,t){return t=l0(t),l0(e)===t}function He(e,t,n,o,i,a){switch(n){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||cl(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&cl(e,""+o);break;case"className":uu(e,"class",o);break;case"tabIndex":uu(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":uu(e,n,o);break;case"style":j0(e,o,a);break;case"data":if(t!=="object"){uu(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=Tu(""+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"&&He(e,t,"name",i.name,i,null),He(e,t,"formEncType",i.formEncType,i,null),He(e,t,"formMethod",i.formMethod,i,null),He(e,t,"formTarget",i.formTarget,i,null)):(He(e,t,"encType",i.encType,i,null),He(e,t,"method",i.method,i,null),He(e,t,"target",i.target,i,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(n);break}o=Tu(""+o),e.setAttribute(n,o);break;case"onClick":o!=null&&(e.onclick=Uo);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(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=Tu(""+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":xe("beforetoggle",e),xe("toggle",e),Eu(e,"popover",o);break;case"xlinkActuate":Oo(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Oo(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Oo(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Oo(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Oo(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Oo(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Oo(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Eu(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=P2.get(n)||n,Eu(e,n,o))}}function Ap(e,t,n,o,i,a){switch(n){case"style":j0(e,o,a);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(U(61));if(n=o.__html,n!=null){if(i.children!=null)throw Error(U(60));e.innerHTML=n}}break;case"children":typeof o=="string"?cl(e,o):(typeof o=="number"||typeof o=="bigint")&&cl(e,""+o);break;case"onScroll":o!=null&&xe("scroll",e);break;case"onScrollEnd":o!=null&&xe("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Uo);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!I0.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[rn]||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,""):Eu(e,n,o)}}}function Ot(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("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(U(137,t));default:He(e,t,a,l,n,null)}}i&&He(e,t,"srcSet",n.srcSet,n,null),o&&He(e,t,"src",n.src,n,null);return;case"input":xe("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(U(137,t));break;default:He(e,t,o,c,n,null)}}X0(e,a,r,s,u,l,i,!1);return;case"select":xe("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:He(e,t,i,r,n,null)}t=a,n=l,e.multiple=!!o,t!=null?nl(e,!!o,t,!1):n!=null&&nl(e,!!o,n,!0);return;case"textarea":xe("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(U(91));break;default:He(e,t,l,r,n,null)}Z0(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":He(e,t,s,o,n,null));return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(o=0;o<Zr.length;o++)xe(Zr[o],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("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(U(137,t));default:He(e,t,u,o,n,null)}return;default:if(Xp(t)){for(c in n)n.hasOwnProperty(c)&&(o=n[c],o!==void 0&&Ap(e,t,c,o,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(o=n[r],o!=null&&He(e,t,r,o,n,null))}function cC(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)||He(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(U(137,t));break;default:h!==d&&He(e,t,f,h,o,d)}}Jd(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)||He(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&&He(e,t,i,a,o,s)}t=r,n=l,o=h,f!=null?nl(e,!!n,f,!1):!!o!=!!n&&(t!=null?nl(e,!!n,t,!0):nl(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:He(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(U(91));break;default:i!==a&&He(e,t,l,i,o,a)}q0(e,f,h);return;case"option":for(var v in n)f=n[v],n.hasOwnProperty(v)&&f!=null&&!o.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:He(e,t,v,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":He(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)&&He(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(U(137,t));break;default:He(e,t,u,f,o,h)}return;default:if(Xp(t)){for(var S in n)f=n[S],n.hasOwnProperty(S)&&f!==void 0&&!o.hasOwnProperty(S)&&Ap(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||Ap(e,t,c,f,o,h);return}}for(var p in n)f=n[p],n.hasOwnProperty(p)&&f!=null&&!o.hasOwnProperty(p)&&He(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||He(e,t,d,f,o,h)}function r0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fC(){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&&r0(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&&r0(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 Mp=null,Dp=null;function rc(e){return e.nodeType===9?e:e.ownerDocument}function s0(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 Fb(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 Rp(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 Id=null;function dC(){var e=window.event;return e&&e.type==="popstate"?e===Id?!1:(Id=e,!0):(Id=null,!1)}var Wb=typeof setTimeout=="function"?setTimeout:void 0,pC=typeof clearTimeout=="function"?clearTimeout:void 0,u0=typeof Promise=="function"?Promise:void 0,mC=typeof queueMicrotask=="function"?queueMicrotask:typeof u0<"u"?function(e){return u0.resolve(null).then(e).catch(hC)}:Wb;function hC(e){setTimeout(function(){throw e})}function Li(e){return e==="head"}function c0(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),vl(t);return}o--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")o++;else if(n==="html")Br(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Br(n);for(var a=n.firstChild;a;){var l=a.nextSibling,r=a.nodeName;a[ts]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=l}}else n==="body"&&Br(e.ownerDocument.body);n=i}while(n);vl(t)}function f0(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 Op(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":Op(n),Yp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function gC(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[ts])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=Yn(e.nextSibling),e===null)break}return null}function yC(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Yn(e.nextSibling),e===null))return null;return e}function Jb(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Yn(e.nextSibling),e===null))return null;return e}function zp(e){return e.data==="$?"||e.data==="$~"}function Lp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function vC(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 Yn(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 Hp=null;function d0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Yn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function p0(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 e1(e,t,n){switch(t=rc(n),e){case"html":if(e=t.documentElement,!e)throw Error(U(452));return e;case"head":if(e=t.head,!e)throw Error(U(453));return e;case"body":if(e=t.body,!e)throw Error(U(454));return e;default:throw Error(U(451))}}function Br(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yp(e)}var Xn=new Map,m0=new Set;function sc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Qo=Re.d;Re.d={f:bC,r:SC,D:xC,C:_C,L:EC,m:TC,X:CC,S:NC,M:wC};function bC(){var e=Qo.f(),t=Nc();return e||t}function SC(e){var t=Sl(e);t!==null&&t.tag===5&&t.type==="form"?jv(t):Qo.r(e)}var Tl=typeof document>"u"?null:document;function t1(e,t,n){var o=Tl;if(o&&typeof t=="string"&&t){var i=Pn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),m0.has(i)||(m0.add(i),e={rel:e,crossOrigin:n,href:t},o.querySelector(i)===null&&(t=o.createElement("link"),Ot(t,"link",e),_t(t),o.head.appendChild(t)))}}function xC(e){Qo.D(e),t1("dns-prefetch",e,null)}function _C(e,t){Qo.C(e,t),t1("preconnect",e,t)}function EC(e,t,n){Qo.L(e,t,n);var o=Tl;if(o&&e&&t){var i='link[rel="preload"][as="'+Pn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Pn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Pn(n.imageSizes)+'"]')):i+='[href="'+Pn(e)+'"]';var a=i;switch(t){case"style":a=yl(e);break;case"script":a=Nl(e)}Xn.has(a)||(e=Ze({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Xn.set(a,e),o.querySelector(i)!==null||t==="style"&&o.querySelector(rs(a))||t==="script"&&o.querySelector(ss(a))||(t=o.createElement("link"),Ot(t,"link",e),_t(t),o.head.appendChild(t)))}}function TC(e,t){Qo.m(e,t);var n=Tl;if(n&&e){var o=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Pn(o)+'"][href="'+Pn(e)+'"]',a=i;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Nl(e)}if(!Xn.has(a)&&(e=Ze({rel:"modulepreload",href:e},t),Xn.set(a,e),n.querySelector(i)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ss(a)))return}o=n.createElement("link"),Ot(o,"link",e),_t(o),n.head.appendChild(o)}}}function NC(e,t,n){Qo.S(e,t,n);var o=Tl;if(o&&e){var i=tl(o).hoistableStyles,a=yl(e);t=t||"default";var l=i.get(a);if(!l){var r={loading:0,preload:null};if(l=o.querySelector(rs(a)))r.loading=5;else{e=Ze({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Xn.get(a))&&Am(e,n);var s=l=o.createElement("link");_t(s),Ot(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,Lu(l,t,o)}l={type:"stylesheet",instance:l,count:1,state:r},i.set(a,l)}}}function CC(e,t){Qo.X(e,t);var n=Tl;if(n&&e){var o=tl(n).hoistableScripts,i=Nl(e),a=o.get(i);a||(a=n.querySelector(ss(i)),a||(e=Ze({src:e,async:!0},t),(t=Xn.get(i))&&Mm(e,t),a=n.createElement("script"),_t(a),Ot(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function wC(e,t){Qo.M(e,t);var n=Tl;if(n&&e){var o=tl(n).hoistableScripts,i=Nl(e),a=o.get(i);a||(a=n.querySelector(ss(i)),a||(e=Ze({src:e,async:!0,type:"module"},t),(t=Xn.get(i))&&Mm(e,t),a=n.createElement("script"),_t(a),Ot(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},o.set(i,a))}}function h0(e,t,n,o){var i=(i=Si.current)?sc(i):null;if(!i)throw Error(U(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=yl(n.href),n=tl(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=yl(n.href);var a=tl(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(rs(e)))&&!a._p&&(l.instance=a,l.state.loading=5),Xn.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},Xn.set(e,n),a||AC(i,e,n,l.state))),t&&o===null)throw Error(U(528,""));return l}if(t&&o!==null)throw Error(U(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Nl(n),n=tl(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(U(444,e))}}function yl(e){return'href="'+Pn(e)+'"'}function rs(e){return'link[rel="stylesheet"]['+e+"]"}function n1(e){return Ze({},e,{"data-precedence":e.precedence,precedence:null})}function AC(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}),Ot(t,"link",n),_t(t),e.head.appendChild(t))}function Nl(e){return'[src="'+Pn(e)+'"]'}function ss(e){return"script[async]"+e}function g0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+Pn(n.href)+'"]');if(o)return t.instance=o,_t(o),o;var i=Ze({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),_t(o),Ot(o,"style",i),Lu(o,n.precedence,e),t.instance=o;case"stylesheet":i=yl(n.href);var a=e.querySelector(rs(i));if(a)return t.state.loading|=4,t.instance=a,_t(a),a;o=n1(n),(i=Xn.get(i))&&Am(o,i),a=(e.ownerDocument||e).createElement("link"),_t(a);var l=a;return l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),Ot(a,"link",o),t.state.loading|=4,Lu(a,n.precedence,e),t.instance=a;case"script":return a=Nl(n.src),(i=e.querySelector(ss(a)))?(t.instance=i,_t(i),i):(o=n,(i=Xn.get(a))&&(o=Ze({},n),Mm(o,i)),e=e.ownerDocument||e,i=e.createElement("script"),_t(i),Ot(i,"link",o),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(U(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,Lu(o,n.precedence,e));return t.instance}function Lu(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 Am(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Mm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Hu=null;function y0(e,t,n){if(Hu===null){var o=new Map,i=Hu=new Map;i.set(n,o)}else i=Hu,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[ts]||a[Mt]||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 v0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function MC(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 o1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function DC(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=yl(o.href),a=t.querySelector(rs(i));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=uc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,o=n1(o),(i=Xn.get(i))&&Am(o,i),a=a.createElement("link"),_t(a);var l=a;l._p=new Promise(function(r,s){l.onload=r,l.onerror=s}),Ot(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=uc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Vd=0;function RC(e,t){return e.stylesheets&&e.count===0&&Bu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var o=setTimeout(function(){if(e.stylesheets&&Bu(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Vd===0&&(Vd=62500*fC());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Bu(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Vd?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(i)}}:null}function uc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var cc=null;function Bu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,cc=new Map,t.forEach(OC,e),cc=null,uc.call(e))}function OC(e,t){if(!(t.state.loading&4)){var n=cc.get(e);if(n)var o=n.get(null);else{n=new Map,cc.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=uc.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 $r={$$typeof:Po,Provider:null,Consumer:null,_currentValue:Fi,_currentValue2:Fi,_threadCount:0};function zC(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=md(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=md(0),this.hiddenUpdates=md(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 i1(e,t,n,o,i,a,l,r,s,u,c,d){return e=new zC(e,t,n,l,s,u,c,d,r),t=1,a===!0&&(t|=24),a=bn(3,null,null,t),e.current=a,a.stateNode=e,t=tm(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:o,isDehydrated:n,cache:t},im(a),e}function a1(e){return e?(e=Fa,e):Fa}function l1(e,t,n,o,i,a){i=a1(i),o.context===null?o.context=i:o.pendingContext=i,o=_i(t),o.payload={element:n},a=a===void 0?null:a,a!==null&&(o.callback=a),n=Ei(e,o,t),n!==null&&(ln(n,e,t),Ar(n,e,t))}function b0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Dm(e,t){b0(e,t),(e=e.alternate)&&b0(e,t)}function r1(e){if(e.tag===13||e.tag===31){var t=ca(e,67108864);t!==null&&ln(t,e,67108864),Dm(e,67108864)}}function S0(e){if(e.tag===13||e.tag===31){var t=Tn();t=Ip(t);var n=ca(e,t);n!==null&&ln(n,e,t),Dm(e,t)}}var fc=!0;function LC(e,t,n,o){var i=ue.T;ue.T=null;var a=Re.p;try{Re.p=2,Rm(e,t,n,o)}finally{Re.p=a,ue.T=i}}function HC(e,t,n,o){var i=ue.T;ue.T=null;var a=Re.p;try{Re.p=8,Rm(e,t,n,o)}finally{Re.p=a,ue.T=i}}function Rm(e,t,n,o){if(fc){var i=Bp(o);if(i===null)Ud(e,t,o,dc,n),x0(e,o);else if(kC(i,e,t,n,o))o.stopPropagation();else if(x0(e,o),t&4&&-1<BC.indexOf(e)){for(;i!==null;){var a=Sl(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var l=$i(a.pendingLanes);if(l!==0){var r=a;for(r.pendingLanes|=2,r.entangledLanes|=2;l;){var s=1<<31-En(l);r.entanglements[1]|=s,l&=~s}vo(a),(De&6)===0&&(tc=xn()+500,ls(0,!1))}}break;case 31:case 13:r=ca(a,2),r!==null&&ln(r,a,2),Nc(),Dm(a,2)}if(a=Bp(o),a===null&&Ud(e,t,o,dc,n),a===i)break;i=a}i!==null&&o.stopPropagation()}else Ud(e,t,o,null,n)}}function Bp(e){return e=qp(e),Om(e)}var dc=null;function Om(e){if(dc=null,e=qa(e),e!==null){var t=Fr(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=w0(t),e!==null)return e;e=null}else if(n===31){if(e=A0(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 dc=e,null}function s1(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(E2()){case O0:return 2;case z0:return 8;case Iu:case T2:return 32;case L0:return 268435456;default:return 32}default:return 32}}var kp=!1,Ci=null,wi=null,Ai=null,Kr=new Map,Qr=new Map,mi=[],BC="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 x0(e,t){switch(e){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":wi=null;break;case"mouseover":case"mouseout":Ai=null;break;case"pointerover":case"pointerout":Kr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qr.delete(t.pointerId)}}function yr(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=Sl(t),t!==null&&r1(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function kC(e,t,n,o,i){switch(t){case"focusin":return Ci=yr(Ci,e,t,n,o,i),!0;case"dragenter":return wi=yr(wi,e,t,n,o,i),!0;case"mouseover":return Ai=yr(Ai,e,t,n,o,i),!0;case"pointerover":var a=i.pointerId;return Kr.set(a,yr(Kr.get(a)||null,e,t,n,o,i)),!0;case"gotpointercapture":return a=i.pointerId,Qr.set(a,yr(Qr.get(a)||null,e,t,n,o,i)),!0}return!1}function u1(e){var t=qa(e.target);if(t!==null){var n=Fr(t);if(n!==null){if(t=n.tag,t===13){if(t=w0(n),t!==null){e.blockedOn=t,iy(e.priority,function(){S0(n)});return}}else if(t===31){if(t=A0(n),t!==null){e.blockedOn=t,iy(e.priority,function(){S0(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 ku(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var o=new n.constructor(n.type,n);tp=o,n.target.dispatchEvent(o),tp=null}else return t=Sl(n),t!==null&&r1(t),e.blockedOn=n,!1;t.shift()}return!0}function _0(e,t,n){ku(e)&&n.delete(t)}function GC(){kp=!1,Ci!==null&&ku(Ci)&&(Ci=null),wi!==null&&ku(wi)&&(wi=null),Ai!==null&&ku(Ai)&&(Ai=null),Kr.forEach(_0),Qr.forEach(_0)}function xu(e,t){e.blockedOn===t&&(e.blockedOn=null,kp||(kp=!0,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,GC)))}var _u=null;function E0(e){_u!==e&&(_u=e,gt.unstable_scheduleCallback(gt.unstable_NormalPriority,function(){_u===e&&(_u=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(Om(o||n)===null)continue;break}var a=Sl(n);a!==null&&(e.splice(t,3),t-=3,yp(a,{pending:!0,data:i,method:n.method,action:o},o,i))}}))}function vl(e){function t(s){return xu(s,e)}Ci!==null&&xu(Ci,e),wi!==null&&xu(wi,e),Ai!==null&&xu(Ai,e),Kr.forEach(t),Qr.forEach(t);for(var n=0;n<mi.length;n++){var o=mi[n];o.blockedOn===e&&(o.blockedOn=null)}for(;0<mi.length&&(n=mi[0],n.blockedOn===null);)u1(n),n.blockedOn===null&&mi.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[rn]||null;if(typeof a=="function")l||E0(n);else if(l){var r=null;if(a&&a.hasAttribute("formAction")){if(i=a,l=a[rn]||null)r=l.formAction;else if(Om(i)!==null)continue}else r=l.action;typeof r=="function"?n[o+1]=r:(n.splice(o,3),o-=3),E0(n)}}}function c1(){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 zm(e){this._internalRoot=e}Ac.prototype.render=zm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));var n=t.current,o=Tn();l1(n,o,e,t,null,null)};Ac.prototype.unmount=zm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;l1(e.current,2,null,e,null,null),Nc(),t[bl]=null}};function Ac(e){this._internalRoot=e}Ac.prototype.unstable_scheduleHydration=function(e){if(e){var t=P0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<mi.length&&t!==0&&t<mi[n].priority;n++);mi.splice(n,0,e),n===0&&u1(e)}};var T0=N0.version;if(T0!=="19.2.4")throw Error(U(527,T0,"19.2.4"));Re.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=g2(t),e=e!==null?M0(e):null,e=e===null?null:e.stateNode,e};var PC={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(vr=__REACT_DEVTOOLS_GLOBAL_HOOK__,!vr.isDisabled&&vr.supportsFiber))try{Wr=vr.inject(PC),_n=vr}catch{}var vr;Mc.createRoot=function(e,t){if(!C0(e))throw Error(U(299));var n=!1,o="",i=tb,a=nb,l=ob;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=i1(e,1,!1,null,null,n,o,null,i,a,l,c1),e[bl]=t.current,wm(e),new zm(t)};Mc.hydrateRoot=function(e,t,n){if(!C0(e))throw Error(U(299));var o=!1,i="",a=tb,l=nb,r=ob,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=i1(e,1,!0,t,n??null,o,i,s,a,l,r,c1),t.context=a1(null),n=t.current,o=Tn(),o=Ip(o),i=_i(o),i.callback=null,Ei(n,i,o),n=o,t.current.lanes=n,es(t,n),vo(t),e[bl]=t.current,wm(e),new Ac(t)};Mc.version="19.2.4"});var m1=en((Dz,p1)=>{"use strict";function d1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(d1)}catch(e){console.error(e)}}d1(),p1.exports=f1()});var T1=en(Hc=>{"use strict";var YC=Symbol.for("react.transitional.element"),XC=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:YC,type:e,key:o,ref:t!==void 0?t:null,props:n}}Hc.Fragment=XC;Hc.jsx=E1;Hc.jsxs=E1});var ge=en((Hz,N1)=>{"use strict";N1.exports=T1()});var s_=en(r_=>{"use strict";var ql=wt();function PM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var UM=typeof Object.is=="function"?Object.is:PM,IM=ql.useState,VM=ql.useEffect,YM=ql.useLayoutEffect,XM=ql.useDebugValue;function qM(e,t){var n=t(),o=IM({inst:{value:n,getSnapshot:t}}),i=o[0].inst,a=o[1];return YM(function(){i.value=n,i.getSnapshot=t,Eh(i)&&a({inst:i})},[e,n,t]),VM(function(){return Eh(i)&&a({inst:i}),e(function(){Eh(i)&&a({inst:i})})},[e]),XM(n),n}function Eh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!UM(e,n)}catch{return!0}}function ZM(e,t){return t()}var jM=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ZM:qM;r_.useSyncExternalStore=ql.useSyncExternalStore!==void 0?ql.useSyncExternalStore:jM});var c_=en((AH,u_)=>{"use strict";u_.exports=s_()});var d_=en(f_=>{"use strict";var wf=wt(),$M=c_();function KM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var QM=typeof Object.is=="function"?Object.is:KM,FM=$M.useSyncExternalStore,WM=wf.useRef,JM=wf.useEffect,eD=wf.useMemo,tD=wf.useDebugValue;f_.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var a=WM(null);if(a.current===null){var l={hasValue:!1,value:null};a.current=l}else l=a.current;a=eD(function(){function s(h){if(!u){if(u=!0,c=h,h=o(h),i!==void 0&&l.hasValue){var v=l.value;if(i(v,h))return d=v}return d=h}if(v=d,QM(c,h))return v;var b=o(h);return i!==void 0&&i(v,b)?(c=h,v):(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=FM(e,a[0],a[1]);return JM(function(){l.hasValue=!0,l.value=r},[r]),tD(r),r}});var m_=en((DH,p_)=>{"use strict";p_.exports=d_()});var Oa=oe(wt(),1),MT=oe(m1(),1);var UC={PipeLLM:!0,PipeExtract:!0,PipeCompose:!0,PipeImgGen:!0,PipeSearch:!0,PipeFunc:!0,PipeSignature:!0,PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0},h1=new Set(Object.keys(UC)),Cl="pipeCard",g1="default",y1="controllerGroup",Lm="stuff_";function Hi(e){return Lm+e}function wl(e){return e.startsWith(Lm)}function us(e){return e.slice(Lm.length)}var wn={TB:"TB",BT:"BT",LR:"LR",RL:"RL"},Dc={DEFAULT:"default",STEP:"step",STRAIGHT:"straight",SMOOTH_STEP:"smoothstep"},to={FOLDED:"folded",EXPANDED:"expanded",AUTO:"auto"},da={DARK:"dark",LIGHT:"light"},yt={DARK:"dark",LIGHT:"light",SYSTEM:"system"},Rc=40,Oc=48,zc=20,pa="arrowclosed";function v1(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 b1(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}var cs=class extends Error{constructor(t,n){let o=t===""?"<root>":t;super(`GraphSpec validation failed at ${o}: ${n}`),this.name="GraphSpecValidationError",this.path=t}},S1=new Set(["succeeded","failed","running","scheduled","skipped","canceled"]),x1=new Set(["contains","data","control","selected_outcome","batch_item","batch_aggregate","parallel_combine"]);function Bi(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function An(e){return e===null?"null":e===void 0?"undefined":Array.isArray(e)?"an array":`a ${typeof e}`}function vt(e,t){throw new cs(e,t)}function bo(e,t){return(typeof e!="string"||e.length===0)&&vt(t,`expected a non-empty string, got ${An(e)}`),e}function _1(e,t){Bi(e)||vt(t,`expected an object, got ${An(e)}`),bo(e.name,`${t}.name`)}function IC(e,t){Bi(e)||vt(t,`expected an object, got ${An(e)}`),bo(e.id,`${t}.id`),e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected "controller" or "operator" \u2014 a real pipelex run emits only pipe-call nodes, got ${JSON.stringify(e.kind)}`),(typeof e.status!="string"||!S1.has(e.status))&&vt(`${t}.status`,`expected one of ${[...S1].join(", ")}, got ${JSON.stringify(e.status)}`),bo(e.pipe_code,`${t}.pipe_code`);let n=bo(e.pipe_type,`${t}.pipe_type`);h1.has(n)||vt(`${t}.pipe_type`,`unrecognized pipe class "${n}" \u2014 add it to PipeOperatorType or PipeControllerType in types.ts`),bo(e.description,`${t}.description`),bo(e.domain_code,`${t}.domain_code`);let o=e.io;o===void 0&&(o={inputs:[],outputs:[]},e.io=o),Bi(o)||vt(`${t}.io`,`expected an object, got ${An(o)}`),o.inputs===void 0?o.inputs=[]:Array.isArray(o.inputs)||vt(`${t}.io.inputs`,`expected an array, got ${An(o.inputs)}`),o.outputs===void 0?o.outputs=[]:Array.isArray(o.outputs)||vt(`${t}.io.outputs`,`expected an array, got ${An(o.outputs)}`),o.inputs.forEach((i,a)=>_1(i,`${t}.io.inputs[${a}]`)),o.outputs.forEach((i,a)=>_1(i,`${t}.io.outputs[${a}]`))}function VC(e,t){Bi(e)||vt(t,`expected an object, got ${An(e)}`),bo(e.id,`${t}.id`),bo(e.source,`${t}.source`),bo(e.target,`${t}.target`),(typeof e.kind!="string"||!x1.has(e.kind))&&vt(`${t}.kind`,`expected one of ${[...x1].join(", ")}, got ${JSON.stringify(e.kind)}`)}function Lc(e){return Bi(e)||vt("",`expected a GraphSpec object, got ${An(e)}`),Array.isArray(e.nodes)||vt("nodes",`expected an array, got ${An(e.nodes)}`),Array.isArray(e.edges)||vt("edges",`expected an array, got ${An(e.edges)}`),Bi(e.meta)||vt("meta",`expected an object, got ${An(e.meta)}`),e.meta.format!=="mthds"&&vt("meta.format",`expected "mthds" (this does not look like pipelex GraphSpec JSON), got ${JSON.stringify(e.meta.format)}`),e.pipe_registry!==void 0&&!Bi(e.pipe_registry)&&vt("pipe_registry",`expected an object when present, got ${An(e.pipe_registry)}`),e.concept_registry!==void 0&&!Bi(e.concept_registry)&&vt("concept_registry",`expected an object when present, got ${An(e.concept_registry)}`),e.nodes.forEach((t,n)=>IC(t,`nodes[${n}]`)),e.edges.forEach((t,n)=>VC(t,`edges[${n}]`)),e}function Al(e,t="node"){return e.kind!=="controller"&&e.kind!=="operator"&&vt(`${t}.kind`,`expected a pipe-call node ("controller" or "operator"), got ${JSON.stringify(e.kind)}`),bo(e.pipe_code,`${t}.pipe_code`),e}var ce=oe(wt(),1);var H=oe(ge()),B=oe(wt());function nt(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=nt(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var qC={value:()=>{}};function w1(){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 ZC(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=w1.prototype={constructor:Bc,on:function(e,t){var n=this._,o=ZC(e+"",n),i,a=-1,l=o.length;if(arguments.length<2){for(;++a<l;)if((i=(e=o[a]).type)&&(i=jC(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]=C1(n[i],e.name,t);else if(t==null)for(i in n)n[i]=C1(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 jC(e,t){for(var n=0,o=e.length,i;n<o;++n)if((i=e[n]).name===t)return i.value}function C1(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=qC,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var ma=w1;var kc="http://www.w3.org/1999/xhtml",Hm={svg:"http://www.w3.org/2000/svg",xhtml:kc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Fo(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Hm.hasOwnProperty(t)?{space:Hm[t],local:e}:e}function $C(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===kc&&t.documentElement.namespaceURI===kc?t.createElement(e):t.createElementNS(n,e)}}function KC(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Gc(e){var t=Fo(e);return(t.local?KC:$C)(t)}function QC(){}function ha(e){return e==null?QC:function(){return this.querySelector(e)}}function A1(e){typeof e!="function"&&(e=ha(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 ot(o,this._parents)}function Bm(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function FC(){return[]}function fs(e){return e==null?FC:function(){return this.querySelectorAll(e)}}function WC(e){return function(){return Bm(e.apply(this,arguments))}}function M1(e){typeof e=="function"?e=WC(e):e=fs(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 ot(o,i)}function ds(e){return function(){return this.matches(e)}}function Pc(e){return function(t){return t.matches(e)}}var JC=Array.prototype.find;function ew(e){return function(){return JC.call(this.children,e)}}function tw(){return this.firstElementChild}function D1(e){return this.select(e==null?tw:ew(typeof e=="function"?e:Pc(e)))}var nw=Array.prototype.filter;function ow(){return Array.from(this.children)}function iw(e){return function(){return nw.call(this.children,e)}}function R1(e){return this.selectAll(e==null?ow:iw(typeof e=="function"?e:Pc(e)))}function O1(e){typeof e!="function"&&(e=ds(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 ot(o,this._parents)}function Uc(e){return new Array(e.length)}function z1(){return new ot(this._enter||this._groups.map(Uc),this._parents)}function ps(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ps.prototype={constructor:ps,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 L1(e){return function(){return e}}function aw(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 ps(e,a[l]);for(;l<s;++l)(r=t[l])&&(i[l]=r)}function lw(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 ps(e,a[r]);for(r=0;r<c;++r)(s=t[r])&&u.get(f[r])===s&&(i[r]=s)}function rw(e){return e.__data__}function H1(e,t){if(!arguments.length)return Array.from(this,rw);var n=t?lw:aw,o=this._parents,i=this._groups;typeof e!="function"&&(e=L1(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=sw(e.call(c,c&&c.__data__,u,o)),v=h.length,b=r[u]=new Array(v),S=l[u]=new Array(v),p=s[u]=new Array(f);n(c,d,b,S,p,h,t);for(var y=0,m=0,g,x;y<v;++y)if(g=b[y]){for(y>=m&&(m=y+1);!(x=S[m])&&++m<v;);g._next=x||null}}return l=new ot(l,o),l._enter=r,l._exit=s,l}function sw(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function B1(){return new ot(this._exit||this._groups.map(Uc),this._parents)}function k1(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 G1(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,v=0;v<d;++v)(h=u[v]||c[v])&&(f[v]=h);for(;s<i;++s)r[s]=n[s];return new ot(r,this._parents)}function P1(){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 U1(e){e||(e=uw);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 ot(i,this._parents).order()}function uw(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function I1(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function V1(){return Array.from(this)}function Y1(){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 q1(){return!this.node()}function Z1(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 cw(e){return function(){this.removeAttribute(e)}}function fw(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dw(e,t){return function(){this.setAttribute(e,t)}}function pw(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function mw(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function hw(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 j1(e,t){var n=Fo(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?fw:cw:typeof t=="function"?n.local?hw:mw:n.local?pw:dw)(n,t))}function Ic(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function gw(e){return function(){this.style.removeProperty(e)}}function yw(e,t,n){return function(){this.style.setProperty(e,t,n)}}function vw(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function $1(e,t,n){return arguments.length>1?this.each((t==null?gw:typeof t=="function"?vw:yw)(e,t,n??"")):ki(this.node(),e)}function ki(e,t){return e.style.getPropertyValue(t)||Ic(e).getComputedStyle(e,null).getPropertyValue(t)}function bw(e){return function(){delete this[e]}}function Sw(e,t){return function(){this[e]=t}}function xw(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function K1(e,t){return arguments.length>1?this.each((t==null?bw:typeof t=="function"?xw:Sw)(e,t)):this.node()[e]}function Q1(e){return e.trim().split(/^|\s+/)}function km(e){return e.classList||new F1(e)}function F1(e){this._node=e,this._names=Q1(e.getAttribute("class")||"")}F1.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 W1(e,t){for(var n=km(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function J1(e,t){for(var n=km(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function _w(e){return function(){W1(this,e)}}function Ew(e){return function(){J1(this,e)}}function Tw(e,t){return function(){(t.apply(this,arguments)?W1:J1)(this,e)}}function eS(e,t){var n=Q1(e+"");if(arguments.length<2){for(var o=km(this.node()),i=-1,a=n.length;++i<a;)if(!o.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?Tw:t?_w:Ew)(n,t))}function Nw(){this.textContent=""}function Cw(e){return function(){this.textContent=e}}function ww(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function tS(e){return arguments.length?this.each(e==null?Nw:(typeof e=="function"?ww:Cw)(e)):this.node().textContent}function Aw(){this.innerHTML=""}function Mw(e){return function(){this.innerHTML=e}}function Dw(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function nS(e){return arguments.length?this.each(e==null?Aw:(typeof e=="function"?Dw:Mw)(e)):this.node().innerHTML}function Rw(){this.nextSibling&&this.parentNode.appendChild(this)}function oS(){return this.each(Rw)}function Ow(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function iS(){return this.each(Ow)}function aS(e){var t=typeof e=="function"?e:Gc(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function zw(){return null}function lS(e,t){var n=typeof e=="function"?e:Gc(e),o=t==null?zw:typeof t=="function"?t:ha(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function Lw(){var e=this.parentNode;e&&e.removeChild(this)}function rS(){return this.each(Lw)}function Hw(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Bw(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function sS(e){return this.select(e?Bw:Hw)}function uS(e){return arguments.length?this.property("__data__",e):this.node().__data__}function kw(e){return function(t){e.call(this,t,this.__data__)}}function Gw(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 Pw(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 Uw(e,t,n){return function(){var o=this.__on,i,a=kw(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 cS(e,t,n){var o=Gw(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?Uw:Pw,i=0;i<a;++i)this.each(r(o[i],t,n));return this}function fS(e,t,n){var o=Ic(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 Iw(e,t){return function(){return fS(this,e,t)}}function Vw(e,t){return function(){return fS(this,e,t.apply(this,arguments))}}function dS(e,t){return this.each((typeof t=="function"?Vw:Iw)(e,t))}function*pS(){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 Gm=[null];function ot(e,t){this._groups=e,this._parents=t}function mS(){return new ot([[document.documentElement]],Gm)}function Yw(){return this}ot.prototype=mS.prototype={constructor:ot,select:A1,selectAll:M1,selectChild:D1,selectChildren:R1,filter:O1,data:H1,enter:z1,exit:B1,join:k1,merge:G1,selection:Yw,order:P1,sort:U1,call:I1,nodes:V1,node:Y1,size:X1,empty:q1,each:Z1,attr:j1,style:$1,property:K1,classed:eS,text:tS,html:nS,raise:oS,lower:iS,append:aS,insert:lS,remove:rS,clone:sS,datum:uS,on:cS,dispatch:dS,[Symbol.iterator]:pS};var Wo=mS;function Tt(e){return typeof e=="string"?new ot([[document.querySelector(e)]],[document.documentElement]):new ot([[e]],Gm)}function hS(e){let t;for(;t=e.sourceEvent;)e=t;return e}function qt(e,t){if(e=hS(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 gS={passive:!1},ga={capture:!0,passive:!1};function Vc(e){e.stopImmediatePropagation()}function Gi(e){e.preventDefault(),e.stopImmediatePropagation()}function ms(e){var t=e.document.documentElement,n=Tt(e).on("dragstart.drag",Gi,ga);"onselectstart"in t?n.on("selectstart.drag",Gi,ga):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function hs(e,t){var n=e.document.documentElement,o=Tt(e).on("dragstart.drag",null);t&&(o.on("click.drag",Gi,ga),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 gs=e=>()=>e;function ys(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}})}ys.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Xw(e){return!e.ctrlKey&&!e.button}function qw(){return this.parentNode}function Zw(e,t){return t??{x:e.x,y:e.y}}function jw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yc(){var e=Xw,t=qw,n=Zw,o=jw,i={},a=ma("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,gS).on("touchend.drag touchcancel.drag",y).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");_&&(Tt(g.view).on("mousemove.drag",v,ga).on("mouseup.drag",b,ga),ms(g.view),Vc(g),u=!1,r=g.clientX,s=g.clientY,_("start",g))}}function v(g){if(Gi(g),!u){var x=g.clientX-r,_=g.clientY-s;u=x*x+_*_>d}i.mouse("drag",g)}function b(g){Tt(g.view).on("mousemove.drag mouseup.drag",null),hs(g.view,u),Gi(g),i.mouse("end",g)}function S(g,x){if(e.call(this,g,x)){var _=g.changedTouches,E=t.call(this,g,x),w=_.length,N,k;for(N=0;N<w;++N)(k=m(this,E,g,x,_[N].identifier,_[N]))&&(Vc(g),k("start",g,_[N]))}}function p(g){var x=g.changedTouches,_=x.length,E,w;for(E=0;E<_;++E)(w=i[x[E].identifier])&&(Gi(g),w("drag",g,x[E]))}function y(g){var x=g.changedTouches,_=x.length,E,w;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<_;++E)(w=i[x[E].identifier])&&(Vc(g),w("end",g,x[E]))}function m(g,x,_,E,w,N){var k=a.copy(),D=qt(N||_,x),z,P,T;if((T=n.call(g,new ys("beforestart",{sourceEvent:_,target:f,identifier:w,active:l,x:D[0],y:D[1],dx:0,dy:0,dispatch:k}),E))!=null)return z=T.x-D[0]||0,P=T.y-D[1]||0,function A(M,O,R){var L=D,V;switch(M){case"start":i[w]=A,V=l++;break;case"end":delete i[w],--l;case"drag":D=qt(R||O,x),V=l;break}k.call(M,g,new ys(M,{sourceEvent:O,subject:T,target:f,identifier:w,active:V,x:D[0]+z,y:D[1]+P,dx:D[0]-L[0],dy:D[1]-L[1],dispatch:k}),E)}}return f.filter=function(g){return arguments.length?(e=typeof g=="function"?g:gs(!!g),f):e},f.container=function(g){return arguments.length?(t=typeof g=="function"?g:gs(g),f):t},f.subject=function(g){return arguments.length?(n=typeof g=="function"?g:gs(g),f):n},f.touchable=function(g){return arguments.length?(o=typeof g=="function"?g:gs(!!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 Xc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pm(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Ss(){}var vs=.7,jc=1/vs,Ml="\\s*([+-]?\\d+)\\s*",bs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",So="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$w=/^#([0-9a-f]{3,8})$/,Kw=new RegExp(`^rgb\\(${Ml},${Ml},${Ml}\\)$`),Qw=new RegExp(`^rgb\\(${So},${So},${So}\\)$`),Fw=new RegExp(`^rgba\\(${Ml},${Ml},${Ml},${bs}\\)$`),Ww=new RegExp(`^rgba\\(${So},${So},${So},${bs}\\)$`),Jw=new RegExp(`^hsl\\(${bs},${So},${So}\\)$`),eA=new RegExp(`^hsla\\(${bs},${So},${So},${bs}\\)$`),yS={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};Xc(Ss,oo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vS,formatHex:vS,formatHex8:tA,formatHsl:nA,formatRgb:bS,toString:bS});function vS(){return this.rgb().formatHex()}function tA(){return this.rgb().formatHex8()}function nA(){return NS(this).formatHsl()}function bS(){return this.rgb().formatRgb()}function oo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=$w.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?SS(t):n===3?new un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?qc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?qc(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=Kw.exec(e))?new un(t[1],t[2],t[3],1):(t=Qw.exec(e))?new un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Fw.exec(e))?qc(t[1],t[2],t[3],t[4]):(t=Ww.exec(e))?qc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Jw.exec(e))?ES(t[1],t[2]/100,t[3]/100,1):(t=eA.exec(e))?ES(t[1],t[2]/100,t[3]/100,t[4]):yS.hasOwnProperty(e)?SS(yS[e]):e==="transparent"?new un(NaN,NaN,NaN,0):null}function SS(e){return new un(e>>16&255,e>>8&255,e&255,1)}function qc(e,t,n,o){return o<=0&&(e=t=n=NaN),new un(e,t,n,o)}function oA(e){return e instanceof Ss||(e=oo(e)),e?(e=e.rgb(),new un(e.r,e.g,e.b,e.opacity)):new un}function Dl(e,t,n,o){return arguments.length===1?oA(e):new un(e,t,n,o??1)}function un(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Xc(un,Dl,Pm(Ss,{brighter(e){return e=e==null?jc:Math.pow(jc,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?vs:Math.pow(vs,e),new un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new un(va(this.r),va(this.g),va(this.b),$c(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:xS,formatHex:xS,formatHex8:iA,formatRgb:_S,toString:_S}));function xS(){return`#${ya(this.r)}${ya(this.g)}${ya(this.b)}`}function iA(){return`#${ya(this.r)}${ya(this.g)}${ya(this.b)}${ya((isNaN(this.opacity)?1:this.opacity)*255)}`}function _S(){let e=$c(this.opacity);return`${e===1?"rgb(":"rgba("}${va(this.r)}, ${va(this.g)}, ${va(this.b)}${e===1?")":`, ${e})`}`}function $c(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function va(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ya(e){return e=va(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 no(e,t,n,o)}function NS(e){if(e instanceof no)return new no(e.h,e.s,e.l,e.opacity);if(e instanceof Ss||(e=oo(e)),!e)return new no;if(e instanceof no)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 no(l,r,s,e.opacity)}function CS(e,t,n,o){return arguments.length===1?NS(e):new no(e,t,n,o??1)}function no(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Xc(no,CS,Pm(Ss,{brighter(e){return e=e==null?jc:Math.pow(jc,e),new no(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?vs:Math.pow(vs,e),new no(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 un(Um(e>=240?e-240:e+120,i,o),Um(e,i,o),Um(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new no(TS(this.h),Zc(this.s),Zc(this.l),$c(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=$c(this.opacity);return`${e===1?"hsl(":"hsla("}${TS(this.h)}, ${Zc(this.s)*100}%, ${Zc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function TS(e){return e=(e||0)%360,e<0?e+360:e}function Zc(e){return Math.max(0,Math.min(1,e||0))}function Um(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 Im(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 wS(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 Im((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 Im((n-o/t)*t,i,a,l,r)}}var xs=e=>()=>e;function aA(e,t){return function(n){return e+n*t}}function lA(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 MS(e){return(e=+e)==1?Kc:function(t,n){return n-t?lA(t,n,e):xs(isNaN(t)?n:t)}}function Kc(e,t){var n=t-e;return n?aA(e,n):xs(isNaN(e)?t:e)}var ba=(function e(t){var n=MS(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=Kc(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 DS(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 rA=DS(wS),sA=DS(AS);function RS(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 OS(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function zS(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]=Jo(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 LS(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Zt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function HS(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]=Jo(e[i],t[i]):o[i]=t[i];return function(a){for(i in n)o[i]=n[i](a);return o}}var Ym=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Vm=new RegExp(Ym.source,"g");function uA(e){return function(){return e}}function cA(e){return function(t){return e(t)+""}}function _s(e,t){var n=Ym.lastIndex=Vm.lastIndex=0,o,i,a,l=-1,r=[],s=[];for(e=e+"",t=t+"";(o=Ym.exec(e))&&(i=Vm.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:Zt(o,i)})),n=Vm.lastIndex;return n<t.length&&(a=t.slice(n),r[l]?r[l]+=a:r[++l]=a),r.length<2?s[0]?cA(s[0].x):uA(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 Jo(e,t){var n=typeof t,o;return t==null||n==="boolean"?xs(t):(n==="number"?Zt:n==="string"?(o=oo(t))?(t=o,ba):_s:t instanceof oo?ba:t instanceof Date?LS:OS(t)?RS:Array.isArray(t)?zS:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?HS:Zt)(e,t)}var BS=180/Math.PI,Qc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xm(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)*BS,skewX:Math.atan(s)*BS,scaleX:l,scaleY:r}}var Fc;function kS(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qc:Xm(t.a,t.b,t.c,t.d,t.e,t.f)}function GS(e){return e==null?Qc:(Fc||(Fc=document.createElementNS("http://www.w3.org/2000/svg","g")),Fc.setAttribute("transform",e),(e=Fc.transform.baseVal.consolidate())?(e=e.matrix,Xm(e.a,e.b,e.c,e.d,e.e,e.f)):Qc)}function PS(e,t,n,o){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push("translate(",null,t,null,n);v.push({i:b-4,x:Zt(u,d)},{i:b-2,x:Zt(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:Zt(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:Zt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function s(u,c,d,f,h,v){if(u!==d||c!==f){var b=h.push(i(h)+"scale(",null,",",null,")");v.push({i:b-4,x:Zt(u,d)},{i:b-2,x:Zt(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 v=-1,b=f.length,S;++v<b;)d[(S=f[v]).i]=S.x(h);return d.join("")}}}var qm=PS(kS,"px, ","px)","deg)"),Zm=PS(GS,", ",")",")");var fA=1e-12;function US(e){return((e=Math.exp(e))+1/e)/2}function dA(e){return((e=Math.exp(e))-1/e)/2}function pA(e){return((e=Math.exp(2*e))-1)/(e+1)}var Sa=(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,v=d-s,b=h*h+v*v,S,p;if(b<fA)p=Math.log(f/u)/t,S=function(E){return[r+E*h,s+E*v,u*Math.exp(t*E*p)]};else{var y=Math.sqrt(b),m=(f*f-u*u+o*b)/(2*u*n*y),g=(f*f-u*u-o*b)/(2*f*n*y),x=Math.log(Math.sqrt(m*m+1)-m),_=Math.log(Math.sqrt(g*g+1)-g);p=(_-x)/t,S=function(E){var w=E*p,N=US(x),k=u/(n*y)*(N*pA(t*w+x)-dA(x));return[r+k*h,s+k*v,u*N/US(t*w+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 Rl=0,Ts=0,Es=0,VS=1e3,Wc,Ns,Jc=0,xa=0,ef=0,Cs=typeof performance=="object"&&performance.now?performance:Date,YS=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function As(){return xa||(YS(mA),xa=Cs.now()+ef)}function mA(){xa=0}function ws(){this._call=this._time=this._next=null}ws.prototype=tf.prototype={constructor:ws,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?As():+n)+(t==null?0:+t),!this._next&&Ns!==this&&(Ns?Ns._next=this:Wc=this,Ns=this),this._call=e,this._time=n,jm()},stop:function(){this._call&&(this._call=null,this._time=1/0,jm())}};function tf(e,t,n){var o=new ws;return o.restart(e,t,n),o}function XS(){As(),++Rl;for(var e=Wc,t;e;)(t=xa-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Rl}function IS(){xa=(Jc=Cs.now())+ef,Rl=Ts=0;try{XS()}finally{Rl=0,gA(),xa=0}}function hA(){var e=Cs.now(),t=e-Jc;t>VS&&(ef-=t,Jc=e)}function gA(){for(var e,t=Wc,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:Wc=n);Ns=e,jm(o)}function jm(e){if(!Rl){Ts&&(Ts=clearTimeout(Ts));var t=e-xa;t>24?(e<1/0&&(Ts=setTimeout(IS,e-Cs.now()-ef)),Es&&(Es=clearInterval(Es))):(Es||(Jc=Cs.now(),Es=setInterval(hA,VS)),Rl=1,YS(IS))}}function nf(e,t,n){var o=new ws;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var yA=ma("start","end","cancel","interrupt"),vA=[],jS=0,qS=1,af=2,of=3,ZS=4,lf=5,Ms=6;function Pi(e,t,n,o,i,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;bA(e,n,{name:t,index:o,group:i,on:yA,tween:vA,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:jS})}function Ds(e,t){var n=bt(e,t);if(n.state>jS)throw new Error("too late; already scheduled");return n}function zt(e,t){var n=bt(e,t);if(n.state>of)throw new Error("too late; already running");return n}function bt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function bA(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=tf(a,0,n.time);function a(u){n.state=qS,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!==qS)return s();for(c in o)if(h=o[c],h.name===n.name){if(h.state===of)return nf(l);h.state===ZS?(h.state=Ms,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=Ms,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(nf(function(){n.state===of&&(n.state=ZS,n.timer.restart(r,n.delay,n.time),r(u))}),n.state=af,n.on.call("start",e,e.__data__,n.index,n.group),n.state===af){for(n.state=of,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=lf,1),d=-1,f=i.length;++d<f;)i[d].call(e,c);n.state===lf&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){n.state=Ms,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function _a(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>af&&o.state<lf,o.state=Ms,o.timer.stop(),o.on.call(i?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[l]}a&&delete e.__transition}}function $S(e){return this.each(function(){_a(this,e)})}function SA(e,t){var n,o;return function(){var i=zt(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 xA(e,t,n){var o,i;if(typeof n!="function")throw new Error;return function(){var a=zt(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 KS(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=bt(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?SA:xA)(n,e,t))}function Ol(e,t,n){var o=e._id;return e.each(function(){var i=zt(this,o);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return bt(i,o).value[t]}}function rf(e,t){var n;return(typeof t=="number"?Zt:t instanceof oo?ba:(n=oo(t))?(t=n,ba):_s)(e,t)}function _A(e){return function(){this.removeAttribute(e)}}function EA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function TA(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 NA(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 CA(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 wA(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 QS(e,t){var n=Fo(e),o=n==="transform"?Zm:rf;return this.attrTween(e,typeof t=="function"?(n.local?wA:CA)(n,o,Ol(this,"attr."+e,t)):t==null?(n.local?EA:_A)(n):(n.local?NA:TA)(n,o,t))}function AA(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function MA(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function DA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&MA(e,a)),n}return i._value=t,i}function RA(e,t){var n,o;function i(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&AA(e,a)),n}return i._value=t,i}function FS(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=Fo(e);return this.tween(n,(o.local?DA:RA)(o,t))}function OA(e,t){return function(){Ds(this,e).delay=+t.apply(this,arguments)}}function zA(e,t){return t=+t,function(){Ds(this,e).delay=t}}function WS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?OA:zA)(t,e)):bt(this.node(),t).delay}function LA(e,t){return function(){zt(this,e).duration=+t.apply(this,arguments)}}function HA(e,t){return t=+t,function(){zt(this,e).duration=t}}function JS(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?LA:HA)(t,e)):bt(this.node(),t).duration}function BA(e,t){if(typeof t!="function")throw new Error;return function(){zt(this,e).ease=t}}function ex(e){var t=this._id;return arguments.length?this.each(BA(t,e)):bt(this.node(),t).ease}function kA(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;zt(this,e).ease=n}}function tx(e){if(typeof e!="function")throw new Error;return this.each(kA(this._id,e))}function nx(e){typeof e!="function"&&(e=ds(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 jt(o,this._parents,this._name,this._id)}function ox(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 jt(l,this._parents,this._name,this._id)}function GA(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 PA(e,t,n){var o,i,a=GA(t)?Ds:zt;return function(){var l=a(this,e),r=l.on;r!==o&&(i=(o=r).copy()).on(t,n),l.on=i}}function ix(e,t){var n=this._id;return arguments.length<2?bt(this.node(),n).on.on(e):this.each(PA(n,e,t))}function UA(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ax(){return this.on("end.remove",UA(this._id))}function lx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ha(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,Pi(u[f],t,n,f,u,bt(c,n)));return new jt(a,this._parents,t,n)}function rx(e){var t=this._name,n=this._id;typeof e!="function"&&(e=fs(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,v=bt(c,n),b=0,S=f.length;b<S;++b)(h=f[b])&&Pi(h,t,n,b,f,v);a.push(f),l.push(c)}return new jt(a,l,t,n)}var IA=Wo.prototype.constructor;function sx(){return new IA(this._groups,this._parents)}function VA(e,t){var n,o,i;return function(){var a=ki(this,e),l=(this.style.removeProperty(e),ki(this,e));return a===l?null:a===n&&l===o?i:i=t(n=a,o=l)}}function ux(e){return function(){this.style.removeProperty(e)}}function YA(e,t,n){var o,i=n+"",a;return function(){var l=ki(this,e);return l===i?null:l===o?a:a=t(o=l,n)}}function XA(e,t,n){var o,i,a;return function(){var l=ki(this,e),r=n(this),s=r+"";return r==null&&(s=r=(this.style.removeProperty(e),ki(this,e))),l===s?null:l===o&&s===i?a:(i=s,a=t(o=l,r))}}function qA(e,t){var n,o,i,a="style."+t,l="end."+a,r;return function(){var s=zt(this,e),u=s.on,c=s.value[a]==null?r||(r=ux(t)):void 0;(u!==n||i!==c)&&(o=(n=u).copy()).on(l,i=c),s.on=o}}function cx(e,t,n){var o=(e+="")=="transform"?qm:rf;return t==null?this.styleTween(e,VA(e,o)).on("end.style."+e,ux(e)):typeof t=="function"?this.styleTween(e,XA(e,o,Ol(this,"style."+e,t))).each(qA(this._id,e)):this.styleTween(e,YA(e,o,t),n).on("end.style."+e,null)}function ZA(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function jA(e,t,n){var o,i;function a(){var l=t.apply(this,arguments);return l!==i&&(o=(i=l)&&ZA(e,l,n)),o}return a._value=t,a}function fx(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,jA(e,t,n??""))}function $A(e){return function(){this.textContent=e}}function KA(e){return function(){var t=e(this);this.textContent=t??""}}function dx(e){return this.tween("text",typeof e=="function"?KA(Ol(this,"text",e)):$A(e==null?"":e+""))}function QA(e){return function(t){this.textContent=e.call(this,t)}}function FA(e){var t,n;function o(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&QA(i)),t}return o._value=e,o}function px(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,FA(e))}function mx(){for(var e=this._name,t=this._id,n=sf(),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=bt(s,t);Pi(s,e,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new jt(o,this._parents,e,n)}function hx(){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=zt(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 WA=0;function jt(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function gx(e){return Wo().transition(e)}function sf(){return++WA}var ei=Wo.prototype;jt.prototype=gx.prototype={constructor:jt,select:lx,selectAll:rx,selectChild:ei.selectChild,selectChildren:ei.selectChildren,filter:nx,merge:ox,selection:sx,transition:mx,call:ei.call,nodes:ei.nodes,node:ei.node,size:ei.size,empty:ei.empty,each:ei.each,on:ix,attr:QS,attrTween:FS,style:cx,styleTween:fx,text:dx,textTween:px,remove:ax,tween:KS,delay:WS,duration:JS,ease:ex,easeVarying:tx,end:hx,[Symbol.iterator]:ei[Symbol.iterator]};function uf(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var JA={time:null,delay:0,duration:250,ease:uf};function eM(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 yx(e){var t,n;e instanceof jt?(t=e._id,e=e._name):(t=sf(),(n=JA).time=As(),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])&&Pi(s,e,t,u,l,n||eM(s,t));return new jt(o,this._parents,e,t)}Wo.prototype.interrupt=$S;Wo.prototype.transition=yx;var Rs=e=>()=>e;function $m(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 io(e,t,n){this.k=e,this.x=t,this.y=n}io.prototype={constructor:io,scale:function(e){return e===1?this:new io(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new io(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 Ea=new io(1,0,0);Os.prototype=io.prototype;function Os(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ea;return e.__zoom}function cf(e){e.stopImmediatePropagation()}function zl(e){e.preventDefault(),e.stopImmediatePropagation()}function tM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function nM(){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 vx(){return this.__zoom||Ea}function oM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function iM(){return navigator.maxTouchPoints||"ontouchstart"in this}function aM(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 ff(){var e=tM,t=nM,n=aM,o=oM,i=iM,a=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],r=250,s=Sa,u=ma("start","zoom","end"),c,d,f,h=500,v=150,b=0,S=10;function p(T){T.property("__zoom",vx).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",N).on("dblclick.zoom",k).filter(i).on("touchstart.zoom",D).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}p.transform=function(T,A,M,O){var R=T.selection?T.selection():T;R.property("__zoom",vx),T!==R?x(T,A,M,O):R.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},p.scaleBy=function(T,A,M,O){p.scaleTo(T,function(){var R=this.__zoom.k,L=typeof A=="function"?A.apply(this,arguments):A;return R*L},M,O)},p.scaleTo=function(T,A,M,O){p.transform(T,function(){var R=t.apply(this,arguments),L=this.__zoom,V=M==null?g(R):typeof M=="function"?M.apply(this,arguments):M,G=L.invert(V),I=typeof A=="function"?A.apply(this,arguments):A;return n(m(y(L,I),V,G),R,l)},M,O)},p.translateBy=function(T,A,M,O){p.transform(T,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),l)},null,O)},p.translateTo=function(T,A,M,O,R){p.transform(T,function(){var L=t.apply(this,arguments),V=this.__zoom,G=O==null?g(L):typeof O=="function"?O.apply(this,arguments):O;return n(Ea.translate(G[0],G[1]).scale(V.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof M=="function"?-M.apply(this,arguments):-M),L,l)},O,R)};function y(T,A){return A=Math.max(a[0],Math.min(a[1],A)),A===T.k?T:new io(A,T.x,T.y)}function m(T,A,M){var O=A[0]-M[0]*T.k,R=A[1]-M[1]*T.k;return O===T.x&&R===T.y?T:new io(T.k,O,R)}function g(T){return[(+T[0][0]+ +T[1][0])/2,(+T[0][1]+ +T[1][1])/2]}function x(T,A,M,O){T.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,L=arguments,V=_(R,L).event(O),G=t.apply(R,L),I=M==null?g(G):typeof M=="function"?M.apply(R,L):M,q=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),j=R.__zoom,$=typeof A=="function"?A.apply(R,L):A,fe=s(j.invert(I).concat(q/j.k),$.invert(I).concat(q/$.k));return function(J){if(J===1)J=$;else{var X=fe(J),Q=q/X[2];J=new io(Q,I[0]-X[0]*Q,I[1]-X[1]*Q)}V.zoom(null,J)}})}function _(T,A,M){return!M&&T.__zooming||new E(T,A)}function E(T,A){this.that=T,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(T,A),this.taps=0}E.prototype={event:function(T){return T&&(this.sourceEvent=T),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(T,A){return this.mouse&&T!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&T!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&T!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(T){var A=Tt(this.that).datum();u.call(T,this.that,new $m(T,{sourceEvent:this.sourceEvent,target:p,type:T,transform:this.that.__zoom,dispatch:u}),A)}};function w(T,...A){if(!e.apply(this,arguments))return;var M=_(this,A).event(T),O=this.__zoom,R=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),L=qt(T);if(M.wheel)(M.mouse[0][0]!==L[0]||M.mouse[0][1]!==L[1])&&(M.mouse[1]=O.invert(M.mouse[0]=L)),clearTimeout(M.wheel);else{if(O.k===R)return;M.mouse=[L,O.invert(L)],_a(this),M.start()}zl(T),M.wheel=setTimeout(V,v),M.zoom("mouse",n(m(y(O,R),M.mouse[0],M.mouse[1]),M.extent,l));function V(){M.wheel=null,M.end()}}function N(T,...A){if(f||!e.apply(this,arguments))return;var M=T.currentTarget,O=_(this,A,!0).event(T),R=Tt(T.view).on("mousemove.zoom",I,!0).on("mouseup.zoom",q,!0),L=qt(T,M),V=T.clientX,G=T.clientY;ms(T.view),cf(T),O.mouse=[L,this.__zoom.invert(L)],_a(this),O.start();function I(j){if(zl(j),!O.moved){var $=j.clientX-V,fe=j.clientY-G;O.moved=$*$+fe*fe>b}O.event(j).zoom("mouse",n(m(O.that.__zoom,O.mouse[0]=qt(j,M),O.mouse[1]),O.extent,l))}function q(j){R.on("mousemove.zoom mouseup.zoom",null),hs(j.view,O.moved),zl(j),O.event(j).end()}}function k(T,...A){if(e.apply(this,arguments)){var M=this.__zoom,O=qt(T.changedTouches?T.changedTouches[0]:T,this),R=M.invert(O),L=M.k*(T.shiftKey?.5:2),V=n(m(y(M,L),O,R),t.apply(this,A),l);zl(T),r>0?Tt(this).transition().duration(r).call(x,V,O,T):Tt(this).call(p.transform,V,O,T)}}function D(T,...A){if(e.apply(this,arguments)){var M=T.touches,O=M.length,R=_(this,A,T.changedTouches.length===O).event(T),L,V,G,I;for(cf(T),V=0;V<O;++V)G=M[V],I=qt(G,this),I=[I,this.__zoom.invert(I),G.identifier],R.touch0?!R.touch1&&R.touch0[2]!==I[2]&&(R.touch1=I,R.taps=0):(R.touch0=I,L=!0,R.taps=1+!!c);c&&(c=clearTimeout(c)),L&&(R.taps<2&&(d=I[0],c=setTimeout(function(){c=null},h)),_a(this),R.start())}}function z(T,...A){if(this.__zooming){var M=_(this,A).event(T),O=T.changedTouches,R=O.length,L,V,G,I;for(zl(T),L=0;L<R;++L)V=O[L],G=qt(V,this),M.touch0&&M.touch0[2]===V.identifier?M.touch0[0]=G:M.touch1&&M.touch1[2]===V.identifier&&(M.touch1[0]=G);if(V=M.that.__zoom,M.touch1){var q=M.touch0[0],j=M.touch0[1],$=M.touch1[0],fe=M.touch1[1],J=(J=$[0]-q[0])*J+(J=$[1]-q[1])*J,X=(X=fe[0]-j[0])*X+(X=fe[1]-j[1])*X;V=y(V,Math.sqrt(J/X)),G=[(q[0]+$[0])/2,(q[1]+$[1])/2],I=[(j[0]+fe[0])/2,(j[1]+fe[1])/2]}else if(M.touch0)G=M.touch0[0],I=M.touch0[1];else return;M.zoom("touch",n(m(V,G,I),M.extent,l))}}function P(T,...A){if(this.__zooming){var M=_(this,A).event(T),O=T.changedTouches,R=O.length,L,V;for(cf(T),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),L=0;L<R;++L)V=O[L],M.touch0&&M.touch0[2]===V.identifier?delete M.touch0:M.touch1&&M.touch1[2]===V.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(V=qt(V,this),Math.hypot(d[0]-V[0],d[1]-V[1])<S)){var G=Tt(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return p.wheelDelta=function(T){return arguments.length?(o=typeof T=="function"?T:Rs(+T),p):o},p.filter=function(T){return arguments.length?(e=typeof T=="function"?T:Rs(!!T),p):e},p.touchable=function(T){return arguments.length?(i=typeof T=="function"?T:Rs(!!T),p):i},p.extent=function(T){return arguments.length?(t=typeof T=="function"?T:Rs([[+T[0][0],+T[0][1]],[+T[1][0],+T[1][1]]]),p):t},p.scaleExtent=function(T){return arguments.length?(a[0]=+T[0],a[1]=+T[1],p):[a[0],a[1]]},p.translateExtent=function(T){return arguments.length?(l[0][0]=+T[0][0],l[1][0]=+T[1][0],l[0][1]=+T[0][1],l[1][1]=+T[1][1],p):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},p.constrain=function(T){return arguments.length?(n=T,p):n},p.duration=function(T){return arguments.length?(r=+T,p):r},p.interpolate=function(T){return arguments.length?(s=T,p):s},p.on=function(){var T=u.on.apply(u,arguments);return T===u?p:T},p.clickDistance=function(T){return arguments.length?(b=(T=+T)*T,p):Math.sqrt(b)},p.tapDistance=function(T){return arguments.length?(S=+T,p):S},p}var Mn={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."},Pl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Jm=["Enter"," ","Escape"],eh={"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"},Vi;(function(e){e.Strict="strict",e.Loose="loose"})(Vi||(Vi={}));var ti;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ti||(ti={}));var Ta;(function(e){e.Partial="partial",e.Full="full"})(Ta||(Ta={}));var th={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},xo;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(xo||(xo={}));var Bl;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Bl||(Bl={}));var W;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(W||(W={}));var bx={[W.Left]:W.Right,[W.Right]:W.Left,[W.Top]:W.Bottom,[W.Bottom]:W.Top};function nh(e){return e===null?null:e?"valid":"invalid"}var oh=e=>"id"in e&&"source"in e&&"target"in e,Ox=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),ih=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var Hs=(e,t=[0,0])=>{let{width:n,height:o}=_o(e),i=e.origin??t,a=n*i[0],l=o*i[1];return{x:e.position.x-a,y:e.position.y-l}},ah=(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):ih(i)?i:t.nodeLookup.get(i.id));let r=l?mf(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return gf(o,r)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return yf(n)},Ul=(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=gf(n,mf(i)),o=!0)}),o?yf(n):{x:0,y:0,width:0,height:0}},hf=(e,t,[n,o,i]=[0,0,1],a=!1,l=!1)=>{let r={...Yl(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,v=c.height??u.height??u.initialHeight??null,b=Il(r,Ca(u)),S=(h??0)*(v??0),p=a&&b>0;(!u.internals.handleBounds||p||b>=S||u.dragging)&&s.push(u)}return s},zx=(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 lM(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 Lx({nodes:e,width:t,height:n,panZoom:o,minZoom:i,maxZoom:a},l){if(e.size===0)return Promise.resolve(!0);let r=lM(e,l),s=Ul(r),u=Bs(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 lh({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",Mn.error005());else{let h=r.measured.width,v=r.measured.height;h&&v&&(d=[[s,u],[s+h,u+v]])}else r&&Gl(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=Gl(d)?Na(t,d,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&a?.("015",Mn.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 Hx({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),v=!h&&f.parentId&&l.find(b=>b.id===f.parentId);(h||v)&&l.push(f)}let r=new Set(t.map(f=>f.id)),s=o.filter(f=>f.deletable!==!1),c=zx(l,s);for(let f of s)r.has(f.id)&&!c.find(v=>v.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 kl=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Na=(e={x:0,y:0},t,n)=>({x:kl(e.x,t[0][0],t[1][0]-(n?.width??0)),y:kl(e.y,t[0][1],t[1][1]-(n?.height??0))});function Bx(e,t,n){let{width:o,height:i}=_o(n),{x:a,y:l}=n.internals.positionAbsolute;return Na(e,[[a,l],[a+o,l+i]],t)}var Sx=(e,t,n)=>e<t?kl(Math.abs(e-t),1,t)/t:e>n?-kl(Math.abs(e-n),1,t)/t:0,kx=(e,t,n=15,o=40)=>{let i=Sx(e.x,o,t.width-o)*n,a=Sx(e.y,o,t.height-o)*n;return[i,a]},gf=(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)}),Wm=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),yf=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),Ca=(e,t=[0,0])=>{let{x:n,y:o}=ih(e)?e.internals.positionAbsolute:Hs(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}},mf=(e,t=[0,0])=>{let{x:n,y:o}=ih(e)?e.internals.positionAbsolute:Hs(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)}},rh=(e,t)=>yf(gf(Wm(e),Wm(t))),Il=(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)},sh=e=>qn(e.width)&&qn(e.height)&&qn(e.x)&&qn(e.y),qn=e=>!isNaN(e)&&isFinite(e),uh=(e,t)=>{},Vl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Yl=({x:e,y:t},[n,o,i],a=!1,l=[1,1])=>{let r={x:(e-n)/i,y:(t-o)/i};return a?Vl(r,l):r},Ls=({x:e,y:t},[n,o,i])=>({x:e*i+n,y:t*i+o});function Ll(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 rM(e,t,n){if(typeof e=="string"||typeof e=="number"){let o=Ll(e,n),i=Ll(e,t);return{top:o,right:i,bottom:o,left:i,x:i*2,y:o*2}}if(typeof e=="object"){let o=Ll(e.top??e.y??0,n),i=Ll(e.bottom??e.y??0,n),a=Ll(e.left??e.x??0,t),l=Ll(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 sM(e,t,n,o,i,a){let{x:l,y:r}=Ls(e,[t,n,o]),{x:s,y:u}=Ls({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 Bs=(e,t,n,o,i,a)=>{let l=rM(a,t,n),r=(t-l.x)/e.width,s=(n-l.y)/e.height,u=Math.min(r,s),c=kl(u,o,i),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,v=n/2-f*c,b=sM(e,h,v,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:v-S.top+S.bottom,zoom:c}},Xl=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function Gl(e){return e!=null&&e!=="parent"}function _o(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function ch(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function fh(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 dh(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Gx(){let e,t;return{promise:new Promise((o,i)=>{e=o,t=i}),resolve:e,reject:t}}function Px(e){return{...eh,...e||{}}}function zs(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:i}){let{x:a,y:l}=Zn(e),r=Yl({x:a-(i?.left??0),y:l-(i?.top??0)},o),{x:s,y:u}=n?Vl(r,t):r;return{xSnapped:s,ySnapped:u,...r}}var vf=e=>({width:e.offsetWidth,height:e.offsetHeight}),ph=e=>e?.getRootNode?.()||window?.document,uM=["INPUT","SELECT","TEXTAREA"];function mh(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:uM.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var hh=e=>"clientX"in e,Zn=(e,t)=>{let n=hh(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)}},xx=(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,...vf(l)}})};function bf({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 df(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function _x({pos:e,x1:t,y1:n,x2:o,y2:i,c:a}){switch(e){case W.Left:return[t-df(t-o,a),n];case W.Right:return[t+df(o-t,a),n];case W.Top:return[t,n-df(n-i,a)];case W.Bottom:return[t,n+df(i-n,a)]}}function Sf({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top,curvature:l=.25}){let[r,s]=_x({pos:n,x1:e,y1:t,x2:o,y2:i,c:l}),[u,c]=_x({pos:a,x1:o,y1:i,x2:e,y2:t,c:l}),[d,f,h,v]=bf({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,v]}function gh({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 Ux({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 Ix({sourceNode:e,targetNode:t,width:n,height:o,transform:i}){let a=gf(mf(e),mf(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 Il(l,yf(a))>0}var cM=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,fM=(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)),yh=(e,t,n={})=>{if(!e.source||!e.target)return uh("006",Mn.error006()),t;let o=n.getEdgeId||cM,i;return oh(e)?i={...e}:i={...e,id:o(e)},fM(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function xf({sourceX:e,sourceY:t,targetX:n,targetY:o}){let[i,a,l,r]=gh({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}},dM=({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 pM({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=dM({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f],v=[],b,S,p={x:0,y:0},y={x:0,y:0},[,,m,g]=gh({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}],E=[{x:u.x,y:S},{x:c.x,y:S}];r[f]===h?v=f==="x"?_:E:v=f==="x"?E:_}else{let _=[{x:u.x,y:c.y}],E=[{x:c.x,y:u.y}];if(f==="x"?v=r.x===h?E:_:v=r.y===h?_:E,t===o){let z=Math.abs(e[f]-n[f]);if(z<=a){let P=Math.min(a-1,a-z);r[f]===h?p[f]=(u[f]>e[f]?-1:1)*P:y[f]=(c[f]>n[f]?-1:1)*P}}if(t!==o){let z=f==="x"?"y":"x",P=r[f]===s[z],T=u[z]>c[z],A=u[z]<c[z];(r[f]===1&&(!P&&T||P&&A)||r[f]!==1&&(!P&&A||P&&T))&&(v=f==="x"?_:E)}let w={x:u.x+p.x,y:u.y+p.y},N={x:c.x+y.x,y:c.y+y.y},k=Math.max(Math.abs(w.x-v[0].x),Math.abs(N.x-v[0].x)),D=Math.max(Math.abs(w.y-v[0].y),Math.abs(N.y-v[0].y));k>=D?(b=(w.x+N.x)/2,S=v[0].y):(b=v[0].x,S=(w.y+N.y)/2)}return[[e,{x:u.x+p.x,y:u.y+p.y},...v,{x:c.x+y.x,y:c.y+y.y},n],b,S,m,g]}function mM(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 ks({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,v,b]=pM({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,y,m)=>{let g="";return m>0&&m<d.length-1?g=mM(d[m-1],y,d[m+1],l):g=`${m===0?"M":"L"}${y.x} ${y.y}`,p+=g,p},""),f,h,v,b]}function Nx(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Vx(e){let{sourceNode:t,targetNode:n}=e;if(!Nx(t)||!Nx(n))return null;let o=t.internals.handleBounds||Cx(t.handles),i=n.internals.handleBounds||Cx(n.handles),a=wx(o?.source??[],e.sourceHandle),l=wx(e.connectionMode===Vi.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!l)return e.onError?.("008",Mn.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=Yi(t,a,r),c=Yi(n,l,s);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:r,targetPosition:s}}function Cx(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 Yi(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??_o(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 wx(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function _f(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function Yx(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=_f(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,hM=10,vh={nodeOrigin:[0,0],nodeExtent:Pl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},gM={...vh,checkEquality:!0};function bh(e,t){let n={...e};for(let o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function qx(e,t,n){let o=bh(vh,n);for(let i of e.values())if(i.parentId)xh(i,e,t,o);else{let a=Hs(i,o.nodeOrigin),l=Gl(i.extent)?i.extent:o.nodeExtent,r=Na(a,l,_o(i));i.internals.positionAbsolute=r}}function yM(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 Sh(e){return e==="manual"}function Ef(e,t,n,o={}){let i=bh(gM,o),a={i:0},l=new Map(t),r=i?.elevateNodesOnSelect&&!Sh(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=Hs(u,i.nodeOrigin),f=Gl(u.extent)?u.extent:i.nodeExtent,h=Na(d,f,_o(u));c={...i.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:h,handleBounds:yM(u,c),z:Zx(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&&xh(c,t,n,o,a)}return s}function vM(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 xh(e,t,n,o,i){let{elevateNodesOnSelect:a,nodeOrigin:l,nodeExtent:r,zIndexMode:s}=bh(vh,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}vM(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*hM),i&&c.internals.rootParentIndex!==void 0&&(i.i=c.internals.rootParentIndex);let d=a&&!Sh(s)?Xx:0,{x:f,y:h,z:v}=bM(e,c,l,r,d,s),{positionAbsolute:b}=e.internals,S=f!==b.x||h!==b.y;(S||v!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:f,y:h}:b,z:v}})}function Zx(e,t,n){let o=qn(e.zIndex)?e.zIndex:0;return Sh(n)?o:o+(e.selected?t:0)}function bM(e,t,n,o,i,a){let{x:l,y:r}=t.internals.positionAbsolute,s=_o(e),u=Hs(e,n),c=Gl(e.extent)?Na(u,e.extent,s):u,d=Na({x:l+c.x,y:r+c.y},o,s);e.extent==="parent"&&(d=Bx(d,s,t));let f=Zx(e,i,a),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function Tf(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??Ca(r),u=rh(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=_o(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,v=Math.max(c.width,Math.round(l.width)),b=Math.max(c.height,Math.round(l.height)),S=(v-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(y=>{e.some(m=>m.id===y.id)||i.push({id:y.id,type:"position",position:{x:y.position.x+f,y:y.position.y+h}})})),(c.width<l.width||c.height<l.height||f||h)&&i.push({id:s,type:"dimensions",setAttributes:!0,dimensions:{width:v+(f?d[0]*f-S:0),height:b+(h?d[1]*h-p:0)}})}),i}function jx(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 v=t.get(h.id);if(!v)continue;if(v.hidden){t.set(v.id,{...v,internals:{...v.internals,handleBounds:void 0}}),s=!0;continue}let b=vf(h.nodeElement),S=v.measured.width!==b.width||v.measured.height!==b.height;if(!!(b.width&&b.height&&(S||!v.internals.handleBounds||h.force))){let y=h.nodeElement.getBoundingClientRect(),m=Gl(v.extent)?v.extent:a,{positionAbsolute:g}=v.internals;v.parentId&&v.extent==="parent"?g=Bx(g,b,t.get(v.parentId)):m&&(g=Na(g,m,b));let x={...v,measured:b,internals:{...v.internals,positionAbsolute:g,handleBounds:{source:xx("source",h.nodeElement,y,d,v.id),target:xx("target",h.nodeElement,y,d,v.id)}}};t.set(v.id,x),v.parentId&&xh(x,t,n,{nodeOrigin:i,zIndexMode:l}),s=!0,S&&(u.push({id:v.id,type:"dimensions",dimensions:b}),v.expandParent&&v.parentId&&f.push({id:v.id,parentId:v.parentId,rect:Ca(x,i)}))}}if(f.length>0){let h=Tf(f,t,n,i);u.push(...h)}return{changes:u,updatedInternals:s}}async function $x({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 _h(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 Kx(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:Kx(n,t):!1}function Mx(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 SM(e,t,n,o){let i=new Map;for(let[a,l]of e)if((l.selected||l.id===o)&&(!l.parentId||!Kx(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 Km({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 xM({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=Vl(a,t);return{x:l.x-a.x,y:l.y-a.y}}function Qx({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,v=!1,b=null;function S({noDragClassName:y,handleSelector:m,domNode:g,isSelectable:x,nodeId:_,nodeClickDistance:E=0}){f=Tt(g);function w({x:z,y:P}){let{nodeLookup:T,nodeExtent:A,snapGrid:M,snapToGrid:O,nodeOrigin:R,onNodeDrag:L,onSelectionDrag:V,onError:G,updateNodePositions:I}=t();a={x:z,y:P};let q=!1,j=r.size>1,$=j&&A?Wm(Ul(r)):null,fe=j&&O?xM({dragItems:r,snapGrid:M,x:z,y:P}):null;for(let[J,X]of r){if(!T.has(J))continue;let Q={x:z-X.distance.x,y:P-X.distance.y};O&&(Q=fe?{x:Math.round(Q.x+fe.x),y:Math.round(Q.y+fe.y)}:Vl(Q,M));let ye=null;if(j&&A&&!X.extent&&$){let{positionAbsolute:ae}=X.internals,se=ae.x-$.x+A[0][0],de=ae.x+X.measured.width-$.x2+A[1][0],Se=ae.y-$.y+A[0][1],Ae=ae.y+X.measured.height-$.y2+A[1][1];ye=[[se,Se],[de,Ae]]}let{position:me,positionAbsolute:ee}=lh({nodeId:J,nextPosition:Q,nodeLookup:T,nodeExtent:ye||A,nodeOrigin:R,onError:G});q=q||X.position.x!==me.x||X.position.y!==me.y,X.position=me,X.internals.positionAbsolute=ee}if(v=v||q,!!q&&(I(r,!0),b&&(o||L||!_&&V))){let[J,X]=Km({nodeId:_,dragItems:r,nodeLookup:T});o?.(b,r,J,X),L?.(b,J,X),_||V?.(b,X)}}async function N(){if(!c)return;let{transform:z,panBy:P,autoPanSpeed:T,autoPanOnNodeDrag:A}=t();if(!A){s=!1,cancelAnimationFrame(l);return}let[M,O]=kx(u,c,T);(M!==0||O!==0)&&(a.x=(a.x??0)-M/z[2],a.y=(a.y??0)-O/z[2],await P({x:M,y:O})&&w(a)),l=requestAnimationFrame(N)}function k(z){let{nodeLookup:P,multiSelectionActive:T,nodesDraggable:A,transform:M,snapGrid:O,snapToGrid:R,selectNodesOnDrag:L,onNodeDragStart:V,onSelectionDragStart:G,unselectNodesAndEdges:I}=t();d=!0,(!L||!x)&&!T&&_&&(P.get(_)?.selected||I()),x&&L&&_&&e?.(_);let q=zs(z.sourceEvent,{transform:M,snapGrid:O,snapToGrid:R,containerBounds:c});if(a=q,r=SM(P,A,q,_),r.size>0&&(n||V||!_&&G)){let[j,$]=Km({nodeId:_,dragItems:r,nodeLookup:P});n?.(z.sourceEvent,r,j,$),V?.(z.sourceEvent,j,$),_||G?.(z.sourceEvent,$)}}let D=Yc().clickDistance(E).on("start",z=>{let{domNode:P,nodeDragThreshold:T,transform:A,snapGrid:M,snapToGrid:O}=t();c=P?.getBoundingClientRect()||null,h=!1,v=!1,b=z.sourceEvent,T===0&&k(z),a=zs(z.sourceEvent,{transform:A,snapGrid:M,snapToGrid:O,containerBounds:c}),u=Zn(z.sourceEvent,c)}).on("drag",z=>{let{autoPanOnNodeDrag:P,transform:T,snapGrid:A,snapToGrid:M,nodeDragThreshold:O,nodeLookup:R}=t(),L=zs(z.sourceEvent,{transform:T,snapGrid:A,snapToGrid:M,containerBounds:c});if(b=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!R.has(_))&&(h=!0),!h){if(!s&&P&&d&&(s=!0,N()),!d){let V=Zn(z.sourceEvent,c),G=V.x-u.x,I=V.y-u.y;Math.sqrt(G*G+I*I)>O&&k(z)}(a.x!==L.xSnapped||a.y!==L.ySnapped)&&r&&d&&(u=Zn(z.sourceEvent,c),w(L))}}).on("end",z=>{if(!(!d||h)&&(s=!1,d=!1,cancelAnimationFrame(l),r.size>0)){let{nodeLookup:P,updateNodePositions:T,onNodeDragStop:A,onSelectionDragStop:M}=t();if(v&&(T(r,!1),v=!1),i||A||!_&&M){let[O,R]=Km({nodeId:_,dragItems:r,nodeLookup:P,dragging:!1});i?.(z.sourceEvent,r,O,R),A?.(z.sourceEvent,O,R),_||M?.(z.sourceEvent,R)}}}).filter(z=>{let P=z.target;return!z.button&&(!y||!Mx(P,`.${y}`,g))&&(!m||Mx(P,m,g))});f.call(D)}function p(){f?.on(".drag",null)}return{update:S,destroy:p}}function _M(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())Il(i,Ca(a))>0&&o.push(a);return o}var EM=250;function TM(e,t,n,o){let i=[],a=1/0,l=_M(e,n,t+EM);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}=Yi(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 Fx(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,...Yi(l,s,s.position,!0)}:s}function Wx(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function NM(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var Jx=()=>!0;function CM(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:v,onConnect:b,onConnectEnd:S,isValidConnection:p=Jx,onReconnectEnd:y,updateConnection:m,getTransform:g,getFromHandle:x,autoPanSpeed:_,dragThreshold:E=1,handleDomNode:w}){let N=ph(e.target),k=0,D,{x:z,y:P}=Zn(e),T=Wx(a,w),A=r?.getBoundingClientRect(),M=!1;if(!A||!T)return;let O=Fx(i,T,o,s,t);if(!O)return;let R=Zn(e,A),L=!1,V=null,G=!1,I=null;function q(){if(!c||!A)return;let[me,ee]=kx(R,A,_);f({x:me,y:ee}),k=requestAnimationFrame(q)}let j={...O,nodeId:i,type:T,position:O.position},$=s.get(i),J={inProgress:!0,isValid:null,from:Yi($,j,W.Left,!0),fromHandle:j,fromPosition:j.position,fromNode:$,to:R,toHandle:null,toPosition:bx[j.position],toNode:null,pointer:R};function X(){M=!0,m(J),v?.(e,{nodeId:i,handleId:o,handleType:T})}E===0&&X();function Q(me){if(!M){let{x:Ae,y:rt}=Zn(me),Nt=Ae-z,Ct=rt-P;if(!(Nt*Nt+Ct*Ct>E*E))return;X()}if(!x()||!j){ye(me);return}let ee=g();R=Zn(me,A),D=TM(Yl(R,ee,!1,[1,1]),n,s,j),L||(q(),L=!0);let ae=e_(me,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:o,fromType:l?"target":"source",isValidConnection:p,doc:N,lib:u,flowId:d,nodeLookup:s});I=ae.handleDomNode,V=ae.connection,G=NM(!!D,ae.isValid);let se=s.get(i),de=se?Yi(se,j,W.Left,!0):J.from,Se={...J,from:de,isValid:G,to:ae.toHandle&&G?Ls({x:ae.toHandle.x,y:ae.toHandle.y},ee):R,toHandle:ae.toHandle,toPosition:G&&ae.toHandle?ae.toHandle.position:bx[j.position],toNode:ae.toHandle?s.get(ae.toHandle.nodeId):null,pointer:R};m(Se),J=Se}function ye(me){if(!("touches"in me&&me.touches.length>0)){if(M){(D||I)&&V&&G&&b?.(V);let{inProgress:ee,...ae}=J,se={...ae,toPosition:J.toHandle?J.toPosition:null};S?.(me,se),a&&y?.(me,se)}h(),cancelAnimationFrame(k),L=!1,G=!1,V=null,I=null,N.removeEventListener("mousemove",Q),N.removeEventListener("mouseup",ye),N.removeEventListener("touchmove",Q),N.removeEventListener("touchend",ye)}}N.addEventListener("mousemove",Q),N.addEventListener("mouseup",ye),N.addEventListener("touchmove",Q),N.addEventListener("touchend",ye)}function e_(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:a,doc:l,lib:r,flowId:s,isValidConnection:u=Jx,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:v}=Zn(e),b=l.elementFromPoint(h,v),S=b?.classList.contains(`${r}-flow__handle`)?b:f,p={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){let y=Wx(void 0,S),m=S.getAttribute("data-nodeid"),g=S.getAttribute("data-handleid"),x=S.classList.contains("connectable"),_=S.classList.contains("connectableend");if(!m||!y)return p;let E={source:d?m:o,sourceHandle:d?g:i,target:d?o:m,targetHandle:d?i:g};p.connection=E;let N=x&&_&&(n===Vi.Strict?d&&y==="source"||!d&&y==="target":m!==o||g!==i);p.isValid=N&&u(E),p.toHandle=Fx(m,y,g,c,n,!0)}return p}var Nf={onPointerDown:CM,isValid:e_};function t_({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){let i=Tt(e);function a({translateExtent:r,width:s,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){let v=m=>{if(m.sourceEvent.type!=="wheel"||!t)return;let g=n(),x=m.sourceEvent.ctrlKey&&Xl()?10:1,_=-m.sourceEvent.deltaY*(m.sourceEvent.deltaMode===1?.05:m.sourceEvent.deltaMode?1:.002)*c,E=g[2]*Math.pow(2,_*x);t.scaleTo(E)},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 E=o()*Math.max(g[2],Math.log(g[2]))*(h?-1:1),w={x:g[0]-_[0]*E,y:g[1]-_[1]*E},N=[[0,0],[s,u]];t.setViewportConstrained({x:w.x,y:w.y,zoom:g[2]},N,r)},y=ff().on("start",S).on("zoom",d?p:null).on("zoom.wheel",f?v:null);i.call(y,{})}function l(){i.on("zoom",null)}return{update:a,destroy:l,pointer:qt}}var Cf=e=>({x:e.x,y:e.y,zoom:e.k}),Qm=({x:e,y:t,zoom:n})=>Ea.translate(e,t).scale(n),Hl=(e,t)=>e.target.closest(`.${t}`),n_=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),wM=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Fm=(e,t=0,n=wM,o=()=>{})=>{let i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e},o_=e=>{let t=e.ctrlKey&&Xl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function AM({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:r,onPanZoom:s,onPanZoomEnd:u}){return c=>{if(Hl(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=qt(c),p=o_(c),y=d*Math.pow(2,p);o.scaleTo(n,y,S,c);return}let f=c.deltaMode===1?20:1,h=i===ti.Vertical?0:c.deltaX*f,v=i===ti.Horizontal?0:c.deltaY*f;!Xl()&&c.shiftKey&&i!==ti.Vertical&&(h=c.deltaY*f,v=0),o.translateBy(n,-(h/d)*a,-(v/d)*a,{internal:!0});let b=Cf(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 MM({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,i){let a=o.type==="wheel",l=!t&&a&&!o.ctrlKey,r=Hl(o,e);if(o.ctrlKey&&a&&r&&o.preventDefault(),l||r)return null;o.preventDefault(),n.call(this,o,i)}}function DM({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{if(o.sourceEvent?.internal)return;let i=Cf(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 RM({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:i}){return a=>{e.usedRightMouseButton=!!(n&&n_(t,e.mouseButton??0)),a.sourceEvent?.sync||o([a.transform.x,a.transform.y,a.transform.k]),i&&!a.sourceEvent?.internal&&i?.(a.sourceEvent,Cf(a.transform))}}function OM({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:i,onPaneContextMenu:a}){return l=>{if(!l.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&n_(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&a(l.sourceEvent),e.usedRightMouseButton=!1,o(!1),i)){let r=Cf(l.transform);e.prevViewport=r,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(l.sourceEvent,r)},n?150:0)}}}function zM({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,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(Hl(d,`${u}-flow__node`)||Hl(d,`${u}-flow__edge`)))return!0;if(!o&&!f&&!i&&!a&&!n||l||c&&!v||Hl(d,r)&&v||Hl(d,s)&&(!v||i&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!i&&!h&&v||!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||v)&&b}}function i_({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=ff().scaleExtent([t,n]).translateExtent(o),f=Tt(e).call(d);y({x:i.x,y:i.y,zoom:kl(i.zoom,t,n)},[[0,0],[c.width,c.height]],o);let h=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(o_);function b(D,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?Jo:Sa).transform(Fm(f,z?.duration,z?.ease,()=>P(!0)),D)}):Promise.resolve(!1)}function S({noWheelClassName:D,noPanClassName:z,onPaneContextMenu:P,userSelectionActive:T,panOnScroll:A,panOnDrag:M,panOnScrollMode:O,panOnScrollSpeed:R,preventScrolling:L,zoomOnPinch:V,zoomOnScroll:G,zoomOnDoubleClick:I,zoomActivationKeyPressed:q,lib:j,onTransformChange:$,connectionInProgress:fe,paneClickDistance:J,selectionOnDrag:X}){T&&!u.isZoomingOrPanning&&p();let Q=A&&!q&&!T;d.clickDistance(X?1/0:!qn(J)||J<0?0:J);let ye=Q?AM({zoomPanValues:u,noWheelClassName:D,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:R,zoomOnPinch:V,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:r}):MM({noWheelClassName:D,preventScrolling:L,d3ZoomHandler:h});if(f.on("wheel.zoom",ye,{passive:!1}),!T){let ee=DM({zoomPanValues:u,onDraggingChange:s,onPanZoomStart:l});d.on("start",ee);let ae=RM({zoomPanValues:u,panOnDrag:M,onPaneContextMenu:!!P,onPanZoom:a,onTransformChange:$});d.on("zoom",ae);let se=OM({zoomPanValues:u,panOnDrag:M,panOnScroll:A,onPaneContextMenu:P,onPanZoomEnd:r,onDraggingChange:s});d.on("end",se)}let me=zM({zoomActivationKeyPressed:q,panOnDrag:M,zoomOnScroll:G,panOnScroll:A,zoomOnDoubleClick:I,zoomOnPinch:V,userSelectionActive:T,noPanClassName:z,noWheelClassName:D,lib:j,connectionInProgress:fe});d.filter(me),I?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function p(){d.on("zoom",null)}async function y(D,z,P){let T=Qm(D),A=d?.constrain()(T,z,P);return A&&await b(A),new Promise(M=>M(A))}async function m(D,z){let P=Qm(D);return await b(P,z),new Promise(T=>T(P))}function g(D){if(f){let z=Qm(D),P=f.property("__zoom");(P.k!==D.zoom||P.x!==D.x||P.y!==D.y)&&d?.transform(f,z,null,{sync:!0})}}function x(){let D=f?Os(f.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}function _(D,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?Jo:Sa).scaleTo(Fm(f,z?.duration,z?.ease,()=>P(!0)),D)}):Promise.resolve(!1)}function E(D,z){return f?new Promise(P=>{d?.interpolate(z?.interpolate==="linear"?Jo:Sa).scaleBy(Fm(f,z?.duration,z?.ease,()=>P(!0)),D)}):Promise.resolve(!1)}function w(D){d?.scaleExtent(D)}function N(D){d?.translateExtent(D)}function k(D){let z=!qn(D)||D<0?0:D;d?.clickDistance(z)}return{update:S,destroy:p,setViewport:m,setViewportConstrained:y,getViewport:x,scaleTo:_,scaleBy:E,setScaleExtent:w,setTranslateExtent:N,syncViewport:g,setClickDistance:k}}var Xi;(function(e){e.Line="line",e.Handle="handle"})(Xi||(Xi={}));function LM({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 Dx(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 Ui(e,t){return Math.max(0,t-e)}function Ii(e,t){return Math.max(0,e-t)}function pf(e,t,n){return Math.max(0,t-e,e-n)}function Rx(e,t){return e?!t:t}function HM(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:v}=n,{minWidth:b,maxWidth:S,minHeight:p,maxHeight:y}=o,{x:m,y:g,width:x,height:_,aspectRatio:E}=e,w=Math.floor(c?h-e.pointerX:0),N=Math.floor(d?v-e.pointerY:0),k=x+(s?-w:w),D=_+(u?-N:N),z=-a[0]*x,P=-a[1]*_,T=pf(k,b,S),A=pf(D,p,y);if(l){let R=0,L=0;s&&w<0?R=Ui(m+w+z,l[0][0]):!s&&w>0&&(R=Ii(m+k+z,l[1][0])),u&&N<0?L=Ui(g+N+P,l[0][1]):!u&&N>0&&(L=Ii(g+D+P,l[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(r){let R=0,L=0;s&&w>0?R=Ii(m+w,r[0][0]):!s&&w<0&&(R=Ui(m+k,r[1][0])),u&&N>0?L=Ii(g+N,r[0][1]):!u&&N<0&&(L=Ui(g+D,r[1][1])),T=Math.max(T,R),A=Math.max(A,L)}if(i){if(c){let R=pf(k/E,p,y)*E;if(T=Math.max(T,R),l){let L=0;!s&&!u||s&&!u&&f?L=Ii(g+P+k/E,l[1][1])*E:L=Ui(g+P+(s?w:-w)/E,l[0][1])*E,T=Math.max(T,L)}if(r){let L=0;!s&&!u||s&&!u&&f?L=Ui(g+k/E,r[1][1])*E:L=Ii(g+(s?w:-w)/E,r[0][1])*E,T=Math.max(T,L)}}if(d){let R=pf(D*E,b,S)/E;if(A=Math.max(A,R),l){let L=0;!s&&!u||u&&!s&&f?L=Ii(m+D*E+z,l[1][0])/E:L=Ui(m+(u?N:-N)*E+z,l[0][0])/E,A=Math.max(A,L)}if(r){let L=0;!s&&!u||u&&!s&&f?L=Ui(m+D*E,r[1][0])/E:L=Ii(m+(u?N:-N)*E,r[0][0])/E,A=Math.max(A,L)}}}N=N+(N<0?A:-A),w=w+(w<0?T:-T),i&&(f?k>D*E?N=(Rx(s,u)?-w:w)/E:w=(Rx(s,u)?-N:N)*E:c?(N=w/E,u=s):(w=N*E,s=u));let M=s?m+w:m,O=u?g+N:g;return{width:x+(s?-w:w),height:_+(u?-N:N),x:a[0]*w*(s?-1:1)+M,y:a[1]*N*(u?-1:1)+O}}var a_={width:0,height:0,x:0,y:0},BM={...a_,pointerX:0,pointerY:0,aspectRatio:1};function kM(e){return[[0,0],[e.measured.width,e.measured.height]]}function GM(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 l_({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:i}){let a=Tt(e),l={controlDirection:Dx("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:v,onResizeEnd:b,shouldResize:S}){let p={...a_},y={...BM};l={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:Dx(u)};let m,g=null,x=[],_,E,w,N=!1,k=Yc().on("start",D=>{let{nodeLookup:z,transform:P,snapGrid:T,snapToGrid:A,nodeOrigin:M,paneDomNode:O}=n();if(m=z.get(t),!m)return;g=O?.getBoundingClientRect()??null;let{xSnapped:R,ySnapped:L}=zs(D.sourceEvent,{transform:P,snapGrid:T,snapToGrid:A,containerBounds:g});p={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},y={...p,pointerX:R,pointerY:L,aspectRatio:p.width/p.height},_=void 0,m.parentId&&(m.extent==="parent"||m.expandParent)&&(_=z.get(m.parentId),E=_&&m.extent==="parent"?kM(_):void 0),x=[],w=void 0;for(let[V,G]of z)if(G.parentId===t&&(x.push({id:V,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){let I=GM(G,m,G.origin??M);w?w=[[Math.min(I[0][0],w[0][0]),Math.min(I[0][1],w[0][1])],[Math.max(I[1][0],w[1][0]),Math.max(I[1][1],w[1][1])]]:w=I}h?.(D,{...p})}).on("drag",D=>{let{transform:z,snapGrid:P,snapToGrid:T,nodeOrigin:A}=n(),M=zs(D.sourceEvent,{transform:z,snapGrid:P,snapToGrid:T,containerBounds:g}),O=[];if(!m)return;let{x:R,y:L,width:V,height:G}=p,I={},q=m.origin??A,{width:j,height:$,x:fe,y:J}=HM(y,l.controlDirection,M,l.boundaries,l.keepAspectRatio,q,E,w),X=j!==V,Q=$!==G,ye=fe!==R&&X,me=J!==L&&Q;if(!ye&&!me&&!X&&!Q)return;if((ye||me||q[0]===1||q[1]===1)&&(I.x=ye?fe:p.x,I.y=me?J:p.y,p.x=I.x,p.y=I.y,x.length>0)){let de=fe-R,Se=J-L;for(let Ae of x)Ae.position={x:Ae.position.x-de+q[0]*(j-V),y:Ae.position.y-Se+q[1]*($-G)},O.push(Ae)}if((X||Q)&&(I.width=X&&(!l.resizeDirection||l.resizeDirection==="horizontal")?j:p.width,I.height=Q&&(!l.resizeDirection||l.resizeDirection==="vertical")?$:p.height,p.width=I.width,p.height=I.height),_&&m.expandParent){let de=q[0]*(I.width??0);I.x&&I.x<de&&(p.x=de,y.x=y.x-(I.x-de));let Se=q[1]*(I.height??0);I.y&&I.y<Se&&(p.y=Se,y.y=y.y-(I.y-Se))}let ee=LM({width:p.width,prevWidth:V,height:p.height,prevHeight:G,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),ae={...p,direction:ee};S?.(D,ae)!==!1&&(N=!0,v?.(D,ae),o(I,O))}).on("end",D=>{N&&(b?.(D,{...p}),i?.({...p}),N=!1)});a.call(k)}function s(){a.on(".drag",null)}return{update:r,destroy:s}}var b_=oe(wt(),1),S_=oe(m_(),1);var g_={},h_=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(v=>v(t,h))}},i=()=>t,s={setState:o,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(g_.env?g_.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},y_=e=>e?h_(e):h_;var{useDebugValue:nD}=b_.default,{useSyncExternalStoreWithSelector:oD}=S_.default,iD=e=>e;function Th(e,t=iD,n){let o=oD(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return nD(o),o}var v_=(e,t)=>{let n=y_(e),o=(i,a=t)=>Th(n,i,a);return Object.assign(o,n),o},x_=(e,t)=>e?v_(e,t):v_;function je(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 aD=oe(ud()),Rf=(0,B.createContext)(null),lD=Rf.Provider,q_=Mn.error001();function we(e,t){let n=(0,B.useContext)(Rf);if(n===null)throw new Error(q_);return Th(n,e,t)}function Qe(){let e=(0,B.useContext)(Rf);if(e===null)throw new Error(q_);return(0,B.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var __={display:"none"},rD={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Z_="react-flow__node-desc",j_="react-flow__edge-desc",sD="react-flow__aria-live",uD=e=>e.ariaLiveMessage,cD=e=>e.ariaLabelConfig;function fD({rfId:e}){let t=we(uD);return(0,H.jsx)("div",{id:`${sD}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:rD,children:t})}function dD({rfId:e,disableKeyboardA11y:t}){let n=we(cD);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{id:`${Z_}-${e}`,style:__,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,H.jsx)("div",{id:`${j_}-${e}`,style:__,children:n["edge.a11yDescription.default"]}),!t&&(0,H.jsx)(fD,{rfId:e})]})}var Of=(0,B.forwardRef)(({position:e="top-left",children:t,className:n,style:o,...i},a)=>{let l=`${e}`.split("-");return(0,H.jsx)("div",{className:nt(["react-flow__panel",n,...l]),style:o,ref:a,...i,children:t})});Of.displayName="Panel";function pD({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,H.jsx)(Of,{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,H.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var mD=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}},Af=e=>e.id;function hD(e,t){return je(e.selectedNodes.map(Af),t.selectedNodes.map(Af))&&je(e.selectedEdges.map(Af),t.selectedEdges.map(Af))}function gD({onSelectionChange:e}){let t=Qe(),{selectedNodes:n,selectedEdges:o}=we(mD,hD);return(0,B.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 vD({onSelectionChange:e}){let t=we(yD);return e||t?(0,H.jsx)(gD,{onSelectionChange:e}):null}var $_=[0,0],bD={x:0,y:0,zoom:1},SD=["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_=[...SD,"rfId"],xD=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:Pl,nodeOrigin:$_,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function _D(e){let{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:l,reset:r,setDefaultNodesAndEdges:s}=we(xD,je),u=Qe();(0,B.useEffect)(()=>(s(e.defaultNodes,e.defaultEdges),()=>{c.current=T_,r()}),[]);let c=(0,B.useRef)(T_);return(0,B.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:Px(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 ED(e){let[t,n]=(0,B.useState)(e==="system"?null:e);return(0,B.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 C_=typeof document<"u"?document:null;function Gs(e=null,t={target:C_,actInsideInputWithModifier:!0}){let[n,o]=(0,B.useState)(!1),i=(0,B.useRef)(!1),a=(0,B.useRef)(new Set([])),[l,r]=(0,B.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
2426
2468
|
`).replace(`
|
|
2427
2469
|
|
|
2428
2470
|
`,`
|
|
2429
2471
|
+`).split(`
|
|
2430
|
-
`)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,H.useEffect)(()=>{let s=t?.target??E_,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)&&ph(h))return!1;let b=N_(h.code,r);if(a.current.add(h[b]),T_(l,a.current,!1)){let x=h.composedPath?.()?.[0]||h.target,p=x?.nodeName==="BUTTON"||x?.nodeName==="A";t.preventDefault!==!1&&(i.current||!p)&&h.preventDefault(),o(!0)}},d=h=>{let y=N_(h.code,r);T_(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 T_(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(i=>t.has(i)))}function N_(e,t){return t.includes(e)?"code":"key"}var yM=()=>{let e=Ke();return(0,H.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=zs(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 Ul(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=Rs(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function Z_(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)vM(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 vM(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 j_(e,t){return Z_(e,t)}function $_(e,t){return Z_(e,t)}function Ca(e,t){return{id:e,type:"select",selected:t}}function Yl(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(Ca(a.id,l)))}return o}function C_({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 w_(e){return{id:e.id,type:"remove"}}var A_=e=>DS(e),bM=e=>nh(e);function Q_(e){return(0,H.forwardRef)(e)}var xM=typeof window<"u"?H.useLayoutEffect:H.useEffect;function D_(e){let[t,n]=(0,H.useState)(BigInt(0)),[o]=(0,H.useState)(()=>SM(()=>n(i=>i+BigInt(1))));return xM(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function SM(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var K_=(0,H.createContext)(null);function _M({children:e}){let t=Ke(),n=(0,H.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 x=C_({items:b,lookup:f});for(let p of y.values())x=p(x);c&&u(b),x.length>0?d?.(x):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:p,nodes:v,setNodes:m}=t.getState();p&&m(v)})},[]),o=D_(n),i=(0,H.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(C_({items:h,lookup:f}))},[]),a=D_(i),l=(0,H.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,B.jsx)(K_.Provider,{value:l,children:e})}function EM(){let e=(0,H.useContext)(K_);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var TM=e=>!!e.panZoom;function wh(){let e=yM(),t=Ke(),n=EM(),o=Ce(TM),i=(0,H.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=A_(d)?d:f.get(d.id),b=y.parentId?ch(y.position,y.measured,y.parentId,f,h):y.position,x={...y,position:b,width:y.measured?.width??y.width,height:y.measured?.height??y.height};return Na(x)},u=(d,f,h={replace:!1})=>{l(y=>y.map(b=>{if(b.id===d){let x=typeof f=="function"?f(b):f;return h.replace&&A_(x)?x:{...b,...x}}return b}))},c=(d,f,h={replace:!1})=>{r(y=>y.map(b=>{if(b.id===d){let x=typeof f=="function"?f(b):f;return h.replace&&bM(x)?x:{...b,...x}}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,x]=h;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x:y,y:b,zoom:x}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:h,edges:y,onNodesDelete:b,onEdgesDelete:x,triggerNodeChanges:p,triggerEdgeChanges:v,onDelete:m,onBeforeDelete:g}=t.getState(),{nodes:S,edges:_}=await OS({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:y,onBeforeDelete:g}),E=_.length>0,N=S.length>0;if(E){let w=_.map(w_);x?.(_),v(w)}if(N){let w=S.map(w_);b?.(S),p(w)}return(N||E)&&m?.({nodes:S,edges:_}),{deletedNodes:S,deletedEdges:_}},getIntersectingNodes:(d,f=!0,h)=>{let y=rh(d),b=y?d:s(d),x=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=Na(x?p:v),g=Pl(m,b);return f&&g>0||g>=m.width*m.height||g>=b.width*b.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{let b=rh(d)?d:s(d);if(!b)return!1;let x=Pl(b,f);return h&&x>0||x>=f.width*f.height||x>=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 ih(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??BS();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return(0,H.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var M_=e=>e.selected,NM=typeof window<"u"?window:void 0;function CM({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Ke(),{deleteElements:o}=wh(),i=Bs(e,{actInsideInputWithModifier:!1}),a=Bs(t,{target:NM});(0,H.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(M_),edges:l.filter(M_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,H.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function wM(e){let t=Ke();(0,H.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=gf(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",Cn.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 Rf={position:"absolute",width:"100%",height:"100%",top:0,left:0},AM=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function DM({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=Wo.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:x,onViewportChange:p,isControlledViewport:v,paneClickDistance:m,selectionOnDrag:g}){let S=Ke(),_=(0,H.useRef)(null),{userSelectionActive:E,lib:N,connectionInProgress:w}=Ce(AM,Ze),k=Bs(f),M=(0,H.useRef)();wM(_);let z=(0,H.useCallback)(U=>{p?.({x:U[0],y:U[1],zoom:U[2]}),v||S.setState({transform:U})},[p,v]);return(0,H.useEffect)(()=>{if(_.current){M.current=t_({domNode:_.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:D=>S.setState(O=>O.paneDragging===D?O:{paneDragging:D}),onPanZoomStart:(D,O)=>{let{onViewportChangeStart:R,onMoveStart:L}=S.getState();L?.(D,O),R?.(O)},onPanZoom:(D,O)=>{let{onViewportChange:R,onMove:L}=S.getState();L?.(D,O),R?.(O)},onPanZoomEnd:(D,O)=>{let{onViewportChangeEnd:R,onMoveEnd:L}=S.getState();L?.(D,O),R?.(O)}});let{x:U,y:T,zoom:A}=M.current.getViewport();return S.setState({panZoom:M.current,transform:[U,T,A],domNode:_.current.closest(".react-flow")}),()=>{M.current?.destroy()}}},[]),(0,H.useEffect)(()=>{M.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:k,preventScrolling:h,noPanClassName:x,userSelectionActive:E,noWheelClassName:b,lib:N,onTransformChange:z,connectionInProgress:w,selectionOnDrag:g,paneClickDistance:m})},[e,t,n,o,i,a,l,r,k,h,x,E,b,N,z,w,g,m]),(0,B.jsx)("div",{className:"react-flow__renderer",ref:_,style:Rf,children:y})}var MM=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function RM(){let{userSelectionActive:e,userSelectionRect:t}=Ce(MM,Ze);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 Th=(e,t)=>n=>{n.target===t.current&&e?.(n)},OM=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function zM({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Ea.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=Ke(),{userSelectionActive:x,elementsSelectable:p,dragging:v,connectionInProgress:m}=Ce(OM,Ze),g=p&&(e||x),S=(0,H.useRef)(null),_=(0,H.useRef)(),E=(0,H.useRef)(new Set),N=(0,H.useRef)(new Set),w=(0,H.useRef)(!1),k=R=>{if(w.current||m){w.current=!1;return}s?.(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},M=R=>{if(Array.isArray(o)&&o?.includes(2)){R.preventDefault();return}u?.(R)},z=c?R=>c(R):void 0,U=R=>{w.current&&(R.stopPropagation(),w.current=!1)},T=R=>{let{domNode:L}=b.getState();if(_.current=L?.getBoundingClientRect(),!_.current)return;let I=R.target===S.current;if(!I&&!!R.target.closest(".nokey")||!e||!(a&&I||t)||R.button!==0||!R.isPrimary)return;R.target?.setPointerCapture?.(R.pointerId),w.current=!1;let{x:q,y:j}=qn(R.nativeEvent,_.current);b.setState({userSelectionRect:{width:0,height:0,startX:q,startY:j,x:q,y:j}}),I||(R.stopPropagation(),R.preventDefault())},A=R=>{let{userSelectionRect:L,transform:I,nodeLookup:P,edgeLookup:V,connectionLookup:q,triggerNodeChanges:j,triggerEdgeChanges:Z,defaultEdgeOptions:re,resetSelectedElements:ne}=b.getState();if(!_.current||!L)return;let{x:X,y:F}=qn(R.nativeEvent,_.current),{startX:ge,startY:se}=L;if(!w.current){let Ae=t?0:i;if(Math.hypot(X-ge,F-se)<=Ae)return;ne(),l?.(R)}w.current=!0;let J={startX:ge,startY:se,x:X<ge?X:ge,y:F<se?F:se,width:Math.abs(X-ge),height:Math.abs(F-se)},ee=E.current,de=N.current;E.current=new Set(pf(P,J,I,n===Ea.Partial,!0).map(Ae=>Ae.id)),N.current=new Set;let be=re?.selectable??!0;for(let Ae of E.current){let Ie=q.get(Ae);if(Ie)for(let{edgeId:He}of Ie.values()){let ct=V.get(He);ct&&(ct.selectable??be)&&N.current.add(He)}}if(!fh(ee,E.current)){let Ae=Yl(P,E.current,!0);j(Ae)}if(!fh(de,N.current)){let Ae=Yl(V,N.current);Z(Ae)}b.setState({userSelectionRect:J,userSelectionActive:!0,nodesSelectionActive:!1})},D=R=>{R.button===0&&(R.target?.releasePointerCapture?.(R.pointerId),!x&&R.target===S.current&&b.getState().userSelectionRect&&k?.(R),b.setState({userSelectionActive:!1,userSelectionRect:null}),w.current&&(r?.(R),b.setState({nodesSelectionActive:E.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:Th(k,S),onContextMenu:Th(M,S),onWheel:Th(z,S),onPointerEnter:g?void 0:d,onPointerMove:g?A:f,onPointerUp:g?D:void 0,onPointerDownCapture:g?T:void 0,onClickCapture:g?U:void 0,onPointerLeave:h,ref:S,style:Rf,children:[y,(0,B.jsx)(RM,{})]})}function Ch({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",Cn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function F_({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=Ke(),[s,u]=(0,H.useState)(!1),c=(0,H.useRef)();return(0,H.useEffect)(()=>{c.current=jS({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{Ch({id:d,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,H.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 LM=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function W_(){let e=Ke();return(0,H.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=LM(l),h=i?a[0]:5,y=i?a[1]:5,b=n.direction.x*h*n.factor,x=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+x};i&&(v=Gl(v,a));let{position:m,positionAbsolute:g}=ah({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 Ah=(0,H.createContext)(null),BM=Ah.Provider;Ah.Consumer;var J_=()=>(0,H.useContext)(Ah),HM=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),kM=(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===Ui.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&u}};function PM({type:e="source",position:t=te.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",x=Ke(),p=J_(),{connectOnClick:v,noPanClassName:m,rfId:g}=Ce(HM,Ze),{connectingFrom:S,connectingTo:_,clickConnecting:E,isPossibleEndHandle:N,connectionInProcess:w,clickConnectionInProcess:k,valid:M}=Ce(kM(p,y,e),Ze);p||x.getState().onError?.("010",Cn.error010());let z=A=>{let{defaultEdgeOptions:D,onConnect:O,hasDefaultEdges:R}=x.getState(),L={...D,...A};if(R){let{edges:I,setEdges:P}=x.getState();P(gh(L,I))}O?.(L),r?.(L)},U=A=>{if(!p)return;let D=mh(A.nativeEvent);if(i&&(D&&A.button===0||!D)){let O=x.getState();Ef.onPointerDown(A.nativeEvent,{handleDomNode:A.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)=>x.getState().onConnectEnd?.(...R),updateConnection:O.updateConnection,onConnect:z,isValidConnection:n||((...R)=>x.getState().isValidConnection?.(...R)??!0),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}D?c?.(A):d?.(A)},T=A=>{let{onClickConnectStart:D,onClickConnectEnd:O,connectionClickStartHandle:R,connectionMode:L,isValidConnection:I,lib:P,rfId:V,nodeLookup:q,connection:j}=x.getState();if(!p||!R&&!i)return;if(!R){D?.(A.nativeEvent,{nodeId:p,handleId:y,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:p,type:e,id:y}});return}let Z=dh(A.target),re=n||I,{connection:ne,isValid:X}=Ef.isValid(A.nativeEvent,{handle:{nodeId:p,id:y,type:e},connectionMode:L,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:re,flowId:V,doc:Z,lib:P,nodeLookup:q});X&&ne&&z(ne);let F=structuredClone(j);delete F.inProgress,F.toPosition=F.toHandle?F.toHandle.position:null,O?.(A,F),x.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:E,connectingfrom:S,connectingto:_,valid:M,connectionindicator:o&&(!w||N)&&(w||k?a:i)}]),onMouseDown:U,onTouchStart:U,onClick:v?T:void 0,ref:h,...f,children:s})}var wa=(0,H.memo)(Q_(PM));function GM({data:e,isConnectable:t,sourcePosition:n=te.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[e?.label,(0,B.jsx)(wa,{type:"source",position:n,isConnectable:t})]})}function UM({data:e,isConnectable:t,targetPosition:n=te.Top,sourcePosition:o=te.Bottom}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(wa,{type:"target",position:n,isConnectable:t}),e?.label,(0,B.jsx)(wa,{type:"source",position:o,isConnectable:t})]})}function IM(){return null}function VM({data:e,isConnectable:t,targetPosition:n=te.Top}){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(wa,{type:"target",position:n,isConnectable:t}),e?.label]})}var Af={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},R_={input:GM,default:UM,output:VM,group:IM};function YM(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 XM=e=>{let{width:t,height:n,x:o,y:i}=kl(e.nodeLookup,{filter:a=>!!a.selected});return{width:Xn(t)?t:null,height:Xn(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 qM({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Ke(),{width:i,height:a,transformString:l,userSelectionActive:r}=Ce(XM,Ze),s=W_(),u=(0,H.useRef)(null);(0,H.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(F_({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(Af,h.key)&&(h.preventDefault(),s({direction:Af[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 O_=typeof window<"u"?window:void 0,ZM=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function eE({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:x,elementsSelectable:p,zoomOnScroll:v,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:S,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:N,defaultViewport:w,translateExtent:k,minZoom:M,maxZoom:z,preventScrolling:U,onSelectionContextMenu:T,noWheelClassName:A,noPanClassName:D,disableKeyboardA11y:O,onViewportChange:R,isControlledViewport:L}){let{nodesSelectionActive:I,userSelectionActive:P}=Ce(ZM,Ze),V=Bs(u,{target:O_}),q=Bs(b,{target:O_}),j=q||N,Z=q||g,re=c&&j!==!0,ne=V||P||re;return CM({deleteKeyCode:s,multiSelectionKeyCode:y}),(0,B.jsx)(DM,{onPaneContextMenu:a,elementsSelectable:p,zoomOnScroll:v,zoomOnPinch:m,panOnScroll:Z,panOnScrollSpeed:S,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!V&&j,defaultViewport:w,translateExtent:k,minZoom:M,maxZoom:z,zoomActivationKeyCode:x,preventScrolling:U,noWheelClassName:A,noPanClassName:D,onViewportChange:R,isControlledViewport:L,paneClickDistance:r,selectionOnDrag:re,children:(0,B.jsxs)(zM,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:j,isSelecting:!!ne,selectionMode:d,selectionKeyPressed:V,paneClickDistance:r,selectionOnDrag:re,children:[e,I&&(0,B.jsx)(qM,{onSelectionContextMenu:T,noPanClassName:D,disableKeyboardA11y:O})]})})}eE.displayName="FlowRenderer";var jM=(0,H.memo)(eE),$M=e=>t=>e?pf(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 QM(e){return Ce((0,H.useCallback)($M(e),[e]),Ze)}var KM=e=>e.updateNodeInternals;function FM(){let e=Ce(KM),[t]=(0,H.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,H.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function WM({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Ke(),a=(0,H.useRef)(null),l=(0,H.useRef)(null),r=(0,H.useRef)(e.sourcePosition),s=(0,H.useRef)(e.targetPosition),u=(0,H.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,H.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,H.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,H.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 JM({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:x,nodeClickDistance:p,onError:v}){let{node:m,internals:g,isParent:S}=Ce(X=>{let F=X.nodeLookup.get(e),ge=X.parentLookup.has(e);return{node:F,internals:F.internals,isParent:ge}},Ze),_=m.type||"default",E=x?.[_]||R_[_];E===void 0&&(v?.("003",Cn.error003(_)),_="default",E=x?.default||R_.default);let N=!!(m.draggable||r&&typeof m.draggable>"u"),w=!!(m.selectable||s&&typeof m.selectable>"u"),k=!!(m.connectable||u&&typeof m.connectable>"u"),M=!!(m.focusable||c&&typeof m.focusable>"u"),z=Ke(),U=uh(m),T=WM({node:m,nodeType:_,hasDimensions:U,resizeObserver:d}),A=F_({nodeRef:T,disabled:m.hidden||!N,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:w,nodeClickDistance:p}),D=W_();if(m.hidden)return null;let O=So(m),R=YM(m),L=w||N||t||n||o||i,I=n?X=>n(X,{...g.userNode}):void 0,P=o?X=>o(X,{...g.userNode}):void 0,V=i?X=>i(X,{...g.userNode}):void 0,q=a?X=>a(X,{...g.userNode}):void 0,j=l?X=>l(X,{...g.userNode}):void 0,Z=X=>{let{selectNodesOnDrag:F,nodeDragThreshold:ge}=z.getState();w&&(!F||!N||ge>0)&&Ch({id:e,store:z,nodeRef:T}),t&&t(X,{...g.userNode})},re=X=>{if(!(ph(X.nativeEvent)||y)){if(Wm.includes(X.key)&&w){let F=X.key==="Escape";Ch({id:e,store:z,unselect:F,nodeRef:T})}else if(N&&m.selected&&Object.prototype.hasOwnProperty.call(Af,X.key)){X.preventDefault();let{ariaLabelConfig:F}=z.getState();z.setState({ariaLiveMessage:F["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~g.positionAbsolute.x,y:~~g.positionAbsolute.y})}),D({direction:Af[X.key],factor:X.shiftKey?4:1})}}},ne=()=>{if(y||!T.current?.matches(":focus-visible"))return;let{transform:X,width:F,height:ge,autoPanOnNodeFocus:se,setCenter:J}=z.getState();if(!se)return;pf(new Map([[e,m]]),{x:0,y:0,width:F,height:ge},X,!0).length>0||J(m.position.x+O.width/2,m.position.y+O.height/2,{zoom:X[2]})};return(0,B.jsx)("div",{className:tt(["react-flow__node",`react-flow__node-${_}`,{[h]:N},m.className,{selected:m.selected,selectable:w,parent:S,draggable:N,dragging:A}]),ref:T,style:{zIndex:g.z,transform:`translate(${g.positionAbsolute.x}px,${g.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:U?"visible":"hidden",...m.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:I,onMouseMove:P,onMouseLeave:V,onContextMenu:q,onClick:Z,onDoubleClick:j,onKeyDown:M?re:void 0,tabIndex:M?0:void 0,onFocus:M?ne:void 0,role:m.ariaRole??(M?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${Y_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,B.jsx)(BM,{value:e,children:(0,B.jsx)(E,{id:e,data:m.data,type:_,positionAbsoluteX:g.positionAbsolute.x,positionAbsoluteY:g.positionAbsolute.y,selected:m.selected??!1,selectable:w,draggable:N,deletable:m.deletable??!0,isConnectable:k,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:A,dragHandle:m.dragHandle,zIndex:g.z,parentId:m.parentId,...O})})})}var eR=(0,H.memo)(JM),tR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function tE(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=Ce(tR,Ze),l=QM(e.onlyRenderVisibleElements),r=FM();return(0,B.jsx)("div",{className:"react-flow__nodes",style:Rf,children:l.map(s=>(0,B.jsx)(eR,{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))})}tE.displayName="NodeRenderer";var nR=(0,H.memo)(tE);function oR(e){return Ce((0,H.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&&PS({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),Ze)}var iR=({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"})},aR=({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"})},z_={[zl.Arrow]:iR,[zl.ArrowClosed]:aR};function lR(e){let t=Ke();return(0,H.useMemo)(()=>Object.prototype.hasOwnProperty.call(z_,e)?z_[e]:(t.getState().onError?.("009",Cn.error009(e)),null),[e])}var rR=({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=lR(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},nE=({defaultColor:e,rfId:t})=>{let n=Ce(a=>a.edges),o=Ce(a=>a.defaultEdgeOptions),i=(0,H.useMemo)(()=>US(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)(rR,{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};nE.displayName="MarkerDefinitions";var sR=(0,H.memo)(nE);function oE({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,H.useState)({x:1,y:0,width:0,height:0}),h=tt(["react-flow__edge-textwrapper",u]),y=(0,H.useRef)(null);return(0,H.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}oE.displayName="EdgeText";var uR=(0,H.memo)(oE);function Of({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&&Xn(t)&&Xn(n)?(0,B.jsx)(uR,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s}):null]})}function L_({pos:e,x1:t,y1:n,x2:o,y2:i}){return e===te.Left||e===te.Right?[.5*(t+o),n]:[t,.5*(n+i)]}function iE({sourceX:e,sourceY:t,sourcePosition:n=te.Bottom,targetX:o,targetY:i,targetPosition:a=te.Top}){let[l,r]=L_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=L_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=yf({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 aE(e){return(0,H.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:x,interactionWidth:p})=>{let[v,m,g]=iE({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),S=e.isInternal?void 0:t;return(0,B.jsx)(Of,{id:S,path:v,labelX:m,labelY:g,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:x,interactionWidth:p})})}var cR=aE({isInternal:!1}),lE=aE({isInternal:!0});cR.displayName="SimpleBezierEdge";lE.displayName="SimpleBezierEdgeInternal";function rE(e){return(0,H.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=te.Bottom,targetPosition:y=te.Top,markerEnd:b,markerStart:x,pathOptions:p,interactionWidth:v})=>{let[m,g,S]=Ls({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)(Of,{id:_,path:m,labelX:g,labelY:S,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:b,markerStart:x,interactionWidth:v})})}var sE=rE({isInternal:!1}),uE=rE({isInternal:!0});sE.displayName="SmoothStepEdge";uE.displayName="SmoothStepEdgeInternal";function cE(e){return(0,H.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,B.jsx)(sE,{...n,id:o,pathOptions:(0,H.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var fR=cE({isInternal:!1}),fE=cE({isInternal:!0});fR.displayName="StepEdge";fE.displayName="StepEdgeInternal";function dE(e){return(0,H.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[x,p,v]=bf({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,B.jsx)(Of,{id:m,path:x,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 dR=dE({isInternal:!1}),pE=dE({isInternal:!0});dR.displayName="StraightEdge";pE.displayName="StraightEdgeInternal";function mE(e){return(0,H.memo)(({id:t,sourceX:n,sourceY:o,targetX:i,targetY:a,sourcePosition:l=te.Bottom,targetPosition:r=te.Top,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:x,pathOptions:p,interactionWidth:v})=>{let[m,g,S]=vf({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:p?.curvature}),_=e.isInternal?void 0:t;return(0,B.jsx)(Of,{id:_,path:m,labelX:g,labelY:S,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:y,markerEnd:b,markerStart:x,interactionWidth:v})})}var pR=mE({isInternal:!1}),hE=mE({isInternal:!0});pR.displayName="BezierEdge";hE.displayName="BezierEdgeInternal";var B_={default:hE,straight:pE,step:fE,smoothstep:uE,simplebezier:lE},H_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},mR=(e,t,n)=>n===te.Left?e-t:n===te.Right?e+t:e,hR=(e,t,n)=>n===te.Top?e-t:n===te.Bottom?e+t:e,k_="react-flow__edgeupdater";function P_({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([k_,`${k_}-${r}`]),cx:mR(t,o,e),cy:hR(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function gR({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=Ke(),b=(g,S)=>{if(g.button!==0)return;let{autoPanOnConnect:_,domNode:E,connectionMode:N,connectionRadius:w,lib:k,onConnectStart:M,cancelConnection:z,nodeLookup:U,rfId:T,panBy:A,updateConnection:D}=y.getState(),O=S.type==="target",R=(P,V)=>{f(!1),d?.(P,n,S.type,V)},L=P=>u?.(n,P),I=(P,V)=>{f(!0),c?.(g,n,S.type),M?.(P,V)};Ef.onPointerDown(g.nativeEvent,{autoPanOnConnect:_,connectionMode:N,connectionRadius:w,domNode:E,handleId:S.id,nodeId:S.nodeId,nodeLookup:U,isTarget:O,edgeUpdaterType:S.type,lib:k,flowId:T,cancelConnection:z,panBy:A,isValidConnection:(...P)=>y.getState().isValidConnection?.(...P)??!0,onConnect:L,onConnectStart:I,onConnectEnd:(...P)=>y.getState().onConnectEnd?.(...P),onReconnectEnd:R,updateConnection:D,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:g.currentTarget})},x=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)(P_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:x,onMouseEnter:v,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,B.jsx)(P_,{position:s,centerX:a,centerY:l,radius:t,onMouseDown:p,onMouseEnter:v,onMouseOut:m,type:"target"})]})}function yR({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:x,onError:p,disableKeyboardA11y:v}){let m=Ce(J=>J.edgeLookup.get(e)),g=Ce(J=>J.defaultEdgeOptions);m=g?{...g,...m}:m;let S=m.type||"default",_=b?.[S]||B_[S];_===void 0&&(p?.("011",Cn.error011(S)),S="default",_=b?.default||B_.default);let E=!!(m.focusable||t&&typeof m.focusable>"u"),N=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),w=!!(m.selectable||o&&typeof m.selectable>"u"),k=(0,H.useRef)(null),[M,z]=(0,H.useState)(!1),[U,T]=(0,H.useState)(!1),A=Ke(),{zIndex:D,sourceX:O,sourceY:R,targetX:L,targetY:I,sourcePosition:P,targetPosition:V}=Ce((0,H.useCallback)(J=>{let ee=J.nodeLookup.get(m.source),de=J.nodeLookup.get(m.target);if(!ee||!de)return{zIndex:m.zIndex,...H_};let be=GS({id:e,sourceNode:ee,targetNode:de,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:J.connectionMode,onError:p});return{zIndex:kS({selected:m.selected,zIndex:m.zIndex,sourceNode:ee,targetNode:de,elevateOnSelect:J.elevateEdgesOnSelect,zIndexMode:J.zIndexMode}),...be||H_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),Ze),q=(0,H.useMemo)(()=>m.markerStart?`url('#${xf(m.markerStart,y)}')`:void 0,[m.markerStart,y]),j=(0,H.useMemo)(()=>m.markerEnd?`url('#${xf(m.markerEnd,y)}')`:void 0,[m.markerEnd,y]);if(m.hidden||O===null||R===null||L===null||I===null)return null;let Z=J=>{let{addSelectedEdges:ee,unselectNodesAndEdges:de,multiSelectionActive:be}=A.getState();w&&(A.setState({nodesSelectionActive:!1}),m.selected&&be?(de({nodes:[],edges:[m]}),k.current?.blur()):ee([e])),i&&i(J,m)},re=a?J=>{a(J,{...m})}:void 0,ne=l?J=>{l(J,{...m})}:void 0,X=r?J=>{r(J,{...m})}:void 0,F=s?J=>{s(J,{...m})}:void 0,ge=u?J=>{u(J,{...m})}:void 0,se=J=>{if(!v&&Wm.includes(J.key)&&w){let{unselectNodesAndEdges:ee,addSelectedEdges:de}=A.getState();J.key==="Escape"?(k.current?.blur(),ee({edges:[m]})):de([e])}};return(0,B.jsx)("svg",{style:{zIndex:D},children:(0,B.jsxs)("g",{className:tt(["react-flow__edge",`react-flow__edge-${S}`,m.className,x,{selected:m.selected,animated:m.animated,inactive:!w&&!i,updating:M,selectable:w}]),onClick:Z,onDoubleClick:re,onContextMenu:ne,onMouseEnter:X,onMouseMove:F,onMouseLeave:ge,onKeyDown:E?se:void 0,tabIndex:E?0:void 0,role:m.ariaRole??(E?"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":E?`${X_}-${y}`:void 0,ref:k,...m.domAttributes,children:[!U&&(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:L,targetY:I,sourcePosition:P,targetPosition:V,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:q,markerEnd:j,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),N&&(0,B.jsx)(gR,{edge:m,isReconnectable:N,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:R,targetX:L,targetY:I,sourcePosition:P,targetPosition:V,setUpdateHover:z,setReconnecting:T})]})})}var vR=(0,H.memo)(yR),bR=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function gE({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:x,edgesReconnectable:p,elementsSelectable:v,onError:m}=Ce(bR,Ze),g=oR(t);return(0,B.jsxs)("div",{className:"react-flow__edges",children:[(0,B.jsx)(sR,{defaultColor:e,rfId:n}),g.map(S=>(0,B.jsx)(vR,{id:S,edgesFocusable:x,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},S))]})}gE.displayName="EdgeRenderer";var xR=(0,H.memo)(gE),SR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function _R({children:e}){let t=Ce(SR);return(0,B.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function ER(e){let t=wh(),n=(0,H.useRef)(!1);(0,H.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var TR=e=>e.panZoom?.syncViewport;function NR(e){let t=Ce(TR),n=Ke();return(0,H.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function G_(e){return e.connection.inProgress?{...e.connection,to:Ul(e.connection.to,e.transform)}:{...e.connection}}function CR(e){return e?n=>{let o=G_(n);return e(o)}:G_}function wR(e){let t=CR(e);return Ce(t,Ze)}var AR=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function DR({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:s}=Ce(AR,Ze);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",th(r)]),children:(0,B.jsx)(yE,{style:t,type:n,CustomComponent:o,isValid:r})})})}var yE=({style:e,type:t=xo.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}=wR();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:th(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 xo.Bezier:[y]=vf(b);break;case xo.SimpleBezier:[y]=iE(b);break;case xo.Step:[y]=Ls({...b,borderRadius:0});break;case xo.SmoothStep:[y]=Ls(b);break;default:[y]=bf(b)}return(0,B.jsx)("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};yE.displayName="ConnectionLine";var MR={};function U_(e=MR){let t=(0,H.useRef)(e),n=Ke();(0,H.useEffect)(()=>{},[e])}function RR(){let e=Ke(),t=(0,H.useRef)(!1);(0,H.useEffect)(()=>{},[])}function vE({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:x,connectionLineContainerStyle:p,selectionKeyCode:v,selectionOnDrag:m,selectionMode:g,multiSelectionKeyCode:S,panActivationKeyCode:_,zoomActivationKeyCode:E,deleteKeyCode:N,onlyRenderVisibleElements:w,elementsSelectable:k,defaultViewport:M,translateExtent:z,minZoom:U,maxZoom:T,preventScrolling:A,defaultMarkerColor:D,zoomOnScroll:O,zoomOnPinch:R,panOnScroll:L,panOnScrollSpeed:I,panOnScrollMode:P,zoomOnDoubleClick:V,panOnDrag:q,onPaneClick:j,onPaneMouseEnter:Z,onPaneMouseMove:re,onPaneMouseLeave:ne,onPaneScroll:X,onPaneContextMenu:F,paneClickDistance:ge,nodeClickDistance:se,onEdgeContextMenu:J,onEdgeMouseEnter:ee,onEdgeMouseMove:de,onEdgeMouseLeave:be,reconnectRadius:Ae,onReconnect:Ie,onReconnectStart:He,onReconnectEnd:ct,noDragClassName:ft,noWheelClassName:Mn,noPanClassName:fn,disableKeyboardA11y:Gt,nodeExtent:jn,rfId:Ft,viewport:vt,onViewportChange:dt}){return U_(e),U_(t),RR(),ER(n),NR(vt),(0,B.jsx)(jM,{onPaneClick:j,onPaneMouseEnter:Z,onPaneMouseMove:re,onPaneMouseLeave:ne,onPaneContextMenu:F,onPaneScroll:X,paneClickDistance:ge,deleteKeyCode:N,selectionKeyCode:v,selectionOnDrag:m,selectionMode:g,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:S,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:k,zoomOnScroll:O,zoomOnPinch:R,zoomOnDoubleClick:V,panOnScroll:L,panOnScrollSpeed:I,panOnScrollMode:P,panOnDrag:q,defaultViewport:M,translateExtent:z,minZoom:U,maxZoom:T,onSelectionContextMenu:d,preventScrolling:A,noDragClassName:ft,noWheelClassName:Mn,noPanClassName:fn,disableKeyboardA11y:Gt,onViewportChange:dt,isControlledViewport:!!vt,children:(0,B.jsxs)(_R,{children:[(0,B.jsx)(xR,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Ie,onReconnectStart:He,onReconnectEnd:ct,onlyRenderVisibleElements:w,onEdgeContextMenu:J,onEdgeMouseEnter:ee,onEdgeMouseMove:de,onEdgeMouseLeave:be,reconnectRadius:Ae,defaultMarkerColor:D,noPanClassName:fn,disableKeyboardA11y:Gt,rfId:Ft}),(0,B.jsx)(DR,{style:b,type:y,component:x,containerStyle:p}),(0,B.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,B.jsx)(nR,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:se,onlyRenderVisibleElements:w,noPanClassName:fn,noDragClassName:ft,disableKeyboardA11y:Gt,nodeExtent:jn,rfId:Ft}),(0,B.jsx)("div",{className:"react-flow__viewport-portal"})]})})}vE.displayName="GraphView";var OR=(0,H.memo)(vE),I_=({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,x=new Map,p=o??t??[],v=n??e??[],m=c??[0,0],g=d??Hl;Sh(b,x,p);let S=Sf(v,h,y,{nodeOrigin:m,nodeExtent:g,zIndexMode:f}),_=[0,0,1];if(l&&i&&a){let E=kl(h,{filter:M=>!!((M.width||M.initialWidth)&&(M.height||M.initialHeight))}),{x:N,y:w,zoom:k}=zs(E,i,a,s,u,r?.padding??.1);_=[N,w,k]}return{rfId:"1",width:i??0,height:a??0,transform:_,nodes:v,nodesInitialized:S,nodeLookup:h,parentLookup:y,edges:p,edgeLookup:x,connectionLookup:b,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:s,maxZoom:u,translateExtent:Hl,nodeExtent:g,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Ui.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:{...eh},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:sh,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Jm,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},zR=({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})=>v_((h,y)=>{async function b(){let{nodeLookup:x,panZoom:p,fitViewOptions:v,fitViewResolver:m,width:g,height:S,minZoom:_,maxZoom:E}=y();p&&(await RS({nodes:x,width:g,height:S,panZoom:p,minZoom:_,maxZoom:E},v),m?.resolve(!0),h({fitViewResolver:null}))}return{...I_({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:x=>{let{nodeLookup:p,parentLookup:v,nodeOrigin:m,elevateNodesOnSelect:g,fitViewQueued:S,zIndexMode:_}=y(),E=Sf(x,p,v,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:g,checkEquality:!0,zIndexMode:_});S&&E?(b(),h({nodes:x,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:x,nodesInitialized:E})},setEdges:x=>{let{connectionLookup:p,edgeLookup:v}=y();Sh(p,v,x),h({edges:x})},setDefaultNodesAndEdges:(x,p)=>{if(x){let{setNodes:v}=y();v(x),h({hasDefaultNodes:!0})}if(p){let{setEdges:v}=y();v(p),h({hasDefaultEdges:!0})}},updateNodeInternals:x=>{let{triggerNodeChanges:p,nodeLookup:v,parentLookup:m,domNode:g,nodeOrigin:S,nodeExtent:_,debug:E,fitViewQueued:N,zIndexMode:w}=y(),{changes:k,updatedInternals:M}=XS(x,v,m,g,S,_,w);M&&(VS(v,m,{nodeOrigin:S,nodeExtent:_,zIndexMode:w}),N?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),k?.length>0&&(E&&console.log("React Flow: trigger node changes",k),p?.(k)))},updateNodePositions:(x,p=!1)=>{let v=[],m=[],{nodeLookup:g,triggerNodeChanges:S,connection:_,updateConnection:E,onNodesChangeMiddlewareMap:N}=y();for(let[w,k]of x){let M=g.get(w),z=!!(M?.expandParent&&M?.parentId&&k?.position),U={id:w,type:"position",position:z?{x:Math.max(0,k.position.x),y:Math.max(0,k.position.y)}:k.position,dragging:p};if(M&&_.inProgress&&_.fromNode.id===M.id){let T=Ii(M,_.fromHandle,te.Left,!0);E({..._,from:T})}z&&M.parentId&&v.push({id:w,parentId:M.parentId,rect:{...k.internals.positionAbsolute,width:k.measured.width??0,height:k.measured.height??0}}),m.push(U)}if(v.length>0){let{parentLookup:w,nodeOrigin:k}=y(),M=_f(v,g,w,k);m.push(...M)}for(let w of N.values())m=w(m);S(m)},triggerNodeChanges:x=>{let{onNodesChange:p,setNodes:v,nodes:m,hasDefaultNodes:g,debug:S}=y();if(x?.length){if(g){let _=j_(x,m);v(_)}S&&console.log("React Flow: trigger node changes",x),p?.(x)}},triggerEdgeChanges:x=>{let{onEdgesChange:p,setEdges:v,edges:m,hasDefaultEdges:g,debug:S}=y();if(x?.length){if(g){let _=$_(x,m);v(_)}S&&console.log("React Flow: trigger edge changes",x),p?.(x)}},addSelectedNodes:x=>{let{multiSelectionActive:p,edgeLookup:v,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:S}=y();if(p){let _=x.map(E=>Ca(E,!0));g(_);return}g(Yl(m,new Set([...x]),!0)),S(Yl(v))},addSelectedEdges:x=>{let{multiSelectionActive:p,edgeLookup:v,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:S}=y();if(p){let _=x.map(E=>Ca(E,!0));S(_);return}S(Yl(v,new Set([...x]))),g(Yl(m,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:p}={})=>{let{edges:v,nodes:m,nodeLookup:g,triggerNodeChanges:S,triggerEdgeChanges:_}=y(),E=x||m,N=p||v,w=[];for(let M of E){if(!M.selected)continue;let z=g.get(M.id);z&&(z.selected=!1),w.push(Ca(M.id,!1))}let k=[];for(let M of N)M.selected&&k.push(Ca(M.id,!1));S(w),_(k)},setMinZoom:x=>{let{panZoom:p,maxZoom:v}=y();p?.setScaleExtent([x,v]),h({minZoom:x})},setMaxZoom:x=>{let{panZoom:p,minZoom:v}=y();p?.setScaleExtent([v,x]),h({maxZoom:x})},setTranslateExtent:x=>{y().panZoom?.setTranslateExtent(x),h({translateExtent:x})},resetSelectedElements:()=>{let{edges:x,nodes:p,triggerNodeChanges:v,triggerEdgeChanges:m,elementsSelectable:g}=y();if(!g)return;let S=p.reduce((E,N)=>N.selected?[...E,Ca(N.id,!1)]:E,[]),_=x.reduce((E,N)=>N.selected?[...E,Ca(N.id,!1)]:E,[]);v(S),m(_)},setNodeExtent:x=>{let{nodes:p,nodeLookup:v,parentLookup:m,nodeOrigin:g,elevateNodesOnSelect:S,nodeExtent:_,zIndexMode:E}=y();x[0][0]===_[0][0]&&x[0][1]===_[0][1]&&x[1][0]===_[1][0]&&x[1][1]===_[1][1]||(Sf(p,v,m,{nodeOrigin:g,nodeExtent:x,elevateNodesOnSelect:S,checkEquality:!1,zIndexMode:E}),h({nodeExtent:x}))},panBy:x=>{let{transform:p,width:v,height:m,panZoom:g,translateExtent:S}=y();return qS({delta:x,panZoom:g,transform:p,translateExtent:S,width:v,height:m})},setCenter:async(x,p,v)=>{let{width:m,height:g,maxZoom:S,panZoom:_}=y();if(!_)return Promise.resolve(!1);let E=typeof v?.zoom<"u"?v.zoom:S;return await _.setViewport({x:m/2-x*E,y:g/2-p*E,zoom:E},{duration:v?.duration,ease:v?.ease,interpolate:v?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...eh}})},updateConnection:x=>{h({connection:x})},reset:()=>h({...I_()})}},Object.is);function LR({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,H.useState)(()=>zR({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)(JD,{value:y,children:(0,B.jsx)(_M,{children:h})})}function BR({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,H.useContext)(Df)?(0,B.jsx)(B.Fragment,{children:e}):(0,B.jsx)(LR,{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 kR({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:x,onClickConnectEnd:p,onNodeMouseEnter:v,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:S,onNodeDoubleClick:_,onNodeDragStart:E,onNodeDrag:N,onNodeDragStop:w,onNodesDelete:k,onEdgesDelete:M,onDelete:z,onSelectionChange:U,onSelectionDragStart:T,onSelectionDrag:A,onSelectionDragStop:D,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:I,connectionMode:P,connectionLineType:V=xo.Bezier,connectionLineStyle:q,connectionLineComponent:j,connectionLineContainerStyle:Z,deleteKeyCode:re="Backspace",selectionKeyCode:ne="Shift",selectionOnDrag:X=!1,selectionMode:F=Ea.Full,panActivationKeyCode:ge="Space",multiSelectionKeyCode:se=Il()?"Meta":"Control",zoomActivationKeyCode:J=Il()?"Meta":"Control",snapToGrid:ee,snapGrid:de,onlyRenderVisibleElements:be=!1,selectNodesOnDrag:Ae,nodesDraggable:Ie,autoPanOnNodeFocus:He,nodesConnectable:ct,nodesFocusable:ft,nodeOrigin:Mn=q_,edgesFocusable:fn,edgesReconnectable:Gt,elementsSelectable:jn=!0,defaultViewport:Ft=dM,minZoom:vt=.5,maxZoom:dt=2,translateExtent:dn=Hl,preventScrolling:ao=!0,nodeExtent:No,defaultMarkerColor:Rn="#b1b1b7",zoomOnScroll:Xi=!0,zoomOnPinch:On=!0,panOnScroll:lo=!1,panOnScrollSpeed:bt=.5,panOnScrollMode:ro=Wo.Free,zoomOnDoubleClick:qi=!0,panOnDrag:oi=!0,onPaneClick:Fl,onPaneMouseEnter:Co,onPaneMouseMove:wo,onPaneMouseLeave:Zs,onPaneScroll:pn,onPaneContextMenu:ii,paneClickDistance:ye=1,nodeClickDistance:Q=0,children:ie,onReconnect:Ne,onReconnectStart:we,onReconnectEnd:je,onEdgeContextMenu:Nt,onEdgeDoubleClick:$n,onEdgeMouseEnter:so,onEdgeMouseMove:zt,onEdgeMouseLeave:Lt,reconnectRadius:js=10,onNodesChange:$s,onEdgesChange:Wl,noDragClassName:Jl="nodrag",noWheelClassName:Qn="nowheel",noPanClassName:er="nopan",fitView:tr,fitViewOptions:nr,connectOnClick:Qs,attributionPosition:Ks,proOptions:ae,defaultEdgeOptions:C,elevateNodesOnSelect:Y=!0,elevateEdgesOnSelect:W=!1,disableKeyboardA11y:ke=!1,autoPanOnConnect:xt,autoPanOnNodeDrag:We,autoPanSpeed:Bt,connectionRadius:Ut,isValidConnection:uo,onError:or,style:pt,id:ir,nodeDragThreshold:Fs,connectionDragThreshold:TT,viewport:NT,onViewportChange:CT,width:wT,height:AT,colorMode:DT="light",debug:MT,onScroll:bg,ariaLabelConfig:RT,zIndexMode:xg="basic",...OT},zT){let Zf=ir||"1",LT=gM(DT),BT=(0,H.useCallback)(Sg=>{Sg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),bg?.(Sg)},[bg]);return(0,B.jsx)("div",{"data-testid":"rf__wrapper",...OT,onScroll:BT,style:{...pt,...HR},ref:zT,className:tt(["react-flow",i,LT]),id:ir,role:"application",children:(0,B.jsxs)(BR,{nodes:e,edges:t,width:wT,height:AT,fitView:tr,fitViewOptions:nr,minZoom:vt,maxZoom:dt,nodeOrigin:Mn,nodeExtent:No,zIndexMode:xg,children:[(0,B.jsx)(OR,{onInit:u,onNodeClick:r,onEdgeClick:s,onNodeMouseEnter:v,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:S,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:V,connectionLineStyle:q,connectionLineComponent:j,connectionLineContainerStyle:Z,selectionKeyCode:ne,selectionOnDrag:X,selectionMode:F,deleteKeyCode:re,multiSelectionKeyCode:se,panActivationKeyCode:ge,zoomActivationKeyCode:J,onlyRenderVisibleElements:be,defaultViewport:Ft,translateExtent:dn,minZoom:vt,maxZoom:dt,preventScrolling:ao,zoomOnScroll:Xi,zoomOnPinch:On,zoomOnDoubleClick:qi,panOnScroll:lo,panOnScrollSpeed:bt,panOnScrollMode:ro,panOnDrag:oi,onPaneClick:Fl,onPaneMouseEnter:Co,onPaneMouseMove:wo,onPaneMouseLeave:Zs,onPaneScroll:pn,onPaneContextMenu:ii,paneClickDistance:ye,nodeClickDistance:Q,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onReconnect:Ne,onReconnectStart:we,onReconnectEnd:je,onEdgeContextMenu:Nt,onEdgeDoubleClick:$n,onEdgeMouseEnter:so,onEdgeMouseMove:zt,onEdgeMouseLeave:Lt,reconnectRadius:js,defaultMarkerColor:Rn,noDragClassName:Jl,noWheelClassName:Qn,noPanClassName:er,rfId:Zf,disableKeyboardA11y:ke,nodeExtent:No,viewport:NT,onViewportChange:CT}),(0,B.jsx)(hM,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:y,onConnectEnd:b,onClickConnectStart:x,onClickConnectEnd:p,nodesDraggable:Ie,autoPanOnNodeFocus:He,nodesConnectable:ct,nodesFocusable:ft,edgesFocusable:fn,edgesReconnectable:Gt,elementsSelectable:jn,elevateNodesOnSelect:Y,elevateEdgesOnSelect:W,minZoom:vt,maxZoom:dt,nodeExtent:No,onNodesChange:$s,onEdgesChange:Wl,snapToGrid:ee,snapGrid:de,connectionMode:P,translateExtent:dn,connectOnClick:Qs,defaultEdgeOptions:C,fitView:tr,fitViewOptions:nr,onNodesDelete:k,onEdgesDelete:M,onDelete:z,onNodeDragStart:E,onNodeDrag:N,onNodeDragStop:w,onSelectionDrag:A,onSelectionDragStart:T,onSelectionDragStop:D,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:er,nodeOrigin:Mn,rfId:Zf,autoPanOnConnect:xt,autoPanOnNodeDrag:We,autoPanSpeed:Bt,onError:or,connectionRadius:Ut,isValidConnection:uo,selectNodesOnDrag:Ae,nodeDragThreshold:Fs,connectionDragThreshold:TT,onBeforeDelete:I,debug:MT,ariaLabelConfig:RT,zIndexMode:xg}),(0,B.jsx)(fM,{onSelectionChange:U}),ie,(0,B.jsx)(lM,{proOptions:ae,position:Ks}),(0,B.jsx)(aM,{rfId:Zf,disableKeyboardA11y:ke})]})})}var bE=Q_(kR);function xE(e){let[t,n]=(0,H.useState)(e),o=(0,H.useCallback)(i=>n(a=>j_(i,a)),[]);return[t,n,o]}function SE(e){let[t,n]=(0,H.useState)(e),o=(0,H.useCallback)(i=>n(a=>$_(i,a)),[]);return[t,n,o]}var HB=Cn.error014();function PR({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 GR({radius:e,className:t}){return(0,B.jsx)("circle",{cx:e,cy:e,r:e,className:tt(["react-flow__background-pattern","dots",t])})}var _o;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(_o||(_o={}));var UR={[_o.Dots]:1,[_o.Lines]:1,[_o.Cross]:6},IR=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function _E({id:e,variant:t=_o.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,H.useRef)(null),{transform:f,patternId:h}=Ce(IR,Ze),y=o||UR[t],b=t===_o.Dots,x=t===_o.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],S=x?[m,m]:v,_=[g[0]*f[2]||1+S[0]/2,g[1]*f[2]||1+S[1]/2],E=`${h}${e||""}`;return(0,B.jsxs)("svg",{className:tt(["react-flow__background",u]),style:{...s,...Rf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,B.jsx)("pattern",{id:E,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)(GR,{radius:m/2,className:c}):(0,B.jsx)(PR,{dimensions:S,lineWidth:i,variant:t,className:c})}),(0,B.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}_E.displayName="Background";var EE=(0,H.memo)(_E);function VR(){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 YR(){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 XR(){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 qR(){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 ZR(){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 wf({children:e,className:t,...n}){return(0,B.jsx)("button",{type:"button",className:tt(["react-flow__controls-button",t]),...n,children:e})}var jR=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function TE({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=Ke(),{isInteractive:b,minZoomReached:x,maxZoomReached:p,ariaLabelConfig:v}=Ce(jR,Ze),{zoomIn:m,zoomOut:g,fitView:S}=wh(),_=()=>{m(),a?.()},E=()=>{g(),l?.()},N=()=>{S(i),r?.()},w=()=>{y.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,B.jsxs)(Mf,{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)(wf,{onClick:_,className:"react-flow__controls-zoomin",title:v["controls.zoomIn.ariaLabel"],"aria-label":v["controls.zoomIn.ariaLabel"],disabled:p,children:(0,B.jsx)(VR,{})}),(0,B.jsx)(wf,{onClick:E,className:"react-flow__controls-zoomout",title:v["controls.zoomOut.ariaLabel"],"aria-label":v["controls.zoomOut.ariaLabel"],disabled:x,children:(0,B.jsx)(YR,{})})]}),n&&(0,B.jsx)(wf,{className:"react-flow__controls-fitview",onClick:N,title:v["controls.fitView.ariaLabel"],"aria-label":v["controls.fitView.ariaLabel"],children:(0,B.jsx)(XR,{})}),o&&(0,B.jsx)(wf,{className:"react-flow__controls-interactive",onClick:w,title:v["controls.interactive.ariaLabel"],"aria-label":v["controls.interactive.ariaLabel"],children:b?(0,B.jsx)(ZR,{}):(0,B.jsx)(qR,{})}),c]})}TE.displayName="Controls";var kB=(0,H.memo)(TE);function $R({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||{},x=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:x,stroke:r,strokeWidth:s},shapeRendering:d,onClick:h?p=>h(p,e):void 0})}var QR=(0,H.memo)($R),KR=e=>e.nodes.map(t=>t.id),Nh=e=>e instanceof Function?e:()=>e;function FR({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=QR,onClick:l}){let r=Ce(KR,Ze),s=Nh(t),u=Nh(e),c=Nh(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,B.jsx)(B.Fragment,{children:r.map(f=>(0,B.jsx)(JR,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function WR({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}=Ce(y=>{let b=y.nodeLookup.get(e);if(!b)return{node:void 0,x:0,y:0,width:0,height:0};let x=b.internals.userNode,{x:p,y:v}=b.internals.positionAbsolute,{width:m,height:g}=So(x);return{node:x,x:p,y:v,width:m,height:g}},Ze);return!u||u.hidden||!uh(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 JR=(0,H.memo)(WR),eO=(0,H.memo)(FR),tO=200,nO=150,oO=e=>!e.hidden,iO=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?lh(kl(e.nodeLookup,{filter:oO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},aO="react-flow__minimap-desc";function NE({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:x=!1,ariaLabel:p,inversePan:v,zoomStep:m=1,offsetScale:g=5}){let S=Ke(),_=(0,H.useRef)(null),{boundingRect:E,viewBB:N,rfId:w,panZoom:k,translateExtent:M,flowWidth:z,flowHeight:U,ariaLabelConfig:T}=Ce(iO,Ze),A=e?.width??tO,D=e?.height??nO,O=E.width/A,R=E.height/D,L=Math.max(O,R),I=L*A,P=L*D,V=g*L,q=E.x-(I-E.width)/2-V,j=E.y-(P-E.height)/2-V,Z=I+V*2,re=P+V*2,ne=`${aO}-${w}`,X=(0,H.useRef)(0),F=(0,H.useRef)();X.current=L,(0,H.useEffect)(()=>{if(_.current&&k)return F.current=WS({domNode:_.current,panZoom:k,getTransform:()=>S.getState().transform,getViewScale:()=>X.current}),()=>{F.current?.destroy()}},[k]),(0,H.useEffect)(()=>{F.current?.update({translateExtent:M,width:z,height:U,inversePan:v,pannable:b,zoomStep:m,zoomable:x})},[b,x,v,m,M,z,U]);let ge=h?ee=>{let[de,be]=F.current?.pointer(ee)||[0,0];h(ee,{x:de,y:be})}:void 0,se=y?(0,H.useCallback)((ee,de)=>{let be=S.getState().nodeLookup.get(de).internals.userNode;y(ee,be)},[]):void 0,J=p??T["minimap.ariaLabel"];return(0,B.jsx)(Mf,{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*L: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:A,height:D,viewBox:`${q} ${j} ${Z} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ne,ref:_,onClick:ge,children:[J&&(0,B.jsx)("title",{id:ne,children:J}),(0,B.jsx)(eO,{onClick:se,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,B.jsx)("path",{className:"react-flow__minimap-mask",d:`M${q-V},${j-V}h${Z+V*2}v${re+V*2}h${-Z-V*2}z
|
|
2431
|
-
M${N.x},${N.y}h${N.width}v${N.height}h${-N.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}NE.displayName="MiniMap";var PB=(0,H.memo)(NE),lO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,rO={[Vi.Line]:"right",[Vi.Handle]:"bottom-right"};function sO({nodeId:e,position:t,variant:n=Vi.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:x,onResizeEnd:p}){let v=J_(),m=typeof e=="string"?e:v,g=Ke(),S=(0,H.useRef)(null),_=n===Vi.Handle,E=Ce((0,H.useCallback)(lO(_&&h),[_,h]),Ze),N=(0,H.useRef)(null),w=t??rO[n];(0,H.useEffect)(()=>{if(!(!S.current||!m))return N.current||(N.current=o_({domNode:S.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:M,transform:z,snapGrid:U,snapToGrid:T,nodeOrigin:A,domNode:D}=g.getState();return{nodeLookup:M,transform:z,snapGrid:U,snapToGrid:T,nodeOrigin:A,paneDomNode:D}},onChange:(M,z)=>{let{triggerNodeChanges:U,nodeLookup:T,parentLookup:A,nodeOrigin:D}=g.getState(),O=[],R={x:M.x,y:M.y},L=T.get(m);if(L&&L.expandParent&&L.parentId){let I=L.origin??D,P=M.width??L.measured.width??0,V=M.height??L.measured.height??0,q={id:L.id,parentId:L.parentId,rect:{width:P,height:V,...ch({x:M.x??L.position.x,y:M.y??L.position.y},{width:P,height:V},L.parentId,T,I)}},j=_f([q],T,A,D);O.push(...j),R.x=M.x?Math.max(I[0]*P,M.x):void 0,R.y=M.y?Math.max(I[1]*V,M.y):void 0}if(R.x!==void 0&&R.y!==void 0){let I={id:m,type:"position",position:{...R}};O.push(I)}if(M.width!==void 0&&M.height!==void 0){let P={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:M.width,height:M.height}};O.push(P)}for(let I of z){let P={...I,type:"position"};O.push(P)}U(O)},onEnd:({width:M,height:z})=>{let U={id:m,type:"dimensions",resizing:!1,dimensions:{width:M,height:z}};g.getState().triggerNodeChanges([U])}})),N.current.update({controlPosition:w,boundaries:{minWidth:r,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:x,onResizeEnd:p,shouldResize:y}),()=>{N.current?.destroy()}},[w,r,s,u,c,d,b,x,p,y]);let k=w.split("-");return(0,B.jsx)("div",{className:tt(["react-flow__resize-control","nodrag",...k,n,o]),ref:S,style:{...i,scale:E,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:a})}var GB=(0,H.memo)(sO);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 Eo(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=>uO(h,c,n)))break;let f=n[s];f?(n[l]=f,s=f):(delete n[l],s=void 0)}}return n}function uO(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function wE(e,t){return e.pipe_registry?.[t]}function Dh(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 AE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function zf(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function DE(e){if(!e)return null;if(typeof e=="string")return AE(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(AE(o))return o;return null}function ME(e){if(!e)return null;if(typeof e=="string")return zf(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(zf(o))return o;return null}function RE(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 Mh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function OE(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=Mh(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 zE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Rh(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 wn=le(Ht(),1);var{entries:VE,setPrototypeOf:LE,isFrozen:cO,getPrototypeOf:fO,getOwnPropertyDescriptor:dO}=Object,{freeze:$t,seal:Zn,create:Is}=Object,{apply:Ph,construct:Gh}=typeof Reflect<"u"&&Reflect;$t||($t=function(t){return t});Zn||(Zn=function(t){return t});Ph||(Ph=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)});Gh||(Gh=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 Hs=Qt(Array.prototype.forEach),pO=Qt(Array.prototype.lastIndexOf),BE=Qt(Array.prototype.pop),ks=Qt(Array.prototype.push),mO=Qt(Array.prototype.splice),Bf=Qt(String.prototype.toLowerCase),Oh=Qt(String.prototype.toString),zh=Qt(String.prototype.match),Xl=Qt(String.prototype.replace),hO=Qt(String.prototype.indexOf),gO=Qt(String.prototype.trim),oo=Qt(Object.prototype.hasOwnProperty),jt=Qt(RegExp.prototype.test),Ps=yO(TypeError);function Qt(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 Ph(e,t,o)}}function yO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Gh(e,n)}}function ve(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Bf;LE&&LE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(cO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function vO(e){for(let t=0;t<e.length;t++)oo(e,t)||(e[t]=null);return e}function To(e){let t=Is(null);for(let[n,o]of VE(e))oo(e,n)&&(Array.isArray(o)?t[n]=vO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=To(o):t[n]=o);return t}function Gs(e,t){for(;e!==null;){let o=dO(e,t);if(o){if(o.get)return Qt(o.get);if(typeof o.value=="function")return Qt(o.value)}e=fO(e)}function n(){return null}return n}var HE=$t(["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"]),Lh=$t(["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"]),Bh=$t(["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"]),bO=$t(["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"]),Hh=$t(["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"]),xO=$t(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kE=$t(["#text"]),PE=$t(["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"]),kh=$t(["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"]),GE=$t(["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"]),Lf=$t(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),SO=Zn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),_O=Zn(/<%[\w\W]*|[\w\W]*%>/gm),EO=Zn(/\$\{[\w\W]*/gm),TO=Zn(/^data-[\-\w.\u00B7-\uFFFF]+$/),NO=Zn(/^aria-[\-\w]+$/),YE=Zn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),CO=Zn(/^(?:\w+script|data):/i),wO=Zn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),XE=Zn(/^html$/i),AO=Zn(/^[a-z][.\w]*(-[.\w]+)+$/i),UE=Object.freeze({__proto__:null,ARIA_ATTR:NO,ATTR_WHITESPACE:wO,CUSTOM_ELEMENT:AO,DATA_ATTR:TO,DOCTYPE_NAME:XE,ERB_EXPR:_O,IS_ALLOWED_URI:YE,IS_SCRIPT_OR_DATA:CO,MUSTACHE_EXPR:SO,TMPLIT_EXPR:EO}),Us={element:1,text:3,progressingInstruction:7,comment:8,document:9},DO=function(){return typeof window>"u"?null:window},MO=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}},IE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function qE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:DO(),t=ae=>qE(ae);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==Us.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=Gs(y,"cloneNode"),x=Gs(y,"remove"),p=Gs(y,"nextSibling"),v=Gs(y,"childNodes"),m=Gs(y,"parentNode");if(typeof l=="function"){let ae=n.createElement("template");ae.content&&ae.content.ownerDocument&&(n=ae.content.ownerDocument)}let g,S="",{implementation:_,createNodeIterator:E,createDocumentFragment:N,getElementsByTagName:w}=n,{importNode:k}=o,M=IE();t.isSupported=typeof VE=="function"&&typeof m=="function"&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:U,TMPLIT_EXPR:T,DATA_ATTR:A,ARIA_ATTR:D,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:L}=UE,{IS_ALLOWED_URI:I}=UE,P=null,V=ve({},[...HE,...Lh,...Bh,...Hh,...kE]),q=null,j=ve({},[...PE,...kh,...GE,...Lf]),Z=Object.seal(Is(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,ne=null,X=Object.seal(Is(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),F=!0,ge=!0,se=!1,J=!0,ee=!1,de=!0,be=!1,Ae=!1,Ie=!1,He=!1,ct=!1,ft=!1,Mn=!0,fn=!1,Gt="user-content-",jn=!0,Ft=!1,vt={},dt=null,dn=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"]),ao=null,No=ve({},["audio","video","img","source","image","track"]),Rn=null,Xi=ve({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),On="http://www.w3.org/1998/Math/MathML",lo="http://www.w3.org/2000/svg",bt="http://www.w3.org/1999/xhtml",ro=bt,qi=!1,oi=null,Fl=ve({},[On,lo,bt],Oh),Co=ve({},["mi","mo","mn","ms","mtext"]),wo=ve({},["annotation-xml"]),Zs=ve({},["title","style","font","a","script"]),pn=null,ii=["application/xhtml+xml","text/html"],ye="text/html",Q=null,ie=null,Ne=n.createElement("form"),we=function(C){return C instanceof RegExp||C instanceof Function},je=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(ie&&ie===C)){if((!C||typeof C!="object")&&(C={}),C=To(C),pn=ii.indexOf(C.PARSER_MEDIA_TYPE)===-1?ye:C.PARSER_MEDIA_TYPE,Q=pn==="application/xhtml+xml"?Oh:Bf,P=oo(C,"ALLOWED_TAGS")?ve({},C.ALLOWED_TAGS,Q):V,q=oo(C,"ALLOWED_ATTR")?ve({},C.ALLOWED_ATTR,Q):j,oi=oo(C,"ALLOWED_NAMESPACES")?ve({},C.ALLOWED_NAMESPACES,Oh):Fl,Rn=oo(C,"ADD_URI_SAFE_ATTR")?ve(To(Xi),C.ADD_URI_SAFE_ATTR,Q):Xi,ao=oo(C,"ADD_DATA_URI_TAGS")?ve(To(No),C.ADD_DATA_URI_TAGS,Q):No,dt=oo(C,"FORBID_CONTENTS")?ve({},C.FORBID_CONTENTS,Q):dn,re=oo(C,"FORBID_TAGS")?ve({},C.FORBID_TAGS,Q):To({}),ne=oo(C,"FORBID_ATTR")?ve({},C.FORBID_ATTR,Q):To({}),vt=oo(C,"USE_PROFILES")?C.USE_PROFILES:!1,F=C.ALLOW_ARIA_ATTR!==!1,ge=C.ALLOW_DATA_ATTR!==!1,se=C.ALLOW_UNKNOWN_PROTOCOLS||!1,J=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ee=C.SAFE_FOR_TEMPLATES||!1,de=C.SAFE_FOR_XML!==!1,be=C.WHOLE_DOCUMENT||!1,He=C.RETURN_DOM||!1,ct=C.RETURN_DOM_FRAGMENT||!1,ft=C.RETURN_TRUSTED_TYPE||!1,Ie=C.FORCE_BODY||!1,Mn=C.SANITIZE_DOM!==!1,fn=C.SANITIZE_NAMED_PROPS||!1,jn=C.KEEP_CONTENT!==!1,Ft=C.IN_PLACE||!1,I=C.ALLOWED_URI_REGEXP||YE,ro=C.NAMESPACE||bt,Co=C.MATHML_TEXT_INTEGRATION_POINTS||Co,wo=C.HTML_INTEGRATION_POINTS||wo,Z=C.CUSTOM_ELEMENT_HANDLING||Is(null),C.CUSTOM_ELEMENT_HANDLING&&we(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Z.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&we(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Z.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Z.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ee&&(ge=!1),ct&&(He=!0),vt&&(P=ve({},kE),q=Is(null),vt.html===!0&&(ve(P,HE),ve(q,PE)),vt.svg===!0&&(ve(P,Lh),ve(q,kh),ve(q,Lf)),vt.svgFilters===!0&&(ve(P,Bh),ve(q,kh),ve(q,Lf)),vt.mathMl===!0&&(ve(P,Hh),ve(q,GE),ve(q,Lf))),X.tagCheck=null,X.attributeCheck=null,C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?X.tagCheck=C.ADD_TAGS:(P===V&&(P=To(P)),ve(P,C.ADD_TAGS,Q))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?X.attributeCheck=C.ADD_ATTR:(q===j&&(q=To(q)),ve(q,C.ADD_ATTR,Q))),C.ADD_URI_SAFE_ATTR&&ve(Rn,C.ADD_URI_SAFE_ATTR,Q),C.FORBID_CONTENTS&&(dt===dn&&(dt=To(dt)),ve(dt,C.FORBID_CONTENTS,Q)),C.ADD_FORBID_CONTENTS&&(dt===dn&&(dt=To(dt)),ve(dt,C.ADD_FORBID_CONTENTS,Q)),jn&&(P["#text"]=!0),be&&ve(P,["html","head","body"]),P.table&&(ve(P,["tbody"]),delete re.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ps('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ps('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=C.TRUSTED_TYPES_POLICY,S=g.createHTML("")}else g===void 0&&(g=MO(h,i)),g!==null&&typeof S=="string"&&(S=g.createHTML(""));$t&&$t(C),ie=C}},Nt=ve({},[...Lh,...Bh,...bO]),$n=ve({},[...Hh,...xO]),so=function(C){let Y=m(C);(!Y||!Y.tagName)&&(Y={namespaceURI:ro,tagName:"template"});let W=Bf(C.tagName),ke=Bf(Y.tagName);return oi[C.namespaceURI]?C.namespaceURI===lo?Y.namespaceURI===bt?W==="svg":Y.namespaceURI===On?W==="svg"&&(ke==="annotation-xml"||Co[ke]):!!Nt[W]:C.namespaceURI===On?Y.namespaceURI===bt?W==="math":Y.namespaceURI===lo?W==="math"&&wo[ke]:!!$n[W]:C.namespaceURI===bt?Y.namespaceURI===lo&&!wo[ke]||Y.namespaceURI===On&&!Co[ke]?!1:!$n[W]&&(Zs[W]||!Nt[W]):!!(pn==="application/xhtml+xml"&&oi[C.namespaceURI]):!1},zt=function(C){ks(t.removed,{element:C});try{m(C).removeChild(C)}catch{x(C)}},Lt=function(C,Y){try{ks(t.removed,{attribute:Y.getAttributeNode(C),from:Y})}catch{ks(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(C),C==="is")if(He||ct)try{zt(Y)}catch{}else try{Y.setAttribute(C,"")}catch{}},js=function(C){let Y=null,W=null;if(Ie)C="<remove></remove>"+C;else{let We=zh(C,/^[\r\n\t ]+/);W=We&&We[0]}pn==="application/xhtml+xml"&&ro===bt&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");let ke=g?g.createHTML(C):C;if(ro===bt)try{Y=new f().parseFromString(ke,pn)}catch{}if(!Y||!Y.documentElement){Y=_.createDocument(ro,"template",null);try{Y.documentElement.innerHTML=qi?S:ke}catch{}}let xt=Y.body||Y.documentElement;return C&&W&&xt.insertBefore(n.createTextNode(W),xt.childNodes[0]||null),ro===bt?w.call(Y,be?"html":"body")[0]:be?Y.documentElement:xt},$s=function(C){return E.call(C.ownerDocument||C,C,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Wl=function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof c)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},Jl=function(C){return typeof r=="function"&&C instanceof r};function Qn(ae,C,Y){Hs(ae,W=>{W.call(t,C,Y,ie)})}let er=function(C){let Y=null;if(Qn(M.beforeSanitizeElements,C,null),Wl(C))return zt(C),!0;let W=Q(C.nodeName);if(Qn(M.uponSanitizeElement,C,{tagName:W,allowedTags:P}),de&&C.hasChildNodes()&&!Jl(C.firstElementChild)&&jt(/<[/\w!]/g,C.innerHTML)&&jt(/<[/\w!]/g,C.textContent)||de&&C.namespaceURI===bt&&W==="style"&&Jl(C.firstElementChild)||C.nodeType===Us.progressingInstruction||de&&C.nodeType===Us.comment&&jt(/<[/\w]/g,C.data))return zt(C),!0;if(re[W]||!(X.tagCheck instanceof Function&&X.tagCheck(W))&&!P[W]){if(!re[W]&&nr(W)&&(Z.tagNameCheck instanceof RegExp&&jt(Z.tagNameCheck,W)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(W)))return!1;if(jn&&!dt[W]){let ke=m(C)||C.parentNode,xt=v(C)||C.childNodes;if(xt&&ke){let We=xt.length;for(let Bt=We-1;Bt>=0;--Bt){let Ut=b(xt[Bt],!0);Ut.__removalCount=(C.__removalCount||0)+1,ke.insertBefore(Ut,p(C))}}}return zt(C),!0}return C instanceof s&&!so(C)||(W==="noscript"||W==="noembed"||W==="noframes")&&jt(/<\/no(script|embed|frames)/i,C.innerHTML)?(zt(C),!0):(ee&&C.nodeType===Us.text&&(Y=C.textContent,Hs([z,U,T],ke=>{Y=Xl(Y,ke," ")}),C.textContent!==Y&&(ks(t.removed,{element:C.cloneNode()}),C.textContent=Y)),Qn(M.afterSanitizeElements,C,null),!1)},tr=function(C,Y,W){if(ne[Y]||Mn&&(Y==="id"||Y==="name")&&(W in n||W in Ne))return!1;if(!(ge&&!ne[Y]&&jt(A,Y))){if(!(F&&jt(D,Y))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(Y,C))){if(!q[Y]||ne[Y]){if(!(nr(C)&&(Z.tagNameCheck instanceof RegExp&&jt(Z.tagNameCheck,C)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(C))&&(Z.attributeNameCheck instanceof RegExp&&jt(Z.attributeNameCheck,Y)||Z.attributeNameCheck instanceof Function&&Z.attributeNameCheck(Y,C))||Y==="is"&&Z.allowCustomizedBuiltInElements&&(Z.tagNameCheck instanceof RegExp&&jt(Z.tagNameCheck,W)||Z.tagNameCheck instanceof Function&&Z.tagNameCheck(W))))return!1}else if(!Rn[Y]){if(!jt(I,Xl(W,R,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&C!=="script"&&hO(W,"data:")===0&&ao[C])){if(!(se&&!jt(O,Xl(W,R,"")))){if(W)return!1}}}}}}}return!0},nr=function(C){return C!=="annotation-xml"&&zh(C,L)},Qs=function(C){Qn(M.beforeSanitizeAttributes,C,null);let{attributes:Y}=C;if(!Y||Wl(C))return;let W={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0},ke=Y.length;for(;ke--;){let xt=Y[ke],{name:We,namespaceURI:Bt,value:Ut}=xt,uo=Q(We),or=Ut,pt=We==="value"?or:gO(or);if(W.attrName=uo,W.attrValue=pt,W.keepAttr=!0,W.forceKeepAttr=void 0,Qn(M.uponSanitizeAttribute,C,W),pt=W.attrValue,fn&&(uo==="id"||uo==="name")&&(Lt(We,C),pt=Gt+pt),de&&jt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,pt)){Lt(We,C);continue}if(uo==="attributename"&&zh(pt,"href")){Lt(We,C);continue}if(W.forceKeepAttr)continue;if(!W.keepAttr){Lt(We,C);continue}if(!J&&jt(/\/>/i,pt)){Lt(We,C);continue}ee&&Hs([z,U,T],Fs=>{pt=Xl(pt,Fs," ")});let ir=Q(C.nodeName);if(!tr(ir,uo,pt)){Lt(We,C);continue}if(g&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Bt)switch(h.getAttributeType(ir,uo)){case"TrustedHTML":{pt=g.createHTML(pt);break}case"TrustedScriptURL":{pt=g.createScriptURL(pt);break}}if(pt!==or)try{Bt?C.setAttributeNS(Bt,We,pt):C.setAttribute(We,pt),Wl(C)?zt(C):BE(t.removed)}catch{Lt(We,C)}}Qn(M.afterSanitizeAttributes,C,null)},Ks=function(C){let Y=null,W=$s(C);for(Qn(M.beforeSanitizeShadowDOM,C,null);Y=W.nextNode();)Qn(M.uponSanitizeShadowNode,Y,null),er(Y),Qs(Y),Y.content instanceof a&&Ks(Y.content);Qn(M.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(ae){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,W=null,ke=null,xt=null;if(qi=!ae,qi&&(ae="<!-->"),typeof ae!="string"&&!Jl(ae))if(typeof ae.toString=="function"){if(ae=ae.toString(),typeof ae!="string")throw Ps("dirty is not a string, aborting")}else throw Ps("toString is not a function");if(!t.isSupported)return ae;if(Ae||je(C),t.removed=[],typeof ae=="string"&&(Ft=!1),Ft){if(ae.nodeName){let Ut=Q(ae.nodeName);if(!P[Ut]||re[Ut])throw Ps("root node is forbidden and cannot be sanitized in-place")}}else if(ae instanceof r)Y=js("<!---->"),W=Y.ownerDocument.importNode(ae,!0),W.nodeType===Us.element&&W.nodeName==="BODY"||W.nodeName==="HTML"?Y=W:Y.appendChild(W);else{if(!He&&!ee&&!be&&ae.indexOf("<")===-1)return g&&ft?g.createHTML(ae):ae;if(Y=js(ae),!Y)return He?null:ft?S:""}Y&&Ie&&zt(Y.firstChild);let We=$s(Ft?ae:Y);for(;ke=We.nextNode();)er(ke),Qs(ke),ke.content instanceof a&&Ks(ke.content);if(Ft)return ae;if(He){if(ee){Y.normalize();let Ut=Y.innerHTML;Hs([z,U,T],uo=>{Ut=Xl(Ut,uo," ")}),Y.innerHTML=Ut}if(ct)for(xt=N.call(Y.ownerDocument);Y.firstChild;)xt.appendChild(Y.firstChild);else xt=Y;return(q.shadowroot||q.shadowrootmode)&&(xt=k.call(o,xt,!0)),xt}let Bt=be?Y.outerHTML:Y.innerHTML;return be&&P["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&jt(XE,Y.ownerDocument.doctype.name)&&(Bt="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
|
|
2432
|
-
`+Bt),ee&&Hs([z,U,T],Ut=>{Bt=Xl(Bt,Ut," ")}),g&&ft?g.createHTML(Bt):Bt},t.setConfig=function(){let ae=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};je(ae),Ae=!0},t.clearConfig=function(){ie=null,Ae=!1},t.isValidAttribute=function(ae,C,Y){ie||je({});let W=Q(ae),ke=Q(C);return tr(W,ke,Y)},t.addHook=function(ae,C){typeof C=="function"&&ks(M[ae],C)},t.removeHook=function(ae,C){if(C!==void 0){let Y=pO(M[ae],C);return Y===-1?void 0:mO(M[ae],Y,1)[0]}return BE(M[ae])},t.removeHooks=function(ae){M[ae]=[]},t.removeAllHooks=function(){M=IE()},t}var ZE=qE();var ue=le(he(),1),RO=(0,ue.jsx)("svg",{viewBox:"0 0 24 24",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"})}),OO=(0,ue.jsx)("svg",{viewBox:"0 0 24 24",children:(0,ue.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),zO=(0,ue.jsx)("svg",{viewBox:"0 0 24 24",children:(0,ue.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),LO=(0,ue.jsx)("svg",{viewBox:"0 0 24 24",children:(0,ue.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"})}),jE=(0,ue.jsx)("svg",{viewBox:"0 0 24 24",children:(0,ue.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 Hf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Uh(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 $E(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function kf({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,l]=wn.default.useState("html"),[r,s]=wn.default.useState(!1),u=wn.default.useRef(null),c=wn.default.useMemo(()=>ME(e.data),[e.data]),d=wn.default.useMemo(()=>DE(e.data),[e.data]),f=wn.default.useMemo(()=>RE(e.data),[e.data]),h=wn.default.useMemo(()=>Mh(e.data),[e.data]),[y,b]=wn.default.useState(null);wn.default.useEffect(()=>{if(b(null),!f||!n||c)return;let A=!1;return n(f).then(D=>{A||b(zf(D)?D:null)}).catch(()=>{A||b(null)}),()=>{A=!0}},[f,n,c]);let x=c??y,p=d??y,v=wn.default.useMemo(()=>OE(e.data,e.contentType,p??f),[e.data,e.contentType,p,f]),m=v==="application/pdf",g=v?.startsWith("image/")??!1,S=zE(v??e.contentType),{jsonString:_,jsonError:E}=wn.default.useMemo(()=>{if(e.data==null)return{jsonString:null,jsonError:null};try{return{jsonString:JSON.stringify(e.data,null,2),jsonError:null}}catch(A){return{jsonString:null,jsonError:A instanceof Error?A.message:String(A)}}},[e.data]);wn.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(A=>{A.setAttribute("target","_blank"),A.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function N(A){let D=h||e.name;return(0,ue.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,ue.jsx)("div",{className:"stuff-viewer-local-file-icon",children:jE}),(0,ue.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[D&&(0,ue.jsx)("div",{className:"stuff-viewer-local-file-name",children:D}),(0,ue.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[A," \u2014 no preview available"]})]})]})}function w(A){return(0,ue.jsxs)("div",{className:"stuff-viewer-error",role:"alert",children:[(0,ue.jsx)("div",{className:"stuff-viewer-error-title",children:"Unable to serialize data"}),(0,ue.jsx)("div",{className:"stuff-viewer-error-detail",children:A})]})}function k(){if(a==="html"){if(m){if(o!==!1&&x){let D=x.includes("#")?x:`${x}#pagemode=none`;return(0,ue.jsx)("div",{className:"stuff-viewer-pdf",children:(0,ue.jsx)("embed",{src:D,type:"application/pdf"})})}if(p){let D=h||e.name;return(0,ue.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:U,children:[(0,ue.jsx)("div",{className:"stuff-viewer-local-file-icon",children:jE}),(0,ue.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[D&&(0,ue.jsx)("div",{className:"stuff-viewer-local-file-name",children:D}),(0,ue.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return N("PDF")}return g?x?(0,ue.jsx)("div",{className:"stuff-viewer-image",children:(0,ue.jsx)("img",{src:x,alt:e.name??"(unnamed stuff)"})}):N("Image"):e.dataHtml?(0,ue.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:ZE.sanitize(e.dataHtml)}}):_?(0,ue.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Hf(_)}}):E?w(E):(0,ue.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?_?(0,ue.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Hf(_)}}):E?w(E):(0,ue.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,ue.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Hf(e.dataText)}}):_?(0,ue.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Hf(_)}}):E?w(E):(0,ue.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function M(){let A;a==="json"?A=_||"":a==="text"?A=e.dataText||_||"":A=e.dataText||e.dataHtml||_||"",A&&navigator.clipboard&&navigator.clipboard.writeText(A).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function z(){if(g&&p){let A=v?.split("/")[1]||"png";$E(p,`${e.name||"stuff"}.${A}`);return}if(m&&p){$E(p,`${e.name||"stuff"}.pdf`);return}a==="json"?Uh(_||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Uh(e.dataText||_||"",`${e.name||"stuff"}.txt`,"text/plain"):Uh(e.dataHtml||_||"",`${e.name||"stuff"}.html`,"text/html")}function U(){if(p){if(i){i(p,h??void 0);return}window.open(p,"_blank","noopener,noreferrer")}}let T=["stuff-viewer",t].filter(Boolean).join(" ");return(0,ue.jsxs)("div",{className:T,children:[(0,ue.jsxs)("div",{className:"stuff-viewer-header",children:[(0,ue.jsx)("h3",{className:"stuff-viewer-title",children:e.name??"(unnamed stuff)"}),e.concept&&(0,ue.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,ue.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,ue.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(A=>(0,ue.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===A?" stuff-viewer-tab--active":""}`,onClick:()=>l(A),children:A==="html"?S:A==="json"?"JSON":"Pretty"},A))}),(0,ue.jsxs)("div",{className:"stuff-viewer-actions",children:[p&&(0,ue.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:U,title:"Open in new window","aria-label":"Open in new window",children:LO}),(0,ue.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${r?" stuff-viewer-action-btn--copied":""}`,onClick:M,title:"Copy","aria-label":"Copy",children:r?OO:RO}),(0,ue.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:z,title:"Download","aria-label":"Download",children:zO})]})]}),(0,ue.jsx)("div",{className:"stuff-viewer-content",ref:u,children:k()})]})}var QE=le(Ht(),1);var Aa=le(he(),1);function KE({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){QE.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,Aa.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,Aa.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,Aa.jsxs)("div",{className:"detail-panel-content",children:[(0,Aa.jsx)("div",{className:"detail-panel-close-row",children:(0,Aa.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"})}),n]})]})}var Da=le(Ht(),1),BO=.6;function FE({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=Da.default.useState(e),[l,r]=Da.default.useState(!1),s=Da.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=Da.default.useRef(null),c=Da.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,h=f?Math.min(n,f*BO):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 Da.default.useEffect(()=>{if(!l)return;let d=h=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:y,startWidth:b,maxAllowed:x}=s.current,p=y-h.clientX,v=Math.max(t,Math.min(x,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 eT=le(Ht(),1);var Pf=le(Ht(),1),Ue=le(he(),1);function Ih(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function oe({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 Vh({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"})}),kO=(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"})}),PO=(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"})}),GO=(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"})}),WE={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 io({label:e,templateText:t,renderedText:n}){let[o,i]=(0,Pf.useState)(!1),[a,l]=(0,Pf.useState)(!1),[r,s]=(0,Pf.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?kO:HO}),(0,Ue.jsx)("button",{onClick:h,title:"Copy prompt","aria-label":"Copy prompt",style:{...WE,color:a?"#10b981":"#64748b"},children:a?GO:PO}),d&&(0,Ue.jsxs)("button",{onClick:()=>i(y=>!y),style:WE,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 Ot=le(he(),1);function Yh({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,Ot.jsxs)(Ot.Fragment,{children:[(0,Ot.jsx)(oe,{label:"Model",value:h}),y&&y!==h&&(0,Ot.jsx)(oe,{label:"Model (object)",value:y}),(0,Ot.jsx)(oe,{label:"Structuring",value:d||e.structuring_method}),(0,Ot.jsx)(oe,{label:"Multiple Output",value:f}),(0,Ot.jsx)(oe,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Ot.jsx)(oe,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,Ot.jsx)(oe,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,Ot.jsx)(oe,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,Ot.jsx)(oe,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,Ot.jsx)(oe,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,Ot.jsx)(io,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,Ot.jsx)(io,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}function Xh(e){return null}var sn=le(he(),1);function qh({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,sn.jsxs)(sn.Fragment,{children:[(0,sn.jsx)(oe,{label:"Model",value:o||e.img_gen_choice}),(0,sn.jsx)(io,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,sn.jsx)(io,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,sn.jsx)(oe,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,sn.jsx)(oe,{label:"Output Format",value:e.output_format}),(0,sn.jsx)(oe,{label:"Background",value:e.background}),(0,sn.jsx)(oe,{label:"Is Raw",value:e.is_raw}),(0,sn.jsx)(oe,{label:"Seed",value:e.seed}),(0,sn.jsx)(oe,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}function Zh(e){return null}var un=le(he(),1);function jh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,un.jsxs)(un.Fragment,{children:[(0,un.jsx)(oe,{label:"Model",value:n||e.extract_choice}),(0,un.jsx)(oe,{label:"Document Variable",value:e.document_stuff_name}),(0,un.jsx)(oe,{label:"Caption Images",value:e.should_caption_images}),(0,un.jsx)(oe,{label:"Max Page Images",value:e.max_page_images}),(0,un.jsx)(oe,{label:"Include Page Views",value:e.should_include_page_views}),(0,un.jsx)(oe,{label:"Page Views DPI",value:e.page_views_dpi}),(0,un.jsx)(oe,{label:"Render JS",value:e.render_js}),(0,un.jsx)(oe,{label:"Include Raw HTML",value:e.include_raw_html}),(0,un.jsx)(oe,{label:"Image Variable",value:e.image_stuff_name})]})}function $h(e){return null}var cn=le(he(),1);function Qh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(oe,{label:"Model",value:n||e.search_choice}),(0,cn.jsx)(io,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,cn.jsx)(oe,{label:"Max Results",value:e.max_results_override}),(0,cn.jsx)(oe,{label:"Include Images",value:e.include_images_override}),(0,cn.jsx)(oe,{label:"Structured Output",value:e.is_structured_output}),(0,cn.jsx)(oe,{label:"From Date",value:e.from_date}),(0,cn.jsx)(oe,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,cn.jsx)(oe,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,cn.jsx)(oe,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}function Kh(e){return null}var ze=le(he(),1);function UO(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 IO=60;function VO(e){return e.length>IO||e.includes(`
|
|
2433
|
-
`)}function YO({label:e,value:t}){return(0,ze.jsxs)("div",{className:"detail-field-block",children:[(0,ze.jsx)("div",{className:"detail-field-block-label",children:e}),(0,ze.jsx)("div",{className:"detail-field-block-value",children:t})]})}function JE({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,ze.jsxs)(ze.Fragment,{children:[o.map(([r,s])=>{let u=UO(s);return VO(u)?(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(YO,{label:r,value:u})},r):(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(oe,{label:r,value:u})},r)}),a.map(([r,s])=>{let u=n?.[r]?.rendered;return(0,ze.jsx)("div",{style:l,children:(0,ze.jsx)(io,{label:`Template \u2014 ${r}`,templateText:s.template??null,renderedText:u})},r)}),i.map(([r,s])=>s.nested?(0,ze.jsxs)("div",{children:[(0,ze.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,ze.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,ze.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,ze.jsx)(JE,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},r):null)]})}function Fh({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,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(oe,{label:"Mode",value:o||(l?"construct":"template")}),(0,ze.jsx)(oe,{label:"Category",value:e.category}),(0,ze.jsx)(oe,{label:"Templating Style",value:e.templating_style}),e.template&&(0,ze.jsx)(io,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,ze.jsx)(JE,{blueprint:a,depth:0,fieldResolutions:i})]})]})}function Wh(e){return null}var Pt=le(he(),1);function Jh({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,Pt.jsxs)(Pt.Fragment,{children:[(0,Pt.jsx)(Vh,{label:"Expression",text:e.expression}),n&&(0,Pt.jsx)(oe,{label:"Expression Result",value:n}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,Pt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,Pt.jsx)("span",{className:"detail-kv-key",children:i}),(0,Pt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,Pt.jsxs)("div",{className:"detail-kv-row",children:[(0,Pt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,Pt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,Pt.jsx)(oe,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}function eg(e){return null}var Jo=le(he(),1);function tg({blueprint:e}){return(0,Jo.jsxs)("div",{children:[(0,Jo.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,Jo.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,Jo.jsxs)("div",{className:"detail-step-item",children:[(0,Jo.jsx)("span",{className:"detail-step-index",children:n+1}),(0,Jo.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Jo.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}function ng(e){return null}var An=le(he(),1);function og({blueprint:e}){return(0,An.jsxs)(An.Fragment,{children:[(0,An.jsxs)("div",{children:[(0,An.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,An.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,An.jsxs)("div",{className:"detail-step-item",children:[(0,An.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,An.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,An.jsx)(oe,{label:"Add Each Output",value:e.add_each_output}),(0,An.jsx)(oe,{label:"Combined Output",value:e.combined_output})]})}function ig(e){return null}var ei=le(he(),1);function ag({blueprint:e,executionData:t}){let n=t?.item_count;return(0,ei.jsxs)(ei.Fragment,{children:[(0,ei.jsx)(oe,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,ei.jsx)(oe,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,ei.jsx)(oe,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,ei.jsx)(oe,{label:"Items Processed",value:n})]})}function lg(e){return null}var K=le(he(),1),XO={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},qO=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),ZO={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4",canceled:"#6272a4"};function tT({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type,i=qO.has(o),a=XO[o],l=e.status,r=ZO[l]??"#6272a4",s=eT.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,h=wE(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,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)("div",{className:"detail-sticky-header",children:[(0,K.jsxs)("div",{className:"detail-header",children:[(0,K.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,K.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code})]}),(0,K.jsxs)("div",{className:"detail-status",children:[(0,K.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,K.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,K.jsx)("span",{className:"detail-duration",children:Ih(e.timing.duration)})]}),d&&(0,K.jsx)("div",{className:"detail-description",children:d}),u.length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,K.jsx)("div",{className:"detail-io-list",children:u.map((f,h)=>(0,K.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,K.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,K.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),c.length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,K.jsx)("div",{className:"detail-io-list",children:c.map((f,h)=>(0,K.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,K.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,K.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),(u.length>0||c.length>0)&&(0,K.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),s&&(0,K.jsx)(jO,{blueprint:s,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,K.jsx)($O,{executionData:e.execution_data,pipeType:o}),e.error&&(0,K.jsxs)("div",{className:"detail-error",children:[(0,K.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,K.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,K.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,h])=>(0,K.jsx)(oe,{label:f,value:typeof h=="number"?h.toLocaleString():String(h)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,K.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,h])=>(0,K.jsxs)("span",{className:"detail-tag",children:[(0,K.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,K.jsx)("span",{className:"detail-tag-value",children:h})]},f))})]}),!s&&(0,K.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function jO({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,K.jsx)(Yh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,K.jsx)(qh,{blueprint:e,executionData:t});case"PipeCompose":return(0,K.jsx)(Fh,{blueprint:e,executionData:t});case"PipeExtract":return(0,K.jsx)(jh,{blueprint:e,executionData:t});case"PipeSearch":return(0,K.jsx)(Qh,{blueprint:e,executionData:t});case"PipeSequence":return(0,K.jsx)(tg,{blueprint:e,executionData:t});case"PipeParallel":return(0,K.jsx)(og,{blueprint:e,executionData:t});case"PipeCondition":return(0,K.jsx)(Jh,{blueprint:e,executionData:t});case"PipeBatch":return(0,K.jsx)(ag,{blueprint:e,executionData:t});case"PipeFunc":return null}}function $O({executionData:e,pipeType:t}){switch(t){case"PipeLLM":return(0,K.jsx)(Xh,{data:e});case"PipeImgGen":return(0,K.jsx)(Zh,{data:e});case"PipeExtract":return(0,K.jsx)($h,{data:e});case"PipeSearch":return(0,K.jsx)(Kh,{data:e});case"PipeCompose":return(0,K.jsx)(Wh,{data:e});case"PipeCondition":return(0,K.jsx)(eg,{data:e});case"PipeSequence":return(0,K.jsx)(ng,{data:e});case"PipeParallel":return(0,K.jsx)(ig,{data:e});case"PipeBatch":return(0,K.jsx)(lg,{data:e});default:return(0,K.jsx)(QO,{data:e})}}function QO({data:e}){let t=Object.entries(e);return t.length===0?null:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,K.jsx)(oe,{label:n,value:String(o)},n))]})}var rg=le(Ht(),1);var _e=le(he(),1);function sg({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a,instanceKey:l}){return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("div",{className:"detail-header",children:[(0,_e.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,_e.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,_e.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,_e.jsxs)("div",{className:"detail-refines",children:["refines ",(0,_e.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),(0,_e.jsx)(KO,{concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a},l??`${e.code}:${t&&"digest"in t?t.digest:t?.name??""}`)]})}function KO({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=!!t&&!n,[r,s]=rg.default.useState(l?"data":"structure"),u=rg.default.useId(),c=b=>`${u}-tab-${b}`,d=b=>`${u}-tabpanel-${b}`,f=e.json_schema?(0,_e.jsxs)("div",{children:[(0,_e.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,_e.jsx)(FO,{schema:e.json_schema,isDryRun:n})]}):(0,_e.jsx)("div",{className:"detail-not-available",children:"Schema not available"});if(!l)return f;let h=b=>{let x;switch(b.key){case"ArrowLeft":case"ArrowRight":x=r==="data"?"structure":"data";break;case"Home":x="data";break;case"End":x="structure";break;default:return}b.preventDefault(),s(x),document.getElementById(c(x))?.focus()},y=(b,x)=>(0,_e.jsx)("button",{type:"button",role:"tab",id:c(b),"aria-selected":r===b,"aria-controls":d(b),tabIndex:r===b?0:-1,className:`detail-tab ${r===b?"detail-tab--active":""}`,onClick:()=>s(b),onKeyDown:h,children:x});return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsxs)("div",{className:"detail-tabs",role:"tablist","aria-label":"Concept views",children:[y("data","Data"),y("structure","Structure")]}),(0,_e.jsx)("div",{role:"tabpanel",id:d(r),"aria-labelledby":c(r),children:r==="data"?(0,_e.jsx)(kf,{stuff:JO(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):f})]})}function FO({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,_e.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,_e.jsxs)("table",{className:"detail-schema-table",children:[(0,_e.jsx)("thead",{children:(0,_e.jsxs)("tr",{children:[(0,_e.jsx)("th",{children:"Field"}),(0,_e.jsx)("th",{children:"Type"}),(0,_e.jsx)("th",{}),(0,_e.jsx)("th",{children:"Description"})]})}),(0,_e.jsx)("tbody",{children:a.map(([l,r])=>(0,_e.jsxs)("tr",{children:[(0,_e.jsx)("td",{className:"detail-schema-field",children:l}),(0,_e.jsx)("td",{className:"detail-schema-type",children:WO(r)}),(0,_e.jsx)("td",{children:o.has(l)&&(0,_e.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,_e.jsx)("td",{children:r.description??""})]},l))})]})}function WO(e){return e.type?String(e.type):e.anyOf?"union":e.allOf?"all":e.$ref?String(e.$ref).split("/").pop()??"(unresolved type)":"(unresolved type)"}function JO(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 ql(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 Zl(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 Gf(e){return{pipeCode:e.pipe_code,pipeType:e.pipe_type,description:e.description,status:e.status,inputs:e.io.inputs.map(t=>({name:t.name,concept:t.concept??""})),outputs:e.io.outputs.map(t=>({name:t.name,concept:t.concept??""}))}}var e3=7,t3=48,n3=140;function o3(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=Nl(s,`nodes[${s.id}]`),c=u.status==="failed",d=u.pipe_code,f=Gf(u);o.push({id:u.id,type:El,data:{labelDescriptor:{kind:"pipe",label:d,isFailed:c},nodeData:u,isPipe:!0,isStuff:!1,labelText:d,pipeCode:f.pipeCode,pipeType:u.pipe_type,pipeCardData:f},position:{x:0,y:0}})}for(let[s,u]of Object.entries(t.stuffRegistry)){let c=zi(s),d=u.name,f=u.concept||"",h=Math.max(d.length,f.length)*e3+t3,y=Math.max(n3,h),b=!t.stuffProducers[s],x=!b&&!t.stuffConsumers[s]?.length,p=b?"input":x?"output":void 0,v=b?"var(--color-stuff-input-border, #50FA7B)":x?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:p1,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=zi(s);i.push({id:"edge_"+l++,source:u,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:da,color:"var(--color-edge)"}})}for(let[s,u]of Object.entries(t.stuffConsumers)){let c=zi(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:da,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=zi(s.source_stuff_digest),c=zi(s.target_stuff_digest);i.push({id:s.id,source:u,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:da,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=zi(s.source_stuff_digest),c=zi(s.target_stuff_digest),d=s.kind==="batch_item";i.push({id:s.id,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:da,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=Eo(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 nT(e,t){if(e){let n=CE(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:o3(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}function iT(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 i3(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 Vs(e,t,n){let o=i3(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function Uf(e,t,n){return Vs(e,t,n)??e}function oT(e,t){return e.nodes.find(n=>n.id===t)}function ug(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=Eo(n,t),l=new Map;for(let p of o){let m=oT(n,p)?.io?.outputs;if(m)for(let g of m){if(!g.digest)continue;let S=l.get(g.digest);S||(S=new Set,l.set(g.digest,S)),S.add(p)}}if(l.size>0)for(let p of e.nodes){if(!Tl(p.id))continue;let v=l.get(ls(p.id));if(!v)continue;let m=a[p.id],g=null,S=new Set;for(;m&&!S.has(m);)S.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)Vs(p.id,a,o)||r.push(p);for(let p of o){if(Vs(p,a,o))continue;let v=oT(n,p);if(!v)continue;let m=Gf(Nl(v,p));i&&(m.onExpand=S=>i(p,S));let g={id:p,type:El,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)||Vs(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 S=Vs(g,a,o);S&&S!==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]=Uf(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(Uf(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=Uf(p.source,a,o),m=Uf(p.target,a,o);if(v===m)continue;let g=p._batchEdge?"batch":"data",S=`${v}->${m}|${g}`;if(y.has(S))continue;let _={...p,source:v,target:m,id:p.id};p._batchEdge&&(v!==p.source||m!==p.target)&&(_.label="[N]"),delete _._crossGroup,y.set(S,_)}let b=Eo({...n,edges:n.edges.filter(p=>p.kind!=="contains"?!0:s.has(p.source))},h),x=[];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:S,..._}=p.style;p.style={..._,strokeWidth:2},p.markerEnd||(p.markerEnd={type:da,color:"var(--color-edge)"})}x.push(p)}return{nodes:r,edges:x,analysis:h}}var a3=window.ELK,aT=a3;function l3(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var r3="_in",s3="_out";function fg(e){return e+r3}function dg(e){return e+s3}function u3(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:fg(e),x:r,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:dg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var c3=320,uT=28,f3=24,cg=8,d3=22,p3=50,m3=16,h3=3,lT=38,rT=30,If=22,g3=140,y3=100,v3=17,b3=58,x3=5.5,S3=5,_3=4.5,E3=4;function T3(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-uT,i=Math.max(1,Math.floor(o/x3)),a=Math.ceil(e.length/i);return Math.min(h3,Math.max(1,a))}function N3(e,t){let n=Math.min(g3,Math.ceil(e.length*S3)),o=Math.min(y3,Math.ceil(t.length*_3));return n+o+v3}function sT(e,t){if(e.length===0)return 0;let n=t-uT-b3,o=1,i=0;for(let a of e){let l=N3(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function jl(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===El,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=f3+(t?p3:d3),x=T3(y,t,u);x>0&&(b+=cg+x*m3);let p=f.slice(0,E3);if(p.length>0)if(b+=cg,t)b+=lT+(p.length-1)*If;else{let v=sT(p,u);b+=rT+(v-1)*If}if(h.length>0)if(b+=cg,t)b+=lT+(h.length-1)*If;else{let v=sT(h,u);b+=rT+(v-1)*If}c=Math.min(c3,b)}else c=a?120:70;return{width:u,height:c}}function C3(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 Vf(e,t,n){return{id:e,width:t.width,height:t.height,ports:u3(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function cT(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,s=a?.ranksep??70,u=l3(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 S={},_=e.map(N=>{let w=jl(N,l);return S[N.id]=w,Vf(N.id,w,i)}),E=t.map(N=>({id:N.id,sources:[dg(N.source)],targets:[fg(N.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:_,edges:E},dimensionMap:S}}let f=Eo(n,o),h=C3(o.controllerNodeIds,o.containmentTree),y={},b=new Map;for(let S of e)b.set(S.id,S);let x={},p=Array.from(o.controllerNodeIds);p.sort((S,_)=>(h[S]??0)-(h[_]??0));for(let S of p){let E=1+(h[S]??0)*.15,N=Math.round(Dc*E),w=Math.round(Mc*E),k=Math.round(Rc*E),M={"elk.padding":`[top=${w},left=${N},bottom=${k},right=${N}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],U=o.containmentTree[S]||[];for(let T of U)if(o.controllerNodeIds.has(T)){let A=x[T];A&&z.push(A)}else{let A=b.get(T);if(A){let D=jl(A,l);y[T]=D,z.push(Vf(T,D,i))}}for(let T of e)if(T.data.isStuff&&f[T.id]===S&&!z.some(A=>A.id===T.id)){let A=jl(T,l);y[T.id]=A,z.push(Vf(T.id,A,i))}x[S]={id:S,layoutOptions:M,children:z}}let v=[];for(let S of p)if(!f[S]){let _=x[S];_&&v.push(_)}for(let S of e)if(!f[S.id]&&!o.controllerNodeIds.has(S.id)){let _=jl(S,l);y[S.id]=_,v.push(Vf(S.id,_,i))}let m=new Set(e.map(S=>S.id)),g=t.filter(S=>m.has(S.source)&&m.has(S.target)).map(S=>({id:S.id,sources:[dg(S.source)],targets:[fg(S.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:v,edges:g},dimensionMap:y}}function fT(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 pg=null;function w3(){return pg||(pg=new aT),pg}async function Yf(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}=cT(e,t,i??null,a??null,n,o),u=await w3().layout(r),c=fT(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]??jl(h,l),x=b.width,p=b.height,v=h.data.pipeCardData,g=v?{...v,direction:l?"LR":"TB"}:void 0;return{...h,data:{...h.data,_estimatedWidth:x,_estimatedHeight:p,pipeCardData:g},style:{...h.style,width:x+"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 Ys=5;function A3(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 D3(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]=Nl(y,`nodes[${y.id}]`));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]||[],x=-1;for(let p of b)t.controllerNodeIds.has(p)&&(x=Math.max(x,s(p)));return r.delete(y),l[y]=x+1,l[y]}let u=Eo(e,t),c={};for(let[y,b]of Object.entries(u))Tl(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 x=(t.containmentTree[y]||[]).filter(M=>i[M]),p=c[y]||[],v=[...x,...p];if(v.length===0)continue;let m,g,S,_,E=o?.[y];if(E)m=E.x,g=E.y,S=E.width,_=E.height;else{let M=1/0,z=1/0,U=-1/0,T=-1/0;for(let I of v){let P=i[I],V=P.position,q=h1(P),j=g1(P);M=Math.min(M,V.x),z=Math.min(z,V.y),U=Math.max(U,V.x+q),T=Math.max(T,V.y+j)}let D=1+(l[y]??0)*.15,O=Math.round(Dc*D),R=Math.round(Mc*D),L=Math.round(Rc*D);m=M-O,g=z-R,S=U-M+2*O,_=T-z+R+L}let N=a[y];if(!N)throw new rs(`nodes[${y}]`,`controller "${y}" is referenced by a "contains" edge but has no corresponding node in graphspec.nodes`);let w=N.pipe_code,k={id:y,type:m1,data:{label:w,pipeType:N.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:w,labelText:w},position:{x:m,y:g},style:{width:S+"px",height:_+"px",padding:"0"}};f.push(k),i[y]=k;for(let M of v)h[M]=y}for(let[y,b]of Object.entries(h)){let x=i[y],p=i[b];!x||!p||(x.position={x:x.position.x-p.position.x,y:x.position.y-p.position.y},x.parentId=b,x.extent="parent")}return f}function $l(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 S=o.containmentTree[g]||[];u[g]=S.length;let _=d[g];(_==="PipeParallel"||_==="PipeBatch")&&S.length>Ys&&!a?.has(g)&&c.add(g)}let f=e,h=t;if(c.size>0){let g=new Set;for(let _ of c){let N=(o.containmentTree[_]||[]).slice(Ys);for(let w of N)if(g.add(w),o.controllerNodeIds.has(w))for(let k of A3(w,o.containmentTree,o.controllerNodeIds))g.add(k)}let S=Eo(n,o);for(let _ of e){if(!Tl(_.id)||g.has(_.id))continue;let E=S[_.id];if(!E||!c.has(E)&&!g.has(E))continue;let N=t.filter(w=>{if(w.source!==_.id&&w.target!==_.id)return!1;let k=w.source===_.id?w.target:w.source;return!Tl(k)});(N.length===0||N.every(w=>{let k=w.source===_.id?w.target:w.source;return g.has(k)}))&&g.add(_.id)}f=e.filter(_=>!g.has(_.id)),h=t.filter(_=>!g.has(_.source)&&!g.has(_.target))}let y=D3(n,o,f,r);if(y.length===0)return{nodes:f,edges:h};for(let g of y){let S=u[g.id]??0,_=c.has(g.id);if(g.data.childCount=S,g.data.isCollapsed=_,l){let E=g.id;g.data.onToggleCollapse=()=>l(E)}if(s){let E=g.id;g.data.onToggleFold=N=>s(E,N)}}let b=[...y,...f],x={};for(let g of b)x[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 S=x[g];return p[g]=S&&S.parentId?1+m(S.parentId):0,v.delete(g),p[g]}for(let g of b)m(g.id);return b.sort((g,S)=>p[g.id]-p[S.id]),{nodes:b,edges:h}}var dT={"--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace'},M3={...dT,"--surface-page":"#0a0a0a","--surface-panel":"#111118","--surface-overlay":"rgba(17, 17, 24, 0.8)","--surface-overlay-hover":"rgba(30, 30, 40, 0.9)","--surface-overlay-disabled":"rgba(17, 17, 24, 0.6)","--surface-elevated":"rgba(255, 255, 255, 0.06)","--surface-elevated-hover":"rgba(255, 255, 255, 0.1)","--surface-sunken":"rgba(255, 255, 255, 0.03)","--surface-pill":"rgba(255, 255, 255, 0.06)","--surface-pill-border":"rgba(255, 255, 255, 0.08)","--border-subtle":"rgba(255, 255, 255, 0.06)","--border-default":"rgba(255, 255, 255, 0.1)","--border-strong":"rgba(255, 255, 255, 0.18)","--border-dashed":"rgba(255, 255, 255, 0.15)","--text-primary":"#f8fafc","--text-default":"#e2e8f0","--text-secondary":"#cbd5e1","--text-muted":"#94a3b8","--text-dim":"#64748b","--text-on-accent":"#0e0e0e","--shadow-sm":"0 2px 8px rgba(0, 0, 0, 0.4)","--shadow-md":"0 4px 16px rgba(0, 0, 0, 0.6)","--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)","--focus-ring":"rgba(59, 130, 246, 0.6)","--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-error-border":"rgba(255,85,85,0.2)","--color-accent":"#8BE9FD","--color-accent-strong":"#3b82f6","--color-warning":"#FFB86C","--ctrl-sequence-border":"rgba(148, 163, 184, 0.25)","--ctrl-sequence-bg":"rgba(148, 163, 184, 0.03)","--ctrl-sequence-text":"#94a3b8","--ctrl-parallel-border":"rgba(139, 233, 253, 0.35)","--ctrl-parallel-bg":"rgba(139, 233, 253, 0.03)","--ctrl-parallel-text":"#8be9fd","--ctrl-condition-border":"rgba(251, 191, 36, 0.35)","--ctrl-condition-bg":"rgba(251, 191, 36, 0.03)","--ctrl-condition-text":"#fbbf24","--ctrl-batch-border":"rgba(167, 139, 250, 0.35)","--ctrl-batch-bg":"rgba(167, 139, 250, 0.03)","--ctrl-batch-text":"#a78bfa","--ctrl-folded-bg":"rgba(148, 163, 184, 0.25)","--ctrl-folded-border":"rgba(148, 163, 184, 0.4)","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8"},R3={...dT,"--surface-page":"#f8fafc","--surface-panel":"#ffffff","--surface-overlay":"rgba(255, 255, 255, 0.92)","--surface-overlay-hover":"rgba(241, 245, 249, 0.96)","--surface-overlay-disabled":"rgba(255, 255, 255, 0.7)","--surface-elevated":"rgba(15, 23, 42, 0.05)","--surface-elevated-hover":"rgba(15, 23, 42, 0.09)","--surface-sunken":"rgba(15, 23, 42, 0.03)","--surface-pill":"rgba(15, 23, 42, 0.05)","--surface-pill-border":"rgba(15, 23, 42, 0.1)","--border-subtle":"rgba(15, 23, 42, 0.08)","--border-default":"rgba(15, 23, 42, 0.12)","--border-strong":"rgba(15, 23, 42, 0.22)","--border-dashed":"rgba(15, 23, 42, 0.18)","--text-primary":"#020617","--text-default":"#0f172a","--text-secondary":"#1e293b","--text-muted":"#475569","--text-dim":"#64748b","--text-on-accent":"#ffffff","--shadow-sm":"0 2px 8px rgba(15, 23, 42, 0.08)","--shadow-md":"0 4px 16px rgba(15, 23, 42, 0.14)","--shadow-lg":"0 8px 24px rgba(15, 23, 42, 0.15)","--focus-ring":"rgba(2, 132, 199, 0.5)","--color-pipe":"#dc2626","--color-pipe-bg":"rgba(220, 38, 38, 0.1)","--color-pipe-text":"#ffffff","--color-stuff":"#0891b2","--color-stuff-bg":"rgba(8, 145, 178, 0.08)","--color-stuff-border":"#0e7490","--color-stuff-text":"#0f172a","--color-stuff-text-dim":"#475569","--color-edge":"#64748b","--color-batch-item":"#7c3aed","--color-batch-aggregate":"#15803d","--color-parallel-combine":"#6d28d9","--color-success":"#15803d","--color-success-bg":"rgba(21, 128, 61, 0.12)","--color-error":"#dc2626","--color-error-bg":"rgba(220, 38, 38, 0.1)","--color-error-border":"rgba(220, 38, 38, 0.25)","--color-accent":"#0284c7","--color-accent-strong":"#0284c7","--color-warning":"#d97706","--ctrl-sequence-border":"rgba(71, 85, 105, 0.3)","--ctrl-sequence-bg":"rgba(71, 85, 105, 0.04)","--ctrl-sequence-text":"#475569","--ctrl-parallel-border":"rgba(8, 145, 178, 0.4)","--ctrl-parallel-bg":"rgba(8, 145, 178, 0.05)","--ctrl-parallel-text":"#0e7490","--ctrl-condition-border":"rgba(217, 119, 6, 0.4)","--ctrl-condition-bg":"rgba(217, 119, 6, 0.05)","--ctrl-condition-text":"#b45309","--ctrl-batch-border":"rgba(124, 58, 237, 0.4)","--ctrl-batch-bg":"rgba(124, 58, 237, 0.05)","--ctrl-batch-text":"#6d28d9","--ctrl-folded-bg":"rgba(71, 85, 105, 0.18)","--ctrl-folded-border":"rgba(71, 85, 105, 0.35)","--color-bg":"#f8fafc","--color-bg-dots":"rgba(15, 23, 42, 0.18)","--color-text-muted":"#475569","--color-controller-text":"#475569"};function Xf(e){return e===ut.LIGHT?R3:M3}var Ql={direction:"LR",showControllers:!1,foldMode:Jn.EXPANDED,theme:ut.DARK,nodesep:50,ranksep:100,edgeType:Ac.DEFAULT,initialZoom:null,panToTop:!0};var Ma=le(he(),1);function O3(e){return e.kind==="pipe"?(0,Ma.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,Ma.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,Ma.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,Ma.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,Ma.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function Kl(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:O3(t.data.labelDescriptor)}}:t)}var $=le(he(),1),z3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,$.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),L3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),B3=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),H3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,$.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),k3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,$.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,$.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,$.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),P3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.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,$.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,$.jsx)("path",{d:"m7 16.5 5-3"}),(0,$.jsx)("path",{d:"M7 16.5v5.17"}),(0,$.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,$.jsx)("path",{d:"m17 16.5-5-3"}),(0,$.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,$.jsx)("path",{d:"M17 16.5v5.17"}),(0,$.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,$.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,$.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,$.jsx)("path",{d:"M12 13.5V8"})]}),G3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,$.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,$.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,$.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,$.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),U3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,$.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,$.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,$.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,$.jsx)("polyline",{points:"21 21 17 17 21 17"})]}),I3=(0,$.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,$.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,$.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,$.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,$.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,$.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,$.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,$.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,$.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,$.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),V3=(0,$.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,$.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function pT({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:l,onFoldAll:r,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,theme:d,onThemeChange:f,rightOffset:h=0}){let y=d!==void 0&&f!==void 0,b=d===ut.LIGHT?"Switch to dark theme":"Switch to light theme",x=e===Tn.TB||e===Tn.BT,p=x?"Switch to horizontal layout":"Switch to vertical layout",v=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",m=r||s,g=u?"Fold all controllers (nothing to fold)":"Fold all controllers",S=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,$.jsxs)("div",{className:"graph-toolbar",style:{right:`${h+8}px`},children:[r&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,disabled:u,title:g,"aria-label":g,children:G3}),s&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:S,"aria-label":S,children:U3}),m&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:v,"aria-label":v,children:P3}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(x?Tn.LR:Tn.TB),title:p,"aria-label":p,children:x?z3:L3}),(a||i||l)&&(0,$.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:B3}),i&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:H3}),l&&(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,title:"Fit view","aria-label":"Fit view",children:k3}),y&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"graph-toolbar-separator"}),(0,$.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>f(d===ut.LIGHT?ut.DARK:ut.LIGHT),title:b,"aria-label":b,children:d===ut.LIGHT?V3:I3})]})]})}var ti=le(he(),1),Y3={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function X3(e){return e?Y3[e]:{badge:"",icon:""}}function q3(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function Z3({data:e}){let t=X3(e.pipeType),n=q3(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>Ys,i=o?(e.childCount??0)-Ys:0;return(0,ti.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,ti.jsxs)("div",{className:"controller-group-header",children:[(0,ti.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,ti.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,ti.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,ti.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,ti.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var mT={controllerGroup:Z3};var hT=le(Ht(),1),Fe=le(he(),1),j3={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},$3={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function Q3(e){return e in $3}var K3={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"},canceled:{color:"#6272a4",label:"Canceled"}},mg=4;function F3(e){return j3[e]}function Dn({data:e,children:t}){let n=F3(e.pipeType),o=K3[e.status],i=e.status==="running",a=Q3(e.pipeType),[l,r]=(0,hT.useState)(!1),s=e.inputs.length>mg,u=s&&!l?e.inputs.slice(0,mg):e.inputs,c=e.inputs.length-mg,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,Fe.jsxs)("div",{className:`pipe-card ${d}${f}`,children:[(0,Fe.jsxs)("div",{className:"pipe-card-header",children:[(0,Fe.jsx)("span",{className:h,children:n}),(0,Fe.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Fe.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Fe.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Fe.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,Fe.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Fe.jsxs)("div",{className:"pipe-card-io",children:[(0,Fe.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Fe.jsxs)("div",{className:"pipe-card-io-pills",children:[u.map(y=>(0,Fe.jsxs)("span",{className:"pipe-card-io-pill",title:`${y.name}: ${y.concept}`,children:[(0,Fe.jsx)("span",{className:"pipe-card-io-pill-name",children:y.name}),(0,Fe.jsx)("span",{className:"pipe-card-io-pill-concept",children:y.concept})]},y.name)),s&&(0,Fe.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,Fe.jsxs)("div",{className:"pipe-card-io",children:[(0,Fe.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Fe.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(y=>(0,Fe.jsxs)("span",{className:"pipe-card-io-pill",title:`${y.name}: ${y.concept}`,children:[(0,Fe.jsx)("span",{className:"pipe-card-io-pill-name",children:y.name}),(0,Fe.jsx)("span",{className:"pipe-card-io-pill-concept",children:y.concept})]},y.name))})]}),t]})}var W3={PipeLLM:Dn,PipeExtract:Dn,PipeCompose:Dn,PipeImgGen:Dn,PipeSearch:Dn,PipeFunc:Dn,PipeSequence:Dn,PipeParallel:Dn,PipeCondition:Dn,PipeBatch:Dn};function gT(e){return W3[e]}var ni=le(he(),1);function J3({data:e}){let t=gT(e.pipeType)??Dn;return(0,ni.jsx)(t,{data:e})}function yT({data:e,sourcePosition:t=te.Bottom,targetPosition:n=te.Top}){let o=e.pipeCardData;return o?(0,ni.jsxs)(ni.Fragment,{children:[(0,ni.jsx)(wa,{type:"target",position:n}),(0,ni.jsx)(J3,{data:o}),(0,ni.jsx)(wa,{type:"source",position:t})]}):null}var Kt=le(he(),1),ez={...mT,pipeCard:yT};function tz({nodeId:e,stuffData:t,graphspec:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=t.concept&&n?Dh(n,t.concept):void 0;return(0,Kt.jsx)(Kt.Fragment,{children:l?(0,Kt.jsx)(sg,{concept:l,ioData:t,instanceKey:e,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):(0,Kt.jsx)(kf,{stuff:t,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})})}function nz(e,t){return e===Jn.FOLDED?new Set(t):new Set}function oz(e,t){return e??t??Ql.theme??ut.DARK}function Xs(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function qs(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 vT(e){let{graphspec:t,config:n=Ql,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:l=!1,theme:r,showThemeToggle:s=!0,onThemeChange:u,onNavigateToPipe:c,onStuffNodeClick:d,onReactFlowInit:f,statusMap:h,onNodeSelect:y,onPaneClick:b,renderDetailExtra:x,resolveStorageUrl:p,canEmbedPdf:v,onOpenExternally:m}=e,g=fe.default.useMemo(()=>t===null?null:Oc(t),[t]),[S,_]=fe.default.useState(()=>o??n.direction??Ql.direction??Tn.TB),E=oz(r,n.theme),[N,w]=fe.default.useState(E),k=fe.default.useRef(E);fe.default.useEffect(()=>{E!==k.current&&(k.current=E,w(E))},[E]);let M=fe.default.useRef(u);M.current=u;let z=fe.default.useRef(N);fe.default.useEffect(()=>{N!==z.current&&(z.current=N,M.current?.(N))},[N]);let U=a??n.foldMode??Ql.foldMode??Jn.EXPANDED,[T,A]=fe.default.useState(()=>U===Jn.FOLDED?!0:i??n.showControllers??Ql.showControllers??!1),D=fe.default.useRef(U);D.current=U;let O=fe.default.useRef(null),[R,L]=fe.default.useState(null),[I,P]=fe.default.useState(null),{width:V,isDragging:q,handleMouseDown:j}=FE({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:O});fe.default.useEffect(()=>{L(null),P(null)},[g]),fe.default.useEffect(()=>{let ye=O.current;if(!ye)return;let Q=Xf(N),ie=n.paletteColors,Ne=ie?{...Q,...ie}:Q;for(let[we,je]of Object.entries(Ne))ye.style.setProperty(we,je);return()=>{for(let we of Object.keys(Ne))ye.style.removeProperty(we)}},[n.paletteColors,N]);let[Z,re,ne]=xE([]),[X,F,ge]=SE([]),se=fe.default.useRef(null),J=fe.default.useRef(null),ee=fe.default.useRef(null),de=fe.default.useRef(null),[be,Ae]=fe.default.useState(new Set),Ie=fe.default.useCallback(ye=>{Ae(Q=>{let ie=new Set(Q);return ie.has(ye)?ie.delete(ye):ie.add(ye),ie})},[]),[He,ct]=fe.default.useState(new Set),ft=fe.default.useCallback((ye,Q)=>{ct(ie=>{let Ne=new Set(ie),we=!Ne.has(ye),je=ee.current,Nt=!Q?.soloMode&&je?.graphspec&&je.analysis?iT(ye,je.graphspec,je.analysis.controllerNodeIds):new Set([ye]);for(let $n of Nt)we?Ne.add($n):Ne.delete($n);return Ne})},[]),Mn=n.edgeType||Ac.DEFAULT,fn=fe.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),Gt=fe.default.useRef(T);Gt.current=T;let jn=fe.default.useRef(S);jn.current=S;let Ft=fe.default.useRef(fn);Ft.current=fn;let vt=fe.default.useRef(n.initialZoom);vt.current=n.initialZoom;let dt=fe.default.useRef(n.panToTop);dt.current=n.panToTop;let dn=fe.default.useRef(be);dn.current=be;let ao=fe.default.useRef(Ie);ao.current=Ie;let No=fe.default.useRef(He);No.current=He;let Rn=fe.default.useRef(ft);Rn.current=ft;let Xi=fe.default.useRef(!0),On=fe.default.useRef(0),lo=fe.default.useRef(!1),bt=fe.default.useRef(h);bt.current=h,fe.default.useEffect(()=>{if(!J.current)return;let ye=!1;return(async()=>{try{let Q=J.current;if(!Q)return;let ie=await Yf(Q.nodes,Q.edges,S,fn,Q._graphspec,Q._analysis);if(ye)return;de.current={nodes:ie.nodes,edges:ie.edges,controllerPositions:ie.controllerPositions};let Ne=$l(Xs(ie.nodes),ie.edges,Q._graphspec,Q._analysis,Gt.current,dn.current,ao.current,ie.controllerPositions,Rn.current);re(qs(ql(Kl(Ne.nodes)),bt.current)),F(Zl(Ne.edges)),setTimeout(()=>{!ye&&se.current&&se.current.fitView({padding:.1})},50)}catch(Q){console.error("[GraphViewer] ELK layout failed:",Q)}})(),()=>{ye=!0}},[S,fn]),fe.default.useEffect(()=>{if(!de.current||!J.current)return;let ye=Xs(de.current.nodes),Q=de.current.edges,ie=$l(ye,Q,J.current._graphspec,J.current._analysis,T,be,Ie,de.current.controllerPositions,ft);re(qs(ql(Kl(ie.nodes)),bt.current)),F(Zl(ie.edges))},[T,be,Ie,ft]),fe.default.useEffect(()=>{if(!g){J.current=null,ee.current=null,de.current=null,re([]),F([]);return}let ye=!1;Ae(new Set),dn.current=new Set;let{graphData:Q,analysis:ie}=nT(g,Mn);ee.current={nodes:Q.nodes,edges:Q.edges,analysis:ie,graphspec:g};let Ne=ie?nz(D.current,ie.controllerNodeIds):new Set;ct(Ne),No.current=Ne,lo.current=Ne.size>0,On.current=Ne.size,Ne.size>0&&!Gt.current&&(A(!0),Gt.current=!0);let we=Ne.size>0&&ie?ug({nodes:Q.nodes,edges:Q.edges},ie,g,Ne,Rn.current):{nodes:Q.nodes,edges:Q.edges,analysis:ie};return J.current={nodes:we.nodes,edges:we.edges,_analysis:we.analysis,_graphspec:g},(async()=>{try{let je=jn.current,Nt=Ft.current,so=we.nodes.some(Lt=>!Lt.position||Lt.position.x===0&&Lt.position.y===0)?await Yf(we.nodes,we.edges,je,Nt,g,we.analysis):{nodes:we.nodes,edges:we.edges,controllerPositions:{}};if(ye)return;de.current={nodes:so.nodes,edges:so.edges,controllerPositions:so.controllerPositions};let zt=$l(Xs(so.nodes),so.edges,g,we.analysis,Gt.current,dn.current,ao.current,so.controllerPositions,Rn.current);re(qs(ql(Kl(zt.nodes)),bt.current)),F(Zl(zt.edges)),setTimeout(()=>{if(!ye&&se.current&&(se.current.fitView({padding:.1}),vt.current!==void 0&&vt.current!==null&&se.current.zoomTo(vt.current),dt.current)){let Lt=se.current.getViewport();se.current.setViewport({x:Lt.x,y:20,zoom:Lt.zoom})}},100)}catch(je){console.error("[GraphViewer] ELK layout failed:",je)}})(),()=>{ye=!0}},[g,Mn]),fe.default.useEffect(()=>{if(Xi.current){Xi.current=!1,On.current=He.size;return}if(lo.current){lo.current=!1,On.current=He.size;return}let ye=On.current;if(On.current=He.size,ye===0&&He.size===0||!ee.current||!ee.current.analysis)return;let Q=ee.current,ie=Q.graphspec,Ne=Q.analysis;if(!ie||!Ne)return;let we=!1,je=ug({nodes:Q.nodes,edges:Q.edges},Ne,ie,He,ft);return J.current={nodes:je.nodes,edges:je.edges,_analysis:je.analysis,_graphspec:ie},(async()=>{try{let Nt=await Yf(je.nodes,je.edges,jn.current,Ft.current,ie,je.analysis);if(we)return;de.current={nodes:Nt.nodes,edges:Nt.edges,controllerPositions:Nt.controllerPositions};let $n=$l(Xs(Nt.nodes),Nt.edges,ie,je.analysis,Gt.current,dn.current,ao.current,Nt.controllerPositions,Rn.current);re(qs(ql(Kl($n.nodes)),bt.current)),F(Zl($n.edges)),setTimeout(()=>{!we&&se.current&&se.current.fitView({padding:.1})},50)}catch(Nt){console.error("[GraphViewer] ELK layout failed:",Nt)}})(),()=>{we=!0}},[He,ft]),fe.default.useEffect(()=>{if(!de.current||!J.current)return;let ye=Xs(de.current.nodes),Q=de.current.edges,ie=$l(ye,Q,J.current._graphspec,J.current._analysis,Gt.current,dn.current,ao.current,de.current.controllerPositions,Rn.current);re(qs(ql(Kl(ie.nodes)),h)),F(Zl(ie.edges))},[h]);let ro=fe.default.useCallback((ye,Q)=>{let ie=Q.data;if(y?.(Q.id,ie,ye),ie.isController||ie.isPipe){let Ne=ie.pipeCode||ie.labelText;Ne&&c&&c(Ne,ie.pipeCardData?.status)}else if(ie.isStuff&&d&&g){let Ne=ls(Q.id),we=Rh(g,Ne);we&&d(we)}if(P(null),R?.nodeId===Q.id&&!I)L(null);else if(ie.isPipe||ie.isController)L({kind:"pipe",nodeId:Q.id,nodeData:ie});else if(ie.isStuff&&g){let Ne=ls(Q.id),we=Rh(g,Ne);L({kind:"stuff",nodeId:Q.id,nodeData:ie,stuffData:we??void 0})}re(Ne=>Ne.map(we=>({...we,selected:we.id===Q.id})))},[re,c,y,d,g,R,I]),qi=fe.default.useCallback(ye=>{se.current=ye,f&&f(ye)},[f]),oi=fe.default.useCallback(()=>{L(null),P(null),b?.()},[b]),Fl=fe.default.useCallback(ye=>{if(!g)return;let Q=Dh(g,ye);Q&&P(Q)},[g]),Co=R?.kind==="pipe"&&g?g.nodes.find(ye=>ye.pipe_code===R.nodeData.pipeCode):void 0,wo=R!==null||I!==null,pn=ee.current?.analysis?.controllerNodeIds,ii=fe.default.useMemo(()=>!T||!pn||pn.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>ct(new Set(pn)),onExpandAll:()=>ct(new Set),foldAllDisabled:He.size===pn.size,expandAllDisabled:He.size===0},[T,pn,He]);return(0,Kt.jsxs)("div",{ref:O,className:`react-flow-container react-flow-container--theme-${N}`,children:[(0,Kt.jsx)(bE,{nodes:Z,edges:X,nodeTypes:ez,onNodesChange:ne,onEdgesChange:ge,onNodeClick:ro,onPaneClick:oi,onInit:qi,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:Mn},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:(0,Kt.jsx)(EE,{variant:_o.Dots,gap:20,size:1,color:"var(--color-bg-dots)"})}),(0,Kt.jsxs)(KE,{isOpen:wo,onClose:oi,width:V,isDragging:q,onResizeHandleMouseDown:j,children:[I?(0,Kt.jsx)(sg,{concept:I}):Co&&g?(0,Kt.jsx)(tT,{node:Co,spec:g,onConceptClick:Fl}):R?.stuffData?(0,Kt.jsx)(tz,{nodeId:R.nodeId,stuffData:R.stuffData,graphspec:g,resolveStorageUrl:p,canEmbedPdf:v,onOpenExternally:m}):null,x&&R&&!I&&x(R.nodeId,R.nodeData)]}),!l&&(0,Kt.jsx)(pT,{direction:S,onDirectionChange:_,showControllers:T,onShowControllersChange:A,onZoomIn:()=>se.current?.zoomIn(),onZoomOut:()=>se.current?.zoomOut(),onFitView:()=>se.current?.fitView({padding:.1}),onFoldAll:ii.onFoldAll,onExpandAll:ii.onExpandAll,foldAllDisabled:ii.foldAllDisabled,expandAllDisabled:ii.expandAllDisabled,theme:s?N:void 0,onThemeChange:s?w:void 0,rightOffset:wo?V:0})]})}function iz(e){if(e==null)return Jn.EXPANDED;if(e===Jn.FOLDED||e===Jn.EXPANDED||e===Jn.AUTO)return e;throw new Error(`Invalid foldMode in standalone config: ${JSON.stringify(e)} \u2014 expected one of "folded", "expanded", "auto".`)}function az(e){return e===ut.LIGHT||e===ut.DARK?e:ut.DARK}function lz(e){if(e==null)return Tn.LR;if(e===Tn.LR||e===Tn.RL||e===Tn.TB||e===Tn.BT)return e;throw new Error(`Invalid direction in standalone config: ${JSON.stringify(e)} \u2014 expected one of "TB", "BT", "LR", "RL".`)}function hg(e,t){let n=e&&typeof e=="object"?e:{},o=lz(n.direction),i=!!n.showControllers,a=iz(n.foldMode),l=az(n.theme);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a,theme:l},initialDirection:o,initialShowControllers:i,initialFoldMode:a,theme:l}}var gg=["dark","light","system"];function rz(e){return e==="dark"||e==="light"||e==="system"}function bT(e){let t=rz(e)?e:"dark",n=gg.indexOf(t);return gg[(n+1)%gg.length]}function xT(e,t){return e==="dark"?ut.DARK:e==="light"?ut.LIGHT:t()?ut.DARK:ut.LIGHT}var Yi=hg({},null),qf=null;function ST(e){let t=document.getElementById(e);if(!t?.textContent)return null;try{return JSON.parse(t.textContent)}catch(n){let o=n instanceof Error?n.message:String(n);throw new Error(`Failed to parse JSON from <script id="${e}">: ${o}`)}}function yg(e,t){let n=Xf(e),o=t?{...n,...t}:n;for(let[i,a]of Object.entries(o))document.body.style.setProperty(i,a)}function sz(){return vg.default.createElement(vT,{...Yi,onThemeChange:e=>{yg(e,Yi.config.paletteColors)}})}function _T(){let e=document.getElementById("root");if(!e)return;let t=(0,ET.createRoot)(e);qf=()=>{t.render(vg.default.createElement(sz))},qf(),setTimeout(()=>{let i=ST("pipelex-config"),a=ST("pipelex-graphspec"),l=a===null?null:Oc(a);Yi=hg(i,l),yg(Yi.theme,Yi.config.paletteColors),qf?.()},0);let n=()=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-color-scheme: dark)").matches,o=i=>{document.body.setAttribute("data-theme",i);let a=document.getElementById("theme-toggle")?.querySelector(".theme-label");a&&(a.textContent=i);let l=xT(i,n);Yi={...Yi,theme:l},yg(l,Yi.config.paletteColors),qf?.()};if(document.getElementById("theme-toggle")?.addEventListener("click",()=>{o(bT(document.body.getAttribute("data-theme")))}),typeof window<"u"&&typeof window.matchMedia=="function"){let i=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>{document.body.getAttribute("data-theme")==="system"&&o("system")};typeof i.addEventListener=="function"&&i.addEventListener("change",a)}}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_T):_T();})();
|
|
2472
|
+
`)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return(0,B.useEffect)(()=>{let s=t?.target??C_,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)&&mh(h))return!1;let b=A_(h.code,r);if(a.current.add(h[b]),w_(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 v=A_(h.code,r);w_(l,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(h[v]),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 w_(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 TD=()=>{let e=Qe();return(0,B.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=Bs(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 Yl(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=Ls(t,n);return{x:l.x+i,y:l.y+a}}}),[])};function K_(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)ND(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 ND(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 Q_(e,t){return K_(e,t)}function F_(e,t){return K_(e,t)}function wa(e,t){return{id:e,type:"select",selected:t}}function Zl(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(wa(a.id,l)))}return o}function M_({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 D_(e){return{id:e.id,type:"remove"}}var R_=e=>Ox(e),CD=e=>oh(e);function W_(e){return(0,B.forwardRef)(e)}var wD=typeof window<"u"?B.useLayoutEffect:B.useEffect;function O_(e){let[t,n]=(0,B.useState)(BigInt(0)),[o]=(0,B.useState)(()=>AD(()=>n(i=>i+BigInt(1))));return wD(()=>{let i=o.get();i.length&&(e(i),o.reset())},[t]),o}function AD(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var J_=(0,B.createContext)(null);function MD({children:e}){let t=Qe(),n=(0,B.useCallback)(r=>{let{nodes:s=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:v}=t.getState(),b=s;for(let p of r)b=typeof p=="function"?p(b):p;let S=M_({items:b,lookup:f});for(let p of v.values())S=p(S);c&&u(b),S.length>0?d?.(S):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:p,nodes:y,setNodes:m}=t.getState();p&&m(y)})},[]),o=O_(n),i=(0,B.useCallback)(r=>{let{edges:s=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState(),h=s;for(let v of r)h=typeof v=="function"?v(h):v;c?u(h):d&&d(M_({items:h,lookup:f}))},[]),a=O_(i),l=(0,B.useMemo)(()=>({nodeQueue:o,edgeQueue:a}),[]);return(0,H.jsx)(J_.Provider,{value:l,children:e})}function DD(){let e=(0,B.useContext)(J_);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var RD=e=>!!e.panZoom;function Ah(){let e=TD(),t=Qe(),n=DD(),o=we(RD),i=(0,B.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(),v=R_(d)?d:f.get(d.id),b=v.parentId?fh(v.position,v.measured,v.parentId,f,h):v.position,S={...v,position:b,width:v.measured?.width??v.width,height:v.measured?.height??v.height};return Ca(S)},u=(d,f,h={replace:!1})=>{l(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&R_(S)?S:{...b,...S}}return b}))},c=(d,f,h={replace:!1})=>{r(v=>v.map(b=>{if(b.id===d){let S=typeof f=="function"?f(b):f;return h.replace&&CD(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(),[v,b,S]=h;return{nodes:d.map(p=>({...p})),edges:f.map(p=>({...p})),viewport:{x:v,y:b,zoom:S}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{let{nodes:h,edges:v,onNodesDelete:b,onEdgesDelete:S,triggerNodeChanges:p,triggerEdgeChanges:y,onDelete:m,onBeforeDelete:g}=t.getState(),{nodes:x,edges:_}=await Hx({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:v,onBeforeDelete:g}),E=_.length>0,w=x.length>0;if(E){let N=_.map(D_);S?.(_),y(N)}if(w){let N=x.map(D_);b?.(x),p(N)}return(w||E)&&m?.({nodes:x,edges:_}),{deletedNodes:x,deletedEdges:_}},getIntersectingNodes:(d,f=!0,h)=>{let v=sh(d),b=v?d:s(d),S=h!==void 0;return b?(h||t.getState().nodes).filter(p=>{let y=t.getState().nodeLookup.get(p.id);if(y&&!v&&(p.id===d.id||!y.internals.positionAbsolute))return!1;let m=Ca(S?p:y),g=Il(m,b);return f&&g>0||g>=m.width*m.height||g>=b.width*b.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{let b=sh(d)?d:s(d);if(!b)return!1;let S=Il(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,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,v=>{let b=typeof f=="function"?f(v):f;return h.replace?{...v,data:b}:{...v,data:{...v.data,...b}}},h)},getNodesBounds:d=>{let{nodeLookup:f,nodeOrigin:h}=t.getState();return ah(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??Gx();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return(0,B.useMemo)(()=>({...i,...e,viewportInitialized:o}),[o])}var z_=e=>e.selected,OD=typeof window<"u"?window:void 0;function zD({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=Qe(),{deleteElements:o}=Ah(),i=Gs(e,{actInsideInputWithModifier:!1}),a=Gs(t,{target:OD});(0,B.useEffect)(()=>{if(i){let{edges:l,nodes:r}=n.getState();o({nodes:r.filter(z_),edges:l.filter(z_)}),n.setState({nodesSelectionActive:!1})}},[i]),(0,B.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}function LD(e){let t=Qe();(0,B.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let o=vf(e.current);(o.height===0||o.width===0)&&t.getState().onError?.("004",Mn.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 zf={position:"absolute",width:"100%",height:"100%",top:0,left:0},HD=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function BD({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=ti.Free,zoomOnDoubleClick:l=!0,panOnDrag:r=!0,defaultViewport:s,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:v,noWheelClassName:b,noPanClassName:S,onViewportChange:p,isControlledViewport:y,paneClickDistance:m,selectionOnDrag:g}){let x=Qe(),_=(0,B.useRef)(null),{userSelectionActive:E,lib:w,connectionInProgress:N}=we(HD,je),k=Gs(f),D=(0,B.useRef)();LD(_);let z=(0,B.useCallback)(P=>{p?.({x:P[0],y:P[1],zoom:P[2]}),y||x.setState({transform:P})},[p,y]);return(0,B.useEffect)(()=>{if(_.current){D.current=i_({domNode:_.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:s,onDraggingChange:M=>x.setState(O=>O.paneDragging===M?O:{paneDragging:M}),onPanZoomStart:(M,O)=>{let{onViewportChangeStart:R,onMoveStart:L}=x.getState();L?.(M,O),R?.(O)},onPanZoom:(M,O)=>{let{onViewportChange:R,onMove:L}=x.getState();L?.(M,O),R?.(O)},onPanZoomEnd:(M,O)=>{let{onViewportChangeEnd:R,onMoveEnd:L}=x.getState();L?.(M,O),R?.(O)}});let{x:P,y:T,zoom:A}=D.current.getViewport();return x.setState({panZoom:D.current,transform:[P,T,A],domNode:_.current.closest(".react-flow")}),()=>{D.current?.destroy()}}},[]),(0,B.useEffect)(()=>{D.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:l,panOnDrag:r,zoomActivationKeyPressed:k,preventScrolling:h,noPanClassName:S,userSelectionActive:E,noWheelClassName:b,lib:w,onTransformChange:z,connectionInProgress:N,selectionOnDrag:g,paneClickDistance:m})},[e,t,n,o,i,a,l,r,k,h,S,E,b,w,z,N,g,m]),(0,H.jsx)("div",{className:"react-flow__renderer",ref:_,style:zf,children:v})}var kD=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function GD(){let{userSelectionActive:e,userSelectionRect:t}=we(kD,je);return e&&t?(0,H.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 Nh=(e,t)=>n=>{n.target===t.current&&e?.(n)},PD=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function UD({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Ta.Full,panOnDrag:o,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:l,onSelectionEnd:r,onPaneClick:s,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:v}){let b=Qe(),{userSelectionActive:S,elementsSelectable:p,dragging:y,connectionInProgress:m}=we(PD,je),g=p&&(e||S),x=(0,B.useRef)(null),_=(0,B.useRef)(),E=(0,B.useRef)(new Set),w=(0,B.useRef)(new Set),N=(0,B.useRef)(!1),k=R=>{if(N.current||m){N.current=!1;return}s?.(R),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},D=R=>{if(Array.isArray(o)&&o?.includes(2)){R.preventDefault();return}u?.(R)},z=c?R=>c(R):void 0,P=R=>{N.current&&(R.stopPropagation(),N.current=!1)},T=R=>{let{domNode:L}=b.getState();if(_.current=L?.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),N.current=!1;let{x:q,y:j}=Zn(R.nativeEvent,_.current);b.setState({userSelectionRect:{width:0,height:0,startX:q,startY:j,x:q,y:j}}),V||(R.stopPropagation(),R.preventDefault())},A=R=>{let{userSelectionRect:L,transform:V,nodeLookup:G,edgeLookup:I,connectionLookup:q,triggerNodeChanges:j,triggerEdgeChanges:$,defaultEdgeOptions:fe,resetSelectedElements:J}=b.getState();if(!_.current||!L)return;let{x:X,y:Q}=Zn(R.nativeEvent,_.current),{startX:ye,startY:me}=L;if(!N.current){let Se=t?0:i;if(Math.hypot(X-ye,Q-me)<=Se)return;J(),l?.(R)}N.current=!0;let ee={startX:ye,startY:me,x:X<ye?X:ye,y:Q<me?Q:me,width:Math.abs(X-ye),height:Math.abs(Q-me)},ae=E.current,se=w.current;E.current=new Set(hf(G,ee,V,n===Ta.Partial,!0).map(Se=>Se.id)),w.current=new Set;let de=fe?.selectable??!0;for(let Se of E.current){let Ae=q.get(Se);if(Ae)for(let{edgeId:rt}of Ae.values()){let Nt=I.get(rt);Nt&&(Nt.selectable??de)&&w.current.add(rt)}}if(!dh(ae,E.current)){let Se=Zl(G,E.current,!0);j(Se)}if(!dh(se,w.current)){let Se=Zl(I,w.current);$(Se)}b.setState({userSelectionRect:ee,userSelectionActive:!0,nodesSelectionActive:!1})},M=R=>{R.button===0&&(R.target?.releasePointerCapture?.(R.pointerId),!S&&R.target===x.current&&b.getState().userSelectionRect&&k?.(R),b.setState({userSelectionActive:!1,userSelectionRect:null}),N.current&&(r?.(R),b.setState({nodesSelectionActive:E.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return(0,H.jsxs)("div",{className:nt(["react-flow__pane",{draggable:O,dragging:y,selection:e}]),onClick:g?void 0:Nh(k,x),onContextMenu:Nh(D,x),onWheel:Nh(z,x),onPointerEnter:g?void 0:d,onPointerMove:g?A:f,onPointerUp:g?M:void 0,onPointerDownCapture:g?T:void 0,onClickCapture:g?P:void 0,onPointerLeave:h,ref:x,style:zf,children:[v,(0,H.jsx)(GD,{})]})}function wh({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",Mn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):i([e])}function eE({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:i,isSelectable:a,nodeClickDistance:l}){let r=Qe(),[s,u]=(0,B.useState)(!1),c=(0,B.useRef)();return(0,B.useEffect)(()=>{c.current=Qx({getStoreItems:()=>r.getState(),onNodeMouseDown:d=>{wh({id:d,store:r,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),(0,B.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 ID=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function tE(){let e=Qe();return(0,B.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=ID(l),h=i?a[0]:5,v=i?a[1]:5,b=n.direction.x*h*n.factor,S=n.direction.y*v*n.factor;for(let[,p]of u){if(!f(p))continue;let y={x:p.internals.positionAbsolute.x+b,y:p.internals.positionAbsolute.y+S};i&&(y=Vl(y,a));let{position:m,positionAbsolute:g}=lh({nodeId:p.id,nextPosition:y,nodeLookup:u,nodeExtent:o,nodeOrigin:c,onError:r});p.position=m,p.internals.positionAbsolute=g,d.set(p.id,p)}s(d)},[])}var Mh=(0,B.createContext)(null),VD=Mh.Provider;Mh.Consumer;var nE=()=>(0,B.useContext)(Mh),YD=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),XD=(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===Vi.Strict?r?.type!==n:e!==r?.nodeId||t!==r?.id,connectionInProcess:!!r,clickConnectionInProcess:!!i,valid:c&&u}};function qD({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 v=l||null,b=e==="target",S=Qe(),p=nE(),{connectOnClick:y,noPanClassName:m,rfId:g}=we(YD,je),{connectingFrom:x,connectingTo:_,clickConnecting:E,isPossibleEndHandle:w,connectionInProcess:N,clickConnectionInProcess:k,valid:D}=we(XD(p,v,e),je);p||S.getState().onError?.("010",Mn.error010());let z=A=>{let{defaultEdgeOptions:M,onConnect:O,hasDefaultEdges:R}=S.getState(),L={...M,...A};if(R){let{edges:V,setEdges:G}=S.getState();G(yh(L,V))}O?.(L),r?.(L)},P=A=>{if(!p)return;let M=hh(A.nativeEvent);if(i&&(M&&A.button===0||!M)){let O=S.getState();Nf.onPointerDown(A.nativeEvent,{handleDomNode:A.currentTarget,autoPanOnConnect:O.autoPanOnConnect,connectionMode:O.connectionMode,connectionRadius:O.connectionRadius,domNode:O.domNode,nodeLookup:O.nodeLookup,lib:O.lib,isTarget:b,handleId:v,nodeId:p,flowId:O.rfId,panBy:O.panBy,cancelConnection:O.cancelConnection,onConnectStart:O.onConnectStart,onConnectEnd:(...R)=>S.getState().onConnectEnd?.(...R),updateConnection:O.updateConnection,onConnect:z,isValidConnection:n||((...R)=>S.getState().isValidConnection?.(...R)??!0),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:O.autoPanSpeed,dragThreshold:O.connectionDragThreshold})}M?c?.(A):d?.(A)},T=A=>{let{onClickConnectStart:M,onClickConnectEnd:O,connectionClickStartHandle:R,connectionMode:L,isValidConnection:V,lib:G,rfId:I,nodeLookup:q,connection:j}=S.getState();if(!p||!R&&!i)return;if(!R){M?.(A.nativeEvent,{nodeId:p,handleId:v,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:p,type:e,id:v}});return}let $=ph(A.target),fe=n||V,{connection:J,isValid:X}=Nf.isValid(A.nativeEvent,{handle:{nodeId:p,id:v,type:e},connectionMode:L,fromNodeId:R.nodeId,fromHandleId:R.id||null,fromType:R.type,isValidConnection:fe,flowId:I,doc:$,lib:G,nodeLookup:q});X&&J&&z(J);let Q=structuredClone(j);delete Q.inProgress,Q.toPosition=Q.toHandle?Q.toHandle.position:null,O?.(A,Q),S.setState({connectionClickStartHandle:null})};return(0,H.jsx)("div",{"data-handleid":v,"data-nodeid":p,"data-handlepos":t,"data-id":`${g}-${p}-${v}-${e}`,className:nt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",m,u,{source:!b,target:b,connectable:o,connectablestart:i,connectableend:a,clickconnecting:E,connectingfrom:x,connectingto:_,valid:D,connectionindicator:o&&(!N||w)&&(N||k?a:i)}]),onMouseDown:P,onTouchStart:P,onClick:y?T:void 0,ref:h,...f,children:s})}var Aa=(0,B.memo)(W_(qD));function ZD({data:e,isConnectable:t,sourcePosition:n=W.Bottom}){return(0,H.jsxs)(H.Fragment,{children:[e?.label,(0,H.jsx)(Aa,{type:"source",position:n,isConnectable:t})]})}function jD({data:e,isConnectable:t,targetPosition:n=W.Top,sourcePosition:o=W.Bottom}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Aa,{type:"target",position:n,isConnectable:t}),e?.label,(0,H.jsx)(Aa,{type:"source",position:o,isConnectable:t})]})}function $D(){return null}function KD({data:e,isConnectable:t,targetPosition:n=W.Top}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Aa,{type:"target",position:n,isConnectable:t}),e?.label]})}var Df={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},L_={input:ZD,default:jD,output:KD,group:$D};function QD(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 FD=e=>{let{width:t,height:n,x:o,y:i}=Ul(e.nodeLookup,{filter:a=>!!a.selected});return{width:qn(t)?t:null,height:qn(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 WD({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let o=Qe(),{width:i,height:a,transformString:l,userSelectionActive:r}=we(FD,je),s=tE(),u=(0,B.useRef)(null);(0,B.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!r&&i!==null&&a!==null;if(eE({nodeRef:u,disabled:!c}),!c)return null;let d=e?h=>{let v=o.getState().nodes.filter(b=>b.selected);e(h,v)}:void 0,f=h=>{Object.prototype.hasOwnProperty.call(Df,h.key)&&(h.preventDefault(),s({direction:Df[h.key],factor:h.shiftKey?4:1}))};return(0,H.jsx)("div",{className:nt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:(0,H.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 H_=typeof window<"u"?window:void 0,JD=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function oE({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:v,panActivationKeyCode:b,zoomActivationKeyCode:S,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:g,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:w,defaultViewport:N,translateExtent:k,minZoom:D,maxZoom:z,preventScrolling:P,onSelectionContextMenu:T,noWheelClassName:A,noPanClassName:M,disableKeyboardA11y:O,onViewportChange:R,isControlledViewport:L}){let{nodesSelectionActive:V,userSelectionActive:G}=we(JD,je),I=Gs(u,{target:H_}),q=Gs(b,{target:H_}),j=q||w,$=q||g,fe=c&&j!==!0,J=I||G||fe;return zD({deleteKeyCode:s,multiSelectionKeyCode:v}),(0,H.jsx)(BD,{onPaneContextMenu:a,elementsSelectable:p,zoomOnScroll:y,zoomOnPinch:m,panOnScroll:$,panOnScrollSpeed:x,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!I&&j,defaultViewport:N,translateExtent:k,minZoom:D,maxZoom:z,zoomActivationKeyCode:S,preventScrolling:P,noWheelClassName:A,noPanClassName:M,onViewportChange:R,isControlledViewport:L,paneClickDistance:r,selectionOnDrag:fe,children:(0,H.jsxs)(UD,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:j,isSelecting:!!J,selectionMode:d,selectionKeyPressed:I,paneClickDistance:r,selectionOnDrag:fe,children:[e,V&&(0,H.jsx)(WD,{onSelectionContextMenu:T,noPanClassName:M,disableKeyboardA11y:O})]})})}oE.displayName="FlowRenderer";var eR=(0,B.memo)(oE),tR=e=>t=>e?hf(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 nR(e){return we((0,B.useCallback)(tR(e),[e]),je)}var oR=e=>e.updateNodeInternals;function iR(){let e=we(oR),[t]=(0,B.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,B.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function aR({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){let i=Qe(),a=(0,B.useRef)(null),l=(0,B.useRef)(null),r=(0,B.useRef)(e.sourcePosition),s=(0,B.useRef)(e.targetPosition),u=(0,B.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,B.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,B.useEffect)(()=>()=>{l.current&&(o?.unobserve(l.current),l.current=null)},[]),(0,B.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 lR({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:v,rfId:b,nodeTypes:S,nodeClickDistance:p,onError:y}){let{node:m,internals:g,isParent:x}=we(X=>{let Q=X.nodeLookup.get(e),ye=X.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:ye}},je),_=m.type||"default",E=S?.[_]||L_[_];E===void 0&&(y?.("003",Mn.error003(_)),_="default",E=S?.default||L_.default);let w=!!(m.draggable||r&&typeof m.draggable>"u"),N=!!(m.selectable||s&&typeof m.selectable>"u"),k=!!(m.connectable||u&&typeof m.connectable>"u"),D=!!(m.focusable||c&&typeof m.focusable>"u"),z=Qe(),P=ch(m),T=aR({node:m,nodeType:_,hasDimensions:P,resizeObserver:d}),A=eE({nodeRef:T,disabled:m.hidden||!w,noDragClassName:f,handleSelector:m.dragHandle,nodeId:e,isSelectable:N,nodeClickDistance:p}),M=tE();if(m.hidden)return null;let O=_o(m),R=QD(m),L=N||w||t||n||o||i,V=n?X=>n(X,{...g.userNode}):void 0,G=o?X=>o(X,{...g.userNode}):void 0,I=i?X=>i(X,{...g.userNode}):void 0,q=a?X=>a(X,{...g.userNode}):void 0,j=l?X=>l(X,{...g.userNode}):void 0,$=X=>{let{selectNodesOnDrag:Q,nodeDragThreshold:ye}=z.getState();N&&(!Q||!w||ye>0)&&wh({id:e,store:z,nodeRef:T}),t&&t(X,{...g.userNode})},fe=X=>{if(!(mh(X.nativeEvent)||v)){if(Jm.includes(X.key)&&N){let Q=X.key==="Escape";wh({id:e,store:z,unselect:Q,nodeRef:T})}else if(w&&m.selected&&Object.prototype.hasOwnProperty.call(Df,X.key)){X.preventDefault();let{ariaLabelConfig:Q}=z.getState();z.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:X.key.replace("Arrow","").toLowerCase(),x:~~g.positionAbsolute.x,y:~~g.positionAbsolute.y})}),M({direction:Df[X.key],factor:X.shiftKey?4:1})}}},J=()=>{if(v||!T.current?.matches(":focus-visible"))return;let{transform:X,width:Q,height:ye,autoPanOnNodeFocus:me,setCenter:ee}=z.getState();if(!me)return;hf(new Map([[e,m]]),{x:0,y:0,width:Q,height:ye},X,!0).length>0||ee(m.position.x+O.width/2,m.position.y+O.height/2,{zoom:X[2]})};return(0,H.jsx)("div",{className:nt(["react-flow__node",`react-flow__node-${_}`,{[h]:w},m.className,{selected:m.selected,selectable:N,parent:x,draggable:w,dragging:A}]),ref:T,style:{zIndex:g.z,transform:`translate(${g.positionAbsolute.x}px,${g.positionAbsolute.y}px)`,pointerEvents:L?"all":"none",visibility:P?"visible":"hidden",...m.style,...R},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:V,onMouseMove:G,onMouseLeave:I,onContextMenu:q,onClick:$,onDoubleClick:j,onKeyDown:D?fe:void 0,tabIndex:D?0:void 0,onFocus:D?J:void 0,role:m.ariaRole??(D?"group":void 0),"aria-roledescription":"node","aria-describedby":v?void 0:`${Z_}-${b}`,"aria-label":m.ariaLabel,...m.domAttributes,children:(0,H.jsx)(VD,{value:e,children:(0,H.jsx)(E,{id:e,data:m.data,type:_,positionAbsoluteX:g.positionAbsolute.x,positionAbsoluteY:g.positionAbsolute.y,selected:m.selected??!1,selectable:N,draggable:w,deletable:m.deletable??!0,isConnectable:k,sourcePosition:m.sourcePosition,targetPosition:m.targetPosition,dragging:A,dragHandle:m.dragHandle,zIndex:g.z,parentId:m.parentId,...O})})})}var rR=(0,B.memo)(lR),sR=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function iE(e){let{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:a}=we(sR,je),l=nR(e.onlyRenderVisibleElements),r=iR();return(0,H.jsx)("div",{className:"react-flow__nodes",style:zf,children:l.map(s=>(0,H.jsx)(rR,{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))})}iE.displayName="NodeRenderer";var uR=(0,B.memo)(iE);function cR(e){return we((0,B.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&&Ix({sourceNode:a,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&o.push(i.id)}return o},[e]),je)}var fR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,H.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},dR=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,H.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},B_={[Bl.Arrow]:fR,[Bl.ArrowClosed]:dR};function pR(e){let t=Qe();return(0,B.useMemo)(()=>Object.prototype.hasOwnProperty.call(B_,e)?B_[e]:(t.getState().onError?.("009",Mn.error009(e)),null),[e])}var mR=({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=pR(t);return s?(0,H.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,H.jsx)(s,{color:n,strokeWidth:l})}):null},aE=({defaultColor:e,rfId:t})=>{let n=we(a=>a.edges),o=we(a=>a.defaultEdgeOptions),i=(0,B.useMemo)(()=>Yx(n,{id:t,defaultColor:e,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[n,o,t,e]);return i.length?(0,H.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,H.jsx)("defs",{children:i.map(a=>(0,H.jsx)(mR,{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};aE.displayName="MarkerDefinitions";var hR=(0,B.memo)(aE);function lE({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,B.useState)({x:1,y:0,width:0,height:0}),h=nt(["react-flow__edge-textwrapper",u]),v=(0,B.useRef)(null);return(0,B.useEffect)(()=>{if(v.current){let b=v.current.getBBox();f({x:b.x,y:b.y,width:b.width,height:b.height})}},[n]),n?(0,H.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[i&&(0,H.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,H.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:v,style:o,children:n}),s]}):null}lE.displayName="EdgeText";var gR=(0,B.memo)(lE);function Lf({path:e,labelX:t,labelY:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s,interactionWidth:u=20,...c}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("path",{...c,d:e,fill:"none",className:nt(["react-flow__edge-path",c.className])}),u?(0,H.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,o&&qn(t)&&qn(n)?(0,H.jsx)(gR,{x:t,y:n,label:o,labelStyle:i,labelShowBg:a,labelBgStyle:l,labelBgPadding:r,labelBgBorderRadius:s}):null]})}function k_({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 rE({sourceX:e,sourceY:t,sourcePosition:n=W.Bottom,targetX:o,targetY:i,targetPosition:a=W.Top}){let[l,r]=k_({pos:n,x1:e,y1:t,x2:o,y2:i}),[s,u]=k_({pos:a,x1:o,y1:i,x2:e,y2:t}),[c,d,f,h]=bf({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 sE(e){return(0,B.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:v,markerEnd:b,markerStart:S,interactionWidth:p})=>{let[y,m,g]=rE({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r}),x=e.isInternal?void 0:t;return(0,H.jsx)(Lf,{id:x,path:y,labelX:m,labelY:g,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:p})})}var yR=sE({isInternal:!1}),uE=sE({isInternal:!0});yR.displayName="SimpleBezierEdge";uE.displayName="SimpleBezierEdgeInternal";function cE(e){return(0,B.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:v=W.Top,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:y})=>{let[m,g,x]=ks({sourceX:n,sourceY:o,sourcePosition:h,targetX:i,targetY:a,targetPosition:v,borderRadius:p?.borderRadius,offset:p?.offset,stepPosition:p?.stepPosition}),_=e.isInternal?void 0:t;return(0,H.jsx)(Lf,{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:y})})}var fE=cE({isInternal:!1}),dE=cE({isInternal:!0});fE.displayName="SmoothStepEdge";dE.displayName="SmoothStepEdgeInternal";function pE(e){return(0,B.memo)(({id:t,...n})=>{let o=e.isInternal?void 0:t;return(0,H.jsx)(fE,{...n,id:o,pathOptions:(0,B.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var vR=pE({isInternal:!1}),mE=pE({isInternal:!0});vR.displayName="StepEdge";mE.displayName="StepEdgeInternal";function hE(e){return(0,B.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:v,interactionWidth:b})=>{let[S,p,y]=xf({sourceX:n,sourceY:o,targetX:i,targetY:a}),m=e.isInternal?void 0:t;return(0,H.jsx)(Lf,{id:m,path:S,labelX:p,labelY:y,label:l,labelStyle:r,labelShowBg:s,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:v,interactionWidth:b})})}var bR=hE({isInternal:!1}),gE=hE({isInternal:!0});bR.displayName="StraightEdge";gE.displayName="StraightEdgeInternal";function yE(e){return(0,B.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:v,markerEnd:b,markerStart:S,pathOptions:p,interactionWidth:y})=>{let[m,g,x]=Sf({sourceX:n,sourceY:o,sourcePosition:l,targetX:i,targetY:a,targetPosition:r,curvature:p?.curvature}),_=e.isInternal?void 0:t;return(0,H.jsx)(Lf,{id:_,path:m,labelX:g,labelY:x,label:s,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:v,markerEnd:b,markerStart:S,interactionWidth:y})})}var SR=yE({isInternal:!1}),vE=yE({isInternal:!0});SR.displayName="BezierEdge";vE.displayName="BezierEdgeInternal";var G_={default:vE,straight:gE,step:mE,smoothstep:dE,simplebezier:uE},P_={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},xR=(e,t,n)=>n===W.Left?e-t:n===W.Right?e+t:e,_R=(e,t,n)=>n===W.Top?e-t:n===W.Bottom?e+t:e,U_="react-flow__edgeupdater";function I_({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:l,type:r}){return(0,H.jsx)("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:l,className:nt([U_,`${U_}-${r}`]),cx:xR(t,o,e),cy:_R(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function ER({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 v=Qe(),b=(g,x)=>{if(g.button!==0)return;let{autoPanOnConnect:_,domNode:E,connectionMode:w,connectionRadius:N,lib:k,onConnectStart:D,cancelConnection:z,nodeLookup:P,rfId:T,panBy:A,updateConnection:M}=v.getState(),O=x.type==="target",R=(G,I)=>{f(!1),d?.(G,n,x.type,I)},L=G=>u?.(n,G),V=(G,I)=>{f(!0),c?.(g,n,x.type),D?.(G,I)};Nf.onPointerDown(g.nativeEvent,{autoPanOnConnect:_,connectionMode:w,connectionRadius:N,domNode:E,handleId:x.id,nodeId:x.nodeId,nodeLookup:P,isTarget:O,edgeUpdaterType:x.type,lib:k,flowId:T,cancelConnection:z,panBy:A,isValidConnection:(...G)=>v.getState().isValidConnection?.(...G)??!0,onConnect:L,onConnectStart:V,onConnectEnd:(...G)=>v.getState().onConnectEnd?.(...G),onReconnectEnd:R,updateConnection:M,getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:v.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"}),y=()=>h(!0),m=()=>h(!1);return(0,H.jsxs)(H.Fragment,{children:[(e===!0||e==="source")&&(0,H.jsx)(I_,{position:r,centerX:o,centerY:i,radius:t,onMouseDown:S,onMouseEnter:y,onMouseOut:m,type:"source"}),(e===!0||e==="target")&&(0,H.jsx)(I_,{position:s,centerX:a,centerY:l,radius:t,onMouseDown:p,onMouseEnter:y,onMouseOut:m,type:"target"})]})}function TR({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:v,edgeTypes:b,noPanClassName:S,onError:p,disableKeyboardA11y:y}){let m=we(ee=>ee.edgeLookup.get(e)),g=we(ee=>ee.defaultEdgeOptions);m=g?{...g,...m}:m;let x=m.type||"default",_=b?.[x]||G_[x];_===void 0&&(p?.("011",Mn.error011(x)),x="default",_=b?.default||G_.default);let E=!!(m.focusable||t&&typeof m.focusable>"u"),w=typeof d<"u"&&(m.reconnectable||n&&typeof m.reconnectable>"u"),N=!!(m.selectable||o&&typeof m.selectable>"u"),k=(0,B.useRef)(null),[D,z]=(0,B.useState)(!1),[P,T]=(0,B.useState)(!1),A=Qe(),{zIndex:M,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:G,targetPosition:I}=we((0,B.useCallback)(ee=>{let ae=ee.nodeLookup.get(m.source),se=ee.nodeLookup.get(m.target);if(!ae||!se)return{zIndex:m.zIndex,...P_};let de=Vx({id:e,sourceNode:ae,targetNode:se,sourceHandle:m.sourceHandle||null,targetHandle:m.targetHandle||null,connectionMode:ee.connectionMode,onError:p});return{zIndex:Ux({selected:m.selected,zIndex:m.zIndex,sourceNode:ae,targetNode:se,elevateOnSelect:ee.elevateEdgesOnSelect,zIndexMode:ee.zIndexMode}),...de||P_}},[m.source,m.target,m.sourceHandle,m.targetHandle,m.selected,m.zIndex]),je),q=(0,B.useMemo)(()=>m.markerStart?`url('#${_f(m.markerStart,v)}')`:void 0,[m.markerStart,v]),j=(0,B.useMemo)(()=>m.markerEnd?`url('#${_f(m.markerEnd,v)}')`:void 0,[m.markerEnd,v]);if(m.hidden||O===null||R===null||L===null||V===null)return null;let $=ee=>{let{addSelectedEdges:ae,unselectNodesAndEdges:se,multiSelectionActive:de}=A.getState();N&&(A.setState({nodesSelectionActive:!1}),m.selected&&de?(se({nodes:[],edges:[m]}),k.current?.blur()):ae([e])),i&&i(ee,m)},fe=a?ee=>{a(ee,{...m})}:void 0,J=l?ee=>{l(ee,{...m})}:void 0,X=r?ee=>{r(ee,{...m})}:void 0,Q=s?ee=>{s(ee,{...m})}:void 0,ye=u?ee=>{u(ee,{...m})}:void 0,me=ee=>{if(!y&&Jm.includes(ee.key)&&N){let{unselectNodesAndEdges:ae,addSelectedEdges:se}=A.getState();ee.key==="Escape"?(k.current?.blur(),ae({edges:[m]})):se([e])}};return(0,H.jsx)("svg",{style:{zIndex:M},children:(0,H.jsxs)("g",{className:nt(["react-flow__edge",`react-flow__edge-${x}`,m.className,S,{selected:m.selected,animated:m.animated,inactive:!N&&!i,updating:D,selectable:N}]),onClick:$,onDoubleClick:fe,onContextMenu:J,onMouseEnter:X,onMouseMove:Q,onMouseLeave:ye,onKeyDown:E?me:void 0,tabIndex:E?0:void 0,role:m.ariaRole??(E?"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":E?`${j_}-${v}`:void 0,ref:k,...m.domAttributes,children:[!P&&(0,H.jsx)(_,{id:e,source:m.source,target:m.target,type:m.type,selected:m.selected,animated:m.animated,selectable:N,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:L,targetY:V,sourcePosition:G,targetPosition:I,data:m.data,style:m.style,sourceHandleId:m.sourceHandle,targetHandleId:m.targetHandle,markerStart:q,markerEnd:j,pathOptions:"pathOptions"in m?m.pathOptions:void 0,interactionWidth:m.interactionWidth}),w&&(0,H.jsx)(ER,{edge:m,isReconnectable:w,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:R,targetX:L,targetY:V,sourcePosition:G,targetPosition:I,setUpdateHover:z,setReconnecting:T})]})})}var NR=(0,B.memo)(TR),CR=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function bE({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:v,disableKeyboardA11y:b}){let{edgesFocusable:S,edgesReconnectable:p,elementsSelectable:y,onError:m}=we(CR,je),g=cR(t);return(0,H.jsxs)("div",{className:"react-flow__edges",children:[(0,H.jsx)(hR,{defaultColor:e,rfId:n}),g.map(x=>(0,H.jsx)(NR,{id:x,edgesFocusable:S,edgesReconnectable:p,elementsSelectable:y,noPanClassName:i,onReconnect:a,onContextMenu:l,onMouseEnter:r,onMouseMove:s,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:v,rfId:n,onError:m,edgeTypes:o,disableKeyboardA11y:b},x))]})}bE.displayName="EdgeRenderer";var wR=(0,B.memo)(bE),AR=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function MR({children:e}){let t=we(AR);return(0,H.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function DR(e){let t=Ah(),n=(0,B.useRef)(!1);(0,B.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var RR=e=>e.panZoom?.syncViewport;function OR(e){let t=we(RR),n=Qe();return(0,B.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function V_(e){return e.connection.inProgress?{...e.connection,to:Yl(e.connection.to,e.transform)}:{...e.connection}}function zR(e){return e?n=>{let o=V_(n);return e(o)}:V_}function LR(e){let t=zR(e);return we(t,je)}var HR=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function BR({containerStyle:e,style:t,type:n,component:o}){let{nodesConnectable:i,width:a,height:l,isValid:r,inProgress:s}=we(HR,je);return!(a&&i&&s)?null:(0,H.jsx)("svg",{style:e,width:a,height:l,className:"react-flow__connectionline react-flow__container",children:(0,H.jsx)("g",{className:nt(["react-flow__connection",nh(r)]),children:(0,H.jsx)(SE,{style:t,type:n,CustomComponent:o,isValid:r})})})}var SE=({style:e,type:t=xo.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,H.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:nh(o),toNode:c,toHandle:d,pointer:h});let v="",b={sourceX:a.x,sourceY:a.y,sourcePosition:s,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case xo.Bezier:[v]=Sf(b);break;case xo.SimpleBezier:[v]=rE(b);break;case xo.Step:[v]=ks({...b,borderRadius:0});break;case xo.SmoothStep:[v]=ks(b);break;default:[v]=xf(b)}return(0,H.jsx)("path",{d:v,fill:"none",className:"react-flow__connection-path",style:e})};SE.displayName="ConnectionLine";var kR={};function Y_(e=kR){let t=(0,B.useRef)(e),n=Qe();(0,B.useEffect)(()=>{},[e])}function GR(){let e=Qe(),t=(0,B.useRef)(!1);(0,B.useEffect)(()=>{},[])}function xE({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:v,connectionLineStyle:b,connectionLineComponent:S,connectionLineContainerStyle:p,selectionKeyCode:y,selectionOnDrag:m,selectionMode:g,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,deleteKeyCode:w,onlyRenderVisibleElements:N,elementsSelectable:k,defaultViewport:D,translateExtent:z,minZoom:P,maxZoom:T,preventScrolling:A,defaultMarkerColor:M,zoomOnScroll:O,zoomOnPinch:R,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:G,zoomOnDoubleClick:I,panOnDrag:q,onPaneClick:j,onPaneMouseEnter:$,onPaneMouseMove:fe,onPaneMouseLeave:J,onPaneScroll:X,onPaneContextMenu:Q,paneClickDistance:ye,nodeClickDistance:me,onEdgeContextMenu:ee,onEdgeMouseEnter:ae,onEdgeMouseMove:se,onEdgeMouseLeave:de,reconnectRadius:Se,onReconnect:Ae,onReconnectStart:rt,onReconnectEnd:Nt,noDragClassName:Ct,noWheelClassName:st,noPanClassName:mn,disableKeyboardA11y:Wt,nodeExtent:$n,rfId:Pt,viewport:it,onViewportChange:ut}){return Y_(e),Y_(t),GR(),DR(n),OR(it),(0,H.jsx)(eR,{onPaneClick:j,onPaneMouseEnter:$,onPaneMouseMove:fe,onPaneMouseLeave:J,onPaneContextMenu:Q,onPaneScroll:X,paneClickDistance:ye,deleteKeyCode:w,selectionKeyCode:y,selectionOnDrag:m,selectionMode:g,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:x,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:k,zoomOnScroll:O,zoomOnPinch:R,zoomOnDoubleClick:I,panOnScroll:L,panOnScrollSpeed:V,panOnScrollMode:G,panOnDrag:q,defaultViewport:D,translateExtent:z,minZoom:P,maxZoom:T,onSelectionContextMenu:d,preventScrolling:A,noDragClassName:Ct,noWheelClassName:st,noPanClassName:mn,disableKeyboardA11y:Wt,onViewportChange:ut,isControlledViewport:!!it,children:(0,H.jsxs)(MR,{children:[(0,H.jsx)(wR,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Ae,onReconnectStart:rt,onReconnectEnd:Nt,onlyRenderVisibleElements:N,onEdgeContextMenu:ee,onEdgeMouseEnter:ae,onEdgeMouseMove:se,onEdgeMouseLeave:de,reconnectRadius:Se,defaultMarkerColor:M,noPanClassName:mn,disableKeyboardA11y:Wt,rfId:Pt}),(0,H.jsx)(BR,{style:b,type:v,component:S,containerStyle:p}),(0,H.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,H.jsx)(uR,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:r,onNodeMouseMove:s,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:me,onlyRenderVisibleElements:N,noPanClassName:mn,noDragClassName:Ct,disableKeyboardA11y:Wt,nodeExtent:$n,rfId:Pt}),(0,H.jsx)("div",{className:"react-flow__viewport-portal"})]})})}xE.displayName="GraphView";var PR=(0,B.memo)(xE),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,v=new Map,b=new Map,S=new Map,p=o??t??[],y=n??e??[],m=c??[0,0],g=d??Pl;_h(b,S,p);let x=Ef(y,h,v,{nodeOrigin:m,nodeExtent:g,zIndexMode:f}),_=[0,0,1];if(l&&i&&a){let E=Ul(h,{filter:D=>!!((D.width||D.initialWidth)&&(D.height||D.initialHeight))}),{x:w,y:N,zoom:k}=Bs(E,i,a,s,u,r?.padding??.1);_=[w,N,k]}return{rfId:"1",width:i??0,height:a??0,transform:_,nodes:y,nodesInitialized:x,nodeLookup:h,parentLookup:v,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:Pl,nodeExtent:g,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Vi.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:{...th},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:uh,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:eh,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},UR=({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})=>x_((h,v)=>{async function b(){let{nodeLookup:S,panZoom:p,fitViewOptions:y,fitViewResolver:m,width:g,height:x,minZoom:_,maxZoom:E}=v();p&&(await Lx({nodes:S,width:g,height:x,panZoom:p,minZoom:_,maxZoom:E},y),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:y,nodeOrigin:m,elevateNodesOnSelect:g,fitViewQueued:x,zIndexMode:_}=v(),E=Ef(S,p,y,{nodeOrigin:m,nodeExtent:d,elevateNodesOnSelect:g,checkEquality:!0,zIndexMode:_});x&&E?(b(),h({nodes:S,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:S,nodesInitialized:E})},setEdges:S=>{let{connectionLookup:p,edgeLookup:y}=v();_h(p,y,S),h({edges:S})},setDefaultNodesAndEdges:(S,p)=>{if(S){let{setNodes:y}=v();y(S),h({hasDefaultNodes:!0})}if(p){let{setEdges:y}=v();y(p),h({hasDefaultEdges:!0})}},updateNodeInternals:S=>{let{triggerNodeChanges:p,nodeLookup:y,parentLookup:m,domNode:g,nodeOrigin:x,nodeExtent:_,debug:E,fitViewQueued:w,zIndexMode:N}=v(),{changes:k,updatedInternals:D}=jx(S,y,m,g,x,_,N);D&&(qx(y,m,{nodeOrigin:x,nodeExtent:_,zIndexMode:N}),w?(b(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),k?.length>0&&(E&&console.log("React Flow: trigger node changes",k),p?.(k)))},updateNodePositions:(S,p=!1)=>{let y=[],m=[],{nodeLookup:g,triggerNodeChanges:x,connection:_,updateConnection:E,onNodesChangeMiddlewareMap:w}=v();for(let[N,k]of S){let D=g.get(N),z=!!(D?.expandParent&&D?.parentId&&k?.position),P={id:N,type:"position",position:z?{x:Math.max(0,k.position.x),y:Math.max(0,k.position.y)}:k.position,dragging:p};if(D&&_.inProgress&&_.fromNode.id===D.id){let T=Yi(D,_.fromHandle,W.Left,!0);E({..._,from:T})}z&&D.parentId&&y.push({id:N,parentId:D.parentId,rect:{...k.internals.positionAbsolute,width:k.measured.width??0,height:k.measured.height??0}}),m.push(P)}if(y.length>0){let{parentLookup:N,nodeOrigin:k}=v(),D=Tf(y,g,N,k);m.push(...D)}for(let N of w.values())m=N(m);x(m)},triggerNodeChanges:S=>{let{onNodesChange:p,setNodes:y,nodes:m,hasDefaultNodes:g,debug:x}=v();if(S?.length){if(g){let _=Q_(S,m);y(_)}x&&console.log("React Flow: trigger node changes",S),p?.(S)}},triggerEdgeChanges:S=>{let{onEdgesChange:p,setEdges:y,edges:m,hasDefaultEdges:g,debug:x}=v();if(S?.length){if(g){let _=F_(S,m);y(_)}x&&console.log("React Flow: trigger edge changes",S),p?.(S)}},addSelectedNodes:S=>{let{multiSelectionActive:p,edgeLookup:y,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>wa(E,!0));g(_);return}g(Zl(m,new Set([...S]),!0)),x(Zl(y))},addSelectedEdges:S=>{let{multiSelectionActive:p,edgeLookup:y,nodeLookup:m,triggerNodeChanges:g,triggerEdgeChanges:x}=v();if(p){let _=S.map(E=>wa(E,!0));x(_);return}x(Zl(y,new Set([...S]))),g(Zl(m,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:p}={})=>{let{edges:y,nodes:m,nodeLookup:g,triggerNodeChanges:x,triggerEdgeChanges:_}=v(),E=S||m,w=p||y,N=[];for(let D of E){if(!D.selected)continue;let z=g.get(D.id);z&&(z.selected=!1),N.push(wa(D.id,!1))}let k=[];for(let D of w)D.selected&&k.push(wa(D.id,!1));x(N),_(k)},setMinZoom:S=>{let{panZoom:p,maxZoom:y}=v();p?.setScaleExtent([S,y]),h({minZoom:S})},setMaxZoom:S=>{let{panZoom:p,minZoom:y}=v();p?.setScaleExtent([y,S]),h({maxZoom:S})},setTranslateExtent:S=>{v().panZoom?.setTranslateExtent(S),h({translateExtent:S})},resetSelectedElements:()=>{let{edges:S,nodes:p,triggerNodeChanges:y,triggerEdgeChanges:m,elementsSelectable:g}=v();if(!g)return;let x=p.reduce((E,w)=>w.selected?[...E,wa(w.id,!1)]:E,[]),_=S.reduce((E,w)=>w.selected?[...E,wa(w.id,!1)]:E,[]);y(x),m(_)},setNodeExtent:S=>{let{nodes:p,nodeLookup:y,parentLookup:m,nodeOrigin:g,elevateNodesOnSelect:x,nodeExtent:_,zIndexMode:E}=v();S[0][0]===_[0][0]&&S[0][1]===_[0][1]&&S[1][0]===_[1][0]&&S[1][1]===_[1][1]||(Ef(p,y,m,{nodeOrigin:g,nodeExtent:S,elevateNodesOnSelect:x,checkEquality:!1,zIndexMode:E}),h({nodeExtent:S}))},panBy:S=>{let{transform:p,width:y,height:m,panZoom:g,translateExtent:x}=v();return $x({delta:S,panZoom:g,transform:p,translateExtent:x,width:y,height:m})},setCenter:async(S,p,y)=>{let{width:m,height:g,maxZoom:x,panZoom:_}=v();if(!_)return Promise.resolve(!1);let E=typeof y?.zoom<"u"?y.zoom:x;return await _.setViewport({x:m/2-S*E,y:g/2-p*E,zoom:E},{duration:y?.duration,ease:y?.ease,interpolate:y?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...th}})},updateConnection:S=>{h({connection:S})},reset:()=>h({...X_()})}},Object.is);function IR({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[v]=(0,B.useState)(()=>UR({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,H.jsx)(lD,{value:v,children:(0,H.jsx)(MD,{children:h})})}function VR({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,B.useContext)(Rf)?(0,H.jsx)(H.Fragment,{children:e}):(0,H.jsx)(IR,{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 YR={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function XR({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:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,onNodeDragStart:E,onNodeDrag:w,onNodeDragStop:N,onNodesDelete:k,onEdgesDelete:D,onDelete:z,onSelectionChange:P,onSelectionDragStart:T,onSelectionDrag:A,onSelectionDragStop:M,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onBeforeDelete:V,connectionMode:G,connectionLineType:I=xo.Bezier,connectionLineStyle:q,connectionLineComponent:j,connectionLineContainerStyle:$,deleteKeyCode:fe="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:X=!1,selectionMode:Q=Ta.Full,panActivationKeyCode:ye="Space",multiSelectionKeyCode:me=Xl()?"Meta":"Control",zoomActivationKeyCode:ee=Xl()?"Meta":"Control",snapToGrid:ae,snapGrid:se,onlyRenderVisibleElements:de=!1,selectNodesOnDrag:Se,nodesDraggable:Ae,autoPanOnNodeFocus:rt,nodesConnectable:Nt,nodesFocusable:Ct,nodeOrigin:st=$_,edgesFocusable:mn,edgesReconnectable:Wt,elementsSelectable:$n=!0,defaultViewport:Pt=bD,minZoom:it=.5,maxZoom:ut=2,translateExtent:ro=Pl,preventScrolling:Co=!0,nodeExtent:wo,defaultMarkerColor:On="#b1b1b7",zoomOnScroll:so=!0,zoomOnPinch:Ao=!0,panOnScroll:hn=!1,panOnScrollSpeed:Ut=.5,panOnScrollMode:Jt=ti.Free,zoomOnDoubleClick:Mo=!0,panOnDrag:Kn=!0,onPaneClick:er,onPaneMouseEnter:li,onPaneMouseMove:Do,onPaneMouseLeave:tr,onPaneScroll:uo,onPaneContextMenu:za,paneClickDistance:Qs=1,nodeClickDistance:ke=0,children:gn,onReconnect:ve,onReconnectStart:le,onReconnectEnd:ie,onEdgeContextMenu:Ne,onEdgeDoubleClick:Me,onEdgeMouseEnter:We,onEdgeMouseMove:Ue,onEdgeMouseLeave:Ht,reconnectRadius:Qn=10,onNodesChange:qi,onEdgesChange:zn,noDragClassName:nr="nodrag",noWheelClassName:Fn="nowheel",noPanClassName:or="nopan",fitView:ir,fitViewOptions:ar,connectOnClick:Fs,attributionPosition:Ws,proOptions:ne,defaultEdgeOptions:C,elevateNodesOnSelect:Y=!0,elevateEdgesOnSelect:F=!1,disableKeyboardA11y:Ge=!1,autoPanOnConnect:St,autoPanOnNodeDrag:Je,autoPanSpeed:Bt,connectionRadius:It,isValidConnection:co,onError:lr,style:mt,id:rr,nodeDragThreshold:Js,connectionDragThreshold:RT,viewport:OT,onViewportChange:zT,width:LT,height:HT,colorMode:BT="light",debug:kT,onScroll:_g,ariaLabelConfig:GT,zIndexMode:Eg="basic",...PT},UT){let jf=rr||"1",IT=ED(BT),VT=(0,B.useCallback)(Tg=>{Tg.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),_g?.(Tg)},[_g]);return(0,H.jsx)("div",{"data-testid":"rf__wrapper",...PT,onScroll:VT,style:{...mt,...YR},ref:UT,className:nt(["react-flow",i,IT]),id:rr,role:"application",children:(0,H.jsxs)(VR,{nodes:e,edges:t,width:LT,height:HT,fitView:ir,fitViewOptions:ar,minZoom:it,maxZoom:ut,nodeOrigin:st,nodeExtent:wo,zIndexMode:Eg,children:[(0,H.jsx)(PR,{onInit:u,onNodeClick:r,onEdgeClick:s,onNodeMouseEnter:y,onNodeMouseMove:m,onNodeMouseLeave:g,onNodeContextMenu:x,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:l,connectionLineType:I,connectionLineStyle:q,connectionLineComponent:j,connectionLineContainerStyle:$,selectionKeyCode:J,selectionOnDrag:X,selectionMode:Q,deleteKeyCode:fe,multiSelectionKeyCode:me,panActivationKeyCode:ye,zoomActivationKeyCode:ee,onlyRenderVisibleElements:de,defaultViewport:Pt,translateExtent:ro,minZoom:it,maxZoom:ut,preventScrolling:Co,zoomOnScroll:so,zoomOnPinch:Ao,zoomOnDoubleClick:Mo,panOnScroll:hn,panOnScrollSpeed:Ut,panOnScrollMode:Jt,panOnDrag:Kn,onPaneClick:er,onPaneMouseEnter:li,onPaneMouseMove:Do,onPaneMouseLeave:tr,onPaneScroll:uo,onPaneContextMenu:za,paneClickDistance:Qs,nodeClickDistance:ke,onSelectionContextMenu:O,onSelectionStart:R,onSelectionEnd:L,onReconnect:ve,onReconnectStart:le,onReconnectEnd:ie,onEdgeContextMenu:Ne,onEdgeDoubleClick:Me,onEdgeMouseEnter:We,onEdgeMouseMove:Ue,onEdgeMouseLeave:Ht,reconnectRadius:Qn,defaultMarkerColor:On,noDragClassName:nr,noWheelClassName:Fn,noPanClassName:or,rfId:jf,disableKeyboardA11y:Ge,nodeExtent:wo,viewport:OT,onViewportChange:zT}),(0,H.jsx)(_D,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:h,onConnectStart:v,onConnectEnd:b,onClickConnectStart:S,onClickConnectEnd:p,nodesDraggable:Ae,autoPanOnNodeFocus:rt,nodesConnectable:Nt,nodesFocusable:Ct,edgesFocusable:mn,edgesReconnectable:Wt,elementsSelectable:$n,elevateNodesOnSelect:Y,elevateEdgesOnSelect:F,minZoom:it,maxZoom:ut,nodeExtent:wo,onNodesChange:qi,onEdgesChange:zn,snapToGrid:ae,snapGrid:se,connectionMode:G,translateExtent:ro,connectOnClick:Fs,defaultEdgeOptions:C,fitView:ir,fitViewOptions:ar,onNodesDelete:k,onEdgesDelete:D,onDelete:z,onNodeDragStart:E,onNodeDrag:w,onNodeDragStop:N,onSelectionDrag:A,onSelectionDragStart:T,onSelectionDragStop:M,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:or,nodeOrigin:st,rfId:jf,autoPanOnConnect:St,autoPanOnNodeDrag:Je,autoPanSpeed:Bt,onError:lr,connectionRadius:It,isValidConnection:co,selectNodesOnDrag:Se,nodeDragThreshold:Js,connectionDragThreshold:RT,onBeforeDelete:V,debug:kT,ariaLabelConfig:GT,zIndexMode:Eg}),(0,H.jsx)(vD,{onSelectionChange:P}),gn,(0,H.jsx)(pD,{proOptions:ne,position:Ws}),(0,H.jsx)(dD,{rfId:jf,disableKeyboardA11y:Ge})]})})}var _E=W_(XR);function EE(e){let[t,n]=(0,B.useState)(e),o=(0,B.useCallback)(i=>n(a=>Q_(i,a)),[]);return[t,n,o]}function TE(e){let[t,n]=(0,B.useState)(e),o=(0,B.useCallback)(i=>n(a=>F_(i,a)),[]);return[t,n,o]}var KH=Mn.error014();function qR({dimensions:e,lineWidth:t,variant:n,className:o}){return(0,H.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:nt(["react-flow__background-pattern",n,o])})}function ZR({radius:e,className:t}){return(0,H.jsx)("circle",{cx:e,cy:e,r:e,className:nt(["react-flow__background-pattern","dots",t])})}var Eo;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Eo||(Eo={}));var jR={[Eo.Dots]:1,[Eo.Lines]:1,[Eo.Cross]:6},$R=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function NE({id:e,variant:t=Eo.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,B.useRef)(null),{transform:f,patternId:h}=we($R,je),v=o||jR[t],b=t===Eo.Dots,S=t===Eo.Cross,p=Array.isArray(n)?n:[n,n],y=[p[0]*f[2]||1,p[1]*f[2]||1],m=v*f[2],g=Array.isArray(a)?a:[a,a],x=S?[m,m]:y,_=[g[0]*f[2]||1+x[0]/2,g[1]*f[2]||1+x[1]/2],E=`${h}${e||""}`;return(0,H.jsxs)("svg",{className:nt(["react-flow__background",u]),style:{...s,...zf,"--xy-background-color-props":r,"--xy-background-pattern-color-props":l},ref:d,"data-testid":"rf__background",children:[(0,H.jsx)("pattern",{id:E,x:f[0]%y[0],y:f[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:b?(0,H.jsx)(ZR,{radius:m/2,className:c}):(0,H.jsx)(qR,{dimensions:x,lineWidth:i,variant:t,className:c})}),(0,H.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}NE.displayName="Background";var CE=(0,B.memo)(NE);function KR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,H.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function QR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,H.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function FR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,H.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 WR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,H.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 JR(){return(0,H.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,H.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 Mf({children:e,className:t,...n}){return(0,H.jsx)("button",{type:"button",className:nt(["react-flow__controls-button",t]),...n,children:e})}var eO=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function wE({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 v=Qe(),{isInteractive:b,minZoomReached:S,maxZoomReached:p,ariaLabelConfig:y}=we(eO,je),{zoomIn:m,zoomOut:g,fitView:x}=Ah(),_=()=>{m(),a?.()},E=()=>{g(),l?.()},w=()=>{x(i),r?.()},N=()=>{v.setState({nodesDraggable:!b,nodesConnectable:!b,elementsSelectable:!b}),s?.(!b)};return(0,H.jsxs)(Of,{className:nt(["react-flow__controls",f==="horizontal"?"horizontal":"vertical",u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??y["controls.ariaLabel"],children:[t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Mf,{onClick:_,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:p,children:(0,H.jsx)(KR,{})}),(0,H.jsx)(Mf,{onClick:E,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:S,children:(0,H.jsx)(QR,{})})]}),n&&(0,H.jsx)(Mf,{className:"react-flow__controls-fitview",onClick:w,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,H.jsx)(FR,{})}),o&&(0,H.jsx)(Mf,{className:"react-flow__controls-interactive",onClick:N,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:b?(0,H.jsx)(JR,{}):(0,H.jsx)(WR,{})}),c]})}wE.displayName="Controls";var QH=(0,B.memo)(wE);function tO({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:v,backgroundColor:b}=a||{},S=l||v||b;return(0,H.jsx)("rect",{className:nt(["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 nO=(0,B.memo)(tO),oO=e=>e.nodes.map(t=>t.id),Ch=e=>e instanceof Function?e:()=>e;function iO({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:i,nodeComponent:a=nO,onClick:l}){let r=we(oO,je),s=Ch(t),u=Ch(e),c=Ch(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,H.jsx)(H.Fragment,{children:r.map(f=>(0,H.jsx)(lO,{id:f,nodeColorFunc:s,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:o,nodeStrokeWidth:i,NodeComponent:a,onClick:l,shapeRendering:d},f))})}function aO({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}=we(v=>{let b=v.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}=b.internals.positionAbsolute,{width:m,height:g}=_o(S);return{node:S,x:p,y,width:m,height:g}},je);return!u||u.hidden||!ch(u)?null:(0,H.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 lO=(0,B.memo)(aO),rO=(0,B.memo)(iO),sO=200,uO=150,cO=e=>!e.hidden,fO=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?rh(Ul(e.nodeLookup,{filter:cO}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},dO="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:v,pannable:b=!1,zoomable:S=!1,ariaLabel:p,inversePan:y,zoomStep:m=1,offsetScale:g=5}){let x=Qe(),_=(0,B.useRef)(null),{boundingRect:E,viewBB:w,rfId:N,panZoom:k,translateExtent:D,flowWidth:z,flowHeight:P,ariaLabelConfig:T}=we(fO,je),A=e?.width??sO,M=e?.height??uO,O=E.width/A,R=E.height/M,L=Math.max(O,R),V=L*A,G=L*M,I=g*L,q=E.x-(V-E.width)/2-I,j=E.y-(G-E.height)/2-I,$=V+I*2,fe=G+I*2,J=`${dO}-${N}`,X=(0,B.useRef)(0),Q=(0,B.useRef)();X.current=L,(0,B.useEffect)(()=>{if(_.current&&k)return Q.current=t_({domNode:_.current,panZoom:k,getTransform:()=>x.getState().transform,getViewScale:()=>X.current}),()=>{Q.current?.destroy()}},[k]),(0,B.useEffect)(()=>{Q.current?.update({translateExtent:D,width:z,height:P,inversePan:y,pannable:b,zoomStep:m,zoomable:S})},[b,S,y,m,D,z,P]);let ye=h?ae=>{let[se,de]=Q.current?.pointer(ae)||[0,0];h(ae,{x:se,y:de})}:void 0,me=v?(0,B.useCallback)((ae,se)=>{let de=x.getState().nodeLookup.get(se).internals.userNode;v(ae,de)},[]):void 0,ee=p??T["minimap.ariaLabel"];return(0,H.jsx)(Of,{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*L: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:nt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,H.jsxs)("svg",{width:A,height:M,viewBox:`${q} ${j} ${$} ${fe}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:_,onClick:ye,children:[ee&&(0,H.jsx)("title",{id:J,children:ee}),(0,H.jsx)(rO,{onClick:me,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:r}),(0,H.jsx)("path",{className:"react-flow__minimap-mask",d:`M${q-I},${j-I}h${$+I*2}v${fe+I*2}h${-$-I*2}z
|
|
2473
|
+
M${w.x},${w.y}h${w.width}v${w.height}h${-w.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}AE.displayName="MiniMap";var FH=(0,B.memo)(AE),pO=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,mO={[Xi.Line]:"right",[Xi.Handle]:"bottom-right"};function hO({nodeId:e,position:t,variant:n=Xi.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:v,onResizeStart:b,onResize:S,onResizeEnd:p}){let y=nE(),m=typeof e=="string"?e:y,g=Qe(),x=(0,B.useRef)(null),_=n===Xi.Handle,E=we((0,B.useCallback)(pO(_&&h),[_,h]),je),w=(0,B.useRef)(null),N=t??mO[n];(0,B.useEffect)(()=>{if(!(!x.current||!m))return w.current||(w.current=l_({domNode:x.current,nodeId:m,getStoreItems:()=>{let{nodeLookup:D,transform:z,snapGrid:P,snapToGrid:T,nodeOrigin:A,domNode:M}=g.getState();return{nodeLookup:D,transform:z,snapGrid:P,snapToGrid:T,nodeOrigin:A,paneDomNode:M}},onChange:(D,z)=>{let{triggerNodeChanges:P,nodeLookup:T,parentLookup:A,nodeOrigin:M}=g.getState(),O=[],R={x:D.x,y:D.y},L=T.get(m);if(L&&L.expandParent&&L.parentId){let V=L.origin??M,G=D.width??L.measured.width??0,I=D.height??L.measured.height??0,q={id:L.id,parentId:L.parentId,rect:{width:G,height:I,...fh({x:D.x??L.position.x,y:D.y??L.position.y},{width:G,height:I},L.parentId,T,V)}},j=Tf([q],T,A,M);O.push(...j),R.x=D.x?Math.max(V[0]*G,D.x):void 0,R.y=D.y?Math.max(V[1]*I,D.y):void 0}if(R.x!==void 0&&R.y!==void 0){let V={id:m,type:"position",position:{...R}};O.push(V)}if(D.width!==void 0&&D.height!==void 0){let G={id:m,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:D.width,height:D.height}};O.push(G)}for(let V of z){let G={...V,type:"position"};O.push(G)}P(O)},onEnd:({width:D,height:z})=>{let P={id:m,type:"dimensions",resizing:!1,dimensions:{width:D,height:z}};g.getState().triggerNodeChanges([P])}})),w.current.update({controlPosition:N,boundaries:{minWidth:r,minHeight:s,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:b,onResize:S,onResizeEnd:p,shouldResize:v}),()=>{w.current?.destroy()}},[N,r,s,u,c,d,b,S,p,v]);let k=N.split("-");return(0,H.jsx)("div",{className:nt(["react-flow__resize-control","nodrag",...k,n,o]),ref:x,style:{...i,scale:E,...l&&{[_?"backgroundColor":"borderColor"]:l}},children:a})}var WH=(0,B.memo)(hO);var Dh=oe(wt(),1);var ME="(prefers-color-scheme: dark)";function gO(e){return e?da.DARK:da.LIGHT}function Rh(){return typeof window>"u"||typeof window.matchMedia!="function"?da.DARK:gO(window.matchMedia(ME).matches)}function yO(e){if(typeof window>"u"||typeof window.matchMedia!="function")return()=>{};let t=window.matchMedia(ME);return typeof t.addEventListener=="function"?(t.addEventListener("change",e),()=>t.removeEventListener("change",e)):(t.addListener(e),()=>t.removeListener(e))}function vO(e){return e!==void 0?{subscribe:()=>()=>{},getSnapshot:()=>e,getServerSnapshot:()=>e}:{subscribe:yO,getSnapshot:Rh,getServerSnapshot:()=>da.DARK}}function DE(e){let t=Dh.default.useMemo(()=>vO(e),[e]);return Dh.default.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot)}function RE(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 To(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=>bO(h,c,n)))break;let f=n[s];f?(n[l]=f,s=f):(delete n[l],s=void 0)}}return n}function bO(e,t,n){let o=n[e];for(;o;){if(o===t)return!0;o=n[o]}return!1}function OE(e,t){return e.pipe_registry?.[t]}function Oh(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 zE(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function Hf(e){return!e||typeof e!="string"?!1:e.startsWith("https://")||e.startsWith("http://")||e.startsWith("file://")||e.startsWith("/")}function LE(e){if(!e)return null;if(typeof e=="string")return zE(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(zE(o))return o;return null}function HE(e){if(!e)return null;if(typeof e=="string")return Hf(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(Hf(o))return o;return null}function BE(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 zh(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.filename=="string"&&t.filename?t.filename:null}function kE(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=zh(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 GE(e){return e==="application/pdf"?"PDF":e?.startsWith("image/")?"Image":"HTML"}function Lh(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 Dn=oe(wt(),1);var{entries:jE,setPrototypeOf:PE,isFrozen:SO,getPrototypeOf:xO,getOwnPropertyDescriptor:_O}=Object,{freeze:Kt,seal:jn,create:Xs}=Object,{apply:Ih,construct:Vh}=typeof Reflect<"u"&&Reflect;Kt||(Kt=function(t){return t});jn||(jn=function(t){return t});Ih||(Ih=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)});Vh||(Vh=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 Ps=Qt(Array.prototype.forEach),EO=Qt(Array.prototype.lastIndexOf),UE=Qt(Array.prototype.pop),Us=Qt(Array.prototype.push),TO=Qt(Array.prototype.splice),kf=Qt(String.prototype.toLowerCase),Hh=Qt(String.prototype.toString),Bh=Qt(String.prototype.match),jl=Qt(String.prototype.replace),NO=Qt(String.prototype.indexOf),CO=Qt(String.prototype.trim),ao=Qt(Object.prototype.hasOwnProperty),$t=Qt(RegExp.prototype.test),Is=wO(TypeError);function Qt(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 Ih(e,t,o)}}function wO(e){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return Vh(e,n)}}function be(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:kf;PE&&PE(e,null);let o=t.length;for(;o--;){let i=t[o];if(typeof i=="string"){let a=n(i);a!==i&&(SO(t)||(t[o]=a),i=a)}e[i]=!0}return e}function AO(e){for(let t=0;t<e.length;t++)ao(e,t)||(e[t]=null);return e}function No(e){let t=Xs(null);for(let[n,o]of jE(e))ao(e,n)&&(Array.isArray(o)?t[n]=AO(o):o&&typeof o=="object"&&o.constructor===Object?t[n]=No(o):t[n]=o);return t}function Vs(e,t){for(;e!==null;){let o=_O(e,t);if(o){if(o.get)return Qt(o.get);if(typeof o.value=="function")return Qt(o.value)}e=xO(e)}function n(){return null}return n}var IE=Kt(["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"]),kh=Kt(["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"]),Gh=Kt(["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"]),MO=Kt(["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"]),Ph=Kt(["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"]),DO=Kt(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),VE=Kt(["#text"]),YE=Kt(["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"]),Uh=Kt(["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"]),XE=Kt(["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"]),Bf=Kt(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),RO=jn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),OO=jn(/<%[\w\W]*|[\w\W]*%>/gm),zO=jn(/\$\{[\w\W]*/gm),LO=jn(/^data-[\-\w.\u00B7-\uFFFF]+$/),HO=jn(/^aria-[\-\w]+$/),$E=jn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),BO=jn(/^(?:\w+script|data):/i),kO=jn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),KE=jn(/^html$/i),GO=jn(/^[a-z][.\w]*(-[.\w]+)+$/i),qE=Object.freeze({__proto__:null,ARIA_ATTR:HO,ATTR_WHITESPACE:kO,CUSTOM_ELEMENT:GO,DATA_ATTR:LO,DOCTYPE_NAME:KE,ERB_EXPR:OO,IS_ALLOWED_URI:$E,IS_SCRIPT_OR_DATA:BO,MUSTACHE_EXPR:RO,TMPLIT_EXPR:zO}),Ys={element:1,text:3,progressingInstruction:7,comment:8,document:9},PO=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}},ZE=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function QE(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:PO(),t=ne=>QE(ne);if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==Ys.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,v=s.prototype,b=Vs(v,"cloneNode"),S=Vs(v,"remove"),p=Vs(v,"nextSibling"),y=Vs(v,"childNodes"),m=Vs(v,"parentNode");if(typeof l=="function"){let ne=n.createElement("template");ne.content&&ne.content.ownerDocument&&(n=ne.content.ownerDocument)}let g,x="",{implementation:_,createNodeIterator:E,createDocumentFragment:w,getElementsByTagName:N}=n,{importNode:k}=o,D=ZE();t.isSupported=typeof jE=="function"&&typeof m=="function"&&_&&_.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:z,ERB_EXPR:P,TMPLIT_EXPR:T,DATA_ATTR:A,ARIA_ATTR:M,IS_SCRIPT_OR_DATA:O,ATTR_WHITESPACE:R,CUSTOM_ELEMENT:L}=qE,{IS_ALLOWED_URI:V}=qE,G=null,I=be({},[...IE,...kh,...Gh,...Ph,...VE]),q=null,j=be({},[...YE,...Uh,...XE,...Bf]),$=Object.seal(Xs(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}})),fe=null,J=null,X=Object.seal(Xs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Q=!0,ye=!0,me=!1,ee=!0,ae=!1,se=!0,de=!1,Se=!1,Ae=!1,rt=!1,Nt=!1,Ct=!1,st=!0,mn=!1,Wt="user-content-",$n=!0,Pt=!1,it={},ut=null,ro=be({},["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"]),Co=null,wo=be({},["audio","video","img","source","image","track"]),On=null,so=be({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ao="http://www.w3.org/1998/Math/MathML",hn="http://www.w3.org/2000/svg",Ut="http://www.w3.org/1999/xhtml",Jt=Ut,Mo=!1,Kn=null,er=be({},[Ao,hn,Ut],Hh),li=be({},["mi","mo","mn","ms","mtext"]),Do=be({},["annotation-xml"]),tr=be({},["title","style","font","a","script"]),uo=null,za=["application/xhtml+xml","text/html"],Qs="text/html",ke=null,gn=null,ve=n.createElement("form"),le=function(C){return C instanceof RegExp||C instanceof Function},ie=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(gn&&gn===C)){if((!C||typeof C!="object")&&(C={}),C=No(C),uo=za.indexOf(C.PARSER_MEDIA_TYPE)===-1?Qs:C.PARSER_MEDIA_TYPE,ke=uo==="application/xhtml+xml"?Hh:kf,G=ao(C,"ALLOWED_TAGS")?be({},C.ALLOWED_TAGS,ke):I,q=ao(C,"ALLOWED_ATTR")?be({},C.ALLOWED_ATTR,ke):j,Kn=ao(C,"ALLOWED_NAMESPACES")?be({},C.ALLOWED_NAMESPACES,Hh):er,On=ao(C,"ADD_URI_SAFE_ATTR")?be(No(so),C.ADD_URI_SAFE_ATTR,ke):so,Co=ao(C,"ADD_DATA_URI_TAGS")?be(No(wo),C.ADD_DATA_URI_TAGS,ke):wo,ut=ao(C,"FORBID_CONTENTS")?be({},C.FORBID_CONTENTS,ke):ro,fe=ao(C,"FORBID_TAGS")?be({},C.FORBID_TAGS,ke):No({}),J=ao(C,"FORBID_ATTR")?be({},C.FORBID_ATTR,ke):No({}),it=ao(C,"USE_PROFILES")?C.USE_PROFILES:!1,Q=C.ALLOW_ARIA_ATTR!==!1,ye=C.ALLOW_DATA_ATTR!==!1,me=C.ALLOW_UNKNOWN_PROTOCOLS||!1,ee=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=C.SAFE_FOR_TEMPLATES||!1,se=C.SAFE_FOR_XML!==!1,de=C.WHOLE_DOCUMENT||!1,rt=C.RETURN_DOM||!1,Nt=C.RETURN_DOM_FRAGMENT||!1,Ct=C.RETURN_TRUSTED_TYPE||!1,Ae=C.FORCE_BODY||!1,st=C.SANITIZE_DOM!==!1,mn=C.SANITIZE_NAMED_PROPS||!1,$n=C.KEEP_CONTENT!==!1,Pt=C.IN_PLACE||!1,V=C.ALLOWED_URI_REGEXP||$E,Jt=C.NAMESPACE||Ut,li=C.MATHML_TEXT_INTEGRATION_POINTS||li,Do=C.HTML_INTEGRATION_POINTS||Do,$=C.CUSTOM_ELEMENT_HANDLING||Xs(null),C.CUSTOM_ELEMENT_HANDLING&&le(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&($.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&le(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&($.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&($.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(ye=!1),Nt&&(rt=!0),it&&(G=be({},VE),q=Xs(null),it.html===!0&&(be(G,IE),be(q,YE)),it.svg===!0&&(be(G,kh),be(q,Uh),be(q,Bf)),it.svgFilters===!0&&(be(G,Gh),be(q,Uh),be(q,Bf)),it.mathMl===!0&&(be(G,Ph),be(q,XE),be(q,Bf))),X.tagCheck=null,X.attributeCheck=null,C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?X.tagCheck=C.ADD_TAGS:(G===I&&(G=No(G)),be(G,C.ADD_TAGS,ke))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?X.attributeCheck=C.ADD_ATTR:(q===j&&(q=No(q)),be(q,C.ADD_ATTR,ke))),C.ADD_URI_SAFE_ATTR&&be(On,C.ADD_URI_SAFE_ATTR,ke),C.FORBID_CONTENTS&&(ut===ro&&(ut=No(ut)),be(ut,C.FORBID_CONTENTS,ke)),C.ADD_FORBID_CONTENTS&&(ut===ro&&(ut=No(ut)),be(ut,C.ADD_FORBID_CONTENTS,ke)),$n&&(G["#text"]=!0),de&&be(G,["html","head","body"]),G.table&&(be(G,["tbody"]),delete fe.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw Is('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Is('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');g=C.TRUSTED_TYPES_POLICY,x=g.createHTML("")}else g===void 0&&(g=UO(h,i)),g!==null&&typeof x=="string"&&(x=g.createHTML(""));Kt&&Kt(C),gn=C}},Ne=be({},[...kh,...Gh,...MO]),Me=be({},[...Ph,...DO]),We=function(C){let Y=m(C);(!Y||!Y.tagName)&&(Y={namespaceURI:Jt,tagName:"template"});let F=kf(C.tagName),Ge=kf(Y.tagName);return Kn[C.namespaceURI]?C.namespaceURI===hn?Y.namespaceURI===Ut?F==="svg":Y.namespaceURI===Ao?F==="svg"&&(Ge==="annotation-xml"||li[Ge]):!!Ne[F]:C.namespaceURI===Ao?Y.namespaceURI===Ut?F==="math":Y.namespaceURI===hn?F==="math"&&Do[Ge]:!!Me[F]:C.namespaceURI===Ut?Y.namespaceURI===hn&&!Do[Ge]||Y.namespaceURI===Ao&&!li[Ge]?!1:!Me[F]&&(tr[F]||!Ne[F]):!!(uo==="application/xhtml+xml"&&Kn[C.namespaceURI]):!1},Ue=function(C){Us(t.removed,{element:C});try{m(C).removeChild(C)}catch{S(C)}},Ht=function(C,Y){try{Us(t.removed,{attribute:Y.getAttributeNode(C),from:Y})}catch{Us(t.removed,{attribute:null,from:Y})}if(Y.removeAttribute(C),C==="is")if(rt||Nt)try{Ue(Y)}catch{}else try{Y.setAttribute(C,"")}catch{}},Qn=function(C){let Y=null,F=null;if(Ae)C="<remove></remove>"+C;else{let Je=Bh(C,/^[\r\n\t ]+/);F=Je&&Je[0]}uo==="application/xhtml+xml"&&Jt===Ut&&(C='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+C+"</body></html>");let Ge=g?g.createHTML(C):C;if(Jt===Ut)try{Y=new f().parseFromString(Ge,uo)}catch{}if(!Y||!Y.documentElement){Y=_.createDocument(Jt,"template",null);try{Y.documentElement.innerHTML=Mo?x:Ge}catch{}}let St=Y.body||Y.documentElement;return C&&F&&St.insertBefore(n.createTextNode(F),St.childNodes[0]||null),Jt===Ut?N.call(Y,de?"html":"body")[0]:de?Y.documentElement:St},qi=function(C){return E.call(C.ownerDocument||C,C,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},zn=function(C){return C instanceof d&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof c)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},nr=function(C){return typeof r=="function"&&C instanceof r};function Fn(ne,C,Y){Ps(ne,F=>{F.call(t,C,Y,gn)})}let or=function(C){let Y=null;if(Fn(D.beforeSanitizeElements,C,null),zn(C))return Ue(C),!0;let F=ke(C.nodeName);if(Fn(D.uponSanitizeElement,C,{tagName:F,allowedTags:G}),se&&C.hasChildNodes()&&!nr(C.firstElementChild)&&$t(/<[/\w!]/g,C.innerHTML)&&$t(/<[/\w!]/g,C.textContent)||se&&C.namespaceURI===Ut&&F==="style"&&nr(C.firstElementChild)||C.nodeType===Ys.progressingInstruction||se&&C.nodeType===Ys.comment&&$t(/<[/\w]/g,C.data))return Ue(C),!0;if(fe[F]||!(X.tagCheck instanceof Function&&X.tagCheck(F))&&!G[F]){if(!fe[F]&&ar(F)&&($.tagNameCheck instanceof RegExp&&$t($.tagNameCheck,F)||$.tagNameCheck instanceof Function&&$.tagNameCheck(F)))return!1;if($n&&!ut[F]){let Ge=m(C)||C.parentNode,St=y(C)||C.childNodes;if(St&&Ge){let Je=St.length;for(let Bt=Je-1;Bt>=0;--Bt){let It=b(St[Bt],!0);It.__removalCount=(C.__removalCount||0)+1,Ge.insertBefore(It,p(C))}}}return Ue(C),!0}return C instanceof s&&!We(C)||(F==="noscript"||F==="noembed"||F==="noframes")&&$t(/<\/no(script|embed|frames)/i,C.innerHTML)?(Ue(C),!0):(ae&&C.nodeType===Ys.text&&(Y=C.textContent,Ps([z,P,T],Ge=>{Y=jl(Y,Ge," ")}),C.textContent!==Y&&(Us(t.removed,{element:C.cloneNode()}),C.textContent=Y)),Fn(D.afterSanitizeElements,C,null),!1)},ir=function(C,Y,F){if(J[Y]||st&&(Y==="id"||Y==="name")&&(F in n||F in ve))return!1;if(!(ye&&!J[Y]&&$t(A,Y))){if(!(Q&&$t(M,Y))){if(!(X.attributeCheck instanceof Function&&X.attributeCheck(Y,C))){if(!q[Y]||J[Y]){if(!(ar(C)&&($.tagNameCheck instanceof RegExp&&$t($.tagNameCheck,C)||$.tagNameCheck instanceof Function&&$.tagNameCheck(C))&&($.attributeNameCheck instanceof RegExp&&$t($.attributeNameCheck,Y)||$.attributeNameCheck instanceof Function&&$.attributeNameCheck(Y,C))||Y==="is"&&$.allowCustomizedBuiltInElements&&($.tagNameCheck instanceof RegExp&&$t($.tagNameCheck,F)||$.tagNameCheck instanceof Function&&$.tagNameCheck(F))))return!1}else if(!On[Y]){if(!$t(V,jl(F,R,""))){if(!((Y==="src"||Y==="xlink:href"||Y==="href")&&C!=="script"&&NO(F,"data:")===0&&Co[C])){if(!(me&&!$t(O,jl(F,R,"")))){if(F)return!1}}}}}}}return!0},ar=function(C){return C!=="annotation-xml"&&Bh(C,L)},Fs=function(C){Fn(D.beforeSanitizeAttributes,C,null);let{attributes:Y}=C;if(!Y||zn(C))return;let F={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:q,forceKeepAttr:void 0},Ge=Y.length;for(;Ge--;){let St=Y[Ge],{name:Je,namespaceURI:Bt,value:It}=St,co=ke(Je),lr=It,mt=Je==="value"?lr:CO(lr);if(F.attrName=co,F.attrValue=mt,F.keepAttr=!0,F.forceKeepAttr=void 0,Fn(D.uponSanitizeAttribute,C,F),mt=F.attrValue,mn&&(co==="id"||co==="name")&&(Ht(Je,C),mt=Wt+mt),se&&$t(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mt)){Ht(Je,C);continue}if(co==="attributename"&&Bh(mt,"href")){Ht(Je,C);continue}if(F.forceKeepAttr)continue;if(!F.keepAttr){Ht(Je,C);continue}if(!ee&&$t(/\/>/i,mt)){Ht(Je,C);continue}ae&&Ps([z,P,T],Js=>{mt=jl(mt,Js," ")});let rr=ke(C.nodeName);if(!ir(rr,co,mt)){Ht(Je,C);continue}if(g&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Bt)switch(h.getAttributeType(rr,co)){case"TrustedHTML":{mt=g.createHTML(mt);break}case"TrustedScriptURL":{mt=g.createScriptURL(mt);break}}if(mt!==lr)try{Bt?C.setAttributeNS(Bt,Je,mt):C.setAttribute(Je,mt),zn(C)?Ue(C):UE(t.removed)}catch{Ht(Je,C)}}Fn(D.afterSanitizeAttributes,C,null)},Ws=function(C){let Y=null,F=qi(C);for(Fn(D.beforeSanitizeShadowDOM,C,null);Y=F.nextNode();)Fn(D.uponSanitizeShadowNode,Y,null),or(Y),Fs(Y),Y.content instanceof a&&Ws(Y.content);Fn(D.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(ne){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,F=null,Ge=null,St=null;if(Mo=!ne,Mo&&(ne="<!-->"),typeof ne!="string"&&!nr(ne))if(typeof ne.toString=="function"){if(ne=ne.toString(),typeof ne!="string")throw Is("dirty is not a string, aborting")}else throw Is("toString is not a function");if(!t.isSupported)return ne;if(Se||ie(C),t.removed=[],typeof ne=="string"&&(Pt=!1),Pt){if(ne.nodeName){let It=ke(ne.nodeName);if(!G[It]||fe[It])throw Is("root node is forbidden and cannot be sanitized in-place")}}else if(ne instanceof r)Y=Qn("<!---->"),F=Y.ownerDocument.importNode(ne,!0),F.nodeType===Ys.element&&F.nodeName==="BODY"||F.nodeName==="HTML"?Y=F:Y.appendChild(F);else{if(!rt&&!ae&&!de&&ne.indexOf("<")===-1)return g&&Ct?g.createHTML(ne):ne;if(Y=Qn(ne),!Y)return rt?null:Ct?x:""}Y&&Ae&&Ue(Y.firstChild);let Je=qi(Pt?ne:Y);for(;Ge=Je.nextNode();)or(Ge),Fs(Ge),Ge.content instanceof a&&Ws(Ge.content);if(Pt)return ne;if(rt){if(ae){Y.normalize();let It=Y.innerHTML;Ps([z,P,T],co=>{It=jl(It,co," ")}),Y.innerHTML=It}if(Nt)for(St=w.call(Y.ownerDocument);Y.firstChild;)St.appendChild(Y.firstChild);else St=Y;return(q.shadowroot||q.shadowrootmode)&&(St=k.call(o,St,!0)),St}let Bt=de?Y.outerHTML:Y.innerHTML;return de&&G["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&$t(KE,Y.ownerDocument.doctype.name)&&(Bt="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
|
|
2474
|
+
`+Bt),ae&&Ps([z,P,T],It=>{Bt=jl(Bt,It," ")}),g&&Ct?g.createHTML(Bt):Bt},t.setConfig=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ie(ne),Se=!0},t.clearConfig=function(){gn=null,Se=!1},t.isValidAttribute=function(ne,C,Y){gn||ie({});let F=ke(ne),Ge=ke(C);return ir(F,Ge,Y)},t.addHook=function(ne,C){typeof C=="function"&&Us(D[ne],C)},t.removeHook=function(ne,C){if(C!==void 0){let Y=EO(D[ne],C);return Y===-1?void 0:TO(D[ne],Y,1)[0]}return UE(D[ne])},t.removeHooks=function(ne){D[ne]=[]},t.removeAllHooks=function(){D=ZE()},t}var FE=QE();var re=oe(ge(),1),IO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.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,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),YO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.jsx)("path",{d:"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"})}),XO=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.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"})}),WE=(0,re.jsx)("svg",{viewBox:"0 0 24 24",children:(0,re.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 Gf(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function Yh(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 JE(e,t){let n=document.createElement("a");n.href=e,n.download=t,n.target="_blank",n.click()}function Pf({stuff:e,className:t,resolveStorageUrl:n,canEmbedPdf:o,onOpenExternally:i}){let[a,l]=Dn.default.useState("html"),[r,s]=Dn.default.useState(!1),u=Dn.default.useRef(null),c=Dn.default.useMemo(()=>HE(e.data),[e.data]),d=Dn.default.useMemo(()=>LE(e.data),[e.data]),f=Dn.default.useMemo(()=>BE(e.data),[e.data]),h=Dn.default.useMemo(()=>zh(e.data),[e.data]),[v,b]=Dn.default.useState(null);Dn.default.useEffect(()=>{if(b(null),!f||!n||c)return;let A=!1;return n(f).then(M=>{A||b(Hf(M)?M:null)}).catch(()=>{A||b(null)}),()=>{A=!0}},[f,n,c]);let S=c??v,p=d??v,y=Dn.default.useMemo(()=>kE(e.data,e.contentType,p??f),[e.data,e.contentType,p,f]),m=y==="application/pdf",g=y?.startsWith("image/")??!1,x=GE(y??e.contentType),{jsonString:_,jsonError:E}=Dn.default.useMemo(()=>{if(e.data==null)return{jsonString:null,jsonError:null};try{return{jsonString:JSON.stringify(e.data,null,2),jsonError:null}}catch(A){return{jsonString:null,jsonError:A instanceof Error?A.message:String(A)}}},[e.data]);Dn.default.useEffect(()=>{a!=="html"||!u.current||u.current.querySelectorAll("a").forEach(A=>{A.setAttribute("target","_blank"),A.setAttribute("rel","noopener noreferrer")})},[a,e.dataHtml]);function w(A){let M=h||e.name;return(0,re.jsxs)("div",{className:"stuff-viewer-local-file",children:[(0,re.jsx)("div",{className:"stuff-viewer-local-file-icon",children:WE}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[M&&(0,re.jsx)("div",{className:"stuff-viewer-local-file-name",children:M}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-hint",children:[A," \u2014 no preview available"]})]})]})}function N(A){return(0,re.jsxs)("div",{className:"stuff-viewer-error",role:"alert",children:[(0,re.jsx)("div",{className:"stuff-viewer-error-title",children:"Unable to serialize data"}),(0,re.jsx)("div",{className:"stuff-viewer-error-detail",children:A})]})}function k(){if(a==="html"){if(m){if(o!==!1&&S){let M=S.includes("#")?S:`${S}#pagemode=none`;return(0,re.jsx)("div",{className:"stuff-viewer-pdf",children:(0,re.jsx)("embed",{src:M,type:"application/pdf"})})}if(p){let M=h||e.name;return(0,re.jsxs)("button",{type:"button",className:"stuff-viewer-local-file stuff-viewer-local-file--button",onClick:P,children:[(0,re.jsx)("div",{className:"stuff-viewer-local-file-icon",children:WE}),(0,re.jsxs)("div",{className:"stuff-viewer-local-file-info",children:[M&&(0,re.jsx)("div",{className:"stuff-viewer-local-file-name",children:M}),(0,re.jsx)("div",{className:"stuff-viewer-local-file-hint",children:"Click to open PDF externally"})]})]})}return w("PDF")}return g?S?(0,re.jsx)("div",{className:"stuff-viewer-image",children:(0,re.jsx)("img",{src:S,alt:e.name??"(unnamed stuff)"})}):w("Image"):e.dataHtml?(0,re.jsx)("div",{className:"stuff-viewer-html",dangerouslySetInnerHTML:{__html:FE.sanitize(e.dataHtml)}}):_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?N(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No content available"})}return a==="json"?_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?N(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No JSON data available"}):e.dataText?(0,re.jsx)("pre",{className:"stuff-viewer-pre stuff-viewer-pre--nowrap",dangerouslySetInnerHTML:{__html:Gf(e.dataText)}}):_?(0,re.jsx)("pre",{className:"stuff-viewer-pre",dangerouslySetInnerHTML:{__html:Gf(_)}}):E?N(E):(0,re.jsx)("div",{className:"stuff-viewer-placeholder",children:"No text data available"})}function D(){let A;a==="json"?A=_||"":a==="text"?A=e.dataText||_||"":A=e.dataText||e.dataHtml||_||"",A&&navigator.clipboard&&navigator.clipboard.writeText(A).then(()=>{s(!0),setTimeout(()=>s(!1),1500)}).catch(()=>{})}function z(){if(g&&p){let A=y?.split("/")[1]||"png";JE(p,`${e.name||"stuff"}.${A}`);return}if(m&&p){JE(p,`${e.name||"stuff"}.pdf`);return}a==="json"?Yh(_||"{}",`${e.name||"stuff"}.json`,"application/json"):a==="text"?Yh(e.dataText||_||"",`${e.name||"stuff"}.txt`,"text/plain"):Yh(e.dataHtml||_||"",`${e.name||"stuff"}.html`,"text/html")}function P(){if(p){if(i){i(p,h??void 0);return}window.open(p,"_blank","noopener,noreferrer")}}let T=["stuff-viewer",t].filter(Boolean).join(" ");return(0,re.jsxs)("div",{className:T,children:[(0,re.jsxs)("div",{className:"stuff-viewer-header",children:[(0,re.jsx)("h3",{className:"stuff-viewer-title",children:e.name??"(unnamed stuff)"}),e.concept&&(0,re.jsx)("p",{className:"stuff-viewer-subtitle",children:e.concept})]}),(0,re.jsxs)("div",{className:"stuff-viewer-toolbar",children:[(0,re.jsx)("div",{className:"stuff-viewer-tabs",children:["html","json","text"].map(A=>(0,re.jsx)("button",{type:"button",className:`stuff-viewer-tab${a===A?" stuff-viewer-tab--active":""}`,onClick:()=>l(A),children:A==="html"?x:A==="json"?"JSON":"Pretty"},A))}),(0,re.jsxs)("div",{className:"stuff-viewer-actions",children:[p&&(0,re.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:P,title:"Open in new window","aria-label":"Open in new window",children:XO}),(0,re.jsx)("button",{type:"button",className:`stuff-viewer-action-btn${r?" stuff-viewer-action-btn--copied":""}`,onClick:D,title:"Copy","aria-label":"Copy",children:r?VO:IO}),(0,re.jsx)("button",{type:"button",className:"stuff-viewer-action-btn",onClick:z,title:"Download","aria-label":"Download",children:YO})]})]}),(0,re.jsx)("div",{className:"stuff-viewer-content",ref:u,children:k()})]})}var eT=oe(wt(),1);var Ma=oe(ge(),1);function tT({isOpen:e,onClose:t,children:n,width:o,isDragging:i,onResizeHandleMouseDown:a,closeOnEscape:l=!0}){eT.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,Ma.jsxs)("div",{className:r,style:o?{width:`${o}px`}:void 0,children:[a&&(0,Ma.jsx)("div",{className:"detail-panel-resize-handle",onMouseDown:a,role:"separator","aria-orientation":"vertical","aria-label":"Resize panel"}),(0,Ma.jsxs)("div",{className:"detail-panel-content",children:[(0,Ma.jsx)("div",{className:"detail-panel-close-row",children:(0,Ma.jsx)("button",{className:"detail-panel-close",onClick:t,"aria-label":"Close panel",children:"x"})}),n]})]})}var Da=oe(wt(),1),qO=.6;function nT({defaultWidth:e,minWidth:t,maxWidth:n,containerRef:o}){let[i,a]=Da.default.useState(e),[l,r]=Da.default.useState(!1),s=Da.default.useRef({startX:0,startWidth:0,maxAllowed:n}),u=Da.default.useRef(null),c=Da.default.useCallback(d=>{d.preventDefault(),d.stopPropagation();let f=o?.current?.getBoundingClientRect().width,h=f?Math.min(n,f*qO):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 Da.default.useEffect(()=>{if(!l)return;let d=h=>{u.current!==null&&cancelAnimationFrame(u.current),u.current=requestAnimationFrame(()=>{let{startX:v,startWidth:b,maxAllowed:S}=s.current,p=v-h.clientX,y=Math.max(t,Math.min(S,b+p));a(y),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 aT=oe(wt(),1);var Uf=oe(wt(),1),Ve=oe(ge(),1);function Xh(e){return e<1?`${(e*1e3).toFixed(0)}ms`:`${e.toFixed(2)}s`}function te({label:e,value:t}){return t==null?null:(0,Ve.jsxs)("div",{className:"detail-kv-row",children:[(0,Ve.jsx)("span",{className:"detail-kv-key",children:e}),(0,Ve.jsx)("span",{className:"detail-kv-value",children:String(t)})]})}function qh({label:e,text:t}){return t?(0,Ve.jsxs)("div",{children:[(0,Ve.jsx)("div",{className:"detail-section-label",children:e}),(0,Ve.jsx)("div",{className:"detail-prompt-block",children:t})]}):null}var ZO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"})}),jO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),$O=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.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"})}),KO=(0,Ve.jsx)("svg",{viewBox:"0 0 24 24",width:"10",height:"10",fill:"currentColor",children:(0,Ve.jsx)("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})}),oT={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 lo({label:e,templateText:t,renderedText:n}){let[o,i]=(0,Uf.useState)(!1),[a,l]=(0,Uf.useState)(!1),[r,s]=(0,Uf.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,Ve.jsxs)("div",{children:[(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:4},children:[(0,Ve.jsx)("div",{className:"detail-section-label",style:{marginBottom:0},children:e}),(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,Ve.jsx)("button",{onClick:()=>s(v=>!v),title:r?"Collapse prompt":"Expand prompt","aria-label":r?"Collapse prompt":"Expand prompt",className:"detail-prompt-expand-btn",children:r?jO:ZO}),(0,Ve.jsx)("button",{onClick:h,title:"Copy prompt","aria-label":"Copy prompt",style:{...oT,color:a?"#10b981":"#64748b"},children:a?KO:$O}),d&&(0,Ve.jsxs)("button",{onClick:()=>i(v=>!v),style:oT,children:[(0,Ve.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,Ve.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,Ve.jsx)("div",{className:`detail-prompt-block ${r?"detail-prompt-block--expanded":"detail-prompt-block--collapsed"}`,style:{marginTop:6},children:f})]})}var Lt=oe(ge(),1);function Zh({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,v=s||e.llm_choices?.for_object;return(0,Lt.jsxs)(Lt.Fragment,{children:[(0,Lt.jsx)(te,{label:"Model",value:h}),v&&v!==h&&(0,Lt.jsx)(te,{label:"Model (object)",value:v}),(0,Lt.jsx)(te,{label:"Structuring",value:d||e.structuring_method}),(0,Lt.jsx)(te,{label:"Multiple Output",value:f}),(0,Lt.jsx)(te,{label:"Output Multiplicity",value:e.output_multiplicity}),(0,Lt.jsx)(te,{label:"Prompt Category",value:n.prompt_blueprint?.category}),o&&(0,Lt.jsx)(te,{label:"User Image Refs",value:`${n.user_image_references.length} references`}),i&&(0,Lt.jsx)(te,{label:"User Document Refs",value:`${n.user_document_references.length} references`}),a&&(0,Lt.jsx)(te,{label:"System Image Refs",value:`${n.system_image_references.length} references`}),l&&(0,Lt.jsx)(te,{label:"System Document Refs",value:`${n.system_document_references.length} references`}),(0,Lt.jsx)(lo,{label:"System Prompt",templateText:n.system_prompt_blueprint?.template,renderedText:u}),(0,Lt.jsx)(lo,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:c})]})}function jh(e){return null}var cn=oe(ge(),1);function $h({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,cn.jsxs)(cn.Fragment,{children:[(0,cn.jsx)(te,{label:"Model",value:o||e.img_gen_choice}),(0,cn.jsx)(lo,{label:"Prompt",templateText:n.prompt_blueprint?.template,renderedText:i}),(0,cn.jsx)(lo,{label:"Negative Prompt",templateText:n.negative_prompt_blueprint?.template,renderedText:a}),(0,cn.jsx)(te,{label:"Aspect Ratio",value:e.aspect_ratio}),(0,cn.jsx)(te,{label:"Output Format",value:e.output_format}),(0,cn.jsx)(te,{label:"Background",value:e.background}),(0,cn.jsx)(te,{label:"Is Raw",value:e.is_raw}),(0,cn.jsx)(te,{label:"Seed",value:e.seed}),(0,cn.jsx)(te,{label:"Images",value:t?.nb_images??e.output_multiplicity})]})}function Kh(e){return null}var fn=oe(ge(),1);function Qh({blueprint:e,executionData:t}){let n=t?.resolved_model;return(0,fn.jsxs)(fn.Fragment,{children:[(0,fn.jsx)(te,{label:"Model",value:n||e.extract_choice}),(0,fn.jsx)(te,{label:"Document Variable",value:e.document_stuff_name}),(0,fn.jsx)(te,{label:"Caption Images",value:e.should_caption_images}),(0,fn.jsx)(te,{label:"Max Page Images",value:e.max_page_images}),(0,fn.jsx)(te,{label:"Include Page Views",value:e.should_include_page_views}),(0,fn.jsx)(te,{label:"Page Views DPI",value:e.page_views_dpi}),(0,fn.jsx)(te,{label:"Render JS",value:e.render_js}),(0,fn.jsx)(te,{label:"Include Raw HTML",value:e.include_raw_html}),(0,fn.jsx)(te,{label:"Image Variable",value:e.image_stuff_name})]})}function Fh(e){return null}var dn=oe(ge(),1);function Wh({blueprint:e,executionData:t}){let n=t?.resolved_model,o=t?.rendered_query;return(0,dn.jsxs)(dn.Fragment,{children:[(0,dn.jsx)(te,{label:"Model",value:n||e.search_choice}),(0,dn.jsx)(lo,{label:"Search Query",templateText:e.prompt_blueprint.template,renderedText:o}),(0,dn.jsx)(te,{label:"Max Results",value:e.max_results_override}),(0,dn.jsx)(te,{label:"Include Images",value:e.include_images_override}),(0,dn.jsx)(te,{label:"Structured Output",value:e.is_structured_output}),(0,dn.jsx)(te,{label:"From Date",value:e.from_date}),(0,dn.jsx)(te,{label:"To Date",value:e.to_date}),e.include_domains&&e.include_domains.length>0&&(0,dn.jsx)(te,{label:"Include Domains",value:e.include_domains.join(", ")}),e.exclude_domains&&e.exclude_domains.length>0&&(0,dn.jsx)(te,{label:"Exclude Domains",value:e.exclude_domains.join(", ")})]})}function Jh(e){return null}var Le=oe(ge(),1);function QO(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 FO=60;function WO(e){return e.length>FO||e.includes(`
|
|
2475
|
+
`)}function JO({label:e,value:t}){return(0,Le.jsxs)("div",{className:"detail-field-block",children:[(0,Le.jsx)("div",{className:"detail-field-block-label",children:e}),(0,Le.jsx)("div",{className:"detail-field-block-value",children:t})]})}function iT({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,Le.jsxs)(Le.Fragment,{children:[o.map(([r,s])=>{let u=QO(s);return WO(u)?(0,Le.jsx)("div",{style:l,children:(0,Le.jsx)(JO,{label:r,value:u})},r):(0,Le.jsx)("div",{style:l,children:(0,Le.jsx)(te,{label:r,value:u})},r)}),a.map(([r,s])=>{let u=n?.[r]?.rendered;return(0,Le.jsx)("div",{style:l,children:(0,Le.jsx)(lo,{label:`Template \u2014 ${r}`,templateText:s.template??null,renderedText:u})},r)}),i.map(([r,s])=>s.nested?(0,Le.jsxs)("div",{children:[(0,Le.jsxs)("div",{className:"detail-nested-header",style:t>0?{paddingLeft:t*12}:void 0,children:[(0,Le.jsx)("span",{className:"detail-nested-header-name",children:r}),(0,Le.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,Le.jsx)(iT,{blueprint:s.nested,depth:t+1,fieldResolutions:null})]},r):null)]})}function eg({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,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)(te,{label:"Mode",value:o||(l?"construct":"template")}),(0,Le.jsx)(te,{label:"Category",value:e.category}),(0,Le.jsx)(te,{label:"Templating Style",value:e.templating_style}),e.template&&(0,Le.jsx)(lo,{label:"Template",templateText:e.template,renderedText:n}),l&&(0,Le.jsxs)(Le.Fragment,{children:[(0,Le.jsx)("div",{className:"detail-section-label",children:"FIELDS"}),(0,Le.jsx)(iT,{blueprint:a,depth:0,fieldResolutions:i})]})]})}function tg(e){return null}var Gt=oe(ge(),1);function ng({blueprint:e,executionData:t}){let n=t?.evaluated_expression,o=t?.selected_outcome;return(0,Gt.jsxs)(Gt.Fragment,{children:[(0,Gt.jsx)(qh,{label:"Expression",text:e.expression}),n&&(0,Gt.jsx)(te,{label:"Expression Result",value:n}),(0,Gt.jsxs)("div",{children:[(0,Gt.jsx)("div",{className:"detail-section-label",children:"Outcomes"}),Object.entries(e.outcome_map).map(([i,a])=>(0,Gt.jsxs)("div",{className:"detail-kv-row",style:o===a?{background:"rgba(80,250,123,0.08)"}:void 0,children:[(0,Gt.jsx)("span",{className:"detail-kv-key",children:i}),(0,Gt.jsx)("span",{className:"detail-kv-value",style:o===a?{color:"#50FA7B"}:void 0,children:a})]},i)),(0,Gt.jsxs)("div",{className:"detail-kv-row",children:[(0,Gt.jsx)("span",{className:"detail-kv-key",children:"default"}),(0,Gt.jsx)("span",{className:"detail-kv-value",children:e.default_outcome})]})]}),(0,Gt.jsx)(te,{label:"Alias Expression To",value:e.add_alias_from_expression_to})]})}function og(e){return null}var ni=oe(ge(),1);function ig({blueprint:e}){return(0,ni.jsxs)("div",{children:[(0,ni.jsx)("div",{className:"detail-section-label",children:"Steps"}),(0,ni.jsx)("div",{className:"detail-steps-list",children:e.sequential_sub_pipes.map((t,n)=>(0,ni.jsxs)("div",{className:"detail-step-item",children:[(0,ni.jsx)("span",{className:"detail-step-index",children:n+1}),(0,ni.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,ni.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]})}function ag(e){return null}var Rn=oe(ge(),1);function lg({blueprint:e}){return(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsxs)("div",{children:[(0,Rn.jsx)("div",{className:"detail-section-label",children:"Branches"}),(0,Rn.jsx)("div",{className:"detail-steps-list",children:e.parallel_sub_pipes.map((t,n)=>(0,Rn.jsxs)("div",{className:"detail-step-item",children:[(0,Rn.jsx)("span",{className:"detail-step-code",children:t.pipe_code}),t.output_name&&(0,Rn.jsxs)("span",{className:"detail-io-concept",children:["-> ",t.output_name]})]},n))})]}),(0,Rn.jsx)(te,{label:"Add Each Output",value:e.add_each_output}),(0,Rn.jsx)(te,{label:"Combined Output",value:e.combined_output})]})}function rg(e){return null}var oi=oe(ge(),1);function sg({blueprint:e,executionData:t}){let n=t?.item_count;return(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(te,{label:"Branch Pipe",value:e.branch_pipe_code}),(0,oi.jsx)(te,{label:"Input List Variable",value:e.batch_params.input_list_stuff_name}),(0,oi.jsx)(te,{label:"Input Item Variable",value:e.batch_params.input_item_stuff_name}),n!=null&&(0,oi.jsx)(te,{label:"Items Processed",value:n})]})}function ug(e){return null}var K=oe(ge(),1),e3={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSignature:"Signature",PipeSequence:"Seq",PipeParallel:"Par",PipeCondition:"Cond",PipeBatch:"Batch"},t3=new Set(["PipeSequence","PipeParallel","PipeCondition","PipeBatch"]),n3={succeeded:"#50FA7B",failed:"#FF5555",running:"#8BE9FD",scheduled:"#6272a4",skipped:"#6272a4",canceled:"#6272a4"};function lT({node:e,spec:t,onConceptClick:n}){let o=e.pipe_type,i=t3.has(o),a=e3[o],l=e.status,r=n3[l]??"#6272a4",s=aT.default.useMemo(()=>{if(!e.pipe_code||!t.pipe_registry)return;let f=`${t.pipeline_ref?.domain??""}.${e.pipe_code}`,h=OE(t,f);if(h)return h;for(let[v,b]of Object.entries(t.pipe_registry))if(v.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,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)("div",{className:"detail-sticky-header",children:[(0,K.jsxs)("div",{className:"detail-header",children:[(0,K.jsx)("span",{className:`detail-badge ${i?"detail-badge--controller":"detail-badge--operator"}`,children:a}),(0,K.jsx)("span",{className:`detail-pipe-code ${i?"detail-pipe-code--controller":""}`,children:e.pipe_code})]}),(0,K.jsxs)("div",{className:"detail-status",children:[(0,K.jsx)("span",{className:"detail-status-dot",style:{background:r}}),(0,K.jsx)("span",{className:"detail-status-label",style:{color:r},children:l}),e.timing?.duration!=null&&(0,K.jsx)("span",{className:"detail-duration",children:Xh(e.timing.duration)})]}),d&&(0,K.jsx)("div",{className:"detail-description",children:d}),u.length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Inputs"}),(0,K.jsx)("div",{className:"detail-io-list",children:u.map((f,h)=>(0,K.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,K.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,K.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),c.length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Output"}),(0,K.jsx)("div",{className:"detail-io-list",children:c.map((f,h)=>(0,K.jsxs)("div",{className:"detail-io-pill",style:{cursor:f.concept&&n?"pointer":void 0},onClick:()=>f.concept&&n?.(f.concept),children:[(0,K.jsx)("span",{className:"detail-io-name",children:f.name}),f.concept&&(0,K.jsx)("span",{className:"detail-io-concept",children:f.concept})]},h))})]}),(u.length>0||c.length>0)&&(0,K.jsx)("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)",margin:"4px 0"}})]}),s&&(0,K.jsx)(o3,{blueprint:s,executionData:e.execution_data}),e.execution_data&&Object.keys(e.execution_data).length>0&&(0,K.jsx)(i3,{executionData:e.execution_data,pipeType:o}),e.error&&(0,K.jsxs)("div",{className:"detail-error",children:[(0,K.jsx)("div",{className:"detail-error-type",children:e.error.error_type}),(0,K.jsx)("div",{className:"detail-error-message",children:e.error.message}),e.error.stack&&(0,K.jsx)("div",{className:"detail-error-stack",children:e.error.stack})]}),e.metrics&&Object.keys(e.metrics).length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Metrics"}),Object.entries(e.metrics).map(([f,h])=>(0,K.jsx)(te,{label:f,value:typeof h=="number"?h.toLocaleString():String(h)},f))]}),e.tags&&Object.keys(e.tags).length>0&&(0,K.jsxs)("div",{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Tags"}),(0,K.jsx)("div",{className:"detail-tags",children:Object.entries(e.tags).map(([f,h])=>(0,K.jsxs)("span",{className:"detail-tag",children:[(0,K.jsxs)("span",{className:"detail-tag-key",children:[f,": "]}),(0,K.jsx)("span",{className:"detail-tag-value",children:h})]},f))})]}),!s&&(0,K.jsx)("div",{className:"detail-not-available",children:"Blueprint not available"})]})}function o3({blueprint:e,executionData:t}){switch(e.type){case"PipeLLM":return(0,K.jsx)(Zh,{blueprint:e,executionData:t});case"PipeImgGen":return(0,K.jsx)($h,{blueprint:e,executionData:t});case"PipeCompose":return(0,K.jsx)(eg,{blueprint:e,executionData:t});case"PipeExtract":return(0,K.jsx)(Qh,{blueprint:e,executionData:t});case"PipeSearch":return(0,K.jsx)(Wh,{blueprint:e,executionData:t});case"PipeSequence":return(0,K.jsx)(ig,{blueprint:e,executionData:t});case"PipeParallel":return(0,K.jsx)(lg,{blueprint:e,executionData:t});case"PipeCondition":return(0,K.jsx)(ng,{blueprint:e,executionData:t});case"PipeBatch":return(0,K.jsx)(sg,{blueprint:e,executionData:t});case"PipeFunc":return null;case"PipeSignature":return(0,K.jsx)("div",{className:"detail-not-available",children:"Signature stub \u2014 declared but not yet implemented."});default:return null}}function i3({executionData:e,pipeType:t}){switch(t){case"PipeLLM":return(0,K.jsx)(jh,{data:e});case"PipeImgGen":return(0,K.jsx)(Kh,{data:e});case"PipeExtract":return(0,K.jsx)(Fh,{data:e});case"PipeSearch":return(0,K.jsx)(Jh,{data:e});case"PipeCompose":return(0,K.jsx)(tg,{data:e});case"PipeCondition":return(0,K.jsx)(og,{data:e});case"PipeSequence":return(0,K.jsx)(ag,{data:e});case"PipeParallel":return(0,K.jsx)(rg,{data:e});case"PipeBatch":return(0,K.jsx)(ug,{data:e});default:return(0,K.jsx)(a3,{data:e})}}function a3({data:e}){let t=Object.entries(e);return t.length===0?null:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)("div",{className:"detail-section-label",children:"Execution"}),t.map(([n,o])=>(0,K.jsx)(te,{label:n,value:String(o)},n))]})}var cg=oe(wt(),1);var Ee=oe(ge(),1);function fg({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a,instanceKey:l}){return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-header",children:[(0,Ee.jsx)("span",{className:"detail-concept-code",children:e.code}),(0,Ee.jsx)("span",{className:"detail-concept-domain",children:e.domain_code})]}),e.description&&(0,Ee.jsx)("div",{className:"detail-description",children:e.description}),e.refines&&(0,Ee.jsxs)("div",{className:"detail-refines",children:["refines ",(0,Ee.jsx)("span",{className:"detail-refines-code",children:e.refines})]}),(0,Ee.jsx)(l3,{concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a},l??`${e.code}:${t&&"digest"in t?t.digest:t?.name??""}`)]})}function l3({concept:e,ioData:t,isDryRun:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=!!t&&!n,[r,s]=cg.default.useState(l?"data":"structure"),u=cg.default.useId(),c=b=>`${u}-tab-${b}`,d=b=>`${u}-tabpanel-${b}`,f=e.json_schema?(0,Ee.jsxs)("div",{children:[(0,Ee.jsx)("div",{className:"detail-section-label",children:"Structure"}),(0,Ee.jsx)(r3,{schema:e.json_schema,isDryRun:n})]}):(0,Ee.jsx)("div",{className:"detail-not-available",children:"Schema not available"});if(!l)return f;let h=b=>{let S;switch(b.key){case"ArrowLeft":case"ArrowRight":S=r==="data"?"structure":"data";break;case"Home":S="data";break;case"End":S="structure";break;default:return}b.preventDefault(),s(S),document.getElementById(c(S))?.focus()},v=(b,S)=>(0,Ee.jsx)("button",{type:"button",role:"tab",id:c(b),"aria-selected":r===b,"aria-controls":d(b),tabIndex:r===b?0:-1,className:`detail-tab ${r===b?"detail-tab--active":""}`,onClick:()=>s(b),onKeyDown:h,children:S});return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.jsxs)("div",{className:"detail-tabs",role:"tablist","aria-label":"Concept views",children:[v("data","Data"),v("structure","Structure")]}),(0,Ee.jsx)("div",{role:"tabpanel",id:d(r),"aria-labelledby":c(r),children:r==="data"?(0,Ee.jsx)(Pf,{stuff:u3(t),resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):f})]})}function r3({schema:e,isDryRun:t}){let n=e.properties,o=new Set(e.required??[]);if(!n||Object.keys(n).length===0)return(0,Ee.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,Ee.jsxs)("table",{className:"detail-schema-table",children:[(0,Ee.jsx)("thead",{children:(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("th",{children:"Field"}),(0,Ee.jsx)("th",{children:"Type"}),(0,Ee.jsx)("th",{}),(0,Ee.jsx)("th",{children:"Description"})]})}),(0,Ee.jsx)("tbody",{children:a.map(([l,r])=>(0,Ee.jsxs)("tr",{children:[(0,Ee.jsx)("td",{className:"detail-schema-field",children:l}),(0,Ee.jsx)("td",{className:"detail-schema-type",children:s3(r)}),(0,Ee.jsx)("td",{children:o.has(l)&&(0,Ee.jsx)("span",{className:"detail-schema-required",children:"req"})}),(0,Ee.jsx)("td",{children:r.description??""})]},l))})]})}function s3(e){return e.type?String(e.type):e.anyOf?"union":e.allOf?"all":e.$ref?String(e.$ref).split("/").pop()??"(unresolved type)":"(unresolved type)"}function u3(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 $l(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 Kl(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 If(e){return{pipeCode:e.pipe_code,pipeType:e.pipe_type,description:e.description,status:e.status,inputs:e.io.inputs.map(t=>({name:t.name,concept:t.concept??""})),outputs:e.io.outputs.map(t=>({name:t.name,concept:t.concept??""}))}}var c3=7,f3=48,d3=140;function p3(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=Al(s,`nodes[${s.id}]`),c=u.status==="failed",d=u.pipe_code,f=If(u);o.push({id:u.id,type:Cl,data:{labelDescriptor:{kind:"pipe",label:d,isFailed:c},nodeData:u,isPipe:!0,isStuff:!1,labelText:d,pipeCode:f.pipeCode,pipeType:u.pipe_type,pipeCardData:f},position:{x:0,y:0}})}for(let[s,u]of Object.entries(t.stuffRegistry)){let c=Hi(s),d=u.name,f=u.concept||"",h=Math.max(d.length,f.length)*c3+f3,v=Math.max(d3,h),b=!t.stuffProducers[s],S=!b&&!t.stuffConsumers[s]?.length,p=b?"input":S?"output":void 0,y=b?"var(--color-stuff-input-border, #50FA7B)":S?"var(--color-stuff-output-border, #a78bfa)":"var(--color-stuff-border)";o.push({id:c,type:g1,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 ${y}`,borderRadius:"999px",padding:"0",width:v+"px",boxShadow:"var(--shadow-md)"}})}let l=0;for(let[s,u]of Object.entries(t.stuffProducers)){let c=Hi(s);i.push({id:"edge_"+l++,source:u,target:c,type:n,animated:!1,style:{stroke:"var(--color-edge)",strokeWidth:2},markerEnd:{type:pa,color:"var(--color-edge)"}})}for(let[s,u]of Object.entries(t.stuffConsumers)){let c=Hi(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:pa,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=Hi(s.source_stuff_digest),c=Hi(s.target_stuff_digest);i.push({id:s.id,source:u,target:c,type:"smoothstep",animated:!1,style:{stroke:"var(--color-parallel-combine)",strokeWidth:2,strokeDasharray:"5,5"},markerEnd:{type:pa,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=Hi(s.source_stuff_digest),c=Hi(s.target_stuff_digest),d=s.kind==="batch_item";i.push({id:s.id,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:pa,color:d?"var(--color-batch-item)":"var(--color-batch-aggregate)"}})}let r=To(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 rT(e,t){if(e){let n=RE(e);if(n&&(Object.keys(n.stuffProducers).length>0||Object.keys(n.stuffConsumers).length>0))return{graphData:p3(e,n,t),analysis:n}}return{graphData:{nodes:[],edges:[]},analysis:null}}function uT(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 m3(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 qs(e,t,n){let o=m3(e,t),i=null;for(let a of o)n.has(a)&&(i=a);return i}function Vf(e,t,n){return qs(e,t,n)??e}function sT(e,t){return e.nodes.find(n=>n.id===t)}function dg(e,t,n,o,i){if(o.size===0)return{nodes:e.nodes,edges:e.edges,analysis:t};let a=To(n,t),l=new Map;for(let p of o){let m=sT(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(!wl(p.id))continue;let y=l.get(us(p.id));if(!y)continue;let m=a[p.id],g=null,x=new Set;for(;m&&!x.has(m);)x.add(m),y.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)qs(p.id,a,o)||r.push(p);for(let p of o){if(qs(p,a,o))continue;let y=sT(n,p);if(!y)continue;let m=If(Al(y,p));i&&(m.onExpand=x=>i(p,x));let g={id:p,type:Cl,data:{labelDescriptor:{kind:"pipe",label:m.pipeCode,isFailed:m.status==="failed"},nodeData:y,isPipe:!1,isStuff:!1,isController:!0,labelText:m.pipeCode,pipeCode:m.pipeCode,pipeType:y.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)||qs(p,a,o)||s.add(p);let u={};for(let p of s){let y=t.containmentTree[p]??[],m=[];for(let g of y){let x=qs(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 y of p)c.add(y);let d={};for(let[p,y]of Object.entries(t.stuffProducers))d[p]=Vf(y,a,o);let f={};for(let[p,y]of Object.entries(t.stuffConsumers)){let m=new Set;for(let g of y)m.add(Vf(g,a,o));f[p]=[...m]}let h={stuffRegistry:t.stuffRegistry,stuffProducers:d,stuffConsumers:f,controllerNodeIds:s,childNodeIds:c,containmentTree:u},v=new Map;for(let p of e.edges){let y=Vf(p.source,a,o),m=Vf(p.target,a,o);if(y===m)continue;let g=p._batchEdge?"batch":"data",x=`${y}->${m}|${g}`;if(v.has(x))continue;let _={...p,source:y,target:m,id:p.id};p._batchEdge&&(y!==p.source||m!==p.target)&&(_.label="[N]"),delete _._crossGroup,v.set(x,_)}let b=To({...n,edges:n.edges.filter(p=>p.kind!=="contains"?!0:s.has(p.source))},h),S=[];for(let p of v.values()){let y=b[p.source]||null,m=b[p.target]||null;if(y&&m&&y!==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:pa,color:"var(--color-edge)"})}S.push(p)}return{nodes:r,edges:S,analysis:h}}var h3=window.ELK,cT=h3;function g3(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"BT":return"UP";default:return"DOWN"}}var y3="_in",v3="_out";function mg(e){return e+y3}function hg(e){return e+v3}function b3(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:mg(e),x:r,y:s,width:1,height:1,layoutOptions:{"elk.port.side":i}},{id:hg(e),x:u,y:c,width:1,height:1,layoutOptions:{"elk.port.side":a}}]}var S3=320,mT=28,x3=24,pg=8,_3=22,E3=50,T3=16,N3=3,fT=38,dT=30,Yf=22,C3=140,w3=100,A3=17,M3=58,D3=5.5,R3=5,O3=4.5,z3=4;function L3(e,t,n){if(!e)return 0;if(!t)return 1;let o=n-mT,i=Math.max(1,Math.floor(o/D3)),a=Math.ceil(e.length/i);return Math.min(N3,Math.max(1,a))}function H3(e,t){let n=Math.min(C3,Math.ceil(e.length*R3)),o=Math.min(w3,Math.ceil(t.length*O3));return n+o+A3}function pT(e,t){if(e.length===0)return 0;let n=t-mT-M3,o=1,i=0;for(let a of e){let l=H3(a.name,a.concept);if(i===0){i=l;continue}i+l<=n?i+=l:(o+=1,i=l)}return o}function Ql(e,t){let n=e.data||{},o=n.isStuff,i=n.labelText||"",a=e.type===Cl,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??[],v=d.description||n.nodeData?.description||"",b=x3+(t?E3:_3),S=L3(v,t,u);S>0&&(b+=pg+S*T3);let p=f.slice(0,z3);if(p.length>0)if(b+=pg,t)b+=fT+(p.length-1)*Yf;else{let y=pT(p,u);b+=dT+(y-1)*Yf}if(h.length>0)if(b+=pg,t)b+=fT+(h.length-1)*Yf;else{let y=pT(h,u);b+=dT+(y-1)*Yf}c=Math.min(S3,b)}else c=a?120:70;return{width:u,height:c}}function B3(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 Xf(e,t,n){return{id:e,width:t.width,height:t.height,ports:b3(e,t,n),layoutOptions:{"elk.portConstraints":"FIXED_POS"}}}function hT(e,t,n,o,i,a){let l=i==="LR"||i==="RL",r=a?.nodesep??80,s=a?.ranksep??70,u=g3(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(w=>{let N=Ql(w,l);return x[w.id]=N,Xf(w.id,N,i)}),E=t.map(w=>({id:w.id,sources:[hg(w.source)],targets:[mg(w.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:_,edges:E},dimensionMap:x}}let f=To(n,o),h=B3(o.controllerNodeIds,o.containmentTree),v={},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 E=1+(h[x]??0)*.15,w=Math.round(Rc*E),N=Math.round(Oc*E),k=Math.round(zc*E),D={"elk.padding":`[top=${N},left=${w},bottom=${k},right=${w}]`,"elk.spacing.nodeNode":String(r),"elk.layered.spacing.nodeNodeBetweenLayers":String(s),"elk.spacing.edgeNode":c,"elk.layered.spacing.edgeNodeBetweenLayers":c},z=[],P=o.containmentTree[x]||[];for(let T of P)if(o.controllerNodeIds.has(T)){let A=S[T];A&&z.push(A)}else{let A=b.get(T);if(A){let M=Ql(A,l);v[T]=M,z.push(Xf(T,M,i))}}for(let T of e)if(T.data.isStuff&&f[T.id]===x&&!z.some(A=>A.id===T.id)){let A=Ql(T,l);v[T.id]=A,z.push(Xf(T.id,A,i))}S[x]={id:x,layoutOptions:D,children:z}}let y=[];for(let x of p)if(!f[x]){let _=S[x];_&&y.push(_)}for(let x of e)if(!f[x.id]&&!o.controllerNodeIds.has(x.id)){let _=Ql(x,l);v[x.id]=_,y.push(Xf(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:[hg(x.source)],targets:[mg(x.target)]}));return{elkGraph:{id:"root",layoutOptions:d,children:y,edges:g},dimensionMap:v}}function gT(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 gg=null;function k3(){return gg||(gg=new cT),gg}async function qf(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}=hT(e,t,i??null,a??null,n,o),u=await k3().layout(r),c=gT(u),d={};if(a)for(let h of a.controllerNodeIds)c[h]&&(d[h]=c[h]);return{nodes:e.map(h=>{let v=c[h.id],b=s[h.id]??Ql(h,l),S=b.width,p=b.height,y=h.data.pipeCardData,g=y?{...y,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:v?v.x:0,y:v?v.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 Zs=5;function G3(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 P3(e,t,n,o){let i={};for(let v of n)i[v.id]=v;let a={};for(let v of e.nodes)t.controllerNodeIds.has(v.id)&&(a[v.id]=Al(v,`nodes[${v.id}]`));let l={},r=new Set;function s(v){if(l[v]!==void 0)return l[v];if(r.has(v))throw new Error(`Cycle detected in containment tree: controller "${v}" is part of a containment cycle`);r.add(v);let b=t.containmentTree[v]||[],S=-1;for(let p of b)t.controllerNodeIds.has(p)&&(S=Math.max(S,s(p)));return r.delete(v),l[v]=S+1,l[v]}let u=To(e,t),c={};for(let[v,b]of Object.entries(u))wl(v)&&i[v]&&(c[b]||(c[b]=[]),c[b].push(v));let d=Array.from(t.controllerNodeIds);for(let v of d)s(v);d.sort((v,b)=>l[v]-l[b]);let f=[],h={};for(let v of d){let S=(t.containmentTree[v]||[]).filter(D=>i[D]),p=c[v]||[],y=[...S,...p];if(y.length===0)continue;let m,g,x,_,E=o?.[v];if(E)m=E.x,g=E.y,x=E.width,_=E.height;else{let D=1/0,z=1/0,P=-1/0,T=-1/0;for(let V of y){let G=i[V],I=G.position,q=v1(G),j=b1(G);D=Math.min(D,I.x),z=Math.min(z,I.y),P=Math.max(P,I.x+q),T=Math.max(T,I.y+j)}let M=1+(l[v]??0)*.15,O=Math.round(Rc*M),R=Math.round(Oc*M),L=Math.round(zc*M);m=D-O,g=z-R,x=P-D+2*O,_=T-z+R+L}let w=a[v];if(!w)throw new cs(`nodes[${v}]`,`controller "${v}" is referenced by a "contains" edge but has no corresponding node in graphspec.nodes`);let N=w.pipe_code,k={id:v,type:y1,data:{label:N,pipeType:w.pipe_type,isController:!0,isPipe:!1,isStuff:!1,pipeCode:N,labelText:N},position:{x:m,y:g},style:{width:x+"px",height:_+"px",padding:"0"}};f.push(k),i[v]=k;for(let D of y)h[D]=v}for(let[v,b]of Object.entries(h)){let S=i[v],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 Fl(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>Zs&&!a?.has(g)&&c.add(g)}let f=e,h=t;if(c.size>0){let g=new Set;for(let _ of c){let w=(o.containmentTree[_]||[]).slice(Zs);for(let N of w)if(g.add(N),o.controllerNodeIds.has(N))for(let k of G3(N,o.containmentTree,o.controllerNodeIds))g.add(k)}let x=To(n,o);for(let _ of e){if(!wl(_.id)||g.has(_.id))continue;let E=x[_.id];if(!E||!c.has(E)&&!g.has(E))continue;let w=t.filter(N=>{if(N.source!==_.id&&N.target!==_.id)return!1;let k=N.source===_.id?N.target:N.source;return!wl(k)});(w.length===0||w.every(N=>{let k=N.source===_.id?N.target:N.source;return g.has(k)}))&&g.add(_.id)}f=e.filter(_=>!g.has(_.id)),h=t.filter(_=>!g.has(_.source)&&!g.has(_.target))}let v=P3(n,o,f,r);if(v.length===0)return{nodes:f,edges:h};for(let g of v){let x=u[g.id]??0,_=c.has(g.id);if(g.data.childCount=x,g.data.isCollapsed=_,l){let E=g.id;g.data.onToggleCollapse=()=>l(E)}if(s){let E=g.id;g.data.onToggleFold=w=>s(E,w)}}let b=[...v,...f],S={};for(let g of b)S[g.id]=g;let p={},y=new Set;function m(g){if(p[g]!==void 0)return p[g];if(y.has(g))throw new Error(`Cycle detected in node parent chain: node "${g}" references itself as an ancestor`);y.add(g);let x=S[g];return p[g]=x&&x.parentId?1+m(x.parentId):0,y.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 yT={"--font-sans":'"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',"--font-mono":'"JetBrains Mono", "Monaco", "Menlo", monospace'},U3={...yT,"--surface-page":"#0a0a0a","--surface-panel":"#111118","--surface-overlay":"rgba(17, 17, 24, 0.8)","--surface-overlay-hover":"rgba(30, 30, 40, 0.9)","--surface-overlay-disabled":"rgba(17, 17, 24, 0.6)","--surface-elevated":"rgba(255, 255, 255, 0.06)","--surface-elevated-hover":"rgba(255, 255, 255, 0.1)","--surface-sunken":"rgba(255, 255, 255, 0.03)","--surface-pill":"rgba(255, 255, 255, 0.06)","--surface-pill-border":"rgba(255, 255, 255, 0.08)","--border-subtle":"rgba(255, 255, 255, 0.06)","--border-default":"rgba(255, 255, 255, 0.1)","--border-strong":"rgba(255, 255, 255, 0.18)","--border-dashed":"rgba(255, 255, 255, 0.15)","--text-primary":"#f8fafc","--text-default":"#e2e8f0","--text-secondary":"#cbd5e1","--text-muted":"#94a3b8","--text-dim":"#64748b","--text-on-accent":"#0e0e0e","--shadow-sm":"0 2px 8px rgba(0, 0, 0, 0.4)","--shadow-md":"0 4px 16px rgba(0, 0, 0, 0.6)","--shadow-lg":"0 8px 24px rgba(0, 0, 0, 0.5)","--focus-ring":"rgba(59, 130, 246, 0.6)","--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-error-border":"rgba(255,85,85,0.2)","--color-accent":"#8BE9FD","--color-accent-strong":"#3b82f6","--color-warning":"#FFB86C","--ctrl-sequence-border":"rgba(148, 163, 184, 0.25)","--ctrl-sequence-bg":"rgba(148, 163, 184, 0.03)","--ctrl-sequence-text":"#94a3b8","--ctrl-parallel-border":"rgba(139, 233, 253, 0.35)","--ctrl-parallel-bg":"rgba(139, 233, 253, 0.03)","--ctrl-parallel-text":"#8be9fd","--ctrl-condition-border":"rgba(251, 191, 36, 0.35)","--ctrl-condition-bg":"rgba(251, 191, 36, 0.03)","--ctrl-condition-text":"#fbbf24","--ctrl-batch-border":"rgba(167, 139, 250, 0.35)","--ctrl-batch-bg":"rgba(167, 139, 250, 0.03)","--ctrl-batch-text":"#a78bfa","--ctrl-folded-bg":"rgba(148, 163, 184, 0.25)","--ctrl-folded-border":"rgba(148, 163, 184, 0.4)","--color-bg":"#0a0a0a","--color-bg-dots":"rgba(255, 255, 255, 0.35)","--color-text-muted":"#94a3b8","--color-controller-text":"#94a3b8"},I3={...yT,"--surface-page":"#f8fafc","--surface-panel":"#ffffff","--surface-overlay":"rgba(255, 255, 255, 0.92)","--surface-overlay-hover":"rgba(241, 245, 249, 0.96)","--surface-overlay-disabled":"rgba(255, 255, 255, 0.7)","--surface-elevated":"rgba(15, 23, 42, 0.05)","--surface-elevated-hover":"rgba(15, 23, 42, 0.09)","--surface-sunken":"rgba(15, 23, 42, 0.03)","--surface-pill":"rgba(15, 23, 42, 0.05)","--surface-pill-border":"rgba(15, 23, 42, 0.1)","--border-subtle":"rgba(15, 23, 42, 0.08)","--border-default":"rgba(15, 23, 42, 0.12)","--border-strong":"rgba(15, 23, 42, 0.22)","--border-dashed":"rgba(15, 23, 42, 0.18)","--text-primary":"#020617","--text-default":"#0f172a","--text-secondary":"#1e293b","--text-muted":"#475569","--text-dim":"#64748b","--text-on-accent":"#ffffff","--shadow-sm":"0 2px 8px rgba(15, 23, 42, 0.08)","--shadow-md":"0 4px 16px rgba(15, 23, 42, 0.14)","--shadow-lg":"0 8px 24px rgba(15, 23, 42, 0.15)","--focus-ring":"rgba(2, 132, 199, 0.5)","--color-pipe":"#dc2626","--color-pipe-bg":"rgba(220, 38, 38, 0.1)","--color-pipe-text":"#ffffff","--color-stuff":"#0891b2","--color-stuff-bg":"rgba(8, 145, 178, 0.08)","--color-stuff-border":"#0e7490","--color-stuff-text":"#0f172a","--color-stuff-text-dim":"#475569","--color-edge":"#64748b","--color-batch-item":"#7c3aed","--color-batch-aggregate":"#15803d","--color-parallel-combine":"#6d28d9","--color-success":"#15803d","--color-success-bg":"rgba(21, 128, 61, 0.12)","--color-error":"#dc2626","--color-error-bg":"rgba(220, 38, 38, 0.1)","--color-error-border":"rgba(220, 38, 38, 0.25)","--color-accent":"#0284c7","--color-accent-strong":"#0284c7","--color-warning":"#d97706","--ctrl-sequence-border":"rgba(71, 85, 105, 0.3)","--ctrl-sequence-bg":"rgba(71, 85, 105, 0.04)","--ctrl-sequence-text":"#475569","--ctrl-parallel-border":"rgba(8, 145, 178, 0.4)","--ctrl-parallel-bg":"rgba(8, 145, 178, 0.05)","--ctrl-parallel-text":"#0e7490","--ctrl-condition-border":"rgba(217, 119, 6, 0.4)","--ctrl-condition-bg":"rgba(217, 119, 6, 0.05)","--ctrl-condition-text":"#b45309","--ctrl-batch-border":"rgba(124, 58, 237, 0.4)","--ctrl-batch-bg":"rgba(124, 58, 237, 0.05)","--ctrl-batch-text":"#6d28d9","--ctrl-folded-bg":"rgba(71, 85, 105, 0.18)","--ctrl-folded-border":"rgba(71, 85, 105, 0.35)","--color-bg":"#f8fafc","--color-bg-dots":"rgba(15, 23, 42, 0.18)","--color-text-muted":"#475569","--color-controller-text":"#475569"};function Zf(e){return e===da.LIGHT?I3:U3}var Wl={direction:"LR",showControllers:!1,foldMode:to.EXPANDED,theme:yt.SYSTEM,nodesep:50,ranksep:100,edgeType:Dc.DEFAULT,initialZoom:null,panToTop:!0};var Ra=oe(ge(),1);function V3(e){return e.kind==="pipe"?(0,Ra.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,Ra.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,Ra.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,Ra.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,Ra.jsx)("span",{style:{fontSize:"14px",color:"var(--color-stuff-text-dim)",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.concept})]})}function Jl(e){return e.map(t=>t.data.labelDescriptor?{...t,data:{...t.data,label:V3(t.data.labelDescriptor)}}:t)}var Z=oe(ge(),1),Y3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,Z.jsx)("polyline",{points:"12 5 19 12 12 19"})]}),X3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Z.jsx)("polyline",{points:"19 12 12 19 5 12"})]}),q3=(0,Z.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})}),Z3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Z.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]}),j3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,Z.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,Z.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,Z.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),$3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.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,Z.jsx)("path",{d:"m7 16.5-4.74-2.85"}),(0,Z.jsx)("path",{d:"m7 16.5 5-3"}),(0,Z.jsx)("path",{d:"M7 16.5v5.17"}),(0,Z.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,Z.jsx)("path",{d:"m17 16.5-5-3"}),(0,Z.jsx)("path",{d:"m17 16.5 4.74-2.85"}),(0,Z.jsx)("path",{d:"M17 16.5v5.17"}),(0,Z.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,Z.jsx)("path",{d:"M12 8 7.26 5.15"}),(0,Z.jsx)("path",{d:"m12 8 4.74-2.85"}),(0,Z.jsx)("path",{d:"M12 13.5V8"})]}),K3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"}),(0,Z.jsx)("polyline",{points:"2 2 6 6 2 6"}),(0,Z.jsx)("polyline",{points:"22 2 18 6 22 6"}),(0,Z.jsx)("polyline",{points:"2 22 6 18 2 18"}),(0,Z.jsx)("polyline",{points:"22 22 18 18 22 18"})]}),Q3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1"}),(0,Z.jsx)("polyline",{points:"3 3 7 7 3 7"}),(0,Z.jsx)("polyline",{points:"21 3 17 7 21 7"}),(0,Z.jsx)("polyline",{points:"3 21 7 17 3 17"}),(0,Z.jsx)("polyline",{points:"21 21 17 17 21 17"})]}),F3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,Z.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"4"}),(0,Z.jsx)("line",{x1:"12",y1:"20",x2:"12",y2:"22"}),(0,Z.jsx)("line",{x1:"4.93",y1:"4.93",x2:"6.34",y2:"6.34"}),(0,Z.jsx)("line",{x1:"17.66",y1:"17.66",x2:"19.07",y2:"19.07"}),(0,Z.jsx)("line",{x1:"2",y1:"12",x2:"4",y2:"12"}),(0,Z.jsx)("line",{x1:"20",y1:"12",x2:"22",y2:"12"}),(0,Z.jsx)("line",{x1:"4.93",y1:"19.07",x2:"6.34",y2:"17.66"}),(0,Z.jsx)("line",{x1:"17.66",y1:"6.34",x2:"19.07",y2:"4.93"})]}),W3=(0,Z.jsx)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Z.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),J3=(0,Z.jsxs)("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Z.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,Z.jsx)("line",{x1:"8",y1:"21",x2:"16",y2:"21"}),(0,Z.jsx)("line",{x1:"12",y1:"17",x2:"12",y2:"21"})]}),yg=[yt.SYSTEM,yt.LIGHT,yt.DARK];function bT(e){let t=yg.indexOf(e);return yg[(t+1)%yg.length]}function ez(e){return e===yt.LIGHT?F3:e===yt.DARK?W3:J3}function vT(e){let t={[yt.SYSTEM]:"system",[yt.LIGHT]:"light",[yt.DARK]:"dark"},n=bT(e);return`Theme: ${t[e]} \u2014 switch to ${t[n]}`}function ST({direction:e,onDirectionChange:t,showControllers:n,onShowControllersChange:o,onZoomIn:i,onZoomOut:a,onFitView:l,onFoldAll:r,onExpandAll:s,foldAllDisabled:u=!1,expandAllDisabled:c=!1,themeMode:d,onThemeModeChange:f,rightOffset:h=0}){let v=d!==void 0&&f!==void 0,b=e===wn.TB||e===wn.BT,S=b?"Switch to horizontal layout":"Switch to vertical layout",p=n?"Hide pipe controllers":"Show pipe controllers \u2014 groups pipes by their controlling pipe",y=r||s,m=u?"Fold all controllers (nothing to fold)":"Fold all controllers",g=c?"Expand all controllers (nothing to expand)":"Expand all controllers";return(0,Z.jsxs)("div",{className:"graph-toolbar",style:{right:`${h+8}px`},children:[r&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:r,disabled:u,title:m,"aria-label":m,children:K3}),s&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:s,disabled:c,title:g,"aria-label":g,children:Q3}),y&&(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),(0,Z.jsx)("button",{type:"button",className:`graph-toolbar-btn${n?" graph-toolbar-btn--active":""}`,onClick:()=>o(!n),title:p,"aria-label":p,children:$3}),(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>t(b?wn.LR:wn.TB),title:S,"aria-label":S,children:b?Y3:X3}),(a||i||l)&&(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),a&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:a,title:"Zoom out","aria-label":"Zoom out",children:q3}),i&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:i,title:"Zoom in","aria-label":"Zoom in",children:Z3}),l&&(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:l,title:"Fit view","aria-label":"Fit view",children:j3}),v&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{className:"graph-toolbar-separator"}),(0,Z.jsx)("button",{type:"button",className:"graph-toolbar-btn",onClick:()=>f(bT(d)),title:vT(d),"aria-label":vT(d),children:ez(d)})]})]})}var ii=oe(ge(),1),tz={PipeSequence:{badge:"Sequence",icon:"\u2192"},PipeParallel:{badge:"Parallel",icon:"//"},PipeCondition:{badge:"Condition",icon:"\u25C7"},PipeBatch:{badge:"Batch",icon:"\u2261"}};function nz(e){return e?tz[e]:{badge:"",icon:""}}function oz(e){return e?`controller-group--${e.replace("Pipe","").toLowerCase()}`:""}function iz({data:e}){let t=nz(e.pipeType),n=oz(e.pipeType),o=(e.pipeType==="PipeParallel"||e.pipeType==="PipeBatch")&&(e.childCount??0)>Zs,i=o?(e.childCount??0)-Zs:0;return(0,ii.jsxs)("div",{className:`controller-group-node ${n}`,children:[(0,ii.jsxs)("div",{className:"controller-group-header",children:[(0,ii.jsx)("span",{className:"controller-group-icon",children:t.icon}),(0,ii.jsx)("span",{className:"controller-group-badge",children:t.badge}),e.label&&(0,ii.jsx)("span",{className:"controller-group-label",children:e.label}),e.onToggleFold&&(0,ii.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,ii.jsx)("button",{className:"controller-group-collapse",onClick:a=>{a.stopPropagation(),e.onToggleCollapse?.()},children:e.isCollapsed?`+${i} hidden`:"collapse"})]})}var xT={controllerGroup:iz};var _T=oe(wt(),1),Fe=oe(ge(),1),az={PipeLLM:"LLM",PipeExtract:"Extract",PipeCompose:"Compose",PipeImgGen:"ImgGen",PipeSearch:"Search",PipeFunc:"Func",PipeSignature:"Signature",PipeSequence:"Sequence",PipeParallel:"Parallel",PipeCondition:"Condition",PipeBatch:"Batch"},lz={PipeSequence:!0,PipeParallel:!0,PipeCondition:!0,PipeBatch:!0};function rz(e){return e in lz}var sz={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"},canceled:{color:"#6272a4",label:"Canceled"}},vg=4;function uz(e){return az[e]}function pn({data:e,children:t}){let n=uz(e.pipeType),o=sz[e.status],i=e.status==="running",a=rz(e.pipeType),l=e.pipeType==="PipeSignature",[r,s]=(0,_T.useState)(!1),u=e.inputs.length>vg,c=u&&!r?e.inputs.slice(0,vg):e.inputs,d=e.inputs.length-vg,f=e.direction==="TB"?"pipe-card--tb":"pipe-card--lr",h=a?" pipe-card--controller":"",v=l?" pipe-card--signature":"",b=a?"pipe-card-badge pipe-card-badge--controller":l?"pipe-card-badge pipe-card-badge--signature":"pipe-card-badge";return(0,Fe.jsxs)("div",{className:`pipe-card ${f}${h}${v}`,children:[(0,Fe.jsxs)("div",{className:"pipe-card-header",children:[(0,Fe.jsx)("span",{className:b,children:n}),(0,Fe.jsx)("span",{className:"pipe-card-code",title:e.pipeCode,children:e.pipeCode}),(0,Fe.jsx)("span",{className:"pipe-card-status",style:{color:o.color},title:o.label,children:(0,Fe.jsx)("span",{className:`pipe-card-status-dot ${i?"pipe-card-status-dot--pulse":""}`,style:{background:o.color}})}),e.onExpand&&(0,Fe.jsx)("button",{type:"button",className:"pipe-card-expand",title:"Expand controller (alt/option: only this one)","aria-label":"Expand controller",onClick:S=>{S.stopPropagation(),e.onExpand?.({soloMode:S.altKey})},children:"\u2922"})]}),e.description&&(0,Fe.jsx)("span",{className:"pipe-card-description",title:e.description,children:e.description}),e.inputs.length>0&&(0,Fe.jsxs)("div",{className:"pipe-card-io",children:[(0,Fe.jsx)("span",{className:"pipe-card-io-label",children:"INPUTS"}),(0,Fe.jsxs)("div",{className:"pipe-card-io-pills",children:[c.map(S=>(0,Fe.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Fe.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Fe.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name)),u&&(0,Fe.jsx)("button",{className:"pipe-card-io-more",onClick:S=>{S.stopPropagation(),s(p=>!p)},children:r?"show less":`+${d} more`})]})]}),e.outputs.length>0&&(0,Fe.jsxs)("div",{className:"pipe-card-io",children:[(0,Fe.jsx)("span",{className:"pipe-card-io-label",children:"OUTPUT"}),(0,Fe.jsx)("div",{className:"pipe-card-io-pills",children:e.outputs.map(S=>(0,Fe.jsxs)("span",{className:"pipe-card-io-pill",title:`${S.name}: ${S.concept}`,children:[(0,Fe.jsx)("span",{className:"pipe-card-io-pill-name",children:S.name}),(0,Fe.jsx)("span",{className:"pipe-card-io-pill-concept",children:S.concept})]},S.name))})]}),t]})}var cz={PipeLLM:pn,PipeExtract:pn,PipeCompose:pn,PipeImgGen:pn,PipeSearch:pn,PipeFunc:pn,PipeSignature:pn,PipeSequence:pn,PipeParallel:pn,PipeCondition:pn,PipeBatch:pn};function ET(e){return cz[e]}var ai=oe(ge(),1);function fz({data:e}){let t=ET(e.pipeType)??pn;return(0,ai.jsx)(t,{data:e})}function TT({data:e,sourcePosition:t=W.Bottom,targetPosition:n=W.Top}){let o=e.pipeCardData;return o?(0,ai.jsxs)(ai.Fragment,{children:[(0,ai.jsx)(Aa,{type:"target",position:n}),(0,ai.jsx)(fz,{data:o}),(0,ai.jsx)(Aa,{type:"source",position:t})]}):null}var Ft=oe(ge(),1),dz={...xT,pipeCard:TT};function pz({nodeId:e,stuffData:t,graphspec:n,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}){let l=t.concept&&n?Oh(n,t.concept):void 0;return(0,Ft.jsx)(Ft.Fragment,{children:l?(0,Ft.jsx)(fg,{concept:l,ioData:t,instanceKey:e,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a}):(0,Ft.jsx)(Pf,{stuff:t,resolveStorageUrl:o,canEmbedPdf:i,onOpenExternally:a})})}function mz(e,t){return e===to.FOLDED?new Set(t):new Set}function hz(e,t){return e??t??Wl.theme??yt.SYSTEM}function bg(e,t){return e===yt.SYSTEM?t:e}function js(e){return e.map(t=>({...t,position:{...t.position},data:{...t.data},style:t.style?{...t.style}:void 0}))}function $s(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 NT(e){let{graphspec:t,config:n=Wl,initialDirection:o,initialShowControllers:i,initialFoldMode:a,hideToolbar:l=!1,theme:r,systemTheme:s,showThemeToggle:u=!0,onThemeChange:c,onNavigateToPipe:d,onStuffNodeClick:f,onReactFlowInit:h,statusMap:v,onNodeSelect:b,onPaneClick:S,renderDetailExtra:p,resolveStorageUrl:y,canEmbedPdf:m,onOpenExternally:g}=e,x=ce.default.useMemo(()=>t===null?null:Lc(t),[t]),[_,E]=ce.default.useState(()=>o??n.direction??Wl.direction??wn.TB),w=hz(r,n.theme),[N,k]=ce.default.useState(w),D=ce.default.useRef(w);ce.default.useEffect(()=>{w!==D.current&&(D.current=w,k(w))},[w]);let z=DE(s),P=bg(N,z),T=ce.default.useRef(c);T.current=c;let A=ce.default.useRef({mode:N,resolvedTheme:P});ce.default.useEffect(()=>{let ve=A.current;(ve.mode!==N||ve.resolvedTheme!==P)&&(A.current={mode:N,resolvedTheme:P},T.current?.(N,P))},[N,P]);let M=a??n.foldMode??Wl.foldMode??to.EXPANDED,[O,R]=ce.default.useState(()=>M===to.FOLDED?!0:i??n.showControllers??Wl.showControllers??!1),L=ce.default.useRef(M);L.current=M;let V=ce.default.useRef(null),[G,I]=ce.default.useState(null),[q,j]=ce.default.useState(null),{width:$,isDragging:fe,handleMouseDown:J}=nT({defaultWidth:380,minWidth:280,maxWidth:800,containerRef:V});ce.default.useEffect(()=>{I(null),j(null)},[x]),ce.default.useEffect(()=>{let ve=V.current;if(!ve)return;let le=Zf(P),ie=n.paletteColors,Ne=ie?{...le,...ie}:le;for(let[Me,We]of Object.entries(Ne))ve.style.setProperty(Me,We);return()=>{for(let Me of Object.keys(Ne))ve.style.removeProperty(Me)}},[n.paletteColors,P]);let[X,Q,ye]=EE([]),[me,ee,ae]=TE([]),se=ce.default.useRef(null),de=ce.default.useRef(null),Se=ce.default.useRef(null),Ae=ce.default.useRef(null),[rt,Nt]=ce.default.useState(new Set),Ct=ce.default.useCallback(ve=>{Nt(le=>{let ie=new Set(le);return ie.has(ve)?ie.delete(ve):ie.add(ve),ie})},[]),[st,mn]=ce.default.useState(new Set),Wt=ce.default.useCallback((ve,le)=>{mn(ie=>{let Ne=new Set(ie),Me=!Ne.has(ve),We=Se.current,Ue=!le?.soloMode&&We?.graphspec&&We.analysis?uT(ve,We.graphspec,We.analysis.controllerNodeIds):new Set([ve]);for(let Ht of Ue)Me?Ne.add(Ht):Ne.delete(Ht);return Ne})},[]),$n=n.edgeType||Dc.DEFAULT,Pt=ce.default.useMemo(()=>({nodesep:n.nodesep,ranksep:n.ranksep}),[n.nodesep,n.ranksep]),it=ce.default.useRef(O);it.current=O;let ut=ce.default.useRef(_);ut.current=_;let ro=ce.default.useRef(Pt);ro.current=Pt;let Co=ce.default.useRef(n.initialZoom);Co.current=n.initialZoom;let wo=ce.default.useRef(n.panToTop);wo.current=n.panToTop;let On=ce.default.useRef(rt);On.current=rt;let so=ce.default.useRef(Ct);so.current=Ct;let Ao=ce.default.useRef(st);Ao.current=st;let hn=ce.default.useRef(Wt);hn.current=Wt;let Ut=ce.default.useRef(!0),Jt=ce.default.useRef(0),Mo=ce.default.useRef(!1),Kn=ce.default.useRef(v);Kn.current=v,ce.default.useEffect(()=>{if(!de.current)return;let ve=!1;return(async()=>{try{let le=de.current;if(!le)return;let ie=await qf(le.nodes,le.edges,_,Pt,le._graphspec,le._analysis);if(ve)return;Ae.current={nodes:ie.nodes,edges:ie.edges,controllerPositions:ie.controllerPositions};let Ne=Fl(js(ie.nodes),ie.edges,le._graphspec,le._analysis,it.current,On.current,so.current,ie.controllerPositions,hn.current);Q($s($l(Jl(Ne.nodes)),Kn.current)),ee(Kl(Ne.edges)),setTimeout(()=>{!ve&&se.current&&se.current.fitView({padding:.1})},50)}catch(le){console.error("[GraphViewer] ELK layout failed:",le)}})(),()=>{ve=!0}},[_,Pt]),ce.default.useEffect(()=>{if(!Ae.current||!de.current)return;let ve=js(Ae.current.nodes),le=Ae.current.edges,ie=Fl(ve,le,de.current._graphspec,de.current._analysis,O,rt,Ct,Ae.current.controllerPositions,Wt);Q($s($l(Jl(ie.nodes)),Kn.current)),ee(Kl(ie.edges))},[O,rt,Ct,Wt]),ce.default.useEffect(()=>{if(!x){de.current=null,Se.current=null,Ae.current=null,Q([]),ee([]);return}let ve=!1;Nt(new Set),On.current=new Set;let{graphData:le,analysis:ie}=rT(x,$n);Se.current={nodes:le.nodes,edges:le.edges,analysis:ie,graphspec:x};let Ne=ie?mz(L.current,ie.controllerNodeIds):new Set;mn(Ne),Ao.current=Ne,Mo.current=Ne.size>0,Jt.current=Ne.size,Ne.size>0&&!it.current&&(R(!0),it.current=!0);let Me=Ne.size>0&&ie?dg({nodes:le.nodes,edges:le.edges},ie,x,Ne,hn.current):{nodes:le.nodes,edges:le.edges,analysis:ie};return de.current={nodes:Me.nodes,edges:Me.edges,_analysis:Me.analysis,_graphspec:x},(async()=>{try{let We=ut.current,Ue=ro.current,Qn=Me.nodes.some(zn=>!zn.position||zn.position.x===0&&zn.position.y===0)?await qf(Me.nodes,Me.edges,We,Ue,x,Me.analysis):{nodes:Me.nodes,edges:Me.edges,controllerPositions:{}};if(ve)return;Ae.current={nodes:Qn.nodes,edges:Qn.edges,controllerPositions:Qn.controllerPositions};let qi=Fl(js(Qn.nodes),Qn.edges,x,Me.analysis,it.current,On.current,so.current,Qn.controllerPositions,hn.current);Q($s($l(Jl(qi.nodes)),Kn.current)),ee(Kl(qi.edges)),setTimeout(()=>{if(!ve&&se.current&&(se.current.fitView({padding:.1}),Co.current!==void 0&&Co.current!==null&&se.current.zoomTo(Co.current),wo.current)){let zn=se.current.getViewport();se.current.setViewport({x:zn.x,y:20,zoom:zn.zoom})}},100)}catch(We){console.error("[GraphViewer] ELK layout failed:",We)}})(),()=>{ve=!0}},[x,$n]),ce.default.useEffect(()=>{if(Ut.current){Ut.current=!1,Jt.current=st.size;return}if(Mo.current){Mo.current=!1,Jt.current=st.size;return}let ve=Jt.current;if(Jt.current=st.size,ve===0&&st.size===0||!Se.current||!Se.current.analysis)return;let le=Se.current,ie=le.graphspec,Ne=le.analysis;if(!ie||!Ne)return;let Me=!1,We=dg({nodes:le.nodes,edges:le.edges},Ne,ie,st,Wt);return de.current={nodes:We.nodes,edges:We.edges,_analysis:We.analysis,_graphspec:ie},(async()=>{try{let Ue=await qf(We.nodes,We.edges,ut.current,ro.current,ie,We.analysis);if(Me)return;Ae.current={nodes:Ue.nodes,edges:Ue.edges,controllerPositions:Ue.controllerPositions};let Ht=Fl(js(Ue.nodes),Ue.edges,ie,We.analysis,it.current,On.current,so.current,Ue.controllerPositions,hn.current);Q($s($l(Jl(Ht.nodes)),Kn.current)),ee(Kl(Ht.edges)),setTimeout(()=>{!Me&&se.current&&se.current.fitView({padding:.1})},50)}catch(Ue){console.error("[GraphViewer] ELK layout failed:",Ue)}})(),()=>{Me=!0}},[st,Wt]),ce.default.useEffect(()=>{if(!Ae.current||!de.current)return;let ve=js(Ae.current.nodes),le=Ae.current.edges,ie=Fl(ve,le,de.current._graphspec,de.current._analysis,it.current,On.current,so.current,Ae.current.controllerPositions,hn.current);Q($s($l(Jl(ie.nodes)),v)),ee(Kl(ie.edges))},[v]);let er=ce.default.useCallback((ve,le)=>{let ie=le.data;if(b?.(le.id,ie,ve),ie.isController||ie.isPipe){let Ne=ie.pipeCode||ie.labelText;Ne&&d&&d(Ne,ie.pipeCardData?.status)}else if(ie.isStuff&&f&&x){let Ne=us(le.id),Me=Lh(x,Ne);Me&&f(Me)}if(j(null),G?.nodeId===le.id&&!q)I(null);else if(ie.isPipe||ie.isController)I({kind:"pipe",nodeId:le.id,nodeData:ie});else if(ie.isStuff&&x){let Ne=us(le.id),Me=Lh(x,Ne);I({kind:"stuff",nodeId:le.id,nodeData:ie,stuffData:Me??void 0})}Q(Ne=>Ne.map(Me=>({...Me,selected:Me.id===le.id})))},[Q,d,b,f,x,G,q]),li=ce.default.useCallback(ve=>{se.current=ve,h&&h(ve)},[h]),Do=ce.default.useCallback(()=>{I(null),j(null),S?.()},[S]),tr=ce.default.useCallback(ve=>{if(!x)return;let le=Oh(x,ve);le&&j(le)},[x]),uo=G?.kind==="pipe"&&x?x.nodes.find(ve=>ve.pipe_code===G.nodeData.pipeCode):void 0,za=G!==null||q!==null,ke=Se.current?.analysis?.controllerNodeIds,gn=ce.default.useMemo(()=>!O||!ke||ke.size===0?{onFoldAll:void 0,onExpandAll:void 0,foldAllDisabled:!1,expandAllDisabled:!1}:{onFoldAll:()=>mn(new Set(ke)),onExpandAll:()=>mn(new Set),foldAllDisabled:st.size===ke.size,expandAllDisabled:st.size===0},[O,ke,st]);return(0,Ft.jsxs)("div",{ref:V,className:`react-flow-container react-flow-container--theme-${P} react-flow-container--mode-${N}`,children:[(0,Ft.jsx)(_E,{nodes:X,edges:me,nodeTypes:dz,onNodesChange:ye,onEdgesChange:ae,onNodeClick:er,onPaneClick:Do,onInit:li,fitView:!0,fitViewOptions:{padding:.1},defaultEdgeOptions:{type:$n},panOnScroll:!0,minZoom:.1,proOptions:{hideAttribution:!0},panActivationKeyCode:null,children:(0,Ft.jsx)(CE,{variant:Eo.Dots,gap:20,size:1,color:"var(--color-bg-dots)"})}),(0,Ft.jsxs)(tT,{isOpen:za,onClose:Do,width:$,isDragging:fe,onResizeHandleMouseDown:J,children:[q?(0,Ft.jsx)(fg,{concept:q}):uo&&x?(0,Ft.jsx)(lT,{node:uo,spec:x,onConceptClick:tr}):G?.stuffData?(0,Ft.jsx)(pz,{nodeId:G.nodeId,stuffData:G.stuffData,graphspec:x,resolveStorageUrl:y,canEmbedPdf:m,onOpenExternally:g}):null,p&&G&&!q&&p(G.nodeId,G.nodeData)]}),!l&&(0,Ft.jsx)(ST,{direction:_,onDirectionChange:E,showControllers:O,onShowControllersChange:R,onZoomIn:()=>se.current?.zoomIn(),onZoomOut:()=>se.current?.zoomOut(),onFitView:()=>se.current?.fitView({padding:.1}),onFoldAll:gn.onFoldAll,onExpandAll:gn.onExpandAll,foldAllDisabled:gn.foldAllDisabled,expandAllDisabled:gn.expandAllDisabled,themeMode:u?N:void 0,onThemeModeChange:u?k:void 0,rightOffset:za?$:0})]})}function gz(e){if(e==null)return to.EXPANDED;if(e===to.FOLDED||e===to.EXPANDED||e===to.AUTO)return e;throw new Error(`Invalid foldMode in standalone config: ${JSON.stringify(e)} \u2014 expected one of "folded", "expanded", "auto".`)}function yz(e){if(e==null)return yt.SYSTEM;if(e===yt.LIGHT||e===yt.DARK||e===yt.SYSTEM)return e;throw new Error(`Invalid theme in standalone config: ${JSON.stringify(e)} \u2014 expected one of "dark", "light", "system".`)}function vz(e){if(e==null)return wn.LR;if(e===wn.LR||e===wn.RL||e===wn.TB||e===wn.BT)return e;throw new Error(`Invalid direction in standalone config: ${JSON.stringify(e)} \u2014 expected one of "TB", "BT", "LR", "RL".`)}function Sg(e,t){let n=e&&typeof e=="object"?e:{},o=vz(n.direction),i=!!n.showControllers,a=gz(n.foldMode),l=yz(n.theme);return{graphspec:t,config:{...n,direction:o,showControllers:i,foldMode:a,theme:l},initialDirection:o,initialShowControllers:i,initialFoldMode:a,theme:l}}function CT(e,t){let n=e?.trim();if(!n)return null;try{return JSON.parse(n)}catch(o){let i=o instanceof Error?o.message:String(o);throw new Error(`Failed to parse JSON from <script id="${t}">: ${i}`)}}var Ks=Sg({},null),xg=null;function wT(e){return CT(document.getElementById(e)?.textContent,e)}function bz(e,t){let n=Zf(e),o=t?{...n,...t}:n;for(let[i,a]of Object.entries(o))document.body.style.setProperty(i,a)}function DT(e,t){document.body.setAttribute("data-theme",e),bz(t,Ks.config.paletteColors)}function Sz(){return Oa.default.createElement(NT,{...Ks,onThemeChange:(e,t)=>{DT(e,t)}})}function xz({message:e}){return Oa.default.createElement("div",{className:"standalone-error",role:"alert"},Oa.default.createElement("strong",{className:"standalone-error-title"},"Failed to render method graph"),Oa.default.createElement("pre",{className:"standalone-error-message"},e))}function AT(){let e=document.getElementById("root");if(!e)return;let t=(0,MT.createRoot)(e);xg=()=>{t.render(Oa.default.createElement(Sz))},xg(),setTimeout(()=>{try{let n=wT("pipelex-config"),o=wT("pipelex-graphspec"),i=o===null?null:Lc(o);Ks=Sg(n,i),DT(Ks.theme,bg(Ks.theme,Rh())),xg?.()}catch(n){let o=n instanceof Error?n.message:String(n);t.render(Oa.default.createElement(xz,{message:o}))}},0)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",AT):AT();})();
|
|
2434
2476
|
/*! Bundled license information:
|
|
2435
2477
|
|
|
2436
2478
|
react/cjs/react.production.js:
|
|
@@ -2514,6 +2556,6 @@ dompurify/dist/purify.es.mjs:
|
|
|
2514
2556
|
(*! @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 *)
|
|
2515
2557
|
*/
|
|
2516
2558
|
|
|
2517
|
-
</script>
|
|
2518
|
-
</body>
|
|
2559
|
+
</script>
|
|
2560
|
+
</body>
|
|
2519
2561
|
</html>
|